commit 49a57857aeea06ca831043acbb0fa5e0f50602fd Author: Linus Torvalds Date: Mon Jan 21 13:14:44 2019 +1300 Linux 5.0-rc3 commit 1e556ba3b673166e28d5489b80c11e0605a86403 Merge: dbcfc96193939 5631e8576a3ca Author: Linus Torvalds Date: Mon Jan 21 13:12:03 2019 +1300 Merge tag 'pstore-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fixes from Kees Cook: - Fix console ramoops to show the previous boot logs (Sai Prakash Ranjan) - Avoid allocation and leak of platform data * tag 'pstore-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Avoid allocation and leak of platform data pstore/ram: Fix console ramoops to show the previous boot logs commit dbcfc961939394152cbcf3f17144ff3df359f216 Merge: 7d0ae236ed13d 2c88c742d0117 Author: Linus Torvalds Date: Mon Jan 21 13:07:03 2019 +1300 Merge tag 'gcc-plugins-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins fixes from Kees Cook: "Fix ARM per-task stack protector plugin under GCC 9 (Ard Biesheuvel)" * tag 'gcc-plugins-v5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: arm_ssp_per_task_plugin: fix for GCC 9+ gcc-plugins: arm_ssp_per_task_plugin: sign extend the SP mask commit 7d0ae236ed13d7645fb73b85e7c95deee46c4656 Merge: bb617b9b4519b 6436408e814b8 Author: Linus Torvalds Date: Mon Jan 21 12:52:31 2019 +1300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix endless loop in nf_tables, from Phil Sutter. 2) Fix cross namespace ip6_gre tunnel hash list corruption, from Olivier Matz. 3) Don't be too strict in phy_start_aneg() otherwise we might not allow restarting auto negotiation. From Heiner Kallweit. 4) Fix various KMSAN uninitialized value cases in tipc, from Ying Xue. 5) Memory leak in act_tunnel_key, from Davide Caratti. 6) Handle chip errata of mv88e6390 PHY, from Andrew Lunn. 7) Remove linear SKB assumption in fou/fou6, from Eric Dumazet. 8) Missing udplite rehash callbacks, from Alexey Kodanev. 9) Log dirty pages properly in vhost, from Jason Wang. 10) Use consume_skb() in neigh_probe() as this is a normal free not a drop, from Yang Wei. Likewise in macvlan_process_broadcast(). 11) Missing device_del() in mdiobus_register() error paths, from Thomas Petazzoni. 12) Fix checksum handling of short packets in mlx5, from Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (96 commits) bpf: in __bpf_redirect_no_mac pull mac only if present virtio_net: bulk free tx skbs net: phy: phy driver features are mandatory isdn: avm: Fix string plus integer warning from Clang net/mlx5e: Fix cb_ident duplicate in indirect block register net/mlx5e: Fix wrong (zero) TX drop counter indication for representor net/mlx5e: Fix wrong error code return on FEC query failure net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames tools: bpftool: Cleanup license mess bpf: fix inner map masking to prevent oob under speculation bpf: pull in pkt_sched.h header for tooling to fix bpftool build selftests: forwarding: Add a test case for externally learned FDB entries selftests: mlxsw: Test FDB offload indication mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky net: bridge: Mark FDB entries that were added by user as such mlxsw: spectrum_fid: Update dummy FID index mlxsw: pci: Return error on PCI reset timeout mlxsw: pci: Increase PCI SW reset timeout mlxsw: pci: Ring CQ's doorbell before RDQ's MAINTAINERS: update email addresses of liquidio driver maintainers ... commit 5631e8576a3caf606cdc375f97425a67983b420c Author: Kees Cook Date: Sun Jan 20 14:33:34 2019 -0800 pstore/ram: Avoid allocation and leak of platform data Yue Hu noticed that when parsing device tree the allocated platform data was never freed. Since it's not used beyond the function scope, this switches to using a stack variable instead. Reported-by: Yue Hu Fixes: 35da60941e44 ("pstore/ram: add Device Tree bindings") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 2c88c742d011707b55da7b54b06a030c6f57233f Author: Ard Biesheuvel Date: Fri Jan 18 11:58:07 2019 +0100 gcc-plugins: arm_ssp_per_task_plugin: fix for GCC 9+ GCC 9 reworks the way the references to the stack canary are emitted, to prevent the value from being spilled to the stack before the final comparison in the epilogue, defeating the purpose, given that the spill slot is under control of the attacker that we are protecting ourselves from. Since our canary value address is obtained without accessing memory (as opposed to pre-v7 code that will obtain it from a literal pool), it is unlikely (although not guaranteed) that the compiler will spill the canary value in the same way, so let's just disable this improvement when building with GCC9+. Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook commit 560706d5d2589ef510f5436d69ab510a351b8cf7 Author: Ard Biesheuvel Date: Fri Jan 18 11:58:06 2019 +0100 gcc-plugins: arm_ssp_per_task_plugin: sign extend the SP mask The ARM per-task stack protector GCC plugin hits an assert in the compiler in some case, due to the fact the the SP mask expression is not sign-extended as it should be. So fix that. Suggested-by: Kugan Vivekanandarajah Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook commit bb617b9b4519b0cef939c9c8e9c41470749f0d51 Merge: 1be969f4682b0 8e5dadfe76cf2 Author: Linus Torvalds Date: Mon Jan 21 07:37:16 2019 +1300 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/vhost fixes and cleanups from Michael Tsirkin: "Fixes and cleanups all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost/scsi: Use copy_to_iter() to send control queue response vhost: return EINVAL if iovecs size does not match the message size virtio-balloon: tweak config_changed implementation virtio: don't allocate vqs when names[i] = NULL virtio_pci: use queue idx instead of array idx to set up the vq virtio: document virtio_config_ops restrictions virtio: fix virtio_config_ops description commit 1be969f4682b0aa1995e46fba51502de55f15ce8 Merge: 315a6d850a829 fd340d0f68cc8 Author: Linus Torvalds Date: Mon Jan 21 07:35:26 2019 +1300 Merge tag 'for-5.0-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A handful of fixes (some of them in testing for a long time): - fix some test failures regarding cleanup after transaction abort - revert of a patch that could cause a deadlock - delayed iput fixes, that can help in ENOSPC situation when there's low space and a lot data to write" * tag 'for-5.0-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: wakeup cleaner thread when adding delayed iput btrfs: run delayed iputs before committing btrfs: wait on ordered extents on abort cleanup btrfs: handle delayed ref head accounting cleanup in abort Revert "btrfs: balance dirty metadata pages in btrfs_finish_ordered_io" commit 315a6d850a8290919c499cfbed08737f6164c7bd Merge: fbfaf851902cd 3e2ffd655cc6a 99e309b6ed75f Author: Linus Torvalds Date: Mon Jan 21 07:23:42 2019 +1300 Merge tags 'compiler-attributes-for-linus-v5.0-rc3' and 'clang-format-for-linus-v5.0-rc3' of git://github.com/ojeda/linux Pull misc clang fixes from Miguel Ojeda: - A fix for OPTIMIZER_HIDE_VAR from Michael S Tsirkin - Update clang-format with the latest for_each macro list from Jason Gunthorpe * tag 'compiler-attributes-for-linus-v5.0-rc3' of git://github.com/ojeda/linux: include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR * tag 'clang-format-for-linus-v5.0-rc3' of git://github.com/ojeda/linux: clang-format: Update .clang-format with the latest for_each macro list commit fbfaf851902cd9293f392f3a1735e0543016d530 Author: Florian La Roche Date: Sat Jan 19 16:14:50 2019 +0100 fix int_sqrt64() for very large numbers If an input number x for int_sqrt64() has the highest bit set, then fls64(x) is 64. (1UL << 64) is an overflow and breaks the algorithm. Subtracting 1 is a better guess for the initial value of m anyway and that's what also done in int_sqrt() implicitly [*]. [*] Note how int_sqrt() uses __fls() with two underscores, which already returns the proper raw bit number. In contrast, int_sqrt64() used fls64(), and that returns bit numbers illogically starting at 1, because of error handling for the "no bits set" case. Will points out that he bug probably is due to a copy-and-paste error from the regular int_sqrt() case. Signed-off-by: Florian La Roche Acked-by: Will Deacon Signed-off-by: Linus Torvalds commit 6e693b3ffecb0b478c7050b44a4842854154f715 Author: Will Deacon Date: Sat Jan 19 21:56:05 2019 +0000 x86: uaccess: Inhibit speculation past access_ok() in user_access_begin() Commit 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'") makes the access_ok() check part of the user_access_begin() preceding a series of 'unsafe' accesses. This has the desirable effect of ensuring that all 'unsafe' accesses have been range-checked, without having to pick through all of the callsites to verify whether the appropriate checking has been made. However, the consolidated range check does not inhibit speculation, so it is still up to the caller to ensure that they are not susceptible to any speculative side-channel attacks for user addresses that ultimately fail the access_ok() check. This is an oversight, so use __uaccess_begin_nospec() to ensure that speculation is inhibited until the access_ok() check has passed. Reported-by: Julien Thierry Signed-off-by: Will Deacon Signed-off-by: Linus Torvalds commit b0f3e768a89bbc72195023c3db1db45c40e5b70c Merge: 5d5c303ea095b 7fa1e2e6afa7f Author: Linus Torvalds Date: Sun Jan 20 15:27:59 2019 +1200 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. We've plugged a couple of nasty issues involving KASLR-enabled kernels, and removed a redundant #define that was introduced as part of the KHWASAN fixes from akpm at -rc2. - Fix broken kpti page-table rewrite in bizarre KASLR configuration - Fix module loading with KASLR - Remove redundant definition of ARCH_SLAB_MINALIGN" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: kasan, arm64: remove redundant ARCH_SLAB_MINALIGN define arm64: kaslr: ensure randomized quantities are clean to the PoC arm64: kpti: Update arm64_kernel_use_ng_mappings() when forced on commit 6436408e814b81046f4595245c1f9bc4409e945c Merge: df133f3f96257 e7c87bd6cc4ec Author: David S. Miller Date: Sat Jan 19 16:38:12 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-01-20 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a out-of-bounds access in __bpf_redirect_no_mac, from Willem. 2) Fix bpf_setsockopt to reset sock dst on SO_MARK changes, from Peter. 3) Fix map in map masking to prevent out-of-bounds access under speculative execution, from Daniel. 4) Fix bpf_setsockopt's SO_MAX_PACING_RATE to support TCP internal pacing, from Yuchung. 5) Fix json writer license in bpftool, from Thomas. 6) Fix AF_XDP to check if an actually queue exists during umem setup, from Krzysztof. 7) Several fixes to BPF stackmap's build id handling. Another fix for bpftool build to account for libbfd variations wrt linking requirements, from Stanislav. 8) Fix BPF samples build with clang by working around missing asm goto, from Yonghong. 9) Fix libbpf to retry program load on signal interrupt, from Lorenz. 10) Various minor compile warning fixes in BPF code, from Mathieu. ==================== Signed-off-by: David S. Miller commit e7c87bd6cc4ec7b0ac1ed0a88a58f8206c577488 Author: Willem de Bruijn Date: Tue Jan 15 20:19:22 2019 -0500 bpf: in __bpf_redirect_no_mac pull mac only if present Syzkaller was able to construct a packet of negative length by redirecting from bpf_prog_test_run_skb with BPF_PROG_TYPE_LWT_XMIT: BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:345 [inline] BUG: KASAN: slab-out-of-bounds in skb_copy_from_linear_data include/linux/skbuff.h:3421 [inline] BUG: KASAN: slab-out-of-bounds in __pskb_copy_fclone+0x2dd/0xeb0 net/core/skbuff.c:1395 Read of size 4294967282 at addr ffff8801d798009c by task syz-executor2/12942 kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:345 [inline] skb_copy_from_linear_data include/linux/skbuff.h:3421 [inline] __pskb_copy_fclone+0x2dd/0xeb0 net/core/skbuff.c:1395 __pskb_copy include/linux/skbuff.h:1053 [inline] pskb_copy include/linux/skbuff.h:2904 [inline] skb_realloc_headroom+0xe7/0x120 net/core/skbuff.c:1539 ipip6_tunnel_xmit net/ipv6/sit.c:965 [inline] sit_tunnel_xmit+0xe1b/0x30d0 net/ipv6/sit.c:1029 __netdev_start_xmit include/linux/netdevice.h:4325 [inline] netdev_start_xmit include/linux/netdevice.h:4334 [inline] xmit_one net/core/dev.c:3219 [inline] dev_hard_start_xmit+0x295/0xc90 net/core/dev.c:3235 __dev_queue_xmit+0x2f0d/0x3950 net/core/dev.c:3805 dev_queue_xmit+0x17/0x20 net/core/dev.c:3838 __bpf_tx_skb net/core/filter.c:2016 [inline] __bpf_redirect_common net/core/filter.c:2054 [inline] __bpf_redirect+0x5cf/0xb20 net/core/filter.c:2061 ____bpf_clone_redirect net/core/filter.c:2094 [inline] bpf_clone_redirect+0x2f6/0x490 net/core/filter.c:2066 bpf_prog_41f2bcae09cd4ac3+0xb25/0x1000 The generated test constructs a packet with mac header, network header, skb->data pointing to network header and skb->len 0. Redirecting to a sit0 through __bpf_redirect_no_mac pulls the mac length, even though skb->data already is at skb->network_header. bpf_prog_test_run_skb has already pulled it as LWT_XMIT !is_l2. Update the offset calculation to pull only if skb->data differs from skb->network_header, which is not true in this case. The test itself can be run only from commit 1cf1cae963c2 ("bpf: introduce BPF_PROG_TEST_RUN command"), but the same type of packets with skb at network header could already be built from lwt xmit hooks, so this fix is more relevant to that commit. Also set the mac header on redirect from LWT_XMIT, as even after this change to __bpf_redirect_no_mac that field is expected to be set, but is not yet in ip_finish_output2. Fixes: 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure") Reported-by: syzbot Signed-off-by: Willem de Bruijn Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit df133f3f96257ee29696c0ed8bd198ec801dc810 Author: Michael S. Tsirkin Date: Thu Jan 17 23:20:07 2019 -0500 virtio_net: bulk free tx skbs Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is safe to call in a non-napi context as long as the napi_budget flag is correct. Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller commit 5d5c303ea095bdd3a2b073075920bf159457069a Merge: 6a0141a0966cf 8a644c64a9f1a Author: Linus Torvalds Date: Sun Jan 20 10:33:18 2019 +1200 Merge tag 'mips_fixes_5.0_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: - Fix IPI handling for Lantiq SoCs, which was broken by changes made back in v4.12. - Enable OF/DT serial support in ath79_defconfig to give us working serial by default. - Fix 64b builds for the Jazz platform. - Set up a struct device for the BCM47xx SoC to allow BCM47xx drivers to perform DMA again following the major DMA mapping changes made in v4.19. - Disable MSI on Cavium Octeon systems when the pcie_disable command line parameter introduced in v3.3 is used, in order to avoid inadvetently accessing PCIe controller registers despite the command line. - Fix a build failure for Cavium Octeon kernels with kexec enabled, introduced in v4.20. - Fix a regression in the behaviour of semctl/shmctl/msgctl IPC syscalls for kernels including n32 support but not o32 support caused by some cleanup in v3.19. * tag 'mips_fixes_5.0_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: OCTEON: fix kexec support mips: fix n32 compat_ipc_parse_version Disable MSI also when pcie-octeon.pcie_disable on MIPS: BCM47XX: Setup struct device for the SoC MIPS: jazz: fix 64bit build MIPS: ath79: Enable OF serial ports in the default config MIPS: lantiq: Use CP0_LEGACY_COMPARE_IRQ MIPS: lantiq: Fix IPI interrupt handling commit 6a0141a0966cfbd765bff065c3eb61b09a92318e Merge: 26caabbcd7a5d 75a080cde08d2 Author: Linus Torvalds Date: Sun Jan 20 10:28:46 2019 +1200 Merge tag 'devicetree-fixes-for-5.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fix from Rob Herring: "A single build fix for powerpc due to device_node.type removal" * tag 'devicetree-fixes-for-5.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: powerpc: chrp: Use of_node_is_type to access device_type commit 26caabbcd7a5d10577fd59eded2ec1c44466659e Merge: f403d718ebde2 faa8bd6e12e6a Author: Linus Torvalds Date: Sun Jan 20 10:24:30 2019 +1200 Merge tag 'libnvdimm-fixes-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A crash fix, a build warning fix, a miscellaneous small cleanups. In case anyone is looking for them, there was a regression caught by testing that caused two patches to be dropped from this update. Those patches have been reworked and will soak for another week / re-target 5.0-rc4. - Fix driver initialization crash due to the inability to report an 'error' state for a DIMM's security capability. - Build warning fix for little-endian ARM64 builds - Fix a potential race between the EDAC driver's usage of the NFIT SMBIOS id for a DIMM and the driver shutdown path. - A small collection of one-line benign cleanups for duplicate variable assignments, a duplicate header include and a mis-typed function argument" * tag 'libnvdimm-fixes-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm/security: Fix nvdimm_security_state() state request selection acpi/nfit: Remove duplicate set nd_set in acpi_nfit_init_interleave_set() acpi/nfit: Fix race accessing memdev in nfit_get_smbios_id() libnvdimm/dimm: Fix security capability detection for non-Intel NVDIMMs nfit: Mark some functions as __maybe_unused ACPI/nfit: delete the function to_acpi_nfit_desc ACPI/nfit: delete the redundant header file commit f403d718ebde2059de848ae7548392dfb25a13ae Merge: b0efca46b5707 4a22fc534f2f5 Author: Linus Torvalds Date: Sun Jan 20 09:58:52 2019 +1200 Merge tag 'linux-watchdog-5.0-rc-fixes' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - mt7621_wdt/rt2880_wdt: Fix compilation problem - tqmx86: Fix a couple IS_ERR() vs NULL bugs * tag 'linux-watchdog-5.0-rc-fixes' of git://www.linux-watchdog.org/linux-watchdog: watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs watchdog: mt7621_wdt/rt2880_wdt: Fix compilation problem commit b0efca46b57071e4c281034f04d2b56edf79843d Merge: 4d5f6e0201bc5 deaa5c96c2f7e Author: Linus Torvalds Date: Sun Jan 20 09:27:38 2019 +1200 Merge tag 'nfs-for-5.0-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "These are mostly fixes for SUNRPC bugs, with a single v4.2 copy_file_range() fix mixed in. Stable bugfixes: - Fix TCP receive code on archs with flush_dcache_page() Other bugfixes: - Fix error code in rpcrdma_buffer_create() - Fix a double free in rpcrdma_send_ctxs_create() - Fix kernel BUG at kernel/cred.c:825 - Fix unnecessary retry in nfs42_proc_copy_file_range() - Ensure rq_bytes_sent is reset before request transmission - Ensure we respect the RPCSEC_GSS sequence number limit - Address Kerberos performance/behavior regression" * tag 'nfs-for-5.0-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: SUNRPC: Address Kerberos performance/behavior regression SUNRPC: Ensure we respect the RPCSEC_GSS sequence number limit SUNRPC: Ensure rq_bytes_sent is reset before request transmission NFSv4.2 fix unnecessary retry in nfs4_copy_file_range sunrpc: kernel BUG at kernel/cred.c:825! SUNRPC: Fix TCP receive code on archs with flush_dcache_page() xprtrdma: Double free in rpcrdma_sendctxs_create() xprtrdma: Fix error code in rpcrdma_buffer_create() commit 4d5f6e0201bc568c0758ed3f77a06648ec9fd482 Merge: 0facb892456ff 9e8f1c7983142 Author: Linus Torvalds Date: Sun Jan 20 09:15:04 2019 +1200 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A set of 17 fixes. Most of these are minor or trivial. The one fix that may be serious is the isci one: the bug can cause hba parameters to be set from uninitialized memory. I don't think it's exploitable, but you never know" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: cxgb4i: add wait_for_completion() scsi: qla1280: set 64bit coherent mask scsi: ufs: Fix geometry descriptor size scsi: megaraid_sas: Retry reads of outbound_intr_status reg scsi: qedi: Add ep_state for login completion on un-reachable targets scsi: ufs: Fix system suspend status scsi: qla2xxx: Use correct number of vectors for online CPUs scsi: hisi_sas: Set protection parameters prior to adding SCSI host scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes scsi: isci: initialize shost fully before calling scsi_add_host() scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start scsi: core: Synchronize request queue PM status only on successful resume scsi: pm80xx: reduce indentation scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param scsi: megaraid_sas: correct an info message scsi: target/iscsi: fix error msg typo when create lio_qr_cache failed scsi: sd: Fix cache_type_store() commit 0facb892456ff922924e704f78cafcaa7be85e8c Merge: 2339e91d0e660 38197ca176fc2 Author: Linus Torvalds Date: Sun Jan 20 09:12:50 2019 +1200 Merge tag 'for-linus-20190118' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - block size setting fixes for loop/nbd (Jan Kara) - md bio_alloc_mddev() cleanup (Marcos) - Ensure we don't lose the REQ_INTEGRITY flag (Ming) - Two NVMe fixes by way of Christoph: - Fix NVMe IRQ calculation (Ming) - Uninitialized variable in nvmet-tcp (Sagi) - BFQ comment fix (Paolo) - License cleanup for recently added blk-mq-debugfs-zoned (Thomas) * tag 'for-linus-20190118' of git://git.kernel.dk/linux-block: block: Cleanup license notice nvme-pci: fix nvme_setup_irqs() nvmet-tcp: fix uninitialized variable access block: don't lose track of REQ_INTEGRITY flag blockdev: Fix livelocks on loop device nbd: Use set_blocksize() to set device blocksize md: Make bio_alloc_mddev use bio_alloc_bioset block, bfq: fix comments on __bfq_deactivate_entity commit 99e309b6ed75fab4a43afd9e523441ecc5a1f511 Author: Jason Gunthorpe Date: Fri Jan 18 22:57:04 2019 +0000 clang-format: Update .clang-format with the latest for_each macro list Re-run the shell fragment that generated the original list. In particular this adds the missing xarray related functions. Signed-off-by: Jason Gunthorpe Signed-off-by: Miguel Ojeda commit 3e64cf7a435ed0500e3adaa8aada2272d3ae8abc Author: Camelia Groza Date: Thu Jan 17 14:22:36 2019 +0200 net: phy: phy driver features are mandatory Since phy driver features became a link_mode bitmap, phy drivers that don't have a list of features configured will cause the kernel to crash when probed. Prevent the phy driver from registering if the features field is missing. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Reported-by: Scott Wood Signed-off-by: Camelia Groza Signed-off-by: David S. Miller commit 7afa81c55fca0cad589722cb4bce698b4803b0e1 Author: Nathan Chancellor Date: Wed Jan 9 22:41:08 2019 -0700 isdn: avm: Fix string plus integer warning from Clang A recent commit in Clang expanded the -Wstring-plus-int warning, showing some odd behavior in this file. drivers/isdn/hardware/avm/b1.c:426:30: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] cinfo->version[j] = "\0\0" + 1; ~~~~~~~^~~ drivers/isdn/hardware/avm/b1.c:426:30: note: use array indexing to silence this warning cinfo->version[j] = "\0\0" + 1; ^ & [ ] 1 warning generated. This is equivalent to just "\0". Nick pointed out that it is smarter to use "" instead of "\0" because "" is used elsewhere in the kernel and can be deduplicated at the linking stage. Link: https://github.com/ClangBuiltLinux/linux/issues/309 Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 75a080cde08d2dcba19ee864f9732094d93fab41 Author: Rob Herring Date: Fri Jan 18 08:12:10 2019 -0600 powerpc: chrp: Use of_node_is_type to access device_type Commit 8ce5f8415753 ("of: Remove struct device_node.type pointer") removed struct device_node.type pointer, but the conversion to use of_node_is_type() accessor was missed in chrp_init_IRQ(). Fixes: 8ce5f8415753 ("of: Remove struct device_node.type pointer") Reported-by: kbuild test robot Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Rob Herring commit 8a7fa0c35027d1a3ec3c3e8612800a1b4738e3c3 Merge: efa8c819a6892 25f2d0e7791e7 Author: David S. Miller Date: Fri Jan 18 18:23:23 2019 -0800 Merge tag 'mlx5-fixes-2019-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-01-18 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.18 ('net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames') The patch doesn't apply cleanly to 4.18.y, but it is very simple to resolve, what should be the procedure here ? ==================== Signed-off-by: David S. Miller commit 25f2d0e7791e71cc89c58a7c2231768ad200764b Author: Eli Britstein Date: Wed Dec 19 07:36:51 2018 +0200 net/mlx5e: Fix cb_ident duplicate in indirect block register Previously the identifier used for indirect block callback registry and for block rule cb registry (when done via indirect blocks) was the pointer to the tunnel netdev we were interested in receiving updates on. This worked fine if a single PF existed that registered one callback for the tunnel netdev of interest. However, if multiple PFs are in place then the 2nd PF tries to register with the same tunnel netdev identifier. This leads to EEXIST errors and/or incorrect cb deletions. Prevent this conflict by using the rpriv pointer as the identifier for netdev indirect block cb registry, allowing each PF to register a unique callback per tunnel netdev. For block cb registry, the same PF may register multiple cbs to the same block if using TC shared blocks. Instead of the rpriv, use the pointer to the allocated indr_priv data as the identifier here. This means that there can be a unique block callback for each PF/tunnel netdev combo. Fixes: f5bc2c5de101 ("net/mlx5e: Support TC indirect block notifications for eswitch uplink reprs") Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 7fdc1adc52d3975740547a78c2df329bb207f15d Author: Tariq Toukan Date: Thu Nov 8 12:06:53 2018 +0200 net/mlx5e: Fix wrong (zero) TX drop counter indication for representor For representors, the TX dropped counter is not folded from the per-ring counters. Fix it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 2eb1e42551a8128d9182480dfaea52fa861e26e8 Author: Shay Agroskin Date: Sun Dec 9 12:00:13 2018 +0200 net/mlx5e: Fix wrong error code return on FEC query failure Advertised and configured FEC query failure resulted in printing wrong error code. Fixes: 6cfa94605091 ("net/mlx5e: Ethtool driver callback for query/set FEC policy") Signed-off-by: Shay Agroskin Reported-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit e8c8b53ccaff568fef4c13a6ccaf08bf241aa01a Author: Cong Wang Date: Mon Dec 3 22:14:04 2018 -0800 net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames When an ethernet frame is padded to meet the minimum ethernet frame size, the padding octets are not covered by the hardware checksum. Fortunately the padding octets are usually zero's, which don't affect checksum. However, we have a switch which pads non-zero octets, this causes kernel hardware checksum fault repeatedly. Prior to: commit '88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE ...")' skb checksum was forced to be CHECKSUM_NONE when padding is detected. After it, we need to keep skb->csum updated, like what we do for RXFCS. However, fixing up CHECKSUM_COMPLETE requires to verify and parse IP headers, it is not worthy the effort as the packets are so small that CHECKSUM_COMPLETE can't save anything. Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"), Cc: Eric Dumazet Cc: Tariq Toukan Cc: Nikola Ciprich Signed-off-by: Cong Wang Signed-off-by: Saeed Mahameed commit 64cf5481262b9664ae3cdcb333f4a06af3e8fb58 Author: Thomas Gleixner Date: Fri Jan 18 00:14:24 2019 +0100 tools: bpftool: Cleanup license mess Precise and non-ambiguous license information is important. The recent relicensing of the bpftools introduced a license conflict. The files have now: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause and * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version Amazingly about 20 people acked that change and neither they nor the committer noticed. Oh well. Digging deeper: The files were imported from the iproute2 repository with the GPL V2 or later boiler plate text in commit b66e907cfee2 ("tools: bpftool: copy JSON writer from iproute2 repository") Looking at the iproute2 repository at git://git.kernel.org/pub/scm/network/iproute2/iproute2.git the following commit is the equivivalent: commit d9d8c839 ("json_writer: add SPDX Identifier (GPL-2/BSD-2)") That commit explicitly removes the boiler plate and relicenses the code uner GPL-2.0-only and BSD-2-Clause. As Steven wrote the original code and also the relicensing commit, it's assumed that the relicensing was intended to do exaclty that. Just the kernel side update failed to remove the boiler plate. Do so now. Fixes: 907b22365115 ("tools: bpftool: dual license all files") Signed-off-by: Thomas Gleixner Cc: Jakub Kicinski Cc: Roman Gushchin Cc: YueHaibing Cc: Yonghong Song Cc: Stanislav Fomichev Cc: Sean Young Cc: Jiri Benc Cc: David Calavera Cc: Andrey Ignatov Cc: Joe Stringer Cc: David Ahern Cc: Alexei Starovoitov Cc: Petar Penkov Cc: Sandipan Das Cc: Prashant Bhole Cc: Stephen Hemminger Cc: John Fastabend Cc: Taeung Song Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Quentin Monnet CC: okash.khawaja@gmail.com Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 9d5564ddcf2a0f5ba3fa1c3a1f8a1b59ad309553 Author: Daniel Borkmann Date: Thu Jan 17 16:34:45 2019 +0100 bpf: fix inner map masking to prevent oob under speculation During review I noticed that inner meta map setup for map in map is buggy in that it does not propagate all needed data from the reference map which the verifier is later accessing. In particular one such case is index masking to prevent out of bounds access under speculative execution due to missing the map's unpriv_array/index_mask field propagation. Fix this such that the verifier is generating the correct code for inlined lookups in case of unpriviledged use. Before patch (test_verifier's 'map in map access' dump): # bpftool prog dump xla id 3 0: (62) *(u32 *)(r10 -4) = 0 1: (bf) r2 = r10 2: (07) r2 += -4 3: (18) r1 = map[id:4] 5: (07) r1 += 272 | 6: (61) r0 = *(u32 *)(r2 +0) | 7: (35) if r0 >= 0x1 goto pc+6 | Inlined map in map lookup 8: (54) (u32) r0 &= (u32) 0 | with index masking for 9: (67) r0 <<= 3 | map->unpriv_array. 10: (0f) r0 += r1 | 11: (79) r0 = *(u64 *)(r0 +0) | 12: (15) if r0 == 0x0 goto pc+1 | 13: (05) goto pc+1 | 14: (b7) r0 = 0 | 15: (15) if r0 == 0x0 goto pc+11 16: (62) *(u32 *)(r10 -4) = 0 17: (bf) r2 = r10 18: (07) r2 += -4 19: (bf) r1 = r0 20: (07) r1 += 272 | 21: (61) r0 = *(u32 *)(r2 +0) | Index masking missing (!) 22: (35) if r0 >= 0x1 goto pc+3 | for inner map despite 23: (67) r0 <<= 3 | map->unpriv_array set. 24: (0f) r0 += r1 | 25: (05) goto pc+1 | 26: (b7) r0 = 0 | 27: (b7) r0 = 0 28: (95) exit After patch: # bpftool prog dump xla id 1 0: (62) *(u32 *)(r10 -4) = 0 1: (bf) r2 = r10 2: (07) r2 += -4 3: (18) r1 = map[id:2] 5: (07) r1 += 272 | 6: (61) r0 = *(u32 *)(r2 +0) | 7: (35) if r0 >= 0x1 goto pc+6 | Same inlined map in map lookup 8: (54) (u32) r0 &= (u32) 0 | with index masking due to 9: (67) r0 <<= 3 | map->unpriv_array. 10: (0f) r0 += r1 | 11: (79) r0 = *(u64 *)(r0 +0) | 12: (15) if r0 == 0x0 goto pc+1 | 13: (05) goto pc+1 | 14: (b7) r0 = 0 | 15: (15) if r0 == 0x0 goto pc+12 16: (62) *(u32 *)(r10 -4) = 0 17: (bf) r2 = r10 18: (07) r2 += -4 19: (bf) r1 = r0 20: (07) r1 += 272 | 21: (61) r0 = *(u32 *)(r2 +0) | 22: (35) if r0 >= 0x1 goto pc+4 | Now fixed inlined inner map 23: (54) (u32) r0 &= (u32) 0 | lookup with proper index masking 24: (67) r0 <<= 3 | for map->unpriv_array. 25: (0f) r0 += r1 | 26: (05) goto pc+1 | 27: (b7) r0 = 0 | 28: (b7) r0 = 0 29: (95) exit Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit ad6dd7a9c47ba587c0aba57f73737764cd31136f Author: Daniel Borkmann Date: Thu Jan 17 16:15:09 2019 +0100 bpf: pull in pkt_sched.h header for tooling to fix bpftool build Dan reported that bpftool does not compile for him: $ make tools/bpf DESCEND bpf Auto-detecting system features: .. libbfd: [ on ] .. disassembler-four-args: [ OFF ] DESCEND bpftool Auto-detecting system features: .. libbfd: [ on ] .. disassembler-four-args: [ OFF ] CC /opt/linux.git/tools/bpf/bpftool/net.o In file included from /opt/linux.git/tools/include/uapi/linux/pkt_cls.h:6:0, from /opt/linux.git/tools/include/uapi/linux/tc_act/tc_bpf.h:14, from net.c:13: net.c: In function 'show_dev_tc_bpf': net.c:164:21: error: 'TC_H_CLSACT' undeclared (first use in this function) handle = TC_H_MAKE(TC_H_CLSACT, TC_H_MIN_INGRESS); [...] Fix it by importing pkt_sched.h header copy into tooling infrastructure. Fixes: 49a249c38726 ("tools/bpftool: copy a few net uapi headers to tools directory") Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support") Reported-by: Dan Gilson Reference: https://bugzilla.kernel.org/show_bug.cgi?id=202315 Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit efa8c819a6892b03d5535b2ce1d8c85ea9850b58 Merge: 20f5248a502b6 479a2b761d61c Author: David S. Miller Date: Fri Jan 18 15:12:16 2019 -0800 Merge branch 'mlxsw-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes This patchset contains small fixes in mlxsw and one fix in the bridge driver. Patches #1-#4 perform small adjustments in PCI and FID code following recent tests that were performed on the Spectrum-2 ASIC. Patch #5 fixes the bridge driver to mark FDB entries that were added by user as such. Otherwise, these entries will be ignored by underlying switch drivers. Patch #6 fixes a long standing issue in mlxsw where the driver incorrectly programmed static FDB entries as both static and sticky. Patches #7-#8 add test cases for above mentioned bugs. Please consider patches #1, #2 and #4 for stable. ==================== Signed-off-by: David S. Miller commit 479a2b761d61c04e2ae97325aa391a8a8c99c23e Author: Ido Schimmel Date: Fri Jan 18 15:58:03 2019 +0000 selftests: forwarding: Add a test case for externally learned FDB entries Test that externally learned FDB entries can roam, but not age out. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 72159272fc08230a76791dd5d0a0019ede1b802c Author: Ido Schimmel Date: Fri Jan 18 15:58:02 2019 +0000 selftests: mlxsw: Test FDB offload indication Test that externally learned FDB entries added from user space are marked as offloaded. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 64254a2054611205798e6bde634639bc704573ac Author: Ido Schimmel Date: Fri Jan 18 15:58:01 2019 +0000 mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky The driver currently treats static FDB entries as both static and sticky. This is incorrect and prevents such entries from being roamed to a different port via learning. Fix this by configuring static entries with ageing disabled and roaming enabled. In net-next we can add proper support for the newly introduced 'sticky' flag. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Reported-by: Alexander Petrovskiy Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 710ae72877378e7cde611efd30fe90502a6e5b30 Author: Ido Schimmel Date: Fri Jan 18 15:58:00 2019 +0000 net: bridge: Mark FDB entries that were added by user as such Externally learned entries can be added by a user or by a switch driver that is notifying the bridge driver about entries that were learned in hardware. In the first case, the entries are not marked with the 'added_by_user' flag, which causes switch drivers to ignore them and not offload them. The 'added_by_user' flag can be set on externally learned FDB entries based on the 'swdev_notify' parameter in br_fdb_external_learn_add(), which effectively means if the created / updated FDB entry was added by a user or not. Fixes: 816a3bed9549 ("switchdev: Add fdb.added_by_user to switchdev notifications") Signed-off-by: Ido Schimmel Reported-by: Alexander Petrovskiy Reviewed-by: Petr Machata Cc: Roopa Prabhu Cc: Nikolay Aleksandrov Cc: bridge@lists.linux-foundation.org Signed-off-by: David S. Miller commit a11dcd6497915ba79d95ef4fe2541aaac27f6201 Author: Nir Dotan Date: Fri Jan 18 15:57:59 2019 +0000 mlxsw: spectrum_fid: Update dummy FID index When using a tc flower action of egress mirred redirect, the driver adds an implicit FID setting action. This implicit action sets a dummy FID to the packet and is used as part of a design for trapping unmatched flows in OVS. While this implicit FID setting action is supposed to be a NOP when a redirect action is added, in Spectrum-2 the FID record is consulted as the dummy FID index is an 802.1D FID index and the packet is dropped instead of being redirected. Set the dummy FID index value to be within 802.1Q range. This satisfies both Spectrum-1 which ignores the FID and Spectrum-2 which identifies it as an 802.1Q FID and will then follow the redirect action. Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC") Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 67c14cc9b35055264fc0efed00159a7de1819f1b Author: Nir Dotan Date: Fri Jan 18 15:57:57 2019 +0000 mlxsw: pci: Return error on PCI reset timeout Return an appropriate error in the case when the driver timeouts on waiting for firmware to go out of PCI reset. Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check") Signed-off-by: Nir Dotan Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d2f372ba0914e5722ac28e15f2ed2db61bcf0e44 Author: Nir Dotan Date: Fri Jan 18 15:57:56 2019 +0000 mlxsw: pci: Increase PCI SW reset timeout Spectrum-2 PHY layer introduces a calibration period which is a part of the Spectrum-2 firmware boot process. Hence increase the SW timeout waiting for the firmware to come out of boot. This does not increase system boot time in cases where the firmware PHY calibration process is done quickly. Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC") Signed-off-by: Nir Dotan Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c9ebea04cb1b0a84d08de00f4800f726ca544ad2 Author: Ido Schimmel Date: Fri Jan 18 15:57:55 2019 +0000 mlxsw: pci: Ring CQ's doorbell before RDQ's When a packet should be trapped to the CPU the device consumes a WQE (work queue element) from an RDQ (receive descriptor queue) and copies the packet to the address specified in the WQE. The device then tries to post a CQE (completion queue element) that contains various metadata (e.g., ingress port) about the packet to a CQ (completion queue). In case the device managed to consume a WQE, but did not manage to post the corresponding CQE, it will get stuck. This unlikely situation can be triggered due to the scheme the driver is currently using to process CQEs. The driver will consume up to 512 CQEs at a time and after processing each corresponding WQE it will ring the RDQ's doorbell, letting the device know that a new WQE was posted for it to consume. Only after processing all the CQEs (up to 512), the driver will ring the CQ's doorbell, letting the device know that new ones can be posted. Fix this by having the driver ring the CQ's doorbell for every processed CQE, but before ringing the RDQ's doorbell. This guarantees that whenever we post a new WQE, there is a corresponding CQE available. Copy the currently processed CQE to prevent the device from overwriting it with a new CQE after ringing the doorbell. Note that the driver still arms the CQ only after processing all the pending CQEs, so that interrupts for this CQ will only be delivered after the driver finished its processing. Before commit 8404f6f2e8ed ("mlxsw: pci: Allow to use CQEs of version 1 and version 2") the issue was virtually impossible to trigger since the number of CQEs was twice the number of WQEs and the number of CQEs processed at a time was equal to the number of available WQEs. Fixes: 8404f6f2e8ed ("mlxsw: pci: Allow to use CQEs of version 1 and version 2") Signed-off-by: Ido Schimmel Reported-by: Semion Lisyansky Tested-by: Semion Lisyansky Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 20f5248a502b6d41746c02c699ec9791a03a4e27 Author: Felix Manlunas Date: Thu Jan 17 18:07:45 2019 +0000 MAINTAINERS: update email addresses of liquidio driver maintainers Update email addresses of liquidio driver maintainers. Also remove a former maintainer. Signed-off-by: Felix Manlunas Acked-by: Derek Chickles Signed-off-by: David S. Miller commit 9437b629518866274d324122066a86ac6500c6b5 Author: Jonathan Neuschäfer Date: Thu Jan 17 18:02:18 2019 +0100 net: Fix typo in NET_FAILOVER help text "also enables" should not be spelled as one word. Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller commit 6c57f0458022298e4da1729c67bd33ce41c14e7a Author: Ross Lagerwall Date: Thu Jan 17 15:34:38 2019 +0000 net: Fix usage of pskb_trim_rcsum In certain cases, pskb_trim_rcsum() may change skb pointers. Reinitialize header pointers afterwards to avoid potential use-after-frees. Add a note in the documentation of pskb_trim_rcsum(). Found by KASAN. Signed-off-by: Ross Lagerwall Signed-off-by: David S. Miller commit 2339e91d0e6609e17943a0ab3c3c8c4044760c05 Merge: d28f3e7219743 240809ef6630a Author: Linus Torvalds Date: Sat Jan 19 07:34:10 2019 +1200 Merge tag 'media/v5.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a regression fix at v4l2 core, with affects multi-plane streams - a fix at vim2m driver * tag 'media/v5.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: vim2m: only cancel work if it is for right context media: v4l: ioctl: Validate num_planes for debug messages media: v4l: ioctl: Validate num_planes before using it media: v4l2-ioctl: Clear only per-plane reserved fields commit d28f3e721974378c404f16d17638d9ae5c0db0d2 Merge: 8b4fe58db6794 d2fd6e81912a6 Author: Linus Torvalds Date: Sat Jan 19 07:26:16 2019 +1200 Merge tag 'pci-v5.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas:: - Fix PCI kconfig menu organization (Rob Herring) - Fix pci_alloc_irq_vectors_affinity() error return to allow "reduce and retry" for drivers using IRQ sets (Ming Lei) - Fix "pci=disable_acs_redir" initdata use-after-free problem (Logan Gunthorpe) * tag 'pci-v5.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Fix __initdata issue with "pci=disable_acs_redir" parameter PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity() PCI: Fix PCI kconfig menu organization commit 8b4fe58db67947b0c7195405ecb041a991580693 Merge: 3cdf680ea14d8 f29fd331aa055 Author: Linus Torvalds Date: Sat Jan 19 07:23:25 2019 +1200 Merge tag 'i3c/fixes-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c fixes from Boris Brezillon: - Fix the error check on master->sysclk val in the Cadence driver - Fix reattach implementation in the Designware driver * tag 'i3c/fixes-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: dw-i3c-master: fix i3c_attach/reattach i3c: master: Fix an error checking typo in 'cdns_i3c_master_probe()' commit 3cdf680ea14d8bd3460894eaae0a8bd6a048f705 Merge: 6e4673b42e68c d311e0c27b8fc Author: Linus Torvalds Date: Sat Jan 19 07:21:43 2019 +1200 Merge tag 'mtd/fixes-for-5.0-rc3' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "Raw NAND changes: - jz4740: fix a compilation warning - fsmc: fix a regression introduced by ->select_chip() deprecation - denali: fix a regression introduced by NAND_KEEP_TIMINGS addition" * tag 'mtd/fixes-for-5.0-rc3' of git://git.infradead.org/linux-mtd: mtd: rawnand: denali: get ->setup_data_interface() working again mtd: nand: jz4740: fix '__iomem *' vs. '* __iomem' mtd: rawnand: fsmc: Keep bank enable bit set commit 6e4673b42e68c78e449f3f6bfe64ff615c90d0f0 Merge: c5b709804ed7d 7151449fe7fa5 Author: Linus Torvalds Date: Sat Jan 19 07:17:19 2019 +1200 Merge tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "The cleanups for the way we handle type information introduced during the merge window revealed that we'd been abusing the irq APIs for a long time, causing breakage for systems. This has a couple of minimal fixes for that which restore the previous behaviour for the time being, we'll fix it properly for v5.1 but that'd be a bit much to do as a bug fix" * tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: do not write mask register if mask_base is zero regmap: regmap-irq: silently ignore unsupported type settings commit e40e2a2e78664fa90ea4b9bdf4a84efce2fea9d9 Author: Thomas Petazzoni Date: Wed Jan 16 10:53:58 2019 +0100 net: phy: mdio_bus: add missing device_del() in mdiobus_register() error handling The current code in __mdiobus_register() doesn't properly handle failures returned by the devm_gpiod_get_optional() call: it returns immediately, without unregistering the device that was added by the call to device_register() earlier in the function. This leaves a stale device, which then causes a NULL pointer dereference in the code that handles deferred probing: [ 1.489982] Unable to handle kernel NULL pointer dereference at virtual address 00000074 [ 1.498110] pgd = (ptrval) [ 1.500838] [00000074] *pgd=00000000 [ 1.504432] Internal error: Oops: 17 [#1] SMP ARM [ 1.509133] Modules linked in: [ 1.512192] CPU: 1 PID: 51 Comm: kworker/1:3 Not tainted 4.20.0-00039-g3b73a4cc8b3e-dirty #99 [ 1.520708] Hardware name: Xilinx Zynq Platform [ 1.525261] Workqueue: events deferred_probe_work_func [ 1.530403] PC is at klist_next+0x10/0xfc [ 1.534403] LR is at device_for_each_child+0x40/0x94 [ 1.539361] pc : [] lr : [] psr: 200e0013 [ 1.545628] sp : ceeefe68 ip : 00000001 fp : ffffe000 [ 1.550863] r10: 00000000 r9 : c0c66790 r8 : 00000000 [ 1.556079] r7 : c0457d44 r6 : 00000000 r5 : ceeefe8c r4 : cfa2ec78 [ 1.562604] r3 : 00000064 r2 : c0457d44 r1 : ceeefe8c r0 : 00000064 [ 1.569129] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 1.576263] Control: 18c5387d Table: 0ed7804a DAC: 00000051 [ 1.582013] Process kworker/1:3 (pid: 51, stack limit = 0x(ptrval)) [ 1.588280] Stack: (0xceeefe68 to 0xceef0000) [ 1.592630] fe60: cfa2ec78 c0c03c08 00000000 c0457d44 00000000 c0c66790 [ 1.600814] fe80: 00000000 c0455d90 ceeefeac 00000064 00000000 0d7a542e cee9d494 cfa2ec78 [ 1.608998] fea0: cfa2ec78 00000000 c0457d44 c0457d7c cee9d494 c0c03c08 00000000 c0455dac [ 1.617182] fec0: cf98ba44 cf926a00 cee9d494 0d7a542e 00000000 cf935a10 cf935a10 cf935a10 [ 1.625366] fee0: c0c4e9b8 c0457d7c c0c4e80c 00000001 cf935a10 c0457df4 cf935a10 c0c4e99c [ 1.633550] ff00: c0c4e99c c045a27c c0c4e9c4 ced63f80 cfde8a80 cfdebc00 00000000 c013893c [ 1.641734] ff20: cfde8a80 cfde8a80 c07bd354 ced63f80 ced63f94 cfde8a80 00000008 c0c02d00 [ 1.649936] ff40: cfde8a98 cfde8a80 ffffe000 c0139a30 ffffe000 c0c6624a c07bd354 00000000 [ 1.658120] ff60: ffffe000 cee9e780 ceebfe00 00000000 ceeee000 ced63f80 c0139788 cf8cdea4 [ 1.666304] ff80: cee9e79c c013e598 00000001 ceebfe00 c013e44c 00000000 00000000 00000000 [ 1.674488] ffa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 1.682671] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.690855] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 1.699058] [] (klist_next) from [] (device_for_each_child+0x40/0x94) [ 1.707241] [] (device_for_each_child) from [] (device_reorder_to_tail+0x38/0x88) [ 1.716476] [] (device_reorder_to_tail) from [] (device_for_each_child+0x5c/0x94) [ 1.725692] [] (device_for_each_child) from [] (device_reorder_to_tail+0x38/0x88) [ 1.734927] [] (device_reorder_to_tail) from [] (device_pm_move_to_tail+0x28/0x40) [ 1.744235] [] (device_pm_move_to_tail) from [] (deferred_probe_work_func+0x58/0x8c) [ 1.753746] [] (deferred_probe_work_func) from [] (process_one_work+0x210/0x4fc) [ 1.762888] [] (process_one_work) from [] (worker_thread+0x2a8/0x5c0) [ 1.771072] [] (worker_thread) from [] (kthread+0x14c/0x154) [ 1.778482] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 1.785689] Exception stack(0xceeeffb0 to 0xceeefff8) [ 1.790739] ffa0: 00000000 00000000 00000000 00000000 [ 1.798923] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.807107] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.813724] Code: e92d47f0 e1a05000 e8900048 e1a00003 (e5937010) [ 1.819844] ---[ end trace 3c2c0c8b65399ec9 ]--- The actual error that we had from devm_gpiod_get_optional() was -EPROBE_DEFER, due to the GPIO being provided by a driver that is probed later than the Ethernet controller driver. To fix this, we simply add the missing device_del() invocation in the error path. Fixes: 69226896ad636 ("mdio_bus: Issue GPIO RESET to PHYs") Signed-off-by: Thomas Petazzoni Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0e78f389a7cdc6de7dfd0778733f3b140c981c9e Author: Otto Sabart Date: Mon Jan 14 12:56:36 2019 +0100 doc: net: fix bad references to network drivers Fix "reference to nonexisting document" warnings. Fixes: b255e500c8dc ("net: documentation: build a directory structure for drivers") Signed-off-by: Otto Sabart Signed-off-by: David S. Miller commit c5b709804ed7d36c45b5efa170d9e3ea8c29b865 Merge: e6ec2fda2d464 7bea7ac0ca012 Author: Linus Torvalds Date: Sat Jan 19 05:55:42 2019 +1200 Merge tag 'powerpc-5.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A couple of weeks of fixes. There's one fix for an oops on Power9 machines with Open CAPI adapters. And a fix for probable memory corruption in some of the new NPU code, caught by smatch though and not seen in the wild. Plus a few other minor fixes. There's one non-fix which is the perf_regs change. That was sent during the merge window but I accidentally only merged the first of two patches in the series. It's been in linux-next so hopefully doesn't conflict with anything in acme's tree. Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Breno Leitao, Christian Lamparter, Christophe Leroy, Dan Carpenter, Frederic Barrat, Greg Kurz, Jason A. Donenfeld, Madhavan Srinivasan" * tag 'powerpc-5.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/syscalls: Fix syscall tracing powerpc/pseries: Fix build break due to pnv_npu2_init() powerpc/4xx/ocm: Fix fix for phys_addr_t printf warnings powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group() powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool. powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group() powerpc/perf: Update perf_regs structure to include MMCRA commit e6ec2fda2d464938989ecd770be92e492ace3ae1 Merge: dc6fef2cc5797 867cefb4cb101 Author: Linus Torvalds Date: Sat Jan 19 05:53:41 2019 +1200 Merge tag 'for-linus-5.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - Several fixes for the Xen pvcalls drivers (1 fix for the backend and 8 for the frontend). - A fix for a rather longstanding bug in the Xen sched_clock() interface which led to weird time jumps when migrating the system. - A fix for avoiding accesses to x2apic MSRs in Xen PV guests. * tag 'for-linus-5.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Fix x86 sched_clock() interface for xen pvcalls-front: fix potential null dereference always clear the X2APIC_ENABLE bit for PV guest pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock xen/pvcalls: remove set but not used variable 'intf' pvcalls-back: set -ENOTCONN in pvcalls_conn_back_read pvcalls-front: don't return error when the ring is full pvcalls-front: properly allocate sk pvcalls-front: don't try to free unallocated rings pvcalls-front: read all data before closing the connection commit dc6fef2cc57972d4d64d9cd6d26b81060e1db0e6 Merge: 6e434bf2e36b8 d45a90cb5d061 Author: Linus Torvalds Date: Sat Jan 19 05:48:43 2019 +1200 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: - Zero-length DMA mapping in caam - Invalidly mapping stack memory for DMA in talitos - Use after free in cavium/nitrox - Key parsing in authenc - Undefined shift in sm3 - Bogus completion call in authencesn - SHA support detection in caam" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: sm3 - fix undefined shift by >= width of value crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK crypto: talitos - reorder code in talitos_edesc_alloc() crypto: adiantum - initialize crypto_spawn::inst crypto: cavium/nitrox - Use after free in process_response_list() crypto: authencesn - Avoid twice completion call in decrypt path crypto: caam - fix SHA support detection crypto: caam - fix zero-length buffer DMA mapping crypto: ccree - convert to use crypto_authenc_extractkeys() crypto: bcm - convert to use crypto_authenc_extractkeys() crypto: authenc - fix parsing key with misaligned rta_len commit 6e434bf2e36b8a111c4dea6c1d1e355ad39ec01b Merge: 2a8cbf2a02784 11ee2a3808aeb Author: Linus Torvalds Date: Sat Jan 19 05:46:00 2019 +1200 Merge tag 'acpi-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix an ACPI initialization ordering issue introduced in the 4.17 time frame and causing functional problems to appear on multiple systems and fix some fallout of the recent change to enable building kernels with ACPI support and without PCI. Specifics: - Restore the ACPI initialization ordering changed implicitly by the module-level AML handling rework during the 4.17 development cycle that caused the EC address space handler based on information from ECDT to be set up before loading AML definition blocks, making it effectively not accessible by AML on some systems that don't work as expected any more (Rafael Wysocki). - Add direct dependencies on PCI to Kconfig in multiple places for code that depends on both ACPI and PCI, but the PCI dependency was implicitly satisfied by the ACPI dependency before, to prevent invalid configurations from being created, for example by randconfig (Sinan Kaya)" * tag 'acpi-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: EC: Look for ECDT EC after calling acpi_load_tables() drivers: thermal: int340x_thermal: Make PCI dependency explicit x86/intel/lpss: Make PCI dependency explicit platform/x86: apple-gmux: Make PCI dependency explicit platform/x86: intel_pmc: Make PCI dependency explicit platform/x86: intel_ips: make PCI dependency explicit vga-switcheroo: make PCI dependency explicit ata: pata_acpi: Make PCI dependency explicit ACPI / LPSS: Make PCI dependency explicit commit 2a8cbf2a02784efc02f7093000010e20c4ebc9ea Merge: c3653ebdf8931 890d14d2d4b57 Author: Linus Torvalds Date: Sat Jan 19 05:43:05 2019 +1200 Merge tag 'fbdev-v5.0-rc3' of git://github.com/bzolnier/linux Pull fbdev fixes from Bartlomiej Zolnierkiewicz: - fix stack memory leak in omap2fb driver (Vlad Tsyrklevich) - fix OF node name handling v4.20 regression in offb driver (Rob Herring) - convert CONFIG_FB_LOGO_CENTER config option added in v5.0-rc1 into a kernel parameter (Peter Rosin) * tag 'fbdev-v5.0-rc3' of git://github.com/bzolnier/linux: fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option fbdev: offb: Fix OF node name handling omap2fb: Fix stack memory disclosure commit c3653ebdf89315a3a683f03b8b181942e452d603 Merge: d7393226d15ad 9420151d88ca3 Author: Linus Torvalds Date: Sat Jan 19 05:41:38 2019 +1200 Merge tag 'drm-fixes-2019-01-18-1' of git://anongit.freedesktop.org/drm/drm Pull drm update from Dave Airlie: "Add nouveau TU102 (RTX 2080 Ti) support" * tag 'drm-fixes-2019-01-18-1' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/core: recognise TU102 commit fd340d0f68cc87badfc9efcb226f23a5428826a0 Author: Josef Bacik Date: Fri Jan 11 10:21:02 2019 -0500 btrfs: wakeup cleaner thread when adding delayed iput The cleaner thread usually takes care of delayed iputs, with the exception of the btrfs_end_transaction_throttle path. Delaying iputs means we are potentially delaying the eviction of an inode and it's respective space. The cleaner thread only gets woken up every 30 seconds, or when we require space. If there are a lot of inodes that need to be deleted we could induce a serious amount of latency while we wait for these inodes to be evicted. So instead wakeup the cleaner if it's not already awake to process any new delayed iputs we add to the list. If we suddenly need space we will less likely be backed up behind a bunch of inodes that are waiting to be deleted, and we could possibly free space before we need to get into the flushing logic which will save us some latency. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 3ec9a4c81c8cc2a8d9673588dd84d9cc7c31019b Author: Josef Bacik Date: Fri Jan 11 10:21:01 2019 -0500 btrfs: run delayed iputs before committing Delayed iputs means we can have final iputs of deleted inodes in the queue, which could potentially generate a lot of pinned space that could be free'd. So before we decide to commit the transaction for ENOPSC reasons, run the delayed iputs so that any potential space is free'd up. If there is and we freed enough we can then commit the transaction and potentially be able to make our reservation. Reviewed-by: Omar Sandoval Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 74d5d229b1bf60f93bff244b2dfc0eb21ec32a07 Author: Josef Bacik Date: Wed Nov 21 14:05:45 2018 -0500 btrfs: wait on ordered extents on abort cleanup If we flip read-only before we initiate writeback on all dirty pages for ordered extents we've created then we'll have ordered extents left over on umount, which results in all sorts of bad things happening. Fix this by making sure we wait on ordered extents if we have to do the aborted transaction cleanup stuff. generic/475 can produce this warning: [ 8531.177332] WARNING: CPU: 2 PID: 11997 at fs/btrfs/disk-io.c:3856 btrfs_free_fs_root+0x95/0xa0 [btrfs] [ 8531.183282] CPU: 2 PID: 11997 Comm: umount Tainted: G W 5.0.0-rc1-default+ #394 [ 8531.185164] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),BIOS rel-1.11.2-0-gf9626cc-prebuilt.qemu-project.org 04/01/2014 [ 8531.187851] RIP: 0010:btrfs_free_fs_root+0x95/0xa0 [btrfs] [ 8531.193082] RSP: 0018:ffffb1ab86163d98 EFLAGS: 00010286 [ 8531.194198] RAX: ffff9f3449494d18 RBX: ffff9f34a2695000 RCX:0000000000000000 [ 8531.195629] RDX: 0000000000000002 RSI: 0000000000000001 RDI:0000000000000000 [ 8531.197315] RBP: ffff9f344e930000 R08: 0000000000000001 R09:0000000000000000 [ 8531.199095] R10: 0000000000000000 R11: ffff9f34494d4ff8 R12:ffffb1ab86163dc0 [ 8531.200870] R13: ffff9f344e9300b0 R14: ffffb1ab86163db8 R15:0000000000000000 [ 8531.202707] FS: 00007fc68e949fc0(0000) GS:ffff9f34bd800000(0000)knlGS:0000000000000000 [ 8531.204851] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8531.205942] CR2: 00007ffde8114dd8 CR3: 000000002dfbd000 CR4:00000000000006e0 [ 8531.207516] Call Trace: [ 8531.208175] btrfs_free_fs_roots+0xdb/0x170 [btrfs] [ 8531.210209] ? wait_for_completion+0x5b/0x190 [ 8531.211303] close_ctree+0x157/0x350 [btrfs] [ 8531.212412] generic_shutdown_super+0x64/0x100 [ 8531.213485] kill_anon_super+0x14/0x30 [ 8531.214430] btrfs_kill_super+0x12/0xa0 [btrfs] [ 8531.215539] deactivate_locked_super+0x29/0x60 [ 8531.216633] cleanup_mnt+0x3b/0x70 [ 8531.217497] task_work_run+0x98/0xc0 [ 8531.218397] exit_to_usermode_loop+0x83/0x90 [ 8531.219324] do_syscall_64+0x15b/0x180 [ 8531.220192] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 8531.221286] RIP: 0033:0x7fc68e5e4d07 [ 8531.225621] RSP: 002b:00007ffde8116608 EFLAGS: 00000246 ORIG_RAX:00000000000000a6 [ 8531.227512] RAX: 0000000000000000 RBX: 00005580c2175970 RCX:00007fc68e5e4d07 [ 8531.229098] RDX: 0000000000000001 RSI: 0000000000000000 RDI:00005580c2175b80 [ 8531.230730] RBP: 0000000000000000 R08: 00005580c2175ba0 R09:00007ffde8114e80 [ 8531.232269] R10: 0000000000000000 R11: 0000000000000246 R12:00005580c2175b80 [ 8531.233839] R13: 00007fc68eac61c4 R14: 00005580c2175a68 R15:0000000000000000 Leaving a tree in the rb-tree: 3853 void btrfs_free_fs_root(struct btrfs_root *root) 3854 { 3855 iput(root->ino_cache_inode); 3856 WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree)); CC: stable@vger.kernel.org Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik [ add stacktrace ] Signed-off-by: David Sterba commit 31890da0bfdd24b135a258404b93c58a65510c7a Author: Josef Bacik Date: Wed Nov 21 14:05:41 2018 -0500 btrfs: handle delayed ref head accounting cleanup in abort We weren't doing any of the accounting cleanup when we aborted transactions. Fix this by making cleanup_ref_head_accounting global and calling it from the abort code, this fixes the issue where our accounting was all wrong after the fs aborts. The test generic/475 on a 2G VM can trigger the problems eg.: [ 8502.136957] WARNING: CPU: 0 PID: 11064 at fs/btrfs/extent-tree.c:5986 btrfs_free_block_grou +ps+0x3dc/0x410 [btrfs] [ 8502.148372] CPU: 0 PID: 11064 Comm: umount Not tainted 5.0.0-rc1-default+ #394 [ 8502.150807] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626 +cc-prebuilt.qemu-project.org 04/01/2014 [ 8502.154317] RIP: 0010:btrfs_free_block_groups+0x3dc/0x410 [btrfs] [ 8502.160623] RSP: 0018:ffffb1ab84b93de8 EFLAGS: 00010206 [ 8502.161906] RAX: 0000000001000000 RBX: ffff9f34b1756400 RCX: 0000000000000000 [ 8502.163448] RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff9f34b1755400 [ 8502.164906] RBP: ffff9f34b7e8c000 R08: 0000000000000001 R09: 0000000000000000 [ 8502.166716] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9f34b7e8c108 [ 8502.168498] R13: ffff9f34b7e8c158 R14: 0000000000000000 R15: dead000000000100 [ 8502.170296] FS: 00007fb1cf15ffc0(0000) GS:ffff9f34bd400000(0000) knlGS:0000000000000000 [ 8502.172439] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8502.173669] CR2: 00007fb1ced507b0 CR3: 000000002f7a6000 CR4: 00000000000006f0 [ 8502.175094] Call Trace: [ 8502.175759] close_ctree+0x17f/0x350 [btrfs] [ 8502.176721] generic_shutdown_super+0x64/0x100 [ 8502.177702] kill_anon_super+0x14/0x30 [ 8502.178607] btrfs_kill_super+0x12/0xa0 [btrfs] [ 8502.179602] deactivate_locked_super+0x29/0x60 [ 8502.180595] cleanup_mnt+0x3b/0x70 [ 8502.181406] task_work_run+0x98/0xc0 [ 8502.182255] exit_to_usermode_loop+0x83/0x90 [ 8502.183113] do_syscall_64+0x15b/0x180 [ 8502.183919] entry_SYSCALL_64_after_hwframe+0x49/0xbe Corresponding to release_global_block_rsv() { ... WARN_ON(fs_info->delayed_refs_rsv.reserved > 0); CC: stable@vger.kernel.org Signed-off-by: Josef Bacik [ add log dump ] Signed-off-by: David Sterba commit 77b7aad195099e7c6da11e94b7fa6ef5e6fb0025 Author: David Sterba Date: Wed Jan 9 15:02:23 2019 +0100 Revert "btrfs: balance dirty metadata pages in btrfs_finish_ordered_io" This reverts commit e73e81b6d0114d4a303205a952ab2e87c44bd279. This patch causes a few problems: - adds latency to btrfs_finish_ordered_io - as btrfs_finish_ordered_io is used for free space cache, generating more work from btrfs_btree_balance_dirty_nodelay could end up in the same workque, effectively deadlocking 12260 kworker/u96:16+btrfs-freespace-write D [<0>] balance_dirty_pages+0x6e6/0x7ad [<0>] balance_dirty_pages_ratelimited+0x6bb/0xa90 [<0>] btrfs_finish_ordered_io+0x3da/0x770 [<0>] normal_work_helper+0x1c5/0x5a0 [<0>] process_one_work+0x1ee/0x5a0 [<0>] worker_thread+0x46/0x3d0 [<0>] kthread+0xf5/0x130 [<0>] ret_from_fork+0x24/0x30 [<0>] 0xffffffffffffffff Transaction commit will wait on the freespace cache: 838 btrfs-transacti D [<0>] btrfs_start_ordered_extent+0x154/0x1e0 [<0>] btrfs_wait_ordered_range+0xbd/0x110 [<0>] __btrfs_wait_cache_io+0x49/0x1a0 [<0>] btrfs_write_dirty_block_groups+0x10b/0x3b0 [<0>] commit_cowonly_roots+0x215/0x2b0 [<0>] btrfs_commit_transaction+0x37e/0x910 [<0>] transaction_kthread+0x14d/0x180 [<0>] kthread+0xf5/0x130 [<0>] ret_from_fork+0x24/0x30 [<0>] 0xffffffffffffffff And then writepages ends up waiting on transaction commit: 9520 kworker/u96:13+flush-btrfs-1 D [<0>] wait_current_trans+0xac/0xe0 [<0>] start_transaction+0x21b/0x4b0 [<0>] cow_file_range_inline+0x10b/0x6b0 [<0>] cow_file_range.isra.69+0x329/0x4a0 [<0>] run_delalloc_range+0x105/0x3c0 [<0>] writepage_delalloc+0x119/0x180 [<0>] __extent_writepage+0x10c/0x390 [<0>] extent_write_cache_pages+0x26f/0x3d0 [<0>] extent_writepages+0x4f/0x80 [<0>] do_writepages+0x17/0x60 [<0>] __writeback_single_inode+0x59/0x690 [<0>] writeback_sb_inodes+0x291/0x4e0 [<0>] __writeback_inodes_wb+0x87/0xb0 [<0>] wb_writeback+0x3bb/0x500 [<0>] wb_workfn+0x40d/0x610 [<0>] process_one_work+0x1ee/0x5a0 [<0>] worker_thread+0x1e0/0x3d0 [<0>] kthread+0xf5/0x130 [<0>] ret_from_fork+0x24/0x30 [<0>] 0xffffffffffffffff Eventually, we have every process in the system waiting on balance_dirty_pages(), and nobody is able to make progress on page writeback. The original patch tried to fix an OOM condition, that happened on 4.4 but no success reproducing that on later kernels (4.19 and 4.20). This is more likely a problem in OOM itself. Link: https://lore.kernel.org/linux-btrfs/20180528054821.9092-1-ethanlien@synology.com/ Reported-by: Chris Mason CC: stable@vger.kernel.org # 4.18+ CC: ethanlien Signed-off-by: David Sterba commit 11ee2a3808aebbec73096551a716dea03d417fcb Merge: b1c0330823fe8 6f9b5e70dfcde Author: Rafael J. Wysocki Date: Fri Jan 18 11:17:16 2019 +0100 Merge branch 'acpi-pci' * acpi-pci: drivers: thermal: int340x_thermal: Make PCI dependency explicit x86/intel/lpss: Make PCI dependency explicit platform/x86: apple-gmux: Make PCI dependency explicit platform/x86: intel_pmc: Make PCI dependency explicit platform/x86: intel_ips: make PCI dependency explicit vga-switcheroo: make PCI dependency explicit ata: pata_acpi: Make PCI dependency explicit ACPI / LPSS: Make PCI dependency explicit commit d311e0c27b8fcc27f707f8cac48cd8bdc4155224 Author: Masahiro Yamada Date: Fri Jan 18 14:30:38 2019 +0900 mtd: rawnand: denali: get ->setup_data_interface() working again Commit 7a08dbaedd36 ("mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops") missed to invert the if-conditonal for denali. Since then, the Denali NAND driver cannnot invoke setup_data_interface. Fixes: 7a08dbaedd36 ("mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops") Signed-off-by: Masahiro Yamada Acked-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 01eeb927bbcc1952114b0aec1447699c4747c337 Author: Luc Van Oostenryck Date: Thu Jan 17 18:39:07 2019 +0100 mtd: nand: jz4740: fix '__iomem *' vs. '* __iomem' The function jz_nand_ioremap_resource() needs a pointer to an __iomem pointer as its last argument but this argument is declared as: void * __iomem *base Fix this by using the correct declaration: void __iomem **base which then also removes the following Sparse's warnings: 282:15: warning: incorrect type in assignment (different address spaces) 282:15: expected void *[noderef] 282:15: got void [noderef] * 322:57: warning: incorrect type in argument 4 (different address spaces) 322:57: expected void *[noderef] *base 322:57: got void [noderef] ** 402:67: warning: incorrect type in argument 4 (different address spaces) 402:67: expected void *[noderef] *base 402:67: got void [noderef] ** Signed-off-by: Luc Van Oostenryck Acked-by: Miquel Raynal Signed-off-by: Boris Brezillon commit bf97403ac4bfbc9f9f92f47e737aee983d9191f5 Author: Yang Wei Date: Thu Jan 17 23:30:03 2019 +0800 macvlan: replace kfree_skb by consume_skb for drop profiles Replace the kfree_skb() by consume_skb() to be drop monitor(dropwatch, perf) friendly. Signed-off-by: Yang Wei Signed-off-by: David S. Miller commit 87fff3cacd0112bcaf42f932c1e44ae32b42f1fb Author: Yang Wei Date: Thu Jan 17 23:11:30 2019 +0800 neighbour: Do not perturb drop profiles when neigh_probe Replace the kfree_skb() by consume_skb() to be drop monitor(dropwatch, perf) friendly. Signed-off-by: Yang Wei Signed-off-by: David S. Miller commit 5ab3121beeb76aa6090195b67d237115860dd9ec Author: Lendacky, Thomas Date: Thu Jan 17 14:20:14 2019 +0000 amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs The XGBE hardware has support for performing MDIO operations using an MDIO command request. The driver mistakenly uses the mdio port address as the MDIO command request device address instead of the MDIO command request port address. Additionally, the driver does not properly check for and create a clause 45 MDIO command. Check the supplied MDIO register to determine if the request is a clause 45 operation (MII_ADDR_C45). For a clause 45 operation, extract the device address and register number from the supplied MDIO register and use them to set the MDIO command request device address and register number fields. For a clause 22 operation, the MDIO request device address is set to zero and the MDIO command request register number is set to the supplied MDIO register. In either case, the supplied MDIO port address is used as the MDIO command request port address. Fixes: 732f2ab7afb9 ("amd-xgbe: Add support for MDIO attached PHYs") Signed-off-by: Tom Lendacky Tested-by: Shyam Sundar S K Signed-off-by: David S. Miller commit 40f89ebfbd73fc9439ae8d4950f60226ad176690 Author: Camelia Groza Date: Thu Jan 17 14:33:33 2019 +0200 net: phy: add missing phy driver features The phy drivers for CS4340 and TN2020 are missing their features attributes. Add them. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Reported-by: Scott Wood Signed-off-by: Camelia Groza Signed-off-by: David S. Miller commit c6ddfb9a963f0cac0f7365acfc87f3f3b33a3b69 Author: Madalin Bucur Date: Thu Jan 17 11:42:27 2019 +0200 dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start As txq_trans_update() only updates trans_start when the lock is held, trans_start does not get updated if NETIF_F_LLTX is declared. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 28c1382fa28f2e2d9d0d6f25ae879b5af2ecbd03 Author: Yunjian Wang Date: Thu Jan 17 09:46:41 2019 +0800 net: bridge: Fix ethernet header pointer before check skb forwardable The skb header should be set to ethernet header before using is_skb_forwardable. Because the ethernet header length has been considered in is_skb_forwardable(including dev->hard_header_len length). To reproduce the issue: 1, add 2 ports on linux bridge br using following commands: $ brctl addbr br $ brctl addif br eth0 $ brctl addif br eth1 2, the MTU of eth0 and eth1 is 1500 3, send a packet(Data 1480, UDP 8, IP 20, Ethernet 14, VLAN 4) from eth0 to eth1 So the expect result is packet larger than 1500 cannot pass through eth0 and eth1. But currently, the packet passes through success, it means eth1's MTU limit doesn't take effect. Fixes: f6367b4660dd ("bridge: use is_skb_forwardable in forward path") Cc: bridge@lists.linux-foundation.org Cc: Nkolay Aleksandrov Cc: Roopa Prabhu Cc: Stephen Hemminger Signed-off-by: Yunjian Wang Signed-off-by: David S. Miller commit cc5e710759470bc7f3c61d11fd54586f15fdbdf4 Author: Jason Wang Date: Wed Jan 16 16:54:42 2019 +0800 vhost: log dirty page correctly Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve this issue, when logging with device IOTLB enabled, we will: 1) reuse the device IOTLB translation result of GIOVA->HVA mapping to get HVA, for writable descriptor, get HVA through iovec. For used ring update, translate its GIOVA to HVA 2) traverse the GPA->HVA mapping to get the possible GPA and log through GPA. Pay attention this reverse mapping is not guaranteed to be unique, so we should log each possible GPA in this case. This fix the failure of scp to guest during migration. In -next, we will probably support passing GIOVA->GPA instead of GIOVA->HVA. Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API") Reported-by: Jintack Lim Cc: Jintack Lim Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit f655f8b818684716b2ebe35760c9b96184587d56 Author: Jakub Kicinski Date: Sat Jan 12 12:51:05 2019 -0800 Documentation: timestamping: correct path to net_tstamp.h net_tstamp.h is an UAPI header, so it was moved under include/uapi. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9420151d88ca35cd7f857774d90bfdca505a2cc1 Merge: df0219b4f9576 7ebec5f43134b Author: Dave Airlie Date: Fri Jan 18 15:38:13 2019 +1000 Merge branch 'linux-4.21' of git://github.com/skeggsb/linux into drm-fixes nouveau support for TU102 (RTX 2080 Ti) Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA=mQsRr0BpRpv3n6UjthHush4u_kQR3oUGHkBtAHTmyCYw@mail.gmail.com commit d7393226d15add056285c8fc86723d54d7e0c77d Merge: 1092a94fcbcde d6f4a21f309df Author: Linus Torvalds Date: Fri Jan 18 17:17:20 2019 +1200 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes frfom Jason Gunthorpe: "Not much so far. We have the usual batch of bugs and two fixes to code merged this cycle: - Restore valgrind support for the ioctl verbs interface merged this window, and fix a missed error code on an error path from that conversion - A user reported crash on obsolete mthca hardware - pvrdma was using the wrong command opcode toward the hypervisor - NULL pointer crash regression when dumping rdma-cm over netlink - Be conservative about exposing the global rkey" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/uverbs: Mark ioctl responses with UVERBS_ATTR_F_VALID_OUTPUT RDMA/mthca: Clear QP objects during their allocation RDMA/vmw_pvrdma: Return the correct opcode when creating WR RDMA/cma: Add cm_id restrack resource based on kernel or user cm_id type RDMA/nldev: Don't expose unsafe global rkey to regular user RDMA/uverbs: Fix post send success return value in case of error commit 1092a94fcbcde03a8c2cc554f305af48c95d5d58 Merge: 2451f3717c538 df0219b4f9576 Author: Linus Torvalds Date: Fri Jan 18 17:14:02 2019 +1200 Merge tag 'drm-fixes-2019-01-18' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "The rc3 fixes are a bit scattered: - meson, sun4i and rockchip all had missing of_node_put. - qxl and virtio both were advertising dma-buf to userspace when they really shouldn't have. Otherwise: meson: - modesetting regression fix i915 GVT: - one cmd parser failure fix - region cleanup fix in vGPU destroy amdgpu: - KFD fixes for arm64 mixed APU/DGPU - vega12 powerplay fix - raven DC fixes - freesync fix" * tag 'drm-fixes-2019-01-18' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Detach backlight from stream drm/sun4i: backend: add missing of_node_puts Revert "drm/amdgpu: validate user pitch alignment" Revert "drm/amdgpu: validate user GEM object size" drm/meson: Fix atomic mode switching regression drm/i915/gvt: Fix mmap range check drm/i915/gvt: free VFIO region space in vgpu detach drm/amd/display: Fix disabled cursor on top screen edge drm/amd/display: fix warning on raven hotplug drm/amd/display: fix PME notification not working in RV desktop drm/amd/display: Only get the connector state for VRR when toggled drm/amd/display: Pack DMCU iRAM alignment drm/amd/powerplay: run acg btc for Vega12 drm/amdkfd: Don't assign dGPUs to APU topology devices drm/amdkfd: Allow building KFD on ARM64 (v2) drm/meson: add missing of_node_put drm/virtio: drop prime import/export callbacks drm/qxl: drop prime import/export callbacks drm/i915/gvt: Allow F_CMD_ACCESS on mmio 0x21f0 drm/rockchip: add missing of_node_put commit 2451f3717c538795fc9fade46916683ebf7ea959 Merge: 0a2fbed84a962 248b57015f35c Author: Linus Torvalds Date: Fri Jan 18 16:58:07 2019 +1200 Merge tag 'led-fix-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fix from Jacek Anaszewski. * tag 'led-fix-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: lp5523: fix a missing check of return value of lp55xx_read commit 0a2fbed84a962c486a71d2c91c86a31332dcbf02 Merge: a3a80255d58d0 f422449b58548 Author: Linus Torvalds Date: Fri Jan 18 16:55:49 2019 +1200 Merge tag 'hwmon-for-v5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Minor fixes/regressions" * tag 'hwmon-for-v5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (tmp421) Correct the misspelling of the tmp442 compatible attribute in OF device ID table hwmon: (occ) Fix potential integer overflow hwmon: (lm80) Fix missing unlock on error in set_fan_div() hwmon: (nct6775) Enable IO mapping for NCT6797D and NCT6798D hwmon: (nct6775) Fix chip ID for NCT6798D commit 38197ca176fc259fa4c871d07bcf8389d044a895 Author: Thomas Gleixner Date: Fri Jan 18 00:14:17 2019 +0100 block: Cleanup license notice Remove the imprecise and sloppy: "This files is licensed under the GPL." license notice in the top level comment. 1) The file already contains a SPDX license identifier which clearly states that the license of the file is GPL V2 only 2) The notice resolves to GPL v1 or later for scanners which is just contrary to the intent of SPDX identifiers to provide clear and non ambiguous license information. Aside of that the value add of this notice is below zero, Cc: Damien Le Moal Cc: Matias Bjorling Cc: Christoph Hellwig Cc: Jens Axboe Cc: linux-block@vger.kernel.org Fixes: 6a5ac9846508 ("block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n") Reviewed-by: Bart Van Assche Signed-off-by: Thomas Gleixner Signed-off-by: Jens Axboe commit 7ebec5f43134bbf3dd5f20228ac4c1b55ee73284 Author: Ben Skeggs Date: Thu Jan 17 11:39:55 2019 +1000 drm/nouveau/core: recognise TU102 Would usually do this split-out, verifying each component indivitually, but this has been squashed together to be more palatable for merging in 5.0-rc. Signed-off-by: Ben Skeggs commit 88a8121dc1d3d0dbddd411b79ed236b6b6ea415c Author: Nicolas Dichtel Date: Thu Jan 17 11:27:22 2019 +0100 af_packet: fix raw sockets over 6in4 tunnel Since commit cb9f1b783850, scapy (which uses an AF_PACKET socket in SOCK_RAW mode) is unable to send a basic icmp packet over a sit tunnel: Here is a example of the setup: $ ip link set ntfp2 up $ ip addr add 10.125.0.1/24 dev ntfp2 $ ip tunnel add tun1 mode sit ttl 64 local 10.125.0.1 remote 10.125.0.2 dev ntfp2 $ ip addr add fd00:cafe:cafe::1/128 dev tun1 $ ip link set dev tun1 up $ ip route add fd00:200::/64 dev tun1 $ scapy >>> p = [] >>> p += IPv6(src='fd00:100::1', dst='fd00:200::1')/ICMPv6EchoRequest() >>> send(p, count=1, inter=0.1) >>> quit() $ ip -s link ls dev tun1 | grep -A1 "TX.*errors" TX: bytes packets errors dropped carrier collsns 0 0 1 0 0 0 The problem is that the network offset is set to the hard_header_len of the output device (tun1, ie 14 + 20) and in our case, because the packet is small (48 bytes) the pskb_inet_may_pull() fails (it tries to pull 40 bytes (ipv6 header) starting from the network offset). This problem is more generally related to device with variable hard header length. To avoid a too intrusive patch in the current release, a (ugly) workaround is proposed in this patch. It has to be cleaned up in net-next. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=993675a3100b1 Link: http://patchwork.ozlabs.org/patch/1024489/ Fixes: cb9f1b783850 ("ip: validate header length on virtual device xmit") CC: Willem de Bruijn CC: Maxim Mikityanskiy Signed-off-by: Nicolas Dichtel Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit e224c390a6259c529f7b2a6bd215a087b3344f5c Author: Yuchung Cheng Date: Thu Jan 17 08:51:01 2019 -0800 bpf: fix SO_MAX_PACING_RATE to support TCP internal pacing If sch_fq packet scheduler is not used, TCP can fallback to internal pacing, but this requires sk_pacing_status to be properly set. Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper function to bpf") Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Cc: Lawrence Brakmo Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit f4924f24da8c7ef64195096817f3cde324091d97 Author: Peter Oskolkov Date: Wed Jan 16 08:47:54 2019 -0800 bpf: bpf_setsockopt: reset sock dst on SO_MARK changes In sock_setsockopt() (net/core/sock.h), when SO_MARK option is used to change sk_mark, sk_dst_reset(sk) is called. The same should be done in bpf_setsockopt(). Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper function to bpf") Reported-by: Maciej Żenczykowski Signed-off-by: Peter Oskolkov Acked-by: Martin KaFai Lau Reviewed-by: Maciej Żenczykowski Signed-off-by: Daniel Borkmann commit df0219b4f9576c72b618db5edf7bb75c14829dbd Merge: 4ac4cb70d15a9 4bb0e6d725821 Author: Dave Airlie Date: Fri Jan 18 09:14:34 2019 +1000 Merge tag 'drm-misc-fixes-2019-01-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.0-rc3: - Add missing calls to of_node_put to sun4i, meson, and rockchip. - Drop unimplemented prime callbacks in virtio and qxl, so support for prime is not advertised on those drivers. - Fix mode switching regression in meson. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/9af07312-f435-2fda-65a2-9fe92cdf5da4@linux.intel.com commit 4ac4cb70d15a94a2b11a0cebeee90806013f3bd0 Merge: 586cdb0db70ba 15c05196ff84a Author: Dave Airlie Date: Fri Jan 18 09:12:39 2019 +1000 Merge tag 'drm-intel-fixes-2019-01-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915/gvt fixes for v5.0-rc3 "This contains one cmd parser failure fix to allow cmd access for one register, and fix region cleanup properly in vGPU destroy, and another fix for critical mmap size check mistake." Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87ef9bfusc.fsf@intel.com commit 586cdb0db70ba54482d8b217839d8fa4377ea077 Merge: 1c7fc5cbc3398 35dad45d5cad3 Author: Dave Airlie Date: Fri Jan 18 09:10:09 2019 +1000 Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 5.0: - Fix KFD on ARM64 - Fix KFD topology with mixed APU and dGPU systems - Powerplay fix for vega12 - DC Raven fixes - Freesync fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190116224524.3314-1-alexander.deucher@amd.com commit f7c46156f4a9d6ba5c6bcc5c48945e87b0f08c65 Author: Alexey Kodanev Date: Wed Jan 16 19:17:45 2019 +0300 udp6: add missing rehash callback to udplite After commit 23b0269e58ae ("net: udp6: prefer listeners bound to an address"), UDP-Lite only works when specifying a local address for the sockets. This is related to the problem addressed in the commit 719f835853a9 ("udp: add rehash on connect()"). Moreover, __udp6_lib_lookup() now looks for a socket immediately in the secondary hash table. And this issue was found with LTP/network tests as well. Fixes: 23b0269e58ae ("net: udp6: prefer listeners bound to an address") Signed-off-by: Alexey Kodanev Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 8f6b5392856a4b74224e257f3e0874a163b04603 Author: Alexey Kodanev Date: Wed Jan 16 19:17:44 2019 +0300 udp: add missing rehash callback to udplite After commit 4cdeeee9252a ("net: udp: prefer listeners bound to an address"), UDP-Lite only works when specifying a local address for the sockets. This is related to the problem addressed in the commit 719f835853a9 ("udp: add rehash on connect()"). Moreover, __udp4_lib_lookup() now looks for a socket immediately in the secondary hash table. The issue was found with LTP/network tests (UDP-Lite test-cases). Fixes: 4cdeeee9252a ("net: udp: prefer listeners bound to an address") Signed-off-by: Alexey Kodanev Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 2cddd20147826aef283115abb00012d4dafe3cdb Author: Ivan Vecera Date: Wed Jan 16 16:53:52 2019 +0100 net/sched: cls_flower: allocate mask dynamically in fl_change() Recent changes (especially 05cd271fd61a ("cls_flower: Support multiple masks per priority")) in the fl_flow_mask structure grow it and its current size e.g. on x86_64 with defconfig is 760 bytes and more than 1024 bytes with some debug options enabled. Prior the mentioned commit its size was 176 bytes (using defconfig on x86_64). With regard to this fact it's reasonable to allocate this structure dynamically in fl_change() to reduce its stack size. v2: - use kzalloc() instead of kcalloc() Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority") Cc: Jiri Pirko Cc: Paul Blakey Acked-by: Jiri Pirko Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller commit 3f1bb6abdf19cfa89860b3bc9e7f31b44b6a0ba1 Author: Johan Hovold Date: Wed Jan 16 11:27:08 2019 +0100 net: dsa: realtek-smi: fix OF child-node lookup Use the new of_get_compatible_child() helper to look up child nodes to avoid ever matching non-child nodes elsewhere in the tree. Also fix up the related struct device_node leaks. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Cc: stable # 4.19: 36156f9241cb0 Cc: Linus Walleij Signed-off-by: Johan Hovold Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 248b57015f35c94d4eae2fdd8c6febf5cd703900 Author: Kangjie Lu Date: Tue Dec 25 22:18:23 2018 -0600 leds: lp5523: fix a missing check of return value of lp55xx_read When lp55xx_read() fails, "status" is an uninitialized variable and thus may contain random value; using it leads to undefined behaviors. The fix inserts a check for the return value of lp55xx_read: if it fails, returns with its error code. Signed-off-by: Kangjie Lu Signed-off-by: Jacek Anaszewski commit f422449b58548a41e98fc97b259a283718e527db Author: Cheng-Min Ao Date: Mon Jan 7 14:29:32 2019 +0800 hwmon: (tmp421) Correct the misspelling of the tmp442 compatible attribute in OF device ID table Correct a typo in OF device ID table The last one should be 'ti,tmp442' Signed-off-by: Cheng-Min Ao Signed-off-by: Yu-Hsiang Chen Signed-off-by: Guenter Roeck commit cb12d72b27a6f41325ae23a11033cf5fedfa1b97 Author: Colin Ian King Date: Tue Jan 15 18:03:38 2019 +0000 atm: he: fix sign-extension overflow on large shift Shifting the 1 by exp by an int can lead to sign-extension overlow when exp is 31 since 1 is an signed int and sign-extending this result to an unsigned long long will set the upper 32 bits. Fix this by shifting an unsigned long. Detected by cppcheck: (warning) Shifting signed 32-bit value by 31 bits is undefined behaviour Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit a3a80255d58d0f0d304ba877ae0313a264973a70 Merge: 6d060fa39035d 34fa47612bfe5 Author: Linus Torvalds Date: Fri Jan 18 06:27:24 2019 +1200 Merge tag 'afs-fixes-20190117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Here's a set of fixes for AFS: - Use struct_size() for kzalloc() size calculation. - When calling YFS.CreateFile rather than AFS.CreateFile, it is possible to create a file with a file lock already held. The default value indicating no lock required is actually -1, not 0. - Fix an oops in inode/vnode validation if the target inode doesn't have a server interest assigned (ie. a server that will notify us of changes by third parties). - Fix refcounting of keys in file locking. - Fix a race in refcounting asynchronous operations in the event of an error during request transmission. The provision of a dedicated function to get an extra ref on a call is split into a separate commit" * tag 'afs-fixes-20190117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix race in async call refcounting afs: Provide a function to get a ref on a call afs: Fix key refcounting in file locking code afs: Don't set vnode->cb_s_break in afs_validate() afs: Set correct lock type for the yfs CreateFile afs: Use struct_size() in kzalloc() commit 6d060fa39035d5ff6bb3e720a8119aeb50453e3b Merge: e4484a495586d 227a76b647188 Author: Linus Torvalds Date: Fri Jan 18 06:22:08 2019 +1200 Merge branch 'stable/for-linus-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb fix from Konrad Rzeszutek Wilk: "A tiny fix for v5.0-rc2: This fixes an issue with GPU cards not working anymore with the DMA mapping work Christopher did - as the SWIOTLB is initialized first and then free'd (as IOMMU is available) but we forgot to clear our start and end entries which are used and BOOM" * 'stable/for-linus-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit commit e4484a495586dddf989380f89a7c16d43db6790b Merge: d471c4dfa19f4 e00d888048149 Author: Linus Torvalds Date: Fri Jan 18 06:20:09 2019 +1200 Merge tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - clean generated files in scripts/kconfig/ by 'make mrproper' - fix conflict between dead code elimination and ftrace for GCC <= 4.7 - fix external module build with CONFIG_STACKPROTECTOR - remove unused code * tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: mark prepare0 as PHONY to fix external module build openrisc: remove unneeded code in arch/openrisc/Makefile nds32: remove unneeded code in arch/nds32/Makefile ia64: remove redundant 'export AWK' kbuild: remove unused archmrproper kbuild: remove unused baseprereq kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7 kconfig: clean generated *conf-cfg files commit d471c4dfa19f4d6de063256370a5be411a1f3149 Merge: 7fbfee7c80ded 3705add0b783e Author: Linus Torvalds Date: Fri Jan 18 06:15:28 2019 +1200 Merge tag 'devicetree-fixes-for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: - Remove now unused struct device_node.type pointer - Fix meson-axg reset header SPDX tag - Add missing of_node_put in of_graph_get_remote_port_parent - Fix several binding doc file references and typos * tag 'devicetree-fixes-for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: reset: meson-axg: fix SPDX license id dt-bindings: soc: qcom: Fix trivial language typos doc: gpio-mvebu: fix broken reference to cp110-system-controller0.txt file OF: properties: add missing of_node_put doc: bindings: fix bad reference to ARM CPU bindings dt-bindings: marvell,mmp2: fix typos in bindings doc of: Remove struct device_node.type pointer commit 6a4c9ab13feeacd3072175d7d1f1fcfabbb9fc90 Author: Sai Prakash Ranjan Date: Thu Jan 17 09:09:29 2019 -0800 pstore/ram: Fix console ramoops to show the previous boot logs commit b05c950698fe ("pstore/ram: Simplify ramoops_get_next_prz() arguments") changed update assignment in getting next persistent ram zone by adding a check for record type. But the check always returns true since the record type is assigned 0. And this breaks console ramoops by showing current console log instead of previous log on warm reset and hard reset (actually hard reset should not be showing any logs). Fix this by having persistent ram zone type check instead of record type check. Tested this on SDM845 MTP and dragonboard 410c. Reproducing this issue is simple as below: 1. Trigger hard reset and mount pstore. Will see console-ramoops record in the mounted location which is the current log. 2. Trigger warm reset and mount pstore. Will see the current console-ramoops record instead of previous record. Fixes: b05c950698fe ("pstore/ram: Simplify ramoops_get_next_prz() arguments") Signed-off-by: Sai Prakash Ranjan Acked-by: Joel Fernandes (Google) [kees: dropped local variable usage] Signed-off-by: Kees Cook commit c61c27687a5abce11431e6de1adb6e36099b9859 Author: Mathieu Malaterre Date: Wed Jan 16 20:35:41 2019 +0100 bpf: Correctly annotate implicit fall through in bpf_base_func_proto There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warnings (W=1). To preserve as much of the existing comment only change a ‘:’ into a ‘,’. This is enough change, to match the regular expression expected by GCC. This commit removes the following warning: net/core/filter.c:5310:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre Signed-off-by: Daniel Borkmann commit c8dc79806e7f6cb6b0952aae1ce626c39905ad7e Author: Mathieu Malaterre Date: Wed Jan 16 20:35:29 2019 +0100 bpf: Annotate implicit fall through in cgroup_dev_func_proto There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warnings (W=1). This commit removes the following warning: kernel/bpf/cgroup.c:719:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre Signed-off-by: Daniel Borkmann commit 583c53185399cea5c51195064564d1c9ddc70cf3 Author: Mathieu Malaterre Date: Wed Jan 16 20:29:40 2019 +0100 bpf: Make function btf_name_offset_valid static Initially in commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") the function 'btf_name_offset_valid' was introduced as static function it was later on changed to a non-static one, and then finally in commit 23127b33ec80 ("bpf: Create a new btf_name_by_offset() for non type name use case") the function prototype was removed. Revert back to original implementation and make the function static. Remove warning triggered with W=1: kernel/bpf/btf.c:470:6: warning: no previous prototype for 'btf_name_offset_valid' [-Wmissing-prototypes] Fixes: 23127b33ec80 ("bpf: Create a new btf_name_by_offset() for non type name use case") Signed-off-by: Mathieu Malaterre Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit f67ad87ab3120e82845521b18a2b99273a340308 Author: Stanislav Fomichev Date: Wed Jan 16 14:03:17 2019 -0800 selftests/bpf: retry tests that expect build-id While running test_progs in a loop I found out that I'm sometimes hitting "Didn't find expected build ID from the map" error. Looking at stack_map_get_build_id_offset() it seems that it is racy (by design) and can sometimes return BPF_STACK_BUILD_ID_IP (i.e. can't trylock current->mm->mmap_sem). Let's retry this test a single time. Fixes: 13790d1cc72c ("bpf: add selftest for stackmap with build_id in NMI context") Acked-by: Song Liu Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 4af396ae4836c4ecab61e975b8e61270c551894d Author: Stanislav Fomichev Date: Wed Jan 16 14:03:16 2019 -0800 bpf: zero out build_id for BPF_STACK_BUILD_ID_IP When returning BPF_STACK_BUILD_ID_IP from stack_map_get_build_id_offset, make sure that build_id field is empty. Since we are using percpu free list, there is a possibility that we might reuse some previous bpf_stack_build_id with non-zero build_id. Fixes: 615755a77b24 ("bpf: extend stackmap to save binary_build_id+offset instead of address") Acked-by: Song Liu Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 0b698005a9d11c0e91141ec11a2c4918a129f703 Author: Stanislav Fomichev Date: Wed Jan 16 14:03:15 2019 -0800 bpf: don't assume build-id length is always 20 bytes Build-id length is not fixed to 20, it can be (`man ld` /--build-id): * 128-bit (uuid) * 160-bit (sha1) * any length specified in ld --build-id=0xhexstring To fix the issue of missing BPF_STACK_BUILD_ID_VALID for shorter build-ids, assume that build-id is somewhere in the range of 1 .. 20. Set the remaining bytes to zero. v2: * don't introduce new "len = min(BPF_BUILD_ID_SIZE, nhdr->n_descsz)", we already know that nhdr->n_descsz <= BPF_BUILD_ID_SIZE if we enter this 'if' condition Fixes: 615755a77b24 ("bpf: extend stackmap to save binary_build_id+offset instead of address") Acked-by: Song Liu Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 34fa47612bfe5d7de7fcaf658a6952b6aeec3b13 Author: David Howells Date: Thu Jan 10 15:40:50 2019 +0000 afs: Fix race in async call refcounting There's a race between afs_make_call() and afs_wake_up_async_call() in the case that an error is returned from rxrpc_kernel_send_data() after it has queued the final packet. afs_make_call() will try and clean up the mess, but the call state may have been moved on thereby causing afs_process_async_call() to also try and to delete the call. Fix this by: (1) Getting an extra ref for an asynchronous call for the call itself to hold. This makes sure the call doesn't evaporate on us accidentally and will allow the call to be retained by the caller in a future patch. The ref is released on leaving afs_make_call() or afs_wait_for_call_to_complete(). (2) In the event of an error from rxrpc_kernel_send_data(): (a) Don't set the call state to AFS_CALL_COMPLETE until *after* the call has been aborted and ended. This prevents afs_deliver_to_call() from doing anything with any notifications it gets. (b) Explicitly end the call immediately to prevent further callbacks. (c) Cancel any queued async_work and wait for the work if it's executing. This allows us to be sure the race won't recur when we change the state. We put the work queue's ref on the call if we managed to cancel it. (d) Put the call's ref that we got in (1). This belongs to us as long as the call is in state AFS_CALL_CL_REQUESTING. Fixes: 341f741f04be ("afs: Refcount the afs_call struct") Signed-off-by: David Howells commit 7a75b0079a1d54e342c502c3c8107ba97e05d3d3 Author: David Howells Date: Thu Jan 10 15:14:29 2019 +0000 afs: Provide a function to get a ref on a call Provide a function to get a reference on an afs_call struct. Signed-off-by: David Howells commit 59d49076ae3e6912e6d7df2fd68e2337f3d02036 Author: David Howells Date: Wed Jan 9 17:23:54 2019 +0000 afs: Fix key refcounting in file locking code Fix the refcounting of the authentication keys in the file locking code. The vnode->lock_key member points to a key on which it expects to be holding a ref, but it isn't always given an extra ref, however. Fixes: 0fafdc9f888b ("afs: Fix file locking") Signed-off-by: David Howells commit 4882a27cec24319d10f95e978ecc80050e3e3e15 Author: Marc Dionne Date: Wed Jan 9 17:23:54 2019 +0000 afs: Don't set vnode->cb_s_break in afs_validate() A cb_interest record is not necessarily attached to the vnode on entry to afs_validate(), which can cause an oops when we try to bring the vnode's cb_s_break up to date in the default case (ie. no current callback promise and the vnode has not been deleted). Fix this by simply removing the line, as vnode->cb_s_break will be set when needed by afs_register_server_cb_interest() when we next get a callback promise from RPC call. The oops looks something like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 ... RIP: 0010:afs_validate+0x66/0x250 [kafs] ... Call Trace: afs_d_revalidate+0x8d/0x340 [kafs] ? __d_lookup+0x61/0x150 lookup_dcache+0x44/0x70 ? lookup_dcache+0x44/0x70 __lookup_hash+0x24/0xa0 do_unlinkat+0x11d/0x2c0 __x64_sys_unlink+0x23/0x30 do_syscall_64+0x4d/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: ae3b7361dc0e ("afs: Fix validation/callback interaction") Signed-off-by: Marc Dionne Signed-off-by: David Howells commit d2fd6e81912a665993b24dcdc1c1384a42a54f7e Author: Logan Gunthorpe Date: Thu Jan 17 08:46:34 2019 -0600 PCI: Fix __initdata issue with "pci=disable_acs_redir" parameter The disable_acs_redir parameter stores a pointer to the string passed to pci_setup(). However, the string passed to PCI setup is actually a temporary copy allocated in static __initdata memory. After init, once the memory is freed, it is no longer valid to reference this pointer. This bug was noticed in v5.0-rc1 after a change in commit c5eb1190074c ("PCI / PM: Allow runtime PM without callback functions") caused pci_disable_acs_redir() to be called during shutdown which manifested as an unable to handle kernel paging request at: RIP: 0010:pci_enable_acs+0x3f/0x1e0 Call Trace: pci_restore_state.part.44+0x159/0x3c0 pci_restore_standard_config+0x33/0x40 pci_pm_runtime_resume+0x2b/0xd0 ? pci_restore_standard_config+0x40/0x40 __rpm_callback+0xbc/0x1b0 rpm_callback+0x1f/0x70 ? pci_restore_standard_config+0x40/0x40 rpm_resume+0x4f9/0x710 ? pci_conf1_read+0xb6/0xf0 ? pci_conf1_write+0xb2/0xe0 __pm_runtime_resume+0x47/0x70 pci_device_shutdown+0x1e/0x60 device_shutdown+0x14a/0x1f0 kernel_restart+0xe/0x50 __do_sys_reboot+0x1ee/0x210 ? __fput+0x144/0x1d0 do_writev+0x5e/0xf0 ? do_writev+0x5e/0xf0 do_syscall_64+0x48/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 It was also likely possible to trigger this bug when hotplugging PCI devices. To fix this, instead of storing a pointer, we use kstrdup() to copy the disable_acs_redir_param to its own buffer which will never be freed. Fixes: aaca43fda742 ("PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support") Tested-by: Jarkko Nikula Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Jarkko Nikula commit e00d8880481497474792d28c14479a9fb6752046 Author: Masahiro Yamada Date: Tue Jan 15 16:19:00 2019 +0900 kbuild: mark prepare0 as PHONY to fix external module build Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC when an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build. Commit e07db28eea38 ("kbuild: fix single target build for external module") turned it into a build error because the 'prepare' target is now executed but the 'prepare0' target is missing for the external module build. External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is also broken in the same way. Move 'PHONY += prepare0' to the common place. GNU Make is fine with missing rule for phony targets. I also removed the comment which is wrong irrespective of this commit. I minimize the change so it can be easily backported to 4.20.x To fix v4.20, please backport e07db28eea38 ("kbuild: fix single target build for external module"), and then this commit. Link: https://bugzilla.kernel.org/show_bug.cgi?id=201891 Fixes: e07db28eea38 ("kbuild: fix single target build for external module") Fixes: c3ff2a5193fa ("powerpc/32: add stack protector support") Fixes: 189af4657186 ("ARM: smp: add support for per-task stack canaries") Fixes: 0a1213fa7432 ("arm64: enable per-task stack canaries") Cc: linux-stable # v4.20 Reported-by: Samuel Holland Reported-by: Alexey Kardashevskiy Signed-off-by: Masahiro Yamada Acked-by: Ard Biesheuvel Tested-by: Alexey Kardashevskiy commit 1b504a7bb18fc32a324712a0fc56d667bdabe258 Author: Masahiro Yamada Date: Tue Jan 15 04:14:23 2019 +0900 openrisc: remove unneeded code in arch/openrisc/Makefile - LDFLAGS_vmlinux is cleared by the top Makefile - 'all: vmlinux' is specified by the top Makefile Signed-off-by: Masahiro Yamada commit 558ee616d177c8225e65c75b6b72952408e64a74 Author: Masahiro Yamada Date: Mon Jan 14 17:44:40 2019 +0900 nds32: remove unneeded code in arch/nds32/Makefile - scripts/Kbuild.include already defined 'comma' - The top Makefile has 'PHONY += FORCE' - include/asm-*/ was moved to arch/*/include/asm/ a decade ago Signed-off-by: Masahiro Yamada commit 15c05196ff84ab07d9b1d05289216de2d5bedcd7 Merge: 1c7fc5cbc3398 51b00d8509dc6 Author: Jani Nikula Date: Thu Jan 17 11:49:51 2019 +0200 Merge tag 'gvt-fixes-2018-01-17' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2018-01-17 - Fix one register cmd parser failure (Colin) - Fix region cleanup for vGPU destroy (Henry) - Fix mmap size check (Zhenyu) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20190117074604.GI18272@zhen-hp.sh.intel.com commit 7fbfee7c80ded94278f109aae4063741c323294a Merge: 47bfa6d9dc8c0 a5795fd38ee81 Author: Linus Torvalds Date: Thu Jan 17 16:54:58 2019 +1200 Merge branch 'fixes-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem fixes from James Morris: "Fixes for the security subsystem. The first (by Casey actually - it's misattributed) fixes a regression introduced with the LSM stacking changes" * 'fixes-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: LSM: Check for NULL cred-security on free Yama: Check for pid death before checking ancestry seccomp: fix UAF in user-trap code commit 0f149c9fec3cd720628ecde83bfc6f64c1e7dcb6 Author: Willem de Bruijn Date: Tue Jan 15 11:40:02 2019 -0500 udp: with udp_segment release on error path Failure __ip_append_data triggers udp_flush_pending_frames, but these tests happen later. The skb must be freed directly. Fixes: bec1f6f697362 ("udp: generate gso with UDP_SEGMENT") Reported-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 1a9352687c19e4937d861ff2c5c6fc45c0a08aff Author: Taehee Yoo Date: Wed Jan 16 01:35:22 2019 +0900 net: bpfilter: change section name of bpfilter UMH blob. The section of bpfilter UMH blob is the ".bpfilter_umh". but this is not an explicit section. so linking warning occurred at compile time for the powerpc. So, this patch makes use of the ".rodata" instead of the ".bpfilter_umh". Config condition: CONFIG_BPFILTER=y CONFIG_BPFILTER_UMH=y Result: ld: warning: orphan section `.bpfilter_umh' from `net/bpfilter/bpfilter_umh_blob.o' being placed in section `.bpfilter_umh' Fixes: 61fbf5933d42 ("net: bpfilter: restart bpfilter_umh when error occurred") Reported-by: Stephen Rothwell Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit a5795fd38ee8194451ba3f281f075301a3696ce2 Author: James Morris Date: Wed Jan 16 15:41:11 2019 -0800 LSM: Check for NULL cred-security on free From: Casey Schaufler Check that the cred security blob has been set before trying to clean it up. There is a case during credential initialization that could result in this. Signed-off-by: Casey Schaufler Acked-by: John Johansen Signed-off-by: James Morris Reported-by: syzbot+69ca07954461f189e808@syzkaller.appspotmail.com commit 9e857a40dc4eba15a739b4194d7db873d82c28a0 Author: Andrew Lunn Date: Tue Jan 15 16:55:30 2019 +0100 net: phy: Add missing features to PHY drivers The bcm87xx and micrel driver has PHYs which are missing the .features value. Add them. The bcm87xx is a 10G FEC only PHY. Add the needed features definition of this PHY. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Reported-by: Scott Wood Reported-by: Camelia Groza Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 35dad45d5cad3c9ca8d6a338cbf668cd7ea86469 Author: David Francis Date: Tue Nov 20 09:42:58 2018 -0500 drm/amd/display: Detach backlight from stream [Why] Backlight is conceptually a property of links, not streams. All backlight programming is done on links, but there is a stream property bl_pwm_level that is used to restore backlight on dpms on and s3 resume. This is unnecessary, as backlight is already restored by hardware with no driver intervention. [How] Remove bl_pwm_level, and the stream argument to set_backlight Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109375 Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher (cherry picked from commit 923fe4951282cbdfce05186c10380bbc45b5e03b) commit a5a82d841186d13c4a6d500dfcf7d02b4195e3ff Author: Jakub Kicinski Date: Mon Jan 14 10:52:45 2019 -0800 ipv6: route: place a warning with duplicated string with correct extack "IPv6: " prefix is already added by pr_fmt, no need to include it again in the pr_warn() format. The message predates extack support, we can replace the whole thing with an extack message. Suggested-by: David Ahern Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 91fa038d9446b5bf5ea80822790af7dd9bcbb5a2 Author: Davide Caratti Date: Mon Jan 14 18:16:44 2019 +0100 selftests: tc-testing: fix parsing of ife type In iproute2 commit 90c5c969f0b9 ("fix print_0xhex on 32 bit"), the format specifier for the ife type changed from 0x%X to %#llX, causing systematic failures in the following TDC test cases: 7682 - Create valid ife encode action with mark and pass control ef47 - Create valid ife encode action with mark and pipe control df43 - Create valid ife encode action with mark and continue control e4cf - Create valid ife encode action with mark and drop control ccba - Create valid ife encode action with mark and reclassify control a1cf - Create valid ife encode action with mark and jump control cb3d - Create valid ife encode action with mark value at 32-bit maximum 95ed - Create valid ife encode action with prio and pass control aa17 - Create valid ife encode action with prio and pipe control 74c7 - Create valid ife encode action with prio and continue control 7a97 - Create valid ife encode action with prio and drop control f66b - Create valid ife encode action with prio and reclassify control 3056 - Create valid ife encode action with prio and jump control 7dd3 - Create valid ife encode action with prio value at 32-bit maximum 05bb - Create valid ife encode action with tcindex and pass control ce65 - Create valid ife encode action with tcindex and pipe control 09cd - Create valid ife encode action with tcindex and continue control 8eb5 - Create valid ife encode action with tcindex and continue control 451a - Create valid ife encode action with tcindex and drop control d76c - Create valid ife encode action with tcindex and reclassify control e731 - Create valid ife encode action with tcindex and jump control b7b8 - Create valid ife encode action with tcindex value at 16-bit maximum 2a9c - Create valid ife encode action with mac src parameter cf5c - Create valid ife encode action with mac dst parameter 2353 - Create valid ife encode action with mac src and mac dst parameters 552c - Create valid ife encode action with mark and type parameters 0421 - Create valid ife encode action with prio and type parameters 4017 - Create valid ife encode action with tcindex and type parameters fac3 - Create valid ife encode action with index at 32-bit maximnum 7c25 - Create valid ife decode action with pass control dccb - Create valid ife decode action with pipe control 7bb9 - Create valid ife decode action with continue control d9ad - Create valid ife decode action with drop control 219f - Create valid ife decode action with reclassify control 8f44 - Create valid ife decode action with jump control b330 - Create ife encode action with cookie Change 'matchPattern' values, allowing '0' and '0x0' if ife type is equal to 0, and accepting both '0x' and '0X' otherwise, to let these tests pass both with old and new tc binaries. While at it, fix a small typo in test case fac3 ('maximnum'->'maximum'). Signed-off-by: Davide Caratti Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit 01b833ab44c9e484060aad72267fc7e71beb559b Author: Konstantin Khlebnikov Date: Mon Jan 14 13:38:43 2019 +0300 net/core/neighbour: fix kmemleak minimal reference count for hash tables This should be 1 for normal allocations, 0 disables leak reporting. Signed-off-by: Konstantin Khlebnikov Reported-by: Cong Wang Fixes: 85704cb8dcfd ("net/core/neighbour: tell kmemleak about hash tables") Signed-off-by: David S. Miller commit 400b8b9a2a17918f8ce00786f596f530e7f30d50 Author: Xin Long Date: Mon Jan 14 18:34:02 2019 +0800 sctp: allocate sctp_sockaddr_entry with kzalloc The similar issue as fixed in Commit 4a2eb0c37b47 ("sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event") also exists in sctp_inetaddr_event, as Alexander noticed. To fix it, allocate sctp_sockaddr_entry with kzalloc for both sctp ipv4 and ipv6 addresses, as does in sctp_v4/6_copy_addrlist(). Reported-by: Alexander Potapenko Signed-off-by: Xin Long Reported-by: syzbot+ae0c70c0c2d40c51bb92@syzkaller.appspotmail.com Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller commit 20704bd1633dd5afb29a321d3a615c9c8e9c9d05 Author: Xin Long Date: Mon Jan 14 18:10:06 2019 +0800 erspan: build the header with the right proto according to erspan_ver As said in draft-foschiano-erspan-03#section4: Different frame variants known as "ERSPAN Types" can be distinguished based on the GRE "Protocol Type" field value: Type I and II's value is 0x88BE while Type III's is 0x22EB [ETYPES]. So set it properly in erspan_xmit() according to erspan_ver. While at it, also remove the unused parameter 'proto' in erspan_fb_xmit(). Fixes: 94d7d8f29287 ("ip6_gre: add erspan v2 support") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 04a4af334b971814eedf4e4a413343ad3287d9a9 Author: Ross Lagerwall Date: Mon Jan 14 09:16:56 2019 +0000 openvswitch: Avoid OOB read when parsing flow nlattrs For nested and variable attributes, the expected length of an attribute is not known and marked by a negative number. This results in an OOB read when the expected length is later used to check if the attribute is all zeros. Fix this by using the actual length of the attribute rather than the expected length. Signed-off-by: Ross Lagerwall Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 9098f21f4cc0f13bc0caa747590e53479c267405 Author: Dmitry Bezrukov Date: Mon Jan 14 08:14:41 2019 +0000 net: usb: aqc111: Extend HWID table by TRENDnet device New device of TRENDnet based on aqc111u Add this ID to blacklist of cdc_ether driver as well Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit cd0c4e70fc0ccfa705cdf55efb27519ce9337a26 Author: Cong Wang Date: Fri Jan 11 18:55:42 2019 -0800 net_sched: refetch skb protocol for each filter Martin reported a set of filters don't work after changing from reclassify to continue. Looking into the code, it looks like skb protocol is not always fetched for each iteration of the filters. But, as demonstrated by Martin, TC actions could modify skb->protocol, for example act_vlan, this means we have to refetch skb protocol in each iteration, rather than using the one we fetch in the beginning of the loop. This bug is _not_ introduced by commit 3b3ae880266d ("net: sched: consolidate tc_classify{,_compat}"), technically, if act_vlan is the only action that modifies skb protocol, then it is commit c7e2b9689ef8 ("sched: introduce vlan action") which introduced this bug. Reported-by: Martin Olsson Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 9474f4e7cd71a633fa1ef93b7daefd44bbdfd482 Author: Kees Cook Date: Wed Jan 16 10:31:09 2019 -0800 Yama: Check for pid death before checking ancestry It's possible that a pid has died before we take the rcu lock, in which case we can't walk the ancestry list as it may be detached. Instead, check for death first before doing the walk. Reported-by: syzbot+a9ac39bf55329e206219@syzkaller.appspotmail.com Fixes: 2d514487faf1 ("security: Yama LSM") Cc: stable@vger.kernel.org Suggested-by: Oleg Nesterov Signed-off-by: Kees Cook Signed-off-by: James Morris commit 3705add0b783e0deeb6646ba0311bf214fe52b0a Author: Jerome Brunet Date: Wed Jan 16 11:36:32 2019 +0100 dt-bindings: reset: meson-axg: fix SPDX license id As reported, the SPDX license id is not placed correctly and the variant of the BSD License used should be specified. Fixes: c16292578ffa ("dt-bindings: reset: Add bindings for the Meson-AXG SoC Reset Controller") Reported-by: Thomas Gleixner Signed-off-by: Jerome Brunet Reviewed-by: Thomas Gleixner Signed-off-by: Rob Herring commit 9eac0ae1683575375de8c63166b3596b11d3b56a Author: Krzysztof Kozlowski Date: Tue Jan 8 13:11:40 2019 +0100 dt-bindings: soc: qcom: Fix trivial language typos Fix few trivial language typos in bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 889f4ce60ed19cfd16216e96f90e64a0c1181c0d Author: Otto Sabart Date: Wed Jan 9 20:07:41 2019 +0100 doc: gpio-mvebu: fix broken reference to cp110-system-controller0.txt file The cp110-system-controller0.txt file was renamed to cp110-system-controller.txt. Fixes: 4aa5496980e4 ("dt-bindings: cp110: rename cp110 syscon file") Signed-off-by: Otto Sabart Signed-off-by: Rob Herring commit 28b170e88bc0c7509e6724717c15cb4b5686026e Author: Julia Lawall Date: Sun Jan 13 10:44:50 2019 +0100 OF: properties: add missing of_node_put Add an of_node_put when the result of of_graph_get_remote_port_parent is not available. The semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // @r exists@ local idexpression e; expression x; @@ e = of_graph_get_remote_port_parent(...); ... when != x = e when != true e == NULL when != of_node_put(e) when != of_fwnode_handle(e) ( return e; | *return ...; ) // Signed-off-by: Julia Lawall Cc: stable@vger.kernel.org Signed-off-by: Rob Herring commit 867cefb4cb1012f42cada1c7d1f35ac8dd276071 Author: Juergen Gross Date: Mon Jan 14 13:44:13 2019 +0100 xen: Fix x86 sched_clock() interface for xen Commit f94c8d11699759 ("sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface") broke Xen guest time handling across migration: [ 187.249951] Freezing user space processes ... (elapsed 0.001 seconds) done. [ 187.251137] OOM killer disabled. [ 187.251137] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 187.252299] suspending xenstore... [ 187.266987] xen:grant_table: Grant tables using version 1 layout [18446743811.706476] OOM killer enabled. [18446743811.706478] Restarting tasks ... done. [18446743811.720505] Setting capacity to 16777216 Fix that by setting xen_sched_clock_offset at resume time to ensure a monotonic clock value. [boris: replaced pr_info() with pr_info_once() in xen_callback_vector() to avoid printing with incorrect timestamp during resume (as we haven't re-adjusted the clock yet)] Fixes: f94c8d11699759 ("sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface") Cc: # 4.11 Reported-by: Hans van Kranenburg Signed-off-by: Juergen Gross Tested-by: Hans van Kranenburg Signed-off-by: Boris Ostrovsky commit c45b1fa2433c65e44bdf48f513cb37289f3116b9 Author: Ming Lei Date: Thu Jan 3 09:34:39 2019 +0800 nvme-pci: fix nvme_setup_irqs() When -ENOSPC is returned from pci_alloc_irq_vectors_affinity(), we still try to allocate multiple irq vectors again, so irq queues covers the admin queue actually. But we don't consider that, then number of the allocated irq vector may be same with sum of io_queues[HCTX_TYPE_DEFAULT] and io_queues[HCTX_TYPE_READ], this way is obviously wrong, and finally breaks nvme_pci_map_queues(), and warning from pci_irq_get_affinity() is triggered. IRQ queues should cover admin queues, this patch makes this point explicitely in nvme_calc_io_queues(). We got severl boot failure internal report on aarch64, so please consider to fix it in v4.20. Fixes: 6451fe73fa0f ("nvme: fix irq vs io_queue calculations") Signed-off-by: Ming Lei Reviewed-by: Keith Busch Tested-by: fin4478 Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit fb8658581a150a859b654b154cefe3118ff4f1e0 Author: Sagi Grimberg Date: Wed Jan 9 14:56:32 2019 -0800 nvmet-tcp: fix uninitialized variable access If we end up in nvmet_tcp_try_recv_one with a bogus state queue receive state we will access result which is uninitialized. Initialize restult to 0 which will be considered as if no data was received by the tcp socket. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Reported-by: Dan Carpenter Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 890d14d2d4b57ff5a149309da3ed36c8a529987f Author: Peter Rosin Date: Wed Jan 16 17:42:35 2019 +0100 fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option A command line option is much more flexible than a config option and the supporting code is small. Gets rid of #ifdefs in the code too... Suggested-by: Geert Uytterhoeven Cc: Jonathan Corbet Signed-off-by: Peter Rosin Signed-off-by: Bartlomiej Zolnierkiewicz commit 240809ef6630a4ce57c273c2d79ffb657cd361eb Author: Hans Verkuil Date: Fri Jan 11 07:07:25 2019 -0500 media: vim2m: only cancel work if it is for right context cancel_delayed_work_sync() was called for any queue, but it should only be called for the queue that is associated with the currently running job. Otherwise, if two filehandles are streaming at the same time, then closing the first will cancel the work which might still be running for a job from the second filehandle. As a result the second filehandle will never be able to finish the job and an attempt to stop streaming on that second filehandle will stall. Fixes: 52117be68b82 ("media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work") Signed-off-by: Hans Verkuil Cc: # for v4.20 and up Signed-off-by: Mauro Carvalho Chehab commit 7fe9f01c04c2673bd6662c35b664f0f91888b96f Author: Sakari Ailus Date: Thu Jan 10 09:24:26 2019 -0500 media: v4l: ioctl: Validate num_planes for debug messages The num_planes field in struct v4l2_pix_format_mplane is used in a loop before validating it. As the use is printing a debug message in this case, just cap the value to the maximum allowed. Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org Reviewed-by: Thierry Reding Signed-off-by: Hans Verkuil Cc: # for v4.12 and up Signed-off-by: Mauro Carvalho Chehab commit 9048b2e15b11c591c649cc6edc7a64fa62c15419 Author: Sakari Ailus Date: Thu Jan 10 07:43:19 2019 -0500 media: v4l: ioctl: Validate num_planes before using it The for loop to reset the memory of the plane reserved fields runs over num_planes provided by the user without validating it. Ensure num_planes is no more than VIDEO_MAX_PLANES before the loop. Fixes: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields") Signed-off-by: Sakari Ailus Reviewed-by: Thierry Reding Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd91642ac71208fe972a9c577ed52b6b3ba7b732 Author: Thierry Reding Date: Thu Jan 10 05:48:39 2019 -0500 media: v4l2-ioctl: Clear only per-plane reserved fields Currently the IOCTL code clears everything after the per-plane bytesperline field in struct v4l2_format. The intent was to only clear the per-plane reserved fields since there is data in struct v4l2_format after the per-plane format data that userspace may have filled in. Fixes: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields") Signed-off-by: Thierry Reding Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fix checkpatch alignment warning] Signed-off-by: Mauro Carvalho Chehab commit 227a76b64718888c1687cc237463aa000ae6fb2b Author: Christoph Hellwig Date: Mon Jan 14 21:14:08 2019 +0100 swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit Otherwise is_swiotlb_buffer will return false positives when we first initialize a swiotlb buffer, but then free it because we have an IOMMU available. Fixes: 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code") Reported-by: Sibren Vasse Signed-off-by: Christoph Hellwig Tested-by: Sibren Vasse Signed-off-by: Konrad Rzeszutek Wilk commit be3bb599d84b50d27d6077085388afabdd2ee18a Author: Masahiro Yamada Date: Mon Jan 14 17:19:57 2019 +0900 ia64: remove redundant 'export AWK' This is exported by the top Makefile. Signed-off-by: Masahiro Yamada commit b421b8a6cb87f099466fff00d1870c2db778c617 Author: Masahiro Yamada Date: Mon Jan 14 17:29:29 2019 +0900 kbuild: remove unused archmrproper No one uses archmrproper. Signed-off-by: Masahiro Yamada commit 7809167da5c86fd6bf309b33dee7a797e263342f Author: Ming Lei Date: Wed Jan 16 19:08:15 2019 +0800 block: don't lose track of REQ_INTEGRITY flag We need to pass bio->bi_opf after bio intergrity preparing, otherwise the flag of REQ_INTEGRITY may not be set on the allocated request, then breaks block integrity. Fixes: f9afca4d367b ("blk-mq: pass in request/bio flags to queue mapping") Cc: Hannes Reinecke Cc: Keith Busch Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 7fa1e2e6afa7f4c9f46528e61de6a15d9e8dffd9 Author: Andrey Konovalov Date: Fri Jan 11 14:47:40 2019 +0100 kasan, arm64: remove redundant ARCH_SLAB_MINALIGN define Defining ARCH_SLAB_MINALIGN in arch/arm64/include/asm/cache.h when KASAN is off is not needed, as it is defined in defined in include/linux/slab.h as ifndef. Signed-off-by: Andrey Konovalov Signed-off-by: Will Deacon commit 1598ecda7b239e9232dda032bfddeed9d89fab6c Author: Ard Biesheuvel Date: Tue Jan 15 20:47:07 2019 +0100 arm64: kaslr: ensure randomized quantities are clean to the PoC kaslr_early_init() is called with the kernel mapped at its link time offset, and if it returns with a non-zero offset, the kernel is unmapped and remapped again at the randomized offset. During its execution, kaslr_early_init() also randomizes the base of the module region and of the linear mapping of DRAM, and sets two variables accordingly. However, since these variables are assigned with the caches on, they may get lost during the cache maintenance that occurs when unmapping and remapping the kernel, so ensure that these values are cleaned to the PoC. Acked-by: Catalin Marinas Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR") Cc: # v4.6+ Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 2f97967503df8e45bc256a348b6f050abd2a38ed Author: James Morse Date: Tue Jan 15 18:49:17 2019 +0000 arm64: kpti: Update arm64_kernel_use_ng_mappings() when forced on Since commit b89d82ef01b3 ("arm64: kpti: Avoid rewriting early page tables when KASLR is enabled"), a kernel built with CONFIG_RANDOMIZE_BASE can decide early whether to use non-global mappings by checking the kaslr_offset(). A kernel built without CONFIG_RANDOMIZE_BASE, instead checks the cpufeature static-key. This leaves a gap where CONFIG_RANDOMIZE_BASE was enabled, no kaslr seed was provided, but kpti was forced on using the cmdline option. When the decision is made late, kpti_install_ng_mappings() will re-write the page tables, but arm64_kernel_use_ng_mappings()'s value does not change as it only tests the cpufeature static-key if CONFIG_RANDOMIZE_BASE is disabled. This function influences PROT_DEFAULT via PTE_MAYBE_NG, and causes pgattr_change_is_safe() to catch nG->G transitions when the unchanged PROT_DEFAULT is used as part of PAGE_KERNEL_RO: [ 1.942255] alternatives: patching kernel code [ 1.998288] ------------[ cut here ]------------ [ 2.000693] kernel BUG at arch/arm64/mm/mmu.c:165! [ 2.019215] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 2.020257] Modules linked in: [ 2.020807] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc2 #51 [ 2.021917] Hardware name: linux,dummy-virt (DT) [ 2.022790] pstate: 40000005 (nZcv daif -PAN -UAO) [ 2.023742] pc : __create_pgd_mapping+0x508/0x6d0 [ 2.024671] lr : __create_pgd_mapping+0x500/0x6d0 [ 2.058059] Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____)) [ 2.059369] Call trace: [ 2.059845] __create_pgd_mapping+0x508/0x6d0 [ 2.060684] update_mapping_prot+0x48/0xd0 [ 2.061477] mark_linear_text_alias_ro+0xdc/0xe4 [ 2.070502] smp_cpus_done+0x90/0x98 [ 2.071216] smp_init+0x100/0x114 [ 2.071878] kernel_init_freeable+0xd4/0x220 [ 2.072750] kernel_init+0x10/0x100 [ 2.073455] ret_from_fork+0x10/0x18 [ 2.075414] ---[ end trace 3572f3a7782292de ]--- [ 2.076389] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b If arm64_kernel_unmapped_at_el0() is true, arm64_kernel_use_ng_mappings() should also be true. Signed-off-by: James Morse CC: Ard Biesheuvel CC: John Garry CC: Will Deacon Signed-off-by: Will Deacon commit f2f98c1d7fa81e25a5cf910edc9db4d3c6f36c1b Author: Timotej Lazar Date: Sun Jan 13 01:22:55 2019 +0100 net: phy: meson-gxl: Use the genphy_soft_reset callback Since the referenced commit, Ethernet fails to come up at boot on the board meson-gxl-s905x-libretech-cc. Fix this by re-enabling the genphy_soft_reset callback for the Amlogic Meson GXL PHY driver. Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset") Signed-off-by: Timotej Lazar Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a6c7c7aac2de6be777b9805fe21848b9a323b8ff Author: yupeng Date: Fri Jan 11 15:07:24 2019 -0800 net: add document for several snmp counters add document for below counters: TcpEstabResets TcpAttemptFails TcpOutRsts TcpExtTCPSACKDiscard TcpExtTCPDSACKIgnoredOld TcpExtTCPDSACKIgnoredNoUndo TcpExtTCPSackShifted TcpExtTCPSackMerged TcpExtTCPSackShiftFallback TcpExtTCPWantZeroWindowAdv TcpExtTCPToZeroWindowAdv TcpExtTCPFromZeroWindowAdv TcpExtDelayedACKs TcpExtDelayedACKLocked TcpExtDelayedACKLost TcpExtTCPLossProbes TcpExtTCPLossProbeRecovery Signed-off-by: yupeng Signed-off-by: David S. Miller commit 26fc181e6cacacd4837da7ffe0c871134a421600 Author: Eric Dumazet Date: Fri Jan 11 06:27:35 2019 -0800 fou, fou6: do not assume linear skbs Both gue_err() and gue6_err() incorrectly assume linear skbs. Fix them to use pskb_may_pull(). BUG: KMSAN: uninit-value in gue6_err+0x475/0xc40 net/ipv6/fou6.c:101 CPU: 0 PID: 18083 Comm: syz-executor1 Not tainted 5.0.0-rc1+ #7 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313 gue6_err+0x475/0xc40 net/ipv6/fou6.c:101 __udp6_lib_err_encap_no_sk net/ipv6/udp.c:434 [inline] __udp6_lib_err_encap net/ipv6/udp.c:491 [inline] __udp6_lib_err+0x18d0/0x2590 net/ipv6/udp.c:522 udplitev6_err+0x118/0x130 net/ipv6/udplite.c:27 icmpv6_notify+0x462/0x9f0 net/ipv6/icmp.c:784 icmpv6_rcv+0x18ac/0x3fa0 net/ipv6/icmp.c:872 ip6_protocol_deliver_rcu+0xb5a/0x23a0 net/ipv6/ip6_input.c:394 ip6_input_finish net/ipv6/ip6_input.c:434 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] ip6_input+0x2b6/0x350 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x4e7/0x6d0 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] ipv6_rcv+0x34b/0x3f0 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core net/core/dev.c:4973 [inline] __netif_receive_skb net/core/dev.c:5083 [inline] process_backlog+0x756/0x10e0 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x78b/0x1a60 net/core/dev.c:6412 __do_softirq+0x53f/0x93a kernel/softirq.c:293 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1039 do_softirq kernel/softirq.c:338 [inline] __local_bh_enable_ip+0x16f/0x1a0 kernel/softirq.c:190 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32 rcu_read_unlock_bh include/linux/rcupdate.h:696 [inline] ip6_finish_output2+0x1d64/0x25f0 net/ipv6/ip6_output.c:121 ip6_finish_output+0xae4/0xbc0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x5ca/0x710 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] ip6_local_out+0x164/0x1d0 net/ipv6/output_core.c:176 ip6_send_skb+0xfa/0x390 net/ipv6/ip6_output.c:1727 udp_v6_send_skb+0x1733/0x1d20 net/ipv6/udp.c:1169 udpv6_sendmsg+0x424e/0x45d0 net/ipv6/udp.c:1466 inet_sendmsg+0x54a/0x720 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116 __sys_sendmmsg+0x580/0xad0 net/socket.c:2211 __do_sys_sendmmsg net/socket.c:2240 [inline] __se_sys_sendmmsg+0xbd/0xe0 net/socket.c:2237 __x64_sys_sendmmsg+0x56/0x70 net/socket.c:2237 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x457ec9 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4a5204fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000457ec9 RDX: 00000000040001ab RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4a520506d4 R13: 00000000004c4ce5 R14: 00000000004d85d8 R15: 00000000ffffffff Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline] kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:185 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2754 [inline] __kmalloc_node_track_caller+0xe9e/0xff0 mm/slub.c:4377 __kmalloc_reserve net/core/skbuff.c:140 [inline] __alloc_skb+0x309/0xa20 net/core/skbuff.c:208 alloc_skb include/linux/skbuff.h:1012 [inline] alloc_skb_with_frags+0x1c7/0xac0 net/core/skbuff.c:5288 sock_alloc_send_pskb+0xafd/0x10a0 net/core/sock.c:2091 sock_alloc_send_skb+0xca/0xe0 net/core/sock.c:2108 __ip6_append_data+0x42ed/0x5dc0 net/ipv6/ip6_output.c:1443 ip6_append_data+0x3c2/0x650 net/ipv6/ip6_output.c:1619 icmp6_send+0x2f5c/0x3c40 net/ipv6/icmp.c:574 icmpv6_send+0xe5/0x110 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x5c/0x2c0 net/ipv6/route.c:2231 dst_link_failure include/net/dst.h:427 [inline] vti_xmit net/ipv4/ip_vti.c:229 [inline] vti_tunnel_xmit+0xf3b/0x1ea0 net/ipv4/ip_vti.c:265 __netdev_start_xmit include/linux/netdevice.h:4382 [inline] netdev_start_xmit include/linux/netdevice.h:4391 [inline] xmit_one net/core/dev.c:3278 [inline] dev_hard_start_xmit+0x604/0xc40 net/core/dev.c:3294 __dev_queue_xmit+0x2e48/0x3b80 net/core/dev.c:3864 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3897 neigh_direct_output+0x42/0x50 net/core/neighbour.c:1511 neigh_output include/net/neighbour.h:508 [inline] ip6_finish_output2+0x1d4e/0x25f0 net/ipv6/ip6_output.c:120 ip6_finish_output+0xae4/0xbc0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x5ca/0x710 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] ip6_local_out+0x164/0x1d0 net/ipv6/output_core.c:176 ip6_send_skb+0xfa/0x390 net/ipv6/ip6_output.c:1727 udp_v6_send_skb+0x1733/0x1d20 net/ipv6/udp.c:1169 udpv6_sendmsg+0x424e/0x45d0 net/ipv6/udp.c:1466 inet_sendmsg+0x54a/0x720 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116 __sys_sendmmsg+0x580/0xad0 net/socket.c:2211 __do_sys_sendmmsg net/socket.c:2240 [inline] __se_sys_sendmmsg+0xbd/0xe0 net/socket.c:2237 __x64_sys_sendmmsg+0x56/0x70 net/socket.c:2237 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Fixes: b8a51b38e4d4 ("fou, fou6: ICMP error handlers for FoU and GUE") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Stefano Brivio Cc: Sabrina Dubroca Signed-off-by: David S. Miller commit 5216bd77798e2ed773ecd45f3f368dcaec63e5dd Author: Davide Caratti Date: Fri Jan 11 15:08:23 2019 +0100 selftests: tc-testing: fix tunnel_key failure if dst_port is unspecified After commit 1c25324caf82 ("net/sched: act_tunnel_key: Don't dump dst port if it wasn't set"), act_tunnel_key doesn't dump anymore the destination port, unless it was explicitly configured. This caused systematic failures in the following TDC test case: 7a88 - Add tunnel_key action with cookie parameter Avoid matching zero values of TCA_TUNNEL_KEY_ENC_DST_PORT to let the test pass again. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit e413615502a3324daba038f529932ba9a5248af0 Author: Davide Caratti Date: Fri Jan 11 11:49:58 2019 +0100 selftests: tc-testing: drop test on missing tunnel key id After merge of commit 80ef0f22ceda ("net/sched: act_tunnel_key: Allow key-less tunnels"), act_tunnel_key does not reject anymore requests to install 'set' rules where the key id is missing. Therefore, drop the following TDC testcase: ba4e - Add tunnel_key set action with missing mandatory id parameter because it's going to become a systematic fail as soon as userspace iproute2 will start supporting key-less tunnels. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit e0a7328fad9979104f73e19bedca821ef3262ae1 Author: Andrew Lunn Date: Fri Jan 11 00:15:21 2019 +0100 net: phy: marvell: Fix deadlock from wrong locking m88e1318_set_wol() takes the lock as part of phy_select_page(). Don't take the lock again with phy_read(), use the unlocked __phy_read(). Fixes: 424ca4c55121 ("net: phy: marvell: fix paged access races") Reported-by: Åke Rehnman Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 8cbcdc1a51999ca81db2956608b917aacd28d837 Author: Andrew Lunn Date: Thu Jan 10 22:48:36 2019 +0100 net: phy: marvell: Errata for mv88e6390 internal PHYs The VOD can be out of spec, unless some magic value is poked into an undocumented register in an undocumented page. Fixes: e4cf8a38fc0d ("net: phy: Marvell: Add mv88e6390 internal PHY") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit f275ee0fa3a06eb87edc229749cf1eb18f0663fa Author: Greg Kroah-Hartman Date: Thu Jan 10 21:24:13 2019 +0100 IN_BADCLASS: fix macro to actually work Commit 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") modified the IN_BADCLASS macro a bit, but unfortunatly one too many '(' characters were added to the line, making any code that used it, not build properly. Also, the macro now compares an unsigned with a signed value, which isn't ok, so fix that up by making both types match properly. Reported-by: Christopher Ferris Fixes: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") Cc: Dave Taht Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 13d7f46386e060df31b727c9975e38306fa51e7a Author: Willem de Bruijn Date: Thu Jan 10 14:40:33 2019 -0500 tcp: allow MSG_ZEROCOPY transmission also in CLOSE_WAIT state TCP transmission with MSG_ZEROCOPY fails if the peer closes its end of the connection and so transitions this socket to CLOSE_WAIT state. Transmission in close wait state is acceptable. Other similar tests in the stack (e.g., in FastOpen) accept both states. Relax this test, too. Link: https://www.mail-archive.com/netdev@vger.kernel.org/msg276886.html Link: https://www.mail-archive.com/netdev@vger.kernel.org/msg227390.html Fixes: f214f915e7db ("tcp: enable MSG_ZEROCOPY") Reported-by: Marek Majkowski Signed-off-by: Willem de Bruijn CC: Yuchung Cheng CC: Neal Cardwell CC: Soheil Hassas Yeganeh CC: Alexey Kodanev Acked-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 1d16073a326891c2a964e4cb95bc18fbcafb5f74 Author: Heiner Kallweit Date: Thu Jan 10 20:22:26 2019 +0100 net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ9031 So far genphy_soft_reset was used automatically if the PHY driver didn't implement the soft_reset callback. This changed with the mentioned commit and broke KSZ9031. To fix this configure the KSZ9031 PHY driver to use genphy_soft_reset. Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset") Reported-by: Tony Lindgren Signed-off-by: Heiner Kallweit Tested-by: Tony Lindgren Tested-by: Sekhar Nori Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9174c3df1cd181c14913138d50ccbe539bb08335 Author: Davide Caratti Date: Thu Jan 10 20:21:02 2019 +0100 net/sched: act_tunnel_key: fix memory leak in case of action replace running the following TDC test cases: 7afc - Replace tunnel_key set action with all parameters 364d - Replace tunnel_key set action with all parameters and cookie it's possible to trigger kmemleak warnings like: unreferenced object 0xffff94797127ab40 (size 192): comm "tc", pid 3248, jiffies 4300565293 (age 1006.862s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 c0 93 f9 8a ff ff ff ff ................ 41 84 ee 89 ff ff ff ff 00 00 00 00 00 00 00 00 A............... backtrace: [<000000001e85b61c>] tunnel_key_init+0x31d/0x820 [act_tunnel_key] [<000000007f3f6ee7>] tcf_action_init_1+0x384/0x4c0 [<00000000e89e3ded>] tcf_action_init+0x12b/0x1a0 [<00000000c1c8c0f8>] tcf_action_add+0x73/0x170 [<0000000095a9fc28>] tc_ctl_action+0x122/0x160 [<000000004bebeac5>] rtnetlink_rcv_msg+0x263/0x2d0 [<000000009fd862dd>] netlink_rcv_skb+0x4a/0x110 [<00000000b55199e7>] netlink_unicast+0x1a0/0x250 [<000000004996cd21>] netlink_sendmsg+0x2c1/0x3c0 [<000000004d6a94b4>] sock_sendmsg+0x36/0x40 [<000000005d9f0208>] ___sys_sendmsg+0x280/0x2f0 [<00000000dec19023>] __sys_sendmsg+0x5e/0xa0 [<000000004b82ac81>] do_syscall_64+0x5b/0x180 [<00000000a0f1209a>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [<000000002926b2ab>] 0xffffffffffffffff when the tunnel_key action is replaced, the kernel forgets to release the dst metadata: ensure they are released by tunnel_key_init(), the same way it's done in tunnel_key_release(). Fixes: d0f6dd8a914f4 ("net/sched: Introduce act_tunnel_key") Signed-off-by: Davide Caratti Acked-by: Cong Wang Signed-off-by: David S. Miller commit e122d845a01ece2ddd28b2f125ef2db66b8b627a Author: David Howells Date: Thu Jan 10 16:59:13 2019 +0000 Revert "rxrpc: Allow failed client calls to be retried" The changes introduced to allow rxrpc calls to be retried creates an issue when it comes to refcounting afs_call structs. The problem is that when rxrpc_send_data() queues the last packet for an asynchronous call, the following sequence can occur: (1) The notify_end_tx callback is invoked which causes the state in the afs_call to be changed from AFS_CALL_CL_REQUESTING or AFS_CALL_SV_REPLYING. (2) afs_deliver_to_call() can then process event notifications from rxrpc on the async_work queue. (3) Delivery of events, such as an abort from the server, can cause the afs_call state to be changed to AFS_CALL_COMPLETE on async_work. (4) For an asynchronous call, afs_process_async_call() notes that the call is complete and tried to clean up all the refs on async_work. (5) rxrpc_send_data() might return the amount of data transferred (success) or an error - which could in turn reflect a local error or a received error. Synchronising the clean up after rxrpc_kernel_send_data() returns an error with the asynchronous cleanup is then tricky to get right. Mostly revert commit c038a58ccfd6704d4d7d60ed3d6a0fca13cf13a4. The two API functions the original commit added aren't currently used. This makes rxrpc_kernel_send_data() always return successfully if it queued the data it was given. Note that this doesn't affect synchronous calls since their Rx notification function merely pokes a wait queue and does not refcounting. The asynchronous call notification function *has* to do refcounting and pass a ref over the work item to avoid the need to sync the workqueue in call cleanup. Signed-off-by: David Howells Signed-off-by: David S. Miller commit 47bfa6d9dc8c060bf56554a465c9031e286d2f80 Merge: 7939f8beecf1c 5b0e7310a2a33 Author: Linus Torvalds Date: Wed Jan 16 17:06:39 2019 +1200 Merge tag 'selinux-pr-20190115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fix from Paul Moore: "One small patch to fix a potential NULL dereference on a failed SELinux policy load" * tag 'selinux-pr-20190115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix GPF on invalid policy commit 70a44f9f6e4297e013de29088608ab2c6fb642f7 Merge: d62f38c295e56 2753ca5d9009c Author: David S. Miller Date: Tue Jan 15 20:29:21 2019 -0800 Merge branch 'tipc-uninit-values' Ying Xue says: ==================== tipc: fix uninit-value issues reported by syzbot Recently, syzbot complained that TIPC module exits several issues associated with uninit-value type. So, in this series, we try to fix them as many as possible. ==================== Signed-off-by: David S. Miller commit 2753ca5d9009c180dbfd4c802c80983b4b6108d1 Author: Ying Xue Date: Mon Jan 14 17:22:29 2019 +0800 tipc: fix uninit-value in tipc_nl_compat_doit BUG: KMSAN: uninit-value in tipc_nl_compat_doit+0x404/0xa10 net/tipc/netlink_compat.c:335 CPU: 0 PID: 4514 Comm: syz-executor485 Not tainted 4.16.0+ #87 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:53 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683 tipc_nl_compat_doit+0x404/0xa10 net/tipc/netlink_compat.c:335 tipc_nl_compat_recv+0x164b/0x2700 net/tipc/netlink_compat.c:1153 genl_family_rcv_msg net/netlink/genetlink.c:599 [inline] genl_rcv_msg+0x1686/0x1810 net/netlink/genetlink.c:624 netlink_rcv_skb+0x378/0x600 net/netlink/af_netlink.c:2447 genl_rcv+0x63/0x80 net/netlink/genetlink.c:635 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x166b/0x1740 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x1048/0x1310 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x43fda9 RSP: 002b:00007ffd0c184ba8 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fda9 RDX: 0000000000000000 RSI: 0000000020023000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000213 R12: 00000000004016d0 R13: 0000000000401760 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline] kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314 kmsan_slab_alloc+0x11/0x20 mm/kmsan/kmsan.c:321 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc_node mm/slub.c:2737 [inline] __kmalloc_node_track_caller+0xaed/0x11c0 mm/slub.c:4369 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x2cf/0x9f0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:984 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline] netlink_sendmsg+0x9a6/0x1310 net/netlink/af_netlink.c:1875 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg net/socket.c:640 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2046 __sys_sendmsg net/socket.c:2080 [inline] SYSC_sendmsg+0x2a3/0x3d0 net/socket.c:2091 SyS_sendmsg+0x54/0x80 net/socket.c:2087 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 In tipc_nl_compat_recv(), when the len variable returned by nlmsg_attrlen() is 0, the message is still treated as a valid one, which is obviously unresonable. When len is zero, it means the message not only doesn't contain any valid TLV payload, but also TLV header is not included. Under this stituation, tlv_type field in TLV header is still accessed in tipc_nl_compat_dumpit() or tipc_nl_compat_doit(), but the field space is obviously illegal. Of course, it is not initialized. Reported-by: syzbot+bca0dc46634781f08b38@syzkaller.appspotmail.com Reported-by: syzbot+6bdb590321a7ae40c1a6@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit 974cb0e3e7c963ced06c4e32c5b2884173fa5e01 Author: Ying Xue Date: Mon Jan 14 17:22:28 2019 +0800 tipc: fix uninit-value in tipc_nl_compat_name_table_dump syzbot reported: BUG: KMSAN: uninit-value in __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline] BUG: KMSAN: uninit-value in __fswab32 include/uapi/linux/swab.h:59 [inline] BUG: KMSAN: uninit-value in tipc_nl_compat_name_table_dump+0x4a8/0xba0 net/tipc/netlink_compat.c:826 CPU: 0 PID: 6290 Comm: syz-executor848 Not tainted 4.19.0-rc8+ #70 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x306/0x460 lib/dump_stack.c:113 kmsan_report+0x1a2/0x2e0 mm/kmsan/kmsan.c:917 __msan_warning+0x7c/0xe0 mm/kmsan/kmsan_instr.c:500 __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline] __fswab32 include/uapi/linux/swab.h:59 [inline] tipc_nl_compat_name_table_dump+0x4a8/0xba0 net/tipc/netlink_compat.c:826 __tipc_nl_compat_dumpit+0x59e/0xdb0 net/tipc/netlink_compat.c:205 tipc_nl_compat_dumpit+0x63a/0x820 net/tipc/netlink_compat.c:270 tipc_nl_compat_handle net/tipc/netlink_compat.c:1151 [inline] tipc_nl_compat_recv+0x1402/0x2760 net/tipc/netlink_compat.c:1210 genl_family_rcv_msg net/netlink/genetlink.c:601 [inline] genl_rcv_msg+0x185c/0x1a20 net/netlink/genetlink.c:626 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2454 genl_rcv+0x63/0x80 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x166d/0x1720 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x1391/0x1420 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe47/0x1200 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x307/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x440179 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffecec49318 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440179 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000401a00 R13: 0000000000401a90 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:255 [inline] kmsan_internal_poison_shadow+0xc8/0x1d0 mm/kmsan/kmsan.c:180 kmsan_kmalloc+0xa4/0x120 mm/kmsan/kmsan_hooks.c:104 kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan_hooks.c:113 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2727 [inline] __kmalloc_node_track_caller+0xb43/0x1400 mm/slub.c:4360 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x422/0xe90 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:996 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1189 [inline] netlink_sendmsg+0xcaf/0x1420 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe47/0x1200 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x307/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 We cannot take for granted the thing that the length of data contained in TLV is longer than the size of struct tipc_name_table_query in tipc_nl_compat_name_table_dump(). Reported-by: syzbot+06e771a754829716a327@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit edf5ff04a45750ac8ce2435974f001dc9cfbf055 Author: Ying Xue Date: Mon Jan 14 17:22:27 2019 +0800 tipc: fix uninit-value in tipc_nl_compat_link_set syzbot reports following splat: BUG: KMSAN: uninit-value in strlen+0x3b/0xa0 lib/string.c:486 CPU: 1 PID: 9306 Comm: syz-executor172 Not tainted 4.20.0-rc7+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313 strlen+0x3b/0xa0 lib/string.c:486 nla_put_string include/net/netlink.h:1154 [inline] __tipc_nl_compat_link_set net/tipc/netlink_compat.c:708 [inline] tipc_nl_compat_link_set+0x929/0x1220 net/tipc/netlink_compat.c:744 __tipc_nl_compat_doit net/tipc/netlink_compat.c:311 [inline] tipc_nl_compat_doit+0x3aa/0xaf0 net/tipc/netlink_compat.c:344 tipc_nl_compat_handle net/tipc/netlink_compat.c:1107 [inline] tipc_nl_compat_recv+0x14d7/0x2760 net/tipc/netlink_compat.c:1210 genl_family_rcv_msg net/netlink/genetlink.c:601 [inline] genl_rcv_msg+0x185f/0x1a60 net/netlink/genetlink.c:626 netlink_rcv_skb+0x444/0x640 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0xf40/0x1020 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x127f/0x1300 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 The uninitialised access happened in nla_put_string(skb, TIPC_NLA_LINK_NAME, lc->name) This is because lc->name string is not validated before it's used. Reported-by: syzbot+d78b8a29241a195aefb8@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit 0762216c0ad2a2fccd63890648eca491f2c83d9a Author: Ying Xue Date: Mon Jan 14 17:22:26 2019 +0800 tipc: fix uninit-value in tipc_nl_compat_bearer_enable syzbot reported: BUG: KMSAN: uninit-value in strlen+0x3b/0xa0 lib/string.c:484 CPU: 1 PID: 6371 Comm: syz-executor652 Not tainted 4.19.0-rc8+ #70 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x306/0x460 lib/dump_stack.c:113 kmsan_report+0x1a2/0x2e0 mm/kmsan/kmsan.c:917 __msan_warning+0x7c/0xe0 mm/kmsan/kmsan_instr.c:500 strlen+0x3b/0xa0 lib/string.c:484 nla_put_string include/net/netlink.h:1011 [inline] tipc_nl_compat_bearer_enable+0x238/0x7b0 net/tipc/netlink_compat.c:389 __tipc_nl_compat_doit net/tipc/netlink_compat.c:311 [inline] tipc_nl_compat_doit+0x39f/0xae0 net/tipc/netlink_compat.c:344 tipc_nl_compat_recv+0x147c/0x2760 net/tipc/netlink_compat.c:1107 genl_family_rcv_msg net/netlink/genetlink.c:601 [inline] genl_rcv_msg+0x185c/0x1a20 net/netlink/genetlink.c:626 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2454 genl_rcv+0x63/0x80 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x166d/0x1720 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x1391/0x1420 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe47/0x1200 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x307/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x440179 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fffef7beee8 EFLAGS: 00000213 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440179 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000401a00 R13: 0000000000401a90 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:255 [inline] kmsan_internal_poison_shadow+0xc8/0x1d0 mm/kmsan/kmsan.c:180 kmsan_kmalloc+0xa4/0x120 mm/kmsan/kmsan_hooks.c:104 kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan_hooks.c:113 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2727 [inline] __kmalloc_node_track_caller+0xb43/0x1400 mm/slub.c:4360 __kmalloc_reserve net/core/skbuff.c:138 [inline] __alloc_skb+0x422/0xe90 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:996 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1189 [inline] netlink_sendmsg+0xcaf/0x1420 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xe47/0x1200 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x307/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbe/0x100 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 The root cause is that we don't validate whether bear name is a valid string in tipc_nl_compat_bearer_enable(). Meanwhile, we also fix the same issue in the following functions: tipc_nl_compat_bearer_disable() tipc_nl_compat_link_stat_dump() tipc_nl_compat_media_set() tipc_nl_compat_bearer_set() Reported-by: syzbot+b33d5cae0efd35dbfe77@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit 8b66fee7f8ee18f9c51260e7a43ab37db5177a05 Author: Ying Xue Date: Mon Jan 14 17:22:25 2019 +0800 tipc: fix uninit-value in tipc_nl_compat_link_reset_stats syzbot reports following splat: BUG: KMSAN: uninit-value in strlen+0x3b/0xa0 lib/string.c:486 CPU: 1 PID: 11057 Comm: syz-executor0 Not tainted 4.20.0-rc7+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:295 strlen+0x3b/0xa0 lib/string.c:486 nla_put_string include/net/netlink.h:1154 [inline] tipc_nl_compat_link_reset_stats+0x1f0/0x360 net/tipc/netlink_compat.c:760 __tipc_nl_compat_doit net/tipc/netlink_compat.c:311 [inline] tipc_nl_compat_doit+0x3aa/0xaf0 net/tipc/netlink_compat.c:344 tipc_nl_compat_handle net/tipc/netlink_compat.c:1107 [inline] tipc_nl_compat_recv+0x14d7/0x2760 net/tipc/netlink_compat.c:1210 genl_family_rcv_msg net/netlink/genetlink.c:601 [inline] genl_rcv_msg+0x185f/0x1a60 net/netlink/genetlink.c:626 netlink_rcv_skb+0x444/0x640 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0xf40/0x1020 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x127f/0x1300 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x457ec9 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2557338c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457ec9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f25573396d4 R13: 00000000004cb478 R14: 00000000004d86c8 R15: 00000000ffffffff Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:204 [inline] kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:158 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:185 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2759 [inline] __kmalloc_node_track_caller+0xe18/0x1030 mm/slub.c:4383 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x309/0xa20 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:998 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline] netlink_sendmsg+0xb82/0x1300 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] ___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116 __sys_sendmsg net/socket.c:2154 [inline] __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2161 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 The uninitialised access happened in tipc_nl_compat_link_reset_stats: nla_put_string(skb, TIPC_NLA_LINK_NAME, name) This is because name string is not validated before it's used. Reported-by: syzbot+e01d94b5a4c266be6e4c@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit a88289f4ddee4165d5f796bd99e09eec3133c16b Author: Ying Xue Date: Mon Jan 14 17:22:24 2019 +0800 tipc: fix uninit-value in in tipc_conn_rcv_sub syzbot reported: BUG: KMSAN: uninit-value in tipc_conn_rcv_sub+0x184/0x950 net/tipc/topsrv.c:373 CPU: 0 PID: 66 Comm: kworker/u4:4 Not tainted 4.17.0-rc3+ #88 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: tipc_rcv tipc_conn_recv_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:113 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:683 tipc_conn_rcv_sub+0x184/0x950 net/tipc/topsrv.c:373 tipc_conn_rcv_from_sock net/tipc/topsrv.c:409 [inline] tipc_conn_recv_work+0x3cd/0x560 net/tipc/topsrv.c:424 process_one_work+0x12c6/0x1f60 kernel/workqueue.c:2145 worker_thread+0x113c/0x24f0 kernel/workqueue.c:2279 kthread+0x539/0x720 kernel/kthread.c:239 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:412 Local variable description: ----s.i@tipc_conn_recv_work Variable was created at: tipc_conn_recv_work+0x65/0x560 net/tipc/topsrv.c:419 process_one_work+0x12c6/0x1f60 kernel/workqueue.c:2145 In tipc_conn_rcv_from_sock(), it always supposes the length of message received from sock_recvmsg() is not smaller than the size of struct tipc_subscr. However, this assumption is false. Especially when the length of received message is shorter than struct tipc_subscr size, we will end up touching uninitialized fields in tipc_conn_rcv_sub(). Reported-by: syzbot+8951a3065ee7fd6d6e23@syzkaller.appspotmail.com Reported-by: syzbot+75e6e042c5bbf691fc82@syzkaller.appspotmail.com Signed-off-by: Ying Xue Signed-off-by: David S. Miller commit d62f38c295e56147e8298af1e0e0ec9e7cc14937 Merge: 80b3671e93779 8c6c37fdc20ec Author: David S. Miller Date: Tue Jan 15 20:12:01 2019 -0800 Merge branch 'sch_cake-leaf-qdisc-fixes' Toke Høiland-Jørgensen says: ==================== sched: Fix qdisc interactions exposed by using sch_cake as a leaf qdisc This series fixes a couple of issues exposed by running sch_cake as a leaf qdisc in an HFSC tree, which were discovered and reported by Pete Heist. The interaction between CAKE's GSO splitting and the parent qdisc's notion of its own queue length could cause queue stalls. While investigating the report, I also noticed that several qdiscs would dereference the skb pointer after dequeue, which is potentially problematic since the GSO splitting code also frees the original skb. See the individual patches in the series for details. ==================== Signed-off-by: David S. Miller commit 8c6c37fdc20ec9ffaa342f827a8e20afe736fb0c Author: Toke Høiland-Jørgensen Date: Wed Jan 9 17:09:44 2019 +0100 sch_cake: Correctly update parent qlen when splitting GSO packets To ensure parent qdiscs have the same notion of the number of enqueued packets even after splitting a GSO packet, update the qdisc tree with the number of packets that was added due to the split. Reported-by: Pete Heist Tested-by: Pete Heist Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 37d9cf1a3ce35de3df6f7d209bfb1f50cf188cea Author: Toke Høiland-Jørgensen Date: Wed Jan 9 17:09:43 2019 +0100 sched: Fix detection of empty queues in child qdiscs Several qdiscs check on enqueue whether the packet was enqueued to a class with an empty queue, in which case the class is activated. This is done by checking if the qlen is exactly 1 after enqueue. However, if GSO splitting is enabled in the child qdisc, a single packet can result in a qlen longer than 1. This means the activation check fails, leading to a stalled queue. Fix this by checking if the queue is empty *before* enqueue, and running the activation logic if this was the case. Reported-by: Pete Heist Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit f6bab199315b70fd83fe3ee0947bc84c7a35f3d4 Author: Toke Høiland-Jørgensen Date: Wed Jan 9 17:09:42 2019 +0100 sched: Avoid dereferencing skb pointer after child enqueue Parent qdiscs may dereference the pointer to the enqueued skb after enqueue. However, both CAKE and TBF call consume_skb() on the original skb when splitting GSO packets, leading to a potential use-after-free in the parent. Fix this by avoiding dereferencing the skb pointer after enqueueing to the child. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 6e8ccb4f624a73c56fc6ef0c45bcf91ca80703c3 Author: Stanislav Fomichev Date: Tue Jan 15 14:03:27 2019 -0800 tools/bpf: properly account for libbfd variations On some platforms, in order to link against libbfd, we need to link against liberty and even possibly libz. Account for that in the bpftool Makefile. We now have proper feature detection for each case, so handle each one separately. See recent commit 14541b1e7e72 ("perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz") where I fixed feature detection. v2 (addressed Jakub's nits): * better syntax for 'else ifeq' * no space between ifeq args v3: * use LIBS, not EXTLIBS for -DHAVE_LIBBFD_SUPPORT Fixes: 29a9c10e4110 ("bpftool: make libbfd optional") Signed-off-by: Stanislav Fomichev Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 77f88abd4a6f73a1a68dbdc0e3f21575fd508fc3 Author: Ming Lei Date: Tue Jan 15 17:31:29 2019 -0600 PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity() The API of pci_alloc_irq_vectors_affinity() says it returns -ENOSPC if fewer than @min_vecs interrupt vectors are available for @dev. However, if a device supports MSI-X but not MSI and a caller requests @min_vecs that can't be satisfied by MSI-X, we previously returned -EINVAL (from the failed attempt to enable MSI), not -ENOSPC. When -ENOSPC is returned, callers may reduce the number IRQs they request and try again. Most callers can use the @min_vecs and @max_vecs parameters to avoid this retry loop, but that doesn't work when using IRQ affinity "nr_sets" because rebalancing the sets is driver-specific. This return value bug has been present since pci_alloc_irq_vectors() was added in v4.10 by aff171641d18 ("PCI: Provide sensible IRQ vector alloc/free routines"), but it wasn't an issue because @min_vecs/@max_vecs removed the need for callers to iteratively reduce the number of IRQs requested and retry the allocation, so they didn't need to distinguish -ENOSPC from -EINVAL. In v5.0, 6da4b3ab9a6e ("genirq/affinity: Add support for allocating interrupt sets") added IRQ sets to the interface, which reintroduced the need to check for -ENOSPC and possibly reduce the number of IRQs requested and retry the allocation. Signed-off-by: Ming Lei [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Cc: Jens Axboe Cc: Keith Busch Cc: Christoph Hellwig commit b1c0330823fe842dbb34641f1410f0afa51c29d3 Author: Rafael J. Wysocki Date: Wed Jan 9 00:34:37 2019 +0100 ACPI: EC: Look for ECDT EC after calling acpi_load_tables() Some systems have had functional issues since commit 5a8361f7ecce (ACPICA: Integrate package handling with module-level code) that, among other things, changed the initial values of the acpi_gbl_group_module_level_code and acpi_gbl_parse_table_as_term_list global flags in ACPICA which implicitly caused acpi_ec_ecdt_probe() to be called before acpi_load_tables() on the vast majority of platforms. Namely, before commit 5a8361f7ecce, acpi_load_tables() was called from acpi_early_init() if acpi_gbl_parse_table_as_term_list was FALSE and acpi_gbl_group_module_level_code was TRUE, which almost always was the case as FALSE and TRUE were their initial values, respectively. The acpi_gbl_parse_table_as_term_list value would be changed to TRUE for a couple of platforms in acpi_quirks_dmi_table[], but it remained FALSE in the vast majority of cases. After commit 5a8361f7ecce, the initial values of the two flags have been reversed, so in effect acpi_load_tables() has not been called from acpi_early_init() any more. That, in turn, affects acpi_ec_ecdt_probe() which is invoked before acpi_load_tables() now and it is not possible to evaluate the _REG method for the EC address space handler installed by it. That effectively causes the EC address space to be inaccessible to AML on platforms with an ECDT matching the EC device definition in the DSDT and functional problems ensue in there. Because the default behavior before commit 5a8361f7ecce was to call acpi_ec_ecdt_probe() after acpi_load_tables(), it should be safe to do that again. Moreover, the EC address space handler installed by acpi_ec_ecdt_probe() is only needed for AML to be able to access the EC address space and the only AML that can run during acpi_load_tables() is module-level code which only is allowed to access address spaces with default handlers (memory, I/O and PCI config space). For this reason, move the acpi_ec_ecdt_probe() invocation back to acpi_bus_init(), from where it was taken away by commit d737f333b211 (ACPI: probe ECDT before loading AML tables regardless of module-level code flag), and put it after the invocation of acpi_load_tables() to restore the original code ordering from before commit 5a8361f7ecce. Fixes: 5a8361f7ecce ("ACPICA: Integrate package handling with module-level code") Link: https://bugzilla.kernel.org/show_bug.cgi?id=199981 Reported-by: step-ali Reported-by: Charles Stanhope Tested-by: Charles Stanhope Reported-by: Paulo Nascimento Reported-by: David Purton Reported-by: Adam Harvey Reported-by: Zhang Rui Tested-by: Zhang Rui Tested-by: Jean-Marc Lenoir Signed-off-by: Rafael J. Wysocki commit 6f9b5e70dfcde983192155549f584472aa9f54cd Author: Sinan Kaya Date: Sat Jan 5 10:06:06 2019 +0000 drivers: thermal: int340x_thermal: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. IOSF_CORE depends on PCI. For this reason, add a direct dependency on CONFIG_PCI. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit e9820d6b0a6c85f753e8d6626320367ef12ebe15 Author: Sinan Kaya Date: Sat Jan 5 10:06:05 2019 +0000 x86/intel/lpss: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. LPSS code relies on PCI infrastructure but this dependency has not been called out explicitly yet. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 7934d76c88816f12ac991540eeece403204f8a1c Author: Sinan Kaya Date: Sat Jan 5 10:06:01 2019 +0000 platform/x86: apple-gmux: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. This driver depends on the PCI infrastructure but the dependency has not been called out explicitly yet. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 737ee5824d91292682be7e0c0771ad67992c199f Author: Sinan Kaya Date: Sat Jan 5 10:06:00 2019 +0000 platform/x86: intel_pmc: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. Some code in intel_pmc relies on PCI for execution. Specify this in the Kconfig. [ Andy S: For sake of a quick fix this introduces a new mandatory dependency to the driver which may survive without it. Otherwise we need to revisit the driver architecture to address this properly. ] Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 63680e0d625be8f4bd570d30aaf3562551e179e3 Author: Sinan Kaya Date: Sat Jan 5 10:05:59 2019 +0000 platform/x86: intel_ips: make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. intel_ips is a PCI device driver but this has not been mentioned anywhere in Kconfig. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Acked-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 94e8e8e97661dc3c2a4c253755f6bfe9e2e697f3 Author: Sinan Kaya Date: Sat Jan 5 10:05:58 2019 +0000 vga-switcheroo: make PCI dependency explicit This driver depends on the PCI infrastructure, but the dependency has not been explicitly called out. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Reviewed-by: Lukas Wunner Acked-by: Daniel Vetter Signed-off-by: Rafael J. Wysocki commit 995592bc531992d4a93c37d86e7f9635ee823258 Author: Sinan Kaya Date: Sat Jan 5 10:05:57 2019 +0000 ata: pata_acpi: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) dependencies on CONFIG_PCI that previously were satisfied implicitly through dependencies on CONFIG_ACPI have to be specified directly. PATA_ACPI is a PCI device driver but the PCI dependency has not been explicitly called out. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sinan Kaya Reviewed-by: Jens Axboe Signed-off-by: Rafael J. Wysocki commit 1622745551db05071ed7263abf768007f7cbd3ae Author: Sinan Kaya Date: Sat Jan 5 10:05:56 2019 +0000 ACPI / LPSS: Make PCI dependency explicit After commit 5d32a66541c4 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set), it is possible to build ACPI without any PCI support. This code depends on PCI. Compile only when PCI is present. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit faa8bd6e12e6aeea289d8e6ba74777b72a69434c Author: Dave Jiang Date: Tue Jan 15 11:26:21 2019 -0700 libnvdimm/security: Fix nvdimm_security_state() state request selection The input parameter should be enum nvdimm_passphrase_type instead of bool for selection of master/user for selection of extended master passphrase state or the regular user passphrase state. Fixes: 89fa9d8ea7bdf ("...add Intel DSM 1.8 master passphrase support") Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 80b3671e9377916bf2b02e56113fa7377ce5705a Author: Hangbin Liu Date: Thu Jan 10 11:17:42 2019 +0800 ip6_gre: update version related info when changing link We forgot to update ip6erspan version related info when changing link, which will cause setting new hwid failed. Reported-by: Jianlin Shi Fixes: 94d7d8f292870 ("ip6_gre: add erspan v2 support") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit d9f903f6af3dc6d13b21c0eca8f4a169aa70d80d Author: Heiner Kallweit Date: Wed Jan 9 20:34:56 2019 +0100 net: phy: fix too strict check in phy_start_aneg When adding checks to detect wrong usage of the phylib API we added a check to phy_start_aneg() which is too strict. If the phylib state machine is in state PHY_HALTED we should allow reconfiguring and restarting aneg, and just don't touch the state. Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking") Reported-by: Chris Wilson Signed-off-by: Heiner Kallweit Tested-by: Chris Wilson Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5642e27bf6a935c1d0d9149e83d625dfba286463 Author: Jeff Kirsher Date: Wed Jan 9 09:10:53 2019 -0800 Revert "igb: reduce CPU0 latency when updating statistics" This reverts commit 59361316afcb08569af21e1af83e89c7051c055a. Due to problems found in additional testing, this causes an illegal context switch in the RCU read-side critical section. CC: Dave Jones CC: Cong Wang CC: Jan Jablonsky Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 5be99560c6a0c24b7a0cc3bb4f26051c92cdff2a Author: Dan Carpenter Date: Wed Jan 9 13:50:07 2019 +0300 selftests/txtimestamp: Fix an equals vs assign bug This should be == instead of =. Fixes: b52354aa068e ("selftests: expand txtimestamp with ipv6 dgram + raw and pf_packet") Signed-off-by: Dan Carpenter Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit f97f4dd8b3bb9d0993d2491e0f22024c68109184 Author: Ido Schimmel Date: Wed Jan 9 09:57:39 2019 +0000 net: ipv4: Fix memory leak in network namespace dismantle IPv4 routing tables are flushed in two cases: 1. In response to events in the netdev and inetaddr notification chains 2. When a network namespace is being dismantled In both cases only routes associated with a dead nexthop group are flushed. However, a nexthop group will only be marked as dead in case it is populated with actual nexthops using a nexthop device. This is not the case when the route in question is an error route (e.g., 'blackhole', 'unreachable'). Therefore, when a network namespace is being dismantled such routes are not flushed and leaked [1]. To reproduce: # ip netns add blue # ip -n blue route add unreachable 192.0.2.0/24 # ip netns del blue Fix this by not skipping error routes that are not marked with RTNH_F_DEAD when flushing the routing tables. To prevent the flushing of such routes in case #1, add a parameter to fib_table_flush() that indicates if the table is flushed as part of namespace dismantle or not. Note that this problem does not exist in IPv6 since error routes are associated with the loopback device. [1] unreferenced object 0xffff888066650338 (size 56): comm "ip", pid 1206, jiffies 4294786063 (age 26.235s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 b0 1c 62 61 80 88 ff ff ..........ba.... e8 8b a1 64 80 88 ff ff 00 07 00 08 fe 00 00 00 ...d............ backtrace: [<00000000856ed27d>] inet_rtm_newroute+0x129/0x220 [<00000000fcdfc00a>] rtnetlink_rcv_msg+0x397/0xa20 [<00000000cb85801a>] netlink_rcv_skb+0x132/0x380 [<00000000ebc991d2>] netlink_unicast+0x4c0/0x690 [<0000000014f62875>] netlink_sendmsg+0x929/0xe10 [<00000000bac9d967>] sock_sendmsg+0xc8/0x110 [<00000000223e6485>] ___sys_sendmsg+0x77a/0x8f0 [<000000002e94f880>] __sys_sendmsg+0xf7/0x250 [<00000000ccb1fa72>] do_syscall_64+0x14d/0x610 [<00000000ffbe3dae>] entry_SYSCALL_64_after_hwframe+0x49/0xbe [<000000003a8b605b>] 0xffffffffffffffff unreferenced object 0xffff888061621c88 (size 48): comm "ip", pid 1206, jiffies 4294786063 (age 26.235s) hex dump (first 32 bytes): 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b d8 8e 26 5f 80 88 ff ff kkkkkkkk..&_.... backtrace: [<00000000733609e3>] fib_table_insert+0x978/0x1500 [<00000000856ed27d>] inet_rtm_newroute+0x129/0x220 [<00000000fcdfc00a>] rtnetlink_rcv_msg+0x397/0xa20 [<00000000cb85801a>] netlink_rcv_skb+0x132/0x380 [<00000000ebc991d2>] netlink_unicast+0x4c0/0x690 [<0000000014f62875>] netlink_sendmsg+0x929/0xe10 [<00000000bac9d967>] sock_sendmsg+0xc8/0x110 [<00000000223e6485>] ___sys_sendmsg+0x77a/0x8f0 [<000000002e94f880>] __sys_sendmsg+0xf7/0x250 [<00000000ccb1fa72>] do_syscall_64+0x14d/0x610 [<00000000ffbe3dae>] entry_SYSCALL_64_after_hwframe+0x49/0xbe [<000000003a8b605b>] 0xffffffffffffffff Fixes: 8cced9eff1d4 ("[NETNS]: Enable routing configuration in non-initial namespace.") Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ab5098fa25b91cb6fe0a0676f17abb64f2bbf024 Author: Olivier Matz Date: Wed Jan 9 10:57:21 2019 +0100 ip6_gre: fix tunnel list corruption for x-netns In changelink ops, the ip6gre_net pointer is retrieved from dev_net(dev), which is wrong in case of x-netns. Thus, the tunnel is not unlinked from its current list and is relinked into another net namespace. This corrupts the tunnel lists and can later trigger a kernel oops. Fix this by retrieving the netns from device private area. Fixes: c8632fc30bb0 ("net: ip6_gre: Split up ip6gre_changelink()") Cc: Petr Machata Signed-off-by: Olivier Matz Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 72f6d4d14c2e23c8ad416ccbe5cfc744ba703d0a Merge: 7939f8beecf1c 2314e879747e8 Author: David S. Miller Date: Tue Jan 15 13:31:46 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net This is the first batch of Netfilter fixes for your net tree: 1) Fix endless loop in nf_tables rules netlink dump, from Phil Sutter. 2) Reference counter leak in object from the error path, from Taehee Yoo. 3) Selective rule dump requires table and chain. 4) Fix DNAT with nft_flow_offload reverse route lookup, from wenxu. 5) Use GFP_KERNEL_ACCOUNT in vmalloc allocation from ebtables, from Shakeel Butt. 6) Set ifindex from route to fix interaction with VRF slave device, also from wenxu. 7) Use nfct_help() to check for conntrack helper, IPS_HELPER status flag is only set from explicit helpers via -j CT, from Henry Yen. ==================== Signed-off-by: David S. Miller commit b4711098066f1cf808d4dc11a1a842860a3292fe Author: Wen Yang Date: Tue Jan 15 10:31:27 2019 +0800 pvcalls-front: fix potential null dereference static checker warning: drivers/xen/pvcalls-front.c:373 alloc_active_ring() error: we previously assumed 'map->active.ring' could be null (see line 357) drivers/xen/pvcalls-front.c 351 static int alloc_active_ring(struct sock_mapping *map) 352 { 353 void *bytes; 354 355 map->active.ring = (struct pvcalls_data_intf *) 356 get_zeroed_page(GFP_KERNEL); 357 if (!map->active.ring) ^^^^^^^^^^^^^^^^^ Check 358 goto out; 359 360 map->active.ring->ring_order = PVCALLS_RING_ORDER; 361 bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 362 PVCALLS_RING_ORDER); 363 if (!bytes) 364 goto out; 365 366 map->active.data.in = bytes; 367 map->active.data.out = bytes + 368 XEN_FLEX_RING_SIZE(PVCALLS_RING_ORDER); 369 370 return 0; 371 372 out: --> 373 free_active_ring(map); ^^^ Add null check on map->active.ring before dereferencing it to avoid any NULL pointer dereferences. Fixes: 9f51c05dc41a ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock") Reported-by: Dan Carpenter Suggested-by: Boris Ostrovsky Signed-off-by: Wen Yang Reviewed-by: Boris Ostrovsky CC: Boris Ostrovsky CC: Juergen Gross CC: Stefano Stabellini CC: Dan Carpenter CC: xen-devel@lists.xenproject.org CC: linux-kernel@vger.kernel.org Signed-off-by: Boris Ostrovsky commit 4bb0e6d7258213d4893c2c876712fbba40e712fe Author: Julia Lawall Date: Sun Jan 13 09:47:44 2019 +0100 drm/sun4i: backend: add missing of_node_puts The device node iterators perform an of_node_get on each iteration, so a jump out of the loop requires an of_node_put. Remote and port also have augmented reference counts, so drop them on each iteration and at the end of the function, respectively. Remote is only used for the address it contains, not for the contents of that address, so the reference count can be dropped immediately. The semantic patch that fixes the first part of this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; iterator name for_each_child_of_node; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1547369264-24831-5-git-send-email-Julia.Lawall@lip6.fr commit deaa5c96c2f7e8b934088a1e70a0fe8797bd1149 Author: Chuck Lever Date: Wed Jan 9 10:04:57 2019 -0500 SUNRPC: Address Kerberos performance/behavior regression When using Kerberos with v4.20, I've observed frequent connection loss on heavy workloads. I traced it down to the client underrunning the GSS sequence number window -- NFS servers are required to drop the RPC with the low sequence number, and also drop the connection to signal that an RPC was dropped. Bisected to commit 918f3c1fe83c ("SUNRPC: Improve latency for interactive tasks"). I've got a one-line workaround for this issue, which is easy to backport to v4.20 while a more permanent solution is being derived. Essentially, tk_owner-based sorting is disabled for RPCs that carry a GSS sequence number. Fixes: 918f3c1fe83c ("SUNRPC: Improve latency for interactive ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 86edaed379632e216a97e6bcef9f498b64522d50 Author: Lorenz Bauer Date: Tue Jan 8 13:58:00 2019 +0000 bpf: libbpf: retry loading program on EAGAIN Commit c3494801cd17 ("bpf: check pending signals while verifying programs") makes it possible for the BPF_PROG_LOAD to fail with EAGAIN. Retry unconditionally in this case. Fixes: c3494801cd17 ("bpf: check pending signals while verifying programs") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann commit 97b78ae96ba76f4ca2d8f5afee6a2e567ccb8f45 Author: Trond Myklebust Date: Wed Jan 2 17:53:13 2019 -0500 SUNRPC: Ensure we respect the RPCSEC_GSS sequence number limit According to RFC2203, the RPCSEC_GSS sequence numbers are bounded to an upper limit of MAXSEQ = 0x80000000. Ensure that we handle that correctly. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e66721f0436396f779291a29616858b76bfd9415 Author: Trond Myklebust Date: Wed Jan 2 17:53:10 2019 -0500 SUNRPC: Ensure rq_bytes_sent is reset before request transmission When we resend a request, ensure that the 'rq_bytes_sent' is reset to zero. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6bf3bbe1f4d4cf405e3c2bf07bbdff56d3223ec8 Author: Yonghong Song Date: Sat Jan 12 15:04:30 2019 -0800 samples/bpf: workaround clang asm goto compilation errors x86 compilation has required asm goto support since 4.17. Since clang does not support asm goto, at 4.17, Commit b1ae32dbab50 ("x86/cpufeature: Guard asm_volatile_goto usage for BPF compilation") worked around the issue by permitting an alternative implementation without asm goto for clang. At 5.0, more asm goto usages appeared. [yhs@148 x86]$ egrep -r asm_volatile_goto include/asm/cpufeature.h: asm_volatile_goto("1: jmp 6f\n" include/asm/jump_label.h: asm_volatile_goto("1:" include/asm/jump_label.h: asm_volatile_goto("1:" include/asm/rmwcc.h: asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \ include/asm/uaccess.h: asm_volatile_goto("\n" \ include/asm/uaccess.h: asm_volatile_goto("\n" \ [yhs@148 x86]$ Compiling samples/bpf directories, most bpf programs failed compilation with error messages like: In file included from /home/yhs/work/bpf-next/samples/bpf/xdp_sample_pkts_kern.c:2: In file included from /home/yhs/work/bpf-next/include/linux/ptrace.h:6: In file included from /home/yhs/work/bpf-next/include/linux/sched.h:15: In file included from /home/yhs/work/bpf-next/include/linux/sem.h:5: In file included from /home/yhs/work/bpf-next/include/uapi/linux/sem.h:5: In file included from /home/yhs/work/bpf-next/include/linux/ipc.h:9: In file included from /home/yhs/work/bpf-next/include/linux/refcount.h:72: /home/yhs/work/bpf-next/arch/x86/include/asm/refcount.h:70:9: error: 'asm goto' constructs are not supported yet return GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl", ^ /home/yhs/work/bpf-next/arch/x86/include/asm/rmwcc.h:67:2: note: expanded from macro 'GEN_BINARY_SUFFIXED_RMWcc' __GEN_RMWcc(op " %[val], %[var]\n\t" suffix, var, cc, \ ^ /home/yhs/work/bpf-next/arch/x86/include/asm/rmwcc.h:21:2: note: expanded from macro '__GEN_RMWcc' asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \ ^ /home/yhs/work/bpf-next/include/linux/compiler_types.h:188:37: note: expanded from macro 'asm_volatile_goto' #define asm_volatile_goto(x...) asm goto(x) Most implementation does not even provide an alternative implementation. And it is also not practical to make changes for each call site. This patch workarounded the asm goto issue by redefining the macro like below: #define asm_volatile_goto(x...) asm volatile("invalid use of asm_volatile_goto") If asm_volatile_goto is not used by bpf programs, which is typically the case, nothing bad will happen. If asm_volatile_goto is used by bpf programs, which is incorrect, the compiler will issue an error since "invalid use of asm_volatile_goto" is not valid assembly codes. With this patch, all bpf programs under samples/bpf can pass compilation. Note that bpf programs under tools/testing/selftests/bpf/ compiled fine as they do not access kernel internal headers. Fixes: e769742d3584 ("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Fixes: 18fe58229d80 ("x86, asm: change the GEN_*_RMWcc() macros to not quote the condition") Acked-by: Alexei Starovoitov Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 1be72f29bfb98be27a95309f18b4ab5249967b59 Author: Stanislav Fomichev Date: Mon Jan 14 09:41:41 2019 -0800 selftests/bpf: install with_tunnels.sh for test_flow_dissector.sh test_flow_dissector.sh depends on both with_addr.sh and with_tunnels.sh However, we install only with_addr.sh. Add with_tunnels.sh to TEST_PROGS_EXTENDED to make sure it gets installed as well. Tested with: make TARGETS=bpf install INSTALL_PATH=$PWD/x Fixes: ef4ab8447aa26 ("selftests: bpf: install script with_addr.sh") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit cc5b5d3565048ae57d14e5674a5fb085b2ab0193 Author: Krzysztof Kazimierczak Date: Thu Jan 10 20:29:02 2019 +0100 xsk: Check if a queue exists during umem setup In the xdp_umem_assign_dev() path, the xsk code does not check if a queue for which umem is to be created exists. It leads to a situation where umem is not assigned to any Tx/Rx queue of a netdevice, without notifying the stack about an error. This affects both XDP_SKB and XDP_DRV modes - in case of XDP_DRV_ZC, queue index is checked by the driver. This patch fixes xsk code, so that in both XDP_SKB and XDP_DRV mode of AF_XDP, an error is returned when requested queue index exceedes an existing maximum. Fixes: c9b47cc1fabca ("xsk: fix bug when trying to use both copy and zero-copy on one queue id") Reported-by: Jakub Spizewski Signed-off-by: Krzysztof Kazimierczak Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann commit a811dc61559e0c8003f1086c2a4dc8e4d5ae4cb8 Author: Tycho Andersen Date: Sat Jan 12 11:24:20 2019 -0700 seccomp: fix UAF in user-trap code On the failure path, we do an fput() of the listener fd if the filter fails to install (e.g. because of a TSYNC race that's lost, or if the thread is killed, etc.). fput() doesn't actually release the fd, it just ads it to a work queue. Then the thread proceeds to free the filter, even though the listener struct file has a reference to it. To fix this, on the failure path let's set the private data to null, so we know in ->release() to ignore the filter. Reported-by: syzbot+981c26489b2d1c6316ba@syzkaller.appspotmail.com Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Tycho Andersen Acked-by: Kees Cook Signed-off-by: James Morris commit 663ec3a2c2d02775bc723b20a1af33262f790f50 Author: Linus Walleij Date: Wed Jan 9 22:51:44 2019 +0100 mtd: rawnand: fsmc: Keep bank enable bit set Hammering the "bank enable" (PBKEN) bit on and off between every command crashes the Nomadik NHK15 with this message: Scanning device for bad blocks Unhandled fault: external abort on non-linefetch (0x008) at 0xcc95e000 pgd = (ptrval) [cc95e000] *pgd=0b808811, *pte=40000653, *ppte=40000552 Internal error: : 8 [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.20.0-rc2+ #72 Hardware name: Nomadik STn8815 PC is at fsmc_exec_op+0x194/0x204 (...) After a discussion we (me and Boris Brezillon) start to suspect that this bit does not immediately control the chip select line at all, it rather enables access to the bank and the hardware will drive the CS autonomously. If there is a NAND chip connected, we should keep this enabled. As fsmc_nand_setup() sets this bit, we can simply remove the offending code. Fixes: 550b9fc4e3af ("mtd: rawnand: fsmc: Stop implementing ->select_chip()") Signed-off-by: Linus Walleij Acked-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 7939f8beecf1cfb10d255be65bfbd3793fae82a1 Merge: e8746440bf682 8b05a3a7503c2 Author: Linus Torvalds Date: Wed Jan 16 05:28:26 2019 +1200 Merge tag 'trace-v5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Andrea Righi fixed a NULL pointer dereference in trace_kprobe_create() It is possible to trigger a NULL pointer dereference by writing an incorrectly formatted string to the krpobe_events file" * tag 'trace-v5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Fix NULL pointer dereference in trace_kprobe_create() commit e8746440bf68212f19688f1454dad593c74abee1 Merge: fe76fc6aaf538 2f960bd056408 Author: Linus Torvalds Date: Wed Jan 16 05:13:36 2019 +1200 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix regression in multi-SKB responses to RTM_GETADDR, from Arthur Gautier. 2) Fix ipv6 frag parsing in openvswitch, from Yi-Hung Wei. 3) Unbounded recursion in ipv4 and ipv6 GUE tunnels, from Stefano Brivio. 4) Use after free in hns driver, from Yonglong Liu. 5) icmp6_send() needs to handle the case of NULL skb, from Eric Dumazet. 6) Missing rcu read lock in __inet6_bind() when operating on mapped addresses, from David Ahern. 7) Memory leak in tipc-nl_compat_publ_dump(), from Gustavo A. R. Silva. 8) Fix PHY vs r8169 module loading ordering issues, from Heiner Kallweit. 9) Fix bridge vlan memory leak, from Ido Schimmel. 10) Dev refcount leak in AF_PACKET, from Jason Gunthorpe. 11) Infoleak in ipv6_local_error(), flow label isn't completely initialized. From Eric Dumazet. 12) Handle mv88e6390 errata, from Andrew Lunn. 13) Making vhost/vsock CID hashing consistent, from Zha Bin. 14) Fix lack of UMH cleanup when it unexpectedly exits, from Taehee Yoo. 15) Bridge forwarding must clear skb->tstamp, from Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (87 commits) bnxt_en: Fix context memory allocation. bnxt_en: Fix ring checking logic on 57500 chips. mISDN: hfcsusb: Use struct_size() in kzalloc() net: clear skb->tstamp in bridge forwarding path net: bpfilter: disallow to remove bpfilter module while being used net: bpfilter: restart bpfilter_umh when error occurred net: bpfilter: use cleanup callback to release umh_info umh: add exit routine for UMH process isdn: i4l: isdn_tty: Fix some concurrency double-free bugs vhost/vsock: fix vhost vsock cid hashing inconsistent net: stmmac: Prevent RX starvation in stmmac_napi_poll() net: stmmac: Fix the logic of checking if RX Watchdog must be enabled net: stmmac: Check if CBS is supported before configuring net: stmmac: dwxgmac2: Only clear interrupts that are active net: stmmac: Fix PCI module removal leak tools/bpf: fix bpftool map dump with bitfields tools/bpf: test btf bitfield with >=256 struct member offset bpf: fix bpffs bitfield pretty print net: ethernet: mediatek: fix warning in phy_start_aneg tcp: change txhash on SYN-data timeout ... commit 8b05a3a7503c2a982c9c462eae96cfbd59506783 Author: Andrea Righi Date: Fri Jan 11 07:01:13 2019 +0100 tracing/kprobes: Fix NULL pointer dereference in trace_kprobe_create() It is possible to trigger a NULL pointer dereference by writing an incorrectly formatted string to krpobe_events (trying to create a kretprobe omitting the symbol). Example: echo "r:event_1 " >> /sys/kernel/debug/tracing/kprobe_events That triggers this: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 #PF error: [normal kernel read fault] PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 6 PID: 1757 Comm: bash Not tainted 5.0.0-rc1+ #125 Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.5.1 08/09/2018 RIP: 0010:kstrtoull+0x2/0x20 Code: 28 00 00 00 75 17 48 83 c4 18 5b 41 5c 5d c3 b8 ea ff ff ff eb e1 b8 de ff ff ff eb da e8 d6 36 bb ff 66 0f 1f 44 00 00 31 c0 <80> 3f 2b 55 48 89 e5 0f 94 c0 48 01 c7 e8 5c ff ff ff 5d c3 66 2e RSP: 0018:ffffb5d482e57cb8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff82b12720 RDX: ffffb5d482e57cf8 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffb5d482e57d70 R08: ffffa0c05e5a7080 R09: ffffa0c05e003980 R10: 0000000000000000 R11: 0000000040000000 R12: ffffa0c04fe87b08 R13: 0000000000000001 R14: 000000000000000b R15: ffffa0c058d749e1 FS: 00007f137c7f7740(0000) GS:ffffa0c05e580000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000497d46004 CR4: 00000000003606e0 Call Trace: ? trace_kprobe_create+0xb6/0x840 ? _cond_resched+0x19/0x40 ? _cond_resched+0x19/0x40 ? __kmalloc+0x62/0x210 ? argv_split+0x8f/0x140 ? trace_kprobe_create+0x840/0x840 ? trace_kprobe_create+0x840/0x840 create_or_delete_trace_kprobe+0x11/0x30 trace_run_command+0x50/0x90 trace_parse_run_command+0xc1/0x160 probes_write+0x10/0x20 __vfs_write+0x3a/0x1b0 ? apparmor_file_permission+0x1a/0x20 ? security_file_permission+0x31/0xf0 ? _cond_resched+0x19/0x40 vfs_write+0xb1/0x1a0 ksys_write+0x55/0xc0 __x64_sys_write+0x1a/0x20 do_syscall_64+0x5a/0x120 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix by doing the proper argument checks in trace_kprobe_create(). Cc: Ingo Molnar Link: https://lore.kernel.org/lkml/20190111095108.b79a2ee026185cbd62365977@kernel.org Link: http://lkml.kernel.org/r/20190111060113.GA22841@xps-13 Fixes: 6212dd29683e ("tracing/kprobes: Use dyn_event framework for kprobe events") Acked-by: Masami Hiramatsu Signed-off-by: Andrea Righi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 45ac486ecf2dc998e25cf32f0cabf2deaad875be Author: Olga Kornievskaia Date: Fri Jan 11 19:04:44 2019 -0500 NFSv4.2 fix unnecessary retry in nfs4_copy_file_range Currently nfs42_proc_copy_file_range() can not return EAGAIN. Fixes: e4648aa4f98a ("NFS recover from destination server reboot for copies") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 92b0730eaf2d549fdfb10ecc8b71f34b9f472c12 Author: Michel Dänzer Date: Fri Jan 11 16:21:02 2019 +0100 Revert "drm/amdgpu: validate user pitch alignment" The check turned out to be too strict in some cases. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 25ec429e86bb790e40387a550f0501d0ac55a47c Author: Alex Deucher Date: Thu Jan 10 12:16:57 2019 +0100 Revert "drm/amdgpu: validate user GEM object size" It was at the same time too strict (for linear tiling modes, where no height alignment is required) and too lenient (for 2D tiling modes, where height may need to be aligned to values > 8). Acked-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 04906b2f542c23626b0ef6219b808406f8dddbe9 Author: Jan Kara Date: Mon Jan 14 09:48:10 2019 +0100 blockdev: Fix livelocks on loop device bd_set_size() updates also block device's block size. This is somewhat unexpected from its name and at this point, only blkdev_open() uses this functionality. Furthermore, this can result in changing block size under a filesystem mounted on a loop device which leads to livelocks inside __getblk_gfp() like: Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 10863 Comm: syz-executor0 Not tainted 4.18.0-rc5+ #151 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__sanitizer_cov_trace_pc+0x3f/0x50 kernel/kcov.c:106 ... Call Trace: init_page_buffers+0x3e2/0x530 fs/buffer.c:904 grow_dev_page fs/buffer.c:947 [inline] grow_buffers fs/buffer.c:1009 [inline] __getblk_slow fs/buffer.c:1036 [inline] __getblk_gfp+0x906/0xb10 fs/buffer.c:1313 __bread_gfp+0x2d/0x310 fs/buffer.c:1347 sb_bread include/linux/buffer_head.h:307 [inline] fat12_ent_bread+0x14e/0x3d0 fs/fat/fatent.c:75 fat_ent_read_block fs/fat/fatent.c:441 [inline] fat_alloc_clusters+0x8ce/0x16e0 fs/fat/fatent.c:489 fat_add_cluster+0x7a/0x150 fs/fat/inode.c:101 __fat_get_block fs/fat/inode.c:148 [inline] ... Trivial reproducer for the problem looks like: truncate -s 1G /tmp/image losetup /dev/loop0 /tmp/image mkfs.ext4 -b 1024 /dev/loop0 mount -t ext4 /dev/loop0 /mnt losetup -c /dev/loop0 l /mnt Fix the problem by moving initialization of a block device block size into a separate function and call it when needed. Thanks to Tetsuo Handa for help with debugging the problem. Reported-by: syzbot+9933e4476f365f5d5a1b@syzkaller.appspotmail.com Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit c8a83a6b54d0ca078de036aafb3f6af58c1dc5eb Author: Jan Kara Date: Mon Jan 14 09:48:09 2019 +0100 nbd: Use set_blocksize() to set device blocksize NBD can update block device block size implicitely through bd_set_size(). Make it explicitely set blocksize with set_blocksize() as this behavior of bd_set_size() is going away. CC: Josef Bacik Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit ce0210c12433031aba3bbacd75f4c02ab77f2004 Author: Neil Armstrong Date: Mon Jan 14 16:31:18 2019 +0100 drm/meson: Fix atomic mode switching regression Since commit 2bcd3ecab773 when switching mode from X11 (ubuntu mate for example) the display gets blurry, looking like an invalid framebuffer width. This commit fixed atomic crtc modesetting in a totally wrong way and introduced a local unnecessary ->enabled crtc state. This commit reverts the crctc _begin() and _enable() changes and simply adds drm_atomic_helper_commit_tail_rpm as helper. Reported-by: Tony McKahan Suggested-by: Daniel Vetter Fixes: 2bcd3ecab773 ("drm/meson: Fixes for drm_crtc_vblank_on/off support") Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter [narmstrong: fixed blank line issue from checkpatch] Link: https://patchwork.freedesktop.org/patch/msgid/20190114153118.8024-1-narmstrong@baylibre.com commit 51b00d8509dc69c98740da2ad07308b630d3eb7d Author: Zhenyu Wang Date: Fri Jan 11 13:58:53 2019 +0800 drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always does from beginning of vGPU aperture. Fixes: 659643f7d814 ("drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT") Cc: "Monroy, Rodrigo Axel" Cc: "Orrala Contreras, Alfredo" Cc: stable@vger.kernel.org # v4.10+ Reviewed-by: Hang Yuan Signed-off-by: Zhenyu Wang commit 7bea7ac0ca0121798f3618d16201ca4dc4e67a00 Author: Michael Ellerman Date: Tue Jan 15 17:37:28 2019 +1100 powerpc/syscalls: Fix syscall tracing Recently in commit fbf508da7440 ("powerpc: split compat syscall table out from native table") we changed the layout of the system call table. Instead of having two entries for each syscall number, one for the regular entry point and one for the compat entry point, we now have separate tables for regular and compat entry points. This inadvertently broke syscall tracing (CONFIG_FTRACE_SYSCALLS), because our implementation of arch_syscall_addr() knew about the layout of the table (it did nr * 2). We can fix it just by dropping our version of arch_syscall_addr() and using the generic version which does: return (unsigned long)sys_call_table[nr]; Fixes: fbf508da7440 ("powerpc: split compat syscall table out from native table") Signed-off-by: Michael Ellerman commit 6c2d0f9976ad19eca6d03dad5d726f8eff848b70 Author: Hang Yuan Date: Mon Jan 14 18:43:39 2019 +0800 drm/i915/gvt: free VFIO region space in vgpu detach VFIO region space is allocated when one region is registered for one vgpu. So free the space when destroy the vgpu. Also change the parameter of detach_vgpu callback to use vgpu directly. Fixes: b851adeac0858c7d257b3 ("drm/i915/gvt: Add opregion support") Reviewed-by: Zhenyu Wang Signed-off-by: Hang Yuan Signed-off-by: Zhenyu Wang commit da727097a482a93645ba5beea8d389ebab11fc64 Author: Jason A. Donenfeld Date: Mon Jan 14 16:47:45 2019 -0800 powerpc/pseries: Fix build break due to pnv_npu2_init() Commit 3be2df00e299 ("powerpc/pseries/npu: Enable platform support") added a call to pnv_npu2_init() in pseries code. This causes a build break if we build with CONFIG_PPC_PSERIES && !CONFIG_PPC_POWERNV: powerpc64le-pc-linux-gnu-ld: arch/powerpc/platforms/pseries/pci.o: in function `pSeries_final_fixup': pci.c:(.init.text+0x1b0): undefined reference to `pnv_npu2_init' This commit therefore wraps that line in an ifdef, so that pseries builds without powernv. Fixes: 3be2df00e299 ("powerpc/pseries/npu: Enable platform support") Signed-off-by: Jason A. Donenfeld Reviewed-by: Alexey Kardashevskiy [mpe: Frob change log a bit to blame a different commit] Signed-off-by: Michael Ellerman commit f29fd331aa055fbeb5a496b4af937b7952111b6b Author: Vitor Soares Date: Thu Jan 10 16:34:59 2019 +0100 i3c: master: dw-i3c-master: fix i3c_attach/reattach This patch fix i3c_attach/reattach functions. During the i3c_attach the driver ignores the static address used for SETDASA CCC command. During the i3c_reattach the driver doesn't update master->addrs[data->index] with new address if old_dyn_addr = 0. Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Vitor Soares Signed-off-by: Boris Brezillon commit fe76fc6aaf538df27708ffa3e5d549a6c8e16142 Author: Ming Lei Date: Tue Jan 15 11:59:52 2019 +0800 sbitmap: Protect swap_lock from hardirq Because we may call blk_mq_get_driver_tag() directly from blk_mq_dispatch_rq_list() without holding any lock, then HARDIRQ may come and the above DEADLOCK is triggered. Commit ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq") tries to fix this issue by using 'spin_lock_bh', which isn't enough because we complete request from hardirq context direclty in case of multiqueue. Cc: Clark Williams Fixes: ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq") Cc: Jens Axboe Cc: Ming Lei Cc: Guenter Roeck Cc: Steven Rostedt (VMware) Signed-off-by: Ming Lei Signed-off-by: Linus Torvalds commit b4fe30e45a660efa8f122070fc7173715d0e1d00 Author: Wei Yang Date: Tue Jan 15 11:09:46 2019 +0800 acpi/nfit: Remove duplicate set nd_set in acpi_nfit_init_interleave_set() We allocate nd_set in acpi_nfit_init_interleave_set() and assignn it to ndr_desc, while the assignment is done twice in this function. This patch removes the first assignment. No functional change. Signed-off-by: Wei Yang Signed-off-by: Dan Williams commit 8e5dadfe76cf2862ebf3e4f22adef29982df7766 Author: Bijan Mottahedeh Date: Mon Dec 3 16:48:23 2018 -0800 vhost/scsi: Use copy_to_iter() to send control queue response Uses copy_to_iter() instead of __copy_to_user() in order to ensure we support arbitrary layouts and an input buffer split across iov entries. Fixes: 0d02dbd68c47b ("vhost/scsi: Respond to control queue operations") Signed-off-by: Bijan Mottahedeh Signed-off-by: Michael S. Tsirkin commit 74ad7419489ddade8044e3c9ab064ad656520306 Author: Pavel Tikhomirov Date: Thu Dec 13 17:53:50 2018 +0300 vhost: return EINVAL if iovecs size does not match the message size We've failed to copy and process vhost_iotlb_msg so let userspace at least know about it. For instance before these patch the code below runs without any error: int main() { struct vhost_msg msg; struct iovec iov; int fd; fd = open("/dev/vhost-net", O_RDWR); if (fd == -1) { perror("open"); return 1; } iov.iov_base = &msg; iov.iov_len = sizeof(msg)-4; if (writev(fd, &iov,1) == -1) { perror("writev"); return 1; } return 0; } Signed-off-by: Pavel Tikhomirov Signed-off-by: Michael S. Tsirkin commit bf4dc0b2beebfd9338df7c0bcf473b356f67cf66 Author: Wei Wang Date: Mon Jan 7 15:01:04 2019 +0800 virtio-balloon: tweak config_changed implementation virtio-ccw has deadlock issues with reading the config space inside the interrupt context, so we tweak the virtballoon_changed implementation by moving the config read operations into the related workqueue contexts. The config_read_bitmap is used as a flag to the workqueue callbacks about the related config fields that need to be read. The cmd_id_received is also renamed to cmd_id_received_cache, and the value should be obtained via virtio_balloon_cmd_id_received. Reported-by: Christian Borntraeger Signed-off-by: Wei Wang Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic Signed-off-by: Michael S. Tsirkin Cc: stable@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Tested-by: Christian Borntraeger commit a229989d975eb926076307c1f2f5e4c6111768e7 Author: Wei Wang Date: Fri Dec 28 10:26:26 2018 +0800 virtio: don't allocate vqs when names[i] = NULL Some vqs may not need to be allocated when their related feature bits are disabled. So callers may pass in such vqs with "names = NULL". Then we skip such vq allocations. Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin Signed-off-by: Wei Wang Signed-off-by: Wei Wang Reviewed-by: Cornelia Huck Cc: stable@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") commit ddbeac07a39a81d82331a312d0578fab94fccbf1 Author: Wei Wang Date: Fri Dec 28 10:26:25 2018 +0800 virtio_pci: use queue idx instead of array idx to set up the vq When find_vqs, there will be no vq[i] allocation if its corresponding names[i] is NULL. For example, the caller may pass in names[i] (i=4) with names[2] being NULL because the related feature bit is turned off, so technically there are 3 queues on the device, and name[4] should correspond to the 3rd queue on the device. So we use queue_idx as the queue index, which is increased only when the queue exists. Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin Signed-off-by: Wei Wang Signed-off-by: Wei Wang commit d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263 Author: Cornelia Huck Date: Thu Jan 3 17:08:04 2019 +0100 virtio: document virtio_config_ops restrictions Some transports (e.g. virtio-ccw) implement virtio operations that seem to be a simple read/write as something more involved that cannot be done from an atomic context. Give at least a hint about that. Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin commit b89a07c4373b27321b1f6d4b4fdc369fd45ef79d Author: Cornelia Huck Date: Thu Jan 3 17:08:03 2019 +0100 virtio: fix virtio_config_ops description - get_features has returned 64 bits since commit d025477368792 ("virtio: add support for 64 bit features.") - properly mark all optional callbacks Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin Reviewed-by: Halil Pasic commit 2e8cb2cf1bd6e90f58bd517eb9ca1938e64fa51c Author: Rob Herring Date: Mon Jan 14 15:35:46 2019 -0600 PCI: Fix PCI kconfig menu organization After commit eb01d42a7778 ("PCI: consolidate PCI config entry in drivers/pci"), all the PCI kconfig options appear below "PCI support" rather than within a sub-menu. This is because menuconfig expects all kconfig entries to be enclosed in an if/endif section. Add the missing if/endif. With this, "depends on PCI" is redundant in the sub-menu entries and can be removed. Fixes: eb01d42a7778 ("PCI: consolidate PCI config entry in drivers/pci") Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit 7151449fe7fa5962c6153355f9779d6be99e8e97 Author: Mark Zhang Date: Mon Jan 14 17:32:58 2019 +0800 regmap-irq: do not write mask register if mask_base is zero If client have not provided the mask base register then do not write into the mask register. Signed-off-by: Laxman Dewangan Signed-off-by: Jinyoung Park Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Zhang Signed-off-by: Mark Brown commit 8a644c64a9f1aefb99fdc4413e6b7fee17809e38 Author: Aurelien Jarno Date: Sat Jan 12 20:37:28 2019 +0100 MIPS: OCTEON: fix kexec support Commit 62cac480f33f ("MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs") broke the build of the OCTEON platform as the relocated_kexec_smp_wait() is now static and not longer exported in kexec.h. Replace it by kexec_reboot() like it has been done in other places. Fixes: 62cac480f33f ("MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs") Signed-off-by: Aurelien Jarno Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Dengcheng Zhu Cc: ralf@linux-mips.org Cc: stable@vger.kernel.org # 4.20+ commit d6f4a21f309dfe10a5693ad236358dd6fcc46f7a Author: Jason Gunthorpe Date: Fri Jan 11 08:21:44 2019 +0200 RDMA/uverbs: Mark ioctl responses with UVERBS_ATTR_F_VALID_OUTPUT When the ioctl interface for the write commands was introduced it did not mark the core response with UVERBS_ATTR_F_VALID_OUTPUT. This causes rdma-core in userspace to not mark the buffers as written for valgrind. Along the same lines it turns out we have always missed marking the driver data. Fixing both of these makes valgrind work properly with rdma-core and ioctl. Fixes: 4785860e04bc ("RDMA/uverbs: Implement an ioctl that can call write and write_ex handlers") Signed-off-by: Jason Gunthorpe Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky commit ae1cf20df7a9c60ff5ef41c3315c33c1a5fafd77 Author: Nicholas Kazlauskas Date: Tue Dec 11 12:35:56 2018 -0500 drm/amd/display: Fix disabled cursor on top screen edge [Why] The cursor vanishes when touching the top of edge of the screen for Raven on Linux. This occurs because the cursor height is not taken into account when deciding to disable the cursor. [How] Factor in the cursor height into the cursor calculations - and mimic the existing x position calculations. Fixes: 94a4ffd1d40b ("drm/amd/display: fix PIP bugs on Dal3") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit f5c412ac596fbe1508514257fef3d48e263f40a7 Author: Roman Li Date: Wed Dec 19 09:24:06 2018 -0500 drm/amd/display: fix warning on raven hotplug [Why] Hotplug on raven results in REG_WAIT_TIMEOUT warning due to failing attempt to lock disabled otg for the hubp interdependent pipes programming. [How] Don't setup pipe interdependencies for disabled otg. Also removed the unnecessary duplicate logic checks. Signed-off-by: Roman Li Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 20300db4aec5ba5edf6f0ad6f7111a51fbea7e10 Author: Charlene Liu Date: Wed Dec 12 18:09:16 2018 -0500 drm/amd/display: fix PME notification not working in RV desktop [Why] PPLIB not receive the PME when unplug. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit dddce8b490051018f8d5d1457af47483064c7e09 Author: Nicholas Kazlauskas Date: Thu Jan 10 15:12:48 2019 -0500 drm/amd/display: Only get the connector state for VRR when toggled [Why] This fixes a stuttering issue that occurs when moving a hardware cursor when VRR is enabled. Previously when VRR is enabled atomic check will grab the connector state for every atomic update. This has to lock the connector in order to do so. The locking is bad enough by itself for performance, but it gets worse with what we do just below that - add all the planes for the CRTC to the commit. This prevents the cursor fast path from working - there's more than one plane now. With state->allow_modeset = true on top of this, it also adds and removes all the planes from the DC context triggering a full (very slow) update in DC. [How] We need the connector state to get the VRR min/max capbilities, but we only need them when there's a CRTC mode change or when VRR is toggled. The condition has been updated accordingly. Fixes: 3cc22f281318 ("drm/amdgpu: Set FreeSync state using drm VRR properties") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 099139bef026faefebc508ddb77d397cf55f1b15 Author: Josip Pavic Date: Tue Dec 11 15:13:08 2018 -0500 drm/amd/display: Pack DMCU iRAM alignment [Why] When the DMCU's iRAM definition was moved to the newly created power_helpers, a #pragma pack was lost, causing the iRAM to be misaligned [How] Restore the #pragma pack Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit a29b01a1313d20a6d45c0f25858f31701cee625d Author: Kenneth Feng Date: Wed Jan 9 14:39:48 2019 +0800 drm/amd/powerplay: run acg btc for Vega12 acg btc was added to Vega12 Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bbdf514fe5648566b0754476cbcb92ac3422dde2 Author: Felix Kuehling Date: Wed Jan 2 17:47:39 2019 -0500 drm/amdkfd: Don't assign dGPUs to APU topology devices dGPUs need their own topology devices. Don't assign them to APU topology devices with CPU cores. Bug: https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/issues/66 Signed-off-by: Felix Kuehling Tested-by: Elias Konstantinidis Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d1c234e2cd1091b816c990a1848d88a8697f97b4 Author: Felix Kuehling Date: Wed Jan 2 14:52:13 2019 -0500 drm/amdkfd: Allow building KFD on ARM64 (v2) ifdef x86_64 specific code. Allow enabling CONFIG_HSA_AMD on ARM64. v2: Fixed a compiler warning due to an unused variable CC: Mark Nutter Signed-off-by: Felix Kuehling Tested-by: Mark Nutter Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit 3719876809e745b9db5293d418600c194bbf5c23 Author: Steven Rostedt (VMware) Date: Mon Jan 14 12:25:40 2019 -0500 sbitmap: Protect swap_lock from softirqs The swap_lock used by sbitmap has a chain with locks taken from softirq, but the swap_lock is not protected from being preempted by softirqs. A chain exists of: sbq->ws[i].wait -> dispatch_wait_lock -> swap_lock Where the sbq->ws[i].wait lock can be taken from softirq context, which means all locks below it in the chain must also be protected from softirqs. Reported-by: Clark Williams Fixes: 58ab5e32e6fd ("sbitmap: silence bogus lockdep IRQ warning") Fixes: ea86ea2cdced ("sbitmap: amortize cost of clearing bits") Cc: Jens Axboe Cc: Ming Lei Cc: Guenter Roeck Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Linus Torvalds commit c962cb323ec260652cff9331e7bf3d606292db88 Merge: 9deb9e1637761 e3e4767bd550b Author: Linus Torvalds Date: Tue Jan 15 06:26:28 2019 +1200 Merge tag 'gpio-v5.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "The patch hitting the MMC/SD subsystem is fixing up my own mess when moving semantics from MMC/SD over to gpiolib. Ulf is on vacation but I managed to reach him on chat and obtain his ACK. The other two are early-rc fixes that are not super serious but pretty annoying so I'd like to get rid of them. Summary: - Get rid of some WARN_ON() from the ACPI code - Staticize a symbol - Fix MMC polarity detection" * tag 'gpio-v5.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: mmc: core: don't override the CD GPIO level when "cd-inverted" is set gpio: pca953x: Make symbol 'pca953x_i2c_regmap' static gpiolib-acpi: Remove unnecessary WARN_ON from acpi_gpiochip_free_interrupts commit 9deb9e1637761cc4e6df5104a34197ef0bae1358 Merge: 3a73e73a10a79 3f2d347e851ef Author: Linus Torvalds Date: Tue Jan 15 06:24:36 2019 +1200 Merge tag 'mfd-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support - Add support for Power Supply to AXP813 - Add support for GPIO, ADC, AC and Battery Power Supply to AXP803 - Add support for UART to Exynos LPASS Fix-ups: - Use supplied MACROS; ti_am335x_tscadc - Trivial spelling/whitespace/alignment; tmio, axp20x, rave-sp - Regmap changes; bd9571mwv, wm5110-tables - Kconfig dependencies; MFD_AT91_USART - Supply shared data for child-devices; madera-core - Use new of_node_name_eq() API call; max77620, stmpe - Use managed resources (devm_*); tps65218 - Comment descriptions; ingenic-tcu - Coding style; madera-core Bug Fixes: - Fix section mismatches; twl-core, db8500-prcmu - Correct error path related issues; mt6397-core, ab8500-core, mc13xxx-core - IRQ related fixes; tps6586x - Ensure proper initialisation sequence; qcom_rpm - Repair potential memory leak; cros_ec_dev" * tag 'mfd-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (25 commits) mfd: exynos-lpass: Enable UART module support mfd: mc13xxx: Fix a missing check of a register-read failure mfd: cros_ec: Add commands to control codec mfd: madera: Remove spurious semicolon in while loop mfd: rave-sp: Fix typo in rave_sp_checksum comment mfd: ingenic-tcu: Fix bit field description in header mfd: tps65218: Use devm_regmap_add_irq_chip and clean up error path in probe() mfd: Use of_node_name_eq() for node name comparisons mfd: cros_ec_dev: Add missing mfd_remove_devices() call in remove mfd: axp20x: Add supported cells for AXP803 mfd: axp20x: Re-align MFD cell entries mfd: axp20x: Add AC power supply cell for AXP813 mfd: wm5110: Add missing ASRC rate register mfd: qcom_rpm: write fw_version to CTRL_REG mfd: tps6586x: Handle interrupts on suspend mfd: madera: Add shared data for accessory detection mfd: at91-usart: Add platform dependency mfd: bd9571mwv: Add volatile register to make DVFS work mfd: ab8500-core: Return zero in get_register_interruptible() mfd: tmio: Typo s/use use/use/ ... commit 3a73e73a10a791344587103a1adbe0c5f02fedeb Merge: 1c7fc5cbc3398 3cee7a7d05b11 Author: Linus Torvalds Date: Tue Jan 15 06:21:10 2019 +1200 Merge tag 'backlight-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Fix-ups: - Use new of_node_name_eq() API call Bug Fixes: - Internally track 'enabled' state in pwm_bl - Fix auto-generated pwm_bl brightness tables parsed by DT * tag 'backlight-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: 88pm860x_bl: Use of_node_name_eq for node name comparisons backlight: pwm_bl: Fix devicetree parsing with auto-generated brightness tables backlight: pwm_bl: Re-add driver internal enabled tracking commit f672b93e4a0a4947d2e1103ed8780e01e13eadb6 Author: Julia Lawall Date: Sun Jan 13 10:44:51 2019 +0100 drm/meson: add missing of_node_put Add an of_node_put when the result of of_graph_get_remote_port_parent is not available. An of_node_put is also needed when meson_probe_remote completes. This was present at the recursive call, but not in the call from meson_drv_probe. The semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // @r exists@ local idexpression e; expression x; @@ e = of_graph_get_remote_port_parent(...); ... when != x = e when != true e == NULL when != of_node_put(e) when != of_fwnode_handle(e) ( return e; | *return ...; ) // Signed-off-by: Julia Lawall Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1547372691-28324-4-git-send-email-Julia.Lawall@lip6.fr commit 5268c8f39e0efef81af2aaed160272d9eb507beb Author: Talons Lee Date: Mon Dec 10 18:03:00 2018 +0800 always clear the X2APIC_ENABLE bit for PV guest Commit e657fcc clears cpu capability bit instead of using fake cpuid value, the EXTD should always be off for PV guest without depending on cpuid value. So remove the cpuid check in xen_read_msr_safe() to always clear the X2APIC_ENABLE bit. Signed-off-by: Talons Lee Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 6251691a92170d3a781aaf7b5f2c31b50d669809 Author: Marcos Paulo de Souza Date: Mon Jan 14 06:31:56 2019 -0700 md: Make bio_alloc_mddev use bio_alloc_bioset bio_alloc_bioset returns a bio pointer or NULL, so we can avoid storing the returned data into a new variable. Acked-by: Guoqing Jiang Acked-by: Artur Paszkiewicz Signed-off-by: Marcos Paulo de Souza Signed-off-by: Jens Axboe commit 5bf859081f6a7575a3f7509d7a70d0a9baa88ce3 Author: Paolo Valente Date: Thu Dec 6 19:18:19 2018 +0100 block, bfq: fix comments on __bfq_deactivate_entity Comments on function __bfq_deactivate_entity contains two imprecise or wrong statements: 1) The function performs the deactivation of the entity. 2) The function must be invoked only if the entity is on a service tree. This commits replaces both statements with the correct ones: 1) The functions updates sched_data and service trees for the entity, so as to represent entity as inactive (which is only part of the steps needed for the deactivation of the entity). 2) The function must be invoked on every entity being deactivated. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 2314e879747e82896f51cce4488f6a00f3e1af7b Author: Henry Yen Date: Mon Jan 14 17:59:43 2019 +0800 netfilter: nft_flow_offload: fix checking method of conntrack helper This patch uses nfct_help() to detect whether an established connection needs conntrack helper instead of using test_bit(IPS_HELPER_BIT, &ct->status). The reason is that IPS_HELPER_BIT is only set when using explicit CT target. However, in the case that a device enables conntrack helper via command "echo 1 > /proc/sys/net/netfilter/nf_conntrack_helper", the status of IPS_HELPER_BIT will not present any change, and consequently it loses the checking ability in the context. Signed-off-by: Henry Yen Reviewed-by: Ryder Lee Tested-by: John Crispin Signed-off-by: Pablo Neira Ayuso commit b318e3ff7ca065d6b107e424c85a63d7a6798a69 Author: Gerd Hoffmann Date: Thu Jan 10 12:15:45 2019 +0100 drm/virtio: drop prime import/export callbacks Also set prime_handle_to_fd and prime_fd_to_handle to NULL, so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to userspace. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20190110111545.26768-1-kraxel@redhat.com commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8 Author: Gerd Hoffmann Date: Thu Jan 10 09:17:50 2019 +0100 drm/qxl: drop prime import/export callbacks Also set prime_handle_to_fd and prime_fd_to_handle to NULL, so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to userspace. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20190110081750.11358-1-kraxel@redhat.com commit ba0a64bcf8fc491f73e4646069d97abb4374beb3 Author: Colin Xu Date: Fri Jan 11 14:25:54 2019 +0800 drm/i915/gvt: Allow F_CMD_ACCESS on mmio 0x21f0 The newly updated guest driver could program 0x21f0 via lri and srm, without F_CMD_ACCESS flag cmd parser will stop parser reset cmd. 0x21f0 applies to BDW, SKL, KBL, BXT and CFL. Reviewed-by: Yan Zhao Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang commit bd352a739fde9834d48379e8eca428fe897144ac Author: Masahiro Yamada Date: Mon Jan 14 12:16:45 2019 +0900 kbuild: remove unused baseprereq Commit eea199b445f6 ("kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX") removed the last users of this macro. Signed-off-by: Masahiro Yamada commit 16fd20aa98080c2fa666dc384036ec08c80af710 Author: Paul Burton Date: Fri Jan 11 19:06:44 2019 +0000 kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7 When building using GCC 4.7 or older, -ffunction-sections & the -pg flag used by ftrace are incompatible. This causes warnings or build failures (where -Werror applies) such as the following: arch/mips/generic/init.c: error: -ffunction-sections disabled; it makes profiling impossible This used to be taken into account by the ordering of calls to cc-option from within the top-level Makefile, which was introduced by commit 90ad4052e85c ("kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7"). Unfortunately this was broken when the CONFIG_LD_DEAD_CODE_DATA_ELIMINATION cc-option check was moved to Kconfig in commit e85d1d65cd8a ("kbuild: test dead code/data elimination support in Kconfig"), because the flags used by this check no longer include -pg. Fix this by not allowing CONFIG_LD_DEAD_CODE_DATA_ELIMINATION to be enabled at the same time as ftrace/CONFIG_FUNCTION_TRACER when building using GCC 4.7 or older. Signed-off-by: Paul Burton Fixes: e85d1d65cd8a ("kbuild: test dead code/data elimination support in Kconfig") Reported-by: Geert Uytterhoeven Cc: Nicholas Piggin Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Masahiro Yamada commit 2648ca1859bb48cacdbbaf60bbc0bfef74f13330 Author: Masahiro Yamada Date: Fri Jan 11 11:51:48 2019 +0900 kconfig: clean generated *conf-cfg files I accidentally dropped '*' in the previous renaming patch. Revive it so that 'make mrproper' can clean the generated files. Fixes: d86271af6460 ("kconfig: rename generated .*conf-cfg to *conf-cfg") Signed-off-by: Masahiro Yamada commit 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8 Author: Linus Torvalds Date: Mon Jan 14 10:41:12 2019 +1200 Linux 5.0-rc2 commit b7285b425318331c2de4af2a784a18e6dccef484 Author: Jonathan Neuschäfer Date: Sat Jan 12 18:14:30 2019 +0100 kernel/sys.c: Clarify that UNAME26 does not generate unique versions anymore UNAME26 is a mechanism to report Linux's version as 2.6.x, for compatibility with old/broken software. Due to the way it is implemented, it would have to be updated after 5.0, to keep the resulting versions unique. Linus Torvalds argued: "Do we actually need this? I'd rather let it bitrot, and just let it return random versions. It will just start again at 2.4.60, won't it? Anybody who uses UNAME26 for a 5.x kernel might as well think it's still 4.x. The user space is so old that it can't possibly care about differences between 4.x and 5.x, can it? The only thing that matters is that it shows "2.4.", which it will do regardless" Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Torvalds commit dbc3c09b819f2bd42460b148e55ac5a9d83aaeaf Merge: 6b529fb0a3eab 465612178b448 Author: Linus Torvalds Date: Mon Jan 14 10:34:14 2019 +1200 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A bigger batch than I anticipated this week, for two reasons: - Some fallout on Davinci from board file -> DTB conversion, that also includes a few longer-standing fixes (i.e. not recent regressions). - drivers/reset material that has been in linux-next for a while, but didn't get sent to us until now for a variety of reasons (maintainer out sick, holidays, etc). There's a functional dependency in there such that one platform (Altera's SoCFPGA) won't boot without one of the patches; instead of reverting the patch that got merged, I looked at this set and decided it was small enough that I'll pick it up anyway. If you disagree I can revisit with a smaller set. That being said, there's also a handful of the usual stuff: - Fix for a crash on Armada 7K/8K when the kernel touches PSCI-reserved memory - Fix for PCIe reset on Macchiatobin (Armada 8K development board, what this email is sent from in fact :) - Enable a few new-merged modules for Amlogic in arm64 defconfig - Error path fixes on Integrator - Build fix for Renesas and Qualcomm - Initialization fix for Renesas RZ/G2E .. plus a few more fixlets" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits) ARM: integrator: impd1: use struct_size() in devm_kzalloc() qcom-scm: Include header gpio: pl061: handle failed allocations ARM: dts: kirkwood: Fix polarity of GPIO fan lines arm64: dts: marvell: mcbin: fix PCIe reset signal arm64: dts: marvell: armada-ap806: reserve PSCI area ARM: dts: da850-lcdk: Correct the sound card name ARM: dts: da850-lcdk: Correct the audio codec regulators ARM: dts: da850-evm: Correct the sound card name ARM: dts: da850-evm: Correct the audio codec regulators ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries ARM: davinci: dm355-evm: fix label names in GPIO lookup entries ARM: davinci: da850-evm: fix label names in GPIO lookup entries ARM: davinci: da830-evm: fix label names in GPIO lookup entries arm64: defconfig: enable modules for amlogic s400 sound card reset: uniphier-glue: Add AHCI reset control support in glue layer dt-bindings: reset: uniphier: Add AHCI core reset description reset: uniphier-usb3: Rename to reset-uniphier-glue dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals ... commit a17ce9960b3628b9f546c454741a1cad551d5695 Author: Julia Lawall Date: Sun Jan 13 09:47:43 2019 +0100 drm/rockchip: add missing of_node_put The device node iterators perform an of_node_get on each iteration, so a jump out of the loop requires an of_node_put. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; iterator name for_each_child_of_node; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Fixes: 1f0f01515172 ("drm/rockchip: Add support for Rockchip Soc RGB output interface") Cc: stable@vger.kernel.org Signed-off-by: Julia Lawall [added fixes and cc-stable] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1547369264-24831-4-git-send-email-Julia.Lawall@lip6.fr commit 6b529fb0a3eabf9c4cc3e94c11477250379ce6d8 Merge: 72d657dd21158 1b3922a8bc742 Author: Linus Torvalds Date: Mon Jan 14 05:55:51 2019 +1200 Merge tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - two regression fixes in clone/dedupe ioctls, the generic check callback needs to lock extents properly and wait for io to avoid problems with writeback and relocation - fix deadlock when using free space tree due to block group creation - a recently added check refuses a valid fileystem with seeding device, make that work again with a quickfix, proper solution needs more intrusive changes * tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: Use real device structure to verify dev extent Btrfs: fix deadlock when using free space tree due to block group creation Btrfs: fix race between reflink/dedupe and relocation Btrfs: fix race between cloning range ending at eof and writeback commit 72d657dd2115804b93bde4b77e426cc2de70eebf Merge: f7c1038bc7597 735df0ff6ece7 Author: Linus Torvalds Date: Mon Jan 14 05:51:08 2019 +1200 Merge tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here is one small sysfs change, and a documentation update for 5.0-rc2 The sysfs change moves from using BUG_ON to WARN_ON, as discussed in an email thread on lkml while trying to track down another driver bug. sysfs should not be crashing and preventing people from seeing where they went wrong. Now it properly recovers and warns the developer. The documentation update removes the use of BUS_ATTR() as the kernel is moving away from this to use the specific BUS_ATTR_RW() and friends instead. There are pending patches in all of the different subsystems to remove the last users of this macro, but for now, don't advertise it should be used anymore to keep new ones from being introduced. Both have been in linux-next with no reported issues" * tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: driver core: remove use of BUS_ATTR sysfs: convert BUG_ON to WARN_ON commit f7c1038bc7597af5d6809c5b3e0352627cef5c07 Merge: 437e878a6c480 06382deac2b8a Author: Linus Torvalds Date: Mon Jan 14 05:49:35 2019 +1200 Merge tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some small staging driver fixes for some reported issues. One reverts a patch that was made to the rtl8723bs driver that turned out to not be needed at all as it was a bug in clang. The others fix up some reported issues in the rtl8188eu driver and update the MAINTAINERS file to point to Larry for this driver so he can get the bug reports easier. All have been in linux-next with no reported issues" * tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Revert "staging: rtl8723bs: Mark ACPI table declaration as used" staging: rtl8188eu: Fix module loading from tasklet for WEP encryption staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption MAINTAINERS: Add entry for staging driver r8188eu commit 437e878a6c48028273e4b06be7e09d235b189e62 Merge: 1dd8a3f6c6197 d3736d82e8169 Author: Linus Torvalds Date: Mon Jan 14 05:47:48 2019 +1200 Merge tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are 2 tty and serial fixes for 5.0-rc2 that resolve some reported issues. The first is a simple serial driver fix for a regression that showed up in 5.0-rc1. The second one resolves a number of reported issues with the recent tty locking fixes that went into 5.0-rc1. Lots of people have tested the second one and say it resolves their issues. Both have been in linux-next with no reported issues" * tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Don't hold ldisc lock in tty_reopen() if ldisc present serial: lantiq: Do not swap register read/writes commit 1dd8a3f6c619723ab442d6a27247d2f2153f3b11 Merge: 0f9d140a56653 b9fcb0e6b7052 Author: Linus Torvalds Date: Mon Jan 14 05:45:28 2019 +1200 Merge tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes and quirk updates for 5.0-rc2. The majority here are some quirks for some storage devices to get them to work properly. There's also a fix here to resolve the reported issues with some audio devices that say they are UAC3 compliant, but really are not. And a fix up for the MAINTAINERS file to remove a dead url. All have been in linux-next with no reported issues" * tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: storage: Remove outdated URL from MAINTAINERS USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB usbcore: Select only first configuration for non-UAC3 compliant devices USB: storage: add quirk for SMI SM3350 USB: storage: don't insert sane sense for SPC3+ when bad sense specified usb: cdc-acm: send ZLP for Telit 3G Intel based modems commit 0f9d140a566532175b4555401ee47ed58b01f9c9 Merge: e1706720408e7 48d2ba6257013 Author: Linus Torvalds Date: Mon Jan 14 05:43:40 2019 +1200 Merge tag '5.0-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "A set of cifs/smb3 fixes, 4 for stable, most from Pavel. His patches fix an important set of crediting (flow control) problems, and also two problems in cifs_writepages, ddressing some large i/o and also compounding issues" * tag '5.0-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number CIFS: Fix error paths in writeback code CIFS: Move credit processing to mid callbacks for SMB3 CIFS: Fix credits calculation for cancelled requests cifs: Fix potential OOB access of lock element array cifs: Limit memory used by lock request calls to a page cifs: move large array from stack to heap CIFS: Do not hide EINTR after sending network packets CIFS: Fix credit computation for compounded requests CIFS: Do not set credits to 1 if the server didn't grant anything CIFS: Fix adjustment of credits for MTU requests cifs: Fix a tiny potential memory leak cifs: Fix a debug message commit 465612178b44840b2066e62c3bcfae80862011d4 Merge: 56acb3ef76177 d0c2d2101b4c1 Author: Olof Johansson Date: Sat Jan 12 22:06:54 2019 -0800 Merge tag 'reset-for-5.0-rc2' of git://git.pengutronix.de/git/pza/linux into fixes Late reset controller changes for v5.0 This adds missing deassert functionality to the ARC HSDK reset driver, fixes some indentation and grammar issues in the kernel docs, adds a helper to count the number of resets on a device for the non-DT case as well, adds an early reset driver for SoCFPGA and simple reset driver support for Stratix10, and generalizes the uniphier USB3 glue layer reset to also cover AHCI. * tag 'reset-for-5.0-rc2' of git://git.pengutronix.de/git/pza/linux: reset: uniphier-glue: Add AHCI reset control support in glue layer dt-bindings: reset: uniphier: Add AHCI core reset description reset: uniphier-usb3: Rename to reset-uniphier-glue dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals ARM: socfpga: dts: document "altr,stratix10-rst-mgr" binding reset: socfpga: add an early reset driver for SoCFPGA reset: fix null pointer dereference on dev by dev_name reset: Add reset_control_get_count() reset: Improve reset controller kernel docs ARC: HSDK: improve reset driver Signed-off-by: Olof Johansson commit 56acb3ef76177a5aabe6613bf27348d34f1e65c0 Merge: 2ec472edcd729 b5f034845e709 Author: Olof Johansson Date: Sat Jan 12 22:03:59 2019 -0800 Merge tag 'mvebu-fixes-5.0-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 5.0 They are all device tree fixes which also worth being in stable: - Reserve PSCI area on Armada 7K/8K preventing the kernel accessing this area and crashing while doing it. - Use correct PCIe reset signal on MACCHIATOBin (Armada 8040 based) - Fix polarity of GPIO fan line D-Link DNS NASes(kikwood based) * tag 'mvebu-fixes-5.0-1' of git://git.infradead.org/linux-mvebu: ARM: dts: kirkwood: Fix polarity of GPIO fan lines arm64: dts: marvell: mcbin: fix PCIe reset signal arm64: dts: marvell: armada-ap806: reserve PSCI area Signed-off-by: Olof Johansson commit 2ec472edcd72947b031ec998d646dd7a6be958dd Merge: 431a8b73de584 21face6f0d4d0 Author: Olof Johansson Date: Sat Jan 12 22:03:18 2019 -0800 Merge tag 'integrator-fixes-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into fixes Fixes for the Integrator: - Handle failed allocations in the IM/PC bus attachment. - Use struct_size() for allocation. * tag 'integrator-fixes-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: integrator: impd1: use struct_size() in devm_kzalloc() gpio: pl061: handle failed allocations Signed-off-by: Olof Johansson commit 431a8b73de58448227515767c757cb6731ab5854 Merge: f4f8aa6de35a8 19a220dd1e8a1 Author: Olof Johansson Date: Sat Jan 12 22:02:28 2019 -0800 Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Amlogic DT fixes for v5.0-rc - arm64: defconfig: enable modules for amlogic s400 sound card * tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: defconfig: enable modules for amlogic s400 sound card Signed-off-by: Olof Johansson commit f4f8aa6de35a86c2207fca0f4c48542ce4ef9e14 Merge: 98a5f673119b9 2076607a20bd4 Author: Olof Johansson Date: Sat Jan 12 22:01:49 2019 -0800 Merge tag 'qcom-fixes-for-5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes Qualcomm Driver Fixes for 5.0-rc1 * Add required includes into qcom_scm.h * tag 'qcom-fixes-for-5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: qcom-scm: Include header Signed-off-by: Olof Johansson commit 98a5f673119b918272894fe3fecf5136fe786e13 Merge: 70bf439a9492e c25748acc5c20 Author: Olof Johansson Date: Sat Jan 12 22:00:36 2019 -0800 Merge tag 'davinci-fixes-for-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes This pull request fixes some more regressions on legacy DaVinci board support due to GPIO driver clean-up introduced in v4.20 kernel. These are marked for stable. Also has fixes for some long standing Audio issues on DA850 boards. * tag 'davinci-fixes-for-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: Correct the sound card name ARM: dts: da850-lcdk: Correct the audio codec regulators ARM: dts: da850-evm: Correct the sound card name ARM: dts: da850-evm: Correct the audio codec regulators ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries ARM: davinci: dm355-evm: fix label names in GPIO lookup entries ARM: davinci: da850-evm: fix label names in GPIO lookup entries ARM: davinci: da830-evm: fix label names in GPIO lookup entries Signed-off-by: Olof Johansson commit 70bf439a9492e7687bf2b9e8576f609160b21200 Merge: bfeffd1552837 a64597227d0de Author: Olof Johansson Date: Sat Jan 12 21:59:42 2019 -0800 Merge tag 'renesas-fixes-for-v5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC Fixes for v5.0 Renesas SoCs: * Fix build regressions caused by move of Kconfig symbols RZ/G2E (r8a774c0) SoC: * Correct initialization order of 3DG-{A,B} in SYSC driver * tag 'renesas-fixes-for-v5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} ARM: shmobile: fix build regressions Signed-off-by: Olof Johansson commit e1706720408e72fb883f6b151c2b3b23d8e7e5b2 Author: John Hubbard Date: Sat Jan 12 17:29:09 2019 -0800 phy: fix build breakage: add PHY_MODE_SATA Commit 49e54187ae0b ("ata: libahci_platform: comply to PHY framework") uses the PHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git. Also, there is a potentially conflicting (mis-named) PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver. Fix the build by: 1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts: PHY_BERLIN_MODE_SATA. 2) Adding the missing enum, which was going to be added anyway as part of [1]. [1] https://lkml.kernel.org/r/20190108163124.6409-3-miquel.raynal@bootlin.com Fixes: 49e54187ae0b ("ata: libahci_platform: comply to PHY framework") Signed-off-by: John Hubbard Acked-by: Jens Axboe Acked-by: Olof Johansson Cc: Grzegorz Jaszczyk Cc: Miquel Raynal Cc: Hans de Goede Signed-off-by: Linus Torvalds commit b8c3b8992ff2827482ac1543f84f5024a72c4f2e Merge: 66c56cfa64d9d bde0b5c109e8b Author: Linus Torvalds Date: Sat Jan 12 13:40:51 2019 -0800 Merge tag 'for-linus-20190112' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Christoph, with little fixes all over the map - Loop caching fix for offset/bs change (Jaegeuk Kim) - Block documentation tweaks (Jeff, Jon, Weiping, John) - null_blk zoned tweak (John) - ahch mvebu suspend/resume support. Should have gone into the merge window, but there was some confusion on which tree had it. (Miquel) * tag 'for-linus-20190112' of git://git.kernel.dk/linux-block: (22 commits) ata: ahci: mvebu: request PHY suspend/resume for Armada 3700 ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs ata: ahci: mvebu: remove stale comment ata: libahci_platform: comply to PHY framework loop: drop caches if offset or block_size are changed block: fix kerneldoc comment for blk_attempt_plug_merge() nvme: don't initlialize ctrl->cntlid twice nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN nvme: pad fake subsys NQN vid and ssvid with zeros nvme-multipath: zero out ANA log buffer nvme-fabrics: unset write/poll queues for discovery controllers nvme-tcp: don't ask if controller is fabrics nvme-tcp: remove dead code nvme-pci: fix out of bounds access in nvme_cqe_pending nvme-pci: rerun irq setup on IO queue init errors nvme-pci: use the same attributes when freeing host_mem_desc_bufs. nvme-pci: fix the wrong setting of nr_maps block: doc: add slice_idle_us to bfq documentation block: clarify documentation for blk_{start|finish}_plug ... commit 66c56cfa64d9dbb9efa8a06c1aece77e8d57ea19 Merge: 473348891c36f dfd32cad146e3 Author: Linus Torvalds Date: Sat Jan 12 10:52:40 2019 -0800 Merge tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping Pull dma_zalloc_coherent() removal from Christoph Hellwig: "We've always had a weird situation around dma_zalloc_coherent. To safely support mapping the allocations to userspace major architectures like x86 and arm have always zeroed allocations from dma_alloc_coherent, but a couple other architectures were missing that zeroing either always or in corner cases. Then later we grew anothe dma_zalloc_coherent interface to explicitly request zeroing, but that just added __GFP_ZERO to the allocation flags, which for some allocators that didn't end up using the page allocator ended up being a no-op and still not zeroing the allocations. So for this merge window I fixed up all remaining architectures to zero the memory in dma_alloc_coherent, and made dma_zalloc_coherent a no-op wrapper around dma_alloc_coherent, which fixes all of the above issues. dma_zalloc_coherent is now pointless and can go away, and Luis helped me writing a cocchinelle script and patch series to kill it, which I think we should apply now just after -rc1 to finally settle these issue" * tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: remove dma_zalloc_coherent() cross-tree: phase out dma_zalloc_coherent() on headers cross-tree: phase out dma_zalloc_coherent() commit 2f960bd0564081ff85d2eea54890b0d2356934f8 Merge: 8d008e64a2ebe 6ef982dec7eda Author: David S. Miller Date: Sat Jan 12 10:51:39 2019 -0800 Merge branch 'bnxt_en-Bug-fixes-for-57500-chips' Michael Chan says: ==================== bnxt_en: Bug fixes for 57500 chips. Two small bug fixes for ring checking and context memory allocation that affect the new 57500 chips. ==================== Signed-off-by: David S. Miller commit 6ef982dec7eda9affa81a2bb84f75441deb56d06 Author: Michael Chan Date: Sat Jan 12 00:13:05 2019 -0500 bnxt_en: Fix context memory allocation. When allocating memory pages for context memory, if the last page table should be fully populated, the current code will set nr_pages to 0 when calling bnxt_alloc_ctx_mem_blk(). This will cause the last page table to be completely blank and causing some RDMA failures. Fix it by setting the last page table's nr_pages to the remainder only if it is non-zero. Fixes: 08fe9d181606 ("bnxt_en: Add Level 2 context memory paging support.") Reported-by: Eric Davis Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0b815023a1d479aa8f8851ee880d5388e53b7ae5 Author: Michael Chan Date: Sat Jan 12 00:13:04 2019 -0500 bnxt_en: Fix ring checking logic on 57500 chips. In bnxt_hwrm_check_pf_rings(), add the proper flag to test the NQ resources. Without the proper flag, the firmware will change the NQ resource allocation and remap the IRQ, causing missing IRQs. This issue shows up when adding MQPRIO TX queues, for example. Fixes: 36d65be9a880 ("bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 473348891c36ff6de3e224fefa0b3fc86a629178 Merge: 7b5c8f5226bd0 826c1362e79ab Author: Linus Torvalds Date: Sat Jan 12 10:39:43 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "Minor fixes for new code, corner cases, and documentation" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed Documentation/virtual/kvm: Update URL for AMD SEV API specification KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range() kvm: sev: Fail KVM_SEV_INIT if already initialized KVM: validate userspace input in kvm_clear_dirty_log_protect() KVM: x86: Fix bit shifting in update_intel_pt_cfg commit 7b5c8f5226bd0eb77da8a055f43b2f1a06e92ba8 Merge: 4b3c31c8d4dda e2d3c414ec0f9 Author: Linus Torvalds Date: Sat Jan 12 10:30:43 2019 -0800 Merge tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Daniel Vetter: "Dave sends out his pull, everybody remembers holidays are over :-) Since Dave's already in weekend mode and it was quite a few patches I figured better to apply all the pulls and forward them to you. Hence here 2nd part of bugfixes for -rc2. nouveau: - backlight fix - falcon register access fix - fan fix. i915: - Disable PSR for Apple panels - Broxton ERR_PTR error state fix - Kabylake VECS workaround fix - Unwind failure on pinning the gen7 ppgtt - GVT workload request allocation fix core: - Fix fb-helper to work correctly with SDL 1.2 bugs - Fix lockdep warning in the atomic ioctl and setproperty" * tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/falcon: avoid touching registers if engine is off drm/nouveau: Don't disable polling in fallback mode drm/nouveau: register backlight on pascal and newer drm: Fix documentation generation for DP_DPCD_QUIRK_NO_PSR drm/i915: init per-engine WAs for all engines drm/i915: Unwind failure on pinning the gen7 ppgtt drm/i915: Skip the ERR_PTR error state drm/i915: Disable PSR in Apple panels gpu/drm: Fix lock held when returning to user space. drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2 drm/i915/gvt: Fix workload request allocation before request add commit 9e8f1c79831424d30c0e3df068be7f4a244157c9 Author: Varun Prakash Date: Thu Jan 10 23:29:28 2019 +0530 scsi: cxgb4i: add wait_for_completion() In case of ->set_param() and ->bind_conn() cxgb4i driver does not wait for cmd completion, this can create race conditions, to avoid this add wait_for_completion(). Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 4a01ab60f55041b1ccc760e43258a5b3aeeca1bc Author: Thomas Bogendoerfer Date: Wed Jan 9 15:09:02 2019 +0100 scsi: qla1280: set 64bit coherent mask After Commit 54aed4dd3526 ("MIPS: IP27: use dma_direct_ops") qla1280 driver failed on SGI IP27 machines with qla1280: QLA1040 found on PCI bus 0, dev 0 qla1280 0000:00:00.0: enabling device (0006 -> 0007) qla1280: Failed to get request memory qla1280: probe of 0000:00:00.0 failed with error -12 Reason is that SGI IP27 always generates 64bit DMA addresses and has no fallback mode for 32bit DMA addresses implemented. QLA1280 supports 64bit addressing for all DMA accesses so setting coherent mask to 64bit fixes the issue. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Martin K. Petersen commit 9be9db9f78f52ef03ee90063730cb9d730e7032b Author: Avri Altman Date: Thu Jan 10 13:31:26 2019 +0200 scsi: ufs: Fix geometry descriptor size Albeit we no longer rely on those hard-coded descriptor sizes, we still use them as our defaults, so better get it right. While adding its sysfs entries, we forgot to update the geometry descriptor size. It is 0x48 according to UFS2.1, and wasn't changed in UFS3.0. [mkp: typo] Fixes: c720c091222e (scsi: ufs: sysfs: geometry descriptor) Signed-off-by: Avri Altman Signed-off-by: Martin K. Petersen commit c65bfc8163696dd171e081488b0321beb630b708 Author: Shivasharan S Date: Wed Jan 9 05:08:37 2019 -0800 scsi: megaraid_sas: Retry reads of outbound_intr_status reg commit 272652fcbf1a ("scsi: megaraid_sas: add retry logic in megasas_readl") missed changing readl to megasas_readl in megasas_clear_intr_fusion(). For Aero controllers, reads of outbound_intr_status register needs to be retried. Reported-by: Tomas Henzl Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 34a2ce887668db9dda4b56e6f155c49ac13f3e54 Author: Manish Rangankar Date: Wed Jan 9 01:39:07 2019 -0800 scsi: qedi: Add ep_state for login completion on un-reachable targets When the driver finds invalid destination MAC for the first un-reachable target, and before completes the PATH_REQ operation, set new ep_state to OFFLDCONN_NONE so that as part of driver ep_poll mechanism, the upper open-iscsi layer is notified to complete the login process on the first un-reachable target and thus proceed login to other reachable targets. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit ce9e7bce43526626f7cffe2e657953997870197e Author: Stanley Chu Date: Mon Jan 7 22:19:34 2019 +0800 scsi: ufs: Fix system suspend status hba->is_sys_suspended is set after successful system suspend but not clear after successful system resume. According to current behavior, hba->is_sys_suspended will not be set if host is runtime-suspended but not system-suspended. Thus we shall aligh the same policy: clear this flag even if host remains runtime-suspended after ufshcd_system_resume is successfully returned. Simply fix this flag to correct host status logs. Signed-off-by: Stanley Chu Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit f0783d43dde4bb349fcd667df0afabbdbab8b477 Author: Ming Lei Date: Fri Jan 11 09:40:47 2019 -0800 scsi: qla2xxx: Use correct number of vectors for online CPUs When SCSI-MQ is enabled, in some case system would present nr_possible_cpus() which is greater than requested vectors by the driver. This results into driver being able to get larger number of MSI-X vectors than actual online CPUs. Driver then uses pci_alloc_irq_vectors_affinity() to assign 1:1 mapping and affinity for each MSI-x vector to CPUs. When the command is submitted using MSI-x vector, assigned to offline CPU, it results in an ABTS and system hang. This hang is result of a driver not being able to process interrupt on a vector assigned to an Off-line CPUs This patch fixes this issue by setting irq_offset value for the blk_mq_pci_map_queues() to use only those CPUs which has CPU mask affinity assigned and are online. By using the irq_offset value, driver will allow online cpumask to decide which vectors are used in blk_mq_pci_map_queues(). Fixes: 5601236b6f794 ("scsi: qla2xxx: Add Block Multi Queue functionality.") Cc: #4.19 Signed-off-by: Ming Lei Reviewed-by: Himanshu Madhani Tested-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8d008e64a2ebe6567c3f5e048b05842a0297350b Author: Gustavo A. R. Silva Date: Tue Jan 8 15:27:05 2019 -0600 mISDN: hfcsusb: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 7bb25a89aad2cc96de188c9ecc89a175360f6fb4 Author: John Garry Date: Thu Jan 10 21:32:41 2019 +0800 scsi: hisi_sas: Set protection parameters prior to adding SCSI host Currently we set the protection parameters after calling scsi_add_host() for v3 hw. They should be set beforehand, so make this change. Appearantly this fixes our DIX issue (not mainline yet) also, but more testing required. Fixes: d6a9000b81be ("scsi: hisi_sas: Add support for DIF feature for v2 hw") Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 41d1c8839e5f8cb781cc635f12791decee8271b7 Author: Paolo Abeni Date: Tue Jan 8 18:45:05 2019 +0100 net: clear skb->tstamp in bridge forwarding path Matteo reported forwarding issues inside the linux bridge, if the enslaved interfaces use the fq qdisc. Similar to commit 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths"), we need to clear the tstamp field in the bridge forwarding path. Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Reported-and-tested-by: Matteo Croce Signed-off-by: Paolo Abeni Acked-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 3f4261d4e62fb2fe7eb5238b12fb22f06aed6e21 Merge: 2ff33d6637393 71a8508402b57 Author: David S. Miller Date: Fri Jan 11 18:05:41 2019 -0800 Merge branch 'bpfilter-fixes' Taehee Yoo says: ==================== net: bpfilter: fix two bugs in bpfilter This patches fix two bugs in the bpfilter_umh which are related in iptables command. The first patch adds an exit code for UMH process. This provides an opportunity to cleanup members of the umh_info to modules which use the UMH. In order to identify UMH processes, a new flag PF_UMH is added. The second patch makes the bpfilter_umh use UMH cleanup callback. The third patch adds re-start routine for the bpfilter_umh. The bpfilter_umh does not re-start after error occurred. because there is no re-start routine in the module. The fourth patch ensures that the bpfilter.ko module will not removed while it's being used. The bpfilter.ko is not protected by locks or module reference counter. Therefore that can be removed while module is being used. In order to protect that, mutex is used. The first and second patch are preparation patches for the third and fourth patch. TEST #1 while : do modprobe bpfilter kill -9 iptables -vnL done TEST #2 while : do iptables -I FORWARD -m string --string ap --algo kmp & iptables -F & modprobe -rv bpfilter & done TEST #3 while : do modprobe bpfilter & modprobe -rv bpfilter & done The TEST1 makes a failure of iptables command. This is fixed by the third patch. The TEST2 makes a panic because of a race condition in the bpfilter_umh module. This is fixed by the fourth patch. The TEST3 makes a double-create UMH process. This is fixed by the third and fourth patch. v4 : - declare the exit_umh() as static inline - check stop flag in the load_umh() to avoid a double-create UMH v3 : - Avoid unnecessary list lookup for non-UMH processes - Add a new PF_UMH flag v2 : add the first and second patch v1 : Initial patch ==================== Signed-off-by: David S. Miller commit 71a8508402b570127d6500c1ad456bbd33ccf187 Author: Taehee Yoo Date: Wed Jan 9 02:25:10 2019 +0900 net: bpfilter: disallow to remove bpfilter module while being used The bpfilter.ko module can be removed while functions of the bpfilter.ko are executing. so panic can occurred. in order to protect that, locks can be used. a bpfilter_lock protects routines in the __bpfilter_process_sockopt() but it's not enough because __exit routine can be executed concurrently. Now, the bpfilter_umh can not run in parallel. So, the module do not removed while it's being used and it do not double-create UMH process. The members of the umh_info and the bpfilter_umh_ops are protected by the bpfilter_umh_ops.lock. test commands: while : do iptables -I FORWARD -m string --string ap --algo kmp & modprobe -rv bpfilter & done splat looks like: [ 298.623435] BUG: unable to handle kernel paging request at fffffbfff807440b [ 298.628512] #PF error: [normal kernel read fault] [ 298.633018] PGD 124327067 P4D 124327067 PUD 11c1a3067 PMD 119eb2067 PTE 0 [ 298.638859] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 298.638859] CPU: 0 PID: 2997 Comm: iptables Not tainted 4.20.0+ #154 [ 298.638859] RIP: 0010:__mutex_lock+0x6b9/0x16a0 [ 298.638859] Code: c0 00 00 e8 89 82 ff ff 80 bd 8f fc ff ff 00 0f 85 d9 05 00 00 48 8b 85 80 fc ff ff 48 bf 00 00 00 00 00 fc ff df 48 c1 e8 03 <80> 3c 38 00 0f 85 1d 0e 00 00 48 8b 85 c8 fc ff ff 49 39 47 58 c6 [ 298.638859] RSP: 0018:ffff88810e7777a0 EFLAGS: 00010202 [ 298.638859] RAX: 1ffffffff807440b RBX: ffff888111bd4d80 RCX: 0000000000000000 [ 298.638859] RDX: 1ffff110235ff806 RSI: ffff888111bd5538 RDI: dffffc0000000000 [ 298.638859] RBP: ffff88810e777b30 R08: 0000000080000002 R09: 0000000000000000 [ 298.638859] R10: 0000000000000000 R11: 0000000000000000 R12: fffffbfff168a42c [ 298.638859] R13: ffff888111bd4d80 R14: ffff8881040e9a05 R15: ffffffffc03a2000 [ 298.638859] FS: 00007f39e3758700(0000) GS:ffff88811ae00000(0000) knlGS:0000000000000000 [ 298.638859] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 298.638859] CR2: fffffbfff807440b CR3: 000000011243e000 CR4: 00000000001006f0 [ 298.638859] Call Trace: [ 298.638859] ? mutex_lock_io_nested+0x1560/0x1560 [ 298.638859] ? kasan_kmalloc+0xa0/0xd0 [ 298.638859] ? kmem_cache_alloc+0x1c2/0x260 [ 298.638859] ? __alloc_file+0x92/0x3c0 [ 298.638859] ? alloc_empty_file+0x43/0x120 [ 298.638859] ? alloc_file_pseudo+0x220/0x330 [ 298.638859] ? sock_alloc_file+0x39/0x160 [ 298.638859] ? __sys_socket+0x113/0x1d0 [ 298.638859] ? __x64_sys_socket+0x6f/0xb0 [ 298.638859] ? do_syscall_64+0x138/0x560 [ 298.638859] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 298.638859] ? __alloc_file+0x92/0x3c0 [ 298.638859] ? init_object+0x6b/0x80 [ 298.638859] ? cyc2ns_read_end+0x10/0x10 [ 298.638859] ? cyc2ns_read_end+0x10/0x10 [ 298.638859] ? hlock_class+0x140/0x140 [ 298.638859] ? sched_clock_local+0xd4/0x140 [ 298.638859] ? sched_clock_local+0xd4/0x140 [ 298.638859] ? check_flags.part.37+0x440/0x440 [ 298.638859] ? __lock_acquire+0x4f90/0x4f90 [ 298.638859] ? set_rq_offline.part.89+0x140/0x140 [ ... ] Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 61fbf5933d42b02f552123af5a87a06335a3b4db Author: Taehee Yoo Date: Wed Jan 9 02:24:53 2019 +0900 net: bpfilter: restart bpfilter_umh when error occurred The bpfilter_umh will be stopped via __stop_umh() when the bpfilter error occurred. The bpfilter_umh() couldn't start again because there is no restart routine. The section of the bpfilter_umh_{start/end} is no longer .init.rodata because these area should be reused in the restart routine. hence the section name is changed to .bpfilter_umh. The bpfilter_ops->start() is restart callback. it will be called when bpfilter_umh is stopped. The stop bit means bpfilter_umh is stopped. this bit is set by both start and stop routine. Before this patch, Test commands: $ iptables -vnL $ kill -9 $ iptables -vnL [ 480.045136] bpfilter: write fail -32 $ iptables -vnL All iptables commands will fail. After this patch, Test commands: $ iptables -vnL $ kill -9 $ iptables -vnL $ iptables -vnL Now, all iptables commands will work. Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 5b4cb650e569db2e6a09d2fa0ef8eb789a0ac5d8 Author: Taehee Yoo Date: Wed Jan 9 02:24:34 2019 +0900 net: bpfilter: use cleanup callback to release umh_info Now, UMH process is killed, do_exit() calls the umh_info->cleanup callback to release members of the umh_info. This patch makes bpfilter_umh's cleanup routine to use the umh_info->cleanup callback. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 73ab1cb2de9e3efe7f818d5453de271e5371df1d Author: Taehee Yoo Date: Wed Jan 9 02:23:56 2019 +0900 umh: add exit routine for UMH process A UMH process which is created by the fork_usermode_blob() such as bpfilter needs to release members of the umh_info when process is terminated. But the do_exit() does not release members of the umh_info. hence module which uses UMH needs own code to detect whether UMH process is terminated or not. But this implementation needs extra code for checking the status of UMH process. it eventually makes the code more complex. The new PF_UMH flag is added and it is used to identify UMH processes. The exit_umh() does not release members of the umh_info. Hence umh_info->cleanup callback should release both members of the umh_info and the private data. Suggested-by: David S. Miller Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit a94a2572b97744d3a35a1996df0e5cf6b2461a4a Author: Xiubo Li Date: Fri Nov 23 09:15:30 2018 +0800 scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes Currently there is one cmd timeout timer and one qfull timer for each udev, and whenever any new command is coming in we will update the cmd timer or qfull timer. For some corner cases the timers are always working only for the ringbuffer's and full queue's newest cmd. That's to say the timer won't be fired even if one cmd has been stuck for a very long time and the deadline is reached. This fix will keep the cmd/qfull timers to be pended for the oldest cmd in ringbuffer and full queue, and will update them with the next cmd's deadline only when the old cmd's deadline is reached or removed from the ringbuffer and full queue. Signed-off-by: Xiubo Li Acked-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2ff33d6637393fe9348357285931811b76e1402f Author: Jia-Ju Bai Date: Tue Jan 8 21:04:48 2019 +0800 isdn: i4l: isdn_tty: Fix some concurrency double-free bugs The functions isdn_tty_tiocmset() and isdn_tty_set_termios() may be concurrently executed. isdn_tty_tiocmset isdn_tty_modem_hup line 719: kfree(info->dtmf_state); line 721: kfree(info->silence_state); line 723: kfree(info->adpcms); line 725: kfree(info->adpcmr); isdn_tty_set_termios isdn_tty_modem_hup line 719: kfree(info->dtmf_state); line 721: kfree(info->silence_state); line 723: kfree(info->adpcms); line 725: kfree(info->adpcmr); Thus, some concurrency double-free bugs may occur. These possible bugs are found by a static tool written by myself and my manual code review. To fix these possible bugs, the mutex lock "modem_info_mutex" used in isdn_tty_tiocmset() is added in isdn_tty_set_termios(). Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 7fbe078c37aba3088359c9256c1a1d0c3e39ee81 Author: Zha Bin Date: Tue Jan 8 16:07:03 2019 +0800 vhost/vsock: fix vhost vsock cid hashing inconsistent The vsock core only supports 32bit CID, but the Virtio-vsock spec define CID (dst_cid and src_cid) as u64 and the upper 32bits is reserved as zero. This inconsistency causes one bug in vhost vsock driver. The scenarios is: 0. A hash table (vhost_vsock_hash) is used to map an CID to a vsock object. And hash_min() is used to compute the hash key. hash_min() is defined as: (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits)). That means the hash algorithm has dependency on the size of macro argument 'val'. 0. In function vhost_vsock_set_cid(), a 64bit CID is passed to hash_min() to compute the hash key when inserting a vsock object into the hash table. 0. In function vhost_vsock_get(), a 32bit CID is passed to hash_min() to compute the hash key when looking up a vsock for an CID. Because the different size of the CID, hash_min() returns different hash key, thus fails to look up the vsock object for an CID. To fix this bug, we keep CID as u64 in the IOCTLs and virtio message headers, but explicitly convert u64 to u32 when deal with the hash table and vsock core. Fixes: 834e772c8db0 ("vhost/vsock: fix use-after-free in network stack callers") Link: https://github.com/stefanha/virtio/blob/vsock/trunk/content.tex Signed-off-by: Zha Bin Reviewed-by: Liu Jiang Reviewed-by: Stefan Hajnoczi Acked-by: Jason Wang Signed-off-by: David S. Miller commit 5fea7f1091d725bd0601c931f237fed210d37dad Merge: e8b108b050e84 fa0be0a43f101 Author: David S. Miller Date: Fri Jan 11 15:35:06 2019 -0800 Merge branch 'stmmac-fixes' Jose Abreu says: ==================== net: stmmac: Misc Fixes Some small fixes for stmmac targeting -net. Detailed info in commit log. ==================== Signed-off-by: David S. Miller commit fa0be0a43f101888ac677dba31b590963eafeaa1 Author: Jose Abreu Date: Wed Jan 9 10:06:00 2019 +0100 net: stmmac: Prevent RX starvation in stmmac_napi_poll() Currently, TX is given a budget which is consumed by stmmac_tx_clean() and stmmac_rx() is given the remaining non-consumed budget. This is wrong and in case we are sending a large number of packets this can starve RX because remaining budget will be low. Let's give always the same budget for RX and TX clean. While at it, check if we missed any interrupts while we were in NAPI callback by looking at DMA interrupt status. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 3b5094665e273c4a2a99f7f5f16977c0f1e19095 Author: Jose Abreu Date: Wed Jan 9 10:05:59 2019 +0100 net: stmmac: Fix the logic of checking if RX Watchdog must be enabled RX Watchdog can be disabled by platform definitions but currently we are initializing the descriptors before checking if Watchdog must be disabled or not. Fix this by checking earlier if user wants Watchdog disabled or not. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 0650d4017f4d2eee67230a02285a7ae5204240c2 Author: Jose Abreu Date: Wed Jan 9 10:05:58 2019 +0100 net: stmmac: Check if CBS is supported before configuring Check if CBS is currently supported before trying to configure it in HW. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit fcc509eb10ff4794641e6ad3082118287a750d0a Author: Jose Abreu Date: Wed Jan 9 10:05:57 2019 +0100 net: stmmac: dwxgmac2: Only clear interrupts that are active In DMA interrupt handler we were clearing all interrupts status, even the ones that were not active. Fix this and only clear the active interrupts. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 6dea7e1881fd86b80da64e476ac398008daed857 Author: Jose Abreu Date: Wed Jan 9 10:05:56 2019 +0100 net: stmmac: Fix PCI module removal leak Since commit b7d0f08e9129, the enable / disable of PCI device is not managed which will result in IO regions not being automatically unmapped. As regions continue mapped it is currently not possible to remove and then probe again the PCI module of stmmac. Fix this by manually unmapping regions on remove callback. Changes from v1: - Fix build error Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Fixes: b7d0f08e9129 ("net: stmmac: Fix WoL for PCI-based setups") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8217724eb7c51bbec351b23cbc924577b2f4b8e6 Author: Otto Sabart Date: Wed Jan 9 00:46:55 2019 +0100 doc: bindings: fix bad reference to ARM CPU bindings The primecell.txt and cpus.txt files were converted into YAML. This patch updates old references with new ones. Fixes: d3c207eeb905 ("dt-bindings: arm: Convert primecell binding to json-schema") Fixes: 672951cbd1b7 ("dt-bindings: arm: Convert cpu binding to json-schema") Signed-off-by: Otto Sabart Signed-off-by: Rob Herring commit 0919871ac37fdcf46c7657da0f1742efe096b399 Author: Tony Luck Date: Fri Jan 11 14:46:37 2019 -0800 acpi/nfit: Fix race accessing memdev in nfit_get_smbios_id() Possible race accessing memdev structures after dropping the mutex. Dan Williams says this could race against another thread that is doing: # echo "ACPI0012:00" > /sys/bus/acpi/drivers/nfit/unbind Reported-by: Jane Chu Fixes: 23222f8f8dce ("acpi, nfit: Add function to look up nvdimm...") Signed-off-by: Tony Luck Signed-off-by: Dan Williams commit bde0b5c109e8b22b57745e3b9914f9e87ad857ea Author: Miquel Raynal Date: Tue Dec 4 20:28:29 2018 +0100 ata: ahci: mvebu: request PHY suspend/resume for Armada 3700 A feature has been added in the libahci driver: the possibility to set a new flag in hpriv->flags to let the core handle PHY suspend/resume automatically. Make use of this feature to make suspend to RAM work with SATA drives on A3700. Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe commit 2f558bc3f33ca344489cec2218545741028b6a70 Author: Miquel Raynal Date: Tue Dec 4 20:28:28 2018 +0100 ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM A3700 comphy initialization is done in the firmware (TF-A). Looking at the SATA PHY initialization routine, there is a comment about "vendor specific" registers. Two registers are mentioned. They are not initialized there in the firmware because they are AHCI related, while the firmware at this location does only PHY configuration. The solution to avoid doing such initialization is relying on U-Boot. While this work at boot time, U-Boot is definitely not going to run during a resume after suspending to RAM. Two possible solutions were considered: * Fixing the firmware. * Fixing the kernel driver. The first solution would take ages to propagate, while the second solution is easy to implement as the driver as been a little bit reworked to prepare for such platform configuration. Hence, this patch adds an Armada 3700 configuration function to set these two registers both at boot time (in the probe) and after a suspend (in the resume path). Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe commit 96dbcb40e4b1a387cdb9b21f43638c759aebb5a4 Author: Miquel Raynal Date: Tue Dec 4 20:28:27 2018 +0100 ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs At the beginning, only Armada 38x SoCs where supported by the ahci_mvebu.c driver. Commit 15d3ce7b63bd ("ata: ahci_mvebu: add support for Armada 3700 variant") introduced Armada 3700 support. As opposed to Armada 38x SoCs, the 3700 variants do not have to configure mbus and the regret option. This patch took care of avoiding such configuration when not needed in the probe function, but failed to do the same in the resume path. While doing so looks harmless by experience, let's clean the driver logic and avoid doing this useless configuration with Armada 3700 SoCs. Because the logic is very similar between these two places, it has been decided to factorize this code and put it in a "Armada 38x configuration function". This function is part of a new (per-compatible) platform data structure, so that the addition of such configuration function for Armada 3700 will be eased. Fixes: 15d3ce7b63bd ("ata: ahci_mvebu: add support for Armada 3700 variant") Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe commit c9bc136791ba0eefe07ed57d3850b8c5cee6471b Author: Miquel Raynal Date: Tue Dec 4 20:28:26 2018 +0100 ata: ahci: mvebu: remove stale comment For Armada-38x (32-bit) SoCs, PM platform support has been added since: commit 32f9494c9dfd ("ARM: mvebu: prepare pm-board.c for the introduction of Armada 38x support") commit 3cbd6a6ca81c ("ARM: mvebu: Add standby support") For Armada 64-bit SoCs, like the A3700 also using this AHCI driver, PM platform support has always existed. There are even suspend/resume hooks in this driver since: commit d6ecf15814888 ("ata: ahci_mvebu: add suspend/resume support") Remove the stale comment at the end of this driver stating that all the above does not exist yet. Fixes: d6ecf15814888 ("ata: ahci_mvebu: add suspend/resume support") Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe commit 49e54187ae0b2f9b5c0760e568a103baf4481610 Author: Miquel Raynal Date: Tue Dec 4 20:28:25 2018 +0100 ata: libahci_platform: comply to PHY framework Current implementation of the libahci does not take into account the new PHY framework. Correct the situation by adding a call to phy_set_mode() before phy_power_on(). PHYs should also be handled at suspend/resume time. For this, call ahci_platform_enable/disable_phys() at suspend/resume_host() time. These calls are guarded by a HFLAG (AHCI_HFLAG_SUSPEND_PHYS) that the user of the libahci driver must set manually in hpriv->flags at probe time. This is to avoid breaking users that have not been tested with this change. Reviewed-by: Hans de Goede Suggested-by: Grzegorz Jaszczyk Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe commit e8b108b050e84b6d7497d2cd29fe7623d0a33ed6 Merge: b19bce0335e25 fb4129b9279dc Author: David S. Miller Date: Fri Jan 11 12:51:49 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-01-11 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix TCP-BPF support for correctly setting the initial window via TCP_BPF_IW on an active TFO sender, from Yuchung. 2) Fix a panic in BPF's stack_map_get_build_id()'s ELF parsing on 32 bit archs caused by page_address() returning NULL, from Song. 3) Fix BTF pretty print in kernel and bpftool when bitfield member offset is greater than 256. Also add test cases, from Yonghong. 4) Fix improper argument handling in xdp1 sample, from Ioana. 5) Install missing tcp_server.py and tcp_client.py files from BPF selftests, from Anders. 6) Add test_libbpf to gitignore in libbpf and BPF selftests, from Stanislav. ==================== Signed-off-by: David S. Miller commit 4b3c31c8d4dda4d70f3f24a165f3be99499e0328 Merge: c3405d6899745 b67d4530cdade Author: Linus Torvalds Date: Fri Jan 11 12:28:01 2019 -0800 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 one core and one driver bugfix for you" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: tegra: Fix Maximum transfer size i2c: dev: prevent adapter retries and timeout being set as minus value commit c3405d689974555532c12a4f3a5e72dedc660c0b Merge: f87092c4337fc 279667212ab2a Author: Linus Torvalds Date: Fri Jan 11 12:25:40 2019 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Another handful of arm64 fixes here. Most of the complication comes from improving our kpti code to avoid lengthy pauses (30+ seconds) during boot when we rewrite the page tables. There are also a couple of IORT fixes that came in via Lorenzo. Summary: - Don't error in kexec_file_load if kaslr-seed is missing in device-tree - Fix incorrect argument type passed to iort_match_node_callback() - Fix IORT build failure when CONFIG_IOMMU_API=n - Fix kpti performance regression with new rodata default option - Typo fix" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kexec_file: return successfully even if kaslr-seed doesn't exist ACPI/IORT: Fix rc_dma_get_range() arm64: kpti: Avoid rewriting early page tables when KASLR is enabled arm64: asm-prototypes: Fix fat-fingered typo in comment ACPI/IORT: Fix build when CONFIG_IOMMU_API=n commit f87092c4337fc064b52bfad1df499a5b82f6d088 Merge: 40a31da414c39 85f5a4d666fd9 Author: Linus Torvalds Date: Fri Jan 11 12:17:30 2019 -0800 Merge tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "A patch to allow setting abort_on_full and a fix for an old "rbd unmap" edge case, marked for stable" * tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client: rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set ceph: use vmf_error() in ceph_filemap_fault() libceph: allow setting abort_on_full for rbd commit ef4efa14560adf7cdc77022c86e659d910c5c6fc Author: Lubomir Rintel Date: Fri Jan 4 22:56:56 2019 +0100 dt-bindings: marvell,mmp2: fix typos in bindings doc A pair of rather trivial ones. Signed-off-by: Lubomir Rintel Signed-off-by: Rob Herring commit 5a9372f751b5350e0ce3d2ee91832f1feae2c2e5 Author: Arnd Bergmann Date: Thu Jan 10 17:24:31 2019 +0100 mips: fix n32 compat_ipc_parse_version While reading through the sysvipc implementation, I noticed that the n32 semctl/shmctl/msgctl system calls behave differently based on whether o32 support is enabled or not: Without o32, the IPC_64 flag passed by user space is rejected but calls without that flag get IPC_64 behavior. As far as I can tell, this was inadvertently changed by a cleanup patch but never noticed by anyone, possibly nobody has tried using sysvipc on n32 after linux-3.19. Change it back to the old behavior now. Fixes: 78aaf956ba3a ("MIPS: Compat: Fix build error if CONFIG_MIPS32_COMPAT but no compat ABI.") Signed-off-by: Arnd Bergmann Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: stable@vger.kernel.org # 3.19+ commit 40a31da414c39e3cd8c4137c1ceedf59b7ffd4ce Merge: e8af37f3f488e 4e72ee8872279 Author: Linus Torvalds Date: Fri Jan 11 09:44:05 2019 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling updates from Ingo Molnar: "Tooling changes only: fixes and a few stray improvements. Most of the diffstat is dominated by a PowerPC related fix of system call trace output beautification that allows us to (again) use the UAPI header version and sync up with the kernel's version of PowerPC system call names in the arch/powerpc/kernel/syscalls/syscall.tbl header" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) tools headers powerpc: Remove unistd.h perf powerpc: Rework syscall table generation perf symbols: Add 'arch_cpu_idle' to the list of kernel idle symbols tools include uapi: Sync linux/if_link.h copy with the kernel sources tools include uapi: Sync linux/vhost.h with the kernel sources tools include uapi: Sync linux/fs.h copy with the kernel sources perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h tools include uapi: Grab a copy of linux/mount.h perf top: Lift restriction on using callchains without "sym" in --sort tools lib traceevent: Remove tep_data_event_from_type() API tools lib traceevent: Rename tep_is_file_bigendian() to tep_file_bigendian() tools lib traceevent: Changed return logic of tep_register_event_handler() API tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprintf() APIs tools lib traceevent: Rename struct cmdline to struct tep_cmdline tools lib traceevent: Initialize host_bigendian at tep_handle allocation tools lib traceevent: Introduce new libtracevent API: tep_override_comm() perf tests: Add a test for the ARM 32-bit [vectors] page perf tools: Make find_vdso_map() more modular perf trace: Fix alignment for [continued] lines perf trace: Fix ')' placement in "interrupted" syscall lines ... commit 826c1362e79abcd36f99092acd083b5a2d576676 Author: Vitaly Kuznetsov Date: Wed Jan 9 18:22:56 2019 +0100 x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed Since commit 09abb5e3e5e50 ("KVM: nVMX: call kvm_skip_emulated_instruction in nested_vmx_{fail,succeed}") nested_vmx_failValid() results in kvm_skip_emulated_instruction() so doing it again in handle_vmptrld() when vmptr address is not backed is wrong, we end up advancing RIP twice. Fixes: fca91f6d60b6e ("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page") Reported-by: Cornelia Huck Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Radim Krčmář commit cf1754c2a1d6e92688f7353aa7f598f5ad6d8f78 Author: Christophe de Dinechin Date: Mon Jan 7 18:52:38 2019 +0100 Documentation/virtual/kvm: Update URL for AMD SEV API specification The URL of [api-spec] in Documentation/virtual/kvm/amd-memory-encryption.rst is no longer valid, replaced space with underscore. Signed-off-by: Christophe de Dinechin Reviewed-by: Brijesh Singh Signed-off-by: Radim Krčmář commit b7c1c226f9403c52bf58b0bceef24501429c7351 Author: Lan Tianyu Date: Fri Jan 4 15:20:44 2019 +0800 KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range() The "ret" is initialized to be ENOTSUPP. The return value of __hv_remote_flush_tlb_with_range() will be Or with "ret" when ept table potiners are mismatched. This will cause return ENOTSUPP even if flush tlb successfully. This patch is to fix the issue and set "ret" to 0. Fixes: a5c214dad198 ("KVM/VMX: Change hv flush logic when ept tables are mismatched.") Signed-off-by: Lan Tianyu Signed-off-by: Radim Krčmář commit 3f14a89d1132dcae3c8ce6721c6ef51f6e6d9b5f Author: David Rientjes Date: Wed Jan 2 12:56:33 2019 -0800 kvm: sev: Fail KVM_SEV_INIT if already initialized By code inspection, it was found that multiple calls to KVM_SEV_INIT could deplete asid bits and overwrite kvm_sev_info's regions_list. Multiple calls to KVM_SVM_INIT is not likely to occur with QEMU, but this should likely be fixed anyway. This code is serialized by kvm->lock. Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command") Reported-by: Cfir Cohen Signed-off-by: David Rientjes Signed-off-by: Radim Krčmář commit 98938aa8edd66dc95024d7c936a4bc315f6615ff Author: Tomas Bortoli Date: Wed Jan 2 18:29:37 2019 +0100 KVM: validate userspace input in kvm_clear_dirty_log_protect() The function at issue does not fully validate the content of the structure pointed by the log parameter, though its content has just been copied from userspace and lacks validation. Fix that. Moreover, change the type of n to unsigned long as that is the type returned by kvm_dirty_bitmap_bytes(). Signed-off-by: Tomas Bortoli Reported-by: syzbot+028366e52c9ace67deb3@syzkaller.appspotmail.com [Squashed the fix from Paolo. - Radim.] Signed-off-by: Radim Krčmář commit d14eff1bc53e6a268c3b48da5cdb469f26832d1a Author: Gustavo A. R. Silva Date: Wed Dec 26 14:40:59 2018 -0600 KVM: x86: Fix bit shifting in update_intel_pt_cfg ctl_bitmask in pt_desc is of type u64. When an integer like 0xf is being left shifted more than 32 bits, the behavior is undefined. Fix this by adding suffix ULL to integer 0xf. Addresses-Coverity-ID: 1476095 ("Bad bit shift operation") Fixes: 6c0f0bba85a0 ("KVM: x86: Introduce a function to initialize the PT configuration") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Wei Yang Reviewed-by: Luwei Kang Signed-off-by: Radim Krčmář commit e8af37f3f488e7adce2b5c6f6dfe8c83c2662e1f Merge: 8e1b295b693cb e4f358916d528 Author: Linus Torvalds Date: Fri Jan 11 09:07:19 2019 -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: "A 32-bit build fix, CONFIG_RETPOLINE fixes and rename CONFIG_RESCTRL to CONFIG_X86_RESCTRL" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE x86/cache: Rename config option to CONFIG_X86_RESCTRL samples/seccomp: Fix 32-bit build commit 8e1b295b693cbf2d8499c24fbb1f8f50c58771e3 Merge: f4f31fff32252 65a4f3a1efda8 Author: Linus Torvalds Date: Fri Jan 11 09:04:36 2019 -0800 Merge tag 'acpi-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Fix a build failure introduced recently, fix the xpower PMIC ACPI driver, clean up the handling of duplicate entries in _PRx power resource lists and fix addresses in NUMA-related messages on 32-bit with PAE. Specifics: - Fix build failures with both CONFIG_NLS and CONFIG_PCI unset that can occur since ACPI can be built without PCI now (Sinan Kaya). - Clean up the handling of duplicate entries in power resource lists returned by _PRx evaluation to avoid triggering WARN_ON() on attempts to add duplicate symlinks in sysfs (Hans de Goede). - Fix issues with the TS current-source switching on systems using the xpower PMIC by avoiding to update unrelated bits in the TS pin-ctrl register and avoiding to unconditionally enable TS current-source on systems where it is not used (Hans de Goede). - Fix addresses in NUMA-related messages on 32-bit with PAE which can be truncated due to integer type conversions (Chao Fan)" * tag 'acpi-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PMIC: xpower: Fix TS-pin current-source handling ACPI: NUMA: Use correct type for printing addresses on i386-PAE ACPI: power: Skip duplicate power resource references in _PRx ACPI: Fix build failure when CONFIG_NLS is set to 'n' commit f4f31fff32252da3791e9d901adb44f963a79153 Merge: 385c59c7baaa4 343e60e52a3a0 Author: Linus Torvalds Date: Fri Jan 11 09:01:43 2019 -0800 Merge tag 'pm-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These fix fallout after starting to use hrtimers in the runtime PM framework, fix a few cpufreq issues, fix a recently broken reference to cpuidle documentation, update MAINTAINERS entries for cpufreq and cpuidle and make the recently added system suspend and resume support in devfreq actually work. Specifics: - Prevent integer overflows from occurring on 32-bit when converting milliseconds to nanoseconds in the runtime PM framework and update comments that still refer to jiffies in it (Vincent Guittot, Ladislav Michl). - Fix the SCMI cpufreq driver to always use the same frequency units for arch_set_freq_scale() and make the scale-invariant load tracking acutally work with this driver (Quentin Perret). - Fix freeing of dynamic OPPs in the SCPI and SCMI cpufreq drivers broken during the 4.20 defelopment cycle (Viresh Kumar). - Prevent the cpufreq core from attempting to return the current frequency of offline CPUs (Sudeep Holla). - Add devfreq suspend and resume hooks (missed previously) to the PM core to make the recently added system suspend and resume support in devfreq actually work (Lukasz Luba). - Update MAINTAINERS entries for cpufreq and cpuidle, mostly to add references to new/current documentation to them (Rafael Wysocki). - Fix a recently broken reference to cpuidle documentation (Otto Sabart)" * tag 'pm-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM-runtime: Fix autosuspend_delay on 32bits arch PM-runtime: Fix 'jiffies' in comments after switch to hrtimers cpufreq: scmi: Fix frequency invariance in slow path doc: trace: fix reference to cpuidle documentation file cpufreq: check if policy is inactive early in __cpufreq_get() cpufreq: scpi/scmi: Fix freeing of dynamic OPPs cpuidle / Documentation: Update cpuidle MAINTAINERS entry cpufreq / Documentation: Update cpufreq MAINTAINERS entry PM: sleep: call devfreq suspend/resume commit 385c59c7baaa4626f5c01888d50e86e5636e655e Merge: de6629eb262e0 f34c48e06ddcc Author: Linus Torvalds Date: Fri Jan 11 08:58:02 2019 -0800 Merge tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Not a huge amount for rc2, assume the usual quiet period, and rc3 will be most of it. amdgpu: - Powerplay fixes - Virtual display pinning fixes - Golden register updates for Vega - Pitch and gem size validation fixes - SR-IOV init error fix - Pagetables in system RAM disable for some Raven system - DP-MST resume fixes tc358767 bridge: - fix to work with displayport connector" * tag 'drm-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm: (26 commits) drm/amdgpu: disable system memory page tables for now drm/amdgpu: set WRITE_BURST_LENGTH to 64B to workaround SDMA1 hang drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20 drm/bridge: tc358767: use DP connector if no panel set drm/bridge: tc358767: fix output H/V syncs drm/bridge: tc358767: reject modes which require too much BW drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value drm/bridge: tc358767: fix single lane configuration drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE drm/bridge: tc358767: add bus flags drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume() drm/amdgpu: Don't fail resume process if resuming atomic state fails drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume() drm/amdgpu: validate user GEM object size drm/amdgpu: validate user pitch alignment drm/amd/powerplay: drop the unnecessary uclk hard min setting drm/amd/powerplay: avoid possible buffer overflow drm/amd/powerplay: create pp_od_clk_voltage device file under OD support drm/amd/powerplay: update OD support flag for SKU with no OD capabilities drm/amdgpu: make gfx9 enter into rlc safe mode when set MGCG ... commit d3736d82e8169768218ee0ef68718875918091a0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Jan 9 01:17:40 2019 +0000 tty: Don't hold ldisc lock in tty_reopen() if ldisc present Try to get reference for ldisc during tty_reopen(). If ldisc present, we don't need to do tty_ldisc_reinit() and lock the write side for line discipline semaphore. Effectively, it optimizes fast-path for tty_reopen(), but more importantly it won't interrupt ongoing IO on the tty as no ldisc change is needed. Fixes user-visible issue when tty_reopen() interrupted login process for user with a long password, observed and reported by Lukas. Fixes: c96cf923a98d ("tty: Don't block on IO when ldisc change is pending") Fixes: 83d817f41070 ("tty: Hold tty_ldisc_lock() during tty_reopen()") Cc: Jiri Slaby Reported-by: Lukas F. Hartmann Tested-by: Lukas F. Hartmann Cc: stable Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit e3e4767bd550b3f19278e42bcce143e0d2316ba2 Author: Martin Blumenstingl Date: Tue Jan 1 20:44:14 2019 +0100 mmc: core: don't override the CD GPIO level when "cd-inverted" is set Since commit 89a5e15bcba87d ("gpio/mmc/of: Respect polarity in the device tree") gpiolib-of parses the "cd-gpios" property and flips the polarity if "cd-inverted" is also set. This results in the "cd-inverted" property being evaluated twice, which effectively makes it a no-op: - first in drivers/gpio/gpiolib-of.c (of_xlate_and_get_gpiod_flags) when setting up the CD GPIO - then again in drivers/mmc/core/slot-gpio.c (mmc_gpio_get_cd) when reading the CD GPIO value at runtime On boards which are using device-tree with the "cd-inverted" property being set any inserted card are not detected anymore. This is due to the MMC core treating the CD GPIO with the wrong polarity. Disable "override_cd_active_level" for the card detection GPIO which is parsed using mmc_of_parse. This fixes SD card detection on the boards which are currently using the "cd-inverted" device-tree property (tested on Meson8b Odroid-C1 and Meson8b EC-100). This does not remove the CD GPIO inversion logic from the MMC core because there's at least one driver (sdhci-pci-core for Intel BayTrail based boards) which still passes "override_cd_active_level = true" to mmc_gpiod_request_cd(). Due to lack of hardware for testing this is left untouched. In the future the GPIO inversion logic for both, card and read-only detection can be removed once no driver is using it anymore. Fixes: 89a5e15bcba87d ("gpio/mmc/of: Respect polarity in the device tree") Signed-off-by: Martin Blumenstingl Tested-by: Anand Moon Tested-by: Loys Ollivier Acked-by: Ulf Hansson Signed-off-by: Linus Walleij commit 00257e0cc550c4a8df5f99c0a4fc74fec0656144 Author: Rob Herring Date: Fri Jan 11 14:34:39 2019 +0100 fbdev: offb: Fix OF node name handling Commit 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name") changed how the OF FB driver handles the OF node name. This missed the case where the node name is passed to offb_init_palette_hacks(). This results in a NULL ptr dereference in strncmp and breaks any system except ones using bootx with no display node. Fix this by making offb_init_palette_hacks() use the OF node pointer and use of_node_name_prefix() helper function instead for node name comparisons. This helps in moving all OF node name accesses to helper functions in preparation to remove struct device_node.name pointer. Fixes: 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name") Reported-by: Mathieu Malaterre Tested-by: Mathieu Malaterre Cc: stable@vger.kernel.org # v4.19+ Cc: Elimar Riesebieter Signed-off-by: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz commit a01421e4484327fe44f8e126793ed5a48a221e24 Author: Vlad Tsyrklevich Date: Fri Jan 11 14:34:38 2019 +0100 omap2fb: Fix stack memory disclosure Using [1] for static analysis I found that the OMAPFB_QUERY_PLANE, OMAPFB_GET_COLOR_KEY, OMAPFB_GET_DISPLAY_INFO, and OMAPFB_GET_VRAM_INFO cases could all leak uninitialized stack memory--either due to uninitialized padding or 'reserved' fields. Fix them by clearing the shared union used to store copied out data. [1] https://github.com/vlad902/kernel-uninitialized-memory-checker Signed-off-by: Vlad Tsyrklevich Reviewed-by: Kees Cook Fixes: b39a982ddecf ("OMAP: DSS2: omapfb driver") Cc: security@kernel.org [b.zolnierkie: prefix patch subject with "omap2fb: "] Signed-off-by: Bartlomiej Zolnierkiewicz commit 48d2ba6257013676e57ff69444d5212031aee763 Author: Steve French Date: Sat Jan 5 19:46:35 2019 -0600 cifs: update internal module version number To 2.16 Signed-off-by: Steve French commit 9a66396f1857cc1de06f4f4771797315e1a4ea56 Author: Pavel Shilovsky Date: Tue Jan 8 11:15:28 2019 -0800 CIFS: Fix error paths in writeback code This patch aims to address writeback code problems related to error paths. In particular it respects EINTR and related error codes and stores and returns the first error occurred during writeback. Signed-off-by: Pavel Shilovsky Acked-by: Jeff Layton Signed-off-by: Steve French commit ee258d79159afed52ca9372aeb9c1a51e89b32ee Author: Pavel Shilovsky Date: Thu Jan 3 15:53:10 2019 -0800 CIFS: Move credit processing to mid callbacks for SMB3 Currently we account for credits in the thread initiating a request and waiting for a response. The demultiplex thread receives the response, wakes up the thread and the latter collects credits from the response buffer and add them to the server structure on the client. This approach is not accurate, because it may race with reconnect events in the demultiplex thread which resets the number of credits. Fix this by moving credit processing to new mid callbacks that collect credits granted by the server from the response in the demultiplex thread. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit 8a26f0f781f56d3016b34a2217e346973d067e7b Author: Pavel Shilovsky Date: Thu Jan 3 16:45:27 2019 -0800 CIFS: Fix credits calculation for cancelled requests If a request is cancelled, we can't assume that the server returns 1 credit back. Instead we need to wait for a response and process the number of credits granted by the server. Create a separate mid callback for cancelled request, parse the number of credits in a response buffer and add them to the client's credits. If the didn't get a response (no response buffer available) assume 0 credits granted. The latter most probably happens together with session reconnect, so the client's credits are adjusted anyway. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit b9a74cde94957d82003fb9f7ab4777938ca851cd Author: Ross Lagerwall Date: Tue Jan 8 18:30:57 2019 +0000 cifs: Fix potential OOB access of lock element array If maxBuf is small but non-zero, it could result in a zero sized lock element array which we would then try and access OOB. Signed-off-by: Ross Lagerwall Signed-off-by: Steve French CC: Stable commit 92a8109e4d3a34fb6b115c9098b51767dc933444 Author: Ross Lagerwall Date: Tue Jan 8 18:30:56 2019 +0000 cifs: Limit memory used by lock request calls to a page The code tries to allocate a contiguous buffer with a size supplied by the server (maxBuf). This could fail if memory is fragmented since it results in high order allocations for commonly used server implementations. It is also wasteful since there are probably few locks in the usual case. Limit the buffer to be no larger than a page to avoid memory allocation failures due to fragmentation. Signed-off-by: Ross Lagerwall Signed-off-by: Steve French commit 15bc77f94e9f0e3cfd6972f3b84bb7aaa4c36b1b Author: Aurelien Aptel Date: Tue Jan 8 13:41:00 2019 +0100 cifs: move large array from stack to heap This addresses some compile warnings that you can see depending on configuration settings. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit ee13919c2e8d1f904e035ad4b4239029a8994131 Author: Pavel Shilovsky Date: Thu Jan 10 11:27:28 2019 -0800 CIFS: Do not hide EINTR after sending network packets Currently we hide EINTR code returned from sock_sendmsg() and return 0 instead. This makes a caller think that we successfully completed the network operation which is not true. Fix this by properly returning EINTR to callers. Cc: Signed-off-by: Pavel Shilovsky Reviewed-by: Jeff Layton Signed-off-by: Steve French commit fcf5036f09694d09d946c0455f329894a6482a4d Author: Michael Ellerman Date: Fri Jan 11 23:53:46 2019 +1100 powerpc/4xx/ocm: Fix fix for phys_addr_t printf warnings My recent commit to fix the printf warnings in ocm.c got the format specifier wrong, because I copied it from the documentation without realising the square brackets are not meant as literals. This results in the address being suffixed with a literal "[p]". Actually tested this time: # cat info /sys/kernel/debug/ppc4xx_ocm PhysAddr : 0x0000000400040000 ... NC.PhysAddr : 0x0000000400040000 ... C.PhysAddr : 0x0000000000000000 Fixes: 52b88fa1e8c7 ("powerpc/4xx/ocm: Fix phys_addr_t printf warnings") Reported-by: Christian Lamparter Tested-by: Christian Lamparter Signed-off-by: Michael Ellerman commit 6bca515917515b66b7e1dfc1d1d3b7bd8058315c Author: Frederic Barrat Date: Wed Jan 9 16:13:42 2019 +0100 powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group() With a recent change around IOMMU group, a system with an opencapi adapter is no longer booting and we get a kernel oops: BUG: Kernel NULL pointer dereference at 0x00000028 Faulting instruction address: 0xc0000000000aa38c ... NIP pnv_try_setup_npu_table_group+0x1c/0x1a0 LR pnv_pci_ioda_fixup+0x1f8/0x660 Call Trace: pnv_try_setup_npu_table_group+0x60/0x pnv_pci_ioda_fixup+0x20c/0x660 pcibios_resource_survey+0x2c8/0x31c pcibios_init+0xb0/0xe4 do_one_initcall+0x64/0x264 kernel_init_freeable+0x36c/0x468 kernel_init+0x2c/0x148 ret_from_kernel_thread+0x5c/0x68 An opencapi device is using a device PE, so the current code breaks because pe->pbus is not defined. More generally, there's no need to define an IOMMU group for opencapi, as the device sends real addresses directly (admittedly, the virtualization story is yet to be written). So let's fix it by skipping the IOMMU group setup for opencapi PHBs. Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") Signed-off-by: Frederic Barrat Reviewed-by: Greg Kurz Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 897bc3df8c5aebb54c32d831f917592e873d0559 Author: Breno Leitao Date: Wed Jan 9 11:16:45 2019 -0200 powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM Commit e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") moved a code block around and this block uses a 'msr' variable outside of the CONFIG_PPC_TRANSACTIONAL_MEM, however the 'msr' variable is declared inside a CONFIG_PPC_TRANSACTIONAL_MEM block, causing a possible error when CONFIG_PPC_TRANSACTION_MEM is not defined. error: 'msr' undeclared (first use in this function) This is not causing a compilation error in the mainline kernel, because 'msr' is being used as an argument of MSR_TM_ACTIVE(), which is defined as the following when CONFIG_PPC_TRANSACTIONAL_MEM is *not* set: #define MSR_TM_ACTIVE(x) 0 This patch just fixes this issue avoiding the 'msr' variable usage outside the CONFIG_PPC_TRANSACTIONAL_MEM block, avoiding trusting in the MSR_TM_ACTIVE() definition. Cc: stable@vger.kernel.org Reported-by: Christoph Biedl Fixes: e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit fb0bdec51a4901b7dd088de0a1e365e1b9f5cd21 Author: Christophe Leroy Date: Wed Jan 9 20:30:07 2019 +0000 powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool. Commit 8c8c10b90d88 ("powerpc/8xx: fix handling of early NULL pointer dereference") moved the loading of r6 earlier in the code. As some functions are called inbetween, r6 needs to be loaded again with the address of swapper_pg_dir in order to set PTE pointers for the Abatron BDI. Fixes: 8c8c10b90d88 ("powerpc/8xx: fix handling of early NULL pointer dereference") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d7b6cc199b2dea602b4a2a681cf6d3223a61e2be Author: Dan Carpenter Date: Wed Jan 9 13:23:29 2019 +0300 powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group() There is a typo so we accidentally allocate enough memory for a pointer when we wanted to allocate enough for a struct. Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") Signed-off-by: Dan Carpenter Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 21face6f0d4d033d949d5517f307a15f76a9d9f2 Author: Gustavo A. R. Silva Date: Fri Jan 4 23:55:27 2019 -0600 ARM: integrator: impd1: use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva commit 279667212ab2a4f36c3b0347657ddcc11f9cfa25 Author: AKASHI Takahiro Date: Fri Jan 11 16:40:21 2019 +0900 arm64: kexec_file: return successfully even if kaslr-seed doesn't exist In kexec_file_load, kaslr-seed property of the current dtb will be deleted any way before setting a new value if possible. It doesn't matter whether it exists in the current dtb. So "ret" should be reset to 0 here. Fixes: commit 884143f60c89 ("arm64: kexec_file: add kaslr support") Signed-off-by: AKASHI Takahiro Signed-off-by: Will Deacon commit c7777236dd8f587f6a8d6800c03df318fd4d2627 Author: Jean-Philippe Brucker Date: Thu Jan 10 18:41:51 2019 +0000 ACPI/IORT: Fix rc_dma_get_range() When executed for a PCI_ROOT_COMPLEX type, iort_match_node_callback() expects the opaque pointer argument to be a PCI bus device. At the moment rc_dma_get_range() passes the PCI endpoint instead of the bus, and we've been lucky to have pci_domain_nr(ptr) return 0 instead of crashing. Pass the bus device to iort_scan_node(). Fixes: 5ac65e8c8941 ("ACPI/IORT: Support address size limit for root complexes") Reported-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Lorenzo Pieralisi Reviewed-by: Eric Auger Acked-by: Robin Murphy Cc: stable@vger.kernel.org Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: "Rafael J. Wysocki" Signed-off-by: Will Deacon commit fb4129b9279dc40be51060004e8f5e4b360739b8 Merge: beaf3d1901f4e 298e59d322954 Author: Daniel Borkmann Date: Fri Jan 11 10:40:55 2019 +0100 Merge branch 'bpf-fix-bitfield-printing' Yonghong Song says: ==================== The previous BTF kind_flag support patch set introduced a bug for kernel bpffs pretty printing and another bug for bpftool map pretty printing. If a bitfield struct member offset is greater than 256 bits, printed value for that struct member will be incorrect. - Patch #1 fixed the bug in kernel bpffs pretty printing. - Patch #2 enhanced the test_btf test case to cover the issue exposed by patch #1. - Patch #3 fixed the bug in bpftool map pretty printing. ==================== Signed-off-by: Daniel Borkmann commit 298e59d322954e89ed2a556c601a04a4c007d1b3 Author: Yonghong Song Date: Thu Jan 10 11:14:02 2019 -0800 tools/bpf: fix bpftool map dump with bitfields Commit 8772c8bc093b ("tools: bpftool: support pretty print with kind_flag set") added bpftool map dump with kind_flag support. When bitfield_size can be retrieved directly from btf_member, function btf_dumper_bitfield() is called to dump the bitfield. The implementation passed the wrong parameter "bit_offset" to the function. The excepted value is the bit_offset within a byte while the passed-in value is the struct member offset. This commit fixed the bug with passing correct "bit_offset" with adjusted data pointer. Fixes: 8772c8bc093b ("tools: bpftool: support pretty print with kind_flag set") Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit e43207fa2e6130e39e3aca4c55e2ee21cfb46828 Author: Yonghong Song Date: Thu Jan 10 11:14:01 2019 -0800 tools/bpf: test btf bitfield with >=256 struct member offset This patch modified test_btf pretty print test to cover the bitfield with struct member equal to or greater 256. Without the previous kernel patch fix, the modified test will fail: $ test_btf -p ...... BTF pretty print array(#1)......unexpected pprint output expected: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x1} read: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x0} BTF pretty print array(#2)......unexpected pprint output expected: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x1} read: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x0} PASS:6 SKIP:0 FAIL:2 With the kernel fix, the modified test will succeed: $ test_btf -p ...... BTF pretty print array(#1)......OK BTF pretty print array(#2)......OK PASS:8 SKIP:0 FAIL:0 Fixes: 9d5f9f701b18 ("bpf: btf: fix struct/union/fwd types with kind_flag") Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 17e3ac812541f73224299d8958ddb420c2d5bbd8 Author: Yonghong Song Date: Thu Jan 10 11:14:00 2019 -0800 bpf: fix bpffs bitfield pretty print Commit 9d5f9f701b18 ("bpf: btf: fix struct/union/fwd types with kind_flag") introduced kind_flag and used bitfield_size in the btf_member to directly pretty print member values. The commit contained a bug where the incorrect parameters could be passed to function btf_bitfield_seq_show(). The bits_offset parameter in the function expects a value less than 8. Instead, the member offset in the structure is passed. The below is btf_bitfield_seq_show() func signature: void btf_bitfield_seq_show(void *data, u8 bits_offset, u8 nr_bits, struct seq_file *m) both bits_offset and nr_bits are u8 type. If the bitfield member offset is greater than 256, incorrect value will be printed. This patch fixed the issue by calculating correct proper data offset and bits_offset similar to non kind_flag case. Fixes: 9d5f9f701b18 ("bpf: btf: fix struct/union/fwd types with kind_flag") Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 06382deac2b8a49bbc5aaa3c9118fed6da4a1ac1 Author: Greg Kroah-Hartman Date: Fri Jan 11 10:40:13 2019 +0100 Revert "staging: rtl8723bs: Mark ACPI table declaration as used" This reverts commit e6d093719e22a09e778edde192dfd89a0cd77b5c. Turns out it is not needed at all, a fix for clang was made and accepted upstream in that project that makes this change unnecessary. So revert it. Reported-by: Nick Desaulniers Cc: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman commit e2d3c414ec0f9d1557c8c5ff2c32166e68bbc4ad Merge: 95681cda8dcc3 f299e0bdbaeb6 Author: Daniel Vetter Date: Fri Jan 11 10:26:21 2019 +0100 Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes i915 fixes for v5.0-rc2: - Disable PSR for Apple panels - Broxton ERR_PTR error state fix - Kabylake VECS workaround fix - Unwind failure on pinning the gen7 ppgtt - GVT workload request allocation fix Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87pnt35z8h.fsf@intel.com commit 95681cda8dcc3e90f25b3e0c84c49778dae43346 Merge: ae5e5ae90d326 4089e272ac616 Author: Daniel Vetter Date: Fri Jan 11 10:25:05 2019 +0100 Merge tag 'drm-misc-fixes-2019-01-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Second pull request, drm-misc-fixes for v5.0-rc2: - Fix fb-helper to work correctly with SDL 1.2 bugs. - Fix lockdep warning in the atomic ioctl and setproperty. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/2cf24f5c-2b1f-befa-8d08-058661146b61@linux.intel.com commit 65a4f3a1efda8e0cc2516301fc3ad64e3eca716c Merge: 2b531d71595d2 2e61069b056f7 7d7b467cb95bf b9ced18acf68d Author: Rafael J. Wysocki Date: Fri Jan 11 10:12:07 2019 +0100 Merge branches 'acpi-pci', 'acpi-power' and 'acpi-misc' * acpi-pci: ACPI: Fix build failure when CONFIG_NLS is set to 'n' * acpi-power: ACPI: power: Skip duplicate power resource references in _PRx * acpi-misc: ACPI: NUMA: Use correct type for printing addresses on i386-PAE commit 343e60e52a3a093bb7baeca441789724fcac4bb5 Merge: ca27e4cd0bdd8 7604bf0920985 0e141d1c65c1d 6e863844ad6ef Author: Rafael J. Wysocki Date: Fri Jan 11 10:09:51 2019 +0100 Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-sleep' * pm-cpuidle: doc: trace: fix reference to cpuidle documentation file cpuidle / Documentation: Update cpuidle MAINTAINERS entry * pm-cpufreq: cpufreq: scmi: Fix frequency invariance in slow path cpufreq: check if policy is inactive early in __cpufreq_get() cpufreq: scpi/scmi: Fix freeing of dynamic OPPs cpufreq / Documentation: Update cpufreq MAINTAINERS entry * pm-sleep: PM: sleep: call devfreq suspend/resume commit d04e779fb1dbeedf8a60b66d0d0048be4e65d366 Author: Wei Yongjun Date: Thu Jan 10 14:07:42 2019 +0000 gpio: pca953x: Make symbol 'pca953x_i2c_regmap' static Fixes the following sparse warning: drivers/gpio/gpio-pca953x.c:292:28: warning: symbol 'pca953x_i2c_regmap' was not declared. Should it be static? Fixes: 49427232764d ("gpio: pca953x: Perform basic regmap conversion") Signed-off-by: Wei Yongjun Reviewed-by: Marek Vasut Signed-off-by: Linus Walleij commit ae5e5ae90d32667e107ba0bd2f1dc9e20a08dfaf Merge: f34c48e06ddcc a5176a4cb85bb Author: Dave Airlie Date: Fri Jan 11 17:25:00 2019 +1000 Merge branch 'linux-4.21' of git://github.com/skeggsb/linux into drm-fixes 3 nouveau fixes: one backlight, falcon register access, and a fan fix. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4MHr=Rq3FkZFTYWPc7o5-dTWFysXB=wN2L91SYeFbzkQ@mail.gmail.com commit 4e72ee8872279a70ebe973172133b98e8acbf54e Merge: 576b50ea23569 15c03092a9fbc Author: Ingo Molnar Date: Fri Jan 11 08:12:09 2019 +0100 Merge tag 'perf-core-for-mingo-5.0-20190110' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo: perf trace: Ravi Bangoria: - Rework PowerPC syscall table generation, now using a .tbl file just like x86_64 and S/390, also silencing a tools build warning about headers out of sync with the kernel sources. tools include uapi: Arnaldo Carvalho de Melo: - Sync linux/if_link.h copy with the kernel sources, silencing a build warning. perf top: Arnaldo Carvalho de Melo: - Add 'arch_cpu_idle' to the list of kernel idle symbols, noticed on a Orange Pi Zero ARM board, just like with other symbols in other arches. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a5176a4cb85bb6213daadf691097cf411da35df2 Author: Ilia Mirkin Date: Thu Dec 13 22:44:08 2018 -0500 drm/nouveau/falcon: avoid touching registers if engine is off Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 118780066e30c34de3d9349710b51780bfa0ba83 Author: Takashi Iwai Date: Wed Sep 12 12:58:43 2018 +0200 drm/nouveau: Don't disable polling in fallback mode When a fan is controlled via linear fallback without cstate, we shouldn't stop polling. Otherwise it won't be adjusted again and keeps running at an initial crazy pace. Fixes: 800efb4c2857 ("drm/nouveau/drm/therm/fan: add a fallback if no fan control is specified in the vbios") Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1103356 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107447 Reported-by: Thomas Blume Signed-off-by: Takashi Iwai Reviewed-by: Martin Peres Signed-off-by: Ben Skeggs commit 15f77c4ade3364106a3a397f0a8d6fce9d6a6326 Author: Ben Skeggs Date: Fri Jan 11 16:08:20 2019 +1000 drm/nouveau: register backlight on pascal and newer Signed-off-by: Ben Skeggs commit 5b0e7310a2a33c06edc7eb81ffc521af9b2c5610 Author: Stephen Smalley Date: Wed Jan 9 10:55:10 2019 -0500 selinux: fix GPF on invalid policy levdatum->level can be NULL if we encounter an error while loading the policy during sens_read prior to initializing it. Make sure sens_destroy handles that case correctly. Reported-by: syzbot+6664500f0f18f07a5c0e@syzkaller.appspotmail.com Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 9d9f59b4204bc41896c866b3e5856e5b416aa199 Author: Leon Romanovsky Date: Thu Jan 10 08:15:45 2019 +0200 RDMA/mthca: Clear QP objects during their allocation As part of audit process to update drivers to use rdma_restrack_add() ensure that QP objects is cleared before access. Such change fixes the crash observed with uninitialized non zero sgid attr accessed by ib_destroy_qp(). CPU: 3 PID: 74 Comm: kworker/u16:1 Not tainted 4.19.10-300.fc29.x86_64 Workqueue: ipoib_wq ipoib_cm_tx_reap [ib_ipoib] RIP: 0010:rdma_put_gid_attr+0x9/0x30 [ib_core] RSP: 0018:ffffb7ad819dbde8 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff8d1bdf5a2e00 RCX: 0000000000002699 RDX: 206c656e72656af8 RSI: ffff8d1bf7ae6160 RDI: 206c656e72656b20 RBP: 0000000000000000 R08: 0000000000026160 R09: ffffffffc06b45bf R10: ffffe849887da000 R11: 0000000000000002 R12: ffff8d1be30cb400 R13: ffff8d1bdf681800 R14: ffff8d1be2272400 R15: ffff8d1be30ca000 FS: 0000000000000000(0000) GS:ffff8d1bf7ac0000(0000) knlGS:0000000000000000 Trace: ib_destroy_qp+0xc9/0x240 [ib_core] ipoib_cm_tx_reap+0x1f9/0x4e0 [ib_ipoib] process_one_work+0x1a1/0x3a0 worker_thread+0x30/0x380 ? pwq_unbound_release_workfn+0xd0/0xd0 kthread+0x112/0x130 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x22/0x40 Reported-by: Alexander Murashkin Tested-by: Alexander Murashkin Fixes: 1a1f460ff151 ("RDMA: Hold the sgid_attr inside the struct ib_ah/qp") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6325e01b6cdf4636b721cf7259c1616e3cf28ce2 Author: Adit Ranadive Date: Wed Jan 9 23:08:49 2019 +0000 RDMA/vmw_pvrdma: Return the correct opcode when creating WR Since the IB_WR_REG_MR opcode value changed, let's set the PVRDMA device opcodes explicitly. Reported-by: Ruishuang Wang Fixes: 9a59739bd01f ("IB/rxe: Revise the ib_wr_opcode enum") Cc: stable@vger.kernel.org Reviewed-by: Bryan Tan Reviewed-by: Ruishuang Wang Reviewed-by: Vishnu Dasa Signed-off-by: Adit Ranadive Signed-off-by: Jason Gunthorpe commit 10f4e765879e514e1ce7f52ed26603047af196e2 Author: wenxu Date: Thu Jan 10 14:51:35 2019 +0800 netfilter: nft_flow_offload: fix interaction with vrf slave device In the forward chain, the iif is changed from slave device to master vrf device. Thus, flow offload does not find a match on the lower slave device. This patch uses the cached route, ie. dst->dev, to update the iif and oif fields in the flow entry. After this patch, the following example works fine: # ip addr add dev eth0 1.1.1.1/24 # ip addr add dev eth1 10.0.0.1/24 # ip link add user1 type vrf table 1 # ip l set user1 up # ip l set dev eth0 master user1 # ip l set dev eth1 master user1 # nft add table firewall # nft add flowtable f fb1 { hook ingress priority 0 \; devices = { eth0, eth1 } \; } # nft add chain f ftb-all {type filter hook forward priority 0 \; policy accept \; } # nft add rule f ftb-all ct zone 1 ip protocol tcp flow offload @fb1 # nft add rule f ftb-all ct zone 1 ip protocol udp flow offload @fb1 Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit e2c8d550a973bb34fc28bc8d0ec996f84562fb8a Author: Shakeel Butt Date: Wed Jan 2 19:14:31 2019 -0800 netfilter: ebtables: account ebt_table_info to kmemcg The [ip,ip6,arp]_tables use x_tables_info internally and the underlying memory is already accounted to kmemcg. Do the same for ebtables. The syzbot, by using setsockopt(EBT_SO_SET_ENTRIES), was able to OOM the whole system from a restricted memcg, a potential DoS. By accounting the ebt_table_info, the memory used for ebt_table_info can be contained within the memcg of the allocating process. However the lifetime of ebt_table_info is independent of the allocating process and is tied to the network namespace. So, the oom-killer will not be able to relieve the memory pressure due to ebt_table_info memory. The memory for ebt_table_info is allocated through vmalloc. Currently vmalloc does not handle the oom-killed allocating process correctly and one large allocation can bypass memcg limit enforcement. So, with this patch, at least the small allocations will be contained. For large allocations, we need to fix vmalloc. Reported-by: syzbot+7713f3aa67be76b1552c@syzkaller.appspotmail.com Signed-off-by: Shakeel Butt Reviewed-by: Kirill Tkhai Signed-off-by: Pablo Neira Ayuso commit b67d4530cdade7ebfafa2c6b46f2a0dad3e41bcb Author: Sowjanya Komatineni Date: Tue Jan 8 13:59:10 2019 -0800 i2c: tegra: Fix Maximum transfer size Tegra194 supports maximum 64K Bytes transfer per packet. Tegra186 and prior supports maximum 4K Bytes transfer per packet. This patch fixes this payload difference between Tegra194 and prior Tegra chipsets using separate i2c_adapter_quirks. Signed-off-by: Sowjanya Komatineni Acked-by: Thierry Reding Signed-off-by: Wolfram Sang commit 6ebec961d59bccf65d08b13fc1ad4e6272a89338 Author: Yi Zeng Date: Wed Jan 9 15:33:07 2019 +0800 i2c: dev: prevent adapter retries and timeout being set as minus value If adapter->retries is set to a minus value from user space via ioctl, it will make __i2c_transfer and __i2c_smbus_xfer skip the calling to adapter->algo->master_xfer and adapter->algo->smbus_xfer that is registered by the underlying bus drivers, and return value 0 to all the callers. The bus driver will never be accessed anymore by all users, besides, the users may still get successful return value without any error or information log print out. If adapter->timeout is set to minus value from user space via ioctl, it will make the retrying loop in __i2c_transfer and __i2c_smbus_xfer always break after the the first try, due to the time_after always returns true. Signed-off-by: Yi Zeng [wsa: minor grammar updates to commit message] Signed-off-by: Wolfram Sang Cc: stable@kernel.org commit 2076607a20bd4dfba699185616cbbbce06d3fa59 Author: Fabio Estevam Date: Wed Dec 26 10:06:19 2018 -0200 qcom-scm: Include header Since commit e6f6d63ed14c ("drm/msm: add headless gpu device for imx5") the DRM_MSM symbol can be selected by SOC_IMX5 causing the following error when building imx_v6_v7_defconfig: In file included from ../drivers/gpu/drm/msm/adreno/a5xx_gpu.c:17:0: ../include/linux/qcom_scm.h: In function 'qcom_scm_set_cold_boot_addr': ../include/linux/qcom_scm.h:73:10: error: 'ENODEV' undeclared (first use in this function) return -ENODEV; Include the header file to fix this problem. Reported-by: kernelci.org bot Fixes: e6f6d63ed14c ("drm/msm: add headless gpu device for imx5") Signed-off-by: Fabio Estevam Reviewed-by: Bjorn Andersson Tested-by: Guenter Roeck Signed-off-by: Andy Gross commit a39c330d7436530151a619319f7ff6e9b3a6d8c6 Merge: 5db470e229e22 b8a38ea64dc71 Author: Jens Axboe Date: Thu Jan 10 15:29:57 2019 -0700 Merge branch 'nvme-5.0' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph. * 'nvme-5.0' of git://git.infradead.org/nvme: nvme: don't initlialize ctrl->cntlid twice nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN nvme: pad fake subsys NQN vid and ssvid with zeros nvme-multipath: zero out ANA log buffer nvme-fabrics: unset write/poll queues for discovery controllers nvme-tcp: don't ask if controller is fabrics nvme-tcp: remove dead code nvme-pci: fix out of bounds access in nvme_cqe_pending nvme-pci: rerun irq setup on IO queue init errors nvme-pci: use the same attributes when freeing host_mem_desc_bufs. nvme-pci: fix the wrong setting of nr_maps commit 8ce5f84157530ffa64b3e0acf00b9261f41c8da8 Author: Rob Herring Date: Tue Dec 11 14:31:05 2018 -0600 of: Remove struct device_node.type pointer Now that all users of device_node.type pointer have been removed in favor of accessor functions, we can remove it. Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit de6629eb262e0dc52a2367db38e3d2780cff5427 Merge: 4f548c25a38ef a3869d43c9800 Author: Linus Torvalds Date: Thu Jan 10 14:16:47 2019 -0800 Merge tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix Amlogic Meson host controller driver build failure (Corentin Labbe)" * tag 'pci-v5.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: amlogic: Fix build failure due to missing gpio header commit b19bce0335e25b9069ddb10d234e673bbd46d2f4 Author: Heiner Kallweit Date: Wed Jan 9 08:20:28 2019 +0100 net: ethernet: mediatek: fix warning in phy_start_aneg linux 5.0-rc1 shows following warning on bpi-r2/mt7623 bootup: [ 5.170597] WARNING: CPU: 3 PID: 1 at drivers/net/phy/phy.c:548 phy_start_aneg+0x110/0x144 [ 5.178826] called from state READY .... [ 5.264111] [] (phy_start_aneg) from [] (mtk_init+0x414/0x47c) [ 5.271630] r7:df5f5eec r6:c0f08c48 r5:00000000 r4:dea67800 [ 5.277256] [] (mtk_init) from [] (register_netdevice+0x98/0x51c) [ 5.285035] r8:00000000 r7:00000000 r6:c0f97080 r5:c0f08c48 r4:dea67800 [ 5.291693] [] (register_netdevice) from [] (register_netdev+0x2c/0x44) [ 5.299989] r8:00000000 r7:dea2e608 r6:deacea00 r5:dea2e604 r4:dea67800 [ 5.306646] [] (register_netdev) from [] (mtk_probe+0x668/0x7ac) [ 5.314336] r5:dea2e604 r4:dea2e040 [ 5.317890] [] (mtk_probe) from [] (platform_drv_probe+0x58/0xa8) [ 5.325670] r10:c0f86bac r9:00000000 r8:c0fbe578 r7:00000000 r6:c0f86bac r5:00000000 [ 5.333445] r4:deacea10 [ 5.335963] [] (platform_drv_probe) from [] (really_probe+0x2d8/0x424) maybe other boards using this generic driver are affected v2: optimization: - phy_set_max_speed() is only needed if you want to reduce the max speed, typically if the PHY supports 1Gbps but the MAC supports 100Mbps only. - The pause parameters are autonegotiated. Except you have a specific need you normally don't need to manually fiddle with this. - phy_start_aneg() is called implicitly by the phylib state machine, you shouldn't call it manually except you have a good excuse. - netif_carrier_on/netif_carrier_off in mtk_phy_link_adjust() isn't needed. It's done by phy_link_change() in phylib. Signed-off-by: Frank Wunderlich Reviewed-by: Heiner Kallweit Acked-by: Sean Wang Signed-off-by: David S. Miller commit c5715b8fabfca0ef85903f8bad2189940ed41cc8 Author: Yuchung Cheng Date: Tue Jan 8 18:14:28 2019 -0800 tcp: change txhash on SYN-data timeout Previously upon SYN timeouts the sender recomputes the txhash to try a different path. However this does not apply on the initial timeout of SYN-data (active Fast Open). Therefore an active IPv6 Fast Open connection may incur one second RTO penalty to take on a new path after the second SYN retransmission uses a new flow label. This patch removes this undesirable behavior so Fast Open changes the flow label just like the regular connections. This also helps avoid falsely disabling Fast Open on the sender which triggers after two consecutive SYN timeouts on Fast Open. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Signed-off-by: David S. Miller commit ea89098ef9a574bceca00d3b5df14aaf0b3f9ccf Author: Andrew Lunn Date: Wed Jan 9 00:24:03 2019 +0100 net: dsa: mv88x6xxx: mv88e6390 errata The 6390 copper ports have an errata which require poking magic values into undocumented magic registers and then performing a software reset. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 001e465f09a18857443489a57e74314a3368c805 Author: Willem de Bruijn Date: Tue Jan 8 12:32:42 2019 -0500 bonding: update nest level on unlink A network device stack with multiple layers of bonding devices can trigger a false positive lockdep warning. Adding lockdep nest levels fixes this. Update the level on both enslave and unlink, to avoid the following series of events .. ip netns add test ip netns exec test bash ip link set dev lo addr 00:11:22:33:44:55 ip link set dev lo down ip link add dev bond1 type bond ip link add dev bond2 type bond ip link set dev lo master bond1 ip link set dev bond1 master bond2 ip link set dev bond1 nomaster ip link set dev bond2 master bond1 .. from still generating a splat: [ 193.652127] ====================================================== [ 193.658231] WARNING: possible circular locking dependency detected [ 193.664350] 4.20.0 #8 Not tainted [ 193.668310] ------------------------------------------------------ [ 193.674417] ip/15577 is trying to acquire lock: [ 193.678897] 00000000a40e3b69 (&(&bond->stats_lock)->rlock#3/3){+.+.}, at: bond_get_stats+0x58/0x290 [ 193.687851] but task is already holding lock: [ 193.693625] 00000000807b9d9f (&(&bond->stats_lock)->rlock#2/2){+.+.}, at: bond_get_stats+0x58/0x290 [..] [ 193.851092] lock_acquire+0xa7/0x190 [ 193.855138] _raw_spin_lock_nested+0x2d/0x40 [ 193.859878] bond_get_stats+0x58/0x290 [ 193.864093] dev_get_stats+0x5a/0xc0 [ 193.868140] bond_get_stats+0x105/0x290 [ 193.872444] dev_get_stats+0x5a/0xc0 [ 193.876493] rtnl_fill_stats+0x40/0x130 [ 193.880797] rtnl_fill_ifinfo+0x6c5/0xdc0 [ 193.885271] rtmsg_ifinfo_build_skb+0x86/0xe0 [ 193.890091] rtnetlink_event+0x5b/0xa0 [ 193.894320] raw_notifier_call_chain+0x43/0x60 [ 193.899225] netdev_change_features+0x50/0xa0 [ 193.904044] bond_compute_features.isra.46+0x1ab/0x270 [ 193.909640] bond_enslave+0x141d/0x15b0 [ 193.913946] do_set_master+0x89/0xa0 [ 193.918016] do_setlink+0x37c/0xda0 [ 193.921980] __rtnl_newlink+0x499/0x890 [ 193.926281] rtnl_newlink+0x48/0x70 [ 193.930238] rtnetlink_rcv_msg+0x171/0x4b0 [ 193.934801] netlink_rcv_skb+0xd1/0x110 [ 193.939103] rtnetlink_rcv+0x15/0x20 [ 193.943151] netlink_unicast+0x3b5/0x520 [ 193.947544] netlink_sendmsg+0x2fd/0x3f0 [ 193.951942] sock_sendmsg+0x38/0x50 [ 193.955899] ___sys_sendmsg+0x2ba/0x2d0 [ 193.960205] __x64_sys_sendmsg+0xad/0x100 [ 193.964687] do_syscall_64+0x5a/0x460 [ 193.968823] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 7e2556e40026 ("bonding: avoid lockdep confusion in bond_get_stats()") Reported-by: syzbot Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit f34c48e06ddcc197f2cf7cbc006ceb74e28e1ccf Merge: bd86c9e66c838 1c1eba86339c8 Author: Dave Airlie Date: Fri Jan 11 07:37:56 2019 +1000 Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes - Powerplay fixes - Virtual display pinning fixes - Golden register updates for vega - Pitch and gem size validation fixes - Fix for error case in sr-iov init - Disable page tables in system memory on RV due to issues with IOMMU reported on some platforms Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190109204336.3315-1-alexander.deucher@amd.com commit 4f548c25a38efb3589c4e797a6e87f6900345dc0 Merge: 1bdbe22749207 27de1f541f1f9 Author: Linus Torvalds Date: Thu Jan 10 13:36:53 2019 -0800 Merge tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V updates from Palmer Dabbelt: "This tag contains a handful of updates that slipped through the cracks during the merge window due to the holidays. The fixes are mostly independent, with the exception of one larger audit-related branch. Core RISC-V updates: - The BSS has been moved, which shrinks flat images. - A fix to test-bpf so it compiles on RV64I-based systems. - A fix to respect the kernel commandline when there is no device tree. - A fix to prevent CPUs from trying to put themselves to sleep when bringing down the system. - Support for MODULE_SECTIONS on RV32I-based systems. - [new in v2] The addition of an SBI earlycon driver. This is definately a new feature, but I'd like to include it now because I dropped this patch when submitting the merge window PR that removed our EARLY_PRINTK support. RISC-V audit updates: - The addition of NR_syscalls into unistd.h, which is necessary for CONFIG_FTRACE_SYSCALLS. - The definition of CREATE_TRACE_POINTS so __tracepoint_sys_{enter,exit} get defined. - A fix for trace_sys_exit() so we can enable HAVE_SYSCALL_TRACEPOINTS As usual, I've tested this by booting a Fedora-based image on a recent QEMU (this time just whatever I had lying around). * tag 'riscv-for-linus-4.21-rc2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: tty/serial: Add RISC-V SBI earlycon support riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig riscv: fix trace_sys_exit hook riscv: define CREATE_TRACE_POINTS in ptrace.c riscv: define NR_syscalls in unistd.h riscv: audit: add audit hook in do_syscall_trace_enter/exit() riscv: add audit support RISC-V: Support MODULE_SECTIONS mechanism on RV32 MAINTAINERS: SiFive drivers: add myself as a SiFive driver maintainer MAINTAINERS: SiFive drivers: change the git tree to a SiFive git tree riscv: don't stop itself in smp_send_stop arch: riscv: support kernel command line forcing when no DTB passed tools uapi: fix RISC-V 64-bit support RISC-V: Make BSS section as the last section in vmlinux.lds.S commit bd86c9e66c8385fb437c5ad506243304a8814b65 Merge: bfeffd1552837 f8c15790e4d8b Author: Dave Airlie Date: Fri Jan 11 06:32:37 2019 +1000 Merge tag 'drm-misc-fixes-2019-01-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Pull request for drm-misc-fixes for v5.0-rc2: - Fixes for the tc358767 bridge to work correctly with tc358867 using a DP connector. - Make resume work on amdgpu when a DP-MST display is unplugged. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1c47722d-c416-184d-4340-0dc6a614d685@linux.intel.com commit 8544f4aa9dd19a04d1244dae10feecc813ccf175 Author: Pavel Shilovsky Date: Sat Dec 22 12:40:05 2018 -0800 CIFS: Fix credit computation for compounded requests In SMB3 protocol every part of the compound chain consumes credits individually, so we need to call wait_for_free_credits() for each of the PDUs in the chain. If an operation is interrupted, we must ensure we return all credits taken from the server structure back. Without this patch server can sometimes disconnect the session due to credit mismatches, especially when first operation(s) are large writes. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable commit 33fa5c8b8a7dbe6353a56eaa654b790348890d42 Author: Pavel Shilovsky Date: Thu Jan 3 16:45:13 2019 -0800 CIFS: Do not set credits to 1 if the server didn't grant anything Currently we reset the number of total credits granted by the server to 1 if the server didn't grant us anything int the response. This violates the SMB3 protocol - we need to trust the server and use the credit values from the response. Fix this by removing the corresponding code. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable commit b983f7e92348d7e7d091db1b78b7915e9dd3d63a Author: Pavel Shilovsky Date: Wed Dec 19 22:49:09 2018 +0000 CIFS: Fix adjustment of credits for MTU requests Currently for MTU requests we allocate maximum possible credits in advance and then adjust them according to the request size. While we were adjusting the number of credits belonging to the server, we were skipping adjustment of credits belonging to the request. This patch fixes it by setting request credits to CreditCharge field value of SMB2 packet header. Also ask 1 credit more for async read and write operations to increase parallelism and match the behavior of other operations. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable commit c715f89c4dab76317c773df2611af2dac4dea2b7 Author: Dan Carpenter Date: Sat Jan 5 21:18:03 2019 +0300 cifs: Fix a tiny potential memory leak The most recent "it" allocation is leaked on this error path. I believe that small allocations always succeed in current kernels so this doesn't really affect run time. Fixes: 54be1f6c1c37 ("cifs: Add DFS cache routines") Signed-off-by: Dan Carpenter Signed-off-by: Steve French commit 8428817dc40006dca0a531cfa06e89cb3b41790d Author: Dan Carpenter Date: Sat Jan 5 15:25:29 2019 +0300 cifs: Fix a debug message This debug message was never shown because it was checking for NULL returns but extract_hostname() returns error pointers. Fixes: 93d5cb517db3 ("cifs: Add support for failover in cifs_reconnect()") Signed-off-by: Dan Carpenter Signed-off-by: Steve French Reviewed-by: Paulo Alcantara commit a214720cbf50cd8c3f76bbb9c3f5c283910e9d33 Author: YunQiang Su Date: Tue Jan 8 13:45:10 2019 +0800 Disable MSI also when pcie-octeon.pcie_disable on Octeon has an boot-time option to disable pcie. Since MSI depends on PCI-E, we should also disable MSI also with this option is on in order to avoid inadvertently accessing PCIe registers. Signed-off-by: YunQiang Su Signed-off-by: Paul Burton Cc: pburton@wavecomp.com Cc: linux-mips@vger.kernel.org Cc: aaro.koskinen@iki.fi Cc: stable@vger.kernel.org # v3.3+ commit b89d82ef01b33bc50cbaa8ff05607879b40d0704 Author: Will Deacon Date: Tue Jan 8 16:19:01 2019 +0000 arm64: kpti: Avoid rewriting early page tables when KASLR is enabled A side effect of commit c55191e96caa ("arm64: mm: apply r/o permissions of VM areas to its linear alias as well") is that the linear map is created with page granularity, which means that transitioning the early page table from global to non-global mappings when enabling kpti can take a significant amount of time during boot. Given that most CPU implementations do not require kpti, this mainly impacts KASLR builds where kpti is forcefully enabled. However, in these situations we know early on that non-global mappings are required and can avoid the use of global mappings from the beginning. The only gotcha is Cavium erratum #27456, which we must detect based on the MIDR value of the boot CPU. Reviewed-by: Ard Biesheuvel Reported-by: John Garry Signed-off-by: Will Deacon commit 1bdbe227492075d058e37cb3d400e6468d0095b5 Merge: f0ebbe9b18e0d 58fec830fc192 Author: Linus Torvalds Date: Thu Jan 10 09:20:46 2019 -0800 Merge tag 'vfio-v5.0-rc2' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - Fix trace header include path for in-tree builds (Masahiro Yamada) - Fix overflow in unmap wrap-around test (Alex Williamson) * tag 'vfio-v5.0-rc2' of git://github.com/awilliam/linux-vfio: vfio/type1: Fix unmap overflow off-by-one vfio/pci: set TRACE_INCLUDE_PATH to fix the build error commit f0ebbe9b18e0d2bb79c7963faf847b949d4f5720 Merge: e7446be4468bb d1dd42110d272 Author: Linus Torvalds Date: Thu Jan 10 09:17:48 2019 -0800 Merge tag 'sound-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes for USB-audio, HD-audio and cs46xx. The USB-audio fixes are for out-of-bound accesses and a regression in the recent cleanup, while HD-audio fixes are usual device-specific quirks" * tag 'sound-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225 ALSA: usb-audio: fix CM6206 register definitions ALSA: cs46xx: Potential NULL dereference in probe ALSA: hda/realtek - Support Dell headset mode for New AIO platform ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks ALSA: usb-audio: Always check descriptor sizes in parser code ALSA: usb-audio: Check mixer unit descriptors more strictly ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() commit e7446be4468bb24c9e45a153bcc9f29ec0372a6f Merge: 70c25259537c0 81d9bdf59092e Author: Linus Torvalds Date: Thu Jan 10 09:14:12 2019 -0800 Merge tag 'mtd/fixes-for-5.0-rc2' of git://git.infradead.org/linux-mtd Pull mtd fixes from Boris Brezillon: "Core MTD Fixes: - Fix a bug introduced when exposing MTD devs as NVMEM providers and check for add_mtd_device() return code everywhere raw NAND fixes: - Fix a memory corruption in the QCOM driver" * tag 'mtd/fixes-for-5.0-rc2' of git://git.infradead.org/linux-mtd: mtd: rawnand: qcom: fix memory corruption that causes panic mtd: Check add_mtd_device() ret code mtd: Fix the check on nvmem_register() ret code commit 5edc22cc1d33d6a88d175d25adc38d2a5cee134d Author: Marc Dionne Date: Wed Jan 9 17:23:54 2019 +0000 afs: Set correct lock type for the yfs CreateFile A lock type of 0 is "LockRead", which makes the fileserver record an unintentional read lock on the new file. This will cause problems later on if the file is the subject of locking operations. The correct default value should be -1 ("LockNone"). Fix the operation marshalling code to set the value and provide an enum to symbolise the values whilst we're at it. Fixes: 30062bd13e36 ("afs: Implement YFS support in the fs client") Signed-off-by: Marc Dionne Signed-off-by: David Howells commit c2b8bd49d35a768d3966c5e14e8f6971f2a63439 Author: Gustavo A. R. Silva Date: Wed Jan 9 17:23:54 2019 +0000 afs: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David Howells commit 1b3922a8bc74231f9a767d1be6d9a061a4d4eeab Author: Qu Wenruo Date: Tue Jan 8 14:08:18 2019 +0800 btrfs: Use real device structure to verify dev extent [BUG] Linux v5.0-rc1 will fail fstests/btrfs/163 with the following kernel message: BTRFS error (device dm-6): dev extent devid 1 physical offset 13631488 len 8388608 is beyond device boundary 0 BTRFS error (device dm-6): failed to verify dev extents against chunks: -117 BTRFS error (device dm-6): open_ctree failed [CAUSE] Commit cf90d884b347 ("btrfs: Introduce mount time chunk <-> dev extent mapping check") introduced strict check on dev extents. We use btrfs_find_device() with dev uuid and fs uuid set to NULL, and only dependent on @devid to find the real device. For seed devices, we call clone_fs_devices() in open_seed_devices() to allow us search seed devices directly. However clone_fs_devices() just populates devices with devid and dev uuid, without populating other essential members, like disk_total_bytes. This makes any device returned by btrfs_find_device(fs_info, devid, NULL, NULL) is just a dummy, with 0 disk_total_bytes, and any dev extents on the seed device will not pass the device boundary check. [FIX] This patch will try to verify the device returned by btrfs_find_device() and if it's a dummy then re-search in seed devices. Fixes: cf90d884b347 ("btrfs: Introduce mount time chunk <-> dev extent mapping check") CC: stable@vger.kernel.org # 4.19+ Reported-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit beaf3d1901f4ea46fbd5c9d857227d99751de469 Author: Song Liu Date: Tue Jan 8 14:20:44 2019 -0800 bpf: fix panic in stack_map_get_build_id() on i386 and arm32 As Naresh reported, test_stacktrace_build_id() causes panic on i386 and arm32 systems. This is caused by page_address() returns NULL in certain cases. This patch fixes this error by using kmap_atomic/kunmap_atomic instead of page_address. Fixes: 615755a77b24 (" bpf: extend stackmap to save binary_build_id+offset instead of address") Reported-by: Naresh Kamboju Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann commit f98937c6bb73ae11717a15aec85c187d33ca5d34 Author: Anders Roxell Date: Tue Jan 8 10:23:03 2019 +0100 selftests: bpf: install files tcp_(server|client)*.py When test_tcpbpf_user runs it complains that it can't find files tcp_server.py and tcp_client.py. Rework so that tcp_server.py and tcp_client.py gets installed, added them to the variable TEST_PROGS_EXTENDED. Fixes: d6d4f60c3a09 ("bpf: add selftest for tcpbpf") Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann commit df209c43a0e8258e096fb722dfbdae4f0dd13fde Author: Nicholas Mc Guire Date: Sat Dec 1 12:57:18 2018 +0100 gpio: pl061: handle failed allocations devm_kzalloc(), devm_kstrdup() and devm_kasprintf() all can fail internal allocation and return NULL. Using any of the assigned objects without checking is not safe. As this is early in the boot phase and these allocations really should not fail, any failure here is probably an indication of a more serious issue so it makes little sense to try and rollback the previous allocated resources or try to continue; but rather the probe function is simply exited with -ENOMEM. Signed-off-by: Nicholas Mc Guire Fixes: 684284b64aae ("ARM: integrator: add MMCI device to IM-PD1") Signed-off-by: Linus Walleij commit 11b36abc249f5e100d532c5271dae938fde85175 Author: Ioana Ciornei Date: Wed Jan 9 17:06:55 2019 +0000 samples: bpf: user proper argument index Use optind as index for argv instead of a hardcoded value. When the program has options this leads to improper parameter handling. Fixes: dc378a1ab5b6 ("samples: bpf: get ifindex from ifname") Signed-off-by: Ioana Ciornei Acked-by: Matteo Croce Signed-off-by: Daniel Borkmann commit e3ca63de8ade75757a067f6a5bd111d30cdcadb5 Author: Stanislav Fomichev Date: Tue Jan 8 16:07:28 2019 -0800 selftests/bpf: add missing executables to .gitignore We build test_libbpf with CXX to make sure linking against C++ works. $ make -s -C tools/lib/bpf $ git status -sb ? tools/lib/bpf/test_libbpf $ make -s -C tools/testing/selftests/bpf $ git status -sb ? tools/lib/bpf/test_libbpf ? tools/testing/selftests/bpf/test_libbpf Fixes: 8c4905b995c6 ("libbpf: make sure bpf headers are c++ include-able") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 7d033c9f6a7fd3821af75620a0257db87c2b552a Author: Eric Dumazet Date: Tue Jan 8 04:06:14 2019 -0800 ipv6: fix kernel-infoleak in ipv6_local_error() This patch makes sure the flow label in the IPv6 header forged in ipv6_local_error() is initialized. BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 CPU: 1 PID: 24675 Comm: syz-executor1 Not tainted 4.20.0-rc7+ #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613 kmsan_internal_check_memory+0x455/0xb00 mm/kmsan/kmsan.c:675 kmsan_copy_to_user+0xab/0xc0 mm/kmsan/kmsan_hooks.c:601 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 copy_to_user include/linux/uaccess.h:177 [inline] move_addr_to_user+0x2e9/0x4f0 net/socket.c:227 ___sys_recvmsg+0x5d7/0x1140 net/socket.c:2284 __sys_recvmsg net/socket.c:2327 [inline] __do_sys_recvmsg net/socket.c:2337 [inline] __se_sys_recvmsg+0x2fa/0x450 net/socket.c:2334 __x64_sys_recvmsg+0x4a/0x70 net/socket.c:2334 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x457ec9 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8750c06c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457ec9 RDX: 0000000000002000 RSI: 0000000020000400 RDI: 0000000000000005 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8750c076d4 R13: 00000000004c4a60 R14: 00000000004d8140 R15: 00000000ffffffff Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:204 [inline] kmsan_save_stack mm/kmsan/kmsan.c:219 [inline] kmsan_internal_chain_origin+0x134/0x230 mm/kmsan/kmsan.c:439 __msan_chain_origin+0x70/0xe0 mm/kmsan/kmsan_instr.c:200 ipv6_recv_error+0x1e3f/0x1eb0 net/ipv6/datagram.c:475 udpv6_recvmsg+0x398/0x2ab0 net/ipv6/udp.c:335 inet_recvmsg+0x4fb/0x600 net/ipv4/af_inet.c:830 sock_recvmsg_nosec net/socket.c:794 [inline] sock_recvmsg+0x1d1/0x230 net/socket.c:801 ___sys_recvmsg+0x4d5/0x1140 net/socket.c:2278 __sys_recvmsg net/socket.c:2327 [inline] __do_sys_recvmsg net/socket.c:2337 [inline] __se_sys_recvmsg+0x2fa/0x450 net/socket.c:2334 __x64_sys_recvmsg+0x4a/0x70 net/socket.c:2334 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:204 [inline] kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:158 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:185 slab_post_alloc_hook mm/slab.h:446 [inline] slab_alloc_node mm/slub.c:2759 [inline] __kmalloc_node_track_caller+0xe18/0x1030 mm/slub.c:4383 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x309/0xa20 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:998 [inline] ipv6_local_error+0x1a7/0x9e0 net/ipv6/datagram.c:334 __ip6_append_data+0x129f/0x4fd0 net/ipv6/ip6_output.c:1311 ip6_make_skb+0x6cc/0xcf0 net/ipv6/ip6_output.c:1775 udpv6_sendmsg+0x3f8e/0x45d0 net/ipv6/udp.c:1384 inet_sendmsg+0x54a/0x720 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg net/socket.c:631 [inline] __sys_sendto+0x8c4/0xac0 net/socket.c:1788 __do_sys_sendto net/socket.c:1800 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:1796 __x64_sys_sendto+0x6e/0x90 net/socket.c:1796 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Bytes 4-7 of 28 are uninitialized Memory access of size 28 starts at ffff8881937bfce0 Data copied to user address 0000000020000000 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 85704cb8dcfd88d351bfc87faaeba1c8214f3177 Author: Konstantin Khlebnikov Date: Tue Jan 8 12:30:00 2019 +0300 net/core/neighbour: tell kmemleak about hash tables This fixes false-positive kmemleak reports about leaked neighbour entries: unreferenced object 0xffff8885c6e4d0a8 (size 1024): comm "softirq", pid 0, jiffies 4294922664 (age 167640.804s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 20 2c f3 83 ff ff ff ff ........ ,...... 08 c0 ef 5f 84 88 ff ff 01 8c 7d 02 01 00 00 00 ..._......}..... backtrace: [<00000000748509fe>] ip6_finish_output2+0x887/0x1e40 [<0000000036d7a0d8>] ip6_output+0x1ba/0x600 [<0000000027ea7dba>] ip6_send_skb+0x92/0x2f0 [<00000000d6e2111d>] udp_v6_send_skb.isra.24+0x680/0x15e0 [<000000000668a8be>] udpv6_sendmsg+0x18c9/0x27a0 [<000000004bd5fa90>] sock_sendmsg+0xb3/0xf0 [<000000008227b29f>] ___sys_sendmsg+0x745/0x8f0 [<000000008698009d>] __sys_sendmsg+0xde/0x170 [<00000000889dacf1>] do_syscall_64+0x9b/0x400 [<0000000081cdb353>] entry_SYSCALL_64_after_hwframe+0x49/0xbe [<000000005767ed39>] 0xffffffffffffffff Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller commit fd21c89b876565df76051eca395018de2280f8e1 Author: Colin Ian King Date: Mon Jan 7 23:48:09 2019 +0000 net: cxgb4: fix various indentation issues There are some lines that have indentation issues, fix these. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 2acc0abc882ac3be47719e189f3db006493ab640 Author: Colin Ian King Date: Mon Jan 7 23:39:24 2019 +0000 net: cxgb3: fix various indentation issues There are handful of lines that have indentation issues, fix these. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 4a06fa67c4da20148803525151845276cdb995c1 Author: Willem de Bruijn Date: Mon Jan 7 16:47:33 2019 -0500 ip: on queued skb use skb_header_pointer instead of pskb_may_pull Commit 2efd4fca703a ("ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull") avoided a read beyond the end of the skb linear segment by calling pskb_may_pull. That function can trigger a BUG_ON in pskb_expand_head if the skb is shared, which it is when when peeking. It can also return ENOMEM. Avoid both by switching to safer skb_header_pointer. Fixes: 2efd4fca703a ("ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull") Reported-by: syzbot Suggested-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 0b7959b6257322f7693b08a459c505d4938646f2 Author: Stanislav Fomichev Date: Mon Jan 7 13:38:38 2019 -0800 tun: publish tfile after it's fully initialized BUG: unable to handle kernel NULL pointer dereference at 00000000000000d1 Call Trace: ? napi_gro_frags+0xa7/0x2c0 tun_get_user+0xb50/0xf20 tun_chr_write_iter+0x53/0x70 new_sync_write+0xff/0x160 vfs_write+0x191/0x1e0 __x64_sys_write+0x5e/0xd0 do_syscall_64+0x47/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 I think there is a subtle race between sending a packet via tap and attaching it: CPU0: CPU1: tun_chr_ioctl(TUNSETIFF) tun_set_iff tun_attach rcu_assign_pointer(tfile->tun, tun); tun_fops->write_iter() tun_chr_write_iter tun_napi_alloc_frags napi_get_frags napi->skb = napi_alloc_skb tun_napi_init netif_napi_add napi->skb = NULL napi->skb is NULL here napi_gro_frags napi_frags_skb skb = napi->skb skb_reset_mac_header(skb) panic() Move rcu_assign_pointer(tfile->tun) and rcu_assign_pointer(tun->tfiles) to be the last thing we do in tun_attach(); this should guarantee that when we call tun_get() we always get an initialized object. v2 changes: * remove extra napi_mutex locks/unlocks for napi operations Reported-by: syzbot Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Stanislav Fomichev Signed-off-by: David S. Miller commit 9f51c05dc41a6d69423e3d03d18eb7ab22f9ec19 Author: Wen Yang Date: Wed Dec 5 10:35:50 2018 +0800 pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock The problem is that we call this with a spin lock held. The call tree is: pvcalls_front_accept() holds bedata->socket_lock. -> create_active() -> __get_free_pages() uses GFP_KERNEL The create_active() function is only called from pvcalls_front_accept() with a spin_lock held, The allocation is not allowed to sleep and GFP_KERNEL is not sufficient. This issue was detected by using the Coccinelle software. v2: Add a function doing the allocations which is called outside the lock and passing the allocated data to create_active(). v3: Use the matching deallocators i.e., free_page() and free_pages(), respectively. v4: It would be better to pre-populate map (struct sock_mapping), rather than introducing one more new struct. v5: Since allocating the data outside of this call it should also be freed outside, when create_active() fails. Move kzalloc(sizeof(*map2), GFP_ATOMIC) outside spinlock and use GFP_KERNEL instead. v6: Drop the superfluous calls. Suggested-by: Juergen Gross Suggested-by: Boris Ostrovsky Suggested-by: Stefano Stabellini Signed-off-by: Wen Yang Acked-by: Stefano Stabellini CC: Julia Lawall CC: Boris Ostrovsky CC: Juergen Gross CC: Stefano Stabellini CC: xen-devel@lists.xenproject.org CC: linux-kernel@vger.kernel.org Signed-off-by: Boris Ostrovsky commit 15c03092a9fbcdd041f58e5f832bf76c21c42e6a Author: Ravi Bangoria Date: Thu Jan 10 15:19:36 2019 +0530 tools headers powerpc: Remove unistd.h We use syscall.tbl to generate system call table on powerpc. The unistd.h copy is no longer required now. Remove it. Signed-off-by: Ravi Bangoria Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20190110094936.3132-2-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit d45a90cb5d061fa7d411b974b950fe0b8bc5f265 Author: Eric Biggers Date: Tue Jan 8 22:12:41 2019 -0800 crypto: sm3 - fix undefined shift by >= width of value sm3_compress() calls rol32() with shift >= 32, which causes undefined behavior. This is easily detected by enabling CONFIG_UBSAN. Explicitly AND with 31 to make the behavior well defined. Fixes: 4f0fc1600edb ("crypto: sm3 - add OSCCA SM3 secure hash") Cc: # v4.15+ Cc: Gilad Ben-Yossef Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1bea445b0a022ee126ca328b3705cd4df18ebc14 Author: Christophe Leroy Date: Tue Jan 8 06:56:48 2019 +0000 crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK [ 2.364486] WARNING: CPU: 0 PID: 60 at ./arch/powerpc/include/asm/io.h:837 dma_nommu_map_page+0x44/0xd4 [ 2.373579] CPU: 0 PID: 60 Comm: cryptomgr_test Tainted: G W 4.20.0-rc5-00560-g6bfb52e23a00-dirty #531 [ 2.384740] NIP: c000c540 LR: c000c584 CTR: 00000000 [ 2.389743] REGS: c95abab0 TRAP: 0700 Tainted: G W (4.20.0-rc5-00560-g6bfb52e23a00-dirty) [ 2.400042] MSR: 00029032 CR: 24042204 XER: 00000000 [ 2.406669] [ 2.406669] GPR00: c02f2244 c95abb60 c6262990 c95abd80 0000256a 00000001 00000001 00000001 [ 2.406669] GPR08: 00000000 00002000 00000010 00000010 24042202 00000000 00000100 c95abd88 [ 2.406669] GPR16: 00000000 c05569d4 00000001 00000010 c95abc88 c0615664 00000004 00000000 [ 2.406669] GPR24: 00000010 c95abc88 c95abc88 00000000 c61ae210 c7ff6d40 c61ae210 00003d68 [ 2.441559] NIP [c000c540] dma_nommu_map_page+0x44/0xd4 [ 2.446720] LR [c000c584] dma_nommu_map_page+0x88/0xd4 [ 2.451762] Call Trace: [ 2.454195] [c95abb60] [82000808] 0x82000808 (unreliable) [ 2.459572] [c95abb80] [c02f2244] talitos_edesc_alloc+0xbc/0x3c8 [ 2.465493] [c95abbb0] [c02f2600] ablkcipher_edesc_alloc+0x4c/0x5c [ 2.471606] [c95abbd0] [c02f4ed0] ablkcipher_encrypt+0x20/0x64 [ 2.477389] [c95abbe0] [c02023b0] __test_skcipher+0x4bc/0xa08 [ 2.483049] [c95abe00] [c0204b60] test_skcipher+0x2c/0xcc [ 2.488385] [c95abe20] [c0204c48] alg_test_skcipher+0x48/0xbc [ 2.494064] [c95abe40] [c0205cec] alg_test+0x164/0x2e8 [ 2.499142] [c95abf00] [c0200dec] cryptomgr_test+0x48/0x50 [ 2.504558] [c95abf10] [c0039ff4] kthread+0xe4/0x110 [ 2.509471] [c95abf40] [c000e1d0] ret_from_kernel_thread+0x14/0x1c [ 2.515532] Instruction dump: [ 2.518468] 7c7e1b78 7c9d2378 7cbf2b78 41820054 3d20c076 8089c200 3d20c076 7c84e850 [ 2.526127] 8129c204 7c842e70 7f844840 419c0008 <0fe00000> 2f9e0000 54847022 7c84fa14 [ 2.533960] ---[ end trace bf78d94af73fe3b8 ]--- [ 2.539123] talitos ff020000.crypto: master data transfer error [ 2.544775] talitos ff020000.crypto: TEA error: ISR 0x20000000_00000040 [ 2.551625] alg: skcipher: encryption failed on test 1 for ecb-aes-talitos: ret=22 IV cannot be on stack when CONFIG_VMAP_STACK is selected because the stack cannot be DMA mapped anymore. This patch copies the IV into the extended descriptor. Fixes: 4de9d0b547b9 ("crypto: talitos - Add ablkcipher algorithms") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit c56c2e173773097a248fd3bace91ac8f6fc5386d Author: Christophe Leroy Date: Tue Jan 8 06:56:46 2019 +0000 crypto: talitos - reorder code in talitos_edesc_alloc() This patch moves the mapping of IV after the kmalloc(). This avoids having to unmap in case kmalloc() fails. Signed-off-by: Christophe Leroy Reviewed-by: Horia Geantă Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 6db43410179bc40419a9859ebb333f178a49829d Author: Eric Biggers Date: Sun Jan 6 12:46:05 2019 -0800 crypto: adiantum - initialize crypto_spawn::inst crypto_grab_*() doesn't set crypto_spawn::inst, so templates must set it beforehand. Otherwise it will be left NULL, which causes a crash in certain cases where algorithms are dynamically loaded/unloaded. E.g. with CONFIG_CRYPTO_CHACHA20_X86_64=m, the following caused a crash: insmod chacha-x86_64.ko python -c 'import socket; socket.socket(socket.AF_ALG, 5, 0).bind(("skcipher", "adiantum(xchacha12,aes)"))' rmmod chacha-x86_64.ko python -c 'import socket; socket.socket(socket.AF_ALG, 5, 0).bind(("skcipher", "adiantum(xchacha12,aes)"))' Fixes: 059c2a4d8e16 ("crypto: adiantum - add Adiantum support") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 06bbf753476dab23eb262cb5fbab6d6d277a0ba3 Author: Dan Carpenter Date: Fri Jan 4 09:46:11 2019 +0300 crypto: cavium/nitrox - Use after free in process_response_list() We free "sr" and then dereference it on the next line. Fixes: c9613335bf4f ("crypto: cavium/nitrox - Added AEAD cipher support") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu commit a7773363624b034ab198c738661253d20a8055c2 Author: Harsh Jain Date: Thu Jan 3 14:21:05 2019 +0530 crypto: authencesn - Avoid twice completion call in decrypt path Authencesn template in decrypt path unconditionally calls aead_request_complete after ahash_verify which leads to following kernel panic in after decryption. [ 338.539800] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 [ 338.548372] PGD 0 P4D 0 [ 338.551157] Oops: 0000 [#1] SMP PTI [ 338.554919] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Tainted: G W I 4.19.7+ #13 [ 338.564431] Hardware name: Supermicro X8ST3/X8ST3, BIOS 2.0 07/29/10 [ 338.572212] RIP: 0010:esp_input_done2+0x350/0x410 [esp4] [ 338.578030] Code: ff 0f b6 68 10 48 8b 83 c8 00 00 00 e9 8e fe ff ff 8b 04 25 04 00 00 00 83 e8 01 48 98 48 8b 3c c5 10 00 00 00 e9 f7 fd ff ff <8b> 04 25 04 00 00 00 83 e8 01 48 98 4c 8b 24 c5 10 00 00 00 e9 3b [ 338.598547] RSP: 0018:ffff911c97803c00 EFLAGS: 00010246 [ 338.604268] RAX: 0000000000000002 RBX: ffff911c4469ee00 RCX: 0000000000000000 [ 338.612090] RDX: 0000000000000000 RSI: 0000000000000130 RDI: ffff911b87c20400 [ 338.619874] RBP: 0000000000000000 R08: ffff911b87c20498 R09: 000000000000000a [ 338.627610] R10: 0000000000000001 R11: 0000000000000004 R12: 0000000000000000 [ 338.635402] R13: ffff911c89590000 R14: ffff911c91730000 R15: 0000000000000000 [ 338.643234] FS: 0000000000000000(0000) GS:ffff911c97800000(0000) knlGS:0000000000000000 [ 338.652047] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 338.658299] CR2: 0000000000000004 CR3: 00000001ec20a000 CR4: 00000000000006f0 [ 338.666382] Call Trace: [ 338.669051] [ 338.671254] esp_input_done+0x12/0x20 [esp4] [ 338.675922] chcr_handle_resp+0x3b5/0x790 [chcr] [ 338.680949] cpl_fw6_pld_handler+0x37/0x60 [chcr] [ 338.686080] chcr_uld_rx_handler+0x22/0x50 [chcr] [ 338.691233] uldrx_handler+0x8c/0xc0 [cxgb4] [ 338.695923] process_responses+0x2f0/0x5d0 [cxgb4] [ 338.701177] ? bitmap_find_next_zero_area_off+0x3a/0x90 [ 338.706882] ? matrix_alloc_area.constprop.7+0x60/0x90 [ 338.712517] ? apic_update_irq_cfg+0x82/0xf0 [ 338.717177] napi_rx_handler+0x14/0xe0 [cxgb4] [ 338.722015] net_rx_action+0x2aa/0x3e0 [ 338.726136] __do_softirq+0xcb/0x280 [ 338.730054] irq_exit+0xde/0xf0 [ 338.733504] do_IRQ+0x54/0xd0 [ 338.736745] common_interrupt+0xf/0xf Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD...") Signed-off-by: Harsh Jain Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 2dd3fde41bf3dc68e38de23da87e72a07719b708 Author: Horia Geantă Date: Fri Dec 21 14:47:46 2018 +0200 crypto: caam - fix SHA support detection The addition of Chacha20 + Poly1305 authenc support inadvertently broke detection of algorithms supported by MDHA (Message Digest Hardware Accelerator), fix it. Fixes: d6bbd4eea243 ("crypto: caam/jr - add support for Chacha20 + Poly1305") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 04e6d25c5bb244c1a37eb9fe0b604cc11a04e8c5 Author: Aymen Sghaier Date: Wed Dec 19 16:36:44 2018 +0200 crypto: caam - fix zero-length buffer DMA mapping Recent changes - probably DMA API related (generic and/or arm64-specific) - exposed a case where driver maps a zero-length buffer: ahash_init()->ahash_update()->ahash_final() with a zero-length string to hash kernel BUG at kernel/dma/swiotlb.c:475! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 1823 Comm: cryptomgr_test Not tainted 4.20.0-rc1-00108-g00c9fe37a7f2 #1 Hardware name: LS1046A RDB Board (DT) pstate: 80000005 (Nzcv daif -PAN -UAO) pc : swiotlb_tbl_map_single+0x170/0x2b8 lr : swiotlb_map_page+0x134/0x1f8 sp : ffff00000f79b8f0 x29: ffff00000f79b8f0 x28: 0000000000000000 x27: ffff0000093d0000 x26: 0000000000000000 x25: 00000000001f3ffe x24: 0000000000200000 x23: 0000000000000000 x22: 00000009f2c538c0 x21: ffff800970aeb410 x20: 0000000000000001 x19: ffff800970aeb410 x18: 0000000000000007 x17: 000000000000000e x16: 0000000000000001 x15: 0000000000000019 x14: c32cb8218a167fe8 x13: ffffffff00000000 x12: ffff80097fdae348 x11: 0000800976bca000 x10: 0000000000000010 x9 : 0000000000000000 x8 : ffff0000091fd6c8 x7 : 0000000000000000 x6 : 00000009f2c538bf x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 00000009f2c538c0 x1 : 00000000f9fff000 x0 : 0000000000000000 Process cryptomgr_test (pid: 1823, stack limit = 0x(____ptrval____)) Call trace: swiotlb_tbl_map_single+0x170/0x2b8 swiotlb_map_page+0x134/0x1f8 ahash_final_no_ctx+0xc4/0x6cc ahash_final+0x10/0x18 crypto_ahash_op+0x30/0x84 crypto_ahash_final+0x14/0x1c __test_hash+0x574/0xe0c test_hash+0x28/0x80 __alg_test_hash+0x84/0xd0 alg_test_hash+0x78/0x144 alg_test.part.30+0x12c/0x2b4 alg_test+0x3c/0x68 cryptomgr_test+0x44/0x4c kthread+0xfc/0x128 ret_from_fork+0x10/0x18 Code: d34bfc18 2a1a03f7 1a9f8694 35fff89a (d4210000) Cc: Signed-off-by: Aymen Sghaier Signed-off-by: Horia Geantă Reviewed-by: Christoph Hellwig Signed-off-by: Herbert Xu commit dc95b5350a8f07d73d6bde3a79ef87289698451d Author: Eric Biggers Date: Sun Dec 16 23:23:24 2018 -0800 crypto: ccree - convert to use crypto_authenc_extractkeys() Convert the ccree crypto driver to use crypto_authenc_extractkeys() so that it picks up the fix for broken validation of rtattr::rta_len. Fixes: ff27e85a85bb ("crypto: ccree - add AEAD support") Cc: # v4.17+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ab57b33525c3221afaebd391458fa0cbcd56903d Author: Eric Biggers Date: Sun Dec 16 23:23:23 2018 -0800 crypto: bcm - convert to use crypto_authenc_extractkeys() Convert the bcm crypto driver to use crypto_authenc_extractkeys() so that it picks up the fix for broken validation of rtattr::rta_len. This also fixes the DES weak key check to actually be done on the right key. (It was checking the authentication key, not the encryption key...) Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Cc: # v4.11+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8f9c469348487844328e162db57112f7d347c49f Author: Eric Biggers Date: Sun Dec 16 23:23:22 2018 -0800 crypto: authenc - fix parsing key with misaligned rta_len Keys for "authenc" AEADs are formatted as an rtattr containing a 4-byte 'enckeylen', followed by an authentication key and an encryption key. crypto_authenc_extractkeys() parses the key to find the inner keys. However, it fails to consider the case where the rtattr's payload is longer than 4 bytes but not 4-byte aligned, and where the key ends before the next 4-byte aligned boundary. In this case, 'keylen -= RTA_ALIGN(rta->rta_len);' underflows to a value near UINT_MAX. This causes a buffer overread and crash during crypto_ahash_setkey(). Fix it by restricting the rtattr payload to the expected size. Reproducer using AF_ALG: #include #include #include int main() { int fd; struct sockaddr_alg addr = { .salg_type = "aead", .salg_name = "authenc(hmac(sha256),cbc(aes))", }; struct { struct rtattr attr; __be32 enckeylen; char keys[1]; } __attribute__((packed)) key = { .attr.rta_len = sizeof(key), .attr.rta_type = 1 /* CRYPTO_AUTHENC_KEYA_PARAM */, }; fd = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(fd, (void *)&addr, sizeof(addr)); setsockopt(fd, SOL_ALG, ALG_SET_KEY, &key, sizeof(key)); } It caused: BUG: unable to handle kernel paging request at ffff88007ffdc000 PGD 2e01067 P4D 2e01067 PUD 2e04067 PMD 2e05067 PTE 0 Oops: 0000 [#1] SMP CPU: 0 PID: 883 Comm: authenc Not tainted 4.20.0-rc1-00108-g00c9fe37a7f27 #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-20181126_142135-anatol 04/01/2014 RIP: 0010:sha256_ni_transform+0xb3/0x330 arch/x86/crypto/sha256_ni_asm.S:155 [...] Call Trace: sha256_ni_finup+0x10/0x20 arch/x86/crypto/sha256_ssse3_glue.c:321 crypto_shash_finup+0x1a/0x30 crypto/shash.c:178 shash_digest_unaligned+0x45/0x60 crypto/shash.c:186 crypto_shash_digest+0x24/0x40 crypto/shash.c:202 hmac_setkey+0x135/0x1e0 crypto/hmac.c:66 crypto_shash_setkey+0x2b/0xb0 crypto/shash.c:66 shash_async_setkey+0x10/0x20 crypto/shash.c:223 crypto_ahash_setkey+0x2d/0xa0 crypto/ahash.c:202 crypto_authenc_setkey+0x68/0x100 crypto/authenc.c:96 crypto_aead_setkey+0x2a/0xc0 crypto/aead.c:62 aead_setkey+0xc/0x10 crypto/algif_aead.c:526 alg_setkey crypto/af_alg.c:223 [inline] alg_setsockopt+0xfe/0x130 crypto/af_alg.c:256 __sys_setsockopt+0x6d/0xd0 net/socket.c:1902 __do_sys_setsockopt net/socket.c:1913 [inline] __se_sys_setsockopt net/socket.c:1910 [inline] __x64_sys_setsockopt+0x1f/0x30 net/socket.c:1910 do_syscall_64+0x4a/0x180 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: e236d4a89a2f ("[CRYPTO] authenc: Move enckeylen into key itself") Cc: # v2.6.25+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0206131811fa6e4b3ed64b5f1c107e2815dcab42 Author: Ravi Bangoria Date: Thu Jan 10 15:19:35 2019 +0530 perf powerpc: Rework syscall table generation Commit aff850393200 ("powerpc: add system call table generation support") changed how systemcall table is generated for powerpc. Incorporate these changes into perf as well. Committer testing: $ podman run --entrypoint=/bin/sh --privileged -v /home/acme/git:/git --rm -ti docker.io/acmel/linux-perf-tools-build-ubuntu:18.04-x-powerpc64 perfbuilder@d7a7af166a80:/git/perf$ head -2 /etc/os-release NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" perfbuilder@d7a7af166a80:/git/perf$ perfbuilder@d7a7af166a80:/git/perf$ make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- EXTRA_CFLAGS= -C /git/linux/tools/perf O=/tmp/build/perf make: Entering directory '/git/linux/tools/perf' BUILD: Doing 'make -j8' parallel build HOSTCC /tmp/build/perf/fixdep.o HOSTLD /tmp/build/perf/fixdep-in.o LINK /tmp/build/perf/fixdep Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h' diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h sh: 1: command: Illegal option -c Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ OFF ] ... libaudit: [ OFF ] ... libbfd: [ OFF ] ... libelf: [ on ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libslang: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ on ] Makefile.config:445: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:491: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR Makefile.config:583: No libcrypto.h found, disables jitted code injection, please install libssl-devel or libssl-dev Makefile.config:598: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev Makefile.config:612: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev Makefile.config:639: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev Makefile.config:666: No python interpreter was found: disables Python support - please install python-devel/python-dev Makefile.config:721: No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling Makefile.config:750: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev Makefile.config:763: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev Makefile.config:814: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev Makefile.config:840: No alternatives command found, you need to set JDIR= to point to the root of your Java directory GEN /tmp/build/perf/common-cmds.h CC /tmp/build/perf/util/syscalltbl.o LD /tmp/build/perf/libperf-in.o AR /tmp/build/perf/libperf.a LINK /tmp/build/perf/perf make: Leaving directory '/git/linux/tools/perf' perfbuilder@d7a7af166a80:/git/perf$ head /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_64.c static const char *syscalltbl_powerpc_64[] = { [0] = "restart_syscall", [1] = "exit", [2] = "fork", [3] = "read", [4] = "write", [5] = "open", [6] = "close", [7] = "waitpid", [8] = "creat", perfbuilder@d7a7af166a80:/git/perf$ tail /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_64.c [381] = "pwritev2", [382] = "kexec_file_load", [383] = "statx", [384] = "pkey_alloc", [385] = "pkey_free", [386] = "pkey_mprotect", [387] = "rseq", [388] = "io_pgetevents", }; #define SYSCALLTBL_POWERPC_64_MAX_ID 388 perfbuilder@d7a7af166a80:/git/perf$ head /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_32.c static const char *syscalltbl_powerpc_32[] = { [0] = "restart_syscall", [1] = "exit", [2] = "fork", [3] = "read", [4] = "write", [5] = "open", [6] = "close", [7] = "waitpid", [8] = "creat", perfbuilder@d7a7af166a80:/git/perf$ tail /tmp/build/perf/arch/powerpc/include/generated/asm/syscalls_32.c [381] = "pwritev2", [382] = "kexec_file_load", [383] = "statx", [384] = "pkey_alloc", [385] = "pkey_free", [386] = "pkey_mprotect", [387] = "rseq", [388] = "io_pgetevents", }; #define SYSCALLTBL_POWERPC_32_MAX_ID 388 perfbuilder@d7a7af166a80:/git/perf$ Signed-off-by: Ravi Bangoria Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20190110094936.3132-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit f299e0bdbaeb60fd8829f42e53a7457cc5a6f4a2 Author: José Roberto de Souza Date: Wed Dec 5 10:48:50 2018 -0800 drm: Fix documentation generation for DP_DPCD_QUIRK_NO_PSR The DP_DPCD_QUIRK_NO_PSR comment is missing colon causing this warning when generating kernel documentation. ./include/drm/drm_dp_helper.h:1374: warning: Incorrect use of kernel-doc format: * @DP_DPCD_QUIRK_NO_PSR Fixes: 1035f4a65f58 ("drm/i915: Disable PSR in Apple panels") Cc: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181205184850.13218-1-jose.souza@intel.com (cherry picked from commit ed17b555303c74a35f226268523b1695dbd4617d) Signed-off-by: Jani Nikula commit 70e31424eabe4923a2140eb86f704c75db6a5c87 Author: Daniele Ceraolo Spurio Date: Wed Jan 9 17:32:32 2019 -0800 drm/i915: init per-engine WAs for all engines commit 4a15c75c4246 ("drm/i915: Introduce per-engine workarounds") refactored the workaround code to have functions per-engine, but didn't call any of them from logical_xcs_ring_init. Since we do have a non-RCS workaround for KBL (WaKBLVECSSemaphoreWaitPoll) we do need to call intel_engine_init_workarounds for non-RCS engines. Note that whitelist is still RCS-only. v2: move the call to logical_ring_init (Chris) Fixes: 4a15c75c4246 ("drm/i915: Introduce per-engine workarounds") Cc: Tvrtko Ursulin Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190110013232.8972-2-daniele.ceraolospurio@intel.com (cherry picked from commit a60acb223fecc77531540196008ac2de89e2a162) Signed-off-by: Jani Nikula commit 280d479b310298dfeb1d6f9a1617eca37beb6ce4 Author: Chris Wilson Date: Sat Dec 22 03:06:23 2018 +0000 drm/i915: Unwind failure on pinning the gen7 ppgtt If we fail to pin the ggtt vma slot for the ppgtt page tables, we need to unwind the locals before reporting the error. Or else on subsequent attempts to bind the page tables into the ggtt, we will already believe that the vma has been pinned and continue on blithely. If something else should happen to be at that location, choas ensues. Fixes: a2bbf7148342 ("drm/i915/gtt: Only keep gen6 page directories pinned while active") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Cc: # v4.19+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181222030623.21710-1-chris@chris-wilson.co.uk (cherry picked from commit d4de753526f4d99f541f1b6ed1d963005c09700c) Signed-off-by: Jani Nikula commit 107c595c2a277be65b28762f12e1dad243e05623 Author: Chris Wilson Date: Fri Dec 7 11:05:54 2018 +0000 drm/i915: Skip the ERR_PTR error state Although commit fb6f0b64e455 ("drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture") applied cleanly after a 24 month hiatus, the code had moved on with new methods for peeking and fetching the captured gpu info. Make sure we catch all uses of the stashed error state and avoid dereferencing the error pointer. v2: Move error pointer determination into i915_gpu_capture_state v3: Restore early check to avoid capturing and then throwing away subsequent GPU error states. Fixes: fb6f0b64e455 ("drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181207110554.19897-1-chris@chris-wilson.co.uk (cherry picked from commit e6154e4cb8b0d3692f84ca0d66b4e1ba0389b134) Signed-off-by: Jani Nikula commit 1035f4a65f58407951d8d2f54c289c2b252e499c Author: José Roberto de Souza Date: Mon Dec 3 16:33:55 2018 -0800 drm/i915: Disable PSR in Apple panels i915 yet don't support PSR in Apple panels, so lets keep it disabled while we work on that. v2: Renamed DP_DPCD_QUIRK_PSR_NOT_CURRENTLY_SUPPORTED to DP_DPCD_QUIRK_NO_PSR (Ville) v3: Adding documentation to DP_DPCD_QUIRK_NO_PSR(Dhinakaran and Jani) Fixed typo in comment of the new quirk entry(Jani) Fixes: 598c6cfe0690 (drm/i915/psr: Enable PSR1 on gen-9+ HW) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181204003403.23361-1-jose.souza@intel.com (cherry picked from commit 7c5c641a930ed06ca317ee39faee7d5824266348) Signed-off-by: Jani Nikula commit 038a0a8d2972962aa8d5adc250ce28cd0b2a3448 Merge: bfeffd1552837 f0e9943725186 Author: Jani Nikula Date: Thu Jan 10 15:02:03 2019 +0200 Merge tag 'gvt-fixes-2019-01-09' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2019-01-09 - Fix one race issue between pre-scan of guest workload with submission Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20190109050151.GL11631@zhen-hp.sh.intel.com commit 70c25259537c073584eb906865307687275b527f Author: Guo Ren Date: Thu Jan 10 20:28:39 2019 +0800 csky: fixup compile error with CPU 810. This bug is from commit f553aa1c13cb ("csky: fixup relocation error with 807 & 860"). I forgot to compile with 810 for that patch. Signed-off-by: Guo Ren Cc: Arnd Bergmann Signed-off-by: Linus Torvalds commit b5f034845e70916fd33e172fad5ad530a29c10ab Author: Linus Walleij Date: Tue Jan 8 00:08:18 2019 +0100 ARM: dts: kirkwood: Fix polarity of GPIO fan lines These two lines are active high, not active low. The bug was found when we changed the kernel to respect the polarity defined in the device tree. Fixes: 1b90e06b1429 ("ARM: kirkwood: Use devicetree to define DNS-32[05] fan") Cc: Jamie Lentin Cc: Guenter Roeck Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Julien D'Ascenzio Reviewed-by: Andrew Lunn Tested-by: Jamie Lentin Reported-by: Julien D'Ascenzio Tested-by: Julien D'Ascenzio Signed-off-by: Linus Walleij Signed-off-by: Gregory CLEMENT commit 59c4dccbc3676144091783c8b46bd51daa4f80bc Author: Baruch Siach Date: Wed Dec 12 08:43:26 2018 +0200 arm64: dts: marvell: mcbin: fix PCIe reset signal The MPP52 signal is on the seconds GPIO instance of CP0, which corresponds to the &cp0_gpio2 handle. Rename the property name to the standard '-gpios' suffix while at it. Fixes: b83e1669adce6 ("arm64: dts: marvell: mcbin: add support for PCIe") Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit 132ac39cffbcfed80ada38ef0fc6d34d95da7be6 Author: Heinrich Schuchardt Date: Fri Dec 21 17:45:03 2018 +0100 arm64: dts: marvell: armada-ap806: reserve PSCI area The memory area [0x4000000-0x4200000[ is occupied by the PSCI firmware. Any attempt to access it from Linux leads to an immediate crash. So let's make the same memory reservation as the vendor kernel. [gregory: added as comment that this region matches the mainline U-boot] Signed-off-by: Heinrich Schuchardt Signed-off-by: Gregory CLEMENT commit d9ed41962ee202f653a5fa8d2ea0f52924abe629 Author: Will Deacon Date: Wed Jan 9 10:34:49 2019 +0000 arm64: asm-prototypes: Fix fat-fingered typo in comment Some of the right letters, not necessarily in the right order: CONFIG_MODEVERIONS -> CONFIG_MODVERSIONS Signed-off-by: Will Deacon commit ba422731316dde1e22dcc84b83c7349dc0ce1c3c Author: Sean Christopherson Date: Wed Jan 9 16:51:17 2019 -0800 mm/mmu_notifier: mm/rmap.c: Fix a mmu_notifier range bug in try_to_unmap_one The conversion to use a structure for mmu_notifier_invalidate_range_*() unintentionally changed the usage in try_to_unmap_one() to init the 'struct mmu_notifier_range' with vma->vm_start instead of @address, i.e. it invalidates the wrong address range. Revert to the correct address range. Manifests as KVM use-after-free WARNINGs and subsequent "BUG: Bad page state in process X" errors when reclaiming from a KVM guest due to KVM removing the wrong pages from its own mappings. Reported-by: leozinho29_eu@hotmail.com Reported-by: Mike Galbraith Reported-and-tested-by: Adam Borowski Reviewed-by: Jérôme Glisse Reviewed-by: Pankaj gupta Cc: Christian König Cc: Jan Kara Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Dan Williams Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Michal Hocko Cc: Felix Kuehling Cc: Ralph Campbell Cc: John Hubbard Cc: Andrew Morton Fixes: ac46d4f3c432 ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2") Signed-off-by: Sean Christopherson Signed-off-by: Linus Torvalds commit 4089e272ac61603931beb024d4d640de2cb390e0 Author: Tetsuo Handa Date: Thu Jan 10 19:19:31 2019 +0900 gpu/drm: Fix lock held when returning to user space. We need to call drm_modeset_acquire_fini() when drm_atomic_state_alloc() failed or call drm_modeset_acquire_init() after drm_atomic_state_alloc() succeeded. Signed-off-by: Tetsuo Handa Reported-by: syzbot Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1547115571-21219-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp commit ca27e4cd0bdd87e33fda38e6e3d18d36d54356d4 Author: Vincent Guittot Date: Thu Jan 10 10:00:40 2019 +0100 PM-runtime: Fix autosuspend_delay on 32bits arch Cast autosuspend_delay to u64 to make sure that the full computation of 'expires' or slack will be done in u64, even on 32bits arch. Otherwise, any delay greater than 2^31 nsec can overflow if signed 32bits is used when converting delay from msec to nsec. Fixes: 8234f6734c5d (PM-runtime: Switch autosuspend over to using hrtimers) Reported-by: Tony Lindgren Tested-by: Tony Lindgren Signed-off-by: Vincent Guittot Signed-off-by: Rafael J. Wysocki commit 1f7b7081568bca281f4ef42096206180cfaced00 Author: Ladislav Michl Date: Thu Jan 10 00:19:44 2019 +0100 PM-runtime: Fix 'jiffies' in comments after switch to hrtimers PM-runtime now uses the hrtimers infrastructure for autosuspend, however comments still reference 'jiffies'. Fixes: 8234f6734c5d (PM-runtime: Switch autosuspend over to using hrtimers) Signed-off-by: Ladislav Michl Signed-off-by: Rafael J. Wysocki commit 85f5a4d666fd9be73856ed16bb36c5af5b406b29 Author: Ilya Dryomov Date: Tue Jan 8 19:47:38 2019 +0100 rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set There is a window between when RBD_DEV_FLAG_REMOVING is set and when the device is removed from rbd_dev_list. During this window, we set "already" and return 0. Returning 0 from write(2) can confuse userspace tools because 0 indicates that nothing was written. In particular, "rbd unmap" will retry the write multiple times a second: 10:28:05.463299 write(4, "0", 1) = 0 10:28:05.463509 write(4, "0", 1) = 0 10:28:05.463720 write(4, "0", 1) = 0 10:28:05.463942 write(4, "0", 1) = 0 10:28:05.464155 write(4, "0", 1) = 0 Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov Tested-by: Dongsheng Yang commit c25748acc5c20786ecb7518bfeae8fcef93472d6 Author: Peter Ujfalusi Date: Wed Dec 19 13:47:26 2018 +0200 ARM: dts: da850-lcdk: Correct the sound card name To avoid the following error: asoc-simple-card sound: ASoC: Failed to create card debugfs directory Which is because the card name contains '/' character, which can not be used in file or directory names. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit bd540ebe68c3017194a1caa38e075bbbc0832749 Author: Peter Ujfalusi Date: Wed Dec 19 13:47:25 2018 +0200 ARM: dts: da850-lcdk: Correct the audio codec regulators Add the board level fixed regulators for 3.3V and 1.8V which is used to power - among other things - the tlv320aic3106 codec. Apart from removing the following warning during boot: tlv320aic3x-codec 0-0018: Invalid supply voltage(s) AVDD: -22, DVDD: -22 With the correct voltages the driver can select correct OCMV value to reduce pop noise. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit 7fca69d4e43fa1ae9cb4f652772c132dc5a659c6 Author: Peter Ujfalusi Date: Wed Dec 19 13:47:24 2018 +0200 ARM: dts: da850-evm: Correct the sound card name To avoid the following error: asoc-simple-card sound: ASoC: Failed to create card debugfs directory Which is because the card name contains '/' character, which can not be used in file or directory names. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit 706edaa88835e3d8de8920584ad5da76dd3d6666 Author: Peter Ujfalusi Date: Wed Dec 19 13:47:23 2018 +0200 ARM: dts: da850-evm: Correct the audio codec regulators Add the board level fixed regulators for 3.3V and 1.8V which is used to power - among other things - the tlv320aic3106 codec. Apart from removing the following warning during boot: tlv320aic3x-codec 0-0018: Too high supply voltage(s) AVDD: 5000000, DVDD: 5000000 With the correct voltages the driver can select correct OCMV value to reduce pop noise. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit 054b8dc381b1c784852ad3e109270d236a58b71d Author: Bartosz Golaszewski Date: Thu Jan 3 16:11:04 2019 +0100 ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries Since commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") the gpiochip label no longer has an ID suffix. Update the GPIO lookup entries. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 7f1015b29d9b9eb1cd3c038d6c30d698c6d7782e Author: Bartosz Golaszewski Date: Thu Jan 3 16:11:03 2019 +0100 ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries Since commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") the gpiochip label no longer has an ID suffix. Update the GPIO lookup entries. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 94777ed3b644a1af09843f729b2a3f25794bed0f Author: Bartosz Golaszewski Date: Thu Jan 3 16:11:02 2019 +0100 ARM: davinci: dm355-evm: fix label names in GPIO lookup entries Since commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") the gpiochip label no longer has an ID suffix. Update the GPIO lookup entries. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit c3f08cceb6a59f328f1c847b002729d1584c7a32 Author: Bartosz Golaszewski Date: Thu Jan 3 16:11:01 2019 +0100 ARM: davinci: da850-evm: fix label names in GPIO lookup entries Since commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") the gpiochip label no longer has an ID suffix. Update the GPIO lookup entries. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit cc557afb4d10cba175fd08d51c557004a229eded Author: Bartosz Golaszewski Date: Thu Jan 3 16:11:00 2019 +0100 ARM: davinci: da830-evm: fix label names in GPIO lookup entries Since commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") the gpiochip label no longer has an ID suffix. Update the GPIO lookup entries. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 66a8d5bfb518f9f12d47e1d2dce1732279f9451e Author: Ivan Mironov Date: Tue Jan 8 12:23:53 2019 +0500 drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock Strict requirement of pixclock to be zero breaks support of SDL 1.2 which contains hardcoded table of supported video modes with non-zero pixclock values[1]. To better understand which pixclock values are considered valid and how driver should handle these values, I briefly examined few existing fbdev drivers and documentation in Documentation/fb/. And it looks like there are no strict rules on that and actual behaviour varies: * some drivers treat (pixclock == 0) as "use defaults" (uvesafb.c); * some treat (pixclock == 0) as invalid value which leads to -EINVAL (clps711x-fb.c); * some pass converted pixclock value to hardware (uvesafb.c); * some are trying to find nearest value from predefined table (vga16fb.c, video_gx.c). Given this, I believe that it should be safe to just ignore this value if changing is not supported. It seems that any portable fbdev application which was not written only for one specific device working under one specific kernel version should not rely on any particular behaviour of pixclock anyway. However, while enabling SDL1 applications to work out of the box when there is no /etc/fb.modes with valid settings, this change affects the video mode choosing logic in SDL. Depending on current screen resolution, contents of /etc/fb.modes and resolution requested by application, this may lead to user-visible difference (not always): image will be displayed in a right way, but it will be aligned to the left instead of center. There is no "right behaviour" here as well, as emulated fbdev, opposing to old fbdev drivers, simply ignores any requsts of video mode changes with resolutions smaller than current. The easiest way to reproduce this problem is to install sdl-sopwith[2], remove /etc/fb.modes file if it exists, and then try to run sopwith from console without X. At least in Fedora 29, sopwith may be simply installed from standard repositories. [1] SDL 1.2.15 source code, src/video/fbcon/SDL_fbvideo.c, vesa_timings [2] http://sdl-sopwith.sourceforge.net/ Signed-off-by: Ivan Mironov Cc: stable@vger.kernel.org Fixes: 79e539453b34e ("DRM: i915: add mode setting support") Fixes: 771fe6b912fca ("drm/radeon: introduce kernel modesetting for radeon hardware") Fixes: 785b93ef8c309 ("drm/kms: move driver specific fb common code to helper functions (v2)") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190108072353.28078-3-mironov.ivan@gmail.com commit 62d85b3bf9d978ed4b6b2aeef5cf0ccf1423906e Author: Ivan Mironov Date: Tue Jan 8 12:23:52 2019 +0500 drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2 SDL 1.2 sets all fields related to the pixel format to zero in some cases[1]. Prior to commit db05c48197759 ("drm: fb-helper: Reject all pixel format changing requests"), there was an unintentional workaround for this that existed for more than a decade. First in device-specific DRM drivers, then here in drm_fb_helper.c. Previous code containing this workaround just ignores pixel format fields from userspace code. Not a good thing either, as this way, driver may silently use pixel format different from what client actually requested, and this in turn will lead to displaying garbage on the screen. I think that returning EINVAL to userspace in this particular case is the right option, so I decided to left code from problematic commit untouched instead of just reverting it entirely. Here is the steps required to reproduce this problem exactly: 1) Compile fceux[2] with SDL 1.2.15 and without GTK or OpenGL support. SDL should be compiled with fbdev support (which is on by default). 2) Create /etc/fb.modes with following contents (values seems not used, and just required to trigger problematic code in SDL): mode "test" geometry 1 1 1 1 1 timings 1 1 1 1 1 1 1 endmode 3) Create ~/.fceux/fceux.cfg with following contents: SDL.Hotkeys.Quit = 27 SDL.DoubleBuffering = 1 4) Ensure that screen resolution is at least 1280x960 (e.g. append "video=Virtual-1:1280x960-32" to the kernel cmdline for qemu/QXL). 5) Try to run fceux on VT with some ROM file[3]: # ./fceux color_test.nes [1] SDL 1.2.15 source code, src/video/fbcon/SDL_fbvideo.c, FB_SetVideoMode() [2] http://www.fceux.com [3] Example ROM: https://github.com/bokuweb/rustynes/blob/master/roms/color_test.nes Reported-by: saahriktu Suggested-by: saahriktu Cc: stable@vger.kernel.org Fixes: db05c48197759 ("drm: fb-helper: Reject all pixel format changing requests") Signed-off-by: Ivan Mironov [danvet: Delete misleading comment.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190108072353.28078-2-mironov.ivan@gmail.com Link: https://patchwork.freedesktop.org/patch/msgid/20190108072353.28078-2-mironov.ivan@gmail.com commit 5db470e229e22b7eda6e23b5566e532c96fb5bc3 Author: Jaegeuk Kim Date: Wed Jan 9 19:17:14 2019 -0800 loop: drop caches if offset or block_size are changed If we don't drop caches used in old offset or block_size, we can get old data from new offset/block_size, which gives unexpected data to user. For example, Martijn found a loopback bug in the below scenario. 1) LOOP_SET_FD loads first two pages on loop file 2) LOOP_SET_STATUS64 changes the offset on the loop file 3) mount is failed due to the cached pages having wrong superblock Cc: Jens Axboe Cc: linux-block@vger.kernel.org Reported-by: Martijn Coenen Reviewed-by: Bart Van Assche Signed-off-by: Jaegeuk Kim Signed-off-by: Jens Axboe commit 31aa6503a15ba00182ea6dbbf51afb63bf9e851d Author: Yuchung Cheng Date: Tue Jan 8 18:12:24 2019 -0800 bpf: correctly set initial window on active Fast Open sender The existing BPF TCP initial congestion window (TCP_BPF_IW) does not to work on (active) Fast Open sender. This is because it changes the (initial) window only if data_segs_out is zero -- but data_segs_out is also incremented on SYN-data. This patch fixes the issue by proerly accounting for SYN-data additionally. Fixes: fc7478103c84 ("bpf: Adds support for setting initial cwnd") Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Acked-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov commit 27de1f541f1f911bc2242ae68ef7375247b36c7d Author: Anup Patel Date: Tue Dec 4 19:25:05 2018 +0530 tty/serial: Add RISC-V SBI earlycon support In RISC-V, the M-mode runtime firmware provide SBI calls for debug prints. This patch adds earlycon support using RISC-V SBI console calls. To enable it, just pass "earlycon=sbi" in kernel parameters. Signed-off-by: Anup Patel Acked-by: Greg Kroah-Hartman Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 649d4968860ba708636ad643bd52b28027367042 Author: Jonathan Corbet Date: Wed Jan 9 13:59:32 2019 -0700 block: fix kerneldoc comment for blk_attempt_plug_merge() Commit 5f0ed774ed29 ("block: sum requests in the plug structure") removed the request_count parameter from block_attempt_plug_merge(), but did not remove the associated kerneldoc comment, introducing this warning to the docs build: ./block/blk-core.c:685: warning: Excess function parameter 'request_count' description in 'blk_attempt_plug_merge' Remove the obsolete description and make things a little quieter. Signed-off-by: Jonathan Corbet Signed-off-by: Jens Axboe commit a799aea0988ea0d1b1f263e996fdad2f6133c680 Author: wenxu Date: Wed Jan 9 10:40:11 2019 +0800 netfilter: nft_flow_offload: Fix reverse route lookup Using the following example: client 1.1.1.7 ---> 2.2.2.7 which dnat to 10.0.0.7 server The first reply packet (ie. syn+ack) uses an incorrect destination address for the reverse route lookup since it uses: daddr = ct->tuplehash[!dir].tuple.dst.u3.ip; which is 2.2.2.7 in the scenario that is described above, while this should be: daddr = ct->tuplehash[dir].tuple.src.u3.ip; that is 10.0.0.7. Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit e7f45099442a380f8e087b6a8aadc36e887df1cc Author: Santosh kumar pradhan Date: Wed Jan 9 22:08:26 2019 +0530 sunrpc: kernel BUG at kernel/cred.c:825! Init missing debug member magic with CRED_MAGIC. Signed-off-by: Santosh kumar pradhan Reported-by: Dave Jones Signed-off-by: Anna Schumaker commit 321c46b91550adc03054125fa7a1639390608e1a Author: Rafał Miłecki Date: Thu Jan 3 08:34:17 2019 +0100 MIPS: BCM47XX: Setup struct device for the SoC So far we never had any device registered for the SoC. This resulted in some small issues that we kept ignoring like: 1) Not working GPIOLIB_IRQCHIP (gpiochip_irqchip_add_key() failing) 2) Lack of proper tree in the /sys/devices/ 3) mips_dma_alloc_coherent() silently handling empty coherent_dma_mask Kernel 4.19 came with a lot of DMA changes and caused a regression on bcm47xx. Starting with the commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") DMA coherent allocations just fail. Example: [ 1.114914] bgmac_bcma bcma0:2: Allocation of TX ring 0x200 failed [ 1.121215] bgmac_bcma bcma0:2: Unable to alloc memory for DMA [ 1.127626] bgmac_bcma: probe of bcma0:2 failed with error -12 [ 1.133838] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded The bgmac driver also triggers a WARNING: [ 0.959486] ------------[ cut here ]------------ [ 0.964387] WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 bgmac_enet_probe+0x1b4/0x5c4 [ 0.973751] Modules linked in: [ 0.976913] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.9 #0 [ 0.982750] Stack : 804a0000 804597c4 00000000 00000000 80458fd8 8381bc2c 838282d4 80481a47 [ 0.991367] 8042e3ec 00000001 804d38f0 00000204 83980000 00000065 8381bbe0 6f55b24f [ 0.999975] 00000000 00000000 80520000 00002018 00000000 00000075 00000007 00000000 [ 1.008583] 00000000 80480000 000ee811 00000000 00000000 00000000 80432c00 80248db8 [ 1.017196] 00000009 00000204 83980000 803ad7b0 00000000 801feeec 00000000 804d0000 [ 1.025804] ... [ 1.028325] Call Trace: [ 1.030875] [<8000aef8>] show_stack+0x58/0x100 [ 1.035513] [<8001f8b4>] __warn+0xe4/0x118 [ 1.039708] [<8001f9a4>] warn_slowpath_null+0x48/0x64 [ 1.044935] [<80248db8>] bgmac_enet_probe+0x1b4/0x5c4 [ 1.050101] [<802498e0>] bgmac_probe+0x558/0x590 [ 1.054906] [<80252fd0>] bcma_device_probe+0x38/0x70 [ 1.060017] [<8020e1e8>] really_probe+0x170/0x2e8 [ 1.064891] [<8020e714>] __driver_attach+0xa4/0xec [ 1.069784] [<8020c1e0>] bus_for_each_dev+0x58/0xb0 [ 1.074833] [<8020d590>] bus_add_driver+0xf8/0x218 [ 1.079731] [<8020ef24>] driver_register+0xcc/0x11c [ 1.084804] [<804b54cc>] bgmac_init+0x1c/0x44 [ 1.089258] [<8000121c>] do_one_initcall+0x7c/0x1a0 [ 1.094343] [<804a1d34>] kernel_init_freeable+0x150/0x218 [ 1.099886] [<803a082c>] kernel_init+0x10/0x104 [ 1.104583] [<80005878>] ret_from_kernel_thread+0x14/0x1c [ 1.110107] ---[ end trace f441c0d873d1fb5b ]--- This patch setups a "struct device" (and passes it to the bcma) which allows fixing all the mentioned problems. It'll also require a tiny bcma patch which will follow through the wireless tree & its maintainer. Fixes: f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") Signed-off-by: Rafał Miłecki Signed-off-by: Paul Burton Acked-by: Hauke Mehrtens Cc: Christoph Hellwig Cc: Linus Walleij Cc: linux-wireless@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.19+ commit 41af167fbc0032f9d7562854f58114eaa9270336 Author: Thomas Bogendoerfer Date: Wed Jan 9 18:12:16 2019 +0100 MIPS: jazz: fix 64bit build 64bit JAZZ builds failed with linux-next/arch/mips/jazz/jazzdma.c: In function `vdma_init`: /linux-next/arch/mips/jazz/jazzdma.c:77:30: error: implicit declaration of function `KSEG1ADDR`; did you mean `CKSEG1ADDR`? [-Werror=implicit-function-declaration] pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); ^~~~~~~~~ CKSEG1ADDR /linux-next/arch/mips/jazz/jazzdma.c:77:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl); ^ In file included from /linux-next/arch/mips/include/asm/barrier.h:11:0, from /linux-next/include/linux/compiler.h:248, from /linux-next/include/linux/kernel.h:10, from /linux-next/arch/mips/jazz/jazzdma.c:11: /linux-next/arch/mips/include/asm/addrspace.h:41:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] #define _ACAST32_ (_ATYPE_)(_ATYPE32_) /* widen if necessary */ ^ /linux-next/arch/mips/include/asm/addrspace.h:53:25: note: in expansion of macro `_ACAST32_` #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) ^~~~~~~~~ /linux-next/arch/mips/jazz/jazzdma.c:84:44: note: in expansion of macro `CPHYSADDR` r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl)); Using correct casts and CKSEG1ADDR when dealing with the pgtbl setup fixes this. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 1c1eba86339c8517814863bc7dd21e2661a84e77 Author: Christian König Date: Mon Jan 7 14:43:55 2019 +0100 drm/amdgpu: disable system memory page tables for now We hit a problem with IOMMU with that. Disable until we have time to debug further. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit 0c6c8125582714e1fd3544983eba3d750db0f5b8 Author: Jim Qu Date: Mon Dec 17 17:00:50 2018 +0800 drm/amdgpu: set WRITE_BURST_LENGTH to 64B to workaround SDMA1 hang effect asics: VEGA10 and VEGA12 Signed-off-by: Jim Qu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3e958fe67720b37d04ab8ef81b9d507a56a09bbc Author: Tao Zhou Date: Tue Jan 8 15:08:44 2019 +0800 drm/amdgpu: fix CPDMA hang in PRT mode for VEGA20 Fix CPDMA hang in PRT mode for both VEGA10 and VEGA20 Signed-off-by: Tao Zhou Tested-by: Yukun.Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 549aff770ccfec368aa8f0652dbce8b1e8e6715a Author: Arnaldo Carvalho de Melo Date: Wed Jan 9 16:19:24 2019 -0300 perf symbols: Add 'arch_cpu_idle' to the list of kernel idle symbols When testing 'perf top' on a armhf system (32-bit, Orange Pi Zero), I noticed that 'arch_cpu_idle' dominated, add it to the list of idle symbols, so that we can see what is that being done when not idle. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4q2b5g4p2hrstrhp9t2mrlho@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b8a38ea64dc714a64f8fb76e311a4f15a3f67861 Author: Andrey Smirnov Date: Mon Jan 7 19:08:49 2019 -0800 nvme: don't initlialize ctrl->cntlid twice ctrl->cntlid will already be initialized from id->cntlid for non-NVME_F_FABRICS controllers few lines below. For NVME_F_FABRICS controllers this field should already be initialized, otherwise the check if (ctrl->cntlid != le16_to_cpu(id->cntlid)) below will always be a no-op. Signed-off-by: Andrey Smirnov Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6299358d198a0635da2dd3c4b3ec37789e811e44 Author: James Dingwall Date: Tue Jan 8 10:20:51 2019 -0700 nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN If a device provides an NQN it is expected to be globally unique. Unfortunately some firmware revisions for Intel 760p/Pro 7600p devices did not satisfy this requirement. In these circumstances if a system has >1 affected device then only one device is enabled. If this quirk is enabled then the device supplied subnqn is ignored and we fallback to generating one as if the field was empty. In this case we also suppress the version check so we don't print a warning when the quirk is enabled. Reviewed-by: Keith Busch Signed-off-by: James Dingwall Signed-off-by: Christoph Hellwig commit 3da584f57133e51aeb84aaefae5e3d69531a1e4f Author: Keith Busch Date: Tue Jan 8 09:37:43 2019 -0700 nvme: pad fake subsys NQN vid and ssvid with zeros We need to preserve the leading zeros in the vid and ssvid when generating a unique NQN. Truncating these may lead to naming collisions. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit c7055fd15ff46d92eb0dd1c16a4fe010d58224c8 Author: Hannes Reinecke Date: Tue Jan 8 12:46:58 2019 +0100 nvme-multipath: zero out ANA log buffer When nvme_init_identify() fails the ANA log buffer is deallocated but _not_ set to NULL. This can cause double free oops when this controller is deleted without ever being reconnected. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 9846ac0143fe9872e92fe2a1ddff868ad05bdbb6 Author: Sagi Grimberg Date: Mon Jan 7 23:54:23 2019 -0800 nvme-fabrics: unset write/poll queues for discovery controllers Even if user-space sent it to us, it got it wrong so lets help by disallowing it. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e85037a2e90ac9aa448a08927d7a7436206c6000 Author: Sagi Grimberg Date: Mon Dec 31 23:58:30 2018 -0800 nvme-tcp: don't ask if controller is fabrics For sure we are a fabric driver. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e9c2edc098921173920df370c69b5c38fe52df56 Author: Sagi Grimberg Date: Mon Dec 31 23:58:29 2018 -0800 nvme-tcp: remove dead code We should never touch the opal device from the transport driver. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit dcca1662727220d18fa351097ddff33f95f516c5 Author: Hongbo Yao Date: Mon Jan 7 10:22:07 2019 +0800 nvme-pci: fix out of bounds access in nvme_cqe_pending There is an out of bounds array access in nvme_cqe_peding(). When enable irq_thread for nvme interrupt, there is racing between the nvmeq->cq_head updating and reading. nvmeq->cq_head is updated in nvme_update_cq_head(), if nvmeq->cq_head equals nvmeq->q_depth and before its value set to zero, nvme_cqe_pending() uses its value as an array index, the index will be out of bounds. Signed-off-by: Hongbo Yao [hch: slight coding style update] Signed-off-by: Christoph Hellwig commit 8fae268b40f5191227ae7050a99cb2cf1b914ddd Author: Keith Busch Date: Fri Jan 4 15:04:33 2019 -0700 nvme-pci: rerun irq setup on IO queue init errors If the driver is unable to create a subset of IO queues for any reason, the read/write and polled queue sets will not match the actual allocated hardware contexts. This leaves gaps in the CPU affinity mappings and causes the following kernel panic after blk_mq_map_queue_type() returns a NULL hctx. BUG: unable to handle kernel NULL pointer dereference at 0000000000000198 #PF error: [normal kernel read fault] PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 64 PID: 1171 Comm: kworker/u259:1 Not tainted 4.20.0+ #241 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 Workqueue: nvme-wq nvme_scan_work [nvme_core] RIP: 0010:blk_mq_init_allocated_queue+0x2d9/0x440 RSP: 0018:ffffb1bf0abc3cd0 EFLAGS: 00010286 RAX: 000000000000001f RBX: ffff8ea744cf0718 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 000000000000007c RDI: ffffffff9109a820 RBP: ffff8ea7565f7008 R08: 000000000000001f R09: 000000000000003f R10: ffffb1bf0abc3c00 R11: 0000000000000000 R12: 000000000001d008 R13: ffff8ea7565f7008 R14: 000000000000003f R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8ea757200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000198 CR3: 0000000013058000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: blk_mq_init_queue+0x35/0x60 nvme_validate_ns+0xc6/0x7c0 [nvme_core] ? nvme_identify_ctrl.isra.56+0x7e/0xc0 [nvme_core] nvme_scan_work+0xc8/0x340 [nvme_core] ? __wake_up_common+0x6d/0x120 ? try_to_wake_up+0x55/0x410 process_one_work+0x1e9/0x3d0 worker_thread+0x2d/0x3d0 ? process_one_work+0x3d0/0x3d0 kthread+0x111/0x130 ? kthread_park+0x90/0x90 ret_from_fork+0x1f/0x30 Modules linked in: nvme nvme_core serio_raw CR2: 0000000000000198 Fix by re-running the interrupt vector setup from scratch using a reduced count that may be successful until the created queues matches the irq affinity plus polling queue sets. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Ming Lei Signed-off-by: Christoph Hellwig commit cc667f6d5de023ee131e96bb88e5cddca23272bd Author: Liviu Dudau Date: Sat Dec 29 17:23:43 2018 +0000 nvme-pci: use the same attributes when freeing host_mem_desc_bufs. When using HMB the PCIe host driver allocates host_mem_desc_bufs using dma_alloc_attrs() but frees them using dma_free_coherent(). Use the correct dma_free_attrs() function to free the buffers. Signed-off-by: Liviu Dudau Signed-off-by: Christoph Hellwig commit c61e678f30da733a1b7fdd5983d0770de2e6009c Author: Jianchao Wang Date: Mon Dec 24 11:15:53 2018 +0800 nvme-pci: fix the wrong setting of nr_maps We only set the nr_maps to 3 if poll queues are supported. Signed-off-by: Jianchao Wang Signed-off-by: Christoph Hellwig commit 4064e47c82810586975b4304b105056389beaa06 Merge: a88cc8da0279f 56752b21755ae Author: Linus Torvalds Date: Wed Jan 9 10:00:11 2019 -0800 Merge tag 'csky-for-linus-5.0-rc1' of git://github.com/c-sky/csky-linux Pull arch/csky bug fixes from Guo Ren: "Here are some fixup patches for 5.0-rc1: - fix compile error with pte_alloc - fix handle_irq_perbit break irq flow - fix CACHEV1 store instruction fast retire - fix module relocation error with 807 & 860 - add csky kernel features to documentation" * tag 'csky-for-linus-5.0-rc1' of git://github.com/c-sky/csky-linux: irqchip/csky: fixup handle_irq_perbit break irq csky: fixup compile error with pte_alloc csky: fixup CACHEV1 store instruction fast retire csky: fixup relocation error with 807 & 860 Documentation/features: Add csky kernel features commit 47cb393ee4815e10ab66f981fed581afdcc7caac Author: John Pittman Date: Tue Jan 8 16:56:13 2019 -0500 block: doc: add slice_idle_us to bfq documentation Of the tunables available for the bfq I/O scheduler, the only one missing from the documentation in 'Documentation/block/bfq-iosched.txt' is slice_idle_us. Add this tunable to the documentation and a short explanation of its purpose. Acked-by: Paolo Valente Signed-off-by: John Pittman Signed-off-by: Jens Axboe commit a6d8654d885d7d79a3fb82da64eaa489ca332a82 Author: Filipe Manana Date: Tue Jan 8 11:44:41 2019 +0000 Btrfs: fix deadlock when using free space tree due to block group creation When modifying the free space tree we can end up COWing one of its extent buffers which in turn might result in allocating a new chunk, which in turn can result in flushing (finish creation) of pending block groups. If that happens we can deadlock because creating a pending block group needs to update the free space tree, and if any of the updates tries to modify the same extent buffer that we are COWing, we end up in a deadlock since we try to write lock twice the same extent buffer. So fix this by skipping pending block group creation if we are COWing an extent buffer from the free space tree. This is a case missed by commit 5ce555578e091 ("Btrfs: fix deadlock when writing out free space caches"). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202173 Fixes: 5ce555578e091 ("Btrfs: fix deadlock when writing out free space caches") CC: stable@vger.kernel.org # 4.18+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d8b5524242108cb7d28c9b8b9aded7c1edd0e8a8 Author: Filipe Manana Date: Tue Jan 8 11:43:07 2019 +0000 Btrfs: fix race between reflink/dedupe and relocation The recent rework that makes btrfs' remap_file_range operation use the generic helper generic_remap_file_range_prep() introduced a race between relocation and reflinking (for both cloning and deduplication) the file extents between the source and destination inodes. This happens because we no longer lock the source range anymore, and we do not lock it anymore because we wait for direct IO writes and writeback to complete early on the code path right after locking the inodes, which guarantees no other file operations interfere with the reflinking. However there is one exception which is relocation, since it replaces the byte number of file extents items in the fs tree after locking the range the file extent items represent. This is a problem because after finding each file extent to clone in the fs tree, the reflink process copies the file extent item into a local buffer, releases the search path, inserts new file extent items in the destination range and then increments the reference count for the extent mentioned in the file extent item that it previously copied to the buffer. If right after copying the file extent item into the buffer and releasing the path the relocation process updates the file extent item to point to the new extent, the reflink process ends up creating a delayed reference to increment the reference count of the old extent, for which the relocation process already created a delayed reference to drop it. This results in failure to run delayed references because we will attempt to increment the count of a reference that was already dropped. This is illustrated by the following diagram: CPU 1 CPU 2 relocation is running btrfs_clone_files() btrfs_clone() --> finds extent item in source range point to extent at bytenr X --> copies it into a local buffer --> releases path replace_file_extents() --> successfully locks the range represented by the file extent item --> replaces disk_bytenr field in the file extent item with some other value Y --> creates delayed reference to increment reference count for extent at bytenr Y --> creates delayed reference to drop the extent at bytenr X --> starts transaction --> creates delayed reference to increment extent at bytenr X When this race is hit the running transaction ends up getting aborted with an -EIO error and a trace like the following is produced: [ 4382.553858] WARNING: CPU: 2 PID: 3648 at fs/btrfs/extent-tree.c:1552 lookup_inline_extent_backref+0x4f4/0x650 [btrfs] (...) [ 4382.556293] CPU: 2 PID: 3648 Comm: btrfs Tainted: G W 4.20.0-rc6-btrfs-next-41 #1 [ 4382.556294] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [ 4382.556308] RIP: 0010:lookup_inline_extent_backref+0x4f4/0x650 [btrfs] (...) [ 4382.556310] RSP: 0018:ffffac784408f738 EFLAGS: 00010202 [ 4382.556311] RAX: 0000000000000001 RBX: ffff8980673c3a48 RCX: 0000000000000001 [ 4382.556312] RDX: 0000000000000008 RSI: 0000000000000000 RDI: 0000000000000000 [ 4382.556312] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 4382.556313] R10: 0000000000000001 R11: ffff897f40000000 R12: 0000000000001000 [ 4382.556313] R13: 00000000c224f000 R14: ffff89805de9bd40 R15: ffff8980453f4548 [ 4382.556315] FS: 00007f5e759178c0(0000) GS:ffff89807b300000(0000) knlGS:0000000000000000 [ 4382.563130] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4382.563562] CR2: 00007f2e9789fcbc CR3: 0000000120512001 CR4: 00000000003606e0 [ 4382.564005] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4382.564451] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4382.564887] Call Trace: [ 4382.565343] insert_inline_extent_backref+0x55/0xe0 [btrfs] [ 4382.565796] __btrfs_inc_extent_ref.isra.60+0x88/0x260 [btrfs] [ 4382.566249] ? __btrfs_run_delayed_refs+0x93/0x1650 [btrfs] [ 4382.566702] __btrfs_run_delayed_refs+0xa22/0x1650 [btrfs] [ 4382.567162] btrfs_run_delayed_refs+0x7e/0x1d0 [btrfs] [ 4382.567623] btrfs_commit_transaction+0x50/0x9c0 [btrfs] [ 4382.568112] ? _raw_spin_unlock+0x24/0x30 [ 4382.568557] ? block_rsv_release_bytes+0x14e/0x410 [btrfs] [ 4382.569006] create_subvol+0x3c8/0x830 [btrfs] [ 4382.569461] ? btrfs_mksubvol+0x317/0x600 [btrfs] [ 4382.569906] btrfs_mksubvol+0x317/0x600 [btrfs] [ 4382.570383] ? rcu_sync_lockdep_assert+0xe/0x60 [ 4382.570822] ? __sb_start_write+0xd4/0x1c0 [ 4382.571262] ? mnt_want_write_file+0x24/0x50 [ 4382.571712] btrfs_ioctl_snap_create_transid+0x117/0x1a0 [btrfs] [ 4382.572155] ? _copy_from_user+0x66/0x90 [ 4382.572602] btrfs_ioctl_snap_create+0x66/0x80 [btrfs] [ 4382.573052] btrfs_ioctl+0x7c1/0x30e0 [btrfs] [ 4382.573502] ? mem_cgroup_commit_charge+0x8b/0x570 [ 4382.573946] ? do_raw_spin_unlock+0x49/0xc0 [ 4382.574379] ? _raw_spin_unlock+0x24/0x30 [ 4382.574803] ? __handle_mm_fault+0xf29/0x12d0 [ 4382.575215] ? do_vfs_ioctl+0xa2/0x6f0 [ 4382.575622] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [ 4382.576020] do_vfs_ioctl+0xa2/0x6f0 [ 4382.576405] ksys_ioctl+0x70/0x80 [ 4382.576776] __x64_sys_ioctl+0x16/0x20 [ 4382.577137] do_syscall_64+0x60/0x1b0 [ 4382.577488] entry_SYSCALL_64_after_hwframe+0x49/0xbe (...) [ 4382.578837] RSP: 002b:00007ffe04bf64c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 4382.579174] RAX: ffffffffffffffda RBX: 00005564136f3050 RCX: 00007f5e74724dd7 [ 4382.579505] RDX: 00007ffe04bf64d0 RSI: 000000005000940e RDI: 0000000000000003 [ 4382.579848] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000044 [ 4382.580164] R10: 0000000000000541 R11: 0000000000000202 R12: 00005564136f3010 [ 4382.580477] R13: 0000000000000003 R14: 00005564136f3035 R15: 00005564136f3050 [ 4382.580792] irq event stamp: 0 [ 4382.581106] hardirqs last enabled at (0): [<0000000000000000>] (null) [ 4382.581441] hardirqs last disabled at (0): [] copy_process.part.32+0x6e2/0x2320 [ 4382.581772] softirqs last enabled at (0): [] copy_process.part.32+0x6e2/0x2320 [ 4382.582095] softirqs last disabled at (0): [<0000000000000000>] (null) [ 4382.582413] ---[ end trace d3c188e3e9367382 ]--- [ 4382.623855] BTRFS: error (device sdc) in btrfs_run_delayed_refs:2981: errno=-5 IO failure [ 4382.624295] BTRFS info (device sdc): forced readonly Fix this by locking the source range before searching for the file extent items in the fs tree, since the relocation process will try to lock the range a file extent item represents before updating it with the new extent location. Fixes: 34a28e3d7753 ("Btrfs: use generic_remap_file_range_prep() for cloning and deduplication") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f7fa1107f30e13255fb9a5359d357e07d3721b0b Author: Filipe Manana Date: Tue Jan 8 11:42:54 2019 +0000 Btrfs: fix race between cloning range ending at eof and writeback The recent rework that makes btrfs' remap_file_range operation use the generic helper generic_remap_file_range_prep() introduced a race between writeback and cloning a range that covers the eof extent of the source file into a destination offset that is greater then the same file's size. This happens because we now wait for writeback to complete before doing the truncation of the eof block, while previously we did the truncation and then waited for writeback to complete. This leads to a race between writeback of the truncated block and cloning the file extents in the source range, because we copy each file extent item we find in the fs root into a buffer, then release the path and then increment the reference count for the extent referred in that file extent item we copied, which can no longer exist if writeback of the truncated eof block completes after we copied the file extent item into the buffer and before we incremented the reference count. This is illustrated by the following diagram: CPU 1 CPU 2 btrfs_clone_files() btrfs_cont_expand() btrfs_truncate_block() --> zeroes part of the page containg eof, marking it for delalloc btrfs_clone() --> finds extent item covering eof, points to extent at bytenr X --> copies it into a local buffer --> releases path writeback starts btrfs_finish_ordered_io() insert_reserved_file_extent() __btrfs_drop_extents() --> creates delayed reference to drop the extent at bytenr X --> starts transaction --> creates delayed reference to increment extent at bytenr X When this race is hit the running transaction ends up getting aborted with an -EIO error and a trace like the following is produced: [ 4382.553858] WARNING: CPU: 2 PID: 3648 at fs/btrfs/extent-tree.c:1552 lookup_inline_extent_backref+0x4f4/0x650 [btrfs] (...) [ 4382.556293] CPU: 2 PID: 3648 Comm: btrfs Tainted: G W 4.20.0-rc6-btrfs-next-41 #1 [ 4382.556294] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [ 4382.556308] RIP: 0010:lookup_inline_extent_backref+0x4f4/0x650 [btrfs] (...) [ 4382.556310] RSP: 0018:ffffac784408f738 EFLAGS: 00010202 [ 4382.556311] RAX: 0000000000000001 RBX: ffff8980673c3a48 RCX: 0000000000000001 [ 4382.556312] RDX: 0000000000000008 RSI: 0000000000000000 RDI: 0000000000000000 [ 4382.556312] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 4382.556313] R10: 0000000000000001 R11: ffff897f40000000 R12: 0000000000001000 [ 4382.556313] R13: 00000000c224f000 R14: ffff89805de9bd40 R15: ffff8980453f4548 [ 4382.556315] FS: 00007f5e759178c0(0000) GS:ffff89807b300000(0000) knlGS:0000000000000000 [ 4382.563130] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4382.563562] CR2: 00007f2e9789fcbc CR3: 0000000120512001 CR4: 00000000003606e0 [ 4382.564005] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4382.564451] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4382.564887] Call Trace: [ 4382.565343] insert_inline_extent_backref+0x55/0xe0 [btrfs] [ 4382.565796] __btrfs_inc_extent_ref.isra.60+0x88/0x260 [btrfs] [ 4382.566249] ? __btrfs_run_delayed_refs+0x93/0x1650 [btrfs] [ 4382.566702] __btrfs_run_delayed_refs+0xa22/0x1650 [btrfs] [ 4382.567162] btrfs_run_delayed_refs+0x7e/0x1d0 [btrfs] [ 4382.567623] btrfs_commit_transaction+0x50/0x9c0 [btrfs] [ 4382.568112] ? _raw_spin_unlock+0x24/0x30 [ 4382.568557] ? block_rsv_release_bytes+0x14e/0x410 [btrfs] [ 4382.569006] create_subvol+0x3c8/0x830 [btrfs] [ 4382.569461] ? btrfs_mksubvol+0x317/0x600 [btrfs] [ 4382.569906] btrfs_mksubvol+0x317/0x600 [btrfs] [ 4382.570383] ? rcu_sync_lockdep_assert+0xe/0x60 [ 4382.570822] ? __sb_start_write+0xd4/0x1c0 [ 4382.571262] ? mnt_want_write_file+0x24/0x50 [ 4382.571712] btrfs_ioctl_snap_create_transid+0x117/0x1a0 [btrfs] [ 4382.572155] ? _copy_from_user+0x66/0x90 [ 4382.572602] btrfs_ioctl_snap_create+0x66/0x80 [btrfs] [ 4382.573052] btrfs_ioctl+0x7c1/0x30e0 [btrfs] [ 4382.573502] ? mem_cgroup_commit_charge+0x8b/0x570 [ 4382.573946] ? do_raw_spin_unlock+0x49/0xc0 [ 4382.574379] ? _raw_spin_unlock+0x24/0x30 [ 4382.574803] ? __handle_mm_fault+0xf29/0x12d0 [ 4382.575215] ? do_vfs_ioctl+0xa2/0x6f0 [ 4382.575622] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [ 4382.576020] do_vfs_ioctl+0xa2/0x6f0 [ 4382.576405] ksys_ioctl+0x70/0x80 [ 4382.576776] __x64_sys_ioctl+0x16/0x20 [ 4382.577137] do_syscall_64+0x60/0x1b0 [ 4382.577488] entry_SYSCALL_64_after_hwframe+0x49/0xbe (...) [ 4382.578837] RSP: 002b:00007ffe04bf64c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 4382.579174] RAX: ffffffffffffffda RBX: 00005564136f3050 RCX: 00007f5e74724dd7 [ 4382.579505] RDX: 00007ffe04bf64d0 RSI: 000000005000940e RDI: 0000000000000003 [ 4382.579848] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000044 [ 4382.580164] R10: 0000000000000541 R11: 0000000000000202 R12: 00005564136f3010 [ 4382.580477] R13: 0000000000000003 R14: 00005564136f3035 R15: 00005564136f3050 [ 4382.580792] irq event stamp: 0 [ 4382.581106] hardirqs last enabled at (0): [<0000000000000000>] (null) [ 4382.581441] hardirqs last disabled at (0): [] copy_process.part.32+0x6e2/0x2320 [ 4382.581772] softirqs last enabled at (0): [] copy_process.part.32+0x6e2/0x2320 [ 4382.582095] softirqs last disabled at (0): [<0000000000000000>] (null) [ 4382.582413] ---[ end trace d3c188e3e9367382 ]--- [ 4382.623855] BTRFS: error (device sdc) in btrfs_run_delayed_refs:2981: errno=-5 IO failure [ 4382.624295] BTRFS info (device sdc): forced readonly Fix this by waiting for writeback to complete after truncating the eof block. Fixes: 34a28e3d7753 ("Btrfs: use generic_remap_file_range_prep() for cloning and deduplication") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 498c203d855eaf6571b63ea860a53862c4fe91b7 Author: Arnaldo Carvalho de Melo Date: Wed Jan 9 10:02:12 2019 -0300 tools include uapi: Sync linux/if_link.h copy with the kernel sources To pick the changes from: a428afe82f98 ("net: bridge: add support for user-controlled bool options") a025fb5f49ad ("geneve: Allow configuration of DF behaviour") b4d3069783bc ("vxlan: Allow configuration of DF behaviour") Silencing this tools/ build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' Cc: Adrian Hunter Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nikolay Aleksandrov Cc: Stefano Brivio Link: https://lkml.kernel.org/n/tip-wq410s2wuqv5k980bidw0ju8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0e141d1c65c1dd31c914eb2e11651adcc1a15912 Author: Quentin Perret Date: Wed Jan 9 10:42:36 2019 +0000 cpufreq: scmi: Fix frequency invariance in slow path The scmi-cpufreq driver calls the arch_set_freq_scale() callback on frequency changes to provide scale-invariant load-tracking signals to the scheduler. However, in the slow path, it does so while specifying the current and max frequencies in different units, hence resulting in a broken freq_scale factor. Fix this by passing all frequencies in KHz, as stored in the CPUFreq frequency table. Fixes: 99d6bdf33877 (cpufreq: add support for CPU DVFS based on SCMI message protocol) Signed-off-by: Quentin Perret Acked-by: Viresh Kumar Acked-by: Sudeep Holla Cc: 4.17+ # v4.17+ Signed-off-by: Rafael J. Wysocki commit 7604bf0920985c9280c8b24e2f0c3e4ed47f502f Author: Otto Sabart Date: Wed Jan 9 00:56:51 2019 +0100 doc: trace: fix reference to cpuidle documentation file Old cpuidle/sysfs.txt file was replaced in aa5eee355b46. So, refer to an updated file. Fixes: aa5eee355b46 (Documentation: admin-guide: PM: Add cpuidle document) Signed-off-by: Otto Sabart Signed-off-by: Rafael J. Wysocki commit 3e2ffd655cc6a694608d997738989ff5572a8266 Author: Michael S. Tsirkin Date: Wed Jan 2 15:57:49 2019 -0500 include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR Since commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") clang no longer reuses the OPTIMIZER_HIDE_VAR macro from compiler-gcc - instead it gets the version in include/linux/compiler.h. Unfortunately that version doesn't actually prevent compiler from optimizing out the variable. Fix up by moving the macro out from compiler-gcc.h to compiler.h. Compilers without incline asm support will keep working since it's protected by an ifdef. Also fix up comments to match reality since we are no longer overriding any macros. Build-tested with gcc and clang. Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Cc: Eli Friedman Cc: Joe Perches Cc: Linus Torvalds Reviewed-by: Nick Desaulniers Signed-off-by: Michael S. Tsirkin Signed-off-by: Miguel Ojeda commit f8c15790e4d8bdf2d21a5e9d43b5f97983af1222 Author: Tomi Valkeinen Date: Thu Jan 3 13:59:54 2019 +0200 drm/bridge: tc358767: use DP connector if no panel set tc358767 driver sets the connector type always to eDP. This patch sets the type to DP if there is no panel defined, which implies that there's a DP connector on the board. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-8-tomi.valkeinen@ti.com commit 7923e09c7a766e2d58de7fc395bb84c18e5bc625 Author: Tomi Valkeinen Date: Thu Jan 3 13:59:53 2019 +0200 drm/bridge: tc358767: fix output H/V syncs The H and V syncs of the DP output are always set to active high. This patch fixes the syncs by configuring them according to the videomode. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-7-tomi.valkeinen@ti.com commit 51b9e62eb6950c762162ab7eb8390990179be067 Author: Tomi Valkeinen Date: Thu Jan 3 13:59:52 2019 +0200 drm/bridge: tc358767: reject modes which require too much BW The current driver accepts any videomode with pclk < 154MHz. This is not correct, as with 1 lane and/or 1.62Mbps speed not all videomodes can be supported. Add code to reject modes that require more bandwidth that is available. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-6-tomi.valkeinen@ti.com commit 9a63bd6fe1b5590ffa42ae2ed22ee21363293e31 Author: Tomi Valkeinen Date: Thu Jan 3 13:59:51 2019 +0200 drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value Initially DP0_SRCCTRL is set to a static value which includes DP0_SRCCTRL_LANES_2 and DP0_SRCCTRL_BW27, even when only 1 lane of 1.62Gbps speed is used. DP1_SRCCTRL is configured to a magic number. This patch changes the configuration as follows: Configure DP0_SRCCTRL by using tc_srcctrl() which provides the correct value. DP1_SRCCTRL needs two bits to be set to the same value as DP0_SRCCTRL: SSCG and BW27. All other bits can be zero. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-5-tomi.valkeinen@ti.com commit 4d9d54a730434cc068dd3515ba6116697196f77b Author: Tomi Valkeinen Date: Thu Jan 3 13:59:50 2019 +0200 drm/bridge: tc358767: fix single lane configuration PHY_2LANE bit is always set in DP_PHY_CTRL, breaking 1 lane use. Set PHY_2LANE only when 2 lanes are used. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-4-tomi.valkeinen@ti.com commit adf4109896bbee27fd2ac3b48d22d6a0062fe517 Author: Tomi Valkeinen Date: Thu Jan 3 13:59:49 2019 +0200 drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE DP1_SRCCTRL register and PHY_2LANE field did not have matching defines. Add these. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-3-tomi.valkeinen@ti.com commit 4842379cbe6e851de914a7132f76f4e200b9a98b Author: Tomi Valkeinen Date: Thu Jan 3 13:59:48 2019 +0200 drm/bridge: tc358767: add bus flags tc358767 driver does not set DRM bus_flags, even if it does configures the polarity settings into its registers. This means that the DPI source can't configure the polarities correctly. Add sync flags accordingly. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-2-tomi.valkeinen@ti.com commit e4f358916d528d479c3c12bd2fd03f2d5a576380 Author: WANG Chao Date: Tue Dec 11 00:37:25 2018 +0800 x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE Commit 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") replaced the RETPOLINE define with CONFIG_RETPOLINE checks. Remove the remaining pieces. [ bp: Massage commit message. ] Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") Signed-off-by: WANG Chao Signed-off-by: Borislav Petkov Reviewed-by: Zhenzhong Duan Reviewed-by: Masahiro Yamada Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Daniel Borkmann Cc: David Woodhouse Cc: Geert Uytterhoeven Cc: Jessica Yu Cc: Jiri Kosina Cc: Kees Cook Cc: Konrad Rzeszutek Wilk Cc: Luc Van Oostenryck Cc: Michal Marek Cc: Miguel Ojeda Cc: Peter Zijlstra Cc: Tim Chen Cc: Vasily Gorbik Cc: linux-kbuild@vger.kernel.org Cc: srinivas.eeda@oracle.com Cc: stable Cc: x86-ml Link: https://lkml.kernel.org/r/20181210163725.95977-1-chao.wang@ucloud.cn commit 90802938f7e88045ace123e105e22e8c3e7f9c7e Author: Borislav Petkov Date: Tue Jan 8 17:38:29 2019 +0100 x86/cache: Rename config option to CONFIG_X86_RESCTRL CONFIG_RESCTRL is too generic. The final goal is to have a generic option called like this which is selected by the arch-specific ones CONFIG_X86_RESCTRL and CONFIG_ARM64_RESCTRL. The generic one will cover the resctrl filesystem and other generic and shared bits of functionality. Signed-off-by: Borislav Petkov Suggested-by: Ingo Molnar Requested-by: Linus Torvalds Cc: Babu Moger Cc: Fenghua Yu Cc: James Morse Cc: Reinette Chatre Cc: Tony Luck Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20190108171401.GC12235@zn.tnic commit d1dd42110d2727e81b9265841a62bc84c454c3a2 Author: Kailang Yang Date: Wed Jan 9 17:05:24 2019 +0800 ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 Disable Headset Mic VREF for headset mode of ALC225. This will be controlled by coef bits of headset mode functions. [ Fixed a compile warning and code simplification -- tiwai ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit 4d4b0c52bde470c379f5d168d5c139ad866cb808 Author: Kailang Yang Date: Wed Jan 9 16:23:37 2019 +0800 ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225 Forgot to add unplug function to unplug state of headset mode for ALC225. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit 576b50ea235699d83758c0c514c65b8d486a159d Merge: 64598e8b6fdaf ee412f14693a3 Author: Ingo Molnar Date: Wed Jan 9 07:59:40 2019 +0100 Merge tag 'perf-core-for-mingo-5.0-20190108' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo: perf top: Arnaldo Carvalho de Melo: - Lift restriction on using callchains without "sym" in --sort perf trace: Arnaldo Carvalho de Melo: - Fix ')' placement in "interrupted" syscall lines. - Fix alignment for [continued] lines. perf tests: Florian Fainelli: - Add a test for the ARM 32-bit [vectors] page. tools lib traceevent: Tzvetomir Stoyanov: - Introduce new libtracevent API: tep_override_comm(). - Initialize host_bigendian at tep_handle allocation. - More namespacing changes. - Remove superfluous APIs. tools headers uapi: Arnaldo Carvalho de Melo: . Update linux/{fs,vhost}.h, grab a copy o linux/mount.h, where the MS_ mount flags were moved. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 1cb95e072ede5e3d6a54eefd520db21b45985896 Author: Dan Williams Date: Tue Jan 8 15:34:52 2019 -0800 libnvdimm/dimm: Fix security capability detection for non-Intel NVDIMMs Kees reports a crash with the following signature... RIP: 0010:nvdimm_visible+0x79/0x80 [..] Call Trace: internal_create_group+0xf4/0x380 sysfs_create_groups+0x46/0xb0 device_add+0x331/0x680 nd_async_device_register+0x15/0x60 async_run_entry_fn+0x38/0x100 ...when starting a QEMU environment with "label-less" DIMM. Without labels QEMU does not publish any DSM methods. Without defined methods the NVDIMM_FAMILY type is not established and the nfit driver will skip registering security operations. In that case the security state should be initialized to a negative value in __nvdimm_create() and nvdimm_visible() should skip interrogating the specific ops. However, since 'enum nvdimm_security_state' was only defined to contain positive values the "if (nvdimm->sec.state < 0)" check always fails. Define a negative error state to allow negative state values to be handled as expected. Fixes: f2989396553a ("acpi/nfit, libnvdimm: Introduce nvdimm_security_ops") Reviewed-by: Dave Jiang Reported-by: Kees Cook Tested-by: Kees Cook Signed-off-by: Dan Williams commit ccb7f15a8a3c0c7a35389e4c8e083c424b4df79d Author: Nathan Chancellor Date: Tue Jan 8 22:00:37 2019 -0700 nfit: Mark some functions as __maybe_unused On arm64 little endian allyesconfig: drivers/acpi/nfit/intel.c:149:12: warning: unused function 'intel_security_unlock' [-Wunused-function] static int intel_security_unlock(struct nvdimm *nvdimm, ^ drivers/acpi/nfit/intel.c:230:12: warning: unused function 'intel_security_erase' [-Wunused-function] static int intel_security_erase(struct nvdimm *nvdimm, ^ drivers/acpi/nfit/intel.c:279:12: warning: unused function 'intel_security_query_overwrite' [-Wunused-function] static int intel_security_query_overwrite(struct nvdimm *nvdimm) ^ drivers/acpi/nfit/intel.c:316:12: warning: unused function 'intel_security_overwrite' [-Wunused-function] static int intel_security_overwrite(struct nvdimm *nvdimm, ^ 4 warnings generated. Mark these functions as __maybe_unused because they are only used when CONFIG_X86 is set. Fixes: 4c6926a23b76 ("acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs") Suggested-by: Dan Williams Signed-off-by: Nathan Chancellor Signed-off-by: Dan Williams commit f0e9943725186ddbdc9718a559c26c5f507262f2 Author: Zhenyu Wang Date: Sat Dec 29 11:13:10 2018 +0800 drm/i915/gvt: Fix workload request allocation before request add In commit 6bb2a2af8b1b ("drm/i915/gvt: Fix crash after request->hw_context change"), forgot to handle workload scan path in ELSP handler case which was to optimize scanning earlier instead of in gvt submission thread, so request alloc and add was splitting then which is against right process. This trys to do a partial revert of that commit which still has workload request alloc helper and make sure shadow state population is handled after request alloc for target state buffer. v3: Fix missed workload status setting in request alloc error path v2: Fix dispatch workload err path that should add request after alloc anyway. Fixes: 6bb2a2af8b1b ("drm/i915/gvt: Fix crash after request->hw_context change") Cc: Bin Yang Cc: Chris Wilson Tested-by: Bin Yang Reviewed-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang commit 40405851af73c59678ffd8f490e6b288c7fbaf29 Author: Jeff Moyer Date: Tue Jan 8 16:57:34 2019 -0500 block: clarify documentation for blk_{start|finish}_plug There was some confusion about what these functions did. Make it clear that this is a hint for upper layers to pass to the block layer, and that it does not guarantee that I/O will not be submitted between a start and finish plug. Reported-by: "Darrick J. Wong" Reviewed-by: Darrick J. Wong Reviewed-by: Ming Lei Signed-off-by: Jeff Moyer Signed-off-by: Jens Axboe commit cc29a1b0a3f2597ce887d339222fa85b9307706d Author: Logan Gunthorpe Date: Tue Jan 8 13:50:43 2019 -0700 scsi: isci: initialize shost fully before calling scsi_add_host() scsi_mq_setup_tags(), which is called by scsi_add_host(), calculates the command size to allocate based on the prot_capabilities. In the isci driver, scsi_host_set_prot() is called after scsi_add_host() so the command size gets calculated to be smaller than it needs to be. Eventually, scsi_mq_init_request() locates the 'prot_sdb' after the command assuming it was sized correctly and a buffer overrun may occur. However, seeing blk_mq_alloc_rqs() rounds up to the nearest cache line size, the mistake can go unnoticed. The bug was noticed after the struct request size was reduced by commit 9d037ad707ed ("block: remove req->timeout_list") Which likely reduced the allocated space for the request by an entire cache line, enough that the overflow could be hit and it caused a panic, on boot, at: RIP: 0010:t10_pi_complete+0x77/0x1c0 Call Trace: sd_done+0xf5/0x340 scsi_finish_command+0xc3/0x120 blk_done_softirq+0x83/0xb0 __do_softirq+0xa1/0x2e6 irq_exit+0xbc/0xd0 call_function_single_interrupt+0xf/0x20 sd_done() would call scsi_prot_sg_count() which reads the number of entities in 'prot_sdb', but seeing 'prot_sdb' is located after the end of the allocated space it reads a garbage number and erroneously calls t10_pi_complete(). To prevent this, the calls to scsi_host_set_prot() are moved into isci_host_alloc() before the call to scsi_add_host(). Out of caution, also move the similar call to scsi_host_set_guard(). Fixes: 3d2d75254915 ("[SCSI] isci: T10 DIF support") Link: http://lkml.kernel.org/r/da851333-eadd-163a-8c78-e1f4ec5ec857@deltatee.com Signed-off-by: Logan Gunthorpe Cc: Intel SCU Linux support Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: Jens Axboe Cc: Jeff Moyer Reviewed-by: Jeff Moyer Reviewed-by: Jens Axboe Signed-off-by: Martin K. Petersen commit a88cc8da0279f8e481b0d90e51a0a1cffac55906 Merge: 9cb2feb4d21d9 73444bc4d8f92 Author: Linus Torvalds Date: Tue Jan 8 18:58:29 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "14 fixes" * emailed patches from Andrew Morton : mm, page_alloc: do not wake kswapd with zone lock held hugetlbfs: revert "use i_mmap_rwsem for more pmd sharing synchronization" hugetlbfs: revert "Use i_mmap_rwsem to fix page fault/truncate race" mm: page_mapped: don't assume compound page is huge or THP mm/memory.c: initialise mmu_notifier_range correctly tools/vm/page_owner: use page_owner_sort in the use example kasan: fix krealloc handling for tag-based mode kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning mm, memcg: fix reclaim deadlock with writeback mm/usercopy.c: no check page span for stack objects slab: alien caches must not be initialized if the allocation of the alien cache failed fork, memcg: fix cached_stacks case zram: idle writeback fixes and cleanup commit 5bd5f66cf142703e163459e1b36b73e265f0a0da Author: Gustavo A. R. Silva Date: Tue Nov 27 22:32:18 2018 -0600 scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Drop thru" and "Fall Thru" with "fall through" annotations, which is what GCC is expecting to find. Also, in some cases a dash is added as a token in order to separate the "fall through" annotation from the rest of the comment on the same line, which is what GCC is expecting to find. Addresses-Coverity-ID: 114979 ("Missing break in switch") Addresses-Coverity-ID: 114980 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen commit 12de280b36f0e0599c7f170aa7f1058f3aeb6d9d Author: Gustavo A. R. Silva Date: Thu Jan 3 10:47:44 2019 -0600 scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start Fix boolean expression by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 1e46731efd9c ("scsi: smartpqi: check for null device pointers") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Gustavo A. R. Silva Acked-by: Don Brace Signed-off-by: Martin K. Petersen commit 3f7e62bba0003f9c68f599f5997c4647ef5b4f4e Author: Stanley Chu Date: Thu Jan 3 22:08:05 2019 +0800 scsi: core: Synchronize request queue PM status only on successful resume The commit 356fd2663cff ("scsi: Set request queue runtime PM status back to active on resume") fixed up the inconsistent RPM status between request queue and device. However changing request queue RPM status shall be done only on successful resume, otherwise status may be still inconsistent as below, Request queue: RPM_ACTIVE Device: RPM_SUSPENDED This ends up soft lockup because requests can be submitted to underlying devices but those devices and their required resource are not resumed. For example, After above inconsistent status happens, IO request can be submitted to UFS device driver but required resource (like clock) is not resumed yet thus lead to warning as below call stack, WARN_ON(hba->clk_gating.state != CLKS_ON); ufshcd_queuecommand scsi_dispatch_cmd scsi_request_fn __blk_run_queue cfq_insert_request __elv_add_request blk_flush_plug_list blk_finish_plug jbd2_journal_commit_transaction kjournald2 We may see all behind IO requests hang because of no response from storage host or device and then soft lockup happens in system. In the end, system may crash in many ways. Fixes: 356fd2663cff (scsi: Set request queue runtime PM status back to active on resume) Cc: stable@vger.kernel.org Signed-off-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 251f24e63fc291f288f765663e62cd575f048fd5 Author: Julia Lawall Date: Sun Dec 30 16:53:13 2018 +0100 scsi: pm80xx: reduce indentation Delete tab aligning a statement with the right hand side of a preceding assignment rather than the left hand side. Found with the help of Coccinelle. [mkp: added space] Signed-off-by: Julia Lawall Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 72b4a0465f995175a2e22cf4a636bf781f1f28a7 Author: YueHaibing Date: Thu Dec 20 11:16:07 2018 +0800 scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param The return code should be check while qla4xxx_copy_from_fwddb_param fails. Signed-off-by: YueHaibing Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit d1f38d995e984db36449661fcbad1649c21883e7 Author: Tomas Henzl Date: Wed Jan 2 16:07:25 2019 +0100 scsi: megaraid_sas: correct an info message This was apparently forgotten in 894169db1 ("scsi: megaraid_sas: Use 63-bit DMA addressing"). Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 621a4367d69509f35abb4559a2dd7179ea5acada Author: Leo Zhang Date: Mon Dec 24 00:18:27 2018 +0800 scsi: target/iscsi: fix error msg typo when create lio_qr_cache failed Signed-off-by: Leo Zhang Signed-off-by: Martin K. Petersen commit 44759979a49bfd2d20d789add7fa81a21eb1a4ab Author: Ivan Mironov Date: Sun Dec 23 12:41:58 2018 +0500 scsi: sd: Fix cache_type_store() Changing of caching mode via /sys/devices/.../scsi_disk/.../cache_type may fail if device responds to MODE SENSE command with DPOFUA flag set, and then checks this flag to be not set on MODE SELECT command. In this scenario, when trying to change cache_type, write always fails: # echo "none" >cache_type bash: echo: write error: Invalid argument And following appears in dmesg: [13007.865745] sd 1:0:1:0: [sda] Sense Key : Illegal Request [current] [13007.865753] sd 1:0:1:0: [sda] Add. Sense: Invalid field in parameter list From SBC-4 r15, 6.5.1 "Mode pages overview", description of DEVICE-SPECIFIC PARAMETER field in the mode parameter header: ... The write protect (WP) bit for mode data sent with a MODE SELECT command shall be ignored by the device server. ... The DPOFUA bit is reserved for mode data sent with a MODE SELECT command. ... The remaining bits in the DEVICE-SPECIFIC PARAMETER byte are also reserved and shall be set to zero. [mkp: shuffled commentary to commit description] Cc: stable@vger.kernel.org Signed-off-by: Ivan Mironov Signed-off-by: Martin K. Petersen commit d972f3dce8d161e2142da0ab1ef25df00e2f21a9 Author: Jason Gunthorpe Date: Tue Jan 8 23:27:06 2019 +0000 packet: Do not leak dev refcounts on error exit 'dev' is non NULL when the addr_len check triggers so it must goto a label that does the dev_put otherwise dev will have a leaked refcount. This bug causes the ib_ipoib module to become unloadable when using systemd-network as it triggers this check on InfiniBand links. Fixes: 99137b7888f4 ("packet: validate address length") Reported-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9cb2feb4d21d97386eb25c7b67e2793efcc1e70a Author: Stafford Horne Date: Tue Jan 8 22:15:15 2019 +0900 arch/openrisc: Fix issues with access_ok() The commit 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'") exposed incorrect implementations of access_ok() macro in several architectures. This change fixes 2 issues found in OpenRISC. OpenRISC was not properly using parenthesis for arguments and also using arguments twice. This patch fixes those 2 issues. I test booted this patch with v5.0-rc1 on qemu and it's working fine. Cc: Guenter Roeck Cc: Linus Torvalds Reported-by: Linus Torvalds Signed-off-by: Stafford Horne Signed-off-by: Linus Torvalds commit 8a7f02f67c395949c768ae1cf4f12905a81e3cde Author: Xiaochun Lee Date: Sat Jan 5 16:08:38 2019 +0800 ACPI/nfit: delete the function to_acpi_nfit_desc The function to_acpi_nfit_desc and function to_acpi_desc do the same things,delete the function to_acpi_nfit_desc, and keep the inline function to_acpi_desc. Signed-off-by: Xiaochun Lee Signed-off-by: Dan Williams commit dadbcb450cb22acbc06bb53edf2bcc9261cb78f3 Author: Xiaochun Lee Date: Mon Jan 7 10:33:36 2019 +0800 ACPI/nfit: delete the redundant header file The header file "intel.h" is repeated here, So delete one. Signed-off-by: Xiaochun Lee Signed-off-by: Dan Williams commit 73444bc4d8f92e46a20cb6bd3342fc2ea75c6787 Author: Mel Gorman Date: Tue Jan 8 15:23:39 2019 -0800 mm, page_alloc: do not wake kswapd with zone lock held syzbot reported the following regression in the latest merge window and it was confirmed by Qian Cai that a similar bug was visible from a different context. ====================================================== WARNING: possible circular locking dependency detected 4.20.0+ #297 Not tainted ------------------------------------------------------ syz-executor0/8529 is trying to acquire lock: 000000005e7fb829 (&pgdat->kswapd_wait){....}, at: __wake_up_common_lock+0x19e/0x330 kernel/sched/wait.c:120 but task is already holding lock: 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: rmqueue_bulk mm/page_alloc.c:2548 [inline] 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: __rmqueue_pcplist mm/page_alloc.c:3021 [inline] 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: rmqueue_pcplist mm/page_alloc.c:3050 [inline] 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: rmqueue mm/page_alloc.c:3072 [inline] 000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: get_page_from_freelist+0x1bae/0x52a0 mm/page_alloc.c:3491 It appears to be a false positive in that the only way the lock ordering should be inverted is if kswapd is waking itself and the wakeup allocates debugging objects which should already be allocated if it's kswapd doing the waking. Nevertheless, the possibility exists and so it's best to avoid the problem. This patch flags a zone as needing a kswapd using the, surprisingly, unused zone flag field. The flag is read without the lock held to do the wakeup. It's possible that the flag setting context is not the same as the flag clearing context or for small races to occur. However, each race possibility is harmless and there is no visible degredation in fragmentation treatment. While zone->flag could have continued to be unused, there is potential for moving some existing fields into the flags field instead. Particularly read-mostly ones like zone->initialized and zone->contiguous. Link: http://lkml.kernel.org/r/20190103225712.GJ31517@techsingularity.net Fixes: 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs") Reported-by: syzbot+93d94a001cfbce9e60e1@syzkaller.appspotmail.com Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Tested-by: Qian Cai Cc: Dmitry Vyukov Cc: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ddeaab32a89f04b7e2a2df8771583a719c4ac6b7 Author: Mike Kravetz Date: Tue Jan 8 15:23:36 2019 -0800 hugetlbfs: revert "use i_mmap_rwsem for more pmd sharing synchronization" This reverts b43a9990055958e70347c56f90ea2ae32c67334c The reverted commit caused issues with migration and poisoning of anon huge pages. The LTP move_pages12 test will cause an "unable to handle kernel NULL pointer" BUG would occur with stack similar to: RIP: 0010:down_write+0x1b/0x40 Call Trace: migrate_pages+0x81f/0xb90 __ia32_compat_sys_migrate_pages+0x190/0x190 do_move_pages_to_node.isra.53.part.54+0x2a/0x50 kernel_move_pages+0x566/0x7b0 __x64_sys_move_pages+0x24/0x30 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The purpose of the reverted patch was to fix some long existing races with huge pmd sharing. It used i_mmap_rwsem for this purpose with the idea that this could also be used to address truncate/page fault races with another patch. Further analysis has determined that i_mmap_rwsem can not be used to address all these hugetlbfs synchronization issues. Therefore, revert this patch while working an another approach to the underlying issues. Link: http://lkml.kernel.org/r/20190103235452.29335-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Jan Stancek Cc: Michal Hocko Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Davidlohr Bueso Cc: Prakash Sangappa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7c58097793ef15d58fadf190ee58738fbf447cd Author: Mike Kravetz Date: Tue Jan 8 15:23:32 2019 -0800 hugetlbfs: revert "Use i_mmap_rwsem to fix page fault/truncate race" This reverts c86aa7bbfd5568ba8a82d3635d8f7b8a8e06fe54 The reverted commit caused ABBA deadlocks when file migration raced with file eviction for specific hugetlbfs files. This was discovered with a modified version of the LTP move_pages12 test. The purpose of the reverted patch was to close a long existing race between hugetlbfs file truncation and page faults. After more analysis of the patch and impacted code, it was determined that i_mmap_rwsem can not be used for all required synchronization. Therefore, revert this patch while working an another approach to the underlying issue. Link: http://lkml.kernel.org/r/20190103235452.29335-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reported-by: Jan Stancek Cc: Michal Hocko Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Cc: Andrea Arcangeli Cc: "Kirill A . Shutemov" Cc: Davidlohr Bueso Cc: Prakash Sangappa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ab88c7169b7fba98812ead6524b9d05bc76cf00 Author: Jan Stancek Date: Tue Jan 8 15:23:28 2019 -0800 mm: page_mapped: don't assume compound page is huge or THP LTP proc01 testcase has been observed to rarely trigger crashes on arm64: page_mapped+0x78/0xb4 stable_page_flags+0x27c/0x338 kpageflags_read+0xfc/0x164 proc_reg_read+0x7c/0xb8 __vfs_read+0x58/0x178 vfs_read+0x90/0x14c SyS_read+0x60/0xc0 The issue is that page_mapped() assumes that if compound page is not huge, then it must be THP. But if this is 'normal' compound page (COMPOUND_PAGE_DTOR), then following loop can keep running (for HPAGE_PMD_NR iterations) until it tries to read from memory that isn't mapped and triggers a panic: for (i = 0; i < hpage_nr_pages(page); i++) { if (atomic_read(&page[i]._mapcount) >= 0) return true; } I could replicate this on x86 (v4.20-rc4-98-g60b548237fed) only with a custom kernel module [1] which: - allocates compound page (PAGEC) of order 1 - allocates 2 normal pages (COPY), which are initialized to 0xff (to satisfy _mapcount >= 0) - 2 PAGEC page structs are copied to address of first COPY page - second page of COPY is marked as not present - call to page_mapped(COPY) now triggers fault on access to 2nd COPY page at offset 0x30 (_mapcount) [1] https://github.com/jstancek/reproducers/blob/master/kernel/page_mapped_crash/repro.c Fix the loop to iterate for "1 << compound_order" pages. Kirrill said "IIRC, sound subsystem can producuce custom mapped compound pages". Link: http://lkml.kernel.org/r/c440d69879e34209feba21e12d236d06bc0a25db.1543577156.git.jstancek@redhat.com Fixes: e1534ae95004 ("mm: differentiate page_mapped() from page_mapcount() for compound pages") Signed-off-by: Jan Stancek Debugged-by: Laszlo Ersek Suggested-by: "Kirill A. Shutemov" Acked-by: Michal Hocko Acked-by: Kirill A. Shutemov Reviewed-by: David Hildenbrand Reviewed-by: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ed7293ac40c5b1950b8ab21b6bc1838578ae2ad Author: Matthew Wilcox Date: Tue Jan 8 15:23:25 2019 -0800 mm/memory.c: initialise mmu_notifier_range correctly One of the paths in follow_pte_pmd() initialised the mmu_notifier_range incorrectly. Link: http://lkml.kernel.org/r/20190103002126.GM6310@bombadil.infradead.org Fixes: ac46d4f3c432 ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2") Signed-off-by: Matthew Wilcox Tested-by: Dave Chinner Reviewed-by: Jérôme Glisse Cc: John Hubbard Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aff876dcf4461f311adbdf39ce48c134b3f99c49 Author: Miles Chen Date: Tue Jan 8 15:23:22 2019 -0800 tools/vm/page_owner: use page_owner_sort in the use example The example in comment does not useable because the output binary is named "page_owner_sort", not "sort". Also add a reference to Documentation/vm/page_owner.rst Link: http://lkml.kernel.org/r/1546515361-8317-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Reviewed-by: Andrew Morton Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3fe7cdf02e318870fb71218726cc2321ff41f30 Author: Andrey Konovalov Date: Tue Jan 8 15:23:18 2019 -0800 kasan: fix krealloc handling for tag-based mode Right now tag-based KASAN can retag the memory that is reallocated via krealloc and return a differently tagged pointer even if the same slab object gets used and no reallocated technically happens. There are a few issues with this approach. One is that krealloc callers can't rely on comparing the return value with the passed argument to check whether reallocation happened. Another is that if a caller knows that no reallocation happened, that it can access object memory through the old pointer, which leads to false positives. Look at nf_ct_ext_add() to see an example. Fix this by keeping the same tag if the memory don't actually gets reallocated during krealloc. Link: http://lkml.kernel.org/r/bb2a71d17ed072bcc528cbee46fcbd71a6da3be4.1546540962.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96fedce27e1356a2fff1c270710d9405848db562 Author: Andrey Konovalov Date: Tue Jan 8 15:23:15 2019 -0800 kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY With CONFIG_HARDENED_USERCOPY enabled __check_heap_object() compares and then subtracts a potentially tagged pointer with a non-tagged address of the page that this pointer belongs to, which leads to unexpected behavior. Untag the pointer in __check_heap_object() before doing any of these operations. Link: http://lkml.kernel.org/r/7e756a298d514c4482f52aea6151db34818d395d.1546540962.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb214f2dda31ffa989033b1e0f848ba0d3cb6188 Author: Andrey Konovalov Date: Tue Jan 8 15:23:11 2019 -0800 kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning Instead of changing cache->align to be aligned to KASAN_SHADOW_SCALE_SIZE in kasan_cache_create() we can reuse the ARCH_SLAB_MINALIGN macro. Link: http://lkml.kernel.org/r/52ddd881916bcc153a9924c154daacde78522227.1546540962.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Suggested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63f3655f950186752236bb88a22f8252c11ce394 Author: Michal Hocko Date: Tue Jan 8 15:23:07 2019 -0800 mm, memcg: fix reclaim deadlock with writeback Liu Bo has experienced a deadlock between memcg (legacy) reclaim and the ext4 writeback task1: wait_on_page_bit+0x82/0xa0 shrink_page_list+0x907/0x960 shrink_inactive_list+0x2c7/0x680 shrink_node_memcg+0x404/0x830 shrink_node+0xd8/0x300 do_try_to_free_pages+0x10d/0x330 try_to_free_mem_cgroup_pages+0xd5/0x1b0 try_charge+0x14d/0x720 memcg_kmem_charge_memcg+0x3c/0xa0 memcg_kmem_charge+0x7e/0xd0 __alloc_pages_nodemask+0x178/0x260 alloc_pages_current+0x95/0x140 pte_alloc_one+0x17/0x40 __pte_alloc+0x1e/0x110 alloc_set_pte+0x5fe/0xc20 do_fault+0x103/0x970 handle_mm_fault+0x61e/0xd10 __do_page_fault+0x252/0x4d0 do_page_fault+0x30/0x80 page_fault+0x28/0x30 task2: __lock_page+0x86/0xa0 mpage_prepare_extent_to_map+0x2e7/0x310 [ext4] ext4_writepages+0x479/0xd60 do_writepages+0x1e/0x30 __writeback_single_inode+0x45/0x320 writeback_sb_inodes+0x272/0x600 __writeback_inodes_wb+0x92/0xc0 wb_writeback+0x268/0x300 wb_workfn+0xb4/0x390 process_one_work+0x189/0x420 worker_thread+0x4e/0x4b0 kthread+0xe6/0x100 ret_from_fork+0x41/0x50 He adds "task1 is waiting for the PageWriteback bit of the page that task2 has collected in mpd->io_submit->io_bio, and tasks2 is waiting for the LOCKED bit the page which tasks1 has locked" More precisely task1 is handling a page fault and it has a page locked while it charges a new page table to a memcg. That in turn hits a memory limit reclaim and the memcg reclaim for legacy controller is waiting on the writeback but that is never going to finish because the writeback itself is waiting for the page locked in the #PF path. So this is essentially ABBA deadlock: lock_page(A) SetPageWriteback(A) unlock_page(A) lock_page(B) lock_page(B) pte_alloc_pne shrink_page_list wait_on_page_writeback(A) SetPageWriteback(B) unlock_page(B) # flush A, B to clear the writeback This accumulating of more pages to flush is used by several filesystems to generate a more optimal IO patterns. Waiting for the writeback in legacy memcg controller is a workaround for pre-mature OOM killer invocations because there is no dirty IO throttling available for the controller. There is no easy way around that unfortunately. Therefore fix this specific issue by pre-allocating the page table outside of the page lock. We have that handy infrastructure for that already so simply reuse the fault-around pattern which already does this. There are probably other hidden __GFP_ACCOUNT | GFP_KERNEL allocations from under a fs page locked but they should be really rare. I am not aware of a better solution unfortunately. [akpm@linux-foundation.org: fix mm/memory.c:__do_fault()] [akpm@linux-foundation.org: coding-style fixes] [mhocko@kernel.org: enhance comment, per Johannes] Link: http://lkml.kernel.org/r/20181214084948.GA5624@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20181213092221.27270-1-mhocko@kernel.org Fixes: c3b94f44fcb0 ("memcg: further prevent OOM with too many dirty pages") Signed-off-by: Michal Hocko Reported-by: Liu Bo Debugged-by: Liu Bo Acked-by: Kirill A. Shutemov Acked-by: Johannes Weiner Reviewed-by: Liu Bo Cc: Jan Kara Cc: Dave Chinner Cc: Theodore Ts'o Cc: Vladimir Davydov Cc: Shakeel Butt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bff3c06997374fb9b9991536a547b840549a813 Author: Qian Cai Date: Tue Jan 8 15:23:04 2019 -0800 mm/usercopy.c: no check page span for stack objects It is easy to trigger this with CONFIG_HARDENED_USERCOPY_PAGESPAN=y, usercopy: Kernel memory overwrite attempt detected to spans multiple pages (offset 0, size 23)! kernel BUG at mm/usercopy.c:102! For example, print_worker_info char name[WQ_NAME_LEN] = { }; char desc[WORKER_DESC_LEN] = { }; probe_kernel_read(name, wq->name, sizeof(name) - 1); probe_kernel_read(desc, worker->desc, sizeof(desc) - 1); __copy_from_user_inatomic check_object_size check_heap_object check_page_span This is because on-stack variables could cross PAGE_SIZE boundary, and failed this check, if (likely(((unsigned long)ptr & (unsigned long)PAGE_MASK) == ((unsigned long)end & (unsigned long)PAGE_MASK))) ptr = FFFF889007D7EFF8 end = FFFF889007D7F00E Hence, fix it by checking if it is a stack object first. [keescook@chromium.org: improve comments after reorder] Link: http://lkml.kernel.org/r/20190103165151.GA32845@beast Link: http://lkml.kernel.org/r/20181231030254.99441-1-cai@lca.pw Signed-off-by: Qian Cai Signed-off-by: Kees Cook Acked-by: Kees Cook Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09c2e76ed734a1d36470d257a778aaba28e86531 Author: Christoph Lameter Date: Tue Jan 8 15:23:00 2019 -0800 slab: alien caches must not be initialized if the allocation of the alien cache failed Callers of __alloc_alien() check for NULL. We must do the same check in __alloc_alien_cache to avoid NULL pointer dereferences on allocation failures. Link: http://lkml.kernel.org/r/010001680f42f192-82b4e12e-1565-4ee0-ae1f-1e98974906aa-000000@email.amazonses.com Fixes: 49dfc304ba241 ("slab: use the lock on alien_cache, instead of the lock on array_cache") Fixes: c8522a3a5832b ("Slab: introduce alloc_alien") Signed-off-by: Christoph Lameter Reported-by: syzbot+d6ed4ec679652b4fd4e4@syzkaller.appspotmail.com Reviewed-by: Andrew Morton Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba4a45746c362b665e245c50b870615f02f34781 Author: Shakeel Butt Date: Tue Jan 8 15:22:57 2019 -0800 fork, memcg: fix cached_stacks case Commit 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on memcg charge fail") fixes a crash caused due to failed memcg charge of the kernel stack. However the fix misses the cached_stacks case which this patch fixes. So, the same crash can happen if the memcg charge of a cached stack is failed. Link: http://lkml.kernel.org/r/20190102180145.57406-1-shakeelb@google.com Fixes: 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on memcg charge fail") Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Rik van Riel Cc: Rik van Riel Cc: Roman Gushchin Cc: Johannes Weiner Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1d69a3f8ae77e3dbfdc1356225cce5ea9c366aec Author: Minchan Kim Date: Tue Jan 8 15:22:53 2019 -0800 zram: idle writeback fixes and cleanup This patch includes some fixes and cleanup for idle-page writeback. 1. writeback_limit interface Now writeback_limit interface is rather conusing. For example, once writeback limit budget is exausted, admin can see 0 from /sys/block/zramX/writeback_limit which is same semantic with disable writeback_limit at this moment. IOW, admin cannot tell that zero came from disable writeback limit or exausted writeback limit. To make the interface clear, let's sepatate enable of writeback limit to another knob - /sys/block/zram0/writeback_limit_enable * before: while true : # to re-enable writeback limit once previous one is used up echo 0 > /sys/block/zram0/writeback_limit echo $((200<<20)) > /sys/block/zram0/writeback_limit .. .. # used up the writeback limit budget * new # To enable writeback limit, from the beginning, admin should # enable it. echo $((200<<20)) > /sys/block/zram0/writeback_limit echo 1 > /sys/block/zram/0/writeback_limit_enable while true : echo $((200<<20)) > /sys/block/zram0/writeback_limit .. .. # used up the writeback limit budget It's much strightforward. 2. fix condition check idle/huge writeback mode check The mode in writeback_store is not bit opeartion any more so no need to use bit operations. Furthermore, current condition check is broken in that it does writeback every pages regardless of huge/idle. 3. clean up idle_store No need to use goto. [minchan@kernel.org: missed spin_lock_init] Link: http://lkml.kernel.org/r/20190103001601.GA255139@google.com Link: http://lkml.kernel.org/r/20181224033529.19450-1-minchan@kernel.org Signed-off-by: Minchan Kim Suggested-by: John Dias Cc: Sergey Senozhatsky Cc: John Dias Cc: Srinivas Paladugu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 917cb8a72a94d198073ad1e087685f801292042d Author: Steve Wise Date: Mon Jan 7 11:01:13 2019 -0800 RDMA/cma: Add cm_id restrack resource based on kernel or user cm_id type A recent regression causes a null ptr crash when dumping cm_id resources. The cma is incorrectly adding all cm_id restrack resources as kernel mode. Fixes: af8d70375d56 ("RDMA/restrack: Resource-tracker should not use uobject pointers") Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 19a220dd1e8a1b1d8e5e2f8f4a25313c4b02d527 Author: Jerome Brunet Date: Tue Aug 28 14:27:35 2018 +0200 arm64: defconfig: enable modules for amlogic s400 sound card Compile the necessary drivers as modules, including codecs, for the s400 sound card. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit c235316d935a19deedc2fc48076798c9a56e1a7c Author: Lyude Paul Date: Tue Jan 8 16:11:29 2019 -0500 drm/dp_mst: Add __must_check to drm_dp_mst_topology_mgr_resume() Since I've had to fix two cases of drivers not checking the return code from this function, let's make the compiler complain so this doesn't come up again in the future. Changes since v1: * Remove unneeded __must_check in function declaration - danvet Signed-off-by: Lyude Paul Cc: Jerry Zuo Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20190108211133.32564-4-lyude@redhat.com commit 2d1af6a11cb9d88e0e3dd10258904c437fe1b315 Author: Lyude Paul Date: Tue Jan 8 16:11:28 2019 -0500 drm/amdgpu: Don't fail resume process if resuming atomic state fails This is an ugly one unfortunately. Currently, all DRM drivers supporting atomic modesetting will save the state that userspace had set before suspending, then attempt to restore that state on resume. This probably worked very well at one point, like many other things, until DP MST came into the picture. While it's easy to restore state on normal display connectors that were disconnected during suspend regardless of their state post-resume, this can't really be done with MST because of the fact that setting up a downstream sink requires performing sideband transactions between the source and the MST hub, sending out the ACT packets, etc. Because of this, there isn't really a guarantee that we can restore the atomic state we had before suspend once we've resumed. This sucks pretty bad, but so far I haven't run into any compositors that this actually causes serious issues with. Most compositors will notice the hotplug we send afterwards, and then reprobe state. Since nouveau and i915 also don't fail the suspend/resume process due to failing to restore the atomic state, let's make amdgpu match this behavior. Better to resume the GPU properly, then to stop the process half way because of a potentially unavoidable atomic commit failure. Eventually, we'll have a real fix for this problem on the DRM level. But we've got some more important low-hanging fruit to deal with first. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Jerry Zuo Cc: # v4.15+ Link: https://patchwork.freedesktop.org/patch/msgid/20190108211133.32564-3-lyude@redhat.com commit fe7553bef8d676d1d8b40666868b33ec39b9df5d Author: Lyude Paul Date: Tue Jan 8 16:11:27 2019 -0500 drm/amdgpu: Don't ignore rc from drm_dp_mst_topology_mgr_resume() drm_dp_mst_topology_mgr_resume() returns whether or not it managed to find the topology in question after a suspend resume cycle, and the driver is supposed to check this value and disable MST accordingly if it's gone-in addition to sending a hotplug in order to notify userspace that something changed during suspend. Currently, amdgpu just makes the mistake of ignoring the return code from drm_dp_mst_topology_mgr_resume() which means that if a topology was removed in suspend, amdgpu never notices and assumes it's still connected which leads to all sorts of problems. So, fix this by actually checking the rc from drm_dp_mst_topology_mgr_resume(). Also, reformat the rest of the function while we're at it to fix the over-indenting. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Jerry Zuo Cc: # v4.15+ Link: https://patchwork.freedesktop.org/patch/msgid/20190108211133.32564-2-lyude@redhat.com commit 715849ab31f8e57bbad84cc6c38912aeba6beb21 Author: Pablo Neira Ayuso Date: Tue Jan 8 23:18:58 2019 +0100 netfilter: nf_tables: selective rule dump needs table to be specified Table needs to be specified for selective rule dumps per chain. Fixes: 241faeceb849c ("netfilter: nf_tables: Speed up selective rule dumps") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b91d9036883793122cf6575ca4dfbfbdd201a83d Author: Taehee Yoo Date: Fri Jan 4 17:56:16 2019 +0900 netfilter: nf_tables: fix leaking object reference count There is no code that decreases the reference count of stateful objects in error path of the nft_add_set_elem(). this causes a leak of reference count of stateful objects. Test commands: $nft add table ip filter $nft add counter ip filter c1 $nft add map ip filter m1 { type ipv4_addr : counter \;} $nft add element ip filter m1 { 1 : c1 } $nft add element ip filter m1 { 1 : c1 } $nft delete element ip filter m1 { 1 } $nft delete counter ip filter c1 Result: Error: Could not process rule: Device or resource busy delete counter ip filter c1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ At the second 'nft add element ip filter m1 { 1 : c1 }', the reference count of the 'c1' is increased then it tries to insert into the 'm1'. but the 'm1' already has same element so it returns -EEXIST. But it doesn't decrease the reference count of the 'c1' in the error path. Due to a leak of the reference count of the 'c1', the 'c1' can't be removed by 'nft delete counter ip filter c1'. Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 310529e663ed975d564cf029f878583e70c3b8a3 Author: Phil Sutter Date: Sun Dec 30 17:27:43 2018 +0100 netfilter: nf_tables: Fix for endless loop when dumping ruleset __nf_tables_dump_rules() stores the current idx value into cb->args[0] before returning to caller. With multiple chains present, cb->args[0] is therefore updated after each chain's rules have been traversed. This though causes the final nf_tables_dump_rules() run (which should return an skb->len of zero since no rules are left to dump) to continue dumping rules for each but the first chain. Fix this by moving the cb->args[0] update to nf_tables_dump_rules(). With no final action to be performed anymore in __nf_tables_dump_rules(), drop 'out_unfinished' jump label and 'rc' variable - instead return the appropriate value directly. Fixes: 241faeceb849c ("netfilter: nf_tables: Speed up selective rule dumps") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 4314b1f68a3f655f75010ab04bb57419eab34ec3 Merge: 11287b693d038 4fabf3bf93a19 Author: David S. Miller Date: Tue Jan 8 16:53:54 2019 -0500 Merge branch 'mlxsw-fixes' Daniel Borkmann says: ==================== pull-request: bpf 2019-01-08 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix BSD'ism in sendmsg(2) to rewrite unspecified IPv6 dst for unconnected UDP sockets with [::1] _after_ cgroup BPF invocation, from Andrey. 2) Follow-up fix to the speculation fix where we need to reject a corner case for sanitation when ptr and scalars are mixed in the same alu op. Also, some unrelated minor doc fixes, from Daniel. 3) Fix BPF kselftest's incorrect uses of create_and_get_cgroup() by not assuming fd of zero value to be the result of an error case, from Stanislav. ==================== Signed-off-by: David S. Miller commit 4fabf3bf93a194c7fa5288da3e0af37e4b943cf3 Author: Ido Schimmel Date: Tue Jan 8 16:48:14 2019 +0000 selftests: forwarding: Add a test for VLAN deletion Add a VLAN on a bridge port, delete it and make sure the PVID VLAN is not affected. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 674bed5df4cab8f96d04f7b99608883a48f9226b Author: Ido Schimmel Date: Tue Jan 8 16:48:13 2019 +0000 mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion When a VLAN is deleted from a bridge port we should not change the PVID unless the deleted VLAN is the PVID. Fixes: fe9ccc785de5 ("mlxsw: spectrum_switchdev: Don't batch VLAN operations") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 289fb44df4e4c3fe977ee4b451e1d11e10227654 Author: Ido Schimmel Date: Tue Jan 8 16:48:12 2019 +0000 selftests: forwarding: Fix test for different devices When running the test on the Spectrum ASIC the generated packets are counted on the ingress filter and injected back to the pipeline because of the 'pass' action. The router block then drops the packets due to checksum error, as the test generates packets with zero checksum. When running the test on an emulator that is not as strict about checksum errors the test fails since packets are counted twice. Once by the emulated ASIC on its ingress filter and again by the kernel as the emulator does not perform checksum validation and allows the packets to be trapped by a matching host route. Fix this by changing the action to 'drop', which will prevent the packet from continuing further in the pipeline to the router block. For veth pairs this change is essentially a NOP given packets are only processed once (by the kernel). Fixes: a0b61f3d8ebf ("selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 279737939a8194f02fa352ab4476a1b241f44ef4 Author: Ido Schimmel Date: Tue Jan 8 16:48:11 2019 +0000 net: bridge: Fix VLANs memory leak When adding / deleting VLANs to / from a bridge port, the bridge driver first tries to propagate the information via switchdev and falls back to the 8021q driver in case the underlying driver does not support switchdev. This can result in a memory leak [1] when VXLAN and mlxsw ports are enslaved to the bridge: $ ip link set dev vxlan0 master br0 # No mlxsw ports are enslaved to 'br0', so mlxsw ignores the switchdev # notification and the bridge driver adds the VLAN on 'vxlan0' via the # 8021q driver $ bridge vlan add vid 10 dev vxlan0 pvid untagged # mlxsw port is enslaved to the bridge $ ip link set dev swp1 master br0 # mlxsw processes the switchdev notification and the 8021q driver is # skipped $ bridge vlan del vid 10 dev vxlan0 This results in 'struct vlan_info' and 'struct vlan_vid_info' being leaked, as they were allocated by the 8021q driver during VLAN addition, but never freed as the 8021q driver was skipped during deletion. Fix this by introducing a new VLAN private flag that indicates whether the VLAN was added on the port by switchdev or the 8021q driver. If the VLAN was added by the 8021q driver, then we make sure to delete it via the 8021q driver as well. [1] unreferenced object 0xffff88822d20b1e8 (size 256): comm "bridge", pid 2532, jiffies 4295216998 (age 1188.830s) hex dump (first 32 bytes): e0 42 97 ce 81 88 ff ff 00 00 00 00 00 00 00 00 .B.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000f82d851d>] kmem_cache_alloc_trace+0x1be/0x330 [<00000000e0178b02>] vlan_vid_add+0x661/0x920 [<00000000218ebd5f>] __vlan_add+0x1be9/0x3a00 [<000000006eafa1ca>] nbp_vlan_add+0x8b3/0xd90 [<000000003535392c>] br_vlan_info+0x132/0x410 [<00000000aedaa9dc>] br_afspec+0x75c/0x870 [<00000000f5716133>] br_setlink+0x3dc/0x6d0 [<00000000aceca5e2>] rtnl_bridge_setlink+0x615/0xb30 [<00000000a2f2d23e>] rtnetlink_rcv_msg+0x3a3/0xa80 [<0000000064097e69>] netlink_rcv_skb+0x152/0x3c0 [<000000008be8d614>] rtnetlink_rcv+0x21/0x30 [<000000009ab2ca25>] netlink_unicast+0x52f/0x740 [<00000000e7d9ac96>] netlink_sendmsg+0x9c7/0xf50 [<000000005d1e2050>] sock_sendmsg+0xbe/0x120 [<00000000d51426bc>] ___sys_sendmsg+0x778/0x8f0 [<00000000b9d7b2cc>] __sys_sendmsg+0x112/0x270 unreferenced object 0xffff888227454308 (size 32): comm "bridge", pid 2532, jiffies 4295216998 (age 1188.882s) hex dump (first 32 bytes): 88 b2 20 2d 82 88 ff ff 88 b2 20 2d 82 88 ff ff .. -...... -.... 81 00 0a 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000f82d851d>] kmem_cache_alloc_trace+0x1be/0x330 [<0000000018050631>] vlan_vid_add+0x3e6/0x920 [<00000000218ebd5f>] __vlan_add+0x1be9/0x3a00 [<000000006eafa1ca>] nbp_vlan_add+0x8b3/0xd90 [<000000003535392c>] br_vlan_info+0x132/0x410 [<00000000aedaa9dc>] br_afspec+0x75c/0x870 [<00000000f5716133>] br_setlink+0x3dc/0x6d0 [<00000000aceca5e2>] rtnl_bridge_setlink+0x615/0xb30 [<00000000a2f2d23e>] rtnetlink_rcv_msg+0x3a3/0xa80 [<0000000064097e69>] netlink_rcv_skb+0x152/0x3c0 [<000000008be8d614>] rtnetlink_rcv+0x21/0x30 [<000000009ab2ca25>] netlink_unicast+0x52f/0x740 [<00000000e7d9ac96>] netlink_sendmsg+0x9c7/0xf50 [<000000005d1e2050>] sock_sendmsg+0xbe/0x120 [<00000000d51426bc>] ___sys_sendmsg+0x778/0x8f0 [<00000000b9d7b2cc>] __sys_sendmsg+0x112/0x270 Fixes: d70e42b22dd4 ("mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Cc: Roopa Prabhu Cc: Nikolay Aleksandrov Cc: bridge@lists.linux-foundation.org Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 16dc42e4511172aa3a4d49931597582c9ff78843 Author: Ido Schimmel Date: Tue Jan 8 16:48:10 2019 +0000 selftests: mlxsw: Add a test case for VLAN addition error flow Add a test case for the issue fixed by previous commit. In case the offloading of an unsupported VxLAN tunnel was triggered by adding the mapped VLAN to a local port, then error should be returned to the user. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 412283eedc138381e24d8c1304a3c5b298c503c4 Author: Ido Schimmel Date: Tue Jan 8 16:48:08 2019 +0000 mlxsw: spectrum_nve: Replace error code with EINVAL Adding a VLAN on a port can trigger the offload of a VXLAN tunnel which is already a member in the VLAN. In case the configuration of the VXLAN is not supported, the driver would return -EOPNOTSUPP. This is problematic since bridge code does not interpret this as error, but rather that it should try to setup the VLAN using the 8021q driver instead of switchdev. Fixes: d70e42b22dd4 ("mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 457e20d659247a09524e276aed46f19d853701d0 Author: Ido Schimmel Date: Tue Jan 8 16:48:07 2019 +0000 mlxsw: spectrum_switchdev: Avoid returning errors in commit phase Drivers are not supposed to return errors in switchdev commit phase if they returned OK in prepare phase. Otherwise, a WARNING is emitted. However, when the offloading of a VXLAN tunnel is triggered by the addition of a VLAN on a local port, it is not possible to guarantee that the commit phase will succeed without doing a lot of work. In these cases, the artificial division between prepare and commit phase does not make sense, so simply do the work in the prepare phase. Fixes: d70e42b22dd4 ("mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 143a8e038ac599ca73c6354c8af6a8fdeee9fa7d Author: Ido Schimmel Date: Tue Jan 8 16:48:06 2019 +0000 mlxsw: spectrum: Add VXLAN dependency for spectrum When VXLAN is a loadable module, MLXSW_SPECTRUM must not be built-in: drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2547: undefined reference to `vxlan_fdb_find_uc' Add Kconfig dependency to enforce usable configurations. Fixes: 1231e04f5bba ("mlxsw: spectrum_switchdev: Add support for VxLAN encapsulation") Signed-off-by: Ido Schimmel Reported-by: kbuild test robot Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 8adbe212a159d9c78a90fca1d854f6e63452426b Author: Jiri Pirko Date: Tue Jan 8 16:48:05 2019 +0000 mlxsw: spectrum: Disable lag port TX before removing it Make sure that lag port TX is disabled before mlxsw_sp_port_lag_leave() is called and prevent from possible EMAD error. Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave") Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 04d075b7aa8433dc3c98e14c571705effc318cd8 Author: Nir Dotan Date: Tue Jan 8 16:48:04 2019 +0000 mlxsw: spectrum_acl: Remove ASSERT_RTNL()s in module removal flow Removal of the mlxsw driver on Spectrum-2 platforms hits an ASSERT_RTNL() in Spectrum-2 ACL Bloom filter and in ERP removal paths. This happens because the multicast router implementation in Spectrum-2 relies on ACLs. Taking the RTNL lock upon driver removal is useless since the driver first removes its ports and unregisters from notifiers so concurrent writes cannot happen at that time. The assertions were originally put as a reminder for future work involving ERP background optimization, but having these assertions only during addition serves this purpose as well. Therefore remove the ASSERT_RTNL() in both places related to ERP and Bloom filter removal. Fixes: cf7221a4f5a5 ("mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2") Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ff0db43cd6c530ff944773ccf48ece55d32d0c22 Author: Nir Dotan Date: Tue Jan 8 16:48:03 2019 +0000 mlxsw: spectrum_acl: Add cleanup after C-TCAM update error condition When writing to C-TCAM, mlxsw driver uses cregion->ops->entry_insert(). In case of C-TCAM HW insertion error, the opposite action should take place. Add error handling case in which the C-TCAM region entry is removed, by calling cregion->ops->entry_remove(). Fixes: a0a777b9409f ("mlxsw: spectrum_acl: Start using A-TCAM") Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f5c9571e2265b3cbfad2ed41ba60c3da474daa61 Author: Amadeusz Sławiński Date: Tue Jan 8 21:03:11 2019 +0100 ALSA: usb-audio: fix CM6206 register definitions fix typo after a recent commit causing headphones to have no sound Fixes: ad43d528a7ac (ALSA: usb-audio: Define registers for CM6206) Signed-off-by: Amadeusz Sławiński Signed-off-by: Takashi Iwai commit 11287b693d03830010356339e4ceddf47dee34fa Author: Heiner Kallweit Date: Mon Jan 7 21:49:09 2019 +0100 r8169: load Realtek PHY driver module before r8169 This soft dependency works around an issue where sometimes the genphy driver is used instead of the dedicated PHY driver. The root cause of the issue isn't clear yet. People reported the unloading/re-loading module r8169 helps, and also configuring this soft dependency in the modprobe config files. Important just seems to be that the realtek module is loaded before r8169. Once this has been applied preliminary fix 38af4b903210 ("net: phy: add workaround for issue where PHY driver doesn't bind to the device") will be removed. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c Author: Yu Zhao Date: Mon Jan 7 15:51:15 2019 -0700 drm/amdgpu: validate user GEM object size When creating frame buffer, userspace may request to attach to a previously allocated GEM object that is smaller than what GPU requires. Validation must be done to prevent out-of-bound DMA, otherwise it could be exploited to reveal sensitive data. This fix is not done in a common code path because individual driver might have different requirement. Cc: stable@vger.kernel.org # v4.2+ Reviewed-by: Michel Dänzer Signed-off-by: Yu Zhao Signed-off-by: Alex Deucher commit 89f23b6efef554766177bf51aa754bce14c3e7da Author: Yu Zhao Date: Mon Jan 7 15:51:14 2019 -0700 drm/amdgpu: validate user pitch alignment Userspace may request pitch alignment that is not supported by GPU. Some requests 32, but GPU ignores it and uses default 64 when cpp is 4. If GEM object is allocated based on the smaller alignment, GPU DMA will go out of bound. Cc: stable@vger.kernel.org # v4.2+ Reviewed-by: Michel Dänzer Signed-off-by: Yu Zhao Signed-off-by: Alex Deucher commit fadcb8f9fc89f7b517ce48f30e0b607b16d99d63 Author: Evan Quan Date: Tue Jan 8 12:22:24 2019 +0800 drm/amd/powerplay: drop the unnecessary uclk hard min setting Since soft min setting is enough. Hard min setting is redundant. Reported-by: Likun Gao Signed-off-by: Evan Quan Acked-by: Alex Deucher Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit fff0d3f7686942bd544b53a48d1b76bd62c46946 Author: Evan Quan Date: Tue Jan 8 10:33:35 2019 +0800 drm/amd/powerplay: avoid possible buffer overflow Make sure the clock level enforced is within the allowed ranges. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 0624e145fb2ba87c752bec355af12f43cb52cd68 Author: Evan Quan Date: Mon Jan 7 18:56:14 2019 +0800 drm/amd/powerplay: create pp_od_clk_voltage device file under OD support Since pp_od_clk_voltage device file is for OD related sysfs operations. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a0071840d2040ea1b27e5a008182b09b88defc15 Author: Bryan Whitehead Date: Mon Jan 7 14:00:09 2019 -0500 lan743x: Remove phy_read from link status change function It has been noticed that some phys do not have the registers required by the previous implementation. To fix this, instead of using phy_read, the required information is extracted from the phy_device structure. fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8139d493daf1ef19d34192f95e92e19dc19b648a Author: Evan Quan Date: Mon Jan 7 18:38:30 2019 +0800 drm/amd/powerplay: update OD support flag for SKU with no OD capabilities For those ASICs with no overdrive capabilities, the OD support flag will be reset. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b7ea4894aa867aaf1c31bfb4b00a3c3e38eedf95 Author: Eugene Syromiatnikov Date: Mon Jan 7 16:22:38 2019 +0100 ptp: uapi: change _IOW to IOWR in PTP_SYS_OFFSET_EXTENDED definition The ioctl command is read/write (or just read, if the fact that user space writes n_samples field is ignored). Signed-off-by: Eugene Syromiatnikov Signed-off-by: David S. Miller commit 895ac1376d5abcb94ca1b70a595579f253237790 Author: Eugene Syromiatnikov Date: Mon Jan 7 16:22:29 2019 +0100 ptp: check that rsv field is zero in struct ptp_sys_offset_extended Otherwise it is impossible to use it for something else, as it will break userspace that puts garbage there. The same check should be done in other structures, but the fact that data in reserved fields is ignored is already part of the kernel ABI. Signed-off-by: Eugene Syromiatnikov Signed-off-by: David S. Miller commit 6a829eb8619fbdde6d7d627ad582fe119805f39d Author: Trond Myklebust Date: Thu Jan 3 09:04:45 2019 -0500 SUNRPC: Fix TCP receive code on archs with flush_dcache_page() After receiving data into the page cache, we need to call flush_dcache_page() for the architectures that define it. Fixes: 277e4ab7d530b ("SUNRPC: Simplify TCP receive code by switching...") Reported-by: Geert Uytterhoeven Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.20 Tested-by: Geert Uytterhoeven Signed-off-by: Anna Schumaker commit 7b55851367136b1efd84d98fea81ba57a98304cf Author: David Herrmann Date: Tue Jan 8 13:58:52 2019 +0100 fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_time is recorded long before a process becomes visible to user-space. For instance, with userfaultfd(2) and TLS, user-space can delay the execution of fork(2) for an indefinite amount of time (and will, if this causes network access, or similar). By recording the start_time late, it much closer reflects the point in time where the process becomes live and can be observed by other processes. Lastly, this makes it much harder for user-space to predict and control the start_time they get assigned. Previously, user-space could fork a process and stall it in copy_thread_tls() before its pid is allocated, but after its start_time is recorded. This can be misused to later-on cycle through PIDs and resume the stalled fork(2) yielding a process that has the same pid and start_time as a process that existed before. This can be used to circumvent security systems that identify processes by their pid+start_time combination. Even though user-space was always aware that start_time recording is flaky (but several projects are known to still rely on start_time-based identification), changing the start_time to be recorded late will help mitigate existing attacks and make it much harder for user-space to control the start_time a process gets assigned. Reported-by: Jann Horn Signed-off-by: Tom Gundersen Signed-off-by: David Herrmann Signed-off-by: Linus Torvalds commit ee412f14693a3fe2645b3528603dfd37dd05118a Author: Arnaldo Carvalho de Melo Date: Tue Jan 8 13:53:23 2019 -0300 tools include uapi: Sync linux/vhost.h with the kernel sources To get the changes in: 4b86713236e4 ("vhost: split structs into a separate header file") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Those didn't touch things used in tools, i.e. the following continues working: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh static const char *vhost_virtio_ioctl_cmds[] = { [0x00] = "SET_FEATURES", [0x01] = "SET_OWNER", [0x02] = "RESET_OWNER", [0x03] = "SET_MEM_TABLE", [0x04] = "SET_LOG_BASE", [0x07] = "SET_LOG_FD", [0x10] = "SET_VRING_NUM", [0x11] = "SET_VRING_ADDR", [0x12] = "SET_VRING_BASE", [0x13] = "SET_VRING_ENDIAN", [0x14] = "GET_VRING_ENDIAN", [0x20] = "SET_VRING_KICK", [0x21] = "SET_VRING_CALL", [0x22] = "SET_VRING_ERR", [0x23] = "SET_VRING_BUSYLOOP_TIMEOUT", [0x24] = "GET_VRING_BUSYLOOP_TIMEOUT", [0x25] = "SET_BACKEND_FEATURES", [0x30] = "NET_SET_BACKEND", [0x40] = "SCSI_SET_ENDPOINT", [0x41] = "SCSI_CLEAR_ENDPOINT", [0x42] = "SCSI_GET_ABI_VERSION", [0x43] = "SCSI_SET_EVENTS_MISSED", [0x44] = "SCSI_GET_EVENTS_MISSED", [0x60] = "VSOCK_SET_GUEST_CID", [0x61] = "VSOCK_SET_RUNNING", }; static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", [0x12] = "GET_VRING_BASE", [0x26] = "GET_BACKEND_FEATURES", }; $ At some point in the eBPFication of perf, using something like: # perf trace -e ioctl(cmd=VHOST_VRING*) Will setup a BPF filter right at the raw_syscalls:sys_enter tracepoint, i.e. filtering at the origin. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Michael S. Tsirkin Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-g28usrt7l59lwq3wuh8vzbig@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fdc42ca190c7d8976f4f9240752f0bd008270b72 Author: Arnaldo Carvalho de Melo Date: Tue Jan 8 13:48:14 2019 -0300 tools include uapi: Sync linux/fs.h copy with the kernel sources To get the changes in: e262e32d6bde ("vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled") That made the mount flags string table generator to switch to using mount.h instead. This silences the following perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/fs.h' differs from latest version at 'include/uapi/linux/fs.h' diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h Cc: Adrian Hunter Cc: David Howells Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mosz81pa6iwxko4p2owbm3ss@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1c23397d2a6a077ab32f01c01406c2fe61b7b3a4 Author: Arnaldo Carvalho de Melo Date: Tue Jan 8 13:46:43 2019 -0300 perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h As now we'll update our fs.h copy and what tools/perf/trace/beauty/mount_flags.sh needs just got moved to mount.h, use that instead. Cc: Adrian Hunter Cc: David Howells Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ls19h376xukeouxrw9dswkcn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 250bfc87ddc427fa001bbc8bc1468ce5fc06645b Author: Arnaldo Carvalho de Melo Date: Tue Jan 8 13:42:37 2019 -0300 tools include uapi: Grab a copy of linux/mount.h We were using a copy of uapi/linux/fs.h to create the mount syscall 'flags' string table to use in 'perf trace', to convert from the number obtained via the raw_syscalls:sys_enter into a string, using tools/perf/trace/beauty/mount_flags.sh, but in e262e32d6bde ("vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled") those defines got moved to linux/mount.h, so grab a copy of mount.h too. Keep the uapi/linux/fs.h as we'll use it for the SEEK_ constants. Cc: Adrian Hunter Cc: David Howells Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-i2ricmpwpdrpukfq3298jr1z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6e17f58c486d9554341f70aa5b63b8fbed07b3fa Author: Dan Carpenter Date: Sat Jan 5 16:06:48 2019 +0300 xprtrdma: Double free in rpcrdma_sendctxs_create() The clean up is handled by the caller, rpcrdma_buffer_create(), so this call to rpcrdma_sendctxs_destroy() leads to a double free. Fixes: ae72950abf99 ("xprtrdma: Add data structure to manage RDMA Send arguments") Signed-off-by: Dan Carpenter Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit 4429b668e0375206408617d6440e3bb76c56c7d2 Author: Dan Carpenter Date: Sat Jan 5 16:06:07 2019 +0300 xprtrdma: Fix error code in rpcrdma_buffer_create() This should return -ENOMEM if __alloc_workqueue_key() fails, but it returns success. Fixes: 6d2d0ee27c7a ("xprtrdma: Replace rpcrdma_receive_wq with a per-xprt workqueue") Signed-off-by: Dan Carpenter Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit 58fec830fc19208354895d9832785505046d6c01 Author: Alex Williamson Date: Mon Jan 7 22:13:22 2019 -0700 vfio/type1: Fix unmap overflow off-by-one The below referenced commit adds a test for integer overflow, but in doing so prevents the unmap ioctl from ever including the last page of the address space. Subtract one to compare to the last address of the unmap to avoid the overflow and wrap-around. Fixes: 71a7d3d78e3c ("vfio/type1: silence integer overflow warning") Link: https://bugzilla.redhat.com/show_bug.cgi?id=1662291 Cc: stable@vger.kernel.org # v4.15+ Reported-by: Pei Zhang Debugged-by: Peter Xu Reviewed-by: Dan Carpenter Reviewed-by: Peter Xu Tested-by: Peter Xu Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit f2e14cd2c93699aa0aeaa8240457ab359f1258ff Author: Arnaldo Carvalho de Melo Date: Tue Jan 8 10:56:59 2019 -0300 perf top: Lift restriction on using callchains without "sym" in --sort This restriction is not present in 'perf report' and since 'perf top' uses the same hists browser, remove it from it as well. With this we create per event buckets with callchain trees, so that # perf top --sort dso -g --no-children Bucketizes samples by DSO and below it shows the callchains leading to functions in this DSO. Try also: # perf top -e sched:*switch -g --no-children To see the callchains leading to sched switches, pressing 'E' to expand all one can quickly see the most common scheduler switches and what leads to them, for instance, calls to IO, futexes, etc. Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Jiri Olsa Link: https://lkml.kernel.org/r/20190107140854.GA28965@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9231967e2f515fce9e19687c0c40dfda416b3512 Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:13 2018 -0500 tools lib traceevent: Remove tep_data_event_from_type() API In order to make libtraceevent into a proper library, its API should be straightforward. After discussion with Steven Rostedt, we decided to remove the tep_data_event_from_type() API and to replace it with tep_find_event(), as it does the same. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.913841066@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4104e604277016b3e6a7d120368054f9d2716953 Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:12 2018 -0500 tools lib traceevent: Rename tep_is_file_bigendian() to tep_file_bigendian() In order to make libtraceevent into a proper library, its API should be straightforward. After a discussion with Steven Rostedt, we decided to rename a few APIs, to have more intuitive names. This patch renames tep_is_file_bigendian() to tep_file_bigendian(). Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.767549746@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit f87ce7c43f36d4abff91b19edadd23939f99ff98 Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:11 2018 -0500 tools lib traceevent: Changed return logic of tep_register_event_handler() API In order to make libtraceevent into a proper library, its API should be straightforward. The tep_register_event_handler() functions returns -1 in case it successfully registers the new event handler. Such return code is used by the other library APIs in case of an error. To unify the return logic of tep_register_event_handler() with the other APIs, this patch introduces enum tep_reg_handler, which is used by this function as return value, to handle all possible successful return cases. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.628034497@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 6d2d6fd7e3ee0daf0d8308741792b3ec41aafd0c Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:10 2018 -0500 tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprintf() APIs In order to make libtraceevent into a proper library, its API should be straightforward. The trace_seq_printf() and trace_seq_vprintf() APIs have inconsistent returned values with the other trace_seq_* APIs. This path changes the return logic of trace_seq_printf() and trace_seq_vprintf() to return the number of printed characters, as the other trace_seq_* related APIs. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.485792891@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 2e4318a287bdf815140462257ab8697f5289a12f Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:09 2018 -0500 tools lib traceevent: Rename struct cmdline to struct tep_cmdline In order to make libtraceevent a proper library, variables, data structures and functions should have a unique prefix to prevent name space conflicts. That prefix will be "tep_". This patch renames 'struct cmdline' to 'struct tep_cmdline'. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.358871851@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit eed14f4b075ec594ac09921b998bf3dd61f5886b Author: Tzvetomir Stoyanov Date: Fri Nov 30 23:08:08 2018 -0500 tools lib traceevent: Initialize host_bigendian at tep_handle allocation This patch initializes the host_bigendian member of the tep_handle structure with the byte order of the current host, when this handler is created - in tep_alloc() API. We need this in order to remove the tep_set_host_bigendian() API. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.216292134@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit ca3958b1c0968a6f3105e211355f128ce871e796 Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:11 2018 -0500 tools lib traceevent: Introduce new libtracevent API: tep_override_comm() This patch adds a new API of tracevent library: tep_override_comm() It registers a pid / command mapping. If a mapping with the same pid already exists, the entry is updated with the new command. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154648.038915912@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 21327c7843e9169d5e2e527713e60e6c9842a56c Author: Florian Fainelli Date: Thu Dec 20 19:43:37 2018 -0800 perf tests: Add a test for the ARM 32-bit [vectors] page perf on ARM requires CONFIG_KUSER_HELPERS to be turned on to allow some independance with respect to the ARM CPU being used. Add a test which tries to locate the [vectors] page, created when CONFIG_KUSER_HELPERS is turned on to help asses the system's health. Signed-off-by: Florian Fainelli Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Chris Healy Cc: Greg Kroah-Hartman Cc: Kim Phillips Cc: Lucas Stach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Russell King Cc: Thomas Gleixner Cc: Thomas Richter Link: http://lkml.kernel.org/r/20181221034337.26663-3-f.fainelli@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 011532379b7c2de6757e129037bdfc8d704bce23 Author: Florian Fainelli Date: Thu Dec 20 19:43:36 2018 -0800 perf tools: Make find_vdso_map() more modular In preparation for checking that the vectors page on the ARM architecture, refactor the find_vdso_map() function to accept finding an arbitrary string and create a dedicated helper function for that under util/find-map.c and update the filename to find-map.c and all references to it: perf-read-vdso.c and util/vdso.c. Signed-off-by: Florian Fainelli Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Chris Healy Cc: Greg Kroah-Hartman Cc: Kim Phillips Cc: Lucas Stach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Russell King Cc: Thomas Gleixner Cc: Thomas Richter Link: http://lkml.kernel.org/r/20181221034337.26663-2-f.fainelli@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit ac6e022cbfdce215ad545e91d9827060855da3d7 Author: Arnaldo Carvalho de Melo Date: Mon Jan 7 16:54:38 2019 -0300 perf trace: Fix alignment for [continued] lines We were not taking into account the "... [continued]" printed characters, fix it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-qt20y0acmf8k0bzisce8kw95@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 172bf02d564bdb6df8410f64720fa2c68e755d1a Author: Arnaldo Carvalho de Melo Date: Mon Jan 7 16:24:27 2019 -0300 perf trace: Fix ')' placement in "interrupted" syscall lines When we get the sys_enter for a syscall we check if the last one is still waiting for its matching sys_exit, if so we print this: 468.753 ( ): firefox/32382 poll(ufds: 0x7f3988d3dd00, nfds: 7, timeout_msecs: 4294967295) ... 449.575 ( 0.004 ms): Softwar~cThrea/32434 futex(uaddr: 0x7f39a18a9b70, op: WAKE|PRIVATE_FLAG, val: 1) = 0 At some point we'll get that poll sys_exit event and will print a "[continued]" line. While making the sizing of the alignment after the syscall arg list and its result configurable, so that we can mimic strace, which uses a smaller alingment by default, a bug was introduced where the closing parens appeared before the syscall name and its arg list, fix it. Fixes: 4b8a240ed5e0 ("perf trace: Add alignment spaces after the closing parens") Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-oi45i54s59h1w1kmgpzrfuum@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 56752b21755aef598709d143684cb363db98a7d2 Author: Guo Ren Date: Tue Jan 8 20:49:24 2019 +0800 irqchip/csky: fixup handle_irq_perbit break irq The handle_irq_perbit function loop every bit in hwirq local variable. handle_irq_perbit(hwirq) { for_everyt_bit_in(hwirq) { handle_domain_irq() ->irq_exit() ->invoke_softirq() ->__do_softirq() ->local_irq_enable() // Here will cause new interrupt. } } When new interrupt coming at local_irq_enable, it will finish another interrupt handler and pull down the interrupt source. But hwirq is the local variable for handle_irq_perbit(), it can't get new interrupt controller pending reg status. So we need update hwirq with pending reg in every loop. Also change write_relax to writel could prevent stw from fast retire. When local_irq is enabled, intc regs is really set-in. Signed-off-by: Guo Ren Cc: Lu Baoquan commit 2a60aa14a9a0333b3eef58150bc1ef654f7321ef Author: Guo Ren Date: Tue Jan 8 20:31:43 2019 +0800 csky: fixup compile error with pte_alloc Commit: 4cf58924951e remove the address argument of pte_alloc without modify csky related code. linux-5.0-rc1 compile failed with csky. Remove the unnecessary address testing in pte_alloc(). Signed-off-by: Guo Ren Cc: Joel Fernandes (Google) Cc: Guenter Roeck Cc: Arnd Bergmann Cc: Linus Torvalds commit d1fc1176c055c9ec9c6ec4d113a284e0bad9d09a Author: Masahiro Yamada Date: Tue Jan 8 12:08:03 2019 +0900 vfio/pci: set TRACE_INCLUDE_PATH to fix the build error drivers/vfio/pci/vfio_pci_nvlink2.c cannot be compiled for in-tree building. CC drivers/vfio/pci/vfio_pci_nvlink2.o In file included from drivers/vfio/pci/trace.h:102, from drivers/vfio/pci/vfio_pci_nvlink2.c:29: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^ compilation terminated. make[1]: *** [scripts/Makefile.build;277: drivers/vfio/pci/vfio_pci_nvlink2.o] Error 1 To fix the build error, let's tell include/trace/define_trace.h the location of drivers/vfio/pci/trace.h Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver") Reported-by: Laura Abbott Signed-off-by: Masahiro Yamada Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit d3a28a53630e1ca10f59562ef560e3f70785cb09 Author: Hauke Mehrtens Date: Sun Jan 6 19:50:37 2019 +0100 serial: lantiq: Do not swap register read/writes The ltq_r32() and ltq_w32() macros use the __raw_readl() and __raw_writel() functions which do not swap the value to little endian. On the big endian vrx200 SoC the UART is operated in big endian IO mode, the readl() and write() functions convert the value to little endian first and then the driver does not work any more on this SoC. Currently the vrx200 SoC selects the CONFIG_SWAP_IO_SPACE option, without this option the serial driver would work, but PCI devices do not work any more. This patch makes the driver use the __raw_readl() and __raw_writel() functions which do not swap the endianness. On big endian system it is assumed that the device should be access in big endian IO mode and on a little endian system it would be access in little endian mode. Fixes: 89b8bd2082bb ("serial: lantiq: Use readl/writel instead of ltq_r32/ltq_w32") Signed-off-by: Hauke Mehrtens Acked-by: John Crispin Signed-off-by: Greg Kroah-Hartman commit b9fcb0e6b7052b7e2d18fed1d673f8247060c32c Author: David Brown Date: Mon Jan 7 12:15:03 2019 -0700 usb: storage: Remove outdated URL from MAINTAINERS This website hasn't worked for quite some time. Signed-off-by: David Brown Cc: Matt Dharm Signed-off-by: Greg Kroah-Hartman commit 96354ad79e2e59f9d620669c8e1ac2452440c260 Author: Guo Ren Date: Tue Jan 8 20:17:49 2019 +0800 csky: fixup CACHEV1 store instruction fast retire For I/O access, 810/807 store instruction fast retire will cause wrong primitive. For example: stw (clear interrupt source) stw (unmask interrupt controller) enable interrupt stw is fast retire instruction. When PC is run at enable interrupt stage, the clear interrupt source hasn't finished. It will cause another wrong irq-enter. So use mb() to prevent above. Signed-off-by: Guo Ren Cc: Lu Baoquan commit 64598e8b6fdaf28e37c3530f8b95a9f8ef6af131 Merge: 3bd6e94bec122 03fa483821c0b Author: Ingo Molnar Date: Tue Jan 8 16:31:19 2019 +0100 Merge tag 'perf-core-for-mingo-4.21-20190104' 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: perf annotate: Ivan Krylov: - Pass filename to objdump via execl, fixing usage with filenames with special characters. perf report: Jin Yao: Fix wrong iteration count in --branch-history perf stat: Jin Yao: - Fix endless wait for child process perf test: Arnaldo Carvalho de Melo: - Use a fallback to get the pathname in vfs_getname in tools build: Jiri Olsa: - Allow overriding CFLAGS assignments. Misc: Arnaldo Carvalho de Melo: - Syncronize UAPI headers Mattias Jacobsson: - Remove redundant va_end() in strbuf_addv() Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a3869d43c9800cf39496615361c83635fa3e7c82 Author: Corentin Labbe Date: Mon Jan 7 17:22:23 2019 +0000 PCI: amlogic: Fix build failure due to missing gpio header Building the driver when GPIOLIB=n is not selected is causing the following compilation failure: drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_assert_reset': drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(mp->reset_gpio, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ gpio_set_value_cansleep drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_probe': drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration] mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); ^~~~~~~~~~~~~~ devm_gpio_free drivers/pci/controller/dwc/pci-meson.c:540:48: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'? mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); ^~~~~~~~~~~~~ GPIOF_INIT_LOW Add the missing linux/gpio/consumer.h header to fix it. Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") Signed-off-by: Corentin Labbe [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 735df0ff6ece7b8759a744158f5d246fae4739f4 Author: Greg Kroah-Hartman Date: Fri Dec 21 08:54:40 2018 +0100 Documentation: driver core: remove use of BUS_ATTR We are getting rid of the "raw" BUS_ATTR() macro, so fix up the documentation to not refer to it anymore. Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman commit dfd32cad146e3624970eee9329e99d2c6ef751b3 Author: Luis Chamberlain Date: Wed Dec 19 12:30:34 2018 -0800 dma-mapping: remove dma_zalloc_coherent() dma_zalloc_coherent() is no longer needed as it has no users because dma_alloc_coherent() already zeroes out memory for us. The Coccinelle grammar rule that used to check for dma_alloc_coherent() + memset() is modified so that it just tells the user that the memset is not needed anymore. Suggested-by: Christoph Hellwig Signed-off-by: Luis Chamberlain Signed-off-by: Christoph Hellwig commit 07a85fe14254e01bcf37f4d2e0a13f093378620b Author: Luis Chamberlain Date: Wed Dec 19 12:24:08 2018 -0800 cross-tree: phase out dma_zalloc_coherent() on headers The last few stragglers coccinelle doesn't pick up are on driver specific header files. Phase those out as well as dma_alloc_coherent() zeroes out the memory as well now too. Suggested-by: Christoph Hellwig Signed-off-by: Luis Chamberlain Signed-off-by: Christoph Hellwig commit 750afb08ca71310fcf0c4e2cb1565c63b8235b60 Author: Luis Chamberlain Date: Fri Jan 4 09:23:09 2019 +0100 cross-tree: phase out dma_zalloc_coherent() We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by: Christoph Hellwig Signed-off-by: Luis Chamberlain [hch: re-ran the script on the latest tree] Signed-off-by: Christoph Hellwig commit f553aa1c13cbc29aaf420349a28fc33ca98440e5 Author: Guo Ren Date: Tue Jan 8 19:52:22 2019 +0800 csky: fixup relocation error with 807 & 860 810 doesn't support jsri instruction and csky-as will leave jsri + nop for relocation. Module-probe need replace them with lrw + jsr. Signed-off-by: Guo Ren Cc: Hui Kai commit 81d9bdf59092e4755fc4307c93c4589ef0fe2e0f Author: Christian Lamparter Date: Sun Dec 23 01:31:26 2018 +0100 mtd: rawnand: qcom: fix memory corruption that causes panic This patch fixes a memory corruption that occurred in the qcom-nandc driver since it was converted to nand_scan(). On boot, an affected device will panic from a NPE at a weird place: | Unable to handle kernel NULL pointer dereference at virtual address 0 | pgd = (ptrval) | [00000000] *pgd=00000000 | Internal error: Oops: 80000005 [#1] SMP ARM | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.9 #0 | Hardware name: Generic DT based system | PC is at (null) | LR is at nand_block_isbad+0x90/0xa4 | pc : [<00000000>] lr : [] psr: 80000013 | sp : cf839d40 ip : 00000000 fp : cfae9e20 | r10: cf815810 r9 : 00000000 r8 : 00000000 | r7 : 00000000 r6 : 00000000 r5 : 00000001 r4 : cf815810 | r3 : 00000000 r2 : cfae9810 r1 : ffffffff r0 : cf815810 | Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none | Control: 10c5387d Table: 8020406a DAC: 00000051 | Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) | [] (nand_block_isbad) from [] | [] (allocate_partition) from [] | [] (add_mtd_partitions) from [] | [] (parse_mtd_partitions) from [] | [] (mtd_device_parse_register) from [] | [] (qcom_nandc_probe) from [] The problem is that the nand_scan()'s qcom_nand_attach_chip callback is updating the nandc->max_cwperpage from 1 to 4. This causes the sg_init_table of clear_bam_transaction() in the driver's qcom_nandc_block_bad() to memset much more than what was initially allocated by alloc_bam_transaction(). This patch restores the old behavior by reallocating the shared bam transaction alloc_bam_transaction() after the chip was identified, but before mtd_device_parse_register() (which is an alias for mtd_device_register() - see panic) gets called. This fixes the corruption and the driver is working again. Cc: stable@vger.kernel.org Fixes: 6a3cec64f18c ("mtd: rawnand: qcom: convert driver to nand_scan()") Signed-off-by: Christian Lamparter Acked-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 2f66196208c98b3d1b4294edffb2c5a8197be899 Author: Sudeep Holla Date: Mon Jan 7 18:51:53 2019 +0000 cpufreq: check if policy is inactive early in __cpufreq_get() cpuinfo_cur_freq gets current CPU frequency as detected by hardware while scaling_cur_freq last known CPU frequency. Some platforms may not allow checking the CPU frequency of an offline CPU or the associated resources may have been released via cpufreq_exit when the CPU gets offlined, in which case the policy would have been invalidated already. If we attempt to get current frequency from the hardware, it may result in hang or crash. For example on Juno, I see: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000188 [0000000000000188] pgd=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: CPU: 5 PID: 4202 Comm: cat Not tainted 4.20.0-08251-ga0f2c0318a15-dirty #87 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform pstate: 40000005 (nZcv daif -PAN -UAO) pc : scmi_cpufreq_get_rate+0x34/0xb0 lr : scmi_cpufreq_get_rate+0x34/0xb0 Call trace: scmi_cpufreq_get_rate+0x34/0xb0 __cpufreq_get+0x34/0xc0 show_cpuinfo_cur_freq+0x24/0x78 show+0x40/0x60 sysfs_kf_seq_show+0xc0/0x148 kernfs_seq_show+0x44/0x50 seq_read+0xd4/0x480 kernfs_fop_read+0x15c/0x208 __vfs_read+0x60/0x188 vfs_read+0x94/0x150 ksys_read+0x6c/0xd8 __arm64_sys_read+0x24/0x30 el0_svc_common+0x78/0x100 el0_svc_handler+0x38/0x78 el0_svc+0x8/0xc ---[ end trace 3d1024e58f77f6b2 ]--- So fix the issue by checking if the policy is invalid early in __cpufreq_get before attempting to get the current frequency. Signed-off-by: Sudeep Holla Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 6529870cb0323823f49b3e95d1760383910f96cd Author: Madhavan Srinivasan Date: Sun Dec 9 14:55:36 2018 +0530 powerpc/perf: Update perf_regs structure to include MMCRA On each sample, Monitor Mode Control Register A (MMCRA) content is saved in pt_regs. MMCRA does not have a entry as-is in the pt_regs but instead, MMCRA content is saved in the "dsisr" register of pt_regs. Patch adds another entry to the perf_regs structure to include the "MMCRA" printing which internally maps to the "dsisr" of pt_regs. It also check for the MMCRA availability in the platform and present value accordingly mpe: This was the 2nd patch in a series with commit 333804dc3b7a ("powerpc/perf: Update perf_regs structure to include SIER") but I accidentally only merged the 1st patch, so merge this one now. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 1524f4e47f90b27a3ac84efbdd94c63172246a6f Author: Dan Carpenter Date: Tue Jan 8 10:43:30 2019 +0300 ALSA: cs46xx: Potential NULL dereference in probe The "chip->dsp_spos_instance" can be NULL on some of the ealier error paths in snd_cs46xx_create(). Reported-by: "Yavuz, Tuba" Signed-off-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai commit a77d1d196bc63b37d9b4d1b614884669e8e79d32 Author: Tycho Andersen Date: Mon Jan 7 16:16:31 2019 -0700 samples/seccomp: Fix 32-bit build Both the .o and the actual executable need to be built with -m32 in order to link correctly. Reported-by: Ingo Molnar Signed-off-by: Tycho Andersen Reviewed-by: Kees Cook Cc: Borislav Petkov Cc: James Morris Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: fec7b6690541 ("samples: add an example of seccomp user trap") Link: http://lkml.kernel.org/r/20190107231631.1849-1-tycho@tycho.ws Signed-off-by: Ingo Molnar commit b0407d820b65272fcaa77e0dd1347dc7678d23b8 Author: Gustavo A. R. Silva Date: Mon Jan 7 12:34:31 2019 -0600 hwmon: (occ) Fix potential integer overflow Cast get_unaligned_be32(...) to u64 in order to give the compiler complete information about the proper arithmetic to use and avoid a potential integer overflow. Notice that such function call is used in contexts that expect expressions of type u64 (64 bits, unsigned); and the following expressions are currently being evaluated using 32-bit arithmetic: val = get_unaligned_be32(&power->update_tag) * occ->powr_sample_time_us; val = get_unaligned_be32(&power->vdn.update_tag) * occ->powr_sample_time_us; Addresses-Coverity-ID: 1442357 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442476 ("Unintentional integer overflow") Addresses-Coverity-ID: 1442508 ("Unintentional integer overflow") Fixes: ff692d80b2e2 ("hwmon (occ): Add sensor types and versions") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Reviewed-by: Eddie James Signed-off-by: Guenter Roeck commit 977e4899c9b4bea787531b0837af5ed442e3118f Merge: 26d92e951fe0a 2dc0f02da14e1 Author: David S. Miller Date: Mon Jan 7 22:49:35 2019 -0500 Merge ra.kernel.org:/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-01-08 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix BSD'ism in sendmsg(2) to rewrite unspecified IPv6 dst for unconnected UDP sockets with [::1] _after_ cgroup BPF invocation, from Andrey. 2) Follow-up fix to the speculation fix where we need to reject a corner case for sanitation when ptr and scalars are mixed in the same alu op. Also, some unrelated minor doc fixes, from Daniel. 3) Fix BPF kselftest's incorrect uses of create_and_get_cgroup() by not assuming fd of zero value to be the result of an error case, from Stanislav. ==================== Signed-off-by: David S. Miller commit 2dc0f02da14e19f510694f8d8bbcb0f2f63e0646 Merge: a8911d6d58785 80f21ff987eb3 Author: Alexei Starovoitov Date: Mon Jan 7 15:52:00 2019 -0800 Merge branch 'bpf-doc-updates' Daniel Borkmann says: ==================== Two trivial doc follow-ups to i) remove deprecated kern_version mentioning in the design qa and ii) to mention stand-alone build and license of libbpf. Thanks! ==================== Signed-off-by: Alexei Starovoitov commit 80f21ff987eb377140d27102285f8dd1167b335c Author: Daniel Borkmann Date: Mon Jan 7 22:57:18 2019 +0100 bpf, doc: add note for libbpf's stand-alone build Given this came up couple of times, add a note to libbpf's readme about the semi-automated mirror for a stand-alone build which is officially managed by BPF folks. While at it, also explicitly state the libbpf license in the readme file. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit a769fa7208b94f37b6240215dc6970f9d76fc58c Author: Daniel Borkmann Date: Mon Jan 7 22:57:17 2019 +0100 bpf, doc: update design qa to reflect kern_version requirement Update the bpf_design_QA.rst to also reflect recent changes in 6c4fc209fcf9 ("bpf: remove useless version check for prog load"). Suggested-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit c64a2b0516a02361d8deb1f038647c29020d0852 Author: Souptick Joarder Date: Sat Jan 5 01:00:29 2019 +0530 ceph: use vmf_error() in ceph_filemap_fault() This code is converted to use vmf_error(). Signed-off-by: Souptick Joarder Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 02b2f549d502b46e68b97ea1452fb8853b3327dd Author: Dongsheng Yang Date: Tue Dec 18 04:31:48 2018 -0500 libceph: allow setting abort_on_full for rbd Introduce a new option abort_on_full, default to false. Then we can get -ENOSPC when the pool is full, or reaches quota. [ Don't show abort_on_full in /proc/mounts. ] Signed-off-by: Dongsheng Yang Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 565dc8a4f55e491935bfb04866068d21784ea9a4 Author: Alban Bedel Date: Mon Jan 7 20:45:15 2019 +0100 MIPS: ath79: Enable OF serial ports in the default config CONFIG_SERIAL_OF_PLATFORM is needed to get a working console on the OF boards, enable it in the default config to get a working setup out of the box. Signed-off-by: Alban Bedel Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: linux-kernel@vger.kernel.org commit 390d1b461eec4b15aed78df0ce72a5c4bc40d619 Author: Hauke Mehrtens Date: Sun Jan 6 19:44:12 2019 +0100 MIPS: lantiq: Use CP0_LEGACY_COMPARE_IRQ Instead of using the lantiq specific MIPS_CPU_TIMER_IRQ use the generic CP0_LEGACY_COMPARE_IRQ constant for the timer interrupt number. MIPS_CPU_TIMER_IRQ was already defined to 7 for both supported SoC families. Signed-off-by: Hauke Mehrtens Signed-off-by: Paul Burton Cc: jhogan@kernel.org Cc: ralf@linux-mips.org Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org commit 2b4dba55b04b212a7fd1f0395b41d79ee3a9801b Author: Hauke Mehrtens Date: Sun Jan 6 19:44:11 2019 +0100 MIPS: lantiq: Fix IPI interrupt handling This makes SMP on the vrx200 work again, by removing all the MIPS CPU interrupt specific code and making it fully use the generic MIPS CPU interrupt controller. The mti,cpu-interrupt-controller from irq-mips-cpu.c now handles the CPU interrupts and also the IPI interrupts which are used to communication between the CPUs in a SMP system. The generic interrupt code was already used before but the interrupt vectors were overwritten again when we called set_vi_handler() in the lantiq interrupt driver and we also provided our own plat_irq_dispatch() function which overwrote the weak generic implementation. Now the code uses the generic handler for the MIPS CPU interrupts including the IPI interrupts and registers a handler for the CPU interrupts which are handled by the lantiq ICU with irq_set_chained_handler() which was already called before. Calling the set_c0_status() function is also not needed any more because the generic MIPS CPU interrupt already activates the needed bits. Fixes: 1eed40043579 ("MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support") Cc: stable@kernel.org # v4.12 Signed-off-by: Hauke Mehrtens Signed-off-by: Paul Burton Cc: jhogan@kernel.org Cc: ralf@linux-mips.org Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-mips@vger.kernel.org commit a8911d6d5878587767a78c6bde371298ca2a3be3 Author: Stanislav Fomichev Date: Mon Jan 7 09:46:46 2019 -0800 selftests/bpf: fix incorrect users of create_and_get_cgroup We have some tests that assume create_and_get_cgroup returns -1 on error which is incorrect (it returns 0 on error). Since fd might be zero in general case, change create_and_get_cgroup to return -1 on error and fix the users that assume 0 on error. Fixes: f269099a7e7a ("tools/bpf: add a selftest for bpf_get_current_cgroup_id() helper") Fixes: 7d2c6cfc5411 ("bpf: use --cgroup in test_suite if supplied") v2: - instead of fixing the uses that assume -1 on error, convert the users that assume 0 on error (fd might be zero in general case) Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit a9666c1cae8dbcd1a9aacd08a778bf2a28eea300 Author: Leon Romanovsky Date: Mon Dec 24 11:05:16 2018 +0200 RDMA/nldev: Don't expose unsafe global rkey to regular user Unsafe global rkey is considered dangerous because it exposes memory registered for all memory in the system. Only users with a QP on the same PD can use the rkey, and generally those QPs will already know the value. However, out of caution, do not expose the value to unprivleged users on the local system. Require CAP_NET_ADMIN instead. Cc: # 4.16 Fixes: 29cf1351d450 ("RDMA/nldev: provide detailed PD information") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 26d92e951fe0a44ee4aec157cabb65a818cc8151 Author: Cong Wang Date: Sat Jan 5 23:45:26 2019 -0800 smc: move unhash as early as possible in smc_release() In smc_release() we release smc->clcsock before unhash the smc sock, but a parallel smc_diag_dump() may be still reading smc->clcsock, therefore this could cause a use-after-free as reported by syzbot. Reported-and-tested-by: syzbot+fbd1e5476e4c94c7b34e@syzkaller.appspotmail.com Fixes: 51f1de79ad8e ("net/smc: replace sock_put worker by socket refcounting") Cc: Ursula Braun Signed-off-by: Cong Wang Reported-by: syzbot+0bf2e01269f1274b4b03@syzkaller.appspotmail.com Reported-by: syzbot+e3132895630f957306bc@syzkaller.appspotmail.com Signed-off-by: David S. Miller commit 7acf8b36a2ac6eb4fdc53c4d862570089e56c69e Author: Jason Gunthorpe Date: Mon Jan 7 17:54:14 2019 +0000 phy: ti: Fix compilation failures without REGMAP This driver requires regmap or the compile fails: drivers/phy/ti/phy-gmii-sel.c:43:27: error: array type has incomplete element type ‘struct reg_field’ const struct reg_field (*regfields)[PHY_GMII_SEL_LAST]; Add it to kconfig. Signed-off-by: Jason Gunthorpe Signed-off-by: David S. Miller commit f687ccea10d23a9b0faed67ceac535b76604669a Author: Gal Pressman Date: Mon Jan 7 13:36:56 2019 +0200 RDMA/uverbs: Fix post send success return value in case of error If get QP object fails 'ret' must be assigned with a proper error code. Fixes: 9a0738575f26 ("RDMA/uverbs: Use uverbs_response() for remaining response copying") Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 6b68835b5af4feb2a3f31592a52a1a68d7c1b1f3 Author: Qian Cai Date: Mon Jan 7 16:42:07 2019 +0000 ACPI/IORT: Fix build when CONFIG_IOMMU_API=n Commit 8097e53eaba2 ("ACPI/IORT: Use helper functions to access dev->iommu_fwspec") changed by mistake the iort_fwspec_iommu_ops() stub definition (compiled in when CONFIG_IOMMU_API=n), that caused the following compilation failure: drivers/acpi/arm64/iort.c:880:1: error: expected identifier or '(' before '{' token { return NULL; } ^ drivers/acpi/arm64/iort.c:879:39: warning: 'iort_fwspec_iommu_ops' used but never defined static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev); ^~~~~~~~~~~~~~~~~~~~~ Fix it. Fixes: 8097e53eaba2 ("ACPI/IORT: Use helper functions to access dev->iommu_fwspec") Signed-off-by: Qian Cai [lorenzo.pieralisi@arm.com: updated tags and log] Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Will Deacon Cc: Sudeep Holla Cc: Catalin Marinas Cc: Joerg Roedel Signed-off-by: Will Deacon commit 4c84edc11b76590859b1e45dd676074c59602dc4 Author: JianJhen Chen Date: Sun Jan 6 11:28:13 2019 +0800 net: bridge: fix a bug on using a neighbour cache entry without checking its state When handling DNAT'ed packets on a bridge device, the neighbour cache entry from lookup was used without checking its state. It means that a cache entry in the NUD_STALE state will be used directly instead of entering the NUD_DELAY state to confirm the reachability of the neighbor. This problem becomes worse after commit 2724680bceee ("neigh: Keep neighbour cache entries if number of them is small enough."), since all neighbour cache entries in the NUD_STALE state will be kept in the neighbour table as long as the number of cache entries does not exceed the value specified in gc_thresh1. This commit validates the state of a neighbour cache entry before using the entry. Signed-off-by: JianJhen Chen Reviewed-by: JinLin Chen Signed-off-by: David S. Miller commit 801009424e05cf110f016d7fac7fcf20ef94941a Merge: 2cffc9569050a 5aeb1b36cedd3 Author: Palmer Dabbelt Date: Mon Jan 7 08:45:47 2019 -0800 Fix a handful of audit-related issue This is sort of a mix between a new feature and a bug fix. I've managed to screw up merging this patch set a handful of times but I think it's OK this time around. The main new feature here is audit support for RISC-V, with some fixes to audit-related bugs that cropped up along the way: * The addition of NR_syscalls into unistd.h, which is necessary for CONFIG_FTRACE_SYSCALLS. * The definition of CREATE_TRACE_POINTS so __tracepoint_sys_{enter,exit} get defined. * A fix for trace_sys_exit() so we can enable CONFIG_HAVE_SYSCALL_TRACEPOINTS. commit f87d8ad9233f115db92c6c087d58403b0009ed36 Author: Gustavo A. R. Silva Date: Sat Jan 5 10:52:23 2019 -0600 tipc: fix memory leak in tipc_nl_compat_publ_dump There is a memory leak in case genlmsg_put fails. Fix this by freeing *args* before return. Addresses-Coverity-ID: 1476406 ("Resource leak") Fixes: 46273cf7e009 ("tipc: fix a missing check of genlmsg_put") Signed-off-by: Gustavo A. R. Silva Acked-by: Ying Xue Signed-off-by: David S. Miller commit a29c3c09bad18ac2c91dfdbcc892a7a37e407227 Author: Bjørn Mork Date: Sat Jan 5 14:32:39 2019 +0100 cdc_ether: trivial whitespace readability fix This function is unreadable enough without indenting mismatches and unnecessary line breaks. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 3483254b89438e60f719937376c5e0ce2bc46761 Author: Jack Stocker Date: Thu Jan 3 21:56:53 2019 +0000 USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB To match the Corsair Strafe RGB, the Corsair K70 RGB also requires USB_QUIRK_DELAY_CTRL_MSG to completely resolve boot connection issues discussed here: https://github.com/ckb-next/ckb-next/issues/42. Otherwise roughly 1 in 10 boots the keyboard will fail to be detected. Patch that applied delay control quirk for Corsair Strafe RGB: cb88a0588717 ("usb: quirks: add control message delay for 1b1c:1b20") Previous K70 RGB patch to add delay-init quirk: 7a1646d92257 ("Add delay-init quirk for Corsair K70 RGB keyboards") Signed-off-by: Jack Stocker Cc: stable Signed-off-by: Greg Kroah-Hartman commit ff2a8c532c14fd22fb26a36574d9ff199afbbe54 Author: Saranya Gopal Date: Sun Jan 6 08:14:02 2019 +0530 usbcore: Select only first configuration for non-UAC3 compliant devices In most of the UAC1 and UAC2 audio devices, the first configuration is most often the best configuration. However, with recent patch to support UAC3 configuration, second configuration was unintentionally chosen for some of the UAC1/2 devices that had more than one configuration. This was because of the existing check after the audio config check which selected any config which had a non-vendor class. This patch fixes this issue. Fixes: f13912d3f014 ("usbcore: Select UAC3 configuration for audio if present") Reported-by: Con Kolivas Signed-off-by: Saranya Gopal Tested-by: Con Kolivas Cc: stable Signed-off-by: Greg Kroah-Hartman commit 0a99cc4b8ee83885ab9f097a3737d1ab28455ac0 Author: Icenowy Zheng Date: Thu Jan 3 11:26:18 2019 +0800 USB: storage: add quirk for SMI SM3350 The SMI SM3350 USB-UFS bridge controller cannot handle long sense request correctly and will make the chip refuse to do read/write when requested long sense. Add a bad sense quirk for it. Signed-off-by: Icenowy Zheng Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit c5603d2fdb424849360fe7e3f8c1befc97571b8c Author: Icenowy Zheng Date: Thu Jan 3 11:26:17 2019 +0800 USB: storage: don't insert sane sense for SPC3+ when bad sense specified Currently the code will set US_FL_SANE_SENSE flag unconditionally if device claims SPC3+, however we should allow US_FL_BAD_SENSE flag to prevent this behavior, because SMI SM3350 UFS-USB bridge controller, which claims SPC4, will show strange behavior with 96-byte sense (put the chip into a wrong state that cannot read/write anything). Check the presence of US_FL_BAD_SENSE when assuming US_FL_SANE_SENSE on SPC4+ devices. Signed-off-by: Icenowy Zheng Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 34aabf918717dd14e05051896aaecd3b16b53d95 Author: Daniele Palmas Date: Fri Dec 28 16:15:41 2018 +0100 usb: cdc-acm: send ZLP for Telit 3G Intel based modems Telit 3G Intel based modems require zero packet to be sent if out data size is equal to the endpoint max packet size. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Greg Kroah-Hartman commit 5aeb1b36cedd3a1dfdbfe368629fed52dee34103 Author: David Abdurachmanov Date: Thu Dec 6 16:26:35 2018 +0100 riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig I looked into Documentation/trace/ftrace-design.rst and, I think, we check all the boxes needed for HAVE_SYSCALL_TRACEPOINTS. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 775800b0f1d7303d4fd8ce0e0d9eca4ff2f338f2 Author: David Abdurachmanov Date: Thu Dec 6 16:26:34 2018 +0100 riscv: fix trace_sys_exit hook Fix compilation error. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 008e901b70282183b52ee80d838d2994b2610231 Author: David Abdurachmanov Date: Mon Dec 10 21:43:55 2018 +0100 riscv: define CREATE_TRACE_POINTS in ptrace.c Define CREATE_TRACE_POINTS in order to create functions and structures for the trace events. This is needed if HAVE_SYSCALL_TRACEPOINTS and CONFIG_FTRACE_SYSCALLS are enabled, otherwise we get linking errors: [..] MODPOST vmlinux.o kernel/trace/trace_syscalls.o: In function `.L0 ': trace_syscalls.c:(.text+0x1152): undefined reference to `__tracepoint_sys_enter' trace_syscalls.c:(.text+0x126c): undefined reference to `__tracepoint_sys_enter' trace_syscalls.c:(.text+0x1328): undefined reference to `__tracepoint_sys_enter' trace_syscalls.c:(.text+0x14aa): undefined reference to `__tracepoint_sys_enter' trace_syscalls.c:(.text+0x1684): undefined reference to `__tracepoint_sys_exit' trace_syscalls.c:(.text+0x17a0): undefined reference to `__tracepoint_sys_exit' trace_syscalls.c:(.text+0x185c): undefined reference to `__tracepoint_sys_exit' trace_syscalls.c:(.text+0x19de): undefined reference to `__tracepoint_sys_exit' arch/riscv/kernel/ptrace.o: In function `.L0 ': ptrace.c:(.text+0x4dc): undefined reference to `__tracepoint_sys_enter' ptrace.c:(.text+0x632): undefined reference to `__tracepoint_sys_exit' make: *** [Makefile:1036: vmlinux] Error 1 Signed-off-by: David Abdurachmanov Fixes: b78002b395b4 ("riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig") Signed-off-by: Palmer Dabbelt commit 45ef1aa8a0e3b0da449c619035b0841f28abca63 Author: David Abdurachmanov Date: Mon Dec 10 21:43:54 2018 +0100 riscv: define NR_syscalls in unistd.h This macro is used by kernel/trace/{trace.h,trace_syscalls.c} if we have CONFIG_FTRACE_SYSCALLS enabled. Signed-off-by: David Abdurachmanov Fixes: b78002b395b4 ("riscv: add HAVE_SYSCALL_TRACEPOINTS to Kconfig") Signed-off-by: Palmer Dabbelt commit 0aea89430a4c79c65c541c947497007d33fbe002 Author: David Abdurachmanov Date: Mon Oct 29 11:48:54 2018 +0100 riscv: audit: add audit hook in do_syscall_trace_enter/exit() This patch adds auditing functions on entry to and exit from every system call invocation. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit efe75c494f57890900caf6c8a0667db35bfaf56a Author: David Abdurachmanov Date: Mon Oct 29 11:48:53 2018 +0100 riscv: add audit support On RISC-V (riscv) audit is supported through generic lib/audit.c. The patch adds required arch specific definitions. Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 2cffc9569050a8dbc0c4a6ee7186c0919487c3ec Author: Zong Li Date: Fri Dec 7 17:02:16 2018 +0800 RISC-V: Support MODULE_SECTIONS mechanism on RV32 This patch supports dynamic generate got and plt sections mechanism on rv32. It contains the modification as follows: - Always enable MODULE_SECTIONS (both rv64 and rv32) - Change the fixed size type. This patch had been tested by following modules: btrfs 6795991 0 - Live 0xa544b000 test_static_keys 17304 0 - Live 0xa28be000 zstd_compress 1198986 1 btrfs, Live 0xa2a25000 zstd_decompress 608112 1 btrfs, Live 0xa24e7000 lzo 8787 0 - Live 0xa2049000 xor 27461 1 btrfs, Live 0xa2041000 zram 78849 0 - Live 0xa2276000 netdevsim 55909 0 - Live 0xa202d000 tun 211534 0 - Live 0xa21b5000 fuse 566049 0 - Live 0xa25fb000 nfs_layout_flexfiles 192597 0 - Live 0xa229b000 ramoops 74895 0 - Live 0xa2019000 xfs 3973221 0 - Live 0xa507f000 libcrc32c 3053 2 btrfs,xfs, Live 0xa34af000 lzo_compress 17302 2 btrfs,lzo, Live 0xa347d000 lzo_decompress 7178 2 btrfs,lzo, Live 0xa3451000 raid6_pq 142086 1 btrfs, Live 0xa33a4000 reed_solomon 31022 1 ramoops, Live 0xa31eb000 test_bitmap 3734 0 - Live 0xa31af000 test_bpf 1588736 0 - Live 0xa2c11000 test_kmod 41161 0 - Live 0xa29f8000 test_module 1356 0 - Live 0xa299e000 test_printf 6024 0 [permanent], Live 0xa2971000 test_static_key_base 5797 1 test_static_keys, Live 0xa2931000 test_user_copy 4382 0 - Live 0xa28c9000 xxhash 70501 2 zstd_compress,zstd_decompress, Live 0xa2055000 Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit 3b56adcf94d03533666e87e41d23ac91756cec9b Author: Paul Walmsley Date: Mon Dec 17 16:09:59 2018 -0800 MAINTAINERS: SiFive drivers: add myself as a SiFive driver maintainer I'll be helping Palmer review drivers for SiFive-specific IP blocks, so add myself to the MAINTAINERS file. Cc: Albert Ou Cc: Palmer Dabbelt Cc: linux-kernel@vger.kernel.org Cc: linux-riscv@lists.infradead.org Signed-off-by: Paul Walmsley Signed-off-by: Paul Walmsley Signed-off-by: Palmer Dabbelt commit af5f462c2d9ed227ffca4c8d02eb38679c9b8846 Author: Paul Walmsley Date: Mon Dec 17 16:09:58 2018 -0800 MAINTAINERS: SiFive drivers: change the git tree to a SiFive git tree Update the git tree URL for drivers for SiFive-related IP blocks to point to a SiFive-managed URL. Cc: Albert Ou Cc: Palmer Dabbelt Cc: linux-kernel@vger.kernel.org Cc: linux-riscv@lists.infradead.org Signed-off-by: Paul Walmsley Signed-off-by: Paul Walmsley Signed-off-by: Palmer Dabbelt commit 37a107ff6dcd773da4dc75b62b9bf4349dd7300f Author: Andreas Schwab Date: Tue Dec 11 11:20:40 2018 +0100 riscv: don't stop itself in smp_send_stop Add IPI_CPU_STOP message and use it in smp_send_stop to stop other cpus, but not itself. Mark cpu offline on reception of IPI_CPU_STOP. Signed-off-by: Andreas Schwab Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 8fd6e05c7463b635e51ec7df0a1858c1b5a6e350 Author: Paul Walmsley Date: Mon Dec 17 19:15:12 2018 -0800 arch: riscv: support kernel command line forcing when no DTB passed CONFIG_CMDLINE_FORCE doesn't work on RISC-V when no DTB is passed into the kernel. This is because the code that forces the kernel command line only runs if a valid DTB is present at boot. During debugging, it's useful to have the ability to force kernel command lines even when no DTB is present. This patch adds support for doing so. Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org (open list) Signed-off-by: Paul Walmsley Signed-off-by: Paul Walmsley Signed-off-by: Palmer Dabbelt commit d0df00e30e4bf9bc27ddbd092ad683ff6121b360 Author: Aurelien Jarno Date: Tue Dec 25 15:46:24 2018 +0100 tools uapi: fix RISC-V 64-bit support The BPF library is not built on 64-bit RISC-V, as the BPF feature is not detected. Looking more in details, feature/test-bpf.c fails to build with the following error: | In file included from /tmp/linux-4.19.12/tools/include/uapi/asm/bitsperlong.h:17, | from /tmp/linux-4.19.12/tools/include/uapi/asm-generic/unistd.h:2, | from /usr/include/riscv64-linux-gnu/asm/unistd.h:1, | from test-bpf.c:2: | /tmp/linux-4.19.12/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h | #error Inconsistent word size. Check asm/bitsperlong.h | ^~~~~ The UAPI from the tools directory is missing RISC-V support, therefore bitsperlong.h from asm-generic is used, defaulting to 32 bits. Fix that by adding tools/arch/riscv/include/uapi/asm/bitsperlong.h as a copy of arch/riscv/include/uapi/asm/bitsperlong.h and by updating tools/include/uapi/asm/bitsperlong.h. Signed-off-by: Aurelien Jarno Signed-off-by: Palmer Dabbelt commit 22e6a2e14cb8ebcae059488cf24e778e4058c2bf Author: Anup Patel Date: Wed Dec 19 18:06:57 2018 +0530 RISC-V: Make BSS section as the last section in vmlinux.lds.S The objcopy only emits loadable sections when creating flat kernel Image. To have minimal possible size of flat kernel Image, we should have all non-loadable sections after loadable sections. Currently, execption table section (loadable section) is after BSS section (non-loadable section) in the RISC-V vmlinux.lds.S. This is not optimal for having minimal flat kernel Image size hence this patch makes BSS section as the last section in RISC-V vmlinux.lds.S. In addition, we make BSS section aligned to 16byte instead of PAGE aligned which further reduces flat kernel Image size by few KBs. The flat kernel Image size of Linux-4.20-rc4 using GCC 8.2.0 is 8819980 bytes with current RISC-V vmlinux.lds.S and it reduces to 7991740 bytes with this patch applied. In summary, this patch reduces Linux-4.20-rc4 flat kernel Image size by 809 KB. Signed-off-by: Anup Patel Reviewed-by: Bin Meng Signed-off-by: Palmer Dabbelt commit d0c2d2101b4c1a41e6ebeca6a28c70df43d2a6a3 Author: Kunihiko Hayashi Date: Fri Nov 9 10:42:07 2018 +0900 reset: uniphier-glue: Add AHCI reset control support in glue layer Add a reset line included in AHCI glue layer to enable AHCI core implemented in UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Signed-off-by: Philipp Zabel commit 69af3d1b8a91cf9b426c4238964df847036bf214 Author: Kunihiko Hayashi Date: Fri Nov 9 10:42:06 2018 +0900 dt-bindings: reset: uniphier: Add AHCI core reset description Add compatible strings for reset control of AHCI core implemented in UniPhier SoCs. The reset control belongs to AHCI glue layer. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit 3eb8f765f5aeca6e4195246f41e534025f69eee8 Author: Kunihiko Hayashi Date: Fri Nov 9 10:42:05 2018 +0900 reset: uniphier-usb3: Rename to reset-uniphier-glue This driver works for controlling the reset lines including USB3 glue layer, however, this can be applied to other glue layers. Now this patch renames the driver from "reset-uniphier-usb3" to "reset-uniphier-glue". At the same time, this changes CONFIG_RESET_UNIPHIER_USB3 to CONFIG_RESET_UNIPHIER_GLUE. Signed-off-by: Kunihiko Hayashi Signed-off-by: Philipp Zabel commit 21b22136b4330abd1467e59fbe651ae4d18f0357 Author: Kunihiko Hayashi Date: Fri Nov 9 10:42:04 2018 +0900 dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals Replace the expression of "USB3 glue layer" with the glue layer of the generic peripherals to allow other devices to use it. The reset control belongs to this glue layer. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit a277105b239bdcb6490ec51366413643dbc8ed4a Author: Dinh Nguyen Date: Mon Nov 5 14:05:49 2018 -0600 ARM: socfpga: dts: document "altr,stratix10-rst-mgr" binding "altr,stratix10-rst-mgr" is used for the Stratix10 reset manager. Signed-off-by: Dinh Nguyen Signed-off-by: Philipp Zabel commit b3ca9888f35fa6919569cf27c929dc0ac49e9716 Author: Dinh Nguyen Date: Tue Nov 13 12:50:48 2018 -0600 reset: socfpga: add an early reset driver for SoCFPGA Create a separate reset driver that uses the reset operations in reset-simple. The reset driver for the SoCFPGA platform needs to register early in order to be able bring online timers that needed early in the kernel bootup. We do not need this early reset driver for Stratix10, because on arm64, Linux does not need the timers are that in reset. Linux is able to run just fine with the internal armv8 timer. Thus, we use a new binding "altr,stratix10-rst-mgr" for the Stratix10 platform. The Stratix10 platform will continue to use the reset-simple platform driver, while the 32-bit platforms(Cyclone5/Arria5/Arria10) will use the early reset driver. Signed-off-by: Dinh Nguyen [p.zabel@pengutronix.de: fixed socfpga of_device_id in reset-simple] Signed-off-by: Philipp Zabel commit 151f72f493f2605ebbed0198362eed05918ed839 Author: Colin Ian King Date: Wed Nov 14 21:49:35 2018 +0000 reset: fix null pointer dereference on dev by dev_name The call to dev_name will dereference dev, however, dev is later being null checked, so there is a possibility of a null pointer dereference on dev by the call to dev_name. Fix this by null checking dev first before the call to dev_name Detected by CoverityScan, CID#1475475 ("Dereference before null check") Fixes: 2a6cb2b1d83b ("reset: Add reset_control_get_count()") Signed-off-by: Colin Ian King Signed-off-by: Philipp Zabel commit eaf91db0ab22dc2c664a9782f2f31dcbc410f3b5 Author: Geert Uytterhoeven Date: Tue Nov 13 13:47:44 2018 +0100 reset: Add reset_control_get_count() Currently the reset core has internal support for counting the number of resets for a device described in DT. Generalize this to devices using lookup resets, and export it for public use. This will be used by generic drivers that need to be sure a device is controlled by a single, dedicated reset line (e.g. vfio-platform). Signed-off-by: Geert Uytterhoeven [p.zabel@pengutronix.de: fixed a typo in reset_control_get_count comment] Signed-off-by: Philipp Zabel commit 12c62b9d6ce57d37f3c03cc902c30498909fbc42 Author: Geert Uytterhoeven Date: Mon Oct 8 13:15:43 2018 +0200 reset: Improve reset controller kernel docs Grammar and indentation fixes. Signed-off-by: Geert Uytterhoeven [p.zabel@pengutronix.de: dropped "shared among" -> "shared between"] Signed-off-by: Philipp Zabel commit 42f03ab3c75197e8fec2dbd6b50bc699619aab9b Author: Eugeniy Paltsev Date: Wed Oct 17 17:05:52 2018 +0300 ARC: HSDK: improve reset driver As for today HSDK reset driver implements only .reset() callback. In case of driver which implements one of standard reset controller usage pattern (call *_deassert() in probe(), call *_assert() in remove()) that leads to inoperability of this reset driver. Improve HSDK reset driver by calling .reset() callback inside of .deassert() callback to avoid each reset controller user adaptation for work with both reset methods (reset() and {.assert() & .deassert()} pair) Signed-off-by: Eugeniy Paltsev Signed-off-by: Philipp Zabel commit eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5 Author: Jacob Wen Date: Mon Jan 7 09:59:59 2019 +0800 rds: use DIV_ROUND_UP instead of ceil Yes indeed, DIV_ROUND_UP is in kernel.h. Signed-off-by: Jacob Wen Signed-off-by: David S. Miller commit 10262b0b53666cbc506989b17a3ead1e9c3b43b4 Author: Heiner Kallweit Date: Sun Jan 6 20:44:00 2019 +0100 r8169: don't try to read counters if chip is in a PCI power-save state Avoid log spam caused by trying to read counters from the chip whilst it is in a PCI power-save state. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=107421 Fixes: 1ef7286e7f36 ("r8169: Dereference MMIO address immediately before use") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7775665aadc48a562051834a73519129bf717d73 Author: Larry Finger Date: Wed Jan 2 20:12:47 2019 -0600 staging: rtl8188eu: Fix module loading from tasklet for WEP encryption Commit 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a WEP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be forced by calling lib80211_get_crypto_ops() directly rather than indirectly through try_then_request_module(). With this change, no BUG messages are logged. Fixes: 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") Cc: Stable # v4.17+ Cc: Michael Straube Cc: Ivan Safonov Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 84cad97a717f5749a0236abd5ce68da582ea074f Author: Larry Finger Date: Wed Jan 2 20:12:46 2019 -0600 staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption Commit 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a CCMP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be forced by calling lib80211_get_crypto_ops() directly rather than indirectly through try_then_request_module(). With this change, no BUG messages are logged. Fixes: 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") Cc: Stable # v4.17+ Reported-and-tested-by: Michael Straube Cc: Ivan Safonov Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit 8a5aaf97cc4876a9b61cb3b7c07128d4569ac536 Author: Guo Ren Date: Fri Jan 4 11:17:33 2019 +0800 Documentation/features: Add csky kernel features core/ cBPF-JIT : TODO | core/ eBPF-JIT : TODO | core/ generic-idle-thread : ok | core/ jump-labels : TODO | core/ tracehook : ok | debug/ KASAN : TODO | debug/ gcov-profile-all : TODO | debug/ kgdb : TODO | debug/ kprobes-on-ftrace : TODO | debug/ kprobes : TODO | debug/ kretprobes : TODO | debug/ optprobes : TODO | debug/ stackprotector : TODO | debug/ uprobes : TODO | debug/ user-ret-profiler : TODO | io/ dma-contiguous : ok | locking/ cmpxchg-local : TODO | locking/ lockdep : TODO | locking/ queued-rwlocks : ok | locking/ queued-spinlocks : TODO | locking/ rwsem-optimized : TODO | perf/ kprobes-event : TODO | perf/ perf-regs : TODO | perf/ perf-stackdump : TODO | sched/ membarrier-sync-core : TODO | sched/ numa-balancing : .. | seccomp/ seccomp-filter : TODO | time/ arch-tick-broadcast : TODO | time/ clockevents : ok | time/ context-tracking : TODO | time/ irq-time-acct : TODO | time/ modern-timekeeping : ok | time/ virt-cpuacct : TODO | vm/ ELF-ASLR : TODO | vm/ PG_uncached : TODO | vm/ THP : .. | vm/ batch-unmap-tlb-flush: TODO | vm/ huge-vmap : TODO | vm/ ioremap_prot : TODO | vm/ numa-memblock : .. | vm/ pte_special : TODO | Signed-off-by: Guo Ren Cc: Arnd Bergmann commit a64597227d0de5610407fcc95dc835745a53f5d0 Author: Biju Das Date: Wed Dec 12 12:17:11 2018 +0000 soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} The workaround for the wrong hierarchy of the 3DG-{A,B} power domains on RZ/G2E ES1.0 corrected the parent domains. However, the 3DG-{A,B} power domains were still initialized and powered in the wrong order, causing 3DG operation to fail. Fix this by changing the order in the table at runtime, when running on an affected SoC. This work is based on the work done by Geert for R-Car E3. Fixes: f37d211c687588328 ("soc: renesas: rcar-sysc: Add r8a774c0 support") Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0fac32f24ceadad801ef1f4de468f1d5186c808d Author: Christophe JAILLET Date: Sat Dec 29 01:05:40 2018 +0100 i3c: master: Fix an error checking typo in 'cdns_i3c_master_probe()' Fix a cut'n'paste typo. Checking 'master->sysclk' is expected here. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Christophe JAILLET Signed-off-by: Boris Brezillon commit 0aaa81377c5a01f686bcdb8c7a6929a7bf330c68 Author: Oliver Hartkopp Date: Fri Jan 4 15:55:26 2019 +0100 can: gw: ensure DLC boundaries after CAN frame modification Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN frame modification rule that makes the data length code a higher value than the available CAN frame data size. In combination with a configured checksum calculation where the result is stored relatively to the end of the data (e.g. cgw_csum_xor_rel) the tail of the skb (e.g. frag_list pointer in skb_shared_info) can be rewritten which finally can cause a system crash. Michael Kubecek suggested to drop frames that have a DLC exceeding the available space after the modification process and provided a patch that can handle CAN FD frames too. Within this patch we also limit the length for the checksum calculations to the maximum of Classic CAN data length (8). CAN frames that are dropped by these additional checks are counted with the CGW_DELETED counter which indicates misconfigurations in can-gw rules. This fixes CVE-2019-3701. Reported-by: Muyu Yu Reported-by: Marcus Meissner Suggested-by: Michal Kubecek Tested-by: Muyu Yu Tested-by: Oliver Hartkopp Signed-off-by: Oliver Hartkopp Cc: linux-stable # >= v3.2 Signed-off-by: Marc Kleine-Budde Signed-off-by: David S. Miller commit 01cd364a15f42575ef4aac8f82ff05516ea5da9a Author: Stephen Warren Date: Thu Jan 3 10:23:24 2019 -0700 net/mlx4: replace pci_{,un}map_sg with dma_{,un}map_sg pci_{,un}map_sg are deprecated and replaced by dma_{,un}map_sg. This is especially relevant since the rest of the driver uses the DMA API. Fix the driver to use the replacement APIs. Signed-off-by: Stephen Warren Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit f65e192af35058e5c82da9e90871b472d24912bc Author: Stephen Warren Date: Thu Jan 3 10:23:23 2019 -0700 net/mlx4: Get rid of page operation after dma_alloc_coherent This patch solves a crash at the time of mlx4 driver unload or system shutdown. The crash occurs because dma_alloc_coherent() returns one value in mlx4_alloc_icm_coherent(), but a different value is passed to dma_free_coherent() in mlx4_free_icm_coherent(). In turn this is because when allocated, that pointer is passed to sg_set_buf() to record it, then when freed it is re-calculated by calling lowmem_page_address(sg_page()) which returns a different value. Solve this by recording the value that dma_alloc_coherent() returns, and passing this to dma_free_coherent(). This patch is roughly equivalent to commit 378efe798ecf ("RDMA/hns: Get rid of page operation after dma_alloc_coherent"). Based-on-code-from: Christoph Hellwig Signed-off-by: Stephen Warren Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 2b6f0090a3335b7bdd03ca520c35591159463041 Author: Boris Brezillon Date: Wed Jan 2 15:36:54 2019 +0100 mtd: Check add_mtd_device() ret code add_mtd_device() can fail. We should always check its return value and gracefully handle the failure case. Fix the call sites where this not done (in mtdpart.c) and add a __must_check attribute to the prototype to avoid this kind of mistakes. Signed-off-by: Boris Brezillon commit 19e16fb4f319b84b3220e98abf726218beba8c34 Author: Boris Brezillon Date: Wed Jan 2 15:36:53 2019 +0100 mtd: Fix the check on nvmem_register() ret code Commit 20167b70c894 ("nvmem: use EOPNOTSUPP instead of ENOSYS") changed the nvmem_register() ret code from ENOSYS to EOPNOTSUPP when CONFIG_NVMEM is not enabled, but the check in mtd_nvmem_add() was not adjusted accordingly. Cc: Bartosz Golaszewski Cc: Alban Bedel Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem API") Reported-by: kernel test robot Signed-off-by: Boris Brezillon Reviewed-by: Bartosz Golaszewski Signed-off-by: Boris Brezillon commit 1cd824361eed0f3621e32df1be15159c91f137d9 Merge: bfeffd1552837 74d4b4e0f43e5 Author: Mark Brown Date: Mon Jan 7 12:42:14 2019 +0000 Merge branch 'regmap-4.21' into regmap-5.0 commit 8070ba6348608aa1da15eb83dbaa9ece596aaa67 Author: Arnd Bergmann Date: Mon Dec 10 22:00:23 2018 +0100 ARM: shmobile: fix build regressions A number of Kconfig options have become available now to random ARM platforms outside of ARCH_MULTIPLATFORM, which now causes Kconfig warnings, and other build errors when those select options that lack additional dependencies, e.g.: WARNING: unmet direct dependencies detected for HAVE_ARM_ARCH_TIMER Depends on [n]: CPU_V7 [=n] Selected by [y]: - ARCH_RCAR_GEN2 [=y] && SOC_RENESAS [=y] - ARCH_R8A73A4 [=y] && SOC_RENESAS [=y] && ARM [=y] WARNING: unmet direct dependencies detected for SYS_SUPPORTS_EM_STI Depends on [n]: GENERIC_CLOCKEVENTS [=n] Selected by [y]: - ARCH_EMEV2 [=y] && SOC_RENESAS [=y] && ARM [=y] Put the old dependency on ARCH_RENESAS back for the moment to restore the previous behavior. Fixes: 062887bf5ef7 ("ARM: shmobile: Move SoC Kconfig symbols to drivers/soc/renesas/") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 2b531d71595d2b5b12782a49b23c335869e2621e Author: Hans de Goede Date: Fri Jan 4 23:10:54 2019 +0100 ACPI / PMIC: xpower: Fix TS-pin current-source handling The current-source used for the battery temp-sensor (TS) is shared with the GPADC. For proper fuel-gauge and charger operation the TS current-source needs to be permanently on. But to read the GPADC we need to temporary switch the TS current-source to ondemand, so that the GPADC can use it, otherwise we will always read an all 0 value. The switching from on to on-ondemand is not necessary when the TS current-source is off (this happens on devices which do not have a TS). Prior to this commit there were 2 issues with our handling of the TS current-source switching: 1) We were writing hardcoded values to the ADC TS pin-ctrl register, overwriting various other unrelated bits. Specifically we were overwriting the current-source setting for the TS and GPIO0 pins, forcing it to 80ųA independent of its original setting. On a Chuwi Vi10 tablet this was causing us to get a too high adc value (due to a too high current-source) resulting in acpi_lpat_raw_to_temp() returning -ENOENT, resulting in: ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion] ACPI Error: Method parse/execution failed \_SB.SXP1._TMP, AE_ERROR This commit fixes this by using regmap_update_bits to change only the relevant bits. 2) At the end of intel_xpower_pmic_get_raw_temp() we were unconditionally enabling the TS current-source even on devices where the TS-pin is not used and the current-source thus was off on entry of the function. This commit fixes this by checking if the TS current-source is off when entering intel_xpower_pmic_get_raw_temp() and if so it is left as is. Fixes: 58eefe2f3f53 (ACPI / PMIC: xpower: Do pinswitch ... reading GPADC) Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Cc: 4.14+ # 4.14+ Signed-off-by: Rafael J. Wysocki commit c2a7c55a04065c3b0c32d23b099db7ea1dbf6250 Author: Kailang Yang Date: Thu Jan 3 15:53:39 2019 +0800 ALSA: hda/realtek - Support Dell headset mode for New AIO platform Dell has new platform for ALC274. This will support to enable headset mode. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai commit 605c0351fa36e857e29d34ebab2719d9c04e95f6 Author: Larry Finger Date: Wed Jan 2 14:02:08 2019 -0600 MAINTAINERS: Add entry for staging driver r8188eu This entry was missed when the driver was added. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman commit cbb2ebf70daf7f7d97d3811a2ff8e39655b8c184 Author: Hui Peng Date: Tue Dec 25 18:11:52 2018 -0500 ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks In `create_composite_quirk`, the terminating condition of for loops is `quirk->ifnum < 0`. So any composite quirks should end with `struct snd_usb_audio_quirk` object with ifnum < 0. for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { ..... } the data field of Bower's & Wilkins PX headphones usb device device quirks do not end with {.ifnum = -1}, wihch may result in out-of-bound read. This Patch fix the bug by adding an ending quirk object. Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Hui Peng Cc: Signed-off-by: Takashi Iwai commit 3e96d7280f16e2f787307f695a31296b9e4a1cd7 Author: Takashi Iwai Date: Wed Jan 2 17:12:21 2019 +0100 ALSA: usb-audio: Always check descriptor sizes in parser code There are a few places where we access the data without checking the actual object size from the USB audio descriptor. This may result in OOB access, as recently reported. This patch addresses these missing checks. Most of added codes are simple bLength checks in the caller side. For the input and output terminal parsers, we put the length check in the parser functions. For the input terminal, a new argument is added to distinguish between UAC1 and the rest, as they treat different objects. Reported-by: Mathias Payer Reported-by: Hui Peng Tested-by: Hui Peng Cc: Signed-off-by: Takashi Iwai commit 0bfe5e434e6665b3590575ec3c5e4f86a1ce51c9 Author: Takashi Iwai Date: Wed Dec 19 14:04:47 2018 +0100 ALSA: usb-audio: Check mixer unit descriptors more strictly We've had some sanity checks of the mixer unit descriptors but they are too loose and some corner cases are overlooked. Add more strict checks in uac_mixer_unit_get_channels() for avoiding possible OOB accesses by malformed descriptors. This also changes the semantics of uac_mixer_unit_get_channels() slightly. Now it returns zero for the cases where the descriptor lacks of bmControls instead of -EINVAL. Then the caller side skips the mixer creation for such unit while it keeps parsing it. This corresponds to the case like Maya44. Cc: Signed-off-by: Takashi Iwai commit f4351a199cc120ff9d59e06d02e8657d08e6cc46 Author: Takashi Iwai Date: Wed Dec 19 12:36:27 2018 +0100 ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() The parser for the processing unit reads bNrInPins field before the bLength sanity check, which may lead to an out-of-bound access when a malformed descriptor is given. Fix it by assignment after the bLength check. Cc: Signed-off-by: Takashi Iwai commit 4a22fc534f2f55808c41197cf17d829099032acb Author: Dan Carpenter Date: Fri Jan 4 09:47:25 2019 +0300 watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs These functions return NULL on error but we accidentally check for IS_ERR() instead. Fixes: e3c21e088f89 ("watchdog: tqmx86: Add watchdog driver for the IO controller") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3aa8b8bbc142eeaac89891de584535ceb7fce405 Author: NeilBrown Date: Sun Dec 30 14:21:52 2018 +1100 watchdog: mt7621_wdt/rt2880_wdt: Fix compilation problem These files need #include to compile correctly. Fixes: ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h") Signed-off-by: NeilBrown Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 862523297778775a0543110dcbf2ca832782f675 Author: Hans de Goede Date: Wed Nov 28 17:57:56 2018 +0100 gpiolib-acpi: Remove unnecessary WARN_ON from acpi_gpiochip_free_interrupts acpi_gpiochip_alloc_event only continues allocating an event and adding it to the list if gpiochip_request_own_desc does not return an error. So events with an error desc are never placed on the events list and this check is really not necessary. Suggested-by: Andy Shevchenko Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit de96e9fea7ba56042f105b6fe163447b280eb800 Author: Greg Kroah-Hartman Date: Thu Jan 3 10:23:47 2019 +0100 sysfs: convert BUG_ON to WARN_ON It's rude to crash the system just because the developer did something wrong, as it prevents them from usually even seeing what went wrong. So convert the few BUG_ON() calls that have snuck into the sysfs code over the years to WARN_ON() to make it more "friendly". All of these are able to be recovered from, so it makes no sense to crash. Reported-by: Linus Torvalds Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit 07bd14ccc3049f9c0147a91a4227a571f981601a Author: Wei Yongjun Date: Wed Dec 26 11:28:24 2018 +0000 hwmon: (lm80) Fix missing unlock on error in set_fan_div() Add the missing unlock before return from function set_fan_div() in the error handling case. Fixes: c9c63915519b ("hwmon: (lm80) fix a missing check of the status of SMBus read") Signed-off-by: Wei Yongjun Signed-off-by: Guenter Roeck commit 9de15c95a63f527c8f7a968cd95e6ec71fc6891d Author: Guenter Roeck Date: Wed Dec 26 13:56:15 2018 -0800 hwmon: (nct6775) Enable IO mapping for NCT6797D and NCT6798D Similar to other recent chips from Nuvoton, IO mapping may be disabled by default. Enable it when instantiating the driver and after resume. Fixes: 0599682b826f ("hwmon: (nct6775) Add support for NCT6798D") Fixes: e41da286a2fd ("hwmon: (nct6775) Add support for NCT6797D") Reported-by: Michael Cook Cc: Michael Cook Signed-off-by: Guenter Roeck commit 264142bc70ec039e26d8f3b46a717e8037f59ca0 Author: Guenter Roeck Date: Wed Dec 26 07:34:31 2018 -0800 hwmon: (nct6775) Fix chip ID for NCT6798D The chip ID is 0xd42[8-f], not 0xd45[8-f]. Fixes: 0599682b826f ("hwmon: (nct6775) Add support for NCT6798D") Reported-by: Michael Cook Cc: Michael Cook Signed-off-by: Guenter Roeck commit 3bd6e94bec122a951d462c239b47954cf5f36e33 Author: Masahiro Yamada Date: Mon Jan 7 11:08:08 2019 +0900 arch: restore generic-y += shmparam.h for some architectures For some reasons, I accidentally got rid of "generic-y += shmparam.h" from some architectures. Restore them to fix building c6x, h8300, hexagon, m68k, microblaze, openrisc, and unicore32. Fixes: d6e4b3e326d8 ("arch: remove redundant UAPI generic-y defines") Signed-off-by: Masahiro Yamada Signed-off-by: Linus Torvalds commit bfeffd155283772bbe78c6a05dec7c0128ee500c Author: Linus Torvalds Date: Sun Jan 6 17:08:20 2019 -0800 Linux 5.0-rc1 commit 85e1ffbd42f664965dc05f6e9851c06379f27fb2 Merge: ac5eed2b41776 d86271af64602 Author: Linus Torvalds Date: Sun Jan 6 16:33:10 2019 -0800 Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - improve boolinit.cocci and use_after_iter.cocci semantic patches - fix alignment for kallsyms - move 'asm goto' compiler test to Kconfig and clean up jump_label CONFIG option - generate asm-generic wrappers automatically if arch does not implement mandatory UAPI headers - remove redundant generic-y defines - misc cleanups * tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: rename generated .*conf-cfg to *conf-cfg kbuild: remove unnecessary stubs for archheader and archscripts kbuild: use assignment instead of define ... endef for filechk_* rules arch: remove redundant UAPI generic-y defines kbuild: generate asm-generic wrappers if mandatory headers are missing arch: remove stale comments "UAPI Header export list" riscv: remove redundant kernel-space generic-y kbuild: change filechk to surround the given command with { } kbuild: remove redundant target cleaning on failure kbuild: clean up rule_dtc_dt_yaml kbuild: remove UIMAGE_IN and UIMAGE_OUT jump_label: move 'asm goto' support test to Kconfig kallsyms: lower alignment on ARM scripts: coccinelle: boolinit: drop warnings on named constants scripts: coccinelle: check for redeclaration kconfig: remove unused "file" field of yylval union nds32: remove redundant kernel-space generic-y nios2: remove unneeded HAS_DMA define commit ac5eed2b41776b05cf03aac761d3bb5e64eea24c Merge: 574823bfab82d 2573be22e5b6f Author: Linus Torvalds Date: Sun Jan 6 16:30:14 2019 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling updates form Ingo Molnar: "A final batch of perf tooling changes: mostly fixes and small improvements" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits) perf session: Add comment for perf_session__register_idle_thread() perf thread-stack: Fix thread stack processing for the idle task perf thread-stack: Allocate an array of thread stacks perf thread-stack: Factor out thread_stack__init() perf thread-stack: Allow for a thread stack array perf thread-stack: Avoid direct reference to the thread's stack perf thread-stack: Tidy thread_stack__bottom() usage perf thread-stack: Simplify some code in thread_stack__process() tools gpio: Allow overriding CFLAGS tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command tools thermal tmon: Allow overriding CFLAGS assignments tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command perf c2c: Increase the HITM ratio limit for displayed cachelines perf c2c: Change the default coalesce setup perf trace beauty ioctl: Beautify USBDEVFS_ commands perf trace beauty: Export function to get the files for a thread perf trace: Wire up ioctl's USBDEBFS_ cmd table generator perf beauty ioctl: Add generator for USBDEVFS_ ioctl commands tools headers uapi: Grab a copy of usbdevice_fs.h perf trace: Store the major number for a file when storing its pathname ... commit 574823bfab82d9d8fa47f422778043fbb4b4f50e Author: Linus Torvalds Date: Sat Jan 5 17:50:59 2019 -0800 Change mincore() to count "mapped" pages rather than "cached" pages The semantics of what "in core" means for the mincore() system call are somewhat unclear, but Linux has always (since 2.3.52, which is when mincore() was initially done) treated it as "page is available in page cache" rather than "page is mapped in the mapping". The problem with that traditional semantic is that it exposes a lot of system cache state that it really probably shouldn't, and that users shouldn't really even care about. So let's try to avoid that information leak by simply changing the semantics to be that mincore() counts actual mapped pages, not pages that might be cheaply mapped if they were faulted (note the "might be" part of the old semantics: being in the cache doesn't actually guarantee that you can access them without IO anyway, since things like network filesystems may have to revalidate the cache before use). In many ways the old semantics were somewhat insane even aside from the information leak issue. From the very beginning (and that beginning is a long time ago: 2.3.52 was released in March 2000, I think), the code had a comment saying Later we can get more picky about what "in core" means precisely. and this is that "later". Admittedly it is much later than is really comfortable. NOTE! This is a real semantic change, and it is for example known to change the output of "fincore", since that program literally does a mmmap without populating it, and then doing "mincore()" on that mapping that doesn't actually have any pages in it. I'm hoping that nobody actually has any workflow that cares, and the info leak is real. We may have to do something different if it turns out that people have valid reasons to want the old semantics, and if we can limit the information leak sanely. Cc: Kevin Easton Cc: Jiri Kosina Cc: Masatake YAMATO Cc: Andrew Morton Cc: Greg KH Cc: Peter Zijlstra Cc: Michal Hocko Signed-off-by: Linus Torvalds commit 94bd8a05cd4de344a9a57e52ef7d99550251984f Author: Linus Torvalds Date: Sun Jan 6 11:15:04 2019 -0800 Fix 'acccess_ok()' on alpha and SH Commit 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'") broke both alpha and SH booting in qemu, as noticed by Guenter Roeck. It turns out that the bug wasn't actually in that commit itself (which would have been surprising: it was mostly a no-op), but in how the addition of access_ok() to the strncpy_from_user() and strnlen_user() functions now triggered the case where those functions would test the access of the very last byte of the user address space. The string functions actually did that user range test before too, but they did it manually by just comparing against user_addr_max(). But with user_access_begin() doing the check (using "access_ok()"), it now exposed problems in the architecture implementations of that function. For example, on alpha, the access_ok() helper macro looked like this: #define __access_ok(addr, size) \ ((get_fs().seg & (addr | size | (addr+size))) == 0) and what it basically tests is of any of the high bits get set (the USER_DS masking value is 0xfffffc0000000000). And that's completely wrong for the "addr+size" check. Because it's off-by-one for the case where we check to the very end of the user address space, which is exactly what the strn*_user() functions do. Why? Because "addr+size" will be exactly the size of the address space, so trying to access the last byte of the user address space will fail the __access_ok() check, even though it shouldn't. As a result, the user string accessor functions failed consistently - because they literally don't know how long the string is going to be, and the max access is going to be that last byte of the user address space. Side note: that alpha macro is buggy for another reason too - it re-uses the arguments twice. And SH has another version of almost the exact same bug: #define __addr_ok(addr) \ ((unsigned long __force)(addr) < current_thread_info()->addr_limit.seg) so far so good: yes, a user address must be below the limit. But then: #define __access_ok(addr, size) \ (__addr_ok((addr) + (size))) is wrong with the exact same off-by-one case: the case when "addr+size" is exactly _equal_ to the limit is actually perfectly fine (think "one byte access at the last address of the user address space") The SH version is actually seriously buggy in another way: it doesn't actually check for overflow, even though it did copy the _comment_ that talks about overflow. So it turns out that both SH and alpha actually have completely buggy implementations of access_ok(), but they happened to work in practice (although the SH overflow one is a serious serious security bug, not that anybody likely cares about SH security). This fixes the problems by using a similar macro on both alpha and SH. It isn't trying to be clever, the end address is based on this logic: unsigned long __ao_end = __ao_a + __ao_b - !!__ao_b; which basically says "add start and length, and then subtract one unless the length was zero". We can't subtract one for a zero length, or we'd just hit an underflow instead. For a lot of access_ok() users the length is a constant, so this isn't actually as expensive as it initially looks. Reported-and-tested-by: Guenter Roeck Cc: Matt Turner Cc: Yoshinori Sato Signed-off-by: Linus Torvalds commit baa6707381285e68cc472efba58e7e736057aacc Merge: 215240462a967 8094c3ceb21ad Author: Linus Torvalds Date: Sun Jan 6 12:21:11 2019 -0800 Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypt updates from Ted Ts'o: "Add Adiantum support for fscrypt" * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: add Adiantum support commit 215240462a9672db771bb60adcc1c4fdf40e8ec4 Merge: e2b745f469ec0 191ce17876c93 Author: Linus Torvalds Date: Sun Jan 6 12:19:23 2019 -0800 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 bug fixes from Ted Ts'o: "Fix a number of ext4 bugs" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix special inode number checks in __ext4_iget() ext4: track writeback errors using the generic tracking infrastructure ext4: use ext4_write_inode() when fsyncing w/o a journal ext4: avoid kernel warning when writing the superblock to a dead device ext4: fix a potential fiemap/page fault deadlock w/ inline_data ext4: make sure enough credits are reserved for dioread_nolock writes commit e2b745f469ec0f3165ba5ffaee3ce40f98d77878 Merge: 12133258d7fe3 8270f3a11ceef Author: Linus Torvalds Date: Sun Jan 6 11:47:26 2019 -0800 Merge tag 'dma-mapping-4.21-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Fix various regressions introduced in this cycles: - fix dma-debug tracking for the map_page / map_single consolidatation - properly stub out DMA mapping symbols for !HAS_DMA builds to avoid link failures - fix AMD Gart direct mappings - setup the dma address for no kernel mappings using the remap allocator" * tag 'dma-mapping-4.21-1' of git://git.infradead.org/users/hch/dma-mapping: dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations x86/amd_gart: fix unmapping of non-GART mappings dma-mapping: remove a few unused exports dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA dma-mapping: remove dmam_{declare,release}_coherent_memory dma-mapping: implement dmam_alloc_coherent using dmam_alloc_attrs dma-mapping: implement dma_map_single_attrs using dma_map_page_attrs commit 12133258d7fe309b42a35677549c606b15a0822d Merge: 66e012f6188fb cdd6a4a0e2ec5 Author: Linus Torvalds Date: Sun Jan 6 11:40:06 2019 -0800 Merge tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung: - Changes for EC_MKBP_EVENT_SENSOR_FIFO handling. - Also, maintainership changes. Olofj out, Enric balletbo in. * tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: MAINTAINERS: add maintainers for ChromeOS EC sub-drivers MAINTAINERS: platform/chrome: Add Enric as a maintainer MAINTAINERS: platform/chrome: remove myself as maintainer platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes commit 66e012f6188fb37b18c774277f34fb52278059c3 Merge: b5aef86e089a2 4d5a91fd1f42a Author: Linus Torvalds Date: Sun Jan 6 11:37:44 2019 -0800 Merge tag 'hwlock-v4.21' of git://github.com/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This adds support for the hardware semaphores found in STM32MP1" * tag 'hwlock-v4.21' of git://github.com/andersson/remoteproc: hwspinlock: fix return value check in stm32_hwspinlock_probe() hwspinlock: add STM32 hwspinlock device dt-bindings: hwlock: Document STM32 hwspinlock bindings commit 373282e7ab6840cd583a223fa90628f2d8293c26 Author: John Pittman Date: Fri Jan 4 12:06:37 2019 -0500 null_blk: add zoned config support information If the kernel is built without CONFIG_BLK_DEV_ZONED, a modprobe of the null_blk driver with zoned=1 fails with 'Invalid argument'. This can be confusing to users, prompting a search as to why the parameter is invalid. To assist in that search, add a bit more information to the failure, additionally adding to the documentation that CONFIG_BLK_DEV_ZONED is needed for zoned=1. Reviewed-by: Bart Van Assche Signed-off-by: John Pittman Added null_blk prefix to error message. Signed-off-by: Jens Axboe commit 8094c3ceb21ad93896fd4d238e8ba41911932eaf Author: Eric Biggers Date: Sun Jan 6 08:36:21 2019 -0500 fscrypt: add Adiantum support Add support for the Adiantum encryption mode to fscrypt. Adiantum is a tweakable, length-preserving encryption mode with security provably reducible to that of XChaCha12 and AES-256, subject to a security bound. It's also a true wide-block mode, unlike XTS. See the paper "Adiantum: length-preserving encryption for entry-level processors" (https://eprint.iacr.org/2018/720.pdf) for more details. Also see commit 059c2a4d8e16 ("crypto: adiantum - add Adiantum support"). On sufficiently long messages, Adiantum's bottlenecks are XChaCha12 and the NH hash function. These algorithms are fast even on processors without dedicated crypto instructions. Adiantum makes it feasible to enable storage encryption on low-end mobile devices that lack AES instructions; currently such devices are unencrypted. On ARM Cortex-A7, on 4096-byte messages Adiantum encryption is about 4 times faster than AES-256-XTS encryption; decryption is about 5 times faster. In fscrypt, Adiantum is suitable for encrypting both file contents and names. With filenames, it fixes a known weakness: when two filenames in a directory share a common prefix of >= 16 bytes, with CTS-CBC their encrypted filenames share a common prefix too, leaking information. Adiantum does not have this problem. Since Adiantum also accepts long tweaks (IVs), it's also safe to use the master key directly for Adiantum encryption rather than deriving per-file keys, provided that the per-file nonce is included in the IVs and the master key isn't used for any other encryption mode. This configuration saves memory and improves performance. A new fscrypt policy flag is added to allow users to opt-in to this configuration. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o commit 97274b6126193cca2b820579f5d758589a2badc2 Merge: 466f89e9ec8c6 1cbbcfbbd56ef Author: Alexei Starovoitov Date: Sat Jan 5 21:32:39 2019 -0800 Merge branch 'reject-ptr-scalar-mix' Daniel Borkmann says: ==================== Follow-up fix to 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") in order to reject a corner case for sanitation when ptr / scalars are mixed in the same alu op. ==================== Signed-off-by: Alexei Starovoitov commit 1cbbcfbbd56efd994d643428c69467fe3c8ab672 Author: Daniel Borkmann Date: Sun Jan 6 00:54:38 2019 +0100 bpf: add various test cases for alu op on mixed dst register types Add couple of test_verifier tests to check sanitation of alu op insn with pointer and scalar type coming from different paths. This also includes BPF insns of the test reproducer provided by Jann Horn. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit d3bd7413e0ca40b60cf60d4003246d067cafdeda Author: Daniel Borkmann Date: Sun Jan 6 00:54:37 2019 +0100 bpf: fix sanitation of alu op with pointer / scalar type from different paths While 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") took care of rejecting alu op on pointer when e.g. pointer came from two different map values with different map properties such as value size, Jann reported that a case was not covered yet when a given alu op is used in both "ptr_reg += reg" and "numeric_reg += reg" from different branches where we would incorrectly try to sanitize based on the pointer's limit. Catch this corner case and reject the program instead. Fixes: 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") Reported-by: Jann Horn Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit b5aef86e089a2d85a6d627372287785d08938cbe Merge: 15b215e5aa299 93fb7f19985a0 Author: Linus Torvalds Date: Sat Jan 5 18:35:02 2019 -0800 Merge tag 'docs-5.0-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of late-arriving documentation fixes" * tag 'docs-5.0-fixes' of git://git.lwn.net/linux: doc: filesystems: fix bad references to nonexistent ext4.rst file Documentation/admin-guide: update URL of LKML information link Docs/kernel-api.rst: Remove blk-tag.c reference commit 15b215e5aa29993c1b0f46693a1b482296bcf08e Merge: d7252d0d36375 c820518f6ca15 Author: Linus Torvalds Date: Sat Jan 5 18:33:21 2019 -0800 Merge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fixlet from Stefan Richter: "Remove an explicit dependency in Kconfig which is implied by another dependency" * tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: Remove depends on HAS_DMA in case of platform dependency commit d7252d0d36375fe8c544098469a21d03fa267a55 Merge: 0fe4e2d5cd931 59f75fd0e3153 Author: Linus Torvalds Date: Sat Jan 5 18:29:13 2019 -0800 Merge tag 'for-linus-20190104' of git://git.kernel.dk/linux-block Pull block updates and fixes from Jens Axboe: - Pulled in MD changes that Shaohua had queued up for 4.21. Unfortunately we lost Shaohua late 2018, I'm sending these in on his behalf. - In conjunction with the above, I added a CREDITS entry for Shaoua. - sunvdc queue restart fix (Ming) * tag 'for-linus-20190104' of git://git.kernel.dk/linux-block: Add CREDITS entry for Shaohua Li block: sunvdc: don't run hw queue synchronously from irq context md: fix raid10 hang issue caused by barrier raid10: refactor common wait code from regular read/write request md: remvoe redundant condition check lib/raid6: add option to skip algo benchmarking lib/raid6: sort algos in rough performance order lib/raid6: check for assembler SSSE3 support lib/raid6: avoid __attribute_const__ redefinition lib/raid6: add missing include for raid6test md: remove set but not used variable 'bi_rdev' commit 0fe4e2d5cd931ad2ff99d61cfdd5c6dc0c3ec60b Merge: 3954e1d0310e3 9ddf32a8df9e3 Author: Linus Torvalds Date: Sat Jan 5 18:25:19 2019 -0800 Merge tag 'drm-next-2019-01-05' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Happy New Year, just decloaking from leave to get some stuff from the last week in before rc1: core: - two regression fixes for damage blob and atomic i915 gvt: - Some missed GVT fixes from the original pull amdgpu: - new PCI IDs - SR-IOV fixes - DC fixes - Vega20 fixes" * tag 'drm-next-2019-01-05' of git://anongit.freedesktop.org/drm/drm: (53 commits) drm: Put damage blob when destroy plane state drm: fix null pointer dereference on null state pointer drm/amdgpu: Add new VegaM pci id drm/ttm: Use drm_debug_printer for all ttm_bo_mem_space_debug output drm/amdgpu: add Vega20 PSP ASD firmware loading drm/amd/display: Fix MST dp_blank REG_WAIT timeout drm/amd/display: validate extended dongle caps drm/amd/display: Use div_u64 for flip timestamp ns to ms drm/amdgpu/uvd:Change uvd ring name convention drm/amd/powerplay: add Vega20 LCLK DPM level setting support drm/amdgpu: print process info when job timeout drm/amdgpu/nbio7.4: add hw bug workaround for vega20 drm/amdgpu/nbio6.1: add hw bug workaround for vega10/12 drm/amd/display: Optimize passive update planes. drm/amd/display: verify lane status before exiting verify link cap drm/amd/display: Fix bug with not updating VSP infoframe drm/amd/display: Add retry to read ddc_clock pin drm/amd/display: Don't skip link training for empty dongle drm/amd/display: Wait edp HPD to high in detect_sink drm/amd/display: fix surface update sequence ... commit 3954e1d0310e30e743431b58918825c4d4fe8812 Merge: a8a6b1186b1a2 9c6260de505b6 Author: Linus Torvalds Date: Sat Jan 5 18:20:51 2019 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Over the break a few defects were found, so this is a -rc style pull request of various small things that have been posted. - An attempt to shorten RCU grace period driven delays showed crashes during heavier testing, and has been entirely reverted - A missed merge/rebase error between the advise_mr and ib_device_ops series - Some small static analysis driven fixes from Julia and Aditya - Missed ability to create a XRC_INI in the devx verbs interop series" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: infiniband/qedr: Potential null ptr dereference of qp infiniband: bnxt_re: qplib: Check the return value of send_message IB/ipoib: drop useless LIST_HEAD IB/core: Add advise_mr to the list of known ops Revert "IB/mlx5: Fix long EEH recover time with NVMe offloads" IB/mlx5: Allow XRC INI usage via verbs in DEVX context commit a8a6b1186b1a209647483c2ff81e0d59c43dbdd3 Merge: 7671c14e6aca7 399382f801820 Author: Linus Torvalds Date: Sat Jan 5 18:15:37 2019 -0800 Merge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "This time the pull request is really small. The most notable changes are fixing fbcon to not cause crash on unregister_framebuffer() operation when there is more than one framebuffer, adding config option to center the bootup logo and making FB_BACKLIGHT config option tristate (which in turn uncovered incorrect FB_BACKLIGHT usage by DRM's nouveau driver). Summary: - fix fbcon to not cause crash on unregister_framebuffer() when there is more than one framebuffer (Noralf Trønnes) - improve support for small rotated displays (Peter Rosin) - fix probe failure handling in udlfb driver (Dan Carpenter) - add config option to center the bootup logo (Peter Rosin) - make FB_BACKLIGHT config option tristate (Rob Clark) - remove superfluous HAS_DMA dependency for goldfishfb driver (Geert Uytterhoeven) - misc fixes (Alexey Khoroshilov, YueHaibing, Colin Ian King, Lubomir Rintel) - misc cleanups (Yangtao Li, Wen Yang) also there is DRM's nouveau driver fix for wrong FB_BACKLIGHT config option usage (FB_BACKLIGHT is for internal fbdev subsystem use only)" * tag 'fbdev-v4.21' of git://github.com/bzolnier/linux: drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig fbdev: fbcon: Fix unregister crash when more than one framebuffer fbdev: Remove depends on HAS_DMA in case of platform dependency pxa168fb: trivial typo fix fbdev: fsl-diu: remove redundant null check on cmap fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE fbdev: uvesafb: fix spelling mistake "memoery" -> "memory" fbdev: fbmem: add config option to center the bootup logo fbdev: fbmem: make fb_show_logo_line return the end instead of the height video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data" fbdev: fbmem: behave better with small rotated displays and many CPUs video: clps711x-fb: release disp device node in probe() fbdev: make FB_BACKLIGHT a tristate udlfb: fix some inconsistent NULL checking commit 7671c14e6aca7a816a29a85eba47d9bccb7d23ae Merge: 926b02d3eb547 81482d13f37b1 Author: Linus Torvalds Date: Sat Jan 5 18:13:35 2019 -0800 Merge branch 'i2c/for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C has only driver updates for you this time. Mostly new IDs/DT compatibles, also SPDX conversions, small cleanups. STM32F7 got FastMode+ and PM support, Axxia some reliabilty improvements" * 'i2c/for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (26 commits) i2c: Add Actions Semiconductor Owl family S700 I2C support dt-bindings: i2c: Add S700 support for Actions Semi Soc's i2c: ismt: Add support for Intel Cedar Fork i2c: tegra: Switch to SPDX identifier i2c: tegra: Add missing kerneldoc for some fields i2c: tegra: Cleanup kerneldoc comments i2c: axxia: support sequence command mode dt-bindings: i2c: rcar: Add r8a774c0 support dt-bindings: i2c: sh_mobile: Add r8a774c0 support i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E) i2c: i2c-cros-ec-tunnel: Switch to SPDX identifier. i2c: powermac: Use of_node_name_eq for node name comparisons i2c-axxia: check for error conditions first i2c-axxia: dedicated function to set client addr dt-bindings: i2c: Use correct vendor prefix for Atmel i2c: tegra: replace spin_lock_irqsave with spin_lock in ISR eeprom: at24: add support for 24c2048 dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string i2c: i2c-stm32f7: add PM Runtime support i2c: sh_mobile: add support for r8a77990 (R-Car E3) ... commit 926b02d3eb547daa1d56cf9b586f31b270488b77 Merge: cf26057a94411 72199051af620 Author: Linus Torvalds Date: Sat Jan 5 17:57:34 2019 -0800 Merge tag 'pci-v4.21-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - Remove unused lists from ASPM pcie_link_state (Frederick Lawler) - Fix Broadcom CNB20LE host bridge unintended sign extension (Colin Ian King) - Expand Kconfig "PF" acronyms (Randy Dunlap) - Update MAINTAINERS for arch/x86/kernel/early-quirks.c (Bjorn Helgaas) - Add missing include to drivers/pci.h (Alexandru Gagniuc) - Override Synopsys USB 3.x HAPS device class so dwc3-haps can claim it instead of xhci (Thinh Nguyen) - Clean up P2PDMA documentation (Randy Dunlap) - Allow runtime PM even if driver doesn't supply callbacks (Jarkko Nikula) - Remove status check after submitting Switchtec MRPC Firmware Download commands to avoid Completion Timeouts (Kelvin Cao) - Set Switchtec coherent DMA mask to allow 64-bit DMA (Boris Glimcher) - Fix Switchtec SWITCHTEC_IOCTL_EVENT_IDX_ALL flag overwrite issue (Joey Zhang) - Enable write combining for Switchtec MRPC Input buffers (Kelvin Cao) - Add Switchtec MRPC DMA mode support (Wesley Sheng) - Skip VF scanning on powerpc, which does this in firmware (Sebastian Ott) - Add Amlogic Meson PCIe controller driver and DT bindings (Yue Wang) - Constify histb dw_pcie_host_ops structure (Julia Lawall) - Support multiple power domains for imx6 (Leonard Crestez) - Constify layerscape driver data (Stefan Agner) - Update imx6 Kconfig to allow imx6 PCIe in imx7 kernel (Trent Piepho) - Support armada8k GPIO reset (Baruch Siach) - Support suspend/resume support on imx6 (Leonard Crestez) - Don't hard-code DesignWare DBI/ATU offst (Stephen Warren) - Skip i.MX6 PHY setup on i.MX7D (Andrey Smirnov) - Remove Jianguo Sun from HiSilicon STB maintainers (Lorenzo Pieralisi) - Mask DesignWare interrupts instead of disabling them to avoid lost interrupts (Marc Zyngier) - Add locking when acking DesignWare interrupts (Marc Zyngier) - Ack DesignWare interrupts in the proper callbacks (Marc Zyngier) - Use devm resource parser in mediatek (Honghui Zhang) - Remove unused mediatek "num-lanes" DT property (Honghui Zhang) - Add UniPhier PCIe controller driver and DT bindings (Kunihiko Hayashi) - Enable MSI for imx6 downstream components (Richard Zhu) * tag 'pci-v4.21-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (40 commits) PCI: imx: Enable MSI from downstream components s390/pci: skip VF scanning PCI/IOV: Add flag so platforms can skip VF scanning PCI/IOV: Factor out sriov_add_vfs() PCI: uniphier: Add UniPhier PCIe host controller support dt-bindings: PCI: Add UniPhier PCIe host controller description PCI: amlogic: Add the Amlogic Meson PCIe controller driver dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller arm64: dts: mt7622: Remove un-used property for PCIe arm: dts: mt7623: Remove un-used property for PCIe dt-bindings: PCI: MediaTek: Remove un-used property PCI: mediatek: Remove un-used variant in struct mtk_pcie_port MAINTAINERS: Remove Jianguo Sun from HiSilicon STB DWC entry PCI: dwc: Don't hard-code DBI/ATU offset PCI: imx: Add imx6sx suspend/resume support PCI: armada8k: Add support for gpio controlled reset signal PCI: dwc: Adjust Kconfig to allow IMX6 PCIe host on IMX7 PCI: dwc: layerscape: Constify driver data PCI: imx: Add multi-pd support PCI: Override Synopsys USB 3.x HAPS device class ... commit cf26057a9441173ad552e90cea3344607075c9ad Merge: 1686cc1a31f45 bd8879faafe6d Author: Linus Torvalds Date: Sat Jan 5 17:53:40 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - high-resolution scrolling support that gracefully handles differences between MS and Logitech implementations in HW, from Peter Hutterer and Harry Cutts - MSI IRQ support for intel-ish driver, from Song Hongyan - support for new hardware (Cougar 700K, Odys Winbook 13, ASUS FX503VD, ASUS T101HA) from Daniel M. Lambea, Hans de Goede and Aleix Roca Nonell - other small assorted fixups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (22 commits) HID: i2c-hid: Add Odys Winbook 13 to descriptor override HID: lenovo: Add checks to fix of_led_classdev_register HID: intel-ish-hid: add MSI interrupt support HID: debug: Change to use DEFINE_SHOW_ATTRIBUTE macro HID: doc: fix wrong data structure reference for UHID_OUTPUT HID: intel-ish-hid: fixes incorrect error handling HID: asus: Add support for the ASUS T101HA keyboard dock HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice HID: logitech: Enable high-resolution scrolling on Logitech mice HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration" HID: logitech-hidpp: fix typo, hiddpp to hidpp HID: input: use the Resolution Multiplier for high-resolution scrolling HID: core: process the Resolution Multiplier HID: core: store the collections as a basic tree Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES` HID: input: support Microsoft wireless radio control hotkey HID: use macros in IS_INPUT_APPLICATION HID: asus: Add support for the ASUS FX503VD laptop HID: asus: Add event handler to catch unmapped Asus Vendor UsagePage codes HID: cougar: Add support for Cougar 700K Gaming Keyboard ... commit 1686cc1a31f45a3fd090e5d0c6fce777422e13fa Merge: 5c4a60831aa6d 5f30b2e823484 Author: Linus Torvalds Date: Sat Jan 5 17:51:36 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatch update from Jiri Kosina: "Return value checking fixup in livepatching samples, from Nicholas Mc Guire" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: check kzalloc return values commit d86271af64602e7c86c003b27f27c7216706ff96 Author: Masahiro Yamada Date: Sat Jan 5 12:01:51 2019 +0900 kconfig: rename generated .*conf-cfg to *conf-cfg Remove the dot-prefixing since it is just a matter of the .gitignore file. Signed-off-by: Masahiro Yamada commit f7de64b73172e0c4cc900c14a432b76f0347ee9e Author: Masahiro Yamada Date: Thu Jan 3 10:47:05 2019 +0900 kbuild: remove unnecessary stubs for archheader and archscripts Make simply skips a missing rule when it is marked as .PHONY. Remove the dummy targets. Signed-off-by: Masahiro Yamada commit ba97df45581f09a987ffa38444c33ed6a0a9479e Author: Masahiro Yamada Date: Thu Jan 3 10:16:54 2019 +0900 kbuild: use assignment instead of define ... endef for filechk_* rules You do not have to use define ... endef for filechk_* rules. For simple cases, the use of assignment looks cleaner, IMHO. I updated the usage for scripts/Kbuild.include in case somebody misunderstands the 'define ... endif' is the requirement. Signed-off-by: Masahiro Yamada Acked-by: Heiko Carstens commit d6e4b3e326d8b44675b9e19534347d97073826aa Author: Masahiro Yamada Date: Thu Jan 3 10:10:39 2019 +0900 arch: remove redundant UAPI generic-y defines Now that Kbuild automatically creates asm-generic wrappers for missing mandatory headers, it is redundant to list the same headers in generic-y and mandatory-y. Suggested-by: Sam Ravnborg Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit 919987318a129b4d0c2203a3c6fd2d804be77100 Author: Masahiro Yamada Date: Thu Jan 3 10:10:38 2019 +0900 kbuild: generate asm-generic wrappers if mandatory headers are missing Some time ago, Sam pointed out a certain degree of overwrap between generic-y and mandatory-y. (https://lkml.org/lkml/2017/7/10/121) I tweaked the meaning of mandatory-y a little bit; now it defines the minimum set of ASM headers that all architectures must have. If arch does not have specific implementation of a mandatory header, Kbuild will let it fallback to the asm-generic one by automatically generating a wrapper. This will allow to drop lots of redundant generic-y defines. Previously, "mandatory" was used in the context of UAPI, but I guess this can be extended to kernel space ASM headers. Suggested-by: Sam Ravnborg Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit d4ce5458ea1b7d8ca49c436d602095c4912777d3 Author: Masahiro Yamada Date: Thu Jan 3 10:10:37 2019 +0900 arch: remove stale comments "UAPI Header export list" These comments are leftovers of commit fcc8487d477a ("uapi: export all headers under uapi directories"). Prior to that commit, exported headers must be explicitly added to header-y. Now, all headers under the uapi/ directories are exported. Signed-off-by: Masahiro Yamada commit 8c4fa8b8d48326353afaf6934edd5f1cc49ee90b Author: Masahiro Yamada Date: Thu Jan 3 10:10:36 2019 +0900 riscv: remove redundant kernel-space generic-y This commit removes redundant generic-y defines in arch/riscv/include/asm/Kbuild. [1] It is redundant to define the same generic-y in both arch/$(ARCH)/include/asm/Kbuild and arch/$(ARCH)/include/uapi/asm/Kbuild. Remove the following generic-y: errno.h fcntl.h ioctl.h ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h posix_types.h resource.h sembuf.h setup.h shmbuf.h signal.h socket.h sockios.h stat.h statfs.h swab.h termbits.h termios.h types.h [2] It is redundant to define generic-y when arch-specific implementation exists in arch/$(ARCH)/include/asm/*.h Remove the following generic-y: cacheflush.h module.h Signed-off-by: Masahiro Yamada commit ad774086356da92a477a87916613d96f4b36005c Author: Masahiro Yamada Date: Mon Dec 31 17:24:09 2018 +0900 kbuild: change filechk to surround the given command with { } filechk_* rules often consist of multiple 'echo' lines. They must be surrounded with { } or ( ) to work correctly. Otherwise, only the string from the last 'echo' would be written into the target. Let's take care of that in the 'filechk' in scripts/Kbuild.include to clean up filechk_* rules. Signed-off-by: Masahiro Yamada commit 172caf1993b7a6503a9f7faf589e2cf26eb1f219 Author: Masahiro Yamada Date: Mon Dec 31 17:24:08 2018 +0900 kbuild: remove redundant target cleaning on failure Since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"), the target file is automatically deleted on failure. The boilerplate code ... || { rm -f $@; false; } is unneeded. Signed-off-by: Masahiro Yamada commit f5688663db9b207d7d31f30f388417504b16b76c Author: Masahiro Yamada Date: Mon Dec 31 13:09:00 2018 +0900 kbuild: clean up rule_dtc_dt_yaml Commit 3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe") and commit 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks") came in via different sub-systems. This is a follow-up cleanup. Signed-off-by: Masahiro Yamada commit 786ac51a48465da56f333652ec1d8b215bb272fe Author: Masahiro Yamada Date: Mon Dec 31 10:05:01 2018 +0900 kbuild: remove UIMAGE_IN and UIMAGE_OUT The only/last user of UIMAGE_IN/OUT was removed by commit 4722a3e6b716 ("microblaze: fix multiple bugs in arch/microblaze/boot/Makefile"). The input and output should always be $< and $@. Signed-off-by: Masahiro Yamada commit e9666d10a5677a494260d60d1fa0b73cc7646eb3 Author: Masahiro Yamada Date: Mon Dec 31 00:14:15 2018 +0900 jump_label: move 'asm goto' support test to Kconfig Currently, CONFIG_JUMP_LABEL just means "I _want_ to use jump label". The jump label is controlled by HAVE_JUMP_LABEL, which is defined like this: #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) # define HAVE_JUMP_LABEL #endif We can improve this by testing 'asm goto' support in Kconfig, then make JUMP_LABEL depend on CC_HAS_ASM_GOTO. Ugly #ifdef HAVE_JUMP_LABEL will go away, and CONFIG_JUMP_LABEL will match to the real kernel capability. Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman (powerpc) Tested-by: Sedat Dilek commit 72d3ebb929de339f991fc49b58942d2d5ecdb753 Author: Mathias Krause Date: Sun Dec 30 13:36:00 2018 +0100 kallsyms: lower alignment on ARM As mentioned in the info pages of gas, the '.align' pseudo op's interpretation of the alignment value is architecture specific. It might either be a byte value or taken to the power of two. On ARM it's actually the latter which leads to unnecessary large alignments of 16 bytes for 32 bit builds or 256 bytes for 64 bit builds. Fix this by switching to '.balign' instead which is consistent across all architectures. Signed-off-by: Mathias Krause Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Masahiro Yamada commit c3003315fbf442d99a73a3fc5288dbf89a735e38 Author: Julia Lawall Date: Sat Dec 29 07:14:16 2018 +0100 scripts: coccinelle: boolinit: drop warnings on named constants Coccinelle doesn't always have access to the values of named (#define) constants, and they may likely often be bound to true and false values anyway, resulting in false positives. So stop warning about them. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada commit dc7884f34a5da79c61a9443c465a99512dc7bb15 Author: Julia Lawall Date: Fri Dec 28 15:49:01 2018 +0100 scripts: coccinelle: check for redeclaration Avoid reporting on the use of an iterator index variable when the variable is redeclared. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada commit a5003571e627789d8104ebdbe3ae24be41ea071a Author: Masahiro Yamada Date: Fri Dec 21 15:23:02 2018 +0900 kconfig: remove unused "file" field of yylval union This has never been used. Signed-off-by: Masahiro Yamada commit 5c0ab286aeb1b7feeb50c138f2d9d80b3b04c276 Author: Masahiro Yamada Date: Sun Dec 16 23:14:11 2018 +0900 nds32: remove redundant kernel-space generic-y This commit removes redundant generic-y defines in arch/nds32/include/asm/Kbuild. [1] It is redundant to define the same generic-y in both arch/$(ARCH)/include/asm/Kbuild and arch/$(ARCH)/include/uapi/asm/Kbuild. Remove the following generic-y: bitsperlong.h bpf_perf_event.h errno.h fcntl.h ioctl.h ioctls.h mman.h shmbuf.h stat.h [2] It is redundant to define generic-y when arch-specific implementation exists in arch/$(ARCH)/include/asm/*.h Remove the following generic-y: ftrace.h Signed-off-by: Masahiro Yamada commit fd8658b58030b1815ba8bccfc02692c9fa718996 Author: Masahiro Yamada Date: Mon Nov 26 16:42:10 2018 +0900 nios2: remove unneeded HAS_DMA define kernel/dma/Kconfig globally defines HAS_DMA as follows: config HAS_DMA bool depends on !NO_DMA default y Signed-off-by: Masahiro Yamada Reviewed-by: Christoph Hellwig commit 5c4a60831aa6d937cec9cf17aef8eb6c1851bfcd Merge: c280230254635 24ef9ec891c76 Author: Linus Torvalds Date: Sat Jan 5 16:07:28 2019 -0800 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Add locking for cooling device sysfs attribute in case the cooling device state is changed by userspace and thermal framework simultaneously. (Thara Gopinath) - Fix a problem that passive cooling is reset improperly after system suspend/resume. (Wei Wang) - Cleanup the driver/thermal/ directory by moving intel and qcom platform specific drivers to platform specific sub-directories. (Amit Kucheria) - Some trivial cleanups. (Lukasz Luba, Wolfram Sang) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal/intel: fixup for Kconfig string parsing tightening up drivers: thermal: Move QCOM_SPMI_TEMP_ALARM into the qcom subdir drivers: thermal: Move various drivers for intel platforms into a subdir thermal: Fix locking in cooling device sysfs update cur_state Thermal: do not clear passive state during system sleep thermal: zx2967_thermal: simplify getting .driver_data thermal: st: st_thermal: simplify getting .driver_data thermal: spear_thermal: simplify getting .driver_data thermal: rockchip_thermal: simplify getting .driver_data thermal: int340x_thermal: int3400_thermal: simplify getting .driver_data thermal: remove unused function parameter commit c280230254635da33703dd8f4a10cad23f640fb0 Merge: a67012412e5a8 9d216211fded2 Author: Linus Torvalds Date: Sat Jan 5 16:01:16 2019 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal SoC updates from Eduardo Valentin: - Tegra DT binding documentation for Tegra194 - Armada now supports ap806 and cp110 - RCAR thermal now supports R8A774C0 and R8A77990 - Fixes on thermal_hwmon, IMX, generic-ADC, ST, RCAR, Broadcom, Uniphier, QCOM, Tegra, PowerClamp, and Armada thermal drivers. * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: (22 commits) thermal: generic-adc: Fix adc to temp interpolation thermal: rcar_thermal: add R8A77990 support dt-bindings: thermal: rcar-thermal: add R8A77990 support thermal: rcar_thermal: add R8A774C0 support dt-bindings: thermal: rcar-thermal: add R8A774C0 support dt-bindings: cp110: document the thermal interrupt capabilities dt-bindings: ap806: document the thermal interrupt capabilities MAINTAINERS: thermal: add entry for Marvell MVEBU thermal driver thermal: armada: add overheat interrupt support thermal: st: fix Makefile typo thermal: uniphier: Convert to SPDX identifier thermal/intel_powerclamp: Change to use DEFINE_SHOW_ATTRIBUTE macro thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro dt-bindings: thermal: tegra-bpmp: Add Tegra194 support thermal: imx: save one condition block for normal case of nvmem initialization thermal: imx: fix for dependency on cpu-freq thermal: tsens: qcom: do not create duplicate regmap debugfs entries thermal: armada: Use PTR_ERR_OR_ZERO in armada_thermal_probe_legacy() dt-bindings: thermal: rcar-gen3-thermal: All variants use 3 interrupts thermal: broadcom: use devm_thermal_zone_of_sensor_register ... commit d4a7e9bb74b5aaf07b89f6531c080b1130bdf019 Author: David Ahern Date: Sat Jan 5 07:35:04 2019 -0800 ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses I realized the last patch calls dev_get_by_index_rcu in a branch not holding the rcu lock. Add the calls to rcu_read_lock and rcu_read_unlock. Fixes: ec90ad334986 ("ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit a67012412e5a820c44239af9712a1a6037b33fd4 Merge: 7e928df80d30b dc56367cb5dbf Author: Linus Torvalds Date: Sat Jan 5 14:08:00 2019 -0800 Merge tag 'trace-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace sh build fix from Steven Rostedt: "It appears that the zero-day bot did find a bug in my sh build. And that I didn't have the bad code in my config file when I cross compiled it, although there are a few other errors in sh that makes it not build for me, I missed that I added one more" * tag 'trace-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: sh: ftrace: Fix missing parenthesis in WARN_ON() commit 7e928df80d30b7664b5822784c95b4a54dc7cfbf Merge: 3cd6d495db2a0 d5c7076b772ad Author: Linus Torvalds Date: Sat Jan 5 14:05:06 2019 -0800 Merge tag '4.21-smb3-small-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb3 fixes from Steve French: "Three fixes, one for stable, one adds the (most secure) SMB3.1.1 dialect to default list requested" * tag '4.21-smb3-small-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: add smb3.1.1 to default dialect list cifs: fix confusing warning message on reconnect smb3: fix large reads on encrypted connections commit 3cd6d495db2a0acfd2854f43aac8bfc5914bc89c Merge: acda9efa8c62d 31af12efd0a25 Author: Linus Torvalds Date: Sat Jan 5 14:02:22 2019 -0800 Merge tag 'iomap-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap maintainer update from Darrick Wong: "Christoph Hellwig and I have decided to take responsibility for the fs iomap code rather than let it languish further" * tag 'iomap-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: take responsibility for the filesystem iomap code commit acda9efa8c62d4baa0395c83bda43f252137e302 Merge: c7eaf342ecb16 90be9b86da903 Author: Linus Torvalds Date: Sat Jan 5 14:00:56 2019 -0800 Merge tag 'xfs-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixlets from Darrick Wong: "Remove a couple of unnecessary local variables" * tag 'xfs-4.21-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: xfs_fsops: drop useless LIST_HEAD xfs: xfs_buf: drop useless LIST_HEAD commit c7eaf342ecb164d79275a6c1c93aef19293a4aaf Merge: 35004f2e55807 5ccedf1ccd710 Author: Linus Torvalds Date: Sat Jan 5 13:58:08 2019 -0800 Merge tag 'ceph-for-4.21-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "A fairly quiet round: a couple of messenger performance improvements from myself and a few cap handling fixes from Zheng" * tag 'ceph-for-4.21-rc1' of git://github.com/ceph/ceph-client: ceph: don't encode inode pathes into reconnect message ceph: update wanted caps after resuming stale session ceph: skip updating 'wanted' caps if caps are already issued ceph: don't request excl caps when mount is readonly ceph: don't update importing cap's mseq when handing cap export libceph: switch more to bool in ceph_tcp_sendmsg() libceph: use MSG_SENDPAGE_NOTLAST with ceph_tcp_sendpage() libceph: use sock_no_sendpage() as a fallback in ceph_tcp_sendpage() libceph: drop last_piece logic from write_partial_message_data() ceph: remove redundant assignment ceph: cleanup splice_dentry() commit 35004f2e55807a1a1491db24ab512dd2f770a130 Author: Olof Johansson Date: Sat Jan 5 13:21:18 2019 -0800 lib/genalloc.c: include vmalloc.h Fixes build break on most ARM/ARM64 defconfigs: lib/genalloc.c: In function 'gen_pool_add_virt': lib/genalloc.c:190:10: error: implicit declaration of function 'vzalloc_node'; did you mean 'kzalloc_node'? lib/genalloc.c:190:8: warning: assignment to 'struct gen_pool_chunk *' from 'int' makes pointer from integer without a cast [-Wint-conversion] lib/genalloc.c: In function 'gen_pool_destroy': lib/genalloc.c:254:3: error: implicit declaration of function 'vfree'; did you mean 'kfree'? Fixes: 6862d2fc8185 ('lib/genalloc.c: use vzalloc_node() to allocate the bitmap') Cc: Huang Shijie Cc: Andrew Morton Cc: Alexey Skidanov Signed-off-by: Olof Johansson Signed-off-by: Linus Torvalds commit 505b050fdf42097883b2d37b8e796e1f11dbef50 Merge: 9b286efeb5eb5 718c43038f287 Author: Linus Torvalds Date: Sat Jan 5 13:25:58 2019 -0800 Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs mount API prep from Al Viro: "Mount API prereqs. Mostly that's LSM mount options cleanups. There are several minor fixes in there, but nothing earth-shattering (leaks on failure exits, mostly)" * 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (27 commits) mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT smack: rewrite smack_sb_eat_lsm_opts() smack: get rid of match_token() smack: take the guts of smack_parse_opts_str() into a new helper LSM: new method: ->sb_add_mnt_opt() selinux: rewrite selinux_sb_eat_lsm_opts() selinux: regularize Opt_... names a bit selinux: switch away from match_token() selinux: new helper - selinux_add_opt() LSM: bury struct security_mnt_opts smack: switch to private smack_mnt_opts selinux: switch to private struct selinux_mnt_opts LSM: hide struct security_mnt_opts from any generic code selinux: kill selinux_sb_get_mnt_opts() LSM: turn sb_eat_lsm_opts() into a method nfs_remount(): don't leak, don't ignore LSM options quietly btrfs: sanitize security_mnt_opts use selinux; don't open-code a loop in sb_finish_set_opts() LSM: split ->sb_set_mnt_opts() out of ->sb_kern_mount() new helper: security_sb_eat_lsm_opts() ... commit 9b286efeb5eb5aaa2712873fc1f928b2f879dbde Merge: 47f3f4eb7834e e4f2283cc6ffe Author: Linus Torvalds Date: Sat Jan 5 13:18:59 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull trivial vfs updates from Al Viro: "A few cleanups + Neil's namespace_unlock() optimization" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: exec: make prepare_bprm_creds static genheaders: %-s had been there since v6; %-*s - since v7 VFS: use synchronize_rcu_expedited() in namespace_unlock() iov_iter: reduce code duplication commit 47f3f4eb7834ea424b0704bffd0d3e3c8ffbc3a1 Merge: f1c2f8857c5aa edefae94b7b9f Author: Linus Torvalds Date: Sat Jan 5 12:48:25 2019 -0800 Merge tag 'mips_fixes_4.21_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A few early MIPS fixes for 4.21: - The Broadcom BCM63xx platform sees a fix for resetting the BCM6368 ethernet switch, and the removal of a platform device we've never had a driver for. - The Alchemy platform sees a few fixes for bitrot that occurred within the past few cycles. - We now enable vectored interrupt support for the MediaTek MT7620 SoC, which makes sense since they're supported by the SoC but in this case also works around a bug relating to the location of exception vectors when using a recent version of U-Boot. - The atomic64_fetch_*_relaxed() family of functions see a fix for a regression in MIPS64 kernels since v4.19. - Cavium Octeon III CN7xxx systems will now disable their RGMII interfaces rather than attempt to enable them & warn about the lack of support for doing so, as they did since initial CN7xxx ethernet support was added in v4.7. - The Microsemi/Microchip MSCC SoCs gain a MAINTAINERS entry. - .mailmap now provides consistency for Dengcheng Zhu's name & current email address" * tag 'mips_fixes_4.21_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: OCTEON: mark RGMII interface disabled on OCTEON III MIPS: Fix a R10000_LLSC_WAR logic in atomic.h MIPS: BCM63XX: drop unused and broken DSP platform device mailmap: Update name spelling and email for Dengcheng Zhu MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 MAINTAINERS: Add a maintainer for MSCC MIPS SoCs MIPS: Alchemy: update dma masks for devboard devices MIPS: Alchemy: update cpu-feature-overrides MIPS: Alchemy: drop DB1000 IrDA support bits MIPS: alchemy: cpu_all_mask is forbidden for clock event devices MIPS: BCM63XX: fix switch core reset on BCM6368 commit f1c2f8857c5aa6c92aa903bc06437503422e5925 Merge: cd08f68c659f4 074400a7be612 Author: Linus Torvalds Date: Sat Jan 5 11:48:44 2019 -0800 Merge tag 'powerpc-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A fix for the recent access_ok() change, which broke the build. We recently added a use of type in order to squash a warning elsewhere about type being unused. A handful of other minor build fixes, and one defconfig update. Thanks to: Christian Lamparter, Christophe Leroy, Diana Craciun, Mathieu Malaterre" * tag 'powerpc-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Drop use of 'type' from access_ok() KVM: PPC: Book3S HV: radix: Fix uninitialized var build error powerpc/configs: Add PPC4xx_OCM to ppc40x_defconfig powerpc/4xx/ocm: Fix phys_addr_t printf warnings powerpc/4xx/ocm: Fix compilation error due to PAGE_KERNEL usage powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup' commit cd08f68c659f42f9ec23b25b9cefd1ef49dc78b5 Merge: 670b321f4150b dfbaecb2b707c Author: Linus Torvalds Date: Sat Jan 5 11:44:20 2019 -0800 Merge branch 'parisc-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: "Fix boot issues with a series of parisc servers since kernel 4.20. Remapping kernel text with set_kernel_text_rw() missed to remap from lowest up until the highest huge-page aligned kernel text addresss" * 'parisc-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Remap hugepage-aligned pages in set_kernel_text_rw() commit 670b321f4150bfc8a2261f4db3fcdab21738506b Merge: b23b0ea3708c3 21c7acc439b55 Author: Linus Torvalds Date: Sat Jan 5 11:35:55 2019 -0800 Merge tag 'for-4.21' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux Pull h8300 fix from Yoshinori Sato: "Build problem fix" * tag 'for-4.21' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: h8300: pci: Remove local declaration of pcibios_penalize_isa_irq commit b23b0ea3708c3dec599966fc856836aca48835b9 Merge: 078a5a4faf64f 00f8ccd0c95f4 Author: Linus Torvalds Date: Sat Jan 5 11:30:37 2019 -0800 Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull more ARM SoC updates from Olof Johansson: "A few updates that we merged late but are low risk for regressions for other platforms (and a few other straggling patches): - I mis-tagged the 'drivers' branch, and missed 3 patches. Merged in here. They're for a driver for the PL353 SRAM controller and a build fix for the qualcomm scm driver. - A new platform, RDA Micro RDA8810PL (Cortex-A5 w/ integrated Vivante GPU, 256MB RAM, Wifi). This includes some acked platform-specific drivers (serial, etc). This also include DTs for two boards with this SoC, OrangePi 2G and OrangePi i86. - i.MX8 is another new platform (NXP, 4x Cortex-A53 + Cortex-M4, 4K video playback offload). This is the first i.MX 64-bit SoC. - Some minor updates to Samsung boards (adding a few peripherals in DTs). - Small rework for SMP bootup on STi platforms. - A couple of TEE driver fixes. - A couple of new config options (bcm2835 thermal, Uniphier MDMAC) enabled in defconfigs" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits) ARM: multi_v7_defconfig: enable CONFIG_UNIPHIER_MDMAC arm64: defconfig: Re-enable bcm2835-thermal driver MAINTAINERS: Add entry for RDA Micro SoC architecture tty: serial: Add RDA8810PL UART driver ARM: dts: rda8810pl: Add interrupt support for UART dt-bindings: serial: Document RDA Micro UART ARM: dts: rda8810pl: Add timer support ARM: dts: Add devicetree for OrangePi i96 board ARM: dts: Add devicetree for OrangePi 2G IoT board ARM: dts: Add devicetree for RDA8810PL SoC ARM: Prepare RDA8810PL SoC dt-bindings: arm: Document RDA8810PL and reference boards dt-bindings: Add RDA Micro vendor prefix ARM: sti: remove pen_release and boot_lock arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards arm64: dts: imx8mq-evk: enable watchdog arm64: dts: imx8mq: add watchdog devices MAINTAINERS: add i.MX8 DT path to i.MX architecture arm64: add support for i.MX8M EVK board arm64: add basic DTS for i.MX8MQ ... commit 078a5a4faf64fefaf13478a9091782432cad33fa Merge: 1205b62390eed 7e0b44e870cf2 Author: Linus Torvalds Date: Sat Jan 5 11:28:39 2019 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "I'm safely chained back up to my desk, so please pull these arm64 fixes for -rc1 that address some issues that cropped up during the merge window: - Prevent KASLR from mapping the top page of the virtual address space - Fix device-tree probing of SDEI driver - Fix incorrect register offset definition in Hisilicon DDRC PMU driver - Fix compilation issue with older binutils not liking unsigned immediates - Fix uapi headers so that libc can provide its own sigcontext definition - Fix handling of private compat syscalls - Hook up compat io_pgetevents() syscall for 32-bit tasks - Cleanup to arm64 Makefile (including now to avoid silly conflicts)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: compat: Hook up io_pgetevents() for 32-bit tasks arm64: compat: Don't pull syscall number from regs in arm_compat_syscall arm64: compat: Avoid sending SIGILL for unallocated syscall numbers arm64/sve: Disentangle from arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition drivers/perf: hisi: Fixup one DDRC PMU register offset arm64: replace arm64-obj-* in Makefile with obj-* arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region firmware: arm_sdei: Fix DT platform device creation firmware: arm_sdei: fix wrong of_node_put() in init function arm64: entry: remove unused register aliases arm64: smp: Fix compilation error commit 1205b62390eed4e747232d183fbf412a5aecacd9 Merge: 9ee3b3f4a5eb5 6de92920a717e Author: Linus Torvalds Date: Sat Jan 5 11:23:17 2019 -0800 Merge tag 'for-4.21' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Included in this update: - Florian Fainelli noticed that userspace segfaults caused by the lack of kernel-userspace helpers was hard to diagnose; we now issue a warning when userspace tries to use the helpers but the kernel has them disabled. - Ben Dooks wants compatibility for the old ATAG serial number with DT systems. - Some cleanup of assembly by Nicolas Pitre. - User accessors optimisation from Vincent Whitchurch. - More robust kdump on SMP systems from Yufen Wang. - Sebastian Andrzej Siewior noticed problems with the SMP "boot_lock" on RT kernels, and so we convert the Versatile series of platforms to use a raw spinlock instead, consolidating the Versatile implementation. We entirely remove the boot_lock on OMAP systems, where it's unnecessary. Further patches for other systems will be submitted for the following merge window. - Start switching old StrongARM-11x0 systems to use gpiolib rather than their private GPIO implementation - mostly PCMCIA bits. - ARM Kconfig cleanups. - Cleanup a mostly harmless mistake in the recent Spectre patch in 4.20 (which had the effect that data that can be placed into the init sections was incorrectly always placed in the rodata section)" * tag 'for-4.21' of git://git.armlinux.org.uk/~rmk/linux-arm: (25 commits) ARM: omap2: remove unnecessary boot_lock ARM: versatile: rename and comment SMP implementation ARM: versatile: convert boot_lock to raw ARM: vexpress/realview: consolidate immitation CPU hotplug ARM: fix the cockup in the previous patch ARM: sa1100/cerf: switch to using gpio_led_register_device() ARM: sa1100/assabet: switch to using gpio leds ARM: sa1100/assabet: add gpio keys support for right-hand two buttons ARM: sa1111: remove legacy GPIO interfaces pcmcia: sa1100*: remove redundant bvd1/bvd2 setting ARM: pxa/lubbock: switch PCMCIA to MAX1600 library ARM: pxa/mainstone: switch PCMCIA to MAX1600 library and gpiod APIs ARM: sa1100/neponset: switch PCMCIA to MAX1600 library and gpiod APIs ARM: sa1100/jornada720: switch PCMCIA to gpiod APIs pcmcia: add MAX1600 library ARM: sa1100: explicitly register sa11x0-pcmcia devices ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+ ARM: 8812/1: Optimise copy_{from/to}_user for !CPU_USE_DOMAINS ARM: 8811/1: always list both ldrd/strd registers explicitly ARM: 8808/1: kexec:offline panic_smp_self_stop CPU ... commit 9ee3b3f4a5eb523ef27675ac2fcd2269b9d68767 Merge: a65981109f294 f50fd2d8524c1 Author: Linus Torvalds Date: Sat Jan 5 09:50:07 2019 -0800 Merge tag 'csky-for-linus-4.21' of git://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: "Here are three main features (cpu_hotplug, basic ftrace, basic perf) and some bugfixes: Features: - Add CPU-hotplug support for SMP - Add ftrace with function trace and function graph trace - Add Perf support - Add EM_CSKY_OLD 39 - optimize kernel panic print. - remove syscall_exit_work Bugfixes: - fix abiv2 mmap(... O_SYNC) failure - fix gdb coredump error - remove vdsp implement for kernel - fix qemu failure to bootup sometimes - fix ftrace call-graph panic - fix device tree node reference leak - remove meaningless header-y - fix save hi,lo,dspcr regs in switch_stack - remove unused members in processor.h" * tag 'csky-for-linus-4.21' of git://github.com/c-sky/csky-linux: csky: Add perf support for C-SKY csky: Add EM_CSKY_OLD 39 clocksource/drivers/c-sky: fixup ftrace call-graph panic csky: ftrace call graph supported. csky: basic ftrace supported csky: remove unused members in processor.h csky: optimize kernel panic print. csky: stacktrace supported. csky: CPU-hotplug supported for SMP clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes. csky: fixup save hi,lo,dspcr regs in switch_stack. csky: remove syscall_exit_work csky: fixup remove vdsp implement for kernel. csky: bugfix gdb coredump error. csky: fixup abiv2 mmap(... O_SYNC) failed. csky: define syscall_get_arch() elf-em.h: add EM_CSKY csky: remove meaningless header-y csky: Don't leak device tree node reference commit a65981109f294ba7e64b33ad3b4575a4636fce66 Merge: 3fed6ae4b027f b685a7350ae76 Author: Linus Torvalds Date: Sat Jan 5 09:16:18 2019 -0800 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - procfs updates - various misc bits - lib/ updates - epoll updates - autofs - fatfs - a few more MM bits * emailed patches from Andrew Morton : (58 commits) mm/page_io.c: fix polled swap page in checkpatch: add Co-developed-by to signature tags docs: fix Co-Developed-by docs drivers/base/platform.c: kmemleak ignore a known leak fs: don't open code lru_to_page() fs/: remove caller signal_pending branch predictions mm/: remove caller signal_pending branch predictions arch/arc/mm/fault.c: remove caller signal_pending_branch predictions kernel/sched/: remove caller signal_pending branch predictions kernel/locking/mutex.c: remove caller signal_pending branch predictions mm: select HAVE_MOVE_PMD on x86 for faster mremap mm: speed up mremap by 20x on large regions mm: treewide: remove unused address argument from pte_alloc functions initramfs: cleanup incomplete rootfs scripts/gdb: fix lx-version string output kernel/kcov.c: mark write_comp_data() as notrace kernel/sysctl: add panic_print into sysctl panic: add options to print system info when panic happens bfs: extra sanity checking and static inode bitmap exec: separate MM_ANONPAGES and RLIMIT_STACK accounting ... commit 8270f3a11ceef64bdb0ab141180e8d2f17c619ec Author: Christoph Hellwig Date: Fri Jan 4 18:31:48 2019 +0100 dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations We need to return a dma_addr_t even if we don't have a kernel mapping. Do so by consolidating the phys_to_dma call in a single place and jump to it from all the branches that return successfully. Fixes: bfd56cd60521 ("dma-mapping: support highmem in the generic remap allocator") Reported-by: Liviu Dudau Tested-by: Liviu Dudau commit 06f55fd2d22742ed7e725124dfea68936d12ce40 Author: Christoph Hellwig Date: Fri Jan 4 09:50:33 2019 +0100 x86/amd_gart: fix unmapping of non-GART mappings In many cases we don't have to create a GART mapping at all, which also means there is nothing to unmap. Fix the range check that was incorrectly modified when removing the mapping_error method. Fixes: 9e8aa6b546 ("x86/amd_gart: remove the mapping_error dma_map_ops method") Reported-by: Michal Kubecek Signed-off-by: Christoph Hellwig Tested-by: Michal Kubecek commit 466f89e9ec8c6868131c2d2ba9cd5f536879c42a Merge: ec90ad334986f 976b4f3a4646f Author: Alexei Starovoitov Date: Fri Jan 4 20:23:33 2019 -0800 Merge branch 'udpv6_sendmsg-addr_any-fix' Andrey Ignatov says: ==================== The patch set fixes BSD'ism in sys_sendmsg to rewrite unspecified destination IPv6 for unconnected UDP sockets in sys_sendmsg with [::1] in case when either CONFIG_CGROUP_BPF is enabled or when sys_sendmsg BPF hook sets destination IPv6 to [::]. Patch 1 is the fix and provides more details. Patch 2 adds two test cases to verify the fix. v1->v2: * Fix compile error in patch 1. ==================== Signed-off-by: Alexei Starovoitov commit 976b4f3a4646fbf0d189caca25f91f82e4be4b5a Author: Andrey Ignatov Date: Fri Jan 4 01:07:08 2019 -0800 selftests/bpf: Test [::] -> [::1] rewrite in sys_sendmsg in test_sock_addr Test that sys_sendmsg BPF hook doesn't break sys_sendmsg behaviour to rewrite destination IPv6 = [::] with [::1] (BSD'ism). Two test cases are added: 1) User passes dst IPv6 = [::] and BPF_CGROUP_UDP6_SENDMSG program doesn't touch it. 2) User passes dst IPv6 != [::], but BPF_CGROUP_UDP6_SENDMSG program rewrites it with [::]. In both cases [::1] is used by sys_sendmsg code eventually and datagram is sent successfully for unconnected UDP socket. Example of relevant output: Test case: sendmsg6: set dst IP = [::] (BSD'ism) .. [PASS] Test case: sendmsg6: preserve dst IP = [::] (BSD'ism) .. [PASS] Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit e8e36984080b55ac5e57bdb09a5b570f2fc8e963 Author: Andrey Ignatov Date: Fri Jan 4 01:07:07 2019 -0800 bpf: Fix [::] -> [::1] rewrite in sys_sendmsg sys_sendmsg has supported unspecified destination IPv6 (wildcard) for unconnected UDP sockets since 876c7f41. When [::] is passed by user as destination, sys_sendmsg rewrites it with [::1] to be consistent with BSD (see "BSD'ism" comment in the code). This didn't work when cgroup-bpf was enabled though since the rewrite [::] -> [::1] happened before passing control to cgroup-bpf block where fl6.daddr was updated with passed by user sockaddr_in6.sin6_addr (that might or might not be changed by BPF program). That way if user passed [::] as dst IPv6 it was first rewritten with [::1] by original code from 876c7f41, but then rewritten back with [::] by cgroup-bpf block. It happened even when BPF_CGROUP_UDP6_SENDMSG program was not present (CONFIG_CGROUP_BPF=y was enough). The fix is to apply BSD'ism after cgroup-bpf block so that [::] is replaced with [::1] no matter where it came from: passed by user to sys_sendmsg or set by BPF_CGROUP_UDP6_SENDMSG program. Fixes: 1cedee13d25a ("bpf: Hooks for sys_sendmsg") Reported-by: Nitin Rawat Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit bb351abaf5cd4f9237e1b3094d9cc04853de6d95 Author: Weiping Zhang Date: Wed Dec 26 11:56:33 2018 +0800 block: add documentation for io_timeout Add documentation for /sys/block//queue/io_timeout. Reviewed-by: Bart Van Assche Signed-off-by: Weiping Zhang Signed-off-by: Jens Axboe commit 3fed6ae4b027f9c93be18520f87bd06bdffd196b Author: Christoph Hellwig Date: Fri Jan 4 13:03:08 2019 -0800 ia64: fix compile without swiotlb Some non-generic ia64 configs don't build swiotlb, and thus should not pull in the generic non-coherent DMA infrastructure. Fixes: 68c608345c ("swiotlb: remove dma_mark_clean") Reported-by: Tony Luck Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds commit 170d13ca3a2fdaaa0283399247631b76b441cca2 Author: Linus Torvalds Date: Fri Jan 4 17:52:49 2019 -0800 x86: re-introduce non-generic memcpy_{to,from}io This has been broken forever, and nobody ever really noticed because it's purely a performance issue. Long long ago, in commit 6175ddf06b61 ("x86: Clean up mem*io functions") Brian Gerst simplified the memory copies to and from iomem, since on x86, the instructions to access iomem are exactly the same as the regular instructions. That is technically true, and things worked, and nobody said anything. Besides, back then the regular memcpy was pretty simple and worked fine. Nobody noticed except for David Laight, that is. David has a testing a TLP monitor he was writing for an FPGA, and has been occasionally complaining about how memcpy_toio() writes things one byte at a time. Which is completely unacceptable from a performance standpoint, even if it happens to technically work. The reason it's writing one byte at a time is because while it's technically true that accesses to iomem are the same as accesses to regular memory on x86, the _granularity_ (and ordering) of accesses matter to iomem in ways that they don't matter to regular cached memory. In particular, when ERMS is set, we default to using "rep movsb" for larger memory copies. That is indeed perfectly fine for real memory, since the whole point is that the CPU is going to do cacheline optimizations and executes the memory copy efficiently for cached memory. With iomem? Not so much. With iomem, "rep movsb" will indeed work, but it will copy things one byte at a time. Slowly and ponderously. Now, originally, back in 2010 when commit 6175ddf06b61 was done, we didn't use ERMS, and this was much less noticeable. Our normal memcpy() was simpler in other ways too. Because in fact, it's not just about using the string instructions. Our memcpy() these days does things like "read and write overlapping values" to handle the last bytes of the copy. Again, for normal memory, overlapping accesses isn't an issue. For iomem? It can be. So this re-introduces the specialized memcpy_toio(), memcpy_fromio() and memset_io() functions. It doesn't particularly optimize them, but it tries to at least not be horrid, or do overlapping accesses. In fact, this uses the existing __inline_memcpy() function that we still had lying around that uses our very traditional "rep movsl" loop followed by movsw/movsb for the final bytes. Somebody may decide to try to improve on it, but if we've gone almost a decade with only one person really ever noticing and complaining, maybe it's not worth worrying about further, once it's not _completely_ broken? Reported-by: David Laight Signed-off-by: Linus Torvalds commit a959dc88f9c8900296ccf13e2f3e1cbc555a8917 Author: Linus Torvalds Date: Sat May 21 21:55:19 2016 -0700 Use __put_user_goto in __put_user_size() and unsafe_put_user() This actually enables the __put_user_goto() functionality in unsafe_put_user(). For an example of the effect of this, this is the code generated for the unsafe_put_user(signo, &infop->si_signo, Efault); in the waitid() system call: movl %ecx,(%rbx) # signo, MEM[(struct __large_struct *)_2] It's just one single store instruction, along with generating an exception table entry pointing to the Efault label case in case that instruction faults. Before, we would generate this: xorl %edx, %edx movl %ecx,(%rbx) # signo, MEM[(struct __large_struct *)_3] testl %edx, %edx jne .L309 with the exception table generated for that 'mov' instruction causing us to jump to a stub that set %edx to -EFAULT and then jumped back to the 'testl' instruction. So not only do we now get rid of the extra code in the normal sequence, we also avoid unnecessarily keeping that extra error register live across it all. Signed-off-by: Linus Torvalds commit 4a789213c9a54c8b618924d3421e56e98df8a447 Author: Linus Torvalds Date: Sat May 21 21:44:51 2016 -0700 x86 uaccess: Introduce __put_user_goto This is finally the actual reason for the odd error handling in the "unsafe_get/put_user()" functions, introduced over three years ago. Using a "jump to error label" interface is somewhat odd, but very convenient as a programming interface, and more importantly, it fits very well with simply making the target be the exception handler address directly from the inline asm. The reason it took over three years to actually do this? We need "asm goto" support for it, which only became the default on x86 last year. It's now been a year that we've forced asm goto support (see commit e501ce957a78 "x86: Force asm-goto"), and so let's just do it here too. [ Side note: this commit was originally done back in 2016. The above commentary about timing is obviously about it only now getting merged into my real upstream tree - Linus ] Sadly, gcc still only supports "asm goto" with asms that do not have any outputs, so we are limited to only the put_user case for this. Maybe in several more years we can do the get_user case too. Signed-off-by: Linus Torvalds commit ec90ad334986fa5856d11dd272f7f22fa86c55c4 Author: David Ahern Date: Fri Jan 4 16:58:15 2019 -0800 ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address Similar to c5ee066333eb ("ipv6: Consider sk_bound_dev_if when binding a socket to an address"), binding a socket to v4 mapped addresses needs to consider if the socket is bound to a device. This problem also exists from the beginning of git history. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit dfbaecb2b707cfdc5276b548d52b437384bd6483 Author: Helge Deller Date: Fri Jan 4 23:32:53 2019 +0100 parisc: Remap hugepage-aligned pages in set_kernel_text_rw() The alternative coding patch for parisc in kernel 4.20 broke booting machines with PA8500-PA8700 CPUs. The problem is, that for such machines the parisc kernel automatically utilizes huge pages to access kernel text code, but the set_kernel_text_rw() function, which is used shortly before applying any alternative patches, didn't used the correctly hugepage-aligned addresses to remap the kernel text read-writeable. Fixes: 3847dab77421 ("parisc: Add alternative coding infrastructure") Cc: [4.20] Signed-off-by: Helge Deller commit 00f8ccd0c95f4e604297057a5bccec86c0903d14 Merge: 8e564895c30ca 3e730e858139c Author: Olof Johansson Date: Fri Jan 4 14:30:36 2019 -0800 Merge branch 'next/drivers' into next/late Merge in a few missing patches from the pull request (my copy of the branch was behind the staged version in linux-next). * next/drivers: memory: pl353: Add driver for arm pl353 static memory controller dt-bindings: memory: Add pl353 smc controller devicetree binding information firmware: qcom: scm: fix compilation error when disabled Signed-off-by: Olof Johansson commit 8e564895c30ca73cd9788aecb845879ddee987c3 Author: Masahiro Yamada Date: Fri Dec 21 17:51:24 2018 +0900 ARM: multi_v7_defconfig: enable CONFIG_UNIPHIER_MDMAC Enable the UniPhier MIO DMAC driver. This is used as the DMA engine for accelerating the SD/eMMC controller drivers. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson commit ae84e4a8eb6f0d7f3b902ce238f285e98cf2ac12 Author: Jeff Kirsher Date: Fri Jan 4 10:48:02 2019 -0800 ixgbe: fix Kconfig when driver is not a module The new ability added to the driver to use mii_bus to handle MII related ioctls is causing compile issues when the driver is compiled into the kernel (i.e. not a module). The problem was in selecting MDIO_DEVICE instead of the preferred PHYLIB Kconfig option. The reason being that MDIO_DEVICE had a dependency on PHYLIB and would be compiled as a module when PHYLIB was a module, no matter whether ixgbe was compiled into the kernel. CC: Dave Jones CC: Steve Douthit CC: Florian Fainelli Signed-off-by: Jeff Kirsher Reviewed-by: Stephen Douthit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8d933670452107e41165bea70a30dffbd281bef1 Author: Eric Dumazet Date: Fri Jan 4 11:00:00 2019 -0800 ipv6: make icmp6_send() robust against null skb->dev syzbot was able to crash one host with the following stack trace : kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8625 Comm: syz-executor4 Not tainted 4.20.0+ #8 RIP: 0010:dev_net include/linux/netdevice.h:2169 [inline] RIP: 0010:icmp6_send+0x116/0x2d30 net/ipv6/icmp.c:426 icmpv6_send smack_socket_sock_rcv_skb security_sock_rcv_skb sk_filter_trim_cap __sk_receive_skb dccp_v6_do_rcv release_sock This is because a RX packet found socket owned by user and was stored into socket backlog. Before leaving RCU protected section, skb->dev was cleared in __sk_receive_skb(). When socket backlog was finally handled at release_sock() time, skb was fed to smack_socket_sock_rcv_skb() then icmp6_send() We could fix the bug in smack_socket_sock_rcv_skb(), or simply make icmp6_send() more robust against such possibility. In the future we might provide to icmp6_send() the net pointer instead of infering it. Fixes: d66a8acbda92 ("Smack: Inform peer that IPv6 traffic has been blocked") Signed-off-by: Eric Dumazet Cc: Piotr Sawicki Cc: Casey Schaufler Reported-by: syzbot Acked-by: Casey Schaufler Signed-off-by: David S. Miller commit 3271a4821882a64214acc1bd7b173900ec70c9bf Author: Peter Oskolkov Date: Fri Jan 4 09:43:08 2019 -0800 selftests: net: fix/improve ip_defrag selftest Commit ade446403bfb ("net: ipv4: do not handle duplicate fragments as overlapping") changed IPv4 defragmentation so that duplicate fragments, as well as _some_ fragments completely covered by previously delivered fragments, do not lead to the whole frag queue being discarded. This makes the existing ip_defrag selftest flaky. This patch * makes sure that negative IPv4 defrag tests generate truly overlapping fragments that trigger defrag queue drops; * tests that duplicate IPv4 fragments do not trigger defrag queue drops; * makes a couple of minor tweaks to the test aimed at increasing its code coverage and reduce flakiness. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit f87118d5760f00af7228033fbe783c7f380d2866 Author: Daniele Palmas Date: Fri Jan 4 13:26:10 2019 +0100 qmi_wwan: add MTU default to qmap network interface This patch adds MTU default value to qmap network interface in order to avoid "RTNETLINK answers: No buffer space available" error when setting an ipv6 address. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller commit 75e7fb0a87a11c085a58ce583be3f4b1369584e7 Merge: cff1e01f16f84 bb989501abcaf Author: David S. Miller Date: Fri Jan 4 13:33:57 2019 -0800 Merge branch 'hns-fixes' Huazhong Tan says: ==================== net: hns: Bugfixes for HNS driver This patchset includes bugfixes for the HNS ethernet controller driver. Every patch is independent. ==================== Signed-off-by: David S. Miller commit bb989501abcafa0de5f18b0ec0ec459b5b817908 Author: Yonglong Liu Date: Fri Jan 4 20:18:11 2019 +0800 net: hns: Fix use after free identified by SLUB debug When enable SLUB debug, than remove hns_enet_drv module, SLUB debug will identify a use after free bug: [134.189505] Unable to handle kernel paging request at virtual address 006b6b6b6b6b6b6b [134.197553] Mem abort info: [134.200381] ESR = 0x96000004 [134.203487] Exception class = DABT (current EL), IL = 32 bits [134.209497] SET = 0, FnV = 0 [134.212596] EA = 0, S1PTW = 0 [134.215777] Data abort info: [134.218701] ISV = 0, ISS = 0x00000004 [134.222596] CM = 0, WnR = 0 [134.225606] [006b6b6b6b6b6b6b] address between user and kernel address ranges [134.232851] Internal error: Oops: 96000004 [#1] SMP [134.237798] CPU: 21 PID: 27834 Comm: rmmod Kdump: loaded Tainted: G OE 4.19.5-1.2.34.aarch64 #1 [134.247856] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.58 10/24/2018 [134.255181] pstate: 20000005 (nzCv daif -PAN -UAO) [134.260044] pc : hns_ae_put_handle+0x38/0x60 [134.264372] lr : hns_ae_put_handle+0x24/0x60 [134.268700] sp : ffff00001be93c50 [134.272054] x29: ffff00001be93c50 x28: ffff802faaec8040 [134.277442] x27: 0000000000000000 x26: 0000000000000000 [134.282830] x25: 0000000056000000 x24: 0000000000000015 [134.288284] x23: ffff0000096fe098 x22: ffff000001050070 [134.293671] x21: ffff801fb3c044a0 x20: ffff80afb75ec098 [134.303287] x19: ffff80afb75ec098 x18: 0000000000000000 [134.312945] x17: 0000000000000000 x16: 0000000000000000 [134.322517] x15: 0000000000000002 x14: 0000000000000000 [134.332030] x13: dead000000000100 x12: ffff7e02bea3c988 [134.341487] x11: ffff80affbee9e68 x10: 0000000000000000 [134.351033] x9 : 6fffff8000008101 x8 : 0000000000000000 [134.360569] x7 : dead000000000100 x6 : ffff000009579748 [134.370059] x5 : 0000000000210d00 x4 : 0000000000000000 [134.379550] x3 : 0000000000000001 x2 : 0000000000000000 [134.388813] x1 : 6b6b6b6b6b6b6b6b x0 : 0000000000000000 [134.397993] Process rmmod (pid: 27834, stack limit = 0x00000000d474b7fd) [134.408498] Call trace: [134.414611] hns_ae_put_handle+0x38/0x60 [134.422208] hnae_put_handle+0xd4/0x108 [134.429563] hns_nic_dev_remove+0x60/0xc0 [hns_enet_drv] [134.438342] platform_drv_remove+0x2c/0x70 [134.445958] device_release_driver_internal+0x174/0x208 [134.454810] driver_detach+0x70/0xd8 [134.461913] bus_remove_driver+0x64/0xe8 [134.469396] driver_unregister+0x34/0x60 [134.476822] platform_driver_unregister+0x20/0x30 [134.485130] hns_nic_dev_driver_exit+0x14/0x6e4 [hns_enet_drv] [134.494634] __arm64_sys_delete_module+0x238/0x290 struct hnae_handle is a member of struct hnae_vf_cb, so when vf_cb is freed, than use hnae_handle will cause use after free panic. This patch frees vf_cb after hnae_handle used. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c77804be53369dd4c15bfc376cf9b45948194cab Author: Yonglong Liu Date: Fri Jan 4 20:18:10 2019 +0800 net: hns: Fix WARNING when hns modules installed Commit 308c6cafde01 ("net: hns: All ports can not work when insmod hns ko after rmmod.") add phy_stop in hns_nic_init_phy(), In the branch of "net", this method is effective, but in the branch of "net-next", it will cause a WARNING when hns modules loaded, reference to commit 2b3e88ea6528 ("net: phy: improve phy state checking"): [10.092168] ------------[ cut here ]------------ [10.092171] called from state READY [10.092189] WARNING: CPU: 4 PID: 1 at ../drivers/net/phy/phy.c:854 phy_stop+0x90/0xb0 [10.092192] Modules linked in: [10.092197] CPU: 4 PID:1 Comm:swapper/0 Not tainted 4.20.0-rc7-next-20181220 #1 [10.092200] Hardware name: Huawei TaiShan 2280 /D05, BIOS Hisilicon D05 UEFI 16.12 Release 05/15/2017 [10.092202] pstate: 60000005 (nZCv daif -PAN -UAO) [10.092205] pc : phy_stop+0x90/0xb0 [10.092208] lr : phy_stop+0x90/0xb0 [10.092209] sp : ffff00001159ba90 [10.092212] x29: ffff00001159ba90 x28: 0000000000000007 [10.092215] x27: ffff000011180068 x26: ffff0000110a5620 [10.092218] x25: ffff0000113b6000 x24: ffff842f96dac000 [10.092221] x23: 0000000000000000 x22: 0000000000000000 [10.092223] x21: ffff841fb8425e18 x20: ffff801fb3a56438 [10.092226] x19: ffff801fb3a56000 x18: ffffffffffffffff [10.092228] x17: 0000000000000000 x16: 0000000000000000 [10.092231] x15: ffff00001122d6c8 x14: ffff00009159b7b7 [10.092234] x13: ffff00001159b7c5 x12: ffff000011245000 [10.092236] x11: 0000000005f5e0ff x10: ffff00001159b750 [10.092239] x9 : 00000000ffffffd0 x8 : 0000000000000465 [10.092242] x7 : ffff0000112457f8 x6 : ffff0000113bd7ce [10.092245] x5 : 0000000000000000 x4 : 0000000000000000 [10.092247] x3 : 00000000ffffffff x2 : ffff000011245828 [10.092250] x1 : 4b5860bd05871300 x0 : 0000000000000000 [10.092253] Call trace: [10.092255] phy_stop+0x90/0xb0 [10.092260] hns_nic_init_phy+0xf8/0x110 [10.092262] hns_nic_try_get_ae+0x4c/0x3b0 [10.092264] hns_nic_dev_probe+0x1fc/0x480 [10.092268] platform_drv_probe+0x50/0xa0 [10.092271] really_probe+0x1f4/0x298 [10.092273] driver_probe_device+0x58/0x108 [10.092275] __driver_attach+0xdc/0xe0 [10.092278] bus_for_each_dev+0x74/0xc8 [10.092280] driver_attach+0x20/0x28 [10.092283] bus_add_driver+0x1b8/0x228 [10.092285] driver_register+0x60/0x110 [10.092288] __platform_driver_register+0x40/0x48 [10.092292] hns_nic_dev_driver_init+0x18/0x20 [10.092296] do_one_initcall+0x5c/0x180 [10.092299] kernel_init_freeable+0x198/0x240 [10.092303] kernel_init+0x10/0x108 [10.092306] ret_from_fork+0x10/0x18 [10.092308] ---[ end trace 1396dd0278e397eb ]--- This WARNING occurred because of calling phy_stop before phy_start. The root cause of the problem in commit '308c6cafde01' is: Reference to hns_nic_init_phy, the flag phydev->supported is changed after phy_connect_direct. The flag phydev->supported is 0x6ff when hns modules is loaded, so will not change Fiber Port power(Reference to marvell.c), which is power on at default. Then the flag phydev->supported is changed to 0x6f, so Fiber Port power is off when removing hns modules. When hns modules installed again, the flag phydev->supported is default value 0x6ff, so will not change Fiber Port power(now is off), causing mac link not up problem. So the solution is change phy flags before phy_connect_direct. Fixes: 308c6cafde01 ("net: hns: All ports can not work when insmod hns ko after rmmod.") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 59f75fd0e31532bdcf65f754516cac2954d5ddc7 Author: Jens Axboe Date: Fri Jan 4 14:27:09 2019 -0700 Add CREDITS entry for Shaohua Li Signed-off-by: Jens Axboe commit b685a7350ae76bc0f388e24b36d06a63776c68ee Author: Jens Axboe Date: Thu Jan 3 15:29:15 2019 -0800 mm/page_io.c: fix polled swap page in swap_readpage() wants to do polling to bring in pages if asked to, but it doesn't mark the bio as being polled. Additionally, the looping around the blk_poll() check isn't correct - if we get a zero return, we should call io_schedule(), we can't just assume that the bio has completed. The regular bio->bi_private check should be used for that. Link: http://lkml.kernel.org/r/e15243a8-2cdf-c32c-ecee-f289377c8ef9@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Andrew Morton Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d499480cc435ff153bf7e2e7ee6ab6ac44306c28 Author: Jorge Ramirez-Ortiz Date: Thu Jan 3 15:29:12 2019 -0800 checkpatch: add Co-developed-by to signature tags As per Documentation/process/submitting-patches, Co-developed-by is a valid signature. This commit removes the warning. Link: http://lkml.kernel.org/r/1544808928-20002-3-git-send-email-jorge.ramirez-ortiz@linaro.org Signed-off-by: Jorge Ramirez-Ortiz Cc: Greg Kroah-Hartman Cc: Himanshu Jha Cc: Joe Perches Cc: Jonathan Cameron Cc: Jonathan Corbet Cc: Niklas Cassel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae67ee6c5e1d5b6acdb0d51fddde651834096d75 Author: Jorge Ramirez-Ortiz Date: Thu Jan 3 15:29:09 2019 -0800 docs: fix Co-Developed-by docs The accepted terminology will be Co-developed-by therefore lose the capital letter from now on. Link: http://lkml.kernel.org/r/1544808928-20002-2-git-send-email-jorge.ramirez-ortiz@linaro.org Signed-off-by: Jorge Ramirez-Ortiz Acked-by: Himanshu Jha Cc: Jonathan Cameron Cc: Joe Perches Cc: Greg Kroah-Hartman Cc: Niklas Cassel Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 967d3010df8b6f6f9aa95c198edc5fe3646ebf36 Author: Qian Cai Date: Thu Jan 3 15:29:05 2019 -0800 drivers/base/platform.c: kmemleak ignore a known leak unreferenced object 0xffff808ec6dc5a80 (size 128): comm "swapper/0", pid 1, jiffies 4294938063 (age 2560.530s) hex dump (first 32 bytes): ff ff ff ff 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b ........kkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk backtrace: [<00000000476dcf8c>] kmem_cache_alloc_trace+0x430/0x500 [<000000004f708d37>] platform_device_register_full+0xbc/0x1e8 [<000000006c2a7ec7>] acpi_create_platform_device+0x370/0x450 [<00000000ef135642>] acpi_default_enumeration+0x34/0x78 [<000000003bd9a052>] acpi_bus_attach+0x2dc/0x3e0 [<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0 [<000000003cf4f7f2>] acpi_bus_attach+0x108/0x3e0 [<000000002968643e>] acpi_bus_scan+0xb0/0x110 [<0000000010dd0bd7>] acpi_scan_init+0x1a8/0x410 [<00000000965b3c5a>] acpi_init+0x408/0x49c [<00000000ed4b9fe2>] do_one_initcall+0x178/0x7f4 [<00000000a5ac5a74>] kernel_init_freeable+0x9d4/0xa9c [<0000000070ea6c15>] kernel_init+0x18/0x138 [<00000000fb8fff06>] ret_from_fork+0x10/0x1c [<0000000041273a0d>] 0xffffffffffffffff Then, faddr2line pointed out this line, /* * This memory isn't freed when the device is put, * I don't have a nice idea for that though. Conceptually * dma_mask in struct device should not be a pointer. * See http://thread.gmane.org/gmane.linux.kernel.pci/9081 */ pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); Since this leak has existed for more than 8 years and it does not reference other parts of the memory, let kmemleak ignore it, so users don't need to waste time reporting this in the future. Link: http://lkml.kernel.org/r/20181206160751.36211-1-cai@gmx.us Signed-off-by: Qian Cai Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J . Wysocki" Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f86196ea8737c98ea96e5f95c99d0367be39a5d2 Author: Nikolay Borisov Date: Thu Jan 3 15:29:02 2019 -0800 fs: don't open code lru_to_page() Multiple filesystems open code lru_to_page(). Rectify this by moving the macro from mm_inline (which is specific to lru stuff) to the more generic mm.h header and start using the macro where appropriate. No functional changes. Link: http://lkml.kernel.org/r/20181129104810.23361-1-nborisov@suse.com Link: https://lkml.kernel.org/r/20181129075301.29087-1-nborisov@suse.com Signed-off-by: Nikolay Borisov Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Acked-by: Pankaj gupta Acked-by: "Yan, Zheng" [ceph] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08d405c8b845a4b871fa3606c9ebe0d0f3b74614 Author: Davidlohr Bueso Date: Thu Jan 3 15:28:58 2019 -0800 fs/: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. [akpm@linux-foundation.org: fix fs/buffer.c] Link: http://lkml.kernel.org/r/20181116002713.8474-7-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa45f1162f28cbba6c38180647b7b300f317ecb4 Author: Davidlohr Bueso Date: Thu Jan 3 15:28:55 2019 -0800 mm/: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8d7d842e8286a98fb56df9caf5d19b46e01ba4b Author: Davidlohr Bueso Date: Thu Jan 3 15:28:51 2019 -0800 arch/arc/mm/fault.c: remove caller signal_pending_branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34ec35ad8f5f4624e8391dbb83afb4c791f027e3 Author: Davidlohr Bueso Date: Thu Jan 3 15:28:48 2019 -0800 kernel/sched/: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bb5f4ac55dd91d516e7e36b45c94bd57efbb068 Author: Davidlohr Bueso Date: Thu Jan 3 15:28:44 2019 -0800 kernel/locking/mutex.c: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f132f7e145506efc0744426cb338b18a54afc3b Author: Joel Fernandes (Google) Date: Thu Jan 3 15:28:41 2019 -0800 mm: select HAVE_MOVE_PMD on x86 for faster mremap Moving page-tables at the PMD-level on x86 is known to be safe. Enable this option so that we can do fast mremap when possible. Link: http://lkml.kernel.org/r/20181108181201.88826-4-joelaf@google.com Signed-off-by: Joel Fernandes (Google) Suggested-by: Kirill A. Shutemov Acked-by: Kirill A. Shutemov Cc: Julia Lawall Cc: Michal Hocko Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c91bd4a4e2e530582d6fd643ea7b86b27907151 Author: Joel Fernandes (Google) Date: Thu Jan 3 15:28:38 2019 -0800 mm: speed up mremap by 20x on large regions Android needs to mremap large regions of memory during memory management related operations. The mremap system call can be really slow if THP is not enabled. The bottleneck is move_page_tables, which is copying each pte at a time, and can be really slow across a large map. Turning on THP may not be a viable option, and is not for us. This patch speeds up the performance for non-THP system by copying at the PMD level when possible. The speedup is an order of magnitude on x86 (~20x). On a 1GB mremap, the mremap completion times drops from 3.4-3.6 milliseconds to 144-160 microseconds. Before: Total mremap time for 1GB data: 3521942 nanoseconds. Total mremap time for 1GB data: 3449229 nanoseconds. Total mremap time for 1GB data: 3488230 nanoseconds. After: Total mremap time for 1GB data: 150279 nanoseconds. Total mremap time for 1GB data: 144665 nanoseconds. Total mremap time for 1GB data: 158708 nanoseconds. If THP is enabled the optimization is mostly skipped except in certain situations. [joel@joelfernandes.org: fix 'move_normal_pmd' unused function warning] Link: http://lkml.kernel.org/r/20181108224457.GB209347@google.com Link: http://lkml.kernel.org/r/20181108181201.88826-3-joelaf@google.com Signed-off-by: Joel Fernandes (Google) Acked-by: Kirill A. Shutemov Reviewed-by: William Kucharski Cc: Julia Lawall Cc: Michal Hocko Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cf58924951ef80eec636b863e7a53973c44261a Author: Joel Fernandes (Google) Date: Thu Jan 3 15:28:34 2019 -0800 mm: treewide: remove unused address argument from pte_alloc functions Patch series "Add support for fast mremap". This series speeds up the mremap(2) syscall by copying page tables at the PMD level even for non-THP systems. There is concern that the extra 'address' argument that mremap passes to pte_alloc may do something subtle architecture related in the future that may make the scheme not work. Also we find that there is no point in passing the 'address' to pte_alloc since its unused. This patch therefore removes this argument tree-wide resulting in a nice negative diff as well. Also ensuring along the way that the enabled architectures do not do anything funky with the 'address' argument that goes unnoticed by the optimization. Build and boot tested on x86-64. Build tested on arm64. The config enablement patch for arm64 will be posted in the future after more testing. The changes were obtained by applying the following Coccinelle script. (thanks Julia for answering all Coccinelle questions!). Following fix ups were done manually: * Removal of address argument from pte_fragment_alloc * Removal of pte_alloc_one_fast definitions from m68k and microblaze. // Options: --include-headers --no-includes // Note: I split the 'identifier fn' line, so if you are manually // running it, please unsplit it so it runs for you. virtual patch @pte_alloc_func_def depends on patch exists@ identifier E2; identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$"; type T2; @@ fn(... - , T2 E2 ) { ... } @pte_alloc_func_proto_noarg depends on patch exists@ type T1, T2, T3, T4; identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$"; @@ ( - T3 fn(T1, T2); + T3 fn(T1); | - T3 fn(T1, T2, T4); + T3 fn(T1, T2); ) @pte_alloc_func_proto depends on patch exists@ identifier E1, E2, E4; type T1, T2, T3, T4; identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$"; @@ ( - T3 fn(T1 E1, T2 E2); + T3 fn(T1 E1); | - T3 fn(T1 E1, T2 E2, T4 E4); + T3 fn(T1 E1, T2 E2); ) @pte_alloc_func_call depends on patch exists@ expression E2; identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$"; @@ fn(... -, E2 ) @pte_alloc_macro depends on patch exists@ identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$"; identifier a, b, c; expression e; position p; @@ ( - #define fn(a, b, c) e + #define fn(a, b) e | - #define fn(a, b) e + #define fn(a) e ) Link: http://lkml.kernel.org/r/20181108181201.88826-2-joelaf@google.com Signed-off-by: Joel Fernandes (Google) Suggested-by: Kirill A. Shutemov Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Julia Lawall Cc: Kirill A. Shutemov Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff1522bb7d98450c72aea729f0b4147bc9986aed Author: David Engraf Date: Thu Jan 3 15:28:31 2019 -0800 initramfs: cleanup incomplete rootfs Unpacking an external initrd may fail e.g. not enough memory. This leads to an incomplete rootfs because some files might be extracted already. Fixed by cleaning the rootfs so the kernel is not using an incomplete rootfs. Link: http://lkml.kernel.org/r/20181030151805.5519-1-david.engraf@sysgo.com Signed-off-by: David Engraf Cc: Dominik Brodowski Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Arnd Bergmann Cc: Luc Van Oostenryck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b058809bfc8faeb7b7cae047666e23375a060059 Author: Changbin Du Date: Thu Jan 3 15:28:27 2019 -0800 scripts/gdb: fix lx-version string output A bug is present in GDB which causes early string termination when parsing variables. This has been reported [0], but we should ensure that we can support at least basic printing of the core kernel strings. For current gdb version (has been tested with 7.3 and 8.1), 'lx-version' only prints one character. (gdb) lx-version L(gdb) This can be fixed by casting 'linux_banner' as (char *). (gdb) lx-version Linux version 4.19.0-rc1+ (changbin@acer) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21 SMP Sat Sep 1 21:43:30 CST 2018 [0] https://sourceware.org/bugzilla/show_bug.cgi?id=20077 [kbingham@kernel.org: add detail to commit message] Link: http://lkml.kernel.org/r/20181111162035.8356-1-kieran.bingham@ideasonboard.com Fixes: 2d061d999424 ("scripts/gdb: add version command") Signed-off-by: Du Changbin Signed-off-by: Kieran Bingham Acked-by: Jan Kiszka Cc: Jan Kiszka Cc: Jason Wessel Cc: Daniel Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 634724431607f6f46c495dfef801a1c8b44a96d9 Author: Anders Roxell Date: Thu Jan 3 15:28:24 2019 -0800 kernel/kcov.c: mark write_comp_data() as notrace Since __sanitizer_cov_trace_const_cmp4 is marked as notrace, the function called from __sanitizer_cov_trace_const_cmp4 shouldn't be traceable either. ftrace_graph_caller() gets called every time func write_comp_data() gets called if it isn't marked 'notrace'. This is the backtrace from gdb: #0 ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:179 #1 0xffffff8010201920 in ftrace_caller () at ../arch/arm64/kernel/entry-ftrace.S:151 #2 0xffffff8010439714 in write_comp_data (type=5, arg1=0, arg2=0, ip=18446743524224276596) at ../kernel/kcov.c:116 #3 0xffffff8010439894 in __sanitizer_cov_trace_const_cmp4 (arg1=, arg2=) at ../kernel/kcov.c:188 #4 0xffffff8010201874 in prepare_ftrace_return (self_addr=18446743524226602768, parent=0xffffff801014b918, frame_pointer=18446743524223531344) at ./include/generated/atomic-instrumented.h:27 #5 0xffffff801020194c in ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:182 Rework so that write_comp_data() that are called from __sanitizer_cov_trace_*_cmp*() are marked as 'notrace'. Commit 903e8ff86753 ("kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace") missed to mark write_comp_data() as 'notrace'. When that patch was created gcc-7 was used. In lib/Kconfig.debug config KCOV_ENABLE_COMPARISONS depends on $(cc-option,-fsanitize-coverage=trace-cmp) That code path isn't hit with gcc-7. However, it were that with gcc-8. Link: http://lkml.kernel.org/r/20181206143011.23719-1-anders.roxell@linaro.org Signed-off-by: Anders Roxell Signed-off-by: Arnd Bergmann Co-developed-by: Arnd Bergmann Acked-by: Steven Rostedt (VMware) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81c9d43f94870be66146739c6e61df40dc17bb64 Author: Feng Tang Date: Thu Jan 3 15:28:20 2019 -0800 kernel/sysctl: add panic_print into sysctl So that we can also runtime chose to print out the needed system info for panic, other than setting the kernel cmdline. Link: http://lkml.kernel.org/r/1543398842-19295-3-git-send-email-feng.tang@intel.com Signed-off-by: Feng Tang Suggested-by: Steven Rostedt Acked-by: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: John Stultz Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d999bd9392dea7c1a9ac43b8680b22c4425ae4c7 Author: Feng Tang Date: Thu Jan 3 15:28:17 2019 -0800 panic: add options to print system info when panic happens Kernel panic issues are always painful to debug, partially because it's not easy to get enough information of the context when panic happens. And we have ramoops and kdump for that, while this commit tries to provide a easier way to show the system info by adding a cmdline parameter, referring some idea from sysrq handler. Link: http://lkml.kernel.org/r/1543398842-19295-2-git-send-email-feng.tang@intel.com Signed-off-by: Feng Tang Reviewed-by: Kees Cook Acked-by: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: John Stultz Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1877155891020cb26ad4fba45bfee52d8da9951 Author: Tigran Aivazian Date: Thu Jan 3 15:28:14 2019 -0800 bfs: extra sanity checking and static inode bitmap Strengthen validation of BFS superblock against corruption. Make in-core inode bitmap static part of superblock info structure. Print a warning when mounting a BFS filesystem created with "-N 512" option as only 510 files can be created in the root directory. Make the kernel messages more uniform. Update the 'prefix' passed to bfs_dump_imap() to match the current naming of operations. White space and comments cleanup. Link: http://lkml.kernel.org/r/CAK+_RLkFZMduoQF36wZFd3zLi-6ZutWKsydjeHFNdtRvZZEb4w@mail.gmail.com Signed-off-by: Tigran Aivazian Reported-by: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 655c16a8ce9c15842547f40ce23fd148aeccc074 Author: Oleg Nesterov Date: Thu Jan 3 15:28:11 2019 -0800 exec: separate MM_ANONPAGES and RLIMIT_STACK accounting get_arg_page() checks bprm->rlim_stack.rlim_cur and re-calculates the "extra" size for argv/envp pointers every time, this is a bit ugly and even not strictly correct: acct_arg_size() must not account this size. Remove all the rlimit code in get_arg_page(). Instead, add bprm->argmin calculated once at the start of __do_execve_file() and change copy_strings to check bprm->p >= bprm->argmin. The patch adds the new helper, prepare_arg_pages() which initializes bprm->argc/envc and bprm->argmin. [oleg@redhat.com: fix !CONFIG_MMU version of get_arg_page()] Link: http://lkml.kernel.org/r/20181126122307.GA1660@redhat.com [akpm@linux-foundation.org: use max_t] Link: http://lkml.kernel.org/r/20181112160910.GA28440@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Tested-by: Guenter Roeck Cc: "Eric W. Biederman" Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8099b047ecc431518b9bb6bdbba3549bbecdc343 Author: Oleg Nesterov Date: Thu Jan 3 15:28:07 2019 -0800 exec: load_script: don't blindly truncate shebang string load_script() simply truncates bprm->buf and this is very wrong if the length of shebang string exceeds BINPRM_BUF_SIZE-2. This can silently truncate i_arg or (worse) we can execute the wrong binary if buf[2:126] happens to be the valid executable path. Change load_script() to return ENOEXEC if it can't find '\n' or zero in bprm->buf. Note that '\0' can come from either prepare_binprm()->memset() or from kernel_read(), we do not care. Link: http://lkml.kernel.org/r/20181112160931.GA28463@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Kees Cook Acked-by: Michal Hocko Cc: Ben Woodard Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb5bf31722d0805a3f394f7d59f2e8cd07acccb7 Author: Yi Wang Date: Thu Jan 3 15:28:03 2019 -0800 fork: fix some -Wmissing-prototypes warnings We get a warning when building kernel with W=1: kernel/fork.c:167:13: warning: no previous prototype for `arch_release_thread_stack' [-Wmissing-prototypes] kernel/fork.c:779:13: warning: no previous prototype for `fork_init' [-Wmissing-prototypes] Add the missing declaration in head file to fix this. Also, remove arch_release_thread_stack() completely because no arch seems to implement it since bb9d81264 (arch: remove tile port). Link: http://lkml.kernel.org/r/1542170087-23645-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Yi Wang Acked-by: Michal Hocko Acked-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 306790f75ac2fe021a900395255e468807002c42 Author: Carmeli Tamir Date: Thu Jan 3 15:28:00 2019 -0800 fat: new inline functions to determine the FAT variant (32, 16 or 12) This patch introduces 3 new inline functions - is_fat12, is_fat16 and is_fat32, and replaces every occurrence in the code in which the FS variant (whether this is FAT12, FAT16 or FAT32) was previously checked using msdos_sb_info->fat_bits. Link: http://lkml.kernel.org/r/1544990640-11604-4-git-send-email-carmeli.tamir@gmail.com Signed-off-by: Carmeli Tamir Acked-by: OGAWA Hirofumi Reviewed-by: Sergey Senozhatsky Cc: Johannes Thumshirn Cc: Bart Van Assche Cc: Martin K. Petersen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d19dc016187502dda6b8095e44eb46a18e89b2b3 Author: Carmeli Tamir Date: Thu Jan 3 15:27:56 2019 -0800 fat: move MAX_FAT to fat.h and change it to inline function MAX_FAT is useless in msdos_fs.h, since it uses the MSDOS_SB function that is defined in fat.h. So really, this macro can be only called from code that already includes fat.h. Hence, this patch moves it to fat.h, right after MSDOS_SB is defined. I also changed it to an inline function in order to save the double call to MSDOS_SB. This was suggested by joe@perches.com in the previous version. This patch is required for the next in the series, in which the variant (whether this is FAT12, FAT16 or FAT32) checks are replaced with new macros. Link: http://lkml.kernel.org/r/1544990640-11604-3-git-send-email-carmeli.tamir@gmail.com Signed-off-by: Carmeli Tamir Acked-by: OGAWA Hirofumi Reviewed-by: Sergey Senozhatsky Cc: Bart Van Assche Cc: Johannes Thumshirn Cc: Martin K. Petersen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b553337a57cf4f077464292520f4e975ea4cda83 Author: Carmeli Tamir Date: Thu Jan 3 15:27:53 2019 -0800 fat: remove FAT_FIRST_ENT macro The comment edited in this patch was the only reference to the FAT_FIRST_ENT macro, which is not used anymore. Moreover, the commented line of code does not compile with the current code. Since the FAT_FIRST_ENT macro checks the FAT variant in a way that the patch series changes, I removed it, and instead wrote a clear explanation of what was checked. I verified that the changed comment is correct according to Microsoft FAT spec, search for "BPB_Media" in the following references: 1. Microsoft FAT specification 2005 (http://read.pudn.com/downloads77/ebook/294884/FAT32%20Spec%20%28SDA%20Contribution%29.pdf). Search for 'volume label'. 2. Microsoft Extensible Firmware Initiative, FAT32 File System Specification (https://staff.washington.edu/dittrich/misc/fatgen103.pdf). Search for 'volume label'. Link: http://lkml.kernel.org/r/1544990640-11604-2-git-send-email-carmeli.tamir@gmail.com Signed-off-by: Carmeli Tamir Acked-by: OGAWA Hirofumi Reviewed-by: Sergey Senozhatsky Cc: Bart Van Assche Cc: Johannes Thumshirn Cc: Martin K. Petersen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9da22854761a76c45d78aa2ae2b4bbd504b4f171 Author: Carmeli Tamir Date: Thu Jan 3 15:27:49 2019 -0800 include/uapi/linux/msdos_fs.h: use MSDOS_NAME for volume label size The FAT file system volume label file stored in the root directory should match the volume label field in the FAT boot sector. As consequence, the max length of these fields ought to be the same. This patch replaces the magic '11' usef in the struct fat_boot_sector with MSDOS_NAME, which is used in struct msdos_dir_entry. Please check the following references: 1. Microsoft FAT specification 2005 (http://read.pudn.com/downloads77/ebook/294884/FAT32%20Spec%20%28SDA%20Contribution%29.pdf). Search for 'volume label'. 2. Microsoft Extensible Firmware Initiative, FAT32 File System Specification (https://staff.washington.edu/dittrich/misc/fatgen103.pdf). Search for 'volume label'. 3. User space code that creates FAT filesystem sometimes uses MSDOS_NAME for the label, sometimes not. Search for 'if (memcmp(label, NO_NAME, MSDOS_NAME))'. I consider to make the same patch there as well. https://github.com/dosfstools/dosfstools/blob/master/src/mkfs.fat.c Link: http://lkml.kernel.org/r/1543096879-82837-1-git-send-email-carmeli.tamir@gmail.com Signed-off-by: Carmeli Tamir Reviewed-by: Sergey Senozhatsky Reviewed-by: Johannes Thumshirn Acked-by: OGAWA Hirofumi Cc: Jens Axboe Cc: Bart Van Assche Cc: Martin K. Petersen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f93ca1ed9ba09fa54d372ab17649d781384e34f7 Author: Ernesto A. Fernández Date: Thu Jan 3 15:27:46 2019 -0800 hfsplus: return file attributes on statx The immutable, append-only and no-dump attributes can only be retrieved with an ioctl; implement the ->getattr() method to return them on statx. Do not return the inode birthtime yet, because the issue of how best to handle the post-2038 timestamps is still under discussion. This patch is needed to pass xfstests generic/424. Link: http://lkml.kernel.org/r/20181014163558.sxorxlzjqccq2lpw@eaf Signed-off-by: Ernesto A. Fernández Cc: Viacheslav Dubeyko Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5162216b7dab0c07e070b8b7f98891a85047f59 Author: Ian Kent Date: Thu Jan 3 15:27:43 2019 -0800 autofs: add strictexpire mount option Commit 092a53452bb7 ("autofs: take more care to not update last_used on path walk") helped to (partially) resolve a problem where automounts were not expiring due to aggressive accesses from user space. This patch was later reverted because, for very large environments, it meant more mount requests from clients and when there are a lot of clients this caused a fairly significant increase in server load. But there is a need for both types of expire check, depending on use case, so add a mount option to allow for strict update of last use of autofs dentrys (which just means not updating the last use on path walk access). Link: http://lkml.kernel.org/r/154296973880.9889.14085372741514507967.stgit@pluto-themaw-net Signed-off-by: Ian Kent Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d8719a42e4671cfe27733d82b5a071295ab9975 Author: Ian Kent Date: Thu Jan 3 15:27:39 2019 -0800 autofs: change catatonic setting to a bit flag Change the superblock info. catatonic setting to be part of a flags bit field. Link: http://lkml.kernel.org/r/154296973142.9889.17275721668508589639.stgit@pluto-themaw-net Signed-off-by: Ian Kent Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9bf964c9cee40285808ce973be7a266876404501 Author: Ian Kent Date: Thu Jan 3 15:27:36 2019 -0800 autofs: simplify parse_options() function call The parse_options() function uses a long list of parameters, most of which are present in the super block info structure already. The mount parameters set in parse_options() options don't require cleanup so using the super block info struct directly is simpler. Link: http://lkml.kernel.org/r/154296972423.9889.9368859245676473329.stgit@pluto-themaw-net Signed-off-by: Ian Kent Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 55f0d8205dc6399826332c21bc56626868cd453d Author: Ian Kent Date: Thu Jan 3 15:27:33 2019 -0800 autofs: improve ioctl sbi checks Al Viro made some suggestions to improve the implementation of commit 0633da48f0 ("fix autofs_sbi() does not check super block type"). The check is unnecessary in all cases except for ioctl usage so placing the check in the super block accessor function adds a small overhead to the common case where it isn't needed. So it's sufficient to do this in the ioctl code only. Also the check in the ioctl code is needlessly complex. [akpm@linux-foundation.org: declare autofs_fs_type in .h, not .c] Link: http://lkml.kernel.org/r/154296970987.9889.1597442413573683096.stgit@pluto-themaw-net Signed-off-by: Ian Kent Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c8f71935a65a584c48cbe478aaffc52292d6e00 Author: Alexey Dobriyan Date: Thu Jan 3 15:27:29 2019 -0800 init/main.c: make "initcall_level_names[]" const char * Initcall names should not be changed. Link: http://lkml.kernel.org/r/20181124091829.GD10969@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86c051793b4c941ee4481725d57cf2a27f6b3aaf Author: Davidlohr Bueso Date: Thu Jan 3 15:27:26 2019 -0800 fs/epoll: deal with wait_queue only once There is no reason why we rearm the waitiqueue upon every fetch_events retry (for when events are found yet send_events() fails). If nothing else, this saves four lock operations per retry, and furthermore reduces the scope of the lock even further. [akpm@linux-foundation.org: restore code to original position, fix and reflow comment] Link: http://lkml.kernel.org/r/20181114182532.27981-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Jason Baron Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35cff1a6e0236500584a8ae227fe08120d9b5ee2 Author: Davidlohr Bueso Date: Thu Jan 3 15:27:22 2019 -0800 fs/epoll: rename check_events label to send_events It is currently called check_events because it, well, did exactly that. However, since the lockless ep_events_available() call, the label no longer checks, but just sends the events. Rename as such. Link: http://lkml.kernel.org/r/20181114182532.27981-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abc610e01c663e25c41a3bdcbc4115cd7fbb047b Author: Davidlohr Bueso Date: Thu Jan 3 15:27:19 2019 -0800 fs/epoll: avoid barrier after an epoll_wait(2) timeout Upon timeout, we can just exit out of the loop, without the cost of the changing the task's state with an smp_store_mb call. Just exit out of the loop and be done - setting the task state afterwards will be, of course, redundant. [dave@stgolabs.net: forgotten fixlets] Link: http://lkml.kernel.org/r/20181109155258.jxcr4t2pnz6zqct3@linux-r8p5 Link: http://lkml.kernel.org/r/20181108051006.18751-7-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Davidlohr Bueso Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5a282e9635e9c7382821565083db5d260085e3e Author: Davidlohr Bueso Date: Thu Jan 3 15:27:15 2019 -0800 fs/epoll: reduce the scope of wq lock in epoll_wait() This patch aims at reducing ep wq.lock hold times in epoll_wait(2). For the blocking case, there is no need to constantly take and drop the spinlock, which is only needed to manipulate the waitqueue. The call to ep_events_available() is now lockless, and only exposed to benign races. Here, if false positive (returns available events and does not see another thread deleting an epi from the list) we call into send_events and then the list's state is correctly seen. Otoh, if a false negative and we don't see a list_add_tail(), for example, from irq callback, then it is rechecked again before blocking, which will see the correct state. In order for more accuracy to see concurrent list_del_init(), use the list_empty_careful() variant -- of course, this won't be safe against insertions from wakeup. For the overflow list we obviously need to prevent load/store tearing as we don't want to see partial values while the ready list is disabled. [dave@stgolabs.net: forgotten fixlets] Link: http://lkml.kernel.org/r/20181109155258.jxcr4t2pnz6zqct3@linux-r8p5 Link: http://lkml.kernel.org/r/20181108051006.18751-6-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Suggested-by: Jason Baron Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21877e1a5b520132f54515f8835c963056418b4c Author: Davidlohr Bueso Date: Thu Jan 3 15:27:12 2019 -0800 fs/epoll: robustify ep->mtx held checks Insted of just commenting how important it is, lets make it more robust and add a lockdep_assert_held() call. Link: http://lkml.kernel.org/r/20181108051006.18751-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76699a67f3041ff4c7af6d6ee9be2bfbf1ffb671 Author: Davidlohr Bueso Date: Thu Jan 3 15:27:09 2019 -0800 fs/epoll: drop ovflist branch prediction The ep->ovflist is a secondary ready-list to temporarily store events that might occur when doing sproc without holding the ep->wq.lock. This accounts for every time we check for ready events and also send events back to userspace; both callbacks, particularly the latter because of copy_to_user, can account for a non-trivial time. As such, the unlikely() check to see if the pointer is being used, seems both misleading and sub-optimal. In fact, we go to an awful lot of trouble to sync both lists, and populating the ovflist is far from an uncommon scenario. For example, profiling a concurrent epoll_wait(2) benchmark, with CONFIG_PROFILE_ANNOTATED_BRANCHES shows that for a two threads a 33% incorrect rate was seen; and when incrementally increasing the number of epoll instances (which is used, for example for multiple queuing load balancing models), up to a 90% incorrect rate was seen. Similarly, by deleting the prediction, 3% throughput boost was seen across incremental threads. Link: http://lkml.kernel.org/r/20181108051006.18751-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e0982a00564c80cb849a892043450860ef91e14 Author: Davidlohr Bueso Date: Thu Jan 3 15:27:05 2019 -0800 fs/epoll: simplify ep_send_events_proc() ready-list loop The current logic is a bit convoluted. Lets simplify this with a standard list_for_each_entry_safe() loop instead and just break out after maxevents is reached. While at it, remove an unnecessary indentation level in the loop when there are in fact ready events. Link: http://lkml.kernel.org/r/20181108051006.18751-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74bdc129850c32eaddc625ce557da560303fbf25 Author: Davidlohr Bueso Date: Thu Jan 3 15:27:02 2019 -0800 fs/epoll: remove max_nests argument from ep_call_nested() Patch series "epoll: some miscellaneous optimizations". The following are some incremental optimizations on some of the epoll core. Each patch has the details, but together, the series is seen to shave off measurable cycles on a number of systems and workloads. For example, on a 40-core IB, a pipetest as well as parallel epoll_wait() benchmark show around a 20-30% increase in raw operations per second when the box is fully occupied (incremental thread counts), and up to 15% performance improvement with lower counts. Passes ltp epoll related testcases. This patch(of 6): All callers pass the EP_MAX_NESTS constant already, so lets simplify this a tad and get rid of the redundant parameter for nested eventpolls. Link: http://lkml.kernel.org/r/20181108051006.18751-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Cc: Al Viro Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77b8c0a8e47484e205b01dfedcd224770aa9d800 Author: Joe Perches Date: Thu Jan 3 15:26:59 2019 -0800 checkpatch: warn on const char foo[] = "bar"; declarations These declarations should generally be static const to avoid poor compilation and runtime performance where compilers tend to initialize the const declaration for every call instead of using .rodata for the string. Miscellanea: - Convert spaces to tabs for indentation in 2 adjacent checks Link: http://lkml.kernel.org/r/10ea5f4b087dc911e41e187a4a2b5e79c7529aa3.camel@perches.com Signed-off-by: Joe Perches Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05391772a72d49c37e6e4cb8e871be57beb66155 Author: huang.zijiang Date: Thu Jan 3 15:26:55 2019 -0800 drivers/firmware/memmap.c: modify memblock_alloc to memblock_alloc_nopanic memblock_alloc() never returns NULL because panic never returns. Link: http://lkml.kernel.org/r/1545640882-42009-1-git-send-email-huang.zijiang@zte.com.cn Signed-off-by: huang.zijiang Acked-by: Mike Rapoport Cc: Michal Hocko Cc: Stephen Rothwell Cc: Michael Ellerman Cc: Yi Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6862d2fc81859f88c1f3f660886427893f2b4f3f Author: Huang Shijie Date: Thu Jan 3 15:26:51 2019 -0800 lib/genalloc.c: use vzalloc_node() to allocate the bitmap Some devices may have big memory on chip, such as over 1G. In some cases, the nbytes maybe bigger then 4M which is the bounday of the memory buddy system (4K default). So use vzalloc_node() to allocate the bitmap. Also use vfree to free it. Link: http://lkml.kernel.org/r/20181225015701.6289-1-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Reviewed-by: Andrew Morton Cc: Alexey Skidanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 439e00b76a5fb1662e3ae49fc48bd3f950575b9d Author: Yury Norov Date: Thu Jan 3 15:26:48 2019 -0800 lib/find_bit_benchmark.c: align test_find_next_and_bit with others Contrary to other tests, test_find_next_and_bit() test uses tab formatting in output and get_cycles() instead of ktime_get(). get_cycles() is not supported by some arches, so ktime_get() fits better in generic code. Fix it and minor style issues, so the output looks like this: Start testing find_bit() with random-filled bitmap find_next_bit: 7142816 ns, 163282 iterations find_next_zero_bit: 8545712 ns, 164399 iterations find_last_bit: 6332032 ns, 163282 iterations find_first_bit: 20509424 ns, 16606 iterations find_next_and_bit: 4060016 ns, 73424 iterations Start testing find_bit() with sparse bitmap find_next_bit: 55984 ns, 656 iterations find_next_zero_bit: 19197536 ns, 327025 iterations find_last_bit: 65088 ns, 656 iterations find_first_bit: 5923712 ns, 656 iterations find_next_and_bit: 29088 ns, 1 iterations Link: http://lkml.kernel.org/r/20181123174803.10916-1-ynorov@caviumnetworks.com Signed-off-by: Yury Norov Reviewed-by: Andrew Morton Cc: "Norov, Yuri" Cc: Clement Courbet Cc: Geert Uytterhoeven Cc: Alexey Dobriyan Cc: Matthew Wilcox Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 52fbf1134d479234d7e64ba9dcbaea23405f229e Author: Alexey Skidanov Date: Thu Jan 3 15:26:44 2019 -0800 lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk gen_pool_alloc_algo() uses different allocation functions implementing different allocation algorithms. With gen_pool_first_fit_align() allocation function, the returned address should be aligned on the requested boundary. If chunk start address isn't aligned on the requested boundary, the returned address isn't aligned too. The only way to get properly aligned address is to initialize the pool with chunks aligned on the requested boundary. If want to have an ability to allocate buffers aligned on different boundaries (for example, 4K, 1MB, ...), the chunk start address should be aligned on the max possible alignment. This happens because gen_pool_first_fit_align() looks for properly aligned memory block without taking into account the chunk start address alignment. To fix this, we provide chunk start address to gen_pool_first_fit_align() and change its implementation such that it starts looking for properly aligned block with appropriate offset (exactly as is done in CMA). Link: https://lkml.kernel.org/lkml/a170cf65-6884-3592-1de9-4c235888cc8a@intel.com Link: http://lkml.kernel.org/r/1541690953-4623-1-git-send-email-alexey.skidanov@intel.com Signed-off-by: Alexey Skidanov Reviewed-by: Andrew Morton Cc: Logan Gunthorpe Cc: Daniel Mentz Cc: Mathieu Desnoyers Cc: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fc2579e6f162fcff964f5aa01c8a29438ca5c05 Author: Matthew Wilcox Date: Thu Jan 3 15:26:41 2019 -0800 fls: change parameter to unsigned int When testing in userspace, UBSAN pointed out that shifting into the sign bit is undefined behaviour. It doesn't really make sense to ask for the highest set bit of a negative value, so just turn the argument type into an unsigned int. Some architectures (eg ppc) already had it declared as an unsigned int, so I don't expect too many problems. Link: http://lkml.kernel.org/r/20181105221117.31828-1-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Thomas Gleixner Acked-by: Geert Uytterhoeven Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e6310f0fb5cd3f65244dbdef2fb264859891c7ec Author: Alexey Dobriyan Date: Thu Jan 3 15:26:37 2019 -0800 include/linux/printk.h: drop silly "static inline asmlinkage" from dump_stack() Empty function will be inlined so asmlinkage doesn't do anything. Link: http://lkml.kernel.org/r/20181124093530.GE10969@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Acked-by: Joey Pabalinas Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 300133d372b7b541c7e7c5e8d63ea5439f9865b6 Author: Souptick Joarder Date: Thu Jan 3 15:26:34 2019 -0800 drivers/dma-buf/udmabuf.c: convert to use vm_fault_t Use new return type vm_fault_t for fault handler. Link: http://lkml.kernel.org/r/20181106173628.GA12989@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder Cc: Gerd Hoffmann Cc: Sumit Semwal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 304ae42739b108305f8d7b3eb3c1aec7c2b643a9 Author: Tetsuo Handa Date: Thu Jan 3 15:26:31 2019 -0800 kernel/hung_task.c: break RCU locks based on jiffies check_hung_uninterruptible_tasks() is currently calling rcu_lock_break() for every 1024 threads. But check_hung_task() is very slow if printk() was called, and is very fast otherwise. If many threads within some 1024 threads called printk(), the RCU grace period might be extended enough to trigger RCU stall warnings. Therefore, calling rcu_lock_break() for every some fixed jiffies will be safer. Link: http://lkml.kernel.org/r/1544800658-11423-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Paul E. McKenney Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Dmitry Vyukov Cc: "Rafael J. Wysocki" Cc: Vitaly Kuznetsov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 168e06f7937d96c7222037d8a05565e8a6eb00fe Author: Liu, Chuansheng Date: Thu Jan 3 15:26:27 2019 -0800 kernel/hung_task.c: force console verbose before panic Based on commit 401c636a0eeb ("kernel/hung_task.c: show all hung tasks before panic"), we could get the call stack of hung task. However, if the console loglevel is not high, we still can not see the useful panic information in practice, and in most cases users don't set console loglevel to high level. This patch is to force console verbose before system panic, so that the real useful information can be seen in the console, instead of being like the following, which doesn't have hung task information. INFO: task init:1 blocked for more than 120 seconds. Tainted: G U W 4.19.0-quilt-2e5dc0ac-g51b6c21d76cc #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Kernel panic - not syncing: hung_task: blocked tasks CPU: 2 PID: 479 Comm: khungtaskd Tainted: G U W 4.19.0-quilt-2e5dc0ac-g51b6c21d76cc #1 Call Trace: dump_stack+0x4f/0x65 panic+0xde/0x231 watchdog+0x290/0x410 kthread+0x12c/0x150 ret_from_fork+0x35/0x40 reboot: panic mode set: p,w Kernel Offset: 0x34000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Link: http://lkml.kernel.org/r/27240C0AC20F114CBF8149A2696CBE4A6015B675@SHSMSX101.ccr.corp.intel.com Signed-off-by: Chuansheng Liu Reviewed-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 527edbc18a70e745740ef31edb0ffefb2f161afa Author: Masahiro Yamada Date: Thu Jan 3 15:26:23 2019 -0800 build_bug.h: remove most of dummy BUILD_BUG_ON stubs for Sparse The introduction of these dummy BUILD_BUG_ON stubs dates back to commmit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition for sparse"). At that time, BUILD_BUG_ON() was implemented with the negative array trick *and* the link-time trick, like this: extern int __build_bug_on_failed; #define BUILD_BUG_ON(condition) \ do { \ ((void)sizeof(char[1 - 2*!!(condition)])); \ if (condition) __build_bug_on_failed = 1; \ } while(0) Sparse is more strict about the negative array trick than GCC because Sparse requires the array length to be really constant. Here is the simple test code for the macro above: static const int x = 0; BUILD_BUG_ON(x); GCC is absolutely fine with it (-Wvla was enabled only very recently), but Sparse warns like this: error: bad constant expression error: cannot size expression (If you are using a newer version of Sparse, you will see a different warning message, "warning: Variable length array is used".) Anyway, Sparse was producing many false positives, and noisier than it should be at that time. With the previous commit, the leftover negative array trick is gone. Sparse is fine with the current BUILD_BUG_ON(), which is implemented by using the 'error' attribute. I am keeping the stub for BUILD_BUG_ON_ZERO(). Otherwise, Sparse would complain about the following code, which GCC is fine with: static const int x = 0; int y = BUILD_BUG_ON_ZERO(x); Link: http://lkml.kernel.org/r/1542856462-18836-3-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Kees Cook Reviewed-by: Luc Van Oostenryck Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c60d3b79423aab402085c30b33bfff5354a61d8b Author: Masahiro Yamada Date: Thu Jan 3 15:26:20 2019 -0800 build_bug.h: remove negative-array fallback for BUILD_BUG_ON() The kernel can only be compiled with an optimization option (-O2, -Os, or the currently proposed -Og). Hence, __OPTIMIZE__ is always defined in the kernel source. The fallback for the -O0 case is just hypothetical and pointless. Moreover, commit 0bb95f80a38f ("Makefile: Globally enable VLA warning") enabled -Wvla warning. The use of variable length arrays is banned. Link: http://lkml.kernel.org/r/1542856462-18836-2-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Kees Cook Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Cc: Luc Van Oostenryck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fe5dbfef47e992b810cbe82af1df02d8255fb8c Author: Alexey Dobriyan Date: Thu Jan 3 15:26:16 2019 -0800 Documentation/process/coding-style.rst: don't use "extern" with function prototypes `extern' with function prototypes makes lines longer and creates more characters on the screen. Do not bug people with checkpatch.pl warnings for now as fallout can be devastating. Link: http://lkml.kernel.org/r/20181101134153.GA29267@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09be178400829dddc1189b50a7888495dd26aa84 Author: Cheng Lin Date: Thu Jan 3 15:26:13 2019 -0800 proc/sysctl: fix return error for proc_doulongvec_minmax() If the number of input parameters is less than the total parameters, an EINVAL error will be returned. For example, we use proc_doulongvec_minmax to pass up to two parameters with kern_table: { .procname = "monitor_signals", .data = &monitor_sigs, .maxlen = 2*sizeof(unsigned long), .mode = 0644, .proc_handler = proc_doulongvec_minmax, }, Reproduce: When passing two parameters, it's work normal. But passing only one parameter, an error "Invalid argument"(EINVAL) is returned. [root@cl150 ~]# echo 1 2 > /proc/sys/kernel/monitor_signals [root@cl150 ~]# cat /proc/sys/kernel/monitor_signals 1 2 [root@cl150 ~]# echo 3 > /proc/sys/kernel/monitor_signals -bash: echo: write error: Invalid argument [root@cl150 ~]# echo $? 1 [root@cl150 ~]# cat /proc/sys/kernel/monitor_signals 3 2 [root@cl150 ~]# The following is the result after apply this patch. No error is returned when the number of input parameters is less than the total parameters. [root@cl150 ~]# echo 1 2 > /proc/sys/kernel/monitor_signals [root@cl150 ~]# cat /proc/sys/kernel/monitor_signals 1 2 [root@cl150 ~]# echo 3 > /proc/sys/kernel/monitor_signals [root@cl150 ~]# echo $? 0 [root@cl150 ~]# cat /proc/sys/kernel/monitor_signals 3 2 [root@cl150 ~]# There are three processing functions dealing with digital parameters, __do_proc_dointvec/__do_proc_douintvec/__do_proc_doulongvec_minmax. This patch deals with __do_proc_doulongvec_minmax, just as __do_proc_dointvec does, adding a check for parameters 'left'. In __do_proc_douintvec, its code implementation explicitly does not support multiple inputs. static int __do_proc_douintvec(...){ ... /* * Arrays are not supported, keep this simple. *Do not* add * support for them. */ if (vleft != 1) { *lenp = 0; return -EINVAL; } ... } So, just __do_proc_doulongvec_minmax has the problem. And most use of proc_doulongvec_minmax/proc_doulongvec_ms_jiffies_minmax just have one parameter. Link: http://lkml.kernel.org/r/1544081775-15720-1-git-send-email-cheng.lin130@zte.com.cn Signed-off-by: Cheng Lin Acked-by: Luis Chamberlain Reviewed-by: Kees Cook Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afe922c2daae4a8f0101a30658c886c2b6eb2a96 Author: Alexey Dobriyan Date: Thu Jan 3 15:26:09 2019 -0800 fs/proc/base.c: slightly faster /proc/*/limits Header of /proc/*/limits is a fixed string, so print it directly without formatting specifiers. Link: http://lkml.kernel.org/r/20181203164242.GB6904@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 230f72e9f6dc7b22ee92dc03a393429447b4395c Author: Alexey Dobriyan Date: Thu Jan 3 15:26:05 2019 -0800 fs/proc/inode.c: delete unnecessary variable in proc_alloc_inode() Link: http://lkml.kernel.org/r/20181203164015.GA6904@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81966d83492620bf42d94d580370c59ff8d02772 Author: Eric Biggers Date: Thu Jan 3 15:26:00 2019 -0800 fs/proc/util.c: include fs/proc/internal.h for name_to_int() name_to_int() is defined in fs/proc/util.c and declared in fs/proc/internal.h, but the declaration isn't included at the point of the definition. Include the header to enforce that the definition matches the declaration. This addresses a gcc warning when -Wmissing-prototypes is enabled. Link: http://lkml.kernel.org/r/20181115001833.49371-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8da0b4f692c6d90b09c91f271517db746a22ff67 Author: Benjamin Gordon Date: Thu Jan 3 15:25:56 2019 -0800 fs/proc/base.c: use ns_capable instead of capable for timerslack_ns Access to timerslack_ns is controlled by a process having CAP_SYS_NICE in its effective capability set, but the current check looks in the root namespace instead of the process' user namespace. Since a process is allowed to do other activities controlled by CAP_SYS_NICE inside a namespace, it should also be able to adjust timerslack_ns. Link: http://lkml.kernel.org/r/20181030180012.232896-1-bmgordon@google.com Signed-off-by: Benjamin Gordon Acked-by: "Eric W. Biederman" Cc: John Stultz Cc: "Eric W. Biederman" 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: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cff1e01f16f84083e5b4e3a98331ba405fb3fbb5 Author: Linus Walleij Date: Thu Jan 3 22:31:32 2019 +0100 net: dsa: mt7530: Drop unused GPIO include This driver uses GPIO descriptors only, is not used so drop the include. Signed-off-by: Linus Walleij Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 0c06a0919782cbe5f33d0f1411ca059e9bfb8190 Merge: 41e4e2cd75346 44039e00171b0 Author: David S. Miller Date: Fri Jan 4 13:06:07 2019 -0800 Merge branch 'GUE-error-recursion' Stefano Brivio says: ==================== Fix two further potential unbounded recursions in GUE error handlers Patch 1/2 takes care of preventing the issue fixed by commit 11789039da53 ("fou: Prevent unbounded recursion in GUE error handler") also with UDP-Lite payloads -- I just realised this might happen from a syzbot report. Patch 2/2 fixes the issue for both UDP and UDP-Lite on IPv6, which I also forgot to deal with in that same commit. ==================== Signed-off-by: David S. Miller commit 44039e00171b0fe930c07ff7b43e6023eaf1ed31 Author: Stefano Brivio Date: Thu Jan 3 21:43:35 2019 +0100 fou6: Prevent unbounded recursion in GUE error handler I forgot to deal with IPv6 in commit 11789039da53 ("fou: Prevent unbounded recursion in GUE error handler"). Now syzbot reported what might be the same type of issue, caused by gue6_err(), that is, handling exceptions for direct UDP encapsulation in GUE (UDP-in-UDP) leads to unbounded recursion in the GUE exception handler. As it probably doesn't make sense to set up GUE this way, and it's currently not even possible to configure this, skip exception handling for UDP (or UDP-Lite) packets encapsulated in UDP (or UDP-Lite) packets with GUE on IPv6. Reported-by: syzbot+4ad25edc7a33e4ab91e0@syzkaller.appspotmail.com Reported-by: Willem de Bruijn Reported-by: Eric Dumazet Fixes: b8a51b38e4d4 ("fou, fou6: ICMP error handlers for FoU and GUE") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit bc6e019b6ee65ff4ebf3ca272f774cf6c67db669 Author: Stefano Brivio Date: Thu Jan 3 21:43:34 2019 +0100 fou: Prevent unbounded recursion in GUE error handler also with UDP-Lite In commit 11789039da53 ("fou: Prevent unbounded recursion in GUE error handler"), I didn't take care of the case where UDP-Lite is encapsulated into UDP or UDP-Lite with GUE. From a syzbot report about a possibly similar issue with GUE on IPv6, I just realised the same thing might happen with a UDP-Lite inner payload. Also skip exception handling for inner UDP-Lite protocol. Fixes: 11789039da53 ("fou: Prevent unbounded recursion in GUE error handler") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit 41e4e2cd75346667b0c531c07dab05cce5b06d15 Author: Yi-Hung Wei Date: Thu Jan 3 09:51:57 2019 -0800 openvswitch: Fix IPv6 later frags parsing The previous commit fa642f08839b ("openvswitch: Derive IP protocol number for IPv6 later frags") introduces IP protocol number parsing for IPv6 later frags that can mess up the network header length calculation logic, i.e. nh_len < 0. However, the network header length calculation is mainly for deriving the transport layer header in the key extraction process which the later fragment does not apply. Therefore, this commit skips the network header length calculation to fix the issue. Reported-by: Chris Mi Reported-by: Greg Rose Fixes: fa642f08839b ("openvswitch: Derive IP protocol number for IPv6 later frags") Signed-off-by: Yi-Hung Wei Signed-off-by: David S. Miller commit ba3e1847d6471f30241f11069d8f153ed8cb052b Author: Claudiu Beznea Date: Thu Jan 3 14:59:35 2019 +0000 net: macb: remove unnecessary code Commit 653e92a9175e ("net: macb: add support for padding and fcs computation") introduced a bug fixed by commit 899ecaedd155 ("net: ethernet: cadence: fix socket buffer corruption problem"). Code removed in this patch is not reachable at all so remove it. Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation") Cc: Tristram Ha Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit a09b42ba1a5e1cbeb934fd94cb7b5b9018bf15c7 Author: Linus Walleij Date: Thu Jan 3 13:36:43 2019 +0100 net: dsa: microchip: Drop unused GPIO includes This driver does not use the old GPIO includes so drop them. Signed-off-by: Linus Walleij Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit ebdefe4656470870579f1c42fa2e20dcda699263 Merge: f8c468e853792 46721c3d9e273 Author: David S. Miller Date: Fri Jan 4 12:57:31 2019 -0800 Merge branch 'qed-fixes' Denis Bolotin says: ==================== qed: Misc fixes in qed This patch series fixes 2 potential bugs in qed. Please consider applying to net. ==================== Signed-off-by: David S. Miller commit 46721c3d9e273aea880e9ff835b0e1271e1cd2fb Author: Denis Bolotin Date: Thu Jan 3 12:02:40 2019 +0200 qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier Make sure chain element is updated before ringing the doorbell. Signed-off-by: Denis Bolotin Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 2d533a9287f2011632977e87ce2783f4c689c984 Author: Denis Bolotin Date: Thu Jan 3 12:02:39 2019 +0200 qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count In PBL chains with non power of 2 page count, the producer is not at the beginning of the chain when index is 0 after a wrap. Therefore, after the producer index wrap around, page index should be calculated more carefully. Signed-off-by: Denis Bolotin Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 594cc251fdd0d231d342d88b2fdff4bc42fb0690 Author: Linus Torvalds Date: Fri Jan 4 12:56:09 2019 -0800 make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being implied by other operations or similar. Which makes it very hard to verify that the access has actually been range-checked. If you use the unsafe direct user accesses, hardware features (either SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged Access Never - on ARM) do force you to use user_access_begin(). But nothing really forces the range check. By putting the range check into user_access_begin(), we actually force people to do the right thing (tm), and the range check vill be visible near the actual accesses. We have way too long a history of people trying to avoid them. Signed-off-by: Linus Torvalds commit f8c468e8537925e0c4607263f498a1b7c0c8982e Author: David Rientjes Date: Wed Jan 2 13:01:43 2019 -0800 net, skbuff: do not prefer skb allocation fails early Commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") replaced __GFP_REPEAT in alloc_skb_with_frags() with __GFP_RETRY_MAYFAIL when the allocation may directly reclaim. The previous behavior would require reclaim up to 1 << order pages for skb aligned header_len of order > PAGE_ALLOC_COSTLY_ORDER before failing, otherwise the allocations in alloc_skb() would loop in the page allocator looking for memory. __GFP_RETRY_MAYFAIL makes both allocations failable under memory pressure, including for the HEAD allocation. This can cause, among many other things, write() to fail with ENOTCONN during RPC when under memory pressure. These allocations should succeed as they did previous to dcda9b04713c even if it requires calling the oom killer and additional looping in the page allocator to find memory. There is no way to specify the previous behavior of __GFP_REPEAT, but it's unlikely to be necessary since the previous behavior only guaranteed that 1 << order pages would be reclaimed before failing for order > PAGE_ALLOC_COSTLY_ORDER. That reclaim is not guaranteed to be contiguous memory, so repeating for such large orders is usually not beneficial. Removing the setting of __GFP_RETRY_MAYFAIL to restore the previous behavior, specifically not allowing alloc_skb() to fail for small orders and oom kill if necessary rather than allowing RPCs to fail. Fixes: dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") Signed-off-by: David Rientjes Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 8d68100ab4ad92560a16a68b72e068613ac4d573 Author: Wen Yang Date: Thu Jan 3 01:09:53 2019 +0800 soc/fsl/qe: fix err handling of ucc_of_parse_tdm Currently there are some issues with the ucc_of_parse_tdm function: 1, a possible null pointer dereference in ucc_of_parse_tdm, detected by the semantic patch deref_null.cocci, with the following warning: drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is NULL but dereferenced. 2, dev gets modified, so in any case that devm_iounmap() will fail even when the new pdev is valid, because the iomap was done with a different pdev. 3, there is no driver bind with the "fsl,t1040-qe-si" or "fsl,t1040-qe-siram" device. So allocating resources using devm_*() with these devices won't provide a cleanup path for these resources when the caller fails. This patch fixes them. Suggested-by: Li Yang Suggested-by: Christophe LEROY Signed-off-by: Wen Yang Reviewed-by: Peng Hao CC: Julia Lawall CC: Zhao Qiang CC: David S. Miller CC: netdev@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org CC: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 36352991835ce99e46b4441dd0eb6980f9a83e8f Author: Kai-Heng Feng Date: Wed Jan 2 14:45:07 2019 +0800 r8169: Add support for new Realtek Ethernet There are two new Realtek Ethernet devices which are re-branded r8168h. Add the IDs to to support them. Signed-off-by: Kai-Heng Feng Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7c1e8a3817c55d73b27cc29b84075999c8894179 Author: Arthur Gautier Date: Mon Dec 31 02:10:58 2018 +0000 netlink: fixup regression in RTM_GETADDR This commit fixes a regression in AF_INET/RTM_GETADDR and AF_INET6/RTM_GETADDR. Before this commit, the kernel would stop dumping addresses once the first skb was full and end the stream with NLMSG_DONE(-EMSGSIZE). The error shouldn't be sent back to netlink_dump so the callback is kept alive. The userspace is expected to call back with a new empty skb. Changes from V1: - The error is not handled in netlink_dump anymore but rather in inet_dump_ifaddr and inet6_dump_addr directly as suggested by David Ahern. Fixes: d7e38611b81e ("net/ipv4: Put target net when address dump fails due to bad attributes") Fixes: 242afaa6968c ("net/ipv6: Put target net when address dump fails due to bad attributes") Cc: David Ahern Cc: "David S . Miller" Cc: netdev@vger.kernel.org Signed-off-by: Arthur Gautier Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1492623e837fe7ca6296f7f5411328307e242771 Author: Christophe JAILLET Date: Sat Dec 29 17:42:22 2018 +0100 octeontx2-af: Fix a resource leak in an error handling path in 'cgx_probe()' If an error occurs after the call to 'pci_alloc_irq_vectors()', we must call 'pci_free_irq_vectors()' in order to avoid a resource leak. The same sequence is already in place in the corresponding 'cgx_remove()' function. Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit e4f2283cc6ffefbe414317a0d89b602811b577ac Merge: 4addd2640fcae a40612ef0ee1e f91528955d009 Author: Al Viro Date: Fri Jan 4 14:02:59 2019 -0500 Merge branches 'misc.misc' and 'work.iov_iter' into for-linus commit 0b2c8f8b6b0c7530e2866c95862546d0da2057b0 Author: Linus Torvalds Date: Fri Jan 4 10:23:10 2019 -0800 i915: fix missing user_access_end() in page fault exception case When commit fddcd00a49e9 ("drm/i915: Force the slow path after a user-write error") unified the error handling for various user access problems, it didn't do the user_access_end() that is needed for the unsafe_put_user() case. It's not a huge deal: a missed user_access_end() will only mean that SMAP protection isn't active afterwards, and for the error case we'll be returning to user mode soon enough anyway. But it's wrong, and adding the proper user_access_end() is trivial enough (and doing it for the other error cases where it isn't needed doesn't hurt). I noticed it while doing the same prep-work for changing user_access_begin() that precipitated the access_ok() changes in commit 96d4f267e40f ("Remove 'type' argument from access_ok() function"). Fixes: fddcd00a49e9 ("drm/i915: Force the slow path after a user-write error") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: stable@kernel.org # v4.20 Signed-off-by: Linus Torvalds commit 03fa483821c0b4db7c2b1453d3332f397d82313f Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 15:10:00 2019 -0300 perf test shell: Use a fallback to get the pathname in vfs_getname Some kernels, like 4.19.13-300.fc29.x86_64 in fedora 29, fail with the existing probe definition asking for the contents of result->name, working when we ask for the 'filename' variable instead, so add a fallback to that. Now those tests are back working on fedora 29 systems with that kernel: # perf test vfs_getname 65: Use vfs_getname probe to get syscall args filenames : Ok 66: Add vfs_getname probe to get syscall args filenames : Ok 67: Check open filename arg using perf trace + vfs_getname: Ok # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-klt3n0i58dfqttveti09q3fi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4caf4ebfe4cf0ea262eb9e829bb254a6a6d58acc Author: Linus Torvalds Date: Fri Jan 4 09:58:25 2019 -0800 Fix access_ok() fallout for sparc32 and powerpc These two architectures actually had an intentional use of the 'type' argument to access_ok() just to avoid warnings. I had actually noticed the powerpc one, but forgot to then fix it up. And I missed the sparc32 case entirely. This is hopefully all of it. Reported-by: Mathieu Malaterre Reported-by: Guenter Roeck Fixes: 96d4f267e40f ("Remove 'type' argument from access_ok() function") Signed-off-by: Linus Torvalds commit 1f8ce09b36c41a026a37a24b20efa32000892a64 Author: YueHaibing Date: Fri Jan 4 06:03:40 2019 +0000 xen/pvcalls: remove set but not used variable 'intf' Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/pvcalls-back.c: In function 'pvcalls_sk_state_change': drivers/xen/pvcalls-back.c:286:28: warning: variable 'intf' set but not used [-Wunused-but-set-variable] It not used since e6587cdbd732 ("pvcalls-back: set -ENOTCONN in pvcalls_conn_back_read") Signed-off-by: YueHaibing Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit f712a86c1406abf50b0dcff0500c723e2aca050a Author: Arnaldo Carvalho de Melo Date: Thu Jan 3 16:03:46 2019 -0300 perf python: Make sure the python binding output directory is in place Instead of doing an unconditional mkdir, use a dummy Makefile variable to check if the directory is there and if not, create it. This is better than what we had and will help with other python bindings that are in development, like one involved with python backtraces. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-iis6us2nocw3y4uuoon9osd7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 099be748865eece21362aee416c350c0b1ae34df Author: Mattias Jacobsson <2pi@mok.nu> Date: Sat Dec 29 15:17:50 2018 +0100 perf strbuf: Remove redundant va_end() in strbuf_addv() Each call to va_copy() should have one, and only one, corresponding call to va_end(). In strbuf_addv() some code paths result in va_end() getting called multiple times. Remove the superfluous va_end(). Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Sanskriti Sharma Link: http://lkml.kernel.org/r/20181229141750.16945-1-2pi@mok.nu Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end") Signed-off-by: Arnaldo Carvalho de Melo commit 442b4eb3af44906fcbb526d98c314b27f8c9acf3 Author: Ivan Krylov Date: Sun Oct 14 11:18:03 2018 +0300 perf annotate: Pass filename to objdump via execl The symbol__disassemble() function uses shell to launch objdump and filter its output via grep. Passing filenames by interpolating them into the command line via "%s" may lead to problems if said filenames contain special characters. Instead, pass the filename as a command line argument where it is not subject to any kind of interpretation, then use quoted shell interpolation to build the strings we need safely. Signed-off-by: Ivan Krylov Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181014111803.5d83b806@Tarkus Signed-off-by: Arnaldo Carvalho de Melo commit a3366db06bb656cef2e03f30f780d93059bcc594 Author: Jin Yao Date: Fri Jan 4 14:10:30 2019 +0800 perf report: Fix wrong iteration count in --branch-history By calculating the removed loops, we can get the iteration count. But the iteration count could be reported incorrectly, reporting impossibly high counts. That's because previous code uses the number of removed LBR entries for the iteration count. That's not good. Fix this by increasing the iteration count when a loop is detected. When matching the chain, the iteration count would be added up, finally we need to compute the average value when printing out. For example, $ perf report --branch-history --stdio --no-children Before: ---f2 +0 | |--33.62%--f1 +9 (cycles:1) | f1 +0 | main +22 (cycles:1) | main +17 | main +38 (cycles:1) | main +27 | f1 +26 (cycles:1) | f1 +24 | f2 +27 (cycles:7) | f2 +0 | f1 +19 (cycles:1) | f1 +14 | f2 +27 (cycles:11) | f2 +0 | f1 +9 (cycles:1 iter:2968 avg_cycles:3) | f1 +0 | main +22 (cycles:1 iter:2968 avg_cycles:3) | main +17 | main +38 (cycles:1 iter:2968 avg_cycles:3) 2968 is an impossible high iteration count and avg_cycles is too small. After: ---f2 +0 | |--33.62%--f1 +9 (cycles:1) | f1 +0 | main +22 (cycles:1) | main +17 | main +38 (cycles:1) | main +27 | f1 +26 (cycles:1) | f1 +24 | f2 +27 (cycles:7) | f2 +0 | f1 +19 (cycles:1) | f1 +14 | f2 +27 (cycles:11) | f2 +0 | f1 +9 (cycles:1 iter:1 avg_cycles:23) | f1 +0 | main +22 (cycles:1 iter:1 avg_cycles:23) | main +17 | main +38 (cycles:1 iter:1 avg_cycles:23) avg_cycles:23 is the average cycles of this iteration. Fixes: c4ee06251d42 ("perf report: Calculate the average cycles of iterations") Signed-off-by: Jin Yao Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1546582230-17507-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 86c22ab7227f59169f64275875c97ef495668b77 Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 12:13:34 2019 -0300 tools headers x86: Sync asm/cpufeatures.h copy with the kernel sources To get the changes from: a0aea130afeb ("KVM: x86: Add CPUID support for new instruction WBNOINVD") 20c3a2c33e9f ("x86/speculation: Add support for STIBP always-on preferred mode") Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Robert Hoo Cc: Thomas Gleixner Cc: Thomas Lendacky Link: https://lkml.kernel.org/n/tip-aonti3bu9rhnqe5hlawbidcp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8c91fd605e1a66050c9c4dbc3e159a08e8c5f7d4 Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 12:08:31 2019 -0300 tools headers uapi: Sync copy of asm-generic/unistd.h with the kernel sources To get the changes in: b7d624ab4312 asm-generic: unistd.h: fixup broken macro include. 4e21565b7fd4 asm-generic: add kexec_file_load system call to unistd.h With this the 'kexec_file_load' syscall will be added to arm64's syscall table and will appear on the output of 'perf trace' on that platform. This silences this tools/perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Cc: Adrian Hunter Cc: AKASHI Takahiro Cc: Arnd Bergmann Cc: Guo Ren Cc: Jiri Olsa Cc: Namhyung Kim Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-er8j7qhavtdw0kdga3zswynm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 558517c52c87da91a963708fe589044172470653 Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 11:45:03 2019 -0300 tools headers uapi: Sync linux/kvm.h with the kernel sources To get the changes from these csets: 2bc39970e932 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID") 2a31b9db1535 ("kvm: introduce manual dirty log reprotect") That results in these new KVM IOCTLs being supported in 'perf trace' when beautifying the cmd ioctl syscall argument: $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2019-01-04 11:44:23.506605301 -0300 +++ after 2019-01-04 11:44:36.878730583 -0300 @@ -86,6 +86,8 @@ [0xbd] = "HYPERV_EVENTFD", [0xbe] = "GET_NESTED_STATE", [0xbf] = "SET_NESTED_STATE", + [0xc0] = "CLEAR_DIRTY_LOG", + [0xc1] = "GET_SUPPORTED_HV_CPUID", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ At some point we should be able to do something: # perf trace -e ioctl(cmd == KVM_CLEAR_DIRTY_LOG) And have just those ioctls, optionally with callchains, etc. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Vitaly Kuznetsov Link: https://lkml.kernel.org/n/tip-konm3iigl2os6ritt7d2bori@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4001b6a080aaca9a13ea07ae8972b82fdbd9ea6b Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 11:41:42 2019 -0300 tools headers uapi: Sync linux/in.h copy from the kernel sources To get the changes in this cset: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") The macros changed in this cset are not used in tools/, so this is just to silence this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: Dave Taht Cc: David S. Miller Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-smghvyxb3budqd1e70i0ylw1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8858ecb5a28d871b79aa5b4eed45414b553a5b6e Author: Arnaldo Carvalho de Melo Date: Fri Jan 4 11:36:10 2019 -0300 tools headers uapi: Update i915_drm.h To get the changes in these csets: fe841686470d Revert "drm/i915/perf: add a parameter to control the size of OA buffer" cd956bfcd0f5 drm/i915/perf: add a parameter to control the size of OA buffer 4bdafb9ddfa4 drm/i915: Remove i915.enable_ppgtt override Not one of them result in any changes in tools/perf/, this is just to silence this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Adrian Hunter Cc: Chris Wilson Cc: Jiri Olsa Cc: Joonas Lahtinen Cc: Lionel Landwerlin Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-mdw7ta6qz7d2rl77gf00uqe8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 536cdb684d2d5139708d290b9dc124b1420886c1 Author: Jiri Olsa Date: Thu Jan 3 17:13:50 2019 +0100 tools iio: Override CFLAGS assignments So user could specify outside CFLAGS values. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Hartmut Knaack Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190103161350.11446-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 302df34c4e64b9e83ee31cbf508b38b62b428bd6 Author: Jiri Olsa Date: Thu Jan 3 17:13:49 2019 +0100 tools thermal tmon: Use -O3 instead of -O1 if available Using -O3 instead of -O1 if it's supported by compiler. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Brian Norris Cc: Markus Mayer Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zhang Rui Link: http://lkml.kernel.org/r/20190103161350.11446-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6de92920a717ea2b7b45bb3d651b8bb951eab185 Merge: 97b6f89f7269b 07a496de4c7eb Author: Russell King Date: Fri Jan 4 14:34:46 2019 +0000 Merge commit 'smp-hotplug^{/omap2}' into for-linus commit 7e0b44e870cf265bb4a73fd25e0508c7363fcbd6 Author: Will Deacon Date: Thu Jan 3 17:55:12 2019 +0000 arm64: compat: Hook up io_pgetevents() for 32-bit tasks Commit 73aeb2cbcdc9 ("ARM: 8787/1: wire up io_pgetevents syscall") hooked up the io_pgetevents() system call for 32-bit ARM, so we can do the same for the compat wrapper on arm64. Signed-off-by: Will Deacon commit 53290432145a8eb143fe29e06e9c1465d43dc723 Author: Will Deacon Date: Thu Jan 3 18:00:39 2019 +0000 arm64: compat: Don't pull syscall number from regs in arm_compat_syscall The syscall number may have been changed by a tracer, so we should pass the actual number in from the caller instead of pulling it from the saved r7 value directly. Cc: Cc: Pi-Hsun Shih Reviewed-by: Dave Martin Signed-off-by: Will Deacon commit 169113ece0f29ebe884a6cfcf57c1ace04d8a36a Author: Will Deacon Date: Thu Jan 3 17:45:07 2019 +0000 arm64: compat: Avoid sending SIGILL for unallocated syscall numbers The ARM Linux kernel handles the EABI syscall numbers as follows: 0 - NR_SYSCALLS-1 : Invoke syscall via syscall table NR_SYSCALLS - 0xeffff : -ENOSYS (to be allocated in future) 0xf0000 - 0xf07ff : Private syscall or -ENOSYS if not allocated > 0xf07ff : SIGILL Our compat code gets this wrong and ends up sending SIGILL in response to all syscalls greater than NR_SYSCALLS which have a value greater than 0x7ff in the bottom 16 bits. Fix this by defining the end of the ARM private syscall region and checking the syscall number against that directly. Update the comment while we're at it. Cc: Cc: Dave Martin Reported-by: Pi-Hsun Shih Signed-off-by: Will Deacon commit 9966a05c7b80f075f2bc7e48dbb108d3f2927234 Author: Dave Martin Date: Fri Jan 4 13:09:51 2019 +0000 arm64/sve: Disentangle from Currently, provides common definitions for describing SVE context structures that are also used by the ptrace definitions in . For this reason, a #include of was added in ptrace.h, but it this turns out that this can interact badly with userspace code that tries to include ptrace.h on top of the libc headers (which may provide their own shadow definitions for sigcontext.h). To make the headers easier for userspace to consume, this patch bounces the common definitions into an __SVE_* namespace and moves them to a backend header that can be included by the other headers as appropriate. This should allow ptrace.h to be used alongside libc's sigcontext.h (if any) without ill effects. This should make the situation unambiguous: is the header to include for the sigframe-specific definitions, while is the header to include for ptrace-specific definitions. To avoid conflicting with existing usage, remains the canonical way to get the common definitions for SVE_VQ_MIN, sve_vq_from_vl() etc., both in userspace and in the kernel: relying on these being defined as a side effect of including just was never intended to be safe. Signed-off-by: Dave Martin Signed-off-by: Will Deacon commit ee1b465b303591d3a04d403122bbc0d7026520fb Author: Dave Martin Date: Fri Jan 4 13:09:50 2019 +0000 arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition SVE_PT_REGS_OFFSET is supposed to indicate the offset for skipping over the ptrace NT_ARM_SVE header (struct user_sve_header) to the start of the SVE register data proper. However, currently SVE_PT_REGS_OFFSET is defined in terms of struct sve_context, which is wrong: that structure describes the SVE header in the signal frame, not in the ptrace regset. This patch fixes the definition to use the ptrace header structure struct user_sve_header instead. By good fortune, the two structures are the same size anyway, so there is no functional or ABI change. Signed-off-by: Dave Martin Signed-off-by: Will Deacon commit 074400a7be61250d9f0ccec07d5c35ffec4d8d22 Author: Mathieu Malaterre Date: Fri Jan 4 10:27:58 2019 +0100 powerpc: Drop use of 'type' from access_ok() In commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with access_ok()") an attempt was made to remove a warning by referencing the variable `type`. However in commit 96d4f267e40f ("Remove 'type' argument from access_ok() function") the variable `type` has been removed, breaking the build: arch/powerpc/include/asm/uaccess.h:66:32: error: ‘type’ undeclared (first use in this function) This essentially reverts commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with access_ok()") to fix the error. Fixes: 96d4f267e40f ("Remove 'type' argument from access_ok() function") Signed-off-by: Mathieu Malaterre [mpe: Reword change log slightly.] Signed-off-by: Michael Ellerman commit 1690d8bb91e370ab772062b79bd434ce815c4729 Author: Viresh Kumar Date: Fri Jan 4 15:14:33 2019 +0530 cpufreq: scpi/scmi: Fix freeing of dynamic OPPs Since the commit 2a4eb7358aba "OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table()", dynamically created OPP aren't automatically removed anymore by dev_pm_opp_cpumask_remove_table(). This affects the scpi and scmi cpufreq drivers which no longer free OPPs on failures or on invocations of the policy->exit() callback. Create a generic OPP helper dev_pm_opp_remove_all_dynamic() which can be called from these drivers instead of dev_pm_opp_cpumask_remove_table(). In dev_pm_opp_remove_all_dynamic(), we need to make sure that the opp_list isn't getting accessed simultaneously from other parts of the OPP core while the helper is freeing dynamic OPPs, i.e. we can't drop the opp_table->lock while traversing through the OPP list. And to accomplish that, this patch also creates _opp_kref_release_unlocked() which can be called from this new helper with the opp_table lock already held. Cc: 4.20 # v4.20 Reported-by: Valentin Schneider Fixes: 2a4eb7358aba "OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table()" Signed-off-by: Viresh Kumar Tested-by: Valentin Schneider Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit d538d94f0ca86cfedc892cc427169219acb3c2f7 Merge: f460772291f81 96d4f267e40f9 Author: Michael Ellerman Date: Fri Jan 4 22:07:47 2019 +1100 Merge branch 'master' into fixes We have a fix to apply on top of commit 96d4f267e40f ("Remove 'type' argument from access_ok() function"), so merge master to get it. commit 09ad32dc6dc23beb638c48d0a2e5a9eaa8e85c6c Author: Rafael J. Wysocki Date: Thu Jan 3 11:30:07 2019 +0100 cpuidle / Documentation: Update cpuidle MAINTAINERS entry Update the MAINTAINERS entry for cpuidle by making it clear that it is not just drivers and adding a documentation record to it. Signed-off-by: Rafael J. Wysocki commit eb4f5213251833567570df1a09803f895653274d Author: Shaokun Zhang Date: Fri Jan 4 14:21:34 2019 +0800 drivers/perf: hisi: Fixup one DDRC PMU register offset For DDRC PMU, each PMU counter is fixed-purpose. There is a mismatch between perf list and driver definition on rw_chg event. # perf list | grep chg hisi_sccl1_ddrc0/rnk_chg/ [Kernel PMU event] hisi_sccl1_ddrc0/rw_chg/ [Kernel PMU event] But the register offset of rw_chg event is not defined in the driver, meanwhile bnk_chg register offset is mis-defined, let's fixup it. Fixes: 904dcf03f086 ("perf: hisi: Add support for HiSilicon SoC DDRC PMU driver") Cc: stable@vger.kernel.org Cc: John Garry Cc: Will Deacon Cc: Mark Rutland Reported-by: Weijian Huang Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon commit 2f328fea47ac9020ac47c88dd01cd8f93da55bcc Author: Masahiro Yamada Date: Fri Jan 4 09:18:41 2019 +0900 arm64: replace arm64-obj-* in Makefile with obj-* Use the standard obj-$(CONFIG_...) syntex. The behavior is still the same. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon commit 48e638fb68be8fecdca0611beff53a9c947704e3 Author: Christoph Hellwig Date: Tue Jan 1 17:14:39 2019 +0100 dma-mapping: remove a few unused exports Now that the slow path DMA API calls are implemented out of line a few helpers only used by them don't need to be exported anymore. Signed-off-by: Christoph Hellwig commit ed6ccf10f24bdfc1955bc8b976ddedc370fc3869 Author: Christoph Hellwig Date: Wed Dec 26 07:52:13 2018 +0100 dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA This avoids link failures in drivers using the DMA API, when they are compiled for user mode Linux with CONFIG_COMPILE_TEST=y. Fixes: 356da6d0cd ("dma-mapping: bypass indirect calls for dma-direct") Signed-off-by: Christoph Hellwig commit 4788ba5792cc1368ba4867e1488dc168b4fe97b7 Author: Christoph Hellwig Date: Wed Dec 26 07:51:44 2018 +0100 dma-mapping: remove dmam_{declare,release}_coherent_memory These functions have never been used. Signed-off-by: Christoph Hellwig commit d7076f07840851bbe57cb21ba052d6a4a9b1efa9 Author: Christoph Hellwig Date: Tue Dec 25 17:44:19 2018 +0100 dma-mapping: implement dmam_alloc_coherent using dmam_alloc_attrs dmam_alloc_coherent is just the default no-flags case of dmam_alloc_attrs, so take advantage of this similar to the non-managed version. Signed-off-by: Christoph Hellwig commit 2e05ea5cdc1ac55d9ef678ed5ea6c38acf7fd2a3 Author: Christoph Hellwig Date: Tue Dec 25 08:50:35 2018 +0100 dma-mapping: implement dma_map_single_attrs using dma_map_page_attrs And also switch the way we implement the unmap side around to stay consistent. This ensures dma-debug works again because it records which function we used for mapping to ensure it is also used for unmapping, and also reduces further code duplication. Last but not least this also officially allows calling dma_sync_single_* for mappings created using dma_map_page, which is perfectly fine given that the sync calls only take a dma_addr_t, but not a virtual address or struct page. Fixes: 7f0fee242e ("dma-mapping: merge dma_unmap_page_attrs and dma_unmap_single_attrs") Signed-off-by: Christoph Hellwig Tested-by: LABBE Corentin commit 9ddf32a8df9e342371aaf9233d59739a356231e6 Merge: 74136a3d47f51 c75ff001f4fe2 Author: Dave Airlie Date: Fri Jan 4 14:09:12 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-01-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Fixes for v4.21: - Fix null pointer dereference on null state pointer. - Fix leaking damage clip when destroying plane state. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/46c4dbcd-dc23-7b46-fda9-16fe33e6ceef@linux.intel.com commit dc56367cb5dbf9d593e4b12373489df9a7edb72c Author: Steven Rostedt (VMware) Date: Thu Jan 3 22:02:39 2019 -0500 sh: ftrace: Fix missing parenthesis in WARN_ON() Adding a function inside a WARN_ON() didn't close the WARN_ON parathesis. Link: http://lkml.kernel.org/r/201901020958.28Mzbs0O%fengguang.wu@intel.com Cc: linux-sh@vger.kernel.org Cc: Yoshinori Sato Cc: Rich Felker Reported-by: kbuild test robot Fixes: cec8d0e7f06e ("sh: ftrace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack") Signed-off-by: Steven Rostedt (VMware) commit 96d4f267e40f9509e8a66e2b39e8b95655617693 Author: Linus Torvalds Date: Thu Jan 3 18:57:57 2019 -0800 Remove 'type' argument from access_ok() function Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument of the user address range verification function since we got rid of the old racy i386-only code to walk page tables by hand. It existed because the original 80386 would not honor the write protect bit when in kernel mode, so you had to do COW by hand before doing any user access. But we haven't supported that in a long time, and these days the 'type' argument is a purely historical artifact. A discussion about extending 'user_access_begin()' to do the range checking resulted this patch, because there is no way we're going to move the old VERIFY_xyz interface to that model. And it's best done at the end of the merge window when I've done most of my merges, so let's just get this done once and for all. This patch was mostly done with a sed-script, with manual fix-ups for the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form. There were a couple of notable cases: - csky still had the old "verify_area()" name as an alias. - the iter_iov code had magical hardcoded knowledge of the actual values of VERIFY_{READ,WRITE} (not that they mattered, since nothing really used it) - microblaze used the type argument for a debug printout but other than those oddities this should be a total no-op patch. I tried to fix up all architectures, did fairly extensive grepping for access_ok() uses, and the changes are trivial, but I may have missed something. Any missed conversion should be trivially fixable, though. Signed-off-by: Linus Torvalds commit 135143b2cac43d2a1ec73b53033b9473fbbcce6d Merge: 810574ca7e2f9 bf77ae4c98d72 Author: Linus Torvalds Date: Thu Jan 3 14:33:46 2019 -0800 Merge tag 'locks-v4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking bugfix from Jeff Layton: "This is a one-line fix for a bug that syzbot turned up in the new patches to mitigate the thundering herd when a lock is released" * tag 'locks-v4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: fix error in locks_move_blocks() commit 810574ca7e2f95d149023f4ea247d6672f69f9af Merge: 43d86ee8c639d 3e9ad24b0e91c Author: Linus Torvalds Date: Thu Jan 3 13:08:00 2019 -0800 Merge tag 'sound-fix-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Among a few HD-audio fixes, the only significant one is the regression fix on some machines like Dell XPS due to the default binding changes. We ended up reverting the whole since the fix for ASoC HD-audio driver won't be available immediately" * tag 'sound-fix-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Revert DSP detection on legacy HD-audio driver ALSA: hda/tegra: clear pending irq handlers ALSA: hda/realtek: Enable the headset mic auto detection for ASUS laptops commit 43d86ee8c639df750529b4d8f062b328b61c423e Merge: 645ff1e8e704c c5ee066333ebc Author: Linus Torvalds Date: Thu Jan 3 12:53:47 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Several fixes here. Basically split down the line between newly introduced regressions and long existing problems: 1) Double free in tipc_enable_bearer(), from Cong Wang. 2) Many fixes to nf_conncount, from Florian Westphal. 3) op->get_regs_len() can throw an error, check it, from Yunsheng Lin. 4) Need to use GFP_ATOMIC in *_add_hash_mac_address() of fsl/fman driver, from Scott Wood. 5) Inifnite loop in fib_empty_table(), from Yue Haibing. 6) Use after free in ax25_fillin_cb(), from Cong Wang. 7) Fix socket locking in nr_find_socket(), also from Cong Wang. 8) Fix WoL wakeup enable in r8169, from Heiner Kallweit. 9) On 32-bit sock->sk_stamp is not thread-safe, from Deepa Dinamani. 10) Fix ptr_ring wrap during queue swap, from Cong Wang. 11) Missing shutdown callback in hinic driver, from Xue Chaojing. 12) Need to return NULL on error from ip6_neigh_lookup(), from Stefano Brivio. 13) BPF out of bounds speculation fixes from Daniel Borkmann" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits) ipv6: Consider sk_bound_dev_if when binding a socket to an address ipv6: Fix dump of specific table with strict checking bpf: add various test cases to selftests bpf: prevent out of bounds speculation on pointer arithmetic bpf: fix check_map_access smin_value test when pointer contains offset bpf: restrict unknown scalars of mixed signed bounds for unprivileged bpf: restrict stack pointer arithmetic for unprivileged bpf: restrict map value pointer arithmetic for unprivileged bpf: enable access to ax register also from verifier rewrite bpf: move tmp variable into ax register in interpreter bpf: move {prev_,}insn_idx into verifier env isdn: fix kernel-infoleak in capi_unlocked_ioctl ipv6: route: Fix return value of ip6_neigh_lookup() on neigh_create() error net/hamradio/6pack: use mod_timer() to rearm timers net-next/hinic:add shutdown callback net: hns3: call hns3_nic_net_open() while doing HNAE3_UP_CLIENT ip: validate header length on virtual device xmit tap: call skb_probe_transport_header after setting skb->dev ptr_ring: wrap back ->producer in __ptr_ring_swap_queue() net: rds: remove unnecessary NULL check ... commit d5c7076b772ad7dcdb92303397b36aee8fa0d25d Author: Steve French Date: Thu Jan 3 02:37:21 2019 -0600 smb3: add smb3.1.1 to default dialect list SMB3.1.1 dialect has additional security (among other) features and should be requested when mounting to modern servers so it can be used if the server supports it. Add SMB3.1.1 to the default list of dialects requested. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit cdd6a4a0e2ec590c30ad0e965fa08bf37461cadb Author: Enric Balletbo i Serra Date: Mon Dec 17 10:54:09 2018 +0100 MAINTAINERS: add maintainers for ChromeOS EC sub-drivers There are multiple ChromeOS EC sub-drivers spread in different subsystems, as all of them are related to the Chrome stuff add Benson and myself as a maintainers for all these sub-drivers. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung Acked-by: Wolfram Sang Acked-by: Chanwoo Choi Acked-by: Jonathan Cameron Acked-by: Alexandre Belloni Acked-by: Lee Jones Acked-by: Sebastian Reichel Acked-by: Guenter Roeck commit 4d5a91fd1f42a821d14b92b082b8e71be9911ba5 Author: Wei Yongjun Date: Thu Jan 3 07:02:30 2019 +0000 hwspinlock: fix return value check in stm32_hwspinlock_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(). Fixes: f24fcff1d267 ("hwspinlock: add STM32 hwspinlock device") Acked-by: Benjamin Gaignard Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Andersson commit 81482d13f37b1c9354d9bf5491699d993b193246 Author: Parthiban Nallathambi Date: Tue Dec 11 09:04:47 2018 +0100 i2c: Add Actions Semiconductor Owl family S700 I2C support Add S700 to the list of devices supported by Owl I2C driver. Add Actions Semiconductor Owl family S700 I2C driver. Signed-off-by: Parthiban Nallathambi Reviewed-by: Manivannan Sadhasivam Signed-off-by: Wolfram Sang commit 78c0c25a8c08d76d12dd682de259f303baf25770 Author: Parthiban Nallathambi Date: Tue Dec 11 09:04:45 2018 +0100 dt-bindings: i2c: Add S700 support for Actions Semi Soc's Add s700 compatible string to Actions Semi SoC dt-bindings. Signed-off-by: Parthiban Nallathambi Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 5cda2d86de3ef7c926e441481c8e46ae3d1943cf Author: Jarkko Nikula Date: Wed Dec 19 09:01:58 2018 +0200 i2c: ismt: Add support for Intel Cedar Fork Add PCI ID for the Intel Cedar Fork iSMT SMBus controller. Signed-off-by: Jarkko Nikula Acked-by: Neil Horman [wsa: kept sorting] Signed-off-by: Wolfram Sang commit 805e4c8b61bd62f6d3f416c915cb9bb423835fee Author: Arnaldo Carvalho de Melo Date: Thu Jan 3 14:59:11 2019 -0300 tools beauty: Make the prctl option table generator catch all PR_ options In ba8308856564 ("arm64: add prctl control for resetting ptrauth keys") the PR_PAC_RESET_KEYS prctl option was introduced, get that into the regex in addition to PR_GET_* and PR_SET_*: So just get everything that matches '^#define PR_\w+' this ends up adding these entries: $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after --- before 2019-01-03 14:58:51.541807353 -0300 +++ after 2019-01-03 15:17:05.909583804 -0300 @@ -19,12 +19,18 @@ [20] = "SET_ENDIAN", [21] = "GET_SECCOMP", [22] = "SET_SECCOMP", + [23] = "CAPBSET_READ", + [24] = "CAPBSET_DROP", [25] = "GET_TSC", [26] = "SET_TSC", [27] = "GET_SECUREBITS", [28] = "SET_SECUREBITS", [29] = "SET_TIMERSLACK", [30] = "GET_TIMERSLACK", + [31] = "TASK_PERF_EVENTS_DISABLE", + [32] = "TASK_PERF_EVENTS_ENABLE", + [33] = "MCE_KILL", + [34] = "MCE_KILL_GET", [35] = "SET_MM", [36] = "SET_CHILD_SUBREAPER", [37] = "GET_CHILD_SUBREAPER", @@ -33,8 +39,13 @@ [40] = "GET_TID_ADDRESS", [41] = "SET_THP_DISABLE", [42] = "GET_THP_DISABLE", + [43] = "MPX_ENABLE_MANAGEMENT", + [44] = "MPX_DISABLE_MANAGEMENT", [45] = "SET_FP_MODE", [46] = "GET_FP_MODE", + [47] = "CAP_AMBIENT", + [50] = "SVE_SET_VL", + [51] = "SVE_GET_VL", [52] = "GET_SPECULATION_CTRL", [53] = "SET_SPECULATION_CTRL", [54] = "PAC_RESET_KEYS", $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Kristina Martsenko Cc: Namhyung Kim Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-sg2pkmtjr5988bhbcp4yp6sw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c8a43c18a97845e7f94ed7d181c11f41964976a2 Author: Yueyi Li Date: Mon Dec 24 07:40:07 2018 +0000 arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region When KASLR is enabled (CONFIG_RANDOMIZE_BASE=y), the top 4K of kernel virtual address space may be mapped to physical addresses despite being reserved for ERR_PTR values. Fix the randomization of the linear region so that we avoid mapping the last page of the virtual address space. Cc: Ard Biesheuvel Signed-off-by: liyueyi [will: rewrote commit message; merged in suggestion from Ard] Signed-off-by: Will Deacon commit acafce48b07bf5f9994a38e7fe237193d43d092e Author: James Morse Date: Fri Dec 21 19:25:19 2018 +0000 firmware: arm_sdei: Fix DT platform device creation It turns out the dt-probing part of this wasn't tested properly after it was merged. commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()") changed the core-code to generate the platform devices, meaning the driver's attempt fails, and it bails out. Fix this by removing the manual platform-device creation for DT systems, core code has always done this for us. CC: Nicolas Saenz Julienne Signed-off-by: James Morse Signed-off-by: Will Deacon commit c3790b3799f8d75d93d26f6fd7bb569fc8c8b0cb Author: Nicolas Saenz Julienne Date: Fri Dec 21 19:25:18 2018 +0000 firmware: arm_sdei: fix wrong of_node_put() in init function After finding a "firmware" dt node arm_sdei tries to match it's compatible string with it. To do so it's calling of_find_matching_node() which already takes care of decreasing the refcount on the "firmware" node. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Signed-off-by: Nicolas Saenz Julienne Signed-off-by: James Morse Signed-off-by: Will Deacon commit 8c2c596f8f453ffa6ef3bf14abc48a86b5431e56 Author: Mark Rutland Date: Thu Jan 3 13:23:10 2019 +0000 arm64: entry: remove unused register aliases In commit: 3b7142752e4bee15 ("arm64: convert native/compat syscall entry to C") ... we moved the syscall invocation code from assembly to C, but left behind a number of register aliases which are now unused. Let's remove them before they confuse someone. Cc: Catalin Marinas Reviewed-by: Dave Martin Signed-off-by: Mark Rutland Signed-off-by: Will Deacon commit 3d32c4531958c433a6ee087f31891cb02d6b68d9 Author: Arnaldo Carvalho de Melo Date: Thu Jan 3 14:56:20 2019 -0300 tools headers uapi: Sync prctl.h with the kernel sources To get the changes in ba8308856564 ("arm64: add prctl control for resetting ptrauth keys"), that introduce a prctl with a name that needs to be catch by the prctl cmd table generator, which will be done in the next cset. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Kristina Martsenko Cc: Namhyung Kim Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-a1pahzc8lci0ey1fjvv1chdm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit abc856259a6dc513868ad91e00a70379825d59c4 Author: Likun Gao Date: Wed Jan 2 12:20:12 2019 +0800 drm/amdgpu: make gfx9 enter into rlc safe mode when set MGCG MGCG should RLC enter into safe mode first. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 96d8f63c44e5d4db48d98c40bb74d0a0e47ae301 Author: Kent Russell Date: Thu Jan 3 08:33:15 2019 -0500 drm/amdgpu: Cleanup 2 compiler warnings These 2 variables are unused now, so remove their references. Fixes: e4ae0fc drm/amdgpu: implement gfx8 post_soft_reset Fixes: 5e01c09 drm/amdgpu/gfx_v8_0: Reorder the gfx, kiq and kcq rings test sequence Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 94f45df8aaa35471ab3fc802c2cf1b75c8107500 Author: Arnaldo Carvalho de Melo Date: Thu Jan 3 13:53:59 2019 -0300 tools headers x86: Sync disabled-features.h To silence the following tools/perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Picking up the changes in dae0a1059300 ("x86/cpufeatures, x86/fault: Mark SMAP as disabled when configured out") that didn't entail any functionality change in the tooling side. Cc: Adrian Hunter Cc: Andy Lutomirski Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-vvge5xh6ii12oszexqknbgwp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 93fb7f19985a08bbe3b76da0b35e97b6e472e4a5 Author: Otto Sabart Date: Wed Jan 2 21:01:21 2019 +0100 doc: filesystems: fix bad references to nonexistent ext4.rst file The ext4.rst file does not exist anymore. This patch changes all references to point to the whole ext4 directory. Fixes: d3091215921b ("docs: move ext4 administrative docs to admin-guide/") Signed-off-by: Otto Sabart Signed-off-by: Jonathan Corbet commit 2d457d5506f88b3f6e63577387203f68fce472a9 Author: Ramunas Geciauskas Date: Sat Dec 29 16:00:00 2018 -0500 Documentation/admin-guide: update URL of LKML information link Information regarding linux-kernel mailing list is no longer hosted on tux.org Update the link to point to the one available at kernel.org Signed-off-by: Ramunas Geciauskas Signed-off-by: Jonathan Corbet commit caaf3c83d2842c859d141711806d949f71c5f241 Author: Marcos Paulo de Souza Date: Tue Jan 1 22:40:14 2019 -0200 Docs/kernel-api.rst: Remove blk-tag.c reference After 7ca01926463a, legacy rq tagging was removed, so block/blk-tag.c does not exists anymore. When generating pdfdocs, sphinx complains about this missing file: Error: Cannot open file ./block/blk-tag.c Error: Cannot open file ./block/blk-tag.c Error: Cannot open file ./block/blk-tag.c Error: Cannot open file ./block/blk-tag.c So remove blk-tag.c traces from kernel-api.rst file to silence these warnings. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Jonathan Corbet commit 24ef9ec891c761483c5270528781b8637b908eef Author: Stephen Rothwell Date: Mon Dec 17 10:57:15 2018 +1100 thermal/intel: fixup for Kconfig string parsing tightening up Signed-off-by: Stephen Rothwell commit 43bfeb45109ad154df4dde67d3d04a8876a3bfc1 Author: Ming Lei Date: Thu Jan 3 09:19:48 2019 +0800 block: sunvdc: don't run hw queue synchronously from irq context vdc_blk_queue_start() may be called from irq context, so we can't run queue via blk_mq_start_hw_queues() since we never allow to run queue from irq context. Use blk_mq_start_stopped_hw_queues(q, true) to fix this issue. Fixes: fa182a1fa97dff56cd ("sunvdc: convert to blk-mq") Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev Cc: Anatoly Pugachev Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit dc629c211c65ee5c8f1c4976886d4a5f33f50674 Merge: 645ff1e8e704c e820d55cb99dd Author: Jens Axboe Date: Thu Jan 3 08:21:02 2019 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md into for-linus Pull the pending 4.21 changes for md from Shaohua. * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md: fix raid10 hang issue caused by barrier raid10: refactor common wait code from regular read/write request md: remvoe redundant condition check lib/raid6: add option to skip algo benchmarking lib/raid6: sort algos in rough performance order lib/raid6: check for assembler SSSE3 support lib/raid6: avoid __attribute_const__ redefinition lib/raid6: add missing include for raid6test md: remove set but not used variable 'bi_rdev' commit 1236cd2bad8bc9038af90830cf017c770fdba03c Author: Shaokun Zhang Date: Sat Dec 29 09:43:17 2018 +0800 arm64: smp: Fix compilation error For arm64: updates for 4.21, there is a compilation error: arch/arm64/kernel/head.S: Assembler messages: arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: missing ')' arch/arm64/kernel/head.S:824: Error: unexpected characters following instruction at operand 2 -- `mov x2,#(2)|(2U<<(8))' scripts/Makefile.build:391: recipe for target 'arch/arm64/kernel/head.o' failed make[1]: *** [arch/arm64/kernel/head.o] Error 1 GCC version is gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 Let's fix it using the UL() macro. Fixes: 66f16a24512f ("arm64: smp: Rework early feature mismatched detection") Cc: Catalin Marinas Cc: Will Deacon Tested-by: John Stultz Signed-off-by: Shaokun Zhang [will: consistent use of UL() for all shifts in asm constants] Signed-off-by: Will Deacon commit 8a99255a50c0b4c2a449b96fd8d45fcc8d72c701 Author: Jin Yao Date: Thu Jan 3 15:40:45 2019 +0800 perf stat: Fix endless wait for child process We hit a 'perf stat' issue by using following script: #!/bin/bash sleep 1000 & exec perf stat -a -e cycles -I1000 -- sleep 5 Since "perf stat" is launched by exec, the "sleep 1000" would be the child process of "perf stat". The wait4() call will not return because it's waiting for the child process "sleep 1000" to end. So 'perf stat' doesn't return even after 5s passes. This patch lets 'perf stat' return when the specified child process ends (in this case, the specified child process is "sleep 5"). Committer testing: # cat test.sh #!/bin/bash sleep 10 & exec perf stat -a -e cycles -I1000 -- sleep 5 # Before: # time ./test.sh # time counts unit events 1.001113090 108,453,351 cycles 2.002062196 142,075,435 cycles 3.002896194 164,801,068 cycles 4.003731666 107,062,140 cycles 5.002068867 112,241,832 cycles real 0m10.066s user 0m0.016s sys 0m0.101s # After: # time ./test.sh # time counts unit events 1.001016096 91,412,027 cycles 2.002014963 124,063,708 cycles 3.002883964 125,993,929 cycles 4.003706470 120,465,734 cycles 5.002006778 163,560,355 cycles real 0m5.123s user 0m0.014s sys 0m0.105s # Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1546501245-4512-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2573be22e5b6f24a0cabc97715c808c47e29eaaf Merge: 6d101ba6be2a2 b25756df5b28c Author: Ingo Molnar Date: Thu Jan 3 14:05:16 2019 +0100 Merge tag 'perf-core-for-mingo-4.21-20190103' 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: perf c2c: Jiri Olsa: - Change the default coalesce setup to from '--coalesce pid,iaddr' to just '--coalesce iaddr'. - Increase the HITM ratio limit for displayed cachelines. perf script: Andi Kleen: - Fix LBR skid dump problems in brstackinsn. perf trace: Arnaldo Carvalho de Melo: - Check if the raw_syscalls:sys_{enter,exit} are setup before setting tp filter. - Do not hardcode the size of the tracepoint common_ fields. - Beautify USBDEFFS_ ioctl commands. Colin Ian King: - Use correct SECCOMP prefix spelling, "SECOMP_*" -> "SECCOMP_*". perf python: Jiri Olsa: - Do not force closing original perf descriptor in evlist.get_pollfd(). tools misc: Jiri Olsa: - Allow overriding CFLAGS and LDFLAGS. perf build: Stanislav Fomichev: - Don't unconditionally link the libbfd feature test to -liberty and -lz thread-stack: Adrian Hunter: - Fix processing for the idle task, having a stack per cpu. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit bd8879faafe6d057237461c4d58d8b0d37b9e3ee Merge: f8f807441eefd 8c32d47b151b6 0e1f37d120ec3 7f5592742a429 aeed35faee526 31a8b3ee16e30 16767229940fb 74fbc7d371d9a Author: Jiri Kosina Date: Thu Jan 3 12:50:28 2019 +0100 Merge branches 'for-4.20/upstream-fixes', 'for-4.21/core', 'for-4.21/hid-asus', 'for-4.21/hid-core', 'for-4.21/hid-cougar', 'for-4.21/hidraw', 'for-4.21/highres-wheel' and 'for-4.21/ish' into for-linus commit b9ced18acf68dffebe6888c7ec765a2b1db7a039 Author: Chao Fan Date: Wed Dec 26 11:34:50 2018 +0800 ACPI: NUMA: Use correct type for printing addresses on i386-PAE The addresses of NUMA nodes are not printed correctly on i386-PAE which is misleading. Here is a debian9-32bit with PAE in a QEMU guest having more than 4G of memory: qemu-system-i386 \ -hda /var/lib/libvirt/images/debian32.qcow2 \ -m 5G \ -enable-kvm \ -smp 10 \ -numa node,mem=512M,nodeid=0,cpus=0 \ -numa node,mem=512M,nodeid=1,cpus=1 \ -numa node,mem=512M,nodeid=2,cpus=2 \ -numa node,mem=512M,nodeid=3,cpus=3 \ -numa node,mem=512M,nodeid=4,cpus=4 \ -numa node,mem=512M,nodeid=5,cpus=5 \ -numa node,mem=512M,nodeid=6,cpus=6 \ -numa node,mem=512M,nodeid=7,cpus=7 \ -numa node,mem=512M,nodeid=8,cpus=8 \ -numa node,mem=512M,nodeid=9,cpus=9 \ -serial stdio Because of the wrong value type, it prints as below: [ 0.021049] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled [ 0.021740] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled [ 0.022425] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled [ 0.023092] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled [ 0.023764] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled [ 0.024431] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled [ 0.025104] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled [ 0.025791] ACPI: SRAT Memory (0x0 length 0x20000000) in proximity domain 6 enabled [ 0.026412] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 7 enabled [ 0.027118] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 8 enabled [ 0.027802] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 9 enabled The upper half of the start address of the NUMA domains between 6 and 9 inclusive was cut, so the printed values are incorrect. Fix the value type, to get the correct values in the log as follows: [ 0.023698] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled [ 0.024325] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled [ 0.024981] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled [ 0.025659] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled [ 0.026317] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled [ 0.026980] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled [ 0.027635] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled [ 0.028311] ACPI: SRAT Memory (0x100000000 length 0x20000000) in proximity domain 6 enabled [ 0.028985] ACPI: SRAT Memory (0x120000000 length 0x20000000) in proximity domain 7 enabled [ 0.029667] ACPI: SRAT Memory (0x140000000 length 0x20000000) in proximity domain 8 enabled [ 0.030334] ACPI: SRAT Memory (0x160000000 length 0x20000000) in proximity domain 9 enabled Signed-off-by: Chao Fan [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit f8f807441eefddc3c6d8a378421f0ede6361d565 Author: Hans de Goede Date: Wed Dec 26 15:31:56 2018 +0100 HID: i2c-hid: Add Odys Winbook 13 to descriptor override The Odys Winbook 13 uses a SIPODEV SP1064 touchpad, which does not supply descriptors, add this to the DMI descriptor override list, fixing the touchpad not working. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1526312 Reported-by: Rene Wagner Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 6ae16dfb61bce538d48b7fe98160fada446056c5 Author: Aditya Pakki Date: Mon Dec 24 15:39:14 2018 -0600 HID: lenovo: Add checks to fix of_led_classdev_register In lenovo_probe_tpkbd(), the function of_led_classdev_register() could return an error value that is unchecked. The fix adds these checks. Signed-off-by: Aditya Pakki Signed-off-by: Jiri Kosina commit 088d923a11e683af28ad9cea9b66782fff588495 Author: Rafael J. Wysocki Date: Wed Jan 2 12:13:52 2019 +0100 cpufreq / Documentation: Update cpufreq MAINTAINERS entry Update the MAINTAINERS entry for cpufreq by making it clear that it is not just drivers and adding current documentation records to it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 3f2d347e851ef4464dea49504cde85e5eef67b2d Author: Beomho Seo Date: Fri Dec 21 15:32:28 2018 +0100 mfd: exynos-lpass: Enable UART module support This patch enables proper interrupts routing between UART module in Exynos Audio SubSystem and the rest of the SoC. This routing is completely transparent for UART device and CPU/GIC. UART driver requests interrupts from the respective controller and enables/masks/handles it by itself via standard methods. There are boards (for example TM2), which use UART module in Exynos Audio SubStem for communication with BlueTooth chip. Signed-off-by: Beomho Seo [mszyprow: rephrased commit message, added UART reset] Signed-off-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Lee Jones commit 9e28989d41c0eab57ec0bb156617a8757406ff8a Author: Kangjie Lu Date: Thu Dec 20 15:12:11 2018 -0600 mfd: mc13xxx: Fix a missing check of a register-read failure When mc13xxx_reg_read() fails, "old_adc0" is uninitialized and will contain random value. Further execution uses "old_adc0" even when mc13xxx_reg_read() fails. The fix checks the return value of mc13xxx_reg_read(), and exits the execution when it fails. Signed-off-by: Kangjie Lu Signed-off-by: Lee Jones commit c1f3375be60c562e24460d41b75e564c0a429835 Author: Cheng-Yi Chiang Date: Tue Dec 18 17:06:26 2018 +0800 mfd: cros_ec: Add commands to control codec Add EC host commands to control codec on EC. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Lee Jones commit 4bcb83e055033592e8672a8deb7b209eed936e11 Author: Richard Fitzgerald Date: Fri Dec 14 14:39:14 2018 +0000 mfd: madera: Remove spurious semicolon in while loop Coccinelle warning of a spurious semicolon on the closing brace of a while loop. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit f7b1e49c670370eeb21e0d7feb7eaa2468ad7ae2 Author: Yangtao Li Date: Sat Dec 15 03:29:18 2018 -0500 mfd: rave-sp: Fix typo in rave_sp_checksum comment Caculated -> Calculated Signed-off-by: Yangtao Li Signed-off-by: Lee Jones commit ddf5aaa8eecb6ccf51f311a513c3a5011fbe0d54 Author: Paul Cercueil Date: Sun Dec 16 15:10:44 2018 +0100 mfd: ingenic-tcu: Fix bit field description in header The description of the bit was inverted. Signed-off-by: Paul Cercueil Signed-off-by: Lee Jones commit 75d4c5e03c2ae9902ab521024b10291f6fc9515b Author: Keerthy Date: Sun Dec 9 19:29:31 2018 +0530 mfd: tps65218: Use devm_regmap_add_irq_chip and clean up error path in probe() Use devm_regmap_add_irq_chip and clean up error path in probe and also the remove function. Reported-by: Christian Hohnstaedt Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Signed-off-by: Lee Jones commit 38df91cc0b82d053234accf4429eafd2f5a4d401 Author: Rob Herring Date: Wed Dec 5 13:50:31 2018 -0600 mfd: Use of_node_name_eq() for node name comparisons Convert string compares of DT node names to use of_node_name_eq() helper instead. This removes direct access to the node name pointer. Signed-off-by: Rob Herring Signed-off-by: Lee Jones commit 18e294ddafaeb80a1e2e10c9bd750a6cb8388d5b Author: Enric Balletbo i Serra Date: Mon Dec 10 19:00:02 2018 +0100 mfd: cros_ec_dev: Add missing mfd_remove_devices() call in remove The driver adds different MFD child devices via mfd_add_devices() and hence it is required to call mfd_remove_devices() to remove MFD child devices. Fixes: 5e0115581bbc ("cros_ec: Move cros_ec_dev module to drivers/mfd") Signed-off-by: Enric Balletbo i Serra Signed-off-by: Lee Jones commit ea90e7b47f0a8bd2fe14e9a88f523de7c67db90a Author: Oskari Lemmela Date: Sat Dec 8 19:58:47 2018 +0200 mfd: axp20x: Add supported cells for AXP803 Parts of the AXP803 are compatible with their counterparts on the AXP813. These include the GPIO, ADC, AC and battery power supplies. Signed-off-by: Oskari Lemmela Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai Signed-off-by: Lee Jones commit 753a8d083e085c6f552c7982749de4cc7c40e2ac Author: Chen-Yu Tsai Date: Sat Dec 8 19:58:46 2018 +0200 mfd: axp20x: Re-align MFD cell entries In the axp20x driver, the various mfd_cell lists had varying amounts of indentation, sometimes even within the same list. For the axp288, there's no alignment at all. Re-align the right hand side of the assignments with the least amount of tabs possible. Also collapse the closing bracket and the opening bracket of the next entry onto the same line for the axp288, to be consistent with all the other mfd_cell lists. This patch is whitespace change only. No functionality is modified. Signed-off-by: Chen-Yu Tsai Signed-off-by: Oskari Lemmela Signed-off-by: Lee Jones commit 4a19f9a65375ca9781b3ca9e810ece92edfc3e78 Author: Oskari Lemmela Date: Tue Nov 20 19:52:10 2018 +0200 mfd: axp20x: Add AC power supply cell for AXP813 As axp20x-ac-power-supply now supports AXP813, add a cell for it. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick Signed-off-by: Lee Jones commit 04c801c18ded421845324255e660147a6f58dcd6 Author: Charles Keepax Date: Wed Nov 28 10:04:22 2018 +0000 mfd: wm5110: Add missing ASRC rate register Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 504e4175829c44328773b96ad9c538e4783a8d22 Author: Jonathan Marek Date: Mon Nov 19 14:53:17 2018 -0500 mfd: qcom_rpm: write fw_version to CTRL_REG This is required as part of the initialization sequence on certain SoCs. If these registers are not initialized, the hardware can be unresponsive. This fixes the driver on apq8060 (HP TouchPad device). Signed-off-by: Jonathan Marek Signed-off-by: Lee Jones commit ac4ca4b9f4623ba5e1ea7a582f286567c611e027 Author: Jonathan Hunter Date: Tue Nov 13 08:56:31 2018 +0000 mfd: tps6586x: Handle interrupts on suspend The tps6586x driver creates an irqchip that is used by its various child devices for managing interrupts. The tps6586x-rtc device is one of its children that uses the tps6586x irqchip. When using the tps6586x-rtc as a wake-up device from suspend, the following is seen: PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.001 seconds) done. OOM killer disabled. Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done. Disabling non-boot CPUs ... Entering suspend state LP1 Enabling non-boot CPUs ... CPU1 is up tps6586x 3-0034: failed to read interrupt status tps6586x 3-0034: failed to read interrupt status The reason why the tps6586x interrupt status cannot be read is because the tps6586x interrupt is not masked during suspend and when the tps6586x-rtc interrupt occurs, to wake-up the device, the interrupt is seen before the i2c controller has been resumed in order to read the tps6586x interrupt status. The tps6586x-rtc driver sets it's interrupt as a wake-up source during suspend, which gets propagated to the parent tps6586x interrupt. However, the tps6586x-rtc driver cannot disable it's interrupt during suspend otherwise we would never be woken up and so the tps6586x must disable it's interrupt instead. Prevent the tps6586x interrupt handler from executing on exiting suspend before the i2c controller has been resumed by disabling the tps6586x interrupt on entering suspend and re-enabling it on resuming from suspend. Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Lee Jones commit 7f9472134a5af31bad191f074a5d416146da26f7 Author: Richard Fitzgerald Date: Mon Nov 12 15:28:37 2018 +0000 mfd: madera: Add shared data for accessory detection Add variables to struct madera that will be shared by the extcon and audio codec drivers to synchronize output state during accessory detection. Also add a mutex to protect the DAPM pointer. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit 628f3dfe4c7b35bbe63ec194ca6da857b00b0083 Author: Jean Delvare Date: Mon Nov 12 10:49:42 2018 +0100 mfd: at91-usart: Add platform dependency It doesn't make sense to present option MFD_AT91_USART by default if not building an AT91 kernel, as the drivers which depend on it are not available. Fixes: 7d3aa342cef7 ("mfd: at91-usart: Add MFD driver for USART") Signed-off-by: Jean Delvare Signed-off-by: Lee Jones commit b0aff01e7aa6ad2d6998ef1323843212d1db8b04 Author: Dien Pham Date: Wed Oct 3 15:58:41 2018 +0200 mfd: bd9571mwv: Add volatile register to make DVFS work Because BD9571MWV_DVFS_MONIVDAC is not defined in the volatile table, the physical register value is not updated by regmap and DVFS doesn't work as expected. Fix it! Fixes: d3ea21272094 ("mfd: Add ROHM BD9571MWV-M MFD PMIC driver") Signed-off-by: Dien Pham [wsa: rebase, add 'Fixes', reword commit message] Signed-off-by: Wolfram Sang Reviewed-by: Marek Vasut Signed-off-by: Lee Jones commit 10628e3ecf544fa2e4e24f8e112d95c37884dc98 Author: Dan Carpenter Date: Thu Oct 25 15:43:44 2018 +0300 mfd: ab8500-core: Return zero in get_register_interruptible() This function is supposed to return zero on success or negative error codes on error. Unfortunately, there is a bug so it sometimes returns non-zero, positive numbers on success. I noticed this bug during review and I can't test it. It does appear that the return is sometimes propogated back to _regmap_read() where all non-zero returns are treated as failure so this may affect run time. Fixes: 47c1697508f2 ("mfd: Align ab8500 with the abx500 interface") Signed-off-by: Dan Carpenter Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit a54e950fdec3cde98caa04bc601cbdc95d0d319c Author: Geert Uytterhoeven Date: Wed Nov 7 14:50:01 2018 +0100 mfd: tmio: Typo s/use use/use/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Lee Jones commit a177276aa098aa47a100d51a13eaaef029604b6d Author: Nicolas Boichat Date: Mon Oct 22 10:55:06 2018 +0800 mfd: mt6397: Do not call irq_domain_remove if PMIC unsupported If the PMIC ID is unknown, the current code would call irq_domain_remove and panic, as pmic->irq_domain is only initialized by mt6397_irq_init. Return immediately with an error, if the chip ID is unsupported. Signed-off-by: Nicolas Boichat Signed-off-by: Lee Jones commit a3888f62fe66429fad3be7f2ba962e1e08c26fd6 Author: Nathan Chancellor Date: Wed Oct 17 17:56:28 2018 -0700 mfd: db8500-prcmu: Fix some section annotations When building the kernel with Clang, the following section mismatch warnings appear: WARNING: vmlinux.o(.text+0x7239cc): Section mismatch in reference from the function db8500_prcmu_probe() to the function .init.text:init_prcm_registers() The function db8500_prcmu_probe() references the function __init init_prcm_registers(). This is often because db8500_prcmu_probe lacks a __init annotation or the annotation of init_prcm_registers is wrong. WARNING: vmlinux.o(.text+0x723e28): Section mismatch in reference from the function db8500_prcmu_probe() to the function .init.text:fw_project_name() The function db8500_prcmu_probe() references the function __init fw_project_name(). This is often because db8500_prcmu_probe lacks a __init annotation or the annotation of fw_project_name is wrong. db8500_prcmu_probe should not be marked as __init so remove the __init annotation from fw_project_name and init_prcm_registers. Signed-off-by: Nathan Chancellor Signed-off-by: Lee Jones commit 8838555089f0345b87f4277fe5a8dd647dc65589 Author: Nathan Chancellor Date: Wed Oct 17 10:13:23 2018 -0700 mfd: twl-core: Fix section annotations on {,un}protect_pm_master When building the kernel with Clang, the following section mismatch warning appears: WARNING: vmlinux.o(.text+0x3d84a3b): Section mismatch in reference from the function twl_probe() to the function .init.text:unprotect_pm_master() The function twl_probe() references the function __init unprotect_pm_master(). This is often because twl_probe lacks a __init annotation or the annotation of unprotect_pm_master is wrong. Remove the __init annotation on the *protect_pm_master functions so there is no more mismatch. Signed-off-by: Nathan Chancellor Signed-off-by: Lee Jones commit 55a7f0065533f71991c720457ea24ff2fe909f81 Author: Steve French Date: Tue Jan 1 17:19:45 2019 -0600 cifs: fix confusing warning message on reconnect When DFS is not used on the mount we should not be mentioning DFS in the warning message on reconnect (it could be confusing). Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 6d2f84eee098540ae857998fe32f29b9e2cd9613 Author: Paul Aurich Date: Mon Dec 31 14:13:34 2018 -0800 smb3: fix large reads on encrypted connections When passing a large read to receive_encrypted_read(), ensure that the demultiplex_thread knows that a MID was processed. Without this, those operations never complete. This is a similar issue/fix to lease break handling: commit 7af929d6d05ba5564139718e30d5bc96bdbc716a ("smb3: fix lease break problem introduced by compounding") CC: Stable # 4.19+ Fixes: b24df3e30cbf ("cifs: update receive_encrypted_standard to handle compounded responses") Signed-off-by: Paul Aurich Tested-by: Yves-Alexis Perez Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit c5ee066333ebc322a24a00a743ed941a0c68617e Author: David Ahern Date: Wed Jan 2 18:57:09 2019 -0800 ipv6: Consider sk_bound_dev_if when binding a socket to an address IPv6 does not consider if the socket is bound to a device when binding to an address. The result is that a socket can be bound to eth0 and then bound to the address of eth1. If the device is a VRF, the result is that a socket can only be bound to an address in the default VRF. Resolve by considering the device if sk_bound_dev_if is set. This problem exists from the beginning of git history. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 73155879b3c1ac3ace35208a54a3a160ec520bef Author: David Ahern Date: Wed Jan 2 18:26:13 2019 -0800 ipv6: Fix dump of specific table with strict checking Dump of a specific table with strict checking enabled is looping. The problem is that the end of the table dump is not marked in the cb. When dumping a specific table, cb args 0 and 1 are not used (they are the hash index and entry with an hash table index when dumping all tables). Re-use args[0] to hold a 'done' flag for the specific table dump. Fixes: 13e38901d46ca ("net/ipv6: Plumb support for filtering route dumps") Reported-by: Jakub Kicinski Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 645ff1e8e704c4f33ab1fcd3c87f95cb9b6d7144 Merge: d548e65904ae4 592b15ba7260f Author: Linus Torvalds Date: Wed Jan 2 18:56:59 2019 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "A tiny pull request this merge window unfortunately, should get more material in for the next release: - new driver for Raspberry Pi's touchscreen (firmware interface) - miscellaneous input driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G Input: atmel_mxt_ts - don't try to free unallocated kernel memory Input: drv2667 - fix indentation issues Input: touchscreen - fix coding style issue Input: add official Raspberry Pi's touchscreen driver Input: nomadik-ske-keypad - fix a loop timeout test Input: rotary-encoder - don't log EPROBE_DEFER to kernel log Input: olpc_apsp - remove set but not used variable 'np' Input: olpc_apsp - enable the SP clock Input: olpc_apsp - check FIFO status on open(), not probe() Input: olpc_apsp - drop CONFIG_OLPC dependency clk: mmp2: add SP clock dt-bindings: marvell,mmp2: Add clock id for the SP clock Input: ad7879 - drop platform data support commit d548e65904ae43b0637d200a2441fc94e0589c30 Merge: 77d0b194b2df0 a691ffb46edd7 Author: Linus Torvalds Date: Wed Jan 2 18:54:45 2019 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/vhost updates from Michael Tsirkin: "Features, fixes, cleanups: - discard in virtio blk - misc fixes and cleanups" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: correct the related warning message vhost: split structs into a separate header file virtio: remove deprecated VIRTIO_PCI_CONFIG() vhost/vsock: switch to a mutex for vhost_vsock_hash virtio_blk: add discard and write zeroes support commit 77d0b194b2df04a1992f882d96ff4e2bd8bb8fe0 Merge: b79f9f93eb483 427c5ce4417cb Author: Linus Torvalds Date: Wed Jan 2 18:49:58 2019 -0800 Merge tag 'for-4.21/block-20190102' of git://git.kernel.dk/linux-block Pull more block updates from Jens Axboe: - Dead code removal for loop/sunvdc (Chengguang) - Mark BIDI support for bsg as deprecated, logging a single dmesg warning if anyone is actually using it (Christoph) - blkcg cleanup, killing a dead function and making the tryget_closest variant easier to read (Dennis) - Floppy fixes, one fixing a regression in swim3 (Finn) - lightnvm use-after-free fix (Gustavo) - gdrom leak fix (Wenwen) - a set of drbd updates (Lars, Luc, Nathan, Roland) * tag 'for-4.21/block-20190102' of git://git.kernel.dk/linux-block: (28 commits) block/swim3: Fix regression on PowerBook G3 block/swim3: Fix -EBUSY error when re-opening device after unmount block/swim3: Remove dead return statement block/amiflop: Don't log error message on invalid ioctl gdrom: fix a memory leak bug lightnvm: pblk: fix use-after-free bug block: sunvdc: remove redundant code block: loop: remove redundant code bsg: deprecate BIDI support in bsg blkcg: remove unused __blkg_release_rcu() blkcg: clean up blkg_tryget_closest() drbd: Change drbd_request_detach_interruptible's return type to int drbd: Avoid Clang warning about pointless switch statment drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") drbd: skip spurious timeout (ping-timeo) when failing promote drbd: don't retry connection if peers do not agree on "authentication" settings drbd: fix print_st_err()'s prototype to match the definition drbd: avoid spurious self-outdating with concurrent disconnect / down drbd: do not block when adjusting "disk-options" while IO is frozen drbd: fix comment typos ... commit b79f9f93eb483f2757b089bb4e1eb3827a609080 Merge: 0f2107daec813 745d51dc8a29e Author: Linus Torvalds Date: Wed Jan 2 18:47:56 2019 -0800 Merge tag 'for-4.21/libata-20190102' of git://git.kernel.dk/linux-block Pull libata fix from Jens Axboe: "This libata change missed the original libata pull request. Just a single fix in here, fixing a missed reference drop" * tag 'for-4.21/libata-20190102' of git://git.kernel.dk/linux-block: ata: pata_macio: add of_node_put() commit 0f2107daec8137e1ea8bcd6df1323ffe46a2e873 Merge: 01766d27d265a 08972760d366b Author: Linus Torvalds Date: Wed Jan 2 18:45:50 2019 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull more clk updates from Stephen Boyd: "One more patch to generalize a set of DT binding defines now before -rc1 comes out. This way the SoC DTS files can use the proper defines from a stable tag" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx8qxp: make the name of clock ID generic commit 01766d27d265afe7e93a8aa033afae5635d5aba0 Merge: 35ddb06a46753 f4747b9c68b88 Author: Linus Torvalds Date: Wed Jan 2 18:43:57 2019 -0800 Merge tag 'devprop-4.21-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fixes from Rafael Wysocki: "Fix two potential NULL pointer dereferences found by Coverity in the software nodes code introduced recently (Colin Ian King)" * tag 'devprop-4.21-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: drivers: base: swnode: check if swnode is NULL before dereferencing it drivers: base: swnode: check if pointer p is NULL before dereferencing it commit 35ddb06a467538434b4139fbf5c02a2ef073162a Merge: 6aa293d8ff093 d69e11648e486 Author: Linus Torvalds Date: Wed Jan 2 18:41:38 2019 -0800 Merge tag 'mailbox-v4.21' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - Introduce device-managed registration devm_mbox_controller_un/register and convert drivers to use it - Introduce flush api to support clients that must busy-wait in atomic context - Support multiple controllers per device - Hi3660: a bugfix and constify ops structure - TI-MsgMgr: off by one bugfix. - BCM: switch to spdx license - Tegra-HSP: support for shared mailboxes and suspend/resume. * tag 'mailbox-v4.21' of git://git.linaro.org/landing-teams/working/fujitsu/integration: (30 commits) mailbox: tegra-hsp: Use device-managed registration API mailbox: tegra-hsp: use devm_kstrdup_const() mailbox: tegra-hsp: Add suspend/resume support mailbox: tegra-hsp: Add support for shared mailboxes dt-bindings: tegra186-hsp: Add shared mailboxes mailbox: Allow multiple controllers per device mailbox: Support blocking transfers in atomic context mailbox: ti-msgmgr: Use device-managed registration API mailbox: stm32-ipcc: Use device-managed registration API mailbox: rockchip: Use device-managed registration API mailbox: qcom-apcs: Use device-managed registration API mailbox: platform-mhu: Use device-managed registration API mailbox: omap: Use device-managed registration API mailbox: mtk-cmdq: Remove needless devm_kfree() calls mailbox: mtk-cmdq: Use device-managed registration API mailbox: xgene-slimpro: Use device-managed registration API mailbox: sti: Use device-managed registration API mailbox: altera: Use device-managed registration API mailbox: imx: Use device-managed registration API mailbox: hi6220: Use device-managed registration API ... commit 6aa293d8ff0939802a6c86cee6cd152c1b0a7a0d Merge: 04a17edeca524 940b241d9050f Author: Linus Torvalds Date: Wed Jan 2 18:39:22 2019 -0800 Merge branch 'for-linus-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - DISCARD support for our block device driver - Many TLB flush optimizations - Various smaller fixes - And most important, Anton agreed to help me maintaining UML * 'for-linus-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Remove obsolete reenable_XX calls um: writev needs Add Anton Ivanov to UML maintainers um: remove redundant generic-y um: Optimize Flush TLB for force/fork case um: Avoid marking pages with "changed protection" um: Skip TLB flushing where not needed um: Optimize TLB operations v2 um: Remove unnecessary faulted check in uaccess.c um: Add support for DISCARD in the UBD Driver um: Remove unsafe printks from the io thread um: Clean-up command processing in UML UBD driver um: Switch to block-mq constants in the UML UBD driver um: Make GCOV depend on !KCOV um: Include sys/uio.h to have writev() um: Add HAVE_DEBUG_BUGVERBOSE um: Update maintainers file entry commit 04a17edeca524b71dbb5be41a7002d247fbf34c0 Merge: e6b9257280846 ec10574d00da0 Author: Linus Torvalds Date: Wed Jan 2 18:37:01 2019 -0800 Merge tag 's390-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - A larger update for the zcrypt / AP bus code: + Update two inline assemblies in the zcrypt driver to make gcc happy + Add a missing reply code for invalid special commands for zcrypt + Allow AP device reset to be triggered from user space + Split the AP scan function into smaller, more readable functions - Updates for vfio-ccw and vfio-ap + Add maintainers and reviewer for vfio-ccw + Include facility.h in vfio_ap_drv.c to avoid fragile include chain + Simplicy vfio-ccw state machine - Use the common code version of bust_spinlocks - Make use of the DEFINE_SHOW_ATTRIBUTE - Fix three incorrect file permissions in the DASD driver - Remove bit spin-lock from the PCI interrupt handler - Fix GFP_ATOMIC vs GFP_KERNEL in the PCI code * tag 's390-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: rework ap scan bus code s390/zcrypt: make sysfs reset attribute trigger queue reset s390/pci: fix sleeping in atomic during hotplug s390/pci: remove bit_lock usage in interrupt handler s390/drivers: fix proc/debugfs file permissions s390: convert to DEFINE_SHOW_ATTRIBUTE MAINTAINERS/vfio-ccw: add Farhan and Eric, make Halil Reviewer vfio: ccw: Merge BUSY and BOXED states s390: use common bust_spinlocks() s390/zcrypt: improve special ap message cmd handling s390/ap: rework assembler functions to use unions for in/out register variables s390: vfio-ap: include for test_facility() commit bf77ae4c98d721a9aae3840970d46669a78e034a Author: NeilBrown Date: Thu Jan 3 11:04:08 2019 +1100 locks: fix error in locks_move_blocks() After moving all requests from fl->fl_blocked_requests to new->fl_blocked_requests it is nonsensical to do anything to all the remaining elements, there aren't any. This should do something to all the requests that have been moved. For simplicity, it does it to all requests in the target list. Setting "f->fl_blocker = new" to all members of new->fl_blocked_requests is "obviously correct" as it preserves the invariant of the linkage among requests. Reported-by: syzbot+239d99847eb49ecb3899@syzkaller.appspotmail.com Fixes: 5946c4319ebb ("fs/locks: allow a lock request to block other requests.") Signed-off-by: NeilBrown Signed-off-by: Jeff Layton commit be63004336d008b71f93dfe166f503ae2e53a32e Merge: d63967e475ae1 a67825f519514 Author: David S. Miller Date: Wed Jan 2 16:38:59 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2019-01-02 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) prevent out of bounds speculation on pointer arithmetic, from Daniel. 2) typo fix, from Xiaozhou. ==================== Signed-off-by: David S. Miller commit e6b92572808467f35fd159d47c45b650de29e722 Merge: e45428a436765 260f71eff493a Author: Linus Torvalds Date: Wed Jan 2 16:35:23 2019 -0800 Merge tag 'nfs-for-4.21-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Stable bugfixes: - xprtrdma: Yet another double DMA-unmap # v4.20 Features: - Allow some /proc/sys/sunrpc entries without CONFIG_SUNRPC_DEBUG - Per-xprt rdma receive workqueues - Drop support for FMR memory registration - Make port= mount option optional for RDMA mounts Other bugfixes and cleanups: - Remove unused nfs4_xdev_fs_type declaration - Fix comments for behavior that has changed - Remove generic RPC credentials by switching to 'struct cred' - Fix crossing mountpoints with different auth flavors - Various xprtrdma fixes from testing and auditing the close code - Fixes for disconnect issues when using xprtrdma with krb5 - Clean up and improve xprtrdma trace points - Fix NFS v4.2 async copy reboot recovery" * tag 'nfs-for-4.21-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (63 commits) sunrpc: convert to DEFINE_SHOW_ATTRIBUTE sunrpc: Add xprt after nfs4_test_session_trunk() sunrpc: convert unnecessary GFP_ATOMIC to GFP_NOFS sunrpc: handle ENOMEM in rpcb_getport_async NFS: remove unnecessary test for IS_ERR(cred) xprtrdma: Prevent leak of rpcrdma_rep objects NFSv4.2 fix async copy reboot recovery xprtrdma: Don't leak freed MRs xprtrdma: Add documenting comment for rpcrdma_buffer_destroy xprtrdma: Replace outdated comment for rpcrdma_ep_post xprtrdma: Update comments in frwr_op_send SUNRPC: Fix some kernel doc complaints SUNRPC: Simplify defining common RPC trace events NFS: Fix NFSv4 symbolic trace point output xprtrdma: Trace mapping, alloc, and dereg failures xprtrdma: Add trace points for calls to transport switch methods xprtrdma: Relocate the xprtrdma_mr_map trace points xprtrdma: Clean up of xprtrdma chunk trace points xprtrdma: Remove unused fields from rpcrdma_ia xprtrdma: Cull dprintk() call sites ... commit e45428a436765fcd154d461a2739b5640916dc00 Merge: 85f78456f286d 0ad30ff67bd3e Author: Linus Torvalds Date: Wed Jan 2 16:21:50 2019 -0800 Merge tag 'nfsd-4.21' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Thanks to Vasily Averin for fixing a use-after-free in the containerized NFSv4.2 client, and cleaning up some convoluted backchannel server code in the process. Otherwise, miscellaneous smaller bugfixes and cleanup" * tag 'nfsd-4.21' of git://linux-nfs.org/~bfields/linux: (25 commits) nfs: fixed broken compilation in nfs_callback_up_net() nfs: minor typo in nfs4_callback_up_net() sunrpc: fix debug message in svc_create_xprt() sunrpc: make visible processing error in bc_svc_process() sunrpc: remove unused xpo_prep_reply_hdr callback sunrpc: remove svc_rdma_bc_class sunrpc: remove svc_tcp_bc_class sunrpc: remove unused bc_up operation from rpc_xprt_ops sunrpc: replace svc_serv->sv_bc_xprt by boolean flag sunrpc: use-after-free in svc_process_common() sunrpc: use SVC_NET() in svcauth_gss_* functions nfsd: drop useless LIST_HEAD lockd: Show pid of lockd for remote locks NFSD remove OP_CACHEME from 4.2 op_flags nfsd: Return EPERM, not EACCES, in some SETATTR cases sunrpc: fix cache_head leak due to queued request nfsd: clean up indentation, increase indentation in switch statement svcrdma: Optimize the logic that selects the R_key to invalidate nfsd: fix a warning in __cld_pipe_upcall() nfsd4: fix crash on writing v4_end_grace before nfsd startup ... commit a67825f5195145f840939d0f85fc40b6b1077329 Merge: 8b6b25cf93b73 80c9b2fae87bb Author: Alexei Starovoitov Date: Wed Jan 2 16:01:25 2019 -0800 Merge branch 'prevent-oob-under-speculation' Daniel Borkmann says: ==================== This set fixes an out of bounds case under speculative execution by implementing masking of pointer alu into the verifier. For details please see the individual patches. Thanks! v2 -> v3: - 8/9: change states_equal condition into old->speculative && !cur->speculative, thanks Jakub! - 8/9: remove incorrect speculative state test in propagate_liveness(), thanks Jakub! v1 -> v2: - Typo fixes in commit msg and a comment, thanks David! ==================== Signed-off-by: Alexei Starovoitov commit 80c9b2fae87bb5c5698940da1a981f14f89518d1 Author: Daniel Borkmann Date: Thu Jan 3 00:58:35 2019 +0100 bpf: add various test cases to selftests Add various map value pointer related test cases to test_verifier kselftest to reflect recent changes and improve test coverage. The tests include basic masking functionality, unprivileged behavior on pointer arithmetic which goes oob, mixed bounds tests, negative unknown scalar but resulting positive offset for access and helper range, handling of arithmetic from multiple maps, various masking scenarios with subsequent map value access and others including two test cases from Jann Horn for prior fixes. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 Author: Daniel Borkmann Date: Thu Jan 3 00:58:34 2019 +0100 bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged users for tail calls and data access such that the user provided index gets sanitized from BPF program and syscall side, there is still a more generic form affected from BPF programs that applies to most maps that hold user data in relation to dynamic map access when dealing with unknown scalars or "slow" known scalars as access offset, for example: - Load a map value pointer into R6 - Load an index into R7 - Do a slow computation (e.g. with a memory dependency) that loads a limit into R8 (e.g. load the limit from a map for high latency, then mask it to make the verifier happy) - Exit if R7 >= R8 (mispredicted branch) - Load R0 = R6[R7] - Load R0 = R6[R0] For unknown scalars there are two options in the BPF verifier where we could derive knowledge from in order to guarantee safe access to the memory: i) While /<=/>= variants won't allow to derive any lower or upper bounds from the unknown scalar where it would be safe to add it to the map value pointer, it is possible through ==/!= test however. ii) another option is to transform the unknown scalar into a known scalar, for example, through ALU ops combination such as R &= followed by R |= or any similar combination where the original information from the unknown scalar would be destroyed entirely leaving R with a constant. The initial slow load still precedes the latter ALU ops on that register, so the CPU executes speculatively from that point. Once we have the known scalar, any compare operation would work then. A third option only involving registers with known scalars could be crafted as described in [0] where a CPU port (e.g. Slow Int unit) would be filled with many dependent computations such that the subsequent condition depending on its outcome has to wait for evaluation on its execution port and thereby executing speculatively if the speculated code can be scheduled on a different execution port, or any other form of mistraining as described in [1], for example. Given this is not limited to only unknown scalars, not only map but also stack access is affected since both is accessible for unprivileged users and could potentially be used for out of bounds access under speculation. In order to prevent any of these cases, the verifier is now sanitizing pointer arithmetic on the offset such that any out of bounds speculation would be masked in a way where the pointer arithmetic result in the destination register will stay unchanged, meaning offset masked into zero similar as in array_index_nospec() case. With regards to implementation, there are three options that were considered: i) new insn for sanitation, ii) push/pop insn and sanitation as inlined BPF, iii) reuse of ax register and sanitation as inlined BPF. Option i) has the downside that we end up using from reserved bits in the opcode space, but also that we would require each JIT to emit masking as native arch opcodes meaning mitigation would have slow adoption till everyone implements it eventually which is counter-productive. Option ii) and iii) have both in common that a temporary register is needed in order to implement the sanitation as inlined BPF since we are not allowed to modify the source register. While a push / pop insn in ii) would be useful to have in any case, it requires once again that every JIT needs to implement it first. While possible, amount of changes needed would also be unsuitable for a -stable patch. Therefore, the path which has fewer changes, less BPF instructions for the mitigation and does not require anything to be changed in the JITs is option iii) which this work is pursuing. The ax register is already mapped to a register in all JITs (modulo arm32 where it's mapped to stack as various other BPF registers there) and used in constant blinding for JITs-only so far. It can be reused for verifier rewrites under certain constraints. The interpreter's tmp "register" has therefore been remapped into extending the register set with hidden ax register and reusing that for a number of instructions that needed the prior temporary variable internally (e.g. div, mod). This allows for zero increase in stack space usage in the interpreter, and enables (restricted) generic use in rewrites otherwise as long as such a patchlet does not make use of these instructions. The sanitation mask is dynamic and relative to the offset the map value or stack pointer currently holds. There are various cases that need to be taken under consideration for the masking, e.g. such operation could look as follows: ptr += val or val += ptr or ptr -= val. Thus, the value to be sanitized could reside either in source or in destination register, and the limit is different depending on whether the ALU op is addition or subtraction and depending on the current known and bounded offset. The limit is derived as follows: limit := max_value_size - (smin_value + off). For subtraction: limit := umax_value + off. This holds because we do not allow any pointer arithmetic that would temporarily go out of bounds or would have an unknown value with mixed signed bounds where it is unclear at verification time whether the actual runtime value would be either negative or positive. For example, we have a derived map pointer value with constant offset and bounded one, so limit based on smin_value works because the verifier requires that statically analyzed arithmetic on the pointer must be in bounds, and thus it checks if resulting smin_value + off and umax_value + off is still within map value bounds at time of arithmetic in addition to time of access. Similarly, for the case of stack access we derive the limit as follows: MAX_BPF_STACK + off for subtraction and -off for the case of addition where off := ptr_reg->off + ptr_reg->var_off.value. Subtraction is a special case for the masking which can be in form of ptr += -val, ptr -= -val, or ptr -= val. In the first two cases where we know that the value is negative, we need to temporarily negate the value in order to do the sanitation on a positive value where we later swap the ALU op, and restore original source register if the value was in source. The sanitation of pointer arithmetic alone is still not fully sufficient as is, since a scenario like the following could happen ... PTR += 0x1000 (e.g. K-based imm) PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON PTR += 0x1000 PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON [...] ... which under speculation could end up as ... PTR += 0x1000 PTR -= 0 [ truncated by mitigation ] PTR += 0x1000 PTR -= 0 [ truncated by mitigation ] [...] ... and therefore still access out of bounds. To prevent such case, the verifier is also analyzing safety for potential out of bounds access under speculative execution. Meaning, it is also simulating pointer access under truncation. We therefore "branch off" and push the current verification state after the ALU operation with known 0 to the verification stack for later analysis. Given the current path analysis succeeded it is likely that the one under speculation can be pruned. In any case, it is also subject to existing complexity limits and therefore anything beyond this point will be rejected. In terms of pruning, it needs to be ensured that the verification state from speculative execution simulation must never prune a non-speculative execution path, therefore, we mark verifier state accordingly at the time of push_stack(). If verifier detects out of bounds access under speculative execution from one of the possible paths that includes a truncation, it will reject such program. Given we mask every reg-based pointer arithmetic for unprivileged programs, we've been looking into how it could affect real-world programs in terms of size increase. As the majority of programs are targeted for privileged-only use case, we've unconditionally enabled masking (with its alu restrictions on top of it) for privileged programs for the sake of testing in order to check i) whether they get rejected in its current form, and ii) by how much the number of instructions and size will increase. We've tested this by using Katran, Cilium and test_l4lb from the kernel selftests. For Katran we've evaluated balancer_kern.o, Cilium bpf_lxc.o and an older test object bpf_lxc_opt_-DUNKNOWN.o and l4lb we've used test_l4lb.o as well as test_l4lb_noinline.o. We found that none of the programs got rejected by the verifier with this change, and that impact is rather minimal to none. balancer_kern.o had 13,904 bytes (1,738 insns) xlated and 7,797 bytes JITed before and after the change. Most complex program in bpf_lxc.o had 30,544 bytes (3,817 insns) xlated and 18,538 bytes JITed before and after and none of the other tail call programs in bpf_lxc.o had any changes either. For the older bpf_lxc_opt_-DUNKNOWN.o object we found a small increase from 20,616 bytes (2,576 insns) and 12,536 bytes JITed before to 20,664 bytes (2,582 insns) and 12,558 bytes JITed after the change. Other programs from that object file had similar small increase. Both test_l4lb.o had no change and remained at 6,544 bytes (817 insns) xlated and 3,401 bytes JITed and for test_l4lb_noinline.o constant at 5,080 bytes (634 insns) xlated and 3,313 bytes JITed. This can be explained in that LLVM typically optimizes stack based pointer arithmetic by using K-based operations and that use of dynamic map access is not overly frequent. However, in future we may decide to optimize the algorithm further under known guarantees from branch and value speculation. Latter seems also unclear in terms of prediction heuristics that today's CPUs apply as well as whether there could be collisions in e.g. the predictor's Value History/Pattern Table for triggering out of bounds access, thus masking is performed unconditionally at this point but could be subject to relaxation later on. We were generally also brainstorming various other approaches for mitigation, but the blocker was always lack of available registers at runtime and/or overhead for runtime tracking of limits belonging to a specific pointer. Thus, we found this to be minimally intrusive under given constraints. With that in place, a simple example with sanitized access on unprivileged load at post-verification time looks as follows: # bpftool prog dump xlated id 282 [...] 28: (79) r1 = *(u64 *)(r7 +0) 29: (79) r2 = *(u64 *)(r7 +8) 30: (57) r1 &= 15 31: (79) r3 = *(u64 *)(r0 +4608) 32: (57) r3 &= 1 33: (47) r3 |= 1 34: (2d) if r2 > r3 goto pc+19 35: (b4) (u32) r11 = (u32) 20479 | 36: (1f) r11 -= r2 | Dynamic sanitation for pointer 37: (4f) r11 |= r2 | arithmetic with registers 38: (87) r11 = -r11 | containing bounded or known 39: (c7) r11 s>>= 63 | scalars in order to prevent 40: (5f) r11 &= r2 | out of bounds speculation. 41: (0f) r4 += r11 | 42: (71) r4 = *(u8 *)(r4 +0) 43: (6f) r4 <<= r1 [...] For the case where the scalar sits in the destination register as opposed to the source register, the following code is emitted for the above example: [...] 16: (b4) (u32) r11 = (u32) 20479 17: (1f) r11 -= r2 18: (4f) r11 |= r2 19: (87) r11 = -r11 20: (c7) r11 s>>= 63 21: (5f) r2 &= r11 22: (0f) r2 += r0 23: (61) r0 = *(u32 *)(r2 +0) [...] JIT blinding example with non-conflicting use of r10: [...] d5: je 0x0000000000000106 _ d7: mov 0x0(%rax),%edi | da: mov $0xf153246,%r10d | Index load from map value and e0: xor $0xf153259,%r10 | (const blinded) mask with 0x1f. e7: and %r10,%rdi |_ ea: mov $0x2f,%r10d | f0: sub %rdi,%r10 | Sanitized addition. Both use r10 f3: or %rdi,%r10 | but do not interfere with each f6: neg %r10 | other. (Neither do these instructions f9: sar $0x3f,%r10 | interfere with the use of ax as temp fd: and %r10,%rdi | in interpreter.) 100: add %rax,%rdi |_ 103: mov 0x0(%rdi),%eax [...] Tested that it fixes Jann's reproducer, and also checked that test_verifier and test_progs suite with interpreter, JIT and JIT with hardening enabled on x86-64 and arm64 runs successfully. [0] Speculose: Analyzing the Security Implications of Speculative Execution in CPUs, Giorgi Maisuradze and Christian Rossow, https://arxiv.org/pdf/1801.04084.pdf [1] A Systematic Evaluation of Transient Execution Attacks and Defenses, Claudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp, Benjamin von Berg, Philipp Ortner, Frank Piessens, Dmitry Evtyushkin, Daniel Gruss, https://arxiv.org/pdf/1811.05441.pdf Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Reported-by: Jann Horn Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit b7137c4eab85c1cf3d46acdde90ce1163b28c873 Author: Daniel Borkmann Date: Thu Jan 3 00:58:33 2019 +0100 bpf: fix check_map_access smin_value test when pointer contains offset In check_map_access() we probe actual bounds through __check_map_access() with offset of reg->smin_value + off for lower bound and offset of reg->umax_value + off for the upper bound. However, even though the reg->smin_value could have a negative value, the final result of the sum with off could be positive when pointer arithmetic with known and unknown scalars is combined. In this case we reject the program with an error such as "R min value is negative, either use unsigned index or do a if (index >=0) check." even though the access itself would be fine. Therefore extend the check to probe whether the actual resulting reg->smin_value + off is less than zero. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 9d7eceede769f90b66cfa06ad5b357140d5141ed Author: Daniel Borkmann Date: Thu Jan 3 00:58:32 2019 +0100 bpf: restrict unknown scalars of mixed signed bounds for unprivileged For unknown scalars of mixed signed bounds, meaning their smin_value is negative and their smax_value is positive, we need to reject arithmetic with pointer to map value. For unprivileged the goal is to mask every map pointer arithmetic and this cannot reliably be done when it is unknown at verification time whether the scalar value is negative or positive. Given this is a corner case, the likelihood of breaking should be very small. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit e4298d25830a866cc0f427d4bccb858e76715859 Author: Daniel Borkmann Date: Thu Jan 3 00:58:31 2019 +0100 bpf: restrict stack pointer arithmetic for unprivileged Restrict stack pointer arithmetic for unprivileged users in that arithmetic itself must not go out of bounds as opposed to the actual access later on. Therefore after each adjust_ptr_min_max_vals() with a stack pointer as a destination we simulate a check_stack_access() of 1 byte on the destination and once that fails the program is rejected for unprivileged program loads. This is analog to map value pointer arithmetic and needed for masking later on. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 0d6303db7970e6f56ae700fa07e11eb510cda125 Author: Daniel Borkmann Date: Thu Jan 3 00:58:30 2019 +0100 bpf: restrict map value pointer arithmetic for unprivileged Restrict map value pointer arithmetic for unprivileged users in that arithmetic itself must not go out of bounds as opposed to the actual access later on. Therefore after each adjust_ptr_min_max_vals() with a map value pointer as a destination it will simulate a check_map_access() of 1 byte on the destination and once that fails the program is rejected for unprivileged program loads. We use this later on for masking any pointer arithmetic with the remainder of the map value space. The likelihood of breaking any existing real-world unprivileged eBPF program is very small for this corner case. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 9b73bfdd08e73231d6a90ae6db4b46b3fbf56c30 Author: Daniel Borkmann Date: Thu Jan 3 00:58:29 2019 +0100 bpf: enable access to ax register also from verifier rewrite Right now we are using BPF ax register in JIT for constant blinding as well as in interpreter as temporary variable. Verifier will not be able to use it simply because its use will get overridden from the former in bpf_jit_blind_insn(). However, it can be made to work in that blinding will be skipped if there is prior use in either source or destination register on the instruction. Taking constraints of ax into account, the verifier is then open to use it in rewrites under some constraints. Note, ax register already has mappings in every eBPF JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 144cd91c4c2bced6eb8a7e25e590f6618a11e854 Author: Daniel Borkmann Date: Thu Jan 3 00:58:28 2019 +0100 bpf: move tmp variable into ax register in interpreter This change moves the on-stack 64 bit tmp variable in ___bpf_prog_run() into the hidden ax register. The latter is currently only used in JITs for constant blinding as a temporary scratch register, meaning the BPF interpreter will never see the use of ax. Therefore it is safe to use it for the cases where tmp has been used earlier. This is needed to later on allow restricted hidden use of ax in both interpreter and JITs. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit c08435ec7f2bc8f4109401f696fd55159b4b40cb Author: Daniel Borkmann Date: Thu Jan 3 00:58:27 2019 +0100 bpf: move {prev_,}insn_idx into verifier env Move prev_insn_idx and insn_idx from the do_check() function into the verifier environment, so they can be read inside the various helper functions for handling the instructions. It's easier to put this into the environment rather than changing all call-sites only to pass it along. insn_idx is useful in particular since this later on allows to hold state in env->insn_aux_data[env->insn_idx]. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov commit 9c6260de505b63638dd86fcc33849b17f6146d94 Author: Aditya Pakki Date: Mon Dec 24 12:24:45 2018 -0600 infiniband/qedr: Potential null ptr dereference of qp idr_find() may fail and return a NULL pointer. The fix checks the return value of the function and returns an error in case of NULL. Signed-off-by: Aditya Pakki Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 94edd87a1c59f3efa6fdf4e98d6d492e6cec6173 Author: Aditya Pakki Date: Wed Dec 26 12:56:22 2018 -0600 infiniband: bnxt_re: qplib: Check the return value of send_message In bnxt_qplib_map_tc2cos(), bnxt_qplib_rcfw_send_message() can return an error value but it is lost. Propagate this error to the callers. Signed-off-by: Aditya Pakki Acked-By: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 2fb458953a892020f36a323f386d8c7009f10777 Author: Julia Lawall Date: Sun Dec 23 09:57:01 2018 +0100 IB/ipoib: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares is never used. Commit 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs") removed the uses, but not the declaration. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs") Signed-off-by: Julia Lawall Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit edefae94b7b9f10d5efe32dece5a36e9d9ecc29e Author: Aaro Koskinen Date: Wed Jan 2 20:43:01 2019 +0200 MIPS: OCTEON: mark RGMII interface disabled on OCTEON III Commit 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx interface detection") added RGMII interface detection for OCTEON III, but it results in the following logs: [ 7.165984] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe [ 7.173017] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe The current RGMII routines are valid only for older OCTEONS that use GMX/ASX hardware blocks. On later chips AGL should be used, but support for that is missing in the mainline. Until that is added, mark the interface as disabled. Fixes: 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx interface detection") Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: stable@vger.kernel.org # 4.7+ commit 6e863844ad6effecac92a67a43b8467a8c2e129f Author: Lukasz Luba Date: Wed Dec 5 12:05:55 2018 +0100 PM: sleep: call devfreq suspend/resume Devfreq framework supports suspend of its devices. Call the the devfreq interface and allow devfreq devices preserve/restore their states during suspend/resume. Suggested-by: Tobias Jakobi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 72199051af6205049e96ee7ed34f4fc5f44d1baf Merge: cdf4f4dc118ba 75cb8d20c112a Author: Bjorn Helgaas Date: Wed Jan 2 15:31:15 2019 -0600 Merge branch 'pci/imx6' - Enable MSI for imx6 downstream components (Richard Zhu) * pci/imx6: PCI: imx: Enable MSI from downstream components commit cdf4f4dc118bafd97d0148d53730e396ece11afa Merge: c266b026ae7a5 7e6d5cd88a6f4 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:15 2019 -0600 Merge branch 'remotes/lorenzo/pci/uniphier' - Add UniPhier PCIe controller driver and DT bindings (Kunihiko Hayashi) * remotes/lorenzo/pci/uniphier: PCI: uniphier: Add UniPhier PCIe host controller support dt-bindings: PCI: Add UniPhier PCIe host controller description # Conflicts: # drivers/pci/controller/dwc/Kconfig # drivers/pci/controller/dwc/Makefile commit c266b026ae7a51f876eb74e15ff63f834fe35976 Merge: c8778707c23a9 41c5c5b0e7c8a Author: Bjorn Helgaas Date: Wed Jan 2 15:31:10 2019 -0600 Merge branch 'remotes/lorenzo/pci/mediatek' - Use devm resource parser in mediatek (Honghui Zhang) - Remove unused mediatek "num-lanes" DT property (Honghui Zhang) * remotes/lorenzo/pci/mediatek: arm64: dts: mt7622: Remove un-used property for PCIe arm: dts: mt7623: Remove un-used property for PCIe dt-bindings: PCI: MediaTek: Remove un-used property PCI: mediatek: Remove un-used variant in struct mtk_pcie_port PCI: mediatek: Use devm_of_pci_get_host_bridge_resources() to parse DT commit c8778707c23a906576c1fdb40dd6ba4090c11773 Merge: 6a790bf0eac44 3f7bb2ec20ce0 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:09 2019 -0600 Merge branch 'remotes/lorenzo/pci/dwc-msi' - Mask DesignWare interrupts instead of disabling them to avoid lost interrupts (Marc Zyngier) - Add locking when acking DesignWare interrupts (Marc Zyngier) - Ack DesignWare interrupts in the proper callbacks (Marc Zyngier) * remotes/lorenzo/pci/dwc-msi: PCI: dwc: Move interrupt acking into the proper callback PCI: dwc: Take lock when ACKing an interrupt PCI: dwc: Use interrupt masking instead of disabling commit 6a790bf0eac449c3b4dd844c2e799037531f6401 Merge: 33f3fd75b7548 ffeccc22d59cd Author: Bjorn Helgaas Date: Wed Jan 2 15:31:08 2019 -0600 Merge branch 'remotes/lorenzo/pci/dwc' - Constify histb dw_pcie_host_ops structure (Julia Lawall) - Support multiple power domains for imx6 (Leonard Crestez) - Constify layerscape driver data (Stefan Agner) - Update imx6 Kconfig to allow imx6 PCIe in imx7 kernel (Trent Piepho) - Support armada8k GPIO reset (Baruch Siach) - Support suspend/resume support on imx6 (Leonard Crestez) - Don't hard-code DesignWare DBI/ATU offst (Stephen Warren) - Skip i.MX6 PHY setup on i.MX7D (Andrey Smirnov) - Remove Jianguo Sun from HiSilicon STB maintainers (Lorenzo Pieralisi) * remotes/lorenzo/pci/dwc: MAINTAINERS: Remove Jianguo Sun from HiSilicon STB DWC entry PCI: dwc: Don't hard-code DBI/ATU offset PCI: imx: Add imx6sx suspend/resume support PCI: armada8k: Add support for gpio controlled reset signal PCI: dwc: Adjust Kconfig to allow IMX6 PCIe host on IMX7 PCI: dwc: layerscape: Constify driver data PCI: imx: Add multi-pd support dt-bindings: imx6q-pcie: Add multi-pd bindings for imx6sx PCI: histb: Constify dw_pcie_host_ops structure commit 33f3fd75b754818a6a3d40c4dd441b68b48bea0d Merge: 6ee86cac1cc41 9c0ef6d34fdbf Author: Bjorn Helgaas Date: Wed Jan 2 15:31:07 2019 -0600 Merge branch 'remotes/lorenzo/pci/amlogic' - Add Amlogic Meson PCIe controller driver and DT bindings (Yue Wang) * remotes/lorenzo/pci/amlogic: PCI: amlogic: Add the Amlogic Meson PCIe controller driver dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller commit 6ee86cac1cc415031b443d8b584305696a300d1e Merge: 54aed1909db69 7dc20ab1b9c43 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:06 2019 -0600 Merge branch 'pci/virtualization' - Skip VF scanning on powerpc, which does this in firmware (Sebastian Ott) * pci/virtualization: s390/pci: skip VF scanning PCI/IOV: Add flag so platforms can skip VF scanning PCI/IOV: Factor out sriov_add_vfs() commit 54aed1909db69f9b160bf36dd4ec314f0c91b56a Merge: 6f7cebea6b13d f7eb7b8a4f72b Author: Bjorn Helgaas Date: Wed Jan 2 15:31:05 2019 -0600 Merge branch 'pci/switchtec' - Remove status check after submitting Switchtec MRPC Firmware Download commands to avoid Completion Timeouts (Kelvin Cao) - Set Switchtec coherent DMA mask to allow 64-bit DMA (Boris Glimcher) - Fix Switchtec SWITCHTEC_IOCTL_EVENT_IDX_ALL flag overwrite issue (Joey Zhang) - Enable write combining for Switchtec MRPC Input buffers (Kelvin Cao) - Add Switchtec MRPC DMA mode support (Wesley Sheng) * pci/switchtec: switchtec: Add MRPC DMA mode support switchtec: Improve MRPC efficiency by enabling write combining switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite switchtec: Set DMA coherent mask switchtec: Remove immediate status check after submitting MRPC command commit 6f7cebea6b13d178ad9066bb3e190150cdfe9c75 Merge: baa12e5f3acb3 c5eb1190074cf Author: Bjorn Helgaas Date: Wed Jan 2 15:31:05 2019 -0600 Merge branch 'pci/pm' - Allow runtime PM even if driver doesn't supply callbacks (Jarkko Nikula) * pci/pm: PCI / PM: Allow runtime PM without callback functions commit baa12e5f3acb3cd500c85c4be2c97e769af199fd Merge: e6397dfcb58d8 fcf9ab35ba418 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:04 2019 -0600 Merge branch 'pci/peer-to-peer' - Clean up P2PDMA documentation (Randy Dunlap) * pci/peer-to-peer: PCI/P2PDMA: Clean up documentation and kernel-doc commit e6397dfcb58d8fcecea314026d4539c85f0dd94b Merge: 84e0e72722098 03e6742584af8 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:03 2019 -0600 Merge branch 'pci/misc' - Expand Kconfig "PF" acronyms (Randy Dunlap) - Update MAINTAINERS for arch/x86/kernel/early-quirks.c (Bjorn Helgaas) - Add missing include to drivers/pci.h (Alexandru Gagniuc) - Override Synopsys USB 3.x HAPS device class so dwc3-haps can claim it instead of xhci (Thinh Nguyen) * pci/misc: PCI: Override Synopsys USB 3.x HAPS device class PCI: Move Synopsys HAPS platform device IDs PCI: Add missing include to drivers/pci.h PCI: Remove unnecessary space before function pointer arguments MAINTAINERS: Add x86 early-quirks.c file pattern to PCI subsystem PCI: Expand the "PF" acronym in Kconfig help text commit 84e0e72722098c7ced6362d1219c2a40a9d109fa Merge: 2caa4dc607a70 53bb565fc5439 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:02 2019 -0600 Merge branch 'pci/enumeration' - Fix Broadcom CNB20LE host bridge unintended sign extension (Colin Ian King) * pci/enumeration: x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux) commit 2caa4dc607a7025ab40c5bf9c2e2b0dae99ad09a Merge: 651022382c7f8 3c259a1c36636 Author: Bjorn Helgaas Date: Wed Jan 2 15:31:02 2019 -0600 Merge branch 'pci/aspm' - Remove unused lists from ASPM pcie_link_state (Frederick Lawler) * pci/aspm: PCI/ASPM: Remove unused lists from struct pcie_link_state commit e49cddcd0ab08f2a3bf3fea8554ea45ae1446d26 Author: Tiecheng Zhou Date: Mon Dec 24 08:55:45 2018 +0800 drm/amdgpu/gfx_v8_0: Reorder the gfx, kiq and kcq rings test sequence The kiq ring and the very first compute ring may fail occasionally if they are tested directly following kiq_kcq_enable. Insert the gfx ring test before kiq ring test to delay the kiq and kcq ring tests will fix the issue. Acked-by: Alex Deucher Signed-off-by: Tiecheng Zhou Signed-off-by: Alex Deucher commit b8cf66182eddb22e9c7539821ed6eecdb4f86d1a Author: Emily Deng Date: Sat Dec 29 17:46:05 2018 +0800 drm/amdgpu/sriov:Correct pfvf exchange logic The pfvf exchange need be in exclusive mode. And add pfvf exchange in gpu reset. Signed-off-by: Emily Deng Reviewed-By: Xiangliang Yu Signed-off-by: Alex Deucher commit 048b9b0f5ceefb2691834ac62f8459ebb7d3100e Author: Evan Quan Date: Thu Dec 27 14:23:30 2018 +0800 drm/amd/powerplay: support BOOTUP_DEFAULT power profile mode This can avoid unexpected profile mode change after running compute workload. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit baf3c982dfbf7b0742039e6fef3f1fe1ba4079ab Author: Emily Deng Date: Wed Dec 26 18:08:54 2018 +0800 drm/amdgpu/virtual_dce: No need to pin the cursor bo For virtual display feature, no need to pin cursor bo. Signed-off-by: Emily Deng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 47bbcc1e92385b595e92e11e29076185c820a0b8 Author: Emily Deng Date: Wed Dec 26 18:09:33 2018 +0800 drm/amdgpu/virtual_dce: No need to pin the fb's bo For virtual display, no need to pin the fb's bo. Signed-off-by: Emily Deng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 85f78456f286da46fb054c7d45e4193cb757ac83 Merge: cacf02df4b84d 574d356b7a02c Author: Linus Torvalds Date: Wed Jan 2 12:11:01 2019 -0800 Merge tag '9p-for-4.21' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "Missing prototype warning fix and a syzkaller fix when a 9p server advertises a too small msize" * tag '9p-for-4.21' of git://github.com/martinetd/linux: 9p/net: put a lower bound on msize net/9p: include trans_common.h to fix missing prototype warning. commit cacf02df4b84d261d76db3d290ccb6b951df28c0 Merge: 74673fc50babc fea170804b4dc Author: Linus Torvalds Date: Wed Jan 2 12:08:29 2019 -0800 Merge tag '4.21-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: - four fixes for stable - improvements to DFS including allowing failover to alternate targets - some small performance improvements * tag '4.21-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: (39 commits) cifs: update internal module version number cifs: we can not use small padding iovs together with encryption cifs: Minor Kconfig clarification cifs: Always resolve hostname before reconnecting cifs: Add support for failover in cifs_reconnect_tcon() cifs: Add support for failover in smb2_reconnect() cifs: Only free DFS target list if we actually got one cifs: start DFS cache refresher in cifs_mount() cifs: Use GFP_ATOMIC when a lock is held in cifs_mount() cifs: Add support for failover in cifs_reconnect() cifs: Add support for failover in cifs_mount() cifs: remove set but not used variable 'sep' cifs: Make use of DFS cache to get new DFS referrals cifs: minor updates to documentation cifs: check kzalloc return cifs: remove set but not used variable 'server' cifs: Use kzfree() to free password cifs: Fix to use kmem_cache_free() instead of kfree() cifs: update for current_kernel_time64() removal cifs: Add DFS cache routines ... commit 74673fc50babc9be22b32c4ce697fceb51c7671a Merge: 19f2e267a5d0d 0db51ef26e878 Author: Linus Torvalds Date: Wed Jan 2 11:05:43 2019 -0800 Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull TPM updates from James Morris: - Support for partial reads of /dev/tpm0. - Clean up for TPM 1.x code: move the commands to tpm1-cmd.c and make everything to use the same data structure for building TPM commands i.e. struct tpm_buf. * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (25 commits) tpm: add support for partial reads tpm: tpm_ibmvtpm: fix kdoc warnings tpm: fix kdoc for tpm2_flush_context_cmd() tpm: tpm_try_transmit() refactor error flow. tpm: use u32 instead of int for PCR index tpm1: reimplement tpm1_continue_selftest() using tpm_buf tpm1: reimplement SAVESTATE using tpm_buf tpm1: rename tpm1_pcr_read_dev to tpm1_pcr_read() tpm1: implement tpm1_pcr_read_dev() using tpm_buf structure tpm: tpm1: rewrite tpm1_get_random() using tpm_buf structure tpm: tpm-space.c remove unneeded semicolon tpm: tpm-interface.c drop unused macros tpm: add tpm_auto_startup() into tpm-interface.c tpm: factor out tpm_startup function tpm: factor out tpm 1.x pm suspend flow into tpm1-cmd.c tpm: move tpm 1.x selftest code from tpm-interface.c tpm1-cmd.c tpm: factor out tpm1_get_random into tpm1-cmd.c tpm: move tpm_getcap to tpm1-cmd.c tpm: move tpm1_pcr_extend to tpm1-cmd.c tpm: factor out tpm_get_timeouts() ... commit 19f2e267a5d0d26282a64f8f788c482852c95324 Merge: 1ac5cd4978794 20bb4cb4fb9fb Author: Linus Torvalds Date: Wed Jan 2 10:56:09 2019 -0800 Merge branch 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull smack updates from James Morris: "Two Smack patches for 4.21. Jose's patch adds missing documentation and Zoran's fleshes out the access checks on keyrings" * 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: Smack: Improve Documentation smack: fix access permissions for keyring commit 1ac5cd4978794bd060d448acc0305e9fc996ba92 Author: Linus Torvalds Date: Wed Jan 2 10:46:03 2019 -0800 block: don't use un-ordered __set_current_state(TASK_UNINTERRUPTIBLE) This mostly reverts commit 849a370016a5 ("block: avoid ordered task state change for polled IO"). It was wrongly claiming that the ordering wasn't necessary. The memory barrier _is_ necessary. If something is truly polling and not going to sleep, it's the whole state setting that is unnecessary, not the memory barrier. Whenever you set your state to a sleeping state, you absolutely need the memory barrier. Note that sometimes the memory barrier can be elsewhere. For example, the ordering might be provided by an external lock, or by setting the process state to sleeping before adding yourself to the wait queue list that is used for waking up (where the wait queue lock itself will guarantee that any wakeup will correctly see the sleeping state). But none of those cases were true here. NOTE! Some of the polling paths may indeed be able to drop the state setting entirely, at which point the memory barrier also goes away. (Also note that this doesn't revert the TASK_RUNNING cases: there is no race between a wakeup and setting the process state to TASK_RUNNING, since the end result doesn't depend on ordering). Cc: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Linus Torvalds commit d63967e475ae10f286dbd35e189cb241e0b1f284 Author: Eric Dumazet Date: Wed Jan 2 09:20:27 2019 -0800 isdn: fix kernel-infoleak in capi_unlocked_ioctl Since capi_ioctl() copies 64 bytes after calling capi20_get_manufacturer() we need to ensure to not leak information to user. BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 CPU: 0 PID: 11245 Comm: syz-executor633 Not tainted 4.20.0-rc7+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x173/0x1d0 lib/dump_stack.c:113 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613 kmsan_internal_check_memory+0x9d4/0xb00 mm/kmsan/kmsan.c:704 kmsan_copy_to_user+0xab/0xc0 mm/kmsan/kmsan_hooks.c:601 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 capi_ioctl include/linux/uaccess.h:177 [inline] capi_unlocked_ioctl+0x1a0b/0x1bf0 drivers/isdn/capi/capi.c:939 do_vfs_ioctl+0xebd/0x2bf0 fs/ioctl.c:46 ksys_ioctl fs/ioctl.c:713 [inline] __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x440019 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffdd4659fb8 EFLAGS: 00000213 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440019 RDX: 0000000020000080 RSI: 00000000c0044306 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000213 R12: 00000000004018a0 R13: 0000000000401930 R14: 0000000000000000 R15: 0000000000000000 Local variable description: ----data.i@capi_unlocked_ioctl Variable was created at: capi_ioctl drivers/isdn/capi/capi.c:747 [inline] capi_unlocked_ioctl+0x82/0x1bf0 drivers/isdn/capi/capi.c:939 do_vfs_ioctl+0xebd/0x2bf0 fs/ioctl.c:46 Bytes 12-63 of 64 are uninitialized Memory access of size 64 starts at ffff88807ac5fce8 Data copied to user address 0000000020000080 Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Karsten Keil Signed-off-by: David S. Miller commit 7adf3246092f5e87ed0fa610e8088fae416c581f Author: Stefano Brivio Date: Wed Jan 2 13:29:27 2019 +0100 ipv6: route: Fix return value of ip6_neigh_lookup() on neigh_create() error In ip6_neigh_lookup(), we must not return errors coming from neigh_create(): if creation of a neighbour entry fails, the lookup should return NULL, in the same way as it's done in __neigh_lookup(). Otherwise, callers legitimately checking for a non-NULL return value of the lookup function might dereference an invalid pointer. For instance, on neighbour table overflow, ndisc_router_discovery() crashes ndisc_update() by passing ERR_PTR(-ENOBUFS) as 'neigh' argument. Reported-by: Jianlin Shi Fixes: f8a1b43b709d ("net/ipv6: Create a neigh_lookup for FIB entries") Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 202700e30740c6568b5a6943662f3829566dd533 Author: Eric Dumazet Date: Wed Jan 2 04:24:20 2019 -0800 net/hamradio/6pack: use mod_timer() to rearm timers Using del_timer() + add_timer() is generally unsafe on SMP, as noticed by syzbot. Use mod_timer() instead. kernel BUG at kernel/time/timer.c:1136! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 1026 Comm: kworker/u4:4 Not tainted 4.20.0+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc RIP: 0010:add_timer kernel/time/timer.c:1136 [inline] RIP: 0010:add_timer+0xa81/0x1470 kernel/time/timer.c:1134 Code: 4d 89 7d 40 48 c7 85 70 fe ff ff 00 00 00 00 c7 85 7c fe ff ff ff ff ff ff 48 89 85 90 fe ff ff e9 e6 f7 ff ff e8 cf 42 12 00 <0f> 0b e8 c8 42 12 00 0f 0b e8 c1 42 12 00 4c 89 bd 60 fe ff ff e9 RSP: 0018:ffff8880a7fdf5a8 EFLAGS: 00010293 RAX: ffff8880a7846340 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff816f3ee1 RDI: ffff88808a514ff8 RBP: ffff8880a7fdf760 R08: 0000000000000007 R09: ffff8880a7846c58 R10: ffff8880a7846340 R11: 0000000000000000 R12: ffff88808a514ff8 R13: ffff88808a514ff8 R14: ffff88808a514dc0 R15: 0000000000000030 FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000061c500 CR3: 00000000994d9000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: decode_prio_command drivers/net/hamradio/6pack.c:903 [inline] sixpack_decode drivers/net/hamradio/6pack.c:971 [inline] sixpack_receive_buf drivers/net/hamradio/6pack.c:457 [inline] sixpack_receive_buf+0xf9c/0x1470 drivers/net/hamradio/6pack.c:434 tty_ldisc_receive_buf+0x164/0x1c0 drivers/tty/tty_buffer.c:465 tty_port_default_receive_buf+0x114/0x190 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:481 [inline] flush_to_ldisc+0x3b2/0x590 drivers/tty/tty_buffer.c:533 process_one_work+0xd0c/0x1ce0 kernel/workqueue.c:2153 worker_thread+0x143/0x14a0 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Andreas Koensgen Signed-off-by: David S. Miller commit 53fe3ed19df0bca6ce752fae8e483910b6f112f6 Author: Xue Chaojing Date: Tue Jan 1 19:39:33 2019 +0000 net-next/hinic:add shutdown callback If there is no shutdown callback, our board will report pcie UNF errors after restarting. This patch add shutdown callback for hinic. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit d9a7fa67b4bfe6ce93ee9aab23ae2e7ca0763e84 Merge: f218a29c25ad8 55b8cbe470d10 Author: Linus Torvalds Date: Wed Jan 2 09:48:13 2019 -0800 Merge branch 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull seccomp updates from James Morris: - Add SECCOMP_RET_USER_NOTIF - seccomp fixes for sparse warnings and s390 build (Tycho) * 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: seccomp, s390: fix build for syscall type change seccomp: fix poor type promotion samples: add an example of seccomp user trap seccomp: add a return code to trap to userspace seccomp: switch system call argument type to void * seccomp: hoist struct seccomp_data recalculation higher commit 399382f8018204407174f0229b4087d40e1cdc82 Author: Bartlomiej Zolnierkiewicz Date: Wed Jan 2 18:47:37 2019 +0100 drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig Making FB_BACKLIGHT tristate by commit b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") caused unmet dependencies in some configurations: WARNING: unmet direct dependencies detected for FB_BACKLIGHT Depends on [m]: HAS_IOMEM [=y] && FB [=m] Selected by [y]: - DRM_NOUVEAU [=y] && HAS_IOMEM [=y] && DRM [=y] && PCI [=y] && MMU [=y] && DRM_NOUVEAU_BACKLIGHT [=y] Selected by [m]: - FB_NVIDIA [=m] && HAS_IOMEM [=y] && FB [=m] && PCI [=y] && FB_NVIDIA_BACKLIGHT [=y] Fix it by making DRM_NOUVEAU select BACKLIGHT_CLASS_DEVICE and BACKLIGHT_LCD_SUPPORT instead of FB_BACKLIGHT. Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Cc: Rob Clark Cc: Arnd Bergmann Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz commit f218a29c25ad8abdb961435d6b8139f462061364 Merge: 8e143b90e4d45 c7f7e58fcbf33 Author: Linus Torvalds Date: Wed Jan 2 09:43:14 2019 -0800 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull integrity updates from James Morris: "In Linux 4.19, a new LSM hook named security_kernel_load_data was upstreamed, allowing LSMs and IMA to prevent the kexec_load syscall. Different signature verification methods exist for verifying the kexec'ed kernel image. This adds additional support in IMA to prevent loading unsigned kernel images via the kexec_load syscall, independently of the IMA policy rules, based on the runtime "secure boot" flag. An initial IMA kselftest is included. In addition, this pull request defines a new, separate keyring named ".platform" for storing the preboot/firmware keys needed for verifying the kexec'ed kernel image's signature and includes the associated IMA kexec usage of the ".platform" keyring. (David Howell's and Josh Boyer's patches for reading the preboot/firmware keys, which were previously posted for a different use case scenario, are included here)" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: integrity: Remove references to module keyring ima: Use inode_is_open_for_write ima: Support platform keyring for kernel appraisal efi: Allow the "db" UEFI variable to be suppressed efi: Import certificates from UEFI Secure Boot efi: Add an EFI signature blob parser efi: Add EFI signature data types integrity: Load certs to the platform keyring integrity: Define a trusted platform keyring selftests/ima: kexec_load syscall test ima: don't measure/appraise files on efivarfs x86/ima: retry detecting secure boot mode docs: Extend trusted keys documentation for TPM 2.0 x86/ima: define arch_get_ima_policy() for x86 ima: add support for arch specific policies ima: refactor ima_init_policy() ima: prevent kexec_load syscall based on runtime secureboot flag x86/ima: define arch_ima_get_secureboot integrity: support new struct public_key_signature encoding field commit 260f71eff493a844531629854c0935fa8de4fa2c Author: Yangtao Li Date: Fri Dec 21 10:59:36 2018 -0500 sunrpc: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Anna Schumaker commit 10e037d1e0d5d93cc057e4fad6911e481a462407 Author: Santosh kumar pradhan Date: Wed Dec 19 12:29:57 2018 +0530 sunrpc: Add xprt after nfs4_test_session_trunk() Multipathing: In case of NFSv3, rpc_clnt_test_and_add_xprt() adds the xprt to xprt switch (i.e. xps) if rpc_call_null_helper() returns success. But in case of NFSv4.1, it needs to do EXCHANGEID to verify the path along with check for session trunking. Add the xprt in nfs4_test_session_trunk() only when nfs4_detect_session_trunking() returns success. Also release refcount hold by rpc_clnt_setup_test_and_add_xprt(). Signed-off-by: Santosh kumar pradhan Tested-by: Suresh Jayaraman Reported-by: Aditya Agnihotri Signed-off-by: Anna Schumaker commit cb24e35b4fa8448e7ee963884958235b8de44f25 Author: J. Bruce Fields Date: Thu Dec 20 10:42:36 2018 -0500 sunrpc: convert unnecessary GFP_ATOMIC to GFP_NOFS It's OK to sleep here, we just don't want to recurse into the filesystem as a writeout could be waiting on this. Future work: the documentation for GFP_NOFS says "Please try to avoid using this flag directly and instead use memalloc_nofs_{save,restore} to mark the whole scope which cannot/shouldn't recurse into the FS layer with a short explanation why. All allocation requests will inherit GFP_NOFS implicitly." But I'm not sure where to do this. Should the workqueue be arranging that for us in the case of workqueues created with WQ_MEM_RECLAIM? Reported-by: Trond Myklebust Signed-off-by: J. Bruce Fields Signed-off-by: Anna Schumaker commit 81c88b18de1f11f70c97f28ced8d642c00bb3955 Author: J. Bruce Fields Date: Thu Dec 20 10:35:11 2018 -0500 sunrpc: handle ENOMEM in rpcb_getport_async If we ignore the error we'll hit a null dereference a little later. Reported-by: syzbot+4b98281f2401ab849f4b@syzkaller.appspotmail.com Signed-off-by: J. Bruce Fields Signed-off-by: Anna Schumaker commit c2c7d84fd173aff121ffd45cf15277eff43348d3 Author: NeilBrown Date: Thu Dec 20 10:29:55 2018 +1100 NFS: remove unnecessary test for IS_ERR(cred) As gte_current_cred() cannot return an error, this test is not necessary. It hasn't been necessary for years, but it wasn't so obvious before. Reported-by: Dan Carpenter Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 07e10308ee5da8e6132e0b737ece1c99dd651fb6 Author: Chuck Lever Date: Fri Dec 7 11:11:44 2018 -0500 xprtrdma: Prevent leak of rpcrdma_rep objects If a reply has been processed but the RPC is later retransmitted anyway, the req->rl_reply field still contains the only pointer to the old rpcrdma rep. When the next reply comes in, the reply handler will stomp on the rl_reply field, leaking the old rep. A trace event is added to capture such leaks. This problem seems to be worsened by the restructuring of the RPC Call path in v4.20. Fully addressing this issue will require at least a re-architecture of the disconnect logic, which is not appropriate during -rc. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 9aeaf8cfcb71f3663737bc21b93da7e1b8845c0d Author: Olga Kornievskaia Date: Thu Dec 6 11:10:36 2018 -0500 NFSv4.2 fix async copy reboot recovery Original commit (e4648aa4f98a "NFS recover from destination server reboot for copies") used memcmp() and then it was changed to use nfs4_stateid_match_other() but that function returns opposite of memcmp. As the result, recovery can't find the copy leading to copy hanging. Fixes: 80f42368868e ("NFSv4: Split out NFS v4.2 copy completion functions") Fixes: cb7a8384dc02 ("NFS: Split out the body of nfs4_reclaim_open_state") Signed-of-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit f85adb1bf59557909f86f71cf4b1e5a906bdb465 Author: Chuck Lever Date: Wed Dec 19 11:00:48 2018 -0500 xprtrdma: Don't leak freed MRs Defensive clean up. Don't set frwr->fr_mr until we know that the scatterlist allocation has succeeded. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit af65ed404c437684c9f58d0c37495abedcdfa3fc Author: Chuck Lever Date: Wed Dec 19 11:00:37 2018 -0500 xprtrdma: Add documenting comment for rpcrdma_buffer_destroy Make a note of the function's dependency on an earlier ib_drain_qp. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 995d312a28cc2a6a5640ceb2dcbdfde37d050c07 Author: Chuck Lever Date: Wed Dec 19 11:00:32 2018 -0500 xprtrdma: Replace outdated comment for rpcrdma_ep_post Since commit 7c8d9e7c8863 ("xprtrdma: Move Receive posting to Receive handler"), rpcrdma_ep_post is no longer responsible for posting Receive buffers. Update the documenting comment to reflect this change. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit e0f86bc4f990edb56440640964fdcf3f3cf4e240 Author: Chuck Lever Date: Wed Dec 19 11:00:27 2018 -0500 xprtrdma: Update comments in frwr_op_send Commit f2877623082b ("xprtrdma: Chain Send to FastReg WRs") was written before commit ce5b37178283 ("xprtrdma: Replace all usage of "frmr" with "frwr""), but was merged afterwards. Thus it still refers to FRMR and MWs. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit acf0a39f4f277d0cb7178be5ec8a808c6c2bcd9c Author: Chuck Lever Date: Wed Dec 19 11:00:22 2018 -0500 SUNRPC: Fix some kernel doc complaints Clean up some warnings observed when building with "make W=1". Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit dc5820bd21d84ee34770b0a1e2fca9378f8f7456 Author: Chuck Lever Date: Wed Dec 19 11:00:16 2018 -0500 SUNRPC: Simplify defining common RPC trace events Clean up, no functional change is expected. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 5b2095d0cefa218deca156eecbe0c656e5766129 Author: Chuck Lever Date: Wed Dec 19 11:00:11 2018 -0500 NFS: Fix NFSv4 symbolic trace point output These symbolic values were not being displayed in string form. TRACE_DEFINE_ENUM was missing in many cases. It also turns out that __print_symbolic wants an unsigned long in the first field... Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 53b2c1cb9b3cd901a200ddbbf08c77eabf1ab3e9 Author: Chuck Lever Date: Wed Dec 19 11:00:06 2018 -0500 xprtrdma: Trace mapping, alloc, and dereg failures These are rare, but can be helpful at tracking down DMAR and other problems. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 395069fc37e7a76280b176c0327d1ead6ca29838 Author: Chuck Lever Date: Wed Dec 19 11:00:00 2018 -0500 xprtrdma: Add trace points for calls to transport switch methods Name them "trace_xprtrdma_op_*" so they can be easily enabled as a group. No trace point is added where the generic layer already has observability. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ba217ec64aef91f40c3cbdbfb0ab3a4000782504 Author: Chuck Lever Date: Wed Dec 19 10:59:55 2018 -0500 xprtrdma: Relocate the xprtrdma_mr_map trace points The mr_map trace points were capturing information about the previous use of the MR rather than about the segment that was just mapped. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit aba11831794356ff58da69de46a125e6335eb9ca Author: Chuck Lever Date: Wed Dec 19 10:59:49 2018 -0500 xprtrdma: Clean up of xprtrdma chunk trace points The chunk-related trace points capture nearly the same information as the MR-related trace points. Also, rename them so globbing can be used to enable or disable these trace points more easily. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 9bef848f44b4316fbe12e364eea527bd59fa1ed3 Author: Chuck Lever Date: Wed Dec 19 10:59:44 2018 -0500 xprtrdma: Remove unused fields from rpcrdma_ia Clean up. The last use of these fields was in commit 173b8f49b3af ("xprtrdma: Demote "connect" log messages") . Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ddbb347f0c68a66cb20b78af4bc318b10d30e425 Author: Chuck Lever Date: Wed Dec 19 10:59:39 2018 -0500 xprtrdma: Cull dprintk() call sites Clean up: Remove dprintk() call sites that report rare or impossible errors. Leave a few that display high-value low noise status information. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 92f4433e567a034d87e1e2c9e5402ff5f58b545b Author: Chuck Lever Date: Wed Dec 19 10:59:33 2018 -0500 xprtrdma: Simplify locking that protects the rl_allreqs list Clean up: There's little chance of contention between the use of rb_lock and rb_reqslock, so merge the two. This avoids having to take both in some (possibly future) cases. Transport tear-down is already serialized, thus there is no need for locking at all when destroying rpcrdma_reqs. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 236b0943d1f21335a0fc4324f3bcc455cf99dfb7 Author: Chuck Lever Date: Wed Dec 19 10:59:28 2018 -0500 xprtrdma: Expose transport header errors For better observability of parsing errors, return the error code generated in the decoders to the upper layer consumer. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 889ee07f7ed26bb2cc525eb48f7f865bc407ef0b Author: Chuck Lever Date: Wed Dec 19 10:59:23 2018 -0500 xprtrdma: Remove request_module from backchannel Since commit ffe1f0df5862 ("rpcrdma: Merge svcrdma and xprtrdma modules into one"), the forward and backchannel components are part of the same kernel module. A separate request_module() call in the backchannel code is no longer necessary. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 15303d9ecd2f29168aea0b080bd1ec27c298da3f Author: Chuck Lever Date: Wed Dec 19 10:59:17 2018 -0500 xprtrdma: Recognize XDRBUF_SPARSE_PAGES Commit 431f6eb3570f ("SUNRPC: Add a label for RPC calls that require allocation on receive") didn't update similar logic in rpc_rdma.c. I don't think this is a bug, per-se; the commit just adds more careful checking for broken upper layer behavior. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 0dfbb5f05e7888903e7e1da6c2c4aa017ee1a207 Author: Chuck Lever Date: Wed Dec 19 10:59:12 2018 -0500 NFS: Make "port=" mount option optional for RDMA mounts Having to specify "proto=rdma,port=20049" is cumbersome. RFC 8267 Section 6.3 requires NFSv4 clients to use "the alternative well-known port number", which is 20049. Make the use of the well- known port number automatic, just as it is for NFS/TCP and port 2049. For NFSv2/3, Section 4.2 allows clients to simply choose 20049 as the default or use rpcbind. I don't know of an NFS/RDMA server implementation that registers it's NFS/RDMA service with rpcbind, so automatically choosing 20049 seems like the better choice. The other widely-deployed NFS/RDMA client, Solaris, also uses 20049 as the default port. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 0a93fbcb16e6b1f36780f9a20d6427f26cec761d Author: Chuck Lever Date: Wed Dec 19 10:59:07 2018 -0500 xprtrdma: Plant XID in on-the-wire RDMA offset (FRWR) Place the associated RPC transaction's XID in the upper 32 bits of each RDMA segment's rdma_offset field. There are two reasons to do this: - The R_key only has 8 bits that are different from registration to registration. The XID adds more uniqueness to each RDMA segment to reduce the likelihood of a software bug on the server reading from or writing into memory it's not supposed to. - On-the-wire RDMA Read and Write requests do not otherwise carry any identifier that matches them up to an RPC. The XID in the upper 32 bits will act as an eye-catcher in network captures. Suggested-by: Tom Talpey Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 5f62412be3ff738c9575b28c1f4a9b010ac22316 Author: Chuck Lever Date: Wed Dec 19 10:59:01 2018 -0500 xprtrdma: Remove rpcrdma_memreg_ops Clean up: Now that there is only FRWR, there is no need for a memory registration switch. The indirect calls to the memreg operations can be replaced with faster direct calls. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ba69cd122ece618eba47589764c7f9c1f57aed95 Author: Chuck Lever Date: Wed Dec 19 10:58:56 2018 -0500 xprtrdma: Remove support for FMR memory registration FMR is not supported on most recent RDMA devices. It is also less secure than FRWR because an FMR memory registration can expose adjacent bytes to remote reading or writing. As discussed during the RDMA BoF at LPC 2018, it is time to remove support for FMR in the NFS/RDMA client stack. Note that NFS/RDMA server-side uses either local memory registration or FRWR. FMR is not used. There are a few Infiniband/RoCE devices in the kernel tree that do not appear to support MEM_MGT_EXTENSIONS (FRWR), and therefore will not support client-side NFS/RDMA after this patch. These are: - mthca - qib - hns (RoCE) Users of these devices can use NFS/TCP on IPoIB instead. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit a78868497c2e4858e2c73818eed7b4877ab2316d Author: Chuck Lever Date: Wed Dec 19 10:58:51 2018 -0500 xprtrdma: Reduce max_frwr_depth Some devices advertise a large max_fast_reg_page_list_len capability, but perform optimally when MRs are significantly smaller than that depth -- probably when the MR itself is no larger than a page. By default, the RDMA R/W core API uses max_sge_rd as the maximum page depth for MRs. For some devices, the value of max_sge_rd is 1, which is also not optimal. Thus, when max_sge_rd is larger than 1, use that value. Otherwise use the value of the max_fast_reg_page_list_len attribute. I've tested this with CX-3 Pro, FastLinq, and CX-5 devices. It reproducibly improves the throughput of large I/Os by several percent. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6946f82380a83acb7023fab9d7033e1f016cb818 Author: Chuck Lever Date: Wed Dec 19 10:58:45 2018 -0500 xprtrdma: Fix ri_max_segs and the result of ro_maxpages With certain combinations of krb5i/p, MR size, and r/wsize, I/O can fail with EMSGSIZE. This is because the calculated value of ri_max_segs (the max number of MRs per RPC) exceeded RPCRDMA_MAX_HDR_SEGS, which caused Read or Write list encoding to walk off the end of the transport header. Once that was addressed, the ro_maxpages result has to be corrected to account for the number of MRs needed for Reply chunks, which is 2 MRs smaller than a normal Read or Write chunk. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 0c0829bcf51aef713806e49b8ea2bac7962f54e2 Author: Chuck Lever Date: Wed Dec 19 10:58:40 2018 -0500 xprtrdma: Don't wake pending tasks until disconnect is done Transport disconnect processing does a "wake pending tasks" at various points. Suppose an RPC Reply is being processed. The RPC task that Reply goes with is waiting on the pending queue. If a disconnect wake-up happens before reply processing is done, that reply, even if it is good, is thrown away, and the RPC has to be sent again. This window apparently does not exist for socket transports because there is a lock held while a reply is being received which prevents the wake-up call until after reply processing is done. To resolve this, all RPC replies being processed on an RPC-over-RDMA transport have to complete before pending tasks are awoken due to a transport disconnect. Callers that already hold the transport write lock may invoke ->ops->close directly. Others use a generic helper that schedules a close when the write lock can be taken safely. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 3d433ad812baad45fa697f1af45a651147360712 Author: Chuck Lever Date: Wed Dec 19 10:58:35 2018 -0500 xprtrdma: No qp_event disconnect After thinking about this more, and auditing other kernel ULP imple- mentations, I believe that a DISCONNECT cm_event will occur after a fatal QP event. If that's the case, there's no need for an explicit disconnect in the QP event handler. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6d2d0ee27c7a12371a0ca51a5db414204901228c Author: Chuck Lever Date: Wed Dec 19 10:58:29 2018 -0500 xprtrdma: Replace rpcrdma_receive_wq with a per-xprt workqueue To address a connection-close ordering problem, we need the ability to drain the RPC completions running on rpcrdma_receive_wq for just one transport. Give each transport its own RPC completion workqueue, and drain that workqueue when disconnecting the transport. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6ceea36890a01aa626ce08487eecc5fb43e749b1 Author: Chuck Lever Date: Wed Dec 19 10:58:24 2018 -0500 xprtrdma: Refactor Receive accounting Clean up: Divide the work cleanly: - rpcrdma_wc_receive is responsible only for RDMA Receives - rpcrdma_reply_handler is responsible only for RPC Replies - the posted send and receive counts both belong in rpcrdma_ep Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b674c4b4a13dc3d37f1b4a449f3b9515f9a30615 Author: Chuck Lever Date: Wed Dec 19 10:58:19 2018 -0500 xprtrdma: Ensure MRs are DMA-unmapped when posting LOCAL_INV fails The recovery case in frwr_op_unmap_sync needs to DMA unmap each MR. frwr_release_mr does not DMA-unmap, but the recycle worker does. Fixes: 61da886bf74e ("xprtrdma: Explicitly resetting MRs is ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit e2f34e26710bfaa545a9d9cd0c70137406401467 Author: Chuck Lever Date: Wed Dec 19 10:58:13 2018 -0500 xprtrdma: Yet another double DMA-unmap While chasing yet another set of DMAR fault reports, I noticed that the frwr recycler conflates whether or not an MR has been DMA unmapped with frwr->fr_state. Actually the two have only an indirect relationship. It's in fact impossible to guess reliably whether the MR has been DMA unmapped based on its fr_state field, especially as the surrounding code and its assumptions have changed over time. A better approach is to track the DMA mapping status explicitly so that the recycler is less brittle to unexpected situations, and attempts to DMA-unmap a second time are prevented. Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org # v4.20 Signed-off-by: Anna Schumaker commit 2f1927b090345d7e65e6e873baba1599b18a0e26 Author: Moni Shoua Date: Wed Dec 26 21:42:12 2018 +0200 IB/core: Add advise_mr to the list of known ops We need to add advise_mr to the list of operation setters on the ib_device or otherwise callers to ib_set_device_ops() for advise_mr operation will not have their callback registered. When the advise_mr series was merged with the device ops series the SET_DEVICE_OPS() was missed. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Signed-off-by: Moni Shoua Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ccffa545485714dcb001c78ffaa575a8192ed5e4 Author: Leon Romanovsky Date: Wed Dec 26 15:22:12 2018 +0200 Revert "IB/mlx5: Fix long EEH recover time with NVMe offloads" Longer term testing shows this patch didn't play well with MR cache and caused to call traces during remove_mkeys(). This reverts commit bb7e22a8ab00ff9ba911a45ba8784cef9e6d6f7a. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7422edce73559d2985f322145c865cea2da3c152 Author: Yishai Hadas Date: Sun Dec 23 13:12:21 2018 +0200 IB/mlx5: Allow XRC INI usage via verbs in DEVX context From device point of view both XRC target and initiator are XRC transport type. Fix to use the expected UID as was handled for the XRC target case to allow its usage via verbs in DEVX context. Fixes: 5aa3771ded54 ("IB/mlx5: Allow XRC usage via verbs in DEVX context") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e6587cdbd732eacb4c7ce592ed46f7bbcefb655f Author: Stefano Stabellini Date: Fri Dec 21 15:06:33 2018 -0800 pvcalls-back: set -ENOTCONN in pvcalls_conn_back_read When a connection is closing we receive on pvcalls_sk_state_change notification. Instead of setting the connection as closed immediately (-ENOTCONN), let's read one more time from it: pvcalls_conn_back_read will set the connection as closed when necessary. That way, we avoid races between pvcalls_sk_state_change and pvcalls_back_ioworker. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit d90a1ca60a1eccb4383fe203c76223ab4c0799ed Author: Stefano Stabellini Date: Fri Dec 21 15:06:32 2018 -0800 pvcalls-front: don't return error when the ring is full When the ring is full, size == array_size. It is not an error condition, so simply return 0 instead of an error. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit beee1fbe8f7d57d6ebaa5188f9f4db89c2077196 Author: Stefano Stabellini Date: Fri Dec 21 15:06:31 2018 -0800 pvcalls-front: properly allocate sk Don't use kzalloc: it ends up leaving sk->sk_prot not properly initialized. Use sk_alloc instead and define our own trivial struct proto. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 96283f9a084e23d7cda2d3c5d1ffa6df6cf1ecec Author: Stefano Stabellini Date: Fri Dec 21 15:06:30 2018 -0800 pvcalls-front: don't try to free unallocated rings inflight_req_id is 0 when initialized. If inflight_req_id is 0, there is no accept_map to free. Fix the check in pvcalls_front_release. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit b79470b64fa9266948d1ce8d825ced94c4f63293 Author: Stefano Stabellini Date: Fri Dec 21 15:06:29 2018 -0800 pvcalls-front: read all data before closing the connection When a connection is closing in_error is set to ENOTCONN. There could still be outstanding data on the ring left by the backend. Before closing the connection on the frontend side, drain the ring. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit f50fd2d8524c15b08da9e7e9d84752f0f1be7172 Author: Guo Ren Date: Wed Jan 2 22:09:25 2019 +0800 csky: Add perf support for C-SKY This adds basic perf support for all C-SKY CPUs. Hardware events are only supported by 807/810/860. Signed-off-by: Guo Ren commit b25756df5b28cd7b6e91200fc5012e7c76e8ec69 Author: Adrian Hunter Date: Fri Dec 21 14:06:20 2018 +0200 perf session: Add comment for perf_session__register_idle_thread() Add a comment to perf_session__register_idle_thread() to bring attention to a pitfall with the idle task thread structure. The pitfall is that there should really be a 'struct thread' for the idle task of each cpu, but there is only one that can have pid == tid == 0. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 256d92bc93fd40411a02be5cdba74a7bf91e6e09 Author: Adrian Hunter Date: Fri Dec 21 14:06:19 2018 +0200 perf thread-stack: Fix thread stack processing for the idle task perf creates a single 'struct thread' to represent the idle task. That is because threads are identified by PID and TID, and the idle task always has PID == TID == 0. However, there are actually separate idle tasks for each CPU. That creates a problem for thread stack processing which assumes that each thread has a single stack, not one stack per CPU. Fix that by passing through the CPU number, and in the case of the idle "thread", pick the thread stack from an array based on the CPU number. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 139f42f3b3b495e61bb2cfef40e1dd5e845e3052 Author: Adrian Hunter Date: Fri Dec 21 14:06:18 2018 +0200 perf thread-stack: Allocate an array of thread stacks In preparation for fixing thread stack processing for the idle task, allocate an array of thread stacks. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-7-adrian.hunter@intel.com [ No need to check for NULL when calling zfree(), noticed by Jiri Olsa ] Signed-off-by: Arnaldo Carvalho de Melo commit 2e9e8688763ff80f032d9a78c3b4b951fb6dd7a4 Author: Adrian Hunter Date: Fri Dec 21 14:06:17 2018 +0200 perf thread-stack: Factor out thread_stack__init() In preparation for fixing thread stack processing for the idle task, factor out thread_stack__init(). Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f6060ac60190c625101a0b94c2d96e9ca14a7d73 Author: Adrian Hunter Date: Fri Dec 21 14:06:16 2018 +0200 perf thread-stack: Allow for a thread stack array In preparation for fixing thread stack processing for the idle task, allow for a thread stack array. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bd8e68ace110941f375f5d566b0cd99fe80634b8 Author: Adrian Hunter Date: Fri Dec 21 14:06:15 2018 +0200 perf thread-stack: Avoid direct reference to the thread's stack In preparation for fixing thread stack processing for the idle task, avoid direct reference to the thread's stack. The thread stack will change to an array of thread stacks, at which point the meaning of the direct reference will change. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-4-adrian.hunter@intel.com [ Rename thread_stack__ts() to thread__stack() since this operates on a 'thread' struct ] Signed-off-by: Arnaldo Carvalho de Melo commit e0b8951190c11797971864c845e0909561525621 Author: Adrian Hunter Date: Fri Dec 21 14:06:14 2018 +0200 perf thread-stack: Tidy thread_stack__bottom() usage In preparation for fixing thread stack processing for the idle task, tidy thread_stack__bottom() usage. Specifically, the parameter 'thread' is not needed. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 03b32cb2810814756095dbd91fce0c77617d096b Author: Adrian Hunter Date: Fri Dec 21 14:06:13 2018 +0200 perf thread-stack: Simplify some code in thread_stack__process() In preparation for fixing thread stack processing for the idle task, simplify some code in thread_stack__process(). Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181221120620.9659-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9d216211fded20fff301d0317af3238d8383634c Author: Bjorn Andersson Date: Sun Dec 23 23:26:44 2018 -0800 thermal: generic-adc: Fix adc to temp interpolation First correct the edge case to return the last element if we're outside the range, rather than at the last element, so that interpolation is not omitted for points between the two last entries in the table. Then correct the formula to perform linear interpolation based the two points surrounding the read ADC value. The indices for temp are kept as "hi" and "lo" to pair with the adc indices, but there's no requirement that the temperature is provided in descendent order. mult_frac() is used to prevent issues with overflowing the int. Cc: Laxman Dewangan Signed-off-by: Bjorn Andersson Signed-off-by: Eduardo Valentin commit e36e13003efd8b0160d49138385b0cec570900aa Author: Yoshihiro Kaneko Date: Mon Dec 17 23:50:21 2018 +0900 thermal: rcar_thermal: add R8A77990 support Add support for R-Car E3 (R8A77990) thermal support. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Eduardo Valentin commit 6471a52deeea8bba8163a1f8c7aa309d4e287eb1 Author: Yoshihiro Kaneko Date: Mon Dec 17 23:50:20 2018 +0900 dt-bindings: thermal: rcar-thermal: add R8A77990 support Document the R-Car E3 (R8A77990) SoC bindings. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Eduardo Valentin commit b8d3d11203afddf9e6c4e8b8ccecd401b6a8cc3e Author: Fabrizio Castro Date: Thu Dec 13 20:23:10 2018 +0000 thermal: rcar_thermal: add R8A774C0 support Add thermal support for the RZ/G2E SoC (a.k.a. R8A774C0). Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Eduardo Valentin commit 69f8f55185ff2405366b1b193d3d2fea16589e54 Author: Fabrizio Castro Date: Thu Dec 13 20:19:48 2018 +0000 dt-bindings: thermal: rcar-thermal: add R8A774C0 support Document RZ/G2E SoC (a.k.a. r8a774c0) bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Eduardo Valentin commit bf9ff83f93baf4f404b7e3a90037604f86bea854 Author: Miquel Raynal Date: Wed Dec 12 10:36:43 2018 +0100 dt-bindings: cp110: document the thermal interrupt capabilities The thermal IP can produce interrupts on overheat situation. Describe them. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Eduardo Valentin commit 1bc7523817215f94d8597f4daccb17a394a5703a Author: Miquel Raynal Date: Wed Dec 12 10:36:42 2018 +0100 dt-bindings: ap806: document the thermal interrupt capabilities The thermal IP can produce interrupts on overheat situation. Describe them. Signed-off-by: Miquel Raynal Signed-off-by: Eduardo Valentin commit ad3e72030bff0cbd4409074374a2a0f37ca1e20d Author: Miquel Raynal Date: Wed Dec 12 10:36:41 2018 +0100 MAINTAINERS: thermal: add entry for Marvell MVEBU thermal driver Add myself as Marvell MVEBU thermal driver maintainer. Signed-off-by: Miquel Raynal Signed-off-by: Eduardo Valentin commit 879d7362d1d01efd476a143c09048f5945936c32 Author: Miquel Raynal Date: Wed Dec 12 10:36:40 2018 +0100 thermal: armada: add overheat interrupt support The IP can manage to trigger interrupts on overheat situation from all the sensors. However, the interrupt source changes along with the last selected source (ie. the last read sensor), which is an inconsistent behavior. Avoid possible glitches by always selecting back only one channel which will then be referenced as the "overheat_sensor" (arbitrarily: the first in the DT which has a critical trip point filled in). It is possible that the scan of all thermal zone nodes did not bring a critical trip point from which the overheat interrupt could be configured. In this case just complain but do not fail the probe. Also disable sensor switch during overheat situations because changing the channel while the system is too hot could clear the overheat state by changing the source while the temperature is still very high. Even if the overheat state is not declared, overheat interrupt must be cleared by reading the DFX interrupt cause _after_ the temperature has fallen down to the low threshold, otherwise future possible interrupts would not be served. A work polls the corresponding register until the overheat flag gets cleared in this case. Suggested-by: David Sniatkiwicz Signed-off-by: Miquel Raynal Signed-off-by: Eduardo Valentin commit 5a78ad6d9c1b2c3c3226528346e9794ed3504381 Author: Arnd Bergmann Date: Mon Dec 10 22:57:27 2018 +0100 thermal: st: fix Makefile typo When STM32_THERMAL is enabled, this overrides all previously enabled files in the same directory, as seen from this link failure: ERROR: "st_thermal_pm_ops" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! ERROR: "st_thermal_register" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! ERROR: "st_thermal_unregister" [drivers/thermal/st/st_thermal_syscfg.ko] undefined! The correct syntax in Makefile requires using += instead of :=. Fixes: 1d6931556073 ("thermal: add stm32 thermal driver") Signed-off-by: Arnd Bergmann Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit ca74472dead17ad8e5de92c054d71109ef8a4beb Author: Kunihiko Hayashi Date: Fri Dec 7 10:06:04 2018 +0900 thermal: uniphier: Convert to SPDX identifier This converts license boilerplate to SPDX identifier, and removes unnecessary lines. Signed-off-by: Kunihiko Hayashi Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 8632ed49c809160be3820cede35a7d0844c62c67 Author: Yangtao Li Date: Fri Nov 23 09:55:22 2018 -0500 thermal/intel_powerclamp: Change to use DEFINE_SHOW_ATTRIBUTE macro Use macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Eduardo Valentin commit 05c1b7058aeab8a121e9af57ef97233f83ebeb75 Author: Yangtao Li Date: Fri Nov 23 09:50:58 2018 -0500 thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro Use macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Eduardo Valentin commit 199bc54b4a1f3848a62ccb1fa22e9c43c352b8fa Author: Thierry Reding Date: Fri Nov 23 13:18:37 2018 +0100 dt-bindings: thermal: tegra-bpmp: Add Tegra194 support The thermal controller implementation on Tegra194 is very similar to the implementation on Tegra186. Add a compatible string for the new generation. Signed-off-by: Thierry Reding Signed-off-by: Eduardo Valentin commit 925b38361852ef314e9ecc649e830ad5319e3a65 Author: Anson Huang Date: Wed Nov 21 05:49:40 2018 +0000 thermal: imx: save one condition block for normal case of nvmem initialization Put return value checks of calling imx_init_from_nvmem_cells() into one block to save one condition block for normal case. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit c589c56671c914fbd6b56a6f92dce80edbbfdada Author: Anson Huang Date: Wed Nov 21 05:49:36 2018 +0000 thermal: imx: fix for dependency on cpu-freq The thermal driver is a standalone driver for monitoring SoC temperature by enabling thermal sensor, so it can be enabled even when CONFIG_CPU_FREQ is NOT set. So remove the dependency with CPU_THERMAL. Introduce dummy function of legacy cooling register/unregister to make thermal driver probe successfully when CONFIG_CPU_FREQ is NOT set. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 4ab248b3b10a58e379e2d32333fff99ea5ca256c Author: Srinivas Kandagatla Date: Thu Nov 15 17:43:30 2018 +0000 thermal: tsens: qcom: do not create duplicate regmap debugfs entries Regmap would use device name to create debugfs entries. If the device has multiple regmaps it is recommended to use name field in regmap_config. Fix this by providing name to the regmap configs correctly. Without this patch we would see below error on DB820c. qcom-tsens 4a9000.thermal-sensor: Failed to create 4a9000.thermal-sensor debugfs directory Signed-off-by: Srinivas Kandagatla Acked-by: Amit Kucheria Tested-by: Amit Kucheria Signed-off-by: Eduardo Valentin commit ac31f6e25d4e9e9dfda9c0621242036b291b7754 Author: YueHaibing Date: Tue Nov 13 14:13:45 2018 +0000 thermal: armada: Use PTR_ERR_OR_ZERO in armada_thermal_probe_legacy() Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit 24f1c13fa5f1599c373c53783f74de8a639f7999 Author: Geert Uytterhoeven Date: Wed Nov 7 14:35:00 2018 +0100 dt-bindings: thermal: rcar-gen3-thermal: All variants use 3 interrupts RZ/G2M also has 3 interrupts routed to the TSC, but the list was not updated to reflect this. Just drop the list, as this is the case for this TSC variant in all R-Car Gen3 and RZ/G2 SoCs. Fixes: be6af481f3b2d508 ("dt-bindings: thermal: rcar-gen3-thermal: Add r8a774a1 support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Eduardo Valentin commit adad7c7d6a0ce3e9308fc6596865cdf570b5c466 Author: Julia Lawall Date: Tue Oct 30 17:08:51 2018 +0100 thermal: broadcom: use devm_thermal_zone_of_sensor_register Using devm_thermal_zone_of_sensor_register allows to simplify some error handling code, drop a label, and drop the remove function. Signed-off-by: Julia Lawall Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin commit d56c19d07e0bc3ceff366a49b7d7a2440c967b1b Author: Matthias Brugger Date: Sun Oct 21 23:58:48 2018 +0200 thermal: bcm2835: enable hwmon explicitly By defaul of-based thermal driver do not enable hwmon. This patch does this explicitly, so that the temperature can be read through the common hwmon sysfs. Signed-off-by: Matthias Brugger Acked-by: Stefan Wahren Signed-off-by: Eduardo Valentin commit 03334ba8b425b2ad275c8f390cf83c7b081c3095 Author: Eduardo Valentin Date: Wed Jan 2 00:34:03 2019 +0000 thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set Avoid warnings like this: thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function] thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) Fixes: 0dd88793aacd ("thermal: hwmon: move hwmon support to single file") Reviewed-by: Geert Uytterhoeven Signed-off-by: Eduardo Valentin commit 7d7b467cb95bf29597b417d4990160d4ea6d69b9 Author: Hans de Goede Date: Sun Dec 30 18:25:00 2018 +0100 ACPI: power: Skip duplicate power resource references in _PRx Some ACPI tables contain duplicate power resource references like this: Name (_PR0, Package (0x04) // _PR0: Power Resources for D0 { P28P, P18P, P18P, CLK4 }) This causes a WARN_ON in sysfs_add_link_to_group() because we end up adding a link to the same acpi_device twice: sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/808622C1:00/OVTI2680:00/power_resources_D0/LNXPOWER:0a' CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.12-301.fc29.x86_64 #1 Hardware name: Insyde CherryTrail/Type2 - Board Product Name, BIOS jumperx.T87.KFBNEEA02 04/13/2016 Call Trace: dump_stack+0x5c/0x80 sysfs_warn_dup.cold.3+0x17/0x2a sysfs_do_create_link_sd.isra.2+0xa9/0xb0 sysfs_add_link_to_group+0x30/0x50 acpi_power_expose_list+0x74/0xa0 acpi_power_add_remove_device+0x50/0xa0 acpi_add_single_object+0x26b/0x5f0 acpi_bus_check_add+0xc4/0x250 ... To address this issue, make acpi_extract_power_resources() check for duplicates and simply skip them when found. Cc: All applicable Signed-off-by: Hans de Goede [ rjw: Subject & changelog, comments ] Signed-off-by: Rafael J. Wysocki commit 97b6f89f7269b746b68e7985c16d2354c688d29a Merge: 344eb5539abf3 039bc3b7f29f7 d6951f582cc50 Author: Russell King Date: Wed Jan 2 10:37:05 2019 +0000 Merge branches 'misc', 'sa1100-for-next' and 'spectre' into for-linus commit 2e61069b056f7ac3cde5f84a4be8aa703b57089d Author: Sinan Kaya Date: Sun Dec 30 20:40:05 2018 +0000 ACPI: Fix build failure when CONFIG_NLS is set to 'n' Observing link failure as follows when CONFIG_ACPI is set but both CONFIG_NLS and CONFIG_PCI are no set: drivers/acpi/device_sysfs.o: In function `description_show': device_sysfs.c:(.text+0x48a): undefined reference to `utf16s_to_utf8s' This issue was previously addressed implicitly by commit 8a226e00eeed (PCI: pci-label: Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig) causing PCI_LABEL to be selected when ACPI was set which caused NLS to be selected too in that case. However, after commit 5d32a66541c46 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) it is possible to build ACPI support without PCI, so make ACPI select NLS directly to cover that case. Fixes: 5d32a66541c46 (PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set) Signed-off-by: Sinan Kaya [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit 75cb8d20c112aba70f23d98e3f8d0a38ace16006 Author: Richard Zhu Date: Fri Dec 21 04:33:38 2018 +0000 PCI: imx: Enable MSI from downstream components The MSI Enable bit in the MSI Capability (PCIe r4.0, sec 7.7.1.2) controls whether a Function can request service using MSI. i.MX6 Root Ports implement the MSI Capability and may use MSI to request service for events like PME, hotplug, AER, etc. In addition, on i.MX6, the MSI Enable bit controls delivery of MSI interrupts from components below the Root Port. Prior to f3fdfc4ac3a2 ("PCI: Remove host driver Kconfig selection of CONFIG_PCIEPORTBUS"), enabling CONFIG_PCI_IMX6 automatically also enabled CONFIG_PCIEPORTBUS, and when portdrv claimed the Root Ports, it set the MSI Enable bit so it could use PME, hotplug, AER, etc. As a side effect, that also enabled delivery of MSI interrupts from downstream components. The imx6q-pcie driver itself does not depend on portdrv, so set MSI Enable in imx6q-pcie so MSI from downstream components works even if nobody uses MSI for the Root Port events. Fixes: f3fdfc4ac3a2 ("PCI: Remove host driver Kconfig selection of CONFIG_PCIEPORTBUS") Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Tested-by: Sven Van Asbroeck Tested-by: Trent Piepho Reviewed-by: Lucas Stach Acked-by: Lorenzo Pieralisi commit 7dc20ab1b9c431b792a6fe1e78baf36b63edc5e3 Author: Sebastian Ott Date: Fri Dec 21 15:14:20 2018 +0100 s390/pci: skip VF scanning Set the flag to skip scanning for VFs after SR-IOV enablement. VF creation will be triggered by the hotplug code. Signed-off-by: Sebastian Ott Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit aff68a5a621e2569d126b817d0d42f658df524bf Author: Sebastian Ott Date: Fri Dec 21 15:14:19 2018 +0100 PCI/IOV: Add flag so platforms can skip VF scanning Provide a flag to skip scanning for new VFs after SR-IOV enablement. This can be set by implementations for which the VFs are already reported by other means. Signed-off-by: Sebastian Ott Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit 18f9e9d150fccfa747875df6f0a9f606740762b3 Author: Sebastian Ott Date: Fri Dec 21 15:14:18 2018 +0100 PCI/IOV: Factor out sriov_add_vfs() Provide sriov_add_vfs() as a wrapper to scan for VFs that cleans up after itself. This is just a code simplification. No functional change. Signed-off-by: Sebastian Ott Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig commit 8e143b90e4d45cca3dc53760d3cfab988bc74571 Merge: 78e8696c234ab 03ebe48e235f1 Author: Linus Torvalds Date: Tue Jan 1 15:55:29 2019 -0800 Merge tag 'iommu-updates-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - Page table code for AMD IOMMU now supports large pages where smaller page-sizes were mapped before. VFIO had to work around that in the past and I included a patch to remove it (acked by Alex Williamson) - Patches to unmodularize a couple of IOMMU drivers that would never work as modules anyway. - Work to unify the the iommu-related pointers in 'struct device' into one pointer. This work is not finished yet, but will probably be in the next cycle. - NUMA aware allocation in iommu-dma code - Support for r8a774a1 and r8a774c0 in the Renesas IOMMU driver - Scalable mode support for the Intel VT-d driver - PM runtime improvements for the ARM-SMMU driver - Support for the QCOM-SMMUv2 IOMMU hardware from Qualcom - Various smaller fixes and improvements * tag 'iommu-updates-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (78 commits) iommu: Check for iommu_ops == NULL in iommu_probe_device() ACPI/IORT: Don't call iommu_ops->add_device directly iommu/of: Don't call iommu_ops->add_device directly iommu: Consolitate ->add/remove_device() calls iommu/sysfs: Rename iommu_release_device() dmaengine: sh: rcar-dmac: Use device_iommu_mapped() xhci: Use device_iommu_mapped() powerpc/iommu: Use device_iommu_mapped() ACPI/IORT: Use device_iommu_mapped() iommu/of: Use device_iommu_mapped() driver core: Introduce device_iommu_mapped() function iommu/tegra: Use helper functions to access dev->iommu_fwspec iommu/qcom: Use helper functions to access dev->iommu_fwspec iommu/of: Use helper functions to access dev->iommu_fwspec iommu/mediatek: Use helper functions to access dev->iommu_fwspec iommu/ipmmu-vmsa: Use helper functions to access dev->iommu_fwspec iommu/dma: Use helper functions to access dev->iommu_fwspec iommu/arm-smmu: Use helper functions to access dev->iommu_fwspec ACPI/IORT: Use helper functions to access dev->iommu_fwspec iommu: Introduce wrappers around dev->iommu_fwspec ... commit 78e8696c234ab637c4dd516cabeac344d84ec10b Merge: fcf010449ebe1 660611827c03a Author: Linus Torvalds Date: Tue Jan 1 15:45:48 2019 -0800 Merge tag 'dmaengine-4.21-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This includes a new driver, removes R-Mobile APE6 as it is no longer used, sprd cyclic dma support, last batch of dma_slave_config direction removal and random updates to bunch of drivers. Summary: - New driver for UniPhier MIO DMA controller - Remove R-Mobile APE6 support - Sprd driver updates and support for cyclic link-list - Remove dma_slave_config direction usage from rest of drivers - Minor updates to dmatest, dw-dmac, zynqmp and bcm dma drivers" * tag 'dmaengine-4.21-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (48 commits) dmaengine: qcom_hidma: convert to DEFINE_SHOW_ATTRIBUTE dmaengine: pxa: remove DBGFS_FUNC_DECL() dmaengine: mic_x100_dma: convert to DEFINE_SHOW_ATTRIBUTE dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE dmaengine: Documentation: Add documentation for multi chan testing dmaengine: dmatest: Add transfer_size parameter dmaengine: dmatest: Add alignment parameter dmaengine: dmatest: Use fixed point div to calculate iops dmaengine: dmatest: Add support for multi channel testing dmaengine: rcar-dmac: Document R8A774C0 bindings dt-bindings: dmaengine: usb-dmac: Add binding for r8a774c0 dmaengine: zynqmp_dma: replace spin_lock_bh with spin_lock_irqsave dmaengine: sprd: Add me as one of the module authors dmaengine: sprd: Support DMA 2-stage transfer mode dmaengine: sprd: Support DMA link-list cyclic callback dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel dmaengine: sprd: Fix the last link-list configuration dmaengine: sprd: Get transfer residue depending on the transfer direction dmaengine: sprd: Remove direction usage from struct dma_slave_config dmaengine: dmatest: fix a small memory leak in dmatest_func() ... commit fcf010449ebe1db0cb68b2c6410972a782f2bd14 Merge: fbea8c7c79339 cc0282975b3f8 Author: Linus Torvalds Date: Tue Jan 1 15:38:14 2019 -0800 Merge tag 'kgdb-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "Mostly clean ups although while Doug's was chasing down a odd lockdep warning he also did some work to improved debugger resilience when some CPUs fail to respond to the round up request. The main changes are: - Fixing a lockdep warning on architectures that cannot use an NMI for the round up plus related changes to make CPU round up and all CPU backtrace more resilient. - Constify the arch ops tables - A couple of other small clean ups Two of the three patchsets here include changes that spill over into arch/. Changes in the arch space are relatively narrow in scope (and directly related to kgdb). Didn't get comprehensive acks but all impacted maintainers were Cc:ed in good time" * tag 'kgdb-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops mips/kgdb: prepare arch_kgdb_ops for constness kdb: use bool for binary state indicators kdb: Don't back trace on a cpu that didn't round up kgdb: Don't round up a CPU that failed rounding up before kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Remove irq flags from roundup commit fbea8c7c793397cdf4ba53a32f99b656467b7c7f Merge: 28e8c4bc8eb48 57ce8ba0fd3a9 Author: Linus Torvalds Date: Tue Jan 1 15:35:55 2019 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC update from Stafford Horne: "Just one change for 4.21: Update comments for name change or32 -> or1k from Geert Uytterhoeven" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: Fix broken paths to arch/or32 commit 28e8c4bc8eb483c22d977e147a0b98fc63efadf7 Merge: c9bef4a651769 36e14f5fdfdf7 Author: Linus Torvalds Date: Tue Jan 1 13:24:31 2019 -0800 Merge tag 'rtc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem: - new %ptR printk format - rename core files - allow registration of multiple nvmem devices New driver: - i.MX system controller RTC Driver updates: - abx80x: handle voltage ioctls, correct binding doc - m41t80: correct month in alarm reads - pcf85363: add pcf85263 support - pcf8523: properly handle battery low flag - s3c: limit alarm to one year in the future as ALMYEAR is broken - sun6i: rework clock output binding" * tag 'rtc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits) rtc: rename core files rtc: nvmem: fix possible use after free rtc: add i.MX system controller RTC support dt-bindings: fsl: scu: add rtc binding rtc: pcf2123: Add Microcrystal rv2123 rtc: class: reimplement devm_rtc_device_register rtc: enforce rtc_timer_init private_data type rtc: abx80x: Implement RTC_VL_READ,CLR ioctls rtc: pcf85363: Add support for NXP pcf85263 rtc dt-bindings: rtc: pcf85363: Document pcf85263 real-time clock rtc: pcf8523: don't return invalid date when battery is low dt-bindings: rtc: use a generic node name for ds1307 PM: Switch to use %ptR m68k/mac: Switch to use %ptR Input: hp_sdc_rtc - Switch to use %ptR rtc: tegra: Switch to use %ptR rtc: s5m: Switch to use %ptR rtc: s3c: Switch to use %ptR rtc: rx8025: Switch to use %ptR rtc: rx6110: Switch to use %ptR ... commit c9bef4a651769927445900564781a9c99fdf6258 Merge: 115502a6f31d8 88cc9fc41c731 Author: Linus Torvalds Date: Tue Jan 1 13:19:16 2019 -0800 Merge tag 'pinctrl-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "We have no core changes but lots of incremental development in drivers all over the place: Renesas, NXP, Mediatek and Actions Semiconductor keep churning out new SoCs. I have some subtree maintainers for Renesas and Intel helping out to keep down the load, it's been working smoothly (Samsung also have a subtree but it was not used this cycle.) New drivers: - NXP (ex Freescale) i.MX 8 QXP SoC driver. - Mediatek MT6797 SoC driver. - Mediatek MT7629 SoC driver. - Actions Semiconductor S700 SoC driver. - Renesas RZ/A2 SoC driver. - Allwinner sunxi suniv F1C100 SoC driver. - Qualcomm PMS405 PMIC driver. - Microsemi Ocelot Jaguar2 SoC driver. Improvements: - Some RT improvements (using raw spinlocks where appropriate). - A lot of new pin sets on the Renesas PFC pin controllers. - GPIO hogs now work on the Qualcomm SPMI/SSBI pin controller GPIO chips, and Xway. - Major modernization of the Intel pin control drivers. - STM32 pin control driver will now synchronize usage of pins with another CPU using a hardware spinlock" * tag 'pinctrl-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (145 commits) dt-bindings: arm: fsl-scu: add imx8qm pinctrl support pinctrl: freescale: Break dependency on SOC_IMX8MQ for i.MX8MQ pinctrl: imx-scu: Depend on IMX_SCU pinctrl: ocelot: Add dependency on HAS_IOMEM pinctrl: ocelot: add MSCC Jaguar2 support pinctrl: bcm: ns: support updated DT binding as syscon subnode dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon MAINTAINERS: merge at91 pinctrl entries pinctrl: imx8qxp: break the dependency on SOC_IMX8QXP pinctrl: uniphier: constify uniphier_pinctrl_socdata pinctrl: mediatek: improve Kconfig dependencies pinctrl: msm: mark PM functions as __maybe_unused dt-bindings: pinctrl: sunxi: Add supply properties pinctrl: meson: meson8b: add the missing GPIO_GROUPs for BOOT and CARD pinctrl: meson: meson8: add the missing GPIO_GROUPs for BOOT and CARD pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs" pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs" pinctrl: meson: meson8b: fix the GPIO function for the GPIOAO pins pinctrl: meson: meson8: fix the GPIO function for the GPIOAO pins pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length ... commit 115502a6f31d84d8172a71283aaea266302a8ad5 Merge: 57b0e31453209 e3c21e088f893 Author: Linus Torvalds Date: Tue Jan 1 13:16:45 2019 -0800 Merge tag 'linux-watchdog-4.21-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add TQ-Systems TQMX86 watchdog driver - add Qualcomm PM8916 watchdog driver - w83627hf_wdt: add quirk for Inves system - renesas_wdt: several improvements and document r8a774c0 support - mena21_wdt, mtx-1: Convert to use GPIO descriptor - bcm281xx, ie6xx_wdt: convert to DEFINE_SHOW_ATTRIBUTE - documentation: add PM usage and kernel-api: don't reference removed functions - update bindings for MT7629 SoC - several small fixes * tag 'linux-watchdog-4.21-rc1' of git://www.linux-watchdog.org/linux-watchdog: (22 commits) watchdog: tqmx86: Add watchdog driver for the IO controller dt-bindings: watchdog: renesas-wdt: Document r8a774c0 support watchdog: docs: kernel-api: don't reference removed functions watchdog: add documentation for PM usage watchdog: mtx-1: Convert to use GPIO descriptor watchdog: mena21_wdt: Convert to GPIO descriptors dt-bindings: watchdog: Add Qualcomm PM8916 watchdog watchdog: Add pm8916 watchdog driver dt-bindings: watchdog: update bindings for MT7629 SoC watchdog: renesas_wdt: don't keep timer value during suspend/resume watchdog: ie6xx_wdt: convert to DEFINE_SHOW_ATTRIBUTE watchdog: bcm281xx: convert to DEFINE_SHOW_ATTRIBUTE watchdog: asm9260_wdt: make array mode_name static, shrinks object size watchdog/hpwdt: Update driver version. watchdog/hpwdt: Do not claim unsupported hardware watchdog/hpwdt: Exclude via blacklist Watchdog: remove outdated comment watchdog: w83627hf_wdt: Add quirk for Inves system watchdog: cpwd: add of_node_put() watchdog: renesas_wdt: don't set divider while watchdog is running ... commit 57b0e31453209d746c99e513d80b3d0c44a80891 Author: Eric Biggers Date: Sat Nov 3 10:30:35 2018 -0700 KEYS: fix parsing invalid pkey info string We need to check the return value of match_token() for Opt_err before doing anything with it. [ Not only did the old "-1" value for Opt_err cause problems for the __test_and_set_bit(), as fixed in commit 94c13f66e13c ("security: don't use a negative Opt_err token index"), but accessing "args[0].from" is invalid for the Opt_err case, as pointed out by Eric later. - Linus ] Reported-by: syzbot+a22e0dc07567662c50bc@syzkaller.appspotmail.com Fixes: 00d60fd3b932 ("KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2]") Signed-off-by: Eric Biggers Cc: stable@kernel.org # 4.20 Signed-off-by: Linus Torvalds commit e888402789b9db5de4fcda361331d66dbf0cd9fd Author: Huazhong Tan Date: Mon Dec 31 10:58:29 2018 +0800 net: hns3: call hns3_nic_net_open() while doing HNAE3_UP_CLIENT For HNAE3_DOWN_CLIENT calling hns3_nic_net_stop(), HNAE3_UP_CLIENT should call hns3_nic_net_open(), since if the number of queue or the map of TC has is changed before HHAE3_UP_CLIENT is called, it will cause problem. Also the HNS3_NIC_STATE_RESETTING flag needs to be cleared before hns3_nic_net_open() called, and set it back while hns3_nic_net_open() failed. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller commit cb9f1b783850b14cbd7f87d061d784a666dfba1f Author: Willem de Bruijn Date: Sun Dec 30 17:24:36 2018 -0500 ip: validate header length on virtual device xmit KMSAN detected read beyond end of buffer in vti and sit devices when passing truncated packets with PF_PACKET. The issue affects additional ip tunnel devices. Extend commit 76c0ddd8c3a6 ("ip6_tunnel: be careful when accessing the inner header") and commit ccfec9e5cb2d ("ip_tunnel: be careful when accessing the inner header"). Move the check to a separate helper and call at the start of each ndo_start_xmit function in net/ipv4 and net/ipv6. Minor changes: - convert dev_kfree_skb to kfree_skb on error path, as dev_kfree_skb calls consume_skb which is not for error paths. - use pskb_network_may_pull even though that is pedantic here, as the same as pskb_may_pull for devices without llheaders. - do not cache ipv6 hdrs if used only once (unsafe across pskb_may_pull, was more relevant to earlier patch) Reported-by: syzbot Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 8c76e77f9069f10505c08e02646c3ee11ad79038 Author: Willem de Bruijn Date: Sun Dec 30 17:21:05 2018 -0500 tap: call skb_probe_transport_header after setting skb->dev The BPF flow dissector expects either skb->sk or skb->dev set on all skbs. Delay flow dissection until after skb->dev is set. This requires calling from within an rcu read-side critical section. That is fine, see also the call from tun_xdp_one. Fixes: d0e13a1488ad ("flow_dissector: lookup netns by skb->sk if skb->dev is NULL") Reported-by: Christian Borntraeger Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit aff6db454599d62191aabc208930e891748e4322 Author: Cong Wang Date: Sun Dec 30 12:43:42 2018 -0800 ptr_ring: wrap back ->producer in __ptr_ring_swap_queue() __ptr_ring_swap_queue() tries to move pointers from the old ring to the new one, but it forgets to check if ->producer is beyond the new size at the end of the operation. This leads to an out-of-bound access in __ptr_ring_produce() as reported by syzbot. Reported-by: syzbot+8993c0fa96d57c399735@syzkaller.appspotmail.com Fixes: 5d49de532002 ("ptr_ring: resize support") Cc: "Michael S. Tsirkin" Cc: John Fastabend Cc: Jason Wang Signed-off-by: Cong Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 3e9ad24b0e91c066311a958afbd6210dda8a43eb Author: Takashi Iwai Date: Mon Dec 31 19:02:01 2018 +0100 ALSA: hda - Revert DSP detection on legacy HD-audio driver This essentially reverts the commits c337104b1a16 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") and d82b51c855a2 ("ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection") for the path of legacy HD-audio controller (snd-hda-intel). The automatic DSP detection and skip of binding with the legacy driver caused regressions on several machines like Dell XPS13. They give the PCI class 0x40380 indicating the availability of DSP while they don't work with ASoC SKL driver (yet). As the support of ASoC driver for such devices isn't available, it's better to revert the whole DSP-detection-and-skip behavior of the legacy driver, so that we can get the old good driver working on such devices. The pci_binding option for ASoC SKL driver is still kept so that it can work without blacklisting. Fixes: c337104b1a16 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") Reported-by: Linus Torvalds Reported-by: Hans de Goede Reported-by: Azat Khuzhin Cc: Pierre-Louis Bossart Signed-off-by: Takashi Iwai commit 4087d2bc0d9469835f8d19d63a4a56739e5b8c5b Author: Zhu Yanjun Date: Sun Dec 30 23:24:11 2018 +0800 net: rds: remove unnecessary NULL check In kfree, the NULL check is done. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller commit 2b96547223e3a036efb51733dbf37a1e4be92068 Author: yupeng Date: Sat Dec 29 21:46:38 2018 -0800 add document for TCP OFO, PAWS and skip ACK counters add document and examples for below counters: TcpExtTCPOFOQueue TcpExtTCPOFODrop TcpExtTCPOFOMerge TcpExtPAWSActive TcpExtPAWSEstab TcpExtTCPACKSkippedSynRecv TcpExtTCPACKSkippedPAWS TcpExtTCPACKSkippedSeq TcpExtTCPACKSkippedFinWait2 TcpExtTCPACKSkippedTimeWait TcpExtTCPACKSkippedChallenge Signed-off-by: yupeng Signed-off-by: David S. Miller commit 3a0ed3e9619738067214871e9cb826fa23b2ddb9 Author: Deepa Dinamani Date: Thu Dec 27 18:55:09 2018 -0800 sock: Make sock->sk_stamp thread-safe Al Viro mentioned (Message-ID <20170626041334.GZ10672@ZenIV.linux.org.uk>) that there is probably a race condition lurking in accesses of sk_stamp on 32-bit machines. sock->sk_stamp is of type ktime_t which is always an s64. On a 32 bit architecture, we might run into situations of unsafe access as the access to the field becomes non atomic. Use seqlocks for synchronization. This allows us to avoid using spinlocks for readers as readers do not need mutual exclusion. Another approach to solve this is to require sk_lock for all modifications of the timestamps. The current approach allows for timestamps to have their own lock: sk_stamp_lock. This allows for the patch to not compete with already existing critical sections, and side effects are limited to the paths in the patch. The addition of the new field maintains the data locality optimizations from commit 9115e8cd2a0c ("net: reorganize struct sock for better data locality") Note that all the instances of the sk_stamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani Signed-off-by: David S. Miller commit 8b6b25cf93b73e8e399adc55b0ffb9db32b881e0 Author: Xiaozhou Liu Date: Fri Dec 21 17:35:11 2018 +0800 selftests/bpf: fix error printing in test_devmap() As a simple fix, just print the correct map type. Signed-off-by: Xiaozhou Liu Signed-off-by: Daniel Borkmann commit 63d2a9ec310d8bcc955574220d4631aa55c1a80c Author: Sameer Pujar Date: Wed Dec 26 16:04:49 2018 +0530 ALSA: hda/tegra: clear pending irq handlers Even after disabling interrupts on the module, it could be possible that irq handlers are still running. System hang is seen during suspend path. It was found that, there were pending writes on the HDA bus and clock was disabled by that time. Above mentioned issue is fixed by clearing any pending irq handlers before disabling clocks and returning from hda suspend. Suggested-by: Mohan Kumar Suggested-by: Dara Ramesh Signed-off-by: Sameer Pujar Cc: Signed-off-by: Takashi Iwai commit 82b01149ec94d746867d7f9156c44d775d4d2d67 Author: Jian-Hong Pan Date: Thu Dec 27 16:46:31 2018 +0800 ALSA: hda/realtek: Enable the headset mic auto detection for ASUS laptops The headset mic of ASUS laptops like UX533FD, UX433FN and UX333FA, whose CODEC is Realtek ALC294 has jack auto detection feature. This patch enables the feature. Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294") Signed-off-by: Daniel Drake Signed-off-by: Jian-Hong Pan Cc: Signed-off-by: Takashi Iwai commit 191ce17876c9367819c4b0a25b503c0f6d9054d8 Author: Theodore Ts'o Date: Mon Dec 31 22:34:31 2018 -0500 ext4: fix special inode number checks in __ext4_iget() The check for special (reserved) inode number checks in __ext4_iget() was broken by commit 8a363970d1dc: ("ext4: avoid declaring fs inconsistent due to invalid file handles"). This was caused by a botched reversal of the sense of the flag now known as EXT4_IGET_SPECIAL (when it was previously named EXT4_IGET_NORMAL). Fix the logic appropriately. Fixes: 8a363970d1dc ("ext4: avoid declaring fs inconsistent...") Signed-off-by: Theodore Ts'o Reported-by: Dan Carpenter Cc: stable@kernel.org commit e1ef035d272ef4dbfdda98e58699698305138856 Merge: b7badd1d7aa61 82c7b351be3fa Author: Linus Torvalds Date: Mon Dec 31 17:40:14 2018 -0800 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Olof Johansson: "Most changes here are to enable new drivers and platforms in the various configs that affect them. Most of these have been covered and described in the other branches, we mostly keep defconfig separate to avoid conflicts between SoC/dt/driver updates that they otherwise would be grouped with. One thing worth mentioning here is that OMAP changes from using their own UART driver, to 8250, for the multi_v7_defconfig shared config on 32-bit. This means that the console is now named ttyS* instead of ttyO*. This change was already done for omap2_defconfig a while back, so most users of these configs have either already updated, or can easily follow the same patterns as they did at that time. This makes platform support slightly easier for distros, since they no longer need to keep track of a separate console prefix for these platforms" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits) Revert "arm64: defconfig: Enable FSL_MC_BUS and FSL_MC_DPIO" arm64: defconfig: Enable FSL_MC_BUS and FSL_MC_DPIO arm64: defconfig: Replace PINCTRL_MT7622 with PINCTRL_MTK_MOORE arm64: defconfig: Regenerate for v4.20 ARM: multi_v7_defconfig: Add TOSHIBA TC358764 bridge driver ARM: multi_v7_defconfig: Add MAX8952 regulator driver ARM: exynos_defconfig: Add TOSHIBA TC358764 bridge driver ARM: exynos_defconfig: Add MAX8952 regulator driver ARM: exynos_defconfig: Add MAX8998 RTC and charger drivers ARM: imx_v6_v7_defconfig: add imx7ulp support ARM: imx_v6_v7_defconfig: Select TOUCHSCREEN_GOODIX ARM: multi_v7_defconfig: enable STM32 analog & timer drivers arm64: defconfig: Enable GCC and PINCTRL for MSM8998 arm64: defconfig: Enable core Qualcomm SDM845 options ARM: defconfig: Enable the PL111 DRM driver on vexpress ARM: defconfig: Update the vexpress defconfig arm64: defconfig: Enable some qcom remoteproc configs arm64: defconfig: Enable QCS404 configs ARM: imx_v6_v7_defconfig: Enable USB_ANNOUNCE_NEW_DEVICES ARM: imx_v6_v7_defconfig: Enable BT_BNEP ... commit b7badd1d7aa61087010803affa19bb83fb5a0af1 Merge: d36377c6eb071 3f47de2c6b606 Author: Linus Torvalds Date: Mon Dec 31 17:36:02 2018 -0800 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM Device-tree updates from Olof Johansson: "As usual, this is where the bulk of our changes end up landing each merge window. The individual updates are too many to enumerate, many many platforms have seen additions of device descriptions such that they are functionally more complete (in fact, this is often the bulk of updates we see). Instead I've mostly focused on highlighting the new platforms below as they are introduced. Sometimes the introduction is of mostly a fragment, that later gets filled in on later releases, and in some cases it's near-complete platform support. The latter is more common for derivative platforms that already has similar support in-tree. Two SoCs are slight outliers from the usual range of additions. Allwinner support for F1C100s, a quite old SoC (ARMv5-based) shipping in the Lychee Pi Nano platform. At the other end is NXP Layerscape LX2160A, a 16-core 2.2GHz Cortex-A72 SoC with a large amount of I/O aimed at infrastructure/networking. TI updates stick out in the diff stats too, in particular because they have moved the description of their L4 on-chip interconnect to devicetree, which opens up for removal of even more of their platform-specific 'hwmod' description tables over the next few releases. SoCs: - Qualcomm QCS404 (4x Cortex-A53) - Allwinner T3 (rebranded R40) and f1c100s (armv5) - NXP i.MX7ULP (1x Cortex-A7 + 1x Cortex-M4) - NXP LS1028A (2x Cortex-A72), LX2160A (16x Cortex-A72) New platforms: - Rockchip: Gru Scarlet (RK3188 Tablet) - Amlogic: Phicomm N1 (S905D), Libretech S805-AC - Broadcom: Linksys EA6500 v2 Wi-Fi router (BCM4708) - Qualcomm: QCS404 base platform and EVB - Qualcomm: Remove of Arrow SD600 - PXA: First PXA3xx DT board: Raumfeld - Aspeed: Facebook Backpack-CMM BMC - Renesas iWave G20D-Q7 (RZ/G1N) - Allwinner t3-cqa3t-bv3 (T3/R40) and Lichee Pi Nano (F1C100s) - Allwinner Emlid Neutis N5, Mapleboard MP130 - Marvell Macchiatobin Single Shot (Armada 8040, no 10GbE) - i.MX: mtrion emCON-MX6, imx6ul-pico-pi, imx7d-sdb-reva - VF610: Liebherr's BK4 device, ZII SCU4 AIB board - i.MX7D PICO Hobbit baseboard - i.MX7ULP EVK board - NXP LX2160AQDS and LX2160ARDB boards Other: - Coresight binding updates across the board - CPU cooling maps updates across the board" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (648 commits) ARM: dts: suniv: Fix improper bindings include patch ARM: dts: sunxi: Enable Broadcom-based Bluetooth for multiple boards arm64: dts: allwinner: a64: bananapi-m64: Add Bluetooth device node ARM: dts: suniv: Fix improper bindings include patch arm64: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller arm64: dts: Remove unused properties from FSL QSPI driver nodes ARM: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller ARM: dts: imx6sx-sdb: Fix the reg properties for the FSL QSPI nodes ARM: dts: Remove unused properties from FSL QSPI driver nodes arm64: dts: ti: k3-am654: Enable main domain McSPI0 arm64: dts: ti: k3-am654: Add McSPI DT nodes arm64: dts: ti: k3-am654: Populate power-domain property for UART nodes arm64: dts: ti: k3-am654-base-board: Enable ECAP PWM arm64: dts: ti: k3-am65-main: Add ECAP PWM node arm64: dts: ti: k3-am654-base-board: Add I2C nodes arm64: dts: ti: am654-base-board: Add pinmux for main uart0 arm64: dts: ti: k3-am65: Add pinctrl regions dt-bindings: pinctrl: k3: Introduce pinmux definitions ARM: dts: exynos: Specify I2S assigned clocks in proper node ARM: dts: exynos: Add missing CPUs in cooling maps for Odroid X2 ... commit d36377c6eb071e3d0751e9e0e3c19198c58d9a5d Merge: 0922275ef157b a6f119a06960e Author: Linus Torvalds Date: Mon Dec 31 17:32:35 2018 -0800 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Misc driver updates for platforms, many of them power related. - Rockchip adds power domain support for rk3066 and rk3188 - Amlogic adds a power measurement driver - Allwinner adds SRAM support for three platforms (F1C100, H5, A64 C1) - Wakeup and ti-sysc (platform bus) fixes for OMAP/DRA7 - Broadcom fixes suspend/resume with Thumb2 kernels, and improves stability of a handful of firmware/platform interfaces - PXA completes their conversion to dmaengine framework - Renesas does a bunch of PM cleanups across many platforms - Tegra adds support for suspend/resume on T186/T194, which includes some driver cleanups and addition of wake events - Tegra also adds a driver for memory controller (EMC) on Tegra2 - i.MX tweaks power domain bindings, and adds support for i.MX8MQ in GPC - Atmel adds identifiers and LPDDR2 support for a new SoC, SAM9X60 and misc cleanups across several platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits) ARM: at91: add support in soc driver for new SAM9X60 ARM: at91: add support in soc driver for LPDDR2 SiP memory: omap-gpmc: Use of_node_name_eq for node name comparisons bus: ti-sysc: Check for no-reset and no-idle flags at the child level ARM: OMAP2+: Check also the first dts child for hwmod flags soc: amlogic: meson-clk-measure: Add missing REGMAP_MMIO dependency soc: imx: gpc: Increase GPC_CLK_MAX to 7 soc: renesas: rcar-sysc: Fix power domain control after system resume soc: renesas: rcar-sysc: Merge PM Domain registration and linking soc: renesas: rcar-sysc: Remove rcar_sysc_power_{down,up}() helpers soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} dt-bindings: sram: sunxi: Add compatible for the A64 SRAM C1 dt-bindings: sram: sunxi: Add bindings for the H5 with SRAM C1 dt-bindings: sram: Add Allwinner suniv F1C100s soc: sunxi: sram: Add support for the H5 SoC system control soc: sunxi: sram: Enable EMAC clock access for H3 variant soc: imx: gpcv2: add support for i.MX8MQ SoC soc: imx: gpcv2: move register access table to domain data soc: imx: gpcv2: prefix i.MX7 specific defines dmaengine: pxa: make the filter function internal ... commit 0922275ef157ba8ac93e7e7857087eb0442d5397 Merge: 495d714ad140e cac1fc8fb561a Author: Linus Torvalds Date: Mon Dec 31 17:27:54 2018 -0800 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull arm SoC platform updates from Olof Johansson: "SoC updates, mostly refactorings and cleanups of old legacy platforms, but also a few more things: New SoC support this release: - NXP/Freescale i.MX7ULP (1x Cortex-A7, Cortex-M4, graphics, etc) - Allwinner F1C100, older platform with an ARM926-EJS (ARMv5) core Cleanups of various platforms: - OMAP1 ams-delta does some GPIO cleanups - Davinci removes of at24 platform data - Samsung cleans up old wakeup, PM debug and secondary core boot code - Renesas moves around config options and PM code to drivers/soc for sharing with 64-bit and more consistency - i.MX, Broadcom and SoCFPGA all have tweaks to lowlevel debug console setups - SoCFPGA adds explicit selection of ARM errata and removes some unused code This also contains a few patches that I had queued up as fixes for 4.20 but didn't send in before the release" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (68 commits) arm64: dts: renesas: draak: Fix CVBS input ARM: omap2: avoid section mismatch warning ARM: tegra: avoid section mismatch warning ARM: ks8695: fix section mismatch warning ARM: pxa: avoid section mismatch warning ARM: mmp: fix pxa168_device_usb_phy use on aspenite ARM: mmp: fix timer_init calls ARM: OMAP1: fix USB configuration for device-only setups ARM: OMAP1: add MMC configuration for Palm Tungsten E ARM: imx: fix dependencies on imx7ulp ARM: meson: select HAVE_ARM_TWD and ARM_GLOBAL_TIMER MAINTAINERS: add drivers/soc/amlogic/ to amlogic list ARM: imx: add initial support for imx7ulp ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed ARM: dts: Fix OMAP4430 SDP Ethernet startup ARM: dts: am335x-pdu001: Fix polarity of card detection input ARM: OMAP1: ams-delta: Fix audio permanently muted ARM: dts: omap5: Fix dual-role mode on Super-Speed port arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios ARM: davinci: da850-evm: remove unnecessary include ... commit 756af9c642329d54f048bac2a62f829b391f6944 Author: Tyrel Datwyler Date: Mon Dec 31 15:43:01 2018 -0600 ibmveth: fix DMA unmap error in ibmveth_xmit_start error path Commit 33a48ab105a7 ("ibmveth: Fix DMA unmap error") fixed an issue in the normal code path of ibmveth_xmit_start() that was originally introduced by Commit 6e8ab30ec677 ("ibmveth: Add scatter-gather support"). This original fix missed the error path where dma_unmap_page is wrongly called on the header portion in descs[0] which was mapped with dma_map_single. As a result a failure to DMA map any of the frags results in a dmesg warning when CONFIG_DMA_API_DEBUG is enabled. ------------[ cut here ]------------ DMA-API: ibmveth 30000002: device driver frees DMA memory with wrong function [device address=0x000000000a430000] [size=172 bytes] [mapped as page] [unmapped as single] WARNING: CPU: 1 PID: 8426 at kernel/dma/debug.c:1085 check_unmap+0x4fc/0xe10 ... ... DMA-API: Mapped at: ibmveth_start_xmit+0x30c/0xb60 dev_hard_start_xmit+0x100/0x450 sch_direct_xmit+0x224/0x490 __qdisc_run+0x20c/0x980 __dev_queue_xmit+0x1bc/0xf20 This fixes the API misuse by unampping descs[0] with dma_unmap_single. Fixes: 6e8ab30ec677 ("ibmveth: Add scatter-gather support") Signed-off-by: Tyrel Datwyler Signed-off-by: David S. Miller commit 4d9226fd9a0d747030575d7cb184b30c6e64f155 Author: Stefan Wahren Date: Fri Dec 28 17:53:23 2018 +0100 arm64: defconfig: Re-enable bcm2835-thermal driver The bcm2835-thermal driver was added with commit ac178e4280e6 ("ARM64: bcm2835: add thermal driver to default config"). Unfortunately this was accidentally dropped by commit eb1e6716cc9c ("arm64: defconfig: sync with savedefconfig"). So enable the driver again. Fixes: eb1e6716cc9c ("arm64: defconfig: sync with savedefconfig") Signed-off-by: Stefan Wahren Signed-off-by: Olof Johansson commit 2081076ac735de4eab6b9809d8b6ad8432d34d54 Merge: 8a66c20e66cc0 704cfd7f5f71c Author: Olof Johansson Date: Mon Dec 31 13:12:02 2018 -0800 Merge tag 'sti-soc-for-v4.21-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/late Highlights: ----------- - Following pen_release and boot_lock cleanup initiated by Russell King, .smp_prepare_cpus and .smp_boot_secondary STi callbacks must be reworked to keep secondary CPU's bringup. * tag 'sti-soc-for-v4.21-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: sti: remove pen_release and boot_lock Signed-off-by: Olof Johansson commit 8a66c20e66cc0d961d6b98cd766de4040f6e485f Merge: c6f9fa88a3982 74ebbdda7cecf Author: Olof Johansson Date: Mon Dec 31 13:11:04 2018 -0800 Merge tag 'samsung-dt64-4.21-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/late Samsung DTS ARM64 changes for v4.21, part 2 Add IMEM clock controller (for Security SubSystem) and Bluetooth chip to Exynos5433 TM2(e) boards. * tag 'samsung-dt64-4.21-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards arm64: dts: exynos: Add IMEM clock controller to Exynos5433 arm64: dts: exynos: Add all CPUs in cooling maps arm64: dts: exynos: Update DWC3 modules on Exynos5433 SoCs Signed-off-by: Olof Johansson commit c6f9fa88a398288613bbf3387d0f6b0b280cf9a2 Merge: a684afa7b10f6 8ac686d7dfed7 Author: Olof Johansson Date: Mon Dec 31 13:10:16 2018 -0800 Merge tag 'samsung-dt-4.21-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/late Samsung DTS ARM changes for v4.21, part 2 1. Add missing CPUs in cooling maps for Odroid X2 (missed in previous round of fixups). 2. Fix clock configuration in audio subsystem on Odroid XU3/XU4. * tag 'samsung-dt-4.21-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Specify I2S assigned clocks in proper node ARM: dts: exynos: Add missing CPUs in cooling maps for Odroid X2 ARM: dts: exynos: remove display-port node from Arndale ARM: dts: exynos: Add opp-suspend to DMC and leftbus devfreq OPPs on Exynos4 ARM: dts: s5pv210: Add s5p-jpeg codec node. ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module ARM: dts: exynos: Add all CPUs in cooling maps ARM: dts: exynos: Clarify comment explaining purpose of Odroid XU3 DTSI ARM: dts: exynos: Add pin configuration for SD write protect on Odroid XU3/XU4/HC1 ARM: dts: exynos: Update maximum frequency for eMMC to 200MHz on Odroid XU3/XU4 ARM: dts: exynos: Update maximum frequency for SD card to 200MHz on Odroid XU3/XU4/HC1 ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 ARM: dts: exynos: Add UHS-I bus speed support to Odroid XU3/XU4/HC1 ARM: dts: exynos: Add missing clocks to RTC node for Arndale board ARM: dts: exynos: Add compatible for s5m8767 clocks node on Itop Core ARM: dts: exynos: Add compatible for s2mps11 clocks node on Exynos542x Signed-off-by: Olof Johansson commit a684afa7b10f6bcd0fc51f212b4ad60dc2721fbe Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:38 2018 +0530 MAINTAINERS: Add entry for RDA Micro SoC architecture Add MAINTAINERS entry for RDA Micro SoC architecture with myself as the maintainer. Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit c10b13325ced237f6129e8ee73cd8c72e1bd10ed Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:37 2018 +0530 tty: serial: Add RDA8810PL UART driver Add UART driver for RDA Micro RDA8810PL SoC. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Reviewed-by: Greg Kroah-Hartman Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 6fc66a5c68af56c28b08267bfb7f7ac45afc21a8 Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:36 2018 +0530 ARM: dts: rda8810pl: Add interrupt support for UART Add interrupt support for UART in RDA Micro RDA8810PL SoC. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 804584a61ca0d4547965630d5a433ad1c39e0b27 Author: Andreas Färber Date: Tue Dec 18 20:32:35 2018 +0530 dt-bindings: serial: Document RDA Micro UART Add an initial binding for the UART in RDA Micro RDA8810PL SoC. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 5a9fe404b984cec1e3d51a8a377219a2592f3214 Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:34 2018 +0530 ARM: dts: rda8810pl: Add timer support Add timer support for RDA Micro RDA8810PL SoC. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 7581d836bdbe2533e732f3bceb97a89d4f81de7b Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:33 2018 +0530 ARM: dts: Add devicetree for OrangePi i96 board Add initial devicetree for Orange Pi i96 board from Xunlong. It is one of the 96Boards IoT Edition board. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit f0d319d26ea60f9dceaf00051b5876de039e49ca Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:32 2018 +0530 ARM: dts: Add devicetree for OrangePi 2G IoT board Add initial devicetree support for OrangePi 2G IoT board from Xunlong. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 542e1c9dbad9137e84e136cb4ee53c89627d87fe Author: Manivannan Sadhasivam Date: Tue Dec 18 20:32:31 2018 +0530 ARM: dts: Add devicetree for RDA8810PL SoC Add initial device tree for RDA8810PL SoC from RDA Microelectronics. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 78e3dbc166a137c5f796151281d39bec1b8e1cd0 Author: Andreas Färber Date: Tue Dec 18 20:32:30 2018 +0530 ARM: Prepare RDA8810PL SoC Introduce ARCH_RDA and mach-rda for RDA Micro SoCs. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 56f73e4bc145730c94894d5b5c557f19b89e073a Author: Andreas Färber Date: Tue Dec 18 20:32:29 2018 +0530 dt-bindings: arm: Document RDA8810PL and reference boards Add bindings for RDA Micro RDA8810PL SoC and below reference boards: 1. Orange Pi 2G-IoT - http://www.orangepi.org/OrangePi2GIOT/ 2. Orange Pi i96 - https://www.96boards.org/product/orangepi-i96/ Cc: zhao_steven@263.net Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 1def98f69807518e26dcb0ac70142dcbbd953dc6 Author: Andreas Färber Date: Tue Dec 18 20:32:28 2018 +0530 dt-bindings: Add RDA Micro vendor prefix Add vendor prefix for RDA Micro which now merged into Unisoc Communications Inc. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit a2edaf7893e2bd0247ea4bc13f21302fecb30d95 Merge: 5e0bd98f8ceff 3bbc9abbfb8cc Author: Olof Johansson Date: Mon Dec 31 13:07:11 2018 -0800 Merge tag 'imx8mq-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/late i.MX8MQ device tree support for 4.21: - It contains the initial device tree support for i.MX8MQ - the first ARM64 i.MX processor. It features a quad Cortex-A53 core that operates at speeds of up to 1.3 GHz, a Cortex-M4 core for low-power processing, a DRAM controller that supports 32-bit/16-bit LPDDR4/DDR4/DDR3L memory, and hardware acceleration for 4K video playback. - A couple of patches from Baruch that add watchdog device for i.MX8MQ enable it for imx8mq-evk board. * tag 'imx8mq-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mq-evk: enable watchdog arm64: dts: imx8mq: add watchdog devices MAINTAINERS: add i.MX8 DT path to i.MX architecture arm64: add support for i.MX8M EVK board arm64: add basic DTS for i.MX8MQ arm64: add basic Kconfig symbols for i.MX8 arm64: dts: ls1046a: add qdma device tree nodes arm64: dts: ls1043a: add qdma device tree nodes arm64: dts: ls1088a: Add missing dma-ranges property arm64: dts: ls1088a: Move fsl-mc node arm64: dts: fsl: Add all CPUs in cooling maps arm64: dts: Add support for NXP LS1028A SoC arm64: dts: layerscape: removed compatible string "snps,dw-pcie" arm64: dts: fsl: Add the status property disable PCIe arm64: dts: ls1012a: Add FRWY-LS1012A board support dt-bindings: Add binding for i.MX8MQ CCM arm64: dts: add LX2160AQDS board support arm64: dts: add LX2160ARDB board support arm64: dts: add QorIQ LX2160A SoC support Signed-off-by: Olof Johansson commit 5e0bd98f8ceffce3da9c09cdcf5f5f30d4d9bd59 Merge: 6ae284ab58a2e 3c15ddb97c77f Author: Olof Johansson Date: Mon Dec 31 13:06:30 2018 -0800 Merge tag 'tee-subsys-optee-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee into next/late OP-TEE dynamic shm log message Adds a log message in the OP-TEE driver to inform that dynamic shared memory is enabled. * tag 'tee-subsys-optee-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: log message if dynamic shm is enabled Signed-off-by: Olof Johansson commit 6ae284ab58a2e990a5f4daba1eb42fc600cf004b Merge: 8fe28cb58bcb2 b2d102bd0146d Author: Olof Johansson Date: Mon Dec 31 13:05:53 2018 -0800 Merge tag 'tee-subsys-fix-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee into next/late Avoid possible double list_del in supplicant comms A fix for the OP-TEE driver to avoid possible double list_del during tee-supplicant communication while the system is shutting down. * tag 'tee-subsys-fix-for-4.21' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: avoid possible double list_del() Signed-off-by: Olof Johansson commit cac1fc8fb561ac766468394d49c3dd11a2b8cb44 Merge: bd3fde386decf 54518ed45734b Author: Olof Johansson Date: Mon Dec 31 11:54:03 2018 -0800 Merge branch 'fixes' into next/soc Merge in fixes here, since the last batch didn't make it in before the release of 4.20, and we might as well group them with this set of patches. * fixes: (822 commits) arm64: dts: renesas: draak: Fix CVBS input ARM: dts: Fix OMAP4430 SDP Ethernet startup ARM: dts: am335x-pdu001: Fix polarity of card detection input ARM: OMAP1: ams-delta: Fix audio permanently muted ARM: dts: omap5: Fix dual-role mode on Super-Speed port arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock ARM: imx: update the cpu power up timing setting on i.mx6sx Revert "arm64: dts: marvell: add CPU Idle power state support on Armada 7K/8K" ARM: dts: imx7d-pico: Describe the Wifi clock ARM: dts: realview: Fix some more duplicate regulator nodes MAINTAINERS: update entry for MMP platform ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt MAINTAINERS: mediatek: Update SoC entry ARM: dts: bcm2837: Fix polarity of wifi reset GPIOs + Linux 4.20-rc5 Signed-off-by: Olof Johansson commit 495d714ad140e1732e66c45d0409054b24c1a0d6 Merge: f12e840c819ba 3d739c1f6156c Author: Linus Torvalds Date: Mon Dec 31 11:46:59 2018 -0800 Merge tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - Rework of the kprobe/uprobe and synthetic events to consolidate all the dynamic event code. This will make changes in the future easier. - Partial rewrite of the function graph tracing infrastructure. This will allow for multiple users of hooking onto functions to get the callback (return) of the function. This is the ground work for having kprobes and function graph tracer using one code base. - Clean up of the histogram code that will facilitate adding more features to the histograms in the future. - Addition of str_has_prefix() and a few use cases. There currently is a similar function strstart() that is used in a few places, but only returns a bool and not a length. These instances will be removed in the future to use str_has_prefix() instead. - A few other various clean ups as well. * tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits) tracing: Use the return of str_has_prefix() to remove open coded numbers tracing: Have the historgram use the result of str_has_prefix() for len of prefix tracing: Use str_has_prefix() instead of using fixed sizes tracing: Use str_has_prefix() helper for histogram code string.h: Add str_has_prefix() helper function tracing: Make function ‘ftrace_exports’ static tracing: Simplify printf'ing in seq_print_sym tracing: Avoid -Wformat-nonliteral warning tracing: Merge seq_print_sym_short() and seq_print_sym_offset() tracing: Add hist trigger comments for variable-related fields tracing: Remove hist trigger synth_var_refs tracing: Use hist trigger's var_ref array to destroy var_refs tracing: Remove open-coding of hist trigger var_ref management tracing: Use var_refs[] for hist trigger reference checking tracing: Change strlen to sizeof for hist trigger static strings tracing: Remove unnecessary hist trigger struct field tracing: Fix ftrace_graph_get_ret_stack() to use task and not current seq_buf: Use size_t for len in seq_buf_puts() seq_buf: Make seq_buf_puts() null-terminate the buffer arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack ... commit 74d4b4e0f43e5ffb61b63f4e3cfcfad3d7398765 Author: Matti Vaittinen Date: Thu Dec 27 10:44:43 2018 +0200 regmap: regmap-irq: silently ignore unsupported type settings Do not return error if irq-type setting is requested for controlloer which does not support this. This is how regmap-irq has previously handled the undupported type settings and existing drivers seem to be upset if failure is now reported. Fixes: 1c2928e3e321 ("regmap: regmap-irq/gpio-max77620: add level-irq support") Signed-off-by: Matti Vaittinen Reported-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit f12e840c819bab42621685558a01d3f46ab9a226 Merge: e3ed513bcf009 1c3243f61fa7d Author: Linus Torvalds Date: Mon Dec 31 09:57:14 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha architecture updates from Matt Turner: "A few small changes for alpha as well as the new system call table generation support from Firoz Khan" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: Remove some unused variables alpha: rtc: simplify alpha_rtc_init alpha: Fix a typo on ptrace.h alpha: fix spelling mistake QSD_PORT_ACTUVE -> QSD_PORT_ACTIVE alpha: generate uapi header and syscall table header files alpha: add system call table generation support alpha: add __NR_syscalls along with NR_SYSCALLS alpha: remove CONFIG_OSF4_COMPAT flag from syscall table alpha: move __IGNORE* entries to non uapi header commit e3ed513bcf0097c0b8a1f1b4d791a8d0d8933b3b Merge: 2a1a2c1a76cf8 c40f7d74c741a Author: Linus Torvalds Date: Mon Dec 31 09:54:17 2018 -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: "This is a revert for a lockup in cgroups-intense workloads - the real fixes will come later" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c commit 2a1a2c1a76cf89aaeb98a89179c2942c7882f68a Merge: 9ab97aea85cca d8a706414af48 Author: Linus Torvalds Date: Mon Dec 31 09:46:39 2018 -0800 Merge tag 'dax-fix-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fix from Dan Williams: "Clean up unnecessary usage of prepare_to_wait_exclusive(). While I feel a bit silly sending a single-commit pull-request there is nothing else queued up for dax this cycle. This change has shipped in -next for multiple releases" * tag 'dax-fix-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Use non-exclusive wait in wait_entry_unlocked() commit 9ab97aea85cca43a6aedc90e0d1feba91eebe1ad Merge: 195303136f192 64beba0558fce Author: Linus Torvalds Date: Mon Dec 31 09:41:37 2018 -0800 Merge tag 'f2fs-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've focused on bug fixes since Pixel devices have been shipping with f2fs. Some of them were related to hardware encryption support which are actually not an issue in mainline, but would be better to merge them in order to avoid potential bugs. Enhancements: - do GC sub-sections when the section is large - add a flag in ioctl(SHUTDOWN) to trigger fsck for QA - use kvmalloc() in order to give another chance to avoid ENOMEM Bug fixes: - fix accessing memory boundaries in a malformed iamge - GC gives stale unencrypted block - GC counts in large sections - detect idle time more precisely - block allocation of DIO writes - race conditions between write_begin and write_checkpoint - allow GCs for node segments via ioctl() There are various clean-ups and minor bug fixes as well" * tag 'f2fs-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (43 commits) f2fs: sanity check of xattr entry size f2fs: fix use-after-free issue when accessing sbi->stat_info f2fs: check PageWriteback flag for ordered case f2fs: fix validation of the block count in sanity_check_raw_super f2fs: fix missing unlock(sbi->gc_mutex) f2fs: fix to dirty inode synchronously f2fs: clean up structure extent_node f2fs: fix block address for __check_sit_bitmap f2fs: fix sbi->extent_list corruption issue f2fs: clean up checkpoint flow f2fs: flush stale issued discard candidates f2fs: correct wrong spelling, issing_* f2fs: use kvmalloc, if kmalloc is failed f2fs: remove redundant comment of unused wio_mutex f2fs: fix to reorder set_page_dirty and wait_on_page_writeback f2fs: clear PG_writeback if IPU failed f2fs: add an ioctl() to explicitly trigger fsck later f2fs: avoid frequent costly fsck triggers f2fs: fix m_may_create to make OPU DIO write correctly f2fs: fix to update new block address correctly for OPU ... commit 427c5ce4417cba0801fbf79c8525d1330704759c Author: Finn Thain Date: Mon Dec 31 16:44:09 2018 +1100 block/swim3: Fix regression on PowerBook G3 As of v4.20, the swim3 driver crashes when loaded on a PowerBook G3 (Wallstreet). MacIO PCI driver attached to Gatwick chipset MacIO PCI driver attached to Heathrow chipset swim3 0.00015000:floppy: [fd0] SWIM3 floppy controller in media bay 0.00013020:ch-a: ttyS0 at MMIO 0xf3013020 (irq = 16, base_baud = 230400) is a Z85c30 ESCC - Serial port 0.00013000:ch-b: ttyS1 at MMIO 0xf3013000 (irq = 17, base_baud = 230400) is a Z85c30 ESCC - Infrared port macio: fixed media-bay irq on gatwick macio: fixed left floppy irqs swim3 1.00015000:floppy: [fd1] Couldn't request interrupt Unable to handle kernel paging request for data at address 0x00000024 Faulting instruction address: 0xc02652f8 Oops: Kernel access of bad area, sig: 11 [#1] BE SMP NR_CPUS=2 PowerMac Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.20.0 #2 NIP: c02652f8 LR: c026915c CTR: c0276d1c REGS: df43ba10 TRAP: 0300 Not tainted (4.20.0) MSR: 00009032 CR: 28228288 XER: 00000100 DAR: 00000024 DSISR: 40000000 GPR00: c026915c df43bac0 df439060 c0731524 df494700 00000000 c06e1c08 00000001 GPR08: 00000001 00000000 df5ff220 00001032 28228282 00000000 c0004ca4 00000000 GPR16: 00000000 00000000 00000000 c073144c dfffe064 c0731524 00000120 c0586108 GPR24: c073132c c073143c c073143c 00000000 c0731524 df67cd70 df494700 00000001 NIP [c02652f8] blk_mq_free_rqs+0x28/0xf8 LR [c026915c] blk_mq_sched_tags_teardown+0x58/0x84 Call Trace: [df43bac0] [c0045f50] flush_workqueue_prep_pwqs+0x178/0x1c4 (unreliable) [df43bae0] [c026915c] blk_mq_sched_tags_teardown+0x58/0x84 [df43bb00] [c02697f0] blk_mq_exit_sched+0x9c/0xb8 [df43bb20] [c0252794] elevator_exit+0x84/0xa4 [df43bb40] [c0256538] blk_exit_queue+0x30/0x50 [df43bb50] [c0256640] blk_cleanup_queue+0xe8/0x184 [df43bb70] [c034732c] swim3_attach+0x330/0x5f0 [df43bbb0] [c034fb24] macio_device_probe+0x58/0xec [df43bbd0] [c032ba88] really_probe+0x1e4/0x2f4 [df43bc00] [c032bd28] driver_probe_device+0x64/0x204 [df43bc20] [c0329ac4] bus_for_each_drv+0x60/0xac [df43bc50] [c032b824] __device_attach+0xe8/0x160 [df43bc80] [c032ab38] bus_probe_device+0xa0/0xbc [df43bca0] [c0327338] device_add+0x3d8/0x630 [df43bcf0] [c0350848] macio_add_one_device+0x444/0x48c [df43bd50] [c03509f8] macio_pci_add_devices+0x168/0x1bc [df43bd90] [c03500ec] macio_pci_probe+0xc0/0x10c [df43bda0] [c02ad884] pci_device_probe+0xd4/0x184 [df43bdd0] [c032ba88] really_probe+0x1e4/0x2f4 [df43be00] [c032bd28] driver_probe_device+0x64/0x204 [df43be20] [c032bfcc] __driver_attach+0x104/0x108 [df43be40] [c0329a00] bus_for_each_dev+0x64/0xb4 [df43be70] [c032add8] bus_add_driver+0x154/0x238 [df43be90] [c032ca24] driver_register+0x84/0x148 [df43bea0] [c0004aa0] do_one_initcall+0x40/0x188 [df43bf00] [c0690100] kernel_init_freeable+0x138/0x1d4 [df43bf30] [c0004cbc] kernel_init+0x18/0x10c [df43bf40] [c00121e4] ret_from_kernel_thread+0x14/0x1c Instruction dump: 5484d97e 4bfff4f4 9421ffe0 7c0802a6 bf410008 7c9e2378 90010024 8124005c 2f890000 419e0078 81230004 7c7c1b78 <81290024> 2f890000 419e0064 81440000 ---[ end trace 12025ab921a9784c ]--- Reverting commit 8ccb8cb1892b ("swim3: convert to blk-mq") resolves the problem. That commit added a struct blk_mq_tag_set to struct floppy_state and initialized it with a blk_mq_init_sq_queue() call. Unfortunately, there is a memset() in swim3_add_device() that subsequently clears the floppy_state struct. That means fs->tag_set->ops is a NULL pointer, and it gets dereferenced by blk_mq_free_rqs() which gets called in the request_irq() error path. Move the memset() to fix this bug. BTW, the request_irq() failure for the left mediabay floppy (fd1) is not a regression. I don't know why it happens. The right media bay floppy (fd0) works fine however. Reported-and-tested-by: Stan Johnson Fixes: 8ccb8cb1892b ("swim3: convert to blk-mq") Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain Signed-off-by: Jens Axboe commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 Author: Finn Thain Date: Mon Dec 31 16:44:09 2018 +1100 block/swim3: Fix -EBUSY error when re-opening device after unmount When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in the release method. Reported-and-tested-by: Stan Johnson Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain Signed-off-by: Jens Axboe commit f3010ec5b7963b63f5f455725f947a95e55e0c03 Author: Finn Thain Date: Mon Dec 31 16:44:09 2018 +1100 block/swim3: Remove dead return statement Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain Signed-off-by: Jens Axboe commit d4d179c37c74dd18684d3b197fb16642a39e27ee Author: Finn Thain Date: Mon Dec 31 16:44:09 2018 +1100 block/amiflop: Don't log error message on invalid ioctl Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Finn Thain Signed-off-by: Jens Axboe commit 0ad30ff67bd3e82da8c1dc4d74b88aca846dbbd9 Author: Vasily Averin Date: Sat Dec 29 16:38:51 2018 +0300 nfs: fixed broken compilation in nfs_callback_up_net() Patch fixes compilation error in nfs_callback_up_net() serv->sv_bc_enabled is defined under enabled CONFIG_SUNRPC_BACKCHANNEL, however nfs_callback_up_net() can access it even if this config option was not set. Fixes: a289ce5311f4 (sunrpc: replace svc_serv->sv_bc_xprt by boolean flag) Reported-by: kbuild test robot Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 6256734f9173b19e8dd1e21e04b1398a0137f99b Author: Guo Ren Date: Mon Dec 31 22:27:29 2018 +0800 csky: Add EM_CSKY_OLD 39 C-SKY historically used 39, the same value as MCORE, from which the architecture was derived. C-SKY binutils support both EM_CSKY and EM_CSKY_OLD, confirmed by binutils:include/elf/common.h Signed-off-by: Guo Ren commit 0c87bb0e872cbbad59a965fc67668364066aa85e Author: Guo Ren Date: Mon Dec 31 20:52:41 2018 +0800 clocksource/drivers/c-sky: fixup ftrace call-graph panic We must add notrace on sched_clock_read, because it's called by ftrace_graph_caller. Signed-off-by: Guo Ren commit d7950be145c84ca5094c52bc1ad1e7f1893d0f19 Author: Guo Ren Date: Sat Dec 15 21:04:27 2018 +0800 csky: ftrace call graph supported. With csky-gcc -pg -mbacktrace, ftrace call graph supported. Signed-off-by: Guo Ren commit db1ce3f5d01d2d6d5714aefba0159d2cb5167a0b Author: Huacai Chen Date: Tue Dec 25 08:51:01 2018 +0800 MIPS: Fix a R10000_LLSC_WAR logic in atomic.h Commit 4936084c2ee2 ("MIPS: Cleanup R10000_LLSC_WAR logic in atomic.h") introduce a mistake in atomic64_fetch_##op##_relaxed(), because it forget to delete R10000_LLSC_WAR in the if-condition. So fix it. Fixes: 4936084c2ee2 ("MIPS: Cleanup R10000_LLSC_WAR logic in atomic.h") Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Cc: Joshua Kinard Cc: Ralf Baechle Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.19+ commit 230c77a5e92a29bf21e98ee35e22b0537f61c55b Author: Guo Ren Date: Sun Dec 9 14:29:59 2018 +0800 csky: basic ftrace supported When gcc with -pg, it'll add _mcount stub in every function. We need implement the _mcount in kernel and ftrace depends on stackstrace. To do: call-graph, dynamic ftrace Signed-off-by: Guo Ren commit 17a68777bc883c8044c8b2d40aa112ff4e8a4fb1 Author: Guo Ren Date: Sun Dec 9 17:31:53 2018 +0800 csky: remove unused members in processor.h Cleanup struct cpuinfo_csky and struct thread_struct, remove all esp0 related code. We could get pt_regs from sp and backtrace could use fp in switch_stack. Signed-off-by: Guo Ren commit 8f4f1639a19db231e4579612dbc6d147e8d07ffd Author: Guo Ren Date: Sun Dec 9 17:07:20 2018 +0800 csky: optimize kernel panic print. Use STACKTRACE to optimize panic print more pretty and align registers printing. Signed-off-by: Guo Ren commit 682fee802843b332f9c51ffc8e062de5ff773f2e Author: Jonas Gorski Date: Sun Dec 30 12:55:09 2018 +0100 MIPS: BCM63XX: drop unused and broken DSP platform device Trying to register the DSP platform device results in a null pointer access: [ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20 [ 0.135208] Oops[#1]: [ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87 ... [ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4 [ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390 ... This happens because it tries to copy the passed platform data over the platform_device's unpopulated platform_data. Since this code has been broken since its submission, no driver was ever submitted for it, and apparently nobody was using it, just remove it instead of trying to fix it. Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.") Signed-off-by: Jonas Gorski Signed-off-by: Paul Burton Acked-by: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: Ralf Baechle Cc: James Hogan commit 0ea2dc7cd668be5475babecaf6fdeaa464e2847b Author: Guo Ren Date: Sun Dec 9 14:18:05 2018 +0800 csky: stacktrace supported. The gcc option "-mbacktrace" will push fp(r8),lr into stack and we could unwind the stack with: fp = *fp lr = (unsigned int *)fp[1] Signed-off-by: Guo Ren commit 859e5f45cbb33fe5d591a8e429667f0b7d4f4be8 Author: Guo Ren Date: Wed Dec 19 19:56:14 2018 +0800 csky: CPU-hotplug supported for SMP This is a simple implement of CPU-hotplug for power saving. CPU use wait instruction to enter power saving mode and waiting for IPI wakeup signal. Signed-off-by: Guo Ren commit 1d95fe4d3de42e915bc22d5fd6cd4de103c5e517 Author: Guo Ren Date: Thu Dec 20 15:21:41 2018 +0800 clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes. Timer startup must after timer_irq_enable. For qemu, timer tick irq hanppens but irq not enable, so it will cause qemu boot failed. Signed-off-by: Guo Ren Tested-by: Liu Zhiwei commit 789154c2ad74c29c3c60c5136c1785745abe4897 Author: Guo Ren Date: Mon Dec 31 15:17:48 2018 +0800 csky: fixup save hi,lo,dspcr regs in switch_stack. HI, LO, DSPCR registers are 807/810 related regs and no need for 610/860. All of the regs must be saved in pt_regs and switch_stack. This patch fixup saving dspcr reg in switch_stack and pt_regs. Signed-off-by: Guo Ren commit 31295a72b525721d10737260aea6918fb34607be Author: Guo Ren Date: Sun Dec 9 13:18:15 2018 +0800 csky: remove syscall_exit_work Remove syscall_exit_work and union all to ret_from_exception. Signed-off-by: Guo Ren commit 35ff802af1c49dab21af8ef47b492ff952831d72 Author: Guo Ren Date: Mon Dec 31 01:19:29 2018 +0800 csky: fixup remove vdsp implement for kernel. The vr regs for vdsp only saved in task_switch not in every exception trap-in. The memcpy with vdsp instructions will destroy the vr regs for user space applications. Signed-off-by: Guo Ren commit 660611827c03afeb0eec178dc1fb9f842332d908 Merge: 69ca36b3d629f aeaebcc17cdf3 Author: Vinod Koul Date: Mon Dec 31 19:32:32 2018 +0530 Merge branch 'topic/xilinx' into for-linus commit 69ca36b3d629f1fcdaa9e7abb8b6b2084ff947dd Merge: 990beed934fc4 32e74aabebc8d Author: Vinod Koul Date: Mon Dec 31 19:32:27 2018 +0530 Merge branch 'topic/uniphier' into for-linus commit 990beed934fc4568d6e76a5117e71a92fd9fd9d1 Merge: f782086a49b7e 531971231dac0 Author: Vinod Koul Date: Mon Dec 31 19:32:21 2018 +0530 Merge branch 'topic/sprd' into for-linus commit f782086a49b7e7eb713d09370fa4525b04fe0dbe Merge: 56e8e1a118a96 47ec4cf405e23 Author: Vinod Koul Date: Mon Dec 31 19:32:16 2018 +0530 Merge branch 'topic/sh' into for-linus commit 56e8e1a118a96b9d0d02efa6290b94d9082f69d3 Merge: 68ded1dcd138c bc822e80170d6 Author: Vinod Koul Date: Mon Dec 31 19:32:10 2018 +0530 Merge branch 'topic/sa11x0' into for-linus commit 68ded1dcd138cccb7b0e7b23c7a0c5f7e3785535 Merge: 23a1bff764060 b1f01e48df5a3 Author: Vinod Koul Date: Mon Dec 31 19:31:59 2018 +0530 Merge branch 'topic/mtk' into for-linus commit 23a1bff76406070c287c8c5a0b528ae7ffd07d1a Merge: b7ff66ca30f88 af8bf89a8e0b8 Author: Vinod Koul Date: Mon Dec 31 19:31:54 2018 +0530 Merge branch 'topic/imx' into for-linus commit b7ff66ca30f88dfd63763d12b848520baddc5ae5 Merge: 010299bfc2df1 9b68cc012a73b Author: Vinod Koul Date: Mon Dec 31 19:31:47 2018 +0530 Merge branch 'topic/ep93xx' into for-linus commit 010299bfc2df19c2c330c75c048805939e5ab91b Merge: 466e601a68da7 7b0c03ecc42fb Author: Vinod Koul Date: Mon Dec 31 19:31:42 2018 +0530 Merge branch 'topic/dw' into for-linus commit 466e601a68da7554da84e87d81dac74608deedbe Merge: 77ee1aacdd5ba f80f9988a26d7 Author: Vinod Koul Date: Mon Dec 31 19:31:37 2018 +0530 Merge branch 'topic/dmatest' into for-linus commit 77ee1aacdd5bad4617a9617bb838d79840cf1f20 Merge: 5f443256e3a1e 9e314ef35c384 Author: Vinod Koul Date: Mon Dec 31 19:31:31 2018 +0530 Merge branch 'topic/dirn_remove' into for-linus commit 5f443256e3a1e22a0969878428bcfbd3639439d9 Merge: 7c2269e95883a 35faaf0df42d2 Author: Vinod Koul Date: Mon Dec 31 19:31:25 2018 +0530 Merge branch 'topic/coh' into for-linus commit 7c2269e95883a2123dc5c273df54d6c9e05ab880 Merge: f7f41722efacc 80c4445e56f4f Author: Vinod Koul Date: Mon Dec 31 19:31:21 2018 +0530 Merge branch 'topic/bcm' into for-linus commit 36e14f5fdfdf7cec8887b7ff69cd9bb5051ecf62 Author: Alexandre Belloni Date: Mon Dec 31 11:36:16 2018 +0100 rtc: rename core files Rename core files so there is a clearer separation between the RTC core and the RTC drivers. Signed-off-by: Alexandre Belloni commit fea170804b4dc44cd79f8cb1ce236f3a824951cd Author: Steve French Date: Tue Nov 6 16:20:46 2018 -0600 cifs: update internal module version number To version 2.15 Signed-off-by: Steve French commit e77fe73c7e38c36145825d84cfe385d400aba4fd Author: Ronnie Sahlberg Date: Mon Dec 31 13:43:40 2018 +1000 cifs: we can not use small padding iovs together with encryption We can not append small padding buffers as separate iovs when encryption is used. For this case we must flatten the request into a single buffer containing both the data from all the iovs as well as the padding bytes. This is at least needed for 4.20 as well due to compounding changes. CC: Stable Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 95cb67138746451cc84cf8e516e14989746e93b0 Author: Theodore Ts'o Date: Mon Dec 31 00:11:07 2018 -0500 ext4: track writeback errors using the generic tracking infrastructure We already using mapping_set_error() in fs/ext4/page_io.c, so all we need to do is to use file_check_and_advance_wb_err() when handling fsync() requests in ext4_sync_file(). Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit ad211f3e94b314a910d4af03178a0b52a7d1ee0a Author: Theodore Ts'o Date: Mon Dec 31 00:10:48 2018 -0500 ext4: use ext4_write_inode() when fsyncing w/o a journal In no-journal mode, we previously used __generic_file_fsync() in no-journal mode. This triggers a lockdep warning, and in addition, it's not safe to depend on the inode writeback mechanism in the case ext4. We can solve both problems by calling ext4_write_inode() directly. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 3bd8264511035dc97c902f03fa9f1d07f95f8f62 Author: Heiner Kallweit Date: Sun Dec 30 13:16:12 2018 +0100 r8169: fix WoL device wakeup enable In rtl8169_runtime_resume() we configure WoL but don't set the device to wakeup-enabled. This prevents PME generation once the cable is re-plugged. Fix this by moving the call to device_set_wakeup_enable() to __rtl8169_set_wol(). Fixes: 433f9d0ddcc6 ("r8169: improve saved_wolopts handling") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7314f5480f3e37e570104dc5e0f28823ef849e72 Author: Cong Wang Date: Sat Dec 29 13:56:38 2018 -0800 netrom: fix locking in nr_find_socket() nr_find_socket(), nr_find_peer() and nr_find_listener() lock the sock after finding it in the global list. However, the call path requires BH disabled for the sock lock consistently. Actually the locking is unnecessary at this point, we can just hold the sock refcnt to make sure it is not gone after we unlock the global list, and lock it later only when needed. Reported-and-tested-by: syzbot+f621cda8b7e598908efa@syzkaller.appspotmail.com Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit d5c7c745f254c6cb98b3b3f15fe789b8bd770c72 Author: Cong Wang Date: Sat Dec 29 13:56:37 2018 -0800 net/wan: fix a double free in x25_asy_open_tty() When x25_asy_open() fails, it already cleans up by itself, so its caller doesn't need to free the memory again. It seems we still have to call x25_asy_free() to clear the SLF_INUSE bit, so just set these pointers to NULL after kfree(). Reported-and-tested-by: syzbot+5e5e969e525129229052@syzkaller.appspotmail.com Fixes: 3b780bed3138 ("x25_asy: Free x25_asy on x25_asy_open() failure.") Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit e86807862e6880809f191c4cea7f88a489f0ed34 Author: Theodore Ts'o Date: Sun Dec 30 23:20:39 2018 -0500 ext4: avoid kernel warning when writing the superblock to a dead device The xfstests generic/475 test switches the underlying device with dm-error while running a stress test. This results in a large number of file system errors, and since we can't lock the buffer head when marking the superblock dirty in the ext4_grp_locked_error() case, it's possible the superblock to be !buffer_uptodate() without buffer_write_io_error() being true. We need to set buffer_uptodate() before we call mark_buffer_dirty() or this will trigger a WARN_ON. It's safe to do this since the superblock must have been properly read into memory or the mount would have been successful. So if buffer_uptodate() is not set, we can safely assume that this happened due to a failed attempt to write the superblock. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org commit 2054f4af19575d9d2a43bcefa48d2e64f10a25de Author: Guo Ren Date: Mon Dec 31 01:06:53 2018 +0800 csky: bugfix gdb coredump error. In gdb/bfd elf32-csky.c, csky_elf_grok_prstatus() use fixed size of elf_prstatus. It's 148 for abiv1 and 220 for abiv2, the size is enough for coredump and no need full sizeof(struct pt_regs). Signed-off-by: Guo Ren Reported-by: Lu Baoquan Reported-by: Liu Mao commit 2b070ccdf8c020fb6c4911263852c021d8aa843c Author: Guo Ren Date: Sun Dec 30 21:47:28 2018 +0800 csky: fixup abiv2 mmap(... O_SYNC) failed. Glibc function mmap(... O_SYNC) will make page to _PAGE_UNCACHE + _PAGE_SO and strong-order page couldn't support unalignment access. So remove _PAGE_SO from _PAGE_UNCACHE, also sync abiv1 with the macro of _PAGE_SO. Signed-off-by: Guo Ren Reported-by: Liu Renwei Tested-by: Yuan Qiyun commit bba3d2daa8a9bc888902275401f15ef48fcdd378 Author: Alexandre Belloni Date: Mon Dec 31 00:49:36 2018 +0100 rtc: nvmem: fix possible use after free In cas of probe failure, devres may free the memory allocated for rtc->nvram before devm_rtc_release_device() is called. This leads to rtc_nvram_unregister using it after being freed which may lead to a crash. This has been shown to happen after commit 461e557b9727 ("rtc: nvmem: use devm_nvmem_register()") Reported-by: kernel test robot Signed-off-by: Alexandre Belloni commit 74136a3d47f51ae72ee8b9ebc1ec2a29bcf30676 Merge: 4bcd2ffd214c1 f6653a0e08775 Author: Dave Airlie Date: Mon Dec 31 08:29:38 2018 +1000 Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for 4.21. A bit more than usual due to the holidays. Highlights: - add new vegaM pci id - sr-iov fixes - DC fix for fast cursor updates - DC freesync fix - DC display clock fix for polaris - DC fixes for dongles - DC fix for some eDP panels - misc vega20 fixes - kfd return code fix for dma_buf support - VCN fixes for PCO - nbio hw bug workaround Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181229183307.3330-1-alexander.deucher@amd.com commit c433570458e49bccea5c551df628d058b3526289 Author: Cong Wang Date: Sat Dec 29 13:56:36 2018 -0800 ax25: fix a use-after-free in ax25_fillin_cb() There are multiple issues here: 1. After freeing dev->ax25_ptr, we need to set it to NULL otherwise we may use a dangling pointer. 2. There is a race between ax25_setsockopt() and device notifier as reported by syzbot. Close it by holding RTNL lock. 3. We need to test if dev->ax25_ptr is NULL before using it. Reported-and-tested-by: syzbot+ae6bb869cbed29b29040@syzkaller.appspotmail.com Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 7f334a7e1ae113212e39aafba51352ea9ab8c9f9 Author: Su Yanjun Date: Sat Dec 29 14:07:55 2018 -0500 ipv6: fix typo in net/ipv6/reassembly.c Signed-off-by: Su Yanjun Signed-off-by: David S. Miller commit 58075ff523af85002bfeace07304d57c59251605 Author: YueHaibing Date: Sat Dec 29 14:45:23 2018 +0800 ipv4: fib_rules: Fix possible infinite loop in fib_empty_table gcc warn this: net/ipv4/fib_rules.c:203 fib_empty_table() warn: always true condition '(id <= 4294967295) => (0-u32max <= u32max)' 'id' is u32, which always not greater than RT_TABLE_MAX (0xFFFFFFFF), So add a check to break while wrap around. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 178fe94405bffbd1acd83b6ff3b40211185ae9c9 Author: Christophe JAILLET Date: Fri Dec 28 23:28:21 2018 +0100 net/ipv6: Fix a test against 'ipv6_find_idev()' return value 'ipv6_find_idev()' returns NULL on error, not an error pointer. Update the test accordingly and return -ENOBUFS, as already done in 'addrconf_add_dev()', if NULL is returned. Fixes: ("ipv6: allow userspace to add IFA_F_OPTIMISTIC addresses") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit f989d03ef25df3fc26d3ea0fe7c19c9830577166 Author: Nikolay Aleksandrov Date: Sun Dec 30 14:33:20 2018 +0200 net: rtnetlink: address is mandatory for rtnl_fdb_get We must have an address to lookup otherwise we'll derefence a null pointer in the ndo_fdb_get callbacks. CC: Roopa Prabhu CC: David Ahern Reported-by: syzbot+017b1f61c82a1c3e7efd@syzkaller.appspotmail.com Fixes: 5b2f94b27622 ("net: rtnetlink: support for fdb get") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller commit d770b25653447b4c57303859e2ac04ebe9318f8e Author: Dmitry V. Levin Date: Thu Dec 13 20:22:07 2018 +0300 csky: define syscall_get_arch() syscall_get_arch() is required to be implemented on all architectures in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Cc: Guo Ren Cc: Paul Moore Cc: Eric Paris Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: linux-audit@redhat.com Signed-off-by: Dmitry V. Levin Signed-off-by: Guo Ren arch/csky/include/asm/syscall.h | 7 +++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 8 insertions(+) commit 077b930adafead095cd38600539ec129f1379d8c Author: Dmitry V. Levin Date: Thu Dec 13 20:22:00 2018 +0300 elf-em.h: add EM_CSKY The uapi/linux/audit.h header is going to use EM_CSKY in order to define AUDIT_ARCH_CSKY which is needed to implement syscall_get_arch() which in turn is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. The value for EM_CSKY has been taken from arch/csky/include/asm/elf.h and confirmed by binutils:include/elf/common.h Cc: Guo Ren Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Signed-off-by: Dmitry V. Levin Signed-off-by: Guo Ren commit c40f7d74c741a907cfaeb73a7697081881c497d0 Author: Linus Torvalds Date: Thu Dec 27 13:46:17 2018 -0800 sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) revert of: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path") It turns out that the list_del_leaf_cfs_rq() introduced by this commit is a surprising property that was not considered in followup commits such as: 9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list") As Vincent Guittot explains: "I think that there is a bigger problem with commit a9e7f6544b9c and cfs_rq throttling: Let take the example of the following topology TG2 --> TG1 --> root: 1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1 cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in one path because it has never been used and can't be throttled so tmp_alone_branch will point to leaf_cfs_rq_list at the end. 2) Then TG1 is throttled 3) and we add TG3 as a new child of TG1. 4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1 cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list. With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list. So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1 cfs_rq is removed from the list. Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list but tmp_alone_branch still points to TG3 cfs_rq because its throttled parent can't be enqueued when the lock is released. tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should. So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch points on another TG cfs_rq, the next TG cfs_rq that will be added, will be linked outside rq->leaf_cfs_rq_list - which is bad. In addition, we can break the ordering of the cfs_rq in rq->leaf_cfs_rq_list but this ordering is used to update and propagate the update from leaf down to root." Instead of trying to work through all these cases and trying to reproduce the very high loads that produced the lockup to begin with, simplify the code temporarily by reverting a9e7f6544b9c - which change was clearly not thought through completely. This (hopefully) gives us a kernel that doesn't lock up so people can continue to enjoy their holidays without worrying about regressions. ;-) [ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ] Analyzed-by: Xie XiuQi Analyzed-by: Vincent Guittot Reported-by: Zhipeng Xie Reported-by: Sargun Dhillon Reported-by: Xie XiuQi Tested-by: Zhipeng Xie Tested-by: Sargun Dhillon Signed-off-by: Linus Torvalds Acked-by: Vincent Guittot Cc: # v4.13+ Cc: Bin Li Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Tejun Heo Cc: Thomas Gleixner Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path") Link: http://lkml.kernel.org/r/1545879866-27809-1-git-send-email-xiexiuqi@huawei.com Signed-off-by: Ingo Molnar commit dc3e0896003ee9b3bcc34c53965dc4bbc8671c44 Author: Masahiro Yamada Date: Mon Dec 17 01:03:25 2018 +0900 csky: remove meaningless header-y Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), header-y is meaningless because headers under uapi are all exported. Signed-off-by: Masahiro Yamada Signed-off-by: Guo Ren commit 398539dd69341f8e3b87b8fea9355c7edfb6d99a Author: Yangtao Li Date: Thu Dec 27 12:45:51 2018 -0500 csky: Don't leak device tree node reference of_find_node_by_type() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. setup_smp() doesn't do that, so fix it by converting to for_each_of_cpu_node(). Signed-off-by: Yangtao Li Signed-off-by: Guo Ren commit cc0282975b3f887005c380adcf0af95915f0c1bb Author: Christophe Leroy Date: Thu Dec 6 20:07:40 2018 +0000 kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops checkpatch.pl reports the following: WARNING: struct kgdb_arch should normally be const #28: FILE: arch/mips/kernel/kgdb.c:397: +struct kgdb_arch arch_kgdb_ops = { This report makes sense, as all other ops struct, this one should also be const. This patch does the change. Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Yoshinori Sato Cc: Richard Kuo Cc: Michal Simek Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Ley Foon Tan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rich Felker Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Acked-by: Daniel Thompson Acked-by: Paul Burton Signed-off-by: Christophe Leroy Acked-by: Borislav Petkov Acked-by: Michael Ellerman (powerpc) Signed-off-by: Daniel Thompson commit 911b7afdeb1b6058056c3a74e15d5ebb7eb6225e Author: Christophe Leroy Date: Thu Dec 6 20:07:38 2018 +0000 mips/kgdb: prepare arch_kgdb_ops for constness MIPS is the only architecture modifying arch_kgdb_ops during init. This patch makes the init static, so that it can be changed to const in following patch, as recommended by checkpatch.pl Suggested-by: Paul Burton Acked-by: Daniel Thompson Acked-by: Paul Burton Signed-off-by: Christophe Leroy Signed-off-by: Daniel Thompson commit 7faedcd4de4356dfcda30841a5ffef3bf35fa06c Author: Nicholas Mc Guire Date: Fri Jul 20 11:23:37 2018 +0200 kdb: use bool for binary state indicators defcmd_in_progress is the state trace for command group processing - within a command group or not - usable is an indicator if a command set is valid (allocated/non-empty) - so use a bool for those binary indication here. Signed-off-by: Nicholas Mc Guire Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 162bc7f5afd75b72acbe3c5f3488ef7e64a3fe36 Author: Douglas Anderson Date: Tue Dec 4 19:38:28 2018 -0800 kdb: Don't back trace on a cpu that didn't round up If you have a CPU that fails to round up and then run 'btc' you'll end up crashing in kdb becaue we dereferenced NULL. Let's add a check. It's wise to also set the task to NULL when leaving the debugger so that if we fail to round up on a later entry into the debugger we won't backtrace a stale task. Signed-off-by: Douglas Anderson Acked-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 87b095928584da7d5cb3149016f00b0b139c2292 Author: Douglas Anderson Date: Tue Dec 4 19:38:27 2018 -0800 kgdb: Don't round up a CPU that failed rounding up before If we're using the default implementation of kgdb_roundup_cpus() that uses smp_call_function_single_async() we can end up hanging kgdb_roundup_cpus() if we try to round up a CPU that failed to round up before. Specifically smp_call_function_single_async() will try to wait on the csd lock for the CPU that we're trying to round up. If the previous round up never finished then that lock could still be held and we'll just sit there hanging. There's not a lot of use trying to round up a CPU that failed to round up before. Let's keep a flag that indicates whether the CPU started but didn't finish to round up before. If we see that flag set then we'll skip the next round up. In general we have a few goals here: - We never want to end up calling smp_call_function_single_async() when the csd is still locked. This is accomplished because flush_smp_call_function_queue() unlocks the csd _before_ invoking the callback. That means that when kgdb_nmicallback() runs we know for sure the the csd is no longer locked. Thus when we set "rounding_up = false" we know for sure that the csd is unlocked. - If there are no timeouts rounding up we should never skip a round up. NOTE #1: In general trying to continue running after failing to round up CPUs doesn't appear to be supported in the debugger. When I simulate this I find that kdb reports "Catastrophic error detected" when I try to continue. I can overrule and continue anyway, but it should be noted that we may be entering the land of dragons here. Possibly the "Catastrophic error detected" was added _because_ of the future failure to round up, but even so this is an area of the code that hasn't been strongly tested. NOTE #2: I did a bit of testing before and after this change. I introduced a 10 second hang in the kernel while holding a spinlock that I could invoke on a certain CPU with 'taskset -c 3 cat /sys/...". Before this change if I did: - Invoke hang - Enter debugger - g (which warns about Catastrophic error, g again to go anyway) - g - Enter debugger ...I'd hang the rest of the 10 seconds without getting a debugger prompt. After this change I end up in the debugger the 2nd time after only 1 second with the standard warning about 'Timed out waiting for secondary CPUs.' I'll also note that once the CPU finished waiting I could actually debug it (aka "btc" worked) I won't promise that everything works perfectly if the errant CPU comes back at just the wrong time (like as we're entering or exiting the debugger) but it certainly seems like an improvement. NOTE #3: setting 'kgdb_info[cpu].rounding_up = false' is in kgdb_nmicallback() instead of kgdb_call_nmi_hook() because some implementations override kgdb_call_nmi_hook(). It shouldn't hurt to have it in kgdb_nmicallback() in any case. NOTE #4: this logic is really only needed because there is no API call like "smp_try_call_function_single_async()" or "smp_csd_is_locked()". If such an API existed then we'd use it instead, but it seemed a bit much to add an API like this just for kgdb. Signed-off-by: Douglas Anderson Acked-by: Daniel Thompson Signed-off-by: Daniel Thompson commit 3cd99ac3559855f69afbc1d5080e17eaa12394ff Author: Douglas Anderson Date: Tue Dec 4 19:38:26 2018 -0800 kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() When I had lockdep turned on and dropped into kgdb I got a nice splat on my system. Specifically it hit: DEBUG_LOCKS_WARN_ON(current->hardirq_context) Specifically it looked like this: sysrq: SysRq : DEBUG ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(current->hardirq_context) WARNING: CPU: 0 PID: 0 at .../kernel/locking/lockdep.c:2875 lockdep_hardirqs_on+0xf0/0x160 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.0 #27 pstate: 604003c9 (nZCv DAIF +PAN -UAO) pc : lockdep_hardirqs_on+0xf0/0x160 ... Call trace: lockdep_hardirqs_on+0xf0/0x160 trace_hardirqs_on+0x188/0x1ac kgdb_roundup_cpus+0x14/0x3c kgdb_cpu_enter+0x53c/0x5cc kgdb_handle_exception+0x180/0x1d4 kgdb_compiled_brk_fn+0x30/0x3c brk_handler+0x134/0x178 do_debug_exception+0xfc/0x178 el1_dbg+0x18/0x78 kgdb_breakpoint+0x34/0x58 sysrq_handle_dbg+0x54/0x5c __handle_sysrq+0x114/0x21c handle_sysrq+0x30/0x3c qcom_geni_serial_isr+0x2dc/0x30c ... ... irq event stamp: ...45 hardirqs last enabled at (...44): [...] __do_softirq+0xd8/0x4e4 hardirqs last disabled at (...45): [...] el1_irq+0x74/0x130 softirqs last enabled at (...42): [...] _local_bh_enable+0x2c/0x34 softirqs last disabled at (...43): [...] irq_exit+0xa8/0x100 ---[ end trace adf21f830c46e638 ]--- Looking closely at it, it seems like a really bad idea to be calling local_irq_enable() in kgdb_roundup_cpus(). If nothing else that seems like it could violate spinlock semantics and cause a deadlock. Instead, let's use a private csd alongside smp_call_function_single_async() to round up the other CPUs. Using smp_call_function_single_async() doesn't require interrupts to be enabled so we can remove the offending bit of code. In order to avoid duplicating this across all the architectures that use the default kgdb_roundup_cpus(), we'll add a "weak" implementation to debug_core.c. Looking at all the people who previously had copies of this code, there were a few variants. I've attempted to keep the variants working like they used to. Specifically: * For arch/arc we passed NULL to kgdb_nmicallback() instead of get_irq_regs(). * For arch/mips there was a bit of extra code around kgdb_nmicallback() NOTE: In this patch we will still get into trouble if we try to round up a CPU that failed to round up before. We'll try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Richard Kuo Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Yoshinori Sato Cc: Rich Felker Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit 9ef7fa507d6b53a96de4da3298c5f01bde603c0a Author: Douglas Anderson Date: Tue Dec 4 19:38:25 2018 -0800 kgdb: Remove irq flags from roundup The function kgdb_roundup_cpus() was passed a parameter that was documented as: > the flags that will be used when restoring the interrupts. There is > local_irq_save() call before kgdb_roundup_cpus(). Nobody used those flags. Anyone who wanted to temporarily turn on interrupts just did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Richard Kuo Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Yoshinori Sato Cc: Rich Felker Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Acked-by: Will Deacon Signed-off-by: Daniel Thompson commit f460772291f8171988b2b60141a45706123d0c69 Author: Michael Ellerman Date: Sun Dec 30 14:05:13 2018 +1100 KVM: PPC: Book3S HV: radix: Fix uninitialized var build error Old GCCs (4.6.3 at least), aren't able to follow the logic in __kvmhv_copy_tofrom_guest_radix() and warn that old_pid is used uninitialized: arch/powerpc/kvm/book3s_64_mmu_radix.c:75:3: error: 'old_pid' may be used uninitialized in this function The logic is OK, we only use old_pid if quadrant == 1, and in that case it has definitely be initialised, eg: if (quadrant == 1) { old_pid = mfspr(SPRN_PID); ... if (quadrant == 1 && pid != old_pid) mtspr(SPRN_PID, old_pid); Annotate it to fix the error. Signed-off-by: Michael Ellerman commit 42aee37298f4b1d91ecb55530a62de249ecf4266 Author: Michael Ellerman Date: Thu Dec 27 20:40:40 2018 +1100 powerpc/configs: Add PPC4xx_OCM to ppc40x_defconfig There was recently a compilation break to this driver, but we didn't notice because none of our defconfigs have it enabled. Fix that. Signed-off-by: Michael Ellerman commit 52b88fa1e8c7bae03bb691178a9f8bfb64e5679f Author: Michael Ellerman Date: Thu Dec 27 20:37:29 2018 +1100 powerpc/4xx/ocm: Fix phys_addr_t printf warnings Currently the code produces several warnings, eg: arch/powerpc/platforms/4xx/ocm.c:240:38: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' seq_printf(m, "PhysAddr : 0x%llx\n", ocm->phys); ~~~^ ~~~~~~~~~ Fix it by using the special %pa[p] format for printing phys_addr_t. Note we need to pass the value by reference for the special specifier to work. Signed-off-by: Michael Ellerman commit d0757237d7b18b1ce74293be7c077d86f7a732e8 Author: Christian Lamparter Date: Sat Dec 22 15:35:38 2018 +0100 powerpc/4xx/ocm: Fix compilation error due to PAGE_KERNEL usage This patch fixes a recent compilation regression in ocm: ocm.c: In function ‘ocm_init_node’: ocm.c:182:18: error: invalid operands to binary | (have ‘int’ and ‘pgprot_t’ {aka ‘struct ’}) _PAGE_EXEC | PAGE_KERNEL_NCG); ^ ocm.c:197:17: error: invalid operands to binary | (have ‘int’ and ‘pgprot_t’ {aka ‘struct ’}) _PAGE_EXEC | PAGE_KERNEL); ^ Fixes: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()") Cc: stable@vger.kernel.org # v4.20 Signed-off-by: Christian Lamparter Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 039daac5526932ec731e4499613018d263af8b3e Author: Diana Craciun Date: Sun Dec 23 22:34:25 2018 +0200 powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup' Fixed the following build warning: powerpc-linux-gnu-ld: warning: orphan section `__btb_flush_fixup' from `arch/powerpc/kernel/head_44x.o' being placed in section `__btb_flush_fixup'. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit f7d18ef6a95f399544d7b767291980cecddc32eb Merge: 0d9c9a238faf9 a007232066f68 Author: David S. Miller Date: Sat Dec 29 14:25:52 2018 -0800 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 net, specifically fixes for the nf_conncount infrastructure which is causing troubles since 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search"). Patches aim to simplify this infrastructure while fixing up the problems: 1) Use fixed size CONNCOUNT_SLOTS in nf_conncount, from Shawn Bohrer. 2) Incorrect signedness in age calculation from find_or_evict(), from Florian Westphal. 3) Proper locking for the garbage collector workqueue callback, first make a patch to count how many nodes can be collected without holding locks, then grab lock and release them. Also from Florian. 4) Restart node lookup from the insertion path, after releasing nodes via packet path garbage collection. Shawn Bohrer described a scenario that may result in inserting a connection in an already dead list node. Patch from Florian. 5) Merge lookup and add function to avoid a hold release and re-grab. From Florian. 6) Be safe and iterate over the node lists under the spinlock. 7) Speculative list nodes removal via garbage collection, check if list node got a connection while it was scheduled for deletion via gc. 8) Accidental argument swap in find_next_bit() that leads to more frequent scheduling of the workqueue. From Florian Westphal. ==================== Signed-off-by: David S. Miller commit 195303136f192d37b89e20a8d1d2670d0d825266 Merge: 769e47094dcc0 5cfc879caee81 Author: Linus Torvalds Date: Sat Dec 29 13:40:29 2018 -0800 Merge tag 'kconfig-v4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig file consolidation from Masahiro Yamada: "Consolidation of bus (PCI, PCMCIA, EISA, RapidIO) config entries by Christoph Hellwig. Currently, every architecture that wants to provide common peripheral busses needs to add some boilerplate code and include the right Kconfig files. This series instead just selects the presence (when needed) and then handles everything in the bus-specific Kconfig file under drivers/" * tag 'kconfig-v4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: pcmcia: remove per-arch PCMCIA config entry eisa: consolidate EISA Kconfig entry in drivers/eisa rapidio: consolidate RAPIDIO config entry in drivers/rapidio pcmcia: allow PCMCIA support independent of the architecture PCI: consolidate the PCI_SYSCALL symbol PCI: consolidate the PCI_DOMAINS and PCI_DOMAINS_GENERIC config options PCI: consolidate PCI config entry in drivers/pci MIPS: remove the HT_PCI config option commit 769e47094dcc0ddc8fe8e04c13565a71134ec1a2 Merge: 668c35f69cc75 f222b7f43661c Author: Linus Torvalds Date: Sat Dec 29 13:03:29 2018 -0800 Merge tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - support -y option for merge_config.sh to avoid downgrading =y to =m - remove S_OTHER symbol type, and touch include/config/*.h files correctly - fix file name and line number in lexer warnings - fix memory leak when EOF is encountered in quotation - resolve all shift/reduce conflicts of the parser - warn no new line at end of file - make 'source' statement more strict to take only string literal - rewrite the lexer and remove the keyword lookup table - convert to SPDX License Identifier - compile C files independently instead of including them from zconf.y - fix various warnings of gconfig - misc cleanups * tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (39 commits) kconfig: surround dbg_sym_flags with #ifdef DEBUG to fix gconf warning kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings kconfig: add static qualifiers to fix gconf warnings kconfig: split the lexer out of zconf.y kconfig: split some C files out of zconf.y kconfig: convert to SPDX License Identifier kconfig: remove keyword lookup table entirely kconfig: update current_pos in the second lexer kconfig: switch to ASSIGN_VAL state in the second lexer kconfig: stop associating kconf_id with yylval kconfig: refactor end token rules kconfig: stop supporting '.' and '/' in unquoted words treewide: surround Kconfig file paths with double quotes microblaze: surround string default in Kconfig with double quotes kconfig: use T_WORD instead of T_VARIABLE for variables kconfig: use specific tokens instead of T_ASSIGN for assignments kconfig: refactor scanning and parsing "option" properties kconfig: use distinct tokens for type and default properties kconfig: remove redundant token defines kconfig: rename depends_list to comment_option_list ... commit 668c35f69cc750aaf07bd5fe7710a47e2aed6e43 Merge: d8372ba8ce288 dec28d8ea2f73 Author: Linus Torvalds Date: Sat Dec 29 12:03:17 2018 -0800 Merge tag 'kbuild-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: "Kbuild core: - remove unneeded $(call cc-option,...) switches - consolidate Clang compiler flags into CLANG_FLAGS - announce the deprecation of SUBDIRS - fix single target build for external module - simplify the dependencies of 'prepare' stage targets - allow fixdep to directly write to .*.cmd files - simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS - change if_changed_rule to accept multi-line recipe - move .SECONDARY special target to scripts/Kbuild.include - remove redundant 'set -e' - improve parallel execution for CONFIG_HEADERS_CHECK - misc cleanups Treewide fixes and cleanups - set Clang flags correctly for PowerPC boot images - fix UML build error with CONFIG_GCC_PLUGINS - remove unneeded patterns from .gitignore files - refactor firmware/Makefile - remove unneeded rules for *offsets.s - avoid unneeded regeneration of intermediate .s files - clean up ./Kbuild Modpost: - remove unused -M, -K options - fix false positive warnings about section mismatch - use simple devtable lookup instead of linker magic - misc cleanups Coccinelle: - relax boolinit.cocci checks for overall consistency - fix warning messages of boolinit.cocci Other tools: - improve -dirty check of scripts/setlocalversion - add a tool to generate compile_commands.json from .*.cmd files" * tag 'kbuild-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (51 commits) kbuild: remove unused cmd_gentimeconst kbuild: remove $(obj)/ prefixes in ./Kbuild treewide: add intermediate .s files to targets treewide: remove explicit rules for *offsets.s firmware: refactor firmware/Makefile firmware: remove unnecessary patterns from .gitignore scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore um: remove unused filechk_gen_header in Makefile scripts: add a tool to produce a compile_commands.json file kbuild: add -Werror=implicit-int flag unconditionally kbuild: add -Werror=strict-prototypes flag unconditionally kbuild: add -fno-PIE flag unconditionally scripts: coccinelle: Correct warning message scripts: coccinelle: only suggest true/false in files that already use them kbuild: handle part-of-module correctly for *.ll and *.symtypes kbuild: refactor part-of-module kbuild: refactor quiet_modtag kbuild: remove redundant quiet_modtag for $(obj-m) kbuild: refactor Makefile.asm-generic user/Makefile: Fix typo and capitalization in comment section ... commit d8372ba8ce288acdfce67cb873b2a741785c2e88 Author: NeilBrown Date: Sat Dec 29 13:58:09 2018 +1100 lib: don't depend on linux headers being installed. gen_crc64table requires linux include files to be installed in /usr/include/linux. This is a new requrement so hosts that could previously build the kernel, now cannot. gen_crc64table makes this requirement by including , but nothing from that header is actaully used. So remove the #include, so that the linux headers no longer need to be installed. Fixes: feba04fd2cf8 ("lib: add crc64 calculation routines") Signed-off-by: NeilBrown Acked-by: Coly Li Signed-off-by: Linus Torvalds commit 3868772b99e3146d02cf47e739d79022eba1d77c Merge: 6f9d71c9c759b 942104a21ce49 Author: Linus Torvalds Date: Sat Dec 29 11:21:49 2018 -0800 Merge tag 'docs-5.0' of git://git.lwn.net/linux Pull documentation update from Jonathan Corbet: "A fairly normal cycle for documentation stuff. We have a new document on perf security, more Italian translations, more improvements to the memory-management docs, improvements to the pathname lookup documentation, and the usual array of smaller fixes. As is often the case, there are a few reaches outside of Documentation/ to adjust kerneldoc comments" * tag 'docs-5.0' of git://git.lwn.net/linux: (38 commits) docs: improve pathname-lookup document structure configfs: fix wrong name of struct in documentation docs/mm-api: link slab_common.c to "The Slab Cache" section slab: make kmem_cache_create{_usercopy} description proper kernel-doc doc:process: add links where missing docs/core-api: make mm-api.rst more structured x86, boot: documentation whitespace fixup Documentation: devres: note checking needs when converting doc:it: add some process/* translations doc:it: fixes in process/1.Intro Documentation: convert path-lookup from markdown to resturctured text Documentation/admin-guide: update admin-guide index.rst Documentation/admin-guide: introduce perf-security.rst file scripts/kernel-doc: Fix struct and struct field attribute processing Documentation: dev-tools: Fix typos in index.rst Correct gen_init_cpio tool's documentation Document /proc/pid PID reuse behavior Documentation: update path-lookup.md for parallel lookups Documentation: Use "while" instead of "whilst" dmaengine: Add mailing list address to the documentation ... commit 6f9d71c9c759b1e7d31189a4de228983192c7dc7 Merge: 55db91fbaad9e 3fc9c12d27b4d Author: Linus Torvalds Date: Sat Dec 29 10:57:20 2018 -0800 Merge branch 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - Waiman's cgroup2 cpuset support has been finally merged closing one of the last remaining feature gaps. - cgroup.procs could show non-leader threads when cgroup2 threaded mode was used in certain ways. I forgot to push the fix during the last cycle. - A patch to fix mount option parsing when all mount options have been consumed by someone else (LSM). - cgroup_no_v1 boot param can now block named cgroup1 hierarchies too. * 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Add named hierarchy disabling to cgroup_no_v1 boot param cgroup: fix parsing empty mount option string cpuset: Remove set but not used variable 'cs' cgroup: fix CSS_TASK_ITER_PROCS cgroup: Add .__DEBUG__. prefix to debug file names cpuset: Minor cgroup2 interface updates cpuset: Expose cpuset.cpus.subpartitions with cgroup_debug cpuset: Add documentation about the new "cpuset.sched.partition" flag cpuset: Use descriptive text when reading/writing cpuset.sched.partition cpuset: Expose cpus.effective and mems.effective on cgroup v2 root cpuset: Make generate_sched_domains() work with partition cpuset: Make CPU hotplug work with partition cpuset: Track cpusets that use parent's effective_cpus cpuset: Add an error state to cpuset.sched.partition cpuset: Add new v2 cpuset.sched.partition flag cpuset: Simply allocation and freeing of cpumasks cpuset: Define data structures to support scheduling partition cpuset: Enable cpuset controller in default hierarchy cgroup: remove unnecessary unlikely() commit 90be9b86da9039fe6cf2880dc16fd0b0899603a5 Author: Julia Lawall Date: Sun Dec 23 14:52:12 2018 -0800 xfs: xfs_fsops: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares is never used. Commit 0410c3bb2b88 ("xfs: factor ag btree root block initialisation") stopped using buffer_list and started using a buffer list in an aghdr_init_data structure, but the declaration of buffer_list was not removed. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 0410c3bb2b88 ("xfs: factor ag btree root block initialisation") Signed-off-by: Julia Lawall Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 89be677b6b39f7be4533fea3281d49ff3e3af835 Author: Julia Lawall Date: Sun Dec 23 14:52:11 2018 -0800 xfs: xfs_buf: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 26f1fe858f274 ("xfs: reduce lock hold times in buffer writeback") Signed-off-by: Julia Lawall Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 55db91fbaad9ea769d516e6867195808b4399894 Merge: 9ef10340749e1 6ab7d47bcbf01 Author: Linus Torvalds Date: Sat Dec 29 10:13:23 2018 -0800 Merge branch 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu update from Dennis Zhou: "Michael Cree noted generic UP Alpha has been broken since v3.18. This is a small fix for locking in UP percpu code that fixes the issue" * 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: convert spin_lock_irq to spin_lock_irqsave. commit 9ef10340749e1da0c7fde609cedd5360f8484a0b Merge: 889bb74302e5a 64711f9a47d4d Author: Linus Torvalds Date: Sat Dec 29 09:40:40 2018 -0800 Merge tag 'xtensa-20181228' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - switch to generated syscall table - switch ptrace to regsets, use regsets for core dumps - complete tracehook implementation - add syscall tracepoints support - add jumplabels support - add memtest support - drop unused/duplicated code from entry.S, ptrace.c, coprocessor.S, elf.h and syscall.h - clean up warnings caused by WSR/RSR macros - clean up DTC warnings about SPI controller node names in xtfpga.dtsi - simplify coprocessor.S - get rid of explicit 'l32r' instruction usage in assembly * tag 'xtensa-20181228' of git://github.com/jcmvbkbc/linux-xtensa: (25 commits) xtensa: implement jump_label support xtensa: implement syscall tracepoints xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK xtensa: enable CORE_DUMP_USE_REGSET xtensa: implement TIE regset xtensa: implement task_user_regset_view xtensa: call do_syscall_trace_{enter,leave} selectively xtensa: use NO_SYSCALL instead of -1 xtensa: define syscall_get_arch() Move EM_XTENSA to uapi/linux/elf-em.h xtensa: support memtest xtensa: don't use l32r opcode directly xtensa: xtfpga.dtsi: fix dtc warnings about SPI xtensa: don't clear cpenable unconditionally on release xtensa: simplify coprocessor.S xtensa: clean up WSR*/RSR*/get_sr/set_sr xtensa: drop unused declarations from elf.h xtensa: clean up syscall.h xtensa: drop unused coprocessor helper functions xtensa: drop custom PTRACE_{PEEK,POKE}{TEXT,DATA} ... commit 889bb74302e5aba85d987b4093344150984d7cda Merge: 903b77c631673 e2f3f8b4a497d Author: Linus Torvalds Date: Sat Dec 29 09:37:03 2018 -0800 Merge tag 'nds32-for-linus-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux Pull nds32 updates from Greentime Hu: - Perf support - Power management support - FPU support - Hardware prefetcher support - Build error fixed - Performance enhancement * tag 'nds32-for-linus-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: nds32: support hardware prefetcher nds32: Fix the items of hwcap_str ordering issue. math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning math-emu/op-2.h: Use statement expressions to prevent negative constant shift nds32: support denormalized result through FP emulator nds32: Support FP emulation nds32: nds32 FPU port nds32: Remove duplicated include from pm.c nds32: Power management for nds32 nds32: Add document for NDS32 PMU. nds32: Add perf call-graph support. nds32: Perf porting nds32: Fix bug in bitfield.h nds32: Fix gcc 8.0 compiler option incompatible. nds32: Fill all TLB entries with kernel image mapping nds32: Remove the redundant assignment commit 093c48213ee37c3c3ff1cf5ac1aa2a9d8bc66017 Author: Wenwen Wang Date: Wed Dec 26 20:15:13 2018 -0600 gdrom: fix a memory leak bug In probe_gdrom(), the buffer pointed by 'gd.cd_info' is allocated through kzalloc() and is used to hold the information of the gdrom device. To register and unregister the device, the pointer 'gd.cd_info' is passed to the functions register_cdrom() and unregister_cdrom(), respectively. However, this buffer is not freed after it is used, which can cause a memory leak bug. This patch simply frees the buffer 'gd.cd_info' in exit_gdrom() to fix the above issue. Signed-off-by: Wenwen Wang Signed-off-by: Jens Axboe commit 0d9c9a238faf925823bde866182c663b6d734f2e Author: Scott Wood Date: Thu Dec 27 18:29:09 2018 -0600 fsl/fman: Use GFP_ATOMIC in {memac,tgec}_add_hash_mac_address() These functions are called from atomic context: [ 9.150239] BUG: sleeping function called from invalid context at /home/scott/git/linux/mm/slab.h:421 [ 9.158159] in_atomic(): 1, irqs_disabled(): 0, pid: 4432, name: ip [ 9.163128] CPU: 8 PID: 4432 Comm: ip Not tainted 4.20.0-rc2-00169-g63d86876f324 #29 [ 9.163130] Call Trace: [ 9.170701] [c0000002e899a980] [c0000000009c1068] .dump_stack+0xa8/0xec (unreliable) [ 9.177140] [c0000002e899aa10] [c00000000007a7b4] .___might_sleep+0x138/0x164 [ 9.184440] [c0000002e899aa80] [c0000000001d5bac] .kmem_cache_alloc_trace+0x238/0x30c [ 9.191216] [c0000002e899ab40] [c00000000065ea1c] .memac_add_hash_mac_address+0x104/0x198 [ 9.199464] [c0000002e899abd0] [c00000000065a788] .set_multi+0x1c8/0x218 [ 9.206242] [c0000002e899ac80] [c0000000006615ec] .dpaa_set_rx_mode+0xdc/0x17c [ 9.213544] [c0000002e899ad00] [c00000000083d2b0] .__dev_set_rx_mode+0x80/0xd4 [ 9.219535] [c0000002e899ad90] [c00000000083d334] .dev_set_rx_mode+0x30/0x54 [ 9.225271] [c0000002e899ae10] [c00000000083d4a0] .__dev_open+0x148/0x1c8 [ 9.230751] [c0000002e899aeb0] [c00000000083d934] .__dev_change_flags+0x19c/0x1e0 [ 9.230755] [c0000002e899af60] [c00000000083d9a4] .dev_change_flags+0x2c/0x80 [ 9.242752] [c0000002e899aff0] [c0000000008554ec] .do_setlink+0x350/0xf08 [ 9.248228] [c0000002e899b170] [c000000000857ad0] .rtnl_newlink+0x588/0x7e0 [ 9.253965] [c0000002e899b740] [c000000000852424] .rtnetlink_rcv_msg+0x3e0/0x498 [ 9.261440] [c0000002e899b820] [c000000000884790] .netlink_rcv_skb+0x134/0x14c [ 9.267607] [c0000002e899b8e0] [c000000000851840] .rtnetlink_rcv+0x18/0x2c [ 9.274558] [c0000002e899b950] [c000000000883c8c] .netlink_unicast+0x214/0x318 [ 9.281163] [c0000002e899ba00] [c000000000884220] .netlink_sendmsg+0x348/0x444 [ 9.287076] [c0000002e899bae0] [c00000000080d13c] .sock_sendmsg+0x2c/0x54 [ 9.287080] [c0000002e899bb50] [c0000000008106c0] .___sys_sendmsg+0x2d0/0x2d8 [ 9.298375] [c0000002e899bd30] [c000000000811a80] .__sys_sendmsg+0x5c/0xb0 [ 9.303939] [c0000002e899be20] [c0000000000006b0] system_call+0x60/0x6c Signed-off-by: Scott Wood Signed-off-by: David S. Miller commit 7418e6520f22a2e35815122fa5a53d5bbfa2c10f Author: Jia-Ju Bai Date: Wed Dec 26 22:09:34 2018 +0800 isdn: hisax: hfc_pci: Fix a possible concurrency use-after-free bug in HFCPCI_l1hw() In drivers/isdn/hisax/hfc_pci.c, the functions hfcpci_interrupt() and HFCPCI_l1hw() may be concurrently executed. HFCPCI_l1hw() line 1173: if (!cs->tx_skb) hfcpci_interrupt() line 942: spin_lock_irqsave(); line 1066: dev_kfree_skb_irq(cs->tx_skb); Thus, a possible concurrency use-after-free bug may occur in HFCPCI_l1hw(). To fix these bugs, the calls to spin_lock_irqsave() and spin_unlock_irqrestore() are added in HFCPCI_l1hw(), to protect the access to cs->tx_skb. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 903b77c631673eeec9e9114e9524171cdf9a2646 Merge: 457fa3469a65a 283ac6d5fb2a4 Author: Linus Torvalds Date: Fri Dec 28 21:27:13 2018 -0800 Merge tag 'linux-kselftest-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: - fixes and improvements to the framework, and individual tests - a new media test for IR encoders from Sean Young - a new watchdog test option to find time left on a timer * tag 'linux-kselftest-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: Fix test errors related to lib.mk khdr target fix dma-buf/udmabuf selftest selftests: watchdog: fix spelling mistake "experies" -> "expires" selftests: watchdog: Add gettimeleft command line arg selftests: do not macro-expand failed assertion expressions selftests/ftrace: Fix invalid SPDX identifiers selftests: gpio: Find libmount with pkg-config if available selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config selftests: firmware: remove use of non-standard diff -Z option media: rc: self test for IR encoders and decoders commit f9fc54d313fab2834f44f516459cdc8ac91d797f Author: Yunsheng Lin Date: Wed Dec 26 19:51:46 2018 +0800 ethtool: check the return value of get_regs_len The return type for get_regs_len in struct ethtool_ops is int, the hns3 driver may return error when failing to get the regs len by sending cmd to firmware. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 457fa3469a65a524be04412f5cd497fa3b11c9fd Merge: b07039b79c9ea fbc4904c28777 Author: Linus Torvalds Date: Fri Dec 28 20:54:57 2018 -0800 Merge tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big set of char and misc driver patches for 4.21-rc1. Lots of different types of driver things in here, as this tree seems to be the "collection of various driver subsystems not big enough to have their own git tree" lately. Anyway, some highlights of the changes in here: - binderfs: is it a rule that all driver subsystems will eventually grow to have their own filesystem? Binder now has one to handle the use of it in containerized systems. This was discussed at the Plumbers conference a few months ago and knocked into mergable shape very fast by Christian Brauner. Who also has signed up to be another binder maintainer, showing a distinct lack of good judgement :) - binder updates and fixes - mei driver updates - fpga driver updates and additions - thunderbolt driver updates - soundwire driver updates - extcon driver updates - nvmem driver updates - hyper-v driver updates - coresight driver updates - pvpanic driver additions and reworking for more device support - lp driver updates. Yes really, it's _finally_ moved to the proper parallal port driver model, something I never thought I would see happen. Good stuff. - other tiny driver updates and fixes. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (116 commits) MAINTAINERS: add another Android binder maintainer intel_th: msu: Fix an off-by-one in attribute store stm class: Add a reference to the SyS-T document stm class: Fix a module refcount leak in policy creation error path char: lp: use new parport device model char: lp: properly count the lp devices char: lp: use first unused lp number while registering char: lp: detach the device when parallel port is removed char: lp: introduce list to save port number bus: qcom: remove duplicated include from qcom-ebi2.c VMCI: Use memdup_user() rather than duplicating its implementation char/rtc: Use of_node_name_eq for node name comparisons misc: mic: fix a DMA pool free failure ptp: fix an IS_ERR() vs NULL check genwqe: Fix size check binder: implement binderfs binder: fix use-after-free due to ksys_close() during fdget() bus: fsl-mc: remove duplicated include files bus: fsl-mc: explicitly define the fsl_mc_command endianness misc: ti-st: make array read_ver_cmd static, shrinks object size ... commit b07039b79c9ea64c1eacda1e01d645082e4a0d5d Merge: 02061181d3a9c 16df1456aa858 Author: Linus Torvalds Date: Fri Dec 28 20:44:29 2018 -0800 Merge tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "big" set of driver core patches for 4.21-rc1. It's not really big, just a number of small changes for some reported issues, some documentation updates to hopefully make it harder for people to abuse the driver model, and some other minor cleanups. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: mm, memory_hotplug: update a comment in unregister_memory() component: convert to DEFINE_SHOW_ATTRIBUTE sysfs: Disable lockdep for driver bind/unbind files driver core: Add missing dev->bus->need_parent_lock checks kobject: return error code if writing /sys/.../uevent fails driver core: Move async_synchronize_full call driver core: platform: Respect return code of platform_device_register_full() kref/kobject: Improve documentation drivers/base/memory.c: Use DEVICE_ATTR_RO and friends driver core: Replace simple_strto{l,ul} by kstrtou{l,ul} kernfs: Improve kernfs_notify() poll notification latency kobject: Fix warnings in lib/kobject_uevent.c kobject: drop unnecessary cast "%llu" for u64 driver core: fix comments for device_block_probing() driver core: Replace simple_strtol by kstrtoint commit 02061181d3a9ccfe15ef6bc15fa56283acc47620 Merge: 117eda8f71ff5 215852f4b8bbf Author: Linus Torvalds Date: Fri Dec 28 20:39:58 2018 -0800 Merge tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver updates from Greg KH: "Here is the big staging and iio driver pull request for 4.21-rc1. Lots and lots of tiny patches here, nothing major at all. Which is good, tiny cleanups is nice to see. No new huge driver removal or addition, this release cycle, although there are lots of good IIO driver changes, addtions, and movement from staging into the "real" part of the kernel, which is always great. Full details are in the shortlog, and all of these have been in linux-next for a while with no reported issues" * tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (553 commits) staging: mt7621-mmc: Correct spelling mistakes in comments staging: wilc1000: fix missing read_write setting when reading data mt7621-mmc: char * array declaration might be better as static const mt7621-mmc: return statement in void function unnecessary mt7621-mmc: Alignment should match open parenthesis mt7621-mmc: Removed unnecessary blank lines mt7621-mmc: Fix some coding style issues staging: android: ashmem: doc: Fix spelling staging: rtl8188eu: cleanup brace coding style issues staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c staging: rtl8188eu: change return type of is_basicrate() to bool staging: rtl8188eu: simplify null array initializations staging: rtl8188eu: change order of declarations to improve readability staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c staging: rtl8188eu: constify some arrays staging: rtl8188eu: convert unsigned char arrays to u8 staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c ... commit 117eda8f71ff545cfdec8fe8073adbd173a1ceff Merge: c0ea81b4d3783 598134ffcab5b Author: Linus Torvalds Date: Fri Dec 28 20:33:54 2018 -0800 Merge tag 'tty-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver updates from Greg KH: "Here is the large TTY/Serial driver set of patches for 4.21-rc1. A number of small serial driver changes along with some good tty core fixes for long-reported issues with locking. There is also a new console font added to the tree, for high-res screens, so that should be helpful for many. The last patch in the series is a revert of an older one in the tree, it came late but it resolves a reported issue that linux-next was having for some people. Full details are in the shortlog, and all of these, with the exception of the revert, have been in linux-next for a while with no reported issues" * tag 'tty-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (85 commits) Revert "serial: 8250: Default SERIAL_OF_PLATFORM to SERIAL_8250" serial: sccnxp: Allow to use non-standard baud rates serial: sccnxp: Adds a delay between sequential read/write cycles tty: serial: qcom_geni_serial: Fix UART hang tty: serial: qcom_geni_serial: Fix wrap around of TX buffer serial: max310x: Fix tx_empty() callback dt-bindings: serial: sh-sci: Document r8a774c0 bindings dt-bindings: serial: sh-sci: Document r8a774a1 bindings Fonts: New Terminus large console font dt-bindings: serial: lpuart: add imx8qxp compatible string serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly serial: uartps: Fix error path when alloc failed serial: uartps: Check if the device is a console serial: uartps: Add the device_init_wakeup tty: serial: samsung: Increase maximum baudrate tty: serial: samsung: Properly set flags in autoCTS mode tty: Use of_node_name_{eq,prefix} for node name comparisons tty/serial: do not free trasnmit buffer page under port lock serial: 8250: Rate limit serial port rx interrupts during input overruns dt-bindings: serial: 8250: Add rate limit for serial port input overruns ... commit c0ea81b4d37837409d0dfd2036098a7babb312ed Merge: 4d6ad6fba6b7a 4b2c01ad902ec Author: Linus Torvalds Date: Fri Dec 28 20:30:00 2018 -0800 Merge tag 'usb-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver patches for 4.21-rc1. All of the usual bits are in here: - loads of USB gadget driver updates and additions - new device ids - phy driver updates - xhci reworks and new features - typec updates Full details are in the shortlog. All of these have been in linux-next for a long time with no reported issues" * tag 'usb-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (142 commits) USB: serial: option: add Fibocom NL678 series cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader. usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable() usb: typec: tcpm: Extend the matching rules on PPS APDO selection usb: typec: Improve Alt Mode documentation usb: musb: dsps: fix runtime pm for peripheral mode usb: musb: dsps: fix otg state machine USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays usb: renesas_usbhs: add support for RZ/G2E usb: ehci-omap: Fix deferred probe for phy handling usb: roles: Add a description for the class to Kconfig usb: renesas_usbhs: mark PM functions as __maybe_unused usb: core: Remove unnecessary memset() usb: host: isp1362-hcd: convert to DEFINE_SHOW_ATTRIBUTE phy: qcom-qmp: Expose provided clocks to DT dt-bindings: phy-qcom-qmp: Move #clock-cells to child phy: qcom-qmp: Utilize fully-specified DT registers dt-bindings: phy-qcom-qmp: Fix register underspecification phy: ti: fix semicolon.cocci warnings phy: dphy: Add configuration helpers ... commit 4d6ad6fba6b7af06143c67964f4095c74c9ce87c Merge: 579a70035949b 3a658e09a2155 Author: Linus Torvalds Date: Fri Dec 28 20:28:25 2018 -0800 Merge tag 'hsi-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: "omap-ssi: use DEFINE_SHOW_ATTRIBUTE" * tag 'hsi-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi: Change to use DEFINE_SHOW_ATTRIBUTE macro commit 579a70035949b771a63a686db8becdd9b197d986 Merge: 030672aea826a 9580913966488 Author: Linus Torvalds Date: Fri Dec 28 20:22:45 2018 -0800 Merge tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - New core support: - battery internal resistance - battery OCV capacity lookup table - support for custom sysfs attributes - Convert all drivers to use power-supply core support for custom sysfs attributes - bq24190-charger: bq24196 support - axp20x-charger: AXP813 support - sc27xx-battery: new fuel gauge driver - gpio-poweroff: support for specific active and inactive delays - Misc fixes * tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (53 commits) power: supply: bq25890: fix BAT_COMP field definition power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_* power: supply: ds2781: switch to devm_power_supply_register power: supply: ds2780: switch to devm_power_supply_register power: supply: ds2781: fix race-condition in bin attribute registration power: supply: ds2780: fix race-condition in bin attribute registration power: supply: pcf50633: fix race-condition in sysfs registration power: supply: charger-manager: fix race-condition in sysfs registration power: supply: charger-manager: simplify generation of sysfs attribute group name power: supply: bq24257: fix race-condition in sysfs registration power: supply: bq24190_charger: fix race-condition in sysfs registration power: supply: lp8788: fix race-condition in sysfs registration power: supply: ds2781: fix race-condition in sysfs registration power: supply: ds2780: fix race-condition in sysfs registration power: supply: bq2415x: fix race-condition in sysfs registration power: supply: core: add support for custom sysfs attributes power: supply: sc27xx: Save last battery capacity power: reset: at91-poweroff: move shdwc related data to one structure power: supply: sc27xx: Add suspend/resume interfaces power: supply: sc27xx: Add fuel gauge low voltage alarm ... commit 030672aea826adf3dee9100ee8ac303b62c8fe7f Merge: 24dc83635ffe3 5801169a2ed20 Author: Linus Torvalds Date: Fri Dec 28 20:08:34 2018 -0800 Merge tag 'devicetree-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: "The biggest highlight here is the start of using json-schema for DT bindings. Being able to validate bindings has been discussed for years with little progress. - Initial support for DT bindings using json-schema language. This is the start of converting DT bindings from free-form text to a structured format. - Reworking of initrd address initialization. This moves to using the phys address instead of virt addr in the DT parsing code. This rework was motivated by CONFIG_DEV_BLK_INITRD causing unnecessary rebuilding of lots of files. - Fix stale phandle entries in phandle cache - DT overlay validation improvements. This exposed several memory leak bugs which have been fixed. - Use node name and device_type helper functions in DT code - Last remaining conversions to using %pOFn printk specifier instead of device_node.name directly - Create new common RTC binding doc and move all trivial RTC devices out of trivial-devices.txt. - New bindings for Freescale MAG3110 magnetometer, Cadence Sierra PHY, and Xen shared memory - Update dtc to upstream version v1.4.7-57-gf267e674d145" * tag 'devicetree-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (68 commits) of: __of_detach_node() - remove node from phandle cache of: of_node_get()/of_node_put() nodes held in phandle cache gpio-omap.txt: add reg and interrupts properties dt-bindings: mrvl,intc: fix a trivial typo dt-bindings: iio: magnetometer: add dt-bindings for freescale mag3110 dt-bindings: Convert trivial-devices.txt to json-schema dt-bindings: arm: mrvl: amend Browstone compatible string dt-bindings: arm: Convert Tegra board/soc bindings to json-schema dt-bindings: arm: Convert ZTE board/soc bindings to json-schema dt-bindings: arm: Add missing Xilinx boards dt-bindings: arm: Convert Xilinx board/soc bindings to json-schema dt-bindings: arm: Convert VIA board/soc bindings to json-schema dt-bindings: arm: Convert ST STi board/soc bindings to json-schema dt-bindings: arm: Convert SPEAr board/soc bindings to json-schema dt-bindings: arm: Convert CSR SiRF board/soc bindings to json-schema dt-bindings: arm: Convert QCom board/soc bindings to json-schema dt-bindings: arm: Convert TI nspire board/soc bindings to json-schema dt-bindings: arm: Convert TI davinci board/soc bindings to json-schema dt-bindings: arm: Convert Calxeda board/soc bindings to json-schema dt-bindings: arm: Convert Altera board/soc bindings to json-schema ... commit 24dc83635ffe3c93d8122099a83ee228c9b7e4f7 Merge: 7e59fad9c9d1a a7c23f8d154f7 Author: Linus Torvalds Date: Fri Dec 28 20:00:21 2018 -0800 Merge tag 'gpio-v4.21-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.21 kernel series. Core changes: - Some core changes are already in outside of this pull request as they came through the regulator tree, most notably devm_gpiod_unhinge() that removes devres refcount management from a GPIO descriptor. This is needed in subsystems such as regulators where the regulator core need to take over the reference counting and lifecycle management for a GPIO descriptor. - We dropped devm_gpiochip_remove() and devm_gpio_chip_match() as nothing needs it. We can bring it back if need be. - Add a global TODO so people see where we are going. This helps setting the direction now that we are two GPIO maintainers. - Handle the MMC CD/WP properties in the device tree core. (The bulk of patches activating this code is already merged through the MMC/SD tree.) - Augment gpiochip_request_own_desc() to pass a flag so we as gpiochips can request lines as active low or open drain etc even from ourselves. New drivers: - New driver for Cadence GPIO blocks. - New driver for Atmel SAMA5D2 PIOBU GPIO lines. Driver improvements: - A major refactoring of the PCA953x driver - this driver has been around for ages, and is now modernized to reduce code duplication that has stacked up and is using regmap to read write and cache registers. - Intel drivers are now maintained in a separate tree and start with a round of cleanups and unifications" * tag 'gpio-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (99 commits) gpio: sama5d2-piobu: Depend on OF_GPIO gpio: Add Cadence GPIO driver dt-bindings: gpio: Add bindings for Cadence GPIO gpiolib-acpi: remove unused variable 'err', cleans up build warning gpio: mxs: read pin level directly instead of using .get gpio: aspeed: remove duplicated statement gpio: add driver for SAMA5D2 PIOBU pins dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller gpio/mmc/of: Respect polarity in the device tree dt-bindings: gpio: rcar: Add r8a774c0 (RZ/G2E) support memory: omap-gpmc: Get the header of the enum ARM: omap1: Fix new user of gpiochip_request_own_desc() gpio: pca953x: Add regmap dependency for PCA953x driver gpio: raspberrypi-exp: decrease refcount on firmware dt node gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB gpio: pca953x: Restore registers after suspend/resume cycle gpio: pca953x: Zap single use of pca953x_read_single() gpio: pca953x: Zap ad-hoc reg_output cache gpio: pca953x: Zap ad-hoc reg_direction cache gpio: pca953x: Perform basic regmap conversion ... commit 7e59fad9c9d1aeacdc96dfffd35f9e12ddc34dbf Merge: 8754040378e4f 221b35fedee1b Author: Linus Torvalds Date: Fri Dec 28 19:57:29 2018 -0800 Merge tag 'drm-next-2018-12-27' of git://anongit.freedesktop.org/drm/drm Pull more drm updates from Dave Airlie: "Daniel collected a couple of pulls after I want on holidays, back for a couple of days, so may as well send them out. This has exynos and etnaviv work for 4.21. exynos: - plane alpha and blending configurability etnaviv: - mostly cleanups in prep for new features" * tag 'drm-next-2018-12-27' of git://anongit.freedesktop.org/drm/drm: drm/etnaviv: remove lastctx member from gpu struct drm/etnaviv: replace header include with forward declaration drm/etnaviv: remove unnecessary local irq disable drm/exynos: fimd: Make pixel blend mode configurable drm/exynos: fimd: Make plane alpha configurable drm/etnaviv: Replace drm_dev_unref with drm_dev_put drm/etnaviv: consolidate hardware fence handling in etnaviv_gpu drm/etnaviv: kill active fence tracking commit 8754040378e4ff70b3bb96b1dabac62da5dfb870 Merge: 1984f65c2fbc0 9aa3aa15f4c2f Author: Linus Torvalds Date: Fri Dec 28 19:48:25 2018 -0800 Merge tag 'hwmon-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "The big change in this series is for the most part automatic: Introducing SENSOR[_DEVICE]_ATTR_{RO,RW,WO} variants and conversion of various drivers to use it. This is similar to DEVICE_ATTR variants. Other than that, we have - Some conversions of S_ with octal values, also automated - Added support for Hygon Dhyana CPUs to k10temp driver - Added support for STLM75 to lm75 driver - B57891S0103 to ntc_thermistor - Added pm-runtime support to ina3221 driver - Support for PowerPC On-Chip Controller (OCC) - Various minor bug fices and improvements" * tag 'hwmon-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (80 commits) hwmon: (lm80) fix a missing check of bus read in lm80 probe hwmon: (lm80) fix a missing check of the status of SMBus read hwmon: (asus_atk0110) Fix debugfs_simple_attr.cocci warnings hwmon: (ftsteutates) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (fschmd) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (emc6w201) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (emc2103) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (emc1403) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (ds620) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (ds1621) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (dell-smm-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (da9055-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (da9052-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (coretemp) Replace S_ with octal values hwmon: (asus_atk0110) Replace S_ with octal values hwmon: (aspeed-pwm-tacho) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (applesmc) Replace S_ with octal values hwmon: (amc6821) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (adt7x10) Use permission specific SENSOR[_DEVICE]_ATTR variants hwmon: (adt7475) Use permission specific SENSOR[_DEVICE]_ATTR variants ... commit 1984f65c2fbc0d2b557d6e89ece9b39267e215c6 Merge: f346b0becb1bc 8ba35b3a0046d Author: Linus Torvalds Date: Fri Dec 28 19:41:58 2018 -0800 Merge tag 'vfio-v4.21-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Replace global vfio-pci lock with per bus lock to allow concurrent open and release (Alex Williamson) - Declare mdev function as static (Paolo Cretaro) - Convert char to u8 in mdev/mtty sample driver (Nathan Chancellor) * tag 'vfio-v4.21-rc1' of git://github.com/awilliam/linux-vfio: vfio-mdev/samples: Use u8 instead of char for handle functions vfio/mdev: add static modifier to add_mdev_supported_type vfio/pci: Parallelize device open and release commit a007232066f6839d6f256bab21e825d968f1a163 Author: Florian Westphal Date: Fri Dec 28 01:24:49 2018 +0100 netfilter: nf_conncount: fix argument order to find_next_bit Size and 'next bit' were swapped, this bug could cause worker to reschedule itself even if system was idle. Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c80f10bc973af2ace6b1414724eeff61eaa71837 Author: Pablo Neira Ayuso Date: Fri Dec 28 01:24:48 2018 +0100 netfilter: nf_conncount: speculative garbage collection on empty lists Instead of removing a empty list node that might be reintroduced soon thereafter, tentatively place the empty list node on the list passed to tree_nodes_free(), then re-check if the list is empty again before erasing it from the tree. [ Florian: rebase on top of pending nf_conncount fixes ] Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2f971a8f425545da52ca0e6bee81f5b1ea0ccc5f Author: Pablo Neira Ayuso Date: Fri Dec 28 01:24:47 2018 +0100 netfilter: nf_conncount: move all list iterations under spinlock Two CPUs may race to remove a connection from the list, the existing conn->dead will result in a use-after-free. Use the per-list spinlock to protect list iterations. As all accesses to the list now happen while holding the per-list lock, we no longer need to delay free operations with rcu. Joint work with Florian. Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit df4a902509766897f7371fdfa4c3bf8bc321b55d Author: Florian Westphal Date: Fri Dec 28 01:24:46 2018 +0100 netfilter: nf_conncount: merge lookup and add functions 'lookup' is always followed by 'add'. Merge both and make the list-walk part of nf_conncount_add(). This also avoids one unneeded unlock/re-lock pair. Extra care needs to be taken in count_tree, as we only hold rcu read lock, i.e. we can only insert to an existing tree node after acquiring its lock and making sure it has a nonzero count. As a zero count should be rare, just fall back to insert_tree() (which acquires tree lock). This issue and its solution were pointed out by Shawn Bohrer during patch review. Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e8cfb372b38a1b8979aa7f7631fb5e7b11c3793c Author: Florian Westphal Date: Fri Dec 28 01:24:45 2018 +0100 netfilter: nf_conncount: restart search when nodes have been erased Shawn Bohrer reported a following crash: |RIP: 0010:rb_erase+0xae/0x360 [..] Call Trace: nf_conncount_destroy+0x59/0xc0 [nf_conncount] cleanup_match+0x45/0x70 [ip_tables] ... Shawn tracked this down to bogus 'parent' pointer: Problem is that when we insert a new node, then there is a chance that the 'parent' that we found was also passed to tree_nodes_free() (because that node was empty) for erase+free. Instead of trying to be clever and detect when this happens, restart the search if we have evicted one or more nodes. To prevent frequent restarts, do not perform gc on the second round. Also, unconditionally schedule the gc worker. The condition gc_count > ARRAY_SIZE(gc_nodes)) cannot be true unless tree grows very large, as the height of the tree will be low even with hundreds of nodes present. Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Reported-by: Shawn Bohrer Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f7fcc98dfc2d136722007fec0debbed761679b94 Author: Florian Westphal Date: Fri Dec 28 01:24:44 2018 +0100 netfilter: nf_conncount: split gc in two phases The lockless workqueue garbage collector can race with packet path garbage collector to delete list nodes, as it calls tree_nodes_free() with the addresses of nodes that might have been free'd already from another cpu. To fix this, split gc into two phases. One phase to perform gc on the connections: From a locking perspective, this is the same as count_tree(): we hold rcu lock, but we do not change the tree, we only change the nodes' contents. The second phase acquires the tree lock and reaps empty nodes. This avoids a race condition of the garbage collection vs. packet path: If a node has been free'd already, the second phase won't find it anymore. This second phase is, from locking perspective, same as insert_tree(). The former only modifies nodes (list content, count), latter modifies the tree itself (rb_erase or rb_insert). Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4cd273bb91b3001f623f516ec726c49754571b1a Author: Florian Westphal Date: Fri Dec 28 01:24:43 2018 +0100 netfilter: nf_conncount: don't skip eviction when age is negative age is signed integer, so result can be negative when the timestamps have a large delta. In this case we want to discard the entry. Instead of using age >= 2 || age < 0, just make it unsigned. Fixes: b36e4523d4d56 ("netfilter: nf_conncount: fix garbage collection confirm race") Reviewed-by: Shawn Bohrer Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c78e7818f16f687389174c4569243abbec8dc68f Author: Shawn Bohrer Date: Fri Dec 28 01:24:42 2018 +0100 netfilter: nf_conncount: replace CONNCOUNT_LOCK_SLOTS with CONNCOUNT_SLOTS Most of the time these were the same value anyway, but when CONFIG_LOCKDEP was enabled we would use a smaller number of locks to reduce overhead. Unfortunately having two values is confusing and not worth the complexity. This fixes a bug where tree_gc_worker() would only GC up to CONNCOUNT_LOCK_SLOTS trees which meant when CONFIG_LOCKDEP was enabled not all trees would be GCed by tree_gc_worker(). Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") Signed-off-by: Florian Westphal Signed-off-by: Shawn Bohrer Signed-off-by: Pablo Neira Ayuso commit eb8950861c1bfd3eecc8f6faad213e3bca0dc395 Author: Kangjie Lu Date: Fri Dec 21 00:46:23 2018 -0600 netfilter: nf_tables: fix a missing check of nla_put_failure If nla_nest_start() may fail. The fix checks its return value and goes to nla_put_failure if it fails. Signed-off-by: Kangjie Lu Signed-off-by: Pablo Neira Ayuso commit 592b15ba7260f8dec8bfc71ef0ea1934801a35aa Merge: 7db54c89f0b30 1e3c336ad8f40 Author: Dmitry Torokhov Date: Fri Dec 28 17:10:54 2018 -0800 Merge branch 'next' into for-linus Prepare input updates for 4.21 merge window. commit 7db54c89f0b30a101584e09d3729144e6170059d Author: Patrick Dreyer Date: Sun Dec 23 10:06:35 2018 -0800 Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G This adds ELAN0501 to the ACPI table to support Elan touchpad found in ASUS Aspire F5-573G. Signed-off-by: Patrick Dreyer Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 1e3c336ad8f40f88a8961c434640920fe35cc08b Author: Sanjeev Chugh Date: Fri Dec 28 17:04:31 2018 -0800 Input: atmel_mxt_ts - don't try to free unallocated kernel memory If the user attempts to update Atmel device with an invalid configuration cfg file, error handling code is trying to free cfg file memory which is not allocated yet hence results into kernel crash. This patch fixes the order of memory free operations. Signed-off-by: Sanjeev Chugh Fixes: a4891f105837 ("Input: atmel_mxt_ts - zero terminate config firmware file") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit f346b0becb1bc62e45495f9cdbae3eef35d0b635 Merge: 00d59fde8532b 0f4991e8fd489 Author: Linus Torvalds Date: Fri Dec 28 16:55:46 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: - large KASAN update to use arm's "software tag-based mode" - a few misc things - sh updates - ocfs2 updates - just about all of MM * emailed patches from Andrew Morton : (167 commits) kernel/fork.c: mark 'stack_vm_area' with __maybe_unused memcg, oom: notify on oom killer invocation from the charge path mm, swap: fix swapoff with KSM pages include/linux/gfp.h: fix typo mm/hmm: fix memremap.h, move dev_page_fault_t callback to hmm hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization memory_hotplug: add missing newlines to debugging output mm: remove __hugepage_set_anon_rmap() include/linux/vmstat.h: remove unused page state adjustment macro mm/page_alloc.c: allow error injection mm: migrate: drop unused argument of migrate_page_move_mapping() blkdev: avoid migration stalls for blkdev pages mm: migrate: provide buffer_migrate_page_norefs() mm: migrate: move migrate_page_lock_buffers() mm: migrate: lock buffers before migrate_page_move_mapping() mm: migration: factor out code to compute expected number of page references mm, page_alloc: enable pcpu_drain with zone capability kmemleak: add config to select auto scan mm/page_alloc.c: don't call kasan_free_pages() at deferred mem init ... commit 00d59fde8532b2d42e80909d2e58678755e04da9 Merge: 75f95da078b28 5215b2e952f3f Author: Linus Torvalds Date: Fri Dec 28 16:52:18 2018 -0800 Merge tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "This time, this pull request contains changes crossing subsystems and archs/platforms, which is mainly because of a bigger modernization of moving from legacy GPIO to GPIO descriptors for MMC (by Linus Walleij). Additionally, once again, I am funneling changes to drivers/misc/cardreader/* and drivers/memstick/* through my MMC tree, mostly due to that we lack a maintainer for these. Summary: MMC core: - Cleanup BKOPS support - Introduce MMC_CAP_SYNC_RUNTIME_PM - slot-gpio: Delete legacy slot GPIO handling MMC host: - alcor: Add new mmc host driver for Alcor Micro PCI based cardreader - bcm2835: Several improvements to better recover from errors - jz4740: Rework and fixup pre|post_req support - mediatek: Add support for SDIO IRQs - meson-gx: Improve clock phase management - meson-gx: Stop descriptor on errors - mmci: Complete the sbc error path by sending a stop command - renesas_sdhi/tmio: Fixup reset/resume operations - renesas_sdhi: Add support for r8a774c0 and R7S9210 - renesas_sdhi: Whitelist R8A77990 SDHI - renesas_sdhi: Fixup eMMC HS400 compatibility issues for H3 and M3-W - rtsx_usb_sdmmc: Re-work card detection/removal support - rtsx_usb_sdmmc: Re-work runtime PM support - sdhci: Fix timeout loops for some variant drivers - sdhci: Improve support for error handling due to failing commands - sdhci-acpi/pci: Disable LED control for Intel BYT-based controllers - sdhci_am654: Add new SDHCI variant driver to support TI's AM654 SOCs - sdhci-of-esdhc: Add support for eMMC HS400 mode - sdhci-omap: Fixup reset support - sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures - sdhci-msm: Fixup sporadic write transfers issues for SDR104/HS200 - sdhci-msm: Fixup dynamical clock gating issues - various: Complete converting all hosts into using slot GPIO descriptors Other: - Move GPIO mmc platform data for mips/sh/arm to GPIO descriptors - Add new Alcor Micro cardreader PCI driver - Support runtime power management for memstick rtsx_usb_ms driver - Use USB remote wakeups for card detection for rtsx_usb misc driver" * tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (99 commits) mmc: mediatek: Add MMC_CAP_SDIO_IRQ support mmc: renesas_sdhi_internal_dmac: Whitelist r8a774c0 dt-bindings: mmc: renesas_sdhi: Add r8a774c0 support mmc: core: Cleanup BKOPS support mmc: core: Drop redundant check in mmc_send_hpi_cmd() mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929) dt-bindings: sdhci-omap: Add note for cpu_thermal mmc: sdhci-acpi: Disable LED control for Intel BYT-based controllers mmc: sdhci-pci: Disable LED control for Intel BYT-based controllers mmc: sdhci: Add quirk to disable LED control mmc: mmci: add variant property to set command stop bit misc: alcor_pci: fix spelling mistake "invailid" -> "invalid" mmc: meson-gx: add signal resampling mmc: meson-gx: align default phase on soc vendor tree mmc: meson-gx: remove useless lock mmc: meson-gx: make sure the descriptor is stopped on errors mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver dt-bindings: mmc: sdhci-of-arasan: Add deprecated message for AM65 dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's AM654 SOCs mmc: sdhci-msm: avoid unused function warning ... commit 75f95da078b2891cd186f074ffc15a8e7c3f082d Merge: 4ed7bdc1eb4c8 4b5f747e82b12 Author: Linus Torvalds Date: Fri Dec 28 15:05:13 2018 -0800 Merge tag 'libnvdimm-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "The vast bulk of this update is the new support for the security capabilities of some nvdimms. The userspace tooling for this capability is still a work in progress, but the changes survive the existing libnvdimm unit tests. The changes also pass manual checkout on hardware and the new nfit_test emulation of the security capability. The touches of the security/keys/ files have received the necessary acks from Mimi and David. Those changes were necessary to allow for a new generic encrypted-key type, and allow the nvdimm sub-system to lookup key material referenced by the libnvdimm-sysfs interface. Summary: - Add support for the security features of nvdimm devices that implement a security model similar to ATA hard drive security. The security model supports locking access to the media at device-power-loss, to be unlocked with a passphrase, and secure-erase (crypto-scramble). Unlike the ATA security case where the kernel expects device security to be managed in a pre-OS environment, the libnvdimm security implementation allows key provisioning and key-operations at OS runtime. Keys are managed with the kernel's encrypted-keys facility to provide data-at-rest security for the libnvdimm key material. The usage model mirrors fscrypt key management, but is driven via libnvdimm sysfs. - Miscellaneous updates for api usage and comment fixes" * tag 'libnvdimm-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (21 commits) libnvdimm/security: Quiet security operations libnvdimm/security: Add documentation for nvdimm security support tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test tools/testing/nvdimm: Add overwrite support for nfit_test tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support acpi/nfit, libnvdimm/security: Add security DSM overwrite support acpi/nfit, libnvdimm: Add support for issue secure erase DSM to Intel nvdimm acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms acpi/nfit, libnvdimm: Add disable passphrase support to Intel nvdimm. acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs acpi/nfit, libnvdimm: Add freeze security support to Intel nvdimm acpi/nfit, libnvdimm: Introduce nvdimm_security_ops keys-encrypted: add nvdimm key format type to encrypted keys keys: Export lookup_user_key to external users acpi/nfit, libnvdimm: Store dimm id as a member to struct nvdimm libnvdimm, namespace: Replace kmemdup() with kstrndup() libnvdimm, label: Switch to bitmap_zalloc() ACPI/nfit: Adjust annotation for why return 0 if fail to find NFIT at start libnvdimm, bus: Check id immediately following ida_simple_get ... commit 4ed7bdc1eb4c82cf4bfdf6a94dd36fd695f6f387 Merge: 5d24ae67a961c c6d6e9b0f6b42 Author: Linus Torvalds Date: Fri Dec 28 15:02:26 2018 -0800 Merge tag 'for-4.21/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Eliminate a couple indirect calls from bio-based DM core. - Fix DM to allow reads that exceed readahead limits by setting io_pages in the backing_dev_info. - A couple code cleanups in request-based DM. - Fix various DM targets to check for device sector overflow if CONFIG_LBDAF is not set. - Use u64 instead of sector_t to store iv_offset in DM crypt; sector_t isn't large enough on 32bit when CONFIG_LBDAF is not set. - Performance fixes to DM's kcopyd and the snapshot target focused on limiting memory use and workqueue stalls. - Fix typos in the integrity and writecache targets. - Log which algorithm is used for dm-crypt's encryption and dm-integrity's hashing. - Fix false -EBUSY errors in DM raid target's handling of check/repair messages. - Fix DM flakey target's corrupt_bio_byte feature to reliably corrupt the Nth byte in a bio's payload. * tag 'for-4.21/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: do not allow readahead to limit IO size dm raid: fix false -EBUSY when handling check/repair message dm rq: cleanup leftover code from recently removed q->mq_ops branching dm verity: log the hash algorithm implementation dm crypt: log the encryption algorithm implementation dm integrity: fix spelling mistake in workqueue name dm flakey: Properly corrupt multi-page bios. dm: Check for device sector overflow if CONFIG_LBDAF is not set dm crypt: use u64 instead of sector_t to store iv_offset dm kcopyd: Fix bug causing workqueue stalls dm snapshot: Fix excessive memory usage and workqueue stalls dm bufio: update comment in dm-bufio.c dm writecache: fix typo in error msg for creating writecache_flush_thread dm: remove indirect calls from __send_changing_extent_only() dm mpath: only flush workqueue when needed dm rq: remove unused arguments from rq_completed() dm: avoid indirect call in __dm_make_request commit 5d24ae67a961c51beb255a28c9c417d9710247c2 Merge: 938edb8a31b97 f617e5ffe04fd Author: Linus Torvalds Date: Fri Dec 28 14:57:10 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "This has been a fairly typical cycle, with the usual sorts of driver updates. Several series continue to come through which improve and modernize various parts of the core code, and we finally are starting to get the uAPI command interface cleaned up. - Various driver fixes for bnxt_re, cxgb3/4, hfi1, hns, i40iw, mlx4, mlx5, qib, rxe, usnic - Rework the entire syscall flow for uverbs to be able to run over ioctl(). Finally getting past the historic bad choice to use write() for command execution - More functional coverage with the mlx5 'devx' user API - Start of the HFI1 series for 'TID RDMA' - SRQ support in the hns driver - Support for new IBTA defined 2x lane widths - A big series to consolidate all the driver function pointers into a big struct and have drivers provide a 'static const' version of the struct instead of open coding initialization - New 'advise_mr' uAPI to control device caching/loading of page tables - Support for inline data in SRPT - Modernize how umad uses the driver core and creates cdev's and sysfs files - First steps toward removing 'uobject' from the view of the drivers" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (193 commits) RDMA/srpt: Use kmem_cache_free() instead of kfree() RDMA/mlx5: Signedness bug in UVERBS_HANDLER() IB/uverbs: Signedness bug in UVERBS_HANDLER() IB/mlx5: Allocate the per-port Q counter shared when DEVX is supported IB/umad: Start using dev_groups of class IB/umad: Use class_groups and let core create class file IB/umad: Refactor code to use cdev_device_add() IB/umad: Avoid destroying device while it is accessed IB/umad: Simplify and avoid dynamic allocation of class IB/mlx5: Fix wrong error unwind IB/mlx4: Remove set but not used variable 'pd' RDMA/iwcm: Don't copy past the end of dev_name() string IB/mlx5: Fix long EEH recover time with NVMe offloads IB/mlx5: Simplify netdev unbinding IB/core: Move query port to ioctl RDMA/nldev: Expose port_cap_flags2 IB/core: uverbs copy to struct or zero helper IB/rxe: Reuse code which sets port state IB/rxe: Make counters thread safe IB/mlx5: Use the correct commands for UMEM and UCTX allocation ... commit 938edb8a31b976c9a92eb0cd4ff481e93f76c1f1 Merge: af7ddd8a627c6 da7903092b880 Author: Linus Torvalds Date: Fri Dec 28 14:48:06 2018 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly update of the usual drivers: smarpqi, lpfc, qedi, megaraid_sas, libsas, zfcp, mpt3sas, hisi_sas. Additionally, we have a pile of annotation, unused variable and minor updates. The big API change is the updates for Christoph's DMA rework which include removing the DISABLE_CLUSTERING flag. And finally there are a couple of target tree updates" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (259 commits) scsi: isci: request: mark expected switch fall-through scsi: isci: remote_node_context: mark expected switch fall-throughs scsi: isci: remote_device: Mark expected switch fall-throughs scsi: isci: phy: Mark expected switch fall-through scsi: iscsi: Capture iscsi debug messages using tracepoints scsi: myrb: Mark expected switch fall-throughs scsi: megaraid: fix out-of-bound array accesses scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through scsi: fcoe: remove set but not used variable 'port' scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown() scsi: smartpqi: fix build warnings scsi: smartpqi: update driver version scsi: smartpqi: add ofa support scsi: smartpqi: increase fw status register read timeout scsi: smartpqi: bump driver version scsi: smartpqi: add smp_utils support scsi: smartpqi: correct lun reset issues scsi: smartpqi: correct volume status scsi: smartpqi: do not offline disks for transient did no connect conditions scsi: smartpqi: allow for larger raid maps ... commit af7ddd8a627c62a835524b3f5b471edbbbcce025 Merge: fe2b0cdabcd9e 8b1cce9f5832a Author: Linus Torvalds Date: Fri Dec 28 14:12:21 2018 -0800 Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping Pull DMA mapping updates from Christoph Hellwig: "A huge update this time, but a lot of that is just consolidating or removing code: - provide a common DMA_MAPPING_ERROR definition and avoid indirect calls for dma_map_* error checking - use direct calls for the DMA direct mapping case, avoiding huge retpoline overhead for high performance workloads - merge the swiotlb dma_map_ops into dma-direct - provide a generic remapping DMA consistent allocator for architectures that have devices that perform DMA that is not cache coherent. Based on the existing arm64 implementation and also used for csky now. - improve the dma-debug infrastructure, including dynamic allocation of entries (Robin Murphy) - default to providing chaining scatterlist everywhere, with opt-outs for the few architectures (alpha, parisc, most arm32 variants) that can't cope with it - misc sparc32 dma-related cleanups - remove the dma_mark_clean arch hook used by swiotlb on ia64 and replace it with the generic noncoherent infrastructure - fix the return type of dma_set_max_seg_size (Niklas Söderlund) - move the dummy dma ops for not DMA capable devices from arm64 to common code (Robin Murphy) - ensure dma_alloc_coherent returns zeroed memory to avoid kernel data leaks through userspace. We already did this for most common architectures, but this ensures we do it everywhere. dma_zalloc_coherent has been deprecated and can hopefully be removed after -rc1 with a coccinelle script" * tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping: (73 commits) dma-mapping: fix inverted logic in dma_supported dma-mapping: deprecate dma_zalloc_coherent dma-mapping: zero memory returned from dma_alloc_* sparc/iommu: fix ->map_sg return value sparc/io-unit: fix ->map_sg return value arm64: default to the direct mapping in get_arch_dma_ops PCI: Remove unused attr variable in pci_dma_configure ia64: only select ARCH_HAS_DMA_COHERENT_TO_PFN if swiotlb is enabled dma-mapping: bypass indirect calls for dma-direct vmd: use the proper dma_* APIs instead of direct methods calls dma-direct: merge swiotlb_dma_ops into the dma_direct code dma-direct: use dma_direct_map_page to implement dma_direct_map_sg dma-direct: improve addressability error reporting swiotlb: remove dma_mark_clean swiotlb: remove SWIOTLB_MAP_ERROR ACPI / scan: Refactor _CCA enforcement dma-mapping: factor out dummy DMA ops dma-mapping: always build the direct mapping code dma-mapping: move dma_cache_sync out of line dma-mapping: move various slow path functions out of line ... commit fe2b0cdabcd9e6aeca66a104bc03576946e5fee2 Merge: 956eb6cb36765 9f83cfdb1ace3 Author: Linus Torvalds Date: Fri Dec 28 14:06:43 2018 -0800 Merge tag 'for-4.21/libata-20181221' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Here are the libata changes for this merge window. Nothing major in here. This contains: - GPIO descriptor conversions (Linus Walleij) - rcar deferred probing fix (Sergei Shtylyov)" * tag 'for-4.21/libata-20181221' of git://git.kernel.dk/linux-block: sata_rcar: fix deferred probing ata: palmld: Introduce state container ata: palmld: Convert to GPIO descriptors ata: rb532_cf: Convert to use GPIO descriptors ata: sata_highbank: Convert to use GPIO descriptors ata: pxa: Drop include commit 956eb6cb36765e3a79a744e6c9364dab1548e460 Merge: 0e9da3fbf7d81 875736bb3f3de Author: Linus Torvalds Date: Fri Dec 28 13:57:59 2018 -0800 Merge tag 'for-4.21/aio-20181221' of git://git.kernel.dk/linux-block Pull aio updates from Jens Axboe: "Flushing out pre-patches for the buffered/polled aio series. Some fixes in here, but also optimizations" * tag 'for-4.21/aio-20181221' of git://git.kernel.dk/linux-block: aio: abstract out io_event filler helper aio: split out iocb copy from io_submit_one() aio: use iocb_put() instead of open coding it aio: only use blk plugs for > 2 depth submissions aio: don't zero entire aio_kiocb aio_get_req() aio: separate out ring reservation from req allocation aio: use assigned completion handler commit 0e9da3fbf7d81f0f913b491c8de1ba7883d4f217 Merge: b12a9124eeb71 00203ba40d40d Author: Linus Torvalds Date: Fri Dec 28 13:19:59 2018 -0800 Merge tag 'for-4.21/block-20181221' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: "This is the main pull request for block/storage for 4.21. Larger than usual, it was a busy round with lots of goodies queued up. Most notable is the removal of the old IO stack, which has been a long time coming. No new features for a while, everything coming in this week has all been fixes for things that were previously merged. This contains: - Use atomic counters instead of semaphores for mtip32xx (Arnd) - Cleanup of the mtip32xx request setup (Christoph) - Fix for circular locking dependency in loop (Jan, Tetsuo) - bcache (Coly, Guoju, Shenghui) * Optimizations for writeback caching * Various fixes and improvements - nvme (Chaitanya, Christoph, Sagi, Jay, me, Keith) * host and target support for NVMe over TCP * Error log page support * Support for separate read/write/poll queues * Much improved polling * discard OOM fallback * Tracepoint improvements - lightnvm (Hans, Hua, Igor, Matias, Javier) * Igor added packed metadata to pblk. Now drives without metadata per LBA can be used as well. * Fix from Geert on uninitialized value on chunk metadata reads. * Fixes from Hans and Javier to pblk recovery and write path. * Fix from Hua Su to fix a race condition in the pblk recovery code. * Scan optimization added to pblk recovery from Zhoujie. * Small geometry cleanup from me. - Conversion of the last few drivers that used the legacy path to blk-mq (me) - Removal of legacy IO path in SCSI (me, Christoph) - Removal of legacy IO stack and schedulers (me) - Support for much better polling, now without interrupts at all. blk-mq adds support for multiple queue maps, which enables us to have a map per type. This in turn enables nvme to have separate completion queues for polling, which can then be interrupt-less. Also means we're ready for async polled IO, which is hopefully coming in the next release. - Killing of (now) unused block exports (Christoph) - Unification of the blk-rq-qos and blk-wbt wait handling (Josef) - Support for zoned testing with null_blk (Masato) - sx8 conversion to per-host tag sets (Christoph) - IO priority improvements (Damien) - mq-deadline zoned fix (Damien) - Ref count blkcg series (Dennis) - Lots of blk-mq improvements and speedups (me) - sbitmap scalability improvements (me) - Make core inflight IO accounting per-cpu (Mikulas) - Export timeout setting in sysfs (Weiping) - Cleanup the direct issue path (Jianchao) - Export blk-wbt internals in block debugfs for easier debugging (Ming) - Lots of other fixes and improvements" * tag 'for-4.21/block-20181221' of git://git.kernel.dk/linux-block: (364 commits) kyber: use sbitmap add_wait_queue/list_del wait helpers sbitmap: add helpers for add/del wait queue handling block: save irq state in blkg_lookup_create() dm: don't reuse bio for flushes nvme-pci: trace SQ status on completions nvme-rdma: implement polling queue map nvme-fabrics: allow user to pass in nr_poll_queues nvme-fabrics: allow nvmf_connect_io_queue to poll nvme-core: optionally poll sync commands block: make request_to_qc_t public nvme-tcp: fix spelling mistake "attepmpt" -> "attempt" nvme-tcp: fix endianess annotations nvmet-tcp: fix endianess annotations nvme-pci: refactor nvme_poll_irqdisable to make sparse happy nvme-pci: only set nr_maps to 2 if poll queues are supported nvmet: use a macro for default error location nvmet: fix comparison of a u16 with -1 blk-mq: enable IO poll if .nr_queues of type poll > 0 blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight() blk-mq: skip zero-queue maps in blk_mq_map_swqueue ... commit b12a9124eeb71d766a3e3eb594ebbb3fefc66902 Merge: 1a80dade010c7 e4b92b108c6cd Author: Linus Torvalds Date: Fri Dec 28 12:45:04 2018 -0800 Merge tag 'y2038-for-4.21' of ssh://gitolite.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Pull y2038 updates from Arnd Bergmann: "More syscalls and cleanups This concludes the main part of the system call rework for 64-bit time_t, which has spread over most of year 2018, the last six system calls being - ppoll - pselect6 - io_pgetevents - recvmmsg - futex - rt_sigtimedwait As before, nothing changes for 64-bit architectures, while 32-bit architectures gain another entry point that differs only in the layout of the timespec structure. Hopefully in the next release we can wire up all 22 of those system calls on all 32-bit architectures, which gives us a baseline version for glibc to start using them. This does not include the clock_adjtime, getrusage/waitid, and getitimer/setitimer system calls. I still plan to have new versions of those as well, but they are not required for correct operation of the C library since they can be emulated using the old 32-bit time_t based system calls. Aside from the system calls, there are also a few cleanups here, removing old kernel internal interfaces that have become unused after all references got removed. The arch/sh cleanups are part of this, there were posted several times over the past year without a reaction from the maintainers, while the corresponding changes made it into all other architectures" * tag 'y2038-for-4.21' of ssh://gitolite.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: timekeeping: remove obsolete time accessors vfs: replace current_kernel_time64 with ktime equivalent timekeeping: remove timespec_add/timespec_del timekeeping: remove unused {read,update}_persistent_clock sh: remove board_time_init() callback sh: remove unused rtc_sh_get/set_time infrastructure sh: sh03: rtc: push down rtc class ops into driver sh: dreamcast: rtc: push down rtc class ops into driver y2038: signal: Add compat_sys_rt_sigtimedwait_time64 y2038: signal: Add sys_rt_sigtimedwait_time32 y2038: socket: Add compat_sys_recvmmsg_time64 y2038: futex: Add support for __kernel_timespec y2038: futex: Move compat implementation into futex.c io_pgetevents: use __kernel_timespec pselect6: use __kernel_timespec ppoll: use __kernel_timespec signal: Add restore_user_sigmask() signal: Add set_user_sigmask() commit 1a80dade010c7a7f4885a4c4c2a7ac22cc7b34df Author: Matthew Wilcox Date: Fri Dec 28 07:22:26 2018 -0800 Fix failure path in alloc_pid() The failure path removes the allocated PIDs from the wrong namespace. This could lead to us inadvertently reusing PIDs in the leaf namespace and leaking PIDs in parent namespaces. Fixes: 95846ecf9dac ("pid: replace pid bitmap implementation with IDR API") Cc: Signed-off-by: Matthew Wilcox Acked-by: "Eric W. Biederman" Reviewed-by: Oleg Nesterov Signed-off-by: Linus Torvalds commit 0f4991e8fd48987ae476a92cdee6bfec4aff31b8 Author: YueHaibing Date: Fri Dec 28 00:40:00 2018 -0800 kernel/fork.c: mark 'stack_vm_area' with __maybe_unused Fixes gcc '-Wunused-but-set-variable' warning when CONFIG_VMAP_STACK is not set: kernel/fork.c: In function 'dup_task_struct': kernel/fork.c:843:20: warning: variable 'stack_vm_area' set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/1545965190-2381-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7056d3a37d2c6aaaab10c13e8e69adc67ec1fc65 Author: Michal Hocko Date: Fri Dec 28 00:39:57 2018 -0800 memcg, oom: notify on oom killer invocation from the charge path Burt Holzman has noticed that memcg v1 doesn't notify about OOM events via eventfd anymore. The reason is that 29ef680ae7c2 ("memcg, oom: move out_of_memory back to the charge path") has moved the oom handling back to the charge path. While doing so the notification was left behind in mem_cgroup_oom_synchronize. Fix the issue by replicating the oom hierarchy locking and the notification. Link: http://lkml.kernel.org/r/20181224091107.18354-1-mhocko@kernel.org Fixes: 29ef680ae7c2 ("memcg, oom: move out_of_memory back to the charge path") Signed-off-by: Michal Hocko Reported-by: Burt Holzman Acked-by: Johannes Weiner Cc: Vladimir Davydov [4.19+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7af7a8e19f0c5425ff639b0f0d2d244c2a647724 Author: Huang Ying Date: Fri Dec 28 00:39:53 2018 -0800 mm, swap: fix swapoff with KSM pages KSM pages may be mapped to the multiple VMAs that cannot be reached from one anon_vma. So during swapin, a new copy of the page need to be generated if a different anon_vma is needed, please refer to comments of ksm_might_need_to_copy() for details. During swapoff, unuse_vma() uses anon_vma (if available) to locate VMA and virtual address mapped to the page, so not all mappings to a swapped out KSM page could be found. So in try_to_unuse(), even if the swap count of a swap entry isn't zero, the page needs to be deleted from swap cache, so that, in the next round a new page could be allocated and swapin for the other mappings of the swapped out KSM page. But this contradicts with the THP swap support. Where the THP could be deleted from swap cache only after the swap count of every swap entry in the huge swap cluster backing the THP has reach 0. So try_to_unuse() is changed in commit e07098294adf ("mm, THP, swap: support to reclaim swap space for THP swapped out") to check that before delete a page from swap cache, but this has broken KSM swapoff too. Fortunately, KSM is for the normal pages only, so the original behavior for KSM pages could be restored easily via checking PageTransCompound(). That is how this patch works. The bug is introduced by e07098294adf ("mm, THP, swap: support to reclaim swap space for THP swapped out"), which is merged by v4.14-rc1. So I think we should backport the fix to from 4.14 on. But Hugh thinks it may be rare for the KSM pages being in the swap device when swapoff, so nobody reports the bug so far. Link: http://lkml.kernel.org/r/20181226051522.28442-1-ying.huang@intel.com Fixes: e07098294adf ("mm, THP, swap: support to reclaim swap space for THP swapped out") Signed-off-by: "Huang, Ying" Reported-by: Hugh Dickins Tested-by: Hugh Dickins Acked-by: Hugh Dickins Cc: Rik van Riel Cc: Johannes Weiner Cc: Minchan Kim Cc: Shaohua Li Cc: Daniel Jordan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70c6066e19c15749b579dde7d5722c7d7fb05d57 Author: Kyle Spiers Date: Fri Dec 28 00:39:49 2018 -0800 include/linux/gfp.h: fix typo Fix misspelled "satisfied" Link: http://lkml.kernel.org/r/20181227232354.64562-1-ksspiers@google.com Signed-off-by: Kyle Spiers Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 063a7d1d3623db31ca5d2309cab6030ebf93b72f Author: Dan Williams Date: Fri Dec 28 00:39:46 2018 -0800 mm/hmm: fix memremap.h, move dev_page_fault_t callback to hmm The kbuild robot reported the following on a development branch that used memremap.h in a new path: In file included from arch/m68k/include/asm/pgtable_mm.h:148:0, from arch/m68k/include/asm/pgtable.h:5, from include/linux/memremap.h:7, from drivers//dax/bus.c:3: arch/m68k/include/asm/motorola_pgtable.h: In function 'pgd_offset': >> arch/m68k/include/asm/motorola_pgtable.h:199:11: error: dereferencing pointer to incomplete type 'const struct mm_struct' return mm->pgd + pgd_index(address); ^~ The ->page_fault() callback is specific to HMM. Move it to 'struct hmm_devmem' where the unusual asm/pgtable.h dependency can be contained in include/linux/hmm.h. Longer term refactoring this dependency out of HMM is recommended, but in the meantime memremap.h remains generic. Link: http://lkml.kernel.org/r/154534090899.3120190.6652620807617715272.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 5042db43cc26 ("mm/ZONE_DEVICE: new type of ZONE_DEVICE memory...") Signed-off-by: Dan Williams Reviewed-by: "Jérôme Glisse" Cc: Logan Gunthorpe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c86aa7bbfd5568ba8a82d3635d8f7b8a8e06fe54 Author: Mike Kravetz Date: Fri Dec 28 00:39:42 2018 -0800 hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race hugetlbfs page faults can race with truncate and hole punch operations. Current code in the page fault path attempts to handle this by 'backing out' operations if we encounter the race. One obvious omission in the current code is removing a page newly added to the page cache. This is pretty straight forward to address, but there is a more subtle and difficult issue of backing out hugetlb reservations. To handle this correctly, the 'reservation state' before page allocation needs to be noted so that it can be properly backed out. There are four distinct possibilities for reservation state: shared/reserved, shared/no-resv, private/reserved and private/no-resv. Backing out a reservation may require memory allocation which could fail so that needs to be taken into account as well. Instead of writing the required complicated code for this rare occurrence, just eliminate the race. i_mmap_rwsem is now held in read mode for the duration of page fault processing. Hold i_mmap_rwsem longer in truncation and hold punch code to cover the call to remove_inode_hugepages. With this modification, code in remove_inode_hugepages checking for races becomes 'dead' as it can not longer happen. Remove the dead code and expand comments to explain reasoning. Similarly, checks for races with truncation in the page fault path can be simplified and removed. [mike.kravetz@oracle.com: incorporat suggestions from Kirill] Link: http://lkml.kernel.org/r/20181222223013.22193-3-mike.kravetz@oracle.com Link: http://lkml.kernel.org/r/20181218223557.5202-3-mike.kravetz@oracle.com Fixes: ebed4bfc8da8 ("hugetlb: fix absurd HugePages_Rsvd") Signed-off-by: Mike Kravetz Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Cc: Andrea Arcangeli Cc: Davidlohr Bueso Cc: Prakash Sangappa Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b43a9990055958e70347c56f90ea2ae32c67334c Author: Mike Kravetz Date: Fri Dec 28 00:39:38 2018 -0800 hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization While looking at BUGs associated with invalid huge page map counts, it was discovered and observed that a huge pte pointer could become 'invalid' and point to another task's page table. Consider the following: A task takes a page fault on a shared hugetlbfs file and calls huge_pte_alloc to get a ptep. Suppose the returned ptep points to a shared pmd. Now, another task truncates the hugetlbfs file. As part of truncation, it unmaps everyone who has the file mapped. If the range being truncated is covered by a shared pmd, huge_pmd_unshare will be called. For all but the last user of the shared pmd, huge_pmd_unshare will clear the pud pointing to the pmd. If the task in the middle of the page fault is not the last user, the ptep returned by huge_pte_alloc now points to another task's page table or worse. This leads to bad things such as incorrect page map/reference counts or invalid memory references. To fix, expand the use of i_mmap_rwsem as follows: - i_mmap_rwsem is held in read mode whenever huge_pmd_share is called. huge_pmd_share is only called via huge_pte_alloc, so callers of huge_pte_alloc take i_mmap_rwsem before calling. In addition, callers of huge_pte_alloc continue to hold the semaphore until finished with the ptep. - i_mmap_rwsem is held in write mode whenever huge_pmd_unshare is called. [mike.kravetz@oracle.com: add explicit check for mapping != null] Link: http://lkml.kernel.org/r/20181218223557.5202-2-mike.kravetz@oracle.com Fixes: 39dde65c9940 ("shared page table for hugetlb page") Signed-off-by: Mike Kravetz Acked-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Cc: Andrea Arcangeli Cc: Davidlohr Bueso Cc: Prakash Sangappa Cc: Colin Ian King Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ecc07fd0a6d350bbf4dc176e0d654661b304a30 Author: Michal Hocko Date: Fri Dec 28 00:39:34 2018 -0800 memory_hotplug: add missing newlines to debugging output pages_correctly_probed is missing new lines which means that the line is not printed rightaway but it rather waits for additional printks. Add \n to all three messages in pages_correctly_probed. Link: http://lkml.kernel.org/r/20181218162307.10518-1-mhocko@kernel.org Fixes: b77eab7079d9 ("mm/memory_hotplug: optimize probe routine") Signed-off-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 451b9514a59f3379d3bedd5a0e4909ef3ef1b98c Author: Kirill Tkhai Date: Fri Dec 28 00:39:31 2018 -0800 mm: remove __hugepage_set_anon_rmap() This function is identical to __page_set_anon_rmap() since the time, when it was introduced (8 years ago). The patch removes the function, and makes its users to use __page_set_anon_rmap() instead. Link: http://lkml.kernel.org/r/154504875359.30235.6237926369392564851.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Acked-by: Kirill A. Shutemov Reviewed-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Jerome Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4918e7625ffa82f388ea70538f0e1df20ea35a54 Author: Wei Yang Date: Fri Dec 28 00:39:27 2018 -0800 include/linux/vmstat.h: remove unused page state adjustment macro These four macro are not used anymore. Just remove them. Link: http://lkml.kernel.org/r/20181214063211.2290-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af3b854492f351d1ff3b4744a83bf5ff7eed4920 Author: Benjamin Poirier Date: Fri Dec 28 00:39:23 2018 -0800 mm/page_alloc.c: allow error injection Model call chain after should_failslab(). Likewise, we can now use a kprobe to override the return value of should_fail_alloc_page() and inject allocation failures into alloc_page*(). This will allow injecting allocation failures using the BCC tools even without building kernel with CONFIG_FAIL_PAGE_ALLOC and booting it with a fail_page_alloc= parameter, which incurs some overhead even when failures are not being injected. On the other hand, this patch adds an unconditional call to should_fail_alloc_page() from page allocation hotpath. That overhead should be rather negligible with CONFIG_FAIL_PAGE_ALLOC=n when there's no kprobe attached, though. [vbabka@suse.cz: changelog addition] Link: http://lkml.kernel.org/r/20181214074330.18917-1-bpoirier@suse.com Signed-off-by: Benjamin Poirier Acked-by: Vlastimil Babka Cc: Arnd Bergmann Cc: Michal Hocko Cc: Pavel Tatashin Cc: Oscar Salvador Cc: Mike Rapoport Cc: Joonsoo Kim Cc: Alexander Duyck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab41ee6879981b3d3a16a1079a33fa6fd043eb3c Author: Jan Kara Date: Fri Dec 28 00:39:20 2018 -0800 mm: migrate: drop unused argument of migrate_page_move_mapping() All callers of migrate_page_move_mapping() now pass NULL for 'head' argument. Drop it. Link: http://lkml.kernel.org/r/20181211172143.7358-7-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88dbcbb3a4847f5e6dfeae952d3105497700c128 Author: Jan Kara Date: Fri Dec 28 00:39:16 2018 -0800 blkdev: avoid migration stalls for blkdev pages Currently, block device pages don't provide a ->migratepage callback and thus fallback_migrate_page() is used for them. This handler cannot deal with dirty pages in async mode and also with the case a buffer head is in the LRU buffer head cache (as it has elevated b_count). Thus such page can block memory offlining. Fix the problem by using buffer_migrate_page_norefs() for migrating block device pages. That function takes care of dropping bh LRU in case migration would fail due to elevated buffer refcount to avoid stalls and can also migrate dirty pages without writing them. Link: http://lkml.kernel.org/r/20181211172143.7358-6-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89cb0888ca1483ad72648844ddd1b801863a8949 Author: Jan Kara Date: Fri Dec 28 00:39:12 2018 -0800 mm: migrate: provide buffer_migrate_page_norefs() Provide a variant of buffer_migrate_page() that also checks whether there are no unexpected references to buffer heads. This function will then be safe to use for block device pages. [akpm@linux-foundation.org: remove EXPORT_SYMBOL(buffer_migrate_page_norefs)] Link: http://lkml.kernel.org/r/20181211172143.7358-5-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84ade7c15ccfb46f852f4e2469b007a33651904d Author: Jan Kara Date: Fri Dec 28 00:39:09 2018 -0800 mm: migrate: move migrate_page_lock_buffers() buffer_migrate_page() is the only caller of migrate_page_lock_buffers() move it close to it and also drop the now unused stub for !CONFIG_BLOCK. Link: http://lkml.kernel.org/r/20181211172143.7358-4-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc4f11e69fd00c61c38619759b07d00631bda5ca Author: Jan Kara Date: Fri Dec 28 00:39:05 2018 -0800 mm: migrate: lock buffers before migrate_page_move_mapping() Lock buffers before calling into migrate_page_move_mapping() so that that function doesn't have to know about buffers (which is somewhat unexpected anyway) and all the buffer head logic is in buffer_migrate_page(). Link: http://lkml.kernel.org/r/20181211172143.7358-3-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b3901b38d9d916f634e903ce7cd2a8ddd5b1559 Author: Jan Kara Date: Fri Dec 28 00:39:01 2018 -0800 mm: migration: factor out code to compute expected number of page references Patch series "mm: migrate: Fix page migration stalls for blkdev pages". This patchset deals with page migration stalls that were reported by our customer due to a block device page that had a bufferhead that was in the bh LRU cache. The patchset modifies the page migration code so that bufferheads are completely handled inside buffer_migrate_page() and then provides a new migration helper for pages with buffer heads that is safe to use even for block device pages and that also deals with bh lrus. This patch (of 6): Factor out function to compute number of expected page references in migrate_page_move_mapping(). Note that we move hpage_nr_pages() and page_has_private() checks from under xas_lock_irq() however this is safe since we hold page lock. [jack@suse.cz: fix expected_page_refs()] Link: http://lkml.kernel.org/r/20181217131710.GB8611@quack2.suse.cz Link: http://lkml.kernel.org/r/20181211172143.7358-2-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9367bd06faa1beb2951899272f925bdf877d28b Author: Wei Yang Date: Fri Dec 28 00:38:58 2018 -0800 mm, page_alloc: enable pcpu_drain with zone capability drain_all_pages is documented to drain per-cpu pages for a given zone (if non-NULL). The current implementation doesn't match the description though. It will drain all pcp pages for all zones that happen to have cached pages on the same cpu as the given zone. This will lead to premature pcp cache draining for zones that are not of any interest to the caller - e.g. compaction, hwpoison or memory offline. This forces the page allocator to take locks and potential lock contention as a result. There is no real reason for this sub-optimal implementation. Replace per-cpu work item with a dedicated structure which contains a pointer to the zone and pass it over to the worker. This will get the zone information all the way down to the worker function and do the right job. [akpm@linux-foundation.org: avoid 80-col tricks] [mhocko@suse.com: refactor the whole changelog] Link: http://lkml.kernel.org/r/20181212142550.61686-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d53ce042277a94eadf9a8a31fc41fac54c67dec5 Author: Sri Krishna chowdary Date: Fri Dec 28 00:38:54 2018 -0800 kmemleak: add config to select auto scan Kmemleak scan can be cpu intensive and can stall user tasks at times. To prevent this, add config DEBUG_KMEMLEAK_AUTO_SCAN to enable/disable auto scan on boot up. Also protect first_run with DEBUG_KMEMLEAK_AUTO_SCAN as this is meant for only first automatic scan. Link: http://lkml.kernel.org/r/1540231723-7087-1-git-send-email-prpatel@nvidia.com Signed-off-by: Sri Krishna chowdary Signed-off-by: Sachin Nikam Signed-off-by: Prateek Reviewed-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c0c12cc8f00ca5f81acb010023b8eb13e9a7004 Author: Waiman Long Date: Fri Dec 28 00:38:51 2018 -0800 mm/page_alloc.c: don't call kasan_free_pages() at deferred mem init When CONFIG_KASAN is enabled on large memory SMP systems, the deferrred pages initialization can take a long time. Below were the reported init times on a 8-socket 96-core 4TB IvyBridge system. 1) Non-debug kernel without CONFIG_KASAN [ 8.764222] node 1 initialised, 132086516 pages in 7027ms 2) Debug kernel with CONFIG_KASAN [ 146.288115] node 1 initialised, 132075466 pages in 143052ms So the page init time in a debug kernel was 20X of the non-debug kernel. The long init time can be problematic as the page initialization is done with interrupt disabled. In this particular case, it caused the appearance of following warning messages as well as NMI backtraces of all the cores that were doing the initialization. [ 68.240049] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 68.241000] rcu: 25-...0: (100 ticks this GP) idle=b72/1/0x4000000000000000 softirq=915/915 fqs=16252 [ 68.241000] rcu: 44-...0: (95 ticks this GP) idle=49a/1/0x4000000000000000 softirq=788/788 fqs=16253 [ 68.241000] rcu: 54-...0: (104 ticks this GP) idle=03a/1/0x4000000000000000 softirq=721/825 fqs=16253 [ 68.241000] rcu: 60-...0: (103 ticks this GP) idle=cbe/1/0x4000000000000000 softirq=637/740 fqs=16253 [ 68.241000] rcu: 72-...0: (105 ticks this GP) idle=786/1/0x4000000000000000 softirq=536/641 fqs=16253 [ 68.241000] rcu: 84-...0: (99 ticks this GP) idle=292/1/0x4000000000000000 softirq=537/537 fqs=16253 [ 68.241000] rcu: 111-...0: (104 ticks this GP) idle=bde/1/0x4000000000000000 softirq=474/476 fqs=16253 [ 68.241000] rcu: (detected by 13, t=65018 jiffies, g=249, q=2) The long init time was mainly caused by the call to kasan_free_pages() to poison the newly initialized pages. On a 4TB system, we are talking about almost 500GB of memory probably on the same node. In reality, we may not need to poison the newly initialized pages before they are ever allocated. So KASAN poisoning of freed pages before the completion of deferred memory initialization is now disabled. Those pages will be properly poisoned when they are allocated or freed after deferred pages initialization is done. With this change, the new page initialization time became: [ 21.948010] node 1 initialised, 132075466 pages in 18702ms This was still about double the non-debug kernel time, but was much better than before. Link: http://lkml.kernel.org/r/1544459388-8736-1-git-send-email-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Andrew Morton Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Michal Hocko Cc: Pasha Tatashin Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3cfd22be0ad663248fadfc8f6ffa3e255c394552 Author: Peter Xu Date: Fri Dec 28 00:38:47 2018 -0800 userfaultfd: clear flag if remap event not enabled When the process being tracked does mremap() without UFFD_FEATURE_EVENT_REMAP on the corresponding tracking uffd file handle, we should not generate the remap event, and at the same time we should clear all the uffd flags on the new VMA. Without this patch, we can still have the VM_UFFD_MISSING|VM_UFFD_WP flags on the new VMA even the fault handling process does not even know the existance of the VMA. Link: http://lkml.kernel.org/r/20181211053409.20317-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Andrea Arcangeli Acked-by: Mike Rapoport Reviewed-by: William Kucharski Cc: Andrea Arcangeli Cc: Mike Rapoport Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Pavel Emelyanov Cc: Pravin Shedge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 125b860b251ad226b1384b6db06be37485127f69 Author: Pingfan Liu Date: Fri Dec 28 00:38:43 2018 -0800 mm/pageblock: throw compile error if pageblock_bits cannot hold MIGRATE_TYPES Currently, NR_PAGEBLOCK_BITS and MIGRATE_TYPES are not associated by code. If someone adds extra migrate type, then he may forget to enlarge the NR_PAGEBLOCK_BITS. Hence it requires some way to fix. NR_PAGEBLOCK_BITS depends on MIGRATE_TYPES, while these macro spread on two different .h file with reverse dependency, it is a little hard to refer to MIGRATE_TYPES in pageblock-flag.h. This patch tries to remind such relation in compiling-time. Link: http://lkml.kernel.org/r/1544508709-11358-1-git-send-email-kernelfans@gmail.com Signed-off-by: Pingfan Liu Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Pavel Tatashin Cc: Oscar Salvador Cc: Mike Rapoport Cc: Joonsoo Kim Cc: Alexander Duyck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcf9a0ef8dc3a3fb8be9de12b0e006c85ed5dc29 Author: Kirill Tkhai Date: Fri Dec 28 00:38:40 2018 -0800 ksm: react on changing "sleep_millisecs" parameter faster ksm thread unconditionally sleeps in ksm_scan_thread() after each iteration: schedule_timeout_interruptible( msecs_to_jiffies(ksm_thread_sleep_millisecs)) The timeout is configured in /sys/kernel/mm/ksm/sleep_millisecs. In case of user writes a big value by a mistake, and the thread enters into schedule_timeout_interruptible(), it's not possible to cancel the sleep by writing a new smaler value; the thread is just sleeping till timeout expires. The patch fixes the problem by waking the thread each time after the value is updated. This also may be useful for debug purposes; and also for userspace daemons, which change sleep_millisecs value in dependence of system load. Link: http://lkml.kernel.org/r/154454107680.3258.3558002210423531566.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Acked-by: Cyrill Gorcunov Reviewed-by: Andrew Morton Cc: Michal Hocko Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0975b2aae0e669f995f7d5f11db25c3080ae11c Author: Michal Hocko Date: Fri Dec 28 00:38:36 2018 -0800 mm, fault_around: do not take a reference to a locked page filemap_map_pages takes a speculative reference to each page in the range before it tries to lock that page. While this is correct it also can influence page migration which will bail out when seeing an elevated reference count. The faultaround code would bail on seeing a locked page so we can pro-actively check the PageLocked bit before page_cache_get_speculative and prevent from pointless reference count churn. Link: http://lkml.kernel.org/r/20181211142741.2607-4-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Jan Kara Acked-by: Kirill A. Shutemov Reviewed-by: David Hildenbrand Acked-by: Hugh Dickins Reviewed-by: William Kucharski Cc: Oscar Salvador Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb8965bd82fd4ed433a888f1383016ab3fa0d7de Author: Michal Hocko Date: Fri Dec 28 00:38:32 2018 -0800 mm, memory_hotplug: deobfuscate migration part of offlining Memory migration might fail during offlining and we keep retrying in that case. This is currently obfuscated by goto retry loop. The code is hard to follow and as a result it is even suboptimal becase each retry round scans the full range from start_pfn even though we have successfully scanned/migrated [start_pfn, pfn] range already. This is all only because check_pages_isolated failure has to rescan the full range again. De-obfuscate the migration retry loop by promoting it to a real for loop. In fact remove the goto altogether by making it a proper double loop (yeah, gotos are nasty in this specific case). In the end we will get a slightly more optimal code which is better readable. [akpm@linux-foundation.org: reflow comments to 80 cols] Link: http://lkml.kernel.org/r/20181211142741.2607-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Hugh Dickins Cc: Jan Kara Cc: Kirill A. Shutemov Cc: Pavel Tatashin Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a85009c377929d119fad5a75a16c4b7198946603 Author: Michal Hocko Date: Fri Dec 28 00:38:29 2018 -0800 mm, memory_hotplug: try to migrate full pfn range Patch series "few memory offlining enhancements". I have been chasing memory offlining not making progress recently. On the way I have noticed few weird decisions in the code. The migration itself is restricted without a reasonable justification and the retry loop around the migration is quite messy. This is addressed by patch 1 and patch 2. Patch 3 is targeting on the faultaround code which has been a hot candidate for the initial issue reported upstream [2] and that I am debugging internally. It turned out to be not the main contributor in the end but I believe we should address it regardless. See the patch description for more details. [1] http://lkml.kernel.org/r/20181120134323.13007-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/20181114070909.GB2653@MiWiFi-R3L-srv This patch (of 3): do_migrate_range has been limiting the number of pages to migrate to 256 for some reason which is not documented. Even if the limit made some sense back then when it was introduced it doesn't really serve a good purpose these days. If the range contains huge pages then we break out of the loop too early and go through LRU and pcp caches draining and scan_movable_pages is quite suboptimal. The only reason to limit the number of pages I can think of is to reduce the potential time to react on the fatal signal. But even then the number of pages is a questionable metric because even a single page migration might block in a non-killable state (e.g. __unmap_and_move). Remove the limit and offline the full requested range (this is one memblock worth of pages with the current code). Should we ever get a report that offlining takes too long to react on fatal signal then we should rather fix the core migration to use killable waits and bailout on a signal. Link: http://lkml.kernel.org/r/20181211142741.2607-1-mhocko@kernel.org Link: http://lkml.kernel.org/r/20181211142741.2607-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-by: Oscar Salvador Cc: Hugh Dickins Cc: Jan Kara Cc: Kirill A. Shutemov Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1400af755631f5267f7cc3d0fda5ba72f58d7d3 Author: Michal Hocko Date: Fri Dec 28 00:38:25 2018 -0800 mm, proc: report PR_SET_THP_DISABLE in proc David Rientjes has reported that commit 1860033237d4 ("mm: make PR_SET_THP_DISABLE immediately active") has changed the way how we report THPable VMAs to the userspace. Their monitoring tool is triggering false alarms on PR_SET_THP_DISABLE tasks because it considers an insufficient THP usage as a memory fragmentation resp. memory pressure issue. Before the said commit each newly created VMA inherited VM_NOHUGEPAGE flag and that got exposed to the userspace via /proc//smaps file. This implementation had its downsides as explained in the commit message but it is true that the userspace doesn't have any means to query for the process wide THP enabled/disabled status. PR_SET_THP_DISABLE is a process wide flag so it makes a lot of sense to export in the process wide context rather than per-vma. Introduce a new field to /proc//status which export this status. If PR_SET_THP_DISABLE is used then it reports false same as when the THP is not compiled in. It doesn't consider the global THP status because we already export that information via sysfs Link: http://lkml.kernel.org/r/20181211143641.3503-4-mhocko@kernel.org Fixes: 1860033237d4 ("mm: make PR_SET_THP_DISABLE immediately active") Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Reported-by: David Rientjes Cc: Dan Williams Cc: Jan Kara Cc: Mike Rapoport Cc: Paul Oppenheimer Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7635d9cbe8327e131a1d3d8517dc186c2796ce2e Author: Michal Hocko Date: Fri Dec 28 00:38:21 2018 -0800 mm, thp, proc: report THP eligibility for each vma Userspace falls short when trying to find out whether a specific memory range is eligible for THP. There are usecases that would like to know that http://lkml.kernel.org/r/alpine.DEB.2.21.1809251248450.50347@chino.kir.corp.google.com : This is used to identify heap mappings that should be able to fault thp : but do not, and they normally point to a low-on-memory or fragmentation : issue. The only way to deduce this now is to query for hg resp. nh flags and confronting the state with the global setting. Except that there is also PR_SET_THP_DISABLE that might change the picture. So the final logic is not trivial. Moreover the eligibility of the vma depends on the type of VMA as well. In the past we have supported only anononymous memory VMAs but things have changed and shmem based vmas are supported as well these days and the query logic gets even more complicated because the eligibility depends on the mount option and another global configuration knob. Simplify the current state and report the THP eligibility in /proc//smaps for each existing vma. Reuse transparent_hugepage_enabled for this purpose. The original implementation of this function assumes that the caller knows that the vma itself is supported for THP so make the core checks into __transparent_hugepage_enabled and use it for existing callers. __show_smap just use the new transparent_hugepage_enabled which also checks the vma support status (please note that this one has to be out of line due to include dependency issues). [mhocko@kernel.org: fix oops with NULL ->f_mapping] Link: http://lkml.kernel.org/r/20181224185106.GC16738@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20181211143641.3503-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Dan Williams Cc: David Rientjes Cc: Jan Kara Cc: Mike Rapoport Cc: Paul Oppenheimer Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7550c6079846a24f30d15ac75a941c8515dbedfb Author: Michal Hocko Date: Fri Dec 28 00:38:17 2018 -0800 mm, proc: be more verbose about unstable VMA flags in /proc//smaps Patch series "THP eligibility reporting via proc". This series of three patches aims at making THP eligibility reporting much more robust and long term sustainable. The trigger for the change is a regression report [2] and the long follow up discussion. In short the specific application didn't have good API to query whether a particular mapping can be backed by THP so it has used VMA flags to workaround that. These flags represent a deep internal state of VMAs and as such they should be used by userspace with a great deal of caution. A similar has happened for [3] when users complained that VM_MIXEDMAP is no longer set on DAX mappings. Again a lack of a proper API led to an abuse. The first patch in the series tries to emphasise that that the semantic of flags might change and any application consuming those should be really careful. The remaining two patches provide a more suitable interface to address [2] and provide a consistent API to query the THP status both for each VMA and process wide as well. [1] http://lkml.kernel.org/r/20181120103515.25280-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/http://lkml.kernel.org/r/alpine.DEB.2.21.1809241054050.224429@chino.kir.corp.google.com [3] http://lkml.kernel.org/r/20181002100531.GC4135@quack2.suse.cz This patch (of 3): Even though vma flags exported via /proc//smaps are explicitly documented to be not guaranteed for future compatibility the warning doesn't go far enough because it doesn't mention semantic changes to those flags. And they are important as well because these flags are a deep implementation internal to the MM code and the semantic might change at any time. Let's consider two recent examples: http://lkml.kernel.org/r/20181002100531.GC4135@quack2.suse.cz : commit e1fb4a086495 "dax: remove VM_MIXEDMAP for fsdax and device dax" has : removed VM_MIXEDMAP flag from DAX VMAs. Now our testing shows that in the : mean time certain customer of ours started poking into /proc//smaps : and looks at VMA flags there and if VM_MIXEDMAP is missing among the VMA : flags, the application just fails to start complaining that DAX support is : missing in the kernel. http://lkml.kernel.org/r/alpine.DEB.2.21.1809241054050.224429@chino.kir.corp.google.com : Commit 1860033237d4 ("mm: make PR_SET_THP_DISABLE immediately active") : introduced a regression in that userspace cannot always determine the set : of vmas where thp is ineligible. : Userspace relies on the "nh" flag being emitted as part of /proc/pid/smaps : to determine if a vma is eligible to be backed by hugepages. : Previous to this commit, prctl(PR_SET_THP_DISABLE, 1) would cause thp to : be disabled and emit "nh" as a flag for the corresponding vmas as part of : /proc/pid/smaps. After the commit, thp is disabled by means of an mm : flag and "nh" is not emitted. : This causes smaps parsing libraries to assume a vma is eligible for thp : and ends up puzzling the user on why its memory is not backed by thp. In both cases userspace was relying on a semantic of a specific VMA flag. The primary reason why that happened is a lack of a proper interface. While this has been worked on and it will be fixed properly, it seems that our wording could see some refinement and be more vocal about semantic aspect of these flags as well. Link: http://lkml.kernel.org/r/20181211143641.3503-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Jan Kara Acked-by: Dan Williams Acked-by: David Rientjes Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: Dan Williams Cc: David Rientjes Cc: Paul Oppenheimer Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0614ce9776b037b6a08a9adcbfcc382c0053b178 Author: Wei Yang Date: Fri Dec 28 00:38:13 2018 -0800 include/linux/memory_hotplug.h: remove duplicate declaration of offline_pages() offline_pages() is already declared in this file. Just remove the duplicated one. Link: http://lkml.kernel.org/r/20181205031357.24769-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ac46d4f3c43241ffa23d5bf36153a0830c0e02cc Author: Jérôme Glisse Date: Fri Dec 28 00:38:09 2018 -0800 mm/mmu_notifier: use structure for invalidate_range_start/end calls v2 To avoid having to change many call sites everytime we want to add a parameter use a structure to group all parameters for the mmu_notifier invalidate_range_start/end cakks. No functional changes with this patch. [akpm@linux-foundation.org: coding style fixes] Link: http://lkml.kernel.org/r/20181205053628.3210-3-jglisse@redhat.com Signed-off-by: Jérôme Glisse Acked-by: Christian König Acked-by: Jan Kara Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Dan Williams Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Michal Hocko Cc: Felix Kuehling Cc: Ralph Campbell Cc: John Hubbard From: Jérôme Glisse Subject: mm/mmu_notifier: use structure for invalidate_range_start/end calls v3 fix build warning in migrate.c when CONFIG_MMU_NOTIFIER=n Link: http://lkml.kernel.org/r/20181213171330.8489-3-jglisse@redhat.com Signed-off-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d6527a784f7a6d247961e046e830de8d71b47d1 Author: Jérôme Glisse Date: Fri Dec 28 00:38:05 2018 -0800 mm/mmu_notifier: use structure for invalidate_range_start/end callback Patch series "mmu notifier contextual informations", v2. This patchset adds contextual information, why an invalidation is happening, to mmu notifier callback. This is necessary for user of mmu notifier that wish to maintains their own data structure without having to add new fields to struct vm_area_struct (vma). For instance device can have they own page table that mirror the process address space. When a vma is unmap (munmap() syscall) the device driver can free the device page table for the range. Today we do not have any information on why a mmu notifier call back is happening and thus device driver have to assume that it is always an munmap(). This is inefficient at it means that it needs to re-allocate device page table on next page fault and rebuild the whole device driver data structure for the range. Other use case beside munmap() also exist, for instance it is pointless for device driver to invalidate the device page table when the invalidation is for the soft dirtyness tracking. Or device driver can optimize away mprotect() that change the page table permission access for the range. This patchset enables all this optimizations for device drivers. I do not include any of those in this series but another patchset I am posting will leverage this. The patchset is pretty simple from a code point of view. The first two patches consolidate all mmu notifier arguments into a struct so that it is easier to add/change arguments. The last patch adds the contextual information (munmap, protection, soft dirty, clear, ...). This patch (of 3): To avoid having to change many callback definition everytime we want to add a parameter use a structure to group all parameters for the mmu_notifier invalidate_range_start/end callback. No functional changes with this patch. [akpm@linux-foundation.org: fix drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c kerneldoc] Link: http://lkml.kernel.org/r/20181205053628.3210-2-jglisse@redhat.com Signed-off-by: Jérôme Glisse Acked-by: Jan Kara Acked-by: Jason Gunthorpe [infiniband] Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Dan Williams Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Michal Hocko Cc: Christian Koenig Cc: Felix Kuehling Cc: Ralph Campbell Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b15c87263a69272423771118c653e9a1d0672caa Author: Michal Hocko Date: Fri Dec 28 00:38:01 2018 -0800 hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined We have received a bug report that an injected MCE about faulty memory prevents memory offline to succeed on 4.4 base kernel. The underlying reason was that the HWPoison page has an elevated reference count and the migration keeps failing. There are two problems with that. First of all it is dubious to migrate the poisoned page because we know that accessing that memory is possible to fail. Secondly it doesn't make any sense to migrate a potentially broken content and preserve the memory corruption over to a new location. Oscar has found out that 4.4 and the current upstream kernels behave slightly differently with his simply testcase === int main(void) { int ret; int i; int fd; char *array = malloc(4096); char *array_locked = malloc(4096); fd = open("/tmp/data", O_RDONLY); read(fd, array, 4095); for (i = 0; i < 4096; i++) array_locked[i] = 'd'; ret = mlock((void *)PAGE_ALIGN((unsigned long)array_locked), sizeof(array_locked)); if (ret) perror("mlock"); sleep (20); ret = madvise((void *)PAGE_ALIGN((unsigned long)array_locked), 4096, MADV_HWPOISON); if (ret) perror("madvise"); for (i = 0; i < 4096; i++) array_locked[i] = 'd'; return 0; } === + offline this memory. In 4.4 kernels he saw the hwpoisoned page to be returned back to the LRU list kernel: [] dump_trace+0x59/0x340 kernel: [] show_stack_log_lvl+0xea/0x170 kernel: [] show_stack+0x21/0x40 kernel: [] dump_stack+0x5c/0x7c kernel: [] warn_slowpath_common+0x81/0xb0 kernel: [] __pagevec_lru_add_fn+0x14c/0x160 kernel: [] pagevec_lru_move_fn+0xad/0x100 kernel: [] __lru_cache_add+0x6c/0xb0 kernel: [] add_to_page_cache_lru+0x46/0x70 kernel: [] extent_readpages+0xc3/0x1a0 [btrfs] kernel: [] __do_page_cache_readahead+0x177/0x200 kernel: [] ondemand_readahead+0x168/0x2a0 kernel: [] generic_file_read_iter+0x41f/0x660 kernel: [] __vfs_read+0xcd/0x140 kernel: [] vfs_read+0x7a/0x120 kernel: [] kernel_read+0x3b/0x50 kernel: [] do_execveat_common.isra.29+0x490/0x6f0 kernel: [] do_execve+0x28/0x30 kernel: [] call_usermodehelper_exec_async+0xfb/0x130 kernel: [] ret_from_fork+0x55/0x80 And that latter confuses the hotremove path because an LRU page is attempted to be migrated and that fails due to an elevated reference count. It is quite possible that the reuse of the HWPoisoned page is some kind of fixed race condition but I am not really sure about that. With the upstream kernel the failure is slightly different. The page doesn't seem to have LRU bit set but isolate_movable_page simply fails and do_migrate_range simply puts all the isolated pages back to LRU and therefore no progress is made and scan_movable_pages finds same set of pages over and over again. Fix both cases by explicitly checking HWPoisoned pages before we even try to get reference on the page, try to unmap it if it is still mapped. As explained by Naoya: : Hwpoison code never unmapped those for no big reason because : Ksm pages never dominate memory, so we simply didn't have strong : motivation to save the pages. Also put WARN_ON(PageLRU) in case there is a race and we can hit LRU HWPoison pages which shouldn't happen but I couldn't convince myself about that. Naoya has noted the following: : Theoretically no such gurantee, because try_to_unmap() doesn't have a : guarantee of success and then memory_failure() returns immediately : when hwpoison_user_mappings fails. : Or the following code (comes after hwpoison_user_mappings block) also impli= : es : that the target page can still have PageLRU flag. : : /* : * Torn down by someone else? : */ : if (PageLRU(p) && !PageSwapCache(p) && p->mapping =3D=3D NULL) { : action_result(pfn, MF_MSG_TRUNCATED_LRU, MF_IGNORED); : res =3D -EBUSY; : goto out; : } : : So I think it's OK to keep "if (WARN_ON(PageLRU(page)))" block in : current version of your patch. Link: http://lkml.kernel.org/r/20181206120135.14079-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Oscar Salvador Debugged-by: Oscar Salvador Tested-by: Oscar Salvador Acked-by: David Hildenbrand Acked-by: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f1eb38e0e1131e75cc4ac684391b25d70282589 Author: Oscar Salvador Date: Fri Dec 28 00:37:57 2018 -0800 mm, kmemleak: little optimization while scanning kmemleak_scan() goes through all online nodes and tries to scan all used pages. We can do better and use pfn_to_online_page(), so in case we have CONFIG_MEMORY_HOTPLUG, offlined pages will be skiped automatically. For boxes where CONFIG_MEMORY_HOTPLUG is not present, pfn_to_online_page() will fallback to pfn_valid(). Another little optimization is to check if the page belongs to the node we are currently checking, so in case we have nodes interleaved we will not check the same pfn multiple times. I ran some tests: Add some memory to node1 and node2 making it interleaved: (qemu) object_add memory-backend-ram,id=ram0,size=1G (qemu) device_add pc-dimm,id=dimm0,memdev=ram0,node=1 (qemu) object_add memory-backend-ram,id=ram1,size=1G (qemu) device_add pc-dimm,id=dimm1,memdev=ram1,node=2 (qemu) object_add memory-backend-ram,id=ram2,size=1G (qemu) device_add pc-dimm,id=dimm2,memdev=ram2,node=1 Then, we offline that memory: # for i in {32..39} ; do echo "offline" > /sys/devices/system/node/node1/memory$i/state;done # for i in {48..55} ; do echo "offline" > /sys/devices/system/node/node1/memory$i/state;don # for i in {40..47} ; do echo "offline" > /sys/devices/system/node/node2/memory$i/state;done And we run kmemleak_scan: # echo "scan" > /sys/kernel/debug/kmemleak before the patch: kmemleak: time spend: 41596 us after the patch: kmemleak: time spend: 34899 us [akpm@linux-foundation.org: remove stray newline, per Oscar] Link: http://lkml.kernel.org/r/20181206131918.25099-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Wei Yang Suggested-by: Michal Hocko Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e2d43405b22e98cf5f3730c1829ec1fdbe17ae7 Author: Will Deacon Date: Fri Dec 28 00:37:53 2018 -0800 lib/ioremap: ensure break-before-make is used for huge p4d mappings Whilst no architectures actually enable support for huge p4d mappings in the vmap area, the code that is implemented should be using break-before-make, as we do for pud and pmd huge entries. Link: http://lkml.kernel.org/r/1544120495-17438-6-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Reviewed-by: Toshi Kani Cc: Chintan Pandya Cc: Toshi Kani Cc: Thomas Gleixner Cc: Michal Hocko Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sean Christopherson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36ddc5a78c878e9b10c323d2fe88b0dae2f487eb Author: Will Deacon Date: Fri Dec 28 00:37:49 2018 -0800 lib/ioremap: ensure phys_addr actually corresponds to a physical address The current ioremap() code uses a phys_addr variable at each level of page table, which is confusingly offset by subtracting the base virtual address being mapped so that adding the current virtual address back on when iterating through the page table entries gives back the corresponding physical address. This is fairly confusing and results in all users of phys_addr having to add the current virtual address back on. Instead, this patch just updates phys_addr when iterating over the page table entries, ensuring that it's always up-to-date and doesn't require explicit offsetting. Link: http://lkml.kernel.org/r/1544120495-17438-5-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Tested-by: Sean Christopherson Reviewed-by: Sean Christopherson Cc: Chintan Pandya Cc: Toshi Kani Cc: Thomas Gleixner Cc: Michal Hocko Cc: Sean Christopherson Cc: "H. Peter Anvin" Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48e178ab0d630b8b60deca64b22b22e68818777e Author: Will Deacon Date: Fri Dec 28 00:37:45 2018 -0800 x86/pgtable: drop pXd_none() checks from pXd_free_pYd_table() The core code already has a check for pXd_none(), so remove it from the architecture implementation. Link: http://lkml.kernel.org/r/1544120495-17438-4-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Acked-by: Thomas Gleixner Reviewed-by: Toshi Kani Cc: Chintan Pandya Cc: Toshi Kani Cc: Michal Hocko Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Sean Christopherson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c006972c3fedbea43fde9667686e5949eba9981 Author: Will Deacon Date: Fri Dec 28 00:37:42 2018 -0800 arm64: mmu: drop pXd_present() checks from pXd_free_pYd_table() The core code already has a check for pXd_none(), so remove it from the architecture implementation. Link: http://lkml.kernel.org/r/1544120495-17438-3-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Cc: Chintan Pandya Cc: Toshi Kani Cc: Thomas Gleixner Cc: Michal Hocko Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sean Christopherson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d239865ac804c91a621294ca7bece4241b006fae Author: Will Deacon Date: Fri Dec 28 00:37:38 2018 -0800 ioremap: rework pXd_free_pYd_page() API The recently merged API for ensuring break-before-make on page-table entries when installing huge mappings in the vmalloc/ioremap region is fairly counter-intuitive, resulting in the arch freeing functions (e.g. pmd_free_pte_page()) being called even on entries that aren't present. This resulted in a minor bug in the arm64 implementation, giving rise to spurious VM_WARN messages. This patch moves the pXd_present() checks out into the core code, refactoring the callsites at the same time so that we avoid the complex conjunctions when determining whether or not we can put down a huge mapping. Link: http://lkml.kernel.org/r/1544120495-17438-2-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Reviewed-by: Toshi Kani Suggested-by: Linus Torvalds Cc: Chintan Pandya Cc: Toshi Kani Cc: Thomas Gleixner Cc: Michal Hocko Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sean Christopherson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c16eb000ca03f8cdc2153bca6c977b6f898e6934 Author: Kirill Tkhai Date: Fri Dec 28 00:37:35 2018 -0800 mm/filemap.c: remove useless check in pagecache_get_page() page always is not NULL, so we may remove this useless check. Link: http://lkml.kernel.org/r/154419752044.18559.2452963074922917720.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Acked-by: Cyrill Gorcunov Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 144552ff8995dd34d049a203d636b259ab751137 Author: Anthony Yznaga Date: Fri Dec 28 00:37:31 2018 -0800 /proc/kpagecount: return 0 for special pages that are never mapped Certain pages that are never mapped to userspace have a type indicated in the page_type field of their struct pages (e.g. PG_buddy). page_type overlaps with _mapcount so set the count to 0 and avoid calling page_mapcount() for these pages. [anthony.yznaga@oracle.com: incorporate feedback from Matthew Wilcox] Link: http://lkml.kernel.org/r/1544481313-27318-1-git-send-email-anthony.yznaga@oracle.com Link: http://lkml.kernel.org/r/1543963526-27917-1-git-send-email-anthony.yznaga@oracle.com Signed-off-by: Anthony Yznaga Reviewed-by: Andrew Morton Acked-by: Matthew Wilcox Reviewed-by: Naoya Horiguchi Cc: Vlastimil Babka Cc: David Rientjes Cc: Alexey Dobriyan Cc: Kirill A. Shutemov Cc: Mike Rapoport Cc: Michal Hocko Cc: Alexander Duyck Cc: Johannes Weiner Cc: Miles Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6fb87b8e3ff1ef6bcf68470f24a97c984554d5a Author: Anthony Yznaga Date: Fri Dec 28 00:37:27 2018 -0800 tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures Because kpagecount_read() fakes success if map counts are not being collected, clamp the page count passed to it by walk_pfn() to the pages value returned by the preceding call to kpageflags_read(). Link: http://lkml.kernel.org/r/1543962269-26116-1-git-send-email-anthony.yznaga@oracle.com Fixes: 7f1d23e60718 ("tools/vm/page-types.c: include shared map counts") Signed-off-by: Anthony Yznaga Reviewed-by: Naoya Horiguchi Cc: Vlastimil Babka Cc: Matthew Wilcox Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbe5d9939e81277bfbfb8fdba68374024b16d5fa Author: Oscar Salvador Date: Fri Dec 28 00:37:24 2018 -0800 mm/page_alloc.c: drop uneeded __meminit and __meminitdata Since commit 03e85f9d5f1 ("mm/page_alloc: Introduce free_area_init_core_hotplug"), some functions changed to only be called during system initialization. Concretly, free_area_init_node() and the functions that hang from it. Also, some variables are no longer used after the system has gone through initialization. So this could be considered as a late clean-up for that patch. This patch changes the functions from __meminit to __init, and the variables from __meminitdata to __initdata. In return, we get some KBs back: Before: Freeing unused kernel image memory: 2472K After: Freeing unused kernel image memory: 2480K Link: http://lkml.kernel.org/r/20181204111507.4808-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Wei Yang Cc: Michal Hocko Cc: Pavel Tatashin Cc: Vlastimil Babka Cc: Alexander Duyck Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fa750dcf29e8606e3969d13d8e188cc1c0f511d Author: Brian Foster Date: Fri Dec 28 00:37:20 2018 -0800 mm/page-writeback.c: don't break integrity writeback on ->writepage() error write_cache_pages() is used in both background and integrity writeback scenarios by various filesystems. Background writeback is mostly concerned with cleaning a certain number of dirty pages based on various mm heuristics. It may not write the full set of dirty pages or wait for I/O to complete. Integrity writeback is responsible for persisting a set of dirty pages before the writeback job completes. For example, an fsync() call must perform integrity writeback to ensure data is on disk before the call returns. write_cache_pages() unconditionally breaks out of its processing loop in the event of a ->writepage() error. This is fine for background writeback, which had no strict requirements and will eventually come around again. This can cause problems for integrity writeback on filesystems that might need to clean up state associated with failed page writeouts. For example, XFS performs internal delayed allocation accounting before returning a ->writepage() error, where applicable. If the current writeback happens to be associated with an unmount and write_cache_pages() completes the writeback prematurely due to error, the filesystem is unmounted in an inconsistent state if dirty+delalloc pages still exist. To handle this problem, update write_cache_pages() to always process the full set of pages for integrity writeback regardless of ->writepage() errors. Save the first encountered error and return it to the caller once complete. This facilitates XFS (or any other fs that expects integrity writeback to process the entire set of dirty pages) to clean up its internal state completely in the event of persistent mapping errors. Background writeback continues to exit on the first error encountered. [akpm@linux-foundation.org: fix typo in comment] Link: http://lkml.kernel.org/r/20181116134304.32440-1-bfoster@redhat.com Signed-off-by: Brian Foster Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3a5c77afefa697bf87f15272c7257e1574cad56 Author: Wei Yang Date: Fri Dec 28 00:37:16 2018 -0800 lib/show_mem.c: drop pgdat_resize_lock in show_mem() Function show_mem() is used to print system memory status when user requires or fail to allocate memory. Generally, this is a best effort information so any races with memory hotplug (or very theoretically an early initialization) should be tolerable and the worst that could happen is to print an imprecise node state. Drop the resize lock because this is the only place which might hold the lock from the interrupt context and so all other callers might use a simple spinlock. Even though this doesn't solve any real issue it makes the code easier to follow and tiny more effective. Link: http://lkml.kernel.org/r/20181129235532.9328-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ecea993d0100e7409f8840b463a34fae42c9c32 Author: YueHaibing Date: Fri Dec 28 00:37:13 2018 -0800 mm/hmm.c: remove set but not used variable 'devmem' Fixes gcc '-Wunused-but-set-variable' warning: mm/hmm.c: In function 'hmm_devmem_ref_kill': mm/hmm.c:995:21: warning: variable 'devmem' set but not used [-Wunused-but-set-variable] It not used any more since 35d39f953d4e ("mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages()") Link: http://lkml.kernel.org/r/1543629971-128377-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Reviewed-by: Jérôme Glisse Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa004ab7365ffa1e17e6b267d64798afccb94946 Author: Wei Yang Date: Fri Dec 28 00:37:10 2018 -0800 mm, hotplug: move init_currently_empty_zone() under zone_span_lock protection During online_pages phase, pgdat->nr_zones will be updated in case this zone is empty. Currently the online_pages phase is protected by the global locks (device_device_hotplug_lock and mem_hotplug_lock), which ensures there is no contention during the update of nr_zones. These global locks introduces scalability issues (especially the second one), which slow down code relying on get_online_mems(). This is also a preparation for not having to rely on get_online_mems() but instead some more fine grained locks. The patch moves init_currently_empty_zone under both zone_span_writelock and pgdat_resize_lock because both the pgdat state is changed (nr_zones) and the zone's start_pfn. Also this patch changes the documentation of node_size_lock to include the protection of nr_zones. Link: http://lkml.kernel.org/r/20181203205016.14123-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e0d2e7ef14d9e1c900dac909db45263822b824f Author: Wei Yang Date: Fri Dec 28 00:37:06 2018 -0800 mm, sparse: pass nid instead of pgdat to sparse_add_one_section() Since the information needed in sparse_add_one_section() is node id to allocate proper memory, it is not necessary to pass its pgdat. This patch changes the prototype of sparse_add_one_section() to pass node id directly. This is intended to reduce misleading that sparse_add_one_section() would touch pgdat. Link: http://lkml.kernel.org/r/20181204085657.20472-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Dave Hansen Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83af658898cb292a32d8b6cd9b51266d7cfc4b6a Author: Wei Yang Date: Fri Dec 28 00:37:02 2018 -0800 mm, sparse: drop pgdat_resize_lock in sparse_add/remove_one_section() pgdat_resize_lock is used to protect pgdat's memory region information like: node_start_pfn, node_present_pages, etc. While in function sparse_add/remove_one_section(), pgdat_resize_lock is used to protect initialization/release of one mem_section. This looks not proper. These code paths are currently protected by mem_hotplug_lock currently but should there ever be any reason for locking at the sparse layer a dedicated lock should be introduced. Following is the current call trace of sparse_add/remove_one_section() mem_hotplug_begin() arch_add_memory() add_pages() __add_pages() __add_section() sparse_add_one_section() mem_hotplug_done() mem_hotplug_begin() arch_remove_memory() __remove_pages() __remove_section() sparse_remove_one_section() mem_hotplug_done() The comment above the pgdat_resize_lock also mentions "Holding this will also guarantee that any pfn_valid() stays that way.", which is true with the current implementation and false after this patch. But current implementation doesn't meet this comment. There isn't any pfn walkers to take the lock so this looks like a relict from the past. This patch also removes this comment. [richard.weiyang@gmail.com: v4] Link: http://lkml.kernel.org/r/20181204085657.20472-1-richard.weiyang@gmail.com [mhocko@suse.com: changelog suggestion] Link: http://lkml.kernel.org/r/20181128091243.19249-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Dave Hansen Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e247bab0668a5893b3efa131cec5b5859467834 Author: Yu Zhao Date: Fri Dec 28 00:36:58 2018 -0800 mm: remove pte_lock_deinit() Pagetable page doesn't touch page->mapping or have any used field that overlaps with it. No need to clear mapping in dtor. In fact, doing so might mask problems that otherwise would be detected by bad_page(). Link: http://lkml.kernel.org/r/20181128235525.58780-1-yuzhao@google.com Signed-off-by: Yu Zhao Reviewed-by: Matthew Wilcox Acked-by: Michal Hocko Cc: Hugh Dickins Cc: "Kirill A . Shutemov" Cc: Dan Williams Cc: Pavel Tatashin Cc: Souptick Joarder Cc: Logan Gunthorpe Cc: Keith Busch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb416d18b850faaa44bd3bb67c9728922c3cce98 Author: Minchan Kim Date: Fri Dec 28 00:36:54 2018 -0800 zram: writeback throttle If there are lots of write IO with flash device, it could have a wearout problem of storage. To overcome the problem, admin needs to design write limitation to guarantee flash health for entire product life. This patch creates a new knob "writeback_limit" for zram. writeback_limit's default value is 0 so that it doesn't limit any writeback. If admin want to measure writeback count in a certain period, he could know it via /sys/block/zram0/bd_stat's 3rd column. If admin want to limit writeback as per-day 400M, he could do it like below. MB_SHIFT=20 4K_SHIFT=12 echo $((400<>4K_SHIFT)) > \ /sys/block/zram0/writeback_limit. If admin want to allow further write again, he could do it like below echo 0 > /sys/block/zram0/writeback_limit If admin want to see remaining writeback budget, cat /sys/block/zram0/writeback_limit The writeback_limit count will reset whenever you reset zram (e.g., system reboot, echo 1 > /sys/block/zramX/reset) so keeping how many of writeback happened until you reset the zram to allocate extra writeback budget in next setting is user's job. [minchan@kernel.org: v4] Link: http://lkml.kernel.org/r/20181203024045.153534-8-minchan@kernel.org Link: http://lkml.kernel.org/r/20181127055429.251614-8-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Joey Pabalinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23eddf39b2c28c05cb8f8203d38e61807d701b38 Author: Minchan Kim Date: Fri Dec 28 00:36:51 2018 -0800 zram: add bd_stat statistics bd_stat represents things that happened in the backing device. Currently it supports bd_counts, bd_reads and bd_writes which are helpful to understand wearout of flash and memory saving. [minchan@kernel.org: v4] Link: http://lkml.kernel.org/r/20181203024045.153534-7-minchan@kernel.org Link: http://lkml.kernel.org/r/20181127055429.251614-7-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Joey Pabalinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a939888ec38bf1f33e4a903056677e92a4844244 Author: Minchan Kim Date: Fri Dec 28 00:36:47 2018 -0800 zram: support idle/huge page writeback Add a new feature "zram idle/huge page writeback". In the zram-swap use case, zram usually has many idle/huge swap pages. It's pointless to keep them in memory (ie, zram). To solve this problem, this feature introduces idle/huge page writeback to the backing device so the goal is to save more memory space on embedded systems. Normal sequence to use idle/huge page writeback feature is as follows, while (1) { # mark allocated zram slot to idle echo all > /sys/block/zram0/idle # leave system working for several hours # Unless there is no access for some blocks on zram, # they are still IDLE marked pages. echo "idle" > /sys/block/zram0/writeback or/and echo "huge" > /sys/block/zram0/writeback # write the IDLE or/and huge marked slot into backing device # and free the memory. } Per the discussion at https://lore.kernel.org/lkml/20181122065926.GG3441@jagdpanzerIV/T/#u, This patch removes direct incommpressibe page writeback feature (d2afd25114f4 ("zram: write incompressible pages to backing device")). Below concerns from Sergey: == &< == "IDLE writeback" is superior to "incompressible writeback". "incompressible writeback" is completely unpredictable and uncontrollable; it depens on data patterns and compression algorithms. While "IDLE writeback" is predictable. I even suspect, that, *ideally*, we can remove "incompressible writeback". "IDLE pages" is a super set which also includes "incompressible" pages. So, technically, we still can do "incompressible writeback" from "IDLE writeback" path; but a much more reasonable one, based on a page idling period. I understand that you want to keep "direct incompressible writeback" around. ZRAM is especially popular on devices which do suffer from flash wearout, so I can see "incompressible writeback" path becoming a dead code, long term. == &< == Below concerns from Minchan: == &< == My concern is if we enable CONFIG_ZRAM_WRITEBACK in this implementation, both hugepage/idlepage writeck will turn on. However someuser want to enable only idlepage writeback so we need to introduce turn on/off knob for hugepage or new CONFIG_ZRAM_IDLEPAGE_WRITEBACK for those usecase. I don't want to make it complicated *if possible*. Long term, I imagine we need to make VM aware of new swap hierarchy a little bit different with as-is. For example, first high priority swap can return -EIO or -ENOCOMP, swap try to fallback to next lower priority swap device. With that, hugepage writeback will work tranparently. So we could regard it as regression because incompressible pages doesn't go to backing storage automatically. Instead, user should do it via "echo huge" > /sys/block/zram/writeback" manually. == &< == Link: http://lkml.kernel.org/r/20181127055429.251614-6-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Joey Pabalinas Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e82592c4fd7eafe8dec12a70436e93e3afb28556 Author: Minchan Kim Date: Fri Dec 28 00:36:44 2018 -0800 zram: introduce ZRAM_IDLE flag To support idle page writeback with upcoming patches, this patch introduces a new ZRAM_IDLE flag. Userspace can mark zram slots as "idle" via "echo all > /sys/block/zramX/idle" which marks every allocated zram slot as ZRAM_IDLE. User could see it by /sys/kernel/debug/zram/zram0/block_state. 300 75.033841 ...i 301 63.806904 s..i 302 63.806919 ..hi Once there is IO for the slot, the mark will be disappeared. 300 75.033841 ... 301 63.806904 s..i 302 63.806919 ..hi Therefore, 300th block is idle zpage. With this feature, user can how many zram has idle pages which are waste of memory. Link: http://lkml.kernel.org/r/20181127055429.251614-5-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Reviewed-by: Joey Pabalinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e5292831b346bacb05558ca385cae366187314c Author: Minchan Kim Date: Fri Dec 28 00:36:40 2018 -0800 zram: refactor flags and writeback stuff Rename some variables and restructure some code for better readability in writeback and zs_free_page. Link: http://lkml.kernel.org/r/20181127055429.251614-4-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Reviewed-by: Joey Pabalinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5547932dc67a48713eece4fa4703bfdf0cfcb818 Author: Minchan Kim Date: Fri Dec 28 00:36:37 2018 -0800 zram: fix double free backing device If blkdev_get fails, we shouldn't do blkdev_put. Otherwise, kernel emits below log. This patch fixes it. WARNING: CPU: 0 PID: 1893 at fs/block_dev.c:1828 blkdev_put+0x105/0x120 Modules linked in: CPU: 0 PID: 1893 Comm: swapoff Not tainted 4.19.0+ #453 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 RIP: 0010:blkdev_put+0x105/0x120 Call Trace: __x64_sys_swapoff+0x46d/0x490 do_syscall_64+0x5a/0x190 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 4466 hardirqs last enabled at (4465): __free_pages_ok+0x1e3/0x490 hardirqs last disabled at (4466): trace_hardirqs_off_thunk+0x1a/0x1c softirqs last enabled at (3420): __do_softirq+0x333/0x446 softirqs last disabled at (3407): irq_exit+0xd1/0xe0 Link: http://lkml.kernel.org/r/20181127055429.251614-3-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Reviewed-by: Joey Pabalinas Cc: [4.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c9959e025472122a61faebb208525cf26b305d1 Author: Minchan Kim Date: Fri Dec 28 00:36:33 2018 -0800 zram: fix lockdep warning of free block handling Patch series "zram idle page writeback", v3. Inherently, swap device has many idle pages which are rare touched since it was allocated. It is never problem if we use storage device as swap. However, it's just waste for zram-swap. This patchset supports zram idle page writeback feature. * Admin can define what is idle page "no access since X time ago" * Admin can define when zram should writeback them * Admin can define when zram should stop writeback to prevent wearout Details are in each patch's description. This patch (of 7): ================================ WARNING: inconsistent lock state 4.19.0+ #390 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. zram_verify/2095 [HC0[0]:SC1[1]:HE1:SE0] takes: 00000000b1828693 (&(&zram->bitmap_lock)->rlock){+.?.}, at: put_entry_bdev+0x1e/0x50 {SOFTIRQ-ON-W} state was registered at: _raw_spin_lock+0x2c/0x40 zram_make_request+0x755/0xdc9 generic_make_request+0x373/0x6a0 submit_bio+0x6c/0x140 __swap_writepage+0x3a8/0x480 shrink_page_list+0x1102/0x1a60 shrink_inactive_list+0x21b/0x3f0 shrink_node_memcg.constprop.99+0x4f8/0x7e0 shrink_node+0x7d/0x2f0 do_try_to_free_pages+0xe0/0x300 try_to_free_pages+0x116/0x2b0 __alloc_pages_slowpath+0x3f4/0xf80 __alloc_pages_nodemask+0x2a2/0x2f0 __handle_mm_fault+0x42e/0xb50 handle_mm_fault+0x55/0xb0 __do_page_fault+0x235/0x4b0 page_fault+0x1e/0x30 irq event stamp: 228412 hardirqs last enabled at (228412): [] __slab_free+0x3e6/0x600 hardirqs last disabled at (228411): [] __slab_free+0x1c5/0x600 softirqs last enabled at (228396): [] __do_softirq+0x31e/0x427 softirqs last disabled at (228403): [] irq_exit+0xd1/0xe0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&zram->bitmap_lock)->rlock); lock(&(&zram->bitmap_lock)->rlock); *** DEADLOCK *** no locks held by zram_verify/2095. stack backtrace: CPU: 5 PID: 2095 Comm: zram_verify Not tainted 4.19.0+ #390 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x67/0x9b print_usage_bug+0x1bd/0x1d3 mark_lock+0x4aa/0x540 __lock_acquire+0x51d/0x1300 lock_acquire+0x90/0x180 _raw_spin_lock+0x2c/0x40 put_entry_bdev+0x1e/0x50 zram_free_page+0xf6/0x110 zram_slot_free_notify+0x42/0xa0 end_swap_bio_read+0x5b/0x170 blk_update_request+0x8f/0x340 scsi_end_request+0x2c/0x1e0 scsi_io_completion+0x98/0x650 blk_done_softirq+0x9e/0xd0 __do_softirq+0xcc/0x427 irq_exit+0xd1/0xe0 do_IRQ+0x93/0x120 common_interrupt+0xf/0xf With writeback feature, zram_slot_free_notify could be called in softirq context by end_swap_bio_read. However, bitmap_lock is not aware of that so lockdep yell out: get_entry_bdev spin_lock(bitmap->lock); irq softirq end_swap_bio_read zram_slot_free_notify zram_slot_lock <-- deadlock prone zram_free_page put_entry_bdev spin_lock(bitmap->lock); <-- deadlock prone With akpm's suggestion (i.e. bitmap operation is already atomic), we could remove bitmap lock. It might fail to find a empty slot if serious contention happens. However, it's not severe problem because huge page writeback has already possiblity to fail if there is severe memory pressure. Worst case is just keeping the incompressible in memory, not storage. The other problem is zram_slot_lock in zram_slot_slot_free_notify. To make it safe is this patch introduces zram_slot_trylock where zram_slot_free_notify uses it. Although it's rare to be contented, this patch adds new debug stat "miss_free" to keep monitoring how often it happens. Link: http://lkml.kernel.org/r/20181127055429.251614-2-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Reviewed-by: Joey Pabalinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fed84c78527009d4f799a3ed9a566502fa026d82 Author: Qian Cai Date: Fri Dec 28 00:36:29 2018 -0800 mm/memblock.c: skip kmemleak for kasan_init() Kmemleak does not play well with KASAN (tested on both HPE Apollo 70 and Huawei TaiShan 2280 aarch64 servers). After calling start_kernel()->setup_arch()->kasan_init(), kmemleak early log buffer went from something like 280 to 260000 which caused kmemleak disabled and crash dump memory reservation failed. The multitude of kmemleak_alloc() calls is from nested loops while KASAN is setting up full memory mappings, so let early kmemleak allocations skip those memblock_alloc_internal() calls came from kasan_init() given that those early KASAN memory mappings should not reference to other memory. Hence, no kmemleak false positives. kasan_init kasan_map_populate [1] kasan_pgd_populate [2] kasan_pud_populate [3] kasan_pmd_populate [4] kasan_pte_populate [5] kasan_alloc_zeroed_page memblock_alloc_try_nid memblock_alloc_internal kmemleak_alloc [1] for_each_memblock(memory, reg) [2] while (pgdp++, addr = next, addr != end) [3] while (pudp++, addr = next, addr != end && pud_none(READ_ONCE(*pudp))) [4] while (pmdp++, addr = next, addr != end && pmd_none(READ_ONCE(*pmdp))) [5] while (ptep++, addr = next, addr != end && pte_none(READ_ONCE(*ptep))) Link: http://lkml.kernel.org/r/1543442925-17794-1-git-send-email-cai@gmx.us Signed-off-by: Qian Cai Acked-by: Catalin Marinas Cc: Michal Hocko Cc: Mike Rapoport Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65c78784135f847e49eb98e6b976e453e71100c3 Author: Oscar Salvador Date: Fri Dec 28 00:36:26 2018 -0800 kernel, resource: check for IORESOURCE_SYSRAM in release_mem_region_adjustable This is a preparation for the next patch. Currently, we only call release_mem_region_adjustable() in __remove_pages if the zone is not ZONE_DEVICE, because resources that belong to HMM/devm are being released by themselves with devm_release_mem_region. Since we do not want to touch any zone/page stuff during the removing of the memory (but during the offlining), we do not want to check for the zone here. So we need another way to tell release_mem_region_adjustable() to not realease the resource in case it belongs to HMM/devm. HMM/devm acquires/releases a resource through devm_request_mem_region/devm_release_mem_region. These resources have the flag IORESOURCE_MEM, while resources acquired by hot-add memory path (register_memory_resource()) contain IORESOURCE_SYSTEM_RAM. So, we can check for this flag in release_mem_region_adjustable, and if the resource does not contain such flag, we know that we are dealing with a HMM/devm resource, so we can back off. Link: http://lkml.kernel.org/r/20181127162005.15833-3-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Pavel Tatashin Cc: Dan Williams Cc: Jerome Glisse Cc: Jonathan Cameron Cc: Michal Hocko Cc: Oscar Salvador Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c2a5af6fed20cf74401c9d64319c76c5ff81309 Author: Oscar Salvador Date: Fri Dec 28 00:36:22 2018 -0800 mm, memory_hotplug: add nid parameter to arch_remove_memory Patch series "Do not touch pages in hot-remove path", v2. This patchset aims for two things: 1) A better definition about offline and hot-remove stage 2) Solving bugs where we can access non-initialized pages during hot-remove operations [2] [3]. This is achieved by moving all page/zone handling to the offline stage, so we do not need to access pages when hot-removing memory. [1] https://patchwork.kernel.org/cover/10691415/ [2] https://patchwork.kernel.org/patch/10547445/ [3] https://www.spinics.net/lists/linux-mm/msg161316.html This patch (of 5): This is a preparation for the following-up patches. The idea of passing the nid is that it will allow us to get rid of the zone parameter afterwards. Link: http://lkml.kernel.org/r/20181127162005.15833-2-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Pavel Tatashin Cc: Michal Hocko Cc: Dan Williams Cc: Jerome Glisse Cc: Jonathan Cameron Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23b68cfaae0ea40a9509fad37b756a6916dec54e Author: Wei Yang Date: Fri Dec 28 00:36:18 2018 -0800 mm: check nr_initialised with PAGES_PER_SECTION directly in defer_init() When DEFERRED_STRUCT_PAGE_INIT is configured, only the first section of each node's highest zone is initialized before defer stage. static_init_pgcnt is used to store the number of pages like this: pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION, pgdat->node_spanned_pages); because we don't want to overflow zone's range. But this is not necessary, since defer_init() is called like this: memmap_init_zone() for pfn in [start_pfn, end_pfn) defer_init(pfn, end_pfn) In case (pgdat->node_spanned_pages < PAGES_PER_SECTION), the loop would stop before calling defer_init(). BTW, comparing PAGES_PER_SECTION with node_spanned_pages is not correct, since nr_initialised is zone based instead of node based. Even node_spanned_pages is bigger than PAGES_PER_SECTION, its highest zone would have pages less than PAGES_PER_SECTION. Link: http://lkml.kernel.org/r/20181122094807.6985-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Alexander Duyck Cc: Pavel Tatashin Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a1ea439b16b92002e0a6fceebc5d1794906e297 Author: Hugh Dickins Date: Fri Dec 28 00:36:14 2018 -0800 mm: put_and_wait_on_page_locked() while page is migrated Waiting on a page migration entry has used wait_on_page_locked() all along since 2006: but you cannot safely wait_on_page_locked() without holding a reference to the page, and that extra reference is enough to make migrate_page_move_mapping() fail with -EAGAIN, when a racing task faults on the entry before migrate_page_move_mapping() gets there. And that failure is retried nine times, amplifying the pain when trying to migrate a popular page. With a single persistent faulter, migration sometimes succeeds; with two or three concurrent faulters, success becomes much less likely (and the more the page was mapped, the worse the overhead of unmapping and remapping it on each try). This is especially a problem for memory offlining, where the outer level retries forever (or until terminated from userspace), because a heavy refault workload can trigger an endless loop of migration failures. wait_on_page_locked() is the wrong tool for the job. David Herrmann (but was he the first?) noticed this issue in 2014: https://marc.info/?l=linux-mm&m=140110465608116&w=2 Tim Chen started a thread in August 2017 which appears relevant: https://marc.info/?l=linux-mm&m=150275941014915&w=2 where Kan Liang went on to implicate __migration_entry_wait(): https://marc.info/?l=linux-mm&m=150300268411980&w=2 and the thread ended up with the v4.14 commits: 2554db916586 ("sched/wait: Break up long wake list walk") 11a19c7b099f ("sched/wait: Introduce wakeup boomark in wake_up_page_bit") Baoquan He reported "Memory hotplug softlock issue" 14 November 2018: https://marc.info/?l=linux-mm&m=154217936431300&w=2 We have all assumed that it is essential to hold a page reference while waiting on a page lock: partly to guarantee that there is still a struct page when MEMORY_HOTREMOVE is configured, but also to protect against reuse of the struct page going to someone who then holds the page locked indefinitely, when the waiter can reasonably expect timely unlocking. But in fact, so long as wait_on_page_bit_common() does the put_page(), and is careful not to rely on struct page contents thereafter, there is no need to hold a reference to the page while waiting on it. That does mean that this case cannot go back through the loop: but that's fine for the page migration case, and even if used more widely, is limited by the "Stop walking if it's locked" optimization in wake_page_function(). Add interface put_and_wait_on_page_locked() to do this, using "behavior" enum in place of "lock" arg to wait_on_page_bit_common() to implement it. No interruptible or killable variant needed yet, but they might follow: I have a vague notion that reporting -EINTR should take precedence over return from wait_on_page_bit_common() without knowing the page state, so arrange it accordingly - but that may be nothing but pedantic. __migration_entry_wait() still has to take a brief reference to the page, prior to calling put_and_wait_on_page_locked(): but now that it is dropped before waiting, the chance of impeding page migration is very much reduced. Should we perhaps disable preemption across this? shrink_page_list()'s __ClearPageLocked(): that was a surprise! This survived a lot of testing before that showed up. PageWaiters may have been set by wait_on_page_bit_common(), and the reference dropped, just before shrink_page_list() succeeds in freezing its last page reference: in such a case, unlock_page() must be used. Follow the suggestion from Michal Hocko, just revert a978d6f52106 ("mm: unlockless reclaim") now: that optimization predates PageWaiters, and won't buy much these days; but we can reinstate it for the !PageWaiters case if anyone notices. It does raise the question: should vmscan.c's is_page_cache_freeable() and __remove_mapping() now treat a PageWaiters page as if an extra reference were held? Perhaps, but I don't think it matters much, since shrink_page_list() already had to win its trylock_page(), so waiters are not very common there: I noticed no difference when trying the bigger change, and it's surely not needed while put_and_wait_on_page_locked() is only used for page migration. [willy@infradead.org: add put_and_wait_on_page_locked() kerneldoc] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261121330.1116@eggly.anvils Signed-off-by: Hugh Dickins Reported-by: Baoquan He Tested-by: Baoquan He Reviewed-by: Andrea Arcangeli Acked-by: Michal Hocko Acked-by: Linus Torvalds Acked-by: Vlastimil Babka Cc: Matthew Wilcox Cc: Baoquan He Cc: David Hildenbrand Cc: Mel Gorman Cc: David Herrmann Cc: Tim Chen Cc: Kan Liang Cc: Andi Kleen Cc: Davidlohr Bueso Cc: Peter Zijlstra Cc: Christoph Lameter Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0c867d9588d9efc10d6a55009c9560336673369 Author: yuzhoujian Date: Fri Dec 28 00:36:10 2018 -0800 mm, oom: add oom victim's memcg to the oom context information The current oom report doesn't display victim's memcg context during the global OOM situation. While this information is not strictly needed, it can be really helpful for containerized environments to locate which container has lost a process. Now that we have a single line for the oom context, we can trivially add both the oom memcg (this can be either global_oom or a specific memcg which hits its hard limits) and task_memcg which is the victim's memcg. Below is the single line output in the oom report after this patch. - global oom context information: oom-kill:constraint=,nodemask=,cpuset=,mems_allowed=,global_oom,task_memcg=,task=,pid=,uid= - memcg oom context information: oom-kill:constraint=,nodemask=,cpuset=,mems_allowed=,oom_memcg=,task_memcg=,task=,pid=,uid= [penguin-kernel@I-love.SAKURA.ne.jp: use pr_cont() in mem_cgroup_print_oom_context()] Link: http://lkml.kernel.org/r/201812190723.wBJ7NdkN032628@www262.sakura.ne.jp Link: http://lkml.kernel.org/r/1542799799-36184-2-git-send-email-ufo19890607@gmail.com Signed-off-by: yuzhoujian Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: David Rientjes Cc: "Kirill A . Shutemov" Cc: Andrea Arcangeli Cc: Tetsuo Handa Cc: Roman Gushchin Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef8444ea01d7442652f8e1b8a8b94278cb57eafd Author: yuzhoujian Date: Fri Dec 28 00:36:07 2018 -0800 mm, oom: reorganize the oom report in dump_header OOM report contains several sections. The first one is the allocation context that has triggered the OOM. Then we have cpuset context followed by the stack trace of the OOM path. The tird one is the OOM memory information. Followed by the current memory state of all system tasks. At last, we will show oom eligible tasks and the information about the chosen oom victim. One thing that makes parsing more awkward than necessary is that we do not have a single and easily parsable line about the oom context. This patch is reorganizing the oom report to 1) who invoked oom and what was the allocation request [ 515.902945] tuned invoked oom-killer: gfp_mask=0x6200ca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0 2) OOM stack trace [ 515.904273] CPU: 24 PID: 1809 Comm: tuned Not tainted 4.20.0-rc3+ #3 [ 515.905518] Hardware name: Inspur SA5212M4/YZMB-00370-107, BIOS 4.1.10 11/14/2016 [ 515.906821] Call Trace: [ 515.908062] dump_stack+0x5a/0x73 [ 515.909311] dump_header+0x55/0x28c [ 515.914260] oom_kill_process+0x2d8/0x300 [ 515.916708] out_of_memory+0x145/0x4a0 [ 515.917932] __alloc_pages_slowpath+0x7d2/0xa16 [ 515.919157] __alloc_pages_nodemask+0x277/0x290 [ 515.920367] filemap_fault+0x3d0/0x6c0 [ 515.921529] ? filemap_map_pages+0x2b8/0x420 [ 515.922709] ext4_filemap_fault+0x2c/0x40 [ext4] [ 515.923884] __do_fault+0x20/0x80 [ 515.925032] __handle_mm_fault+0xbc0/0xe80 [ 515.926195] handle_mm_fault+0xfa/0x210 [ 515.927357] __do_page_fault+0x233/0x4c0 [ 515.928506] do_page_fault+0x32/0x140 [ 515.929646] ? page_fault+0x8/0x30 [ 515.930770] page_fault+0x1e/0x30 3) OOM memory information [ 515.958093] Mem-Info: [ 515.959647] active_anon:26501758 inactive_anon:1179809 isolated_anon:0 active_file:4402672 inactive_file:483963 isolated_file:1344 unevictable:0 dirty:4886753 writeback:0 unstable:0 slab_reclaimable:148442 slab_unreclaimable:18741 mapped:1347 shmem:1347 pagetables:58669 bounce:0 free:88663 free_pcp:0 free_cma:0 ... 4) current memory state of all system tasks [ 516.079544] [ 744] 0 744 9211 1345 114688 82 0 systemd-journal [ 516.082034] [ 787] 0 787 31764 0 143360 92 0 lvmetad [ 516.084465] [ 792] 0 792 10930 1 110592 208 -1000 systemd-udevd [ 516.086865] [ 1199] 0 1199 13866 0 131072 112 -1000 auditd [ 516.089190] [ 1222] 0 1222 31990 1 110592 157 0 smartd [ 516.091477] [ 1225] 0 1225 4864 85 81920 43 0 irqbalance [ 516.093712] [ 1226] 0 1226 52612 0 258048 426 0 abrtd [ 516.112128] [ 1280] 0 1280 109774 55 299008 400 0 NetworkManager [ 516.113998] [ 1295] 0 1295 28817 37 69632 24 0 ksmtuned [ 516.144596] [ 10718] 0 10718 2622484 1721372 15998976 267219 0 panic [ 516.145792] [ 10719] 0 10719 2622484 1164767 9818112 53576 0 panic [ 516.146977] [ 10720] 0 10720 2622484 1174361 9904128 53709 0 panic [ 516.148163] [ 10721] 0 10721 2622484 1209070 10194944 54824 0 panic [ 516.149329] [ 10722] 0 10722 2622484 1745799 14774272 91138 0 panic 5) oom context (contrains and the chosen victim). oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0-1,task=panic,pid=10737,uid=0 An admin can easily get the full oom context at a single line which makes parsing much easier. Link: http://lkml.kernel.org/r/1542799799-36184-1-git-send-email-ufo19890607@gmail.com Signed-off-by: yuzhoujian Acked-by: Michal Hocko Cc: Andrea Arcangeli Cc: David Rientjes Cc: "Kirill A . Shutemov" Cc: Roman Gushchin Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5cb113f2dbc8125f31005faebab161a2a84ebe6 Author: Alexey Dobriyan Date: Fri Dec 28 00:36:03 2018 -0800 mm: make free_reserved_area() return "const char *" and propagate through down the call stack. Link: http://lkml.kernel.org/r/20181124091411.GC10969@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a2f45ff320287d49a3cd90ce68cb58a6da6f5e1 Author: Alexey Dobriyan Date: Fri Dec 28 00:35:59 2018 -0800 mm/debug.c: make "migrate_reason_names[]" const char * Those strings are immutable as well. Link: http://lkml.kernel.org/r/20181124090508.GB10877@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c999fbd3dcc6535b1e298b016665ec23ac2b0a9a Author: Alexey Dobriyan Date: Fri Dec 28 00:35:55 2018 -0800 mm/mmzone.c: make "migratetype_names" const char * Those strings are immutable in fact. Link: http://lkml.kernel.org/r/20181124090327.GA10877@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c30844d2dfe272d58c8fc000960b835d13aa2ac Author: Mel Gorman Date: Fri Dec 28 00:35:52 2018 -0800 mm: reclaim small amounts of memory when an external fragmentation event occurs An external fragmentation event was previously described as When the page allocator fragments memory, it records the event using the mm_page_alloc_extfrag event. If the fallback_order is smaller than a pageblock order (order-9 on 64-bit x86) then it's considered an event that will cause external fragmentation issues in the future. The kernel reduces the probability of such events by increasing the watermark sizes by calling set_recommended_min_free_kbytes early in the lifetime of the system. This works reasonably well in general but if there are enough sparsely populated pageblocks then the problem can still occur as enough memory is free overall and kswapd stays asleep. This patch introduces a watermark_boost_factor sysctl that allows a zone watermark to be temporarily boosted when an external fragmentation causing events occurs. The boosting will stall allocations that would decrease free memory below the boosted low watermark and kswapd is woken if the calling context allows to reclaim an amount of memory relative to the size of the high watermark and the watermark_boost_factor until the boost is cleared. When kswapd finishes, it wakes kcompactd at the pageblock order to clean some of the pageblocks that may have been affected by the fragmentation event. kswapd avoids any writeback, slab shrinkage and swap from reclaim context during this operation to avoid excessive system disruption in the name of fragmentation avoidance. Care is taken so that kswapd will do normal reclaim work if the system is really low on memory. This was evaluated using the same workloads as "mm, page_alloc: Spread allocations across zones before introducing fragmentation". 1-socket Skylake machine config-global-dhp__workload_thpfioscale XFS (no special madvise) 4 fio threads, 1 THP allocating thread -------------------------------------- 4.20-rc3 extfrag events < order 9: 804694 4.20-rc3+patch: 408912 (49% reduction) 4.20-rc3+patch1-4: 18421 (98% reduction) 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Amean fault-base-1 653.58 ( 0.00%) 652.71 ( 0.13%) Amean fault-huge-1 0.00 ( 0.00%) 178.93 * -99.00%* 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Percentage huge-1 0.00 ( 0.00%) 5.12 ( 100.00%) Note that external fragmentation causing events are massively reduced by this path whether in comparison to the previous kernel or the vanilla kernel. The fault latency for huge pages appears to be increased but that is only because THP allocations were successful with the patch applied. 1-socket Skylake machine global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE) ----------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 291392 4.20-rc3+patch: 191187 (34% reduction) 4.20-rc3+patch1-4: 13464 (95% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Min fault-base-1 912.00 ( 0.00%) 905.00 ( 0.77%) Min fault-huge-1 127.00 ( 0.00%) 135.00 ( -6.30%) Amean fault-base-1 1467.55 ( 0.00%) 1481.67 ( -0.96%) Amean fault-huge-1 1127.11 ( 0.00%) 1063.88 * 5.61%* 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Percentage huge-1 77.64 ( 0.00%) 83.46 ( 7.49%) As before, massive reduction in external fragmentation events, some jitter on latencies and an increase in THP allocation success rates. 2-socket Haswell machine config-global-dhp__workload_thpfioscale XFS (no special madvise) 4 fio threads, 5 THP allocating threads ---------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 215698 4.20-rc3+patch: 200210 (7% reduction) 4.20-rc3+patch1-4: 14263 (93% reduction) 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Amean fault-base-5 1346.45 ( 0.00%) 1306.87 ( 2.94%) Amean fault-huge-5 3418.60 ( 0.00%) 1348.94 ( 60.54%) 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Percentage huge-5 0.78 ( 0.00%) 7.91 ( 910.64%) There is a 93% reduction in fragmentation causing events, there is a big reduction in the huge page fault latency and allocation success rate is higher. 2-socket Haswell machine global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE) ----------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 166352 4.20-rc3+patch: 147463 (11% reduction) 4.20-rc3+patch1-4: 11095 (93% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Amean fault-base-5 6217.43 ( 0.00%) 7419.67 * -19.34%* Amean fault-huge-5 3163.33 ( 0.00%) 3263.80 ( -3.18%) 4.20.0-rc3 4.20.0-rc3 lowzone-v5r8 boost-v5r8 Percentage huge-5 95.14 ( 0.00%) 87.98 ( -7.53%) There is a large reduction in fragmentation events with some jitter around the latencies and success rates. As before, the high THP allocation success rate does mean the system is under a lot of pressure. However, as the fragmentation events are reduced, it would be expected that the long-term allocation success rate would be higher. Link: http://lkml.kernel.org/r/20181123114528.28802-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: David Rientjes Cc: Michal Hocko Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a79cdad5eb213b3a629e624565b1b3bf9192b7c Author: Mel Gorman Date: Fri Dec 28 00:35:48 2018 -0800 mm: use alloc_flags to record if kswapd can wake This is a preparation patch that copies the GFP flag __GFP_KSWAPD_RECLAIM into alloc_flags. This is a preparation patch only that avoids having to pass gfp_mask through a long callchain in a future patch. Note that the setting in the fast path happens in alloc_flags_nofragment() and it may be claimed that this has nothing to do with ALLOC_NO_FRAGMENT. That's true in this patch but is not true later so it's done now for easier review to show where the flag needs to be recorded. No functional change. [mgorman@techsingularity.net: ALLOC_KSWAPD flag needs to be applied in the !CONFIG_ZONE_DMA32 case] Link: http://lkml.kernel.org/r/20181126143503.GO23260@techsingularity.net Link: http://lkml.kernel.org/r/20181123114528.28802-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Cc: David Rientjes Cc: Michal Hocko Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a921444382b49cc7fdeca3fba3e278bc09484a27 Author: Mel Gorman Date: Fri Dec 28 00:35:44 2018 -0800 mm: move zone watermark accesses behind an accessor This is a preparation patch only, no functional change. Link: http://lkml.kernel.org/r/20181123114528.28802-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: David Rientjes Cc: Michal Hocko Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6bb154504f8b496780ec53ec81aba957a12981fa Author: Mel Gorman Date: Fri Dec 28 00:35:41 2018 -0800 mm, page_alloc: spread allocations across zones before introducing fragmentation Patch series "Fragmentation avoidance improvements", v5. It has been noted before that fragmentation avoidance (aka anti-fragmentation) is not perfect. Given sufficient time or an adverse workload, memory gets fragmented and the long-term success of high-order allocations degrades. This series defines an adverse workload, a definition of external fragmentation events (including serious) ones and a series that reduces the level of those fragmentation events. The details of the workload and the consequences are described in more detail in the changelogs. However, from patch 1, this is a high-level summary of the adverse workload. The exact details are found in the mmtests implementation. The broad details of the workload are as follows; 1. Create an XFS filesystem (not specified in the configuration but done as part of the testing for this patch) 2. Start 4 fio threads that write a number of 64K files inefficiently. Inefficiently means that files are created on first access and not created in advance (fio parameterr create_on_open=1) and fallocate is not used (fallocate=none). With multiple IO issuers this creates a mix of slab and page cache allocations over time. The total size of the files is 150% physical memory so that the slabs and page cache pages get mixed 3. Warm up a number of fio read-only threads accessing the same files created in step 2. This part runs for the same length of time it took to create the files. It'll fault back in old data and further interleave slab and page cache allocations. As it's now low on memory due to step 2, fragmentation occurs as pageblocks get stolen. 4. While step 3 is still running, start a process that tries to allocate 75% of memory as huge pages with a number of threads. The number of threads is based on a (NR_CPUS_SOCKET - NR_FIO_THREADS)/4 to avoid THP threads contending with fio, any other threads or forcing cross-NUMA scheduling. Note that the test has not been used on a machine with less than 8 cores. The benchmark records whether huge pages were allocated and what the fault latency was in microseconds 5. Measure the number of events potentially causing external fragmentation, the fault latency and the huge page allocation success rate. 6. Cleanup Overall the series reduces external fragmentation causing events by over 94% on 1 and 2 socket machines, which in turn impacts high-order allocation success rates over the long term. There are differences in latencies and high-order allocation success rates. Latencies are a mixed bag as they are vulnerable to exact system state and whether allocations succeeded so they are treated as a secondary metric. Patch 1 uses lower zones if they are populated and have free memory instead of fragmenting a higher zone. It's special cased to handle a Normal->DMA32 fallback with the reasons explained in the changelog. Patch 2-4 boosts watermarks temporarily when an external fragmentation event occurs. kswapd wakes to reclaim a small amount of old memory and then wakes kcompactd on completion to recover the system slightly. This introduces some overhead in the slowpath. The level of boosting can be tuned or disabled depending on the tolerance for fragmentation vs allocation latency. Patch 5 stalls some movable allocation requests to let kswapd from patch 4 make some progress. The duration of the stalls is very low but it is possible to tune the system to avoid fragmentation events if larger stalls can be tolerated. The bulk of the improvement in fragmentation avoidance is from patches 1-4 but patch 5 can deal with a rare corner case and provides the option of tuning a system for THP allocation success rates in exchange for some stalls to control fragmentation. This patch (of 5): The page allocator zone lists are iterated based on the watermarks of each zone which does not take anti-fragmentation into account. On x86, node 0 may have multiple zones while other nodes have one zone. A consequence is that tasks running on node 0 may fragment ZONE_NORMAL even though ZONE_DMA32 has plenty of free memory. This patch special cases the allocator fast path such that it'll try an allocation from a lower local zone before fragmenting a higher zone. In this case, stealing of pageblocks or orders larger than a pageblock are still allowed in the fast path as they are uninteresting from a fragmentation point of view. This was evaluated using a benchmark designed to fragment memory before attempting THP allocations. It's implemented in mmtests as the following configurations configs/config-global-dhp__workload_thpfioscale configs/config-global-dhp__workload_thpfioscale-defrag configs/config-global-dhp__workload_thpfioscale-madvhugepage e.g. from mmtests ./run-mmtests.sh --run-monitor --config configs/config-global-dhp__workload_thpfioscale test-run-1 The broad details of the workload are as follows; 1. Create an XFS filesystem (not specified in the configuration but done as part of the testing for this patch). 2. Start 4 fio threads that write a number of 64K files inefficiently. Inefficiently means that files are created on first access and not created in advance (fio parameter create_on_open=1) and fallocate is not used (fallocate=none). With multiple IO issuers this creates a mix of slab and page cache allocations over time. The total size of the files is 150% physical memory so that the slabs and page cache pages get mixed. 3. Warm up a number of fio read-only processes accessing the same files created in step 2. This part runs for the same length of time it took to create the files. It'll refault old data and further interleave slab and page cache allocations. As it's now low on memory due to step 2, fragmentation occurs as pageblocks get stolen. 4. While step 3 is still running, start a process that tries to allocate 75% of memory as huge pages with a number of threads. The number of threads is based on a (NR_CPUS_SOCKET - NR_FIO_THREADS)/4 to avoid THP threads contending with fio, any other threads or forcing cross-NUMA scheduling. Note that the test has not been used on a machine with less than 8 cores. The benchmark records whether huge pages were allocated and what the fault latency was in microseconds. 5. Measure the number of events potentially causing external fragmentation, the fault latency and the huge page allocation success rate. 6. Cleanup the test files. Note that due to the use of IO and page cache that this benchmark is not suitable for running on large machines where the time to fragment memory may be excessive. Also note that while this is one mix that generates fragmentation that it's not the only mix that generates fragmentation. Differences in workload that are more slab-intensive or whether SLUB is used with high-order pages may yield different results. When the page allocator fragments memory, it records the event using the mm_page_alloc_extfrag ftrace event. If the fallback_order is smaller than a pageblock order (order-9 on 64-bit x86) then it's considered to be an "external fragmentation event" that may cause issues in the future. Hence, the primary metric here is the number of external fragmentation events that occur with order < 9. The secondary metric is allocation latency and huge page allocation success rates but note that differences in latencies and what the success rate also can affect the number of external fragmentation event which is why it's a secondary metric. 1-socket Skylake machine config-global-dhp__workload_thpfioscale XFS (no special madvise) 4 fio threads, 1 THP allocating thread -------------------------------------- 4.20-rc3 extfrag events < order 9: 804694 4.20-rc3+patch: 408912 (49% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Amean fault-base-1 662.92 ( 0.00%) 653.58 * 1.41%* Amean fault-huge-1 0.00 ( 0.00%) 0.00 ( 0.00%) 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Percentage huge-1 0.00 ( 0.00%) 0.00 ( 0.00%) Fault latencies are slightly reduced while allocation success rates remain at zero as this configuration does not make any special effort to allocate THP and fio is heavily active at the time and either filling memory or keeping pages resident. However, a 49% reduction of serious fragmentation events reduces the changes of external fragmentation being a problem in the future. Vlastimil asked during review for a breakdown of the allocation types that are falling back. vanilla 3816 MIGRATE_UNMOVABLE 800845 MIGRATE_MOVABLE 33 MIGRATE_UNRECLAIMABLE patch 735 MIGRATE_UNMOVABLE 408135 MIGRATE_MOVABLE 42 MIGRATE_UNRECLAIMABLE The majority of the fallbacks are due to movable allocations and this is consistent for the workload throughout the series so will not be presented again as the primary source of fallbacks are movable allocations. Movable fallbacks are sometimes considered "ok" to fallback because they can be migrated. The problem is that they can fill an unmovable/reclaimable pageblock causing those allocations to fallback later and polluting pageblocks with pages that cannot move. If there is a movable fallback, it is pretty much guaranteed to affect an unmovable/reclaimable pageblock and while it might not be enough to actually cause a unmovable/reclaimable fallback in the future, we cannot know that in advance so the patch takes the only option available to it. Hence, it's important to control them. This point is also consistent throughout the series and will not be repeated. 1-socket Skylake machine global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE) ----------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 291392 4.20-rc3+patch: 191187 (34% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Amean fault-base-1 1495.14 ( 0.00%) 1467.55 ( 1.85%) Amean fault-huge-1 1098.48 ( 0.00%) 1127.11 ( -2.61%) thpfioscale Percentage Faults Huge 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Percentage huge-1 78.57 ( 0.00%) 77.64 ( -1.18%) Fragmentation events were reduced quite a bit although this is known to be a little variable. The latencies and allocation success rates are similar but they were already quite high. 2-socket Haswell machine config-global-dhp__workload_thpfioscale XFS (no special madvise) 4 fio threads, 5 THP allocating threads ---------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 215698 4.20-rc3+patch: 200210 (7% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Amean fault-base-5 1350.05 ( 0.00%) 1346.45 ( 0.27%) Amean fault-huge-5 4181.01 ( 0.00%) 3418.60 ( 18.24%) 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Percentage huge-5 1.15 ( 0.00%) 0.78 ( -31.88%) The reduction of external fragmentation events is slight and this is partially due to the removal of __GFP_THISNODE in commit ac5b2c18911f ("mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings") as THP allocations can now spill over to remote nodes instead of fragmenting local memory. 2-socket Haswell machine global-dhp__workload_thpfioscale-madvhugepage-xfs (MADV_HUGEPAGE) ----------------------------------------------------------------- 4.20-rc3 extfrag events < order 9: 166352 4.20-rc3+patch: 147463 (11% reduction) thpfioscale Fault Latencies 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Amean fault-base-5 6138.97 ( 0.00%) 6217.43 ( -1.28%) Amean fault-huge-5 2294.28 ( 0.00%) 3163.33 * -37.88%* thpfioscale Percentage Faults Huge 4.20.0-rc3 4.20.0-rc3 vanilla lowzone-v5r8 Percentage huge-5 96.82 ( 0.00%) 95.14 ( -1.74%) There was a slight reduction in external fragmentation events although the latencies were higher. The allocation success rate is high enough that the system is struggling and there is quite a lot of parallel reclaim and compaction activity. There is also a certain degree of luck on whether processes start on node 0 or not for this patch but the relevance is reduced later in the series. Overall, the patch reduces the number of external fragmentation causing events so the success of THP over long periods of time would be improved for this adverse workload. Link: http://lkml.kernel.org/r/20181123114528.28802-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: David Rientjes Cc: Andrea Arcangeli Cc: Zi Yan Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f29d8e9c0191a2a02500945db505e5c89159c3f4 Author: David Hildenbrand Date: Fri Dec 28 00:35:36 2018 -0800 mm/memory_hotplug: drop "online" parameter from add_memory_resource() Userspace should always be in charge of how to online memory and if memory should be onlined automatically in the kernel. Let's drop the parameter to overwrite this - XEN passes memhp_auto_online, just like add_memory(), so we can directly use that instead internally. Link: http://lkml.kernel.org/r/20181123123740.27652-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Stefano Stabellini Cc: Dan Williams Cc: Pavel Tatashin Cc: David Hildenbrand Cc: Joonsoo Kim Cc: Arun KS Cc: Mathieu Malaterre Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b6fd6ffb27c2efa003c6d4d15ca72c054b71d7c Author: Wei Yang Date: Fri Dec 28 00:35:33 2018 -0800 drivers/base/memory.c: remove an unnecessary check on NR_MEM_SECTIONS In cb5e39b8038b ("drivers: base: refactor add_memory_section() to add_memory_block()"), add_memory_block() is introduced, which is only invoked in memory_dev_init(). When combining these two loops in memory_dev_init() and add_memory_block(), they looks like this: for (i = 0; i < NR_MEM_SECTIONS; i += sections_per_block) for (j = i; (j < i + sections_per_block) && j < NR_MEM_SECTIONS; j++) Since it is sure the (i < NR_MEM_SECTIONS) and j sits in its own memory block, the check of (j < NR_MEM_SECTIONS) is not necessary. This patch just removes this check. Link: http://lkml.kernel.org/r/20181123222811.18216-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d72868c8f7c293fc8408a54db4e0a12dc031152 Author: Mike Rapoport Date: Fri Dec 28 00:35:29 2018 -0800 memblock: replace usage of __memblock_free_early() with memblock_free() __memblock_free_early() is only used by the convenience wrappers, so essentially we wrap a call to memblock_free() twice. Replace calls of __memblock_free_early() with calls to memblock_free() and drop the former. Link: http://lkml.kernel.org/r/20181125102940.GE28634@rapoport-lnx Signed-off-by: Mike Rapoport Reviewed-by: Andrew Morton Cc: Wentao Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d31cfe7bff9109476da92c245b56083e9b48d60a Author: Wentao Wang Date: Fri Dec 28 00:35:26 2018 -0800 mm/page_alloc.c: deduplicate __memblock_free_early() and memblock_free() Link: http://lkml.kernel.org/r/C8ECE1B7A767434691FEEFA3A01765D72AFB8E78@MX203CL03.corp.emc.com Signed-off-by: Wentao Wang Reviewed-by: Andrew Morton Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 742aa7fb52c56fb3b307e704f93e67b698959cc2 Author: Aaron Lu Date: Fri Dec 28 00:35:22 2018 -0800 mm/page_alloc.c: use a single function to free page There are multiple places of freeing a page, they all do the same things so a common function can be used to reduce code duplicate. It also avoids bug fixed in one function but left in another. Link: http://lkml.kernel.org/r/20181119134834.17765-3-aaron.lu@intel.com Signed-off-by: Aaron Lu Acked-by: Vlastimil Babka Cc: Alexander Duyck Cc: Ilias Apalodimas Cc: Jesper Dangaard Brouer Cc: Mel Gorman Cc: Pankaj gupta Cc: Pawel Staszewski Cc: Tariq Toukan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65895b67ad27df0f62bfaf82dd5622f95ea29196 Author: Aaron Lu Date: Fri Dec 28 00:35:18 2018 -0800 mm/page_alloc.c: free order-0 pages through PCP in page_frag_free() page_frag_free() calls __free_pages_ok() to free the page back to Buddy. This is OK for high order page, but for order-0 pages, it misses the optimization opportunity of using Per-Cpu-Pages and can cause zone lock contention when called frequently. Pawel Staszewski recently shared his result of 'how Linux kernel handles normal traffic'[1] and from perf data, Jesper Dangaard Brouer found the lock contention comes from page allocator: mlx5e_poll_tx_cq | --16.34%--napi_consume_skb | |--12.65%--__free_pages_ok | | | --11.86%--free_one_page | | | |--10.10%--queued_spin_lock_slowpath | | | --0.65%--_raw_spin_lock | |--1.55%--page_frag_free | --1.44%--skb_release_data Jesper explained how it happened: mlx5 driver RX-page recycle mechanism is not effective in this workload and pages have to go through the page allocator. The lock contention happens during mlx5 DMA TX completion cycle. And the page allocator cannot keep up at these speeds.[2] I thought that __free_pages_ok() are mostly freeing high order pages and thought this is an lock contention for high order pages but Jesper explained in detail that __free_pages_ok() here are actually freeing order-0 pages because mlx5 is using order-0 pages to satisfy its page pool allocation request.[3] The free path as pointed out by Jesper is: skb_free_head() -> skb_free_frag() -> page_frag_free() And the pages being freed on this path are order-0 pages. Fix this by doing similar things as in __page_frag_cache_drain() - send the being freed page to PCP if it's an order-0 page, or directly to Buddy if it is a high order page. With this change, Paweł hasn't noticed lock contention yet in his workload and Jesper has noticed a 7% performance improvement using a micro benchmark and lock contention is gone. Ilias' test on a 'low' speed 1Gbit interface on an cortex-a53 shows ~11% performance boost testing with 64byte packets and __free_pages_ok() disappeared from perf top. [1]: https://www.spinics.net/lists/netdev/msg531362.html [2]: https://www.spinics.net/lists/netdev/msg531421.html [3]: https://www.spinics.net/lists/netdev/msg531556.html [akpm@linux-foundation.org: add comment] Link: http://lkml.kernel.org/r/20181120014544.GB10657@intel.com Signed-off-by: Aaron Lu Reported-by: Pawel Staszewski Analysed-by: Jesper Dangaard Brouer Acked-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Tested-by: Ilias Apalodimas Acked-by: Alexander Duyck Acked-by: Tariq Toukan Acked-by: Pankaj gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02917e9f8676207a4c577d4d94eae12bf348e9d7 Author: Dan Williams Date: Fri Dec 28 00:35:15 2018 -0800 mm, hmm: mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL At Maintainer Summit, Greg brought up a topic I proposed around EXPORT_SYMBOL_GPL usage. The motivation was considerations for when EXPORT_SYMBOL_GPL is warranted and the criteria for taking the exceptional step of reclassifying an existing export. Specifically, I wanted to make the case that although the line is fuzzy and hard to specify in abstract terms, it is nonetheless clear that devm_memremap_pages() and HMM (Heterogeneous Memory Management) have crossed it. The devm_memremap_pages() facility should have been EXPORT_SYMBOL_GPL from the beginning, and HMM as a derivative of that functionality should have naturally picked up that designation as well. Contrary to typical rules, the HMM infrastructure was merged upstream with zero in-tree consumers. There was a promise at the time that those users would be merged "soon", but it has been over a year with no drivers arriving. While the Nouveau driver is about to belatedly make good on that promise it is clear that HMM was targeted first and foremost at an out-of-tree consumer. HMM is derived from devm_memremap_pages(), a facility Christoph and I spearheaded to support persistent memory. It combines a device lifetime model with a dynamically created 'struct page' / memmap array for any physical address range. It enables coordination and control of the many code paths in the kernel built to interact with memory via 'struct page' objects. With HMM the integration goes even deeper by allowing device drivers to hook and manipulate page fault and page free events. One interpretation of when EXPORT_SYMBOL is suitable is when it is exporting stable and generic leaf functionality. The devm_memremap_pages() facility continues to see expanding use cases, peer-to-peer DMA being the most recent, with no clear end date when it will stop attracting reworks and semantic changes. It is not suitable to export devm_memremap_pages() as a stable 3rd party driver API due to the fact that it is still changing and manipulates core behavior. Moreover, it is not in the best interest of the long term development of the core memory management subsystem to permit any external driver to effectively define its own system-wide memory management policies with no encouragement to engage with upstream. I am also concerned that HMM was designed in a way to minimize further engagement with the core-MM. That, with these hooks in place, device-drivers are free to implement their own policies without much consideration for whether and how the core-MM could grow to meet that need. Going forward not only should HMM be EXPORT_SYMBOL_GPL, but the core-MM should be allowed the opportunity and stimulus to change and address these new use cases as first class functionality. Original changelog: hmm_devmem_add(), and hmm_devmem_add_resource() duplicated devm_memremap_pages() and are now simple now wrappers around the core facility to inject a dev_pagemap instance into the global pgmap_radix and hook page-idle events. The devm_memremap_pages() interface is base infrastructure for HMM. HMM has more and deeper ties into the kernel memory management implementation than base ZONE_DEVICE which is itself a EXPORT_SYMBOL_GPL facility. Originally, the HMM page structure creation routines copied the devm_memremap_pages() code and reused ZONE_DEVICE. A cleanup to unify the implementations was discussed during the initial review: http://lkml.iu.edu/hypermail/linux/kernel/1701.2/00812.html Recent work to extend devm_memremap_pages() for the peer-to-peer-DMA facility enabled this cleanup to move forward. In addition to the integration with devm_memremap_pages() HMM depends on other GPL-only symbols: mmu_notifier_unregister_no_release percpu_ref region_intersects __class_create It goes further to consume / indirectly expose functionality that is not exported to any other driver: alloc_pages_vma walk_page_range HMM is derived from devm_memremap_pages(), and extends deep core-kernel fundamentals. Similar to devm_memremap_pages(), mark its entry points EXPORT_SYMBOL_GPL(). [logang@deltatee.com: PCI/P2PDMA: match interface changes to devm_memremap_pages()] Link: http://lkml.kernel.org/r/20181130225911.2900-1-logang@deltatee.com Link: http://lkml.kernel.org/r/154275560565.76910.15919297436557795278.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Cc: Logan Gunthorpe Cc: "Jérôme Glisse" Cc: Balbir Singh , Cc: Michal Hocko Cc: Benjamin Herrenschmidt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbecd94e6c514a1559fc1a7749a62715958137b1 Author: Dan Williams Date: Fri Dec 28 00:35:11 2018 -0800 mm, hmm: replace hmm_devmem_pages_create() with devm_memremap_pages() Commit e8d513483300 ("memremap: change devm_memremap_pages interface to use struct dev_pagemap") refactored devm_memremap_pages() to allow a dev_pagemap instance to be supplied. Passing in a dev_pagemap interface simplifies the design of pgmap type drivers in that they can rely on container_of() to lookup any private data associated with the given dev_pagemap instance. In addition to the cleanups this also gives hmm users multi-order-radix improvements that arrived with commit ab1b597ee0e4 "mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups" As part of the conversion to the devm_memremap_pages() method of handling the percpu_ref relative to when pages are put, the percpu_ref completion needs to move to hmm_devmem_ref_exit(). See 71389703839e ("mm, zone_device: Replace {get, put}_zone_device_page...") for details. Link: http://lkml.kernel.org/r/154275560053.76910.10870962637383152392.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Reviewed-by: Jérôme Glisse Acked-by: Balbir Singh Cc: Logan Gunthorpe Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 58ef15b765af0d2cbe6799ec564f1dc485010ab8 Author: Dan Williams Date: Fri Dec 28 00:35:07 2018 -0800 mm, hmm: use devm semantics for hmm_devmem_{add, remove} devm semantics arrange for resources to be torn down when device-driver-probe fails or when device-driver-release completes. Similar to devm_memremap_pages() there is no need to support an explicit remove operation when the users properly adhere to devm semantics. Note that devm_kzalloc() automatically handles allocating node-local memory. Link: http://lkml.kernel.org/r/154275559545.76910.9186690723515469051.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Reviewed-by: Jérôme Glisse Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Cc: Balbir Singh Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69324b8f48339de2f90fdf2f774687fc6c47629a Author: Dan Williams Date: Fri Dec 28 00:35:01 2018 -0800 mm, devm_memremap_pages: add MEMORY_DEVICE_PRIVATE support In preparation for consolidating all ZONE_DEVICE enabling via devm_memremap_pages(), teach it how to handle the constraints of MEMORY_DEVICE_PRIVATE ranges. [jglisse@redhat.com: call move_pfn_range_to_zone for MEMORY_DEVICE_PRIVATE] Link: http://lkml.kernel.org/r/154275559036.76910.12434636179931292607.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Jérôme Glisse Acked-by: Christoph Hellwig Reported-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Cc: Balbir Singh Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a95c90f1e2c253b280385ecf3d4ebfe476926b28 Author: Dan Williams Date: Fri Dec 28 00:34:57 2018 -0800 mm, devm_memremap_pages: fix shutdown handling The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on the fact that the percpu_ref it is using is killed by the time the devm_memremap_pages_release() is run. Rather than continue this awkward situation, offload the responsibility of killing the percpu_ref to devm_memremap_pages_release() directly. This allows devm_memremap_pages() to do the right thing relative to init failures and shutdown. Without this change we could fail to register the teardown of devm_memremap_pages(). The likelihood of hitting this failure is tiny as small memory allocations almost always succeed. However, the impact of the failure is large given any future reconfiguration, or disable/enable, of an nvdimm namespace will fail forever as subsequent calls to devm_memremap_pages() will fail to setup the pgmap_radix since there will be stale entries for the physical address range. An argument could be made to require that the ->kill() operation be set in the @pgmap arg rather than passed in separately. However, it helps code readability, tracking the lifetime of a given instance, to be able to grep the kill routine directly at the devm_memremap_pages() call site. Link: http://lkml.kernel.org/r/154275558526.76910.7535251937849268605.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Fixes: e8d513483300 ("memremap: change devm_memremap_pages interface...") Reviewed-by: "Jérôme Glisse" Reported-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Cc: Balbir Singh Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06489cfbd915ff36c8e36df27f1c2dc60f97ca56 Author: Dan Williams Date: Fri Dec 28 00:34:54 2018 -0800 mm, devm_memremap_pages: kill mapping "System RAM" support Given the fact that devm_memremap_pages() requires a percpu_ref that is torn down by devm_memremap_pages_release() the current support for mapping RAM is broken. Support for remapping "System RAM" has been broken since the beginning and there is no existing user of this this code path, so just kill the support and make it an explicit error. This cleanup also simplifies a follow-on patch to fix the error path when setting a devm release action for devm_memremap_pages_release() fails. Link: http://lkml.kernel.org/r/154275557997.76910.14689813630968180480.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: "Jérôme Glisse" Reviewed-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Cc: Balbir Singh Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 808153e1187fa77ac7d7dad261ff476888dcf398 Author: Dan Williams Date: Fri Dec 28 00:34:50 2018 -0800 mm, devm_memremap_pages: mark devm_memremap_pages() EXPORT_SYMBOL_GPL devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. Specifically the facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument deep into the architecture specific vmemmap implementation to allow allocating from specific reserved pages, and it has Linux specific assumptions about page structure reference counting relative to get_user_pages() and get_user_pages_fast(). It was an oversight and a mistake that this was not marked EXPORT_SYMBOL_GPL from the outset. Again, devm_memremap_pagex() exposes and relies upon core kernel internal assumptions and will continue to evolve along with 'struct page', memory hotplug, and support for new memory types / topologies. Only an in-kernel GPL-only driver is expected to keep up with this ongoing evolution. This interface, and functionality derived from this interface, is not suitable for kernel-external drivers. Link: http://lkml.kernel.org/r/154275557457.76910.16923571232582744134.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Acked-by: Michal Hocko Cc: "Jérôme Glisse" Cc: Balbir Singh Cc: Logan Gunthorpe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ead3342150ef253b3635385b0f5721e80c87fce Author: Huang Shijie Date: Fri Dec 28 00:34:46 2018 -0800 mm/page_alloc.c: change the order of MIGRATE_RECLAIMABLE/MIGRATE_MOVABLE in fallbacks In the enum migratetype definition, MIGRATE_MOVABLE is before MIGRATE_RECLAIMABLE. Change the order of them to match the enumeration's order. Link: http://lkml.kernel.org/r/20181121085821.3442-1-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca880420665dbc8beec3693bee9f5eccb89de4a6 Author: Eric Biggers Date: Fri Dec 28 00:34:43 2018 -0800 userfaultfd: convert userfaultfd_ctx::refcount to refcount_t Reference counters should use refcount_t rather than atomic_t, since the refcount_t implementation can prevent overflows, reducing the exploitability of reference leak bugs. userfaultfd_ctx::refcount is a reference counter with the usual semantics, so convert it to refcount_t. Note: I replaced the BUG() on incrementing a 0 refcount with just refcount_inc(), since part of the semantics of refcount_t is that that incrementing a 0 refcount is not allowed; with CONFIG_REFCOUNT_FULL, refcount_inc() already checks for it and warns. Link: http://lkml.kernel.org/r/20181115003916.63381-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66f71da9dd38af17dc17209cdde7987d4679a699 Author: Aaron Lu Date: Fri Dec 28 00:34:39 2018 -0800 mm/swap: use nr_node_ids for avail_lists in swap_info_struct Since a2468cc9bfdf ("swap: choose swap device according to numa node"), avail_lists field of swap_info_struct is changed to an array with MAX_NUMNODES elements. This made swap_info_struct size increased to 40KiB and needs an order-4 page to hold it. This is not optimal in that: 1 Most systems have way less than MAX_NUMNODES(1024) nodes so it is a waste of memory; 2 It could cause swapon failure if the swap device is swapped on after system has been running for a while, due to no order-4 page is available as pointed out by Vasily Averin. Solve the above two issues by using nr_node_ids(which is the actual possible node number the running system has) for avail_lists instead of MAX_NUMNODES. nr_node_ids is unknown at compile time so can't be directly used when declaring this array. What I did here is to declare avail_lists as zero element array and allocate space for it when allocating space for swap_info_struct. The reason why keep using array but not pointer is plist_for_each_entry needs the field to be part of the struct, so pointer will not work. This patch is on top of Vasily Averin's fix commit. I think the use of kvzalloc for swap_info_struct is still needed in case nr_node_ids is really big on some systems. Link: http://lkml.kernel.org/r/20181115083847.GA11129@intel.com Signed-off-by: Aaron Lu Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Vasily Averin Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b09549c2bfd9f3f8f4cdad74107ef4f4ff9cdd7 Author: Wei Yang Date: Fri Dec 28 00:34:36 2018 -0800 vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Commit fa5e084e43eb ("vmscan: do not unconditionally treat zones that fail zone_reclaim() as full") changed the return value of node_reclaim(). The original return value 0 means NODE_RECLAIM_SOME after this commit. While the return value of node_reclaim() when CONFIG_NUMA is n is not changed. This will leads to call zone_watermark_ok() again. This patch fixes the return value by adjusting to NODE_RECLAIM_NOSCAN. Since node_reclaim() is only called in page_alloc.c, move it to mm/internal.h. Link: http://lkml.kernel.org/r/20181113080436.22078-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Matthew Wilcox Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 476567e8735a0d06225f3873a86dfa0efd95f3a5 Author: Arun KS Date: Fri Dec 28 00:34:32 2018 -0800 mm: remove managed_page_count_lock spinlock Now that totalram_pages and managed_pages are atomic varibles, no need of managed_page_count spinlock. The lock had really a weak consistency guarantee. It hasn't been used for anything but the update but no reader actually cares about all the values being updated to be in sync. Link: http://lkml.kernel.org/r/1542090790-21750-5-git-send-email-arunks@codeaurora.org Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Hildenbrand Reviewed-by: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca79b0c211af63fa3276f0e3fd7dd9ada2439839 Author: Arun KS Date: Fri Dec 28 00:34:29 2018 -0800 mm: convert totalram_pages and totalhigh_pages variables to atomic totalram_pages and totalhigh_pages are made static inline function. Main motivation was that managed_page_count_lock handling was complicating things. It was discussed in length here, https://lore.kernel.org/patchwork/patch/995739/#1181785 So it seemes better to remove the lock and convert variables to atomic, with preventing poteintial store-to-read tearing as a bonus. [akpm@linux-foundation.org: coding style fixes] Link: http://lkml.kernel.org/r/1542090790-21750-4-git-send-email-arunks@codeaurora.org Signed-off-by: Arun KS Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Reviewed-by: Konstantin Khlebnikov Reviewed-by: Pavel Tatashin Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9705bea5f833f4fc21d5bef5fce7348427f76ea4 Author: Arun KS Date: Fri Dec 28 00:34:24 2018 -0800 mm: convert zone->managed_pages to atomic variable totalram_pages, zone->managed_pages and totalhigh_pages updates are protected by managed_page_count_lock, but readers never care about it. Convert these variables to atomic to avoid readers potentially seeing a store tear. This patch converts zone->managed_pages. Subsequent patches will convert totalram_panges, totalhigh_pages and eventually managed_page_count_lock will be removed. Main motivation was that managed_page_count_lock handling was complicating things. It was discussed in length here, https://lore.kernel.org/patchwork/patch/995739/#1181785 So it seemes better to remove the lock and convert variables to atomic, with preventing poteintial store-to-read tearing as a bonus. Link: http://lkml.kernel.org/r/1542090790-21750-3-git-send-email-arunks@codeaurora.org Signed-off-by: Arun KS Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Reviewed-by: Konstantin Khlebnikov Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Vlastimil Babka Reviewed-by: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d6357de8aa09e1966770dc1171c72679946464f Author: Arun KS Date: Fri Dec 28 00:34:20 2018 -0800 mm: reference totalram_pages and managed_pages once per function Patch series "mm: convert totalram_pages, totalhigh_pages and managed pages to atomic", v5. This series converts totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. totalram_pages, zone->managed_pages and totalhigh_pages updates are protected by managed_page_count_lock, but readers never care about it. Convert these variables to atomic to avoid readers potentially seeing a store tear. Main motivation was that managed_page_count_lock handling was complicating things. It was discussed in length here, https://lore.kernel.org/patchwork/patch/995739/#1181785 It seemes better to remove the lock and convert variables to atomic. With the change, preventing poteintial store-to-read tearing comes as a bonus. This patch (of 4): This is in preparation to a later patch which converts totalram_pages and zone->managed_pages to atomic variables. Please note that re-reading the value might lead to a different value and as such it could lead to unexpected behavior. There are no known bugs as a result of the current code but it is better to prevent from them in principle. Link: http://lkml.kernel.org/r/1542090790-21750-2-git-send-email-arunks@codeaurora.org Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Vlastimil Babka Reviewed-by: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fecd4a50baaebf6bde7f9e0b88fef13ffe5d98a1 Author: Wei Yang Date: Fri Dec 28 00:34:16 2018 -0800 mm: remove reset of pcp->counter in pageset_init() per_cpu_pageset is cleared by memset, it is not necessary to reset it again. Link: http://lkml.kernel.org/r/20181021023920.5501-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46a3679b8190101e4ebdfe252ef79e6150a4f2ac Author: Michal Hocko Date: Fri Dec 28 00:34:13 2018 -0800 mm, memory_hotplug: do not clear numa_node association after hot_remove Per-cpu numa_node provides a default node for each possible cpu. The association gets initialized during the boot when the architecture specific code explores cpu->NUMA affinity. When the whole NUMA node is removed though we are clearing this association try_offline_node check_and_unmap_cpu_on_node unmap_cpu_on_node numa_clear_node numa_set_node(cpu, NUMA_NO_NODE) This means that whoever calls cpu_to_node for a cpu associated with such a node will get NUMA_NO_NODE. This is problematic for two reasons. First it is fragile because __alloc_pages_node would simply blow up on an out-of-bound access. We have encountered this when loading kvm module BUG: unable to handle kernel paging request at 00000000000021c0 IP: __alloc_pages_nodemask+0x93/0xb70 PGD 800000ffe853e067 PUD 7336bbc067 PMD 0 Oops: 0000 [#1] SMP [...] CPU: 88 PID: 1223749 Comm: modprobe Tainted: G W 4.4.156-94.64-default #1 RIP: __alloc_pages_nodemask+0x93/0xb70 RSP: 0018:ffff887354493b40 EFLAGS: 00010202 RAX: 00000000000021c0 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 00000000014000c0 RBP: 00000000014000c0 R08: ffffffffffffffff R09: 0000000000000000 R10: ffff88fffc89e790 R11: 0000000000014000 R12: 0000000000000101 R13: ffffffffa0772cd4 R14: ffffffffa0769ac0 R15: 0000000000000000 FS: 00007fdf2f2f1700(0000) GS:ffff88fffc880000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000021c0 CR3: 00000077205ee000 CR4: 0000000000360670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: alloc_vmcs_cpu+0x3d/0x90 [kvm_intel] hardware_setup+0x781/0x849 [kvm_intel] kvm_arch_hardware_setup+0x28/0x190 [kvm] kvm_init+0x7c/0x2d0 [kvm] vmx_init+0x1e/0x32c [kvm_intel] do_one_initcall+0xca/0x1f0 do_init_module+0x5a/0x1d7 load_module+0x1393/0x1c90 SYSC_finit_module+0x70/0xa0 entry_SYSCALL_64_fastpath+0x1e/0xb7 DWARF2 unwinder stuck at entry_SYSCALL_64_fastpath+0x1e/0xb7 on an older kernel but the code is basically the same in the current Linus tree as well. alloc_vmcs_cpu could use alloc_pages_nodemask which would recognize NUMA_NO_NODE and use alloc_pages_node which would translate it to numa_mem_id but that is wrong as well because it would use a cpu affinity of the local CPU which might be quite far from the original node. It is also reasonable to expect that cpu_to_node will provide a sane value and there might be many more callers like that. The second problem is that __register_one_node relies on cpu_to_node to properly associate cpus back to the node when it is onlined. We do not want to lose that link as there is no arch independent way to get it from the early boot time AFAICS. Drop the whole check_and_unmap_cpu_on_node machinery and keep the association to fix both issues. The NODE_DATA(nid) is not deallocated so it will stay in place and if anybody wants to allocate from that node then a fallback node will be used. Thanks to Vlastimil Babka for his live system debugging skills that helped debugging the issue. Link: http://lkml.kernel.org/r/20181108100413.966-1-mhocko@kernel.org Fixes: e13fe8695c57 ("cpu-hotplug,memory-hotplug: clear cpu_to_node() when offlining the node") Signed-off-by: Michal Hocko Debugged-by: Vlastimil Babka Reported-by: Miroslav Benes Acked-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9cabf929e7d92139a7d1ef3e517ad57dfece4739 Author: Yangtao Li Date: Fri Dec 28 00:34:09 2018 -0800 mm/mmap.c: remove verify_mm_writelocked() We should get rid of this function. It no longer serves its purpose. This is a historical artifact from 2005 where do_brk was called outside of the core mm. We do have a proper abstraction in vm_brk_flags and that one does the locking properly so there is no need to use this function. Link: http://lkml.kernel.org/r/20181108174856.10811-1-tiny.windzz@gmail.com Signed-off-by: Yangtao Li Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Dan Williams Cc: Dominik Brodowski Cc: Dave Hansen Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 59e1a2f4bf83744e748636415fde7d1e9f557e05 Author: Timofey Titovets Date: Fri Dec 28 00:34:05 2018 -0800 ksm: replace jhash2 with xxhash Replace jhash2 with xxhash. Perf numbers: Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz ksm: crc32c hash() 12081 MB/s ksm: xxh64 hash() 8770 MB/s ksm: xxh32 hash() 4529 MB/s ksm: jhash2 hash() 1569 MB/s Sioh Lee did some testing: crc32c_intel: 1084.10ns crc32c (no hardware acceleration): 7012.51ns xxhash32: 2227.75ns xxhash64: 1413.16ns jhash2: 5128.30ns As jhash2 always will be slower (for data size like PAGE_SIZE). Don't use it in ksm at all. Use only xxhash for now, because for using crc32c, cryptoapi must be initialized first - that requires some tricky solution to work well in all situations. Link: http://lkml.kernel.org/r/20181023182554.23464-3-nefelim4ag@gmail.com Signed-off-by: Timofey Titovets Signed-off-by: leesioh Reviewed-by: Pavel Tatashin Reviewed-by: Mike Rapoport Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b9df58b79fa283fbedc0fb6a8e248599444bacc Author: Timofey Titovets Date: Fri Dec 28 00:34:00 2018 -0800 xxHash: create arch dependent 32/64-bit xxhash() Patch series "Currently used jhash are slow enough and replace it allow as to make KSM", v8. Apeed (in kernel): ksm: crc32c hash() 12081 MB/s ksm: xxh64 hash() 8770 MB/s ksm: xxh32 hash() 4529 MB/s ksm: jhash2 hash() 1569 MB/s Sioh Lee's testing (copy from other mail): Test platform: openstack cloud platform (NEWTON version) Experiment node: openstack based cloud compute node (CPU: xeon E5-2620 v3, memory 64gb) VM: (2 VCPU, RAM 4GB, DISK 20GB) * 4 Linux kernel: 4.14 (latest version) KSM setup - sleep_millisecs: 200ms, pages_to_scan: 200 Experiment process: Firstly, we turn off KSM and launch 4 VMs. Then we turn on the KSM and measure the checksum computation time until full_scans become two. The experimental results (the experimental value is the average of the measured values) crc32c_intel: 1084.10ns crc32c (no hardware acceleration): 7012.51ns xxhash32: 2227.75ns xxhash64: 1413.16ns jhash2: 5128.30ns In summary, the result shows that crc32c_intel has advantages over all of the hash function used in the experiment. (decreased by 84.54% compared to crc32c, 78.86% compared to jhash2, 51.33% xxhash32, 23.28% compared to xxhash64) the results are similar to those of Timofey. But, use only xxhash for now, because for using crc32c, cryptoapi must be initialized first - that require some tricky solution to work good in all situations. So: - First patch implement compile time pickup of fastest implementation of xxhash for target platform. - The second patch replaces jhash2 with xxhash This patch (of 2): xxh32() - fast on both 32/64-bit platforms xxh64() - fast only on 64-bit platform Create xxhash() which will pick up the fastest version at compile time. Link: http://lkml.kernel.org/r/20181023182554.23464-2-nefelim4ag@gmail.com Signed-off-by: Timofey Titovets Reviewed-by: Pavel Tatashin Reviewed-by: Mike Rapoport Reviewed-by: Andrew Morton Cc: Andrea Arcangeli Cc: leesioh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d381c54760dcfad23743da40516e7e003d73952a Author: Michal Hocko Date: Fri Dec 28 00:33:56 2018 -0800 mm: only report isolation failures when offlining memory Heiko has complained that his log is swamped by warnings from has_unmovable_pages [ 20.536664] page dumped because: has_unmovable_pages [ 20.536792] page:000003d081ff4080 count:1 mapcount:0 mapping:000000008ff88600 index:0x0 compound_mapcount: 0 [ 20.536794] flags: 0x3fffe0000010200(slab|head) [ 20.536795] raw: 03fffe0000010200 0000000000000100 0000000000000200 000000008ff88600 [ 20.536796] raw: 0000000000000000 0020004100000000 ffffffff00000001 0000000000000000 [ 20.536797] page dumped because: has_unmovable_pages [ 20.536814] page:000003d0823b0000 count:1 mapcount:0 mapping:0000000000000000 index:0x0 [ 20.536815] flags: 0x7fffe0000000000() [ 20.536817] raw: 07fffe0000000000 0000000000000100 0000000000000200 0000000000000000 [ 20.536818] raw: 0000000000000000 0000000000000000 ffffffff00000001 0000000000000000 which are not triggered by the memory hotplug but rather CMA allocator. The original idea behind dumping the page state for all call paths was that these messages will be helpful debugging failures. From the above it seems that this is not the case for the CMA path because we are lacking much more context. E.g the second reported page might be a CMA allocated page. It is still interesting to see a slab page in the CMA area but it is hard to tell whether this is bug from the above output alone. Address this issue by dumping the page state only on request. Both start_isolate_page_range and has_unmovable_pages already have an argument to ignore hwpoison pages so make this argument more generic and turn it into flags and allow callers to combine non-default modes into a mask. While we are at it, has_unmovable_pages call from is_pageblock_removable_nolock (sysfs removable file) is questionable to report the failure so drop it from there as well. Link: http://lkml.kernel.org/r/20181218092802.31429-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Heiko Carstens Reviewed-by: Oscar Salvador Cc: Anshuman Khandual Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2932c8b05056d4ba702f70f4deebe1c97600e62b Author: Michal Hocko Date: Fri Dec 28 00:33:53 2018 -0800 mm, memory_hotplug: be more verbose for memory offline failures There is only very limited information printed when the memory offlining fails: [ 1984.506184] rac1 kernel: memory offlining [mem 0x82600000000-0x8267fffffff] failed due to signal backoff This tells us that the failure is triggered by the userspace intervention but it doesn't tell us much more about the underlying reason. It might be that the page migration failes repeatedly and the userspace timeout expires and send a signal or it might be some of the earlier steps (isolation, memory notifier) takes too long. If the migration failes then it would be really helpful to see which page that and its state. The same applies to the isolation phase. If we fail to isolate a page from the allocator then knowing the state of the page would be helpful as well. Dump the page state that fails to get isolated or migrated. This will tell us more about the failure and what to focus on during debugging. [akpm@linux-foundation.org: add missing printk arg] [mhocko@suse.com: tweak dump_page() `reason' text] Link: http://lkml.kernel.org/r/20181116083020.20260-6-mhocko@kernel.org Link: http://lkml.kernel.org/r/20181107101830.17405-6-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Oscar Salvador Reviewed-by: Anshuman Khandual Cc: Baoquan He Cc: Oscar Salvador Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7960509329c24a2bf0bc4929636614a1b7bb4443 Author: Michal Hocko Date: Fri Dec 28 00:33:49 2018 -0800 mm, memory_hotplug: print reason for the offlining failure The memory offlining failure reporting is inconsistent and insufficient. Some error paths simply do not report the failure to the log at all. When we do report there are no details about the reason of the failure and there are several of them which makes memory offlining failures hard to debug. Make sure that the memory offlining [mem %#010llx-%#010llx] failed message is printed for all failures and also provide a short textual reason for the failure e.g. [ 1984.506184] rac1 kernel: memory offlining [mem 0x82600000000-0x8267fffffff] failed due to signal backoff this tells us that the offlining has failed because of a signal pending aka user intervention. [akpm@linux-foundation.org: tweak messages a bit] Link: http://lkml.kernel.org/r/20181107101830.17405-5-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Oscar Salvador Reviewed-by: Anshuman Khandual Cc: Baoquan He Cc: Oscar Salvador Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cc2baf600eca841549e182b471d5c7b8c4143c3 Author: Michal Hocko Date: Fri Dec 28 00:33:45 2018 -0800 mm, memory_hotplug: drop pointless block alignment checks from __offline_pages This function is never called from a context which would provide misaligned pfn range so drop the pointless check. Link: http://lkml.kernel.org/r/20181107101830.17405-4-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Oscar Salvador Reviewed-by: Anshuman Khandual Cc: Baoquan He Cc: Oscar Salvador Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0392cf7c53a2c03dbda93de4073c78609b88c51 Author: Michal Hocko Date: Fri Dec 28 00:33:42 2018 -0800 mm: lower the printk loglevel for __dump_page messages __dump_page messages use KERN_EMERG resp. KERN_ALERT loglevel (this is the case since 2004). Most callers of this function are really detecting a critical page state and BUG right after. On the other hand the function is called also from contexts which just want to inform about the page state and those would rather not disrupt logs that much (e.g. some systems route these messages to the normal console). Reduce the loglevel to KERN_WARNING to make dump_page easier to reuse for other contexts while those messages will still make it to the kernel log in most setups. Even if the loglevel setup filters warnings away those paths that are really critical already print the more targeted error or panic and that should make it to the kernel log. [mhocko@kernel.org: fix __dump_page()] Link: http://lkml.kernel.org/r/20181212142540.GA7378@dhcp22.suse.cz [akpm@linux-foundation.org: s/KERN_WARN/KERN_WARNING/, per Michal] Link: http://lkml.kernel.org/r/20181107101830.17405-3-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Baoquan He Cc: Oscar Salvador Cc: Oscar Salvador Cc: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c6fb1d89e73cd3bbfae7c400f1c615272aa435f Author: Michal Hocko Date: Fri Dec 28 00:33:38 2018 -0800 mm: print more information about mapping in __dump_page I have been promissing to improve memory offlining failures debugging for quite some time. As things stand now we get only very limited information in the kernel log when the offlining fails. It is usually only [ 1984.506184] rac1 kernel: memory offlining [mem 0x82600000000-0x8267fffffff] failed with no further details. We do not know what exactly fails and for what reason. Whenever I was forced to debug such a failure I've always had to do a debugging patch to tell me more. We can enable some tracepoints but it would be much better to get a better picture without using them. This patch series does 2 things. The first one is to make dump_page more usable by printing more information about the mapping patch 1. Then it reduces the log level from emerg to warning so that this function is usable from less critical context patch 2. Then I have added more detailed information about the offlining failure patch 4 and finally add dump_page to isolation and offlining migration paths. Patch 3 is a trivial cleanup. This patch (of 6): __dump_page prints the mapping pointer but that is quite unhelpful for many reports because the pointer itself only helps to distinguish anon/ksm mappings from other ones (because of lowest bits set). Sometimes it would be much more helpful to know what kind of mapping that is actually and if we know this is a file mapping then also try to resolve the dentry name. [dan.carpenter@oracle.com: fix a width vs precision bug in printk] Link: http://lkml.kernel.org/r/20181123072135.gqvblm2vdujbvfjs@kili.mountain [mhocko@kernel.org: use %dp to print dentry] Link: http://lkml.kernel.org/r/20181125080834.GB12455@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20181107101830.17405-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Andrew Morton Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Cc: Oscar Salvador Cc: Baoquan He Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20ff1c950500380c6f74ec1a0d6f4eafab673ef6 Author: Gao Xiang Date: Fri Dec 28 00:33:34 2018 -0800 mm/readahead.c: simplify get_next_ra_size() It's a trivial simplification for get_next_ra_size() and clear enough for humans to understand. It also fixes potential overflow if ra->size(< ra_pages) is too large. Link: http://lkml.kernel.org/r/1540707206-19649-1-git-send-email-hsiangkao@aol.com Signed-off-by: Gao Xiang Reviewed-by: Fengguang Wu Reviewed-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 368686a95e55fd66b88542b5b23d802a4886b1aa Author: Anders Roxell Date: Fri Dec 28 00:33:31 2018 -0800 writeback: don't decrement wb->refcnt if !wb->bdi This happened while running in qemu-system-aarch64, the AMBA PL011 UART driver when enabling CONFIG_DEBUG_TEST_DRIVER_REMOVE. arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init), devtmpfs' handle_remove() crashes because the reference count is a NULL pointer only because wb->bdi hasn't been initialized yet. Rework so that wb_put have an extra check if wb->bdi before decrement wb->refcnt and also add a WARN_ON_ONCE to get a warning if it happens again in other drivers. Link: http://lkml.kernel.org/r/20181030113545.30999-2-anders.roxell@linaro.org Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks") Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell Co-developed-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a90a83f1d1957647581ca48caa1f7cc4fa44f8d Author: Sean Christopherson Date: Fri Dec 28 00:33:28 2018 -0800 mm/mmu_notifier.c: remove mmu_notifier_synchronize() Contrary to its name, mmu_notifier_synchronize() does not synchronize the notifier's SRCU instance, but rather waits for RCU callbacks to finish. i.e. it invokes rcu_barrier(). The RCU documentation is quite clear on this matter, explicitly calling out that rcu_barrier() does not imply synchronize_rcu(). As there are no callers of mmu_notifier_synchronize() and it's unclear whether any user of mmu_notifier_call_srcu() will ever want to barrier on their callbacks, simply remove the function. Link: http://lkml.kernel.org/r/20181106134705.14197-1-sean.j.christopherson@intel.com Signed-off-by: Sean Christopherson Reviewed-by: Andrew Morton Cc: Peter Zijlstra Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5eb570a8d9248e0c1358078a59916d0e337e695b Author: Balbir Singh Date: Fri Dec 28 00:33:24 2018 -0800 mm/hotplug: optimize clear_hwpoisoned_pages() In hot remove, we try to clear poisoned pages, but a small optimization to check if num_poisoned_pages is 0 helps remove the iteration through nr_pages. [akpm@linux-foundation.org: tweak comment text] Link: http://lkml.kernel.org/r/20181102120001.4526-1-bsingharora@gmail.com Signed-off-by: Balbir Singh Acked-by: Michal Hocko Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8f61cfc871fadfb73ad3eacd64fda457279e911 Author: Miles Chen Date: Fri Dec 28 00:33:21 2018 -0800 mm/page_owner: clamp read count to PAGE_SIZE The (root-only) page owner read might allocate a large size of memory with a large read count. Allocation fails can easily occur when doing high order allocations. Clamp buffer size to PAGE_SIZE to avoid arbitrary size allocation and avoid allocation fails due to high order allocation. [akpm@linux-foundation.org: use min_t()] Link: http://lkml.kernel.org/r/1541091607-27402-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Acked-by: Michal Hocko Cc: Joe Perches Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e45f712d82c6b7a37e02faf388173ad12ab464d Author: Vlastimil Babka Date: Fri Dec 28 00:33:17 2018 -0800 include/linux/slab.h: fix sparse warning in kmalloc_type() Multiple people have reported the following sparse warning: ./include/linux/slab.h:332:43: warning: dubious: x & !y The minimal fix would be to change the logical & to boolean &&, which emits the same code, but Andrew has suggested that the branch-avoiding tricks are maybe not worthwile. David Laight provided a nice comparison of disassembly of multiple variants, which shows that the current version produces a 4 deep dependency chain, and fixing the sparse warning by changing logical and to multiplication emits an IMUL, making it even more expensive. The code as rewritten by this patch yielded the best disassembly, with a single predictable branch for the most common case, and a ternary operator for the rest, which gcc seems to compile without a branch or cmov by itself. The result should be more readable, without a sparse warning and probably also faster for the common case. Link: http://lkml.kernel.org/r/80340595-d7c5-97b9-4f6c-23fa893a91e9@suse.cz Fixes: 1291523f2c1d ("mm, slab/slub: introduce kmalloc-reclaimable caches") Reviewed-by: Andrew Morton Signed-off-by: Vlastimil Babka Reported-by: Bart Van Assche Reported-by: Darryl T. Agostinelli Reported-by: Masahiro Yamada Suggested-by: Andrew Morton Suggested-by: David Laight Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88349a2837fbaef83862a011e1f53c4551d3e199 Author: Wei Yang Date: Fri Dec 28 00:33:13 2018 -0800 mm/slub.c: record final state of slub action in deactivate_slab() If __cmpxchg_double_slab() fails and (l != m), current code records transition states of slub action. Update the action after __cmpxchg_double_slab() success to record the final state. [akpm@linux-foundation.org: more whitespace cleanup] Link: http://lkml.kernel.org/r/20181107013119.3816-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6159d0f5c03e81daed29657e60383ee27f979b4a Author: Wei Yang Date: Fri Dec 28 00:33:09 2018 -0800 mm/slub.c: page is always non-NULL in node_match() node_match() is a static function and is only invoked in slub.c. In all three places, `page' is ensured to be valid. Link: http://lkml.kernel.org/r/20181106150245.1668-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1265ef2de4cef44cec91ba47009958eec6162836 Author: Wei Yang Date: Fri Dec 28 00:33:06 2018 -0800 mm/slub.c: remove validation on cpu_slab in __flush_cpu_slab() cpu_slab is a per cpu variable which is allocated in all or none. If a cpu_slab failed to be allocated, the slub is not usable. We could use cpu_slab without validation in __flush_cpu_slab(). Link: http://lkml.kernel.org/r/20181103141218.22844-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 221d7da66cd3435b28a0404f62168d25f57aca4e Author: Yangtao Li Date: Fri Dec 28 00:33:01 2018 -0800 mm, slab: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Also change WARN_ON() back to WARN_ON_ONCE() to avoid potentially spamming dmesg with user-triggerable large allocations. [akpm@linux-foundation.org: s/WARN_ON/WARN_ON_ONCE/, per Vlastimil] Link: http://lkml.kernel.org/r/20181104125028.3572-1-tiny.windzz@gmail.com Signed-off-by: Yangtao Li Acked-by: Vlastimil Babka Reviewed-by: Andrew Morton Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70306d9dce75abde855cefaf32b3f71eed8602a3 Author: Junxiao Bi Date: Fri Dec 28 00:32:57 2018 -0800 ocfs2: don't clear bh uptodate for block read For sync io read in ocfs2_read_blocks_sync(), first clear bh uptodate flag and submit the io, second wait io done, last check whether bh uptodate, if not return io error. If two sync io for the same bh were issued, it could be the first io done and set uptodate flag, but just before check that flag, the second io came in and cleared uptodate, then ocfs2_read_blocks_sync() for the first io will return IO error. Indeed it's not necessary to clear uptodate flag, as the io end handler end_buffer_read_sync() will set or clear it based on io succeed or failed. The following message was found from a nfs server but the underlying storage returned no error. [4106438.567376] (nfsd,7146,3):ocfs2_get_suballoc_slot_bit:2780 ERROR: read block 1238823695 failed -5 [4106438.567569] (nfsd,7146,3):ocfs2_get_suballoc_slot_bit:2812 ERROR: status = -5 [4106438.567611] (nfsd,7146,3):ocfs2_test_inode_bit:2894 ERROR: get alloc slot and bit failed -5 [4106438.567643] (nfsd,7146,3):ocfs2_test_inode_bit:2932 ERROR: status = -5 [4106438.567675] (nfsd,7146,3):ocfs2_get_dentry:94 ERROR: test inode bit failed -5 Same issue in non sync read ocfs2_read_blocks(), fixed it as well. Link: http://lkml.kernel.org/r/20181121020023.3034-4-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Reviewed-by: Changwei Ge Reviewed-by: Yiwen Jiang Cc: Joel Becker Cc: Joseph Qi Cc: Jun Piao Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d85400af790dba2aa294f0a77e712f166681f977 Author: Junxiao Bi Date: Fri Dec 28 00:32:53 2018 -0800 ocfs2: clear journal dirty flag after shutdown journal Dirty flag of the journal should be cleared at the last stage of umount, if do it before jbd2_journal_destroy(), then some metadata in uncommitted transaction could be lost due to io error, but as dirty flag of journal was already cleared, we can't find that until run a full fsck. This may cause system panic or other corruption. Link: http://lkml.kernel.org/r/20181121020023.3034-3-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Reviewed-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Jun Piao Cc: Changwei Ge Cc: Joel Becker Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 532e1e54c8140188e192348c790317921cb2dc1c Author: Junxiao Bi Date: Fri Dec 28 00:32:50 2018 -0800 ocfs2: fix panic due to unrecovered local alloc mount.ocfs2 ignore the inconsistent error that journal is clean but local alloc is unrecovered. After mount, local alloc not empty, then reserver cluster didn't alloc a new local alloc window, reserveration map is empty(ocfs2_reservation_map.m_bitmap_len = 0), that triggered the following panic. This issue was reported at https://oss.oracle.com/pipermail/ocfs2-devel/2015-May/010854.html and was advised to fixed during mount. But this is a very unusual inconsistent state, usually journal dirty flag should be cleared at the last stage of umount until every other things go right. We may need do further debug to check that. Any way to avoid possible futher corruption, mount should be abort and fsck should be run. (mount.ocfs2,1765,1):ocfs2_load_local_alloc:353 ERROR: Local alloc hasn't been recovered! found = 6518, set = 6518, taken = 8192, off = 15912372 ocfs2: Mounting device (202,64) on (node 0, slot 3) with ordered data mode. o2dlm: Joining domain 89CEAC63CC4F4D03AC185B44E0EE0F3F ( 0 1 2 3 4 5 6 8 ) 8 nodes ocfs2: Mounting device (202,80) on (node 0, slot 3) with ordered data mode. o2hb: Region 89CEAC63CC4F4D03AC185B44E0EE0F3F (xvdf) is now a quorum device o2net: Accepted connection from node yvwsoa17p (num 7) at 172.22.77.88:7777 o2dlm: Node 7 joins domain 64FE421C8C984E6D96ED12C55FEE2435 ( 0 1 2 3 4 5 6 7 8 ) 9 nodes o2dlm: Node 7 joins domain 89CEAC63CC4F4D03AC185B44E0EE0F3F ( 0 1 2 3 4 5 6 7 8 ) 9 nodes ------------[ cut here ]------------ kernel BUG at fs/ocfs2/reservations.c:507! invalid opcode: 0000 [#1] SMP Modules linked in: ocfs2 rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs fscache lockd grace ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue configfs sunrpc ipt_REJECT nf_reject_ipv4 nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 ovmapi ppdev parport_pc parport xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea acpi_cpufreq pcspkr i2c_piix4 i2c_core sg ext4 jbd2 mbcache2 sr_mod cdrom xen_blkfront pata_acpi ata_generic ata_piix floppy dm_mirror dm_region_hash dm_log dm_mod CPU: 0 PID: 4349 Comm: startWebLogic.s Not tainted 4.1.12-124.19.2.el6uek.x86_64 #2 Hardware name: Xen HVM domU, BIOS 4.4.4OVM 09/06/2018 task: ffff8803fb04e200 ti: ffff8800ea4d8000 task.ti: ffff8800ea4d8000 RIP: 0010:[] [] __ocfs2_resv_find_window+0x498/0x760 [ocfs2] Call Trace: ocfs2_resmap_resv_bits+0x10d/0x400 [ocfs2] ocfs2_claim_local_alloc_bits+0xd0/0x640 [ocfs2] __ocfs2_claim_clusters+0x178/0x360 [ocfs2] ocfs2_claim_clusters+0x1f/0x30 [ocfs2] ocfs2_convert_inline_data_to_extents+0x634/0xa60 [ocfs2] ocfs2_write_begin_nolock+0x1c6/0x1da0 [ocfs2] ocfs2_write_begin+0x13e/0x230 [ocfs2] generic_perform_write+0xbf/0x1c0 __generic_file_write_iter+0x19c/0x1d0 ocfs2_file_write_iter+0x589/0x1360 [ocfs2] __vfs_write+0xb8/0x110 vfs_write+0xa9/0x1b0 SyS_write+0x46/0xb0 system_call_fastpath+0x18/0xd7 Code: ff ff 8b 75 b8 39 75 b0 8b 45 c8 89 45 98 0f 84 e5 fe ff ff 45 8b 74 24 18 41 8b 54 24 1c e9 56 fc ff ff 85 c0 0f 85 48 ff ff ff <0f> 0b 48 8b 05 cf c3 de ff 48 ba 00 00 00 00 00 00 00 10 48 85 RIP __ocfs2_resv_find_window+0x498/0x760 [ocfs2] RSP ---[ end trace 566f07529f2edf3c ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: disabled Link: http://lkml.kernel.org/r/20181121020023.3034-2-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Reviewed-by: Yiwen Jiang Acked-by: Joseph Qi Cc: Jun Piao Cc: Mark Fasheh Cc: Joel Becker Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e6aea22802b5684c7e1d69822aeb0844dd01953 Author: Larry Chen Date: Fri Dec 28 00:32:46 2018 -0800 ocfs2: improve ocfs2 Makefile Included file path was hard-wired in the ocfs2 makefile, which might causes some confusion when compiling ocfs2 as an external module. Say if we compile ocfs2 module as following. cp -r /kernel/tree/fs/ocfs2 /other/dir/ocfs2 cd /other/dir/ocfs2 make -C /path/to/kernel_source M=`pwd` modules Acutally, the compiler wil try to find included file in /kernel/tree/fs/ocfs2, rather than the directory /other/dir/ocfs2. To fix this little bug, we introduce the var $(src) provided by kbuild. $(src) means the absolute path of the running kbuild file. Link: http://lkml.kernel.org/r/20181108085546.15149-1-lchen@suse.com Signed-off-by: Larry Chen Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dec5b0d4a99f5d4be02461ac0c7f62904509b88b Author: zhong jiang Date: Fri Dec 28 00:32:43 2018 -0800 ocfs2: remove set but not used variable 'lastzero' lastzero is not used after setting its value. It is safe to remove the unused variable. Link: http://lkml.kernel.org/r/1540296942-24533-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb6a8fd7a6bfa0999f726a9cdb506b3345d937b6 Author: zhong jiang Date: Fri Dec 28 00:32:39 2018 -0800 ocfs2: dlmfs: remove set but not used variable 'status' status is not used after setting its value. It is safe to remove the unused variable. Link: http://lkml.kernel.org/r/1540300179-26697-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang Reviewed-by: Jun Piao Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 874b1ef0ef5117c071f431fdebbf388eccbcc1f2 Author: Jia Guo Date: Fri Dec 28 00:32:35 2018 -0800 ocfs2: optimize the reading of heartbeat data Reading heartbeat data from lowest node rather than from zero, in cases where the node is not defined from zero, can reduce the number of sectors read. Here is a simple test data obtained with 'iostat -dmx dm-5 2', with two nodes in the cluster, node number 10, 20, respectively. Before optimization: Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util dm-5 0.00 0.00 0.50 0.50 0.01 0.00 11.00 0.00 1.00 1.00 1.00 1.50 0.15 After the optimization: Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util dm-5 0.00 0.00 0.50 0.50 0.00 0.00 6.00 0.00 0.50 1.00 0.00 0.50 0.05 Link: http://lkml.kernel.org/r/99fe4988-69ac-3615-a218-3042fe6fbe72@huawei.com Signed-off-by: Jia Guo Reviewed-by: Jun Piao Reviewed-by: Yiwen Jiang Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9ee3a63dbfff5237bc682b88c02d91a3c798e35 Author: Qian Cai Date: Fri Dec 28 00:32:32 2018 -0800 debugobjects: call debug_objects_mem_init eariler The current value of the early boot static pool size, 1024 is not big enough for systems with large number of CPUs with timer or/and workqueue objects selected. As the results, systems have 60+ CPUs with both timer and workqueue objects enabled could trigger "ODEBUG: Out of memory. ODEBUG disabled". Some debug objects are allocated during the early boot. Enabling some options like timers or workqueue objects may increase the size required significantly with large number of CPUs. For example, CONFIG_DEBUG_OBJECTS_TIMERS: No. CPUs x 2 (worker pool) objects: start_kernel workqueue_init_early init_worker_pool init_timer_key debug_object_init plus No. CPUs objects (CONFIG_HIGH_RES_TIMERS): sched_init hrtick_rq_init hrtimer_init CONFIG_DEBUG_OBJECTS_WORK: No. CPUs objects: vmalloc_init __init_work plus No. CPUs x 6 (workqueue) objects: workqueue_init_early alloc_workqueue __alloc_workqueue_key alloc_and_link_pwqs init_pwq Also, plus No. CPUs objects: perf_event_init __init_srcu_struct init_srcu_struct_fields init_srcu_struct_nodes __init_work However, none of the things are actually used or required before debug_objects_mem_init() is invoked, so just move the call right before vmalloc_init(). According to tglx, "the reason why the call is at this place in start_kernel() is historical. It's because back in the days when debugobjects were added the memory allocator was enabled way later than today." Link: http://lkml.kernel.org/r/20181126102407.1836-1-cai@gmx.us Signed-off-by: Qian Cai Suggested-by: Thomas Gleixner Cc: Waiman Long Cc: Yang Shi Cc: Arnd Bergmann Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4494ce4fb4ff42946f48bbc8a5ac55ee18dca600 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:28 2018 -0800 sh: lib: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/871s6wcswb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5933f6d220403b55772d2caf48a9a39d777fd630 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:24 2018 -0800 sh: kernel: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/8736rccswn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0a148f80c1526951d6d196ded1d0c93158c2e25 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:21 2018 -0800 sh: cpu: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/874lbscswy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 176ce1b7b0f6469eac05677e6f2ae9624e7bf879 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:18 2018 -0800 sh: shmobile: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/875zw8csxa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82e1d03766a2b5d088f66a938ce8e1605a24d327 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:14 2018 -0800 sh: sh5: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/877egocsxl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit add5ca2c48870cc6632179eccd0f0048a03fe43f Author: Kuninori Morimoto Date: Fri Dec 28 00:32:11 2018 -0800 sh: sh4a: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/878t14csxy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ecc0a4dbb076ef658cb5e140a7560d6326c8240 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:07 2018 -0800 sh: sh4: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text, excepting ${LINUX}/arch/sh/kernel/cpu/sh4/softfloat.c which is not GPL license Link: http://lkml.kernel.org/r/87a7lkcsya.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ab5d57cc0c6a4c36fcd52588734f8ab706516f0 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:03 2018 -0800 sh: sh3: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/87bm60csyl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 234a0538240caa05f12ec4ef7a573b173ab7ea57 Author: Kuninori Morimoto Date: Fri Dec 28 00:32:00 2018 -0800 sh: sh2a: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/87d0qgcsz8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47d11326259baaed7659b47e3a49d31715719793 Author: Kuninori Morimoto Date: Fri Dec 28 00:31:56 2018 -0800 sh: sh2: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/87efawcszk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a0abce4c4cce0890e2c930b960b9a05c8c6e5da Author: Kuninori Morimoto Date: Fri Dec 28 00:31:53 2018 -0800 sh: include: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/87ftvccszx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff4a7481c3898ffc3cc271d6aca431d190c37247 Author: Kuninori Morimoto Date: Fri Dec 28 00:31:49 2018 -0800 sh: drivers: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. As original license mentioned, it is GPL-2.0 in SPDX. Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL". See ${LINUX}/include/linux/module.h "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] Link: http://lkml.kernel.org/r/87h8fsct0a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaf9128abcb8314eb9756db3e32d667c5161156f Author: Kuninori Morimoto Date: Fri Dec 28 00:31:46 2018 -0800 sh: boards: convert to SPDX identifiers Update license to use SPDX-License-Identifier instead of verbose license text. Link: http://lkml.kernel.org/r/87in08ct0n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ffa6daa9937a108faf9e6b9f9cdcedb36a9e0d63 Author: YueHaibing Date: Fri Dec 28 00:31:42 2018 -0800 arch/sh/boards/mach-kfr2r09/setup.c: drop pointless static qualifier in kfr2r09_usb0_gadget_setup() There is no need to have the 'struct clk *camera_clk' variable static since a new value is always assigned before use. Link: http://lkml.kernel.org/r/1543628631-99957-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andrew Morton Cc: Yoshinori Sato Cc: Rich Felker Cc: Jacopo Mondi Cc: "Miquel Raynal" Cc: Randy Dunlap Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 440e7b379f91acd245d5c8de94d533f40f5dffb3 Author: Randy Dunlap Date: Fri Dec 28 00:31:39 2018 -0800 arch/sh/boards/mach-kfr2r09/setup.c: fix struct mtd_oob_ops build warning arch/sh/boards/mach-kfr2r09/setup.c does not need to #include , and doing so causes a build warning, so drop that header file. In file included from ../arch/sh/boards/mach-kfr2r09/setup.c:28: ../include/linux/mtd/onenand.h:225:12: warning: 'struct mtd_oob_ops' declared inside parameter list will not be visible outside of this definition or declaration struct mtd_oob_ops *ops); Link: http://lkml.kernel.org/r/702f0a25-c63e-6912-4640-6ab0f00afbc7@infradead.org Fixes: f3590dc32974 ("media: arch: sh: kfr2r09: Use new renesas-ceu camera driver") Signed-off-by: Randy Dunlap Reported-by: Geert Uytterhoeven Suggested-by: Miquel Raynal Reviewed-by: Miquel Raynal Cc: Yoshinori Sato Cc: Rich Felker Cc: Jacopo Mondi Cc: Magnus Damm Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd68a52533380213beb95c5bc41d8f9d7e4aec1f Author: Kirill Tkhai Date: Fri Dec 28 00:31:35 2018 -0800 scripts/tags.sh: add more declarations New declarations and identifier (__always_inline). Link: http://lkml.kernel.org/r/154505048571.504.18330420599768007443.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Cc: Masahiro Yamada Cc: Constantine Shulyupin Cc: Kirill Tkhai Cc: Joey Pabalinas Cc: Matthew Wilcox Cc: Arend van Spriel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b72231eb708459ea9171eb21201a0701fb39adfb Author: Thierry Reding Date: Fri Dec 28 00:31:32 2018 -0800 scripts: add spdxcheck.py self test Add a script that will run spdxcheck.py through a couple of self tests to simplify validation in the future. The tests are run for both Python 2 and Python 3 to make sure all changes to the script remain compatible across both versions. The script tests a regular text file (Makefile) for basic sanity checks and then runs it on a binary file (Documentation/logo.gif) to make sure it works in both cases. It also tests opening files passed on the command line as well as piped files read from standard input. Finally a run on the complete tree will be performed to catch any other potential issues. Link: http://lkml.kernel.org/r/20181212131210.28024-2-thierry.reding@gmail.com Signed-off-by: Thierry Reding Thomas Gleixner Cc: Jonathan Corbet Cc: Joe Perches Cc: Jeremy Cline Cc: Uwe Kleine-König Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 919e9d39e722dc79d7d051e5bda503423fe6c953 Author: Qian Cai Date: Fri Dec 28 00:31:28 2018 -0800 scripts/checkstack.pl: dynamic stack growth for aarch64 This is to track dynamic amount of stack growth for aarch64, so it is possible to print out offensive functions that may consume too much stack. For example, 0xffff2000084d1270 try_to_unmap_one [vmlinux]: Dynamic (0xcf0) 0xffff200008538358 migrate_page_move_mapping [vmlinux]: Dynamic (0xc60) 0xffff2000081276c8 copy_process.isra.2 [vmlinux]: Dynamic (0xb20) 0xffff200008424958 show_free_areas [vmlinux]: Dynamic (0xb40) 0xffff200008545178 __split_huge_pmd_locked [vmlinux]: Dynamic (0xb30) 0xffff200008555120 collapse_shmem [vmlinux]: Dynamic (0xbc0) 0xffff20000862e0d0 do_direct_IO [vmlinux]: Dynamic (0xb70) 0xffff200008cc0aa0 md_do_sync [vmlinux]: Dynamic (0xb90) Link: http://lkml.kernel.org/r/20181208025143.39363-1-cai@lca.pw Signed-off-by: Qian Cai Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 67a28de47faa83585dd644bd4c31e5a1d9346c50 Author: Marc Zyngier Date: Fri Dec 28 00:31:25 2018 -0800 scripts/decode_stacktrace: only strip base path when a prefix of the path Running something like: decodecode vmlinux . leads to interested results where not only the leading "." gets stripped from the displayed paths, but also anywhere in the string, displaying something like: kvm_vcpu_check_block (arch/arm64/kvm/virt/kvm/kvm_mainc:2141) which doesn't help further processing. Fix it by only stripping the base path if it is a prefix of the path. Link: http://lkml.kernel.org/r/20181210174659.31054-3-marc.zyngier@arm.com Signed-off-by: Marc Zyngier Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5cfb62f2bdf51c71ab4b8b33271beab34096c71 Author: Marc Zyngier Date: Fri Dec 28 00:31:21 2018 -0800 scripts/decodecode: set ARCH when running natively on arm/arm64 When running decodecode natively on arm64, ARCH is likely not to be set, and we end-up with .4byte instead of .inst when generating the disassembly. Similar effects would occur if running natively on a 32bit ARM platform, although that's even less popular. A simple workaround is to populate ARCH when it is not set and that we're running on an arm/arm64 system. Link: http://lkml.kernel.org/r/20181210174659.31054-2-marc.zyngier@arm.com Signed-off-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0b2475a3f36a7a0a001fe552145055da1daf245 Author: Rasmus Villemoes Date: Fri Dec 28 00:31:18 2018 -0800 bloat-o-meter: ignore __addressable_ symbols Since __LINE__ is part of the symbol created by __ADDRESSABLE, almost any change causes those symbols to disappear and get reincarnated, e.g. add/remove: 4/4 grow/shrink: 0/3 up/down: 32/-171 (-139) Function old new delta __addressable_tracing_set_default_clock8649 - 8 +8 __addressable_tracer_init_tracefs8631 - 8 +8 __addressable_ftrace_dump8383 - 8 +8 __addressable_clear_boot_tracer8632 - 8 +8 __addressable_tracing_set_default_clock8650 8 - -8 __addressable_tracer_init_tracefs8632 8 - -8 __addressable_ftrace_dump8384 8 - -8 __addressable_clear_boot_tracer8633 8 - -8 trace_default_header 663 642 -21 tracing_mark_raw_write 406 355 -51 tracing_mark_write 624 557 -67 Total: Before=63889, After=63750, chg -0.22% They're small and in .discard, so ignore them, leading to more useful add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-139 (-139) Function old new delta trace_default_header 663 642 -21 tracing_mark_raw_write 406 355 -51 tracing_mark_write 624 557 -67 Total: Before=63721, After=63582, chg -0.22% Link: http://lkml.kernel.org/r/20181102210030.8383-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Cc: Alexey Dobriyan Cc: Ingo Molnar Cc: Dominik Brodowski Cc: Maninder Singh Cc: Matteo Croce Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e886bf9d9abedf8236464bfd21bc5707748b4a02 Author: Andrey Konovalov Date: Fri Dec 28 00:31:14 2018 -0800 kasan: add SPDX-License-Identifier mark to source files This patch adds a "SPDX-License-Identifier: GPL-2.0" mark to all source files under mm/kasan. Link: http://lkml.kernel.org/r/bce2d1e618afa5142e81961ab8fa4b4165337380.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3b0e6accb5b3d249760e071f2cf77f696961158 Author: Andrey Konovalov Date: Fri Dec 28 00:31:10 2018 -0800 kasan: update documentation This patch updates KASAN documentation to reflect the addition of the new tag-based mode. Link: http://lkml.kernel.org/r/aabef9de317c54b8a3919a4946ce534c6576726a.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d4acb90878b076b8c735500121f73e32756ddce Author: Andrey Konovalov Date: Fri Dec 28 00:31:07 2018 -0800 kasan, arm64: select HAVE_ARCH_KASAN_SW_TAGS Now, that all the necessary infrastructure code has been introduced, select HAVE_ARCH_KASAN_SW_TAGS for arm64 to enable software tag-based KASAN mode. Link: http://lkml.kernel.org/r/25abce9a21d0c1df2d9d72488aced418c3465d7b.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Will Deacon Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66afc7f1e07a1db74453be9167ac0d1205653854 Author: Andrey Konovalov Date: Fri Dec 28 00:31:01 2018 -0800 kasan: add __must_check annotations to kasan hooks This patch adds __must_check annotations to kasan hooks that return a pointer to make sure that a tagged pointer always gets propagated. Link: http://lkml.kernel.org/r/03b269c5e453945f724bfca3159d4e1333a8fb1c.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Suggested-by: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2813b9c0296259fb11e75c839bab2d958ba4f96c Author: Andrey Konovalov Date: Fri Dec 28 00:30:57 2018 -0800 kasan, mm, arm64: tag non slab memory allocated via pagealloc Tag-based KASAN doesn't check memory accesses through pointers tagged with 0xff. When page_address is used to get pointer to memory that corresponds to some page, the tag of the resulting pointer gets set to 0xff, even though the allocated memory might have been tagged differently. For slab pages it's impossible to recover the correct tag to return from page_address, since the page might contain multiple slab objects tagged with different values, and we can't know in advance which one of them is going to get accessed. For non slab pages however, we can recover the tag in page_address, since the whole page was marked with the same tag. This patch adds tagging to non slab memory allocated with pagealloc. To set the tag of the pointer returned from page_address, the tag gets stored to page->flags when the memory gets allocated. Link: http://lkml.kernel.org/r/d758ddcef46a5abc9970182b9137e2fbee202a2c.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41eea9cd239c5b3fff726894f85c97f60e5799a3 Author: Andrey Konovalov Date: Fri Dec 28 00:30:54 2018 -0800 kasan, arm64: add brk handler for inline instrumentation Tag-based KASAN inline instrumentation mode (which embeds checks of shadow memory into the generated code, instead of inserting a callback) generates a brk instruction when a tag mismatch is detected. This commit adds a tag-based KASAN specific brk handler, that decodes the immediate value passed to the brk instructions (to extract information about the memory access that triggered the mismatch), reads the register values (x0 contains the guilty address) and reports the bug. Link: http://lkml.kernel.org/r/c91fe7684070e34dc34b419e6b69498f4dcacc2d.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f94ffbc4c6a1bdb51d39965e4f2acaa19bd798f Author: Andrey Konovalov Date: Fri Dec 28 00:30:50 2018 -0800 kasan: add hooks implementation for tag-based mode This commit adds tag-based KASAN specific hooks implementation and adjusts common generic and tag-based KASAN ones. 1. When a new slab cache is created, tag-based KASAN rounds up the size of the objects in this cache to KASAN_SHADOW_SCALE_SIZE (== 16). 2. On each kmalloc tag-based KASAN generates a random tag, sets the shadow memory, that corresponds to this object to this tag, and embeds this tag value into the top byte of the returned pointer. 3. On each kfree tag-based KASAN poisons the shadow memory with a random tag to allow detection of use-after-free bugs. The rest of the logic of the hook implementation is very much similar to the one provided by generic KASAN. Tag-based KASAN saves allocation and free stack metadata to the slab object the same way generic KASAN does. Link: http://lkml.kernel.org/r/bda78069e3b8422039794050ddcb2d53d053ed41.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b7c4148222d7acaa1612e5eec84fc66c88d54f3 Author: Andrey Konovalov Date: Fri Dec 28 00:30:46 2018 -0800 mm: move obj_to_index to include/linux/slab_def.h While with SLUB we can actually preassign tags for caches with contructors and store them in pointers in the freelist, SLAB doesn't allow that since the freelist is stored as an array of indexes, so there are no pointers to store the tags. Instead we compute the tag twice, once when a slab is created before calling the constructor and then again each time when an object is allocated with kmalloc. Tag is computed simply by taking the lowest byte of the index that corresponds to the object. However in kasan_kmalloc we only have access to the objects pointer, so we need a way to find out which index this object corresponds to. This patch moves obj_to_index from slab.c to include/linux/slab_def.h to be reused by KASAN. Link: http://lkml.kernel.org/r/c02cd9e574cfd93858e43ac94b05e38f891fef64.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 121e8f81d38cc43834195722d0768340dc130a33 Author: Andrey Konovalov Date: Fri Dec 28 00:30:42 2018 -0800 kasan: add bug reporting routines for tag-based mode This commit adds rountines, that print tag-based KASAN error reports. Those are quite similar to generic KASAN, the difference is: 1. The way tag-based KASAN finds the first bad shadow cell (with a mismatching tag). Tag-based KASAN compares memory tags from the shadow memory to the pointer tag. 2. Tag-based KASAN reports all bugs with the "KASAN: invalid-access" header. Also simplify generic KASAN find_first_bad_addr. Link: http://lkml.kernel.org/r/aee6897b1bd077732a315fd84c6b4f234dbfdfcb.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11cd3cd69a256a353dd1a249b48ccd727d945952 Author: Andrey Konovalov Date: Fri Dec 28 00:30:38 2018 -0800 kasan: split out generic_report.c from report.c Move generic KASAN specific error reporting routines to generic_report.c without any functional changes, leaving common error reporting code in report.c to be later reused by tag-based KASAN. Link: http://lkml.kernel.org/r/ba48c32f8e5aefedee78998ccff0413bee9e0f5b.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 772a2fa50ffb2f4282be8436da6e70530a2ac63c Author: Andrey Konovalov Date: Fri Dec 28 00:30:35 2018 -0800 kasan, mm: perform untagged pointers comparison in krealloc The krealloc function checks where the same buffer was reused or a new one allocated by comparing kernel pointers. Tag-based KASAN changes memory tag on the krealloc'ed chunk of memory and therefore also changes the pointer tag of the returned pointer. Therefore we need to perform comparison on untagged (with tags reset) pointers to check whether it's the same memory region or not. Link: http://lkml.kernel.org/r/14f6190d7846186a3506cd66d82446646fe65090.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21696c1613244f2ad4e9216c4f6e7804831a992c Author: Andrey Konovalov Date: Fri Dec 28 00:30:31 2018 -0800 kasan, arm64: enable top byte ignore for the kernel Tag-based KASAN uses the Top Byte Ignore feature of arm64 CPUs to store a pointer tag in the top byte of each pointer. This commit enables the TCR_TBI1 bit, which enables Top Byte Ignore for the kernel, when tag-based KASAN is used. Link: http://lkml.kernel.org/r/f51eca084c8cdb2f3a55195fe342dc8953b7aead.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 356607f21e603523d4b0a4f918722845214fc6a8 Author: Andrey Konovalov Date: Fri Dec 28 00:30:27 2018 -0800 kasan, arm64: fix up fault handling logic Right now arm64 fault handling code removes pointer tags from addresses covered by TTBR0 in faults taken from both EL0 and EL1, but doesn't do that for pointers covered by TTBR1. This patch adds two helper functions is_ttbr0_addr() and is_ttbr1_addr(), where the latter one accounts for the fact that TTBR1 pointers might be tagged when tag-based KASAN is in use, and uses these helper functions to perform pointer checks in arch/arm64/mm/fault.c. Link: http://lkml.kernel.org/r/3f349b0e9e48b5df3298a6b4ae0634332274494a.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Suggested-by: Mark Rutland Acked-by: Will Deacon Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d176711ea7a8d4873e7157ac6ab242ade3ba351 Author: Andrey Konovalov Date: Fri Dec 28 00:30:23 2018 -0800 kasan: preassign tags to objects with ctors or SLAB_TYPESAFE_BY_RCU An object constructor can initialize pointers within this objects based on the address of the object. Since the object address might be tagged, we need to assign a tag before calling constructor. The implemented approach is to assign tags to objects with constructors when a slab is allocated and call constructors once as usual. The downside is that such object would always have the same tag when it is reallocated, so we won't catch use-after-frees on it. Also pressign tags for objects from SLAB_TYPESAFE_BY_RCU caches, since they can be validy accessed after having been freed. Link: http://lkml.kernel.org/r/f158a8a74a031d66f0a9398a5b0ed453c37ba09a.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e71fe3f921aeb27f0c65ee7ebfdde7f8c7d60b74 Author: Andrey Konovalov Date: Fri Dec 28 00:30:20 2018 -0800 kasan, arm64: untag address in _virt_addr_is_linear virt_addr_is_linear (which is used by virt_addr_valid) assumes that the top byte of the address is 0xff, which isn't always the case with tag-based KASAN. This patch resets the tag in this macro. Link: http://lkml.kernel.org/r/df73a37dd5ed37f4deaf77bc718e9f2e590e69b1.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c9e3aa11094e821aff4a8f6812a6e032293dbc0 Author: Andrey Konovalov Date: Fri Dec 28 00:30:16 2018 -0800 kasan: add tag related helper functions This commit adds a few helper functions, that are meant to be used to work with tags embedded in the top byte of kernel pointers: to set, to get or to reset the top byte. Link: http://lkml.kernel.org/r/f6c6437bb8e143bc44f42c3c259c62e734be7935.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c23f84723d2bb5611a973f56f0952fa74f048f3 Author: Andrey Konovalov Date: Fri Dec 28 00:30:12 2018 -0800 arm64: move untagged_addr macro from uaccess.h to memory.h Move the untagged_addr() macro from arch/arm64/include/asm/uaccess.h to arch/arm64/include/asm/memory.h to be later reused by KASAN. Also make the untagged_addr() macro accept all kinds of address types (void *, unsigned long, etc.). This allows not to specify type casts in each place where the macro is used. This is done by using __typeof__. Link: http://lkml.kernel.org/r/2e9ef8d2ed594106eca514b268365b5419113f6a.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Mark Rutland Acked-by: Will Deacon Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 080eb83f54cf5b96ae5b6ce3c1896e35c341aff9 Author: Andrey Konovalov Date: Fri Dec 28 00:30:09 2018 -0800 kasan: initialize shadow to 0xff for tag-based mode A tag-based KASAN shadow memory cell contains a memory tag, that corresponds to the tag in the top byte of the pointer, that points to that memory. The native top byte value of kernel pointers is 0xff, so with tag-based KASAN we need to initialize shadow memory to 0xff. [cai@lca.pw: arm64: skip kmemleak for KASAN again\ Link: http://lkml.kernel.org/r/20181226020550.63712-1-cai@lca.pw Link: http://lkml.kernel.org/r/5cc1b789aad7c99cf4f3ec5b328b147ad53edb40.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9577dd7486487722ed8f0773243223f108e8089f Author: Andrey Konovalov Date: Fri Dec 28 00:30:01 2018 -0800 kasan: rename kasan_zero_page to kasan_early_shadow_page With tag based KASAN mode the early shadow value is 0xff and not 0x00, so this patch renames kasan_zero_(page|pte|pmd|pud|p4d) to kasan_early_shadow_(page|pte|pmd|pud|p4d) to avoid confusion. Link: http://lkml.kernel.org/r/3fed313280ebf4f88645f5b89ccbc066d320e177.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Suggested-by: Mark Rutland Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2f557eae9ed0ab2b612ce9ce7e3f06174a83e76 Author: Andrey Konovalov Date: Fri Dec 28 00:29:57 2018 -0800 kasan, arm64: adjust shadow size for tag-based mode Tag-based KASAN uses 1 shadow byte for 16 bytes of kernel memory, so it requires 1/16th of the kernel virtual address space for the shadow memory. This commit sets KASAN_SHADOW_SCALE_SHIFT to 4 when the tag-based KASAN mode is enabled. Link: http://lkml.kernel.org/r/308b6bd49f756bb5e533be93c6f085ba99b30339.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Acked-by: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bd926b439b4cb6b9ed240a9781cd01958b53d85 Author: Andrey Konovalov Date: Fri Dec 28 00:29:53 2018 -0800 kasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS This commit splits the current CONFIG_KASAN config option into two: 1. CONFIG_KASAN_GENERIC, that enables the generic KASAN mode (the one that exists now); 2. CONFIG_KASAN_SW_TAGS, that enables the software tag-based KASAN mode. The name CONFIG_KASAN_SW_TAGS is chosen as in the future we will have another hardware tag-based KASAN mode, that will rely on hardware memory tagging support in arm64. With CONFIG_KASAN_SW_TAGS enabled, compiler options are changed to instrument kernel files with -fsantize=kernel-hwaddress (except the ones for which KASAN_SANITIZE := n is set). Both CONFIG_KASAN_GENERIC and CONFIG_KASAN_SW_TAGS support both CONFIG_KASAN_INLINE and CONFIG_KASAN_OUTLINE instrumentation modes. This commit also adds empty placeholder (for now) implementation of tag-based KASAN specific hooks inserted by the compiler and adjusts common hooks implementation. While this commit adds the CONFIG_KASAN_SW_TAGS config option, this option is not selectable, as it depends on HAVE_ARCH_KASAN_SW_TAGS, which we will enable once all the infrastracture code has been added. Link: http://lkml.kernel.org/r/b2550106eb8a68b10fefbabce820910b115aa853.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b938fcf42739de8270e6ea41593722929c8a7dd0 Author: Andrey Konovalov Date: Fri Dec 28 00:29:49 2018 -0800 kasan: rename source files to reflect the new naming scheme We now have two KASAN modes: generic KASAN and tag-based KASAN. Rename kasan.c to generic.c to reflect that. Also rename kasan_init.c to init.c as it contains initialization code for both KASAN modes. Link: http://lkml.kernel.org/r/88c6fd2a883e459e6242030497230e5fb0d44d44.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bffa986c6f80e39d9903015fc7d0d99a66bbf559 Author: Andrey Konovalov Date: Fri Dec 28 00:29:45 2018 -0800 kasan: move common generic and tag-based code to common.c Tag-based KASAN reuses a significant part of the generic KASAN code, so move the common parts to common.c without any functional changes. Link: http://lkml.kernel.org/r/114064d002356e03bb8cc91f7835e20dc61b51d9.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12b22386998ccf97497a49c88f9579cf9c0dee55 Author: Andrey Konovalov Date: Fri Dec 28 00:29:41 2018 -0800 kasan, slub: handle pointer tags in early_kmem_cache_node_alloc The previous patch updated KASAN hooks signatures and their usage in SLAB and SLUB code, except for the early_kmem_cache_node_alloc function. This patch handles that function separately, as it requires to reorder some of the initialization code to correctly propagate a tagged pointer in case a tag is assigned by kasan_kmalloc. Link: http://lkml.kernel.org/r/fc8d0fdcf733a7a52e8d0daaa650f4736a57de8c.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0116523cfffa62aeb5aa3b85ce7419f3dae0c1b8 Author: Andrey Konovalov Date: Fri Dec 28 00:29:37 2018 -0800 kasan, mm: change hooks signatures Patch series "kasan: add software tag-based mode for arm64", v13. This patchset adds a new software tag-based mode to KASAN [1]. (Initially this mode was called KHWASAN, but it got renamed, see the naming rationale at the end of this section). The plan is to implement HWASan [2] for the kernel with the incentive, that it's going to have comparable to KASAN performance, but in the same time consume much less memory, trading that off for somewhat imprecise bug detection and being supported only for arm64. The underlying ideas of the approach used by software tag-based KASAN are: 1. By using the Top Byte Ignore (TBI) arm64 CPU feature, we can store pointer tags in the top byte of each kernel pointer. 2. Using shadow memory, we can store memory tags for each chunk of kernel memory. 3. On each memory allocation, we can generate a random tag, embed it into the returned pointer and set the memory tags that correspond to this chunk of memory to the same value. 4. By using compiler instrumentation, before each memory access we can add a check that the pointer tag matches the tag of the memory that is being accessed. 5. On a tag mismatch we report an error. With this patchset the existing KASAN mode gets renamed to generic KASAN, with the word "generic" meaning that the implementation can be supported by any architecture as it is purely software. The new mode this patchset adds is called software tag-based KASAN. The word "tag-based" refers to the fact that this mode uses tags embedded into the top byte of kernel pointers and the TBI arm64 CPU feature that allows to dereference such pointers. The word "software" here means that shadow memory manipulation and tag checking on pointer dereference is done in software. As it is the only tag-based implementation right now, "software tag-based" KASAN is sometimes referred to as simply "tag-based" in this patchset. A potential expansion of this mode is a hardware tag-based mode, which would use hardware memory tagging support (announced by Arm [3]) instead of compiler instrumentation and manual shadow memory manipulation. Same as generic KASAN, software tag-based KASAN is strictly a debugging feature. [1] https://www.kernel.org/doc/html/latest/dev-tools/kasan.html [2] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html [3] https://community.arm.com/processors/b/blog/posts/arm-a-profile-architecture-2018-developments-armv85a ====== Rationale On mobile devices generic KASAN's memory usage is significant problem. One of the main reasons to have tag-based KASAN is to be able to perform a similar set of checks as the generic one does, but with lower memory requirements. Comment from Vishwath Mohan : I don't have data on-hand, but anecdotally both ASAN and KASAN have proven problematic to enable for environments that don't tolerate the increased memory pressure well. This includes (a) Low-memory form factors - Wear, TV, Things, lower-tier phones like Go, (c) Connected components like Pixel's visual core [1]. These are both places I'd love to have a low(er) memory footprint option at my disposal. Comment from Evgenii Stepanov : Looking at a live Android device under load, slab (according to /proc/meminfo) + kernel stack take 8-10% available RAM (~350MB). KASAN's overhead of 2x - 3x on top of it is not insignificant. Not having this overhead enables near-production use - ex. running KASAN/KHWASAN kernel on a personal, daily-use device to catch bugs that do not reproduce in test configuration. These are the ones that often cost the most engineering time to track down. CPU overhead is bad, but generally tolerable. RAM is critical, in our experience. Once it gets low enough, OOM-killer makes your life miserable. [1] https://www.blog.google/products/pixel/pixel-visual-core-image-processing-and-machine-learning-pixel-2/ ====== Technical details Software tag-based KASAN mode is implemented in a very similar way to the generic one. This patchset essentially does the following: 1. TCR_TBI1 is set to enable Top Byte Ignore. 2. Shadow memory is used (with a different scale, 1:16, so each shadow byte corresponds to 16 bytes of kernel memory) to store memory tags. 3. All slab objects are aligned to shadow scale, which is 16 bytes. 4. All pointers returned from the slab allocator are tagged with a random tag and the corresponding shadow memory is poisoned with the same value. 5. Compiler instrumentation is used to insert tag checks. Either by calling callbacks or by inlining them (CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE flags are reused). 6. When a tag mismatch is detected in callback instrumentation mode KASAN simply prints a bug report. In case of inline instrumentation, clang inserts a brk instruction, and KASAN has it's own brk handler, which reports the bug. 7. The memory in between slab objects is marked with a reserved tag, and acts as a redzone. 8. When a slab object is freed it's marked with a reserved tag. Bug detection is imprecise for two reasons: 1. We won't catch some small out-of-bounds accesses, that fall into the same shadow cell, as the last byte of a slab object. 2. We only have 1 byte to store tags, which means we have a 1/256 probability of a tag match for an incorrect access (actually even slightly less due to reserved tag values). Despite that there's a particular type of bugs that tag-based KASAN can detect compared to generic KASAN: use-after-free after the object has been allocated by someone else. ====== Testing Some kernel developers voiced a concern that changing the top byte of kernel pointers may lead to subtle bugs that are difficult to discover. To address this concern deliberate testing has been performed. It doesn't seem feasible to do some kind of static checking to find potential issues with pointer tagging, so a dynamic approach was taken. All pointer comparisons/subtractions have been instrumented in an LLVM compiler pass and a kernel module that would print a bug report whenever two pointers with different tags are being compared/subtracted (ignoring comparisons with NULL pointers and with pointers obtained by casting an error code to a pointer type) has been used. Then the kernel has been booted in QEMU and on an Odroid C2 board and syzkaller has been run. This yielded the following results. The two places that look interesting are: is_vmalloc_addr in include/linux/mm.h is_kernel_rodata in mm/util.c Here we compare a pointer with some fixed untagged values to make sure that the pointer lies in a particular part of the kernel address space. Since tag-based KASAN doesn't add tags to pointers that belong to rodata or vmalloc regions, this should work as is. To make sure debug checks to those two functions that check that the result doesn't change whether we operate on pointers with or without untagging has been added. A few other cases that don't look that interesting: Comparing pointers to achieve unique sorting order of pointee objects (e.g. sorting locks addresses before performing a double lock): tty_ldisc_lock_pair_timeout in drivers/tty/tty_ldisc.c pipe_double_lock in fs/pipe.c unix_state_double_lock in net/unix/af_unix.c lock_two_nondirectories in fs/inode.c mutex_lock_double in kernel/events/core.c ep_cmp_ffd in fs/eventpoll.c fsnotify_compare_groups fs/notify/mark.c Nothing needs to be done here, since the tags embedded into pointers don't change, so the sorting order would still be unique. Checks that a pointer belongs to some particular allocation: is_sibling_entry in lib/radix-tree.c object_is_on_stack in include/linux/sched/task_stack.h Nothing needs to be done here either, since two pointers can only belong to the same allocation if they have the same tag. Overall, since the kernel boots and works, there are no critical bugs. As for the rest, the traditional kernel testing way (use until fails) is the only one that looks feasible. Another point here is that tag-based KASAN is available under a separate config option that needs to be deliberately enabled. Even though it might be used in a "near-production" environment to find bugs that are not found during fuzzing or running tests, it is still a debug tool. ====== Benchmarks The following numbers were collected on Odroid C2 board. Both generic and tag-based KASAN were used in inline instrumentation mode. Boot time [1]: * ~1.7 sec for clean kernel * ~5.0 sec for generic KASAN * ~5.0 sec for tag-based KASAN Network performance [2]: * 8.33 Gbits/sec for clean kernel * 3.17 Gbits/sec for generic KASAN * 2.85 Gbits/sec for tag-based KASAN Slab memory usage after boot [3]: * ~40 kb for clean kernel * ~105 kb (~260% overhead) for generic KASAN * ~47 kb (~20% overhead) for tag-based KASAN KASAN memory overhead consists of three main parts: 1. Increased slab memory usage due to redzones. 2. Shadow memory (the whole reserved once during boot). 3. Quaratine (grows gradually until some preset limit; the more the limit, the more the chance to detect a use-after-free). Comparing tag-based vs generic KASAN for each of these points: 1. 20% vs 260% overhead. 2. 1/16th vs 1/8th of physical memory. 3. Tag-based KASAN doesn't require quarantine. [1] Time before the ext4 driver is initialized. [2] Measured as `iperf -s & iperf -c 127.0.0.1 -t 30`. [3] Measured as `cat /proc/meminfo | grep Slab`. ====== Some notes A few notes: 1. The patchset can be found here: https://github.com/xairy/kasan-prototype/tree/khwasan 2. Building requires a recent Clang version (7.0.0 or later). 3. Stack instrumentation is not supported yet and will be added later. This patch (of 25): Tag-based KASAN changes the value of the top byte of pointers returned from the kernel allocation functions (such as kmalloc). This patch updates KASAN hooks signatures and their usage in SLAB and SLUB code to reflect that. Link: http://lkml.kernel.org/r/aec2b5e3973781ff8a6bb6760f8543643202c451.1544099024.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Reviewed-by: Dmitry Vyukov Cc: Christoph Lameter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ccc98a48958da9f89beb71c66a4e05468727951 Author: Jiri Olsa Date: Wed Dec 12 11:25:37 2018 +0100 tools gpio: Allow overriding CFLAGS So that the user can specify outside CFLAGS values. Signed-off-by: Jiri Olsa Reviewed-by: Andy Shevchenko Cc: Hartmut Knaack Cc: Herton Krzesinski Cc: Jonathan Cameron Cc: Lars-Peter Clausen Link: http://lkml.kernel.org/r/20181212102537.25902-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6b7f98a37ac63fe94e84a5289962457b4b504a8d Author: Jiri Olsa Date: Wed Dec 12 11:25:35 2018 +0100 tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command So that the user can specify outside CFLAGS/LDFLAGS values. Signed-off-by: Jiri Olsa Reviewed-by: Andy Shevchenko Cc: Herton Krzesinski Cc: Len Brown Link: http://lkml.kernel.org/r/20181212102537.25902-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ad6b474f445e587e9b56ec44241b1639bccf6738 Author: Jiri Olsa Date: Wed Dec 12 11:25:33 2018 +0100 tools thermal tmon: Allow overriding CFLAGS assignments So that the user can provide, e.g. distro package alternative values. Signed-off-by: Jiri Olsa Cc: Brian Norris Cc: Herton Krzesinski Cc: Markus Mayer Cc: Zhang Rui Link: http://lkml.kernel.org/r/20181212102537.25902-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f1770e3ca4ec10ce43825de2f855a1831c711195 Author: Jiri Olsa Date: Fri Oct 12 07:20:16 2018 -0400 tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command So user could specify outside CFLAGS/LDFLAGS values. Signed-off-by: Jiri Olsa Cc: Herton Krzesinski Cc: Len Brown Link: https://lkml.kernel.org/r/20181212102537.25902-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c4a75bb9488a9f7b3c7e79017609529d1aa5deab Author: Jiri Olsa Date: Fri Dec 28 11:18:20 2018 +0100 perf c2c: Increase the HITM ratio limit for displayed cachelines The cachelines being reported are the ones with percentages all the way down to 0.05%. That makes for very long output files. Raising that to 0.1%. The user can always specify --show-all if they want all the cachelines with hits. Suggested-by: Joe Mario Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181228101820.28010-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 423701a0c8d754d9a39547f6c48904347e4f1eca Author: Jiri Olsa Date: Fri Dec 28 11:18:19 2018 +0100 perf c2c: Change the default coalesce setup Joe suggested to have the coalesce default set just to 'iaddr', because it's easier to read on the default 'perf c2c report' output. By removing the "pid" field from the default -c/--coalesce option, the 'perf c2c' report will group all the relevant PIDs under the instruction address ('iaddr') bucket. User can always run "-c pid,iaddr" for a more fine grained output on particular PIDs. Suggested-by: Joe Mario Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181228101820.28010-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 38fc9da69f3385667ba8c3d45bd43065491854a6 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 16:20:21 2018 -0300 perf trace beauty ioctl: Beautify USBDEVFS_ commands For instance, while debugging the 'galileo' python utility to synchronize fitbit trackers: # perf trace -e ioctl ./run --force ioctl(0, TCSETS, 0x7ffe28666420) = 0 ioctl(0, TCSETS, 0x7ffe28666290) = 0 ioctl(1, TCSETS, 0x7ffe28666290) = 0 ioctl(2, TCSETS, 0x7ffe28666290) = 0 ioctl(3, TCSETS, 0x7ffe286663f0) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(1, TCSETS, 0x7ffe286655a0) = 0 ioctl(1, TCSETS, 0x7ffe28665470) = 0 ioctl(1, TCSETS, 0x7ffe28665470) = 0 ioctl(1, TCSETS, 0x7ffe286654a0) = 0 ioctl(1, TCSETS, 0x7ffe286654a0) = 0 ioctl(1, TCSETS, 0x7ffe28665400) = 0 ioctl(1, TIOCSWINSZ, 0x7ffe286654c0) = 0 ioctl(0, TIOCSWINSZ, 0x7ffe28665560) = 0 ioctl(0, TIOCSWINSZ, 0x7ffe28665560) = 0 ioctl(0, TIOCMGET, 0x7ffe28665560) = 0 ioctl(0, TCSETS, 0x7ffe28665530) = 0 ioctl(10, USBDEVFS_GET_CAPABILITIES, 0x561468dad048) = 0 ioctl(10, USBDEVFS_GETDRIVER, 0x7ffe28665500) = -1 ENODATA (No data available) ioctl(10, USBDEVFS_GETDRIVER, 0x7ffe28665500) = -1 ENODATA (No data available) ioctl(10, USBDEVFS_SETCONFIGURATION, 0x7ffe2866513c) = 0 ioctl(10, USBDEVFS_CLAIMINTERFACE, 0x7ffe286647bc) = 0 ioctl(10, USBDEVFS_SUBMITURB, 0x561468dace40) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664c10) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664c10) = -1 EAGAIN (Resource temporarily unavailable) ioctl(10, USBDEVFS_SUBMITURB, 0x561468dace40) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664dd0) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664dd0) = -1 EAGAIN (Resource temporarily unavailable) ioctl(10, USBDEVFS_SUBMITURB, 0x561468e72ec0) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664cc0) = 0 ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffe28664cc0) = -1 EAGAIN (Resource temporarily unavailable) ioctl(10, USBDEVFS_RELEASEINTERFACE, 0x7ffe2866463c) = 0 ioctl(10, USBDEVFS_RELEASEINTERFACE, 0x7ffe2866463c) = 0 Tracker: 813F4690C3D1: Synchronisation successful # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6x2cawak7jno3gpp5pagzj50@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2d473389f87ace284bda35a5254bc66e24d0caa9 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 16:19:33 2018 -0300 perf trace beauty: Export function to get the files for a thread So that beautifiers can access things like dev_maj. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-wm5o51f206c5pi063dsaeraq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 86cf4c659c9ae1609262699caa4b2c3ab7fefa9b Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 15:10:34 2018 -0300 perf trace: Wire up ioctl's USBDEBFS_ cmd table generator That ends up generating this: [acme@quaco perf]$ cat /tmp/build/perf/trace/beauty/generated/ioctl/usbdevfs_ioctl_array.c static const char *usbdevfs_ioctl_cmds[] = { [0] = "CONTROL", [10] = "SUBMITURB", [11] = "DISCARDURB", [12] = "REAPURB", [13] = "REAPURBNDELAY", [14] = "DISCSIGNAL", [15] = "CLAIMINTERFACE", [16] = "RELEASEINTERFACE", [17] = "CONNECTINFO", [18] = "IOCTL", [19] = "HUB_PORTINFO", [2] = "BULK", [20] = "RESET", [21] = "CLEAR_HALT", [22] = "DISCONNECT", [23] = "CONNECT", [24] = "CLAIM_PORT", [25] = "RELEASE_PORT", [26] = "GET_CAPABILITIES", [27] = "DISCONNECT_CLAIM", [28] = "ALLOC_STREAMS", [29] = "FREE_STREAMS", [3] = "RESETEP", [30] = "DROP_PRIVILEGES", [31] = "GET_SPEED", [4] = "SETINTERFACE", [5] = "SETCONFIGURATION", [8] = "GETDRIVER", }; #if 0 static const char *usbdevfs_ioctl_32_cmds[] = { [0] = "CONTROL32", [10] = "SUBMITURB32", [12] = "REAPURB32", [13] = "REAPURBNDELAY32", [14] = "DISCSIGNAL32", [18] = "IOCTL32", [2] = "BULK32", }; #endif $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-hkam6lt1g806l0p4b7buif3n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 870c3f40dc78edec6437a2ced03976b66eeacf49 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 14:27:35 2018 -0300 perf beauty ioctl: Add generator for USBDEVFS_ ioctl commands Will be associated with fds with the right device major. $ tools/perf/trace/beauty/usbdevfs_ioctl.sh static const char *usbdevfs_ioctl_cmds[] = { [0] = "CONTROL", [10] = "SUBMITURB", [11] = "DISCARDURB", [12] = "REAPURB", [13] = "REAPURBNDELAY", [14] = "DISCSIGNAL", [15] = "CLAIMINTERFACE", [16] = "RELEASEINTERFACE", [17] = "CONNECTINFO", [18] = "IOCTL", [19] = "HUB_PORTINFO", [20] = "RESET", [21] = "CLEAR_HALT", [22] = "DISCONNECT", [23] = "CONNECT", [24] = "CLAIM_PORT", [25] = "RELEASE_PORT", [26] = "GET_CAPABILITIES", [27] = "DISCONNECT_CLAIM", [28] = "ALLOC_STREAMS", [29] = "FREE_STREAMS", [2] = "BULK", [30] = "DROP_PRIVILEGES", [31] = "GET_SPEED", [3] = "RESETEP", [4] = "SETINTERFACE", [5] = "SETCONFIGURATION", [8] = "GETDRIVER", }; #if 0 static const char *usbdevfs_ioctl_32_cmds[] = { [0] = "CONTROL32", [10] = "SUBMITURB32", [12] = "REAPURB32", [13] = "REAPURBNDELAY32", [14] = "DISCSIGNAL32", [18] = "IOCTL32", [2] = "BULK32", }; #endif $ Leaving the '32' variants commented, later we can try to support those as well, from some other hint (maybe something about the thread issuing the ioctls) and from the _IOC_SIZE(cmd). Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-neq1lrji5k4ku0rktn7ytnri@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2bd71d11a86e8419a33a131d194fd735a8f74400 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 14:18:13 2018 -0300 tools headers uapi: Grab a copy of usbdevice_fs.h Will be used to generate the string table for the USBDEVFS_ prefixed ioctl commands. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-3vrm9b55tdhzn8sw9qazh4z5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4bcc4cff6a10e5287d4dd3e73b6b4689f9a0c570 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 13:32:59 2018 -0300 perf trace: Store the major number for a file when storing its pathname We keep a table for the fds to map them back to pathnames when showing 'fd' based APIs such as write(), store as well the major number for the device the path is in, to use in things like choosing the right ioctl 'cmd' beautifier. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-qjkds7bnk7v7fk2xhqsb0a4v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d7e134845d6b19288dec5582ce91d6c6052fcdad Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 11:05:18 2018 -0300 perf trace: Move the files table resizing to outside set_pathname() So that we can have that table expanded when setting other attributes. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-hzvpe3qwafe6sqcq3bhtbxds@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f4a74fcbfd943e128bbd464dc31b4405e1514d63 Author: Arnaldo Carvalho de Melo Date: Thu Dec 27 10:56:12 2018 -0300 perf trace: Rename thread_thread->paths to thread_trace->files So that we can add more per file attributes besides the pathname, such as which ioctl beautifier to use, for cases such as the sound and usbdeffs ioctls, that both use the 'U' command, so we have to differentiate at the major number for the device file. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1895cmhrdz2dkl5prf2cj2yj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 61f611593f2c90547cb09c0bf6977414454a27e6 Author: Andi Kleen Date: Mon Nov 19 21:06:17 2018 -0800 perf script: Fix LBR skid dump problems in brstackinsn This is a fix for another instance of the skid problem Milian recently found [1] The LBRs don't freeze at the exact same time as the PMI is triggered. The perf script brstackinsn code that dumps LBR assembler assumes that the last branch in the LBR leads to the sample point. But with skid it's possible that the CPU executes one or more branches before the sample, but which do not appear in the LBR. What happens then is either that the sample point is before the last LBR branch. In this case the dumper sees a negative length and ignores it. Or it the sample point is long after the last branch. Then the dumper sees a very long block and dumps it upto its block limit (16k bytes), which is noise in the output. On typical sample session this can happen regularly. This patch tries to detect and handle the situation. On the last block that is dumped by the LBR dumper we always stop on the first branch. If the block length is negative just scan forward to the first branch. Otherwise scan until a branch is found. The PT decoder already has a function that uses the instruction decoder to detect branches, so we can just reuse it here. Then when a terminating branch is found print an indication and stop dumping. This might miss a few instructions, but at least shows no runaway blocks. Signed-off-by: Andi Kleen Acked-by: Adrian Hunter Cc: Jiri Olsa Cc: Milian Wolff Link: http://lkml.kernel.org/r/20181120050617.4119-1-andi@firstfloor.org [ Resolved conflict with dd2e18e9ac20 ("perf tools: Support 'srccode' output") ] Signed-off-by: Arnaldo Carvalho de Melo commit a389aece97938966616ce0336466b98b0351ef10 Author: Jiri Olsa Date: Wed Dec 26 12:21:21 2018 +0100 perf python: Do not force closing original perf descriptor in evlist.get_pollfd() Ondřej reported that when compiled with python3, the python extension regresses in evlist.get_pollfd function behaviour. The evlist.get_pollfd function creates file objects from evlist's fds and returns them in a list. The python3 version also sets them to 'close the original descriptor' when the object dies (is closed), by passing True via the 'closefd' arg in the PyFile_FromFd call. The python's closefd doc says: If closefd is False, the underlying file descriptor will be kept open when the file is closed. That's why the following line in python3 closes all evlist fds: evlist.get_pollfd() the returned list is immediately destroyed and that takes down the original events fds. Passing closefd as False to PyFile_FromFd to fix this. Reported-by: Ondřej Lysoněk Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jaroslav Škarvada Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: 66dfdff03d19 ("perf tools: Add Python 3 support") Link: http://lkml.kernel.org/r/20181226112121.5285-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fbe7e42515af6c2ecee04b1c851f78de1d190281 Author: Colin Ian King Date: Fri Dec 21 08:48:09 2018 +0000 perf trace: Use correct SECCOMP prefix spelling, "SECOMP_*" -> "SECCOMP_*" The spelling of the SECCOMP is incorrect, fix these. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Fixes: c65c83ffe904 ("perf trace: Allow asking for not suppressing common string prefixes") Link: http://lkml.kernel.org/r/20181221084809.6108-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo commit 08972760d366b83a87d366b0079747f8c409163c Author: Aisheng Dong Date: Sun Dec 23 16:20:02 2018 +0000 clk: imx8qxp: make the name of clock ID generic SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs. Let's make the name of clock ID generic to allow other SoCs to reuse the common part. This patch only changes the clock id name and file name, so no functional change. Cc: Stephen Boyd Cc: Rob Herring Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Michael Turquette Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Reviewed-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 3fc9c12d27b4ded4f1f761a800558dab2e6bbac5 Author: Tejun Heo Date: Fri Dec 28 10:31:07 2018 -0800 cgroup: Add named hierarchy disabling to cgroup_no_v1 boot param It can be useful to inhibit all cgroup1 hierarchies especially during transition and for debugging. cgroup_no_v1 can block hierarchies with controllers which leaves out the named hierarchies. Expand it to cover the named hierarchies so that "cgroup_no_v1=all,named" disables all cgroup1 hierarchies. Signed-off-by: Tejun Heo Suggested-by: Marcin Pawlowski Signed-off-by: Tejun Heo commit e250d91d65750a0c0c62483ac4f9f357e7317617 Author: Ondrej Mosnacek Date: Thu Dec 13 15:17:37 2018 +0100 cgroup: fix parsing empty mount option string This fixes the case where all mount options specified are consumed by an LSM and all that's left is an empty string. In this case cgroupfs should accept the string and not fail. How to reproduce (with SELinux enabled): # umount /sys/fs/cgroup/unified # mount -o context=system_u:object_r:cgroup_t:s0 -t cgroup2 cgroup2 /sys/fs/cgroup/unified mount: /sys/fs/cgroup/unified: wrong fs type, bad option, bad superblock on cgroup2, missing codepage or helper program, or other error. # dmesg | tail -n 1 [ 31.575952] cgroup: cgroup2: unknown option "" Fixes: 67e9c74b8a87 ("cgroup: replace __DEVEL__sane_behavior with cgroup2 fs type") [NOTE: should apply on top of commit 5136f6365ce3 ("cgroup: implement "nsdelegate" mount option"), older versions need manual rebase] Suggested-by: Stephen Smalley Signed-off-by: Ondrej Mosnacek Signed-off-by: Tejun Heo commit 14e92c5dc7a1a1d4a82fb7142b5642837fef962a Author: Steve French Date: Mon Dec 24 01:05:22 2018 -0600 cifs: Minor Kconfig clarification Clarify the use of the CONFIG_DFS_UPCALL for DNS name resolution when server ip addresses change (e.g. on long running mounts) Signed-off-by: Steve French commit 28eb24ff75c5ac130eb326b3b4d0dcecfc0f427d Author: Paulo Alcantara Date: Tue Nov 20 15:16:36 2018 -0200 cifs: Always resolve hostname before reconnecting In case a hostname resolves to a different IP address (e.g. long running mounts), make sure to resolve it every time prior to calling generic_ip_connect() in reconnect. Suggested-by: Steve French Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 08744015492fec5a30ab8e2779601ae2b1a5e431 Author: Paulo Alcantara Date: Wed Nov 14 17:24:29 2018 -0200 cifs: Add support for failover in cifs_reconnect_tcon() After a successful failover, the cifs_reconnect_tcon() function will make sure to reconnect every tcon to new target server. Same as previous commit but for SMB1 codepath. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit a3a53b7603798fd875e2afbba7e2b9ba6b19c7c7 Author: Paulo Alcantara Date: Wed Nov 14 17:20:31 2018 -0200 cifs: Add support for failover in smb2_reconnect() After a successful failover in cifs_reconnect(), the smb2_reconnect() function will make sure to reconnect every tcon to new target server. For SMB2+. Signed-off-by: Paulo Alcantara Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 23324407143dd923660378fd9b40b9a711972269 Author: Paulo Alcantara Date: Tue Nov 20 14:37:18 2018 -0200 cifs: Only free DFS target list if we actually got one Fix potential NULL ptr deref when DFS target list is empty. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit e511d31753e3f7c13bbd402399ffac676d451a7c Author: Paulo Alcantara Date: Wed Nov 14 17:16:44 2018 -0200 cifs: start DFS cache refresher in cifs_mount() Start the DFS cache refresh worker per volume during cifs mount. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 2f0a617448945a2c63d68983212302e9f2f8ae2f Author: YueHaibing Date: Tue Dec 18 01:34:39 2018 +0000 cifs: Use GFP_ATOMIC when a lock is held in cifs_mount() A spin lock is held before kstrndup, it may sleep with holding the spinlock, so we should use GFP_ATOMIC instead. Fixes: e58c31d5e387 ("cifs: Add support for failover in cifs_reconnect()") Signed-off-by: YueHaibing Signed-off-by: Steve French Reviewed-by: Paulo Alcantara commit 93d5cb517db39e8af8d1292f9e785e4983b7f708 Author: Paulo Alcantara Date: Wed Nov 14 17:13:25 2018 -0200 cifs: Add support for failover in cifs_reconnect() After failing to reconnect to original target, it will retry any target available from DFS cache. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 4a367dc0443566f87d73f2cdb94703b0e1374315 Author: Paulo Alcantara Date: Wed Nov 14 16:53:52 2018 -0200 cifs: Add support for failover in cifs_mount() This patch adds support for failover when failing to connect in cifs_mount(). Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 5a650501eb8cb785593155441c5b0b9900edfcdf Author: YueHaibing Date: Tue Dec 18 01:35:29 2018 +0000 cifs: remove set but not used variable 'sep' Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/cifs_dfs_ref.c: In function 'cifs_dfs_do_automount': fs/cifs/cifs_dfs_ref.c:309:7: warning: variable 'sep' set but not used [-Wunused-but-set-variable] It never used since introdution in commit 0f56b277073c ("cifs: Make use of DFS cache to get new DFS referrals") Signed-off-by: YueHaibing Reviewed-by: Paulo Alcantara Signed-off-by: Steve French commit 1c780228e9d47b966983a8bbf475dd45967bf0d5 Author: Paulo Alcantara Date: Wed Nov 14 16:24:03 2018 -0200 cifs: Make use of DFS cache to get new DFS referrals This patch will make use of DFS cache routines where appropriate and do not always request a new referral from server. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit e8bcdfdbf91bf979afe6642a99b41cbc0a4916d0 Author: Steve French Date: Fri Dec 21 00:44:32 2018 -0600 cifs: minor updates to documentation Update cifs "TODO" file. Signed-off-by: Steve French commit 0544b324e62c177c3a9e9c3bdce22e6db9f34588 Author: Joe Perches Date: Thu Dec 20 23:50:48 2018 -0600 cifs: check kzalloc return kzalloc can return NULL so an additional check is needed. While there is a check for ret_buf there is no check for the allocation of ret_buf->crfid.fid - this check is thus added. Both call-sites of tconInfoAlloc() check for NULL return of tconInfoAlloc() so returning NULL on failure of kzalloc() here seems appropriate. As the kzalloc() is the only thing here that can fail it is moved to the beginning so as not to initialize other resources on failure of kzalloc. Fixes: 3d4ef9a15343 ("smb3: fix redundant opens on root") Signed-off-by: Joe Perches Signed-off-by: Steve French commit 29cbfa1b2be2e51785f871351d321896861f2ce8 Author: YueHaibing Date: Tue Dec 18 02:51:51 2018 +0000 cifs: remove set but not used variable 'server' Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/smb2pdu.c: In function 'smb311_posix_mkdir': fs/cifs/smb2pdu.c:2040:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] fs/cifs/smb2pdu.c: In function 'build_qfs_info_req': fs/cifs/smb2pdu.c:4067:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] The first 'server' never used since commit bea851b8babe ("smb3: Fix mode on mkdir on smb311 mounts") And the second not used since commit 1fc6ad2f10ad ("cifs: remove header_preamble_size where it is always 0") Signed-off-by: YueHaibing Signed-off-by: Steve French commit 34bca9bbe7a81c4b53cacb20e996090ddf371c51 Author: Dan Carpenter Date: Thu Dec 20 14:32:43 2018 +0300 cifs: Use kzfree() to free password We should zero out the password before we free it. Fixes: 3d6cacbb5310 ("cifs: Add DFS cache routines") Signed-off-by: Dan Carpenter Signed-off-by: Steve French Reviewed-by: Paulo Alcantara commit 3e80be0158ac67d936e65935db5b07663822c66d Author: Wei Yongjun Date: Tue Dec 18 06:37:02 2018 +0000 cifs: Fix to use kmem_cache_free() instead of kfree() memory allocated by kmem_cache_alloc() in alloc_cache_entry() should be freed using kmem_cache_free(), not kfree(). Fixes: 34a44fb160f9 ("cifs: Add DFS cache routines") Signed-off-by: Wei Yongjun Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 54e4f73cbe03dd0634548e40d12c442d377c36c4 Author: Stephen Rothwell Date: Mon Dec 17 20:11:46 2018 +1100 cifs: update for current_kernel_time64() removal Fixes cifs build failure after merge of the y2038 tree After merging the y2038 tree, today's linux-next build (x86_64 allmodconfig) failed like this: fs/cifs/dfs_cache.c: In function 'cache_entry_expired': fs/cifs/dfs_cache.c:106:7: error: implicit declaration of function 'current_kernel_time64'; did you mean 'core_kernel_text'? [-Werror=implicit-function-declaration] ts = current_kernel_time64(); ^~~~~~~~~~~~~~~~~~~~~ core_kernel_text fs/cifs/dfs_cache.c:106:5: error: incompatible types when assigning to type 'struct timespec64' from type 'int' ts = current_kernel_time64(); ^ fs/cifs/dfs_cache.c: In function 'get_expire_time': fs/cifs/dfs_cache.c:342:24: error: incompatible type for argument 1 of 'timespec64_add' return timespec64_add(current_kernel_time64(), ts); ^~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/restart_block.h:10, from include/linux/thread_info.h:13, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/rcupdate.h:40, from fs/cifs/dfs_cache.c:8: include/linux/time64.h:66:66: note: expected 'struct timespec64' but argument is of type 'int' static inline struct timespec64 timespec64_add(struct timespec64 lhs, ~~~~~~~~~~~~~~~~~~^~~ fs/cifs/dfs_cache.c:343:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Caused by: commit ccea641b6742 ("timekeeping: remove obsolete time accessors") interacting with: commit 34a44fb160f9 ("cifs: Add DFS cache routines") from the cifs tree. Signed-off-by: Stephen Rothwell Reviewed-by: Paulo Alcantara Acked-by: Arnd Bergmann Signed-off-by: Steve French commit 54be1f6c1c37498bba557049df646cc239fa37e3 Author: Paulo Alcantara Date: Wed Nov 14 16:01:21 2018 -0200 cifs: Add DFS cache routines * Add new dfs_cache.[ch] files * Add new /proc/fs/cifs/dfscache file - dump current cache when read - clear current cache when writing "0" to it * Add delayed_work to periodically refresh cache entries The new interface will be used for caching DFS referrals, as well as supporting client target failover. The DFS cache is a hashtable that maps UNC paths to cache entries. A cache entry contains: - the UNC path it is mapped on - how much the the UNC path the entry consumes - flags - a Time-To-Live after which the entry expires - a list of possible targets (linked lists of UNC paths) - a "hint target" pointing the last known working target or the first target if none were tried. This hint lets cifs.ko remember and try working targets first. * Looking for an entry in the cache is done with dfs_cache_find() - if no valid entries are found, a DFS query is made, stored in the cache and returned - the full target list can be copied and returned to avoid race conditions and looped on with the help with the dfs_cache_tgt_iterator * Updating the target hint to the next target is done with dfs_cache_update_tgthint() These functions have a dfs_cache_noreq_XXX() version that doesn't fetches referrals if no entries are found. These versions don't require the tcp/ses/tcon/cifs_sb parameters as a result. Expired entries cannot be used and since they have a pretty short TTL [1] in order for them to be useful for failover the DFS cache adds a delayed work called periodically to keep them fresh. Since we might not have available connections to issue the referral request when refreshing we need to store volume_info structs with credentials and other needed info to be able to connect to the right server. 1: Windows defaults: 5mn for domain-based referrals, 30mn for regular links Signed-off-by: Paulo Alcantara Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 21c7acc439b55d0569d7c2fc2eea5194b3910406 Author: Guenter Roeck Date: Thu Dec 27 08:46:38 2018 -0800 h8300: pci: Remove local declaration of pcibios_penalize_isa_irq h8300 builds fail with: In file included from drivers/of/address.c:11: include/linux/pci.h:1966:20: error: redefinition of 'pcibios_penalize_isa_irq' This is because CONFIG_PCI is not enabled, and pcibios_penalize_isa_irq() is now declared as inline static function in generic code if this is the case. Since h8300 does not support PCI to start with, fix the problem by removing the architecture specific pci.h. Fixes: 5d32a66541c46 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set") Cc: Sinan Kaya Cc: Bjorn Helgaas Signed-off-by: Guenter Roeck Signed-off-by: Yoshinori Sato commit f222b7f43661c3dddd44ee493c16e04e8f231542 Author: Masahiro Yamada Date: Fri Dec 21 17:33:08 2018 +0900 kconfig: surround dbg_sym_flags with #ifdef DEBUG to fix gconf warning Fix the following warning: no previous prototype for ‘dbg_sym_flags’ [-Wmissing-prototypes] Signed-off-by: Masahiro Yamada commit 3b541978562a0f553b0c0253d927d55612dd97b1 Author: Masahiro Yamada Date: Fri Dec 21 17:33:07 2018 +0900 kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings Currently, images.c is included by qconf.cc and gconf.c. qconf.cc uses all of xpm_* arrays, but gconf.c only some of them. Hence, lots of "... defined but not used" warnings are displayed while compiling gconf.c Splitting out images.c fixes the warnings. Signed-off-by: Masahiro Yamada commit 9abe42371b44ef3e10e068d3e461c3a97192fb46 Author: Masahiro Yamada Date: Fri Dec 21 17:33:06 2018 +0900 kconfig: add static qualifiers to fix gconf warnings Add "static" to functions that are locally used in gconf.c This fixes some "no previous prototype for ..." warnings. Signed-off-by: Masahiro Yamada commit cbafbf7f551c3a03fb9440932f1ca13056ca40a6 Author: Masahiro Yamada Date: Fri Dec 21 17:33:05 2018 +0900 kconfig: split the lexer out of zconf.y Compile zconf.lex.c independently of the other files. Signed-off-by: Masahiro Yamada commit 558e78e3ce844c61ceffe32775dbefacf167b023 Author: Masahiro Yamada Date: Fri Dec 21 17:33:04 2018 +0900 kconfig: split some C files out of zconf.y I want to compile each C file independently instead of including all of them from zconf.y. Split out confdata.c, expr.c, symbol.c, and preprocess.c . These are low-hanging fruits. Signed-off-by: Masahiro Yamada commit 0c874100108f03401cb3154801d2671bbad40ad4 Author: Masahiro Yamada Date: Tue Dec 18 21:13:35 2018 +0900 kconfig: convert to SPDX License Identifier All files in lxdialog/ are licensed under GPL-2.0+, and the rest are under GPL-2.0. I added GPL-2.0 tags to test scripts in tests/. Documentation/process/license-rules.rst does not suggest anything about the flex/bison files. Because flex does not accept the C++ comment style at the very top of a file, I used the C style for zconf.l, and so for zconf.y for consistency. Signed-off-by: Masahiro Yamada commit 979f2b2f7936f4b71a3100baf2d16c8057f027eb Author: Masahiro Yamada Date: Tue Dec 11 20:01:10 2018 +0900 kconfig: remove keyword lookup table entirely Commit 7a88488bbc23 ("[PATCH] kconfig: use gperf for kconfig keywords") introduced gperf for the keyword lookup. Then, commit bb3290d91695 ("Remove gperf usage from toolchain") killed the gperf use. As a result, the linear keyword search was left behind. If we do not use gperf, there is no reason to have the separate table of the keywords. Move all keywords back to the lexer. I also refactored the lexer to remove the COMMAND and PARAM states. Signed-off-by: Masahiro Yamada commit 4bcd2ffd214c1dad269c8ec40ac935770d208534 Merge: 221b35fedee1b cb6f4c2c3478b Author: Dave Airlie Date: Fri Dec 28 14:05:35 2018 +1000 Merge tag 'drm-intel-next-fixes-2018-12-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next GVT fixes for v4.21-rc1 Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87imzfwh73.fsf@intel.com commit 4b5f747e82b12b6d8ab815fc259827a615c7f2c3 Merge: 37379cfc661e5 3d9cbe37c16ff Author: Dan Williams Date: Thu Dec 27 19:54:10 2018 -0800 Merge miscellaneous libnvdimm updates for 4.21 * Use common helpers, bitmap_zalloc() and kstrndup(), to replace open coded versions. * Clarify the comments around hotplug vs initial init case for the nfit driver. * Cleanup the libnvdimm init path. commit 4d71c6f8771a6bccb844244f09831fa4624b22c1 Merge: 1e7eacaf1db2f e9d81a1bc2c48 Author: Tejun Heo Date: Thu Dec 27 18:05:30 2018 -0800 Merge branch 'for-4.20-fixes' into for-4.21 commit 91bd2ffa9030191ad077e43be37c5bfc53640dc2 Author: Vasily Averin Date: Mon Dec 24 14:46:21 2018 +0300 nfs: minor typo in nfs4_callback_up_net() Closing ")" was lost in debug message. Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 9ac312888e8869481613a2c65bb8bf5ab6d15594 Author: Vasily Averin Date: Mon Dec 24 14:46:14 2018 +0300 sunrpc: fix debug message in svc_create_xprt() _svc_create_xprt() returns positive port number so its non-zero return value is not an error Reviewed-by: Jeff Layton Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 8f7766c805d27a56e37cf7e108c2208649b44569 Author: Vasily Averin Date: Mon Dec 24 14:46:08 2018 +0300 sunrpc: make visible processing error in bc_svc_process() Force bc_svc_process() to generate debug message after processing errors Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 64e20ba204df539a76004114e08abf1156302e35 Author: Vasily Averin Date: Mon Dec 24 14:46:00 2018 +0300 sunrpc: remove unused xpo_prep_reply_hdr callback xpo_prep_reply_hdr are not used now. It was defined for tcp transport only, however it cannot be called indirectly, so let's move it to its caller and remove unused callback. Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 7ef88ff85ff71dd167d29d47bdb91c63cedcd554 Author: Vasily Averin Date: Mon Dec 24 14:45:53 2018 +0300 sunrpc: remove svc_rdma_bc_class Remove svc_xprt_class svc_rdma_bc_class and related functions. Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 7f391546098702bf8160038d8512a2502a0343ca Author: Vasily Averin Date: Mon Dec 24 14:45:46 2018 +0300 sunrpc: remove svc_tcp_bc_class Remove svc_xprt_class svc_tcp_bc_class and related functions Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit 4aa5cffefa6f8af8f16490df58b8f0d827911b58 Author: Vasily Averin Date: Mon Dec 24 14:45:25 2018 +0300 sunrpc: remove unused bc_up operation from rpc_xprt_ops Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit a289ce5311f406bf846614591300a948ebc42062 Author: Vasily Averin Date: Mon Dec 24 14:45:04 2018 +0300 sunrpc: replace svc_serv->sv_bc_xprt by boolean flag svc_serv-> sv_bc_xprt is netns-unsafe and cannot be used as pointer. To prevent its misuse in future it is replaced by new boolean flag. Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields commit d4b09acf924b84bae77cad090a9d108e70b43643 Author: Vasily Averin Date: Mon Dec 24 14:44:52 2018 +0300 sunrpc: use-after-free in svc_process_common() if node have NFSv41+ mounts inside several net namespaces it can lead to use-after-free in svc_process_common() svc_process_common() /* Setup reply header */ rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp); <<< HERE svc_process_common() can use incorrect rqstp->rq_xprt, its caller function bc_svc_process() takes it from serv->sv_bc_xprt. The problem is that serv is global structure but sv_bc_xprt is assigned per-netnamespace. According to Trond, the whole "let's set up rqstp->rq_xprt for the back channel" is nothing but a giant hack in order to work around the fact that svc_process_common() uses it to find the xpt_ops, and perform a couple of (meaningless for the back channel) tests of xpt_flags. All we really need in svc_process_common() is to be able to run rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr() Bruce J Fields points that this xpo_prep_reply_hdr() call is an awfully roundabout way just to do "svc_putnl(resv, 0);" in the tcp case. This patch does not initialiuze rqstp->rq_xprt in bc_svc_process(), now it calls svc_process_common() with rqstp->rq_xprt = NULL. To adjust reply header svc_process_common() just check rqstp->rq_prot and calls svc_tcp_prep_reply_hdr() for tcp case. To handle rqstp->rq_xprt = NULL case in functions called from svc_process_common() patch intruduces net namespace pointer svc_rqst->rq_bc_net and adjust SVC_NET() definition. Some other function was also adopted to properly handle described case. Signed-off-by: Vasily Averin Cc: stable@vger.kernel.org Fixes: 23c20ecd4475 ("NFS: callback up - users counting cleanup") Signed-off-by: J. Bruce Fields commit b8be5674fa9a6f3677865ea93f7803c4212f3e10 Author: Vasily Averin Date: Mon Dec 24 14:44:42 2018 +0300 sunrpc: use SVC_NET() in svcauth_gss_* functions Signed-off-by: Vasily Averin Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit 8a68d3da50b952232bbb39f7582a9050c40a0d78 Author: Julia Lawall Date: Sun Dec 23 09:56:56 2018 +0100 nfsd: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares is never used. This was introduced in c5c707f96fc9a ("nfsd: implement pNFS layout recalls"), but was not used even in that commit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: c5c707f96fc9a ("nfsd: implement pNFS layout recalls") Signed-off-by: Julia Lawall Signed-off-by: J. Bruce Fields commit 00c569b567c7f1f0da6162868fd02a9f29411805 Merge: f6b1495fba0b6 052b8cfa4070c Author: Linus Torvalds Date: Thu Dec 27 17:12:30 2018 -0800 Merge tag 'locks-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "The main change in this set is Neil Brown's work to reduce the thundering herd problem when a heavily-contended file lock is released. Previously we'd always wake up all waiters when this occurred. With this set, we'll now we only wake up waiters that were blocked on the range being released" * tag 'locks-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: Use inode_is_open_for_write fs/locks: remove unnecessary white space. fs/locks: merge posix_unblock_lock() and locks_delete_block() fs/locks: create a tree of dependent requests. fs/locks: change all *_conflict() functions to return bool. fs/locks: always delete_block after waiting. fs/locks: allow a lock request to block other requests. fs/locks: use properly initialized file_lock when unlocking. ocfs2: properly initial file_lock used for unlock. gfs2: properly initial file_lock used for unlock. NFS: use locks_copy_lock() to copy locks. fs/locks: split out __locks_wake_up_blocks(). fs/locks: rename some lists and pointers. commit f6b1495fba0b66cfa05efa0ca2370513b79b45b6 Merge: bc77789a491cd 18f2c4fcebf25 Author: Linus Torvalds Date: Thu Dec 27 17:09:41 2018 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "All cleanups and bug fixes; most notably, fix some problems discovered in ext4's NFS support, and fix an ioctl (EXT4_IOC_GROUP_ADD) used by old versions of e2fsprogs which we accidentally broke a while back. Also fixed some error paths in ext4's quota and inline data support. Finally, improve tail latency in jbd2's commit code" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: check for shutdown and r/o file system in ext4_write_inode() ext4: force inode writes when nfsd calls commit_metadata() ext4: avoid declaring fs inconsistent due to invalid file handles ext4: include terminating u32 in size of xattr entries when expanding inodes ext4: compare old and new mode before setting update_mode flag ext4: fix EXT4_IOC_GROUP_ADD ioctl ext4: hard fail dax mount on unsupported devices jbd2: update locking documentation for transaction_t ext4: remove redundant condition check jbd2: clean up indentation issue, replace spaces with tab ext4: clean up indentation issues, remove extraneous tabs ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() ext4: fix possible use after free in ext4_quota_enable jbd2: avoid long hold times of j_state_lock while committing a transaction ext4: add ext4_sb_bread() to disambiguate ENOMEM cases commit bc77789a491cdc6f47e5bbd1d04ddd283d64658b Merge: 47a43f2f0ce24 3cc31fa65d856 Author: Linus Torvalds Date: Thu Dec 27 17:07:35 2018 -0800 Merge tag 'iomap-4.21-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap update from Darrick Wong: "Fix a memory overflow bug for blocksize < pagesize" * tag 'iomap-4.21-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: don't search past page end in iomap_is_partially_uptodate commit 47a43f2f0ce24bb75e3e4500118000585a3b496a Merge: e01799ac56306 65eed012d1f2d Author: Linus Torvalds Date: Thu Dec 27 17:04:23 2018 -0800 Merge tag 'xfs-4.21-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS updates from Darrick Wong: - Fix CoW remapping of extremely fragmented file areas - Fix a zero-length symlink verifier error - Constify some of the rmap owner structures for per-AG metadata - Precalculate inode geometry for later use - Fix scrub counting problems - Don't crash when rtsummary inode is null - Fix x32 ioctl operation - Fix enum->string mappings for ftrace output - Cache realtime summary information in memory * tag 'xfs-4.21-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (24 commits) xfs: reallocate realtime summary cache on growfs xfs: stringify scrub types in ftrace output xfs: stringify btree cursor types in ftrace output xfs: move XFS_INODE_FORMAT_STR mappings to libxfs xfs: move XFS_AG_BTREE_CMP_FORMAT_STR mappings to libxfs xfs: fix symbolic enum printing in ftrace output xfs: fix function pointer type in ftrace format xfs: Fix x32 ioctls when cmd numbers differ from ia32. xfs: Fix bulkstat compat ioctls on x32 userspace. xfs: Align compat attrlist_by_handle with native implementation. xfs: require both realtime inodes to mount xfs: cache minimum realtime summary level xfs: count inode blocks correctly in inobt scrub xfs: precalculate cluster alignment in inodes and blocks xfs: precalculate inodes and blocks per inode cluster xfs: add a block to inode count converter xfs: remove xfs_rmap_ag_owner and friends xfs: const-ify xfs_owner_info arguments xfs: streamline defer op type handling xfs: idiotproof defer op type configuration ... commit e01799ac56306ab211f2edf1221a82dc57eab8f5 Merge: 4b0a383ad782d 41c4f85cdac28 Author: Linus Torvalds Date: Thu Dec 27 17:00:35 2018 -0800 Merge tag 'fs_for_4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, udf, and quota update from Jan Kara: "Some ext2 cleanups, a fix for UDF crash on corrupted media, and one quota locking fix" * tag 'fs_for_4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Lock s_umount in exclusive mode for Q_XQUOTA{ON,OFF} quotactls. udf: Fix BUG on corrupted inode ext2: change reusable parameter to true when calling mb_cache_entry_create() ext2: remove redundant condition check ext2: avoid unnecessary operation in ext2_error() commit 4b0a383ad782d6028becea7602968d49a83ff5fc Merge: 4de3aea385f5a ac9498d686449 Author: Linus Torvalds Date: Thu Dec 27 16:55:37 2018 -0800 Merge tag 'fsnotify_for_v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "Support for new FAN_OPEN_EXEC event and couple of cleanups around fsnotify" * tag 'fsnotify_for_v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: Use inode_is_open_for_write fanotify: Make sure to check event_len when copying fsnotify/fdinfo: include fdinfo.h for inotify_show_fdinfo() fanotify: introduce new event mask FAN_OPEN_EXEC_PERM fsnotify: refactor fsnotify_parent()/fsnotify() paired calls when event is on path fanotify: introduce new event mask FAN_OPEN_EXEC fanotify: return only user requested event types in event mask commit 4de3aea385f5a054885bc96ffdb9c7d0ea0c9486 Merge: 32ee34eddad13 3595c559326d0 Author: Linus Torvalds Date: Thu Dec 27 16:49:24 2018 -0800 Merge tag 'dlm-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set is entirely trivial fixes, mainly around correct cleanup on error paths and improved error checks. One patch adds scheduling in a potentially long recovery loop" * tag 'dlm-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: fix invalid cluster name warning dlm: NULL check before some freeing functions is not needed dlm: NULL check before kmem_cache_destroy is not needed dlm: fix missing idr_destroy for recover_idr dlm: memory leaks on error path in dlm_user_request() dlm: lost put_lkb on error path in receive_convert() and receive_unlock() dlm: possible memory leak on error path in create_lkb() dlm: fixed memory leaks after failed ls_remove_names allocation dlm: fix possible call to kfree() for non-initialized pointer dlm: Don't swamp the CPU with callbacks queued during recovery dlm: don't leak kernel pointer to userspace dlm: don't allow zero length names dlm: fix invalid free commit 32ee34eddad13cd44ad0cb3e659fe6fd49143b62 Merge: 7bbbf2c2fc84d 52042d8e82ff5 Author: Linus Torvalds Date: Thu Dec 27 16:44:40 2018 -0800 Merge tag 'for-4.21-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "New features: - swapfile support - after a long time it's here, with some limitations where COW design does not work well with the swap implementation (nodatacow file, no compression, cannot be snapshotted, not possible on multiple devices, ...), as this is the most restricted but working setup, we'll try to improve that in the future - metadata uuid - an optional incompat feature to assign a new filesystem UUID without overwriting all metadata blocks, stored only in superblock - more balance messages are printed to system log, initial is in the format of the command line that would be used to start it Fixes: - tag pages of a snapshot to better separate pages that are involved in the snapshot (and need to get synced) from newly dirtied pages that could slow down or even livelock the snapshot operation - improved check of filesystem id associated with a device during scan to detect duplicate devices that could be mixed up during mount - fix device replace state transitions, eg. when it ends up interrupted and reboot tries to restart balance too, or when start/cancel ioctls race - fix a crash due to a race when quotas are enabled during snapshot creation - GFP_NOFS/memalloc_nofs_* fixes due to GFP_KERNEL allocations in transaction context - fix fsync of files with multiple hard links in new directories - fix race of send with transaction commits that create snapshots Core changes: - cleanups: * further removals of now-dead fsync code * core function for finding free extent has been split and provides a base for further cleanups to make the logic more understandable * removed lot of indirect callbacks for data and metadata inodes * simplified refcounting and locking for cloned extent buffers * removed redundant function arguments * defines converted to enums where appropriate - separate reserve for delayed refs from global reserve, update logic to do less trickery and ad-hoc heuristics, move out some related expensive operations from transaction commit or file truncate - dev-replace switched from custom locking scheme to semaphore - remove first phase of balance that tried to make some space for the relocation by calling shrink and grow, this did not work as expected and only introduced more error states due to potential resize failures, slightly improves the runtime as the chunks on all devices are not needlessly enumerated - clone and deduplication now use generic helper that adds a few more checks that were missing from the original btrfs implementation of the ioctls" * tag 'for-4.21-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (125 commits) btrfs: Fix typos in comments and strings btrfs: improve error handling of btrfs_add_link Btrfs: use generic_remap_file_range_prep() for cloning and deduplication btrfs: Refactor main loop in extent_readpages btrfs: Remove 1st shrink/grow phase from balance Btrfs: send, fix race with transaction commits that create snapshots Btrfs: use nofs context when initializing security xattrs to avoid deadlock btrfs: run delayed items before dropping the snapshot btrfs: catch cow on deleting snapshots btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down Btrfs: scrub, move setup of nofs contexts higher in the stack btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex btrfs: scrub: pass fs_info to scrub_setup_ctx btrfs: fix truncate throttling btrfs: don't run delayed refs in the end transaction logic btrfs: rework btrfs_check_space_for_delayed_refs btrfs: add new flushing states for the delayed refs rsv btrfs: update may_commit_transaction to use the delayed refs rsv btrfs: introduce delayed_refs_rsv btrfs: only track ref_heads in delayed_ref_updates ... commit 7bbbf2c2fc84dd24cae8615b11a0c6cac12cbe94 Merge: b71acb0e37216 bc0205612bbd4 Author: Linus Torvalds Date: Thu Dec 27 16:42:39 2018 -0800 Merge tag 'gfs2-4.21.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Bob Peterson: - Enhancements and performance improvements to journal replay (Abhi Das) - Cleanup of gfs2_is_ordered and gfs2_is_writeback (Andreas Gruenbacher) - Fix a potential double-free in inode creation (Andreas Gruenbacher) - Fix the bitmap search loop that was searching too far (Andreas Gruenbacher) - Various cleanups (Andreas Gruenbacher, Bob Peterson) - Implement Steve Whitehouse's patch to dump nrpages for inodes (Bob Peterson) - Fix a withdraw bug where stuffed journaled data files didn't allocate enough journal space to be grown (Bob Peterson) * tag 'gfs2-4.21.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: take jdata unstuff into account in do_grow gfs2: Dump nrpages for inodes and their glocks gfs2: Fix loop in gfs2_rbm_find gfs2: Get rid of potential double-freeing in gfs2_create_inode gfs2: Remove vestigial bd_ops gfs2: read journal in large chunks to locate the head gfs2: add a helper function to get_log_header that can be used elsewhere gfs2: changes to gfs2_log_XXX_bio gfs2: add more timing info to journal recovery process gfs2: Fix the gfs2_invalidatepage description gfs2: Clean up gfs2_is_{ordered,writeback} commit a3c9311f62b4943228ae90f769775dd3bcbfa7c0 Author: Robert P. J. Day Date: Thu Dec 27 16:10:59 2018 -0500 include/linux/phy/phy.h: fix minor kerneldoc errors Correct two minor kerneldoc errors: 1) missing reference to @mode in struct phy_ops 2) obsolete reference to @init_data in struct_phy_attrs, removed in dbc98635e0d42f0e62ea92813df1e0e4c90f8375 Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller commit d8de01b763e0d8b3b418d3606d26f203983b6637 Author: Robert P. J. Day Date: Wed Dec 26 06:35:23 2018 -0600 phy.h: fix obvious errors in doc and kerneldoc content 1) note that gianfar_phy.c was removed years ago 2) fix obvious copy and paste error in regular doc 3) change regular doc into kerneldoc for phy_modes() Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller commit 40752b3eae29f8ca2378e978a02bd6dbeeb06d16 Author: Wen Yang Date: Wed Dec 26 16:28:30 2018 +0800 net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe() This patch fixes potential double frees if register_hdlc_device() fails. Signed-off-by: Wen Yang Reviewed-by: Peng Hao CC: Zhao Qiang CC: "David S. Miller" CC: netdev@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org CC: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 92ee77d148bf06d8c52664be4d1b862583fd5c0e Author: Kangjie Lu Date: Wed Dec 26 00:31:08 2018 -0600 net: marvell: fix a missing check of acpi_match_device When acpi_match_device fails, its return value is NULL. Directly using the return value without a check may result in a NULL-pointer dereference. The fix checks if acpi_match_device fails, and if so, returns -EINVAL. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit 46273cf7e009231d2b6bc10a926e82b8928a9fb2 Author: Kangjie Lu Date: Wed Dec 26 00:09:04 2018 -0600 tipc: fix a missing check of genlmsg_put genlmsg_put could fail. The fix inserts a check of its return value, and if it fails, returns -EMSGSIZE. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit ff07d48d7bc0974d4f96a85a4df14564fb09f1ef Author: Kangjie Lu Date: Tue Dec 25 22:23:19 2018 -0600 atl1e: checking the status of atl1e_write_phy_reg atl1e_write_phy_reg() could fail. The fix issues an error message when it fails. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit e49505f7255be8ced695919c08a29bf2c3d79616 Author: Kangjie Lu Date: Tue Dec 25 22:08:18 2018 -0600 net: dsa: bcm_sf2: Propagate error value from mdio_write Both bcm_sf2_sw_indir_rw and mdiobus_write_nested could fail, so let's return their error codes upstream. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit f86a3b83833e7cfe558ca4d70b64ebc48903efec Author: Kangjie Lu Date: Tue Dec 25 20:57:14 2018 -0600 net: stmicro: fix a missing check of clk_prepare clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit 2d822f2dbab7f4c820f72eb8570aacf3f35855bd Author: Kangjie Lu Date: Tue Dec 25 20:55:37 2018 -0600 net: (cpts) fix a missing check of clk_prepare clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu Signed-off-by: David S. Miller commit 26fd962bde0b15e54234fe762d86bc0349df1de4 Author: Kangjie Lu Date: Tue Dec 25 01:56:14 2018 -0600 niu: fix missing checks of niu_pci_eeprom_read niu_pci_eeprom_read() may fail, so we should check its return value before using the read data. Signed-off-by: Kangjie Lu Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit ca19fcb6285bfce1601c073bf4b9d2942e2df8d9 Author: Aditya Pakki Date: Mon Dec 24 15:21:21 2018 -0600 net: chelsio: Add a missing check on cudg_get_buffer cudbg_collect_hw_sched() could fail when the function cudg_get_buffer() returns an error. The fix adds a check to the latter function returning error on failure Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit f0fb9b288d0a7e9cc324ae362e2dfd2cc2217ded Author: Aditya Pakki Date: Mon Dec 24 10:30:17 2018 -0600 ipv6/route: Add a missing check on proc_dointvec While flushing the cache via ipv6_sysctl_rtcache_flush(), the call to proc_dointvec() may fail. The fix adds a check that returns the error, on failure. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit dc4501ff287547dea7ca10f1c580c741291a8760 Author: Cong Wang Date: Sun Dec 23 21:45:56 2018 -0800 tipc: fix a double free in tipc_enable_bearer() bearer_disable() already calls kfree_rcu() to free struct tipc_bearer, we don't need to call kfree() again. Fixes: cb30a63384bc ("tipc: refactor function tipc_enable_bearer()") Reported-by: syzbot+b981acf1fb240c0c128b@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit b71acb0e372160167bf6d5500b88b30b52ccef6e Merge: e0c38a4d1f196 c79b411eaa725 Author: Linus Torvalds Date: Thu Dec 27 13:53:32 2018 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add 1472-byte test to tcrypt for IPsec - Reintroduced crypto stats interface with numerous changes - Support incremental algorithm dumps Algorithms: - Add xchacha12/20 - Add nhpoly1305 - Add adiantum - Add streebog hash - Mark cts(cbc(aes)) as FIPS allowed Drivers: - Improve performance of arm64/chacha20 - Improve performance of x86/chacha20 - Add NEON-accelerated nhpoly1305 - Add SSE2 accelerated nhpoly1305 - Add AVX2 accelerated nhpoly1305 - Add support for 192/256-bit keys in gcmaes AVX - Add SG support in gcmaes AVX - ESN for inline IPsec tx in chcr - Add support for CryptoCell 703 in ccree - Add support for CryptoCell 713 in ccree - Add SM4 support in ccree - Add SM3 support in ccree - Add support for chacha20 in caam/qi2 - Add support for chacha20 + poly1305 in caam/jr - Add support for chacha20 + poly1305 in caam/qi2 - Add AEAD cipher support in cavium/nitrox" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (130 commits) crypto: skcipher - remove remnants of internal IV generators crypto: cavium/nitrox - Fix build with !CONFIG_DEBUG_FS crypto: salsa20-generic - don't unnecessarily use atomic walk crypto: skcipher - add might_sleep() to skcipher_walk_virt() crypto: x86/chacha - avoid sleeping under kernel_fpu_begin() crypto: cavium/nitrox - Added AEAD cipher support crypto: mxc-scc - fix build warnings on ARM64 crypto: api - document missing stats member crypto: user - remove unused dump functions crypto: chelsio - Fix wrong error counter increments crypto: chelsio - Reset counters on cxgb4 Detach crypto: chelsio - Handle PCI shutdown event crypto: chelsio - cleanup:send addr as value in function argument crypto: chelsio - Use same value for both channel in single WR crypto: chelsio - Swap location of AAD and IV sent in WR crypto: chelsio - remove set but not used variable 'kctx_len' crypto: ux500 - Use proper enum in hash_set_dma_transfer crypto: ux500 - Use proper enum in cryp_set_dma_transfer crypto: aesni - Add scatter/gather avx stubs, and use them in C crypto: aesni - Introduce partial block macro .. commit 940b241d9050fc354f68c182e99fc3da1ff36bc0 Author: Anton Ivanov Date: Tue Nov 13 15:08:02 2018 +0000 um: Remove obsolete reenable_XX calls reenable_fd has been a NOP since the introduction of the EPOLL based interrupt controller. reenable_channel() is no longer needed as the flow control is now handled via the write IRQs on the channel. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit b9794231737ab8c8a3a225b50aa168c4c7f9b9ec Author: Christoph Hellwig Date: Thu Dec 27 08:33:24 2018 +0100 um: writev needs vector_user.c doesn't compile without this for me. Signed-off-by: Christoph Hellwig Signed-off-by: Richard Weinberger commit 9de74842ee20b425d227ab66d865d5ec908fbc2c Author: Anton Ivanov Date: Tue Dec 18 14:01:44 2018 +0000 Add Anton Ivanov to UML maintainers Signed-off-by: Anton Ivanov Acked-by: Richard Weinberger Signed-off-by: Richard Weinberger commit efe5f5be1e40be76d25da69f76f0b68dc6bafb8e Author: Masahiro Yamada Date: Sun Dec 16 23:37:06 2018 +0900 um: remove redundant generic-y This commit removes redundant generic-y defines in arch/um/include/asm/Kbuild. It is redundant to define generic-y when arch-specific implementation exists in arch/$(ARCH)/include/asm/*.h Remove the following generic-y: hardirq.h io.h Signed-off-by: Masahiro Yamada Signed-off-by: Richard Weinberger commit 742f3c8193a3cb3e444887211214ef0721e3ef8d Author: Anton Ivanov Date: Fri Dec 7 09:05:53 2018 +0000 um: Optimize Flush TLB for force/fork case When UML handles a fork the page tables need to be brought up to date. That was done using brute force - full tlb flush. This is actually unnecessary, because the mapped-in mappings are all correct and the only mappings which need to be updated after a flush are any unmaps (so that paging works) as well as any pending protection changes. This optimization squeezes out up to 3% from a full kernel rebuild time under memory pressure. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 8892d8545f2d0342b9c550defbfb165db237044b Author: Anton Ivanov Date: Wed Dec 5 12:37:41 2018 +0000 um: Avoid marking pages with "changed protection" Changing protection is a very high cost operation in UML because in addition to an extra syscall it also interrupts mmap merge sequences generated by the tlb. While the condition is not particularly common it is worth avoiding. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 38e3cbd9b82c815006c505ad2995013a61af143e Author: Anton Ivanov Date: Wed Dec 5 12:37:40 2018 +0000 um: Skip TLB flushing where not needed Skip TLB flushing for all cases where it is not needed, not just flush_tlb_mm_range Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit a9c52c2a2881ec69343a49ee32b2f3965e74ca98 Author: Anton Ivanov Date: Wed Dec 5 12:37:39 2018 +0000 um: Optimize TLB operations v2 Make the code to merge mmap/munmap/mprotect operations in tlb.c common for userspace and kernel. Kernel tlb operations can now be merged as well. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 747b254ca2649d0c206385c7902fb8ac97a2b0b4 Author: Anton Ivanov Date: Thu Nov 22 14:45:13 2018 +0000 um: Remove unnecessary faulted check in uaccess.c It is not necessary to check if a fault has occured or not after disabling pagefaults. kmap_atomic does that in all cases and we can disable it for 64 bit where kmap is not needed and a simple page_address would suffice. dd if=/dev/zero of=/dev/null bs=1M count=1M Before: 3.1GB/s. After: 3.5GB/s There is a noticeable difference for file disk read and write as well as less noticeable difference for network IO. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 50109b5a03b4024eb6b8df3ab8f427625f54fe92 Author: Anton Ivanov Date: Wed Nov 14 18:41:09 2018 +0000 um: Add support for DISCARD in the UBD Driver Support for DISCARD and WRITE_ZEROES in the ubd driver using fallocate. DISCARD is enabled by default and can be disabled using a new UBD command line flag. If the underlying fs on which the UBD image is stored does not support DISCARD the support for both DISCARD and WRITE_ZEROES is turned off. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit a41421edb926fcc8f212742b2e7a1f21c9047853 Author: Anton Ivanov Date: Wed Nov 14 18:41:08 2018 +0000 um: Remove unsafe printks from the io thread Printk out of the io thread has been proven to be unsafe. This is not surprising as the thread is part of the UML hypervisor code. It is not supposed to invoke any kernel code/resources. It is necesssary to pass the error to the block IO layer and let it Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 53766defb8c860a47e2a965f5b4b05ed2848e2d0 Author: Anton Ivanov Date: Wed Nov 14 18:41:07 2018 +0000 um: Clean-up command processing in UML UBD driver Clean-up command processing and return BLK_STS_NOTSUP for uknown commands. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit a43c83161a5ec1631a54338dd9b734b3cdce8d9a Author: Anton Ivanov Date: Wed Nov 14 18:41:06 2018 +0000 um: Switch to block-mq constants in the UML UBD driver Switch to block mq-constants for both commands, error codes and various computations. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 550ed0e2036663b35cec12374b835444f9c60454 Author: Richard Weinberger Date: Tue Oct 30 12:58:12 2018 +0100 um: Make GCOV depend on !KCOV Both do more or less the same thing and are mutually exclusive. If both are enabled the build will fail. Sooner or later we can kill UML's GCOV. Signed-off-by: Richard Weinberger commit 0053102a869f1b909904b1b85ac282e2744deaab Author: Richard Weinberger Date: Tue Oct 30 12:58:11 2018 +0100 um: Include sys/uio.h to have writev() sys/uio.h gives us writev(), otherwise the build might fail on some systems. Fixes: 49da7e64f33e ("High Performance UML Vector Network Driver") Signed-off-by: Richard Weinberger commit 0d76433c220391672848f2c0607f86f79d5e1a38 Author: Hernán Gonzalez Date: Tue Oct 30 12:58:10 2018 +0100 um: Add HAVE_DEBUG_BUGVERBOSE This option restores the DEBUG_BUGVERBOSE functionality as it was previous to commit 9a93848fe787 ("x86/debug: Implement __WARN() using UD0"). Signed-off-by: Hernán Gonzalez Signed-off-by: Richard Weinberger commit dbd0be61fb5a03db59450b42fbb689faece8b0ad Author: Richard Weinberger Date: Thu Nov 1 22:27:01 2018 +0100 um: Update maintainers file entry - Remove stale fs/hppfs/ reference - Point to our patchwork queue Signed-off-by: Richard Weinberger commit e0c38a4d1f196a4b17d2eba36afff8f656a4f1de Merge: 7f9f852c75e7d 90cadbbf341dd Author: Linus Torvalds Date: Thu Dec 27 13:04:52 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: 1) New ipset extensions for matching on destination MAC addresses, from Stefano Brivio. 2) Add ipv4 ttl and tos, plus ipv6 flow label and hop limit offloads to nfp driver. From Stefano Brivio. 3) Implement GRO for plain UDP sockets, from Paolo Abeni. 4) Lots of work from Michał Mirosław to eliminate the VLAN_TAG_PRESENT bit so that we could support the entire vlan_tci value. 5) Rework the IPSEC policy lookups to better optimize more usecases, from Florian Westphal. 6) Infrastructure changes eliminating direct manipulation of SKB lists wherever possible, and to always use the appropriate SKB list helpers. This work is still ongoing... 7) Lots of PHY driver and state machine improvements and simplifications, from Heiner Kallweit. 8) Various TSO deferral refinements, from Eric Dumazet. 9) Add ntuple filter support to aquantia driver, from Dmitry Bogdanov. 10) Batch dropping of XDP packets in tuntap, from Jason Wang. 11) Lots of cleanups and improvements to the r8169 driver from Heiner Kallweit, including support for ->xmit_more. This driver has been getting some much needed love since he started working on it. 12) Lots of new forwarding selftests from Petr Machata. 13) Enable VXLAN learning in mlxsw driver, from Ido Schimmel. 14) Packed ring support for virtio, from Tiwei Bie. 15) Add new Aquantia AQtion USB driver, from Dmitry Bezrukov. 16) Add XDP support to dpaa2-eth driver, from Ioana Ciocoi Radulescu. 17) Implement coalescing on TCP backlog queue, from Eric Dumazet. 18) Implement carrier change in tun driver, from Nicolas Dichtel. 19) Support msg_zerocopy in UDP, from Willem de Bruijn. 20) Significantly improve garbage collection of neighbor objects when the table has many PERMANENT entries, from David Ahern. 21) Remove egdev usage from nfp and mlx5, and remove the facility completely from the tree as it no longer has any users. From Oz Shlomo and others. 22) Add a NETDEV_PRE_CHANGEADDR so that drivers can veto the change and therefore abort the operation before the commit phase (which is the NETDEV_CHANGEADDR event). From Petr Machata. 23) Add indirect call wrappers to avoid retpoline overhead, and use them in the GRO code paths. From Paolo Abeni. 24) Add support for netlink FDB get operations, from Roopa Prabhu. 25) Support bloom filter in mlxsw driver, from Nir Dotan. 26) Add SKB extension infrastructure. This consolidates the handling of the auxiliary SKB data used by IPSEC and bridge netfilter, and is designed to support the needs to MPTCP which could be integrated in the future. 27) Lots of XDP TX optimizations in mlx5 from Tariq Toukan. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1845 commits) net: dccp: fix kernel crash on module load drivers/net: appletalk/cops: remove redundant if statement and mask bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw net/net_namespace: Check the return value of register_pernet_subsys() net/netlink_compat: Fix a missing check of nla_parse_nested ieee802154: lowpan_header_create check must check daddr net/mlx4_core: drop useless LIST_HEAD mlxsw: spectrum: drop useless LIST_HEAD net/mlx5e: drop useless LIST_HEAD iptunnel: Set tun_flags in the iptunnel_metadata_reply from src net/mlx5e: fix semicolon.cocci warnings staging: octeon: fix build failure with XFRM enabled net: Revert recent Spectre-v1 patches. can: af_can: Fix Spectre v1 vulnerability packet: validate address length if non-zero nfc: af_nfc: Fix Spectre v1 vulnerability phonet: af_phonet: Fix Spectre v1 vulnerability net: core: Fix Spectre v1 vulnerability net: minor cleanup in skb_ext_add() net: drop the unused helper skb_ext_get() ... commit 7f9f852c75e7d776b078813586c76a2bc7dca993 Merge: 3f03bf93947fa 93d77e7f1410c Author: Linus Torvalds Date: Thu Dec 27 12:08:33 2018 -0800 Merge tag 'modules-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: - Some modules-related kallsyms cleanups and a kallsyms fix for ARM. - Include keys from the secondary keyring in module signature verification. * tag 'modules-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: ARM: module: Fix function kallsyms on Thumb-2 module: Overwrite st_size instead of st_info module: make it clearer when we're handling kallsyms symbols vs exported symbols modsign: use all trusted keys to verify module signature commit 3f03bf93947fa2a2b84fac56e93c65d4fffed7f1 Merge: fb2a624d5fe8b b49d564344f77 Author: Linus Torvalds Date: Thu Dec 27 12:04:52 2018 -0800 Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull general security subsystem updates from James Morris: "The main changes here are Paul Gortmaker's removal of unneccesary module.h infrastructure" * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: integrity: partial revert of make ima_main explicitly non-modular security: fs: make inode explicitly non-modular security: audit and remove any unnecessary uses of module.h security: integrity: make evm_main explicitly non-modular keys: remove needless modular infrastructure from ecryptfs_format security: integrity: make ima_main explicitly non-modular tomoyo: fix small typo commit fb2a624d5fe8b9206d14bff52da7a368a3a8374c Merge: 047ce6d380e8e ee1a84fdfeedf Author: Linus Torvalds Date: Thu Dec 27 12:01:58 2018 -0800 Merge tag 'selinux-pr-20181224' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux patches from Paul Moore: "I already used my best holiday pull request lines in the audit pull request, so this one is going to be a bit more boring, sorry about that. To make up for this, we do have a birthday of sorts to celebrate: SELinux turns 18 years old this December. Perhaps not the most exciting thing in the world for most people, but I think it's safe to say that anyone reading this email doesn't exactly fall into the "most people" category. Back to business and the pull request itself: Ondrej has five patches in this pull request and I lump them into three categories: one patch to always allow submounts (using similar logic to elsewhere in the kernel), one to fix some issues with the SELinux policydb, and the others to cleanup and improve the SELinux sidtab. The other patches from Alexey and Petr and trivial fixes that are adequately described in their respective subject lines. With this last pull request of the year, I want to thank everyone who has contributed patches, testing, and reviews to the SELinux project this year, and the past 18 years. Like any good open source effort, SELinux is only as good as the community which supports it, and I'm very happy that we have the community we do - thank you all!" * tag 'selinux-pr-20181224' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: overhaul sidtab to fix bug and improve performance selinux: use separate table for initial SID lookup selinux: make "selinux_policycap_names[]" const char * selinux: always allow mounting submounts selinux: refactor sidtab conversion Documentation: Update SELinux reference policy URL selinux: policydb - fix byte order and alignment issues commit 047ce6d380e8e66cfb6cbc22e873af89dd0c216c Merge: a3b5c1065f3fb d406db524c32c Author: Linus Torvalds Date: Thu Dec 27 11:58:50 2018 -0800 Merge tag 'audit-pr-20181224' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "In the finest of holiday of traditions, I have a number of gifts to share today. While most of them are re-gifts from others, unlike the typical re-gift, these are things you will want in and around your tree; I promise. This pull request is perhaps a bit larger than our typical PR, but most of it comes from Jan's rework of audit's fanotify code; a very welcome improvement. We ran this through our normal regression tests, as well as some newly created stress tests and everything looks good. Richard added a few patches, mostly cleaning up a few things and and shortening some of the audit records that we send to userspace; a change the userspace folks are quite happy about. Finally YueHaibing and I kick in a few patches to simplify things a bit and make the code less prone to errors. Lastly, I want to say thanks one more time to everyone who has contributed patches, testing, and code reviews for the audit subsystem over the past year. The project is what it is due to your help and contributions - thank you" * tag 'audit-pr-20181224' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: (22 commits) audit: remove duplicated include from audit.c audit: shorten PATH cap values when zero audit: use current whenever possible audit: minimize our use of audit_log_format() audit: remove WATCH and TREE config options audit: use session_info helper audit: localize audit_log_session_info prototype audit: Use 'mark' name for fsnotify_mark variables audit: Replace chunk attached to mark instead of replacing mark audit: Simplify locking around untag_chunk() audit: Drop all unused chunk nodes during deletion audit: Guarantee forward progress of chunk untagging audit: Allocate fsnotify mark independently of chunk audit: Provide helper for dropping mark's chunk reference audit: Remove pointless check in insert_hash() audit: Factor out chunk replacement code audit: Make hash table insertion safe against concurrent lookups audit: Embed key into chunk audit: Fix possible tagging failures audit: Fix possible spurious -ENOSPC error ... commit a3b5c1065f3fb934a87dd07d23def99916023d6f Merge: c6f1b355d4516 07c17732bd687 Author: Linus Torvalds Date: Thu Dec 27 11:24:43 2018 -0800 Merge tag 'printk-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - Keep spinlocks busted until the end of panic() - Fix races between calculating number of messages that would fit into user space buffers, filling the buffers, and switching printk.time parameter - Some code clean up * tag 'printk-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: Remove print_prefix() calls with NULL buffer. printk: fix printk_time race. printk: Make printk_emit() local function. panic: avoid deadlocks in re-entrant console drivers commit c6f1b355d451680a45d63ce66cea67057c938a87 Merge: c06e9ef6918b1 189af4657186d Author: Linus Torvalds Date: Thu Dec 27 11:19:07 2018 -0800 Merge tag 'gcc-plugins-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins update from Kees Cook: "Both arm and arm64 are gaining per-task stack canaries (to match x86), but arm is being done with a gcc plugin, hence it going through the gcc-plugins tree. New gcc-plugin: - Enable per-task stack protector for ARM (Ard Biesheuvel)" * tag 'gcc-plugins-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ARM: smp: add support for per-task stack canaries commit c06e9ef6918b1a6d183f1fef78ebc66f054a7b5a Merge: 8d6973327ee84 8665569e97dd5 Author: Linus Torvalds Date: Thu Dec 27 11:15:21 2018 -0800 Merge tag 'pstore-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "Improvements and refactorings: - Improve compression handling - Refactor argument handling during initialization - Avoid needless locking for saner EFI backend handling - Add more kern-doc and improve debugging output" * tag 'pstore-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/ram: Avoid NULL deref in ftrace merging failure path pstore: Convert buf_lock to semaphore pstore: Fix bool initialization/comparison pstore/ram: Do not treat empty buffers as valid pstore/ram: Simplify ramoops_get_next_prz() arguments pstore: Map PSTORE_TYPE_* to strings pstore: Replace open-coded << with BIT() pstore: Improve and update some comments and status output pstore/ram: Add kern-doc for struct persistent_ram_zone pstore/ram: Report backend assignments with finer granularity pstore/ram: Standardize module name in ramoops pstore: Avoid duplicate call of persistent_ram_zap() pstore: Remove needless lock during console writes pstore: Do not use crash buffer for decompression commit 8d6973327ee84c2f40dd9efd8928d4a1186c96e2 Merge: 6d101ba6be2a2 12526b0d6c580 Author: Linus Torvalds Date: Thu Dec 27 10:43:24 2018 -0800 Merge tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Notable changes: - Mitigations for Spectre v2 on some Freescale (NXP) CPUs. - A large series adding support for pass-through of Nvidia V100 GPUs to guests on Power9. - Another large series to enable hardware assistance for TLB table walk on MPC8xx CPUs. - Some preparatory changes to our DMA code, to make way for further cleanups from Christoph. - Several fixes for our Transactional Memory handling discovered by fuzzing the signal return path. - Support for generating our system call table(s) from a text file like other architectures. - A fix to our page fault handler so that instead of generating a WARN_ON_ONCE, user accesses of kernel addresses instead print a ratelimited and appropriately scary warning. - A cosmetic change to make our unhandled page fault messages more similar to other arches and also more compact and informative. - Freescale updates from Scott: "Highlights include elimination of legacy clock bindings use from dts files, an 83xx watchdog handler, fixes to old dts interrupt errors, and some minor cleanup." And many clean-ups, reworks and minor fixes etc. Thanks to: Alexandre Belloni, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Benjamin Herrenschmidt, Breno Leitao, Christian Lamparter, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Darren Stevens, David Gibson, Diana Craciun, Dmitry V. Levin, Firoz Khan, Geert Uytterhoeven, Greg Kurz, Gustavo Romero, Hari Bathini, Joel Stanley, Kees Cook, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring, Mathieu Malaterre, Michal Suchánek, Naveen N. Rao, Nick Desaulniers, Oliver O'Halloran, Paul Mackerras, Ram Pai, Ravi Bangoria, Rob Herring, Russell Currey, Sabyasachi Gupta, Sam Bobroff, Satheesh Rajendran, Scott Wood, Segher Boessenkool, Stephen Rothwell, Tang Yuantian, Thiago Jung Bauermann, Yangtao Li, Yuantian Tang, Yue Haibing" * tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (201 commits) Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask" powerpc/zImage: Also check for stdout-path powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y macintosh: Use of_node_name_{eq, prefix} for node name comparisons ide: Use of_node_name_eq for node name comparisons powerpc: Use of_node_name_eq for node name comparisons powerpc/pseries/pmem: Convert to %pOFn instead of device_node.name powerpc/mm: Remove very old comment in hash-4k.h powerpc/pseries: Fix node leak in update_lmb_associativity_index() powerpc/configs/85xx: Enable CONFIG_DEBUG_KERNEL powerpc/dts/fsl: Fix dtc-flagged interrupt errors clk: qoriq: add more compatibles strings powerpc/fsl: Use new clockgen binding powerpc/83xx: handle machine check caused by watchdog timer powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved" powerpc/fsl_pci: simplify fsl_pci_dma_set_mask arch/powerpc/fsl_rmu: Use dma_zalloc_coherent vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver vfio_pci: Allow regions to add own capabilities vfio_pci: Allow mapping extra regions ... commit 6d101ba6be2a26a3e1f513b5e293f0fd2b79ec5c Author: Olof Johansson Date: Sun Nov 25 14:41:05 2018 -0800 sched/fair: Fix warning on non-SMP build Caused by making the variable static: kernel/sched/fair.c:119:21: warning: 'capacity_margin' defined but not used [-Wunused-variable] Seems easiest to just move it up under the existing ifdef CONFIG_SMP that's a few lines above. Fixes: ed8885a14433a ('sched/fair: Make some variables static') Signed-off-by: Olof Johansson Signed-off-by: Linus Torvalds commit d025bff1b6b923ce9c2f744d8278e0f2d6609eaf Author: Dengcheng Zhu Date: Wed Dec 26 22:08:52 2018 +0000 mailmap: Update name spelling and email for Dengcheng Zhu Change my first name spelling from Deng-Cheng to Dengcheng. Update email addresses. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org commit 88cc9fc41c7318565bcf28a843b1e4e3f2acf894 Author: Aisheng Dong Date: Tue Dec 18 15:22:54 2018 +0000 dt-bindings: arm: fsl-scu: add imx8qm pinctrl support Update binding doc to support imx8qm pinctrl. Cc: Rob Herring Cc: Stefan Agner Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Pengutronix Kernel Team Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit b09f629ce36d94381f96a03ea1507861d1d5de3b Author: Abel Vesa Date: Sun Dec 23 07:08:31 2018 +0000 pinctrl: freescale: Break dependency on SOC_IMX8MQ for i.MX8MQ The CONFIG_SOC_IMX8MQ will go away, so the dependency can be based on ARCH_MXC && ARM64. Signed-off-by: Abel Vesa Acked-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij commit df50fcf5462cec45618bdb6013c84c469b73f3e5 Author: Guido Günther Date: Wed Dec 26 14:54:34 2018 +0100 pinctrl: imx-scu: Depend on IMX_SCU Otherwise building fails with only PINCTRL_IMX_SCU selected: aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinctrl_sc_ipc_init': pinctrl-scu.c:(.text+0x10): undefined reference to `imx_scu_get_handle' aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle' aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_get_scu': pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc' aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc' aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_set_scu': pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc' aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc' make: *** [Makefile:1038: vmlinux] Error 1 Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij commit 64beba0558fce7b59e9a8a7afd77290e82a22163 Author: Jaegeuk Kim Date: Wed Dec 26 19:54:07 2018 -0800 f2fs: sanity check of xattr entry size There is a security report where f2fs_getxattr() has a hole to expose wrong memory region when the image is malformed like this. f2fs_getxattr: entry->e_name_len: 4, size: 12288, buffer_size: 16384, len: 4 Cc: Signed-off-by: Jaegeuk Kim commit fc2fd5f0f1aa85925be2322275ee2dc5ac3acdf4 Merge: e57d9f638af96 c04e55388a4f2 Author: Linus Torvalds Date: Wed Dec 26 18:42:51 2018 -0800 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform update from Ingo Molnar: "An OLPC platform support simplification patch" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/olpc: Do not call of_platform_bus_probe() commit e57d9f638af9673f38d9f09de66fa0a28303127d Merge: d6e867a6ae13b 6848ac7ca39a2 Author: Linus Torvalds Date: Wed Dec 26 18:08:18 2018 -0800 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "The main changes in this cycle were: - Update and clean up x86 fault handling, by Andy Lutomirski. - Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() and related fallout, by Dan Williams. - CPA cleanups and reorganization by Peter Zijlstra: simplify the flow and remove a few warts. - Other misc cleanups" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits) x86/mm/dump_pagetables: Use DEFINE_SHOW_ATTRIBUTE() x86/mm/cpa: Rename @addrinarray to @numpages x86/mm/cpa: Better use CLFLUSHOPT x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into a single cpa_flush() function x86/mm/cpa: Make cpa_data::numpages invariant x86/mm/cpa: Optimize cpa_flush_array() TLB invalidation x86/mm/cpa: Simplify the code after making cpa->vaddr invariant x86/mm/cpa: Make cpa_data::vaddr invariant x86/mm/cpa: Add __cpa_addr() helper x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftests x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() x86/mm: Validate kernel_physical_mapping_init() PTE population generic/pgtable: Introduce set_pte_safe() generic/pgtable: Introduce {p4d,pgd}_same() generic/pgtable: Make {pmd, pud}_same() unconditionally available x86/fault: Clean up the page fault oops decoder a bit x86/fault: Decode page fault OOPSes better x86/vsyscall/64: Use X86_PF constants in the simulated #PF error code x86/oops: Show the correct CS value in show_regs() x86/fault: Don't try to recover from an implicit supervisor access ... commit d6e867a6ae13bc02cd01c535764e5b051d26cf28 Merge: db2ab474c4a43 12209993e98c5 Author: Linus Torvalds Date: Wed Dec 26 17:37:51 2018 -0800 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: "Misc preparatory changes for an upcoming FPU optimization that will delay the loading of FPU registers to return-to-userspace" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Don't export __kernel_fpu_{begin,end}() x86/fpu: Update comment for __raw_xsave_addr() x86/fpu: Add might_fault() to user_insn() x86/pkeys: Make init_pkru_value static x86/thread_info: Remove _TIF_ALLWORK_MASK x86/process/32: Remove asm/math_emu.h include x86/fpu: Use unsigned long long shift in xfeature_uncompacted_offset() commit db2ab474c4a434872e1794c2af8b2e561caa756e Merge: 312a466155108 aa02ef099cff0 Author: Linus Torvalds Date: Wed Dec 26 17:35:41 2018 -0800 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Ingo Molnar: "Misc changes: - Fix nr_cpus= boot option interaction bug with logical package management - Clean up UMIP detection messages - Add WBNOINVD instruction detection - Remove the unused get_scattered_cpuid_leaf() function" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology: Use total_cpus for max logical packages calculation x86/umip: Make the UMIP activated message generic x86/umip: Print UMIP line only once x86/cpufeatures: Add WBNOINVD feature definition x86/cpufeatures: Remove get_scattered_cpuid_leaf() commit 312a466155108329c458049dc76a21ad56106960 Merge: 6e54df001ac92 4b1bacab61aa2 Author: Linus Torvalds Date: Wed Dec 26 17:03:51 2018 -0800 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Remove trampoline_handler() prototype x86/kernel: Fix more -Wmissing-prototypes warnings x86: Fix various typos in comments x86/headers: Fix -Wmissing-prototypes warning x86/process: Avoid unnecessary NULL check in get_wchan() x86/traps: Complete prototype declarations x86/mce: Fix -Wmissing-prototypes warnings x86/gart: Rewrite early_gart_iommu_check() comment commit 6e54df001ac9262e3b78b34b87390fcb54677a0d Merge: 9a126e788af8e e4f752dda0de3 Author: Linus Torvalds Date: Wed Dec 26 16:57:27 2018 -0800 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: - Resolve LLVM build bug by removing redundant GNU specific flag - Remove obsolete -funit-at-a-time and -fno-unit-at-a-time use from x86 PowerPC and UM. The UML change was seen and acked by UML maintainer Richard Weinberger. * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/um/vdso: Drop implicit common-page-size linker flag x86, powerpc: Remove -funit-at-a-time compiler option entirely x86/um: Remove -fno-unit-at-a-time workaround for pre-4.0 GCC commit 9a126e788af8e0754d5d19cd98b3a2bc1711ff46 Merge: 38fabca18fc4c 69be4efeb9591 Author: Linus Torvalds Date: Wed Dec 26 16:56:00 2018 -0800 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: "Two cleanups" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Add missing va_end() to die() x86/boot: Simplify the detect_memory*() control flow commit 38fabca18fc4c832ea95e2d14fb1ecde8b7dcc56 Merge: 8465625ab4700 29434801e7e9c Author: Linus Torvalds Date: Wed Dec 26 16:25:06 2018 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "Two changes: - Remove (some) remnants of the vDSO's fake section table mechanism that were left behind when the vDSO build process reverted to using "objdump -S" to strip the userspace image. - Remove hardcoded POPCNT mnemonics now that the minimum binutils version supports the symbolic form" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Remove a stale/misleading comment from the linker script x86/vdso: Remove obsolete "fake section table" reservation x86: Use POPCNT mnemonics in arch_hweight.h commit 8465625ab4700e3e1db506ed8a541f7796356d63 Merge: 17bf423a1f2d1 210ba1201ff95 Author: Linus Torvalds Date: Wed Dec 26 16:12:50 2018 -0800 Merge branch 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 AMD northbridge updates from Ingo Molnar: "Update DF/SMN access and k10temp for AMD F17h M30h, by Brian Woods: 'Updates the data fabric/system management network code needed to get k10temp working for M30h. Since there are now processors which have multiple roots per DF/SMN interface, there needs to some logic which skips N-1 root complexes per DF/SMN interface. This is because the root complexes per interface are redundant (as far as DF/SMN goes). These changes shouldn't effect past processors and, for F17h M0Xh, the mappings stay the same.' The hwmon changes were seen and acked by hwmon maintainer Guenter Roeck" * 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hwmon/k10temp: Add support for AMD family 17h, model 30h CPUs x86/amd_nb: Add PCI device IDs for family 17h, model 30h x86/amd_nb: Add support for newer PCI topologies hwmon/k10temp, x86/amd_nb: Consolidate shared device IDs commit 60aa4d5536ab7fe32433ca1173bd9d6633851f27 Author: Sahitya Tummala Date: Wed Dec 26 11:20:29 2018 +0530 f2fs: fix use-after-free issue when accessing sbi->stat_info iput() on sbi->node_inode can update sbi->stat_info in the below context, if the f2fs_write_checkpoint() has failed with error. f2fs_balance_fs_bg+0x1ac/0x1ec f2fs_write_node_pages+0x4c/0x260 do_writepages+0x80/0xbc __writeback_single_inode+0xdc/0x4ac writeback_single_inode+0x9c/0x144 write_inode_now+0xc4/0xec iput+0x194/0x22c f2fs_put_super+0x11c/0x1e8 generic_shutdown_super+0x70/0xf4 kill_block_super+0x2c/0x5c kill_f2fs_super+0x44/0x50 deactivate_locked_super+0x60/0x8c deactivate_super+0x68/0x74 cleanup_mnt+0x40/0x78 Fix this by moving f2fs_destroy_stats() further below iput() in both f2fs_put_super() and f2fs_fill_super() paths. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bae0ee7a767ceeea6d8e170da3f228fbc7480331 Author: Chao Yu Date: Tue Dec 25 17:43:42 2018 +0800 f2fs: check PageWriteback flag for ordered case For all ordered cases in f2fs_wait_on_page_writeback(), we need to check PageWriteback status, so let's clean up to relocate the check into f2fs_wait_on_page_writeback(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 88960068f25fcc3759455d85460234dcc9d43fef Author: Martin Blumenstingl Date: Sat Dec 22 11:22:26 2018 +0100 f2fs: fix validation of the block count in sanity_check_raw_super Treat "block_count" from struct f2fs_super_block as 64-bit little endian value in sanity_check_raw_super() because struct f2fs_super_block declares "block_count" as "__le64". This fixes a bug where the superblock validation fails on big endian devices with the following error: F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0) F2FS-fs (sda1): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0) F2FS-fs (sda1): Can't find valid F2FS filesystem in 2th superblock As result of this the partition cannot be mounted. With this patch applied the superblock validation works fine and the partition can be mounted again: F2FS-fs (sda1): Mounted with checkpoint version = 7c84 My little endian x86-64 hardware was able to mount the partition without this fix. To confirm that mounting f2fs filesystems works on big endian machines again I tested this on a 32-bit MIPS big endian (lantiq) device. Fixes: 0cfe75c5b01199 ("f2fs: enhance sanity_check_raw_super() to avoid potential overflows") Cc: stable@vger.kernel.org Signed-off-by: Martin Blumenstingl Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8f31b4665c14fe19593601a250275e58c7ad0ef1 Author: Jaegeuk Kim Date: Mon Dec 17 17:08:26 2018 -0800 f2fs: fix missing unlock(sbi->gc_mutex) This fixes missing unlock call. Cc: Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b32e019049e959ee10ec359893c9dd5d057dad55 Author: Chao Yu Date: Tue Dec 18 19:20:17 2018 +0800 f2fs: fix to dirty inode synchronously If user change inode's i_flags via ioctl, let's add it into global dirty list, so that checkpoint can guarantee its persistence before fsync, it can make checkpoint keeping strong consistency. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c0362117c3b87322366865e8db000449e5ec2caf Author: Chao Yu Date: Tue Dec 18 19:20:16 2018 +0800 f2fs: clean up structure extent_node The union in struct extent_node wass only to indicate below fields struct rb_node rb_node; union { struct { unsigned int fofs; unsigned int len; ... ... can be parsed as fields in struct rb_entry, but they were never be used explicitly before, so let's remove them for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9249dded7b5cb539a8c8698b25d08a3c15261470 Author: Qiuyang Sun Date: Tue Dec 18 17:32:23 2018 +0800 f2fs: fix block address for __check_sit_bitmap Should use lstart (logical start address) instead of start (in dev) here. This fixes a bug in multi-device scenarios. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e4589fa545e0020dbbc3c9bde35f35f949901392 Author: Sahitya Tummala Date: Tue Dec 18 16:39:24 2018 +0530 f2fs: fix sbi->extent_list corruption issue When there is a failure in f2fs_fill_super() after/during the recovery of fsync'd nodes, it frees the current sbi and retries again. This time the mount is successful, but the files that got recovered before retry, still holds the extent tree, whose extent nodes list is corrupted since sbi and sbi->extent_list is freed up. The list_del corruption issue is observed when the file system is getting unmounted and when those recoverd files extent node is being freed up in the below context. list_del corruption. prev->next should be fffffff1e1ef5480, but was (null) <...> kernel BUG at kernel/msm-4.14/lib/list_debug.c:53! lr : __list_del_entry_valid+0x94/0xb4 pc : __list_del_entry_valid+0x94/0xb4 <...> Call trace: __list_del_entry_valid+0x94/0xb4 __release_extent_node+0xb0/0x114 __free_extent_tree+0x58/0x7c f2fs_shrink_extent_tree+0xdc/0x3b0 f2fs_leave_shrinker+0x28/0x7c f2fs_put_super+0xfc/0x1e0 generic_shutdown_super+0x70/0xf4 kill_block_super+0x2c/0x5c kill_f2fs_super+0x44/0x50 deactivate_locked_super+0x60/0x8c deactivate_super+0x68/0x74 cleanup_mnt+0x40/0x78 __cleanup_mnt+0x1c/0x28 task_work_run+0x48/0xd0 do_notify_resume+0x678/0xe98 work_pending+0x8/0x14 Fix this by not creating extents for those recovered files if shrinker is not registered yet. Once mount is successful and shrinker is registered, those files can have extents again. Signed-off-by: Sahitya Tummala Signed-off-by: Jaegeuk Kim commit 8ec18bff7b90b56eba5986555c174721ebd5670b Author: Chao Yu Date: Wed Dec 12 18:12:32 2018 +0800 f2fs: clean up checkpoint flow This patch cleans up checkpoint flow a bit: - remove unneeded circulation of flushing meta pages. - don't flush nat_bits pages in prior to other checkpoint pages. - add bug_on to check remained meta pages after flushing. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 76c7bfb3a89371aa87bda99c8ee2611ff5150434 Author: Jaegeuk Kim Date: Thu Dec 13 20:50:51 2018 -0800 f2fs: flush stale issued discard candidates Sometimes, I could observe # of issuing_discard to be 1 which blocks background jobs due to is_idle()=false. The only way to get out of it was to trigger gc_urgent. This patch avoids that by checking any candidates as done in the list. Signed-off-by: Jaegeuk Kim commit 72691af6dbd719349c559117652a70bfd4309ad2 Author: Jaegeuk Kim Date: Thu Dec 13 16:53:57 2018 -0800 f2fs: correct wrong spelling, issing_* Let's use "queued" instead of "issuing". Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5222595d093ebe80329d38d255d14316257afb3e Author: Jaegeuk Kim Date: Thu Dec 13 18:38:33 2018 -0800 f2fs: use kvmalloc, if kmalloc is failed One report says memalloc failure during mount. (unwind_backtrace) from [] (show_stack+0x10/0x14) (show_stack) from [] (dump_stack+0x8c/0xa0) (dump_stack) from [] (warn_alloc+0xc4/0x160) (warn_alloc) from [] (__alloc_pages_nodemask+0x3f4/0x10d0) (__alloc_pages_nodemask) from [] (kmalloc_order_trace+0x2c/0x120) (kmalloc_order_trace) from [] (build_node_manager+0x35c/0x688) (build_node_manager) from [] (f2fs_fill_super+0xf0c/0x16cc) (f2fs_fill_super) from [] (mount_bdev+0x15c/0x188) (mount_bdev) from [] (f2fs_mount+0x18/0x20) (f2fs_mount) from [] (mount_fs+0x158/0x19c) (mount_fs) from [] (vfs_kern_mount+0x78/0x134) (vfs_kern_mount) from [] (do_mount+0x474/0xca4) (do_mount) from [] (SyS_mount+0x94/0xbc) (SyS_mount) from [] (ret_fast_syscall+0x0/0x48) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit af56b4870865654dc9aca2c757b95dfe3e715603 Author: Yunlong Song Date: Thu Dec 13 17:43:11 2018 +0800 f2fs: remove redundant comment of unused wio_mutex Commit 089842de ("f2fs: remove codes of unused wio_mutex") removes codes of unused wio_mutex, but missing the comment, so delete it. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 17bf423a1f2d134187191f0ceb4b395173cc98a7 Merge: 116b081c285d8 732cd75b8c920 Author: Linus Torvalds Date: Wed Dec 26 14:56:10 2018 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - Introduce "Energy Aware Scheduling" - by Quentin Perret. This is a coherent topology description of CPUs in cooperation with the PM subsystem, with the goal to schedule more energy-efficiently on asymetric SMP platform - such as waking up tasks to the more energy-efficient CPUs first, as long as the system isn't oversubscribed. For details of the design, see: https://lore.kernel.org/lkml/20180724122521.22109-1-quentin.perret@arm.com/ - Misc cleanups and smaller enhancements" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) sched/fair: Select an energy-efficient CPU on task wake-up sched/fair: Introduce an energy estimation helper function sched/fair: Add over-utilization/tipping point indicator sched/fair: Clean-up update_sg_lb_stats parameters sched/toplogy: Introduce the 'sched_energy_present' static key sched/topology: Make Energy Aware Scheduling depend on schedutil sched/topology: Disable EAS on inappropriate platforms sched/topology: Add lowest CPU asymmetry sched_domain level pointer sched/topology: Reference the Energy Model of CPUs when available PM: Introduce an Energy Model management framework sched/cpufreq: Prepare schedutil for Energy Aware Scheduling sched/topology: Relocate arch_scale_cpu_capacity() to the internal header sched/core: Remove unnecessary unlikely() in push_*_task() sched/topology: Remove the ::smt_gain field from 'struct sched_domain' sched: Fix various typos in comments sched/core: Clean up the #ifdef block in add_nr_running() sched/fair: Make some variables static sched/core: Create task_has_idle_policy() helper sched/fair: Add lsub_positive() and use it consistently sched/fair: Mask UTIL_AVG_UNCHANGED usages ... commit 116b081c285d89dc6ece72eeecc6aa3979e8b54e Merge: 1eefdec18eded 883f4def8b77e Author: Linus Torvalds Date: Wed Dec 26 14:45:18 2018 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main changes in this cycle on the kernel side: - rework kprobes blacklist handling (Masami Hiramatsu) - misc cleanups on the tooling side these areas were the main focus: - 'perf trace' enhancements (Arnaldo Carvalho de Melo) - 'perf bench' enhancements (Davidlohr Bueso) - 'perf record' enhancements (Alexey Budankov) - 'perf annotate' enhancements (Jin Yao) - 'perf top' enhancements (Jiri Olsa) - Intel hw tracing enhancements (Adrian Hunter) - ARM hw tracing enhancements (Leo Yan, Mathieu Poirier) - ... plus lots of other enhancements, cleanups and fixes" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (171 commits) tools uapi asm: Update asm-generic/unistd.h copy perf symbols: Relax checks on perf-PID.map ownership perf trace: Wire up the fadvise 'advice' table generator perf beauty: Add generator for fadvise64's 'advice' arg constants tools headers uapi: Grab a copy of fadvise.h perf beauty mmap: Print mmap's 'offset' arg in hexadecimal perf beauty mmap: Print PROT_READ before PROT_EXEC to match strace output perf trace beauty: Beautify arch_prctl()'s arguments perf trace: When showing string prefixes show prefix + ??? for unknown entries perf trace: Move strarrays to beauty.h for further reuse perf beauty: Wire up the x86_arch prctl code table generator perf beauty: Add a string table generator for x86's 'arch_prctl' codes tools include arch: Grab a copy of x86's prctl.h perf trace: Show NULL when syscall pointer args are 0 perf trace: Enclose the errno strings with () perf augmented_raw_syscalls: Copy 'access' arg as well perf trace: Add alignment spaces after the closing parens perf trace beauty: Print O_RDONLY when (flags & O_ACCMODE) == 0 perf trace: Allow asking for not suppressing common string prefixes perf trace: Add a prefix member to the strarray class ... commit 1eefdec18eded41833401cfd64749643ff72e7da Merge: 684019dd1f009 80eb865768703 Author: Linus Torvalds Date: Wed Dec 26 14:25:52 2018 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main change in this cycle are initial preparatory bits of dynamic lockdep keys support from Bart Van Assche. There are also misc changes, a comment cleanup and a data structure cleanup" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Clean up comment in nohz_idle_balance() locking/lockdep: Stop using RCU primitives to access 'all_lock_classes' locking/lockdep: Make concurrent lockdep_reset_lock() calls safe locking/lockdep: Remove a superfluous INIT_LIST_HEAD() statement locking/lockdep: Introduce lock_class_cache_is_registered() locking/lockdep: Inline __lockdep_init_map() locking/lockdep: Declare local symbols static tools/lib/lockdep/tests: Test the lockdep_reset_lock() implementation tools/lib/lockdep: Add dummy print_irqtrace_events() implementation tools/lib/lockdep: Rename "trywlock" into "trywrlock" tools/lib/lockdep/tests: Run lockdep tests a second time under Valgrind tools/lib/lockdep/tests: Improve testing accuracy tools/lib/lockdep/tests: Fix shellcheck warnings tools/lib/lockdep/tests: Display compiler warning and error messages locking/lockdep: Remove ::version from lock_class structure commit 684019dd1f0092b4ffce4958c84aff0891deac83 Merge: 792bf4d871dea 1debf0958fa27 Author: Linus Torvalds Date: Wed Dec 26 13:38:38 2018 -0800 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Allocate the E820 buffer before doing the GetMemoryMap/ExitBootServices dance so we don't run out of space - Clear EFI boot services mappings when freeing the memory - Harden efivars against callers that invoke it on non-EFI boots - Reduce the number of memblock reservations resulting from extensive use of the new efi_mem_reserve_persistent() API - Other assorted fixes and cleanups" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE efi: Reduce the amount of memblock reservations for persistent allocations efi: Permit multiple entries in persistent memreserve data structure efi/libstub: Disable some warnings for x86{,_64} x86/efi: Move efi__boot_services() to arch/x86 x86/efi: Unmap EFI boot services code/data regions from efi_pgd x86/mm/pageattr: Introduce helper function to unmap EFI boot services efi/fdt: Simplify the get_fdt() flow efi/fdt: Indentation fix firmware/efi: Add NULL pointer checks in efivars API functions commit 792bf4d871dea8b69be2aaabdd320d7c6ed15985 Merge: eed9688f85131 4bbfd7467cfc7 Author: Linus Torvalds Date: Wed Dec 26 13:07:19 2018 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The biggest RCU changes in this cycle were: - Convert RCU's BUG_ON() and similar calls to WARN_ON() and similar. - Replace calls of RCU-bh and RCU-sched update-side functions to their vanilla RCU counterparts. This series is a step towards complete removal of the RCU-bh and RCU-sched update-side functions. ( Note that some of these conversions are going upstream via their respective maintainers. ) - Documentation updates, including a number of flavor-consolidation updates from Joel Fernandes. - Miscellaneous fixes. - Automate generation of the initrd filesystem used for rcutorture testing. - Convert spin_is_locked() assertions to instead use lockdep. ( Note that some of these conversions are going upstream via their respective maintainers. ) - SRCU updates, especially including a fix from Dennis Krein for a bag-on-head-class bug. - RCU torture-test updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (112 commits) rcutorture: Don't do busted forward-progress testing rcutorture: Use 100ms buckets for forward-progress callback histograms rcutorture: Recover from OOM during forward-progress tests rcutorture: Print forward-progress test age upon failure rcutorture: Print time since GP end upon forward-progress failure rcutorture: Print histogram of CB invocation at OOM time rcutorture: Print GP age upon forward-progress failure rcu: Print per-CPU callback counts for forward-progress failures rcu: Account for nocb-CPU callback counts in RCU CPU stall warnings rcutorture: Dump grace-period diagnostics upon forward-progress OOM rcutorture: Prepare for asynchronous access to rcu_fwd_startat torture: Remove unnecessary "ret" variables rcutorture: Affinity forward-progress test to avoid housekeeping CPUs rcutorture: Break up too-long rcu_torture_fwd_prog() function rcutorture: Remove cbflood facility torture: Bring any extra CPUs online during kernel startup rcutorture: Add call_rcu() flooding forward-progress tests rcutorture/formal: Replace synchronize_sched() with synchronize_rcu() tools/kernel.h: Replace synchronize_sched() with synchronize_rcu() net/decnet: Replace rcu_barrier_bh() with rcu_barrier() ... commit eed9688f8513189295887e5a27ec7f576754b60e Merge: 72af84151fa7e 72a8f089c382c Author: Linus Torvalds Date: Wed Dec 26 13:03:47 2018 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: "This time around we have a subsystem reorganization to offer, with the new directory being arch/x86/kernel/cpu/mce/ and all compilation units' names streamlined under it" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Restore MCE injector's module name x86/mce: Unify pr_* prefix x86/mce: Streamline MCE subsystem's naming commit 72af84151fa7e98720a0482b59de2d90ec7f10a7 Merge: a52fb43a5faa4 2ffcbce39ea1e Author: Linus Torvalds Date: Wed Dec 26 12:55:57 2018 -0800 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode loading updates from Borislav Petkov: "This update contains work started by Maciej to make the microcode container verification more robust against all kinds of corruption and also unify verification paths between early and late loading. The result is a set of verification routines which validate the microcode blobs before loading it on the CPU. In addition, the code is a lot more streamlined and unified. In the process, some of the aspects of patch handling and loading were simplified. All provided by Maciej S. Szmigiero and Borislav Petkov" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Update copyright x86/microcode/AMD: Check the equivalence table size when scanning it x86/microcode/AMD: Convert CPU equivalence table variable into a struct x86/microcode/AMD: Check microcode container data in the late loader x86/microcode/AMD: Fix container size's type x86/microcode/AMD: Convert early parser to the new verification routines x86/microcode/AMD: Change verify_patch()'s return value x86/microcode/AMD: Move chipset-specific check into verify_patch() x86/microcode/AMD: Move patch family check to verify_patch() x86/microcode/AMD: Simplify patch family detection x86/microcode/AMD: Concentrate patch verification x86/microcode/AMD: Cleanup verify_patch_size() more x86/microcode/AMD: Clean up per-family patch size checks x86/microcode/AMD: Move verify_patch_size() up in the file x86/microcode/AMD: Add microcode container verification x86/microcode/AMD: Subtract SECTION_HDR_SIZE from file leftover length commit a52fb43a5faa40507cb164a793a7fa08da863ac7 Merge: 42b00f122cfbf 52eb74339a623 Author: Linus Torvalds Date: Wed Dec 26 12:17:43 2018 -0800 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache control updates from Borislav Petkov: - The generalization of the RDT code to accommodate the addition of AMD's very similar implementation of the cache monitoring feature. This entails a subsystem move into a separate and generic arch/x86/kernel/cpu/resctrl/ directory along with adding vendor-specific initialization and feature detection helpers. Ontop of that is the unification of user-visible strings, both in the resctrl filesystem error handling and Kconfig. Provided by Babu Moger and Sherry Hurwitz. - Code simplifications and error handling improvements by Reinette Chatre. * 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix rdt_find_domain() return value and checks x86/resctrl: Remove unnecessary check for cbm_validate() x86/resctrl: Use rdt_last_cmd_puts() where possible MAINTAINERS: Update resctrl filename patterns Documentation: Rename and update intel_rdt_ui.txt to resctrl_ui.txt x86/resctrl: Introduce AMD QOS feature x86/resctrl: Fixup the user-visible strings x86/resctrl: Add AMD's X86_FEATURE_MBA to the scattered CPUID features x86/resctrl: Rename the config option INTEL_RDT to RESCTRL x86/resctrl: Add vendor check for the MBA software controller x86/resctrl: Bring cbm_validate() into the resource structure x86/resctrl: Initialize the vendor-specific resource functions x86/resctrl: Move all the macros to resctrl/internal.h x86/resctrl: Re-arrange the RDT init code x86/resctrl: Rename the RDT functions and definitions x86/resctrl: Rename and move rdt files to a separate directory commit 42b00f122cfbfed79fc29b0b3610f3abbb1e3864 Merge: 460023a5d1d2a a0aea130afebc Author: Linus Torvalds Date: Wed Dec 26 11:46:28 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "ARM: - selftests improvements - large PUD support for HugeTLB - single-stepping fixes - improved tracing - various timer and vGIC fixes x86: - Processor Tracing virtualization - STIBP support - some correctness fixes - refactorings and splitting of vmx.c - use the Hyper-V range TLB flush hypercall - reduce order of vcpu struct - WBNOINVD support - do not use -ftrace for __noclone functions - nested guest support for PAUSE filtering on AMD - more Hyper-V enlightenments (direct mode for synthetic timers) PPC: - nested VFIO s390: - bugfixes only this time" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (171 commits) KVM: x86: Add CPUID support for new instruction WBNOINVD kvm: selftests: ucall: fix exit mmio address guessing Revert "compiler-gcc: disable -ftracer for __noclone functions" KVM: VMX: Move VM-Enter + VM-Exit handling to non-inline sub-routines KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobs KVM: x86: Use jmp to invoke kvm_spurious_fault() from .fixup MAINTAINERS: Add arch/x86/kvm sub-directories to existing KVM/x86 entry KVM/x86: Use SVM assembly instruction mnemonics instead of .byte streams KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range() KVM/MMU: Flush tlb directly in kvm_set_pte_rmapp() KVM/MMU: Move tlb flush in kvm_set_pte_rmapp() to kvm_mmu_notifier_change_pte() KVM: Make kvm_set_spte_hva() return int KVM: Replace old tlb flush function with new one to flush a specified range. KVM/MMU: Add tlb flush with range helper function KVM/VMX: Add hv tlb range flush support x86/hyper-v: Add HvFlushGuestAddressList hypercall support KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops KVM: x86: Disable Intel PT when VMXON in L1 guest KVM: x86: Set intercept for Intel PT MSRs read/write KVM: x86: Implement Intel PT MSRs read/write emulation ... commit 460023a5d1d2aa0f733b6708b2fae5ea9f9dfec0 Merge: a5f2bd479f58f 58f9d806d16a3 Author: Linus Torvalds Date: Wed Dec 26 11:35:07 2018 -0800 Merge tag 'for-linus-4.21-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Xen features and fixes: - a series to enable KVM guests to be booted by qemu via the Xen PVH boot entry for speeding up KVM guest tests - a series for a common driver to be used by Xen PV frontends (right now drm and sound) - two other fixes in Xen related code" * tag 'for-linus-4.21-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: ALSA: xen-front: Use Xen common shared buffer implementation drm/xen-front: Use Xen common shared buffer implementation xen: Introduce shared buffer helpers for page directory... xen/pciback: Check dev_data before using it kprobes/x86/xen: blacklist non-attachable xen interrupt functions KVM: x86: Allow Qemu/KVM to use PVH entry point xen/pvh: Add memory map pointer to hvm_start_info struct xen/pvh: Move Xen code for getting mem map via hcall out of common file xen/pvh: Move Xen specific PVH VM initialization out of common file xen/pvh: Create a new file for Xen specific PVH code xen/pvh: Move PVH entry code out of Xen specific tree xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH commit a5f2bd479f58f171a16a9a4f3b4e748ab3057c0f Merge: 89261c5702135 930e12992ed32 Author: Linus Torvalds Date: Wed Dec 26 11:14:52 2018 -0800 Merge branch 'parisc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "The major change in this patchset is the new system call table generation support from Firoz Khan" * 'parisc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: syscalls: ignore nfsservctl for other architectures parisc: generate uapi header and system call table files parisc: add system call table generation support parisc: remove __NR_Linux from uapi header file. parisc: add __NR_syscalls along with __NR_Linux_syscalls parisc: move __IGNORE* entries to non uapi header parisc: Fix HP SDC hpa address output parisc: Fix serio address output parisc: Split out alternative live patching code commit 89261c57021352045c4af24522c6854c9ee90139 Merge: c2f1f3e0e17d9 adcc81f148d73 Author: Linus Torvalds Date: Wed Dec 26 10:45:33 2018 -0800 Merge tag 'mips_4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Paul Burton: "Here's the main MIPS pull for Linux 4.21. Core architecture changes include: - Syscall tables & definitions for unistd.h are now generated by scripts, providing greater consistency with other architectures & making it easier to add new syscalls. - Support for building kernels with no floating point support, upon which any userland attempting to use floating point instructions will receive a SIGILL. Mostly useful to shrink the kernel & as preparation for nanoMIPS support which does not yet include FP. - MIPS SIMD Architecture (MSA) vector register context is now exposed by ptrace via a new NT_MIPS_MSA regset. - ASIDs are now stored as 64b values even for MIPS32 kernels, expanding the ASID version field sufficiently that we don't need to worry about overflow & avoiding rare issues with reused ASIDs that have been observed in the wild. - The branch delay slot "emulation" page is now mapped without write permission for the user, preventing its use as a nice location for attacks to execute malicious code from. - Support for ioremap_prot(), primarily to allow gdb or other ptrace users the ability to view their tracee's memory using the same cache coherency attribute. - Optimizations to more cpu_has_* macros, allowing more to be compile-time constant where possible. - Enable building the whole kernel with UBSAN instrumentation. - Enable building the kernel with link-time dead code & data elimination. Platform specific changes include: - The Boston board gains a workaround for DMA prefetching issues with the EG20T Platform Controller Hub that it uses. - Cleanups to Cavium Octeon code removing about 20k lines of redundant code, mostly unused or duplicate register definitions in headers. - defconfig updates for the DECstation machines, including new defconfigs for r4k & 64b machines. - Further work on Loongson 3 support. - DMA fixes for SiByte machines" * tag 'mips_4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (95 commits) MIPS: math-emu: Write-protect delay slot emulation pages MIPS: Remove struct mm_context_t fp_mode_switching field mips: generate uapi header and system call table files mips: add system call table generation support mips: remove syscall table entries mips: add +1 to __NR_syscalls in uapi header mips: rename scall64-64.S to scall64-n64.S mips: remove unused macros mips: add __NR_syscalls along with __NR_Linux_syscalls MIPS: Expand MIPS32 ASIDs to 64 bits MIPS: OCTEON: delete redundant register definitions MIPS: OCTEON: cvmx_gmxx_inf_mode: use oldest forward compatible definition MIPS: OCTEON: cvmx_mio_fus_dat3: use oldest forward compatible definition MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition MIPS: OCTEON: octeon-usb: use common gpio_bit definition MIPS: OCTEON: enable all OCTEON drivers in defconfig mips: annotate implicit fall throughs MIPS: Hardcode cpu_has_mips* where target ISA allows MIPS: MT: Remove norps command line parameter MIPS: Only include mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y ... commit c2f1f3e0e17d94ab0c66d83e669492cb9e9a3698 Merge: 9830afca92737 c23b8e7acea3d Author: Linus Torvalds Date: Wed Dec 26 10:32:18 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next Pull sparc updates from David Miller: - Automatic system call table generation, from Firoz Khan. - Clean up accesses to the OF device names by using full_name instead of path_component_name. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: ALSA: sparc: Use of_node_name_eq for node name comparisons sbus: Use of_node_name_eq for node name comparisons sparc: generate uapi header and system call table files sparc: add system call table generation support sparc: add __NR_syscalls along with NR_syscalls sparc: move __IGNORE* entries to non uapi header sparc: Use DT node full_name instead of name for resources sparc: Remove unused leon_trans_init sparc: Use device_type helpers to access the node type sparc: Use of_node_name_eq for node name comparisons sparc: Convert to using %pOFn instead of device_node.name sparc: prom: use property "name" directly to construct node names of: Drop full path from full_name for PDT systems sparc: Convert to using %pOF instead of full_name fs/openpromfs: Use of_node_name_eq for node name comparisons fs/openpromfs: use full_name instead of path_component_name commit 9830afca9273787f32e236ae5d0e4d3a378ae842 Merge: 30807ef2b76e0 9b9afe4a0ef14 Author: Linus Torvalds Date: Wed Dec 26 10:29:47 2018 -0800 Merge tag 'riscv-for-linus-4.21-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V updates from Palmer Dabbelt: "We don't have many patches for this merge window, probably because everything has been a bit busy with the holidays and conferences. The only big user-visible change is to move over to an SBI-based earlycon instead of our arch-specific early printk support. The only outstanding patch set I know of is the audit patch set, which I've managed to make a mess of and will attempt to clean up" * tag 'riscv-for-linus-4.21-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: RISC-V: Select GENERIC_SCHED_CLOCK for clocksource drivers RISC-V: lib: minor asm cleanup RISC-V: Update Kconfig to better handle CMDLINE riscv: remove unused variable in ftrace RISC-V: add of_node_put() RISC-V: Fix of_node_* refcount riscv, atomic: Add #define's for the atomic_{cmp,}xchg_*() variants RISC-V: Remove EARLY_PRINTK support RISC-V: defconfig: Enable RISC-V SBI earlycon support commit 30807ef2b76e01ea209fcad66a87e534ed1edb40 Merge: 507413a5f88a2 19d111ccce9f4 Author: Linus Torvalds Date: Wed Dec 26 10:28:09 2018 -0800 Merge tag 'microblaze-v5.0-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull arch/microblaze updates from Michal Simek: - Fix multiple Kbuild/Makefile issues - Start to use system call table generation * tag 'microblaze-v5.0-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: remove the explicit removal of system.dtb microblaze: fix race condition in building boot images microblaze: add linux.bin* and simpleImage.* to PHONY microblaze: fix multiple bugs in arch/microblaze/boot/Makefile microblaze: move "... is ready" messages to arch/microblaze/Makefile microblaze: adjust the help to the real behavior microblaze: generate uapi header and system call table files microblaze: add system call table generation support microblaze: move __NR_syscalls macro from asm/unistd.h microblaze: Typo s/use use/use/ commit 507413a5f88a2240b2c19cb4318166614e2349d9 Merge: 9947ab7bc3f5f 2b3c5a99d5f31 Author: Linus Torvalds Date: Wed Dec 26 10:23:12 2018 -0800 Merge tag 'asm-generic-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull arch/sh syscall table scripting from Arnd Bergmann: "I worked with Firoz Khan to change all architectures to have their system call tables (syscall.S and asm/unistd.h) generated by a script from a more readable input file the same way that we already had on x86, s390 and arm. I offered to take those conversions through the asm-generic tree that did not get picked up by the architecture maintainers, and fortunately all but one have now been accepted into arch maintainer trees, so this branch only contains the conversion for arch/sh/, with permission from Rich. The conversion does not include the old 64-bit sh5 architecture, which has never shipped and not even compiled in a long time. The table in include/uapi/asm/unistd.h is also not included here, as Firoz is still working on that one, it will have to wait for the next following merge window, hopefully together with the addition of the 64-bit time_t system calls for the y2038 work that led to the system call table rework" * tag 'asm-generic-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: sh: generate uapi header and syscall table header files sh: add system call table generation support sh: add __NR_syscalls along with NR_syscalls commit 9947ab7bc3f5facb4e62c72d9db448f7ad52bc28 Merge: e0783bb42448a c51836246f977 Author: Linus Torvalds Date: Wed Dec 26 10:21:11 2018 -0800 Merge tag 'please-pull-y2038prep' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 updates from Tony Luck: "Change ia64 to make it easier to update system call tables (in line with some other architectures). This is in preparation for y2038 changes which are forecasted to add several new system calls" * tag 'please-pull-y2038prep' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64: generate uapi header and system call table files ia64: add system call table generation support ia64: add an offset for system call number ia64: add __NR_syscalls along with NR_syscalls ia64: add __NR_old_getpagesize in uapi header file commit e0783bb42448a4f2a6bd405c890010a3950feada Merge: 5694cecdb0926 005e13a96c0ed Author: Linus Torvalds Date: Wed Dec 26 10:16:55 2018 -0800 Merge tag 'm68k-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Generate syscall headers - Small improvements and cleanups - defconfig updates * tag 'm68k-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Generate uapi header and syscall table header files m68k: Add system call table generation support m68k: Add __NR_syscalls along with NR_syscalls m68k/defconfig: Update defconfigs for v4.20-rc1 m68k: Remove redundant 'default n' from Kconfig m68k: Unroll raw_outsb() loop commit 5ccedf1ccd710ba32f36986b49eeb764e53e7ef1 Author: Yan, Zheng Date: Thu Dec 13 16:34:11 2018 +0800 ceph: don't encode inode pathes into reconnect message mds hasn't used inode pathes since introducing inode backtrace. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit d2f8bb27c87945ab696bdaea25b0465dee94fb6d Author: Yan, Zheng Date: Mon Dec 10 16:35:09 2018 +0800 ceph: update wanted caps after resuming stale session mds contains an optimization, it does not re-issue stale caps if client does not want any cap. A special case of the optimization is that client wants some caps, but skipped updating 'wanted'. For this case, client needs to update 'wanted' when stale session get renewed. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit fdac94fab7995ebc52ff9c5b6247133c67a7564a Author: Yan, Zheng Date: Thu Nov 22 15:26:01 2018 +0800 ceph: skip updating 'wanted' caps if caps are already issued When reading cached inode that already has Fscr caps, this can avoid two cap messages (one updats 'wanted' caps, one clears 'wanted' caps). Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 8a2ac3a8e9c04018e2bbff9d6ff038507e443e75 Author: Yan, Zheng Date: Wed Dec 5 11:29:35 2018 +0800 ceph: don't request excl caps when mount is readonly Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 3c1392d4c49962a31874af14ae9ff289cb2b3851 Author: Yan, Zheng Date: Thu Nov 29 11:22:50 2018 +0800 ceph: don't update importing cap's mseq when handing cap export Updating mseq makes client think importer mds has accepted all prior cap messages and importer mds knows what caps client wants. Actually some cap messages may have been dropped because of mseq mismatch. If mseq is left untouched, importing cap's mds_wanted later will get reset by cap import message. Cc: stable@vger.kernel.org Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 87349cdad963163b55cf7d327f5d47a647339838 Author: Ilya Dryomov Date: Wed Nov 21 18:56:40 2018 +0100 libceph: switch more to bool in ceph_tcp_sendmsg() Unlike in ceph_tcp_sendpage(), it's a bool. Signed-off-by: Ilya Dryomov commit 433b0a12953bc1dfcb52febb186136395a65aad0 Author: Ilya Dryomov Date: Tue Nov 20 15:44:00 2018 +0100 libceph: use MSG_SENDPAGE_NOTLAST with ceph_tcp_sendpage() Prevent do_tcp_sendpages() from calling tcp_push() (at least) once per page. Instead, arrange for tcp_push() to be called (at least) once per data payload. This results in more MSS-sized packets and fewer packets overall (5-10% reduction in my tests with typical OSD request sizes). See commits 2f5338442425 ("tcp: allow splice() to build full TSO packets"), 35f9c09fe9c7 ("tcp: tcp_sendpages() should call tcp_push() once") and ae62ca7b0321 ("tcp: fix MSG_SENDPAGE_NOTLAST logic") for details. Here is an example of a packet size histogram for 128K OSD requests (MSS = 1448, top 5): Before: SIZE COUNT 1448 777700 952 127915 1200 39238 1219 9806 21 5675 After: SIZE COUNT 1448 897280 21 6201 1019 2797 643 2739 376 2479 We could do slightly better by explicitly corking the socket but it's not clear it's worth it. Signed-off-by: Ilya Dryomov commit 3239eb5215ebdef593a79316c9dbbdf8849166ec Author: Ilya Dryomov Date: Fri Nov 16 11:58:19 2018 +0100 libceph: use sock_no_sendpage() as a fallback in ceph_tcp_sendpage() sock_no_sendpage() makes the code cleaner. Also, don't set MSG_EOR. sendpage doesn't act on MSG_EOR on its own, it just honors the setting from the preceding sendmsg call by looking at ->eor in tcp_skb_can_collapse_to(). Signed-off-by: Ilya Dryomov commit 1f6b821aef78e3d79e8d598ae59fc7e23fb6c563 Author: Ilya Dryomov Date: Wed Nov 14 12:24:01 2018 +0100 libceph: drop last_piece logic from write_partial_message_data() last_piece is for the last piece in the current data item, not in the entire data payload of the message. This is harmful for messages with multiple data items. On top of that, we don't need to signal the end of a data payload either because it is always followed by a footer. We used to signal "more" unconditionally, until commit fe38a2b67bc6 ("libceph: start defining message data cursor"). Part of a large series, it introduced cursor->last_piece and also mistakenly inverted the hint by passing last_piece for "more". This was corrected with commit c2cfa1940097 ("libceph: Fix ceph_tcp_sendpage()'s more boolean usage"). As it is, last_piece is not helping at all: because Nagle algorithm is disabled, for a simple message with two 512-byte data items we end up emitting three packets: front + first data item, second data item and footer. Go back to the original pre-fe38a2b67bc6 behavior -- a single packet in most cases. Signed-off-by: Ilya Dryomov commit 0cab9f33d9c33f5ea94e5438fbc91bc8b7f48057 Author: Chengguang Xu Date: Thu Nov 15 22:27:01 2018 +0800 ceph: remove redundant assignment There is redundant assighment of variable i in ceph_mdsmap_get_random_mds(), just remvoe it. Signed-off-by: Chengguang Xu Signed-off-by: Ilya Dryomov commit 2bf996ac48326645ffe5985edfca307838f8eafe Author: Yan, Zheng Date: Thu Oct 25 17:30:30 2018 +0800 ceph: cleanup splice_dentry() splice_dentry() may drop the original dentry and return other dentry. It relies on its caller to update pointer that points to the dropped dentry. This is error-prone. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit f4747b9c68b8864cac32cddc45fdcfdfafb3397c Author: Colin Ian King Date: Sat Dec 22 12:43:33 2018 +0000 drivers: base: swnode: check if swnode is NULL before dereferencing it The to_software_mode() macro can potentially return NULL, so also add a NULL check on swnode before dereferencing it to avoid any NULL pointer dereferences. Detected by CoverityScan, CID#1476052 ("Explicit null dereferenced") Fixes: 59abd83672f7 (drivers: base: Introducing software nodes to the firmware node framework) Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit 1d8f062ebc972053318c3a0e0470c7e0ddc1ebee Author: Colin Ian King Date: Sat Dec 22 12:49:39 2018 +0000 drivers: base: swnode: check if pointer p is NULL before dereferencing it The pointer p can be potentially NULL as macro to_software_node can return NULL. Add null check on p before dereferencing it to avoid any NULL pointer dereferences. Detected by CoverityScan, CID#1476039 ("Explicit null dereferenced") Fixes: 59abd83672f7 (drivers: base: Introducing software nodes to the firmware node framework) Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit 5694cecdb092656a822287a6691aa7ce668c8160 Merge: 13e1ad2be3a85 12f799c8c7395 Author: Linus Torvalds Date: Tue Dec 25 17:41:56 2018 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 festive updates from Will Deacon: "In the end, we ended up with quite a lot more than I expected: - Support for ARMv8.3 Pointer Authentication in userspace (CRIU and kernel-side support to come later) - Support for per-thread stack canaries, pending an update to GCC that is currently undergoing review - Support for kexec_file_load(), which permits secure boot of a kexec payload but also happens to improve the performance of kexec dramatically because we can avoid the sucky purgatory code from userspace. Kdump will come later (requires updates to libfdt). - Optimisation of our dynamic CPU feature framework, so that all detected features are enabled via a single stop_machine() invocation - KPTI whitelisting of Cortex-A CPUs unaffected by Meltdown, so that they can benefit from global TLB entries when KASLR is not in use - 52-bit virtual addressing for userspace (kernel remains 48-bit) - Patch in LSE atomics for per-cpu atomic operations - Custom preempt.h implementation to avoid unconditional calls to preempt_schedule() from preempt_enable() - Support for the new 'SB' Speculation Barrier instruction - Vectorised implementation of XOR checksumming and CRC32 optimisations - Workaround for Cortex-A76 erratum #1165522 - Improved compatibility with Clang/LLD - Support for TX2 system PMUS for profiling the L3 cache and DMC - Reflect read-only permissions in the linear map by default - Ensure MMIO reads are ordered with subsequent calls to Xdelay() - Initial support for memory hotplug - Tweak the threshold when we invalidate the TLB by-ASID, so that mremap() performance is improved for ranges spanning multiple PMDs. - Minor refactoring and cleanups" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (125 commits) arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset() arm64: sysreg: Use _BITUL() when defining register bits arm64: cpufeature: Rework ptr auth hwcaps using multi_entry_cap_matches arm64: cpufeature: Reduce number of pointer auth CPU caps from 6 to 4 arm64: docs: document pointer authentication arm64: ptr auth: Move per-thread keys from thread_info to thread_struct arm64: enable pointer authentication arm64: add prctl control for resetting ptrauth keys arm64: perf: strip PAC when unwinding userspace arm64: expose user PAC bit positions via ptrace arm64: add basic pointer authentication support arm64/cpufeature: detect pointer authentication arm64: Don't trap host pointer auth use to EL2 arm64/kvm: hide ptrauth from guests arm64/kvm: consistently handle host HCR_EL2 flags arm64: add pointer authentication register bits arm64: add comments about EC exception levels arm64: perf: Treat EXCLUDE_EL* bit definitions as unsigned arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field arm64: enable per-task stack canaries ... commit 13e1ad2be3a85f5c0f76e82af9806b3d12a574d0 Merge: 9f687dddc4e1a 20c3a2c33e9fd Author: Linus Torvalds Date: Tue Dec 25 16:26:42 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Thomas Gleixner: "No point in speculating what's in this parcel: - Drop the swap storage limit when L1TF is disabled so the full space is available - Add support for the new AMD STIBP always on mitigation mode - Fix a bunch of STIPB typos" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Add support for STIBP always-on preferred mode x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off x86/speculation: Change misspelled STIPB to STIBP commit 9f687dddc4e1a3101f1ceb7fbaddbf93f93a7788 Merge: e4b99d415c390 bd2bcaa565a2c Author: Linus Torvalds Date: Tue Dec 25 15:44:08 2018 -0800 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "The timer department delivers the following christmas presents: Core code: - Use proper seqcount initializer to make lockdep happy - SPDX annotations and cleanup of license boilerplates - Use DEFINE_SHOW_ATTRIBUTE() instead of open coding it - Minor cleanups Driver code: - Add the sched_clock for the arc timer (Alexey Brodkin) - Change the file timer names for riscv, rockchip, tegra20, sun4i and meson6 (Daniel Lezcano) - Add the DT bindings for r8a7796, r8a77470 and r8a774a1 (Biju Das) - Remove the early platform driver registration for timer-ti-dm (Bartosz Golaszewski) - Provide the sched_clock for the riscv timer (Anup Patel) - Add support for ARM64 for the imx-gpt and convert the imx-tpm to the timer-of API (Anson Huang) - Remove useless irq protection for the imx-gpt (Clément Péron) - Remove a duplicate function name for the vt8500 (Dan Carpenter) - Remove obsolete inclusion of for the tegra20 (Geert Uytterhoeven) - Demote the prcmu and the custom sched_clock for the dbx500 and the ux500 (Linus Walleij) - Add a new timer clock for the RDA8810PL (Manivannan Sadhasivam) - Rename the macro to stick to the register name and add the delay timer (Martin Blumenstingl) - Switch the bcm2835 to the SPDX identifier (Stefan Wahren) - Fix the interrupt register access on the fttmr010 (Tao Ren) - Add missing of_node_put in the initialization path on the integrator-ap (Yangtao Li)" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits) dt-bindings: timer: Document RDA8810PL SoC timer clocksource/drivers/rda: Add clock driver for RDA8810PL SoC clocksource/drivers/meson6: Change name meson6_timer timer-meson6 clocksource/drivers/sun4i: Change name sun4i_timer to timer-sun4i clocksource/drivers/tegra20: Change name tegra20_timer to timer-tegra20 clocksource/drivers/rockchip: Change name rockchip_timer to timer-rockchip clocksource/drivers/riscv: Change name riscv_timer to timer-riscv clocksource/drivers/riscv_timer: Provide the sched_clock clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of clocksource/drivers/fttmr010: Fix invalid interrupt register access clocksource/drivers/integrator-ap: Add missing of_node_put() clocksource/drivers/bcm2835: Switch to SPDX identifier dt-bindings: timer: renesas, cmt: Document r8a774a1 CMT support clocksource/drivers/timer-imx-tpm: Convert the driver to timer-of clocksource/drivers/arc_timer: Utilize generic sched_clock dt-bindings: timer: renesas, cmt: Document r8a77470 CMT support dt-bindings: timer: renesas, cmt: Document r8a7796 CMT support clocksource/drivers/imx-gpt: Remove unnecessary irq protection clocksource/drivers/imx-gpt: Add support for ARM64 clocksource/drivers/meson6_timer: Implement the ARM delay timer ... commit e4b99d415c3908581d4703203e1e805f043a3e71 Merge: d8924c0d76aaa c410abbbacb9b Author: Linus Torvalds Date: Tue Dec 25 15:17:51 2018 -0800 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The interrupt department provides: Core updates: - Better spreading to NUMA nodes in the affinity management - Support for more than one set of interrupts to spread out to allow separate queues for separate functionality of a single device. - Decouple the non queue interrupts from being managed. Those are usually general interrupts for error handling etc. and those should never be shut down. This also a preparation to utilize the spreading mechanism for initial spreading of non-managed interrupts later. - Make the single CPU target selection in the matrix allocator more balanced so interrupts won't accumulate on single CPUs in certain situations. - A large spell checking patch so we don't end up fixing single typos over and over. Driver updates: - A bunch of new irqchip drivers (RDA8810PL, Madera, imx-irqsteer) - Updates for the 8MQ, F1C100s platform drivers - A number of SPDX cleanups - A workaround for a very broken GICv3 implementation on msm8996 which sports a botched register set. - A platform-msi fix to prevent memory leakage - Various cleanups" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) genirq/affinity: Add is_managed to struct irq_affinity_desc genirq/core: Introduce struct irq_affinity_desc genirq/affinity: Remove excess indentation irqchip/stm32: protect configuration registers with hwspinlock dt-bindings: interrupt-controller: stm32: Document hwlock properties irqchip: Add driver for imx-irqsteer controller dt-bindings/irq: Add binding for Freescale IRQSTEER multiplexer irqchip: Add driver for Cirrus Logic Madera codecs genirq: Fix various typos in comments irqchip/irq-imx-gpcv2: Add IRQCHIP_DECLARE for i.MX8MQ compatible irqchip/irq-rda-intc: Fix return value check in rda8810_intc_init() irqchip/irq-imx-gpcv2: Silence "fall through" warning irqchip/gic-v3: Add quirk for msm8996 broken registers irqchip/gic: Add support to device tree based quirks dt-bindings/gic-v3: Add msm8996 compatible string irqchip/sun4i: Add support for Allwinner ARMv5 F1C100s irqchip/sun4i: Move IC specific register offsets to struct irqchip/sun4i: Add a struct to hold global variables dt-bindings: interrupt-controller: Add suniv interrupt-controller irqchip: Add RDA8810PL interrupt driver ... commit d8924c0d76aaa52e4811b5c64115d9a7f36cc73a Merge: 1fbb2dc6f0ce9 f569da8c994c2 Author: Linus Torvalds Date: Tue Dec 25 15:01:46 2018 -0800 Merge tag 'devprop-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "This introduces 'software nodes' that are analogous to the DT and ACPI firmware nodes except that they can be created by drivers themselves and do a couple of assorted cleanups. Specifics: - Introduce "software nodes", analogous to the DT and ACPI firmware nodes except that they can be created by kernel code, in order to complement fwnodes representing real firmware nodes when they are incomplete (for example missing device properties) and to supply the primary fwnode when the firmware lacks hardware description for a device completely, and replace the "property_set" struct fwnode_handle type with software nodes (Heikki Krogerus). - Clean up the just introduced software nodes support and fix a commet in the graph-handling code (Colin Ian King, Marco Felsch)" * tag 'devprop-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: fix fwnode_graph_get_next_endpoint() documentation drivers: base: swnode: remove need for a temporary string for the node name device property: Remove struct property_set device property: Move device_add_properties() to swnode.c drivers: base: Introducing software nodes to the firmware node framework ACPI / glue: Add acpi_platform_notify() function drivers core: Prepare support for multiple platform notifications driver core: platform: Remove duplicated device_remove_properties() call commit 1fbb2dc6f0ce95e73b9bd7e8e899089f5cebc99a Merge: 4e4390ad067a6 b677574bdf292 Author: Linus Torvalds Date: Tue Dec 25 14:57:37 2018 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This round is dominated by NXP's i.MX clk drivers. We gained support for two or three i.MX SoCs in here and that mostly means a lot of driver code and data. Beyond that platform, there are some new Mediatek, Amlogic, and Qualcomm clk drivers added in here, and then we get to the long tail of driver updates and non-critical fixes all around, including code for vendors such as Renesas, Rockchip, Nvidia, and Allwinner. Overall, the driver updates look normal. Apart from the usual driver updates we have an update to make registering OF based clk providers a little simpler when they're devices created as a child of a device backed by a node in DT. Drivers don't have to jump through hoops to unregister the provider upon driver removal anymore because the API does the right thing and uses the parent device DT node. Summary: Core: - Make devm_of_clk_add_hw_provider() use parent dt node if necessary - Various SPDX taggings - Mark clk_ops const when possible New Drivers: - NXP i.MX7ULP SoC clock support - NXP i.MX8QXP SoC clock support - NXP i.MX8MQ SoC clock support - NXP QorIQ T1023 SoC support - Qualcomm SDM845 audio subsystem clks - Qualcomm SDM845 GPU clck controllers - Qualcomm QCS404 RPM clk support - Mediatek MT7629 SoC clk controllers - Allwinner F1c100s SoC clocks - Allwinner H6 display engine clocks - Amlogic GX video clocks - Support for Amlogic meson8b CPU frequency scaling - Amlogic Meson8b CPU post-divider clocks Updates: - Proper suspend/resume on VersaClock5 - Shrink code some with DEFINE_SHOW_ATTRIBUTE() - Register fixes for Rockchip rk3188 and rk3328 - One new critical clock for Rockchip rk3188 and a fixed clock id (double used number) - New clock id for Rockchip rk3328 - Amlogic Meson8/Meson8b video clock support - Amlogic got a clk-input helper and used it for the axg-audio clock driver - Sigma Delta modulation for the Allwinner A33 audio clocks - Support for CPEX (timer) clocks on various Renesas R-Car Gen3 and RZ/G2 SoCs - Support for SDHI HS400 clocks on early revisions of Renesas R-Car H3 and M3-W - Support for SDHI and USB clocks on Renesas RZ/A2 - Support for RPC (SPI Multi I/O Bus Controller) clocks on Renesas R-Car V3M - Qualcomm MSM8998 GCC driver improvements (resets, drop unused clks, etc)" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (172 commits) clk: imx: imx7ulp: add arm hsrun mode clocks support dt-bindings: clock: imx7ulp: add HSRUN mode related clocks clk: Use of_node_name_eq for node name comparisons clk: vc5: Add suspend/resume support clk: qcom: Drop unused 8998 clock clk: qcom: Leave mmss noc on for 8998 clk: tegra: Return the exact clock rate from clk_round_rate clk: tegra30: Use Tegra CPU powergate helper function soc/tegra: pmc: Drop SMP dependency from CPU APIs clk: tegra: Fix maximum audio sync clock for Tegra124/210 clk: tegra: get rid of duplicate defines clk: imx: add imx8qxp lpcg driver clk: imx: add lpcg clock support clk: imx: add imx8qxp clk driver clk: imx: Make the i.MX8MQ CCM clock driver CLK_IMX8MQ dependant clk: imx: add scu clock common part clk: imx: add configuration option for mmio clks dt-bindings: clock: add imx8qxp lpcg clock binding dt-bindings: clock: imx8qxp: add SCU clock IDs clk: qcom: Add missing msm8998 resets ... commit 4e4390ad067a61ce4e7607bd0df31f19a4caa36a Merge: b1669432b3555 8146aace60c74 Author: Linus Torvalds Date: Tue Dec 25 14:52:50 2018 -0800 Merge tag 'leds-for-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "There are several few-liners, where most of them are fixes and improvments. One thing standing out is ground preparation for inititializing trigger parameters via Device Tree. We introduce LED_INIT_DEFAULT_TRIGGER flag for that purpose and set it when default trigger is matched. It indicates that trigger should parse DT properties to retrieve the initialization data when set as default one" * tag 'leds-for-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: led: triggers: Initialize LED_INIT_DEFAULT_TRIGGER if trigger is brought after class led: triggers: Add LED_INIT_DEFAULT_TRIGGER flag led: triggers: Break the for loop after default trigger is found leds: pwm: Use OF variant of LED registering function leds: pwm: Simplify with resource-managed devm_led_classdev_register() leds: gpio: Drop unneeded manual of_node assignment leds: 88pm860x: Use of_node_name_eq for node name comparisons leds: powernv: add of_node_put() commit b1669432b3555954124ffd987a6ff2308344c88f Merge: 0051db82182bf 58331d618bd9c Author: Linus Torvalds Date: Tue Dec 25 14:48:06 2018 -0800 Merge tag 'regmap-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This has been a busy release for the regmap-irq code, there's several new features been added, including an API cleanup for how we specify types that affected one existing driver (gpio-max77620): - Support for hardware that flags rising and falling edges on separate status bits from Bartosz Golaszewski. - Support for explicitly clearing interrupts before unmasking from Bartosz Golaszewski. - Support for level triggered IRQs from Matti Vaittinen" * tag 'regmap-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: irq: add an option to clear status registers on unmask regmap: regmap-irq/gpio-max77620: add level-irq support regmap: regmap-irq: Remove default irq type setting from core regmap: debugfs: convert to DEFINE_SHOW_ATTRIBUTE regmap: rbtree: convert to DEFINE_SHOW_ATTRIBUTE regmap: irq: handle HW using separate rising/falling edge interrupts regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits) commit 0051db82182bfd80d6c76982bcb36b09eb338a89 Merge: 79f20778fb228 74ff666bd7ba2 Author: Linus Torvalds Date: Tue Dec 25 14:43:54 2018 -0800 Merge tag 'spi-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The main thing this release has been a lot of work on the integration with SPI NOR flashes, there's been some specific support for a while for controller features designed to make them perform better but it's not worked out as well as hoped so the interface has been redesigned in a way that will hopefully do better - it's already been adopted by a number of additional controllers so things are looking good. Otherwise most of the work has been driver specific: - Support for better integration with NOR flashes from Boris Brezillon and Yogesh Narayan Gaur plus usage of it in several drivers. - A big cleanup of the Rockchip driver from Emil Renner Berthing. - Lots of performance improvements for bcm2835 from Lukas Wunner. - Slave mode support for pxa2xx from Lubomir Rintel. - Support for Macronix MXIC, Mediatek MT7629 and MT8183, NPCM PSPI, and Renesas r8a77470" * tag 'spi-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (90 commits) spi: sh-msiof: Reduce the number of times write to and perform the transmission from FIFO spi: sh-msiof: Add r8a774c0 support doc: lpspi: Document DT bindings for LPSPI slave mode spi: lpspi: Let watermark change with send data length spi: lpspi: Add slave mode support spi: lpspi: Replace all "master" with "controller" spi: imx: drop useless member speed_hz from driver data struct spi: imx: rename config callback and add useful parameters spi: imx: style fixes spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook. spi: imx: add a device specific prepare_message callback mtd: atmel-quadspi: disallow building on ebsa110 spi: Update NPCM PSPI controller documentation spi: npcm: Modify pspi send function spi: Use of_node_name_eq for node name comparisons spi: dw-mmio: add ACPI support spi: bcm2835: Synchronize with callback on DMA termination spi: bcm2835: Speed up FIFO access if fill level is known spi: bcm2835: Polish transfer of DMA prologue spi: spi-mem: add support for octal mode I/O data transfer ... commit 79f20778fb228ae372cd7602745382fd4543ef31 Merge: d923fd6dc133e c3b5725965228 Author: Linus Torvalds Date: Tue Dec 25 14:38:31 2018 -0800 Merge tag 'regulator-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been a very busy release for the core, some fixes, one large new feature and a big bit of refactoring to update the GPIO API: - Support for coupled regulators from Dmitry Osipenko based on a prior attempt by Maciej Purski, allowing us to handle situations where the voltages on two regulators can't be too far apart from each other. - Conversion of the GPIO support in both drivers and the core to use GPIO descriptors rather than numbers, part of the overall project to remove GPIO numbers. - Support for standby mode suspend states from Andrei Stefanescu. - New drivers for Allwinner AXP209, Cirrus Logic Lochnagar and Microchip MPC16502" * tag 'regulator-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (90 commits) regulator: tps65910: fix a missing check of return value regulator: mcp16502: Select REGMAP_I2C to fix build error regulator: convert to DEFINE_SHOW_ATTRIBUTE regulator: mcp16502: Fix missing n_voltages setting regulator: mcp16502: Use #ifdef CONFIG_PM_SLEEP around mcp16502_suspend/resume_noirq regulator: mcp16502: code cleanup regulator: act8945a-regulator: make symbol act8945a_pm static drivers/regulator: fix a missing check of return value regulator: act8945a-regulator: fix 'defined but not used' compiler warning regulator: axp20x: fix set_ramp_delay for AXP209/dcdc2 regulator: mcp16502: add support for suspend mfd: axp20x: use explicit bit defines mfd: axp20x: Clean up included headers regulator: dts: enable soft-start and ramp delay for the OLinuXino Lime2 dt-bindings: mfd: axp20x: Add software based soft_start for AXP209 LDO3 regulator: axp20x: add software based soft_start for AXP209 LDO3 dt-bindings: mfd: axp20x: add support for regulator-ramp-delay for AXP209 regulator: axp20x: add support for set_ramp_delay for AXP209 mfd: axp20x: name voltage ramping define properly regulator: mcp16502: add regulator driver for MCP16502 ... commit d923fd6dc133ee8d8fe800e4e4beb9175368b21b Merge: e6d1315006383 e94b815524f83 Author: Linus Torvalds Date: Tue Dec 25 14:34:48 2018 -0800 Merge tag 'pwm/for-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "Not a lot going on this cycle. There's some more cleanup going on and new driver support that was not quite ready in time for v4.21-rc1, but here are a few fixes and improvements that are good to go. The Kona PWM driver can now be built on the Cygnus architecture and the i.MX driver gained support for hardware readback. Some small fixes are provided for the clks711x and lpc18xx-sct drivers. Finally, to round things off some drivers are switched to SPDX license identifiers" * tag 'pwm/for-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: dt-bindings: pwm: rcar: Add r8a774c0 support pwm: imx: Add ipg clock operation pwm: clps711x: Switch to SPDX identifier pwm: clps711x: Fix period calculation pwm: bcm2835: Switch to SPDX identifier pwm: Enable Kona PWM to be built for the Cygnus architecture pwm: Drop legacy wrapper for changing polarity pwm: imx: Implement get_state() function for hardware readout pwm: imx: Use bitops and bitfield macros to define register values pwm: imx: Sort include files pwm: lpc18xx-sct: Don't reconfigure PWM in .request and .free commit e6d1315006383e525595bb3337d08bccec373ccc Merge: 1e2af254ef130 3eb85368460d9 Author: Linus Torvalds Date: Tue Dec 25 14:21:18 2018 -0800 Merge tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the 20181213 upstream revision, make it possible to build the ACPI subsystem without PCI support, and a new OEM _OSI string, add a new device support to the ACPI driver for AMD SoCs and fix PM handling in the ACPI driver for Intel SoCs, fix the SPCR table handling and do some assorted fixes and cleanups. Specifics: - Update the ACPICA code in the kernel to the 20181213 upstream revision including: * New Windows _OSI strings (Bob Moore, Jung-uk Kim). * Buffers-to-string conversions update (Bob Moore). * Removal of support for expressions in package elements (Bob Moore). * New option to display method/object evaluation in debug output (Bob Moore). * Compiler improvements (Bob Moore, Erik Schmauss). * Minor debugger fix (Erik Schmauss). * Disassembler improvement (Erik Schmauss). * Assorted cleanups (Bob Moore, Colin Ian King, Erik Schmauss). - Add support for a new OEM _OSI string to indicate special handling of secondary graphics adapters on some systems (Alex Hung). - Make it possible to build the ACPI subystem without PCI support (Sinan Kaya). - Make the SPCR table handling regard baud rate 0 in accordance with the specification of it and make the DSDT override code support DSDT code names generated by recent ACPICA (Andy Shevchenko, Wang Dongsheng, Nathan Chancellor). - Add clock frequency for Hisilicon Hip08 SPI controller to the ACPI driver for AMD SoCs (APD) (Jay Fang). - Fix the PM handling during device init in the ACPI driver for Intel SoCs (LPSS) (Hans de Goede). - Avoid double panic()s by clearing the APEI GHES block_status before panic() (Lenny Szubowicz). - Clean up a function invocation in the ACPI core and get rid of some code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in the APEI support code (Alexey Dobriyan, Yangtao Li)" * tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits) ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode ACPI/APEI: Clear GHES block_status before panic() ACPI: Make PCI slot detection driver depend on PCI ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set arm64: select ACPI PCI code only when both features are enabled PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset ACPI: Allow CONFIG_PCI to be unset for reboot ACPI: Move PCI reset to a separate function ACPI / OSI: Add OEM _OSI string to enable dGPU direct output ACPI / tables: add DSDT AmlCode new declaration name support ACPICA: Update version to 20181213 ACPICA: change coding style to match ACPICA, no functional change ACPICA: Debug output: Add option to display method/object evaluation ACPICA: disassembler: disassemble OEMx tables as AML ACPICA: Add "Windows 2018.2" string in the _OSI support ACPICA: Expressions in package elements are not supported ACPICA: Update buffer-to-string conversions ACPICA: add comments, no functional change ACPICA: Remove defines that use deprecated flag ... commit 1e2af254ef130e37d9fb3cb1bc9bfbf6ea184b4a Merge: b271b2127e665 a465d38fa3dce Author: Linus Torvalds Date: Tue Dec 25 13:47:41 2018 -0800 Merge tag 'pm-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add sysadmin documentation for cpuidle, extend the cpuidle subsystem somewhat, improve the handling of performance states in the generic power domains (genpd) and operating performance points (OPP) frameworks, add a new cpufreq driver for Qualcomm SoCs, update some other cpufreq drivers, switch over the runtime PM framework to using high-res timers for device autosuspend, fix a problem with suspend-to-idle on ACPI-based platforms, add system-wide suspend and resume handling to the devfreq framework, do some janitorial cleanups all over and update some utilities. Specifics: - Add sysadmin documentation for cpuidle (Rafael Wysocki). - Make it possible to specify a cpuidle governor from kernel command line, add new cpuidle state sysfs attributes for governor evaluation, and improve the "polling" idle state handling (Rafael Wysocki). - Fix the handling of the "required-opps" DT property in the operating performance points (OPP) framework, improve the integration of it with the generic power domains (genpd) framework, improve the handling of performance states in them and clean up the idle states vs performance states separation in genpd (Viresh Kumar, Ulf Hansson). - Add a cpufreq driver called "qcom-hw" for Qualcomm SoCs using a hardware engine to control CPU frequency transitions along with DT bindings for it (Taniya Das). - Fix an intel_pstate driver issue related to CPU offline and update the documentation of it (Srinivas Pandruvada). - Clean up the imx6q cpufreq driver (Anson Huang). - Add SPDX license IDs to cpufreq schedutil governor files (Daniel Lezcano). - Switch over the runtime PM framework to using high-res timers for device autosuspend to allow the control of it to be more precise (Vincent Guittot). - Disable non-wakeup ACPI GPEs during suspend-to-idle so that they don't prevent the system from reaching the target low-power state and simplify the suspend-to-idle handling on ACPI platforms without full Low-Power S0 Idle (LPS0) support (Rafael Wysocki). - Add system-wide suspend and resume support to the devfreq framework (Lukasz Luba). - Clean up the SmartReflex adaptive voltage scaling (AVS) driver and add an SPDX license ID to it (Nishanth Menon, Uwe Kleine-König, Thomas Meyer). - Get rid of code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in some places, fix some DT node refcount leaks, and do some other janitorial cleanups (Yangtao Li). - Update the cpupower, intel_pstate_tracer and turbosat utilities (Abhishek Goel, Doug Smythies, Len Brown)" * tag 'pm-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (54 commits) PM / Domains: remove define_genpd_open_function() and define_genpd_debugfs_fops() PM-runtime: Switch autosuspend over to using hrtimers cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver dt-bindings: cpufreq: Introduce QCOM cpufreq firmware bindings ACPI: PM: Loop in full LPS0 mode only ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file tools/power turbostat: consolidate duplicate model numbers tools/power turbostat: fix goldmont C-state limit decoding PM / Domains: Propagate performance state updates PM / Domains: Factorize dev_pm_genpd_set_performance_state() PM / Domains: Save OPP table pointer in genpd OPP: Don't return 0 on error from of_get_required_opp_performance_state() OPP: Add dev_pm_opp_xlate_performance_state() helper OPP: Improve _find_table_of_opp_np() PM / Domains: Make genpd performance states orthogonal to the idlestates PM / sleep: convert to DEFINE_SHOW_ATTRIBUTE cpuidle: Add 'above' and 'below' idle state metrics PM / AVS: SmartReflex: Switch to SPDX Licence ID PM / AVS: SmartReflex: NULL check before some freeing functions is not needed ... commit b271b2127e6654a72dc1685f0825fe1cc2f36939 Merge: 8e61e7b5c4de2 75dfa87035f9a Author: Linus Torvalds Date: Tue Dec 25 13:28:00 2018 -0800 Merge tag 'edac_for_4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - Support for ZynqMP DDR controller support to synopsys_edac along with a driver cleanup and generalization for the addition of support for the new IP. (Manish Narani) - Removal of the /sys/bus/edac devices hierarchy. This enabled us to get rid of the silly memory controllers maximum number notion. (Tony Luck and Borislav Petkov) - skx_edac improvements and fixes. (Qiuxu Zhuo and Tony Luck) - The usual garden variety of small cleanups and fixes. * tag 'edac_for_4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (25 commits) EDAC, fsl_ddr: Add LS1021A to the list of supported hardware EDAC, i5000: Remove set but not used local variables MAINTAINERS, EDAC: Drop bouncing email EDAC, i82975x: Fix spelling mistake "reserverd" -> "reserved" EDAC, fsl: Move error injection under CONFIG_EDAC_DEBUG EDAC, skx: Let EDAC core show the decoded result for debugfs EDAC, skx: Move debugfs node under EDAC's hierarchy EDAC, skx: Prepend hex formatting with '0x' EDAC, skx: Fix function calling order in skx_exit() EDAC: Drop per-memory controller buses EDAC: Don't add devices under /sys/bus/edac EDAC: Fix indentation issues in several EDAC drivers EDAC, skx: Fix randconfig builds in a better way EDAC, i82975x: Remove set but not used variable dtype EDAC, qcom_edac: Remove irq_handled local variable EDAC, synopsys: Add Error Injection support for ZynqMP DDR controller EDAC, synopsys: Add ECC support for ZynqMP DDR controller EDAC, synopsys: Add macro defines for ZynqMP DDRC dt: bindings: Document ZynqMP DDRC in Synopsys documentation EDAC, synopsys: Add error handling for the of_device_get_match_data() result ... commit 8e61e7b5c4de2bea534438bd7a008accd85492b0 Merge: 996680d461f8f d82b51c855a20 Author: Linus Torvalds Date: Tue Dec 25 13:19:10 2018 -0800 Merge tag 'sound-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There are no intensive changes in both ALSA and ASoC core parts while rather most of changes are a bunch of driver fixes and updates. A large diff pattern appears in ASoC TI part which now merges both OMAP and DaVinci stuff, but the rest spreads allover the places. Note that this pull request includes also some updates for LED trigger and platform drivers for mute LEDs, appearing in the diffstat as well. Some highlights: ASoC: - Preparatory work for merging the audio-graph and audio-graph-scu cards - A merge of TI OMAP and DaVinci directories, as both product lines get merged together. Also including a few architecture changes as well. - Major cleanups of the Maxim MAX9867 driver - Small fixes for tablets & co with Intel BYT/CHT chips - Lots of rsnd updates as usual - Support for Asahi Kaesi AKM4118, AMD ACP3x, Intel platforms with RT5660, Meson AXG S/PDIF inputs, several Qualcomm IPs and Xilinx I2S controllers HD-audio: - Introduce audio-mute LED trigger for replacing the former hackish dynamic binding - Huawei WMI hotkey and mute LED support - Refactoring of PM code and display power controls - Headset button support in the generic jack code - A few updates for Tegra - Fixups for HP EliteBook and ASUS UX391UA - Lots of updates for Intel ASoC HD-audio, including the improved DSP detection and the fallback binding from ASoC SST to legacy HD-audio controller drivers Others: - Updates for FireWire TASCAM and Fireface devices, some other fixes - A few potential Spectre v1 fixes that are all trivial" * tag 'sound-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits) ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected ALSA: HDA: export process_unsol_events() ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with ALC294 ALSA: bebob: fix model-id of unit for Apogee Ensemble ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities ALSA: rme9652: Fix potential Spectre v1 vulnerability ASoC: ti: Kconfig: Remove the deprecated options ARM: davinci_all_defconfig: Update the audio options ARM: omap1_defconfig: Do not select ASoC by default ARM: omap2plus_defconfig: Update the audio options ARM: davinci: dm365-evm: Update for the new ASoC Kcofnig options ARM: OMAP2: Update for new MCBSP Kconfig option ARM: OMAP1: Makefile: Update for new MCBSP Kconfig option MAINTAINERS: Add entry for sound/soc/ti and update the OMAP audio support ASoC: ti: Merge davinci and omap directories ALSA: hda: add mute LED support for HP EliteBook 840 G4 ALSA: fireface: code refactoring to handle model-specific registers ALSA: fireface: add support for packet streaming on Fireface 800 ALSA: fireface: allocate isochronous resources in mode-specific implementation ... commit 996680d461f8f759082e64f2395c1f7c25d9d549 Merge: 5813540b584c3 38b11beb73c52 Author: Linus Torvalds Date: Tue Dec 25 13:11:30 2018 -0800 Merge tag 'media/v4.20-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull more media updates from Mauro Carvalho Chehab: "The Intel IPU3 camera driver" * tag 'media/v4.20-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (23 commits) media: staging/ipu3-imgu: Add MAINTAINERS entry media: staging/ipu3-imgu: Address documentation comments media: v4l: Add Intel IPU3 meta buffer formats media: doc-rst: Add Intel IPU3 documentation media: ipu3-imgu: Fix firmware binary location media: ipu3-imgu: Fix compiler warnings media: staging/intel-ipu3: Add dual pipe support media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI media: staging/intel-ipu3: Add imgu top level pci device driver media: staging/intel-ipu3: Add v4l2 driver based on media framework media: staging/intel-ipu3: Add css pipeline programming media: staging/intel-ipu3: css: Initialize css hardware media: staging/intel-ipu3: css: Compute and program ccs media: staging/intel-ipu3: css: Add static settings for image pipeline media: staging/intel-ipu3: css: Add support for firmware management media: staging/intel-ipu3: css: Add dma buff pool utility functions media: staging/intel-ipu3: Implement DMA mapping functions media: staging/intel-ipu3: mmu: Implement driver media: staging/intel-ipu3: abi: Add structs media: staging/intel-ipu3: abi: Add register definitions and enum ... commit 5813540b584c3b1a507d1c61896bec164cad0905 Merge: eaa7649971153 4bd46aa0353e0 Author: Linus Torvalds Date: Tue Dec 25 13:00:14 2018 -0800 Merge tag 'media/v4.20-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "First set of media patches contains: - Three new platform drivers: aspeed-video seco-sed and sun5i-csi; - One new sensor driver: imx214; - Support for Xbox DVD Movie Playback kit remote controller; - Removal of the legacy friio driver. The functionalities were ported to another driver, already merged; - New staging driver: Rockchip VPU; - Added license text or SPDX tags to all media documentation files; - Usual set of cleanup, fixes and enhancements" * tag 'media/v4.20-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (263 commits) media: cx23885: only reset DMA on problematic CPUs media: ddbridge: Move asm includes after linux ones media: drxk_hard: check if parameter is not NULL media: docs: fix some GPL licensing ambiguity at the text media: platform: Add Aspeed Video Engine driver media: dt-bindings: media: Add Aspeed Video Engine binding documentation media: vimc: fix start stream when link is disabled media: v4l2-device: Link subdevices to their parent devices if available media: siano: Use kmemdup instead of duplicating its function media: rockchip vpu: remove some unused vars media: cedrus: don't initialize pointers with zero media: cetrus: return an error if alloc fails media: cedrus: Add device-tree compatible and variant for A64 support media: cedrus: Add device-tree compatible and variant for H5 support media: dt-bindings: media: cedrus: Add compatibles for the A64 and H5 media: video-i2c: check if chip struct has set_power function media: video-i2c: support runtime PM media: staging: media: imx: Use of_node_name_eq for node name comparisons media: v4l2-subdev: document controls need _FL_HAS_DEVNODE media: vivid: Improve timestamping ... commit eaa76499711535fd64d747cc4ef0d78ab0fd41c6 Merge: b3cc2bfe7244e f366d3854ec0f Author: Linus Torvalds Date: Tue Dec 25 12:49:46 2018 -0800 Merge tag 'mtd/for-4.21' of git://git.infradead.org/linux-mtd Pull mtd updates from Boris Brezillon: "SPI NOR Core changes: - Parse the 4BAIT SFDP section - Add a bunch of SPI NOR entries to the flash_info table - Add the concept of SFDP fixups and use it to fix a bug on MX25L25635F - A bunch of minor cleanups/comestic changes NAND core changes: - kernel-doc miscellaneous fixes. - Third batch of fixes/cleanup to the raw NAND core impacting various controller drivers (ams-delta, marvell, fsmc, denali, tegra, vf610): * Stop to pass mtd_info objects to internal functions * Reorganize code to avoid forward declarations * Drop useless test in nand_legacy_set_defaults() * Move nand_exec_op() to internal.h * Add nand_[de]select_target() helpers * Pass the CS line to be selected in struct nand_operation * Make ->select_chip() optional when ->exec_op() is implemented * Deprecate the ->select_chip() hook * Move the ->exec_op() method to nand_controller_ops * Move ->setup_data_interface() to nand_controller_ops * Deprecate the dummy_controller field * Fix JEDEC detection * Provide a helper for polling GPIO R/B pin Raw NAND chip drivers changes: - Macronix: * Flag 1.8V AC chips with a broken GET_FEATURES(TIMINGS) Raw NAND controllers drivers changes: - Ams-delta: * Fix the error path * SPDX tag added * May be compiled with COMPILE_TEST=y * Conversion to ->exec_op() interface * Drop .IOADDR_R/W use * Use GPIO API for data I/O - Denali: * Remove denali_reset_banks() * Remove ->dev_ready() hook * Include instead of * Changes to comply with the above fixes/cleanup done in the core. - FSMC: * Add an SPDX tag to replace the license text * Make conversion from chip to fsmc consistent * Fix unchecked return value in fsmc_read_page_hwecc * Changes to comply with the above fixes/cleanup done in the core. - Marvell: * Prevent timeouts on a loaded machine (fix) * Changes to comply with the above fixes/cleanup done in the core. - OMAP2: * Pass the parent of pdev to dma_request_chan() (fix) - R852: * Use generic DMA API - sh_flctl: * Convert to SPDX identifiers - Sunxi: * Write pageprog related opcodes to the right register: WCMD_SET (fix) - Tegra: * Stop implementing ->select_chip() - VF610: * Add an SPDX tag to replace the license text * Changes to comply with the above fixes/cleanup done in the core. - Various trivial/spelling/coding style fixes. SPI-NAND drivers changes: - Remove the depreacated mt29f_spinand driver from staging. - Add support for: * Toshiba TC58CVG2S0H * GigaDevice GD5FxGQ4xA * Winbond W25N01GV JFFS2 changes: - Fix a lockdep issue MTD changes: - Rework the physmap driver to merge gpio-addr-flash and physmap_of in it - Add a new compatible for RedBoot partitions - Make sub-partitions RW if the parent partition was RO because of a mis-alignment - Add pinctrl support to the - Addition of /* fall-through */ comments where appropriate - Various minor fixes and cleanups Other changes: - Update my email address" * tag 'mtd/for-4.21' of git://git.infradead.org/linux-mtd: (108 commits) mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET MAINTAINERS: Update my email address mtd: rawnand: marvell: prevent timeouts on a loaded machine mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan() mtd: rawnand: Fix JEDEC detection mtd: spi-nor: Add support for is25lp016d mtd: spi-nor: parse SFDP 4-byte Address Instruction Table mtd: spi-nor: Add 4B_OPCODES flag to is25lp256 mtd: spi-nor: Add an SPDX tag to spi-nor.{c,h} mtd: spi-nor: Make the enable argument passed to set_byte() a bool mtd: spi-nor: Stop passing flash_info around mtd: spi-nor: Avoid forward declaration of internal functions mtd: spi-nor: Drop inline on all internal helpers mtd: spi-nor: Add a post BFPT fixup for MX25L25635E mtd: spi-nor: Add a post BFPT parsing fixup hook mtd: spi-nor: Add the SNOR_F_4B_OPCODES flag mtd: spi-nor: cast to u64 to avoid uint overflows mtd: spi-nor: Add support for IS25LP032/064 mtd: spi-nor: add entry for mt35xu512aba flash mtd: spi-nor: add macros related to MICRON flash ... commit b3cc2bfe7244e848f5e8caa77bbdc72c04abd17c Merge: 4971f090aa7f6 25ac3da61ba14 Author: Linus Torvalds Date: Tue Dec 25 12:26:34 2018 -0800 Merge tag 'i3c/for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull initial i3c support from Boris Brezillon: "Add initial support for I3C along with two I3C master controller drivers" * tag 'i3c/for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: cdns: fix I2C transfers in Cadence I3C master driver ic3: off by one in mode_show() i3c: fix an error code in i3c_master_add_i3c_dev_locked() i3c: master: dw: fix mask operation by using the correct operator MAINTAINERS: Add myself as the dw-i3c-master module maintainer dt-binding: i3c: Document Synopsys DesignWare I3C i3c: master: Add driver for Synopsys DesignWare IP i3c: master: Remove set but not used variable 'old_i3c_scl_lim' dt-bindings: i3c: Document Cadence I3C master bindings i3c: master: Add driver for Cadence IP MAINTAINERS: Add myself as the I3C subsystem maintainer dt-bindings: i3c: Document core bindings i3c: Add sysfs ABI spec docs: driver-api: Add I3C documentation i3c: Add core I3C infrastructure commit 4971f090aa7f6ce5daa094ce4334f6618f93a7eb Merge: c76cd634eb5bf 2a3c83f5fe077 Author: Linus Torvalds Date: Tue Dec 25 11:48:26 2018 -0800 Merge tag 'drm-next-2018-12-14' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Core: - shared fencing staging removal - drop transactional atomic helpers and move helpers to new location - DP/MST atomic cleanup - Leasing cleanups and drop EXPORT_SYMBOL - Convert drivers to atomic helpers and generic fbdev. - removed deprecated obj_ref/unref in favour of get/put - Improve dumb callback documentation - MODESET_LOCK_BEGIN/END helpers panels: - CDTech panels, Banana Pi Panel, DLC1010GIG, - Olimex LCD-O-LinuXino, Samsung S6D16D0, Truly NT35597 WQXGA, - Himax HX8357D, simulated RTSM AEMv8. - GPD Win2 panel - AUO G101EVN010 vgem: - render node support ttm: - move global init out of drivers - fix LRU handling for ghost objects - Support for simultaneous submissions to multiple engines scheduler: - timeout/fault handling changes to help GPU recovery - helpers for hw with preemption support i915: - Scaler/Watermark fixes - DP MST + powerwell fixes - PSR fixes - Break long get/put shmemfs pages - Icelake fixes - Icelake DSI video mode enablement - Engine workaround improvements amdgpu: - freesync support - GPU reset enabled on CI, VI, SOC15 dGPUs - ABM support in DC - KFD support for vega12/polaris12 - SDMA paging queue on vega - More amdkfd code sharing - DCC scanout on GFX9 - DC kerneldoc - Updated SMU firmware for GFX8 chips - XGMI PSP + hive reset support - GPU reset - DC trace support - Powerplay updates for newer Polaris - Cursor plane update fast path - kfd dma-buf support virtio-gpu: - add EDID support vmwgfx: - pageflip with damage support nouveau: - Initial Turing TU104/TU106 modesetting support msm: - a2xx gpu support for apq8060 and imx5 - a2xx gpummu support - mdp4 display support for apq8060 - DPU fixes and cleanups - enhanced profiling support - debug object naming interface - get_iova/page pinning decoupling tegra: - Tegra194 host1x, VIC and display support enabled - Audio over HDMI for Tegra186 and Tegra194 exynos: - DMA/IOMMU refactoring - plane alpha + blend mode support - Color format fixes for mixer driver rcar-du: - R8A7744 and R8A77470 support - R8A77965 LVDS support imx: - fbdev emulation fix - multi-tiled scalling fixes - SPDX identifiers rockchip - dw_hdmi support - dw-mipi-dsi + dual dsi support - mailbox read size fix qxl: - fix cursor pinning vc4: - YUV support (scaling + cursor) v3d: - enable TFU (Texture Formatting Unit) mali-dp: - add support for linear tiled formats sun4i: - Display Engine 3 support - H6 DE3 mixer 0 support - H6 display engine support - dw-hdmi support - H6 HDMI phy support - implicit fence waiting - BGRX8888 support meson: - Overlay plane support - implicit fence waiting - HDMI 1.4 4k modes bridge: - i2c fixes for sii902x" * tag 'drm-next-2018-12-14' of git://anongit.freedesktop.org/drm/drm: (1403 commits) drm/amd/display: Add fast path for cursor plane updates drm/amdgpu: Enable GPU recovery by default for CI drm/amd/display: Fix duplicating scaling/underscan connector state drm/amd/display: Fix unintialized max_bpc state values Revert "drm/amd/display: Set RMX_ASPECT as default" drm/amdgpu: Fix stub function name drm/msm/dpu: Fix clock issue after bind failure drm/msm/dpu: Clean up dpu_media_info.h static inline functions drm/msm/dpu: Further cleanups for static inline functions drm/msm/dpu: Cleanup the debugfs functions drm/msm/dpu: Remove dpu_irq and unused functions drm/msm: Make irq_postinstall optional drm/msm/dpu: Cleanup callers of dpu_hw_blk_init drm/msm/dpu: Remove unused functions drm/msm/dpu: Remove dpu_crtc_is_enabled() drm/msm/dpu: Remove dpu_crtc_get_mixer_height drm/msm/dpu: Remove dpu_dbg drm/msm: dpu: Remove crtc_lock drm/msm: dpu: Remove vblank_requested flag from dpu_crtc drm/msm: dpu: Separate crtc assignment from vblank enable ... commit c76cd634eb5bfd497617ea224a54a03b545c8c4d Merge: 8fe28cb58bcb2 fb7255a923115 Author: Linus Torvalds Date: Tue Dec 25 11:04:17 2018 -0800 Merge tag 'platform-drivers-x86-v4.21-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - The USB Power Delivery discrete components now can be enumerated by i2c-multi-instantiate driver via several resources under single ACPI device node (ACPI ID is INT3515). - Touchscreen support is added for the Mediacom Flexbook Edge 11. - Mellanox driver got fixed due to updates in their firmware. - The power management stub driver for AtomISP v2 is fixed in order to support Intel Baytrail SoCs where same quirk is needed for S0ix to work. - Special key handling has been fixed for Favorites hotkey on Thinkpad, and Screen LOCK on ASUS. - Ideapad Yoga 2 13 has no HW rfkill switch, thus, driver has been updated to support this. - Few cleanups related to debugfs have been made in Intel IPS and Intel PMC drivers. Besides that Intel PMC has been extended to show more detailed information about Latency Tolerance * tag 'platform-drivers-x86-v4.21-1' of git://git.infradead.org/linux-platform-drivers-x86: (41 commits) platform/x86: mlx-platform: Convert to use SPDX identifier Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform/x86: mlx-platform: Allow mlxreg-io driver activation for new systems platform/x86: mlx-platform: Fix LED configuration platform/x86: mlx-platform: Fix tachometer registers platform/x86: mlx-platform: Rename new systems product names platform/x86: mlx-platform: Add definitions for new registers platform/x86: intel_telemetry: convert to DEFINE_SHOW_ATTRIBUTE platform/x86: intel_pmc_core: convert to DEFINE_SHOW_ATTRIBUTE platform/x86: thinkpad_acpi: Cleanup quirks macros platform/x86: touchscreen_dmi: Add info for the Mediacom Flexbook Edge 11 platform/x86: Fix config space access for intel_atomisp2_pm platform/x86: Add the VLV ISP PCI ID to atomisp2_pm platform/x86: intel_ips: Convert to use DEFINE_SHOW_ATTRIBUTE macro platform/x86: intel_ips: Remove never happen condition platform/x86: intel_ips: NULL check before some freeing functions is not needed platform/x86: intel_ips: remove unnecessary checks in ips_debugfs_init iio: inv_mpu6050: Use i2c_acpi_get_i2c_resource() helper ACPI / scan: Create platform device for INT3515 ACPI nodes platform/x86: i2c-multi-instantiate: Allow to have same slaves ... commit 574d356b7a02c7e1b01a1d9cba8a26b3c2888f45 Author: Dominique Martinet Date: Mon Nov 5 09:52:48 2018 +0100 9p/net: put a lower bound on msize If the requested msize is too small (either from command line argument or from the server version reply), we won't get any work done. If it's *really* too small, nothing will work, and this got caught by syzbot recently (on a new kmem_cache_create_usercopy() call) Just set a minimum msize to 4k in both code paths, until someone complains they have a use-case for a smaller msize. We need to check in both mount option and server reply individually because the msize for the first version request would be unchecked with just a global check on clnt->msize. Link: http://lkml.kernel.org/r/1541407968-31350-1-git-send-email-asmadeus@codewreck.org Reported-by: syzbot+0c1d61e4db7db94102ca@syzkaller.appspotmail.com Signed-off-by: Dominique Martinet Cc: Eric Van Hensbergen Cc: Latchesar Ionkov Cc: stable@vger.kernel.org commit 2b08b1f12cd664dc7d5c84ead9ff25ae97ad5491 Author: Theodore Ts'o Date: Tue Dec 25 00:56:33 2018 -0500 ext4: fix a potential fiemap/page fault deadlock w/ inline_data The ext4_inline_data_fiemap() function calls fiemap_fill_next_extent() while still holding the xattr semaphore. This is not necessary and it triggers a circular lockdep warning. This is because fiemap_fill_next_extent() could trigger a page fault when it writes into page which triggers a page fault. If that page is mmaped from the inline file in question, this could very well result in a deadlock. This problem can be reproduced using generic/519 with a file system configuration which has the inline_data feature enabled. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 812c0cab2c0dfad977605dbadf9148490ca5d93f Author: Theodore Ts'o Date: Mon Dec 24 20:27:08 2018 -0500 ext4: make sure enough credits are reserved for dioread_nolock writes There are enough credits reserved for most dioread_nolock writes; however, if the extent tree is sufficiently deep, and/or quota is enabled, the code was not allowing for all eventualities when reserving journal credits for the unwritten extent conversion. This problem can be seen using xfstests ext4/034: WARNING: CPU: 1 PID: 257 at fs/ext4/ext4_jbd2.c:271 __ext4_handle_dirty_metadata+0x10c/0x180 Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work RIP: 0010:__ext4_handle_dirty_metadata+0x10c/0x180 ... EXT4-fs: ext4_free_blocks:4938: aborting transaction: error 28 in __ext4_handle_dirty_metadata EXT4: jbd2_journal_dirty_metadata failed: handle type 11 started at line 4921, credits 4/0, errcode -28 EXT4-fs error (device dm-1) in ext4_free_blocks:4950: error 28 Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 90cadbbf341dd5b2df991c33a6bd6341f3a53788 Merge: c92c81df93df9 38355a5f9a22b Author: David S. Miller Date: Mon Dec 24 16:19:56 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull in bug fixes before respinning my net-next pull request. Signed-off-by: David S. Miller commit c92c81df93df95dafbf6926613ce0b436227b007 Author: Peter Oskolkov Date: Mon Dec 24 12:57:17 2018 -0800 net: dccp: fix kernel crash on module load Patch eedbbb0d98b2 "net: dccp: initialize (addr,port) ..." added calling to inet_hashinfo2_init() from dccp_init(). However, inet_hashinfo2_init() is marked as __init(), and thus the kernel panics when dccp is loaded as module. Removing __init() tag from inet_hashinfo2_init() is not feasible because it calls into __init functions in mm. This patch adds inet_hashinfo2_init_mod() function that can be called after the init phase is done; changes dccp_init() to call the new function; un-marks inet_hashinfo2_init() as exported. Fixes: eedbbb0d98b2 ("net: dccp: initialize (addr,port) ...") Reported-by: kernel test robot Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit bd437c99cf63b8adaea51156db383f9dfdd57503 Author: Colin Ian King Date: Mon Dec 24 19:41:46 2018 +0000 drivers/net: appletalk/cops: remove redundant if statement and mask The two different assignments for pkt_len are actually the same and so the if statement is redundant and can be removed. Masking a u8 return value from inb() with 0xFF is also redundant and can also be emoved. Similarly, the two different outb calls are identical as the mask of 0xff on the second outb is redundant since a u8 is being written, so the if statement is also redundant and can be also removed. Detected by CoverityScan, CID#1475639 ("Identical code for different branches") V2: Remove the if statement for the outb calls, thanks to David Miller for spotting this. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 38355a5f9a22bfa5bd5b1bb79805aca39fa53729 Author: Ivan Mironov Date: Mon Dec 24 20:13:05 2018 +0500 bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw This happened when I tried to boot normal Fedora 29 system with latest available kernel (from fedora rawhide, plus some unrelated custom patches): BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 6 PID: 1422 Comm: libvirtd Tainted: G I 4.20.0-0.rc7.git3.hpsa2.1.fc29.x86_64 #1 Hardware name: HP ProLiant BL460c G6, BIOS I24 05/21/2018 RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffffa47ccdc9fbe0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000003e8 RCX: ffffa47ccdc9fbf8 RDX: ffffa47ccdc9fc00 RSI: ffff97d9ee7b01f8 RDI: ffff97d9f0150b80 RBP: ffff97d9f0150b80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003 R13: ffff97d9ef1e53e8 R14: 0000000000000009 R15: ffff97d9f0ac6730 FS: 00007f4d224ef700(0000) GS:ffff97d9fa200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000011ece52006 CR4: 00000000000206e0 Call Trace: ? bnx2x_chip_cleanup+0x195/0x610 [bnx2x] ? bnx2x_nic_unload+0x1e2/0x8f0 [bnx2x] ? bnx2x_reload_if_running+0x24/0x40 [bnx2x] ? bnx2x_set_features+0x79/0xa0 [bnx2x] ? __netdev_update_features+0x244/0x9e0 ? netlink_broadcast_filtered+0x136/0x4b0 ? netdev_update_features+0x22/0x60 ? dev_disable_lro+0x1c/0xe0 ? devinet_sysctl_forward+0x1c6/0x211 ? proc_sys_call_handler+0xab/0x100 ? __vfs_write+0x36/0x1a0 ? rcu_read_lock_sched_held+0x79/0x80 ? rcu_sync_lockdep_assert+0x2e/0x60 ? __sb_start_write+0x14c/0x1b0 ? vfs_write+0x159/0x1c0 ? vfs_write+0xba/0x1c0 ? ksys_write+0x52/0xc0 ? do_syscall_64+0x60/0x1f0 ? entry_SYSCALL_64_after_hwframe+0x49/0xbe After some investigation I figured out that recently added cleanup code tries to call VLAN filtering de-initialization function which exist only for newer hardware. Corresponding function pointer is not set (== 0) for older hardware, namely these chips: #define CHIP_NUM_57710 0x164e #define CHIP_NUM_57711 0x164f #define CHIP_NUM_57711E 0x1650 And I have one of those in my test system: Broadcom Inc. and subsidiaries NetXtreme II BCM57711E 10-Gigabit PCIe [14e4:1650] Function bnx2x_init_vlan_mac_fp_objs() from drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h decides whether to initialize relevant pointers in bnx2x_sp_objs.vlan_obj or not. This regression was introduced after v4.20-rc7, and still exists in v4.20 release. Fixes: 04f05230c5c13 ("bnx2x: Remove configured vlans as part of unload sequence.") Signed-off-by: Ivan Mironov Signed-off-by: Ivan Mironov Acked-by: Sudarsana Kalluru Signed-off-by: David S. Miller commit 0eb987c874dc93f9c9d85a6465dbde20fdd3884c Author: Aditya Pakki Date: Sun Dec 23 19:42:38 2018 -0600 net/net_namespace: Check the return value of register_pernet_subsys() In net_ns_init(), register_pernet_subsys() could fail while registering network namespace subsystems. The fix checks the return value and sends a panic() on failure. Signed-off-by: Aditya Pakki Reviewed-by: Kirill Tkhai Signed-off-by: David S. Miller commit 89dfd0083751d00d5d7ead36f6d8b045bf89c5e1 Author: Aditya Pakki Date: Sun Dec 23 18:54:53 2018 -0600 net/netlink_compat: Fix a missing check of nla_parse_nested In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return an error. To be consistent with other invocations of the function call, on error, the fix passes the return value upstream. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit 40c3ff6d5e0809505a067dd423c110c5658c478c Author: Willem de Bruijn Date: Sun Dec 23 12:52:18 2018 -0500 ieee802154: lowpan_header_create check must check daddr Packet sockets may call dev_header_parse with NULL daddr. Make lowpan_header_ops.create fail. Fixes: 87a93e4eceb4 ("ieee802154: change needed headroom/tailroom") Signed-off-by: Willem de Bruijn Acked-by: Alexander Aring Signed-off-by: David S. Miller commit 61988bd281c9b08e0cc084f0b2da3b109c4c39c8 Author: Julia Lawall Date: Sun Dec 23 09:57:14 2018 +0100 net/mlx4_core: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests") Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit d0863792f805ffad7d98fb6bd484bc2fad59c8ea Author: Julia Lawall Date: Sun Dec 23 09:57:11 2018 +0100 mlxsw: spectrum: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares is never used. The uses were removed in 244cd96adb5f ("net_sched: remove list_head from tc_action"), but not the declaration. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action") Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit 2534f14a94c1fe48928a4b00a0e241fa7132d00b Author: Julia Lawall Date: Sun Dec 23 09:56:57 2018 +0100 net/mlx5e: drop useless LIST_HEAD Drop LIST_HEAD where the variable it declares is never used. These became useless in 244cd96adb5f ("net_sched: remove list_head from tc_action") The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action") Signed-off-by: Julia Lawall Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 7bdca378b2301b1fc6a95c60d6d428408ae4e39e Author: wenxu Date: Sun Dec 23 16:18:39 2018 +0800 iptunnel: Set tun_flags in the iptunnel_metadata_reply from src ip l add tun type gretap external ip r a 10.0.0.2 encap ip id 1000 dst 172.168.0.2 key dev tun ip a a 10.0.0.1/24 dev tun The peer arp request to 10.0.0.1 with tunnel_id, but the arp reply only set the tun_id but not the tun_flags with TUNNEL_KEY. The arp reply packet don't contain tun_id field. Signed-off-by: wenxu Signed-off-by: David S. Miller commit 5d1f7354faad4b6210fac9192d0ca4c16b00ae7e Author: kbuild test robot Date: Sat Dec 22 20:02:16 2018 +0800 net/mlx5e: fix semicolon.cocci warnings drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1339:57-58: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 4c8fb2986d44 ("net/mlx5e: Increase VF representors' SQ size to 128") CC: Gavi Teitz Signed-off-by: kbuild test robot Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 8762cdcd1d5055017770a54e2755bed30dd4f8b6 Author: Florian Westphal Date: Fri Dec 21 21:57:26 2018 +0100 staging: octeon: fix build failure with XFRM enabled skb->sp doesn't exist anymore in the next-next tree, so mips defconfig no longer builds. Use helper instead to reset the secpath. Not even compile tested. Cc: Greg Kroah-Hartman Reported-by: Guenter Roeck Fixes: 4165079ba328d ("net: switch secpath to use skb extension infrastructure") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit dec28d8ea2f731b7ec68a2c9421e99a165d47b57 Author: Masahiro Yamada Date: Mon Dec 24 23:11:09 2018 +0900 kbuild: remove unused cmd_gentimeconst filechk_gentimeconst is always used instead of cmd_gentimeconst. Signed-off-by: Masahiro Yamada commit e3c21e088f8936a004a3d9f2f4e14b3f2bdd6ea9 Author: Andrew Lunn Date: Wed Dec 19 16:18:20 2018 +0100 watchdog: tqmx86: Add watchdog driver for the IO controller Some TQ-Systems ComExpress modules have an IO controller with a watchdog timer. Signed-off-by: Andrew Lunn Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6797f292e4f59211c1763de87a69c9a55fd9caef Author: Fabrizio Castro Date: Thu Dec 13 20:18:53 2018 +0000 dt-bindings: watchdog: renesas-wdt: Document r8a774c0 support RZ/G2E (R8A774C0) watchdog implementation is compatible with R-Car Gen3, therefore add relevant documentation. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2b6d86a73ec07f1ba95a274d8756fa1e67ef29c4 Author: Wolfram Sang Date: Mon Dec 17 20:14:11 2018 +0100 watchdog: docs: kernel-api: don't reference removed functions Those functions are not only deprecated, but gone for good. Fixes: 62cd1c40ce1c ("watchdog: kill unref/ref ops") Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e536f7304badbf15e2099f08b5d47fbbf111a624 Author: Wolfram Sang Date: Mon Dec 17 20:33:14 2018 +0100 watchdog: add documentation for PM usage Add the first rule we recently agreed on. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e94b815524f83536415d7d59cc1833ad05934d97 Author: Fabrizio Castro Date: Thu Dec 13 20:20:15 2018 +0000 dt-bindings: pwm: rcar: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding commit 9f4c8f9607c3147d291b70c13dd01c738ed41faf Author: Anson Huang Date: Wed Dec 19 05:24:58 2018 +0000 pwm: imx: Add ipg clock operation i.MX PWM module's ipg_clk_s is for PWM register access, on most of i.MX SoCs, this ipg_clk_s is from system ipg clock or perclk which is always enabled, but on i.MX7D, the ipg_clk_s is from PWM1_CLK_ROOT which is controlled by CCGR132, that means the CCGR132 MUST be enabled first before accessing PWM registers on i.MX7D. This patch adds ipg clock operation to make sure register access successfully on i.MX7D and it fixes Linux kernel boot up hang during PWM driver probe. Fixes: 4a23e6ee9f69 ("ARM: dts: imx7d-sdb: Restore pwm backlight support") Signed-off-by: Anson Huang Signed-off-by: Thierry Reding commit f236d188683667274824de662d124720198730b7 Author: Alexander Shiyan Date: Wed Dec 19 13:39:25 2018 +0300 pwm: clps711x: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Alexander Shiyan Signed-off-by: Thierry Reding commit b0f17570b8203c22f139459c86cfbaa0311313ed Author: Alexander Shiyan Date: Wed Dec 19 13:39:24 2018 +0300 pwm: clps711x: Fix period calculation Commit e39c0df1be5a ("pwm: Introduce the pwm_args concept") has changed the variable for the period for clps711x-pwm driver, so now pwm_get/set_period() works with pwm->state.period variable instead of pwm->args.period. This patch changes the period variable in other places where it is used. Signed-off-by: Alexander Shiyan Signed-off-by: Thierry Reding commit e747cbe257fdc08f1a8b19b4c9f75a377b6f783d Author: Stefan Wahren Date: Sat Nov 10 17:22:58 2018 +0100 pwm: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Bart Tanghe Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Thierry Reding commit 88a053d2923479658e82621c4c642dc8a494392d Author: Clément Péron Date: Fri Nov 23 10:35:59 2018 +0100 pwm: Enable Kona PWM to be built for the Cygnus architecture The Cygnus architecture uses a Kona PWM. This is already present in the device tree but can't be built actually. Hence, allow the Kona PWM to be built for the Cygnus architecture. Signed-off-by: Clément Péron Reviewed-by: Florian Fainelli Reviewed-by: Scott Branden Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c75ff001f4fe21a8c9f15aad799a8949aea109f7 Author: Deepak Rawat Date: Fri Dec 21 11:35:59 2018 -0800 drm: Put damage blob when destroy plane state Somehow the code to put the damage blob on destroy plane state and set the blob to NULL when duplicate plane state was not merged. May be because the files are refactored since the patch was written. With this fix add those. Cc: Daniel Vetter Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Fixes: d3b21767821e ("drm: Add a new plane property to send damage during plane update") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181221193559.4346-1-drawat@vmware.com commit cbdd2663f4c801ad93f7111f93d9846589a0d530 Author: Colin Ian King Date: Sat Dec 22 13:00:46 2018 +0000 drm: fix null pointer dereference on null state pointer In the case where state cannot be allocated, the current exit path via label 'out' will dereference the null state pointer when calling drm_atomic_state_put. Fix this by adding a new error exit label and jumping to this to avoid the drm_atomic_state_put. Detected by CoverityScan, CID#1476034 ("Dereference after null check") Fixes: b9fc5e01d1ce ("drm: Add helper to implement legacy dirtyfb") Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181222130046.14083-1-colin.king@canonical.com commit 598134ffcab5bfb1d342458732394487063e1b9e Author: Greg Kroah-Hartman Date: Mon Dec 24 09:18:00 2018 +0100 Revert "serial: 8250: Default SERIAL_OF_PLATFORM to SERIAL_8250" This reverts commit 6d11023c345e369bcb9d5a68b271764e362c1f6e. It causes issues with Guenter's test systems and since there seems to not be any agreement about _why_ this is a problem, but reverting it fixes things, let's revert until the root cause is found. Reported-by: Guenter Roeck Cc: Florian Fainelli Signed-off-by: Greg Kroah-Hartman commit d2b911db8b73bc6bfa163515b4ff142fb0dda66d Author: Linus Walleij Date: Sat Dec 22 11:12:31 2018 +0100 watchdog: mtx-1: Convert to use GPIO descriptor This converts the MTX-1 driver to grab a GPIO descriptor associated with the device instead of using a resource with a global GPIO number. Augment the driver and the boardfile. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Florian Fainelli Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Acked-by: Paul Burton Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e7b602f43719fc6173ae86d2de8f6f07c6858ddd Author: Paulo Alcantara Date: Wed Nov 14 15:38:51 2018 -0200 cifs: Save TTL value when parsing DFS referrals This will be needed by DFS cache. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 5fc7fcd054adcf0f264446cbf778d33e30a45455 Author: Aurelien Aptel Date: Fri Nov 16 16:13:25 2018 +0100 cifs: auto disable 'serverino' in dfs mounts Different servers have different set of file ids. After failover, unique IDs will be different so we can't validate them. Signed-off-by: Aurelien Aptel Reviewed-by: Paulo Alcantara Signed-off-by: Steve French commit d9345e0ae7cff25e9aed39d21f092dbb482dffec Author: Paulo Alcantara Date: Wed Nov 14 14:18:22 2018 -0200 cifs: Make devname param optional in cifs_compose_mount_options() If we only want to get the mount options strings, do not return the devname. For DFS failover, we'll be passing the DFS full path down to cifs_mount() rather than the devname. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c34fea5a636d98607ee6e41c78acc9d5ca8fb756 Author: Paulo Alcantara Date: Wed Nov 14 14:03:40 2018 -0200 cifs: Skip any trailing backslashes from UNC When extracting hostname from UNC, check for leading backslashes before trying to remove them. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 56c762eb9bee330bb4e6d11c589434f2904d3ab6 Author: Paulo Alcantara Date: Wed Nov 14 13:03:14 2018 -0200 cifs: Refactor out cifs_mount() * Split and refactor the very large function cifs_mount() in multiple functions: - tcp, ses and tcon setup to mount_get_conns() - tcp, ses and tcon cleanup in mount_put_conns() - tcon tlink setup to mount_setup_tlink() - remote path checking to is_path_remote() * Implement 2 version of cifs_mount() for DFS-enabled builds and non-DFS-enabled builds (CONFIG_CIFS_DFS_UPCALL). In preparation for DFS failover support. Signed-off-by: Paulo Alcantara Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 9a596f5b39593414c0ec80f71b94a226286f084e Author: Georgy A Bystrenin Date: Fri Dec 21 00:11:42 2018 -0600 CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem While resolving a bug with locks on samba shares found a strange behavior. When a file locked by one node and we trying to lock it from another node it fail with errno 5 (EIO) but in that case errno must be set to (EACCES | EAGAIN). This isn't happening when we try to lock file second time on same node. In this case it returns EACCES as expected. Also this issue not reproduces when we use SMB1 protocol (vers=1.0 in mount options). Further investigation showed that the mapping from status_to_posix_error is different for SMB1 and SMB2+ implementations. For SMB1 mapping is [NT_STATUS_LOCK_NOT_GRANTED to ERRlock] (See fs/cifs/netmisc.c line 66) but for SMB2+ mapping is [STATUS_LOCK_NOT_GRANTED to -EIO] (see fs/cifs/smb2maperror.c line 383) Quick changes in SMB2+ mapping from EIO to EACCES has fixed issue. BUG: https://bugzilla.kernel.org/show_bug.cgi?id=201971 Signed-off-by: Georgy A Bystrenin Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French commit 54e94ff94eac887ddb59cfd46b18896da5695e35 Author: Long Li Date: Sun Dec 16 22:41:07 2018 +0000 CIFS: return correct errors when pinning memory failed for direct I/O When pinning memory failed, we should return the correct error code and rewind the SMB credits. Reported-by: Murphy Zhou Signed-off-by: Long Li Cc: stable@vger.kernel.org Cc: Murphy Zhou Signed-off-by: Steve French commit b6bc8a7b993e62f82415a5e3e4a6469e80fea19c Author: Long Li Date: Sun Dec 16 23:17:04 2018 +0000 CIFS: use the correct length when pinning memory for direct I/O for write The current code attempts to pin memory using the largest possible wsize based on the currect SMB credits. This doesn't cause kernel oops but this is not optimal as we may pin more pages then actually needed. Fix this by only pinning what are needed for doing this write I/O. Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: Steve French Reviewed-by: Joey Pabalinas commit 59a63e479ce36a3f24444c3a36efe82b78e4a8e0 Author: Ronnie Sahlberg Date: Thu Dec 13 08:06:16 2018 +1000 cifs: check ntwrk_buf_start for NULL before dereferencing it RHBZ: 1021460 There is an issue where when multiple threads open/close the same directory ntwrk_buf_start might end up being NULL, causing the call to smbCalcSize later to oops with a NULL deref. The real bug is why this happens and why this can become NULL for an open cfile, which should not be allowed. This patch tries to avoid a oops until the time when we fix the underlying issue. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 52baa51d30573273341b78a3e3ed0d9a845d3e55 Author: Ronnie Sahlberg Date: Wed Dec 12 11:50:00 2018 +1000 cifs: remove coverity warning in calc_lanman_hash password_with_pad is a fixed size buffer of 16 bytes, it contains a password string, to be padded with \0 if shorter than 16 bytes but is just truncated if longer. It is not, and we do not depend on it to be, nul terminated. As such, do not use strncpy() to populate this buffer since the str* prefix suggests that this is a string, which it is not, and it also confuses coverity causing a false warning. Detected by CoverityScan CID#113743 ("Buffer not null terminated") Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 0f57451eebf1945790785df106497bf62812f62a Author: YueHaibing Date: Fri Dec 7 07:05:38 2018 +0000 cifs: remove set but not used variable 'smb_buf' Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/sess.c: In function '_sess_auth_rawntlmssp_assemble_req': fs/cifs/sess.c:1157:18: warning: variable 'smb_buf' set but not used [-Wunused-but-set-variable] It never used since commit cc87c47d9d7a ("cifs: Separate rawntlmssp auth from CIFS_SessSetup()") Signed-off-by: YueHaibing Signed-off-by: Steve French commit 07fa6010ff939ef6c5a9ae0d230fdfd3bad82722 Author: Gustavo A. R. Silva Date: Tue Nov 27 10:01:51 2018 +1100 cifs: suppress some implicit-fallthrough warnings To avoid the warning: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Stephen Rothwell Signed-off-by: Steve French commit f9793b6fcc8ede4c2eb5f2d5816b1c8b4f927032 Author: Ronnie Sahlberg Date: Tue Nov 27 09:52:04 2018 +1000 cifs: change smb2_query_eas to use the compound query-info helper Reducing the number of network roundtrips improves the performance of query xattrs Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 4a3b38aec5778f8eb37b2eb4701baffb1da4ccd5 Author: Kenneth D'souza Date: Sat Nov 17 10:33:30 2018 +0530 Add vers=3.0.2 as a valid option for SMBv3.0.2 Technically 3.02 is not the dialect name although that is more familiar to many, so we should also accept the official dialect name (3.0.2 vs. 3.02) in vers= Signed-off-by: Kenneth D'souza Signed-off-by: Steve French commit 07d3b2e4264fb32bf82074311abc20c6de224d61 Author: Ronnie Sahlberg Date: Thu Dec 20 22:03:04 2018 -0600 cifs: create a helper function for compound query_info and convert statfs to use it. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 97aa495a89a631822431b789b8553b81e3460255 Author: Steve French Date: Thu Nov 15 00:33:05 2018 -0600 cifs: address trivial coverity warning This is not actually a bug but as Coverity points out we shouldn't be doing an "|=" on a value which hasn't been set (although technically it was memset to zero so isn't a bug) and so might as well change "|=" to "=" in this line Detected by CoverityScan, CID#728535 ("Unitialized scalar variable") Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit f5942db5ef25531d53f2aa2ff84a46e1763b4196 Author: Steve French Date: Wed Nov 14 01:37:39 2018 -0600 cifs: smb2 commands can not be negative, remove confusing check As Coverity points out le16_to_cpu(midEntry->Command) can not be less than zero. Detected by CoverityScan, CID#1438650 ("Macro compares unsigned to 0") Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 0967e5457954370cc4e9902bd47b142e9655365f Author: Ronnie Sahlberg Date: Tue Nov 6 22:52:43 2018 +1000 cifs: use a compound for setting an xattr Improve performance by reducing number of network round trips for set xattr. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 5890255b83f3ce9ef9202804dfab744033c0e603 Author: Colin Ian King Date: Sat Nov 3 15:59:44 2018 +0000 cifs: clean up indentation, replace spaces with tab Trivial fix to clean up indentation, replace spaces with tab Signed-off-by: Colin Ian King Signed-off-by: Steve French commit 12526b0d6c580df860b31e59d68e5696e16c6e5b Merge: 9bbc7e4ce47ec 63d86876f3244 Author: Michael Ellerman Date: Mon Dec 24 14:14:45 2018 +1100 Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Highlights include elimination of legacy clock bindings use from dts files, an 83xx watchdog handler, fixes to old dts interrupt errors, and some minor cleanup." commit 63d86876f32440a45b6f9d42ab2fb7f68b3a8bf7 Author: Scott Wood Date: Sun Dec 23 20:09:39 2018 -0600 Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask" This reverts commit c6e5485e0cb509292a14e880e1944143f99758c7 due to failures such as: e1000e 2000:01:00.0: Tx DMA map failed Signed-off-by: Scott Wood commit f2ab95814103314af3239d322e382c61c69a788d Author: David S. Miller Date: Sun Dec 23 16:01:35 2018 -0800 net: Revert recent Spectre-v1 patches. This reverts: 50d5258634ae ("net: core: Fix Spectre v1 vulnerability") d686026b1e6e ("phonet: af_phonet: Fix Spectre v1 vulnerability") a95386f0390a ("nfc: af_nfc: Fix Spectre v1 vulnerability") a3ac5817ffe8 ("can: af_can: Fix Spectre v1 vulnerability") After some discussion with Alexei Starovoitov these all seem to be completely unnecessary. Signed-off-by: David S. Miller commit 0b15394475e3bcaf35ca4bf22fc55d56df67224e Author: Stefan Roese Date: Mon Dec 17 10:47:48 2018 +0100 MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 Testing has shown, that when using mainline U-Boot on MT7688 based boards, the system may hang or crash while mounting the root-fs. The main issue here is that mainline U-Boot configures EBase to a value near the end of system memory. And with CONFIG_CPU_MIPSR2_IRQ_VI disabled, trap_init() will not allocate a new area to place the exception handler. The original value will be used and the handler will be copied to this location, which might already be used by some userspace application. The MT7688 supports VI - its config3 register is 0x00002420, so VInt (Bit 5) is set. But without setting CONFIG_CPU_MIPSR2_IRQ_VI this bit will not be evaluated to result in "cpu_has_vi" being set. This patch now selects CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 which results trap_init() to allocate some memory for the exception handler. Please note that this issue was not seen with the Mediatek U-Boot version, as it does not touch EBase (stays at default of 0x8000.0000). This is strictly also not correct as the kernel (_text) resides here. Signed-off-by: Stefan Roese [paul.burton@mips.com: s/beeing/being/] Signed-off-by: Paul Burton Cc: John Crispin Cc: Daniel Schwierzeck Cc: Ralf Baechle Cc: linux-mips@linux-mips.org commit 9bd2f7eeaed129627a609b5c98098f0fd7805d24 Author: Alexandre Belloni Date: Tue Dec 18 15:26:36 2018 +0100 MAINTAINERS: Add a maintainer for MSCC MIPS SoCs Microsemi has been bought by Microchip and Microchip is supporting those SoCs. Signed-off-by: Alexandre Belloni Acked-by: Woojung Huh Signed-off-by: Paul Burton Cc: James Hogan Cc: Ralf Baechle Cc: linux-kernel@vger.kernel.org commit 994bc7fae916f8783ea7d357f1ccd6b3a67919f7 Author: Manuel Lauss Date: Wed Dec 19 08:08:03 2018 +0100 MIPS: Alchemy: update dma masks for devboard devices Fix the DMA masks for sound and mmc devices. Verified on DB1300 and DB1500. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS commit 7a3097be955efd979e96ced5edab651a4c09d42f Author: Manuel Lauss Date: Wed Dec 19 08:08:02 2018 +0100 MIPS: Alchemy: update cpu-feature-overrides No shiny new stuff for Alchemy. Tested on DB1300 and DB1500. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS commit e898d084eae086762406d487b3e81185c47de35d Author: Manuel Lauss Date: Wed Dec 19 08:08:01 2018 +0100 MIPS: Alchemy: drop DB1000 IrDA support bits The IrDA drivers are gone, drop the now unused DB1000 board support for it. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS commit bbb8a75208937beee3bba746da7addb194588619 Author: Manuel Lauss Date: Wed Dec 19 08:07:59 2018 +0100 MIPS: alchemy: cpu_all_mask is forbidden for clock event devices change alchemy clock event device cpu_all_mask to cpu_possible_mask. Gets rid of a warning, which then does the same substitution: WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:468 clockevents_register_device+0x130/0x140 rtcmatch2 cpumask == cpu_all_mask, using cpu_possible_mask instead Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS commit 8a38dacf87180738d42b058334c951eba15d2d47 Author: Jonas Gorski Date: Mon Dec 10 12:40:38 2018 +0100 MIPS: BCM63XX: fix switch core reset on BCM6368 The Ethernet Switch core mask was set to 0, causing the switch core to be not reset on BCM6368 on boot. Provide the proper mask so the switch core gets reset to a known good state. Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper") Signed-off-by: Jonas Gorski Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Florian Fainelli commit c79b411eaa7257204f89c30651c45cea22278769 Author: Eric Biggers Date: Sun Dec 16 15:55:06 2018 -0800 crypto: skcipher - remove remnants of internal IV generators Remove dead code related to internal IV generators, which are no longer used since they've been replaced with the "seqiv" and "echainiv" templates. The removed code includes: - The "givcipher" (GIVCIPHER) algorithm type. No algorithms are registered with this type anymore, so it's unneeded. - The "const char *geniv" member of aead_alg, ablkcipher_alg, and blkcipher_alg. A few algorithms still set this, but it isn't used anymore except to show via /proc/crypto and CRYPTO_MSG_GETALG. Just hardcode "" or "" in those cases. - The 'skcipher_givcrypt_request' structure, which is never used. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit dec5d0db0de7271c7616d713f6c434c6366c9bfb Author: Eric Biggers Date: Sun Dec 16 15:00:30 2018 -0800 crypto: cavium/nitrox - Fix build with !CONFIG_DEBUG_FS Fixes: cf718eaa8f9b ("crypto: cavium/nitrox - Enabled Mailbox support") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 101b53d91d57ebcc13cb5fbd437b1230457ba9e2 Author: Eric Biggers Date: Sat Dec 15 12:42:52 2018 -0800 crypto: salsa20-generic - don't unnecessarily use atomic walk salsa20-generic doesn't use SIMD instructions or otherwise disable preemption, so passing atomic=true to skcipher_walk_virt() is unnecessary. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit bb648291fc04c49197561939b8bfea0ada42bce3 Author: Eric Biggers Date: Sat Dec 15 12:41:53 2018 -0800 crypto: skcipher - add might_sleep() to skcipher_walk_virt() skcipher_walk_virt() can still sleep even with atomic=true, since that only affects the later calls to skcipher_walk_done(). But, skcipher_walk_virt() only has to allocate memory for some input data layouts, so incorrectly calling it with preemption disabled can go undetected. Use might_sleep() so that it's detected reliably. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f9c9bdb5131eee60dc3b92e5126d4c0e291703e2 Author: Eric Biggers Date: Sat Dec 15 12:40:17 2018 -0800 crypto: x86/chacha - avoid sleeping under kernel_fpu_begin() Passing atomic=true to skcipher_walk_virt() only makes the later skcipher_walk_done() calls use atomic memory allocations, not skcipher_walk_virt() itself. Thus, we have to move it outside of the preemption-disabled region (kernel_fpu_begin()/kernel_fpu_end()). (skcipher_walk_virt() only allocates memory for certain layouts of the input scatterlist, hence why I didn't notice this earlier...) Reported-by: syzbot+9bf843c33f782d73ae7d@syzkaller.appspotmail.com Fixes: 4af78261870a ("crypto: x86/chacha20 - add XChaCha20 support") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c9613335bf4fe259a654aa0e9701f0c4cddc12ba Author: Nagadheeraj Rottela Date: Fri Dec 14 11:19:51 2018 +0000 crypto: cavium/nitrox - Added AEAD cipher support Added support to offload AEAD ciphers to NITROX. Currently supported AEAD cipher is 'gcm(aes)'. Signed-off-by: Nagadheeraj Rottela Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 2326828ee40357b3d2b1359b8ca7526af201495b Author: Fabio Estevam Date: Thu Dec 13 07:52:32 2018 -0200 crypto: mxc-scc - fix build warnings on ARM64 The following build warnings are seen when building for ARM64 allmodconfig: drivers/crypto/mxc-scc.c:181:20: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:186:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:277:21: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] drivers/crypto/mxc-scc.c:339:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] drivers/crypto/mxc-scc.c:340:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix them by using the %zu specifier to print a size_t variable and using a plain %x to print the result of a readl(). Signed-off-by: Fabio Estevam Signed-off-by: Herbert Xu commit bfad6cb3f8295559216690e1eb9c99003a79b3a0 Author: Corentin Labbe Date: Thu Dec 13 08:36:38 2018 +0000 crypto: api - document missing stats member This patchs adds missing member of stats documentation. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 0c99c2a087c60b71e1fc90d070e2e16ca52defbe Author: Corentin Labbe Date: Thu Dec 13 08:36:37 2018 +0000 crypto: user - remove unused dump functions This patch removes unused dump functions for crypto_user_stats. There are remains of the copy/paste of crypto_user_base to crypto_user_stat and I forgot to remove them. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit f31ba0f95f1998118098978dbfb25ecbec6b0891 Author: Harsh Jain Date: Tue Dec 11 16:21:42 2018 +0530 crypto: chelsio - Fix wrong error counter increments Fix error counter increment in AEAD decrypt operation when validation of tag is done in Driver instead of H/W. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit 6501ab5ed4d925cce4c2a1c49b63583c42e65bd8 Author: Harsh Jain Date: Tue Dec 11 16:21:41 2018 +0530 crypto: chelsio - Reset counters on cxgb4 Detach Reset the counters on receiving detach from Cxgb4. Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu commit fef4912b66d6246d958d97382d20d0dd23bcf0bc Author: Harsh Jain Date: Tue Dec 11 16:21:40 2018 +0530 crypto: chelsio - Handle PCI shutdown event chcr receives "CXGB4_STATE_DETACH" event on PCI Shutdown. Wait for processing of inflight request and Mark the device unavailable. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit c4f6d44d774eff382b6fc79a9fe1ff376b5ac6d7 Author: Harsh Jain Date: Tue Dec 11 16:21:39 2018 +0530 crypto: chelsio - cleanup:send addr as value in function argument Send dma address as value to function arguments instead of pointer. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit d5a4dfbdaf54cbd845755a5415cff57688bb983c Author: Harsh Jain Date: Tue Dec 11 16:21:38 2018 +0530 crypto: chelsio - Use same value for both channel in single WR Use tx_channel_id instead of rx_channel_id. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit 1f479e4cfd08f20e48dfde07b27e3180e0901252 Author: Harsh Jain Date: Tue Dec 11 16:21:37 2018 +0530 crypto: chelsio - Swap location of AAD and IV sent in WR Send input as IV | AAD | Data. It will allow sending IV as Immediate Data and Creates space in Work request to add more dma mapped entries. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu commit 3cc04c160208ec55940db652343d236515d88af5 Author: YueHaibing Date: Tue Dec 11 08:11:59 2018 +0000 crypto: chelsio - remove set but not used variable 'kctx_len' Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/chelsio/chcr_ipsec.c: In function 'chcr_ipsec_xmit': drivers/crypto/chelsio/chcr_ipsec.c:674:33: warning: variable 'kctx_len' set but not used [-Wunused-but-set-variable] unsigned int flits = 0, ndesc, kctx_len; It not used since commit 8362ea16f69f ("crypto: chcr - ESN for Inline IPSec Tx") Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 5ac93f808338f4dd465402e91869702eb87db241 Author: Nathan Chancellor Date: Mon Dec 10 16:49:54 2018 -0700 crypto: ux500 - Use proper enum in hash_set_dma_transfer Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); ^~~~~~~~~ 1 warning generated. dmaengine_prep_slave_sg expects an enum from dma_transfer_direction. We know that the only direction supported by this function is DMA_TO_DEVICE because of the check at the top of this function so we can just use the equivalent value from dma_transfer_direction. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 9d880c5945c748d8edcac30965f3349a602158c4 Author: Nathan Chancellor Date: Mon Dec 10 16:49:29 2018 -0700 crypto: ux500 - Use proper enum in cryp_set_dma_transfer Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, DMA_CTRL_ACK); ^~~~~~~~~ drivers/crypto/ux500/cryp/cryp_core.c:583:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, ^~~~~~~~~ 2 warnings generated. dmaengine_prep_slave_sg expects an enum from dma_transfer_direction. Because we know the value of the dma_data_direction enum from the switch statement, we can just use the proper value from dma_transfer_direction so there is no more conversion. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 603f8c3b0dbbe21fabb7e005f57883b21aaadd82 Author: Dave Watson Date: Mon Dec 10 19:59:59 2018 +0000 crypto: aesni - Add scatter/gather avx stubs, and use them in C Add the appropriate scatter/gather stubs to the avx asm. In the C code, we can now always use crypt_by_sg, since both sse and asm code now support scatter/gather. Introduce a new struct, aesni_gcm_tfm, that is initialized on startup to point to either the SSE, AVX, or AVX2 versions of the four necessary encryption/decryption routines. GENX_OPTSIZE is still checked at the start of crypt_by_sg. The total size of the data is checked, since the additional overhead is in the init function, calculating additional HashKeys. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit e044d5056396029cc12ed5354aa2a073b747195a Author: Dave Watson Date: Mon Dec 10 19:59:38 2018 +0000 crypto: aesni - Introduce partial block macro Before this diff, multiple calls to GCM_ENC_DEC will succeed, but only if all calls are a multiple of 16 bytes. Handle partial blocks at the start of GCM_ENC_DEC, and update aadhash as appropriate. The data offset %r11 is also updated after the partial block. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit ec8c02d9a30b8324d7aae9e4e7a08973a8eaa8b4 Author: Dave Watson Date: Mon Dec 10 19:59:26 2018 +0000 crypto: aesni - Introduce READ_PARTIAL_BLOCK macro Introduce READ_PARTIAL_BLOCK macro, and use it in the two existing partial block cases: AAD and the end of ENC_DEC. In particular, the ENC_DEC case should be faster, since we read by 8/4 bytes if possible. This macro will also be used to read partial blocks between enc_update and dec_update calls. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 517a448e09846732d46e983a2195002d05857919 Author: Dave Watson Date: Mon Dec 10 19:59:11 2018 +0000 crypto: aesni - Move ghash_mul to GCM_COMPLETE Prepare to handle partial blocks between scatter/gather calls. For the last partial block, we only want to calculate the aadhash in GCM_COMPLETE, and a new partial block macro will handle both aadhash update and encrypting partial blocks between calls. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit a44b419fe5aee3bfe12c88698a023cb5c6067985 Author: Dave Watson Date: Mon Dec 10 19:58:56 2018 +0000 crypto: aesni - Fill in new context data structures Fill in aadhash, aadlen, pblocklen, curcount with appropriate values. pblocklen, aadhash, and pblockenckey are also updated at the end of each scatter/gather operation, to be carried over to the next operation. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 1cb1bcbb567d10bdd9de9d03964c5e2958f0d111 Author: Dave Watson Date: Mon Dec 10 19:58:38 2018 +0000 crypto: aesni - Merge avx precompute functions The precompute functions differ only by the sub-macros they call, merge them to a single macro. Later diffs add more code to fill in the gcm_context_data structure, this allows changes in a single place. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 38003cd26c9f59da77d98927fb9af58732da207a Author: Dave Watson Date: Mon Dec 10 19:58:19 2018 +0000 crypto: aesni - Split AAD hash calculation to separate macro AAD hash only needs to be calculated once for each scatter/gather operation. Move it to its own macro, and call it from GCM_INIT instead of INITIAL_BLOCKS. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit e377bedb09d6970ad27d7714b0a6365ee7e4d732 Author: Dave Watson Date: Mon Dec 10 19:57:49 2018 +0000 crypto: aesni - Add GCM_COMPLETE macro Merge encode and decode tag calculations in GCM_COMPLETE macro. Scatter/gather routines will call this once at the end of encryption or decryption. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 5350b0f563433dacc134214a452fd316b36251d6 Author: Dave Watson Date: Mon Dec 10 19:57:36 2018 +0000 crypto: aesni - support 256 byte keys in avx asm Add support for 192/256-bit keys using the avx gcm/aes routines. The sse routines were previously updated in e31ac32d3b (Add support for 192 & 256 bit keys to AESNI RFC4106). Instead of adding an additional loop in the hotpath as in e31ac32d3b, this diff instead generates separate versions of the code using macros, and the entry routines choose which version once. This results in a 5% performance improvement vs. adding a loop to the hot path. This is the same strategy chosen by the intel isa-l_crypto library. The key size checks are removed from the c code where appropriate. Note that this diff depends on using gcm_context_data - 256 bit keys require 16 HashKeys + 15 expanded keys, which is larger than struct crypto_aes_ctx, so they are stored in struct gcm_context_data. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 2426f64bc51fc86951b735d2247d6eb89259d580 Author: Dave Watson Date: Mon Dec 10 19:57:12 2018 +0000 crypto: aesni - Macro-ify func save/restore Macro-ify function save and restore. These will be used in new functions added for scatter/gather update operations. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit de85fc46b1037099c78d2fec08a662079e568d62 Author: Dave Watson Date: Mon Dec 10 19:57:00 2018 +0000 crypto: aesni - Introduce gcm_context_data Add the gcm_context_data structure to the avx asm routines. This will be necessary to support both 256 bit keys and scatter/gather. The pre-computed HashKeys are now stored in the gcm_context_data struct, which is expanded to hold the greater number of hashkeys necessary for avx. Loads and stores to the new struct are always done unlaligned to avoid compiler issues, see e5b954e8 "Use unaligned loads from gcm_context_data" Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit f9b1d64678607e132051d232c7a2127f32947d64 Author: Dave Watson Date: Mon Dec 10 19:56:45 2018 +0000 crypto: aesni - Merge GCM_ENC_DEC The GCM_ENC_DEC routines for AVX and AVX2 are identical, except they call separate sub-macros. Pass the macros as arguments, and merge them. This facilitates additional refactoring, by requiring changes in only one place. The GCM_ENC_DEC macro was moved above the CONFIG_AS_AVX* ifdefs, since it will be used by both AVX and AVX2. Signed-off-by: Dave Watson Signed-off-by: Herbert Xu commit 3d739c1f6156c70eb0548aa288dcfbac9e0bd162 Author: Steven Rostedt (VMware) Date: Fri Dec 21 23:10:26 2018 -0500 tracing: Use the return of str_has_prefix() to remove open coded numbers There are several locations that compare constants to the beginning of string variables to determine what commands should be done, then the constant length is used to index into the string. This is error prone as the hard coded numbers have to match the size of the constants. Instead, use the len returned from str_has_prefix() and remove the open coded string length sizes. Cc: Joe Perches Acked-by: Masami Hiramatsu (for trace_probe part) Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) commit 036876fa56204ae0fa59045bd6bbb2691a060633 Author: Steven Rostedt (VMware) Date: Fri Dec 21 18:40:46 2018 -0500 tracing: Have the historgram use the result of str_has_prefix() for len of prefix As str_has_prefix() returns the length on match, we can use that for the updating of the string pointer instead of recalculating the prefix size. Cc: Tom Zanussi Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) commit b6b2735514bcd70ad1556a33892a636b20ece671 Author: Steven Rostedt (VMware) Date: Thu Dec 20 13:20:07 2018 -0500 tracing: Use str_has_prefix() instead of using fixed sizes There are several instances of strncmp(str, "const", 123), where 123 is the strlen of the const string to check if "const" is the prefix of str. But this can be error prone. Use str_has_prefix() instead. Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) commit 754481e6954cbef53f8bc4412ad48dde611e21d3 Author: Steven Rostedt (VMware) Date: Wed Dec 19 22:38:21 2018 -0500 tracing: Use str_has_prefix() helper for histogram code The tracing histogram code contains a lot of instances of the construct: strncmp(str, "const", sizeof("const") - 1) This can be prone to bugs due to typos or bad cut and paste. Use the str_has_prefix() helper macro instead that removes the need for having two copies of the constant string. Cc: Tom Zanussi Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) commit 72921427d46bf9731a1ab7864adc64c43dfae29f Author: Steven Rostedt (VMware) Date: Fri Dec 21 18:10:14 2018 -0500 string.h: Add str_has_prefix() helper function A discussion came up in the trace triggers thread about converting a bunch of: strncmp(str, "const", sizeof("const") - 1) use cases into a helper macro. It started with: strncmp(str, const, sizeof(const) - 1) But then Joe Perches mentioned that if a const is not used, the sizeof() will be the size of a pointer, which can be bad. And that gcc will optimize strlen("const") into "sizeof("const") - 1". Thinking about this more, a quick grep in the kernel tree found several (thousands!) of cases that use this construct. A quick grep also revealed that there's probably several bugs in that use case. Some are that people forgot the "- 1" (which I found) and others could be that the constant for the sizeof is different than the constant (although, I haven't found any of those, but I also didn't look hard). I figured the best thing to do is to create a helper macro and place it into include/linux/string.h. And go around and fix all the open coded versions of it later. Note, gcc appears to optimize this when we make it into an always_inline static function, which removes a lot of issues that a macro produces. Link: http://lkml.kernel.org/r/e3e754f2bd18e56eaa8baf79bee619316ebf4cfc.1545161087.git.tom.zanussi@linux.intel.com Link: http://lkml.kernel.org/r/20181219211615.2298e781@gandalf.local.home Link: http://lkml.kernel.org/r/CAHk-=wg_sR-UEC1ggmkZpypOUYanL5CMX4R7ceuaV4QMf5jBtg@mail.gmail.com Cc: Tom Zanussi Cc: Greg Kroah-Hartman Acked-by: Namhyung Kim Suggestions-by: Linus Torvalds Suggestions-by: Joe Perches Suggestions-by: Andreas Schwab Signed-off-by: Steven Rostedt (VMware) commit a3ac5817ffe8f81dbe6be1522b499b48bc322e3a Author: Gustavo A. R. Silva Date: Fri Dec 21 15:22:29 2018 -0600 can: af_can: Fix Spectre v1 vulnerability protocol is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/can/af_can.c:115 can_get_proto() warn: potential spectre issue 'proto_tab' [w] Fix this by sanitizing protocol before using it to index proto_tab. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 11fda148040bb987949f9b957aceb483407e32cb Author: Masahiro Yamada Date: Sat Dec 22 18:50:35 2018 +0900 kbuild: remove $(obj)/ prefixes in ./Kbuild Adding $(obj)/ to file paths relative from the top objtree looks a bit redundant to me. This commit has no functional change since $(obj) is '.' in this file. Signed-off-by: Masahiro Yamada commit 2c667d77fc02dd453c49b9c29d08a8bb55d60ebe Author: Masahiro Yamada Date: Sat Dec 22 18:50:34 2018 +0900 treewide: add intermediate .s files to targets Avoid unneeded recreation of these in the incremental build. Signed-off-by: Masahiro Yamada commit 4d4b5c2e3b6e6137c36cc13fe0d03404205afbd0 Author: Masahiro Yamada Date: Sat Dec 22 18:50:33 2018 +0900 treewide: remove explicit rules for *offsets.s These explicit rules are unneeded because scripts/Makefile.build provides a pattern rule to create %.s from %.c Signed-off-by: Masahiro Yamada commit 3470d9eb638722212ac44787eaf13486823fa011 Author: Masahiro Yamada Date: Fri Dec 21 12:12:41 2018 +0900 firmware: refactor firmware/Makefile Clean up the Makefile. Equivalent *.gen.S files are still produced. - Use filechk to remove ugly wordsize_deps - Get FWNAME, FWSTR, ASM_WORD, ASM_ALIGN, and PROGBITS out of the recipe for readability - Remove 'mkdir' because filechk takes care of it Signed-off-by: Masahiro Yamada commit 6b8d95f1795c42161dc0984b6863e95d6acf24ed Author: Willem de Bruijn Date: Sat Dec 22 16:53:45 2018 -0500 packet: validate address length if non-zero Validate packet socket address length if a length is given. Zero length is equivalent to not setting an address. Fixes: 99137b7888f4 ("packet: validate address length") Reported-by: Ido Schimmel Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit a95386f0390ab602904d11fe6bd7ea5ef9b136f8 Author: Gustavo A. R. Silva Date: Fri Dec 21 15:47:53 2018 -0600 nfc: af_nfc: Fix Spectre v1 vulnerability proto is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/nfc/af_nfc.c:42 nfc_sock_create() warn: potential spectre issue 'proto_tab' [w] (local cap) Fix this by sanitizing proto before using it to index proto_tab. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 Author: Gustavo A. R. Silva Date: Fri Dec 21 15:41:17 2018 -0600 phonet: af_phonet: Fix Spectre v1 vulnerability protocol is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap) Fix this by sanitizing protocol before using it to index proto_tab. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit f617e5ffe04fd46010b618c9eeadaa04588704c9 Author: Wei Yongjun Date: Sat Dec 22 10:30:30 2018 +0000 RDMA/srpt: Use kmem_cache_free() instead of kfree() memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Fixes: 5dabcd0456d7 ("RDMA/srpt: Add support for immediate data") Signed-off-by: Wei Yongjun Signed-off-by: Jason Gunthorpe commit 58f7c0bfb4e111006ba376df7ab266a6d42d64ba Author: Dan Carpenter Date: Sat Dec 22 10:43:32 2018 +0300 RDMA/mlx5: Signedness bug in UVERBS_HANDLER() The "num_actions" variable needs to be signed for the error handling to work. The maximum number of actions is less than 256 so int type is large enough for that. Fixes: cbfdd442c43e ("IB/uverbs: Add helper to get array size from ptr attribute") Signed-off-by: Dan Carpenter Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 573671a5f6509c4139770452d4516720a84d5b61 Author: Dan Carpenter Date: Sat Dec 22 10:42:59 2018 +0300 IB/uverbs: Signedness bug in UVERBS_HANDLER() The "num_sge" variable needs to be signed for the error handling to work. The uverbs_attr_ptr_get_array_size() returns int so this change is safe. Fixes: ad8a4496757f ("IB/uverbs: Add support to advise_mr") Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 50d5258634aee2e62832aa086d2fb0de00e72b91 Author: Gustavo A. R. Silva Date: Fri Dec 21 14:49:01 2018 -0600 net: core: Fix Spectre v1 vulnerability flen is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w] Fix this by sanitizing flen before using it to index filter at line 1101: switch (filter[flen - 1].code) { and through pc at line 1040: const struct sock_filter *ftest = &filter[pc]; Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit d52c499b476b2f82eebecdd5fc4be8318a4e8ef7 Author: Gustavo A. R. Silva Date: Sat Dec 22 01:39:52 2018 -0600 lightnvm: pblk: fix use-after-free bug Remove one of the calls to function bio_put(), so *bio* is only freed once. Notice that bio is being dereferenced in bio_put(), hence leading to a use-after-free bug once *bio* has already been freed. Addresses-Coverity-ID: 1475952 ("Use after free") Fixes: 55d8ec35398e ("lightnvm: pblk: support packed metadata") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 93f87a74fde682e0b53c90ea25e744003d294ae2 Author: Chengguang Xu Date: Sat Dec 22 20:47:56 2018 +0800 block: sunvdc: remove redundant code Code cleanup for removing redundant break in switch case. Signed-off-by: Chengguang Xu Signed-off-by: Jens Axboe commit c41103691b7fc4fda11f74a90a4fbd9d265c8cc9 Author: Chengguang Xu Date: Sat Dec 22 20:47:15 2018 +0800 block: loop: remove redundant code Code cleanup for removing redundant break in switch case. Signed-off-by: Chengguang Xu Signed-off-by: Jens Axboe commit 1debf0958fa27b7c469dbf22754929ec59a7c0e7 Author: Sai Praneeth Prakhya Date: Fri Dec 21 18:22:34 2018 -0800 x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE The following commit: d5052a7130a6 ("x86/efi: Unmap EFI boot services code/data regions from efi_pgd") forgets to take two EFI modes into consideration, namely EFI_OLD_MEMMAP and EFI_MIXED_MODE: - EFI_OLD_MEMMAP is a legacy way of mapping EFI regions into swapper_pg_dir using ioremap() and init_memory_mapping(). This feature can be enabled by passing "efi=old_map" as kernel command line argument. But, efi_unmap_pages() unmaps EFI boot services code/data regions *only* from efi_pgd and hence cannot be used for unmapping EFI boot services code/data regions from swapper_pg_dir. Introduce a temporary fix to not unmap EFI boot services code/data regions when EFI_OLD_MEMMAP is enabled while working on a real fix. - EFI_MIXED_MODE is another feature where a 64-bit kernel runs on a 64-bit platform crippled by a 32-bit firmware. To support EFI_MIXED_MODE, all RAM (i.e. namely EFI regions like EFI_CONVENTIONAL_MEMORY, EFI_LOADER_, EFI_BOOT_SERVICES_ and EFI_RUNTIME_CODE/DATA regions) is mapped into efi_pgd all the time to facilitate EFI runtime calls access it's arguments in 1:1 mode. Hence, don't unmap EFI boot services code/data regions when booted in mixed mode. Signed-off-by: Sai Praneeth Prakhya Acked-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181222022234.7573-1-sai.praneeth.prakhya@intel.com Signed-off-by: Ingo Molnar commit 37379cfc661e51607733f266d9f407b4f8aee16b Author: Dan Williams Date: Sat Dec 22 11:35:41 2018 -0800 libnvdimm/security: Quiet security operations The security implementation is too chatty. For example, the common case is that security is not enabled / setup, and booting a qemu configuration currently yields: nvdimm nmem0: request_key() found no key nvdimm nmem0: failed to unlock dimm: -126 nvdimm nmem1: request_key() found no key nvdimm nmem1: failed to unlock dimm: -126 Convert all security related log messages to debug level. Cc: Dave Jiang Signed-off-by: Dan Williams commit 1cce377df1800154301525a8ee04100dd83c9633 Author: Mathieu Malaterre Date: Wed May 16 21:30:12 2018 +0200 tracing: Make function ‘ftrace_exports’ static In commit 478409dd683d ("tracing: Add hook to function tracing for other subsystems to use"), a new function ‘ftrace_exports’ was added. Since this function can be made static, make it so. Silence the following warning triggered using W=1: kernel/trace/trace.c:2451:6: warning: no previous prototype for ‘ftrace_exports’ [-Wmissing-prototypes] Link: http://lkml.kernel.org/r/20180516193012.25390-1-malat@debian.org Signed-off-by: Mathieu Malaterre Signed-off-by: Steven Rostedt (VMware) commit bea6957d5cd7cbb327083d3bcf080133ee63ef65 Author: Rasmus Villemoes Date: Mon Oct 29 23:35:42 2018 +0100 tracing: Simplify printf'ing in seq_print_sym trace_seq_printf(..., "%s", ...) can be done with trace_seq_puts() instead, avoiding printf overhead. In the second instance, the string we're copying was just created from an snprintf() to a stack buffer, so we might as well do that printf directly. This naturally leads to moving the declaration of the str buffer inside the CONFIG_KALLSYMS guard, which in turn will make gcc inline the function for !CONFIG_KALLSYMS (it only has a single caller, but the huge stack frame seems to make gcc not inline it for CONFIG_KALLSYMS). Link: http://lkml.kernel.org/r/20181029223542.26175-4-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Signed-off-by: Steven Rostedt (VMware) commit cc9f59fb3bc455984404dbab8be16f156a47d023 Author: Rasmus Villemoes Date: Mon Oct 29 23:35:41 2018 +0100 tracing: Avoid -Wformat-nonliteral warning Building with -Wformat-nonliteral, gcc complains kernel/trace/trace_output.c: In function ‘seq_print_sym’: kernel/trace/trace_output.c:356:3: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] trace_seq_printf(s, fmt, name); But seq_print_sym only has a single caller which passes "%s" as fmt, so we might as well just use that directly. That also paves the way for further cleanups that will actually make that format string go away entirely. Link: http://lkml.kernel.org/r/20181029223542.26175-3-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Signed-off-by: Steven Rostedt (VMware) commit 59dd974bc079079c23b5429cba841696fa7fae41 Author: Rasmus Villemoes Date: Mon Oct 29 23:35:40 2018 +0100 tracing: Merge seq_print_sym_short() and seq_print_sym_offset() These two functions are nearly identical, so we can avoid some code duplication by moving the conditional into a common implementation. Link: http://lkml.kernel.org/r/20181029223542.26175-2-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Signed-off-by: Steven Rostedt (VMware) commit 05ddb25cb31491b0901d057c40ad50d01b3db783 Author: Tom Zanussi Date: Tue Dec 18 14:33:26 2018 -0600 tracing: Add hist trigger comments for variable-related fields Add a few comments to help clarify how variable and variable reference fields are used in the code. Link: http://lkml.kernel.org/r/ea857ce948531d7bec712bbb0f38360aa1d378ec.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 912201345f7c39e6b0ac283207be2b6641fa47b9 Author: Tom Zanussi Date: Tue Dec 18 14:33:25 2018 -0600 tracing: Remove hist trigger synth_var_refs All var_refs are now handled uniformly and there's no reason to treat the synth_refs in a special way now, so remove them and associated functions. Link: http://lkml.kernel.org/r/b4d3470526b8f0426dcec125399dad9ad9b8589d.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 656fe2ba85e81d00e4447bf77b8da2be3c47acb2 Author: Tom Zanussi Date: Tue Dec 18 14:33:24 2018 -0600 tracing: Use hist trigger's var_ref array to destroy var_refs Since every var ref for a trigger has an entry in the var_ref[] array, use that to destroy the var_refs, instead of piecemeal via the field expressions. This allows us to avoid having to keep and treat differently separate lists for the action-related references, which future patches will remove. Link: http://lkml.kernel.org/r/fad1a164f0e257c158e70d6eadbf6c586e04b2a2.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit de40f033d4e84e843d6a12266e3869015ea9097c Author: Tom Zanussi Date: Tue Dec 18 14:33:23 2018 -0600 tracing: Remove open-coding of hist trigger var_ref management Have create_var_ref() manage the hist trigger's var_ref list, rather than having similar code doing it in multiple places. This cleans up the code and makes sure var_refs are always accounted properly. Also, document the var_ref-related functions to make what their purpose clearer. Link: http://lkml.kernel.org/r/05ddae93ff514e66fc03897d6665231892939913.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e4f6d245031e04bdd12db390298acec0474a1a46 Author: Tom Zanussi Date: Wed Dec 19 13:09:16 2018 -0600 tracing: Use var_refs[] for hist trigger reference checking Since all the variable reference hist_fields are collected into hist_data->var_refs[] array, there's no need to go through all the fields looking for them, or in separate arrays like synth_var_refs[], which will be going away soon anyway. This also allows us to get rid of some unnecessary code and functions currently used for the same purpose. Link: http://lkml.kernel.org/r/1545246556.4239.7.camel@gmail.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 2f31ed9308cc9e95c149078b276a47360ab507bb Author: Tom Zanussi Date: Tue Dec 18 14:33:21 2018 -0600 tracing: Change strlen to sizeof for hist trigger static strings There's no need to use strlen() for static strings when the length is already known, so update trace_events_hist.c with sizeof() for those cases. Link: http://lkml.kernel.org/r/e3e754f2bd18e56eaa8baf79bee619316ebf4cfc.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 6801f0d5ca00bed159c7f87870cc6f5411837544 Author: Tom Zanussi Date: Tue Dec 18 14:33:20 2018 -0600 tracing: Remove unnecessary hist trigger struct field hist_field.var_idx is completely unused, so remove it. Link: http://lkml.kernel.org/r/d4e066c0f509f5f13ad3babc8c33ca6e7ddc439a.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e8d086ddb5339d72c60e6c7b8d28810f26960f9a Author: Steven Rostedt (VMware) Date: Tue Dec 18 15:50:02 2018 -0500 tracing: Fix ftrace_graph_get_ret_stack() to use task and not current The function ftrace_graph_get_ret_stack() takes a task struct descriptor but uses current as the task to perform the operations on. In pretty much all cases the task decriptor is the same as current, so this wasn't an issue. But there is a case in the ARM architecture that passes in a task that is not current, and expects a result from that task, and this code breaks it. Fixes: 51584396cff5 ("arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack") Reported-by: James Morse Tested-by: James Morse Signed-off-by: Steven Rostedt (VMware) commit 29924e5030969c55dbe68074215be5a1f14f1ff1 Author: Michael Ellerman Date: Fri Oct 19 15:21:09 2018 +1100 seq_buf: Use size_t for len in seq_buf_puts() Jann Horn points out that we're using unsigned int for len in seq_buf_puts(), which could potentially overflow if we're passed a UINT_MAX sized string. The rest of the code already uses size_t, so we should also use that in seq_buf_puts() to avoid any issues. Link: http://lkml.kernel.org/r/20181019042109.8064-2-mpe@ellerman.id.au Suggested-by: Jann Horn Signed-off-by: Michael Ellerman Signed-off-by: Steven Rostedt (VMware) commit 0464ed24380905d640030d368cd84a4e4d1e15e2 Author: Michael Ellerman Date: Fri Oct 19 15:21:08 2018 +1100 seq_buf: Make seq_buf_puts() null-terminate the buffer Currently seq_buf_puts() will happily create a non null-terminated string for you in the buffer. This is particularly dangerous if the buffer is on the stack. For example: char buf[8]; char secret = "secret"; struct seq_buf s; seq_buf_init(&s, buf, sizeof(buf)); seq_buf_puts(&s, "foo"); printk("Message is %s\n", buf); Can result in: Message is fooªªªªªsecret We could require all users to memset() their buffer to zero before use. But that seems likely to be forgotten and lead to bugs. Instead we can change seq_buf_puts() to always leave the buffer in a null-terminated state. The only downside is that this makes the buffer 1 character smaller for seq_buf_puts(), but that seems like a good trade off. Link: http://lkml.kernel.org/r/20181019042109.8064-1-mpe@ellerman.id.au Acked-by: Kees Cook Signed-off-by: Michael Ellerman Signed-off-by: Steven Rostedt (VMware) commit a448276ce515c91cde4675be497364b91c764d95 Author: Steven Rostedt (VMware) Date: Fri Dec 7 13:13:28 2018 -0500 arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack The structure of the ret_stack array on the task struct is going to change, and accessing it directly via the curr_ret_stack index will no longer give the ret_stack entry that holds the return address. To access that, architectures must now use ftrace_graph_get_ret_stack() to get the associated ret_stack that matches the saved return address. Cc: linux-arm-kernel@lists.infradead.org Cc: Will Deacon Cc: Mark Rutland Cc: Catalin Marinas Signed-off-by: Steven Rostedt (VMware) commit cec8d0e7f06e08b981e9d61bef267c8c36d536f5 Author: Steven Rostedt (VMware) Date: Fri Dec 7 13:06:04 2018 -0500 sh: ftrace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack The structure of the ret_stack array on the task struct is going to change, and accessing it directly via the curr_ret_stack index will no longer give the ret_stack entry that holds the return address. To access that, architectures must now use ftrace_graph_get_ret_stack() to get the associated ret_stack that matches the saved return address. Cc: linux-sh@vger.kernel.org Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Steven Rostedt (VMware) commit 945626db0961d8388543b2c96b6f16df57947392 Author: Steven Rostedt (VMware) Date: Fri Dec 7 12:51:27 2018 -0500 sparc64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack The structure of the ret_stack array on the task struct is going to change, and accessing it directly via the curr_ret_stack index will no longer give the ret_stack entry that holds the return address. To access that, architectures must now use ftrace_graph_get_ret_stack() to get the associated ret_stack that matches the saved return address. Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Steven Rostedt (VMware) commit 0fad8bfef7b08a68507178f8e278d013b60ff966 Author: Steven Rostedt (VMware) Date: Fri Dec 7 12:35:47 2018 -0500 powerpc/frace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack The structure of the ret_stack array on the task struct is going to change, and accessing it directly via the curr_ret_stack index will no longer give the ret_stack entry that holds the return address. To access that, architectures must now use ftrace_graph_get_ret_stack() to get the associated ret_stack that matches the saved return address. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Steven Rostedt (VMware) commit 22ec9bb1cbcd613c73476ccd8f6a5e8c77793f66 Author: Linus Walleij Date: Sun Dec 2 12:04:10 2018 +0100 watchdog: mena21_wdt: Convert to GPIO descriptors This drops the old OF API use to look up global GPIO numbers and replace it with the GPIO descriptor API. Cc: Johannes Thumshirn Cc: Johannes Thumshirn Cc: Johannes Thumshirn Signed-off-by: Linus Walleij Acked-by: Johannes Thumshirn Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8d4d4f3267e1fcad56ca5aa4eabf72472e10965f Author: Loic Poulain Date: Fri Nov 23 09:44:37 2018 +0100 dt-bindings: watchdog: Add Qualcomm PM8916 watchdog Document support for the Watchdog Timer (WDT) Controller in the Qualcomm PM8916 PMIC module. Signed-off-by: Loic Poulain Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 969c0acc039f77c6b9d000ccb8b9d3afca4d3667 Author: Loic Poulain Date: Fri Nov 23 09:44:36 2018 +0100 watchdog: Add pm8916 watchdog driver The PM816 module is a versatile PMIC with many diverse functions integrated, including, a watchdog. This watchdog is subcomponent of the PON (Power On) peripheral, in the same way as pwrkey/resin buttons. It works with two timers (2-stages), the first one generates an IRQ to the main SoC (APQ8016/MSM8916), the second one performs the reset. This driver expects the following device hierarchy: [pm8916]->[pm8916-pon]->[pm8916-wdt] It uses the pm8916 regmap to access PM8916 registers. Signed-off-by: Loic Poulain Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4d9c6e90166f1a4b0132e8d8520a2fcd6d081e6b Author: Ryder Lee Date: Wed Nov 7 15:10:36 2018 +0800 dt-bindings: watchdog: update bindings for MT7629 SoC This updates dt-binding documentation for MT7629 SoC Signed-off-by: Ryder Lee Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Acked-by: Matthias Brugger Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9077123c68074619177c9a8d3adce2527bd94179 Author: Wolfram Sang Date: Tue Dec 4 13:01:46 2018 +0100 watchdog: renesas_wdt: don't keep timer value during suspend/resume After discussing this mail thread [1] again, we concluded that giving userspace enough time to prepare is our favourite option. So, do not keep the time value when suspended but reset it when resuming. [1] https://patchwork.kernel.org/patch/10252209/ Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Reviewed-by: Fabrizio Castro Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 248e655b45ed2ce98aee9de439616fdd2b78b0f5 Author: Yangtao Li Date: Sat Dec 1 09:51:40 2018 -0500 watchdog: ie6xx_wdt: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 57808f448b3d2214df4cfa5ab046e09da2908cde Author: Yangtao Li Date: Sat Dec 1 09:51:39 2018 -0500 watchdog: bcm281xx: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b1bbb0cb2c0ee6dccaf341f99dad9bdff5882acd Author: Colin Ian King Date: Thu Nov 29 23:25:00 2018 +0000 watchdog: asm9260_wdt: make array mode_name static, shrinks object size Don't populate the const array mode_name on the stack but instead make it static. Makes the object code smaller by 41 bytes: Before: text data bss dec hex filename 7699 1872 0 9571 2563 drivers/watchdog/asm9260_wdt.o After: text data bss dec hex filename 7594 1936 0 9530 253a drivers/watchdog/asm9260_wdt.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 437a3f8ea493ba9b80c9bb983e15f4297fc653de Author: Jerry Hoemann Date: Wed Dec 5 17:42:23 2018 -0700 watchdog/hpwdt: Update driver version. Bump version number to reflect recent minor changes. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit de2cb0cc300ea9bdb7dee476d24c2b20d469c3f2 Author: Jerry Hoemann Date: Wed Dec 5 17:42:22 2018 -0700 watchdog/hpwdt: Do not claim unsupported hardware Do not claim when SSID 0x0289 as the watchdog features are not enabled/validated by the firmware. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 94d6b80c45d3f436d993aa026aa080866cb4b87e Author: Jerry Hoemann Date: Wed Dec 5 17:42:21 2018 -0700 watchdog/hpwdt: Exclude via blacklist Instead of having explicit if statments excluding devices, use a pci_device_id table of devices to blacklist. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e1b83a31c79811409023aac560d5b0fc2967bec9 Author: Hardik Singh Rathore Date: Sun Dec 9 16:17:26 2018 +0530 Watchdog: remove outdated comment The lock field doesn't exist in watchdog_device structure. It was added by commit f4e9c82f64b5 ("watchdog: Add Locking support") and removed by commit b4ffb1909843 ("watchdog: Separate and maintain variables based on variable lifetime") Signed-off-by: Hardik Singh Rathore Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9bbc7e4ce47ecefa142fcba55eef7754af1b0213 Author: Oliver O'Halloran Date: Mon Mar 19 16:14:03 2018 +1100 powerpc/zImage: Also check for stdout-path The /chosen/linux,stdout-path is "deprecated" in favour of /chosen/stdout-path so we should be checking for both. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman commit 505a314fb28ce122091691c51426fa85c084e115 Author: Benjamin Herrenschmidt Date: Mon Oct 8 15:08:31 2018 +1100 powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y HMIs will crash the kernel due to BRANCH_LINK_TO_FAR(hmi_exception_realmode) Calling into the OPD instead of the actual code. Fixes: 2337d207288f ("powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts") Signed-off-by: Benjamin Herrenschmidt [mpe: Use DOTSYM() rather than #ifdef] Signed-off-by: Michael Ellerman commit f1e0addca8bd7386f8cabbc64c9988fff91c131f Author: Rob Herring Date: Wed Dec 5 13:50:28 2018 -0600 macintosh: Use of_node_name_{eq, prefix} for node name comparisons Convert string compares of DT node names to use of_node_name_{eq,prefix} helpers instead. This removes direct access to the node name pointer. This changes a single case insensitive node name comparison to case sensitive for "ata4". This is the only instance of a case insensitive comparison for all the open coded node name comparisons on powerpc. Searching the commit history, there doesn't appear to be any reason for it to be case insensitive. A couple of open coded iterating thru the child node names are converted to use for_each_child_of_node() instead. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit c1fa31b0fc90a80d64a334e5d35dca211f9187f6 Author: Rob Herring Date: Wed Dec 5 13:50:25 2018 -0600 ide: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "David S. Miller" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-ide@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 2c8e65b595cf0bf7c1413404dff9b928a64d27cb Author: Rob Herring Date: Wed Dec 5 13:50:18 2018 -0600 powerpc: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. A couple of open coded iterating thru the child node names are converted to use for_each_child_of_node() instead. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 2dab3dd1fac72b982308265cb322e8d47450052b Author: Linus Walleij Date: Sat Dec 22 11:15:04 2018 +0100 pinctrl: ocelot: Add dependency on HAS_IOMEM As usual the build fails on UM Linux because that thing does not have IOMEM. Depend on HAS_IOMEM solves the build problem. Cc: Alexandre Belloni Signed-off-by: Linus Walleij commit a7c23f8d154f7919c5fcfceea6e0897be2d5ab71 Author: Linus Walleij Date: Sat Dec 22 11:04:55 2018 +0100 gpio: sama5d2-piobu: Depend on OF_GPIO This driver clearly needs OF_GPIO so depend on it. Fixes a build error. Cc: Andrei Stefanescu Signed-off-by: Linus Walleij commit 0d1223dd9273b2ba3e965a81092a239405a4931c Author: Rob Herring Date: Wed Dec 5 13:50:17 2018 -0600 powerpc/pseries/pmem: Convert to %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. pmem.c was recently added and missed the initial conversion. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 423e2f94456404b49d89ef587c34022987a581e1 Author: Michael Ellerman Date: Tue Nov 27 19:18:05 2018 +1100 powerpc/mm: Remove very old comment in hash-4k.h This comment talks about PTEs being 64-bits and PMD/PGD being 32-bits, but that hasn't been true since 2005 when David Gibson implemented 4-level page tables in the commit titled "Four level pagetables for ppc64". Remove it. Signed-off-by: Michael Ellerman commit 47918bc68b7427e961035949cc1501a864578a69 Author: Michael Ellerman Date: Tue Nov 27 19:16:44 2018 +1100 powerpc/pseries: Fix node leak in update_lmb_associativity_index() In update_lmb_associativity_index() we lookup dr_node using of_find_node_by_path() which takes a reference for us. In the non-error case we forget to drop the reference. Note that find_aa_index() does modify properties of the node, but doesn't need an extra reference held once it's returned. Signed-off-by: Michael Ellerman commit d69e11648e486ee0f21cb246f687b083f0d4e124 Author: Thierry Reding Date: Wed Nov 28 10:54:16 2018 +0100 mailbox: tegra-hsp: Use device-managed registration API In order to get rid of a lot of cleanup boilerplate code, use the device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit a54d03ed01b4ed64c22d2b53d61d4049ec49a51f Author: Bartosz Golaszewski Date: Wed Nov 28 10:54:15 2018 +0100 mailbox: tegra-hsp: use devm_kstrdup_const() Use devm_kstrdup_const() in the tegra-hsp driver. This mostly serves as an example of how to use this new routine to shrink driver code. Also use devm_kzalloc() instead of regular kzalloc() to shrink the driver even more. Doorbell objects are only removed in the driver's remove callback so it's safe to convert all memory allocations to devres. Signed-off-by: Bartosz Golaszewski Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 9a63f0f4059955210ae74c745513332a568e9738 Author: Thierry Reding Date: Wed Nov 28 10:54:14 2018 +0100 mailbox: tegra-hsp: Add suspend/resume support Upon resuming from a system sleep state, the interrupts for all active shared mailboxes need to be reenabled, otherwise they will not work. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 91b1b1c3da8a8fd9ee4538e00dd5e5fb5be1cdb4 Author: Thierry Reding Date: Wed Nov 28 10:54:13 2018 +0100 mailbox: tegra-hsp: Add support for shared mailboxes The Tegra HSP block supports 'shared mailboxes' that are simple 32-bit registers consisting of a FULL bit in MSB position and 31 bits of data. The hardware can be configured to trigger interrupts when a mailbox is empty or full. Add support for these shared mailboxes to the HSP driver. The initial use for the mailboxes is the Tegra Combined UART. For this purpose, we use interrupts to receive data, and spinning to wait for the transmit mailbox to be emptied to minimize unnecessary overhead. Based on work by Mikko Perttunen . Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit fed8b7e366e7c8f81e957ef91aa8f0a38e038c66 Author: Mikko Perttunen Date: Wed Nov 28 10:54:12 2018 +0100 dt-bindings: tegra186-hsp: Add shared mailboxes Shared mailboxes are a mechanism to transport data from one processor in the system to another. They are bidirectional links with both a producer and a consumer. Interrupts are used to let the consumer know when data was written to the mailbox by the producer, and to let the producer know when the consumer has read the data from the mailbox. These interrupts are mapped to one or more "shared interrupts". Typically each processor in the system owns one of these shared interrupts. Add documentation to the device tree bindings about how clients can use mailbox specifiers to request a specific shared mailbox and select which direction they drive. Also document how to specify the shared interrupts in addition to the existing doorbell interrupt. Signed-off-by: Mikko Perttunen Acked-by: Jon Hunter Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 8ed82e23875e6014d9aa8e03bf4301b27d614050 Author: Mikko Perttunen Date: Wed Nov 28 10:54:11 2018 +0100 mailbox: Allow multiple controllers per device Look through the whole controller list when mapping device tree phandles to controllers instead of stopping at the first one. Each controller is intended to only contain one kind of mailbox, but some devices (like Tegra HSP) implement multiple kinds and use the same device tree node for all of them. As such, we need to allow multiple mbox_controllers per device tree node. Signed-off-by: Mikko Perttunen Signed-off-by: Jassi Brar commit a8803d7421cc2be2ac12a8155e5d824f04259eff Author: Thierry Reding Date: Wed Nov 28 10:54:10 2018 +0100 mailbox: Support blocking transfers in atomic context The mailbox framework supports blocking transfers via completions for clients that can sleep. In order to support blocking transfers in cases where the transmission is not permitted to sleep, add a new ->flush() callback that controller drivers can implement to busy loop until the transmission has been completed. A new mbox_flush() function can be called by mailbox consumers in atomic context to make sure a transfer has completed. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 5f470b3638a4ed03df79b993ece819cac2f4ca7e Author: Scott Wood Date: Fri Dec 21 22:07:54 2018 -0600 powerpc/configs/85xx: Enable CONFIG_DEBUG_KERNEL This is required for CONFIG_DEBUG_INFO to work. Signed-off-by: Scott Wood commit ccdde478e8445adaa85f30e555de9fab564d742a Author: Scott Wood Date: Fri Dec 21 21:32:51 2018 -0600 powerpc/dts/fsl: Fix dtc-flagged interrupt errors mpc8641_hpcn was updated to 4-cell interrupt specifiers, but PCI interrupt-map was not updated. It was also missing #interrupt-cells on the outer PCI buses. p1020rdb-pc was updated to 4-cell interrupt specifiers, but the ethernet-phy nodes weren't updated. mpc832x_rdb had an invalid "interrupts = <0>" on the ethernet-phy nodes. Besides being the wrong number of cells, 0 is not a valid IPIC interrupt according to ipic.c. Presumably it was meant to indicate that these PHYs are not connected to an interrupt. Signed-off-by: Scott Wood commit a6ee0c00a70b115e365d71eb5debcfb9de74dd1b Author: Yuantian Tang Date: Wed Oct 31 14:57:36 2018 +0800 clk: qoriq: add more compatibles strings Add more SoC compatible strings to support more chips. Signed-off-by: Yuantian Tang Reviewed-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Scott Wood commit 54877957e95b0e41f472ee3a7e07100d61259de2 Author: Scott Wood Date: Wed Oct 31 14:57:35 2018 +0800 powerpc/fsl: Use new clockgen binding The driver retains compatibility with old device trees, but we don't want the old nodes lying around to be copied, or used as a reference (some of the mux options are incorrect), or even just being clutter. Signed-off-by: Scott Wood Signed-off-by: Tang Yuantian [scottwood: removed sysclk node added by Andy] Signed-off-by: Scott Wood commit 0deae39cec6dab3a66794f3e9e83ca4dc30080f1 Author: Christophe Leroy Date: Mon Dec 10 11:41:29 2018 +0000 powerpc/83xx: handle machine check caused by watchdog timer When the watchdog timer is set in interrupt mode, it causes a machine check when it times out. The purpose of this mode is to ease debugging, not to crash the kernel and reboot the machine. This patch implements a special handling for that, in order to not crash the kernel if the watchdog times out while in interrupt or within the idle task. Signed-off-by: Christophe Leroy [scottwood: added missing #include] Signed-off-by: Scott Wood commit 65eed012d1f2d0f0bf0ffc036826d58147de77b8 Author: Omar Sandoval Date: Fri Dec 21 18:45:18 2018 -0800 xfs: reallocate realtime summary cache on growfs At mount time, we allocate m_rsum_cache with the number of realtime bitmap blocks. However, xfs_growfs_rt() can increase the number of realtime bitmap blocks. Using the cache after this happens may access out of the bounds of the cache. Fix it by reallocating the cache in this case. Fixes: 355e3532132b ("xfs: cache minimum realtime summary level") Signed-off-by: Omar Sandoval Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 01f45c8fb8b951e8d5cf648ce7ec16505ce303e7 Author: Alexandre Belloni Date: Tue Nov 20 16:12:30 2018 +0100 powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved" Fix a spelling mistake in a register description. Signed-off-by: Alexandre Belloni Signed-off-by: Scott Wood commit c6e5485e0cb509292a14e880e1944143f99758c7 Author: Christoph Hellwig Date: Wed Nov 14 09:23:07 2018 +0100 powerpc/fsl_pci: simplify fsl_pci_dma_set_mask swiotlb will only bounce buffer when the effective dma address for the device is smaller than the actual DMA range. Instead of flipping between the swiotlb and nommu ops for FSL SOCs that have the second outbound window just don't set the bus dma_mask in this case. Signed-off-by: Christoph Hellwig Signed-off-by: Scott Wood commit 7811eade247cdf90b26dd0951613e77614192771 Author: Sabyasachi Gupta Date: Mon Nov 5 07:52:48 2018 +0530 arch/powerpc/fsl_rmu: Use dma_zalloc_coherent Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta Signed-off-by: Scott Wood commit d52266fc74beacf2aefad934bd4011d62e9584e0 Author: Colin Ian King Date: Fri Dec 21 17:00:48 2018 -0800 Input: drv2667 - fix indentation issues There are some statements that are indented incorrectly, fix this by removing the extra tabs. Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315 Author: Kangjie Lu Date: Fri Dec 21 13:10:39 2018 -0600 hwmon: (lm80) fix a missing check of bus read in lm80 probe In lm80_probe(), if lm80_read_value() fails, it returns a negative error number which is stored to data->fan[f_min] and will be further used. We should avoid using the data if the read fails. The fix checks if lm80_read_value() fails, and if so, returns with the error number. Signed-off-by: Kangjie Lu Signed-off-by: Guenter Roeck commit c9c63915519b1def7043b184680f33c24cd49d7b Author: Kangjie Lu Date: Fri Dec 21 13:01:33 2018 -0600 hwmon: (lm80) fix a missing check of the status of SMBus read If lm80_read_value() fails, it returns a negative number instead of the correct read data. Therefore, we should avoid using the data if it fails. The fix checks if lm80_read_value() fails, and if so, returns with the error number. Signed-off-by: Kangjie Lu [groeck: One variable for return values is enough] Signed-off-by: Guenter Roeck commit ce28bb4453880759c5bdc2751629f1a865ea4a6e Merge: 64935310f2fc0 6cafab50eea32 Author: David S. Miller Date: Fri Dec 21 15:06:20 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 2298a6f09f455f64bf253e6fb5c1ff72f38a6249 Author: Thierry Reding Date: Thu Dec 20 18:20:02 2018 +0100 mailbox: ti-msgmgr: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 368d7767b50154eb052938a13494879b00135ed3 Author: Thierry Reding Date: Thu Dec 20 18:20:01 2018 +0100 mailbox: stm32-ipcc: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Ludovic Barre Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 08f2f88a3bbf3cdfdf3b890159d45519e2d5bbeb Author: Thierry Reding Date: Thu Dec 20 18:20:00 2018 +0100 mailbox: rockchip: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Caesar Wang Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 83dd44a17d40ab258aede6f560d27444e7dcfba7 Author: Thierry Reding Date: Thu Dec 20 18:19:59 2018 +0100 mailbox: qcom-apcs: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Bjorn Andersson Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 85a555246e6db7b4e9803704e1e0c694dfe658a0 Author: Thierry Reding Date: Thu Dec 20 18:19:58 2018 +0100 mailbox: platform-mhu: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Acked-by: Neil Armstrong Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit a3abf4363c7ec8f980a0ac1c880e2627349d8626 Author: Thierry Reding Date: Thu Dec 20 18:19:57 2018 +0100 mailbox: omap: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit ec1c674f0ae3905cd540ab2f30d9c4265981d7b4 Author: Thierry Reding Date: Thu Dec 20 18:19:56 2018 +0100 mailbox: mtk-cmdq: Remove needless devm_kfree() calls Memory allocated through device-managed functions doesn't need to be explicitly freed, so these calls can be removed. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 8aed5719557269807447b8bb936067b36a54b787 Author: Thierry Reding Date: Thu Dec 20 18:19:55 2018 +0100 mailbox: mtk-cmdq: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 0b7f5fe837f682dbb9f751afb513a4b28c7ceb56 Author: Thierry Reding Date: Thu Dec 20 18:19:54 2018 +0100 mailbox: xgene-slimpro: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit d0c196dbee7957ea446c4047c501537aeccf5fa0 Author: Thierry Reding Date: Thu Dec 20 18:19:53 2018 +0100 mailbox: sti: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Acked-by: Lee Jones Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 87f63f578b734ca45cb8ebe251bd65560b89de26 Author: Thierry Reding Date: Thu Dec 20 18:19:52 2018 +0100 mailbox: altera: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 4013286c7231e05780c6e73b91d357678f819b4b Author: Thierry Reding Date: Thu Dec 20 18:19:51 2018 +0100 mailbox: imx: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Oleksij Rempel Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit ad3e7f9651ca344fc14b1709c7f91d9e570c389c Author: Thierry Reding Date: Thu Dec 20 18:19:50 2018 +0100 mailbox: hi6220: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Leo Yan Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit e73cb83c807b3a1c3c430b646668ce358b13ee74 Author: Thierry Reding Date: Thu Dec 20 18:19:49 2018 +0100 mailbox: hi3660: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Tested-by: Leo Yan Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 6267ee6afae0a3c130dc585118dd60e090c6448b Author: Thierry Reding Date: Thu Dec 20 18:19:48 2018 +0100 mailbox: bcm-pdc: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 0cafc12ab9cc163e6078db8ec978c200a632e88e Author: Thierry Reding Date: Thu Dec 20 18:19:47 2018 +0100 mailbox: bcm-flexrm: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding Acked-by: Scott Branden Signed-off-by: Jassi Brar commit 709cbeea1b34f92619140b20bf15602a7f1240d8 Author: Thierry Reding Date: Thu Dec 20 18:19:46 2018 +0100 mailbox: bcm2835: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Eric Anholt Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 6aba2f4aac1ac030edacc76a10043e4d1b885e3d Author: Thierry Reding Date: Thu Dec 20 18:19:45 2018 +0100 mailbox: arm-mhu: Use device-managed registration API Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Reviewed-by: Sudeep Holla Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit e898d9cdd3a9f105863d63dd3b46443742a4757c Author: Thierry Reding Date: Thu Dec 20 18:19:44 2018 +0100 mailbox: Add device-managed registration functions Add device-managed equivalents of the mbox_controller_register() and mbox_controller_unregister() functions that can be used to have the devres infrastructure automatically unregister mailbox controllers on driver probe failure or driver removal. This can help remove a lot of boiler plate code from drivers. Reviewed-by: Bjorn Andersson Reviewed-by: Sudeep Holla Signed-off-by: Thierry Reding Signed-off-by: Jassi Brar commit 1c3243f61fa7daea78de9866af2625f559ebf456 Author: Matt Turner Date: Fri Dec 21 11:17:55 2018 -0800 alpha: Remove some unused variables Fixes: 42a0cc347858 ("sys: don't hold uts_sem while accessing userspace memory") Signed-off-by: Matt Turner commit 1f4883f300da4f4d9d31eaa80f7debf6ce74843b Author: Dave Jiang Date: Mon Dec 10 13:36:14 2018 -0700 libnvdimm/security: Add documentation for nvdimm security support Add theory of operation for the security support that's going into libnvdimm. Signed-off-by: Dave Jiang Reviewed-by: Jing Lin Signed-off-by: Dan Williams commit ecaa4a97b3908be0bf3ad12181ae8c44d1816d40 Author: Dave Jiang Date: Mon Dec 10 13:33:24 2018 -0700 tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test Adding test support for new Intel DSM from v1.8. The ability of simulating master passphrase update and master secure erase have been added to nfit_test. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 926f74802cb1ce0ef0c3b9f806ea542beb57e50d Author: Dave Jiang Date: Mon Dec 10 13:32:16 2018 -0700 tools/testing/nvdimm: Add overwrite support for nfit_test With the implementation of Intel NVDIMM DSM overwrite, we are adding unit test to nfit_test for testing of overwrite operation. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 3c13e2ac747a37e683597d3d875f839f2bc150e1 Author: Dave Jiang Date: Mon Dec 10 13:20:42 2018 -0700 tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs Add nfit_test support for DSM functions "Get Security State", "Set Passphrase", "Disable Passphrase", "Unlock Unit", "Freeze Lock", and "Secure Erase" for the fake DIMMs. Also adding a sysfs knob in order to put the DIMMs in "locked" state. The order of testing DIMM unlocking would be. 1a. Disable DIMM X. 1b. Set Passphrase to DIMM X. 2. Write to /sys/devices/platform/nfit_test.0/nfit_test_dimm/test_dimmX/lock_dimm 3. Renable DIMM X 4. Check DIMM X state via sysfs "security" attribute for nmemX. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 89fa9d8ea7bdfa841d19044485cec5f4171069e5 Author: Dave Jiang Date: Mon Dec 10 10:53:22 2018 -0700 acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support With Intel DSM 1.8 [1] two new security DSMs are introduced. Enable/update master passphrase and master secure erase. The master passphrase allows a secure erase to be performed without the user passphrase that is set on the NVDIMM. The commands of master_update and master_erase are added to the sysfs knob in order to initiate the DSMs. They are similar in opeartion mechanism compare to update and erase. [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.8.pdf Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 7d988097c546187ada602cc9bccd0f03d473eb8f Author: Dave Jiang Date: Thu Dec 13 15:36:18 2018 -0700 acpi/nfit, libnvdimm/security: Add security DSM overwrite support Add support for the NVDIMM_FAMILY_INTEL "ovewrite" capability as described by the Intel DSM spec v1.7. This will allow triggering of overwrite on Intel NVDIMMs. The overwrite operation can take tens of minutes. When the overwrite DSM is issued successfully, the NVDIMMs will be unaccessible. The kernel will do backoff polling to detect when the overwrite process is completed. According to the DSM spec v1.7, the 128G NVDIMMs can take up to 15mins to perform overwrite and larger DIMMs will take longer. Given that overwrite puts the DIMM in an indeterminate state until it completes introduce the NDD_SECURITY_OVERWRITE flag to prevent other operations from executing when overwrite is happening. The NDD_WORK_PENDING flag is added to denote that there is a device reference on the nvdimm device for an async workqueue thread context. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 64e77c8c047fb91ea8c7800c1238108a72f0bf9c Author: Dave Jiang Date: Fri Dec 7 14:02:12 2018 -0700 acpi/nfit, libnvdimm: Add support for issue secure erase DSM to Intel nvdimm Add support to issue a secure erase DSM to the Intel nvdimm. The required passphrase is acquired from an encrypted key in the kernel user keyring. To trigger the action, "erase " is written to the "security" sysfs attribute. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit d2a4ac73f56a5d0709d28b41fec8d15e4500f8f1 Author: Dave Jiang Date: Fri Dec 7 13:29:09 2018 -0700 acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms Add support for enabling and updating passphrase on the Intel nvdimms. The passphrase is the an encrypted key in the kernel user keyring. We trigger the update via writing "update " to the sysfs attribute "security". If no exists (for enabling security) then a 0 should be used. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 03b65b22ada8115a7a7bfdf0789f6a94adfd6070 Author: Dave Jiang Date: Fri Dec 7 10:33:30 2018 -0700 acpi/nfit, libnvdimm: Add disable passphrase support to Intel nvdimm. Add support to disable passphrase (security) for the Intel nvdimm. The passphrase used for disabling is pulled from an encrypted-key in the kernel user keyring. The action is triggered by writing "disable " to the sysfs attribute "security". Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit f6653a0e0877572c87f6dab5351e7bd6b6b7100c Author: Alex Deucher Date: Thu Dec 20 10:08:46 2018 -0500 drm/amdgpu: Add new VegaM pci id Add a new pci id. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0f6be2c09af65a85d34653e609b5f45e25a9e95a Author: Michel Dänzer Date: Fri Nov 30 18:15:22 2018 +0100 drm/ttm: Use drm_debug_printer for all ttm_bo_mem_space_debug output No need for pr_err here, the pr_err message in ttm_bo_evict is enough to draw attention to something not going as planned. Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 06d6370e7b200882ab23bafd86a4024c7571c778 Author: Evan Quan Date: Thu Dec 20 22:44:54 2018 +0800 drm/amdgpu: add Vega20 PSP ASD firmware loading Add PSP ASD firmware loading on Vega20. Not sure why this was missing before. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit d8a706414af4827fc0b4b1c0c631c607351938b9 Author: Dan Williams Date: Fri Dec 21 11:35:53 2018 -0800 dax: Use non-exclusive wait in wait_entry_unlocked() get_unlocked_entry() uses an exclusive wait because it is guaranteed to eventually obtain the lock and follow on with an unlock+wakeup cycle. The wait_entry_unlocked() path does not have the same guarantee. Rather than open-code an extra wakeup, just switch to a non-exclusive wait. Cc: Jan Kara Cc: Matthew Wilcox Reported-by: Linus Torvalds Signed-off-by: Dan Williams commit aa74be6eeade1caf3ef945ff1812059f3d7dc947 Author: Yishai Hadas Date: Sun Dec 9 12:52:36 2018 +0200 IB/mlx5: Allocate the per-port Q counter shared when DEVX is supported The per-port Q counter is some kernel resource and as such may be used by few UID(s) upon DEVX usage. To enable using it for QP/RQ when DEVX context is used need to allocate it with a sharing mode indication to let firmware allows its usage. The UID = 0xffff was chosen to mark it. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5801169a2ed20003f771acecf3ac00574cf10a38 Author: Frank Rowand Date: Tue Dec 18 11:40:03 2018 -0800 of: __of_detach_node() - remove node from phandle cache Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of defense (do not return cached node if detached, do not add node to cache if detached). Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()") Reported-by: Michael Bringmann Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Frank Rowand Signed-off-by: Rob Herring commit b8a9ac1a5b99a2fcbed19fd29d2d59270c281a31 Author: Frank Rowand Date: Tue Dec 18 11:40:02 2018 -0800 of: of_node_get()/of_node_put() nodes held in phandle cache The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Frank Rowand Signed-off-by: Rob Herring commit 75bf8a2a2f6b0def50009a631ea2f22f0143ba6c Author: Parav Pandit Date: Fri Dec 21 16:19:27 2018 +0200 IB/umad: Start using dev_groups of class Start using core defined dev_groups of a class which allows to add device attributes to the core kernel and simplify the umad module. Signed-off-by: Parav Pandit Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cdb53b65ae1b3beac2aaddf6c2d0cef798863466 Author: Parav Pandit Date: Fri Dec 21 16:19:26 2018 +0200 IB/umad: Use class_groups and let core create class file Use class->class_groups core kernel facility to create the abi version file instead of open coding. Signed-off-by: Parav Pandit Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e9dd5daf884cf591f9c9a122351d2f9ccf7b97d3 Author: Parav Pandit Date: Fri Dec 21 16:19:25 2018 +0200 IB/umad: Refactor code to use cdev_device_add() Refactor code to use cdev_device_add() and do other minor refactors while modifying these functions as below. 1. Instead of returning generic -1, return an actual error for ib_umad_init_port(). 2. Introduce and use ib_umad_init_port_dev() for sm and umad char devices. 3. Instead of kobj, use more light weight kref to refcount ib_umad_device. 4. Use modern cdev_device_add() single code cut down three steps of cdev_add(), device_create(). This further helps to move device sysfs files to class attributes in subsequent patch. 5. Remove few empty lines while refactoring these functions. 6. Use sizeof() instead of sizeof to avoid checkpatch warning. 7. Use struct_size() for calculation of ib_umad_port. Signed-off-by: Parav Pandit Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 594d1644cd59447f4fceb592448d5cd09eb09b5e Author: Chris Perl Date: Mon Dec 17 10:56:38 2018 -0500 NFS: nfs_compare_mount_options always compare auth flavors. This patch removes the check from nfs_compare_mount_options to see if a `sec' option was passed for the current mount before comparing auth flavors and instead just always compares auth flavors. Consider the following scenario: You have a server with the address 192.168.1.1 and two exports /export/a and /export/b. The first export supports `sys' and `krb5' security, the second just `sys'. Assume you start with no mounts from the server. The following results in EIOs being returned as the kernel nfs client incorrectly thinks it can share the underlying `struct nfs_server's: $ mkdir /tmp/{a,b} $ sudo mount -t nfs -o vers=3,sec=krb5 192.168.1.1:/export/a /tmp/a $ sudo mount -t nfs -o vers=3 192.168.1.1:/export/b /tmp/b $ df >/dev/null df: ‘/tmp/b’: Input/output error Signed-off-by: Chris Perl Signed-off-by: Anna Schumaker commit 64935310f2fc0128373bbbcfb5b8b49fd26e2ae8 Merge: 7fa4bd739fc0f 682ec859518d7 Author: David S. Miller Date: Fri Dec 21 10:24:54 2018 -0800 Merge branch 'skb_ext-fixes' Paolo Abeni says: ==================== net: skb extension follow-ups This series includes some follow-up for the recently added skb extension. The first patch addresses an unlikely race while adding skb extensions, and the following two are just minor code clean-up. v1 -> v2: - be sure to flag the newly added extension as active in skb_ext_add() ==================== Signed-off-by: David S. Miller commit 682ec859518d73435cc924d816da2953343241c1 Author: Paolo Abeni Date: Fri Dec 21 19:03:15 2018 +0100 net: minor cleanup in skb_ext_add() When the extension to be added is already present, the only skb field we may need to update is 'extensions': we can reorder the code and avoid a branch. v1 -> v2: - be sure to flag the newly added extension as active Signed-off-by: Paolo Abeni Acked-by: Florian Westphal Signed-off-by: David S. Miller commit d312d0a6846a4553bd955afd414f8f55398ece07 Author: Paolo Abeni Date: Fri Dec 21 19:03:14 2018 +0100 net: drop the unused helper skb_ext_get() Such helper is currently unused, and skb extension users are better off using skb_ext_add()/skb_ext_del(). So let's drop it. Signed-off-by: Paolo Abeni Acked-by: Florian Westphal Signed-off-by: David S. Miller commit e94e50bd88f7ed2f2d40c32c06efd61c36c33ec8 Author: Paolo Abeni Date: Fri Dec 21 19:03:13 2018 +0100 net: fix possible user-after-free in skb_ext_add() On cow we can free the old extension: we must avoid dereferencing such extension after skb_ext_maybe_cow(). Since 'new' contents are always equal to 'old' after the copy, we can fix the above accessing the relevant data using 'new'. Fixes: df5042f4c5b9 ("sk_buff: add skb extension infrastructure") Signed-off-by: Paolo Abeni Acked-by: Florian Westphal Signed-off-by: David S. Miller commit cf7ad3030271c55a7119a8c2162563e3f6e93879 Author: Parav Pandit Date: Fri Dec 21 16:19:24 2018 +0200 IB/umad: Avoid destroying device while it is accessed ib_umad_reg_agent2() and ib_umad_reg_agent() access the device name in dev_notice(), while concurrently, ib_umad_kill_port() can destroy the device using device_destroy(). cpu-0 cpu-1 ----- ----- ib_umad_ioctl() [...] ib_umad_kill_port() device_destroy(dev) ib_umad_reg_agent() dev_notice(dev) Therefore, first mark ib_dev as NULL, to block any further access in file ops, unregister the mad agent and destroy the device at the end after mutex is unlocked. This ensures that device doesn't get destroyed, while it may get accessed. Fixes: 0f29b46d49b0 ("IB/mad: add new ioctl to ABI to support new registration options") Signed-off-by: Parav Pandit Reviewed-by: Jack Morgenstein Reviewed-by: Ira Weiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 900d07c12d4ed0e2c237655b55383df8d2c715ff Author: Parav Pandit Date: Fri Dec 21 16:19:23 2018 +0200 IB/umad: Simplify and avoid dynamic allocation of class Simplify code to have a static structure instance for umad class allocation. This will allow to have class attributes defined along with class registration in subsequent patch and allows more class methods definition similar to ib_core module. Signed-off-by: Parav Pandit Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3030cf95ab2084678e9d2e0315d29cec80479eb0 Author: Alexandre Belloni Date: Sun Sep 9 23:15:04 2018 +0200 alpha: rtc: simplify alpha_rtc_init Use devm_rtc_allocate_device to simplify choosing the rtc_ops in alpha_rtc_init(). Signed-off-by: Alexandre Belloni Signed-off-by: Matt Turner commit a104d44b183ce34b645bbcc8483d9d39fd488c55 Author: Daniel Bristot de Oliveira Date: Tue Sep 25 20:31:48 2018 +0200 alpha: Fix a typo on ptrace.h - struct has as little information as possible. * I does not have* + struct has as little information as possible. *It does not have* Signed-off-by: Daniel Bristot de Oliveira Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Gleixner Cc: linux-alpha@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Matt Turner commit fb430b39dbb0def3c7fc47a79fb02c5dfcda9f9c Author: Colin Ian King Date: Fri Oct 12 15:53:14 2018 +0100 alpha: fix spelling mistake QSD_PORT_ACTUVE -> QSD_PORT_ACTIVE Trivial fix to spelling mistake in kernel error message Signed-off-by: Colin Ian King Signed-off-by: Matt Turner commit a8faab540f0ab2a03afd12e361d3c6e463226fae Author: Firoz Khan Date: Tue Nov 13 15:01:53 2018 +0530 alpha: generate uapi header and syscall table header files System call table generation script must be run to gener- ate unistd_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by alpha/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/systbls.S file. Signed-off-by: Firoz Khan Signed-off-by: Matt Turner commit cabcebd33b8b80276d4cbbb1091e784dfbc516f8 Author: Firoz Khan Date: Tue Nov 13 15:01:52 2018 +0530 alpha: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/syscall.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Matt Turner commit b67bfd298f4c7ab3762aebb354a0b16635c82211 Author: Firoz Khan Date: Tue Nov 13 15:01:51 2018 +0530 alpha: add __NR_syscalls along with NR_SYSCALLS NR_SYSCALLS macro holds the number of system call exist in alpha architecture. We have to change the value of NR- _SYSCALLS, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_SY- CALLS value. 1. Update NR_SYSCALLS in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_SYS- CALLS until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_SYSCALLS in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_SYSCALLS asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Matt Turner commit d8bf616be5f05b955d3ee32ad92d4cdb87e30349 Author: Firoz Khan Date: Tue Nov 13 15:01:50 2018 +0530 alpha: remove CONFIG_OSF4_COMPAT flag from syscall table Remove CONFIG_OSF4_COMPAT config flag from system call table - systbls.S and to keep the same feature, add the flag in osf_sys.c. One of the patch in this patch series will generate the system call table file. In order to come up with a common implementation across all architecture, we need this change. Signed-off-by: Firoz Khan Signed-off-by: Matt Turner commit 150fbd536f9eb3044c2b048dc13ee648a78afb93 Author: Firoz Khan Date: Tue Nov 13 15:01:49 2018 +0530 alpha: move __IGNORE* entries to non uapi header All the __IGNORE* entries are resides in the uapi header file move to non uapi header asm/unistd.h as it is not used by any user space applications. It is correct to keep __IGNORE* entry in non uapi header asm/unistd.h while uapi/asm/unistd.h must hold information only useful for user space applications. One of the patch in this patch series will generate uapi header file. The information which directly used by the user space application must be present in uapi file. Signed-off-by: Firoz Khan Signed-off-by: Matt Turner commit 7fa4bd739fc0fa209fa5120383aab17f6e9600f7 Author: Daniel Borkmann Date: Fri Dec 21 14:04:46 2018 +0100 bpf: fix segfault in test_verifier selftest Minor fallout from merge resolution, test_verifier was segfaulting because the REJECT result was correct, but errstr was NULL. Properly fix it as in 339bbff2d6e0. Fixes: 339bbff2d6e0 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next") Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller commit 718c43038f287e843c2f63d946977de90014cb11 Author: Al Viro Date: Thu Dec 20 03:16:27 2018 -0500 mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT Reviewed-by: David Howells Signed-off-by: Al Viro commit d2497e12e230c3f1be8ca6a0609a98c8c609fb80 Author: Al Viro Date: Sun Dec 16 01:37:06 2018 -0500 smack: rewrite smack_sb_eat_lsm_opts() make it use smack_add_opt() and avoid separate copies - gather non-LSM options by memmove() in place Reviewed-by: David Howells Signed-off-by: Al Viro commit c3300aaf95fb4e5be41e731fa6427d0d996d32ac Author: Al Viro Date: Sun Dec 16 01:52:24 2018 -0500 smack: get rid of match_token() same issue as with selinux... [fix by Andrei Vagin folded in] Reviewed-by: David Howells Signed-off-by: Al Viro commit 55c0e5bd078eba2d41d76fa25d5d5e55f1ff09ee Author: Al Viro Date: Sun Dec 16 01:09:45 2018 -0500 smack: take the guts of smack_parse_opts_str() into a new helper smack_add_opt() adds an already matched option to growing smack_mnt_options Reviewed-by: David Howells Signed-off-by: Al Viro commit 757cbe597fe8490c7c0a9650ebe5d60195f151d4 Author: Al Viro Date: Fri Dec 14 23:42:21 2018 -0500 LSM: new method: ->sb_add_mnt_opt() Adding options to growing mnt_opts. NFS kludge with passing context= down into non-text-options mount switched to it, and with that the last use of ->sb_parse_opts_str() is gone. Reviewed-by: David Howells Signed-off-by: Al Viro commit 99dbbb593fe6b39153c15ea9b9c63ea911864cf2 Author: Al Viro Date: Fri Dec 14 21:56:23 2018 -0500 selinux: rewrite selinux_sb_eat_lsm_opts() make it use selinux_add_opt() and avoid separate copies - gather non-LSM options by memmove() in place Reviewed-by: David Howells Signed-off-by: Al Viro commit da3d76abb2e74c07b1cd620ee5e3b31227846c7c Author: Al Viro Date: Mon Dec 17 10:14:16 2018 -0500 selinux: regularize Opt_... names a bit Reviewed-by: David Howells Signed-off-by: Al Viro commit 169d68efb03b728588c209c682f14328eec485c0 Author: Al Viro Date: Fri Dec 14 22:44:50 2018 -0500 selinux: switch away from match_token() It's not a good fit, unfortunately, and the next step will make it even less so. Open-code what we need here. Reviewed-by: David Howells Signed-off-by: Al Viro commit ba6418623385abf19a6c15cf0b1cfaacfdf9afc8 Author: Al Viro Date: Fri Dec 14 20:28:15 2018 -0500 selinux: new helper - selinux_add_opt() the guts of the loop in selinux_parse_opts_str() - takes one (already recognized) option and adds it to growing selinux_mnt_opts. Reviewed-by: David Howells Signed-off-by: Al Viro commit 84d8c4a5ef696ca96fa7a8d64db9222658b9d142 Author: Al Viro Date: Thu Dec 13 15:18:44 2018 -0500 LSM: bury struct security_mnt_opts no users left Reviewed-by: David Howells Signed-off-by: Al Viro commit 12085b14a4440a6d12ff7966702c010df87caef0 Author: Al Viro Date: Thu Dec 13 15:18:05 2018 -0500 smack: switch to private smack_mnt_opts Reviewed-by: David Howells Signed-off-by: Al Viro commit bd3236557bb256d6491df125e5e9d0393c70e4d2 Author: Al Viro Date: Thu Dec 13 15:04:59 2018 -0500 selinux: switch to private struct selinux_mnt_opts none of the convolutions needed, just 4 strings, TYVM... Reviewed-by: David Howells Signed-off-by: Al Viro commit 204cc0ccf1d49c6292aeef4c8edd1b3d10ff933c Author: Al Viro Date: Thu Dec 13 13:41:47 2018 -0500 LSM: hide struct security_mnt_opts from any generic code Keep void * instead, allocate on demand (in parse_str_opts, at the moment). Eventually both selinux and smack will be better off with private structures with several strings in those, rather than this "counter and two pointers to dynamically allocated arrays" ugliness. This commit allows to do that at leisure, without disrupting anything outside of given module. Changes: * instead of struct security_mnt_opt use an opaque pointer initialized to NULL. * security_sb_eat_lsm_opts(), security_sb_parse_opts_str() and security_free_mnt_opts() take it as var argument (i.e. as void **); call sites are unchanged. * security_sb_set_mnt_opts() and security_sb_remount() take it by value (i.e. as void *). * new method: ->sb_free_mnt_opts(). Takes void *, does whatever freeing that needs to be done. * ->sb_set_mnt_opts() and ->sb_remount() might get NULL as mnt_opts argument, meaning "empty". Reviewed-by: David Howells Signed-off-by: Al Viro commit e3489f8974e178d723259a842a1e61708dd7dc1e Author: Al Viro Date: Thu Dec 13 00:24:36 2018 -0500 selinux: kill selinux_sb_get_mnt_opts() it's much easier to just do the right thing in ->sb_show_options(), without bothering with allocating and populating arrays, etc. Reviewed-by: David Howells Signed-off-by: Al Viro commit 5b4002391153acebce2557af318bbdc17e235134 Author: Al Viro Date: Wed Dec 12 20:13:29 2018 -0500 LSM: turn sb_eat_lsm_opts() into a method Kill ->sb_copy_data() - it's used only in combination with immediately following ->sb_parse_opts_str(). Turn that combination into a new method. This is just a mechanical move - cleanups will be the next step. Reviewed-by: David Howells Signed-off-by: Al Viro commit 6a0440e5b7562512c021aa1b5a706fcc545773db Author: Al Viro Date: Mon Dec 10 17:30:41 2018 -0500 nfs_remount(): don't leak, don't ignore LSM options quietly * if mount(2) passes something like "context=foo" with MS_REMOUNT in flags (/sbin/mount.nfs will _not_ do that - you need to issue the syscall manually), you'll get leaked copies for LSM options. The reason is that instead of nfs_{alloc,free}_parsed_mount_data() nfs_remount() uses kzalloc/kfree, which lacks the needed cleanup. * selinux options are not changed on remount (as for any other fs), but in case of NFS the failure is quiet - they are not compared to what we used to have, with complaint in case of attempted changes. Trivially fixed by converting to use of security_sb_remount(). Reviewed-by: David Howells Signed-off-by: Al Viro commit a65001e8a4d465693d0191297a6fd864c96b3147 Author: Al Viro Date: Mon Dec 10 17:19:21 2018 -0500 btrfs: sanitize security_mnt_opts use 1) keeping a copy in btrfs_fs_info is completely pointless - we never use it for anything. Getting rid of that allows for simpler calling conventions for setup_security_options() (caller is responsible for freeing mnt_opts in all cases). 2) on remount we want to use ->sb_remount(), not ->sb_set_mnt_opts(), same as we would if not for FS_BINARY_MOUNTDATA. Behaviours *are* close (in fact, selinux sb_set_mnt_opts() ought to punt to sb_remount() in "already initialized" case), but let's handle that uniformly. And the only reason why the original btrfs changes didn't go for security_sb_remount() in btrfs_remount() case is that it hadn't been exported. Let's export it for a while - it'll be going away soon anyway. Reviewed-by: David Howells Signed-off-by: Al Viro commit 8d64124a6a93ec68fda6f781e48a7b95d9dd17d9 Author: Al Viro Date: Mon Dec 10 15:34:12 2018 -0500 selinux; don't open-code a loop in sb_finish_set_opts() Reviewed-by: David Howells Signed-off-by: Al Viro commit a10d7c22b34bcf744679019269bfb33ebf0b75ee Author: Al Viro Date: Wed Dec 5 11:58:35 2018 -0500 LSM: split ->sb_set_mnt_opts() out of ->sb_kern_mount() ... leaving the "is it kernel-internal" logics in the caller. Reviewed-by: David Howells Signed-off-by: Al Viro commit f5c0c26d9008b355babb6d16f3d7c4de3bada0e7 Author: Al Viro Date: Sat Nov 17 12:09:18 2018 -0500 new helper: security_sb_eat_lsm_opts() combination of alloc_secdata(), security_sb_copy_data(), security_sb_parse_opt_str() and free_secdata(). Reviewed-by: David Howells Signed-off-by: Al Viro commit c039bc3c2498724946304a8f964244a9b6af1043 Author: Al Viro Date: Sat Dec 1 23:06:57 2018 -0500 LSM: lift extracting and parsing LSM options into the caller of ->sb_remount() This paves the way for retaining the LSM options from a common filesystem mount context during a mount parameter parsing phase to be instituted prior to actual mount/reconfiguration actions. Reviewed-by: David Howells Signed-off-by: Al Viro commit 6be8750b4cba8c37170f46b29841d112f1be749b Author: Al Viro Date: Sat Dec 1 22:42:44 2018 -0500 LSM: lift parsing LSM options into the caller of ->sb_kern_mount() This paves the way for retaining the LSM options from a common filesystem mount context during a mount parameter parsing phase to be instituted prior to actual mount/reconfiguration actions. Reviewed-by: David Howells Signed-off-by: Al Viro commit 6466f3d193a99426db067855345e763de2160f1c Author: Al Viro Date: Sat Dec 1 22:55:40 2018 -0500 smack: make smack_parse_opts_str() clean up on failure fixes e.g. a btrfs leak... Reviewed-by: David Howells Signed-off-by: Al Viro commit 31af12efd0a259de9b0d8ef626503911f13b584f Author: Darrick J. Wong Date: Fri Dec 21 08:42:51 2018 -0800 iomap: take responsibility for the filesystem iomap code XFS is the primary user of the filesystem iomap code, so we (the XFS community, specifically) will explicitly take responsibility for its maintenance. Signed-off-by: Darrick J. Wong Acked-by: Al Viro Reviewed-by: Dave Chinner Acked-by: Christoph Hellwig commit 3cc31fa65d85610574c0f6a474e89f4c419923d5 Author: Eric Sandeen Date: Fri Dec 21 08:42:50 2018 -0800 iomap: don't search past page end in iomap_is_partially_uptodate iomap_is_partially_uptodate() is intended to check wither blocks within the selected range of a not-uptodate page are uptodate; if the range we care about is up to date, it's an optimization. However, the iomap implementation continues to check all blocks up to from+count, which is beyond the page, and can even be well beyond the iop->uptodate bitmap. I think the worst that will happen is that we may eventually find a zero bit and return "not partially uptodate" when it would have otherwise returned true, and skip the optimization. Still, it's clearly an invalid memory access that must be fixed. So: fix this by limiting the search to within the page as is done in the non-iomap variant, block_is_partially_uptodate(). Zorro noticed thiswhen KASAN went off for 512 byte blocks on a 64k page system: BUG: KASAN: slab-out-of-bounds in iomap_is_partially_uptodate+0x1a0/0x1e0 Read of size 8 at addr ffff800120c3a318 by task fsstress/22337 Reported-by: Zorro Lang Signed-off-by: Eric Sandeen Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9b9afe4a0ef149db2472f13d6fa3c705d2867c9c Author: Anup Patel Date: Tue Dec 4 15:59:51 2018 +0530 RISC-V: Select GENERIC_SCHED_CLOCK for clocksource drivers The riscv_timer driver can provide sched_clock using "rdtime" instruction but to achieve this we require generic sched_clock framework hence this patch selects GENERIC_SCHED_CLOCK for RISCV. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit a266cdba17b36497da47055f31454995c5e50f43 Author: Olof Johansson Date: Tue Oct 30 23:47:08 2018 -0700 RISC-V: lib: minor asm cleanup Fix tab/space conversion and use ENTRY/ENDPROC macros. Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit 358f3fff5271629f26261dadff73a9f8484aee12 Merge: 3aed8c43267eb 7ba12bb676c2f Author: Palmer Dabbelt Date: Fri Dec 21 08:15:39 2018 -0800 RISC-V: Move from EARLY_PRINTK to SBI earlycon Now that we have earlycon support in the SBI console driver there is no reason to have our arch-specific early printk support. This patch set turns on SBI earlycon support and removes the old early printk. commit 3aed8c43267ebad70b5130d21155db6d9d7c8ebe Author: Nick Kossifidis Date: Sun Nov 18 02:06:56 2018 +0200 RISC-V: Update Kconfig to better handle CMDLINE Added a menu to choose how the built-in command line will be used and CMDLINE_EXTEND for compatibility with FDT code. v2: Improved help messages, removed references to bootloader and made them more descriptive. I also asked help from a friend who's a language expert just in case. v3: This time used the corrected text v4: Copy the config strings from the arm32 port. v5: Actually copy the config strings from the arm32 port. Signed-off-by: Nick Kossifidis Signed-off-by: Debbie Maliotaki Signed-off-by: Palmer Dabbelt commit 397182e0db56b8894a43631ce72de14d90a29834 Author: David Abdurachmanov Date: Thu Dec 6 11:26:26 2018 +0100 riscv: remove unused variable in ftrace Noticed while building kernel-4.20.0-0.rc5.git2.1.fc30 for Fedora 30/RISCV. [..] BUILDSTDERR: arch/riscv/kernel/ftrace.c: In function 'prepare_ftrace_return': BUILDSTDERR: arch/riscv/kernel/ftrace.c:135:6: warning: unused variable 'err' [-Wunused-variable] BUILDSTDERR: int err; BUILDSTDERR: ^~~ [..] Signed-off-by: David Abdurachmanov Fixes: e949b6db51dc1 ("riscv/function_graph: Simplify with function_graph_enter()") Reviewed-by: Olof Johansson Acked-by: Steven Rostedt (VMware) Signed-off-by: Palmer Dabbelt commit cd378dbb3dafbee16ef956d4101ede567f6ea2f7 Author: Yangtao Li Date: Tue Nov 20 09:11:02 2018 -0500 RISC-V: add of_node_put() use of_node_put() to release the refcount. Signed-off-by: Yangtao Li Signed-off-by: Palmer Dabbelt commit 94f9bf118f1e294b3f2092f8bde02860f5e3ea3f Author: Atish Patra Date: Tue Nov 20 15:07:50 2018 -0800 RISC-V: Fix of_node_* refcount Fix of_node* refcount at various places by using of_node_put. Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 8b699616f399b58071cda41e5a1125d8480ac982 Author: Andrea Parri Date: Sat Dec 1 01:01:56 2018 +0100 riscv, atomic: Add #define's for the atomic_{cmp,}xchg_*() variants If an architecture does not define the atomic_{cmp,}xchg_*() variants, the generic implementation defaults them to the fully-ordered version. riscv's had its own variants since "the beginning", but it never told (#define-d these for) the generic implementation: it is time to do so. Signed-off-by: Andrea Parri Acked-by: Peter Zijlstra (Intel) Signed-off-by: Palmer Dabbelt commit 3715917408f35395922d06a5a6868c278b0e5c17 Merge: fa2323325e8b0 6277053afa342 Author: David S. Miller Date: Fri Dec 21 08:00:27 2018 -0800 Merge tag 'mlx5-XDP-100Mpps' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-XDP-100Mpps This series from Tariq, mainly adds the support of mlx5 Multi Packet WQE (TX descriptor) - ConnectX-5 and above - for XDP TX, which allows us to overcome the 70Mpps PCIe bottleneck of conventional TX queues (single TX descriptor per packet), and achieve the 100Mpps milestone with the MPWQE approach. In the first five patches, Tariq did minor improvements to mlx5 tx path, for better debug-ability and code structuring. Next two patches lay down the foundation for MPWQE implementation to store the in-flight XDP TX information for multiple packets of one descriptor (WQE). Next: Support Enhanced Multi-Packet TX WQE for XDP In this patch we add support for the HW feature, which is supported starting from ConnectX-5. Performance: Tested packet rate for UDP 64Byte multi-stream over ConnectX-5 NICs. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz XDP_TX: We see a huge gain on single port ConnectX-5, and reach the 100 Mpps milestone. * Single-port HCA: Before: 70 Mpps After: 100 Mpps (+42.8%) * Dual-port HCA: Before: 51.7 Mpps After: 57.3 Mpps (+10.8%) * In both cases we tested traffic on one port and for now On Dual-port HCAs we see only a small gain, we are working to overcome this bottleneck, but for the moment only with experimental firmware on dual port HCAs we can reach the wanted numbers as seen on Single-port HCAs. XDP_REDIRECT: Redirect from (A) ConnectX-5 to (B) ConnectX-5. Due to a setup limitation, (A) and (B) are on different NUMA nodes, so absolute performance numbers are not optimal. - Note: Below is the transmit rate of (B), not the redirect rate of (A) which is in some cases higher. * (B) is single-port: Before: 77 Mpps After: 90 Mpps (+16.8%) * (B) is dual-port: Before: 61 Mpps After: 72 Mpps (+18%) Last patch adds a knob in mlx5 ethtool private flag to turn on/off XDP TX MPWQE. ==================== Signed-off-by: David S. Miller commit b239b4d65d6442fabd6db694f9d014268b8711c1 Author: Masahiro Yamada Date: Fri Dec 21 12:12:40 2018 +0900 firmware: remove unnecessary patterns from .gitignore Commit df85b2d767aa ("firmware: Restore support for built-in firmware") should not have restored this .gitignore blindly. *.gen.S is only pattern that should be ignored by git. Signed-off-by: Masahiro Yamada commit 2e5b2d7c408ed5fbe918b7409496b1acc84ff7bc Author: Christoph Hellwig Date: Thu Dec 20 18:36:20 2018 +0100 bsg: deprecate BIDI support in bsg Besides the OSD command set that never got traction, the only SCSI command using bidirectional buffers is XDWRITEREAD in the 10 and 32 byte variants, which is extremely esoteric and has been removed from the spec again as of SBC4r15. It probably doesn't make sense to keep the support code around just for that, so start deprecating the support. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6b4505352e4b1ee27faa97ae46b9baa8bc6a31f0 Author: Dennis Zhou Date: Wed Dec 19 16:43:53 2018 -0600 blkcg: remove unused __blkg_release_rcu() An earlier commit 7fcf2b033b84 ("blkcg: change blkg reference counting to use percpu_ref") moved around the release call from blkg_put() to be a part of the percpu_ref cleanup. Remove the additional unused code which should have been removed earlier. Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 6ab2187992f4b0112852e5a097a2b6c7d167e2e5 Author: Dennis Zhou Date: Wed Dec 19 16:43:21 2018 -0600 blkcg: clean up blkg_tryget_closest() The implementation of blkg_tryget_closest() wasn't super obvious and became a point of suspicion when debugging [1]. So let's clean it up so it's obviously not the problem. Also add missing RCU read locking to bio_clone_blkg_association(), which got exposed by adding the RCU read lock held check in blkg_tryget_closest(). [1] https://lore.kernel.org/linux-block/a7e97e4b-0dd8-3a54-23b7-a0f27b17fde8@kernel.dk/ Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 4b2c01ad902ec02fa962b233decd2f14be3714ba Author: Jörgen Storvist Date: Fri Dec 21 14:40:44 2018 +0100 USB: serial: option: add Fibocom NL678 series Added USB serial option driver support for Fibocom NL678 series cellular module: VID 2cb7 and PIDs 0x0104 and 0x0105. Reserved network and ADB interfaces. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0104 Rev=03.10 S: Manufacturer=Fibocom S: Product=Fibocom NL678-E Modem S: SerialNumber=12345678 C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=0105 Rev=03.10 S: Manufacturer=Fibocom S: Product=Fibocom NL678-E Modem S: SerialNumber=12345678 C: #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) Signed-off-by: Jörgen Storvist Cc: stable Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman commit cd6a22310ec2a70092e136d0cd65bb77c1502521 Merge: 1e12a521d6917 177c459b08a34 Author: Greg Kroah-Hartman Date: Fri Dec 21 16:46:08 2018 +0100 Merge USB 4.20-rc8 mergepoint into usb-next We need the USB changes in here for additional patches to be able to apply cleanly. Signed-off-by: Greg Kroah-Hartman commit 3c78c77bafb18bbbd22f6bda6f508699431ceb11 Author: Masahiro Yamada Date: Fri Dec 21 12:12:39 2018 +0900 scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore Commit c512d2544c68 ("gitignore: ignore scripts/ihex2fw") was unneeded. ihex2fw was generated in firmware/ instead of scripts/ at that time although ihex2fw.c was pushed back and forth between those directories in the past. check-lc_ctype was removed by commit cb43fb5775df ("docs: remove DocBook from the building system"). Signed-off-by: Masahiro Yamada commit 733f4ef46d3ea31e44cebfec851528089a783f0f Author: Masahiro Yamada Date: Thu Dec 20 18:27:26 2018 +0900 um: remove unused filechk_gen_header in Makefile This is a leftover of commit ecba97d4aacf ("[PATCH] uml makefiles sanitized"). Signed-off-by: Masahiro Yamada commit 4b31a32caf0a28e4726f1bf267ff8a804ed864e2 Author: Masahiro Yamada Date: Tue Dec 11 20:01:09 2018 +0900 kconfig: update current_pos in the second lexer To simplify the generated lexer, let the hand-made lexer update the file name and line number for the parser. I tested this with DEBUG_PARSE, and confirmed the same file names and line numbers were dumped. Signed-off-by: Masahiro Yamada commit 824fa3b3b5e3647de0530328e8734c24418eec49 Author: Masahiro Yamada Date: Tue Dec 11 20:01:08 2018 +0900 kconfig: switch to ASSIGN_VAL state in the second lexer To simplify the generated lexer, switch to the ASSIGN_VAL state in the hand-made lexer. Signed-off-by: Masahiro Yamada commit b3d1d9d3c36214a50c18ba377b47152c021768df Author: Masahiro Yamada Date: Tue Dec 11 20:01:07 2018 +0900 kconfig: stop associating kconf_id with yylval The lexer has conventionally associated kconf_id data with yylval to carry additional information to the parser. No token is relying on this any more. Signed-off-by: Masahiro Yamada commit caaebb3c6de3493c7f11f79a5dddc6691a40e55f Author: Masahiro Yamada Date: Tue Dec 11 20:01:06 2018 +0900 kconfig: refactor end token rules T_ENDMENU, T_ENDCHOICE, T_ENDIF are the last users of kconf_id associated with yylval. Refactor them to not use it. Signed-off-by: Masahiro Yamada commit f5451582c4e22ce8912aae4950810f3598c9b516 Author: Masahiro Yamada Date: Tue Dec 11 20:01:05 2018 +0900 kconfig: stop supporting '.' and '/' in unquoted words In my understanding, special characters such as '.' and '/' are supported in unquoted words to use bare file paths in the "source" statement. With the previous commit surrounding all file paths with double quotes, we can drop this. Signed-off-by: Masahiro Yamada commit 8636a1f9677db4f883f29a072f401303acfc2edd Author: Masahiro Yamada Date: Tue Dec 11 20:01:04 2018 +0900 treewide: surround Kconfig file paths with double quotes The Kconfig lexer supports special characters such as '.' and '/' in the parameter context. In my understanding, the reason is just to support bare file paths in the source statement. I do not see a good reason to complicate Kconfig for the room of ambiguity. The majority of code already surrounds file paths with double quotes, and it makes sense since file paths are constant string literals. Make it treewide consistent now. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang Acked-by: Geert Uytterhoeven Acked-by: Ingo Molnar commit 48547bd23d0eeb2cf3a63ed588b46236eac5f2c3 Author: Masahiro Yamada Date: Tue Dec 11 20:01:03 2018 +0900 microblaze: surround string default in Kconfig with double quotes I guess this is a constant value instead of a symbol. Signed-off-by: Masahiro Yamada Acked-by: Michal Simek commit 171a515d080327b861d5e5fc9bbfa77f10cfddd7 Author: Masahiro Yamada Date: Tue Dec 11 20:01:02 2018 +0900 kconfig: use T_WORD instead of T_VARIABLE for variables There is no grammatical ambiguity by using T_WORD for variables. The parser can distinguish variables from symbols from the context. Signed-off-by: Masahiro Yamada commit c3d228713b10e6dd1bd44853168cec8e23ae7e0f Author: Masahiro Yamada Date: Tue Dec 11 20:01:01 2018 +0900 kconfig: use specific tokens instead of T_ASSIGN for assignments Currently, the lexer returns T_ASSIGN for all of =, :=, and += associating yylval with the flavor. I want to make the generated lexer as simple as possible. So, the lexer should convert keywords to tokens without thinking about the meaning. = -> T_EQUAL := -> T_COLON_EQUAL += -> T_PLUS_EQUAL Unfortunately, Kconfig uses = instead of == for the equal operator. So, the same token T_EQUAL is used for assignment and comparison. The parser can still distinguish them from the context. Signed-off-by: Masahiro Yamada commit ce2164ab58316e27180034112f97608a764f5b37 Author: Masahiro Yamada Date: Tue Dec 11 20:01:00 2018 +0900 kconfig: refactor scanning and parsing "option" properties For the keywords "modules", "defconfig_list", and "allnoconfig_y", the lexer should pass specific tokens instead of generic T_WORD. This simplifies both the lexer and the parser. Signed-off-by: Masahiro Yamada commit 3c8f317d4cf15e7a67457cfdd1e63182a34bcb69 Author: Masahiro Yamada Date: Tue Dec 11 20:00:59 2018 +0900 kconfig: use distinct tokens for type and default properties This commit removes kconf_id::stype to prepare for the entire removal of kconf_id.c To simplify the lexer, I want keywords straight-mapped to tokens. Signed-off-by: Masahiro Yamada commit 745d51dc8a29e00e9ba14e090aa3c8a41e7221d9 Author: Yangtao Li Date: Thu Nov 22 07:39:24 2018 -0500 ata: pata_macio: add of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. This place doesn't do that, so fix it. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Yangtao Li Signed-off-by: Jens Axboe commit c3b5725965228014215de553eed3492dbd80a4bd Merge: b27d9668be60d 8ff00ba79283e Author: Mark Brown Date: Fri Dec 21 13:43:35 2018 +0000 Merge remote-tracking branch 'regulator/topic/coupled' into regulator-next commit b27d9668be60d42904b71ab1a9e4d152c7b5c920 Merge: 67a2ab931e9f7 cd07e3701fa6a Author: Mark Brown Date: Fri Dec 21 13:43:32 2018 +0000 Merge branch 'regulator-4.21' into regulator-next commit 67a2ab931e9f79f516566e69c92e566b71fb20d1 Merge: 7566ec393f416 2bb1666369339 Author: Mark Brown Date: Fri Dec 21 13:43:30 2018 +0000 Merge branch 'regulator-4.20' into regulator-linus commit a0aea130afebcd091d5396d13f25b9da24c9144a Author: Robert Hoo Date: Wed Dec 19 21:51:43 2018 +0800 KVM: x86: Add CPUID support for new instruction WBNOINVD Signed-off-by: Robert Hoo Signed-off-by: Paolo Bonzini commit 642fb53d350b3ff6a8c85062fcab271d61a56b75 Merge: da801ab56ad87 f83f97684a737 Author: Linus Walleij Date: Fri Dec 21 14:24:59 2018 +0100 Merge tag 'sh-pfc-for-v4.21-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Fixes for v4.21 - Miscellaneous fixes, - Build-time validation for pins/marks mismatches. commit 57d5edfe640edaaece9208cdbd7f464d255785cd Author: Andrew Jones Date: Fri Dec 21 12:22:22 2018 +0100 kvm: selftests: ucall: fix exit mmio address guessing Fix two more bugs in the exit_mmio address guessing. The first bug was that the start and step calculations were wrong since they were dividing the number of address bits instead of the address space. The second other bug was that the guessing algorithm wasn't considering the valid physical and virtual address ranges correctly for an identity map. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini commit b9b6a2ea2baf69204a6e5f311e0d24fe3b956f2e Author: Arnaldo Carvalho de Melo Date: Wed Dec 19 18:54:36 2018 -0300 perf trace: Do not hardcode the size of the tracepoint common_ fields We shouldn't hardcode the size of the tracepoint common_ fields, use the offset of the 'id'/'__syscallnr' field in the sys_enter event instead. This caused the augmented syscalls code to fail on a particular build of a PREEMPT_RT_FULL kernel where these extra 'common_migrate_disable' and 'common_padding' fields were before the syscall id one: # cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/format name: sys_enter ID: 22 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:unsigned short common_migrate_disable; offset:8; size:2; signed:0; field:unsigned short common_padding; offset:10; size:2; signed:0; field:long id; offset:16; size:8; signed:1; field:unsigned long args[6]; offset:24; size:48; signed:0; print fmt: "NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)", REC->id, REC->args[0], REC->args[1], REC->args[2], REC->args[3], REC->args[4], REC->args[5] # All those 'common_' prefixed fields are zeroed when they hit a BPF tracepoint hook, we better just discard those, i.e. somehow pass an offset to the BPF program from the start of the ctx and make adjustments in the 'perf trace' handlers to adjust the offset of the syscall arg offsets obtained from tracefs. Till then, fix it the quick way and add this to the augmented_raw_syscalls.c to bet it to work in such kernels: diff --git a/tools/perf/examples/bpf/augmented_raw_syscalls.c b/tools/perf/examples/bpf/augmented_raw_syscalls.c index 53c233370fae..1f746f931e13 100644 --- a/tools/perf/examples/bpf/augmented_raw_syscalls.c +++ b/tools/perf/examples/bpf/augmented_raw_syscalls.c @@ -38,12 +38,14 @@ struct bpf_map SEC("maps") syscalls = { struct syscall_enter_args { unsigned long long common_tp_fields; + long rt_common_tp_fields; long syscall_nr; unsigned long args[6]; }; struct syscall_exit_args { unsigned long long common_tp_fields; + long rt_common_tp_fields; long syscall_nr; long ret; }; Just to check that this was the case. Fix it properly later, for now remove the hardcoding of the offset in the 'perf trace' side and document the situation with this patch. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-2pqavrktqkliu5b9nzouio21@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 14541b1e7e723859ff2c75c6fc10cdbbec6b8c34 Author: Stanislav Fomichev Date: Thu Nov 15 16:32:01 2018 -0800 perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz Current libbfd feature test unconditionally links against -liberty and -lz. While it's required on some systems (e.g. opensuse), it's completely unnecessary on the others, where only -lbdf is sufficient (debian). This patch streamlines (and renames) the following feature checks: feature-libbfd - only link against -lbfd (debian), see commit 2cf9040714f3 ("perf tools: Fix bfd dependency libraries detection") feature-libbfd-liberty - link against -lbfd and -liberty feature-libbfd-liberty-z - link against -lbfd, -liberty and -lz (opensuse), see commit 280e7c48c3b8 ("perf tools: fix BFD detection on opensuse") (feature-liberty{,-z} were renamed to feature-libbfd-liberty{,z} for clarity) The main motivation is to fix this feature test for bpftool which is currently broken on debian (libbfd feature shows OFF, but we still unconditionally link against -lbfd and it works). Tested on debian with only -lbfd installed (without -liberty); I'd appreciate if somebody on the other systems can test this new detection method. Signed-off-by: Stanislav Fomichev Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/4dfc634cfcfb236883971b5107cf3c28ec8a31be.1542328222.git.sdf@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ce29d522e9b8cdc158329a8539bcd6206fc5bf4 Author: Arnaldo Carvalho de Melo Date: Wed Dec 19 10:10:51 2018 -0300 perf beauty mmap: PROT_WRITE should come before PROT_EXEC To match strace output: # cat mmap.c #include int main(void) { mmap(0, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); return 0; } # strace -e mmap ./mmap |& grep -v ^+++ mmap(NULL, 103484, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5bae400000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5bae3fe000 mmap(NULL, 3889792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5bade40000 mmap(0x7f5bae1ec000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ac000) = 0x7f5bae1ec000 mmap(0x7f5bae1f2000, 14976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5bae1f2000 mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5bae419000 # trace -e mmap ./mmap |& grep -v ^+++ mmap(NULL, 103484, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6646c25000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS) = 0x7f6646c23000 mmap(NULL, 3889792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6646665000 mmap(0x7f6646a11000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ac000) = 0x7f6646a11000 mmap(0x7f6646a17000, 14976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS) = 0x7f6646a17000 mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS) = 0x7f6646c3e000 # Reported-by: Namhyung Kim Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-nt49d6iqle80cw8f529ovaqi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f76214f93783f9f902954cf6e57fd818c4bffe29 Author: Arnaldo Carvalho de Melo Date: Wed Dec 19 10:01:20 2018 -0300 perf trace: Check if the raw_syscalls:sys_{enter,exit} are setup before setting tp filter While updating 'perf trace' on an machine with an old precompiled augmented_raw_syscalls.o that didn't setup the syscall map the new 'perf trace' codebase notices the augmented_raw_syscalls.o eBPF event, decides to use it instead of the old raw_syscalls:sys_{enter,exit} method, but then because we don't have the syscall map tries to set the tracepoint filter on the sys_{enter,exit} evsels, that are NULL, segfaulting. Make the code more robust by checking it those tracepoints have their respective evsels in place before trying to set the tp filter. With this we still get everything to work, just not setting up the syscall filters, which is better than a segfault. Now to update the precompiled augmented_raw_syscalls.o and continue development :-) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-3ft5rjdl05wgz2pwpx2z8btu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2bcbd406715dca256912b9c5ae449c7968f15705 Author: Sean Christopherson Date: Thu Dec 20 12:25:18 2018 -0800 Revert "compiler-gcc: disable -ftracer for __noclone functions" The -ftracer optimization was disabled in __noclone as a workaround to GCC duplicating a blob of inline assembly that happened to define a global variable. It has been pointed out that no amount of workarounds can guarantee the compiler won't duplicate inline assembly[1], and that disabling the -ftracer optimization has several unintended and nasty side effects[2][3]. Now that the offending KVM code which required the workaround has been properly fixed and no longer uses __noclone, remove the -ftracer optimization tweak from __noclone. [1] https://lore.kernel.org/lkml/ri6y38lo23g.fsf@suse.cz/T/#u [2] https://lore.kernel.org/lkml/20181218140105.ajuiglkpvstt3qxs@treble/T/#u [3] https://patchwork.kernel.org/patch/8707981/#21817015 This reverts commit 95272c29378ee7dc15f43fa2758cb28a5913a06d. Suggested-by: Andi Kleen Cc: Paolo Bonzini Cc: Nadav Amit Cc: Andi Kleen Cc: Josh Poimboeuf Cc: Martin Jambor Cc: Arnd Bergmann Cc: Steven Rostedt Cc: Miroslav Benes Signed-off-by: Sean Christopherson Reviewed-by: Andi Kleen Reviewed-by: Miguel Ojeda Signed-off-by: Paolo Bonzini commit cd07e3701fa6a4c68f8493ee1d12caa18d46ec6a Author: Kangjie Lu Date: Fri Dec 21 00:29:19 2018 -0600 regulator: tps65910: fix a missing check of return value tps65910_reg_set_bits() may fail. The fix checks if it fails, and if so, returns with its error code. Signed-off-by: Kangjie Lu Signed-off-by: Mark Brown commit 453eafbe65f72c04fc7c74c5c95c04e78e907dfb Author: Sean Christopherson Date: Thu Dec 20 12:25:17 2018 -0800 KVM: VMX: Move VM-Enter + VM-Exit handling to non-inline sub-routines Transitioning to/from a VMX guest requires KVM to manually save/load the bulk of CPU state that the guest is allowed to direclty access, e.g. XSAVE state, CR2, GPRs, etc... For obvious reasons, loading the guest's GPR snapshot prior to VM-Enter and saving the snapshot after VM-Exit is done via handcoded assembly. The assembly blob is written as inline asm so that it can easily access KVM-defined structs that are used to hold guest state, e.g. moving the blob to a standalone assembly file would require generating defines for struct offsets. The other relevant aspect of VMX transitions in KVM is the handling of VM-Exits. KVM doesn't employ a separate VM-Exit handler per se, but rather treats the VMX transition as a mega instruction (with many side effects), i.e. sets the VMCS.HOST_RIP to a label immediately following VMLAUNCH/VMRESUME. The label is then exposed to C code via a global variable definition in the inline assembly. Because of the global variable, KVM takes steps to (attempt to) ensure only a single instance of the owning C function, e.g. vmx_vcpu_run, is generated by the compiler. The earliest approach placed the inline assembly in a separate noinline function[1]. Later, the assembly was folded back into vmx_vcpu_run() and tagged with __noclone[2][3], which is still used today. After moving to __noclone, an edge case was encountered where GCC's -ftracer optimization resulted in the inline assembly blob being duplicated. This was "fixed" by explicitly disabling -ftracer in the __noclone definition[4]. Recently, it was found that disabling -ftracer causes build warnings for unsuspecting users of __noclone[5], and more importantly for KVM, prevents the compiler for properly optimizing vmx_vcpu_run()[6]. And perhaps most importantly of all, it was pointed out that there is no way to prevent duplication of a function with 100% reliability[7], i.e. more edge cases may be encountered in the future. So to summarize, the only way to prevent the compiler from duplicating the global variable definition is to move the variable out of inline assembly, which has been suggested several times over[1][7][8]. Resolve the aforementioned issues by moving the VMLAUNCH+VRESUME and VM-Exit "handler" to standalone assembly sub-routines. Moving only the core VMX transition codes allows the struct indexing to remain as inline assembly and also allows the sub-routines to be used by nested_vmx_check_vmentry_hw(). Reusing the sub-routines has a happy side-effect of eliminating two VMWRITEs in the nested_early_check path as there is no longer a need to dynamically change VMCS.HOST_RIP. Note that callers to vmx_vmenter() must account for the CALL modifying RSP, e.g. must subtract op-size from RSP when synchronizing RSP with VMCS.HOST_RSP and "restore" RSP prior to the CALL. There are no great alternatives to fudging RSP. Saving RSP in vmx_enter() is difficult because doing so requires a second register (VMWRITE does not provide an immediate encoding for the VMCS field and KVM supports Hyper-V's memory-based eVMCS ABI). The other more drastic alternative would be to use eschew VMCS.HOST_RSP and manually save/load RSP using a per-cpu variable (which can be encoded as e.g. gs:[imm]). But because a valid stack is needed at the time of VM-Exit (NMIs aren't blocked and a user could theoretically insert INT3/INT1ICEBRK at the VM-Exit handler), a dedicated per-cpu VM-Exit stack would be required. A dedicated stack isn't difficult to implement, but it would require at least one page per CPU and knowledge of the stack in the dumpstack routines. And in most cases there is essentially zero overhead in dynamically updating VMCS.HOST_RSP, e.g. the VMWRITE can be avoided for all but the first VMLAUNCH unless nested_early_check=1, which is not a fast path. In other words, avoiding the VMCS.HOST_RSP by using a dedicated stack would only make the code marginally less ugly while requiring at least one page per CPU and forcing the kernel to be aware (and approve) of the VM-Exit stack shenanigans. [1] cea15c24ca39 ("KVM: Move KVM context switch into own function") [2] a3b5ba49a8c5 ("KVM: VMX: add the __noclone attribute to vmx_vcpu_run") [3] 104f226bfd0a ("KVM: VMX: Fold __vmx_vcpu_run() into vmx_vcpu_run()") [4] 95272c29378e ("compiler-gcc: disable -ftracer for __noclone functions") [5] https://lkml.kernel.org/r/20181218140105.ajuiglkpvstt3qxs@treble [6] https://patchwork.kernel.org/patch/8707981/#21817015 [7] https://lkml.kernel.org/r/ri6y38lo23g.fsf@suse.cz [8] https://lkml.kernel.org/r/20181218212042.GE25620@tassilo.jf.intel.com Suggested-by: Andi Kleen Suggested-by: Martin Jambor Cc: Paolo Bonzini Cc: Nadav Amit Cc: Andi Kleen Cc: Josh Poimboeuf Cc: Martin Jambor Cc: Arnd Bergmann Cc: Steven Rostedt Cc: Miroslav Benes Signed-off-by: Sean Christopherson Reviewed-by: Andi Kleen Signed-off-by: Paolo Bonzini commit 051a2d3e59e51ae49fd56aef34e472832897ce46 Author: Sean Christopherson Date: Thu Dec 20 12:25:16 2018 -0800 KVM: VMX: Explicitly reference RCX as the vmx_vcpu pointer in asm blobs Use '%% " _ASM_CX"' instead of '%0' to dereference RCX, i.e. the 'struct vcpu_vmx' pointer, in the VM-Enter asm blobs of vmx_vcpu_run() and nested_vmx_check_vmentry_hw(). Using the symbolic name means that adding/removing an output parameter(s) requires "rewriting" almost all of the asm blob, which makes it nearly impossible to understand what's being changed in even the most minor patches. Opportunistically improve the code comments. Signed-off-by: Sean Christopherson Reviewed-by: Andi Kleen Signed-off-by: Paolo Bonzini commit 77ea906082dcfa63ad8a07ace6d5033d30c4175b Author: Axel Lin Date: Fri Dec 21 10:49:29 2018 +0800 regulator: mcp16502: Select REGMAP_I2C to fix build error Fix build error when CONFIG_REGMAP_I2C=m && CONFIG_REGULATOR_MCP16502=y. drivers/regulator/mcp16502.o: In function `mcp16502_probe': mcp16502.c:(.text+0xca): undefined reference to `__devm_regmap_init_i2c' Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit da801ab56ad874897b0b255216767c983e665a4c Author: Alexandre Belloni Date: Thu Dec 20 15:44:31 2018 +0100 pinctrl: ocelot: add MSCC Jaguar2 support Jaguar2 has the same register layout as Ocelot but it has 64 pins, meaning that there are 2 registers instead of one. Signed-off-by: Alexandre Belloni Signed-off-by: Linus Walleij commit c6ad45973380af5ef43b708a54d7475d93f86638 Merge: e81434995081f ae59a7e1945bc Author: Paolo Bonzini Date: Fri Dec 21 11:48:41 2018 +0100 Merge tag 'kvm-ppc-next-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-next Second PPC KVM update for 4.21 This has 5 commits that fix page dirty tracking when running nested HV KVM guests, from Suraj Jitindar Singh. commit e81434995081fd7efb755fd75576b35dbb0850b1 Author: Sean Christopherson Date: Thu Dec 20 14:21:08 2018 -0800 KVM: x86: Use jmp to invoke kvm_spurious_fault() from .fixup ____kvm_handle_fault_on_reboot() provides a generic exception fixup handler that is used to cleanly handle faults on VMX/SVM instructions during reboot (or at least try to). If there isn't a reboot in progress, ____kvm_handle_fault_on_reboot() treats any exception as fatal to KVM and invokes kvm_spurious_fault(), which in turn generates a BUG() to get a stack trace and die. When it was originally added by commit 4ecac3fd6dc2 ("KVM: Handle virtualization instruction #UD faults during reboot"), the "call" to kvm_spurious_fault() was handcoded as PUSH+JMP, where the PUSH'd value is the RIP of the faulting instructing. The PUSH+JMP trickery is necessary because the exception fixup handler code lies outside of its associated function, e.g. right after the function. An actual CALL from the .fixup code would show a slightly bogus stack trace, e.g. an extra "random" function would be inserted into the trace, as the return RIP on the stack would point to no known function (and the unwinder will likely try to guess who owns the RIP). Unfortunately, the JMP was replaced with a CALL when the macro was reworked to not spin indefinitely during reboot (commit b7c4145ba2eb "KVM: Don't spin on virt instruction faults during reboot"). This causes the aforementioned behavior where a bogus function is inserted into the stack trace, e.g. my builds like to blame free_kvm_area(). Revert the CALL back to a JMP. The changelog for commit b7c4145ba2eb ("KVM: Don't spin on virt instruction faults during reboot") contains nothing that indicates the switch to CALL was deliberate. This is backed up by the fact that the PUSH was left intact. Note that an alternative to the PUSH+JMP magic would be to JMP back to the "real" code and CALL from there, but that would require adding a JMP in the non-faulting path to avoid calling kvm_spurious_fault() and would add no value, i.e. the stack trace would be the same. Using CALL: ------------[ cut here ]------------ kernel BUG at /home/sean/go/src/kernel.org/linux/arch/x86/kvm/x86.c:356! invalid opcode: 0000 [#1] SMP CPU: 4 PID: 1057 Comm: qemu-system-x86 Not tainted 4.20.0-rc6+ #75 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_spurious_fault+0x5/0x10 [kvm] Code: <0f> 0b 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 49 89 fd 41 RSP: 0018:ffffc900004bbcc8 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffffffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888273fd8000 R08: 00000000000003e8 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000784 R12: ffffc90000371fb0 R13: 0000000000000000 R14: 000000026d763cf4 R15: ffff888273fd8000 FS: 00007f3d69691700(0000) GS:ffff888277800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f89bc56fe0 CR3: 0000000271a5a001 CR4: 0000000000362ee0 Call Trace: free_kvm_area+0x1044/0x43ea [kvm_intel] ? vmx_vcpu_run+0x156/0x630 [kvm_intel] ? kvm_arch_vcpu_ioctl_run+0x447/0x1a40 [kvm] ? kvm_vcpu_ioctl+0x368/0x5c0 [kvm] ? kvm_vcpu_ioctl+0x368/0x5c0 [kvm] ? __set_task_blocked+0x38/0x90 ? __set_current_blocked+0x50/0x60 ? __fpu__restore_sig+0x97/0x490 ? do_vfs_ioctl+0xa1/0x620 ? __x64_sys_futex+0x89/0x180 ? ksys_ioctl+0x66/0x70 ? __x64_sys_ioctl+0x16/0x20 ? do_syscall_64+0x4f/0x100 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 Modules linked in: vhost_net vhost tap kvm_intel kvm irqbypass bridge stp llc ---[ end trace 9775b14b123b1713 ]--- Using JMP: ------------[ cut here ]------------ kernel BUG at /home/sean/go/src/kernel.org/linux/arch/x86/kvm/x86.c:356! invalid opcode: 0000 [#1] SMP CPU: 6 PID: 1067 Comm: qemu-system-x86 Not tainted 4.20.0-rc6+ #75 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_spurious_fault+0x5/0x10 [kvm] Code: <0f> 0b 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 49 89 fd 41 RSP: 0018:ffffc90000497cd0 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffffffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff88827058bd40 R08: 00000000000003e8 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000784 R12: ffffc90000369fb0 R13: 0000000000000000 R14: 00000003c8fc6642 R15: ffff88827058bd40 FS: 00007f3d7219e700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3d64001000 CR3: 0000000271c6b004 CR4: 0000000000362ee0 Call Trace: vmx_vcpu_run+0x156/0x630 [kvm_intel] ? kvm_arch_vcpu_ioctl_run+0x447/0x1a40 [kvm] ? kvm_vcpu_ioctl+0x368/0x5c0 [kvm] ? kvm_vcpu_ioctl+0x368/0x5c0 [kvm] ? __set_task_blocked+0x38/0x90 ? __set_current_blocked+0x50/0x60 ? __fpu__restore_sig+0x97/0x490 ? do_vfs_ioctl+0xa1/0x620 ? __x64_sys_futex+0x89/0x180 ? ksys_ioctl+0x66/0x70 ? __x64_sys_ioctl+0x16/0x20 ? do_syscall_64+0x4f/0x100 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 Modules linked in: vhost_net vhost tap kvm_intel kvm irqbypass bridge stp llc ---[ end trace f9daedb85ab3ddba ]--- Fixes: b7c4145ba2eb ("KVM: Don't spin on virt instruction faults during reboot") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c2a7fad5fcd3267899803f07878f9f4ff719a120 Author: Sean Christopherson Date: Thu Dec 20 12:53:20 2018 -0800 MAINTAINERS: Add arch/x86/kvm sub-directories to existing KVM/x86 entry A series currently sitting in KVM's queue for 4.21 moves the bulk of KVM's VMX code to a dedicated VMX sub-directory[1]. As a result, get_maintainers.pl doesn't get any hits on the newly relocated VMX files when the script is run with --pattern-depth=1. Add all arch/x86/kvm sub-directories to the existing MAINTAINERS entry for KVM/x86 instead of arch/x86/kvm/vmx as other code, e.g. SVM, may get similar treatment in the near future. [1] https://patchwork.kernel.org/cover/10710751/ Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a49d784d5a8272d0f63c448fe8dc69e589db006e Author: Rafał Miłecki Date: Tue Dec 18 16:58:08 2018 +0100 pinctrl: bcm: ns: support updated DT binding as syscon subnode Documentation has been recently updated specifying that pinctrl should be subnode of the CRU "syscon". Support that by using parent node for regmap and reading "offset" property from the DT. Signed-off-by: Rafał Miłecki Signed-off-by: Linus Walleij commit 2ae80900f239484069569380e1fc4340fd6e0089 Author: Rafał Miłecki Date: Tue Dec 18 16:57:44 2018 +0100 dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon As pointed by Rob, CRU is a kind of block that can't be guaranteed to have everything exposed as subnodes. It's a set of various registers that aren't tied to any single device. It could be described much more accurately as MFD (Multi-Function Device). Some hardware blocks may indeed want to access a register or two of the CRU which requires describing it as the "syscon". While at it replace exmple node name with the standard "pinctrl" (also pointed out by Rob). Signed-off-by: Rafał Miłecki Signed-off-by: Linus Walleij commit 72ab2f76319e15f7ad1f9d5f529df47099d4d271 Author: Jan Kotas Date: Tue Dec 18 16:10:42 2018 +0000 gpio: Add Cadence GPIO driver This patch adds a driver for Cadence GPIO controller. It can be enabled with GPIO_CADENCE Kconfig option. It uses generic GPIO infrastructure and works as an interrupt controller. At the moment it only supports level sensitive irqs. Signed-off-by: Jan Kotas Signed-off-by: Linus Walleij commit e4b194aa0bf522dad9ecf0568eb0fdd598a2713b Author: Jan Kotas Date: Tue Dec 18 16:10:41 2018 +0000 dt-bindings: gpio: Add bindings for Cadence GPIO This patch adds a DT binding documentation for Cadence GPIO controller. Signed-off-by: Jan Kotas Reviewed-by: Rob Herring [Removed interrupt-parent] Signed-off-by: Linus Walleij commit 6c905f91d8ae103cc0767267509a456f961a279d Author: Colin Ian King Date: Tue Dec 18 12:28:02 2018 +0000 gpiolib-acpi: remove unused variable 'err', cleans up build warning Variable err is defined but never used. Remove it. Cleans up warning: warning: unused variable ‘err’ [-Wunused-variable] Signed-off-by: Colin Ian King Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit f0df462f3ae1d10131f8ff7daa016ce1a8686727 Author: Uwe Kleine-König Date: Tue Dec 18 09:47:57 2018 +0100 gpio: mxs: read pin level directly instead of using .get Calling readl directly instead of going through another function that results in the same result to remove some overhead. I didn't try to measure the performance gain, but IMHO there is little benefit from abstracting a GPIO register access in the GPIO driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij commit ac5ffda2447f033ddc44a87882dfcfed38d944dc Author: Uros Bizjak Date: Mon Nov 26 17:00:08 2018 +0100 KVM/x86: Use SVM assembly instruction mnemonics instead of .byte streams Recently the minimum required version of binutils was changed to 2.20, which supports all SVM instruction mnemonics. The patch removes all .byte #defines and uses real instruction mnemonics instead. Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini commit 71883a62fcd6c70639fa12cda733378b4d997409 Author: Lan Tianyu Date: Thu Dec 6 21:21:13 2018 +0800 KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range() Originally, flush tlb is done by slot_handle_level_range(). This patch moves the flush directly to kvm_zap_gfn_range() when range flush is available, so that only the requested range can be flushed. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 3cc5ea94de5f71dff0d3353f610e729308583e6b Author: Lan Tianyu Date: Thu Dec 6 21:21:12 2018 +0800 KVM/MMU: Flush tlb directly in kvm_set_pte_rmapp() This patch is to flush tlb directly in kvm_set_pte_rmapp() function when Hyper-V remote TLB flush is available, returning 0 so that kvm_mmu_notifier_change_pte() does not flush again. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 0cf853c5e238edf503ebda2fe541e6f4a3d5bd40 Author: Lan Tianyu Date: Thu Dec 6 21:21:11 2018 +0800 KVM/MMU: Move tlb flush in kvm_set_pte_rmapp() to kvm_mmu_notifier_change_pte() This patch is to move tlb flush in kvm_set_pte_rmapp() to kvm_mmu_notifier_change_pte() in order to avoid redundant tlb flush. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 748c0e312fce983bd7854b369b192e24dce90878 Author: Lan Tianyu Date: Thu Dec 6 21:21:10 2018 +0800 KVM: Make kvm_set_spte_hva() return int The patch is to make kvm_set_spte_hva() return int and caller can check return value to determine flush tlb or not. Signed-off-by: Lan Tianyu Acked-by: Paul Mackerras Signed-off-by: Paolo Bonzini commit c3134ce240eed2eaa9703579ef99c3099665236e Author: Lan Tianyu Date: Thu Dec 6 21:21:09 2018 +0800 KVM: Replace old tlb flush function with new one to flush a specified range. This patch is to replace kvm_flush_remote_tlbs() with kvm_flush_ remote_tlbs_with_address() in some functions without logic change. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 40ef75a758b291dc2cc88ecef36ffbb0eb095e00 Author: Lan Tianyu Date: Thu Dec 6 21:21:08 2018 +0800 KVM/MMU: Add tlb flush with range helper function This patch is to add wrapper functions for tlb_remote_flush_with_range callback and flush tlb directly in kvm_mmu_zap_collapsible_spte(). kvm_mmu_zap_collapsible_spte() returns flush request to the slot_handle_leaf() and the latter does flush on demand. When range flush is available, make kvm_mmu_zap_collapsible_spte() to flush tlb with range directly to avoid returning range back to slot_handle_leaf(). Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit 1f3a3e46cc49e81ab84d32710d3dae30697753a5 Author: Lan Tianyu Date: Thu Dec 6 21:21:07 2018 +0800 KVM/VMX: Add hv tlb range flush support This patch is to register tlb_remote_flush_with_range callback with hv tlb range flush interface. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit cc4edae4b924b39877b5abb25074065930c5a6d5 Author: Lan Tianyu Date: Thu Dec 6 21:21:05 2018 +0800 x86/hyper-v: Add HvFlushGuestAddressList hypercall support Hyper-V provides HvFlushGuestAddressList() hypercall to flush EPT tlb with specified ranges. This patch is to add the hypercall support. Reviewed-by: Michael Kelley Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit a49b96352e68368c2e6784d13b0b4b7b8d830922 Author: Lan Tianyu Date: Thu Dec 6 21:21:04 2018 +0800 KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops Add flush range call back in the kvm_x86_ops and platform can use it to register its associated function. The parameter "kvm_tlb_range" accepts a single range and flush list which contains a list of ranges. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit ee85dec2fe9c860c40f6e2e1d53052b80f36cd58 Author: Luwei Kang Date: Wed Oct 24 16:05:16 2018 +0800 KVM: x86: Disable Intel PT when VMXON in L1 guest Currently, Intel Processor Trace do not support tracing in L1 guest VMX operation(IA32_VMX_MISC[bit 14] is 0). As mentioned in SDM, on these type of processors, execution of the VMXON instruction will clears IA32_RTIT_CTL.TraceEn and any attempt to write IA32_RTIT_CTL causes a general-protection exception (#GP). Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit b08c28960f254bd246af8e30a468dfc7dd56e03b Author: Chao Peng Date: Wed Oct 24 16:05:15 2018 +0800 KVM: x86: Set intercept for Intel PT MSRs read/write To save performance overhead, disable intercept Intel PT MSRs read/write when Intel PT is enabled in guest. MSR_IA32_RTIT_CTL is an exception that will always be intercepted. Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit bf8c55d8dc094c85a3f98cd302a4dddb720dd63f Author: Chao Peng Date: Wed Oct 24 16:05:14 2018 +0800 KVM: x86: Implement Intel PT MSRs read/write emulation This patch implement Intel Processor Trace MSRs read/write emulation. Intel PT MSRs read/write need to be emulated when Intel PT MSRs is intercepted in guest and during live migration. Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 6c0f0bba85a0de83b32ff8ccf3e5965815cc069b Author: Luwei Kang Date: Wed Oct 24 16:05:13 2018 +0800 KVM: x86: Introduce a function to initialize the PT configuration Initialize the Intel PT configuration when cpuid update. Include cpuid inforamtion, rtit_ctl bit mask and the number of address ranges. Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 2ef444f1600bfc2d8522df0f537aafef79befa7e Author: Chao Peng Date: Wed Oct 24 16:05:12 2018 +0800 KVM: x86: Add Intel PT context switch for each vcpu Load/Store Intel Processor Trace register in context switch. MSR IA32_RTIT_CTL is loaded/stored automatically from VMCS. In Host-Guest mode, we need load/resore PT MSRs only when PT is enabled in guest. Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 86f5201df0d3e3efc78d3eac7fc5a59b813287cd Author: Chao Peng Date: Wed Oct 24 16:05:11 2018 +0800 KVM: x86: Add Intel Processor Trace cpuid emulation Expose Intel Processor Trace to guest only when the PT works in Host-Guest mode. Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 Author: Chao Peng Date: Wed Oct 24 16:05:10 2018 +0800 KVM: x86: Add Intel PT virtualization work mode Intel Processor Trace virtualization can be work in one of 2 possible modes: a. System-Wide mode (default): When the host configures Intel PT to collect trace packets of the entire system, it can leave the relevant VMX controls clear to allow VMX-specific packets to provide information across VMX transitions. KVM guest will not aware this feature in this mode and both host and KVM guest trace will output to host buffer. b. Host-Guest mode: Host can configure trace-packet generation while in VMX non-root operation for guests and root operation for native executing normally. Intel PT will be exposed to KVM guest in this mode, and the trace output to respective buffer of host and guest. In this mode, tht status of PT will be saved and disabled before VM-entry and restored after VM-exit if trace a virtual machine. Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit e0018afec50a4846789d92a1b7cd6cd7f816c448 Author: Luwei Kang Date: Wed Oct 24 16:05:09 2018 +0800 perf/x86/intel/pt: add new capability for Intel PT This adds support for "output to Trace Transport subsystem" capability of Intel PT. It means that PT can output its trace to an MMIO address range rather than system memory buffer. Acked-by: Song Liu Signed-off-by: Luwei Kang Reviewed-by: Thomas Gleixner Signed-off-by: Paolo Bonzini commit 69843a913fc86b3d0ef503d6cc15886ef8943626 Author: Luwei Kang Date: Wed Oct 24 16:05:08 2018 +0800 perf/x86/intel/pt: Add new bit definitions for PT MSRs Add bit definitions for Intel PT MSRs to support trace output directed to the memeory subsystem and holds a count if packet bytes that have been sent out. These are required by the upcoming PT support in KVM guests for MSRs read/write emulation. Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 61be2998ca541f7d9f487479b2ec519d83328085 Author: Luwei Kang Date: Wed Oct 24 16:05:07 2018 +0800 perf/x86/intel/pt: Introduce intel_pt_validate_cap() intel_pt_validate_hw_cap() validates whether a given PT capability is supported by the hardware. It checks the PT capability array which reflects the capabilities of the hardware on which the code is executed. For setting up PT for KVM guests this is not correct as the capability array for the guest can be different from the host array. Provide a new function to check against a given capability array. Acked-by: Song Liu Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit f6d079ce867d679e4dffef5b3112c7634215fd88 Author: Chao Peng Date: Wed Oct 24 16:05:06 2018 +0800 perf/x86/intel/pt: Export pt_cap_get() pt_cap_get() is required by the upcoming PT support in KVM guests. Export it and move the capabilites enum to a global header. As a global functions, "pt_*" is already used for ptrace and other things, so it makes sense to use "intel_pt_*" as a prefix. Acked-by: Song Liu Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 887eda13b570f62a8b7d3eadc91734e44d95e636 Author: Chao Peng Date: Wed Oct 24 16:05:05 2018 +0800 perf/x86/intel/pt: Move Intel PT MSRs bit defines to global header The Intel Processor Trace (PT) MSR bit defines are in a private header. The upcoming support for PT virtualization requires these defines to be accessible from KVM code. Move them to the global MSR header file. Reviewed-by: Thomas Gleixner Signed-off-by: Chao Peng Signed-off-by: Luwei Kang Signed-off-by: Paolo Bonzini commit 8cee58161efffcb5ba691c33fe4de3eb75cf46cb Author: Andrew Jones Date: Tue Nov 6 14:57:12 2018 +0100 kvm: selftests: aarch64: dirty_log_test: support greater than 40-bit IPAs When KVM has KVM_CAP_ARM_VM_IPA_SIZE we can test with > 40-bit IPAs by using the 'type' field of KVM_CREATE_VM. Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit cdbd2428482486bcb2ab86dd7d99e8adec2b7c39 Author: Andrew Jones Date: Tue Nov 6 14:57:11 2018 +0100 kvm: selftests: add pa-48/va-48 VM modes Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit 696ade770f08a194b85dbf22d6f1613285905ae5 Author: Andrew Jones Date: Tue Nov 6 14:57:10 2018 +0100 kvm: selftests: dirty_log_test: improve mode param management Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit fd3f6f813976620553e951eb10d3a11b673a8131 Author: Andrew Jones Date: Tue Nov 6 14:57:09 2018 +0100 kvm: selftests: dirty_log_test: reset guest test phys offset We need to reset the offset for each mode as it will change depending on the number of guest physical address bits. Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit 6498e1da84daec4b3ef97e2174b07ea0af3ff06e Author: Andrew Jones Date: Tue Nov 6 14:57:08 2018 +0100 kvm: selftests: dirty_log_test: always use -t There's no reason not to always test the topmost physical addresses, and if the user wants to try lower addresses then '-p' (used to be '-o before this patch) can be used. Let's remove the '-t' option and just always do what it did. Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit d4df5a15602e8edc2e90f5ee880de3cf7dbd92cd Author: Andrew Jones Date: Tue Nov 6 14:57:07 2018 +0100 kvm: selftests: dirty_log_test: don't identity map the test mem It isn't necessary and can even cause problems when testing high guest physical addresses. This patch leaves the test memory id- mapped by default, but when using '-t' the test memory virtual addresses stay the same even though the physical addresses switch to the topmost valid addresses. Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit b442324b581556e106010bb092dbb7e3ee25c94c Author: Andrew Jones Date: Tue Nov 6 14:57:06 2018 +0100 kvm: selftests: x86_64: dirty_log_test: fix -t Signed-off-by: Andrew Jones Signed-off-by: Radim Krčmář commit bdd303cb1bdb24e71eef8e4510b27166bfadf286 Author: Wei Yang Date: Mon Nov 5 14:45:03 2018 +0800 KVM: fix some typos Signed-off-by: Wei Yang [Preserved the iff and a probably intentional weird bracket notation. Also dropped the style change to make a single-purpose patch. - Radim] Signed-off-by: Radim Krčmář commit 649472a1694fb72a9e586bc40bfcf9282a4e8ccc Author: Peng Hao Date: Fri Nov 2 17:05:17 2018 +0800 x86/kvmclock: convert to SPDX identifiers Update the verbose license text with the matching SPDX license identifier. Signed-off-by: Peng Hao [Changed deprecated GPL-2.0+ to GPL-2.0-or-later. - Radim] Signed-off-by: Radim Krčmář commit 9b7ebff23cb8a8e126b3852ad0b1bfb284f25273 Author: Sean Christopherson Date: Mon Nov 5 10:44:32 2018 -0800 KVM: x86: Remove KF() macro placeholder Although well-intentioned, keeping the KF() definition as a hint for handling scattered CPUID features may be counter-productive. Simply redefining the bit position only works for directly manipulating the guest's CPUID leafs, e.g. it doesn't make guest_cpuid_has() magically work. Taking an alternative approach, e.g. ensuring the bit position is identical between the Linux-defined and hardware-defined features, may be a simpler and/or more effective method of exposing scattered features to the guest. Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář commit 788fc1e9ad8e1d332d3a18692028d1faee6fabb0 Author: Jim Mattson Date: Fri Nov 9 09:35:11 2018 -0800 kvm: vmx: Allow guest read access to IA32_TSC Let the guest read the IA32_TSC MSR with the generic RDMSR instruction as well as the specific RDTSC(P) instructions. Note that the hardware applies the TSC multiplier and offset (when applicable) to the result of RDMSR(IA32_TSC), just as it does to the result of RDTSC(P). Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Marc Orr Reviewed-by: Liran Alon Signed-off-by: Radim Krčmář commit 9ebdfe5230f2e50e3ba05c57723a06e90946815a Author: Jim Mattson Date: Mon Nov 26 11:22:32 2018 -0800 kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT According to the SDM, "NMI-window exiting" VM-exits wake a logical processor from the same inactive states as would an NMI and "interrupt-window exiting" VM-exits wake a logical processor from the same inactive states as would an external interrupt. Specifically, they wake a logical processor from the shutdown state and from the states entered using the HLT and MWAIT instructions. Fixes: 6dfacadd5858 ("KVM: nVMX: Add support for activity state HLT") Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Suggested-by: Sean Christopherson [Squashed comments of two Jim's patches and used the simplified code hunk provided by Sean. - Radim] Signed-off-by: Radim Krčmář commit e081354d6aa7b67c6d0ef51ff8c428b6c261a6fe Author: Tambe, William Date: Tue Nov 13 16:51:20 2018 +0000 KVM: nSVM: Fix nested guest support for PAUSE filtering. Currently, the nested guest's PAUSE intercept intentions are not being honored. Instead, since the L0 hypervisor's pause_filter_count and pause_filter_thresh values are still in place, these values are used instead of those programmed in the VMCB by the L1 hypervisor. To honor the desired PAUSE intercept support of the L1 hypervisor, the L0 hypervisor must use the PAUSE filtering fields of the L1 hypervisor. This requires saving and restoring of both the L0 and L1 hypervisor's PAUSE filtering fields. Signed-off-by: William Tambe Signed-off-by: Radim Krčmář commit 7a86dab8cf2f0fdf508f3555dddfc236623bff60 Author: Jim Mattson Date: Fri Dec 14 14:34:43 2018 -0800 kvm: Change offset in kvm_write_guest_offset_cached to unsigned Since the offset is added directly to the hva from the gfn_to_hva_cache, a negative offset could result in an out of bounds write. The existing BUG_ON only checks for addresses beyond the end of the gfn_to_hva_cache, not for addresses before the start of the gfn_to_hva_cache. Note that all current call sites have non-negative offsets. Fixes: 4ec6e8636256 ("kvm: Introduce kvm_write_guest_offset_cached()") Reported-by: Cfir Cohen Signed-off-by: Jim Mattson Reviewed-by: Cfir Cohen Reviewed-by: Peter Shier Reviewed-by: Krish Sadhukhan Reviewed-by: Sean Christopherson Signed-off-by: Radim Krčmář commit f1b9dd5eb86cec1fcf66aad17e7701d98d024a9a Author: Jim Mattson Date: Mon Dec 17 13:53:33 2018 -0800 kvm: Disallow wraparound in kvm_gfn_to_hva_cache_init Previously, in the case where (gpa + len) wrapped around, the entire region was not validated, as the comment claimed. It doesn't actually seem that wraparound should be allowed here at all. Furthermore, since some callers don't check the return code from this function, it seems prudent to clear ghc->memslot in the event of an error. Fixes: 8f964525a121f ("KVM: Allow cross page reads and writes from cached translations.") Reported-by: Cfir Cohen Signed-off-by: Jim Mattson Reviewed-by: Cfir Cohen Reviewed-by: Marc Orr Cc: Andrew Honig Signed-off-by: Radim Krčmář commit ba7424b200d347fbbf9fadecaffb2a0feb740039 Author: YueHaibing Date: Tue Dec 18 01:01:49 2018 +0000 KVM: VMX: Remove duplicated include from vmx.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář commit b85c32dd27495075380350fcd5d614a6b45311b8 Author: Vitaly Kuznetsov Date: Wed Dec 19 12:15:18 2018 +0100 selftests: kvm: report failed stage when exit reason is unexpected When we get a report like ==== Test Assertion Failure ==== x86_64/state_test.c:157: run->exit_reason == KVM_EXIT_IO pid=955 tid=955 - Success 1 0x0000000000401350: main at state_test.c:154 2 0x00007fc31c9e9412: ?? ??:0 3 0x000000000040159d: _start at ??:? Unexpected exit reason: 8 (SHUTDOWN), it is not obvious which particular stage failed. Add the info. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Radim Krčmář commit e87555e550cef4941579cd879759a7c0dee24e68 Author: Vitaly Kuznetsov Date: Wed Dec 19 12:06:13 2018 +0100 KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported AMD doesn't seem to implement MSR_IA32_MCG_EXT_CTL and svm code in kvm knows nothing about it, however, this MSR is among emulated_msrs and thus returned with KVM_GET_MSR_INDEX_LIST. The consequent KVM_GET_MSRS, of course, fails. Report the MSR as unsupported to not confuse userspace. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Radim Krčmář commit ed8e48122728acfaf7bfa904cba034d83905b43a Author: Paolo Bonzini Date: Fri Dec 21 11:25:59 2018 +0100 KVM: x86: fix size of x86_fpu_cache objects The memory allocation in b666a4b69739 ("kvm: x86: Dynamically allocate guest_fpu", 2018-11-06) is wrong, there are other members in struct fpu before the fpregs_state union and the patch should be doing something similar to the code in fpu__init_task_struct_size. It's enough to run a guest and then rmmod kvm to see slub errors which are actually caused by memory corruption. For now let's revert it to sizeof(struct fpu), which is conservative. I have plans to move fsave/fxsave/xsave directly in KVM, without using the kernel FPU helpers, and once it's done, the size of the object in the cache will be something like kvm_xstate_size. Signed-off-by: Paolo Bonzini commit 6ac5af6ec12dadca37dd86f93a4125f6a04ffb4c Author: Ludovic Desroches Date: Thu Nov 8 14:14:42 2018 +0100 MAINTAINERS: merge at91 pinctrl entries In order to be aware of all changes related to at91 pinctrl drivers, merge the two entries. Make use of the opportunity to replace Atmel by Microchip. Signed-off-by: Ludovic Desroches Signed-off-by: Linus Walleij commit a2161fd7c23cad7f9e962cb63d39ca2dbd41b960 Author: Aisheng Dong Date: Mon Dec 17 15:38:15 2018 +0000 pinctrl: imx8qxp: break the dependency on SOC_IMX8QXP ARM64 SoC does not encourage people to add more finegrained SoC config options rather than a single ARCH_ in arch Kconfig. So this patch aims to break the dependency on SOC_IMX8QXP. Cc: Linus Walleij Cc: Fabio Estevam Cc: Stefan Agner Cc: Pengutronix Kernel Team Acked-by: Shawn Guo Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit 8b78de956f31c5f210d190766cd23b9f1f6a8ee6 Author: Masahiro Yamada Date: Fri Dec 14 17:44:46 2018 +0900 pinctrl: uniphier: constify uniphier_pinctrl_socdata These are constant data. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij commit b5af33df50e91f7c79c050ec73062577b9d0dae3 Author: Ryder Lee Date: Thu Dec 13 10:27:50 2018 +0800 pinctrl: mediatek: improve Kconfig dependencies Remove prompts to make all pinctrl cores to non-visible symbols and make sure the target SoCs would be coupled with the corresponding cores. Signed-off-by: Ryder Lee Tested-by: Kevin Hilman Signed-off-by: Linus Walleij commit 533918b6f6ae7566b703adf0346dd15f2a60fe77 Author: Tao Ren Date: Wed Dec 12 13:53:05 2018 -0800 gpio: aspeed: remove duplicated statement Remove duplicated assignment statement from aspeed_gpio_probe() function. Signed-off-by: Tao Ren Acked-by: Joel Stanley Signed-off-by: Linus Walleij commit d1040ea06f0004fe22e881a8fe88db12ef83b98c Author: Arnd Bergmann Date: Mon Dec 10 21:59:45 2018 +0100 pinctrl: msm: mark PM functions as __maybe_unused Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions: drivers/pinctrl/qcom/pinctrl-msm.c:1082:12: error: 'msm_pinctrl_resume' defined but not used [-Werror=unused-function] static int msm_pinctrl_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:1075:12: error: 'msm_pinctrl_suspend' defined but not used [-Werror=unused-function] static int msm_pinctrl_suspend(struct device *dev) Mark them as __maybe_unused to shut up the warning and silently drop the functions without having to add ugly #ifdefs. Fixes: 977d057ad346 ("pinctrl: msm: Add sleep pinctrl state transitions") Signed-off-by: Arnd Bergmann Reviewed-by: Evan Green Signed-off-by: Linus Walleij commit b766470b876409b9d821c5773a08a90f8cc50c76 Author: Maxime Ripard Date: Mon Dec 17 14:16:26 2018 +0100 dt-bindings: pinctrl: sunxi: Add supply properties The pinctrl node can have multiple regulators for each of its GPIO banks. Add the property descriptions. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij commit 4dd3d60a5ecdaac13f728eccdf0d962bc34d18d4 Author: Martin Blumenstingl Date: Sun Dec 9 20:50:55 2018 +0100 pinctrl: meson: meson8b: add the missing GPIO_GROUPs for BOOT and CARD Add the BOOT and CARD pins as GROUP_GROUPs as well so they can be configured in devicetree using groups = BOOTx or groups = CARDx. This makes the behavior consistent with other pins inside the same driver as well as with the BOOT and CARD pins of the GXBB and GXL pinctrl drivers. Fixes: 0fefcb6876d0d6 ("pinctrl: Add support for Meson8b") Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit 619cdd17f60f18c034a111e773fb8f8220470a01 Author: Martin Blumenstingl Date: Sun Dec 9 20:50:54 2018 +0100 pinctrl: meson: meson8: add the missing GPIO_GROUPs for BOOT and CARD Add the BOOT and CARD pins as GROUP_GROUPs as well so they can be configured in devicetree using groups = BOOTx or groups = CARDx. This makes the behavior consistent with other pins inside the same driver as well as with the BOOT and CARD pins of the GXBB and GXL pinctrl drivers. Fixes: 6ac730951104a4 ("pinctrl: add driver for Amlogic Meson SoCs") Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit 8e5ba8b8baffc3a17e96e3f72d1fd82a1675c251 Author: Martin Blumenstingl Date: Sun Dec 9 20:50:52 2018 +0100 pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs" Rename the existing "gpio" function to "gpio_periphs". This makes it consistent with the "gpio_aobus" function. Also GXBB and GXL are also using the "gpio_periphs" naming, so this makes the code here consistent with other Amlogic pinctrl drivers. No functional changes since thee "gpio" function is currently not used. Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit 54a9cbbfca53d0220a2f4bfc56da33ed12d6b5da Author: Martin Blumenstingl Date: Sun Dec 9 20:50:53 2018 +0100 pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs" Rename the existing "gpio" function to "gpio_periphs". This makes it consistent with the "gpio_aobus" function. Also GXBB and GXL are also using the "gpio_periphs" naming, so this makes the code here consistent with other Amlogic pinctrl drivers. No functional changes since thee "gpio" function is currently not used. Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit 2b745ac3cceb8fc1d9985990c8241a821ea97e53 Author: Martin Blumenstingl Date: Sun Dec 9 20:50:51 2018 +0100 pinctrl: meson: meson8b: fix the GPIO function for the GPIOAO pins The GPIOAO pins (as well as the two exotic GPIO_BSD_EN and GPIO_TEST_N) only belong to the pin controller in the AO domain. With the current definition these pins cannot be referred to in .dts files as group (which is possible on GXBB and GXL for example). Add a separate "gpio_aobus" function to fix the mapping between the pin controller and the GPIO pins in the AO domain. This is similar to how the GXBB and GXL drivers implement this functionality. Fixes: 9dab1868ec0db4 ("pinctrl: amlogic: Make driver independent from two-domain configuration") Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit 42f9b48cc5402be11d2364275eb18c257d2a79e8 Author: Martin Blumenstingl Date: Sun Dec 9 20:50:50 2018 +0100 pinctrl: meson: meson8: fix the GPIO function for the GPIOAO pins The GPIOAO pins (as well as the two exotic GPIO_BSD_EN and GPIO_TEST_N) only belong to the pin controller in the AO domain. With the current definition these pins cannot be referred to in .dts files as group (which is possible on GXBB and GXL for example). Add a separate "gpio_aobus" function to fix the mapping between the pin controller and the GPIO pins in the AO domain. This is similar to how the GXBB and GXL drivers implement this functionality. Fixes: 9dab1868ec0db4 ("pinctrl: amlogic: Make driver independent from two-domain configuration") Signed-off-by: Martin Blumenstingl Signed-off-by: Linus Walleij commit fb0b35d307b7109d245f45be780d15fb368f94c5 Author: Andrei.Stefanescu@microchip.com Date: Wed Dec 12 11:57:15 2018 +0000 gpio: add driver for SAMA5D2 PIOBU pins PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu Signed-off-by: Linus Walleij commit 6bd925a8b779b262b007d638171c80398cfbc217 Author: Andrei.Stefanescu@microchip.com Date: Wed Dec 12 11:57:11 2018 +0000 dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller This patch describes the Security Module's usage as a GPIO controller for its PIOBU pins. These pins have the special property of maintaining their voltage during suspend-to-mem. Signed-off-by: Andrei Stefanescu Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 249d1bb22901a214f3e7265362057fba471b7204 Author: Hardik Singh Rathore Date: Fri Dec 21 01:06:42 2018 -0800 Input: touchscreen - fix coding style issue This patch fixes the coding style problem reported by checkpatch.pl as below: ERROR: foo* bar should be "foo *bar" Signed-off-by: Hardik Singh Rathore Signed-off-by: Dmitry Torokhov commit a465d38fa3dce6a0dc2d5814cb3aa7b0d2982c6b Merge: 442a5d000a4ca 2c3b0463bb28e f9dca0f0675e7 584923efe91f2 Author: Rafael J. Wysocki Date: Fri Dec 21 10:07:37 2018 +0100 Merge branches 'pm-devfreq', 'pm-avs' and 'pm-tools' * pm-devfreq: PM / devfreq: add devfreq_suspend/resume() functions PM / devfreq: add support for suspend/resume of a devfreq device PM / devfreq: refactor set_target frequency function * pm-avs: PM / AVS: SmartReflex: Switch to SPDX Licence ID PM / AVS: SmartReflex: NULL check before some freeing functions is not needed PM / AVS: SmartReflex: remove unused function * pm-tools: tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file tools/power turbostat: consolidate duplicate model numbers tools/power turbostat: fix goldmont C-state limit decoding cpupower : Auto-completion for cpupower tool tools/power turbostat: reduce debug output tools/power turbosat: fix AMD APIC-id output commit 442a5d000a4cabe8330074ad874da0f5ea47bb4f Merge: 6f049e7c87fd6 8234f6734c5d7 96c6935212d63 d32dcc6c69706 943a10f85265d Author: Rafael J. Wysocki Date: Fri Dec 21 10:06:44 2018 +0100 Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-sleep' * pm-core: PM-runtime: Switch autosuspend over to using hrtimers * pm-qos: PM / QoS: Change to use DEFINE_SHOW_ATTRIBUTE macro * pm-domains: PM / Domains: remove define_genpd_open_function() and define_genpd_debugfs_fops() * pm-sleep: PM / sleep: convert to DEFINE_SHOW_ATTRIBUTE commit 6f049e7c87fd60b9d2649c53e397741d50eb3d44 Merge: 3a56fe685dc96 bcbeef5f001ca Author: Rafael J. Wysocki Date: Fri Dec 21 10:06:18 2018 +0100 Merge branch 'pm-opp' * pm-opp: PM / Domains: Propagate performance state updates PM / Domains: Factorize dev_pm_genpd_set_performance_state() PM / Domains: Save OPP table pointer in genpd OPP: Don't return 0 on error from of_get_required_opp_performance_state() OPP: Add dev_pm_opp_xlate_performance_state() helper OPP: Improve _find_table_of_opp_np() PM / Domains: Make genpd performance states orthogonal to the idlestates OPP: Fix missing debugfs supply directory for OPPs OPP: Use opp_table->regulators to verify no regulator case OPP: Remove of_dev_pm_opp_find_required_opp() OPP: Rename and relocate of_genpd_opp_to_performance_state() OPP: Configure all required OPPs OPP: Add dev_pm_opp_{set|put}_genpd_virt_dev() helper PM / Domains: Add genpd_opp_to_performance_state() OPP: Populate OPPs from "required-opps" property OPP: Populate required opp tables from "required-opps" property OPP: Separate out custom OPP handler specific code OPP: Identify and mark genpd OPP tables PM / Domains: Rename genpd virtual devices as virt_dev commit 3a56fe685dc96ee0adb5958787ab9a2e24347e5a Merge: 7edcbbf29006b 04dab58a39d40 2849dd8bc72b6 108c35a908d48 Author: Rafael J. Wysocki Date: Fri Dec 21 10:06:06 2018 +0100 Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-cpufreq-sched' * pm-cpuidle: cpuidle: Add 'above' and 'below' idle state metrics cpuidle: big.LITTLE: fix refcount leak cpuidle: Add cpuidle.governor= command line parameter cpuidle: poll_state: Disregard disable idle states Documentation: admin-guide: PM: Add cpuidle document * pm-cpufreq: cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver dt-bindings: cpufreq: Introduce QCOM cpufreq firmware bindings cpufreq: nforce2: Remove meaningless return cpufreq: ia64: Remove unused header files cpufreq: imx6q: save one condition block for normal case of nvmem read cpufreq: imx6q: remove unused code cpufreq: pmac64: add of_node_put() cpufreq: powernv: add of_node_put() Documentation: intel_pstate: Clarify coordination of P-State limits cpufreq: intel_pstate: Force HWP min perf before offline cpufreq: s3c24xx: Change to use DEFINE_SHOW_ATTRIBUTE macro * pm-cpufreq-sched: sched/cpufreq: Add the SPDX tags commit 3eb85368460d942005ba305829e279d0fe4767e0 Merge: 4cd9da8ad1c98 5c6a1177826e5 Author: Rafael J. Wysocki Date: Fri Dec 21 10:04:23 2018 +0100 Merge branch 'acpi-pci' * acpi-pci: ACPI: Make PCI slot detection driver depend on PCI ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set arm64: select ACPI PCI code only when both features are enabled PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset ACPI: Allow CONFIG_PCI to be unset for reboot ACPI: Move PCI reset to a separate function commit 4cd9da8ad1c98a2c9c2b30cbd5c40faba0047bae Merge: 1027fb0fb94aa 1f000e1bfff42 1a2fa02f7489d 98cff8b23ed1c f8c6d1402b89f Author: Rafael J. Wysocki Date: Fri Dec 21 10:04:14 2018 +0100 Merge branches 'acpi-tables', 'acpi-soc', 'acpi-apei' and 'acpi-misc' * acpi-tables: ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode ACPI / tables: add DSDT AmlCode new declaration name support ACPI: SPCR: Consider baud rate 0 as preconfigured state * acpi-soc: ACPI / LPSS: Ignore acpi_device_fix_up_power() return value ACPI / APD: Add clock frequency for Hisilicon Hip08 SPI controller * acpi-apei: ACPI/APEI: Clear GHES block_status before panic() ACPI, APEI, EINJ: Change to use DEFINE_SHOW_ATTRIBUTE macro * acpi-misc: ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion() commit 1027fb0fb94aaaaa36ad58193fc61c36efaced85 Merge: 28586a51eea66 3b15e830ba59a Author: Rafael J. Wysocki Date: Fri Dec 21 10:03:16 2018 +0100 Merge branch 'acpica' * acpica: ACPICA: Update version to 20181213 ACPICA: change coding style to match ACPICA, no functional change ACPICA: Debug output: Add option to display method/object evaluation ACPICA: disassembler: disassemble OEMx tables as AML ACPICA: Add "Windows 2018.2" string in the _OSI support ACPICA: Expressions in package elements are not supported ACPICA: Update buffer-to-string conversions ACPICA: add comments, no functional change ACPICA: Remove defines that use deprecated flag ACPICA: Add "Windows 2018" string in the _OSI support ACPICA: Update version to 20181031 ACPICA: iASL: Enhance error detection ACPICA: iASL: adding definition and disassembly for TPM2 revision 3 ACPICA: Use %d for signed int print formatting instead of %u ACPICA: Debugger: refactor to fix unused variable warning commit 0b9f28fed3f70ff9a0380fe308739dd72a30a6f6 Author: Nicolas Saenz Julienne Date: Fri Dec 21 00:47:40 2018 -0800 Input: add official Raspberry Pi's touchscreen driver Add's support to Raspberry Pi's 7" Touch device. Instead of using a conventional bus all information is copied into a memory mapped area by RPi's firmware. Based on the driver found in RPi's kernel repository. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Acked-by: Eric Anholt Signed-off-by: Dmitry Torokhov commit 4d8f727b83bcd6702c2d210330872c9122d2d360 Author: Dan Carpenter Date: Fri Dec 21 00:38:30 2018 -0800 Input: nomadik-ske-keypad - fix a loop timeout test The loop exits with "timeout" set to -1 not to 0. Fixes: 1158f0f16224 ("Input: add support for Nomadik SKE keypad controller") Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov commit 1e12a521d6917004f8b95a3b5864b92edc2694c8 Merge: eafb27fa52835 8d503f206c336 Author: Greg Kroah-Hartman Date: Fri Dec 21 08:36:54 2018 +0100 Merge tag 'usb-serial-4.21-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 4.21-rc1 Here are the USB-serial updates for 4.21-rc1, including: - support for mos7840 3-port devices - improved ftdi baud-rate divisor calculations - support for a new class of f81534 devices Included are also various clean ups and some new pl2303 device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-4.21-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays USB: serial: mos7840: remove set but not used variables 'number, serial' USB: serial: mos7840: add a product ID for the new product USB: serial: mos7840: clean up register handling USB: serial: ftdi_sio: use rounding when calculating baud rate divisors USB: serial: f81534: fix reading old/new IC config USB: serial: mos7840: remove set but not used variables 'st, data1, iflag' USB: serial: quatech2: remove set but not used variable 'port_priv' commit fbc4904c287778ddb74bf6060ac9dec51992fc53 Author: Christian Brauner Date: Thu Dec 20 11:40:57 2018 +0100 MAINTAINERS: add another Android binder maintainer As briefly discussed with Greg and Todd, add Christian as maintainer for binder{fs}. Signed-off-by: Christian Brauner Acked-By: Martijn Coenen Signed-off-by: Greg Kroah-Hartman commit 6277053afa34253eb8d8d147388e4426e615bae4 Author: Tariq Toukan Date: Tue Nov 20 11:50:30 2018 +0200 net/mlx5e: XDP, Add user control for XDP TX MPWQE feature Add ethtool private flag 'xdp_tx_mpwqe' to control the feature from userspace. Feature is set ON by default, if supported. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 5e0d2eef771ee78b092bf93d040eac02a0965fea Author: Tariq Toukan Date: Wed Nov 21 14:08:06 2018 +0200 net/mlx5e: XDP, Support Enhanced Multi-Packet TX WQE Add support for the HW feature of multi-packet WQE in XDP xmit flow. The conventional TX descriptor (WQE, Work Queue Element) serves a single packet. Our HW has support for multi-packet WQE (MPWQE) in which a single descriptor serves multiple TX packets. This reduces both the PCI overhead and the CPU cycles wasted on writing them. In this patch we add support for the HW feature, which is supported starting from ConnectX-5. Performance: Tested packet rate for UDP 64Byte multi-stream over ConnectX-5 NICs. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz XDP_TX: We see a huge gain on single port ConnectX-5, and reach the 100 Mpps milestone. * Single-port HCA: Before: 70 Mpps After: 100 Mpps (+42.8%) * Dual-port HCA: Before: 51.7 Mpps After: 57.3 Mpps (+10.8%) * In both cases we tested traffic on one port and for now On Dual-port HCAs we see only small gain, we are working to overcome this bottleneck, but for the moment only with experimental firmware on dual port HCAs we can reach the wanted numbers as seen on Single-port HCAs. XDP_REDIRECT: Redirect from (A) ConnectX-5 to (B) ConnectX-5. Due to a setup limitation, (A) and (B) are on different NUMA nodes, so absolute performance numbers are not optimal. Note: Below is the transmit rate of (B), not the redirect rate of (A) which is in some cases higher. * (B) is single-port: Before: 77 Mpps After: 90 Mpps (+16.8%) * (B) is dual-port: Before: 61 Mpps After: 72 Mpps (+18%) Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1feeab80078078186b5080fe15c51a5cce724a0e Author: Tariq Toukan Date: Sun Oct 14 14:46:57 2018 +0300 net/mlx5e: XDP, Add array for WQE info descriptors Each xdp_wqe_info instance describes the number of data-segments and WQEBBs of the WQE. This is useful for a downstream patch that adds support for Multi-Packet TX WQE feature. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit fea28dd6a281045e18c1412ab5bba54436c11088 Author: Tariq Toukan Date: Sun Oct 14 14:37:48 2018 +0300 net/mlx5e: XDP, Maintain a FIFO structure for xdp_info instances This provides infrastructure to have multiple xdp_info instances for the same consumer index. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b8180392edd97cd5bfdf12270315a72fe601cf7e Author: Tariq Toukan Date: Wed Nov 21 14:06:02 2018 +0200 net/mlx5e: XDP, Replace boolean doorbell indication with segment pointer Instead of calculating the control segment to be used upon an XDP xmit doorbell, save it in SQ structure. Nullify when no pending doorbell. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit db02a308cd724fd37416012c8077d3e0ea2bf386 Author: Tariq Toukan Date: Thu Nov 15 11:48:41 2018 +0200 net/mlx5e: XDP, Warn upon polling an error CQE Do not ignore the CQE opcode. This helps expose issues and debug them. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit feb2ff9d74f76a174e284255b7e537b6c090c13c Author: Tariq Toukan Date: Wed Nov 21 14:04:45 2018 +0200 net/mlx5e: XDP, Change the XDP SQ redirect indication Do not maintain an SQ state bit to indicate whether an XDP SQ serves redirect operations. Instead, rely on the fact that such an XDP SQ doesn't reside in an RQ instance, while the others do. This info is not known to the XDP SQ functions themselves, and they rely on their callers to distinguish between the cases. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4fb2f516186ea25dea326f97880431e14a5b9e9d Author: Tariq Toukan Date: Wed Nov 21 13:56:17 2018 +0200 net/mlx5e: XDP, Precede XDP-related operations in RQ poll by a loaded program check At the end of the RQ polling loop, some XDP-related operations might be required. Before checking them one by one, check if an XDP program is even loaded. Combine all the checks and operations in a single function in xdp files. This saves unnecessary checks for non-XDP flows. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e05b8d4fc30a68540e5c0eef3e2bacd1f27b8172 Author: Tariq Toukan Date: Thu Nov 15 11:48:41 2018 +0200 net/mlx5e: TX, Print opcode in error CQE warning The opcode indicates about the error reason. Printing it helps in debug. Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 7f92891778dff62303c070ac81de7b7d80de331a Author: Alexey Kardashevskiy Date: Thu Dec 20 12:10:36 2018 +1100 vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver POWER9 Witherspoon machines come with 4 or 6 V100 GPUs which are not pluggable PCIe devices but still have PCIe links which are used for config space and MMIO. In addition to that the GPUs have 6 NVLinks which are connected to other GPUs and the POWER9 CPU. POWER9 chips have a special unit on a die called an NPU which is an NVLink2 host bus adapter with p2p connections to 2 to 3 GPUs, 3 or 2 NVLinks to each. These systems also support ATS (address translation services) which is a part of the NVLink2 protocol. Such GPUs also share on-board RAM (16GB or 32GB) to the system via the same NVLink2 so a CPU has cache-coherent access to a GPU RAM. This exports GPU RAM to the userspace as a new VFIO device region. This preregisters the new memory as device memory as it might be used for DMA. This inserts pfns from the fault handler as the GPU memory is not onlined until the vendor driver is loaded and trained the NVLinks so doing this earlier causes low level errors which we fence in the firmware so it does not hurt the host system but still better be avoided; for the same reason this does not map GPU RAM into the host kernel (usual thing for emulated access otherwise). This exports an ATSD (Address Translation Shootdown) register of NPU which allows TLB invalidations inside GPU for an operating system. The register conveniently occupies a single 64k page. It is also presented to the userspace as a new VFIO device region. One NPU has 8 ATSD registers, each of them can be used for TLB invalidation in a GPU linked to this NPU. This allocates one ATSD register per an NVLink bridge allowing passing up to 6 registers. Due to the host firmware bug (just recently fixed), only 1 ATSD register per NPU was actually advertised to the host system so this passes that alone register via the first NVLink bridge device in the group which is still enough as QEMU collects them all back and presents to the guest via vPHB to mimic the emulated NPU PHB on the host. In order to provide the userspace with the information about GPU-to-NVLink connections, this exports an additional capability called "tgt" (which is an abbreviated host system bus address). The "tgt" property tells the GPU its own system address and allows the guest driver to conglomerate the routing information so each GPU knows how to get directly to the other GPUs. For ATS to work, the nest MMU (an NVIDIA block in a P9 CPU) needs to know LPID (a logical partition ID or a KVM guest hardware ID in other words) and PID (a memory context ID of a userspace process, not to be confused with a linux pid). This assigns a GPU to LPID in the NPU and this is why this adds a listener for KVM on an IOMMU group. A PID comes via NVLink from a GPU and NPU uses a PID wildcard to pass it through. This requires coherent memory and ATSD to be available on the host as the GPU vendor only supports configurations with both features enabled and other configurations are known not to work. Because of this and because of the ways the features are advertised to the host system (which is a device tree with very platform specific properties), this requires enabled POWERNV platform. The V100 GPUs do not advertise any of these capabilities via the config space and there are more than just one device ID so this relies on the platform to tell whether these GPUs have special abilities such as NVLinks. Signed-off-by: Alexey Kardashevskiy Acked-by: Alex Williamson Signed-off-by: Michael Ellerman commit c2c0f1cde0ef56ba5d6f553db73f51e753d7550a Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:31 2018 +1100 vfio_pci: Allow regions to add own capabilities VFIO regions already support region capabilities with a limited set of fields. However the subdriver might have to report to the userspace additional bits. This adds an add_capability() hook to vfio_pci_regops. Signed-off-by: Alexey Kardashevskiy Acked-by: Alex Williamson Signed-off-by: Michael Ellerman commit a15b1883fee11e07e5db7f003a863cc419647e79 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:30 2018 +1100 vfio_pci: Allow mapping extra regions So far we only allowed mapping of MMIO BARs to the userspace. However there are GPUs with on-board coherent RAM accessible via side channels which we also want to map to the userspace. The first client for this is NVIDIA V100 GPU with NVLink2 direct links to a POWER9 NPU-enabled CPU; such GPUs have 16GB RAM which is coherently mapped to the system address space, we are going to export these as an extra PCI region. We already support extra PCI regions and this adds support for mapping them to the userspace. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Alex Williamson Signed-off-by: Michael Ellerman commit 58629c0dc34904d135af944d120eb23165ec3b61 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:29 2018 +1100 powerpc/powernv/npu: Fault user page into the hypervisor's pagetable When a page fault happens in a GPU, the GPU signals the OS and the GPU driver calls the fault handler which populated a page table; this allows the GPU to complete an ATS request. On the bare metal get_user_pages() is enough as it adds a pte to the kernel page table but under KVM the partition scope tree does not get updated so ATS will still fail. This reads a byte from an effective address which causes HV storage interrupt and KVM updates the partition scope tree. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 135ef954051b102870a8d47a8eb822af1f1b1ec1 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:28 2018 +1100 powerpc/powernv/npu: Check mmio_atsd array bounds when populating A broken device tree might contain more than 8 values and introduce hard to debug memory corruption bug. This adds the boundary check. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 1b785611e1191751e1fb44ac3e89a0bd68ec7971 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:27 2018 +1100 powerpc/powernv/npu: Add release_ownership hook In order to make ATS work and translate addresses for arbitrary LPID and PID, we need to program an NPU with LPID and allow PID wildcard matching with a specific MSR mask. This implements a helper to assign a GPU to LPAR and program the NPU with a wildcard for PID and a helper to do clean-up. The helper takes MSR (only DR/HV/PR/SF bits are allowed) to program them into NPU2 for ATS checkout requests support. This exports pnv_npu2_unmap_lpar_dev() as following patches will use it from the VFIO driver. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 0bd971676e68f14427406f4dbbdeb9586e4f24b3 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:26 2018 +1100 powerpc/powernv/npu: Add compound IOMMU groups At the moment the powernv platform registers an IOMMU group for each PE. There is an exception though: an NVLink bridge which is attached to the corresponding GPU's IOMMU group making it a master. Now we have POWER9 systems with GPUs connected to each other directly bypassing PCI. At the moment we do not control state of these links so we have to put such interconnected GPUs to one IOMMU group which means that the old scheme with one GPU as a master won't work - there will be up to 3 GPUs in such group. This introduces a npu_comp struct which represents a compound IOMMU group made of multiple PEs - PCI PEs (for GPUs) and NPU PEs (for NVLink bridges). This converts the existing NVLink1 code to use the new scheme. >From now on, each PE must have a valid iommu_table_group_ops which will either be called directly (for a single PE group) or indirectly from a compound group handlers. This moves IOMMU group registration for NVLink-connected GPUs to npu-dma.c. For POWER8, this stores a new compound group pointer in the PE (so a GPU is still a master); for POWER9 the new group pointer is stored in an NPU (which is allocated per a PCI host controller). Signed-off-by: Alexey Kardashevskiy [mpe: Initialise npdev to NULL in pnv_try_setup_npu_table_group()] Signed-off-by: Michael Ellerman commit 83fb8ccf975138283c7f6d3685d9c5e2292381dd Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:25 2018 +1100 powerpc/powernv/npu: Convert NPU IOMMU helpers to iommu_table_group_ops At the moment NPU IOMMU is manipulated directly from the IODA2 PCI PE code; PCI PE acts as a master to NPU PE. Soon we will have compound IOMMU groups with several PEs from several different PHB (such as interconnected GPUs and NPUs) so there will be no single master but a one big IOMMU group. This makes a first step and converts an NPU PE with a set of extern function to a table group. This should cause no behavioral change. Note that pnv_npu_release_ownership() has never been implemented. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit b04149c2dd85ac2d7839ef859a82cc1871fcf6ce Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:24 2018 +1100 powerpc/powernv/npu: Move single TVE handling to NPU PE Normal PCI PEs have 2 TVEs, one per a DMA window; however NPU PE has only one which points to one of two tables of the corresponding PCI PE. So whenever a new DMA window is programmed to PEs, the NPU PE needs to release old table in order to use the new one. Commit d41ce7b1bcc3e ("powerpc/powernv/npu: Do not try invalidating 32bit table when 64bit table is enabled") did just that but in pci-ioda.c while it actually belongs to npu-dma.c. This moves the single TVE handling to npu-dma.c. This does not implement restoring though as it is highly unlikely that we can set the table to PCI PE and cannot to NPU PE and if that fails, we could only set 32bit table to NPU PE and this configuration is not really supported or wanted. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 847e6563aa8c6e335397b821b215ac4313580638 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:23 2018 +1100 powerpc/powernv: Reference iommu_table while it is linked to a group The iommu_table pointer stored in iommu_table_group may get stale by accident, this adds referencing and removes a redundant comment about this. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 5eada8a3f087df74af1c2797770a3e2249374fe1 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:22 2018 +1100 powerpc/iommu_api: Move IOMMU groups setup to a single place Registering new IOMMU groups and adding devices to them are separated in code and the latter is dug in the DMA setup code which it does not really belong to. This moved IOMMU groups setup to a separate helper which registers a group and adds devices as before. This does not make a difference as IOMMU groups are not used anyway; the only dependency here is that iommu_add_device() requires a valid pointer to an iommu_table (set by set_iommu_table_base()). To keep the old behaviour, this does not add new IOMMU groups for PEs with no DMA weight and also skips NVLink bridges which do not have pci_controller_ops::setup_bridge (the normal way of adding PEs). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit c4e9d3c1e65aac3f65995e9cb1cede7330c594dc Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:21 2018 +1100 powerpc/powernv/pseries: Rework device adding to IOMMU groups The powernv platform registers IOMMU groups and adds devices to them from the pci_controller_ops::setup_bridge() hook except one case when virtual functions (SRIOV VFs) are added from a bus notifier. The pseries platform registers IOMMU groups from the pci_controller_ops::dma_bus_setup() hook and adds devices from the pci_controller_ops::dma_dev_setup() hook. The very same bus notifier used for powernv does not add devices for pseries though as __of_scan_bus() adds devices first, then it does the bus/dev DMA setup. Both platforms use iommu_add_device() which takes a device and expects it to have a valid IOMMU table struct with an iommu_table_group pointer which in turn points the iommu_group struct (which represents an IOMMU group). Although the helper seems easy to use, it relies on some pre-existing device configuration and associated data structures which it does not really need. This simplifies iommu_add_device() to take the table_group pointer directly. Pseries already has a table_group pointer handy and the bus notified is not used anyway. For powernv, this copies the existing bus notifier, makes it work for powernv only which means an easy way of getting to the table_group pointer. This was tested on VFs but should also support physical PCI hotplug. Since iommu_add_device() receives the table_group pointer directly, pseries does not do TCE cache invalidation (the hypervisor does) nor allow multiple groups per a VFIO container (in other words sharing an IOMMU table between partitionable endpoints), this removes iommu_table_group_link from pseries. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit c409c6316166993163e29312aeaaf1c0c300a04a Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:20 2018 +1100 powerpc/pseries: Remove IOMMU API support for non-LPAR systems The pci_dma_bus_setup_pSeries and pci_dma_dev_setup_pSeries hooks are registered for the pseries platform which does not have FW_FEATURE_LPAR; these would be pre-powernv platforms which we never supported PCI pass through for anyway so remove it. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 3be2df00e299821ad255498ac4411906a8d59cfa Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:19 2018 +1100 powerpc/pseries/npu: Enable platform support We already changed NPU API for GPUs to not to call OPAL and the remaining bit is initializing NPU structures. This searches for POWER9 NVLinks attached to any device on a PHB and initializes an NPU structure if any found. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 68c0449ea16d775e762b532afddb4d6a5f161877 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:18 2018 +1100 powerpc/pseries/iommu: Use memory@ nodes in max RAM address calculation We might have memory@ nodes with "linux,usable-memory" set to zero (for example, to replicate powernv's behaviour for GPU coherent memory) which means that the memory needs an extra initialization but since it can be used afterwards, the pseries platform will try mapping it for DMA so the DMA window needs to cover those memory regions too; if the window cannot cover new memory regions, the memory onlining fails. This walks through the memory nodes to find the highest RAM address to let a huge DMA window cover that too in case this memory gets onlined later. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 0e759bd75285e96fbb4013d1303b08fdb8ba58e1 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:17 2018 +1100 powerpc/powernv/npu: Move OPAL calls away from context manipulation When introduced, the NPU context init/destroy helpers called OPAL which enabled/disabled PID (a userspace memory context ID) filtering in an NPU per a GPU; this was a requirement for P9 DD1.0. However newer chip revision added a PID wildcard support so there is no more need to call OPAL every time a new context is initialized. Also, since the PID wildcard support was added, skiboot does not clear wildcard entries in the NPU so these remain in the hardware till the system reboot. This moves LPID and wildcard programming to the PE setup code which executes once during the booting process so NPU2 context init/destroy won't need to do additional configuration. This replaces the check for FW_FEATURE_OPAL with a check for npu!=NULL as this is the way to tell if the NPU support is present and configured. This moves pnv_npu2_init() declaration as pseries should be able to use it. This keeps pnv_npu2_map_lpar() in powernv as pseries is not allowed to call that. This exports pnv_npu2_map_lpar_dev() as following patches will use it from the VFIO driver. While at it, replace redundant list_for_each_entry_safe() with a simpler list_for_each_entry(). Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit 46a1449d9e39478a35d35d9d9025776f6cee24fb Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:16 2018 +1100 powerpc/powernv: Move npu struct from pnv_phb to pci_controller The powernv PCI code stores NPU data in the pnv_phb struct. The latter is referenced by pci_controller::private_data. We are going to have NPU2 support in the pseries platform as well but it does not store any private_data in in the pci_controller struct; and even if it did, it would be a different data structure. This makes npu a pointer and stores it one level higher in the pci_controller struct. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit c10c21efa4bccab486c2e6a047c13dfa6cf7426c Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:15 2018 +1100 powerpc/vfio/iommu/kvm: Do not pin device memory This new memory does not have page structs as it is not plugged to the host so gup() will fail anyway. This adds 2 helpers: - mm_iommu_newdev() to preregister the "memory device" memory so the rest of API can still be used; - mm_iommu_is_devmem() to know if the physical address is one of thise new regions which we must avoid unpinning of. This adds @mm to tce_page_is_contained() and iommu_tce_xchg() to test if the memory is device memory to avoid pfn_to_page(). This adds a check for device memory in mm_iommu_ua_mark_dirty_rm() which does delayed pages dirtying. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman commit e0bf78b0f9594d47dfa7e364a9071442fc1d9445 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:14 2018 +1100 powerpc/mm/iommu/vfio_spapr_tce: Change mm_iommu_get to reference a region Normally mm_iommu_get() should add a reference and mm_iommu_put() should remove it. However historically mm_iommu_find() does the referencing and mm_iommu_get() is doing allocation and referencing. We are going to add another helper to preregister device memory so instead of having mm_iommu_new() (which pre-registers the normal memory and references the region), we need separate helpers for pre-registering and referencing. This renames: - mm_iommu_get to mm_iommu_new; - mm_iommu_find to mm_iommu_get. This changes mm_iommu_get() to reference the region so the name now reflects what it does. This removes the check for exact match from mm_iommu_new() as we want it to fail on existing regions; mm_iommu_get() should be used instead. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit ab7032e793f9ad799ca2692046fba5baed6d2a86 Author: Alexey Kardashevskiy Date: Wed Dec 19 19:52:13 2018 +1100 powerpc/ioda/npu: Call skiboot's hot reset hook when disabling NPU2 The skiboot firmware has a hot reset handler which fences the NVIDIA V100 GPU RAM on Witherspoons and makes accesses no-op instead of throwing HMIs: https://github.com/open-power/skiboot/commit/fca2b2b839a67 Now we are going to pass V100 via VFIO which most certainly involves KVM guests which are often terminated without getting a chance to offline GPU RAM so we end up with a running machine with misconfigured memory. Accessing this memory produces hardware management interrupts (HMI) which bring the host down. To suppress HMIs, this wires up this hot reset hook to vfio_pci_disable() via pci_disable_device() which switches NPU2 to a safe mode and prevents HMIs. Signed-off-by: Alexey Kardashevskiy Acked-by: Alistair Popple Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit ffca395b11c4a5a6df6d6345f794b0e3d578e2d0 Author: Christophe Leroy Date: Wed Nov 28 09:27:04 2018 +0000 powerpc/mm: Fix reporting of kernel execute faults on the 8xx On the 8xx, no-execute is set via PPP bits in the PTE. Therefore a no-exec fault generates DSISR_PROTFAULT error bits, not DSISR_NOEXEC_OR_G. This patch adds DSISR_PROTFAULT in the test mask. Fixes: d3ca587404b3 ("powerpc/mm: Fix reporting of kernel execute faults") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 623d154305c06c83924b8fd2afbfdeba3b396fb7 Author: Jason Gunthorpe Date: Thu Dec 20 16:39:26 2018 -0700 IB/mlx5: Fix wrong error unwind The destroy_workqueue on error unwind is missing, and the code jumps to the wrong exit label. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e7c4d8e6045171896d763c551b90c672fb5ab42b Author: YueHaibing Date: Fri Dec 21 02:05:57 2018 +0000 IB/mlx4: Remove set but not used variable 'pd' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/mlx4/qp.c: In function '_mlx4_ib_destroy_qp': drivers/infiniband/hw/mlx4/qp.c:1612:22: warning: variable 'pd' set but not used [-Wunused-but-set-variable] Fixes: e00b64f7c54c ("RDMA: Cleanup undesired pd->uobject usage") Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit ab66dcc76d6ab8fae9d69d149ae38c42605e7fc5 Author: Firoz Khan Date: Mon Dec 17 16:10:36 2018 +0530 powerpc: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_32/64.h and syscall_table_32/64/c32/spu.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32/spu.h files by the syscall table generation script invoked by parisc/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/systbl.S file. Signed-off-by: Firoz Khan Signed-off-by: Michael Ellerman commit aff8503932004d10eec4d550ec3527117fe18724 Author: Firoz Khan Date: Mon Dec 17 16:10:34 2018 +0530 powerpc: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add or modify the system calls in the respective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implementation across all architectures. The system call table generation script is added in syscalls directory which contain the script to generate both uapi header file and system call table files. The syscall.tbl file will be the input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. - Compat entry name, if required. syscallhdr.sh and syscalltbl.sh will generate uapi header- unistd_32/64.h and syscall_table_32/64/c32/spu.h files respectively. File syscall_table_32/64/c32/spu.h is incl- uded by syscall.S - the real system call table. Both *.sh files will parse the content syscall.tbl to generate the header and table files. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Michael Ellerman commit fbf508da744053ff289777d6dd6e11ca8682be49 Author: Firoz Khan Date: Mon Dec 17 16:10:35 2018 +0530 powerpc: split compat syscall table out from native table PowerPC uses a syscall table with native and compat calls interleaved, which is a slightly simpler way to define two matching tables. As we move to having the tables generated, that advantage is no longer important, but the interleaved table gets in the way of using the same scripts as on the other archit- ectures. Split out a new compat_sys_call_table symbol that contains all the compat calls, and leave the main table for the nat- ive calls, to more closely match the method we use every- where else. Suggested-by: Arnd Bergmann Signed-off-by: Firoz Khan Signed-off-by: Michael Ellerman commit a11b763d617070a88267e2102e975b2cfc99b5a7 Author: Firoz Khan Date: Mon Dec 17 16:10:33 2018 +0530 powerpc: move macro definition from asm/systbl.h Move the macro definition for compat_sys_sigsuspend from asm/systbl.h to the file which it is getting included. One of the patch in this patch series is generating uapi header and syscall table files. In order to come up with a common implimentation across all architecture, we need to do this change. This change will simplify the implementation of system call table generation script and help to come up a common implementation across all architecture. Signed-off-by: Firoz Khan Signed-off-by: Michael Ellerman commit 8a19eeeab66dfdd7c67bc8e3048ac0064e8943d7 Author: Firoz Khan Date: Mon Dec 17 16:10:32 2018 +0530 powerpc: add __NR_syscalls along with NR_syscalls NR_syscalls macro holds the number of system call exist in powerpc architecture. We have to change the value of NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the number of system call information. So we have two option to update NR_syscalls value. 1. Update NR_syscalls in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_sys- calls until we either add a new system call or delete existing system call. 2. We can keep this feature in above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_syscalls asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Michael Ellerman commit 2cd4bd192ee94848695c1c052d87913260e10f36 Author: Ram Pai Date: Thu Dec 20 12:03:30 2018 -0800 powerpc/pkeys: Fix handling of pkey state across fork() Protection key tracking information is not copied over to the mm_struct of the child during fork(). This can cause the child to erroneously allocate keys that were already allocated. Any allocated execute-only key is lost aswell. Add code; called by dup_mmap(), to copy the pkey state from parent to child explicitly. This problem was originally found by Dave Hansen on x86, which turns out to be a problem on powerpc aswell. Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") Cc: stable@vger.kernel.org # v4.16+ Reviewed-by: Thiago Jung Bauermann Signed-off-by: Ram Pai Signed-off-by: Michael Ellerman commit 2f07229f02d4c55affccd11a61af4fd4b94dc436 Author: Greg Kurz Date: Tue Dec 11 18:58:21 2018 +0100 ocxl: Fix endiannes bug in read_afu_name() The AFU Descriptor Template in the PCI config space has a Name Space field which is a 24 Byte ASCII character string of descriptive name space for the AFU. The OCXL driver read the string four characters at a time with pci_read_config_dword(). This optimization is valid on a little-endian system since this is PCI, but a big-endian system ends up with each subset of four characters in reverse order. This could be fixed by switching to read characters one by one. Another option is to swap the bytes if we're big-endian. Go for the latter with le32_to_cpu(). Cc: stable@vger.kernel.org # v4.16 Signed-off-by: Greg Kurz Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 34642d70ac7e5609e31c36edbf3b19e0d8833be7 Author: Breno Leitao Date: Mon Nov 26 18:12:01 2018 -0200 selftests/powerpc: Add checks for transactional sigreturn This is a new test case that creates a signal and starts a suspended transaction inside the signal handler. It returns from the signal handler with the CPU at suspended state, but without setting user context MSR Transaction State (TS) field. The kernel signal handler code should be able to handle this discrepancy instead of crashing. This code could be compiled and used to test 32 and 64-bits signal handlers. Signed-off-by: Breno Leitao Signed-off-by: Gustavo Romero Signed-off-by: Michael Ellerman commit 6f5b9f018f4c7686fd944d920209d1382d320e4e Author: Breno Leitao Date: Mon Nov 26 18:12:00 2018 -0200 powerpc/tm: Unset MSR[TS] if not recheckpointing There is a TM Bad Thing bug that can be caused when you return from a signal context in a suspended transaction but with ucontext MSR[TS] unset. This forces regs->msr[TS] to be set at syscall entrance (since the CPU state is transactional). It also calls treclaim() to flush the transaction state, which is done based on the live (mfmsr) MSR state. Since user context MSR[TS] is not set, then restore_tm_sigcontexts() is not called, thus, not executing recheckpoint, keeping the CPU state as not transactional. When calling rfid, SRR1 will have MSR[TS] set, but the CPU state is non transactional, causing the TM Bad Thing with the following stack: [ 33.862316] Bad kernel stack pointer 3fffd9dce3e0 at c00000000000c47c cpu 0x8: Vector: 700 (Program Check) at [c00000003ff7fd40] pc: c00000000000c47c: fast_exception_return+0xac/0xb4 lr: 00003fff865f442c sp: 3fffd9dce3e0 msr: 8000000102a03031 current = 0xc00000041f68b700 paca = 0xc00000000fb84800 softe: 0 irq_happened: 0x01 pid = 1721, comm = tm-signal-sigre Linux version 4.9.0-3-powerpc64le (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) WARNING: exception is not recoverable, can't continue The same problem happens on 32-bits signal handler, and the fix is very similar, if tm_recheckpoint() is not executed, then regs->msr[TS] should be zeroed. This patch also fixes a sparse warning related to lack of indentation when CONFIG_PPC_TRANSACTIONAL_MEM is set. Fixes: 2b0a576d15e0e ("powerpc: Add new transactional memory state to the signal context") CC: Stable # 3.10+ Signed-off-by: Breno Leitao Tested-by: Michal Suchánek Signed-off-by: Michael Ellerman commit 11be39584a2e283d2b2bc45f3202519aef703b7c Author: Breno Leitao Date: Mon Nov 26 18:11:59 2018 -0200 powerpc/tm: Print scratch value Usually a TM Bad Thing exception is raised due to three different problems. a) touching SPRs in an active transaction; b) using TM instruction with the facility disabled and c) setting a wrong MSR/SRR1 at RFID. The two initial cases are easy to identify by looking at the instructions. The latter case is harder, because the MSR is masked after RFID, so, it is very useful to look at the previous MSR (SRR1) before RFID as also the current and masked MSR. Since MSR is saved at paca just before RFID, this patch prints it if a TM Bad thing happen, helping to understand what is the invalid TM transition that is causing the exception. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 63a0d6b03b8e6fdd8c8ce5eec0ac04ef8e67d63f Author: Breno Leitao Date: Mon Nov 26 18:11:58 2018 -0200 powerpc/tm: Save MSR to PACA before RFID As other exit points, move SRR1 (MSR) into paca->tm_scratch, so, if there is a TM Bad Thing in RFID, it is easy to understand what was the SRR1 value being used. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit e1c3743e1a20647c53b719dbf28b48f45d23f2cd Author: Breno Leitao Date: Wed Nov 21 17:21:09 2018 -0200 powerpc/tm: Set MSR[TS] just prior to recheckpoint On a signal handler return, the user could set a context with MSR[TS] bits set, and these bits would be copied to task regs->msr. At restore_tm_sigcontexts(), after current task regs->msr[TS] bits are set, several __get_user() are called and then a recheckpoint is executed. This is a problem since a page fault (in kernel space) could happen when calling __get_user(). If it happens, the process MSR[TS] bits were already set, but recheckpoint was not executed, and SPRs are still invalid. The page fault can cause the current process to be de-scheduled, with MSR[TS] active and without tm_recheckpoint() being called. More importantly, without TEXASR[FS] bit set also. Since TEXASR might not have the FS bit set, and when the process is scheduled back, it will try to reclaim, which will be aborted because of the CPU is not in the suspended state, and, then, recheckpoint. This recheckpoint will restore thread->texasr into TEXASR SPR, which might be zero, hitting a BUG_ON(). kernel BUG at /build/linux-sf3Co9/linux-4.9.30/arch/powerpc/kernel/tm.S:434! cpu 0xb: Vector: 700 (Program Check) at [c00000041f1576d0] pc: c000000000054550: restore_gprs+0xb0/0x180 lr: 0000000000000000 sp: c00000041f157950 msr: 8000000100021033 current = 0xc00000041f143000 paca = 0xc00000000fb86300 softe: 0 irq_happened: 0x01 pid = 1021, comm = kworker/11:1 kernel BUG at /build/linux-sf3Co9/linux-4.9.30/arch/powerpc/kernel/tm.S:434! Linux version 4.9.0-3-powerpc64le (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) enter ? for help [c00000041f157b30] c00000000001bc3c tm_recheckpoint.part.11+0x6c/0xa0 [c00000041f157b70] c00000000001d184 __switch_to+0x1e4/0x4c0 [c00000041f157bd0] c00000000082eeb8 __schedule+0x2f8/0x990 [c00000041f157cb0] c00000000082f598 schedule+0x48/0xc0 [c00000041f157ce0] c0000000000f0d28 worker_thread+0x148/0x610 [c00000041f157d80] c0000000000f96b0 kthread+0x120/0x140 [c00000041f157e30] c00000000000c0e0 ret_from_kernel_thread+0x5c/0x7c This patch simply delays the MSR[TS] set, so, if there is any page fault in the __get_user() section, it does not have regs->msr[TS] set, since the TM structures are still invalid, thus avoiding doing TM operations for in-kernel exceptions and possible process reschedule. With this patch, the MSR[TS] will only be set just before recheckpointing and setting TEXASR[FS] = 1, thus avoiding an interrupt with TM registers in invalid state. Other than that, if CONFIG_PREEMPT is set, there might be a preemption just after setting MSR[TS] and before tm_recheckpoint(), thus, this block must be atomic from a preemption perspective, thus, calling preempt_disable/enable() on this code. It is not possible to move tm_recheckpoint to happen earlier, because it is required to get the checkpointed registers from userspace, with __get_user(), thus, the only way to avoid this undesired behavior is delaying the MSR[TS] set. The 32-bits signal handler seems to be safe this current issue, but, it might be exposed to the preemption issue, thus, disabling preemption in this chunk of code. Changes from v2: * Run the critical section with preempt_disable. Fixes: 87b4e5393af7 ("powerpc/tm: Fix return of active 64bit signals") Cc: stable@vger.kernel.org (v3.9+) Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit d53ec8af56d5163f8a42e961ece3aeb5c560e79d Author: Steve Wise Date: Thu Dec 20 14:00:11 2018 -0800 RDMA/iwcm: Don't copy past the end of dev_name() string We now use dev_name(&ib_device->dev) instead of ib_device->name in iwpm messages. The name field in struct device is a const char *, where as ib_device->name is a char array of size IB_DEVICE_NAME_MAX, and it is pre-initialized to zeros. Since iw_cm_map() was using memcpy() to copy in the device name, and copying IWPM_DEVNAME_SIZE bytes, it ends up copying past the end of the source device name string and copying random bytes. This results in iwpmd failing the REGISTER_PID request from iwcm. Thus port mapping is broken. Validate the device and if names, and use strncpy() to inialize the entire message field. Fixes: 896de0090a85 ("RDMA/core: Use dev_name instead of ibdev->name") Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe commit ae59a7e1945bc2245bbb587071ca737e00daf443 Author: Suraj Jitindar Singh Date: Fri Dec 21 14:28:43 2018 +1100 KVM: PPC: Book3S HV: Keep rc bits in shadow pgtable in sync with host The rc bits contained in ptes are used to track whether a page has been accessed and whether it is dirty. The accessed bit is used to age a page and the dirty bit to track whether a page is dirty or not. Now that we support nested guests there are three ptes which track the state of the same page: - The partition-scoped page table in the L1 guest, mapping L2->L1 address - The partition-scoped page table in the host for the L1 guest, mapping L1->L0 address - The shadow partition-scoped page table for the nested guest in the host, mapping L2->L0 address The idea is to attempt to keep the rc state of these three ptes in sync, both when setting and when clearing rc bits. When setting the bits we achieve consistency by: - Initially setting the bits in the shadow page table as the 'and' of the other two. - When updating in software the rc bits in the shadow page table we ensure the state is consistent with the other two locations first, and update these before reflecting the change into the shadow page table. i.e. only set the bits in the L2->L0 pte if also set in both the L2->L1 and the L1->L0 pte. When clearing the bits we achieve consistency by: - The rc bits in the shadow page table are only cleared when discarding a pte, and we don't need to record this as if either bit is set then it must also be set in the pte mapping L1->L0. - When L1 clears an rc bit in the L2->L1 mapping it __should__ issue a tlbie instruction - This means we will discard the pte from the shadow page table meaning the mapping will have to be setup again. - When setup the pte again in the shadow page table we will ensure consistency with the L2->L1 pte. - When the host clears an rc bit in the L1->L0 mapping we need to also clear the bit in any ptes in the shadow page table which map the same gfn so we will be notified if a nested guest accesses the page. This case is what this patch specifically concerns. - We can search the nest_rmap list for that given gfn and clear the same bit from all corresponding ptes in shadow page tables. - If a nested guest causes either of the rc bits to be set by software in future then we will update the L1->L0 pte and maintain consistency. With the process outlined above we aim to maintain consistency of the 3 pte locations where we track rc for a given guest page. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 90165d3da0760a0353518740ac307f0d81c4e400 Author: Suraj Jitindar Singh Date: Fri Dec 21 14:28:42 2018 +1100 KVM: PPC: Book3S HV: Introduce kvmhv_update_nest_rmap_rc_list() Introduce a function kvmhv_update_nest_rmap_rc_list() which for a given nest_rmap list will traverse it, find the corresponding pte in the shadow page tables, and if it still maps the same host page update the rc bits accordingly. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 8b23eee4e55a32a2b51a180dfd27a8d214acc7a1 Author: Suraj Jitindar Singh Date: Fri Dec 21 14:28:41 2018 +1100 KVM: PPC: Book3S HV: Apply combination of host and l1 pte rc for nested guest The shadow page table contains ptes for translations from nested guest address to host address. Currently when creating these ptes we take the rc bits from the pte for the L1 guest address to host address translation. This is incorrect as we must also factor in the rc bits from the pte for the nested guest address to L1 guest address translation (as contained in the L1 guest partition table for the nested guest). By not calculating these bits correctly L1 may not have been correctly notified when it needed to update its rc bits in the partition table it maintains for its nested guest. Modify the code so that the rc bits in the resultant pte for the L2->L0 translation are the 'and' of the rc bits in the L2->L1 pte and the L1->L0 pte, also accounting for whether this was a write access when setting the dirty bit. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 8400f8740651c1a3081c30b46004451c448f4d5f Author: Suraj Jitindar Singh Date: Fri Dec 21 14:28:40 2018 +1100 KVM: PPC: Book3S HV: Align gfn to L1 page size when inserting nest-rmap entry Nested rmap entries are used to store the translation from L1 gpa to L2 gpa when entries are inserted into the shadow (nested) page tables. This rmap list is located by indexing the rmap array in the memslot by L1 gfn. When we come to search for these entries we only know the L1 page size (which could be PAGE_SIZE, 2M or a 1G page) and so can only select a gfn aligned to that size. This means that when we insert the entry, so we can find it later, we need to align the gfn we use to select the rmap list in which to insert the entry to L1 page size as well. By not doing this we were missing nested rmap entries when modifying L1 ptes which were for a page also passed through to an L2 guest. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit bec6e03b5ea5618479548bce1da4e16088e25edc Author: Suraj Jitindar Singh Date: Fri Dec 21 14:28:39 2018 +1100 KVM: PPC: Book3S HV: Hold kvm->mmu_lock across updating nested pte rc bits We already hold the kvm->mmu_lock spin lock across updating the rc bits in the pte for the L1 guest. Continue to hold the lock across updating the rc bits in the pte for the nested guest as well to prevent invalidations from occurring. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit fa2323325e8b0c61ded1e3d2c6f12f3aa43c4e30 Author: Peter Oskolkov Date: Thu Dec 20 16:41:52 2018 -0800 selftests: net: reuseport_addr_any: silence clang warning Clang does not recognize that calls to error() terminate execution and complains about uninitialized variable use that happens after calls to error(). This noop patchset fixes this. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit a02e8964eaf9271a8a5fcc0c55bd13f933bafc56 Author: Willem de Bruijn Date: Thu Dec 20 17:14:54 2018 -0500 virtio-net: ethtool configurable LRO Virtio-net devices negotiate LRO support with the host. Display the initially negotiated state with ethtool -k. Also allow configuring it with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures LRO for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. Virtio-net negotiates TSO4 and TSO6 separately, but ethtool does not distinguish between the two. Display LRO as on only if any offload is active. RTNL is held while calling virtnet_set_features, same as on the path from virtnet_xdp_set. Changes v1 -> v2 - allow ethtool config (-K) only if VIRTIO_NET_F_CTRL_GUEST_OFFLOADS - show LRO as enabled if any LRO variant is enabled - do not allow configuration while XDP is active - differentiate current features from the capable set, to restore on XDP down only those features that were active on XDP up - move test out of VIRTIO_NET_F_CSUM/TSO branch, which is tx only Signed-off-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit c3e533692527046fb55020e7fac8c4272644ba45 Merge: 339bbff2d6e00 8527f9df04a8b Author: David S. Miller Date: Thu Dec 20 18:20:26 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Support for destination MAC in ipset, from Stefano Brivio. 2) Disallow all-zeroes MAC address in ipset, also from Stefano. 3) Add IPSET_CMD_GET_BYNAME and IPSET_CMD_GET_BYINDEX commands, introduce protocol version number 7, from Jozsef Kadlecsik. A follow up patch to fix ip_set_byindex() is also included in this batch. 4) Honor CTA_MARK_MASK from ctnetlink, from Andreas Jaggi. 5) Statify nf_flow_table_iterate(), from Taehee Yoo. 6) Use nf_flow_table_iterate() to simplify garbage collection in nf_flow_table logic, also from Taehee Yoo. 7) Don't use _bh variants of call_rcu(), rcu_barrier() and synchronize_rcu_bh() in Netfilter, from Paul E. McKenney. 8) Remove NFC_* cache definition from the old caching infrastructure. 9) Remove layer 4 port rover in NAT helpers, use random port instead, from Florian Westphal. 10) Use strscpy() in ipset, from Qian Cai. 11) Remove NF_NAT_RANGE_PROTO_RANDOM_FULLY branch now that random port is allocated by default, from Xiaozhou Liu. 12) Ignore NF_NAT_RANGE_PROTO_RANDOM too, from Florian Westphal. 13) Limit port allocation selection routine in NAT to avoid softlockup splats when most ports are in use, from Florian. 14) Remove unused parameters in nf_ct_l4proto_unregister_sysctl() from Yafang Shao. 15) Direct call to nf_nat_l4proto_unique_tuple() instead of indirection, from Florian Westphal. 16) Several patches to remove all layer 4 NAT indirections, remove nf_nat_l4proto struct, from Florian Westphal. 17) Fix RTP/RTCP source port translation when SNAT is in place, from Alin Nastac. 18) Selective rule dump per chain, from Phil Sutter. 19) Revisit CLUSTERIP target, this includes a deadlock fix from netns path, sleep in atomic, remove bogus WARN_ON_ONCE() and disallow mismatching IP address and MAC address. Patchset from Taehee Yoo. 20) Update UDP timeout to stream after 2 seconds, from Florian. 21) Shrink UDP established timeout to 120 seconds like TCP timewait. 22) Sysctl knobs to set GRE timeouts, from Yafang Shao. 23) Move seq_print_acct() to conntrack core file, from Florian. 24) Add enum for conntrack sysctl knobs, also from Florian. 25) Place nf_conntrack_acct, nf_conntrack_helper, nf_conntrack_events and nf_conntrack_timestamp knobs in the core, from Florian Westphal. As a side effect, shrink netns_ct structure by removing obsolete sysctl anchors, also from Florian. ==================== Signed-off-by: David S. Miller commit 339bbff2d6e005a5586adeffc3d69a0eea50a764 Merge: e770454fabde2 1cf4a0ccc506b Author: David S. Miller Date: Thu Dec 20 17:31:36 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-12-21 The following pull-request contains BPF updates for your *net-next* tree. There is a merge conflict in test_verifier.c. Result looks as follows: [...] }, { "calls: cross frame pruning", .insns = { [...] .prog_type = BPF_PROG_TYPE_SOCKET_FILTER, .errstr_unpriv = "function calls to other bpf functions are allowed for root only", .result_unpriv = REJECT, .errstr = "!read_ok", .result = REJECT, }, { "jset: functional", .insns = { [...] { "jset: unknown const compare not taken", .insns = { BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_get_prandom_u32), BPF_JMP_IMM(BPF_JSET, BPF_REG_0, 1, 1), BPF_LDX_MEM(BPF_B, BPF_REG_8, BPF_REG_9, 0), BPF_EXIT_INSN(), }, .prog_type = BPF_PROG_TYPE_SOCKET_FILTER, .errstr_unpriv = "!read_ok", .result_unpriv = REJECT, .errstr = "!read_ok", .result = REJECT, }, [...] { "jset: range", .insns = { [...] }, .prog_type = BPF_PROG_TYPE_SOCKET_FILTER, .result_unpriv = ACCEPT, .result = ACCEPT, }, The main changes are: 1) Various BTF related improvements in order to get line info working. Meaning, verifier will now annotate the corresponding BPF C code to the error log, from Martin and Yonghong. 2) Implement support for raw BPF tracepoints in modules, from Matt. 3) Add several improvements to verifier state logic, namely speeding up stacksafe check, optimizations for stack state equivalence test and safety checks for liveness analysis, from Alexei. 4) Teach verifier to make use of BPF_JSET instruction, add several test cases to kselftests and remove nfp specific JSET optimization now that verifier has awareness, from Jakub. 5) Improve BPF verifier's slot_type marking logic in order to allow more stack slot sharing, from Jiong. 6) Add sk_msg->size member for context access and add set of fixes and improvements to make sock_map with kTLS usable with openssl based applications, from John. 7) Several cleanups and documentation updates in bpftool as well as auto-mount of tracefs for "bpftool prog tracelog" command, from Quentin. 8) Include sub-program tags from now on in bpf_prog_info in order to have a reliable way for user space to get all tags of the program e.g. needed for kallsyms correlation, from Song. 9) Add BTF annotations for cgroup_local_storage BPF maps and implement bpf fs pretty print support, from Roman. 10) Fix bpftool in order to allow for cross-compilation, from Ivan. 11) Update of bpftool license to GPLv2-only + BSD-2-Clause in order to be compatible with libbfd and allow for Debian packaging, from Jakub. 12) Remove an obsolete prog->aux sanitation in dump and get rid of version check for prog load, from Daniel. 13) Fix a memory leak in libbpf's line info handling, from Prashant. 14) Fix cpumap's frame alignment for build_skb() so that skb_shared_info does not get unaligned, from Jesper. 15) Fix test_progs kselftest to work with older compilers which are less smart in optimizing (and thus throwing build error), from Stanislav. 16) Cleanup and simplify AF_XDP socket teardown, from Björn. 17) Fix sk lookup in BPF kselftest's test_sock_addr with regards to netns_id argument, from Andrey. ==================== Signed-off-by: David S. Miller commit da7903092b880b25971ca9103cb0b934a44ace2b Author: Gustavo A. R. Silva Date: Tue Nov 27 22:30:27 2018 -0600 scsi: isci: request: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, a dash is added as a token in order to separate the "Fall through" annotation from the rest of the comment on the same line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Acked-by: Artur Paszkiewicz Signed-off-by: Martin K. Petersen commit 87be32b3ad27d7696cdc4340644894ba4c7a89e5 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:30:11 2018 -0600 scsi: isci: remote_node_context: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, a dash is added as a token in order to separate the "Fall through" annotations from the rest of the comment on the same line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Acked-by: Artur Paszkiewicz Signed-off-by: Martin K. Petersen commit 4f09ac9d96ceea2a0532e17b614b9b2835041c17 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:30:01 2018 -0600 scsi: isci: remote_device: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, a dash is added as a token in order to separate the "fall through" annotations from the rest of the comment on the same line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Acked-by: Artur Paszkiewicz Signed-off-by: Martin K. Petersen commit 1aba50b880e1834a6f2f1cb0df23ccce3e84b8a8 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:29:55 2018 -0600 scsi: isci: phy: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 703127 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Artur Paszkiewicz Signed-off-by: Martin K. Petersen commit c2332b004907229b19a5687004290464df7c3e9d Author: Fred Herard Date: Wed Nov 21 12:04:43 2018 -0500 scsi: iscsi: Capture iscsi debug messages using tracepoints This commit enhances iscsi initiator modules to capture iscsi debug messages using linux kernel tracepoint facility: https://www.kernel.org/doc/Documentation/trace/tracepoints.txt The following tracepoint events have been created under the iscsi tracepoint event group: iscsi_dbg_conn - to capture connection debug messages (libiscsi module) iscsi_dbg_session - to capture session debug messages (libiscsi module) iscsi_dbg_eh - to capture error handling debug messages (libiscsi module) iscsi_dbg_tcp - to capture iscsi tcp debug messages (libiscsi_tcp module) iscsi_dbg_sw_tcp - to capture iscsi sw tcp debug messages (iscsi_tcp module) iscsi_dbg_trans_session - to cpature iscsi transsport sess debug messages (scsi_transport_iscsi module) iscsi_dbg_trans_conn - to capture iscsi transport conn debug messages (scsi_transport_iscsi module) [mkp: typos] Signed-off-by: Fred Herard Reviewed-by: Rajan Shanmugavelu Reviewed-by: Lee Duncan Reviewed-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit e770454fabde2e0f8fb3e5039a2b6df8f128bc9b Merge: a6ae520defea9 cda261f421ba2 Author: David S. Miller Date: Thu Dec 20 17:01:17 2018 -0800 Merge branch 'expand-txtimestamp-selftest' Willem de Bruijn says: ==================== expand txtimestamp selftest Convert the existing txtimestamp test to run as part of kselftest and return a pass/fail. Also expand the variations of timestamping tested, including packet sockets, ipv6 raw and dgram and passing options using cmsg. These are enough changes to split across a few patches, even if all changes are only this one test. ==================== Signed-off-by: David S. Miller commit cda261f421ba2682e25f46beb229172706fc7fcd Author: Willem de Bruijn Date: Thu Dec 20 16:22:54 2018 -0500 selftests: add txtimestamp kselftest Run the transmit timestamp tests as part of kselftests. Add a txtimestamp.sh test script that runs most variants: ipv4/ipv6, tcp/udp/raw/raw_ipproto/pf_packet, data/nodata, setsockopt/cmsg. The script runs tests with netem delays. Refine txtimestamp.c to validate results. Take expected netem delays as input and compare against real timestamps. To run without dependencies, add a listener socket to be able to connect in the case of TCP. Add the timestamping directory to the kselftests Makefile. Build all the binaries. Only run verified txtimestamp.sh. Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit b52354aa068ee362a58ebb92e8bd0d0e18008364 Author: Willem de Bruijn Date: Thu Dec 20 16:22:53 2018 -0500 selftests: expand txtimestamp with ipv6 dgram + raw and pf_packet Expand the transmit timestamp regression test with support for missing protocols: ipv6 datagram and raw and pf_packet. Also refine resolve_hostname to independently request AF_INET or AF_INET6 addresses. Else, ipv4 addresses may be returned as AF_INET6. Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 7085f47fcdc599cb387a472e4cd9def739954119 Author: Willem de Bruijn Date: Thu Dec 20 16:22:52 2018 -0500 selftests: expand txtimestamp with cmsg support Commit 3dd17e63f513 ("sock: accept SO_TIMESTAMPING flags in socket cmsg") added support for passing tx timestamping options per-call in sendmsg. Expand the txtimestamp test with support for this feature. Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit a6ae520defea9986a422032eda7f0bdbb1368a18 Author: Peter Oskolkov Date: Thu Dec 20 10:51:49 2018 -0800 net: seg6.h: remove an unused #include A minor code cleanup. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 4c5765e4851008812488686619e8592783b28b33 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:32:52 2018 -0600 scsi: myrb: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1465234 ("Missing break in switch") Addresses-Coverity-ID: 1465238 ("Missing break in switch") Addresses-Coverity-ID: 1465242 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7fb1b8ca8fa1ee34ffc328f17f78da68c7cc04e6 Author: Sam Protsenko Date: Thu Dec 20 20:29:20 2018 +0200 ppp: Move PFC decompression to PPP generic layer Extract "Protocol" field decompression code from transport protocols to PPP generic layer, where it actually belongs. As a consequence, this patch fixes incorrect place of PFC decompression in L2TP driver (when it's not PPPOX_BOUND) and also enables this decompression for other protocols, like PPPoE. Protocol field decompression also happens in PPP Multilink Protocol code and in PPP compression protocols implementations (bsd, deflate, mppe). It looks like there is no easy way to get rid of that, so it was decided to leave it as is, but provide those cases with appropriate comments instead. Changes in v2: - Fix the order of checking skb data room and proto decompression - Remove "inline" keyword from ppp_decompress_proto() - Don't split line before function name - Prefix ppp_decompress_proto() function with "__" - Add ppp_decompress_proto() function with skb data room checks - Add description for introduced functions - Fix comments (as per review on mailing list) Signed-off-by: Sam Protsenko Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller commit c7a082e4242fd8cd21a441071e622f87c16bdacc Author: Qian Cai Date: Thu Dec 13 08:27:27 2018 -0500 scsi: megaraid: fix out-of-bound array accesses UBSAN reported those with MegaRAID SAS-3 3108, [ 77.467308] UBSAN: Undefined behaviour in drivers/scsi/megaraid/megaraid_sas_fp.c:117:32 [ 77.475402] index 255 is out of range for type 'MR_LD_SPAN_MAP [1]' [ 77.481677] CPU: 16 PID: 333 Comm: kworker/16:1 Not tainted 4.20.0-rc5+ #1 [ 77.488556] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.50 06/01/2018 [ 77.495791] Workqueue: events work_for_cpu_fn [ 77.500154] Call trace: [ 77.502610] dump_backtrace+0x0/0x2c8 [ 77.506279] show_stack+0x24/0x30 [ 77.509604] dump_stack+0x118/0x19c [ 77.513098] ubsan_epilogue+0x14/0x60 [ 77.516765] __ubsan_handle_out_of_bounds+0xfc/0x13c [ 77.521767] mr_update_load_balance_params+0x150/0x158 [megaraid_sas] [ 77.528230] MR_ValidateMapInfo+0x2cc/0x10d0 [megaraid_sas] [ 77.533825] megasas_get_map_info+0x244/0x2f0 [megaraid_sas] [ 77.539505] megasas_init_adapter_fusion+0x9b0/0xf48 [megaraid_sas] [ 77.545794] megasas_init_fw+0x1ab4/0x3518 [megaraid_sas] [ 77.551212] megasas_probe_one+0x2c4/0xbe0 [megaraid_sas] [ 77.556614] local_pci_probe+0x7c/0xf0 [ 77.560365] work_for_cpu_fn+0x34/0x50 [ 77.564118] process_one_work+0x61c/0xf08 [ 77.568129] worker_thread+0x534/0xa70 [ 77.571882] kthread+0x1c8/0x1d0 [ 77.575114] ret_from_fork+0x10/0x1c [ 89.240332] UBSAN: Undefined behaviour in drivers/scsi/megaraid/megaraid_sas_fp.c:117:32 [ 89.248426] index 255 is out of range for type 'MR_LD_SPAN_MAP [1]' [ 89.254700] CPU: 16 PID: 95 Comm: kworker/u130:0 Not tainted 4.20.0-rc5+ #1 [ 89.261665] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.50 06/01/2018 [ 89.268903] Workqueue: events_unbound async_run_entry_fn [ 89.274222] Call trace: [ 89.276680] dump_backtrace+0x0/0x2c8 [ 89.280348] show_stack+0x24/0x30 [ 89.283671] dump_stack+0x118/0x19c [ 89.287167] ubsan_epilogue+0x14/0x60 [ 89.290835] __ubsan_handle_out_of_bounds+0xfc/0x13c [ 89.295828] MR_LdRaidGet+0x50/0x58 [megaraid_sas] [ 89.300638] megasas_build_io_fusion+0xbb8/0xd90 [megaraid_sas] [ 89.306576] megasas_build_and_issue_cmd_fusion+0x138/0x460 [megaraid_sas] [ 89.313468] megasas_queue_command+0x398/0x3d0 [megaraid_sas] [ 89.319222] scsi_dispatch_cmd+0x1dc/0x8a8 [ 89.323321] scsi_request_fn+0x8e8/0xdd0 [ 89.327249] __blk_run_queue+0xc4/0x158 [ 89.331090] blk_execute_rq_nowait+0xf4/0x158 [ 89.335449] blk_execute_rq+0xdc/0x158 [ 89.339202] __scsi_execute+0x130/0x258 [ 89.343041] scsi_probe_and_add_lun+0x2fc/0x1488 [ 89.347661] __scsi_scan_target+0x1cc/0x8c8 [ 89.351848] scsi_scan_channel.part.3+0x8c/0xc0 [ 89.356382] scsi_scan_host_selected+0x130/0x1f0 [ 89.361002] do_scsi_scan_host+0xd8/0xf0 [ 89.364927] do_scan_async+0x9c/0x320 [ 89.368594] async_run_entry_fn+0x138/0x420 [ 89.372780] process_one_work+0x61c/0xf08 [ 89.376793] worker_thread+0x13c/0xa70 [ 89.380546] kthread+0x1c8/0x1d0 [ 89.383778] ret_from_fork+0x10/0x1c This is because when populating Driver Map using firmware raid map, all non-existing VDs set their ldTgtIdToLd to 0xff, so it can be skipped later. From drivers/scsi/megaraid/megaraid_sas_base.c , memset(instance->ld_ids, 0xff, MEGASAS_MAX_LD_IDS); From drivers/scsi/megaraid/megaraid_sas_fp.c , /* For non existing VDs, iterate to next VD*/ if (ld >= (MAX_LOGICAL_DRIVES_EXT - 1)) continue; However, there are a few places that failed to skip those non-existing VDs due to off-by-one errors. Then, those 0xff leaked into MR_LdRaidGet(0xff, map) and triggered the out-of-bound accesses. Fixes: 51087a8617fe ("megaraid_sas : Extended VD support") Signed-off-by: Qian Cai Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit a8cc10e232f1fc651b6465ee120e7ecec06dc2f7 Author: Gustavo A. R. Silva Date: Thu Dec 20 09:43:53 2018 -0600 scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1475400 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit e69fbf31ca2cf6d6a2afedd0f8b30dcd10e76049 Merge: aa9d6e0f33aea fbbae71d374f2 Author: David S. Miller Date: Thu Dec 20 16:47:10 2018 -0800 Merge tag 'wireless-drivers-next-for-davem-2018-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.21 Last set of patches for 4.21. mt76 is still in very active development and having some refactoring as well as new features. But also other drivers got few new features and fixes. Major changes: ath10k * add amsdu support for QCA6174 monitor mode * report tx rate using the new ieee80211_tx_rate_update() API * wcn3990 support is not experimental anymore iwlwifi * support for FW version 43 for 9000 and 22000 series brcmfmac * add support for CYW43012 SDIO chipset * add the raw 4354 PCIe device ID for unprogrammed Cypress boards mwifiex * add NL80211_STA_INFO_RX_BITRATE support mt76 * use the same firmware for mt76x2e and mt76x2u * mt76x0e survey support * more unification between mt76x2 and mt76x0 * mt76x0e AP mode support * mt76x0e DFS support * rework and fix tx status handling for mt76x0 and mt76x2 ==================== Signed-off-by: David S. Miller commit 7223d80912d8977219b09f1605483026d79e704b Author: YueHaibing Date: Thu Dec 20 02:43:44 2018 +0000 scsi: fcoe: remove set but not used variable 'port' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/fcoe/fcoe.c: In function 'fcoe_recv_frame': drivers/scsi/fcoe/fcoe.c:1672:20: warning: variable 'port' set but not used [-Wunused-but-set-variable] drivers/scsi/fcoe/fcoe.c: In function 'fcoe_device_notification': drivers/scsi/fcoe/fcoe.c:1861:20: warning: variable 'port' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit aa9d6e0f33aea8a1879e7e53fe0e436943f9ce0c Author: Stephen Hemminger Date: Thu Dec 20 09:52:28 2018 -0800 linux/netlink.h: drop unnecessary extern prefix Don't need extern prefix before function prototypes. Checkpatch has complained about this for a couple of years. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 7de333090a803a6678c3848d4eed1031bbc3dc95 Merge: 639c1b2625af6 676f4bb168ca8 Author: David S. Miller Date: Thu Dec 20 16:42:39 2018 -0800 Merge branch 'ipv4-Prevent-user-triggerable-warning' Ido Schimmel says: ==================== net: ipv4: Prevent user triggerable warning Patch #1 prevents a user triaggerable warning in the flow dissector by setting 'skb->dev' in skbs used for IPv4 output route get requests. Patch #2 adds a test case that triggers the warning without the first patch. I have audited all the RTM_GETROUTE handlers and could not find any other callpath where an skb is passed to the flow dissector with both 'skb->dev' and 'skb->sk' cleared. ==================== Signed-off-by: David S. Miller commit 676f4bb168ca855adb957ad7f470984d9391c320 Author: Ido Schimmel Date: Thu Dec 20 17:03:29 2018 +0000 selftests: rtnetlink: Add a test case for multipath route get Without previous patch a warning would be generated upon multipath route get when FIB multipath hash policy is to use a 5-tuple for multipath hash calculation. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 21f9477537059344e4705719137f6695de93b662 Author: Ido Schimmel Date: Thu Dec 20 17:03:27 2018 +0000 net: ipv4: Set skb->dev for output route resolution When user requests to resolve an output route, the kernel synthesizes an skb where the relevant parameters (e.g., source address) are set. The skb is then passed to ip_route_output_key_hash_rcu() which might call into the flow dissector in case a multipath route was hit and a nexthop needs to be selected based on the multipath hash. Since both 'skb->dev' and 'skb->sk' are not set, a warning is triggered in the flow dissector [1]. The warning is there to prevent codepaths from silently falling back to the standard flow dissector instead of the BPF one. Therefore, instead of removing the warning, set 'skb->dev' to the loopback device, as its not used for anything but resolving the correct namespace. [1] WARNING: CPU: 1 PID: 24819 at net/core/flow_dissector.c:764 __skb_flow_dissect+0x314/0x16b0 ... RSP: 0018:ffffa0df41fdf650 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8bcded232000 RCX: 0000000000000000 RDX: ffffa0df41fdf7e0 RSI: ffffffff98e415a0 RDI: ffff8bcded232000 RBP: ffffa0df41fdf760 R08: 0000000000000000 R09: 0000000000000000 R10: ffffa0df41fdf7e8 R11: ffff8bcdf27a3000 R12: ffffffff98e415a0 R13: ffffa0df41fdf7e0 R14: ffffffff98dd2980 R15: ffffa0df41fdf7e0 FS: 00007f46f6897680(0000) GS:ffff8bcdf7a80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055933e95f9a0 CR3: 000000021e636000 CR4: 00000000001006e0 Call Trace: fib_multipath_hash+0x28c/0x2d0 ? fib_multipath_hash+0x28c/0x2d0 fib_select_path+0x241/0x32f ? __fib_lookup+0x6a/0xb0 ip_route_output_key_hash_rcu+0x650/0xa30 ? __alloc_skb+0x9b/0x1d0 inet_rtm_getroute+0x3f7/0xb80 ? __alloc_pages_nodemask+0x11c/0x2c0 rtnetlink_rcv_msg+0x1d9/0x2f0 ? rtnl_calcit.isra.24+0x120/0x120 netlink_rcv_skb+0x54/0x130 rtnetlink_rcv+0x15/0x20 netlink_unicast+0x20a/0x2c0 netlink_sendmsg+0x2d1/0x3d0 sock_sendmsg+0x39/0x50 ___sys_sendmsg+0x2a0/0x2f0 ? filemap_map_pages+0x16b/0x360 ? __handle_mm_fault+0x108e/0x13d0 __sys_sendmsg+0x63/0xa0 ? __sys_sendmsg+0x63/0xa0 __x64_sys_sendmsg+0x1f/0x30 do_syscall_64+0x5a/0x120 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: d0e13a1488ad ("flow_dissector: lookup netns by skb->sk if skb->dev is NULL") Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 639c1b2625af66501b24c8082231a83d4f5ad56b Author: Steen Hegelund Date: Thu Dec 20 14:16:31 2018 +0100 net: mscc: ocelot: Register poll timeout should be wall time not attempts When doing indirect access in the Ocelot chip, a command is setup, issued and then we need to poll until the result is ready. The polling timeout is specified in milliseconds in the datasheet and not in register access attempts. It is not a bug on the currently supported platform, but we observed that the code does not work properly on other platforms that we want to support as the timing requirements there are different. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit e57b2945aa654e48f85a41e8917793c64ecb9de8 Author: Yanjiang Jin Date: Thu Dec 20 16:32:35 2018 +0800 scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown() We must free all irqs during shutdown, else kexec's 2nd kernel would hang in pqi_wait_for_completion_io() as below: Call trace: pqi_wait_for_completion_io pqi_submit_raid_request_synchronous.constprop.78+0x23c/0x310 [smartpqi] pqi_configure_events+0xec/0x1f8 [smartpqi] pqi_ctrl_init+0x814/0xca0 [smartpqi] pqi_pci_probe+0x400/0x46c [smartpqi] local_pci_probe+0x48/0xb0 pci_device_probe+0x14c/0x1b0 really_probe+0x218/0x3fc driver_probe_device+0x70/0x140 __driver_attach+0x11c/0x134 bus_for_each_dev+0x70/0xc8 driver_attach+0x30/0x38 bus_add_driver+0x1f0/0x294 driver_register+0x74/0x12c __pci_register_driver+0x64/0x70 pqi_init+0xd0/0x10000 [smartpqi] do_one_initcall+0x60/0x1d8 do_init_module+0x64/0x1f8 load_module+0x10ec/0x1350 __se_sys_finit_module+0xd4/0x100 __arm64_sys_finit_module+0x28/0x34 el0_svc_handler+0x104/0x160 el0_svc+0x8/0xc This happens only in the following combinations: 1. smartpqi is built as module, not built-in; 2. We have a disk connected to smartpqi card; 3. Both kexec's 1st and 2nd kernels use this disk as Rootfs' mount point. Signed-off-by: Yanjiang Jin Acked-by: Don Brace Signed-off-by: Martin K. Petersen commit 463561e6b9facf93ef90b65d2c75a80c7262d778 Author: Colin Ian King Date: Thu Dec 20 16:50:50 2018 +0000 neighbour: remove stray semicolon Currently the stray semicolon means that the final term in the addition is being missed. Fix this by removing it. Cleans up clang warning: net/core/neighbour.c:2821:9: warning: expression result unused [-Wunused-value] Fixes: 82cbb5c631a0 ("neighbour: register rtnl doit handler") Signed-off-by: Colin Ian King Acked-By: Roopa Prabhu Signed-off-by: David S. Miller commit e52c9e0710d2f5d54a521d620a230ac2ae646dc7 Author: Don Brace Date: Thu Dec 20 19:32:12 2018 -0500 scsi: smartpqi: fix build warnings Fix kbuild warning and fallout from linux-next -Wimplicit-fallthrough. [mkp: added fall through statements] Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 0db6896ff6332ba694f1e61b93ae3b2640317633 Author: Mahesh Salgaonkar Date: Mon Aug 20 13:47:32 2018 +0530 powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. For fadump to work successfully there should not be any holes in reserved memory ranges where kernel has asked firmware to move the content of old kernel memory in event of crash. Now that fadump uses CMA for reserved area, this memory area is now not protected from hot-remove operations unless it is cma allocated. Hence, fadump service can fail to re-register after the hot-remove operation, if hot-removed memory belongs to fadump reserved region. To avoid this make sure that memory from fadump reserved area is not hot-removable if fadump is registered. However, if user still wants to remove that memory, he can do so by manually stopping fadump service before hot-remove operation. Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit f86593be1e7f5405b980bb4b11640250ac81d7cb Author: Mahesh Salgaonkar Date: Mon Aug 20 13:47:24 2018 +0530 powerpc/fadump: Throw proper error message on fadump registration failure fadump fails to register when there are holes in reserved memory area. This can happen if user has hot-removed a memory that falls in the fadump reserved memory area. Throw a meaningful error message to the user in such case. Signed-off-by: Mahesh Salgaonkar [mpe: is_reserved_memory_area_contiguous() returns bool, unsplit string] Signed-off-by: Michael Ellerman commit a4e92ce8e4c8275bacfe3529d6ac85d54a233d87 Author: Mahesh Salgaonkar Date: Mon Aug 20 13:47:17 2018 +0530 powerpc/fadump: Reservationless firmware assisted dump One of the primary issues with Firmware Assisted Dump (fadump) on Power is that it needs a large amount of memory to be reserved. On large systems with TeraBytes of memory, this reservation can be quite significant. In some cases, fadump fails if the memory reserved is insufficient, or if the reserved memory was DLPAR hot-removed. In the normal case, post reboot, the preserved memory is filtered to extract only relevant areas of interest using the makedumpfile tool. While the tool provides flexibility to determine what needs to be part of the dump and what memory to filter out, all supported distributions default this to "Capture only kernel data and nothing else". We take advantage of this default and the Linux kernel's Contiguous Memory Allocator (CMA) to fundamentally change the memory reservation model for fadump. Instead of setting aside a significant chunk of memory nobody can use, this patch uses CMA instead, to reserve a significant chunk of memory that the kernel is prevented from using (due to MIGRATE_CMA), but applications are free to use it. With this fadump will still be able to capture all of the kernel memory and most of the user space memory except the user pages that were present in CMA region. Essentially, on a P9 LPAR with 2 cores, 8GB RAM and current upstream: [root@zzxx-yy10 ~]# free -m total used free shared buff/cache available Mem: 7557 193 6822 12 541 6725 Swap: 4095 0 4095 With this patch: [root@zzxx-yy10 ~]# free -m total used free shared buff/cache available Mem: 8133 194 7464 12 475 7338 Swap: 4095 0 4095 Changes made here are completely transparent to how fadump has traditionally worked. Thanks to Aneesh Kumar and Anshuman Khandual for helping us understand CMA and its usage. TODO: - Handle case where CMA reservation spans nodes. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Mahesh Salgaonkar Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman commit 08fb726df13778a54592aaa1deea6a154637c868 Author: Mahesh Salgaonkar Date: Thu Dec 13 11:17:31 2018 +0530 powerpc/powernv: Move opal_power_control_init() call in opal_init(). opal_power_control_init() depends on opal message notifier to be initialized, which is done in opal_init()->opal_message_init(). But both these initialization are called through machine initcalls and it all depends on in which order they being called. So far these are called in correct order (may be we got lucky) and never saw any issue. But it is clearer to control initialization order explicitly by moving opal_power_control_init() into opal_init(). Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman commit ae6263cc33742d1c179510b6aadd31108fe89a89 Author: Markus Elfring Date: Thu Jan 11 18:40:23 2018 +0100 powerpc/4xx: Delete an unnecessary return statement in two functions The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected functions. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman commit a8d5dadae59f5866ac3b68cb993d532c3bf761e4 Author: Markus Elfring Date: Thu Jan 11 18:28:54 2018 +0100 powerpc/4xx: Delete error message for a ENOMEM in two functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman commit 52930bc6e87191af3894bec302774f334e117f7b Author: Markus Elfring Date: Thu Jan 11 18:10:02 2018 +0100 powerpc/4xx: Use seq_putc() in ocm_debugfs_show() A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman commit b52106a040e6f86848b05be1b4317479836e94d4 Author: Markus Elfring Date: Thu Jan 11 18:08:08 2018 +0100 powerpc/4xx: Combine four seq_printf() calls into two in ocm_debugfs_show() Some data were printed into a sequence by four separate function calls. Print the same data by two single function calls instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman commit 96d19d70e1012383365c68e271d99f833a2d85f3 Author: Christophe Leroy Date: Thu Dec 20 07:25:28 2018 +0000 powerpc/8xx: Allow pinning IMMR TLB when using early debug console CONFIG_EARLY_DEBUG_CPM requires IMMR area TLB to be pinned otherwise it doesn't survive MMU_init, and the boot fails. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 5f639e5fad18f2673f1788cb04bde2bb2f8fe6da Author: Oliver O'Halloran Date: Wed Nov 14 17:19:58 2018 +1100 powerpc/powernv: Remove PCI_MSI ifdef checks CONFIG_PCI_MSI was made mandatory by commit a311e738b6d8 ("powerpc/powernv: Make PCI non-optional") so the #ifdef checks around CONFIG_PCI_MSI here can be removed entirely. Signed-off-by: Oliver O'Halloran Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman commit a083787680f80f2c16316a1d907bf8d3f6b42311 Author: Alexandre Belloni Date: Tue Nov 20 16:12:30 2018 +0100 powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved" Fix a spelling mistake in a register description. Signed-off-by: Alexandre Belloni Signed-off-by: Michael Ellerman commit 0c9108b083706330cd5484d121fbb0ad67e8f647 Author: Ravi Bangoria Date: Wed Nov 21 09:26:37 2018 +0530 Powerpc/perf: Wire up PMI throttling Commit 14c63f17b1fde ("perf: Drop sample rate when sampling is too slow") introduced a way to throttle PMU interrupts if we're spending too much time just processing those. Wire up powerpc PMI handler to use this infrastructure. We have throttling of the *rate* of interrupts, but this adds throttling based on the *time taken* to process the interrupts. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman commit 962ad710f7d64d441c4e02c0e9e5fddd1aeb54b7 Author: Tristram Ha Date: Wed Dec 19 18:59:31 2018 -0800 net: dsa: microchip: fix unicast frame leak Port partitioning is done by enabling UNICAST_VLAN_BOUNDARY and changing the default port membership of 0x7f to other values such that there is no communication between ports. In KSZ9477 the member for port 1 is 0x41; port 2, 0x42; port 3, 0x44; port 4, 0x48; port 5, 0x50; and port 7, 0x60. Port 6 is the host port. Setting a zero value can be used to stop port from receiving. However, when UNICAST_VLAN_BOUNDARY is disabled and the unicast addresses are already learned in the dynamic MAC table, setting zero still allows devices connected to those ports to communicate. This does not apply to multicast and broadcast addresses though. To prevent these leaks and make the function of port membership consistent UNICAST_VLAN_BOUNDARY should never be disabled. Note that UNICAST_VLAN_BOUNDARY is enabled by default in KSZ9477. Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Tristram Ha Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3a6d528a5e0179b1e8b20033c5cb7384dd7a830d Author: David S. Miller Date: Thu Dec 20 16:14:22 2018 -0800 vxlan: Correct merge error. When resolving the conflict wrt. the vxlan_fdb_update call in vxlan_changelink() I made the last argument false instead of true. Fix this. Signed-off-by: David S. Miller commit 8527f9df04a8b5f6ee24ae7bdda5a94d73c7d243 Author: Florian Westphal Date: Tue Dec 18 23:04:50 2018 +0100 netfilter: netns: shrink netns_ct struct remove the obsolete sysctl anchors and move auto_assign_helper_warned to avoid/cover a hole. Reduces size by 40 bytes on 64 bit. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e716431356df2bc935f6516b14ebcff9fd3cc0d0 Merge: c337680fc1f43 a64917446eafc Author: David S. Miller Date: Thu Dec 20 15:51:55 2018 -0800 Merge tag 'mlx5-updates-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2018-12-19 This series adds some misc updates and the support for tunnels over VLAN tc offloads. From Miroslav Lichvar, patches #1,2 1) Update timecounter at least twice per counter overflow 2) Extend PTP gettime function to read system clock From Gavi Teitz, patch #3 3) Increase VF representors' SQ size to 128 From Eli Britstein and Or Gerlitz, patches #4-10 4) Adds the capability to support tunnels over VLAN device. Patch 4 avoids crash for TC flow with egress upper devices Patch 5 refactors tunnel routing devs into a helper function Patch 6 avoids crash for TC encap flows with vlan on underlay Patches 7-8 refactor encap tunnel header preparing code. Patch 9 adds support for building VLAN tagged ETH header. Patch 10 adds support for tunnel routing to VLAN device. From Aviv, patches 11,12 to fix earlier VF lag series 5) Fix query_nic_sys_image_guid() error during init 6) Fix LAG requirement when CONFIG_MLX5_ESWITCH is off ==================== Signed-off-by: David S. Miller commit fc3893fd5cfc3c654ae4b9c8d7ee39ea70e4bdc6 Author: Florian Westphal Date: Tue Dec 18 23:04:49 2018 +0100 netfilter: conntrack: remove empty pernet fini stubs after moving sysctl handling into single place, the init functions can't fail anymore and some of the fini functions are empty. Remove them and change return type to void. This also simplifies error unwinding in conntrack module init path. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit cb2833ed0044f910877b810077bc6da2ac5f09a2 Author: Florian Westphal Date: Tue Dec 18 23:04:48 2018 +0100 netfilter: conntrack: merge ecache and timestamp sysctl tables with main one Similar to previous change, this time for eache and timestamp. Unlike helper and acct, these can be disabled at build time, so they need ifdef guards. Next patch will remove a few (now obsolete) functions. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d912dec124288553c734e25fef3ecfef92f894db Author: Florian Westphal Date: Tue Dec 18 23:04:47 2018 +0100 netfilter: conntrack: merge acct and helper sysctl table with main one Needless copy&paste, just handle all in one. Next patch will handle acct and timestamp, which have similar functions. Intentionally leaves cruft behind, will be cleaned up in a followup patch. The obsolete sysctl pointers in netns_ct struct are left in place and removed in a single change, as changes to netns trigger rebuild of almost all files. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4a65798a94089f31883eee705f580e4b2d734ecf Author: Florian Westphal Date: Tue Dec 18 23:04:46 2018 +0100 netfilter: conntrack: add mnemonics for sysctl table Its a bit hard to see what table[3] really lines up with, so add human-readable mnemonics and use them for initialisation. This makes it easier to see e.g. which sysctls are not exported to unprivileged userns. objdiff shows no changes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4b216e21cfca77132ef0215f553eda91eb1d038b Author: Florian Westphal Date: Tue Dec 18 23:04:45 2018 +0100 netfilter: conntrack: un-export seq_print_acct Only one caller, just place it where its needed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a0badcc6652f9871a9908d67297f910cba657b0f Author: Yafang Shao Date: Tue Dec 18 21:14:07 2018 +0800 netfilter: conntrack: register sysctl table for gre This patch adds two sysctl knobs for GRE: net.netfilter.nf_conntrack_gre_timeout = 30 net.netfilter.nf_conntrack_gre_timeout_stream = 180 Update the Documentation as well. Signed-off-by: Yafang Shao Signed-off-by: Pablo Neira Ayuso commit c337680fc1f43a5e184099ee8784c868244f02e7 Merge: 6eea2db21012b 03a84ea3d8c53 Author: David S. Miller Date: Thu Dec 20 15:48:55 2018 -0800 Merge branch 'mlxsw-Two-usability-improvements' Ido Schimmel says: ==================== mlxsw: Two usability improvements This patchset contains two small improvements in the mlxsw driver. The first one, in patches #1-#2, relieves the user from the need to configure a VLAN interface and only later the corresponding VXLAN tunnel. The issue is explained in detail in the first patch. The second improvement is described below and allows the user to make use of VID 1 by having the driver use the reserved 4095 VID for untagged traffic. VLAN entries on a given port can be associated with either a bridge or a router. For example, if swp1.10 is assigned an IP address and swp1.20 is enslaved to a VLAN-unaware bridge, then both {Port 1, VID 10} and {Port 1, VID 20} would be associated with a filtering identifier (FID) of the correct type. In case swp1 itself is assigned an IP address or enslaved to a VLAN-unaware bridge, then a FID would be associated with {Port 1, VID 1}. Using VID 1 for this purpose means that VLAN devices with VID 1 cannot be created over mlxsw ports, as this VID is (ab)used as the default VLAN. Instead of using VID 1 for this purpose, we can use VID 4095 which is reserved for internal use and cannot be configured by either the 8021q or the bridge driver. Patches #3-#7 perform small and non-functional changes that finally allow us to switch to VID 4095 as the default VID in patch #8. Patch #9 removes the limitation about creation of VLAN devices with VID 1 over mlxsw ports. Patches #10-#11 add test cases. ==================== Signed-off-by: David S. Miller commit 03a84ea3d8c537f04b862972e2132dff86a4e93d Author: Ido Schimmel Date: Thu Dec 20 19:42:37 2018 +0000 selftests: forwarding: Add router test with VID 1 Previous patches made it possible to setup VLAN devices with VID 1 over mlxsw ports. Verify this functionality actually works by conducting a simple router test over VID 1. Adding this test as a generic test since it can be run using veth pairs and it can also be useful for other physical devices where VID 1 was considered reserved (knowingly or not). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 29b1e34efd39ee9f6bc2db3fafad0e4615f15475 Author: Ido Schimmel Date: Thu Dec 20 19:42:35 2018 +0000 selftests: mlxsw: Adjust test regarding VID 1 Previous patches made it possible to create VLAN devices with VID 1 over mlxsw ports. Adjust the test to verify such an operation succeeds. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d8a1f7ab2c1fb4ee53c16ad048ad045770d99f14 Author: Ido Schimmel Date: Thu Dec 20 19:42:34 2018 +0000 mlxsw: spectrum: Remove limitation regarding VID 1 VID 1 is not reserved anymore, so remove the check that prevented the creation of VLAN devices with this VID over mlxsw ports. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 0417d25e7dad2ab61a42afb07bb0b9512fd0e6df Author: Ido Schimmel Date: Thu Dec 20 19:42:33 2018 +0000 mlxsw: spectrum: Switch to VID 4095 as default VID There is no need to abuse VID 1 anymore and we can instead use VID 4095 as the default VLAN, which will be configured on the port throughout its lifetime. The OVS join / leave functions are changed to enable VIDs 1-4094 (inclusive) instead of 2-4095. This because VID 4095 is now the default VLAN instead of 1. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 16f6aceb72e7e27efae092c1020c5f0b312a4745 Author: Ido Schimmel Date: Thu Dec 20 19:42:32 2018 +0000 mlxsw: spectrum: Add an helper function to cleanup VLAN entries VLAN entries on a port can be associated with either a bridge VLAN or a router port. Before the VLAN entry is destroyed these associations need to be cleaned up. Currently, this is always invoked from the function which destroys the VLAN entry, but next patch is going to skip the destruction of the default entry when a port in unlinked from a LAG. The above does not mean that the associations should not be cleaned up, so add a helper that will be invoked from both call sites. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 346fca3b58cbe0505f4328276e46e22ffc9a11d8 Author: Ido Schimmel Date: Thu Dec 20 19:42:30 2018 +0000 mlxsw: spectrum: Store pointer to default port VLAN in port struct Subsequent patches will need to access the default port VLAN. Since this VLAN will exist throughout the lifetime of the port, simply store it in the port's struct. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit ab6c3b79ec7b1d10cec411015eb5a7599e2b7e52 Author: Ido Schimmel Date: Thu Dec 20 19:42:29 2018 +0000 mlxsw: spectrum: Allow controlling destruction of default port VLAN The function allows flushing all the existing VLAN entries on a port. It is invoked when a port is destroyed and when it is unlinked from a LAG. In the latter case, when moving to the new default VLAN, there will not be a need to destroy the default VLAN entry. Therefore, add an argument that allows to control whether the default port VLAN should be destroyed or not. Currently it is always set to 'true'. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 262e1ff91c3bc9d6b082c123fc7035c1e6347469 Author: Ido Schimmel Date: Thu Dec 20 19:42:27 2018 +0000 mlxsw: spectrum: Set PVID during port initialization Currently, the driver does not set the port's PVID when initializing a new port. This is because the driver is using VID 1 as PVID which is the firmware default. Subsequent patches are going to change the PVID the driver is setting when initializing a new port. Prepare for that by explicitly setting the port's PVID. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit a2d2a20553f0b74a2872fba58a152e93341eddd7 Author: Ido Schimmel Date: Thu Dec 20 19:42:26 2018 +0000 mlxsw: spectrum: Replace hard-coded default VID with a define Subsequent patches are going to replace the current default VID (1) with VLAN_N_VID - 1 (4095). Prepare for this conversion by replacing the hard-coded '1' with a define. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 9d15dceb8a36919897d52ec8e4a6e6efa57f9f19 Author: Ido Schimmel Date: Thu Dec 20 19:42:25 2018 +0000 selftests: mlxsw: Add a test case for L3 VNI Previous patch added the ability to offload a VXLAN tunnel used for L3 VNI when it is present in the VLAN-aware bridge before the corresponding VLAN interface is configured. This patch adds a test case to verify that. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f40be47a3e409724104d370385817d90215149b4 Author: Ido Schimmel Date: Thu Dec 20 19:42:23 2018 +0000 mlxsw: spectrum_router: Do not force specific configuration order In symmetric routing, the only two members in the VLAN corresponding to the L3 VNI are the router port and the VXLAN tunnel. In case the VXLAN device is already enslaved to the bridge and only later the VLAN interface is configured, the tunnel will not be offloaded. The reason for this is that when the router interface (RIF) corresponding to the VLAN interface is configured, it calls the core fid_get() API which does not check if NVE should be enabled on the FID. Instead, call into the bridge code which will check if NVE should be enabled on the FID. This effectively means that the same code path is used to retrieve a FID when either a local port or a router port joins the FID. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 294304e4c522d797b7ea8200ab74354843fa68e9 Author: Florian Westphal Date: Tue Dec 18 00:05:29 2018 +0100 netfilter: conntrack: udp: set stream timeout to 2 minutes We have no explicit signal when a UDP stream has terminated, peers just stop sending. For suspected stream connections a timeout of two minutes is sane to keep NAT mapping alive a while longer. It matches tcp conntracks 'timewait' default timeout value. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d535c8a69c1924e70186d80be0a9cecaf475f166 Author: Florian Westphal Date: Thu Dec 6 11:50:49 2018 +0100 netfilter: conntrack: udp: only extend timeout to stream mode after 2s Currently DNS resolvers that send both A and AAAA queries from same source port can trigger stream mode prematurely, which results in non-early-evictable conntrack entry for three minutes, even though DNS requests are done in a few milliseconds. Add a two second grace period where we continue to use the ordinary 30-second default timeout. Its enough for DNS request/response traffic, even if two request/reply packets are involved. ASSURED is still set, else conntrack (and thus a possible NAT mapping ...) gets zapped too in case conntrack table runs full. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6eea2db21012b287f880edeeffc42f49c3a057d7 Merge: 2be09de7d6a06 643bae17fd4cc Author: David S. Miller Date: Thu Dec 20 15:34:30 2018 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-12-20 This series contains updates to e100, igb, ixgbe, i40e and ice drivers. I replaced spinlocks for mutex locks to reduce the latency on CPU0 for igb when updating the statistics. This work was based off a patch provided by Jan Jablonsky, which was against an older version of the igb driver. Jesus adjusts the receive packet buffer size from 32K to 30K when running in QAV mode, to stay within 60K for total packet buffer size for igb. Vinicius adds igb kernel documentation regarding the CBS algorithm and its implementation in the i210 family of NICs. YueHaibing from Huawei fixed the e100 driver that was potentially passing a NULL pointer, so use the kernel macro IS_ERR_OR_NULL() instead. Konstantin Khorenko fixes i40e where we were not setting up the neigh_priv_len in our net_device, which caused the driver to read beyond the neighbor entry allocated memory. Miroslav Lichvar extends the PTP gettime() to read the system clock by adding support for PTP_SYS_OFFSET_EXTENDED ioctl in i40e. Young Xiao fixed the ice driver to only enable NAPI on q_vectors that actually have transmit and receive rings. Kai-Heng Feng fixes an igb issue that when placed in suspend mode, the NIC does not wake up when a cable is plugged in. This was due to the driver not setting PME during runtime suspend. Stephen Douthit enables the ixgbe driver allow DSA devices to use the MII interface to talk to switches. ==================== Signed-off-by: David S. Miller commit bb7e22a8ab00ff9ba911a45ba8784cef9e6d6f7a Author: Huy Nguyen Date: Tue Dec 18 14:15:56 2018 +0200 IB/mlx5: Fix long EEH recover time with NVMe offloads On NVMe offloads connection with many IO queues, EEH takes long time to recover. The culprit is the synchronize_srcu in the destroy_mkey. The solution is to use synchronize_srcu only for ODP mkey. Fixes: b4cfe447d47b ("IB/mlx5: Implement on demand paging by adding support for MMU notifiers") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1cf4a0ccc506b5c027afc5eaf3fddc83f96f31e7 Merge: 77ea5f4cbe208 28cb6f1eaffdc Author: Daniel Borkmann Date: Thu Dec 20 23:47:10 2018 +0100 Merge branch 'bpf-sockmap-fixes-and-improvements' John Fastabend says: ==================== Set of bpf fixes and improvements to make sockmap with kTLS usable with "real" applications. This set came as the fallout of pulling kTLS+sockmap into Cilium[1] and running in container environment. Roughly broken into three parts, Patches 1-3: resolve/improve handling of size field in sk_msg_md Patch 4: it became difficult to use this in Cilium when the SK_PASS verdict was not correctly handle. So handle the case correctly. Patch 5-8: Set of issues found while running OpenSSL TX kTLS enabled applications. This resolves the most obvious issues and gets applications using kTLS TX up and running with sock{map|has}. Other than the "sk_msg, zap ingress queue on psock down" (PATCH 6/8) which can potentially cause a WARNING the issues fixed in this series do not cause kernel side warnings, BUG, etc. but instead cause stalls and other odd behavior in the user space applications when using kTLS with BPF policies applied. Primarily tested with 'curl' compiled with latest openssl and also 'openssl s_client/s_server' containers using Cilium network plugin with docker/k8s. Some basic testing with httpd was also enabled. Cilium CI tests will be added shortly to cover these cases as well. We also have 'wrk' and other test and benchmarking tools we can run now. We have two more sets of patches currently under testing that will be sent shortly to address a few more issues. First the OpenSSL RX kTLS side breaks when both sk_msg and sk_skb_verdict programs are used with kTLS, the sk_skb_verdict programs are not enforced. Second skmsg needs to call into tcp stack to send to indicate consumed data. ==================== Signed-off-by: Daniel Borkmann commit 28cb6f1eaffdc5a6a9707cac55f4a43aa3fd7895 Author: John Fastabend Date: Thu Dec 20 11:35:36 2018 -0800 bpf: tls_sw, init TLS ULP removes BPF proto hooks The existing code did not expect users would initialize the TLS ULP without subsequently calling the TLS TX enabling socket option. If the application tries to send data after the TLS ULP enable op but before the TLS TX enable op the BPF sk_msg verdict program is skipped. This patch resolves this by converting the ipv4 sock ops to be calculated at init time the same way ipv6 ops are done. This pulls in any changes to the sock ops structure that have been made after the socket was created including the changes from adding the socket to a sock{map|hash}. This was discovered by running OpenSSL master branch which calls the TLS ULP setsockopt early in TLS handshake but only enables the TLS TX path once the handshake has completed. As a result the datapath missed the initial handshake messages. Fixes: 02c558b2d5d6 ("bpf: sockmap, support for msg_peek in sk_msg with redirect ingress") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 0608c69c9a805c6264689d7eab4203eab88cf1da Author: John Fastabend Date: Thu Dec 20 11:35:35 2018 -0800 bpf: sk_msg, sock{map|hash} redirect through ULP A sockmap program that redirects through a kTLS ULP enabled socket will not work correctly because the ULP layer is skipped. This fixes the behavior to call through the ULP layer on redirect to ensure any operations required on the data stream at the ULP layer continue to be applied. To do this we add an internal flag MSG_SENDPAGE_NOPOLICY to avoid calling the BPF layer on a redirected message. This is required to avoid calling the BPF layer multiple times (possibly recursively) which is not the current/expected behavior without ULPs. In the future we may add a redirect flag if users _do_ want the policy applied again but this would need to work for both ULP and non-ULP sockets and be opt-in to avoid breaking existing programs. Also to avoid polluting the flag space with an internal flag we reuse the flag space overlapping MSG_SENDPAGE_NOPOLICY with MSG_WAITFORONE. Here WAITFORONE is specific to recv path and SENDPAGE_NOPOLICY is only used for sendpage hooks. The last thing to verify is user space API is masked correctly to ensure the flag can not be set by user. (Note this needs to be true regardless because we have internal flags already in-use that user space should not be able to set). But for completeness we have two UAPI paths into sendpage, sendfile and splice. In the sendfile case the function do_sendfile() zero's flags, ./fs/read_write.c: static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, size_t count, loff_t max) { ... fl = 0; #if 0 /* * We need to debate whether we can enable this or not. The * man page documents EAGAIN return for the output at least, * and the application is arguably buggy if it doesn't expect * EAGAIN on a non-blocking file descriptor. */ if (in.file->f_flags & O_NONBLOCK) fl = SPLICE_F_NONBLOCK; #endif file_start_write(out.file); retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl); } In the splice case the pipe_to_sendpage "actor" is used which masks flags with SPLICE_F_MORE. ./fs/splice.c: static int pipe_to_sendpage(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { ... more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; ... } Confirming what we expect that internal flags are in fact internal to socket side. Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit a136678c0bdbb650daff5df5eec1dab960e074a7 Author: John Fastabend Date: Thu Dec 20 11:35:34 2018 -0800 bpf: sk_msg, zap ingress queue on psock down In addition to releasing any cork'ed data on a psock when the psock is removed we should also release any skb's in the ingress work queue. Otherwise the skb's eventually get free'd but late in the tear down process so we see the WARNING due to non-zero sk_forward_alloc. void sk_stream_kill_queues(struct sock *sk) { ... WARN_ON(sk->sk_forward_alloc); ... } Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 552de91068828daef50a227a665068cf8dde835e Author: John Fastabend Date: Thu Dec 20 11:35:33 2018 -0800 bpf: sk_msg, fix socket data_ready events When a skb verdict program is in-use and either another BPF program redirects to that socket or the new SK_PASS support is used the data_ready callback does not wake up application. Instead because the stream parser/verdict is using the sk data_ready callback we wake up the stream parser/verdict block. Fix this by adding a helper to check if the stream parser block is enabled on the sk and if so call the saved pointer which is the upper layers wake up function. This fixes application stalls observed when an application is waiting for data in a blocking read(). Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 51199405f967207de372d9b60989eb87d7ae8809 Author: John Fastabend Date: Thu Dec 20 11:35:32 2018 -0800 bpf: skb_verdict, support SK_PASS on RX BPF path Add SK_PASS verdict support to SK_SKB_VERDICT programs. Now that support for redirects exists we can implement SK_PASS as a redirect to the same socket. This simplifies the BPF programs and avoids an extra map lookup on RX path for simple visibility cases. Further, reduces user (BPF programmer in this context) confusion when their program drops skb due to lack of support. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 7a69c0f250568e6ab72f401b2c69aa0e666c94f2 Author: John Fastabend Date: Thu Dec 20 11:35:31 2018 -0800 bpf: skmsg, replace comments with BUILD bug Enforce comment on structure layout dependency with a BUILD_BUG_ON to ensure the condition is maintained. Suggested-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit bc1b4f013b5029b4c8b63fb9ba8d084119486d7b Author: John Fastabend Date: Thu Dec 20 11:35:30 2018 -0800 bpf: sk_msg, improve offset chk in _is_valid_access The check for max offset in sk_msg_is_valid_access uses sizeof() which is incorrect because it would allow accessing possibly past the end of the struct in the padded case. Further, it doesn't preclude accessing any padding that may be added in the middle of a struct. All told this makes it fragile to rely on. To fix this explicitly check offsets with fields using the bpf_ctx_range() and bpf_ctx_range_till() macros. For reference the current structure layout looks as follows (reported by pahole) struct sk_msg_md { union { void * data; /* 8 */ }; /* 0 8 */ union { void * data_end; /* 8 */ }; /* 8 8 */ __u32 family; /* 16 4 */ __u32 remote_ip4; /* 20 4 */ __u32 local_ip4; /* 24 4 */ __u32 remote_ip6[4]; /* 28 16 */ __u32 local_ip6[4]; /* 44 16 */ __u32 remote_port; /* 60 4 */ /* --- cacheline 1 boundary (64 bytes) --- */ __u32 local_port; /* 64 4 */ __u32 size; /* 68 4 */ /* size: 72, cachelines: 2, members: 10 */ /* last cacheline: 8 bytes */ }; So there should be no padding at the moment but fixing this now prevents future errors. Reported-by: Alexei Starovoitov Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 9ee79a65d176e5815877aa148acc956e4cc90c53 Author: John Fastabend Date: Thu Dec 20 11:35:29 2018 -0800 bpf: sk_msg, fix sk_msg_md access past end test Currently, the test to ensure reads past the end of the sk_msg_md data structure fail is incorrectly expecting success. Fix this typo and use correct expected error. Fixes: 945a47d87cee ("bpf: sk_msg, add tests for size field") Reported-by: Alexei Starovoitov Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 64711f9a47d4defa90417f5e8db8ed0060bc3275 Author: Max Filippov Date: Wed Dec 19 19:48:37 2018 -0800 xtensa: implement jump_label support Use 3-byte 'nop' and 'j' instructions that are always present. Don't let assembler mark a spot right after patchable 'j' instruction as unreachable and later put literals or padding bytes there. Add separate implementations of patch_text for SMP and UP cases, avoiding use of atomics on UP. Signed-off-by: Max Filippov commit 77ea5f4cbe2084db9ab021ba73fb7eadf1610884 Author: Jesper Dangaard Brouer Date: Wed Dec 19 17:00:23 2018 +0100 bpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't The frame_size passed to build_skb must be aligned, else it is possible that the embedded struct skb_shared_info gets unaligned. For correctness make sure that xdpf->headroom in included in the alignment. No upstream drivers can hit this, as all XDP drivers provide an aligned headroom. This was discovered when playing with implementing XDP support for mvneta, which have a 2 bytes DSA header, and this Marvell ARM64 platform didn't like doing atomic operations on an unaligned skb_shinfo(skb)->dataref addresses. Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann commit 842a9c837e2017127250a93204368f13e660ed9d Author: Or Gerlitz Date: Tue Dec 11 18:10:43 2018 +0200 IB/mlx5: Simplify netdev unbinding When dealing with netdev unregister events, we just need to know that this is our currently bounded netdev. There's no need to do any further checks/queries. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 641d1207d2ed0ef21ff5ad61e067d630028e2f62 Author: Michael Guralnik Date: Sun Dec 9 11:58:06 2018 +0200 IB/core: Move query port to ioctl Add a method for query port under the uverbs global methods. Current ib_port_attr struct is passed as a single attribute and port_cap_flags2 is added as a new attribute to the function. Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4fa2813d26c82680216e535c18a690ca0c4e860a Author: Michael Guralnik Date: Sun Dec 9 11:58:05 2018 +0200 RDMA/nldev: Expose port_cap_flags2 port_cap_flags2 represents IBTA PortInfo:CapabilityMask2. The field safely extends the RDMA_NLDEV_ATTR_CAP_FLAGS operand as it was exported as 64 bit to allow this kind of extension. Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2e8039c656224b4a21e1947f45946d32a59bae53 Author: Michael Guralnik Date: Sun Dec 9 11:58:04 2018 +0200 IB/core: uverbs copy to struct or zero helper Add a helper to zero fill fields before copying data to UVERBS_ATTR_STRUCT. As UVERBS_ATTR_STRUCT can be used as an extensible struct, we want to make sure that if the user supplies us with a struct that has new fields that we are not aware of, we return them zeroed to the user. This helper should be used when using UVERBS_ATTR_STRUCT for an extendable data structure and there is a need to make sure that extended members of the struct, that the kernel doesn't handle, are returned zeroed to the user. This is needed due to the fact that UVERBS_ATTR_STRUCT allows non-zero values for members after 'last' member. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 24ad02c48c69c37427cc3412f6597493091eca3c Author: Andreas Klinger Date: Fri Dec 14 20:48:25 2018 +0100 gpio-omap.txt: add reg and interrupts properties Document properties reg and interrupts for OMAP GPIO controller bindings Also add unit address in node name of the example Signed-off-by: Andreas Klinger Acked-by: Linus Walleij Signed-off-by: Rob Herring commit 485773d3c5c7fa1462c0a6b36187922c2dcba914 Author: Lubomir Rintel Date: Mon Dec 3 12:47:10 2018 +0100 dt-bindings: mrvl,intc: fix a trivial typo s/whold/whole/. Signed-off-by: Lubomir Rintel Signed-off-by: Rob Herring commit f55c3ec42a97bca408f0208ec08e3382340c7be7 Author: Yuval Shaia Date: Fri Dec 14 08:05:49 2018 -0800 IB/rxe: Reuse code which sets port state Same code is executed in both rxe_param_set_add and rxe_notify functions. Make one function and call it from both places. Since both callers already have a rxe object use it directly instead of deriving it from the net device. Signed-off-by: Yuval Shaia Reviewed-by: Steve Wise   Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit d5108e69fe013ff47ab815b849caba9cc33ca1e5 Author: Parav Pandit Date: Fri Dec 14 00:32:42 2018 -0600 IB/rxe: Make counters thread safe Current rxe device counters are not thread safe. When multiple QPs are used, they can be racy. Make them thread safe by making it atomic64. Fixes: 0b1e5b99a48b ("IB/rxe: Add port protocol stats") Signed-off-by: Parav Pandit Signed-off-by: Jason Gunthorpe commit 6e3722baac048fdf95b867c5ee7e270718e8630d Author: Yishai Hadas Date: Wed Dec 19 16:28:15 2018 +0200 IB/mlx5: Use the correct commands for UMEM and UCTX allocation During testing the command format was changed to close a security hole. Revise the driver to use the command format that will actually be supported in GA firmware. Both the UMEM and UCTX are intended only for use by the kernel and cannot be executed using a general command. Since the UMEM and CTX are not part of the general object the caps bits were moved to be some log_xxx location in the general HCA caps. The firmware code was adapted as well to match the above. Fixes: a8b92ca1b0e5 ("IB/mlx5: Introduce DEVX") Signed-off-by: Yishai Hadas Reviewed-by: Achiad Shochat Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 425518cc5ede0d7a71886816368e4bef60e418db Author: Yishai Hadas Date: Wed Dec 19 16:28:11 2018 +0200 IB/mlx5: Use uid as part of alloc/dealloc transport domain Use uid as part of alloc/dealloc transport domain to let firmware manages the resources correctly. Fixes: d2d19121ae2f ("IB/mlx5: Set uid as part of TD commands") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1f000e1bfff42e960e5d4562213a95016acc712f Author: Nathan Chancellor Date: Thu Dec 20 12:38:56 2018 -0700 ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode Clang warns: drivers/acpi/tables.c:715:14: warning: unused variable 'amlcode' [-Wunused-variable] static void *amlcode __attribute__ ((weakref("AmlCode"))); ^ drivers/acpi/tables.c:716:14: warning: unused variable 'dsdt_amlcode' [-Wunused-variable] static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); ^ 2 warnings generated. The only uses of these variables are hiddem behind CONFIG_ACPI_CUSTOM_DSDT so do the same thing here. Fixes: 82e4eb4e9653 (ACPI / tables: add DSDT AmlCode new declaration name support) Signed-off-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki commit 98cff8b23ed1c763a029ee81ea300df0d153d07d Author: Lenny Szubowicz Date: Wed Dec 19 11:50:52 2018 -0500 ACPI/APEI: Clear GHES block_status before panic() In __ghes_panic() clear the block status in the APEI generic error status block for that generic hardware error source before calling panic() to prevent a second panic() in the crash kernel for exactly the same fatal error. Otherwise ghes_probe(), running in the crash kernel, would see an unhandled error in the APEI generic error status block and panic again, thereby precluding any crash dump. Signed-off-by: Lenny Szubowicz Signed-off-by: David Arcari Tested-by: Tyler Baicar Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit ed50edfb72352c4bee489b5b27418a30177cf38f Merge: bd1c24ccf9eb0 71bef2fd583be Author: Jason Gunthorpe Date: Thu Dec 20 13:24:50 2018 -0700 Merge branch 'mlx5-next' into rdma.git From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux mlx5 updates taken for dependencies on following patches. * branche 'mlx5-next': (23 commits) IB/mlx5: Introduce uid as part of alloc/dealloc transport domain net/mlx5: Add shared Q counter bits net/mlx5: Continue driver initialization despite debugfs failure net/mlx5: Fold the modify lag code into function net/mlx5: Add lag affinity info to log net/mlx5: Split the activate lag function into two routines net/mlx5: E-Switch, Introduce flow counter affinity IB/mlx5: Unify e-switch representors load approach between uplink and VFs net/mlx5: Use lowercase 'X' for hex values net/mlx5: Remove duplicated include from eswitch.c net/mlx5: Remove the get protocol device interface entry net/mlx5: Support extended destination format in flow steering command net/mlx5: E-Switch, Change vhca id valid bool field to bit flag net/mlx5: Introduce extended destination fields net/mlx5: Revise gre and nvgre key formats net/mlx5: Add monitor commands layout and event data net/mlx5: Add support for plugged-disabled cable status in PME net/mlx5: Add support for PCIe power slot exceeded error in PME net/mlx5: Rework handling of port module events net/mlx5: Move flow counters data structures from flow steering header ... commit 643bae17fd4ccb503cdc6d99c1b4fbd2c4ca6a78 Author: Steve Douthit Date: Thu Dec 6 15:50:43 2018 +0000 ixgbe: use mii_bus to handle MII related ioctls Use the mii_bus callbacks to address the entire clause 22/45 address space. Enables userspace to poke switch registers instead of a single PHY address. The ixgbe firmware may be polling PHYs in a way that is not protected by the mii_bus lock. This isn't new behavior, but as Andrew Lunn pointed out there are more addresses available for conflicts. Signed-off-by: Stephen Douthit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8fa10ef01260937eb540b4e9bbc3efa023595993 Author: Steve Douthit Date: Thu Dec 6 15:50:39 2018 +0000 ixgbe: register a mdiobus Most dsa devices expect a 'struct mii_bus' pointer to talk to switches via the MII interface. While this works for dsa devices, it will not work safely with Linux PHYs in all configurations since the firmware of the ixgbe device may be polling some PHY addresses in the background. Signed-off-by: Stephen Douthit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1fb3a7a75e2efcc83ef21f2434069cddd6fae6f5 Author: Kai-Heng Feng Date: Mon Dec 3 13:54:38 2018 +0800 igb: Fix an issue that PME is not enabled during runtime suspend I210 ethernet card doesn't wakeup when a cable gets plugged. It's because its PME is not set. Since commit 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3"), if the PCI state is saved, pci_pm_runtime_suspend() stops calling pci_finish_runtime_suspend(), which enables the PCI PME. To fix the issue, let's not to save PCI states when it's runtime suspend, to let the PCI subsystem enables PME. Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3") Signed-off-by: Kai-Heng Feng Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit eec903769b4ea476591ffff73bb7359f14f38c51 Author: Young Xiao Date: Thu Nov 29 01:54:10 2018 +0000 ice: Do not enable NAPI on q_vectors that have no rings If ice driver has q_vectors w/ active NAPI that has no rings, then this will result in a divide by zero error. To correct it I am updating the driver code so that we only support NAPI on q_vectors that have 1 or more rings allocated to them. See commit 13a8cd191a2b ("i40e: Do not enable NAPI on q_vectors that have no rings") for detail. Signed-off-by: Young Xiao Acked-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9a2d57a7a0626783a62d205f255d8227b212c14b Author: Miroslav Lichvar Date: Wed Nov 28 17:07:49 2018 +0100 i40e: extend PTP gettime function to read system clock This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Jacob Keller Signed-off-by: Miroslav Lichvar Tested-by: Andrew Bowers Acked-by: Jacob Keller Signed-off-by: Jeff Kirsher commit 31389b53b3e0b535867af9090a5d19ec64768d55 Author: Konstantin Khorenko Date: Fri Nov 23 19:10:28 2018 +0300 i40e: define proper net_device::neigh_priv_len Out of bound read reported by KASan. i40iw_net_event() reads unconditionally 16 bytes from neigh->primary_key while the memory allocated for "neighbour" struct is evaluated in neigh_alloc() as tbl->entry_size + dev->neigh_priv_len where "dev" is a net_device. But the driver does not setup dev->neigh_priv_len and we read beyond the neigh entry allocated memory, so the patch in the next mail fixes this. Signed-off-by: Konstantin Khorenko Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cd0d465bb697a9c7bf66a9fe940f7981232f1676 Author: YueHaibing Date: Mon Nov 19 20:48:19 2018 +0800 e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait Fix a static code checker warning: drivers/net/ethernet/intel/e100.c:1349 e100_load_ucode_wait() warn: passing zero to 'PTR_ERR' Signed-off-by: YueHaibing Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 2be09de7d6a06f58e768de1255a687c9aaa66606 Merge: 44a7b3b6e3a45 1d51b4b1d3f2d Author: David S. Miller Date: Thu Dec 20 10:53:28 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Lots of conflicts, by happily all cases of overlapping changes, parallel adds, things of that nature. Thanks to Stephen Rothwell, Saeed Mahameed, and others for their guidance in these resolutions. Signed-off-by: David S. Miller commit bad87ee82f74707913a27f16d40cd8a1c340b47e Author: Vinicius Costa Gomes Date: Fri Nov 16 16:19:24 2018 -0800 Documentation: igb: Add a section about CBS Add some pointers to the definition of the CBS algorithm, and some notes about the limits of its implementation in the i210 family of controllers. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 6f9ae17530f996e90268dae5ee843e432e40ccb3 Author: Jesus Sanchez-Palencia Date: Fri Nov 16 16:19:23 2018 -0800 igb: Change RXPBSIZE size when setting Qav mode Section 4.5.9 of the datasheet says that the total size of all packet buffers combined (TxPB 0 + 1 + 2 + 3 + RxPB + BMC2OS + OS2BMC) must not exceed 60KB. Today we are configuring a total of 62KB, so reduce the RxPB from 32KB to 30KB in order to respect that. The choice of changing RxPBSIZE here is mainly because it seems more correct to give more priority to the transmit packet buffers over the receiver ones when running in Qav mode. Also, the BMC2OS and OS2BMC sizes are already too short. Signed-off-by: Jesus Sanchez-Palencia Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 00203ba40d40d7f33857416adfb18adaf0e40123 Author: Jens Axboe Date: Thu Dec 20 08:50:58 2018 -0700 kyber: use sbitmap add_wait_queue/list_del wait helpers sbq_wake_ptr() checks sbq->ws_active to know if it needs to loop the wait indexes or not. This requires the use of the sbitmap waitqueue wrappers, but kyber doesn't use those for its domain token waitqueue handling. Convert kyber to use the helpers. This fixes a hang with waiting for domain tokens. Fixes: 5d2ee7122c73 ("sbitmap: optimize wakeup check") Tested-by: Ming Lei Reported-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 9f6b7ef6c3ebe35be77b0ae3cf12e4d25ae80420 Author: Jens Axboe Date: Thu Dec 20 08:49:00 2018 -0700 sbitmap: add helpers for add/del wait queue handling After commit 5d2ee7122c73, users of sbitmap that need wait queue handling must use the provided helpers. But we only added prepare_to_wait()/finish_wait() style helpers, add the equivalent add_wait_queue/list_del wrappers as we.. This is needed to ensure kyber plays by the sbitmap waitqueue rules. Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 59361316afcb08569af21e1af83e89c7051c055a Author: Jeff Kirsher Date: Thu Aug 2 10:13:10 2018 -0700 igb: reduce CPU0 latency when updating statistics This change is based off of the work and suggestion of Jan Jablonsky . The Watchdog workqueue in igb driver is scheduled every 2s for each network interface. That includes updating a statistics protected by spinlock. Function igb_update_stats in this case will be protected against preemption. According to number of a statistics registers (cca 60), processing this function might cause additional cpu load on CPU0. In case of statistics spinlock may be replaced with mutex, which reduce latency on CPU0. CC: Bernhard Kaindl CC: Jan Jablonsky Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 2122b40580dd9d0620398739c773d07a7b7939d0 Author: Noralf Trønnes Date: Thu Dec 20 19:13:09 2018 +0100 fbdev: fbcon: Fix unregister crash when more than one framebuffer When unregistering fbdev using unregister_framebuffer(), any bound console will unbind automatically. This is working fine if this is the only framebuffer, resulting in a switch to the dummy console. However if there is a fb0 and I unregister fb1 having a bound console, I eventually get a crash. The fastest way for me to trigger the crash is to do a reboot, resulting in this splat: [ 76.478825] WARNING: CPU: 0 PID: 527 at linux/kernel/workqueue.c:1442 __queue_work+0x2d4/0x41c [ 76.478849] Modules linked in: raspberrypi_hwmon gpio_backlight backlight bcm2835_rng rng_core [last unloaded: tinydrm] [ 76.478916] CPU: 0 PID: 527 Comm: systemd-udevd Not tainted 4.20.0-rc4+ #4 [ 76.478933] Hardware name: BCM2835 [ 76.478949] Backtrace: [ 76.478995] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 76.479022] r6:00000000 r5:c0bc73be r4:00000000 r3:6fb5bf81 [ 76.479060] [] (show_stack) from [] (dump_stack+0x20/0x28) [ 76.479102] [] (dump_stack) from [] (__warn+0xec/0x12c) [ 76.479134] [] (__warn) from [] (warn_slowpath_null+0x4c/0x58) [ 76.479165] r9:c0eb6944 r8:00000001 r7:c0e927f8 r6:c0bc73be r5:000005a2 r4:c0139e84 [ 76.479197] [] (warn_slowpath_null) from [] (__queue_work+0x2d4/0x41c) [ 76.479222] r6:d7666a00 r5:c0e918ee r4:dbc4e700 [ 76.479251] [] (__queue_work) from [] (queue_work_on+0x60/0x88) [ 76.479281] r10:c0496bf8 r9:00000100 r8:c0e92ae0 r7:00000001 r6:d9403700 r5:d7666a00 [ 76.479298] r4:20000113 [ 76.479348] [] (queue_work_on) from [] (cursor_timer_handler+0x30/0x54) [ 76.479374] r7:d8a8fabc r6:c0e08088 r5:d8afdc5c r4:d8a8fabc [ 76.479413] [] (cursor_timer_handler) from [] (call_timer_fn+0x100/0x230) [ 76.479435] r4:c0e9192f r3:d758a340 [ 76.479465] [] (call_timer_fn) from [] (expire_timers+0x10c/0x12c) [ 76.479495] r10:40000000 r9:c0e9192f r8:c0e92ae0 r7:d8afdccc r6:c0e19280 r5:c0496bf8 [ 76.479513] r4:d8a8fabc [ 76.479541] [] (expire_timers) from [] (run_timer_softirq+0xa8/0x184) [ 76.479570] r9:00000001 r8:c0e19280 r7:00000000 r6:c0e08088 r5:c0e1a3e0 r4:c0e19280 [ 76.479603] [] (run_timer_softirq) from [] (__do_softirq+0x1ac/0x3fc) [ 76.479632] r10:c0e91680 r9:d8afc020 r8:0000000a r7:00000100 r6:00000001 r5:00000002 [ 76.479650] r4:c0eb65ec [ 76.479686] [] (__do_softirq) from [] (irq_exit+0xe8/0x168) [ 76.479716] r10:d8d1a9b0 r9:d8afc000 r8:00000001 r7:d949c000 r6:00000000 r5:c0e8b3f0 [ 76.479734] r4:00000000 [ 76.479764] [] (irq_exit) from [] (__handle_domain_irq+0x94/0xb0) [ 76.479793] [] (__handle_domain_irq) from [] (bcm2835_handle_irq+0x3c/0x48) [ 76.479823] r8:d8afdebc r7:d8afddfc r6:ffffffff r5:c0e089f8 r4:d8afddc8 r3:d8afddc8 [ 76.479851] [] (bcm2835_handle_irq) from [] (__irq_svc+0x70/0x98) The problem is in the console rebinding in fbcon_fb_unbind(). It uses the virtual console index as the new framebuffer index to bind the console(s) to. The correct way is to use the con2fb_map lookup table to find the framebuffer index. Fixes: cfafca8067c6 ("fbdev: fbcon: console unregistration from unregister_framebuffer") Signed-off-by: Noralf Trønnes Reviewed-by: Mikulas Patocka Acked-by: Daniel Vetter Signed-off-by: Bartlomiej Zolnierkiewicz commit e9462fffddad94ee4cb50f6000989133bd15fb96 Author: Geert Uytterhoeven Date: Thu Dec 20 19:13:09 2018 +0100 fbdev: Remove depends on HAS_DMA in case of platform dependency Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Bartlomiej Zolnierkiewicz commit da2648390ce3d409218b6bbbf2386d8ddeec2265 Author: Lubomir Rintel Date: Thu Dec 20 19:13:09 2018 +0100 pxa168fb: trivial typo fix A missing space in an error message. Signed-off-by: Lubomir Rintel Cc: Jiri Kosina Signed-off-by: Bartlomiej Zolnierkiewicz commit 5c29085a724fb8b84bb492a6e2645e28d9bc3dae Author: Wen Yang Date: Thu Dec 20 19:13:08 2018 +0100 fbdev: fsl-diu: remove redundant null check on cmap The null check on &info->cmap is redundant since cmap is a struct inside fb_info and can never be null, so the check is always true. We may remove it. Signed-off-by: Wen Yang Acked-by: Timur Tabi Cc: zhong.weidong@zte.com.cn Signed-off-by: Bartlomiej Zolnierkiewicz commit 452f2d4934d23f32cd9246bc52cf2c0b80560e2f Author: Yangtao Li Date: Thu Dec 20 19:13:08 2018 +0100 fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Cc: Fengguang Wu Cc: Mauro Carvalho Chehab Signed-off-by: Bartlomiej Zolnierkiewicz commit e0f5628bf2c163a815bb728fa7899e8dc0a4a82c Author: Colin Ian King Date: Thu Dec 20 19:13:08 2018 +0100 fbdev: uvesafb: fix spelling mistake "memoery" -> "memory" There is a spelling mistake in the module parameter description, fix it. Signed-off-by: Colin Ian King Cc: Michal Januszewski Signed-off-by: Bartlomiej Zolnierkiewicz commit 3d8b1933eb1c3c94ef8667996dbff6994d5d552f Author: Peter Rosin Date: Thu Dec 20 19:13:08 2018 +0100 fbdev: fbmem: add config option to center the bootup logo If there are extra logos (CONFIG_FB_LOGO_EXTRA) the heights of these extra logos are not considered when centering the first logo vertically. Signed-off-by: Peter Rosin Signed-off-by: Bartlomiej Zolnierkiewicz commit e41f184d83a3a1e12abbf00a829d9de579d6b0fe Author: Peter Rosin Date: Thu Dec 20 19:13:08 2018 +0100 fbdev: fbmem: make fb_show_logo_line return the end instead of the height In preparation for allowing centering of the bootup logo, make fb_show_logo_line return where the next free framebuffer line is, instead of returning the height of the shown logo. Signed-off-by: Peter Rosin Signed-off-by: Bartlomiej Zolnierkiewicz commit 2607391882fca37463187e7f2a9c76dec286947e Author: YueHaibing Date: Thu Dec 20 19:13:08 2018 +0100 video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data" 'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display. This gives this error message: ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ allocated data Fixes: c8f96304ec8b4 ("video: fbdev: pxafb: switch to devm_* API") Cc: stable@kernel.org [v4.19+] Signed-off-by: YueHaibing Reviewed-by: Daniel Mack Cc: Robert Jarzmik Signed-off-by: Bartlomiej Zolnierkiewicz commit f75df8d4b4fabfad7e3cba2debfad12741c6fde7 Author: Peter Rosin Date: Thu Dec 20 19:13:07 2018 +0100 fbdev: fbmem: behave better with small rotated displays and many CPUs Blitting an image with "negative" offsets is not working since there is no clipping. It hopefully just crashes. For the bootup logo, there is protection so that blitting does not happen as the image is drawn further and further to the right (ROTATE_UR) or further and further down (ROTATE_CW). There is however no protection when drawing in the opposite directions (ROTATE_UD and ROTATE_CCW). Add back this protection. The regression is 20-odd years old but the mindless warning-killing mentality displayed in commit 34bdb666f4b2 ("fbdev: fbmem: remove positive test on unsigned values") is also to blame, methinks. Fixes: 448d479747b8 ("fbdev: fb_do_show_logo() updates") Signed-off-by: Peter Rosin Cc: Tomi Valkeinen Cc: Fabian Frederick Cc: Geert Uytterhoeven cc: Geoff Levand Cc: James Simmons Signed-off-by: Bartlomiej Zolnierkiewicz commit fdac751355cd76e049f628afe6acb8ff4b1399f7 Author: Alexey Khoroshilov Date: Thu Dec 20 19:13:07 2018 +0100 video: clps711x-fb: release disp device node in probe() clps711x_fb_probe() increments refcnt of disp device node by of_parse_phandle() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Cc: Alexander Shiyan Signed-off-by: Bartlomiej Zolnierkiewicz commit b4a1ed0cd18b771e4279b4eb9cf39b565560eea6 Author: Rob Clark Date: Thu Dec 20 19:13:07 2018 +0100 fbdev: make FB_BACKLIGHT a tristate BACKLIGHT_CLASS_DEVICE is already tristate, but a dependency FB_BACKLIGHT prevents it from being built as a module. There doesn't seem to be any particularly good reason for this, so switch FB_BACKLIGHT over to tristate. Signed-off-by: Rob Clark Tested-by: Arnd Bergmann Cc: Simon Horman Cc: Geert Uytterhoeven Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Ulf Magnusson Cc: Randy Dunlap Cc: Hans de Goede Signed-off-by: Bartlomiej Zolnierkiewicz commit c143a559b073aeea688b9bb7c5b46f3cf322d569 Author: Dan Carpenter Date: Thu Dec 20 19:13:07 2018 +0100 udlfb: fix some inconsistent NULL checking In the current kernel, then kzalloc() can't fail for small allocations, but if it did fail then we would have a NULL dereference in the error handling. Also in dlfb_usb_disconnect() if "info" were NULL then it would cause an Oops inside the unregister_framebuffer() function but it can't be NULL so let's remove that check. Fixes: 68a958a915ca ("udlfb: handle unplug properly") Signed-off-by: Dan Carpenter Cc: Bernie Thompson Cc: Mikulas Patocka Cc: Alexey Khoroshilov Cc: Colin Ian King Cc: Wen Yang [b.zolnierkie: added "Fixes:" tag] Signed-off-by: Bartlomiej Zolnierkiewicz commit adcc81f148d733b7e8e641300c5590a2cdc13bf3 Author: Paul Burton Date: Thu Dec 20 17:45:43 2018 +0000 MIPS: math-emu: Write-protect delay slot emulation pages Mapping the delay slot emulation page as both writeable & executable presents a security risk, in that if an exploit can write to & jump into the page then it can be used as an easy way to execute arbitrary code. Prevent this by mapping the page read-only for userland, and using access_process_vm() with the FOLL_FORCE flag to write to it from mips_dsemul(). This will likely be less efficient due to copy_to_user_page() performing cache maintenance on a whole page, rather than a single line as in the previous use of flush_cache_sigtramp(). However this delay slot emulation code ought not to be running in any performance critical paths anyway so this isn't really a problem, and we can probably do better in copy_to_user_page() anyway in future. A major advantage of this approach is that the fix is small & simple to backport to stable kernels. Reported-by: Andy Lutomirski Signed-off-by: Paul Burton Fixes: 432c6bacbd0c ("MIPS: Use per-mm page to execute branch delay slot instructions") Cc: stable@vger.kernel.org # v4.8+ Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Rich Felker Cc: David Daney commit b49d564344f773d8afee982153c8493e5f2eaf38 Author: Paul Gortmaker Date: Fri Dec 14 16:48:07 2018 -0500 security: integrity: partial revert of make ima_main explicitly non-modular In commit 4f83d5ea643a ("security: integrity: make ima_main explicitly non-modular") I'd removed after assuming that the function is_module_sig_enforced() was an LSM function and not a core kernel module function. Unfortunately the typical .config selections used in build testing provide an implicit presence, and so normal/typical build testing did not immediately reveal my incorrect assumption. Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-ima-devel@lists.sourceforge.net Cc: linux-security-module@vger.kernel.org Reported-by: Randy Dunlap Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit 883f4def8b77e6870ce42be279564cca0256c611 Merge: ca46afdb2754d 89a0948984896 Author: Ingo Molnar Date: Thu Dec 20 18:51:47 2018 +0100 Merge tag 'perf-core-for-mingo-4.21-20181218' 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: - Implement BPF based syscall filtering in 'perf trace', using BPF maps and the augmented_raw_syscalls.c BPF proggie (Arnaldo Carvalho de Melo) - Allow specifying in .perfconfig a set of events use in 'perf trace' in addition to any other specified from the command line. This initially will be used to always use the augmented_raw_syscalls.o precompiled BPF program for getting pointer contents. (Arnaldo Carvalho de Melo) - Allow fine grained control about how the syscall output should be formatted. This will be used to allow producing the same output produced by the 'strace' tool, to then use in regression tests comparing the output of 'perf trace' with the one produced from 'strace' (Arnaldo Carvalho de Melo) - Beautify the renameat2 olddirfd, newdirfd and flags arguments (Arnaldo Carvalho de Melo) - Beautify arch_prctl 'code' syscall arg (Arnaldo Carvalho de Melo) - Beautify fadvise64 'advice' syscall arg (Arnaldo Carvalho de Melo) - Relax checks on perf-PID.map ownership, resulting in symbols in executable anonymous maps setup by JITs in things like node.js to be resolved in a 'perf top' session run by root without the need for --force to be used (Arnaldo Carvalho de Melo) - Update asm-generic/unistd.h copy (Arnaldo Carvalho de Melo) - Do not use the first and last symbols when setting up address filters in auxtrace, this fails when we don't have a symbol table, filter the entire area based on the dso size. (Adrian Hunter) - Do not use kernel headers to build libsubcmd, we shouldn't use anything from outside tools/, fixes the build with the Android NDK (Arnaldo Carvalho de Melo) - Add several prototypes for systems lacking those, such as open_memstream(), sigqueue(), fixing warnings building with Android's bionic libc that were preventing the use of -Werror there (Arnaldo Carvalho de Melo) - Use LDFLAGS in the libtraceevent build commands, allowing developers to override its values (Jiri Olsa) - Link libperf-jvmti.so with LDFLAGS variable, allowing distro packages to propagate its settings when building this library (Jiri Olsa) - cs-etm (ARM CoreSight) fixes: (Leo Yan) - Correct packets swapping in cs_etm__flush() - Avoid stale branch samples when flush packet - Remove unused 'trace_on' in cs_etm_decoder - Refactor enumeration cs_etm_sample_type - Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY - Treat NO_SYNC element as trace discontinuity - Treat EO_TRACE element as trace discontinuity - Generate branch sample for exception packet - Use shebangs in the 'perf test' shell scripts, making them identifiable as shell scripts (Michael Petlan) - Avoid segfaults caused by negated options in 'perf stat' (Michael Petlan) - Fix processing of dereferenced args in bprintk events in libtracevent (Steven Rostedt) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit fbbae71d374f24887d78631e50210b7110fffb84 Merge: 19de2fa86e692 84758d4d43e9e Author: Kalle Valo Date: Thu Dec 20 19:25:43 2018 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.21. Major changes: ath10k * add amsdu support for QCA6174 monitor mode * report tx rate using the new ieee80211_tx_rate_update() API * wcn3990 support is not experimental anymore commit 8c9d90eebd23b6d40ddf4ce5df5ca2b932336a06 Author: Jerry (Fangzhi) Zuo Date: Mon Dec 17 10:32:22 2018 -0500 drm/amd/display: Fix MST dp_blank REG_WAIT timeout Need to blank stream before deallocate MST payload. [drm:generic_reg_wait [amdgpu]] *ERROR* REG_WAIT timeout 10us * 3000 tries - dce110_stream_encoder_dp_blank line:944 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2201 at /var/lib/dkms/amdgpu/18.50-690240/build/amd/amdgpu/../display/dc/dc_helper.c:249 generic_reg_wait+0xe7/0x160 [amdgpu] Call Trace: dce110_stream_encoder_dp_blank+0x11c/0x180 [amdgpu] core_link_disable_stream+0x40/0x230 [amdgpu] ? generic_reg_update_ex+0xdb/0x130 [amdgpu] dce110_reset_hw_ctx_wrap+0xb7/0x1f0 [amdgpu] dce110_apply_ctx_to_hw+0x30/0x430 [amdgpu] ? dce110_apply_ctx_for_surface+0x206/0x260 [amdgpu] dc_commit_state+0x2ba/0x4d0 [amdgpu] amdgpu_dm_atomic_commit_tail+0x297/0xd70 [amdgpu] ? amdgpu_bo_pin_restricted+0x58/0x260 [amdgpu] ? wait_for_completion_timeout+0x1f/0x120 ? wait_for_completion_interruptible+0x1c/0x160 commit_tail+0x3d/0x60 [drm_kms_helper] drm_atomic_helper_commit+0xf6/0x100 [drm_kms_helper] drm_atomic_connector_commit_dpms+0xe5/0xf0 [drm] drm_mode_obj_set_property_ioctl+0x14f/0x250 [drm] drm_mode_connector_property_set_ioctl+0x2e/0x40 [drm] drm_ioctl+0x1e0/0x430 [drm] ? drm_mode_connector_set_obj_prop+0x70/0x70 [drm] ? ep_read_events_proc+0xb0/0xb0 ? ep_scan_ready_list.constprop.18+0x1e6/0x1f0 ? timerqueue_add+0x52/0x80 amdgpu_drm_ioctl+0x49/0x80 [amdgpu] do_vfs_ioctl+0x90/0x5f0 SyS_ioctl+0x74/0x80 do_syscall_64+0x74/0x140 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 ---[ end trace 3ed7b77a97d60f72 ]--- Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Acked-by: Harry Wentland Acked-by: Alex Deucher Tested-by: Lyude Paul Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 99b922f9ed6a6313c0d2247cde8aa1e4a0bd67e4 Author: Wenjing Liu Date: Wed Dec 5 12:14:45 2018 -0500 drm/amd/display: validate extended dongle caps [why] Some dongle doesn't have a valid extended dongle caps, but we still set the extended dongle caps to be valid. This causes validation fails for all timing. [how] If no dp_hdmi_max_pixel_clk is provided, don't use extended dongle caps. Signed-off-by: Wenjing Liu Reviewed-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Abdoulaye Berthe Acked-by: Leo Li Signed-off-by: Alex Deucher commit 9136e81e986a7a44bd360a2d2abf19de886feaa8 Author: Nicholas Kazlauskas Date: Wed Dec 19 08:35:51 2018 -0500 drm/amd/display: Use div_u64 for flip timestamp ns to ms Resolves __udivdi3 missing errors when building for i386. Fixes: 6378ef012ddc ("drm/amd/display: Add below the range support for FreeSync") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2bf55d2e6b71c8d79a7960d4f88bebc03f0e9a00 Author: James Zhu Date: Tue Dec 18 16:03:22 2018 -0500 drm/amdgpu/uvd:Change uvd ring name convention Since umr tool can't handle bracket, change uvd ring name convention. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c1973a1078dee6e8c9bd77825f40f84c21be142f Author: Evan Quan Date: Tue Dec 18 19:06:53 2018 +0800 drm/amd/powerplay: add Vega20 LCLK DPM level setting support Support manual LCLK DPM level switch on Vega20. Signed-off-by: Evan Quan Acked-by: Alex Deucher Reviewed-by: Rex Zhu Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 0346bfd9fe5ade369d9f946f82d6a43d113ba493 Author: Trigger Huang Date: Tue Dec 18 09:14:47 2018 +0800 drm/amdgpu: print process info when job timeout When a job is timeout, try to print the related process information for debugging Signed-off-by: Trigger Huang Reviewed-by: Christian König . Signed-off-by: Alex Deucher commit e01f2d41895102d824c6b8f5e011dd5e286d5e8b Author: Alex Deucher Date: Wed Dec 19 18:05:41 2018 -0500 drm/amdgpu/nbio7.4: add hw bug workaround for vega20 Configure PCIE_CI_CNTL to work around a hw bug that affects some multi-GPU compute workloads. Acked-by: Feifei Xu Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 40978ac636136aa0fb018a470008a717fd69c89c Author: Alex Deucher Date: Wed Dec 19 18:01:53 2018 -0500 drm/amdgpu/nbio6.1: add hw bug workaround for vega10/12 Configure PCIE_CI_CNTL to work around a hw bug that affects some multi-GPU compute workloads. Acked-by: Feifei Xu Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 215852f4b8bbf7a8d6a534dfb367bb0f1a2d5011 Author: Jona Crasselt Date: Thu Dec 20 17:57:37 2018 +0100 staging: mt7621-mmc: Correct spelling mistakes in comments Changed "avaiable" to "available" and "interupt" to "interrupt". Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 84758d4d43e9e38f2bf9b5130b5f7db1c44f1e0b Author: Bhagavathi Perumal S Date: Thu Dec 20 14:26:00 2018 +0200 ath10k: add support to configure BB timing over wmi Add wmi configuration cmd to configure base band(BB) power amplifier(PA) off timing values in hardware. The default PA off timings were fine tuned to make proper DFS radar detection in QCA reference design. If ODM uses different PA in their design, then the same default PA off timing values cannot be used, it requires different settling time to detect radar pulses very sooner and avoid radar detection problems. In that case it provides provision to select proper PA off timing values based on the PA hardware used. The PA component is part of FEM hardware and new device tree entry "ext-fem-name" is used to indentify the FEM hardware. And this wmi configuration cmd is enabled via wmi service flag "WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT". Other way is to apply these values through calibration data, but recalibration of all boards out there might not be feasible. This change tested on firmware ver 10.2.4-1.0-00042 in QCA988X chipset. Signed-off-by: Bhagavathi Perumal S Signed-off-by: Kalle Valo commit f3f587995c5af69b92693c2f5d40e3448ab6113d Author: Bhagavathi Perumal S Date: Thu Dec 20 14:25:43 2018 +0200 dt-bindings: net: ath10k: add new dt entry to identify external FEM This adds new dt entry ext-fem-name, it is used by ath10k driver to select correct timing parameters and configure it in target wifi hardware. The Front End Module(FEM) normally includes tx power amplifier(PA) and rx low noise amplifier(LNA). The default timing parameters like tx end to PA off timing values were fine tuned for internal FEM used in reference design. And these timing values can not be same if ODM modifies hardware design with different external FEM. This DT entry helps to choose correct timing values in driver if different external FEM hardware used. Signed-off-by: Bhagavathi Perumal S Reviewed-by: Rob Herring Signed-off-by: Kalle Valo commit e5404969a335e25e3eb822649a7f40e9c5ba2446 Author: Bhagavathi Perumal S Date: Thu Dec 20 14:25:32 2018 +0200 dt-bindings: net: ath10k: fix node name and device type in qcom ath10k example In qcom,ath10k documentation, ath10k is used as node name in the example of pci based device. Normally, node name should be class of device and not the model name, so fix it to node name "wifi". And remove the property device_type pci since only pci bridges should have this property. Signed-off-by: Bhagavathi Perumal S Reviewed-by: Rob Herring Signed-off-by: Kalle Valo commit 386f97e3b201d18578abb0e7037b85a1ae50c0a3 Author: Zhi Chen Date: Thu Dec 20 14:25:18 2018 +0200 ath10k: fix tx_stats memory leak Memory of tx_stats was allocated when a STA was added. But it's not freed if the STA failed to be added to driver. This issue could be seen in MDK3 attack case when STA number reached the limit. Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00005 Signed-off-by: Zhi Chen Signed-off-by: Kalle Valo commit 2d3b55853b123c177037cf534c5aaa2650310094 Author: Zhi Chen Date: Thu Dec 20 14:24:43 2018 +0200 ath10k: fix peer stats null pointer dereference There was a race condition in SMP that an ath10k_peer was created but its member sta was null. Following are procedures of ath10k_peer creation and member sta access in peer statistics path. 1. Peer creation: ath10k_peer_create() =>ath10k_wmi_peer_create() =>ath10k_wait_for_peer_created() ... # another kernel path, RX from firmware ath10k_htt_t2h_msg_handler() =>ath10k_peer_map_event() =>wake_up() # ar->peer_map[id] = peer //add peer to map #wake up original path from waiting ... # peer->sta = sta //sta assignment 2. RX path of statistics ath10k_htt_t2h_msg_handler() =>ath10k_update_per_peer_tx_stats() =>ath10k_htt_fetch_peer_stats() # peer->sta //sta accessing Any access of peer->sta after peer was added to peer_map but before sta was assigned could cause a null pointer issue. And because these two steps are asynchronous, no proper lock can protect them. So both peer and sta need to be checked before access. Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00005 Signed-off-by: Zhi Chen Signed-off-by: Kalle Valo commit a3542d0c73cec6a45bde512ea2b43666c05a8c54 Author: Govind Singh Date: Thu Dec 20 14:24:23 2018 +0200 dt: bindings: ath10k: add bindings for wifi iommu node WCN3990 wifi module can optionally make use of the IOMMU. Add binding documentation for phandle to the IOMMU and the stream id of wifi iommu block. Signed-off-by: Govind Singh Reviewed-by: Rob Herring Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: Kalle Valo commit 5fac78aac91d89b4a04c1cbd92254f62935c2711 Author: Govind Singh Date: Thu Dec 20 14:24:10 2018 +0200 dt: bindings: ath10k: add missing dt properties for WCN3990 wifi node Add missing optional properties in WCN3990 wifi node. Signed-off-by: Govind Singh Reviewed-by: Rob Herring Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: Kalle Valo commit 27120f2ac995d83fef383fb20e492037ecf09259 Author: Dan Carpenter Date: Thu Dec 20 09:53:45 2018 +0200 ath10k: remove an unnecessary NULL check The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit bd085be6ba9547795ddcbdc5cc0c78ea0201ba6e Author: Govind Singh Date: Thu Dec 20 09:53:43 2018 +0200 ath10k: move non-fatal warn logs to dbg level During driver load below warn logs are printed in the console. Since driver may not implement all wmi events sent by fw and all of them are non-fatal, move this log to debug level to remove un-necessary warn message on console. [ 361.887230] ath10k_snoc a000000.wifi: Unknown eventid: 16393 [ 361.907037] ath10k_snoc a000000.wifi: Unknown eventid: 237569 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit c28dcbce0592a1a7e32975e28bdd80e5d8d2cfa3 Author: Dan Carpenter Date: Thu Dec 20 09:53:41 2018 +0200 ath10k: fix a NULL vs IS_ERR() check The devm_memremap() function doesn't return NULLs, it returns error pointers. Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 8765967592875f1b4b20a8541a325045e5f75a36 Author: Govind Singh Date: Thu Dec 20 09:53:36 2018 +0200 ath10k: remove work in progress logs from snoc driver All the necessary patches to make wifi running (over SNOC) are merged and tested on SDM845/QCS404 platform with WCN3990 wifi module, hence remove work in progress debug from snoc driver and Kconfig. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit a2864772f33aa0f22914049b7fe777b7d4ec05ee Author: Bhagavathi Perumal S Date: Thu Dec 20 09:53:34 2018 +0200 ath10k: fix warning due to msdu limit error Some hardwares variants (QCA99x0) are limiting msdu deaggregation with some threshold value(default limit in QCA99x0 is 64 msdus), it was introduced to avoid excessive MSDU-deaggregation in error cases. When number of sub frames exceeds the limit, target hardware will send all msdus starting from present msdu in RAW format as a single msdu packet and it will be indicated with error status bit "RX_MSDU_END_INFO0_MSDU_LIMIT_ERR" set in rx descriptor. This msdu frame is a partial raw MSDU and does't have first msdu and ieee80211 header. It caused below warning message. [ 320.151332] ------------[ cut here ]------------ [ 320.155006] WARNING: CPU: 0 PID: 3 at drivers/net/wireless/ath/ath10k/htt_rx.c:1188 In our issue case, MSDU limit error happened due to FCS error and generated this warning message. This fixes the warning by handling the MSDU limit error. If msdu limit error happens, driver adds first MSDU's ieee80211 header and sets A-MSDU present bit in QOS header so that upper layer processes this frame if it is valid or drop it if FCS error set. And removed the warning message, hence partial msdus without first msdu is expected in msdu limit error cases. Tested on QCA9984, Firmware 10.4-3.6-00104 Signed-off-by: Bhagavathi Perumal S Signed-off-by: Kalle Valo commit 68c295f21abc192163c416b333aca7c41a195075 Author: Sathishkumar Muruganandam Date: Thu Dec 20 09:53:30 2018 +0200 ath10k: disable 4addr source port learning in 10.4 FW by default Currently in 10.4 FW, all the received 4addr frames are processed for source port learning which is enabled by default. This learning can't be disabled by default in FW since it breaks backward compatibility. Since ath10k uses mac80211 based 4addr mode, source port learning done in 10.4 FW is redundant and also causes issues when 3addr frames are transmitted/received for a 4addr station. One such visible functional impact is when GTK rekey frame from hostapd based AP to 4addr STA is dropped in AP's 10.4 FW. This is since GTK rekey EAPOL frame is 3addr frame on AP interface and STA enabled with 4addr is already allowed for receiving 3addr EAPOL frames. Source port learning implementation in 10.4 FW drops this 3addr GTK rekey frame in AP destinated for 4addr STA causing disassociation and re-association for every GTK rekey session. GTK rekey issue is not seen when learning is disabled in FW. To prevent such issues without breaking backward compatibility, FW advertises new service bit making the source port learning configurable and this learning is being currently disabled during ath10k vdev creation. * Tested HW: QCA9984 * Tested FW: 10.4-3.6.0.1-00004 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Kalle Valo commit 9a9cf0e63f707303dd4bbd2e14f812b85116b8b5 Author: Anilkumar Kolli Date: Thu Dec 20 09:53:28 2018 +0200 ath10k: report tx rate using ieee80211_tx_rate_update() Mesh path metric needs tx rate information from ieee80211_tx_status() call but in ath10k there is no mechanism to report tx rate information via ieee80211_tx_status(), the tx rate is only accessible via sta_statiscs() op. Per peer tx stats has tx rate info available, Tx rate is available to ath10k driver after every 4 PPDU sent in the air. For each PPDU, ath10k driver updates rate informattion to mac80211 using ieee80211_tx_rate_update(). Per peer txrate information is updated through per peer statistics and is available for QCA9888/QCA9984/QCA4019/QCA998X only Tested on QCA9984 with firmware-5.bin_10.4-3.5.3-00053 Tested on QCA998X with firmware-5.bin_10.2.4-1.0-00036 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit e820d55cb99dd93ac2dc949cf486bb187e5cd70d Author: Guoqing Jiang Date: Wed Dec 19 14:19:25 2018 +0800 md: fix raid10 hang issue caused by barrier When both regular IO and resync IO happen at the same time, and if we also need to split regular. Then we can see tasks hang due to barrier. 1. resync thread [ 1463.757205] INFO: task md1_resync:5215 blocked for more than 480 seconds. [ 1463.757207] Not tainted 4.19.5-1-default #1 [ 1463.757209] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1463.757212] md1_resync D 0 5215 2 0x80000000 [ 1463.757216] Call Trace: [ 1463.757223] ? __schedule+0x29a/0x880 [ 1463.757231] ? raise_barrier+0x8d/0x140 [raid10] [ 1463.757236] schedule+0x78/0x110 [ 1463.757243] raise_barrier+0x8d/0x140 [raid10] [ 1463.757248] ? wait_woken+0x80/0x80 [ 1463.757257] raid10_sync_request+0x1f6/0x1e30 [raid10] [ 1463.757265] ? _raw_spin_unlock_irq+0x22/0x40 [ 1463.757284] ? is_mddev_idle+0x125/0x137 [md_mod] [ 1463.757302] md_do_sync.cold.78+0x404/0x969 [md_mod] [ 1463.757311] ? wait_woken+0x80/0x80 [ 1463.757336] ? md_rdev_init+0xb0/0xb0 [md_mod] [ 1463.757351] md_thread+0xe9/0x140 [md_mod] [ 1463.757358] ? _raw_spin_unlock_irqrestore+0x2e/0x60 [ 1463.757364] ? __kthread_parkme+0x4c/0x70 [ 1463.757369] kthread+0x112/0x130 [ 1463.757374] ? kthread_create_worker_on_cpu+0x40/0x40 [ 1463.757380] ret_from_fork+0x3a/0x50 2. regular IO [ 1463.760679] INFO: task kworker/0:8:5367 blocked for more than 480 seconds. [ 1463.760683] Not tainted 4.19.5-1-default #1 [ 1463.760684] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1463.760687] kworker/0:8 D 0 5367 2 0x80000000 [ 1463.760718] Workqueue: md submit_flushes [md_mod] [ 1463.760721] Call Trace: [ 1463.760731] ? __schedule+0x29a/0x880 [ 1463.760741] ? wait_barrier+0xdd/0x170 [raid10] [ 1463.760746] schedule+0x78/0x110 [ 1463.760753] wait_barrier+0xdd/0x170 [raid10] [ 1463.760761] ? wait_woken+0x80/0x80 [ 1463.760768] raid10_write_request+0xf2/0x900 [raid10] [ 1463.760774] ? wait_woken+0x80/0x80 [ 1463.760778] ? mempool_alloc+0x55/0x160 [ 1463.760795] ? md_write_start+0xa9/0x270 [md_mod] [ 1463.760801] ? try_to_wake_up+0x44/0x470 [ 1463.760810] raid10_make_request+0xc1/0x120 [raid10] [ 1463.760816] ? wait_woken+0x80/0x80 [ 1463.760831] md_handle_request+0x121/0x190 [md_mod] [ 1463.760851] md_make_request+0x78/0x190 [md_mod] [ 1463.760860] generic_make_request+0x1c6/0x470 [ 1463.760870] raid10_write_request+0x77a/0x900 [raid10] [ 1463.760875] ? wait_woken+0x80/0x80 [ 1463.760879] ? mempool_alloc+0x55/0x160 [ 1463.760895] ? md_write_start+0xa9/0x270 [md_mod] [ 1463.760904] raid10_make_request+0xc1/0x120 [raid10] [ 1463.760910] ? wait_woken+0x80/0x80 [ 1463.760926] md_handle_request+0x121/0x190 [md_mod] [ 1463.760931] ? _raw_spin_unlock_irq+0x22/0x40 [ 1463.760936] ? finish_task_switch+0x74/0x260 [ 1463.760954] submit_flushes+0x21/0x40 [md_mod] So resync io is waiting for regular write io to complete to decrease nr_pending (conf->barrier++ is called before waiting). The regular write io splits another bio after call wait_barrier which call nr_pending++, then the splitted bio would continue with raid10_write_request -> wait_barrier, so the splitted bio has to wait for barrier to be zero, then deadlock happens as follows. resync io regular io raise_barrier wait_barrier generic_make_request wait_barrier To resolve the issue, we need to call allow_barrier to decrease nr_pending before generic_make_request since regular IO is not issued to underlying devices, and wait_barrier is called again to ensure no internal IO happening. Fixes: fc9977dd069e ("md/raid10: simplify the splitting of requests.") Reported-and-tested-by: Siniša Bandin Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit caea3c47ad515210129f06b6bbe53f82f69efebe Author: Guoqing Jiang Date: Fri Dec 7 18:24:21 2018 +0800 raid10: refactor common wait code from regular read/write request Both raid10_read_request and raid10_write_request share the same code at the beginning of them, so introduce regular_request_wait to clean up code, and call it in both request functions. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li commit 37b22c28946046e587c12b2b5bdaba7062e23f75 Author: Chengguang Xu Date: Wed Nov 14 07:33:09 2018 +0800 md: remvoe redundant condition check mempool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling mempool_destroy(). Signed-off-by: Chengguang Xu Signed-off-by: Shaohua Li commit be85f93ae2df32dea0b20908316f1d894c3e0f64 Author: Daniel Verkamp Date: Mon Nov 12 15:26:52 2018 -0800 lib/raid6: add option to skip algo benchmarking This is helpful for systems where fast startup time is important. It is especially nice to avoid benchmarking RAID functions that are never used (for example, BTRFS selects RAID6_PQ even if the parity RAID mode is not in use). This saves 250+ milliseconds of boot time on modern x86 and ARM systems with a dozen or more available implementations. The new option is defaulted to 'y' to match the previous behavior of always benchmarking on init. Signed-off-by: Daniel Verkamp Signed-off-by: Shaohua Li commit 0437de4fa09fe59b57d12b785e4afb73b0f34c05 Author: Daniel Verkamp Date: Mon Nov 12 15:26:51 2018 -0800 lib/raid6: sort algos in rough performance order Sort the list of RAID6 algorithms in roughly decreasing order of expected performance: newer instruction sets first (within each architecture) and wider unrollings first. This doesn't make any difference right now, since all functions are benchmarked; a follow-up change will make use of this by optionally choosing the first valid function rather than testing all of them. The Itanium raid6_intx{16,32} entries are also moved down to be near the other raid6_intx entries for clarity. Signed-off-by: Daniel Verkamp Signed-off-by: Shaohua Li commit 86919f9dd2dbb88bbbe4e381dc8e6b9e9a1b9eb5 Author: Daniel Verkamp Date: Mon Nov 12 15:22:18 2018 -0800 lib/raid6: check for assembler SSSE3 support Allow the x86 SSSE3 recovery function to be tested in raid6test. Signed-off-by: Daniel Verkamp Signed-off-by: Shaohua Li commit 58af3110a7c5d161f72f94a98c6f2b9b75bf5cf9 Author: Daniel Verkamp Date: Mon Nov 12 15:22:17 2018 -0800 lib/raid6: avoid __attribute_const__ redefinition This is defined in glibc's sys/cdefs.h on my system with the same definition as the raid6test fallback definition. Add a #ifndef check to avoid a compiler warning about redefining it. Signed-off-by: Daniel Verkamp Signed-off-by: Shaohua Li commit e731f3e28b7e7d1c745b03084e01036ee00018eb Author: Daniel Verkamp Date: Mon Nov 12 15:22:16 2018 -0800 lib/raid6: add missing include for raid6test Add #include for gettimeofday() to fix the compiler warning about an implicitly defined functions. Signed-off-by: Daniel Verkamp Signed-off-by: Shaohua Li commit f91389c8d2867d10a206273b8eb3b7955b65591e Author: Yue Haibing Date: Thu Nov 8 12:11:06 2018 +0000 md: remove set but not used variable 'bi_rdev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/md/md.c: In function 'md_integrity_add_rdev': drivers/md/md.c:2149:24: warning: variable 'bi_rdev' set but not used [-Wunused-but-set-variable] It not used any more after commit 1501efadc524 ("md/raid: only permit hot-add of compatible integrity profiles") Signed-off-by: Yue Haibing Signed-off-by: Shaohua Li commit 85bd0107c6cd445a33066a57658fc585244a1100 Author: Yu Wang Date: Thu Dec 20 09:53:26 2018 +0200 ath10k: add amsdu support for monitor mode When processing HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND, if the length of a msdu is larger than the tailroom of the rx skb, skb_over_panic issue will happen when calling skb_put. In monitor mode, amsdu will be handled in this path, and msdu_len of the first msdu_desc is the length of the entire amsdu, which might be larger than the maximum length of a skb, in such case, it will hit the issue upon. To fix this issue, process msdu list separately for monitor mode. Successfully tested with: QCA6174 (FW version: RM.4.4.1.c2-00057-QCARMSWP-1). Signed-off-by: Yu Wang [kvalo@codeaurora.org: cosmetic cleanup] Signed-off-by: Kalle Valo commit 5816a0932b4fd74257b8cc5785bc8067186a8723 Author: Nathan Chancellor Date: Thu Dec 20 17:23:44 2018 +0100 drbd: Change drbd_request_detach_interruptible's return type to int Clang warns when an implicit conversion is done between enumerated types: drivers/block/drbd/drbd_state.c:708:8: warning: implicit conversion from enumeration type 'enum drbd_ret_code' to different enumeration type 'enum drbd_state_rv' [-Wenum-conversion] rv = ERR_INTR; ~ ^~~~~~~~ drbd_request_detach_interruptible's only call site is in the return statement of adm_detach, which returns an int. Change the return type of drbd_request_detach_interruptible to match, silencing Clang's warning. Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe commit a52c5a16cf19d8a85831bb1b915a221dd4ffae3c Author: Nathan Chancellor Date: Thu Dec 20 17:23:43 2018 +0100 drbd: Avoid Clang warning about pointless switch statment There are several warnings from Clang about no case statement matching the constant 0: In file included from drivers/block/drbd/drbd_receiver.c:48: In file included from drivers/block/drbd/drbd_int.h:48: In file included from ./include/linux/drbd_genl_api.h:54: In file included from ./include/linux/genl_magic_struct.h:236: ./include/linux/drbd_genl.h:321:1: warning: no case matching constant switch condition '0' GENL_struct(DRBD_NLA_HELPER, 24, drbd_helper_info, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/genl_magic_struct.h:220:10: note: expanded from macro 'GENL_struct' switch (0) { ^ Silence this warning by adding a 'case 0:' statement. Additionally, adjust the alignment of the statements in the ct_assert_unique macro to avoid a checkpatch warning. This solution was originally sent by Arnd Bergmann with a default case statement: https://lore.kernel.org/patchwork/patch/756723/ Link: https://github.com/ClangBuiltLinux/linux/issues/43 Suggested-by: Lars Ellenberg Signed-off-by: Nathan Chancellor Signed-off-by: Jens Axboe commit f31e583aa2c20892aca3add26957dee6ab80a534 Author: Lars Ellenberg Date: Thu Dec 20 17:23:42 2018 +0100 drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire") And also re-enable partial-zero-out + discard aligned. With the introduction of REQ_OP_WRITE_ZEROES, we started to use that for both WRITE_ZEROES and DISCARDS, hoping that WRITE_ZEROES would "do what we want", UNMAP if possible, zero-out the rest. The example scenario is some LVM "thin" backend. While an un-allocated block on dm-thin reads as zeroes, on a dm-thin with "skip_block_zeroing=true", after a partial block write allocated that block, that same block may well map "undefined old garbage" from the backends on LBAs that have not yet been written to. If we cannot distinguish between zero-out and discard on the receiving side, to avoid "undefined old garbage" to pop up randomly at later times on supposedly zero-initialized blocks, we'd need to map all discards to zero-out on the receiving side. But that would potentially do a full alloc on thinly provisioned backends, even when the expectation was to unmap/trim/discard/de-allocate. We need to distinguish on the protocol level, whether we need to guarantee zeroes (and thus use zero-out, potentially doing the mentioned full-alloc), or if we want to put the emphasis on discard, and only do a "best effort zeroing" (by "discarding" blocks aligned to discard-granularity, and zeroing only potential unaligned head and tail clippings to at least *try* to avoid "false positives" in an online-verify later), hoping that someone set skip_block_zeroing=false. For some discussion regarding this on dm-devel, see also https://www.mail-archive.com/dm-devel%40redhat.com/msg07965.html https://www.redhat.com/archives/dm-devel/2018-January/msg00271.html For backward compatibility, P_TRIM means zero-out, unless the DRBD_FF_WZEROES feature flag is agreed upon during handshake. To have upper layers even try to submit WRITE ZEROES requests, we need to announce "efficient zeroout" independently. We need to fixup max_write_zeroes_sectors after blk_queue_stack_limits(): if we can handle "zeroes" efficiently on the protocol, we want to do that, even if our backend does not announce max_write_zeroes_sectors itself. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 9848b6ddd8c92305252f94592c5e278574e7a6ac Author: Lars Ellenberg Date: Thu Dec 20 17:23:41 2018 +0100 drbd: skip spurious timeout (ping-timeo) when failing promote If you try to promote a Secondary while connected to a Primary and allow-two-primaries is NOT set, we will wait for "ping-timeout" to give this node a chance to detect a dead primary, in case the cluster manager noticed faster than we did. But if we then are *still* connected to a Primary, we fail (after an additional timeout of ping-timout). This change skips the spurious second timeout. Most people won't notice really, since "ping-timeout" by default is half a second. But in some installations, ping-timeout may be 10 or 20 seconds or more, and spuriously delaying the error return becomes annoying. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 9049ccd46f1f39166c99861c2c59d01ce3e20fd6 Author: Lars Ellenberg Date: Thu Dec 20 17:23:40 2018 +0100 drbd: don't retry connection if peers do not agree on "authentication" settings emma: "Unexpected data packet AuthChallenge (0x0010)" ava: "expected AuthChallenge packet, received: ReportProtocol (0x000b)" "Authentication of peer failed, trying again." Pattern repeats. There is no point in retrying the handshake, if we expect to receive an AuthChallenge, but the peer is not even configured to expect or use a shared secret. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 2c38f035117331eb78d0504843c79ea7c7fabf37 Author: Luc Van Oostenryck Date: Thu Dec 20 17:23:39 2018 +0100 drbd: fix print_st_err()'s prototype to match the definition print_st_err() is defined with its 4th argument taking an 'enum drbd_state_rv' but its prototype use an int for it. Fix this by using 'enum drbd_state_rv' in the prototype too. Signed-off-by: Luc Van Oostenryck Signed-off-by: Roland Kammerer Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit be80ff88356ab6f5529daf24d3052a4e3cc727ec Author: Lars Ellenberg Date: Thu Dec 20 17:23:38 2018 +0100 drbd: avoid spurious self-outdating with concurrent disconnect / down If peers are "simultaneously" told to disconnect from each other, either explicitly, or implicitly by taking down the resource, with bad timing, one side may see its disconnect "fail" with a result of "state change failed by peer", and interpret this as "please oudate yourself". Try to catch this by checking for current connection status, and possibly retry as local-only state change instead. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit f708bd08ecbdc23d03aaedf5b3311ebe44cfdb50 Author: Lars Ellenberg Date: Thu Dec 20 17:23:37 2018 +0100 drbd: do not block when adjusting "disk-options" while IO is frozen "suspending" IO is overloaded. It can mean "do not allow new requests" (obviously), but it also may mean "must not complete pending IO", for example while the fencing handlers do their arbitration. When adjusting disk options, we suspend io (disallow new requests), then wait for the activity-log to become unused (drain all IO completions), and possibly replace it with a new activity log of different size. If the other "suspend IO" aspect is active, pending IO completions won't happen, and we would block forever (unkillable drbdsetup process). Fix this by skipping the activity log adjustment if the "al-extents" setting did not change. Also, in case it did change, fail early without blocking if it looks like we would block forever. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit a2823ea92024e6cb8124bf49a055261a8508a795 Author: Lars Ellenberg Date: Thu Dec 20 17:23:36 2018 +0100 drbd: fix comment typos Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit fe43ed97bba3b11521abd934b83ed93143470e4f Author: Lars Ellenberg Date: Thu Dec 20 17:23:35 2018 +0100 drbd: reject attach of unsuitable uuids even if connected Multiple failure scenario: a) all good Connected Primary/Secondary UpToDate/UpToDate b) lose disk on Primary, Connected Primary/Secondary Diskless/UpToDate c) continue to write to the device, changes only make it to the Secondary storage. d) lose disk on Secondary, Connected Primary/Secondary Diskless/Diskless e) now try to re-attach on Primary This would have succeeded before, even though that is clearly the wrong data set to attach to (missing the modifications from c). Because we only compared our "effective" and the "to-be-attached" data generation uuid tags if (device->state.conn < C_CONNECTED). Fix: change that constraint to (device->state.pdsk != D_UP_TO_DATE) compare the uuids, and reject the attach. This patch also tries to improve the reverse scenario: first lose Secondary, then Primary disk, then try to attach the disk on Secondary. Before this patch, the attach on the Secondary succeeds, but since commit drbd: disconnect, if the wrong UUIDs are attached on a connected peer the Primary will notice unsuitable data, and drop the connection hard. Though unfortunately at a point in time during the handshake where we cannot easily abort the attach on the peer without more refactoring of the handshake. We now reject any attach to "unsuitable" uuids, as long as we can see a Primary role, unless we already have access to "good" data. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit ad6e8979020628137478034dc5dce46d9dbd75b9 Author: Lars Ellenberg Date: Thu Dec 20 17:23:34 2018 +0100 drbd: attach on connected diskless peer must not shrink a consistent device If we would reject a new handshake, if the peer had attached first, and then connected, we should force disconnect if the peer first connects, and only then attaches. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 4ef2a4f43f5e52c6ff50a53cb49cf468bacf8cc2 Author: Lars Ellenberg Date: Thu Dec 20 17:23:33 2018 +0100 drbd: fix confusing error message during attach If we attach a (consistent) backing device, which knows about a last-agreed effective size, and that effective size is *larger* than the currently requested size, we refused to attach with ERR_DISK_TOO_SMALL Failure: (111) Low.dev. smaller than requested DRBD-dev. size. which is confusing to say the least. This patch changes the error code in that case to ERR_IMPLICIT_SHRINK Failure: (170) Implicit device shrinking not allowed. See kernel log. additional info from kernel: To-be-attached device has last effective > current size, and is consistent (9999 > 7777 sectors). Refusing to attach. It also allows to attach with an explicit size. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit b17b59602b6dcf8f97a7dc7bc489a48388d7063a Author: Lars Ellenberg Date: Thu Dec 20 17:23:32 2018 +0100 drbd: disconnect, if the wrong UUIDs are attached on a connected peer With "on-no-data-accessible suspend-io", DRBD requires the next attach or connect to be to the very same data generation uuid tag it lost last. If we first lost connection to the peer, then later lost connection to our own disk, we would usually refuse to re-connect to the peer, because it presents the wrong data set. However, if the peer first connects without a disk, and then attached its disk, we accepted that same wrong data set, which would be "unexpected" by any user of that DRBD and cause "undefined results" (read: very likely data corruption). The fix is to forcefully disconnect as soon as we notice that the peer attached to the "wrong" dataset. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 94c43a13b8d6e3e0dd77b3536b5e04a84936b762 Author: Lars Ellenberg Date: Thu Dec 20 17:23:31 2018 +0100 drbd: ignore "all zero" peer volume sizes in handshake During handshake, if we are diskless ourselves, we used to accept any size presented by the peer. Which could be zero if that peer was just brought up and connected to us without having a disk attached first, in which case both peers would just "flip" their volume sizes. Now, even a diskless node will ignore "zero" sizes presented by a diskless peer. Also a currently Diskless Primary will refuse to shrink during handshake: it may be frozen, and waiting for a "suitable" local disk or peer to re-appear (on-no-data-accessible suspend-io). If the peer is smaller than what we used to be, it is not suitable. The logic for a diskless node during handshake is now supposed to be: believe the peer, if - I don't have a current size myself - we agree on the size anyways - I do have a current size, am Secondary, and he has the only disk - I do have a current size, am Primary, and he has the only disk, which is larger than my current size Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit d5412e8d8e6311c09fddcd7f1a4030b8bbe0caf7 Author: Lars Ellenberg Date: Thu Dec 20 17:23:30 2018 +0100 drbd: centralize printk reporting of new size into drbd_set_my_capacity() Previously, some implicit resizes that happend during handshake have not been reported as prominently as explicit resize. Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit 792c3fdd94a559b31c8d1477e37029c1ac881234 Author: Lars Ellenberg Date: Thu Dec 20 17:23:29 2018 +0100 drbd: must not use connection after kref_put(&connection->kref) Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe commit d29e89e34952a9ad02c77109c71a80043544296e Author: Roland Kammerer Date: Thu Dec 20 17:23:28 2018 +0100 drbd: narrow rcu_read_lock in drbd_sync_handshake So far there was the possibility that we called genlmsg_new(GFP_NOIO)/mutex_lock() while holding an rcu_read_lock(). This included cases like: drbd_sync_handshake (acquire the RCU lock) drbd_asb_recover_1p drbd_khelper drbd_bcast_event genlmsg_new(GFP_NOIO) --> may sleep drbd_sync_handshake (acquire the RCU lock) drbd_asb_recover_1p drbd_khelper notify_helper genlmsg_new(GFP_NOIO) --> may sleep drbd_sync_handshake (acquire the RCU lock) drbd_asb_recover_1p drbd_khelper notify_helper mutex_lock --> may sleep While using GFP_ATOMIC whould have been possible in the first two cases, the real fix is to narrow the rcu_read_lock. Reported-by: Jia-Ju Bai Reviewed-by: Lars Ellenberg Signed-off-by: Roland Kammerer Signed-off-by: Jens Axboe commit 553a7cca769d551f1317186760631487c47e23bf Author: Karthikeyan Periyasamy Date: Thu Dec 20 09:53:17 2018 +0200 ath10k: fix kernel panic due to use after free This issue arise in a race condition between ath10k_sta_state() and ath10k_htt_fetch_peer_stats(), explained in below scenario Steps: 1. In ath10k_sta_state(), arsta->tx_stats get deallocated before peer deletion when the station moves from IEEE80211_STA_NONE to IEEE80211_STA_NOTEXIST state. 2. Meanwhile ath10k receive HTT_T2H_MSG_TYPE_PEER_STATS message. In ath10k_htt_fetch_peer_stats(), arsta->tx_stats get accessed after the peer validation check. Since arsta->tx_stats get freed before the peer deletion [1]. ath10k_htt_fetch_peer_stats() ended up in "use after free" situation. Fixed this issue by moving the arsta->tx_stats free handling after the peer deletion. so that ath10k_htt_fetch_peer_stats() will not end up in "use after free" situation. Kernel Panic: Unable to handle kernel NULL pointer dereference at virtual address 00000286 pgd = d8754000 [00000286] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM ... CPU: 0 PID: 6245 Comm: hostapd Not tainted task: dc44cac0 ti: d4a38000 task.ti: d4a38000 PC is at kmem_cache_alloc+0x7c/0x114 LR is at ath10k_sta_state+0x190/0xd58 [ath10k_core] pc : [] lr : [] psr: 20000013 sp : d4a39b88 ip : 00000000 fp : 00000001 r10: 00000000 r9 : 1d3bc000 r8 : 00000dc0 r7 : 000080d0 r6 : d4a38000 r5 : dd401b00 r4 : 00000286 r3 : 00000000 r2 : d4a39ba0 r1 : 000080d0 r0 : dd401b00 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5787d Table: 5a75406a DAC: 00000015 Process hostapd (pid: 6245, stack limit = 0xd4a38238) Stack: (0xd4a39b88 to 0xd4a3a000) ... [] (kmem_cache_alloc) from [] (ath10k_sta_state+0x190/0xd58 [ath10k_core]) [] (ath10k_sta_state [ath10k_core]) from [] (sta_info_insert_rcu+0x418/0x61c [mac80211]) [] (sta_info_insert_rcu [mac80211]) from [] (ieee80211_add_station+0xf0/0x134 [mac80211]) [] (ieee80211_add_station [mac80211]) from [] (nl80211_new_station+0x330/0x36c [cfg80211]) [] (nl80211_new_station [cfg80211]) from [] (extack_doit+0x2c/0x74 [compat]) [] (extack_doit [compat]) from [] (genl_rcv_msg+0x274/0x30c) [] (genl_rcv_msg) from [] (netlink_rcv_skb+0x58/0xac) [] (netlink_rcv_skb) from [] (genl_rcv+0x20/0x34) [] (genl_rcv) from [] (netlink_unicast+0x11c/0x204) [] (netlink_unicast) from [] (netlink_sendmsg+0x30c/0x370) [] (netlink_sendmsg) from [] (sock_sendmsg+0x70/0x84) [] (sock_sendmsg) from [] (___sys_sendmsg.part.3+0x188/0x228) [] (___sys_sendmsg.part.3) from [] (__sys_sendmsg+0x4c/0x70) [] (__sys_sendmsg) from [] (ret_fast_syscall+0x0/0x44) Code: ebfffec1 e1a04000 ea00001b e5953014 (e7940003) ath10k_pci 0000:01:00.0: SWBA overrun on vdev 0, skipped old beacon Hardware tested: QCA9984 Firmware tested: 10.4-3.6.0.1-00004 Fixes: a904417fc ("ath10k: add extended per sta tx statistics support") Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo commit 8b1cce9f5832a8eda17d37a3c49fb7dd2d650f46 Author: Thierry Reding Date: Thu Dec 20 17:35:47 2018 +0100 dma-mapping: fix inverted logic in dma_supported The cleanup in commit 356da6d0cde3 ("dma-mapping: bypass indirect calls for dma-direct") accidentally inverted the logic in the check for the presence of a ->dma_supported() callback. Switch this back to the way it was to prevent a crash on boot. Fixes: 356da6d0cde3 ("dma-mapping: bypass indirect calls for dma-direct") Signed-off-by: Thierry Reding Signed-off-by: Christoph Hellwig commit bff70e5f78e9708de18cbed003abe10349719ba5 Author: YueHaibing Date: Thu Dec 20 09:53:10 2018 +0200 ath10k: remove set but not used variable 'num_tdls_vifs' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state': drivers/net/wireless/ath/ath10k/mac.c:6238:7: warning: variable 'num_tdls_vifs' set but not used [-Wunused-but-set-variable] 'num_tdls_vifs' not used any more after 9a993cc1ea95 ("ath10k: fix the logic of limiting tdls peer counts") Also, remove the single called function ath10k_mac_tdls_vifs_count and ath10k_mac_tdls_vifs_count_iter. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 82c7b351be3fad005ba38a26f7f1ab7f0841e505 Author: Horia Geantă Date: Wed Dec 19 12:18:44 2018 +0200 Revert "arm64: defconfig: Enable FSL_MC_BUS and FSL_MC_DPIO" This reverts commit d9678adbe733a770428a98651beaa2817d503ed3. Received below report from Stefan. Revert the commit until CAAM driver dependency cycles are fixed. this patch in next-20181214 breaks "make modules_install" for arm64/defconfig on my Ubuntu machine: DEPMOD 4.20.0-rc6-next-20181214 depmod: ERROR: Found 6 modules in dependency cycles! depmod: ERROR: Cycle detected: caamalg_desc -> dpaa2_caam -> authenc depmod: ERROR: Cycle detected: caamalg_desc -> dpaa2_caam -> fsl_mc_dpio depmod: ERROR: Cycle detected: dpaa2_caam -> caamhash_desc -> dpaa2_caam depmod: ERROR: Cycle detected: caamalg_desc -> dpaa2_caam -> caamhash_desc -> error depmod: ERROR: Cycle detected: caamalg_desc -> dpaa2_caam -> caamhash_desc -> caamalg_desc Reported-by: Stefan Wahren Signed-off-by: Horia Geantă Signed-off-by: Arnd Bergmann commit 54518ed45734bb7ebf2773b1d32120c62338cc93 Merge: 8e22bce990b5d 6f61a2c8f1f61 Author: Arnd Bergmann Date: Thu Dec 20 17:36:08 2018 +0100 Merge tag 'renesas-fixes2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Second Round of Renesas ARM Based SoC Fixes for v4.20 * R-Car D3 (r8a77995) SoC based Draak board - Correct CVBS input to allow probing of the VIN * tag 'renesas-fixes2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: draak: Fix CVBS input commit 17f3b556a3e3c9227549c3e7762c5c27a48e5c59 Author: Al Viro Date: Sat Nov 10 23:46:07 2018 -0500 selinux: expand superblock_doinit() calls Signed-off-by: Al Viro Reviewed-by: David Howells commit 43f5e655eff7e124d4e484515689cba374ab698e Author: David Howells Date: Thu Nov 1 23:07:25 2018 +0000 vfs: Separate changing mount flags full remount Separate just the changing of mount flags (MS_REMOUNT|MS_BIND) from full remount because the mount data will get parsed with the new fs_context stuff prior to doing a remount - and this causes the syscall to fail under some circumstances. To quote Eric's explanation: [...] mount(..., MS_REMOUNT|MS_BIND, ...) now validates the mount options string, which breaks systemd unit files with ProtectControlGroups=yes (e.g. systemd-networkd.service) when systemd does the following to change a cgroup (v1) mount to read-only: mount(NULL, "/run/systemd/unit-root/sys/fs/cgroup/systemd", NULL, MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_REMOUNT|MS_BIND, NULL) ... when the kernel has CONFIG_CGROUPS=y but no cgroup subsystems enabled, since in that case the error "cgroup1: Need name or subsystem set" is hit when the mount options string is empty. Probably it doesn't make sense to validate the mount options string at all in the MS_REMOUNT|MS_BIND case, though maybe you had something else in mind. This is also worthwhile doing because we will need to add a mount_setattr() syscall to take over the remount-bind function. Reported-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: Al Viro Reviewed-by: David Howells commit e262e32d6bde0f77fb0c95d977482fc872c51996 Author: David Howells Date: Thu Nov 1 23:07:23 2018 +0000 vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled Only the mount namespace code that implements mount(2) should be using the MS_* flags. Suppress them inside the kernel unless uapi/linux/mount.h is included. Signed-off-by: David Howells Signed-off-by: Al Viro Reviewed-by: David Howells commit d70f4ece9da12b7319a87d02d33a89353268c689 Merge: 9df95e8ec568f 489c066cfdf1c Author: Daniel Borkmann Date: Thu Dec 20 17:28:29 2018 +0100 Merge branch 'bpf-jset-verifier' Jakub Kicinski says: ==================== This is a v2 of the patch set to teach the verifier about BPF_JSET instruction. There is also a number of tests include for both basic functioning of the instruction and the verifier logic. The NFP JIT handling of JSET is tweaked. Last patch adds missing file to gitignore. Reposting part of previous series without the dead code elimination. ==================== Signed-off-by: Daniel Borkmann commit 489c066cfdf1cad776c5e041f32a2e3cdb05050a Author: Jakub Kicinski Date: Wed Dec 19 22:13:09 2018 -0800 selftests: bpf: add missing executables to .gitignore commit 435f90a338ae ("selftests/bpf: add a test case for sock_ops perf-event notification") missed adding new test to gitignore. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 4987eaccd2d1535eaa72d3bbe2b8bfc8267ba965 Author: Jakub Kicinski Date: Wed Dec 19 22:13:08 2018 -0800 nfp: bpf: optimize codegen for JSET with a constant The top word of the constant can only have bits set if sign extension set it to all-1, therefore we don't really have to mask the top half of the register. We can just OR it into the result as is. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann commit 6e774845b321e729966fed7de4aa8ea59c2c3b2e Author: Jakub Kicinski Date: Wed Dec 19 22:13:07 2018 -0800 nfp: bpf: remove the trivial JSET optimization The verifier will now understand the JSET instruction, so don't mark the dead branch in the JIT as noop. We won't generate any code, anyway. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann commit 9b38c4056b2736bb5902e8b0911832db666fd19b Author: Jakub Kicinski Date: Wed Dec 19 22:13:06 2018 -0800 bpf: verifier: reorder stack size check with dead code sanitization Reorder the calls to check_max_stack_depth() and sanitize_dead_code() to separate functions which can rewrite instructions from pure checks. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang Signed-off-by: Daniel Borkmann commit 14507e35bd9dedcd14c24f9e5e0e0dd48e972e53 Author: Jakub Kicinski Date: Wed Dec 19 22:13:05 2018 -0800 selftests: bpf: verifier: add tests for JSET interpretation Validate that the verifier reasons correctly about the bounds and removes dead code based on results of JSET instruction. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 960ea056561a08e2b837b2f02d22c53226414a84 Author: Jakub Kicinski Date: Wed Dec 19 22:13:04 2018 -0800 bpf: verifier: teach the verifier to reason about the BPF_JSET instruction Some JITs (nfp) try to optimize code on their own. It could make sense in case of BPF_JSET instruction which is currently not interpreted by the verifier, meaning for instance that dead could would not be detected if it was under BPF_JSET branch. Teach the verifier basics of BPF_JSET, JIT optimizations will be removed shortly. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang Acked-by: Edward Cree Signed-off-by: Daniel Borkmann commit 5a8d5209ac0228c9cf8f335dfdfffa71c54b3201 Author: Jakub Kicinski Date: Wed Dec 19 22:13:03 2018 -0800 selftests: bpf: add trivial JSET tests We seem to have no JSET instruction test, and LLVM does not generate it at all, so let's add a simple hand-coded test to make sure JIT implementations are correct. v2: - extend test_verifier to handle multiple inputs and add the sample there (Daniel) - add a sign extension case Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 44a7b3b6e3a458f9549c2cc28e74ecdc470e42f1 Merge: ac68a3d3c3eba 0c2ff8d796895 Author: David S. Miller Date: Thu Dec 20 08:26:16 2018 -0800 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Update for net-next. Three main changes in this series, besides the usual firmware spec update: 1. Add support for a new firmware communication channel direct to the firmware processor that handles flow offloads. This speeds up flow offload operations. 2. Use 64-bit internal flow handles to increase the number of flows that can be offloaded. 3. Add level-2 context memory paging so that we can configure more context memory for RDMA on the 57500 chips. Allocate more context memory if RDMA is enabled on the 57500 chips. ==================== Signed-off-by: David S. Miller commit 0c2ff8d796895448b3a23c9cf7f37e721daeea48 Author: Michael Chan Date: Thu Dec 20 03:38:53 2018 -0500 bnxt_en: Adjust default RX coalescing ticks to 10 us. For a little better performance on faster machines and faster link speeds. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit abd43a13525db70926999ebe3e272c38119fdfbe Author: Venkat Duvvuru Date: Thu Dec 20 03:38:52 2018 -0500 bnxt_en: Support for 64-bit flow handle. Older firmware only supports 16-bit flow handle, because of which the number of flows that can be offloaded can’t scale beyond a point. Newer firmware supports 64-bit flow handle enabling the host to scale upto millions of flows. With the new 64-bit flow handle support, driver has to query flow stats in a different way compared to the older approach. This patch adds support for 64-bit flow handle and new way to query flow stats. Signed-off-by: Venkat Duvvuru Reviewed-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit cf6daed098d14760d6605268d28bfdf7b3bfa375 Author: Michael Chan Date: Thu Dec 20 03:38:51 2018 -0500 bnxt_en: Increase context memory allocations on 57500 chips for RDMA. If RDMA is supported on the 57500 chip, increase context memory allocations for the resources used by RDMA. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 08fe9d1816067170e167867d06009fb0f41cb411 Author: Michael Chan Date: Thu Dec 20 03:38:50 2018 -0500 bnxt_en: Add Level 2 context memory paging support. Add the new functions bnxt_alloc_ctx_pg_tbls()/bnxt_free_ctx_pg_tbls() to allocate and free pages for context memory. The new functions will handle the different levels of paging support and allocate/free the pages accordingly using the existing functions. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 4f49b2b8d4167b712ce876bff08bd9606a44f7a6 Author: Michael Chan Date: Thu Dec 20 03:38:49 2018 -0500 bnxt_en: Enhance bnxt_alloc_ring()/bnxt_free_ring(). To support level 2 context page memory structures, enhance the bnxt_ring_mem_info structure with a "depth" field to specify the page level and add a flag to specify using full pages for L1 and L2 page tables. This is needed to support RDMA functionality on 57500 chips since RDMA requires more context memory. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 760b6d33410cda351f236058585471cb0f417978 Author: Venkat Duvvuru Date: Thu Dec 20 03:38:48 2018 -0500 bnxt_en: Add support for 2nd firmware message channel. Earlier, some of the firmware commands (ex: CFA_FLOW_*) which are processed by KONG processor were sent to the CHIMP processor from the host. This approach was taken as there was no direct message channel to KONG. CHIMP in turn used to send them to KONG. Newer firmware supports a new message channel which the host can send messages directly to the KONG processor. This patch adds support for required changes needed in the driver to support direct KONG message channel. This speeds up flow related messages sent to the firmware for CLS_FLOWER offload. Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5c209fc82159f2f71e2772f28cd1d447b821e98d Author: Venkat Duvvuru Date: Thu Dec 20 03:38:47 2018 -0500 bnxt_en: Introduce bnxt_get_hwrm_resp_addr & bnxt_get_hwrm_seq_id routines. These routines will be enhanced in the subsequent patch to return the 2nd firmware comm. channel's hwrm response address & sequence id respectively. Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 89455017fb8dd5dff0d088ecb82bccf9f9b715cd Author: Venkat Duvvuru Date: Thu Dec 20 03:38:46 2018 -0500 bnxt_en: Avoid arithmetic on void * pointer. Typecast hwrm_cmd_resp_addr to (u8 *) from (void *) before doing arithmetic. Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2e9ee3987719148308ff1794aa91f8314f839ccd Author: Venkat Duvvuru Date: Thu Dec 20 03:38:45 2018 -0500 bnxt_en: Use macros for firmware message doorbell offsets. In preparation for adding a 2nd communication channel to firmware. Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit fc718bb2d1efa4348995b4811c243ec59f913a59 Author: Venkat Duvvuru Date: Thu Dec 20 03:38:44 2018 -0500 bnxt_en: Set hwrm_intr_seq_id value to its inverted value. Set hwrm_intr_seq_id value to its inverted value instead of HWRM_SEQ_INVALID, when an hwrm completion of type CMPL_BASE_TYPE_HWRM_DONE is received. This will enable us to use the complete 16-bit sequence ID space. Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3322479e6d17ea17b75848fd7c7702ccf82c9c35 Author: Michael Chan Date: Thu Dec 20 03:38:43 2018 -0500 bnxt_en: Update firmware interface spec. to 1.10.0.33. The major changes are in the flow offload firmware APIs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ac68a3d3c3eba61c693d63a89223e1df8fe1f0c6 Merge: a9cd3439e3c6d fa89a4593b927 Author: David S. Miller Date: Thu Dec 20 08:21:47 2018 -0800 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 2018-12-20 Two last patches for this release cycle: 1) Remove an unused variable in xfrm_policy_lookup_bytype(). From YueHaibing. 2) Fix possible infinite loop in __xfrm6_tunnel_alloc_spi(). Also from YueHaibing. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 74ff666bd7ba2da563f99f2a8af7bf9f20008bc9 Merge: b3fc4e0e966ea aa167f3fed0c3 2a9d92fb3a128 Author: Mark Brown Date: Thu Dec 20 16:01:30 2018 +0000 Merge remote-tracking branches 'spi/topic/mem' and 'spi/topic/mtd' into spi-next commit b3fc4e0e966eaaf2f8afa1de3280770acd838b87 Merge: 2d54911644e4d 916d9802e4b07 Author: Mark Brown Date: Thu Dec 20 16:01:28 2018 +0000 Merge branch 'spi-4.21' into spi-next commit 2d54911644e4d5ea1ba01500d3a46dabc3b1e75a Merge: 7566ec393f416 29bdedfd9cf40 Author: Mark Brown Date: Thu Dec 20 16:01:26 2018 +0000 Merge branch 'spi-4.20' into spi-linus commit 3f47de2c6b6068cf7d5221f8f307969e7e4f1fc5 Merge: bda090cfeb502 8ac686d7dfed7 Author: Arnd Bergmann Date: Thu Dec 20 16:59:42 2018 +0100 Merge tag 'samsung-dt-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM changes for v4.21, part 2 1. Add missing CPUs in cooling maps for Odroid X2 (missed in previous round of fixups). 2. Fix clock configuration in audio subsystem on Odroid XU3/XU4. * tag 'samsung-dt-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Specify I2S assigned clocks in proper node ARM: dts: exynos: Add missing CPUs in cooling maps for Odroid X2 Signed-off-by: Arnd Bergmann commit bda090cfeb502a650d887e6c66be9644286d815c Merge: 984199efb0be4 c266a2b4407af Author: Arnd Bergmann Date: Thu Dec 20 16:58:23 2018 +0100 Merge tag 'sunxi-dt64-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner arm64 DT changes for 4.21 - round 2 Bluetooth using a Broadcom (now Cypress) chip connected to an UART on the Bananapi M64 is enabled using serdev and the updated bindings for Broadcom Bluetooth. The patch series had been sitting on the mailing lists for a month, and the driver bits were just merged on 2018/12/19. * tag 'sunxi-dt64-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a64: bananapi-m64: Add Bluetooth device node Signed-off-by: Arnd Bergmann commit 984199efb0be4857ebe360205bda608b9e1aee9d Merge: f1a6caf73c662 afdd273e269ca Author: Arnd Bergmann Date: Thu Dec 20 16:54:17 2018 +0100 Merge tag 'sunxi-dt-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.21 - round 2 This is a small pull request for some lingering things that didn't make the first round of patches. First, the new suniv device tree included device tree headers for the clock and reset indices. These header filers are going in through the clock tree. Thus with the dt and core branches in arm-soc alone, it doesn't build. One fix is included to remove the #include statements. The defined macros aren't used yet as they were properly removed during the review phase. Second, Bluetooth using Broadcom (now Cypress) chips connected to UARTs on various boards is enabled using serdev and the updated bindings for Broadcom Bluetooth. The patch series had been sitting on the mailing lists for a month, and the driver bits were just merged on 2018/12/19. * tag 'sunxi-dt-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sunxi: Enable Broadcom-based Bluetooth for multiple boards ARM: dts: suniv: Fix improper bindings include patch Signed-off-by: Arnd Bergmann commit f1a6caf73c66226e78f297618288c8b3445d13c0 Merge: ea096315361bb 30648e9f86477 Author: Arnd Bergmann Date: Thu Dec 20 16:47:25 2018 +0100 Merge tag 'imx-qspi-dt-clean' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Freescale QSPI device tree cleanup for 4.21: - It contains a series from Schrempf Frieder that cleans up FSL QSPI device tree nodes. The current device trees are broken because they use an inconsistent scheme for assigning the reg properties. It becomes a problem with ongoing QSPI driver under SPI framework. So the cleanup is a preparation for new driver landing in the next cycle. * tag 'imx-qspi-dt-clean' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller arm64: dts: Remove unused properties from FSL QSPI driver nodes ARM: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller ARM: dts: imx6sx-sdb: Fix the reg properties for the FSL QSPI nodes ARM: dts: Remove unused properties from FSL QSPI driver nodes Signed-off-by: Arnd Bergmann commit 942104a21ce4951420ddf6c6b3179a0627301f7e Author: NeilBrown Date: Mon Dec 10 09:58:37 2018 +1100 docs: improve pathname-lookup document structure Get rid of some unneeded structural elements around the new (to RST) pathname-lookup document. Signed-off-by: NeilBrown [ jc: grabbed from email and changelog added ] Signed-off-by: Jonathan Corbet commit 6b5a49b46cf128c8360509ea5a8e6391cf6f1c43 Author: Helen Koike Date: Fri Dec 7 17:11:58 2018 -0200 configfs: fix wrong name of struct in documentation The name of the struct is configfs_bin_attribute instead of configfs_attribute Signed-off-by: Helen Koike Fixes: 03607ace807b ("configfs: implement binary attributes") Signed-off-by: Jonathan Corbet commit ea096315361bbec7d0b40de4937e7e09fd85f8e7 Author: Maxime Ripard Date: Fri Dec 14 10:55:38 2018 +0100 ARM: dts: suniv: Fix improper bindings include patch The clock and reset bindings are going through different trees, and while the patch doesn't contain any value defined in that header, it still includes those files and result in a build breakage when building the DT without the matching clock and reset patches applied. Signed-off-by: Maxime Ripard Signed-off-by: Arnd Bergmann commit eafb27fa5283599ce6c5492ea18cf636a28222bb Author: Macpaul Lin Date: Wed Dec 19 12:11:03 2018 +0800 cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader. Mediatek Preloader is a proprietary embedded boot loader for loading Little Kernel and Linux into device DRAM. This boot loader also handle firmware update. Mediatek Preloader will be enumerated as a virtual COM port when the device is connected to Windows or Linux OS via CDC-ACM class driver. When the USB enumeration has been done, Mediatek Preloader will send out handshake command "READY" to PC actively instead of waiting command from the download tool. Since Linux 4.12, the commit "tty: reset termios state on device registration" (93857edd9829e144acb6c7e72d593f6e01aead66) causes Mediatek Preloader receiving some abnoraml command like "READYXX" as it sent. This will be recognized as an incorrect response. The behavior change also causes the download handshake fail. This change only affects subsequent connects if the reconnected device happens to get the same minor number. By disabling the ECHO termios flag could avoid this problem. However, it cannot be done by user space configuration when download tool open /dev/ttyACM0. This is because the device running Mediatek Preloader will send handshake command "READY" immediately once the CDC-ACM driver is ready. This patch wants to fix above problem by introducing "DISABLE_ECHO" property in driver_info. When Mediatek Preloader is connected, the CDC-ACM driver could disable ECHO flag in termios to avoid the problem. Signed-off-by: Macpaul Lin Cc: stable@vger.kernel.org Reviewed-by: Johan Hovold Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 10f9d7fd56fec2244636dffb122673af663cf383 Merge: 826833df4e4b3 5da94b50475ac Author: Arnd Bergmann Date: Thu Dec 20 16:37:38 2018 +0100 Merge tag 'am654-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into next/dt AM65x DT changes for 4.21. Includes: - Pinctrl support - I2C support - ECAP PWM support - Power domain handling for UARTs - McSPI support * tag 'am654-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-am654: Enable main domain McSPI0 arm64: dts: ti: k3-am654: Add McSPI DT nodes arm64: dts: ti: k3-am654: Populate power-domain property for UART nodes arm64: dts: ti: k3-am654-base-board: Enable ECAP PWM arm64: dts: ti: k3-am65-main: Add ECAP PWM node arm64: dts: ti: k3-am654-base-board: Add I2C nodes arm64: dts: ti: am654-base-board: Add pinmux for main uart0 arm64: dts: ti: k3-am65: Add pinctrl regions dt-bindings: pinctrl: k3: Introduce pinmux definitions arm64: dts: ti: k3-am654: Fix wakeup_uart reg address Signed-off-by: Arnd Bergmann commit 826833df4e4b396beef6420647aabe409bd84533 Merge: bc8bd33891d31 c7a851b7050e2 Author: Arnd Bergmann Date: Thu Dec 20 16:34:06 2018 +0100 Merge tag 'omap-for-v4.21/dt-ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Add interconnect target module dts data for omaps for v4.21 This big set of changes adds SoC specific l4 interconnect target module device tree data for am335x, am437x, omap5 and dra7 SoCs. We also move existing devices to the right location in the l4 interconnect hierarcy. This is similar to what we've already done for omap4 l4 interconnects earlier, and follows what is documented in the ti-sysc driver dts binding in Documentation/devicetree/bindings/bus/ti-sysc.txt. These changes will essentially replace the struct ti_sysc and clock entries in the arch/arm/mach-omap2/omap_hwmod_*_data.c files. Then a few merge windows later, we can start dropping the built-in platform data from the omap_hwmod_*_data.c files in favor of the device tree data only. For now, we verify the device tree data module data against the built-in data and warn about changes to prevent regressions. With the device tree data, we are also probing devices with the ti-sysc interconnect target module instead of omap_device. This fixes up the handling for multiple device instances in a single interconnect target module that has caused trouble earlier. A custom wrapper driver has been needed earlier for such cases. And as the device tree data is organized by the l4 interconnect instances, we will be able to use genpd later on. This is because each interconnect instance is also often also a single power domain. This series of changes has been brewing for several months now. I did not want to send a pull request earlier as people were still seeing device specific issues until recently though. However, it turned out that all the issues were quite trivial to fix. I had missed adding device tree ranges for the l3 data port used on some devices, and I had missed converting the device addresses for a few devices. And some devices like needed fixes for deferred probe handling such as the EHCI PHY for built-in case on omap5. Anyways, in case of trouble, we can easily just revert changes for a single device if needed. * tag 'omap-for-v4.21/dt-ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Cosmetic fix for omap5 USB node names ARM: dts: Fix wrong address for omap5 sata phy ARM: dts: Add missing ranges for dra7 mcasp l3 ports ARM: dts: Fix ranges for am335x epwmss ARM: dts: Fix hsi gdd range for omap4 ARM: dts: Add am335x mcasp with l3 data port ranges ARM: dts: Add missing ranges for am437x mcasp l3 ports ARM: dts: dra7: Move the ti,no-idle quirk on proper gmac node ARM: dts: Revert am335x mcasp ti-sysc changes ARM: dts: omap5: Add l4 interconnect hierarchy and ti-sysc data ARM: dts: Use dra7 mcasp compatible for mcasp instances ARM: dts: dra7: Move l4 child devices to probe them with ti-sysc ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc ARM: dts: am335x: Add l4 interconnect hierarchy and ti-sysc data ARM: dts: am437x: Move l4 child devices to probe them with ti-sysc ARM: dts: am437x: Add l4 interconnect hierarchy and ti-sysc data ARM: dts: dra7: convert to use new clkctrl layout ARM: dts: am43xx: convert to use new clkctrl layout ARM: dts: am33xx: convert to use new clkctrl layout Signed-off-by: Arnd Bergmann commit 54a67c753610a762ec9f5de3a6fda76a3c3bdb8e Author: Mike Rapoport Date: Thu Dec 6 23:13:01 2018 +0200 docs/mm-api: link slab_common.c to "The Slab Cache" section Several functions in mm/slab_common.c have kernel-doc comments, it makes perfect sense to link them to the MM API reference. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 16df1456aa858a86f398dbc7d27649eb6662b0cc Author: Dan Carpenter Date: Wed Dec 19 22:19:25 2018 +0300 mm, memory_hotplug: update a comment in unregister_memory() The remove_memory_block() function was renamed to in commit cc292b0b4302 ("drivers/base/memory.c: rename remove_memory_block() to remove_memory_section()"). Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit c0b8a8709ebe0f72523a1e76f30a1bde821c060c Author: Yangtao Li Date: Sat Dec 15 03:36:36 2018 -0500 component: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit f496990f1f4b1dbf4f878f6864cbf4e303189177 Author: Mike Rapoport Date: Thu Dec 6 23:13:00 2018 +0200 slab: make kmem_cache_create{_usercopy} description proper kernel-doc Add the description for kmem_cache_create, fixup the return value paragraph and make both kmem_cache_create and add the second '*' to the comment opening. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit bc8bd33891d3129e1ca0425879a30130cc80af1c Merge: 5385c226b63db ac1e507fe61db Author: Arnd Bergmann Date: Thu Dec 20 16:32:23 2018 +0100 Merge tag 'zynq-dt-for-v5.0' of https://github.com/Xilinx/linux-xlnx into next/dt arm: dts: zynq: DT changes for v5.0 - Fix mmc node name * tag 'zynq-dt-for-v5.0' of https://github.com/Xilinx/linux-xlnx: ARM: dts: Use mmc@ instead sdhci@ Signed-off-by: Arnd Bergmann commit c58eef061dda7d843dcc0ad6fea7e597d4c377c0 Author: Colin Ian King Date: Wed Dec 19 16:30:07 2018 +0000 staging: wilc1000: fix missing read_write setting when reading data Currently the cmd.read_write setting is not initialized so it contains garbage from the stack. Fix this by setting it to 0 to indicate a read is required. Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable") Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Colin Ian King Cc: stable Acked-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 012c5e8d819ccb048c86df213f7d57a3d4043a2c Author: Jona Crasselt Date: Wed Dec 19 17:07:05 2018 +0100 mt7621-mmc: char * array declaration might be better as static const Issue reported by checkpatch.pl. Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 515ba7e7f032a609b649d85aa10f4b258ff2edef Author: Jona Crasselt Date: Wed Dec 19 17:07:04 2018 +0100 mt7621-mmc: return statement in void function unnecessary Issue reported by checkpatch.pl. Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 43c978a16eee76ac45ae3223ccafcfa6186bcc46 Author: Jona Crasselt Date: Wed Dec 19 17:07:03 2018 +0100 mt7621-mmc: Alignment should match open parenthesis Issue reported by checkpatch.pl. Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 71fbc630160f485dac04d35e7df81cc97d021628 Author: Jona Crasselt Date: Wed Dec 19 17:07:02 2018 +0100 mt7621-mmc: Removed unnecessary blank lines Issue reported by checkpatch.pl. Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 641e96e03aa0444389daad7d0422c9d52faf2f15 Author: Jona Crasselt Date: Wed Dec 19 17:07:01 2018 +0100 mt7621-mmc: Fix some coding style issues Fix some comment-related issues reported by checkpatch.pl: - Block comments use * on subsequent lines - Block comments use a trailing */ on a separate line Signed-off-by: Jona Crasselt Signed-off-by: Felix Windsheimer Signed-off-by: Greg Kroah-Hartman commit 5385c226b63db5827814e381c5aa290814445c03 Merge: b125eb0bf4699 d1d4445abffb2 Author: Arnd Bergmann Date: Thu Dec 20 16:30:59 2018 +0100 Merge tag 'zynqmp-dt-for-v5.0' of https://github.com/Xilinx/linux-xlnx into next/dt arm64: dts: zynqmp: DT changes for v5.0 - Fix node names - Fix wakeup-source - Wire ddrc - Label gpio controller (PS gpio) * tag 'zynqmp-dt-for-v5.0' of https://github.com/Xilinx/linux-xlnx: arm64: dts: zynqmp: Fix node names which contain "_" arm64: dts: zynqmp: Add missing gpio-controller to ps gpio arm64: dts: zynqmp: Add DDRC node arm64: dts: zynqmp: replace gpio-key,wakeup with wakeup-source property arm64: dts: zynqmp: Use mmc@ instead sdhci@ Signed-off-by: Arnd Bergmann commit efa0f49496be359ab3e068b0a75b15808c354b7f Author: Alexander Shiyan Date: Thu Dec 20 09:19:30 2018 +0300 serial: sccnxp: Allow to use non-standard baud rates This patch adds support for the use of non-standard baud rates. For these purposes, we use the built-in timer/counter. Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman commit 4ce193fdba48516717a4840043abb83f71109ee2 Author: Alexander Shiyan Date: Thu Dec 20 09:19:29 2018 +0300 serial: sccnxp: Adds a delay between sequential read/write cycles This patch adds a delay between sequential read/write cycles, to ensure the required minimum inactive time (tRWD). A time value from the datasheet has been added for each type of supported chips. The “inline” compiler attribute has been removed from the read/write functions, simply allow the compiler to control this. Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman commit 663abb1a7a7ff8fea9ab0145463de7fcff823755 Author: Ryan Case Date: Wed Dec 19 12:33:53 2018 -0800 tty: serial: qcom_geni_serial: Fix UART hang If a serial console write occured while a UART transmit command was waiting for a done signal then no further data would be sent until something new kicked the system into gear. If there is already data waiting in the circular buffer we must re-enable the tx watermark so we receive the expected interrupts. Signed-off-by: Ryan Case Reviewed-by: Evan Green Signed-off-by: Greg Kroah-Hartman commit 3c66eb4ba18dd1cab0d1bde651cde6d8bdb47696 Author: Matthias Kaehlcke Date: Wed Dec 19 10:17:47 2018 -0800 tty: serial: qcom_geni_serial: Fix wrap around of TX buffer Before commit a1fee899e5bed ("tty: serial: qcom_geni_serial: Fix softlock") the size of TX transfers was limited to the TX FIFO size, and wrap arounds of the UART circular buffer were split into two transfers. With the commit wrap around are allowed within a transfer. The TX FIFO of the geni serial port uses a word size of 4 bytes. In case of a circular buffer wrap within a transfer the driver currently may write an incomplete word to the FIFO, with some bytes containing data from the circular buffer and others being zero. Since the transfer isn't completed yet the zero bytes are sent as if they were actual data. Handle wrap arounds of the TX buffer properly and ensure that words written to the TX FIFO always contain valid data (unless the transfer is completed). Fixes: a1fee899e5bed ("tty: serial: qcom_geni_serial: Fix softlock") Signed-off-by: Matthias Kaehlcke Reviewed-by: Evan Green Tested-by: Ryan Case Signed-off-by: Greg Kroah-Hartman commit 3e730e858139c3bed9587ca50ce0f2aa12fe9523 Merge: 9f23b7ba6379f 16ad9501b1f2e Author: Arnd Bergmann Date: Thu Dec 20 16:11:02 2018 +0100 Merge tag 'qcom-drivers-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Qualcomm ARM Based Driver Updates for v4.21 Part 2 - Redo * Fix SCM compilation error * tag 'qcom-drivers-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: firmware: qcom: scm: fix compilation error when disabled Signed-off-by: Arnd Bergmann commit 9f23b7ba6379fd80f0857cf4750e9eda83fe5408 Merge: a6f119a06960e fee10bd226786 Author: Arnd Bergmann Date: Thu Dec 20 16:10:32 2018 +0100 Merge tag 'zynq-soc-for-v5.0' of https://github.com/Xilinx/linux-xlnx into next/drivers ARM: Xilinx Zynq SoC patches for v5.0 - Adding pl353 smc driver * tag 'zynq-soc-for-v5.0' of https://github.com/Xilinx/linux-xlnx: memory: pl353: Add driver for arm pl353 static memory controller dt-bindings: memory: Add pl353 smc controller devicetree binding information Signed-off-by: Arnd Bergmann commit 916d9802e4b0723c1e4650e58e04c0259c14b85c Author: Hoan Nguyen An Date: Thu Dec 20 17:48:42 2018 +0900 spi: sh-msiof: Reduce the number of times write to and perform the transmission from FIFO The current state of the spi-sh-msiof, in master transfer mode: if t-> bits_per_word <= 8, if the data length is divisible by 4 ((len & 3) = 0), the length of each word will be 32 bits In case of data length can not be divisible by 4 ((len & 3) != 0), always set each word to be 8 bits, this will increase the number of times that write to FIFO, increasing the number of times it should be transmitted. Assume that the number of bytes of data length more than 64 bytes, each transmission will write 64 times into the TFDR then transmit, a maximum one-time transmission will transmit 64 bytes if each word is 8 bits long. Switch to setting if t->bits_per_word <= 8, the word length will be 32 bits although the data length is not divisible by 4, then if leftover, will transmit the balance and the length of each words is 1 byte. The maximum each can transmit up to 64 x 4 (Data Size = 32 bits (4 bytes)) = 256 bytes. TMDR2 : Bits 28 to 24 BITLEN1[4:0] Data Size (8 to 32 bits) Bits 23 to 16 WDLEN1[7:0] Word Count (1 to 64 words) Signed-off-by: Hoan Nguyen An Signed-off-by: Mark Brown commit 3e60b4fc86710cd2095628c67b296e7cc4b239c1 Author: Yangtao Li Date: Sat Dec 15 03:21:48 2018 -0500 regulator: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Mark Brown commit f4c8f980283b4832dad4d9ff4d5ecb3d7763efae Author: Axel Lin Date: Wed Dec 19 16:58:04 2018 +0800 regulator: mcp16502: Fix missing n_voltages setting The n_voltages setting is not set, fix it. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 4906d09164c00979dcbb28060231d9ce46ab2061 Author: Axel Lin Date: Thu Dec 20 21:14:13 2018 +0800 regulator: mcp16502: Use #ifdef CONFIG_PM_SLEEP around mcp16502_suspend/resume_noirq mcp16502_suspend/resume_noirq is only used by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS when CONFIG_PM_SLEEP is defined. So use #ifdef CONFIG_PM_SLEEP instead CONFIG_SUSPEND guard. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 31d1b7710262fba12282b24083f20dc76e0efc93 Merge: 217188d9f985b 7566ec393f416 Author: Bartlomiej Zolnierkiewicz Date: Thu Dec 20 15:35:07 2018 +0100 Merge tag 'v4.20-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next Linux 4.20-rc7 Sync with upstream (which now contains fbdev-v4.20 changes) to prepare a base for fbdev-v4.21 changes. commit cfdfaf4a86406f8eff7901de09f4910341eb9e31 Merge: e9f2e05a5f19c 95d386c2d2e76 Author: Radim Krčmář Date: Thu Dec 20 14:54:09 2018 +0100 Merge tag 'kvm-ppc-next-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc PPC KVM update for 4.21 from Paul Mackerras The main new feature this time is support in HV nested KVM for passing a device that is emulated by a level 0 hypervisor and presented to level 1 as a PCI device through to a level 2 guest using VFIO. Apart from that there are improvements for migration of radix guests under HV KVM and some other fixes and cleanups. commit 704cfd7f5f71c6bc6cdfaa63a16ed0f72882b1a1 Author: Patrice Chotard Date: Thu Dec 20 14:32:15 2018 +0100 ARM: sti: remove pen_release and boot_lock The pen_release implementation was created for Versatile platforms to work around boot loaders that did not differentiate between the various different secondary CPUs on this ARM development platform. This should not be true of modern platforms where we send IPIs to specific CPUs to wake them up. Remove the pen_release stuff from SoCs that make use of the per-CPU IPI mechanism. The boot_lock is something that was required for ARM development platforms to ensure that the delay calibration worked properly. This is not necessary for modern platforms that have better bus bandwidth and do not need to calibrate the delay loop for secondary cores. Remove the boot_lock entirely. Due to pen_release and boot_lock removal, .smp_prepare_cpus and .smp_boot_secondary STi callbacks must be reworked properly to allow secondary CPU bring up. Secondary CPU is initialized and started by a U-BOOTROM firmware. Secondary CPU is spinning and waiting for a write at cpu_strt_ptr. Writing secondary_startup address at cpu_strt_ptr makes it to jump directly to secondary_startup(). This write must be done in .smp_boot_secondary callback and not in .smp_prepare_cpus as previously, this insures that secondary_data struct is populated in __cpu_up() (stack, pgdir and swapper_pg_dir fields). The IPI in sti_boot_secondary() is useless, so remove it. This patch is the merged of Russell's patch [1] and the rework of .smp_prepare_cpus and .smp_boot_secondary STi callbacks [2]. [1] https://patchwork.kernel.org/patch/10729435/ [2] https://patchwork.kernel.org/patch/10735795/ Signed-off-by: Russell King Signed-off-by: Patrice Chotard commit a64917446eafc7212e962561622d697fce04e9a6 Author: Aviv Heller Date: Tue Dec 18 19:03:27 2018 +0200 net/mlx5: Fix LAG requirement when CONFIG_MLX5_ESWITCH is off If CONFIG_MLX5_ESWITCH is not defined, test for SR-IOV being disabled, instead of calling e-switch LAG prereq routine. Since LAG with SRIOV is allowed only when switchdev mode is on. Fixes: eff849b2c669 ("net/mlx5: Allow/disallow LAG according to pre-req only") Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 0a5b589111c395f2b18c2a508e241207daaa8cca Author: Aviv Heller Date: Thu Dec 20 01:37:17 2018 +0200 net/mlx5: Fix query_nic_sys_image_guid() error during init vport system image guid should be queried using vport nic API for Ethernet ports, and vport hca API for Infiniband ports. Fixes: fadd59fc50d0 ("net/mlx5: Introduce inter-device communication mechanism") Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed commit e32ee6c78efa6a32bff782bbe7a9970b018996ca Author: Eli Britstein Date: Mon Dec 3 17:09:54 2018 +0200 net/mlx5e: Support tunnel encap over tagged Ethernet Generate encap header depending on the routed device to support native/tagged Ethernet header. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit aa331450b81f071bc8d7b68d5baab1b78f93598a Author: Eli Britstein Date: Sun Dec 9 09:17:18 2018 +0200 net/mlx5e: Support VLAN encap ETH header generation Support generation of native or tagged Ethernet header for encap header, depending on provided net device. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c7bcb277bda46d75819fb2d475fa817c10dc209b Author: Eli Britstein Date: Mon Dec 3 17:09:54 2018 +0200 net/mlx5e: Re-order route and encap header memory allocation Change the order to first route IPv4/6 and return if error. Only after successful route continue to allocate an encap header, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 05ada1adb65acd533f978651e7001e3568e7b98a Author: Eli Britstein Date: Sun Dec 9 09:17:18 2018 +0200 net/mlx5e: Tunnel encap ETH header helper function In tunnel encap we prepare the encap header for IPv4/6 cases, in two separate functions. For ETH header generation the code is almost duplicated. Move the ETH header generation code from IPv4/6 functions to a helper function, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b168cff0b9b216e68215cdb28db999f542482a56 Author: Eli Britstein Date: Wed Dec 19 09:29:10 2018 +0200 net/mlx5e: Fail attempt to offload e-switch TC encap flows with vlan on underlay Currently we don't support nor fail attempts to offload encap flows routed to vlan device on the underlay network. We wrongly consider a vlan underlay device to be on the same e-switch b/c the switchdev ID is retrieved recursively. Add explicit check for that and fail such attempts. Also align to a more strict check for the ingress and the underlay devices to practically be on the same eswitch. Fixes: ce99f6b97fcd ('net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels') Fixes: 3e621b19b0bb ('net/mlx5e: Support TC encapsulation offloads with upper devices') Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 442e1228cbaccee8a9365624608544460155c5d1 Author: Eli Britstein Date: Tue Dec 18 09:46:00 2018 +0200 net/mlx5e: Tunnel routing output devs helper function For tunnel we determine the output devs for IPv4/6 cases, in two separate functions, with a duplicated code. Move that code from IPv4/6 functions to a helper function, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit a0646c88ed3ac527b71cf365b03ff4fc729d35b6 Author: Eli Britstein Date: Wed Dec 19 09:24:58 2018 +0200 net/mlx5e: Fail attempt to offload e-switch TC flows with egress upper devices We use the switchdev parent HW id helper to identify if the mirred device shares the same ASIC/port with the ingress device. This can get us wrong in the presence of upper devices such as vlan or bridge set over the HW devices (VF or uplink representors), b/c the switchdev ID is retrieved recursively. To fail offload attempts in such cases, we condition the check on the egress device to have not only the same switchdev ID but also the relevant mlx5 netdev ops. Fixes: 03a9d11e6eeb ('net/mlx5e: Add TC drop and mirred/redirect action parsing for SRIOV offloads') Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Acked-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 1ee4457c5c2a6172893eb1f464860c753c9b4e96 Author: Or Gerlitz Date: Tue Dec 18 13:32:46 2018 +0200 net/mlx5e: Allow vlans on e-switch uplink reps There are cases (e.g tunneling with vlan on underlay and potentially more) where this makes sense, so allow that. Signed-off-by: Or Gerlitz Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 4c8fb2986d44c5a75949a88ac61deec0ed50a542 Author: Gavi Teitz Date: Wed Dec 12 21:23:18 2018 +0200 net/mlx5e: Increase VF representors' SQ size to 128 The default size for the VF representors' SQ was too small to handle high packet rates. Doubling the size from 64 to 128 drastically improves the packet rate under stress (by about 50%), whereas increasing the size beyond 128 has not shown to make any further difference. The impact of the SQ size was measured with UDP traffic, in the following topology: TG <-> PF <-> TC forwarding <-> VF representor <-> VF in VM over a single core processing bi-directional traffic, with the following results: SQ size of 64: SQ size of 128: Packet rate for 64B UDP packets: 860 [Kpps] 1280 [Kpps] Packet rate for 114B VxLan encapsulated UDP packets: 320 [Kpps] 500 [Kpps] Signed-off-by: Gavi Teitz Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 4a0475d57ad134429f9bb56068bb738b4afc5992 Author: Miroslav Lichvar Date: Mon Dec 3 13:59:42 2018 +0100 mlx5: extend PTP gettime function to read system clock Read the system time right before and immediately after reading the low register of the internal timer. This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Saeed Mahameed Signed-off-by: Miroslav Lichvar Signed-off-by: Saeed Mahameed commit 5d8678365c90b9ce1fd2243ff5ea562609f6cec1 Author: Miroslav Lichvar Date: Mon Dec 3 13:59:41 2018 +0100 mlx5: update timecounter at least twice per counter overflow The timecounter needs to be updated at least once in half of the cyclecounter interval to prevent timecounter_cyc2time() interpreting a new timestamp as an old value and causing a backward jump. This would be an issue if the timecounter multiplier was so small that the update interval would not be limited by the 64-bit overflow in multiplication. Shorten the calculated interval to make sure the timecounter is updated in time even when the system clock is slowed down by up to 10%, the multiplier is increased by up to 10%, and the scheduled overflow check is late by 15%. Cc: Richard Cochran Cc: Ariel Levkovich Cc: Saeed Mahameed Signed-off-by: Miroslav Lichvar Signed-off-by: Saeed Mahameed commit 8c6c942d33f2a79439e86f8f406afae40a5bc767 Author: YueHaibing Date: Thu Dec 20 02:42:51 2018 +0000 powerpc/eeh: Fix debugfs_simple_attr.cocci warnings Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: YueHaibing Acked-by: Russell Currey Signed-off-by: Michael Ellerman commit c20577014f85f36d4e137d3d52a1f61225b4a3d2 Author: Alexey Kardashevskiy Date: Mon Nov 19 15:25:17 2018 +1100 powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status The current implementation of the OPAL_PCI_EEH_FREEZE_STATUS call in skiboot's NPU driver does not touch the pci_error_type parameter so it might have garbage but the powernv code analyzes it nevertheless. This initializes pcierr and fstate to zero in all call sites. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman commit e59f5bd759b7dee57593c5b6c0441609bda5d530 Author: Diana Craciun Date: Wed Dec 12 16:03:10 2018 +0200 powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit a25de7af340fcd19a59978ded2ff04ed329bca06 Author: Alexey Kardashevskiy Date: Tue Oct 16 13:34:09 2018 +1100 powerpc/powernv/ioda: Reduce a number of hooks in pnv_phb fixup_phb() is never used, this removes it. pick_m64_pe() and reserve_m64_pe() are always defined for all powernv PHBs: they are initialized by pnv_ioda_parse_m64_window() which is called unconditionally from pnv_pci_init_ioda_phb() which initializes all known PHB types on powernv so we can open code them. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman commit dfa88658fb0583abb92e062c7a9cd5a5b94f2a46 Author: Diana Craciun Date: Wed Dec 12 16:03:09 2018 +0200 powerpc/fsl: Update Spectre v2 reporting Report branch predictor state flush as a mitigation for Spectre variant 2. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit f21b0a45e4e48eafca38f11612244c5bd454a6c2 Author: Alexey Kardashevskiy Date: Tue Oct 16 13:30:03 2018 +1100 powerpc/powernv/ioda1: Remove dead code for a single device PE At the moment PNV_IODA_PE_DEV is only used for NPU PEs which are not present on IODA1 machines (i.e. POWER7) so let's remove a piece of dead code. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman commit 3bc8ea8603ae4c1e09aca8de229ad38b8091fcb3 Author: Diana Craciun Date: Wed Dec 12 16:03:08 2018 +0200 powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used If the user choses not to use the mitigations, replace the code sequence with nops. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit 517ad4ae8aa93dccdb9a88c27257ecb421c9e848 Author: Alexey Kardashevskiy Date: Tue Oct 2 13:22:31 2018 +1000 vfio/spapr_tce: Get rid of possible infinite loop As a part of cleanup, the SPAPR TCE IOMMU subdriver releases preregistered memory. If there is a bug in memory release, the loop in tce_iommu_release() becomes infinite; this actually happened to me. This makes the loop finite and prints a warning on every failure to make the code more bug prone. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Alex Williamson Signed-off-by: Michael Ellerman commit e7aa61f47b23afbec41031bc47ca8d6cb6516abc Author: Diana Craciun Date: Wed Dec 12 16:03:07 2018 +0200 powerpc/fsl: Flush branch predictor when entering KVM Switching from the guest to host is another place where the speculative accesses can be exploited. Flush the branch predictor when entering KVM. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit fa1ada78897f282917594ba8eba220a54f87dabb Author: Alexey Kardashevskiy Date: Fri Sep 28 16:48:25 2018 +1000 powerpc/powernv/npu: Remove unused headers and a macro. The macro and few headers are not used so remove them. Signed-off-by: Alexey Kardashevskiy Acked-by: Alistair Popple Signed-off-by: Michael Ellerman commit 7fef436295bf6c05effe682c8797dfcb0deb112a Author: Diana Craciun Date: Wed Dec 12 16:03:06 2018 +0200 powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit) In order to protect against speculation attacks on indirect branches, the branch predictor is flushed at kernel entry to protect for the following situations: - userspace process attacking another userspace process - userspace process attacking the kernel Basically when the privillege level change (i.e.the kernel is entered), the branch predictor state is flushed. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit bdbf649efe21173cae63b4b71db84176420f9039 Author: Alexey Kardashevskiy Date: Fri Sep 28 16:45:39 2018 +1000 powerpc/powernv/ioda: Allocate indirect TCE levels of cached userspace addresses on demand The powernv platform maintains 2 TCE tables for VFIO - a hardware TCE table and a table with userspace addresses; the latter is used for marking pages dirty when corresponging TCEs are unmapped from the hardware table. a68bd1267b72 ("powerpc/powernv/ioda: Allocate indirect TCE levels on demand") enabled on-demand allocation of the hardware table, however it missed the other table so it has still been fully allocated at the boot time. This fixes the issue by allocating a single level, just like we do for the hardware table. Fixes: a68bd1267b72 ("powerpc/powernv/ioda: Allocate indirect TCE levels on demand") Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 10c5e83afd4a3f01712d97d3bb1ae34d5b74a185 Author: Diana Craciun Date: Wed Dec 12 16:03:05 2018 +0200 powerpc/fsl: Flush the branch predictor at each kernel entry (64bit) In order to protect against speculation attacks on indirect branches, the branch predictor is flushed at kernel entry to protect for the following situations: - userspace process attacking another userspace process - userspace process attacking the kernel Basically when the privillege level change (i.e. the kernel is entered), the branch predictor state is flushed. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit f633a8ad636efb5d4bba1a047d4a0f1ef719aa06 Author: Diana Craciun Date: Wed Dec 12 16:03:04 2018 +0200 powerpc/fsl: Add nospectre_v2 command line argument When the command line argument is present, the Spectre variant 2 mitigations are disabled. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit 98518c4d8728656db349f875fcbbc7c126d4c973 Author: Diana Craciun Date: Wed Dec 12 16:03:03 2018 +0200 powerpc/fsl: Emulate SPRN_BUCSR register In order to flush the branch predictor the guest kernel performs writes to the BUCSR register which is hypervisor privilleged. However, the branch predictor is flushed at each KVM entry, so the branch predictor has been already flushed, so just return as soon as possible to guest. Signed-off-by: Diana Craciun [mpe: Tweak comment formatting] Signed-off-by: Michael Ellerman commit 7d8bad99ba5a22892f0cad6881289fdc3875a930 Author: Diana Craciun Date: Wed Dec 12 16:03:02 2018 +0200 powerpc/fsl: Fix spectre_v2 mitigations reporting Currently for CONFIG_PPC_FSL_BOOK3E the spectre_v2 file is incorrect: $ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2 "Mitigation: Software count cache flush" Which is wrong. Fix it to report vulnerable for now. Fixes: ee13cb249fab ("powerpc/64s: Add support for software count cache flush") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit 1cbf8990d79ff69da8ad09e8a3df014e1494462b Author: Diana Craciun Date: Wed Dec 12 16:03:01 2018 +0200 powerpc/fsl: Add macro to flush the branch predictor The BUCSR register can be used to invalidate the entries in the branch prediction mechanisms. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit 76a5eaa38b15dda92cd6964248c39b5a6f3a4e9d Author: Diana Craciun Date: Wed Dec 12 16:03:00 2018 +0200 powerpc/fsl: Add infrastructure to fixup branch predictor flush In order to protect against speculation attacks (Spectre variant 2) on NXP PowerPC platforms, the branch predictor should be flushed when the privillege level is changed. This patch is adding the infrastructure to fixup at runtime the code sections that are performing the branch predictor flush depending on a boot arg parameter which is added later in a separate patch. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman commit 4bd46aa0353e022c2401a258e93b107880a66533 Author: Brad Love Date: Wed Dec 19 12:07:01 2018 -0500 media: cx23885: only reset DMA on problematic CPUs It is reported that commit 95f408bbc4e4 ("media: cx23885: Ryzen DMA related RiSC engine stall fixes") caused regresssions with other CPUs. Ensure that the quirk will be applied only for the CPUs that are known to cause problems. A module option is added for explicit control of the behaviour. Fixes: 95f408bbc4e4 ("media: cx23885: Ryzen DMA related RiSC engine stall fixes") Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab commit e01b5781958de08942af341ce26768d5e0fbcdf5 Author: Anson Huang Date: Thu Dec 20 08:56:16 2018 +0000 rtc: add i.MX system controller RTC support i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and secure rtc etc.. This patch adds i.MX system controller RTC driver support, Linux kernel has to communicate with system controller via MU (message unit) IPC to set/get RTC time and other alarm functions, since the RTC set time needs to be done in secure EL3 mode (required by system controller firmware) and alarm functions needs to be done with general MU IRQ handle, these depend on other components which are NOT ready, so this patch ONLY enables the RTC time read. Signed-off-by: Anson Huang Signed-off-by: Alexandre Belloni commit 2ea44ca1ffccf89cfb9e6755156843e278ec9645 Author: Anson Huang Date: Thu Dec 20 08:56:07 2018 +0000 dt-bindings: fsl: scu: add rtc binding NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and secure RTC etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to do RTC operation, this patch adds binding doc for i.MX system controller RTC driver. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni commit bbb55cd708901dedbeeeb929c7012f35afea7882 Author: Nathan Chancellor Date: Mon Dec 10 18:35:14 2018 -0500 media: ddbridge: Move asm includes after linux ones Without this, cpumask_t and bool are not defined: In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19: In file included from drivers/media/pci/ddbridge/ddbridge.h:22: ./arch/arm/include/asm/irq.h:35:50: error: unknown type name 'cpumask_t' extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask, ^ ./arch/arm/include/asm/irq.h:36:9: error: unknown type name 'bool' bool exclude_self); ^ Doing a survey of the kernel tree, this appears to be expected because '#include ' is always after the linux includes. This also fixes warnings of this variety (with Clang): In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19: In file included from drivers/media/pci/ddbridge/ddbridge.h:56: In file included from ./include/media/dvb_net.h:22: In file included from ./include/linux/netdevice.h:50: In file included from ./include/uapi/linux/neighbour.h:6: In file included from ./include/linux/netlink.h:9: In file included from ./include/net/scm.h:11: In file included from ./include/linux/sched/signal.h:6: ./include/linux/signal.h:87:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ ./arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ Fixes: b6973637c4cc ("media: ddbridge: remove another duplicate of io.h and sort includes") Signed-off-by: Nathan Chancellor Tested-by: Guenter Roeck Signed-off-by: Mauro Carvalho Chehab commit f242e0ac95cadb27527d0b06c957723c9f63dd74 Author: Christophe Leroy Date: Mon Dec 17 14:18:27 2018 +0000 powerpc/prom: move the device tree if not in declared memory. If the device tree doesn't reside in the memory which is declared inside it, it has to be moved as well as this memory will not be mapped by the kernel. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit ec2adcd8dd64588cb4bcd1c1e0b86304b9713e73 Author: Michael Ellerman Date: Mon Nov 5 20:01:01 2018 +1100 powerpc: Add some documentation of ISA versions Add some documentation on which CPU versions map to which ISA versions. This is all publicly available information, some of it already in the kernel source, but it's much nicer to have it all in one place. Signed-off-by: Michael Ellerman commit 2b874a5c7b75fdc90fdd1e2ffaa3ec5a9d21e253 Author: Michael Ellerman Date: Sat Dec 15 00:57:11 2018 +1100 powerpc/configs: Don't enable PPC_EARLY_DEBUG in defconfigs This reverts the remains of commit b9ef7d6b11c1 ("powerpc: Update default configurations"). That commit was proceeded by a commit which added a config option to control use of BOOTX for early debug, ie. PPC_EARLY_DEBUG_BOOTX, and then the update of the defconfigs was intended to not change behaviour by then enabling the new config option. However enabling PPC_EARLY_DEBUG had other consequences, notably causing us to register the udbg console at the end of udbg_early_init(). This means on a system which doesn't have anything that BOOTX can use (most systems), we register the udbg console very early but the bootx code just throws everything away, meaning early boot messages are never printed to the console. What we want to happen is for the udbg console to only be registered later (from setup_arch()) once we've setup udbg_putc, and then all early boot messages will be replayed. Fixes: b9ef7d6b11c1 ("powerpc: Update default configurations") Reported-by: Torsten Duwe Signed-off-by: Michael Ellerman commit 2fea82db113e4422ef5c8e6209908806e5fb6b63 Author: Arnd Bergmann Date: Mon Dec 10 22:51:57 2018 +0100 powerpc: eeh_event: convert semaphore to completion For this use case, completions and semaphores are equivalent, but semaphores are an awkward interface that should generally be avoided, so use the completion instead. Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman commit d1f75a96842b265ca2a89b7ed477a50637ea87f1 Author: Greg Kurz Date: Mon Dec 10 16:13:38 2018 +0100 ocxl/afu_irq: Don't include The AFU irq code doesn't need to reach out to the platform. Signed-off-by: Greg Kurz Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 759bc01586535700fbb1aaf40dd727146e2e8b57 Author: Greg Kurz Date: Mon Dec 10 16:18:13 2018 +0100 ocxl: Clarify error path in setup_xsl_irq() Implementing rollback with goto and labels is a common practice that leads to prettier and more maintainable code. FWIW, this design pattern is already being used in alloc_link() a few lines below in this file. Do the same in setup_xsl_irq(). Signed-off-by: Greg Kurz Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 3cfb9ebe906b51f2942b1e251009bb251efd2ba6 Author: Benjamin Herrenschmidt Date: Tue Dec 11 13:27:33 2018 +1100 powerpc/44x/bamboo: Fix PCI range The bamboo dts has a bug: it uses a non-naturally aligned range for PCI memory space. This isnt' supported by the code, thus causing PCI to break on this system. This is due to the fact that while the chip memory map has 1G reserved for PCI memory, it's only 512M aligned. The code doesn't know how to split that into 2 different PMMs and fails, so limit the region to 512M. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 51f4cc2047a4b7e9bf1b49acf06c110991fd4167 Author: Darren Stevens Date: Sun Aug 19 21:26:28 2018 +0100 powerpc/pasemi: Add Nemo board IRQ initroutine Add a IRQ init routine for the Nemo board which inits and attatches the i8259 found in the SB600, and a cascade routine to dispatch the interrupts. Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman commit 656fdf3ad8e0ae4c6c3d75af373df6cc9797bac1 Author: Darren Stevens Date: Sun Aug 19 21:23:57 2018 +0100 powerpc/pasemi: Add Nemo board device init code. Add routines for Nemo specific devices to init at boot time, these being board level power-off and SB600's rtc. Also add a run time variable to prevent these being activated if we boot on a reference board. Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman commit 0428a5f494a003c98c1d1fc98aae605c288dc066 Author: Darren Stevens Date: Sun Aug 19 21:21:47 2018 +0100 powerpc/pasemi: Add Nemo board IRQ initroutine Add a IRQ init routine for the Nemo board which inits and attatches the i8259 found in the SB600, and a cascade routine to dispatch the interrupts. Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman commit 68f211a4d1e5882e881bbb84b6505908dde5f625 Author: Darren Stevens Date: Sun Aug 19 21:21:55 2018 +0100 powerpc/pasemi: Add PCI initialisation for Nemo board. The A-Eon Amigaone X1000's Nemo motherboard has an AMD SB600 connected to one of the PCI-e root ports on its PaSemi Pwrficient 1628M SoC. Normally the SB600 southbridge would be connected to a hidden PCI-e port on the system's northbridge, and as a result doesn't fully comply with the PCI-e spec. Add code to relax the PCI-e detection in both the root port and the Linux kernel allowing on board devices to be detected. Signed-off-by: Darren Stevens Signed-off-by: Michael Ellerman commit 49a502ea23bf9dec47f8f3c3960909ff409cd1bb Author: Christophe Leroy Date: Fri Dec 14 15:23:33 2018 +0000 powerpc/mm: Make NULL pointer deferences explicit on bad page faults. As several other arches including x86, this patch makes it explicit that a bad page fault is a NULL pointer dereference when the fault address is lower than PAGE_SIZE In the mean time, this page makes all bad_page_fault() messages shorter so that they remain on one single line. And it prefixes them by "BUG: " so that they get easily grepped. Signed-off-by: Christophe Leroy [mpe: Avoid pr_cont()] Signed-off-by: Michael Ellerman commit 8dbdec0bcb416d0ef0bfd737620d08f5160ac290 Author: Dmitry V. Levin Date: Sun Dec 16 20:28:28 2018 +0300 powerpc/ptrace: Combine SYSCALL_EMU & SYSCALL_TRACE handling Combine the SYSCALL_EMU and SYSCALL_TRACE handling so that we only call tracehook_report_syscall_entry() in one place. Signed-off-by: Dmitry V. Levin [mpe: Flesh out change log, s/cached_flags/flags/, reflow comments] Signed-off-by: Michael Ellerman commit 25078dc1f74be16b858e914f52cc8f4d03c2271a Author: Christoph Hellwig Date: Sun Dec 16 17:53:49 2018 +0100 powerpc: use mm zones more sensibly Powerpc has somewhat odd usage where ZONE_DMA is used for all memory on common 64-bit configfs, and ZONE_DMA32 is used for 31-bit schemes. Move to a scheme closer to what other architectures use (and I dare to say the intent of the system): - ZONE_DMA: optionally for memory < 31-bit (64-bit embedded only) - ZONE_NORMAL: everything addressable by the kernel - ZONE_HIGHMEM: memory > 32-bit for 32-bit kernels Also provide information on how ZONE_DMA is used by defining ARCH_ZONE_DMA_BITS. Contains various fixes from Benjamin Herrenschmidt. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman commit f3e5a8579c70d591db8e772cab93af0ec7e39849 Author: Christoph Hellwig Date: Sun Dec 16 18:19:51 2018 +0100 cxl: drop the dma_set_mask callback from vphb The CXL code never even looks at the dma mask, so there is no good reason for this sanity check. Remove it because it gets in the way of the dma ops refactoring. Signed-off-by: Christoph Hellwig Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 44a0337b322e0ee2b817e334436366d394654d07 Author: Christoph Hellwig Date: Sun Dec 16 18:19:50 2018 +0100 powerpc/dma: split the two __dma_alloc_coherent implementations The implemementation for the CONFIG_NOT_COHERENT_CACHE case doesn't share any code with the one for systems with coherent caches. Split it off and merge it with the helpers in dma-noncoherent.c that have no other callers. Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 9c15a87cfc6ce34bc6f2a5cee5e3994c28307942 Author: Christoph Hellwig Date: Sun Dec 16 18:19:49 2018 +0100 powerpc/dma: remove the unused dma_iommu_ops export Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman commit acddff9dc4392b5445ca393254712db47ebb24cf Author: Christoph Hellwig Date: Sun Dec 16 18:19:48 2018 +0100 powerpc/dma: remove the unused ISA_DMA_THRESHOLD export Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 0e652390fb95ae567fe709d2b388f4e9c792224c Author: Christoph Hellwig Date: Sun Dec 16 18:19:47 2018 +0100 powerpc/dma: remove the unused ARCH_HAS_DMA_MMAP_COHERENT define Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman commit 67d8208fba1324fa0198f9fc58a9edbe09596947 Author: Christoph Hellwig Date: Sun Dec 16 18:19:46 2018 +0100 crypto4xx_core: don't abuse __dma_sync_page This function is internal to the DMA API implementation. Instead use the DMA API to properly unmap. Note that the DMA API usage in this driver is a disaster and urgently needs some work - it is missing all the unmaps, seems to do a secondary map where it looks like it should to a unmap in one place to work around cache coherency and the directions passed in seem to be partially wrong. Signed-off-by: Christoph Hellwig Tested-by: Christian Lamparter Signed-off-by: Michael Ellerman commit 0aeba2d0d27c7341c10aeae7f013ad5f034d8b2d Author: Christoph Hellwig Date: Sun Dec 16 18:19:45 2018 +0100 powerpc/dma: properly wire up the unmap_page and unmap_sg methods The unmap methods need to transfer memory ownership back from the device to the cpu by identical means as dma_sync_*_to_cpu. I'm not sure powerpc needs to do any work in this transfer direction, but given that it does invalidate the caches in dma_sync_*_to_cpu already we should make sure we also do so on unmapping. Signed-off-by: Christoph Hellwig [mpe: s/dir/direction in dma_nommu_unmap_page()] Signed-off-by: Michael Ellerman commit 9286356907caa2d4737bd9dd8afe0b4ccaeea02b Author: Christoph Hellwig Date: Sun Dec 16 18:19:44 2018 +0100 powerpc: allow NOT_COHERENT_CACHE for amigaone AMIGAONE selects NOT_COHERENT_CACHE, so we better allow it. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 Author: Christophe Leroy Date: Fri Dec 14 10:27:47 2018 +0000 powerpc/prom: fix early DEBUG messages This patch fixes early DEBUG messages in prom.c: - Use %px instead of %p to see the addresses - Cast memblock_phys_mem_size() with (unsigned long long) to avoid build failure when phys_addr_t is not 64 bits. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit e1e71e201703500f708bdeaf64660a2a178cb6a0 Author: Greg Kurz Date: Sun Dec 16 22:28:50 2018 +0100 ocxl: Fix endiannes bug in ocxl_link_update_pe() All fields in the PE are big-endian. Use cpu_to_be32() like everywhere else something is written to the PE. Otherwise a wrong TID will be used by the NPU. If this TID happens to point to an existing thread sharing the same mm, it could be woken up by error. This is highly improbable though. The likely outcome of this is the NPU not finding the target thread and forcing the AFU into sending an interrupt, which userspace is supposed to handle anyway. Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9") Cc: stable@vger.kernel.org # v4.18 Signed-off-by: Greg Kurz Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit 72e7bcc2cdf82bf03caaa5e6c9b0134c2fc2ee7d Author: Joel Stanley Date: Mon Nov 12 15:58:06 2018 +1030 powerpc/32: Avoid unsupported flags with clang When building for ppc32 with clang these flags are unsupported: -ffixed-r2 and -mmultiple llvm's lib/Target/PowerPC/PPCRegisterInfo.cpp marks r2 as reserved on when building for SVR4ABI and !ppc64: // The SVR4 ABI reserves r2 and r13 if (Subtarget.isSVR4ABI()) { // We only reserve r2 if we need to use the TOC pointer. If we have no // explicit uses of the TOC pointer (meaning we're a leaf function with // no constant-pool loads, etc.) and we have no potential uses inside an // inline asm block, then we can treat r2 has an ordinary callee-saved // register. const PPCFunctionInfo *FuncInfo = MF.getInfo(); if (!TM.isPPC64() || FuncInfo->usesTOCBasePtr() || MF.hasInlineAsm()) markSuperRegs(Reserved, PPC::R2); // System-reserved register markSuperRegs(Reserved, PPC::R13); // Small Data Area pointer register } This means we can safely omit -ffixed-r2 when building for 32-bit targets. The -mmultiple/-mno-multiple flags are not supported by clang, so platforms that might support multiple miss out on using multiple word instructions. We wrap these flags in cc-option so that when Clang gains support the kernel will be able use these flags. Clang 8 can then build a ppc44x_defconfig which boots in Qemu: make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ppc44x_defconfig ./scripts/config -e CONFIG_DEVTMPFS -d DEVTMPFS_MOUNT make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- qemu-system-ppc -M bamboo \ -kernel arch/powerpc/boot/zImage \ -dtb arch/powerpc/boot/dts/bamboo.dtb \ -initrd ~/ppc32-440-rootfs.cpio \ -nographic -serial stdio -monitor pty -append "console=ttyS0" Link: https://github.com/ClangBuiltLinux/linux/issues/261 Link: https://bugs.llvm.org/show_bug.cgi?id=39556 Link: https://bugs.llvm.org/show_bug.cgi?id=39555 Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman commit e213574a449f7a57d4202c1869bbc7680b6b5521 Author: Joel Stanley Date: Fri Nov 2 11:14:55 2018 +1030 raid6/ppc: Fix build for clang We cannot build these files with clang as it does not allow altivec instructions in assembly when -msoft-float is passed. Jinsong Ji wrote: > We currently disable Altivec/VSX support when enabling soft-float. So > any usage of vector builtins will break. > > Enable Altivec/VSX with soft-float may need quite some clean up work, so > I guess this is currently a limitation. > > Removing -msoft-float will make it work (and we are lucky that no > floating point instructions will be generated as well). This is a workaround until the issue is resolved in clang. Link: https://bugs.llvm.org/show_bug.cgi?id=31177 Link: https://github.com/ClangBuiltLinux/linux/issues/239 Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman commit 3757cba80affcef2ef670f0db3d3504ccf967830 Author: Madhavan Srinivasan Date: Sun Jun 10 19:57:02 2018 +0530 powerpc/perf: Remove l2 bus events from HW cache event array Remove PM_L2_ST_MISS and PM_L2_ST from HW cache event array since these are bus events. And these needs to be programmed in groups. Hence remove them. Fixes: f1fb60bfde65 ('powerpc/perf: Export Power9 generic and cache events to sysfs') Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 59029136d75022cb8b7c7bebd1738ae70232416e Author: Madhavan Srinivasan Date: Sun Jun 10 19:57:01 2018 +0530 powerpc/perf: Add constraints for power9 l2/l3 bus events In previous generation processors, both bus events and direct events of performance monitoring unit can be individually programmabled and monitored in PMCs. But in Power9, L2/L3 bus events are always available as a "bank" of 4 events. To obtain the counts for any of the l2/l3 bus events in a given bank, the user will have to program PMC4 with corresponding l2/l3 bus event for that bank. Patch enforce two contraints incase of L2/L3 bus events. 1)Any L2/L3 event when programmed is also expected to program corresponding PMC4 event from that group. 2)PMC4 event should always been programmed first due to group constraint logic limitation For ex. consider these L3 bus events PM_L3_PF_ON_CHIP_MEM (0x460A0), PM_L3_PF_MISS_L3 (0x160A0), PM_L3_CO_MEM (0x260A0), PM_L3_PF_ON_CHIP_CACHE (0x360A0), 1) This is an INVALID group for L3 Bus event monitoring, since it is missing PMC4 event. perf stat -e "{r160A0,r260A0,r360A0}" < > And this is a VALID group for L3 Bus events: perf stat -e "{r460A0,r160A0,r260A0,r360A0}" < > 2) This is an INVALID group for L3 Bus event monitoring, since it is missing PMC4 event. perf stat -e "{r260A0,r360A0}" < > And this is a VALID group for L3 Bus events: perf stat -e "{r460A0,r260A0,r360A0}" < > 3) This is an INVALID group for L3 Bus event monitoring, since it is missing PMC4 event. perf stat -e "{r360A0}" < > And this is a VALID group for L3 Bus events: perf stat -e "{r460A0,r360A0}" < > Patch here implements group constraint logic suggested by Michael Ellerman. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 2d46d4877b1afd14059393a48bdb8ce27955174c Author: Madhavan Srinivasan Date: Mon Oct 9 19:42:40 2017 +0530 powerpc/perf: Fix unit_sel/cache_sel checks Raw event code has couple of fields "unit" and "cache" in it, to capture the "unit" to monitor for a given pmcxsel and cache reload qualifier to program in MMCR1. isa207_get_constraint() refers "unit" field to update the MMCRC (L2/L3) Event bus control fields with "cache" bits of the raw event code. These are power8 specific and not supported by PowerISA v3.0 pmu. So wrap the checks to be power8 specific. Also, "cache" bit field is referred to update MMCR1[16:17] and this check can be power8 specific. Fixes: 7ffd948fae4cd ('powerpc/perf: factor out power8 pmu functions') Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 8c31459d6138b07537346d976e7c30c760a1de01 Author: Madhavan Srinivasan Date: Mon Oct 9 19:42:39 2017 +0530 powerpc/perf: Cleanup cache_sel bits comment Update the raw event code comment in power9-pmu.c with respect to "cache" bits, since power9 MMCRC does not support these. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 333804dc3b7a92158ab63a48febff0d8ef89ada3 Author: Madhavan Srinivasan Date: Sun Dec 9 14:55:35 2018 +0530 powerpc/perf: Update perf_regs structure to include SIER On each sample, Sample Instruction Event Register (SIER) content is saved in pt_regs. SIER does not have a entry as-is in the pt_regs but instead, SIER content is saved in the "dar" register of pt_regs. Patch adds another entry to the perf_regs structure to include the "SIER" printing which internally maps to the "dar" of pt_regs. It also check for the SIER availability in the platform and present value accordingly Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 17cfccc91545682513541924245abb876d296063 Author: Madhavan Srinivasan Date: Sun Dec 9 14:48:15 2018 +0530 powerpc/perf: Fix thresholding counter data for unknown type MMCRA[34:36] and MMCRA[38:44] expose the thresholding counter value. Thresholding counter can be used to count latency cycles such as load miss to reload. But threshold counter value is not relevant when the sampled instruction type is unknown or reserved. Patch to fix the thresholding counter value to zero when sampled instruction type is unknown or reserved. Fixes: 170a315f41c6('powerpc/perf: Support to export MMCRA[TEC*] field to userspace') Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman commit 374f3f5979f9b28bfb5b5799208d82d08ef518a7 Author: Aneesh Kumar K.V Date: Mon Nov 26 20:05:04 2018 +0530 powerpc/mm/hash: Handle user access of kernel address gracefully In commit 2865d08dd9ea ("powerpc/mm: Move the DSISR_PROTFAULT sanity check") we moved the protection fault access check before the vma lookup. That means we hit that WARN_ON when user space accesses a kernel address. Before that commit this was handled by find_vma() not finding vma for the kernel address and considering that access as bad area access. Avoid the confusing WARN_ON and convert that to a ratelimited printk. With the patch we now get: for load: a.out[5997]: User access of kernel address (c00000000000dea0) - exploit attempt? (uid: 1000) a.out[5997]: segfault (11) at c00000000000dea0 nip 1317c0798 lr 7fff80d6441c code 1 in a.out[1317c0000+10000] a.out[5997]: code: 60000000 60420000 3c4c0002 38427790 4bffff20 3c4c0002 38427784 fbe1fff8 a.out[5997]: code: f821ffc1 7c3f0b78 60000000 e9228030 <89290000> 993f002f 60000000 383f0040 for exec: a.out[6067]: User access of kernel address (c00000000000dea0) - exploit attempt? (uid: 1000) a.out[6067]: segfault (11) at c00000000000dea0 nip c00000000000dea0 lr 129d507b0 code 1 a.out[6067]: Bad NIP, not dumping instructions. Fixes: 2865d08dd9ea ("powerpc/mm: Move the DSISR_PROTFAULT sanity check") Signed-off-by: Aneesh Kumar K.V Tested-by: Breno Leitao [mpe: Don't split printk() string across lines] Signed-off-by: Michael Ellerman commit 5c6a1177826e5207306511a480b5aae79fd0fefb Author: Sinan Kaya Date: Wed Dec 19 22:46:59 2018 +0000 ACPI: Make PCI slot detection driver depend on PCI Since this is ACPI PCI slot detection driver for PCI, it doesn't make sense to compile this without PCI support in place. Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 43554cebba50e709b9207c55ceca6bc281748586 Author: Sinan Kaya Date: Wed Dec 19 22:46:58 2018 +0000 ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set Remove PCI dependent code out of iort.c when CONFIG_PCI is not defined. A quick search reveals the following functions: 1. pci_request_acs() 2. pci_domain_nr() 3. pci_is_root_bus() 4. to_pci_dev() Both pci_domain_nr() and pci_is_root_bus() are defined in linux/pci.h. pci_domain_nr() is a stub function when CONFIG_PCI is not set and pci_is_root_bus() just returns a reference to a structure member which is still valid without CONFIG_PCI set. to_pci_dev() is a macro that expands to container_of. pci_request_acs() is the only code that gets pulled in from drivers/pci/*.c Signed-off-by: Sinan Kaya Acked-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki commit 52146173a0333a8c9fbc1a3dd92958f376511b38 Author: Sinan Kaya Date: Wed Dec 19 22:46:57 2018 +0000 arm64: select ACPI PCI code only when both features are enabled ACPI and PCI are no longer coupled to each other. Specify requirements for both when pulling in code. Signed-off-by: Sinan Kaya Acked-by: Catalin Marinas Signed-off-by: Rafael J. Wysocki commit 5d32a66541c4683456507481a0944ed2985e75c7 Author: Sinan Kaya Date: Wed Dec 19 22:46:56 2018 +0000 PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set We are compiling PCI code today for systems with ACPI and no PCI device present. Remove the useless code and reduce the tight dependency. Signed-off-by: Sinan Kaya Acked-by: Bjorn Helgaas # PCI parts Acked-by: Ingo Molnar Signed-off-by: Rafael J. Wysocki commit bd23fac3eaaa8bd79c02a2f139f68ac6424a9a7c Author: Sinan Kaya Date: Wed Dec 19 22:46:55 2018 +0000 ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset Allow ACPI to be built without PCI support in place. Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 86689776878f0c1aee77604b9c5fce2ffb9ec65e Author: Sinan Kaya Date: Wed Dec 19 22:46:54 2018 +0000 ACPI: Allow CONFIG_PCI to be unset for reboot Make PCI reboot conditional on CONFIG_PCI set on the kernel configuration. Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 36ad7d2b9e9bde9aeb097fcfd3c033b5c010f92a Author: Sinan Kaya Date: Wed Dec 19 22:46:53 2018 +0000 ACPI: Move PCI reset to a separate function Getting ready to factor out PCI specific code when CONFIG_PCI is unset. Create a acpi_pci_reset() that kick starts PCI specific reset. Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki commit 03ebe48e235f17d70f34890d34d8153b8a84c02e Merge: 2713fe37153ef b6d39cd82241b b65f501627fff 062e52a5af9cc a6906a8b0ebfb 69d24c6ed67c1 6d68b88e0993d c12b08ebbe16f dc9de8a2b20f4 Author: Joerg Roedel Date: Thu Dec 20 10:05:20 2018 +0100 Merge branches 'iommu/fixes', 'arm/renesas', 'arm/mediatek', 'arm/tegra', 'arm/omap', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next commit dc9de8a2b20f495696330d60a289935f36407995 Author: Joerg Roedel Date: Thu Dec 20 10:02:20 2018 +0100 iommu: Check for iommu_ops == NULL in iommu_probe_device() This check needs to be there and got lost at some point during development. Add it again. Fixes: 641fb0efbff0 ('iommu/of: Don't call iommu_ops->add_device directly') Reported-by: Marek Szyprowski Reported-by: kernelci.org bot Signed-off-by: Joerg Roedel commit a9cd3439e3c6d777a05c63b4d06c3500d1d4074e Author: David Ahern Date: Wed Dec 19 20:02:36 2018 -0800 neighbor: Use nda_policy for validating attributes in adds and dump requests Add NDA_PROTOCOL to nda_policy and use the policy for attribute parsing and validation for adding neighbors and in dump requests. Remove the now duplicate checks on nla_len. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d129a45b5c9d9ad814adb795413d76be6b28a47e Merge: 754d5da631458 1154bb26c879f Author: David S. Miller Date: Wed Dec 19 23:47:59 2018 -0800 Merge branch 'hns3-next' Peng Li says: ==================== net: hns3: code optimizations & bugfixes for HNS3 driver This patchset includes bugfixes and code optimizations for the HNS3 ethernet controller driver ==================== Signed-off-by: David S. Miller commit 1154bb26c879fea51c20aee167ddce4345caa255 Author: Peng Li Date: Thu Dec 20 11:52:06 2018 +0800 net: hns3: remove redundant variable initialization This patch removes the redundant variable initialization, as driver will devm_kzalloc to set value to hdev soon. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 31a16f99e02c2e0b40a5fb05d66f5e56721027e2 Author: Peng Li Date: Thu Dec 20 11:52:05 2018 +0800 net: hns3: fix the descriptor index when get rss type Driver gets rss information from the last descriptor of the packet. When driver handle the rss type, ring->next_to_clean indicates the first descriptor of next packet. This patch fix the descriptor index with "ring->next_to_clean - 1". Fixes: 232fc64b6e62 ("net: hns3: Add HW RSS hash information to RX skb") Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 8edc2285b7285c5fbffe438dc8113260d3e76656 Author: Jian Shen Date: Thu Dec 20 11:52:04 2018 +0800 net: hns3: don't restore rules when flow director is disabled When user disables flow director, all the rules will be disabled. But when reset happens, it will restore all the rules again. It's not reasonable. This patch fixes it by add flow director status check before restore fules. Fixes: 6871af29b3ab ("net: hns3: Add reset handle for flow director") Fixes: c17852a8932f ("net: hns3: Add support for enable/disable flow director") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 0285dbae5db842862d49f148cdcedad986447f34 Author: Jian Shen Date: Thu Dec 20 11:52:03 2018 +0800 net: hns3: fix vf id check issue when add flow director rule When add flow director fule for vf, the vf id is used as array subscript before valid checking, which may cause memory overflow. Fixes: dd74f815dd41 ("net: hns3: Add support for rule add/delete for flow director") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 39cfbc9c4fc4a2888548c2624789e42e3f775721 Author: Huazhong Tan Date: Thu Dec 20 11:52:02 2018 +0800 net: hns3: reset tqp while doing DOWN operation While doing DOWN operation, the driver will reclaim the memory which has already used for TX. If the hardware is processing this memory, it will cause a RCB error to the hardware. According the hardware's description, the driver should reset the tqp before reclaim the memory during DOWN. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 75edb610860fda65ceedb017fc69afabd2806b8b Author: Jian Shen Date: Thu Dec 20 11:52:01 2018 +0800 net: hns3: add max vector number check for pf Each pf supports max 64 vectors and 128 tqps. For 2p/4p core scenario, there may be more than 64 cpus online. So the result of min_t(u16, num_Online_cpus(), tqp_num) may be more than 64. This patch adds check for the vector number. Fixes: dd38c72604dc ("net: hns3: fix for coalesce configuration lost during reset") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 1b7d7b0581173219b82abbd81c88cf8aa7d402c2 Author: Peng Li Date: Thu Dec 20 11:52:00 2018 +0800 net: hns3: fix a bug caused by udelay udelay() in driver may always occupancy processor. If there is only one cpu in system, the VF driver may initialize fail when insmod PF and VF driver in the same system. This patch use msleep() to free cpu when VF wait PF message. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit a298797532d9dc244abf349d7c2ed063732c6ba3 Author: Jian Shen Date: Thu Dec 20 11:51:59 2018 +0800 net: hns3: change default tc state to close In original codes, default tc value is set to the max tc. It's more reasonable to close tc by changing default tc value to 1. Users can enable it with lldp tool when they want to use tc. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 8cdb992f0dc36d6382840b1a6320e0c327a7d644 Author: Jian Shen Date: Thu Dec 20 11:51:58 2018 +0800 net: hns3: refine the handle for hns3_nic_net_open/stop() When triggering nic down, there is a time window between bringing down the protocol stack and stopping the work task. If the net is up in the time window, it may bring up the protocol stack again. This patch fixes it by stop the work task at the beginning of hns3_nic_net_stop(). To keep symmetrical, start the work task at the end of hns3_nic_net_open(). Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 3fe970e76b374bdb4a6232cb8b78945e3d2b478f Author: YueHaibing Date: Wed Dec 5 07:59:03 2018 +0000 wil6210: remove set but not used variable 'wdev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/wil6210/main.c: In function '_wil6210_disconnect': drivers/net/wireless/ath/wil6210/main.c:407:23: warning: variable 'wdev' set but not used [-Wunused-but-set-variable] It never used since commit ("e1b43407c034 wil6210: refactor disconnect flow") Signed-off-by: YueHaibing Reviewed-by: Maya Erez Signed-off-by: Kalle Valo commit 986b834884647e31dc5a78b8d0a6da210ebda0b0 Author: Yangtao Li Date: Mon Dec 3 08:25:57 2018 -0500 wil6210: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Kalle Valo commit 192a986d964c3ebd927da102adbf8bcc604c7cbc Author: Kyle Roeschley Date: Wed Dec 5 09:43:16 2018 +0200 ath6kl: Use debug instead of error message when disabled This is not an unexpected condition, so we don't need to be shouting to the world about it. Signed-off-by: Kyle Roeschley Signed-off-by: Kalle Valo commit 5803c12816c43bd09e5f4247dd9313c2d9a2c41b Author: Kyle Roeschley Date: Wed Dec 5 09:43:13 2018 +0200 ath6kl: Fix off by one error in scan completion When ath6kl was reworked to share code between regular and scheduled scans in commit 3b8ffc6a22ba ("ath6kl: Configure probed SSID list consistently"), probed SSID entry changed from 1-index to 0-indexed. However, ath6kl_cfg80211_scan_complete_event() was missed in that change. Fix its indexing so that we correctly clear out the probed SSID list. Signed-off-by: Kyle Roeschley Signed-off-by: Kalle Valo commit fb376a495fbdb886f38cfaf5a3805401b9e46f13 Author: Kyle Roeschley Date: Wed Dec 5 09:43:11 2018 +0200 ath6kl: Only use match sets when firmware supports it Commit dd45b7598f1c ("ath6kl: Include match ssid list in scheduled scan") merged the probed and matched SSID lists before sending them to the firmware. In the process, it assumed match set support is always available in ath6kl_set_probed_ssids, which breaks scans for hidden SSIDs. Now, check that the firmware supports matching SSIDs in scheduled scans before setting MATCH_SSID_FLAG. Fixes: dd45b7598f1c ("ath6kl: Include match ssid list in scheduled scan") Signed-off-by: Kyle Roeschley Signed-off-by: Kalle Valo commit 19de2fa86e692e918eade4042989d7725039df89 Author: Shahar S Matityahu Date: Wed Dec 19 11:36:19 2018 +0200 iwlwifi: dbg_ini: fix bad ini tlv parsing Add a break at the end of the ini tlv case. Fix both the internal and external tlv parsing. Signed-off-by: Shahar S Matityahu Signed-off-by: Emmanuel Grumbach Signed-off-by: Kalle Valo commit 06d4dd2f2ce1cdb625f77c0676d5af6ba310c01d Author: Christoph Hellwig Date: Fri Dec 14 09:15:02 2018 +0100 dma-mapping: deprecate dma_zalloc_coherent We now always return zeroed memory from dma_alloc_coherent. Note that simply passing GFP_ZERO to dma_alloc_coherent wasn't always doing the right thing to start with given that various allocators are not backed by the page allocator and thus would ignore GFP_ZERO. Signed-off-by: Christoph Hellwig commit 518a2f1925c3165befbf06b75e07636549d92c1c Author: Christoph Hellwig Date: Fri Dec 14 09:00:40 2018 +0100 dma-mapping: zero memory returned from dma_alloc_* If we want to map memory from the DMA allocator to userspace it must be zeroed at allocation time to prevent stale data leaks. We already do this on most common architectures, but some architectures don't do this yet, fix them up, either by passing GFP_ZERO when we use the normal page allocator or doing a manual memset otherwise. Signed-off-by: Christoph Hellwig Acked-by: Geert Uytterhoeven [m68k] Acked-by: Sam Ravnborg [sparc] commit 9517d448d543d8bd0f83e4edc29b4b53d74a7f71 Author: Luca Coelho Date: Wed Jun 13 15:26:37 2018 +0300 iwlwifi: bump the API version to 43 for 9000 and 22000 Bump the API version to 43 for 9000 and 22000 devices. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 2c47e5a1f25b1c894c9fe2f77c156c054ae8ffb7 Author: Sara Sharon Date: Thu Sep 6 10:03:22 2018 +0300 iwlwifi: dbg: add debug data to warning Add debug data to the warning issued when getting wrong region id from firmware. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 83ea00d6873fd7a6b7e94cf40f6dd0007593fb1e Author: Gustavo A. R. Silva Date: Thu Aug 23 20:15:40 2018 -0500 iwlwifi: mvm: d3: use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit b71a9c35f214dbd9e9e33d36219bd0383f861677 Author: Colin Ian King Date: Sun Aug 26 23:31:17 2018 +0100 iwlwifi: mvm: fix spelling mistake "Recieved" -> "Received" Trivial fix to spelling mistake in debug message. Signed-off-by: Colin Ian King Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 2c34be6c1fc8a0c90073dead7bce13937661eadf Author: Emmanuel Grumbach Date: Mon Sep 3 14:32:48 2018 +0300 iwlwifi: mvm: set TWT responder capability bit in 11AX SoftAP mode This is needed to test TWT requester on the client side. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 8804351c17f90eb13684d13ea994e7600d2be846 Author: Luca Coelho Date: Thu Aug 30 15:07:03 2018 +0300 iwlwifi: remove unused and wrong PHY_CFG_* macros These macros are never used and are actually wrong, so it's very confusing. Remove them. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit a06875a7f8fae2d5b4891abb28c2c4a44ee1ffe8 Author: Shahar S Matityahu Date: Tue Aug 28 16:15:55 2018 +0300 iwlwifi: wrt: add rt status and num of rx/tx fifos to dump Add the rt status of the last assert or 0 if the dump collection was not initiated by an assert. Add the number of rx and tx fifos in use. These fields are added to dump info lst file. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 35739348ba07186a6b186e3aae5728721ff57a9a Author: Sara Sharon Date: Wed Aug 22 10:50:49 2018 +0300 iwlwifi: mvm: clean up SSN incrementation Sometimes, due to SCD bug, we need to start the queue with an higher SSN. The queue allocation function currently increments the SSN in the packet itself, but it is pointless, since this value is overridden later by iwl_mvm_tx_mpdu with the value from mvmsta->tid_data[tid].seq_number. Updating tid data is sufficient. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 3681729429f4626c85a4eb62e5ce76be0b626f87 Author: Sara Sharon Date: Mon Aug 27 14:07:20 2018 +0300 iwlwifi: pcie: lock txq a bit later in reclaim code In reclaim code, we don't need to take the queue lock for waking the queue. The code section is executed only when the tx path is stopped, and since the reclaim path is not executed in parallel to itself, no one can update the queue pointers, and accessing them is safe without a lock. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 83eabf1e9810f3753d6dafd9a0dc3849924d4fc0 Author: Sara Sharon Date: Mon Aug 27 13:56:41 2018 +0300 iwlwifi: mvm: take station lock later in the code There is no need to lock mvm station for transport reclaim. Move the locking down, after the reclaim. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit bf9dfedaad9e65f2f580d3a573401d521d48b932 Author: Shaul Triebitz Date: Mon Jul 23 11:40:30 2018 +0300 iwlwifi: mvm: handle RX no data notification Handle RX no data notification, which is used for advertising NDP to radiotap. Signed-off-by: Golan Ben Ami Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 57a3a454f30368f9b52ef406feff09571448e84e Author: Shaul Triebitz Date: Mon Aug 20 16:07:26 2018 +0300 iwlwifi: split HE capabilities between AP and STA HE capabilities differ between AP and STA. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit aca432f06b8a60a92b27fb46e6518a19b28ca93f Author: Luca Coelho Date: Mon Aug 27 13:02:19 2018 +0300 iwlwifi: make MVM and DVM depend on MAC80211 It's not the iwlwifi module that depends on mac80211, but iwlmvm and iwldvm. To reflect this better, make MVM and DVM Kconfig options depend on MAC80211 instead. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 189b8d441b0f7825f0b4278851c52afaa0515ed2 Author: Naftali Goldstein Date: Wed Aug 22 12:18:19 2018 +0300 iwlwifi: mvm: fix setting HE ppe FW config The FW expects to get the ppe value for each NSS-BW pair in the same format as in the he phy capabilities IE, which means that a value of 0 implies ppe should be used for BPSK (mcs 0). If there are no PPE thresholds in the IE, or if for some NSS-RU pair there's no threshold set for it (this could happen because it's a variable-sized field), it means no PPE should not be used for that pair, so the value sent to FW should be 7 which corresponds to "none". Fixes: 514c30696fbc ("iwlwifi: add support for IEEE802.11ax") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 4120e4a119ed8c8e28d20524713ab2e3df67a34d Author: Sara Sharon Date: Thu Aug 23 13:40:16 2018 +0300 iwlwifi: mvm: cleanup iwl_mvm_tx_skb_non_sta Make the coupling of station id and queue id clear. Group code together. Remove outdated comment. Never use an undefined hw queue as given from mac80211. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit a124caf8f3166cf1488bf606ccf70469ac76a9de Author: Sara Sharon Date: Thu Aug 23 11:03:17 2018 +0300 iwlwifi: mvm: remove pointless NULL assignment Assigning mvmsta to be NULL when we are about to exit the function is pointless. Remove it. Move the variable declaration to the scope it is used. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 70dc179dd98622eda9809d02fa73b708d60e5e23 Author: Sara Sharon Date: Thu Aug 23 12:10:01 2018 +0300 iwlwifi: mvm: remove dead code In iwl_mvm_tx_skb_non_sta(), in case of managed interface, the AP station was supposed to be used for multicast frames instead of the auxiliary station to avoid frames possibly sent to an absent P2P GO. However, when moving to DQA mode, this was broken as no valid queue was assigned. This is fixed by a recent patch that directs all non-offchannel traffic to ap station earlier in the TX path. However, the broken, and now dead code, remained. Remove it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit dabb0983349d6320197b88eeb9bb91d3fa0ed855 Author: Sara Sharon Date: Mon Aug 20 10:34:04 2018 +0300 iwlwifi: pcie: use iwl_tx_cmd_gen2 and not iwl_tx_cmd When building AMSDU for gen2, code uses iwl_tx_cmd. The only updated field is len, which is in the same location, so it is not a bug. However, it is a bit confusing and error prone, so change it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 90a8c74a8d7b0f3fdceadadb155da137e3b157cf Author: YueHaibing Date: Wed Dec 19 11:00:13 2018 +0800 ipw2x00: cleanup dead code Fix smatch warning: drivers/net/wireless/intel/ipw2x00/ipw2100.c:5606 shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)' drivers/net/wireless/intel/ipw2x00/ipw2200.c:10725 shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)' Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 4f68ef64cd7feb1220232bd8f501d8aad340a099 Author: Jia-Ju Bai Date: Fri Dec 14 11:55:21 2018 +0800 cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan() The function cw1200_bss_info_changed() and cw1200_hw_scan() can be concurrently executed. The two functions both access a possible shared variable "frame.skb". This shared variable is freed by dev_kfree_skb() in cw1200_upload_beacon(), which is called by cw1200_bss_info_changed(). The free operation is protected by a mutex lock "priv->conf_mutex" in cw1200_bss_info_changed(). In cw1200_hw_scan(), this shared variable is accessed without the protection of the mutex lock "priv->conf_mutex". Thus, concurrency use-after-free bugs may occur. To fix these bugs, the original calls to mutex_lock(&priv->conf_mutex) and mutex_unlock(&priv->conf_mutex) are moved to the places, which can protect the accesses to the shared variable. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo commit 861cb5eb467f5e38dce1aabe4e8db379255bd89b Author: Stefan Wahren Date: Wed Dec 12 20:20:06 2018 +0100 brcmfmac: Fix access point mode Since commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") the Raspberry Pi 3 A+ (BCM43455) isn't able to operate in AP mode with hostapd (device_ap_sme=1 use_monitor=0): brcmfmac: brcmf_cfg80211_stop_ap: setting AP mode failed -52 So add the missing mgmt_stypes for AP mode to fix this. Fixes: 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag") Suggested-by: Arend van Spriel Signed-off-by: Stefan Wahren Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit 8c892df41500469729e0d662816300196e4f463d Author: Stijn Tintel Date: Tue Dec 4 20:29:05 2018 +0200 brcmfmac: fix roamoff=1 modparam When the update_connect_param callback is set, nl80211 expects the flag WIPHY_FLAG_SUPPORTS_FW_ROAM to be set as well. However, this flag is only set when modparam roamoff=0, while the callback is set unconditionally. Since commit 7f9a3e150ec7 this causes a warning in wiphy_register, which breaks brcmfmac. Disable the update_connect_param callback when roamoff=0 to fix this. Fixes: 7f9a3e150ec7 ("nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS") Cc: Stable # 4.19+ Signed-off-by: Jonas Gorski Signed-off-by: Stijn Tintel Signed-off-by: Kalle Valo commit cc4dc97ffc69c253d5aa2c0068545ed6c8bc0bde Author: Yangtao Li Date: Mon Dec 3 08:31:45 2018 -0500 cw1200: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Kalle Valo commit 71bef2fd583be4a5e414faf193fc243f8447c51b Author: Yishai Hadas Date: Wed Dec 19 16:28:10 2018 +0200 IB/mlx5: Introduce uid as part of alloc/dealloc transport domain Introduce uid as part of alloc/dealloc transport domain to match the device specification. Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky commit d2a68c4effd821f0871d20368f76b609349c8a3b Author: Steven Rostedt (VMware) Date: Sat Dec 8 12:58:51 2018 -0500 x86/ftrace: Do not call function graph from dynamic trampolines Since commit 79922b8009c07 ("ftrace: Optimize function graph to be called directly"), dynamic trampolines should not be calling the function graph tracer at the end. If they do, it could cause the function graph tracer to trace functions that it filtered out. Right now it does not cause a problem because there's a test to check if the function graph tracer is attached to the same function as the function tracer, which for now is true. But the function graph tracer is undergoing changes that can make this no longer true which will cause the function graph tracer to trace other functions. For example: # cd /sys/kernel/tracing/ # echo do_IRQ > set_ftrace_filter # mkdir instances/foo # echo ip_rcv > instances/foo/set_ftrace_filter # echo function_graph > current_tracer # echo function > instances/foo/current_tracer Would cause the function graph tracer to trace both do_IRQ and ip_rcv, if the current tests change. As the current tests prevent this from being a problem, this code does not need to be backported. But it does make the code cleaner. Cc: Thomas Gleixner Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Steven Rostedt (VMware) commit 1923f851eb0baa79d11cd0574c6100c2de840d75 Author: Don Brace Date: Tue Dec 18 17:39:13 2018 -0600 scsi: smartpqi: update driver version - need to bump up the driver version because of the OFA patch and the fw status register read timeout patch. Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 4fd22c13ad4409ee44a121b54855bb48d2afd58a Author: Mahesh Rajashekhara Date: Tue Dec 18 17:39:07 2018 -0600 scsi: smartpqi: add ofa support - when OFA event occurs, driver will stop traffic to RAID/HBA path. Driver waits for all the outstanding requests to complete. - Driver sends OFA event acknowledgment to firmware. - Driver will wait until the new firmware is up and running. - Driver will free up the resources. - Driver calls SIS/PQI initialization and rescans the device list. - Driver will resume the traffic to RAID/HBA path. Reviewed-by: Murthy Bhat Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 65111785acccb836ec75263b03b0e33f21e74f47 Author: Mahesh Rajashekhara Date: Tue Dec 18 17:39:01 2018 -0600 scsi: smartpqi: increase fw status register read timeout Problem: - during the driver initialization, driver will poll fw for KERNEL_UP in a 30 seconds timeout. - if the firmware is not ready after 30 seconds, driver will not be loaded. Fix: - change timeout from 30 seconds to 3 minutes. Reported-by: Feng Li Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Dave Carroll Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit f7cb8ac6e776158fab003d8dc6b7f564f005f502 Author: Don Brace Date: Fri Dec 7 16:30:12 2018 -0600 scsi: smartpqi: bump driver version Reviewed-by: Gerry Morong Reviewed-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 3d46a59a191e81f7ada771b8db71553916b851da Author: Don Brace Date: Fri Dec 7 16:30:05 2018 -0600 scsi: smartpqi: add smp_utils support Reviewed-by: Scott Benesh Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Dave Carroll Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 2ba55c9851d74eb015a554ef69ddf2ef061d5780 Author: Kevin Barnett Date: Fri Dec 7 16:29:51 2018 -0600 scsi: smartpqi: correct lun reset issues Problem: The Linux kernel takes a logical volume offline after a LUN reset. This is generally accompanied by this message in the dmesg output: Device offlined - not ready after error recovery Root Cause: The root cause is a "quirk" in the timeout handling in the Linux SCSI layer. The Linux kernel places a 30-second timeout on most media access commands (reads and writes) that it send to device drivers. When a media access command times out, the Linux kernel goes into error recovery mode for the LUN that was the target of the command that timed out. Every command that timed out is kept on a list inside of the Linux kernel to be retried later. The kernel attempts to recover the command(s) that timed out by issuing a LUN reset followed by a TEST UNIT READY. If the LUN reset and TEST UNIT READY commands are successful, the kernel retries the command(s) that timed out. Each SCSI command issued by the kernel has a result field associated with it. This field indicates the final result of the command (success or error). When a command times out, the kernel places a value in this result field indicating that the command timed out. The "quirk" is that after the LUN reset and TEST UNIT READY commands are completed, the kernel checks each command on the timed-out command list before retrying it. If the result field is still "timed out", the kernel treats that command as not having been successfully recovered for a retry. If the number of commands that are in this state are greater than two, the kernel takes the LUN offline. Fix: When our RAIDStack receives a LUN reset, it simply waits until all outstanding commands complete. Generally, all of these outstanding commands complete successfully. Therefore, the fix in the smartpqi driver is to always set the command result field to indicate success when a request completes successfully. This normally isn’t necessary because the result field is always initialized to success when the command is submitted to the driver. So when the command completes successfully, the result field is left untouched. But in this case, the kernel changes the result field behind the driver’s back and then expects the field to be changed by the driver as the commands that timed-out complete. Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 7ff44499bafbd376115f0bb6b578d980f56ee13b Author: Dave Carroll Date: Fri Dec 7 16:29:45 2018 -0600 scsi: smartpqi: correct volume status - fix race condition when a unit is deleted after an RLL, and before we have gotten the LV_STATUS page of the unit. - In this case we will get a standard inquiry, rather than the desired page. This will result in a unit presented which no longer exists. - If we ask for LV_STATUS, insure we get LV_STATUS Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit a9a681017c3b43b9d9754dd87bebe5e0e244fe08 Author: Dave Carroll Date: Fri Dec 7 16:29:37 2018 -0600 scsi: smartpqi: do not offline disks for transient did no connect conditions Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit a91aaae0243b419e52e97990471208321222be33 Author: Ajish Koshy Date: Fri Dec 7 16:29:31 2018 -0600 scsi: smartpqi: allow for larger raid maps Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Ajish Koshy Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 1e46731efd9c9322cb4699f845c739d2ea68555c Author: Mahesh Rajashekhara Date: Fri Dec 7 16:29:24 2018 -0600 scsi: smartpqi: check for null device pointers - wait on all outstanding I/O to complete before the device is removed. - check for null device pointers in IO entry/completion functions. Reviewed-by: Scott Teel Reviewed-by: Murthy Bhat Reviewed-by: Dave Carroll Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit c1b104755b0b11579e292aa153c0605264c81648 Author: Ajish Koshy Date: Fri Dec 7 16:29:18 2018 -0600 scsi: smartpqi: add support for huawei controllers Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Ajish Koshy Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 62dc51fb946697c896e47df7187862c310a3d21c Author: Sagar Biradar Date: Fri Dec 7 16:29:12 2018 -0600 scsi: smartpqi: enhance numa node detection - set pci_dev->dev to 0 only if the node is NO_NUMA_NODE. If not, do not reset the value but retain it. Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Sagar Biradar Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 2b447f811c1f7f30e4caa5a817d0c95d06aff874 Author: Dave Carroll Date: Fri Dec 7 16:29:05 2018 -0600 scsi: smartpqi: wake up drives after os resumes from suspend - set allow_restart option during scsi_device init. This allows the kernel to send a START/STOP Unit command to the drive if it encounters a 4/2 check condition in sense data. Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 5995b236c10a0af748ae7f4e4819307cf6bc3140 Author: Murthy Bhat Date: Fri Dec 7 16:28:59 2018 -0600 scsi: smartpqi: fix disk name mount point - fix a formatting issue. Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Dave Carroll Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 84a77fefe0451bd9e6894362423d8fa6d14419ab Author: Murthy Bhat Date: Fri Dec 7 16:28:53 2018 -0600 scsi: smartpqi: add h3c ssid Reviewed-by: Scott Benesh Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit cd128244162c8afbf50e93b88daa02b05faa4c0a Author: Dave Carroll Date: Fri Dec 7 16:28:47 2018 -0600 scsi: smartpqi: add sysfs attributes - add sysfs device attributes, unique_id, lunid and path_info. Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 02133b68d51d09bd91b0d2c1fa5318e2f23e4559 Author: Dave Carroll Date: Fri Dec 7 16:28:41 2018 -0600 scsi: smartpqi: refactor sending controller raid requests Clean up the common code which creates a raid path request for the controller LUNID and sends it synchronously, into a common routine; Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 171c28653a2d9201e130863eb2408f404e4d6ed7 Author: Dave Carroll Date: Fri Dec 7 16:28:35 2018 -0600 scsi: smartpqi: turn off lun data caching for ptraid - allow update the luns for PTRAID devices. Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Justin Lindley Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit b2346b5030cf9458f30a84028d9fe904b8c942a7 Author: Mahesh Rajashekhara Date: Fri Dec 7 16:28:29 2018 -0600 scsi: smartpqi: correct host serial num for ssa Reviewed-by: Scott Benesh Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit b6e2ef67ed8365d60a0cebc1313b57df8b9e909e Author: Dave Carroll Date: Fri Dec 7 16:28:23 2018 -0600 scsi: smartpqi: add no_write_same for logical volumes During slave_alloc, for logical volumes include no_write_same into the scsi_device structure. This will insure that WRITE_SAME will not be used for LD's. Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Justin Lindley Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 3406384b76a77ea3b3bab7923c1a3bd4649318f5 Author: Mahesh Rajashekhara Date: Fri Dec 7 16:28:16 2018 -0600 scsi: smartpqi: Add retries for device reset Reviewed-by: Ajish Koshy Reviewed-by: Murthy Bhat Reviewed-by: Justin Lindley Reviewed-by: Scott Benesh Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit b212c2510d7ca15af8758eade5e4002ed5267d1b Author: Kevin Barnett Date: Fri Dec 7 16:28:10 2018 -0600 scsi: smartpqi: add support for PQI Config Table handshake Add support for new IUs and parsing of the Firmware Features section of the PQI Config Table to implement the "handshake" between the driver and firmware to communicate firmware features supported and enabled by the driver. Reviewed-by: Ajish Koshy Reviewed-by: Mahesh Rajashekhara Reviewed-by: Murthy Bhat Reviewed-by: Justin Lindley Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 9e1f03e4d318d3e49d4db1d711eb652db727b844 Author: James Smart Date: Thu Dec 13 15:17:58 2018 -0800 scsi: lpfc: Update lpfc version to 12.0.0.10 Update lpfc version to 12.0.0.10 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5021267af1327724a6f1859bb1594660a4c22bd3 Author: James Smart Date: Thu Dec 13 15:17:57 2018 -0800 scsi: lpfc: Adding ability to reset chip via pci bus reset This patch adds a "pci_bus_reset" option to the board_mode sysfs attribute. This option uses the pci_reset_bus() api to reset the PCIe link the adapter is on, which will reset the chip/adapter. Prior to issuing this option, all functions on the same chip must be placed in the offline state by the admin. After the reset, all of the instances may be brought online again. The primary purpose of this functionality is to support cases where firmware update required a chip reset but the admin did not want to reboot the machine in order to instantiate the firmware update. Sanity checks take place prior to the reset to ensure the adapter is the sole entity on the PCIe bus and that all functions are in the offline state. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 72ca6b2220ed24c0f7b0dd4e3617e82dcda60ef1 Author: James Smart Date: Thu Dec 13 15:17:56 2018 -0800 scsi: lpfc: Add log messages to aid in debugging fc4type discovery issues Current messages report generic actions (like send GID_FT), but misses reporting for what protocol type the action is taken. Revise the messages to reflect the FC4 protocol type being worked on. [mkp: typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 00292e0306dc3b23e725acbc70fb0b2581b8b4b3 Author: James Smart Date: Thu Dec 13 15:17:55 2018 -0800 scsi: lpfc: Fix discovery failure when PLOGI is defered When a target's link dropped, an RSCN was received to communicate the change. The driver detected the loss of the target and issued and UNREG_RPI mailbox command. While that was being processed, another RSCN was received to communicate the port coming back. The driver deferred the PLOGI to the port until the mailbox command finishes. When the mailbox command completed it saw the pending port and called the routines to issue the PLOGI. However, it forgot to clear the UNREG_INP state flag, so the PLOGI xmt routine nooped the PLOGI request assuming it needed to wait for the mailbox command. At this point, login would never be re-attempted. Clear UNREG_INP before issuing the deferred PLOGI. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 529b3ddcfff580a2457eceeda9f248bc77c49246 Author: James Smart Date: Thu Dec 13 15:17:54 2018 -0800 scsi: lpfc: update fault value on successful trunk events. Currently, when a trunk link goes down due to some fault, the driver snapshots the fault code. If the link then comes back up, meaning there is no fault, the driver is not clearing the fault code so the sysfs link_state entry reports old/stale data. Revise the logic so that on successful link up the fault code is cleared. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e817e5d7030c7fcc6e707dba7abe51ee5c47732f Author: James Smart Date: Thu Dec 13 15:17:53 2018 -0800 scsi: lpfc: Correct MDS loopback diagnostics support The existing MDS loopback diagnostics support processing received frames in the slowpath work thread. It caps the number of frames it will process at 64, before waiting for another event to indicate additional frame reception. The net-net is this results in very slow frame processing during loopback tests and sometimes orphans an io, causing the loopback test to report failure by the switch. Move MDS loopback frame processing out of the slow path worker thread and into the normal RQ processing routines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2977a09512c2867fba8b0e862cc96327dd93431d Author: James Smart Date: Thu Dec 13 15:17:52 2018 -0800 scsi: lpfc: Fix link state reporting for trunking when adapter is offline If the adapter is taken offline, the trunk link port attributes continue to report trunk links as up even though all links are down as the adapter is offline. Clear the trunk links state as part of taking the adapter offline. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 009b7156149ab370ebd3b7477aac15a0fd3550e9 Author: Colin Ian King Date: Sat Dec 15 14:28:09 2018 +0000 scsi: bfa: clean up a couple of indentation issues There is a break statement with an extra space that needs removed and a call to bfa_trc that is indented one level too much. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit efad04623068c5def4551847ad5a6852daf273f7 Author: Colin Ian King Date: Sat Dec 15 14:17:08 2018 +0000 scsi: 3w-xxxx: fix indentation issue, add missing tab There is a tab missing on a return statement, add the missing tab. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 9934613edcb40b92a216122876cd3b7e76d08390 Author: Varun Prakash Date: Wed Dec 19 15:42:50 2018 +0530 scsi: csiostor: fix incorrect dma device in case of vport In case of ->vport_create() call scsi_add_host_with_dma() instead of scsi_add_host() to pass correct dma device. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 34a3492171cc87d1c2a9e7c0fbf6bf4a0f4d57b0 Author: Christoph Hellwig Date: Wed Dec 19 08:34:55 2018 +0100 scsi: myrs: remove the dma_boundary_limit The old DAC960 driver was fine with merging over segment boundaries, so this new driver should be too. [mkp: typos] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit c3d6189ffd4ee5c205cd7f79c7a1533e10a92b9e Author: Christoph Hellwig Date: Wed Dec 19 08:34:54 2018 +0100 scsi: myrb: remove the dma_boundary limit The old DAC960 driver was fine with merging over segment boundaries, so this new driver should be too. [mkp: typos] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 7b9e2d348c2af201e70346cdae052f387f713c49 Author: Shivasharan S Date: Tue Dec 18 05:59:55 2018 -0800 scsi: megaraid_sas: driver version update Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 894169db12463cea08d0e2a9e35f42b291340e5a Author: Shivasharan S Date: Tue Dec 18 05:59:54 2018 -0800 scsi: megaraid_sas: Use 63-bit DMA addressing Although MegaRAID controllers support 64-bit DMA addressing, as per hardware design, DMA address with all 64-bits set (0xFFFFFFFF-FFFFFFFF) results in a firmware fault. Driver will set 63-bit DMA mask to ensure the above address will not be used. Cc: stable@vger.kernel.org Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 272652fcbf1adf6321efe288583fa4a30a15af31 Author: Shivasharan S Date: Mon Dec 17 00:47:40 2018 -0800 scsi: megaraid_sas: add retry logic in megasas_readl Due to hardware errata in Aero controllers, reads to certain fusion registers could intermittently return zero. This behavior is transient in nature and subsequent reads will return valid value. For Aero controllers, any calls to readl to read from certain registers will be retried for maximum three times, if read returns zero. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit de516379e85f51c57ee54b113dbb442e5a862cd8 Author: Shivasharan S Date: Mon Dec 17 00:47:39 2018 -0800 scsi: megaraid_sas: changes to function prototypes Instead of the register address, pass the instance pointer to clear_intr and read_fw_status_reg functions. This is done in preparation for adding adapter type based checks in these functions in later patches of this series. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 154a7cde9a895d87ecc9807b34651021d3e6e8a7 Author: Shivasharan S Date: Mon Dec 17 00:47:38 2018 -0800 scsi: megaraid_sas: Introduce new Aero adapter type Identify all Aero controller PCI IDs with new adapter type. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 630d42b70f5d5cdac94dc5d080fc6d389076bf6e Author: Shivasharan S Date: Mon Dec 17 00:47:37 2018 -0800 scsi: megaraid_sas: Fix Ventura series based checks In preparation for the new Aero series adapter type, all the places where we check adapter type for Ventura series needs to include any later adapter types. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 23c3828aa2f84edec7020c7397a22931e7a879e1 Author: Stephan Günther Date: Sun Dec 16 13:08:21 2018 +0100 scsi: mpt3sas: fix memory ordering on 64bit writes With commit 09c2f95ad404 ("scsi: mpt3sas: Swap I/O memory read value back to cpu endianness"), 64bit writes in _base_writeq() were rewritten to use __raw_writeq() instad of writeq(). This introduced a bug apparent on powerpc64 systems such as the Raptor Talos II that causes the HBA to drop from the PCIe bus under heavy load and being reinitialized after a couple of seconds. It can easily be triggered on affacted systems by using something like fio --name=random-write --iodepth=4 --rw=randwrite --bs=4k --direct=0 \ --size=128M --numjobs=64 --end_fsync=1 fio --name=random-write --iodepth=4 --rw=randwrite --bs=64k --direct=0 \ --size=128M --numjobs=64 --end_fsync=1 a couple of times. In my case I tested it on both a ZFS raidz2 and a btrfs raid6 using LSI 9300-8i and 9400-8i controllers. The fix consists in resembling the write ordering of writeq() by adding a mandatory write memory barrier before device access and a compiler barrier afterwards. The additional MMIO barrier is superfluous. Signed-off-by: Stephan Günther Reported-by: Matt Corallo Acked-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 17b18eaa6f59044a5172db7d07149e31ede0f920 Author: Anatoliy Glagolev Date: Thu Dec 6 16:48:45 2018 -0700 scsi: qla2xxx: deadlock by configfs_depend_item The intent of invoking configfs_depend_item in commit 7474f52a82d51 ("tcm_qla2xxx: Perform configfs depend/undepend for base_tpg") was to prevent a physical Fibre Channel port removal when virtual (NPIV) ports announced through that physical port are active. The change does not work as expected: it makes enabled physical port dependent on target configfs subsystem (the port's parent), something the configfs guarantees anyway. Besides, scheduling work in a worker thread and waiting for the work's completion is not really a valid workaround for the requirement not to call configfs_depend_item from a configfs callback: the call occasionally deadlocks. Thus, removing configfs_depend_item calls does not break anything and fixes the deadlock problem. Signed-off-by: Anatoliy Glagolev Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 754d5da63145852736f34cfc762164f5d8d6537b Author: David Ahern Date: Wed Dec 19 15:53:22 2018 -0800 neighbor: Initialize protocol when new pneigh_entry are created pneigh_lookup uses kmalloc versus kzalloc when new entries are allocated. Given that the newly added protocol field needs to be initialized. Fixes: df9b0e30d44c ("neighbor: Add protocol attribute") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 9df95e8ec568f98d89fe2c72342714296ac6ce27 Author: Martin KaFai Lau Date: Wed Dec 19 13:30:54 2018 -0800 bpf: sparc64: Enable sparc64 jit to provide bpf_line_info This patch enables sparc64's bpf_int_jit_compile() to provide bpf_line_info by calling bpf_prog_fill_jited_linfo(). Signed-off-by: Martin KaFai Lau Acked-by: David S. Miller Signed-off-by: Daniel Borkmann commit 3f2eadb10886340f4d67fe683c2e53b4df005461 Author: Peter Oskolkov Date: Wed Dec 19 10:20:09 2018 -0800 selftests: net: refactor reuseport_addr_any test This patch refactors reuseport_add_any selftest a bit: - makes it more modular (eliminates several copy/pasted blocks); - skips DCCP tests if DCCP is not supported V2: added "Signed-off-by" tag. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 9c7f37e5ca14f5b04894b1b699a9903885cdafa6 Author: Andrew Lunn Date: Wed Dec 19 18:28:54 2018 +0100 net: dsa: mv88e6xxx: Add missing watchdog ops for 6320 family The 6320 family of switches uses the same watchdog registers as the 6390. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit dac9597606432574f3c64b68decaec3c56ca750f Merge: 24894bc6eabc4 22a3a5403bbef Author: David S. Miller Date: Wed Dec 19 16:24:59 2018 -0800 Merge branch 'mt2712' Biao Huang says: ==================== add ethernet binding and modify ethernet driver for mt2712 changes in v3: resend this series base on the latest net-next tree. changes in v2 as comments from Sean: 1. fix typo. 2. use capital letters for RMII/MII/RGMII in driver and bindings. v1: This new series is the result of discussion in: http://lkml.org/lkml/2018/12/13/1007 http://lkml.org/lkml/2018/12/14/53 1. ethernet binding file move to this series. 2. remove fine tune property in device tree 3. remove fine tune flow in ethernet driver 4. set rgmii timing according to the value in device tree, and don't care whether phy insert internal delay or not. ==================== Signed-off-by: David S. Miller commit 22a3a5403bbefd520e19bb251ce49ce705b1e5e4 Author: Biao Huang Date: Wed Dec 19 15:22:41 2018 +0800 net-next: stmmac: dwmac-mediatek: remove fine-tune property 1. remove fine-tune property and related setting to simplify the timing adjustment flow. 2. set timing value according to the value from device tree, and will not care whether PHY insert internal delay. Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit a32ed90be22aa565cf623da5a211b4a968dec6e0 Author: Biao Huang Date: Wed Dec 19 15:22:40 2018 +0800 net-next: dt-binding: dwmac-mediatek: remove fine-tune property remove fine-tune property in device tree, modify the corresponding description in dt-binding. Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit 6f1f78efbbdd2f65c25dafb4859001e0b1664be4 Merge: 9e88b9312acb9 e30f5640e3245 Author: Alexei Starovoitov Date: Wed Dec 19 15:42:55 2018 -0800 Merge branch 'line_info-check-for-ld_imm64' Martin KaFai Lau says: ==================== This series ensures the line_info (passed by the userspace during bpf_prog_load) cannot have its line_info.insn_off pointing to a zero bpf insn code. F.e. a broken userspace tool might generate a line_info.insn_off that points to the second 8 bytes of a BPF_LD_IMM64. The first patch is the kernel change. The second patch is a new test case. ==================== Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit e30f5640e32455e02ba08983ebe0b46054f1f6f0 Author: Martin KaFai Lau Date: Wed Dec 19 13:01:02 2018 -0800 bpf: Add BPF_LD_IMM64 to the line_info test This patch adds a BPF_LD_IMM64 case to the line_info test to ensure the kernel rejects linfo_info.insn_off pointing to the 2nd 8 bytes of the BPF_LD_IMM64. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit fdbaa0beb78b7c8847e261fe2c32816e9d1c54cc Author: Martin KaFai Lau Date: Wed Dec 19 13:01:01 2018 -0800 bpf: Ensure line_info.insn_off cannot point to insn with zero code This patch rejects a line_info if the bpf insn code referred by line_info.insn_off is 0. F.e. a broken userspace tool might generate a line_info.insn_off that points to the second 8 bytes of a BPF_LD_IMM64. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit bd1c24ccf9eb070510c5da2fe0b56899c9a52c96 Author: Devesh Sharma Date: Wed Dec 12 01:56:24 2018 -0800 RDMA/bnxt_re: Increase depth of control path command queue Increasing the depth of control path command queue to 8K entries to handle burst of commands. This feature needs support from FW and the driver/fw compatibility is checked from the interface version number. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 2b827ea1926b5ad7ac3e9ba8651ff99181d6c7f9 Author: Selvin Xavier Date: Wed Dec 12 01:56:23 2018 -0800 RDMA/bnxt_re: Query HWRM Interface version from FW Get HWRM interface major, minor, build and patch version from FW for checking the FW/Driver compatibility. Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 8036e90f92aae2784b855a0007ae2d8154d28b3c Author: Parvi Kaustubhi Date: Tue Dec 11 14:15:42 2018 -0800 IB/usnic: Fix potential deadlock Acquiring the rtnl lock while holding usdev_lock could result in a deadlock. For example: usnic_ib_query_port() | mutex_lock(&us_ibdev->usdev_lock) | ib_get_eth_speed() | rtnl_lock() rtnl_lock() | usnic_ib_netdevice_event() | mutex_lock(&us_ibdev->usdev_lock) This commit moves the usdev_lock acquisition after the rtnl lock has been released. This is safe to do because usdev_lock is not protecting anything being accessed in ib_get_eth_speed(). Hence, the correct order of holding locks (rtnl -> usdev_lock) is not violated. Signed-off-by: Parvi Kaustubhi Signed-off-by: Jason Gunthorpe commit 50c582de1d39231af31c881a8444333bff6f11a8 Author: Gal Pressman Date: Wed Dec 12 11:09:08 2018 +0200 RDMA/bnxt_re: Make use of destroy AH sleepable flag When in a sleepable (non-atomic) context, wait for firmware completion instead of polling for it. Signed-off-by: Gal Pressman Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 90e3edd8cca453c6042bb99eff3515cb70cfb2ba Author: Gal Pressman Date: Wed Dec 12 11:09:07 2018 +0200 RDMA/bnxt_re: Make use of create AH sleepable flag When in a sleepable (non-atomic) context, wait for firmware completion instead of polling for it. Signed-off-by: Gal Pressman Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 2553ba217eea37dc6291635ecddb883fb5c36a8b Author: Gal Pressman Date: Wed Dec 12 11:09:06 2018 +0200 RDMA: Mark if destroy address handle is in a sleepable context Introduce a 'flags' field to destroy address handle callback and add a flag that marks whether the callback is executed in an atomic context or not. This will allow drivers to wait for completion instead of polling for it when it is allowed. Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit a691ffb46edd7cb12a17ff0965ab59dbc95f48de Author: wangyan Date: Thu Dec 13 09:10:14 2018 +0800 vhost: correct the related warning message Fixes: 'commit d588cf8f618d ("target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem")' 'commit cbbd26b8b1a6 ("[iov_iter] new primitives - copy_from_iter_full() and friends")' Signed-off-by: Yan Wang Reviewed-by: Jun Piao Signed-off-by: Michael S. Tsirkin commit 4b86713236e4bd6ea6c881a97711ae039fc4069b Author: Paolo Bonzini Date: Mon Dec 17 18:35:09 2018 +0100 vhost: split structs into a separate header file vhost structs are shared by vhost-kernel and vhost-user. Split them into a separate file to ease copying them into programs that implement either the server or the client side of vhost-user. Signed-off-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin commit e8d26f29b7c48aa037a4796e2aa878c58a04609c Author: Dongli Zhang Date: Mon Dec 10 08:54:34 2018 +0800 virtio: remove deprecated VIRTIO_PCI_CONFIG() VIRTIO_PCI_CONFIG() is deprecated. Use VIRTIO_PCI_CONFIG_OFF() instead. Signed-off-by: Dongli Zhang Signed-off-by: Michael S. Tsirkin commit 6db3d8dc5d73b269987fae60745bb20eae97af61 Author: Stefan Hajnoczi Date: Mon Nov 5 17:33:22 2018 +0000 vhost/vsock: switch to a mutex for vhost_vsock_hash Now that there are no more data path users of vhost_vsock_lock, it can be turned into a mutex. It's only used by .release() and in the .ioctl() path. Depends-on: <20181105103547.22018-1-stefanha@redhat.com> Suggested-by: Jason Wang Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 1f23816b8eb8fdc39990abe166c10a18c16f6b21 Author: Changpeng Liu Date: Thu Nov 1 15:40:35 2018 -0700 virtio_blk: add discard and write zeroes support In commit 88c85538, "virtio-blk: add discard and write zeroes features to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio block specification has been extended to add VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES commands. This patch enables support for discard and write zeroes in the virtio-blk driver when the device advertises the corresponding features, VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES. Signed-off-by: Changpeng Liu Signed-off-by: Daniel Verkamp Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi commit b090c4e3a07c33ffdf95fb7601551b38fc2a4bbb Author: Gal Pressman Date: Wed Dec 12 11:09:05 2018 +0200 RDMA: Mark if create address handle is in a sleepable context Introduce a 'flags' field to create address handle callback and add a flag that marks whether the callback is executed in an atomic context or not. This will allow drivers to wait for completion instead of polling for it when it is allowed. Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 86d163dbfe2ac0b30fbb6e256301abbfa9e4549e Author: Darrick J. Wong Date: Tue Dec 18 14:32:31 2018 -0800 xfs: stringify scrub types in ftrace output Use __print_symbolic to print the scrub type in ftrace output. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit c494213f30080423b70b24b6af7f6da554d9390f Author: Darrick J. Wong Date: Tue Dec 18 14:32:31 2018 -0800 xfs: stringify btree cursor types in ftrace output Use __print_symbolic to print the btree type in ftrace output. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 0357d21a6c9be2870904598b4767c7d424524849 Author: Darrick J. Wong Date: Tue Dec 18 14:32:30 2018 -0800 xfs: move XFS_INODE_FORMAT_STR mappings to libxfs Move XFS_INODE_FORMAT_STR to libxfs so that we don't forget to keep it updated, and add necessary TRACE_DEFINE_ENUM. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 05c753c4cf53f51a7e35fcfe684500113cf1fd13 Author: Darrick J. Wong Date: Tue Dec 18 14:32:30 2018 -0800 xfs: move XFS_AG_BTREE_CMP_FORMAT_STR mappings to libxfs Move XFS_AG_BTREE_CMP_FORMAT_STR to libxfs so that we don't forget to keep it updated, and TRACE_DEFINE_ENUM the values while we're at it. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 85f8dff00a3193fe5659aa4c91adde31723c0d3d Author: Darrick J. Wong Date: Tue Dec 18 14:32:29 2018 -0800 xfs: fix symbolic enum printing in ftrace output ftrace's __print_symbolic() has a (very poorly documented) requirement that any enum values used in the symbol to string translation table be wrapped in a TRACE_DEFINE_ENUM so that the enum value can be encoded in the ftrace ring buffer. Fix this unsatisfied requirement. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 7af8150f9935634e3e0f47c14e049ff401c82fb4 Author: Darrick J. Wong Date: Tue Dec 18 14:32:29 2018 -0800 xfs: fix function pointer type in ftrace format Use %pS instead of %pF in ftrace strings so that we record the actual function address instead of the function descriptor. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 24894bc6eabc43f55f5470767780ac07db18e797 Merge: 4ab0edecaf1d9 8deecf3557cca Author: David S. Miller Date: Wed Dec 19 13:37:34 2018 -0800 Merge branch 'neigh-get-support' Roopa Prabhu says: ==================== neigh get support This series adds support for neigh get similar to route and recently added fdb get. v2: fix key len check. and some other fixes ==================== Signed-off-by: David S. Miller commit 8deecf3557cca7d80fb5157f0858b738f8eebbc7 Author: Roopa Prabhu Date: Wed Dec 19 12:51:39 2018 -0800 selftests: rtnetlink.sh: add testcase for neigh get Signed-off-by: Roopa Prabhu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 82cbb5c631a07b3aa6df6eab644d55da9de5a645 Author: Roopa Prabhu Date: Wed Dec 19 12:51:38 2018 -0800 neighbour: register rtnl doit handler this patch registers neigh doit handler. The doit handler returns a neigh entry given dst and dev. This is similar to route and fdb doit (get) handlers. Also moves nda_policy declaration from rtnetlink.c to neighbour.c Signed-off-by: Roopa Prabhu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e9f2e05a5f19ce2a21d79c765fd6bb7c03d4aaeb Merge: 8c5e14f438b8c 7aedd9d48f2a8 Author: Paolo Bonzini Date: Wed Dec 19 22:17:09 2018 +0100 Merge tag 'kvm-s390-next-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixes for 4.21 Just two small fixes. commit 9e88b9312acb9b80554c48b58668fb144720333a Author: Ivan Babrou Date: Wed Dec 19 12:08:03 2018 -0800 tools: bpftool: do not force gcc as CC This allows transparent cross-compilation with CROSS_COMPILE by relying on 7ed1c1901fe5 ("tools: fix cross-compile var clobbering"). Signed-off-by: Ivan Babrou Signed-off-by: Daniel Borkmann commit e2ce3674883ecba2605370404208c9d4a07ae1c3 Author: Björn Töpel Date: Wed Dec 19 13:09:31 2018 +0100 xsk: simplify AF_XDP socket teardown Prior this commit, when the struct socket object was being released, the UMEM did not have its reference count decreased. Instead, this was done in the struct sock sk_destruct function. There is no reason to keep the UMEM reference around when the socket is being orphaned, so in this patch the xdp_put_mem is called in the xsk_release function. This results in that the xsk_destruct function can be removed! Note that, it still holds that a struct xsk_sock reference might still linger in the XSKMAP after the UMEM is released, e.g. if a user does not clear the XSKMAP prior to closing the process. This sock will be in a "released" zombie like state, until the XSKMAP is removed. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann commit 4ab0edecaf1d9a4acb5bddc4a869b0f7efda634a Merge: 055722716c396 489c25f9a375b Author: David S. Miller Date: Wed Dec 19 12:28:08 2018 -0800 Merge branch 'mlxsw-Make-driver-more-robust' Ido Schimmel says: ==================== mlxsw: Make driver more robust In recent months we fixed several bugs in the driver that could have been avoided by re-evaluating some of the involved code paths and by introducing relevant and comprehensive test cases. This patchset tries to do that by introducing a set of small and mostly non-functional changes in addition to a new test. I have further improvements in mind, but they can be done in a different set. Patch #1 makes sure we correctly sanitize upper devices of a VLAN interface. Patch #2 removes an unexpected behavior from the driver, in which routes configured on a VLAN interface will cease being offloaded after certain operations. Patch #3 is a small cleanup. Patch #4 simplifies the driver by removing reference counting from VLAN entries configured on a port. Patches #5-#6 simplify linking/unlinking from a bridge, especially when LAG and VLAN devices are involved. They make both operations symmetric even when ports are unlinked from a bridged LAG device. Patch #7-#9 make router interface (RIF) deletion more robust by removing reliance on device chain to indicate whether a NETDEV_DOWN event in the inet{,6}addr notification chains should be processed. This is due to the fact that IP addresses can be flushed from a netdev after it was unlinked from its lower device. Patch #10 adds a new test to for valid and invalid configurations over mlxsw ports. Some of the test cases are derived from recent fixes. I expect that more test cases will be added over time. ==================== Signed-off-by: David S. Miller commit 489c25f9a375ba1e780dcf445ca74f6b3766d1b5 Author: Ido Schimmel Date: Wed Dec 19 06:08:51 2018 +0000 selftests: mlxsw: Add rtnetlink tests Add a new test that is focused on rtnetlink configuration. Its purpose is to test valid and invalid (as deemed by mlxsw) configurations and make sure that they succeed / fail without producing a trace. Some of the test cases are derived from recent fixes in order to make sure that the fixed bugs are not introduced again. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit b61cd7c6f992cca57166d0cabe242c49b93609eb Author: Ido Schimmel Date: Wed Dec 19 06:08:50 2018 +0000 mlxsw: spectrum_router: Hold a reference on RIF's netdev Previous patches tried to make RIF deletion more robust and avoid use-after-free situations. As another precaution, hold a reference on a RIF's netdev and release it when the RIF is deleted. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 965fa8e600d28d98e7e0c7340517a9c139843ee3 Author: Ido Schimmel Date: Wed Dec 19 06:08:48 2018 +0000 mlxsw: spectrum_router: Make RIF deletion more robust In the past we had multiple instances where RIFs were not properly deleted. One of the reasons for leaking a RIF was that at the time when IP addresses were flushed from the respective netdev (prompting the destruction of the RIF), the netdev was no longer a mlxsw upper. This caused the inet{,6}addr notification blocks to ignore the NETDEV_DOWN event and leak the RIF. Instead of checking whether the netdev is our upper when an IP address is removed, we can instead check if the netdev has a RIF configured. To look up a RIF we need to access mlxsw private data, so the patch stores the notification blocks inside a mlxsw struct. This then allows us to use container_of() and extract the required private data. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 21ffedb6db5ac80b2081f425be358a976f5c14b7 Author: Ido Schimmel Date: Wed Dec 19 06:08:47 2018 +0000 mlxsw: spectrum_router: Propagate 'struct mlxsw_sp' further Next patch is going to make RIF deletion more robust by removing reliance on fragile mlxsw_sp_lower_get(). This is because a netdev is not necessarily our upper anymore when its IP addresses are flushed. The inet{,6}addr notification blocks are going to resolve 'struct mlxsw_sp' using container_of(), but the functions they call still use mlxsw_sp_lower_get(). As a preparation for the next patch, propagate 'struct mlxsw_sp' down to the functions called from the notification blocks and remove reliance on mlxsw_sp_lower_get(). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit be2d6f421f680e01d58f7cd452646e0d8586d49b Author: Ido Schimmel Date: Wed Dec 19 06:08:45 2018 +0000 mlxsw: spectrum: Properly cleanup LAG uppers when removing port from LAG When a LAG device or a VLAN device on top of it is enslaved to a bridge, the driver propagates the CHANGEUPPER event to the LAG's slaves. This causes each physical port to increase the reference count of the internal representation of the bridge port by calling mlxsw_sp_port_bridge_join(). However, when a port is removed from a LAG, the corresponding leave() function is not called and the reference count is not decremented. This leads to ugly hacks such as mlxsw_sp_bridge_port_should_destroy() that try to understand if the bridge port should be destroyed even when its reference count is not 0. Instead, make sure that when a port is unlinked from a LAG it would see the same events as if the LAG (or its uppers) were unlinked from a bridge. The above is achieved by walking the LAG's uppers when a port is unlinked and calling mlxsw_sp_port_bridge_leave() for each upper that is enslaved to a bridge. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 635c8c8bba670db6b3b03890d4e24fc4b745aed7 Author: Ido Schimmel Date: Wed Dec 19 06:08:43 2018 +0000 mlxsw: spectrum: Remove reference count from VLAN entries Commit b3529af6bb0d ("spectrum: Reference count VLAN entries") started reference counting port-VLAN entries in a similar fashion to the 8021q driver. However, this is not actually needed and only complicates things. Instead, the driver should forbid the creation of a VLAN on a port if this VLAN already exists. This would also solve the issue fixed by the mentioned commit. Therefore, remove the get()/put() API and use create()/destroy() instead. One place that needs special attention is VLAN addition in a VLAN-aware bridge via switchdev operations. In case the VLAN flags (e.g., 'pvid') are toggled, then the VLAN entry already exists. To prevent the driver from wrongly returning EEXIST, the driver is changed to check in the prepare phase whether the entry already exists and only returns an error in case it is not associated with the correct bridge port. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit e149113a74c35f0a28d1bfe17d2505a03563c1d5 Author: Ido Schimmel Date: Wed Dec 19 06:08:41 2018 +0000 mlxsw: spectrum: Handle VLAN device unlinking In commit 993107fea5ee ("mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl") I fixed a bug caused by the fact that the driver views differently the deletion of a VLAN device when it is deleted via an ioctl and netlink. Instead of relying on a specific order of events (device being unregistered vs. VLAN filter being updated), simply make sure that the driver performs the necessary cleanup when the VLAN device is unlinked, which always happens before the other two events. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit f1d7c33d6ab585aba831a73a322070eb89724072 Author: Ido Schimmel Date: Wed Dec 19 06:08:40 2018 +0000 mlxsw: spectrum_fid: Remove unused function This function is no longer used. Remove it. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 32fd4b49a372bee72aab82ebf8e866fc3756896c Author: Ido Schimmel Date: Wed Dec 19 06:08:38 2018 +0000 mlxsw: spectrum_router: Do not destroy RIFs based on FID's reference count Currently, when a RIF is constructed on top of a FID, the RIF increments the FID's reference count and the RIF is destroyed when the FID's reference count drops to 1. This effectively means that when no local ports are member in the FID, the FID is destroyed regardless if the router port is a member in the FID or not. The above can lead to the unexpected behavior in which routes using a VLAN interface as their nexthop device are no longer offloaded after the last local port leaves the corresponding VLAN (FID). Example: # ip -4 route show dev br0.10 192.0.2.0/24 proto kernel scope link src 192.0.2.1 offload # bridge vlan del vid 10 dev swp3 # ip -4 route show dev br0.10 192.0.2.0/24 proto kernel scope link src 192.0.2.1 After the patch, the route is offloaded before and after the VLAN is removed from local port 'swp3', as the RIF corresponding to 'br0.10' continues to exists. In order to remove RIFs' reliance on the underlying FID's reference count, we need to add a reference count to sub-port RIFs, which are RIFs that correspond to physical ports and their uppers (e.g., LAG devices). In this case, each {Port, VID} ('struct mlxsw_sp_port_vlan') needs to hold a reference on the RIF. For example: bond0.10 | bond0 | +-------+ | | swp1 swp2 Both {Port 1, VID 10} and {Port 2, VID 10} will hold a reference on the RIF corresponding to 'bond0.10'. When the last reference is dropped, the RIF will be destroyed. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 927d0ef10a1071fba491b4858267fbb87ff19ed1 Author: Ido Schimmel Date: Wed Dec 19 06:08:37 2018 +0000 mlxsw: spectrum: Sanitize VLAN interface's uppers Currently, only VRF and macvlan uppers are supported on top of VLAN device configured over a bridge, so make sure the driver forbids other uppers. Note that enslavement to a VRF is handled earlier in the notification block, so there is no need to check for a VRF upper here. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5dabcd0456d7ee17c2c7a17d7c2305444d2b9639 Author: Bart Van Assche Date: Mon Dec 17 13:20:46 2018 -0800 RDMA/srpt: Add support for immediate data Modify allocation of the non-SRQ receive queues such that immediate data is aligned on a 512 byte boundary. That alignment is necessary to pass the immediate data without copying to the block layer. When receiving an SRP_CMD with immediate data, postpone the ib_post_recv() call until target_execute_cmd() has finished. See also srpt_release_cmd(). Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 82305f8235622a97f29ff6e82cc97cab6ac543ea Author: Bart Van Assche Date: Mon Dec 17 13:20:45 2018 -0800 RDMA/srpt: Rework the srpt_alloc_srq() error path This patch does not change any functionality but makes the next patch easier to read. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 6feb64ffda7c8efc0ea25bc81866515ba80cdc04 Author: Bart Van Assche Date: Mon Dec 17 13:20:44 2018 -0800 RDMA/srpt: Remove driver version and release date Neither a driver version number nor a release data is useful in an upstream driver. Remove the word "InfiniBand" from the driver description because recently RoCE support has been added to this driver. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit c4bbe911c2ac86180657014fce8919ea0921a35b Author: Bart Van Assche Date: Mon Dec 17 13:20:43 2018 -0800 RDMA/srpt: Make kernel-doc headers complete Add documentation for those structure members for which it is missing. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 75d79b801c5389928a05de6db117912a21190138 Author: Bart Van Assche Date: Mon Dec 17 13:20:42 2018 -0800 RDMA/srpt: Join split strings Make sure that long strings occur on a single line as required by the coding standard. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit ffd5980695d165f0b811b5f57accb23fce5c33af Author: Bart Van Assche Date: Mon Dec 17 13:20:41 2018 -0800 RDMA/srpt: Improve coding style conformance Use tabs instead of spaces for indentation. Make sure that multi-line expressions have the operator at the end of a line instead of the start. Avoid a complaint about a missing space in a ternary expression by changing '(boolean) ? 1: 0' into 'boolean'. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit ed041919f0d23c109d52cde8da6ddc211c52d67e Author: Bart Van Assche Date: Mon Dec 17 13:20:40 2018 -0800 RDMA/srpt: Fix a use-after-free in the channel release code This patch avoids that KASAN sporadically reports the following: BUG: KASAN: use-after-free in rxe_run_task+0x1e/0x60 [rdma_rxe] Read of size 1 at addr ffff88801c50d8f4 by task check/24830 CPU: 4 PID: 24830 Comm: check Not tainted 4.20.0-rc6-dbg+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x86/0xca print_address_description+0x71/0x239 kasan_report.cold.5+0x242/0x301 __asan_load1+0x47/0x50 rxe_run_task+0x1e/0x60 [rdma_rxe] rxe_post_send+0x4bd/0x8d0 [rdma_rxe] srpt_zerolength_write+0xe1/0x160 [ib_srpt] srpt_close_ch+0x8b/0xe0 [ib_srpt] srpt_set_enabled+0xe7/0x150 [ib_srpt] srpt_tpg_enable_store+0xc0/0x100 [ib_srpt] configfs_write_file+0x157/0x1d0 __vfs_write+0xd7/0x3d0 vfs_write+0x102/0x290 ksys_write+0xab/0x130 __x64_sys_write+0x43/0x50 do_syscall_64+0x71/0x210 entry_SYSCALL_64_after_hwframe+0x49/0xbe Allocated by task 13856: save_stack+0x43/0xd0 kasan_kmalloc+0xc7/0xe0 kasan_slab_alloc+0x11/0x20 kmem_cache_alloc+0x105/0x320 rxe_alloc+0xff/0x1f0 [rdma_rxe] rxe_create_qp+0x9f/0x160 [rdma_rxe] ib_create_qp+0xf5/0x690 [ib_core] rdma_create_qp+0x6a/0x140 [rdma_cm] srpt_cm_req_recv.cold.59+0x1588/0x237b [ib_srpt] srpt_rdma_cm_req_recv.isra.35+0x1d5/0x220 [ib_srpt] srpt_rdma_cm_handler+0x6f/0x100 [ib_srpt] cma_listen_handler+0x59/0x60 [rdma_cm] cma_ib_req_handler+0xd5b/0x2570 [rdma_cm] cm_process_work+0x2e/0x110 [ib_cm] cm_work_handler+0x2aae/0x502b [ib_cm] process_one_work+0x481/0x9e0 worker_thread+0x67/0x5b0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 Freed by task 3440: save_stack+0x43/0xd0 __kasan_slab_free+0x139/0x190 kasan_slab_free+0xe/0x10 kmem_cache_free+0xbc/0x330 rxe_elem_release+0x66/0xe0 [rdma_rxe] rxe_destroy_qp+0x3f/0x50 [rdma_rxe] ib_destroy_qp+0x140/0x360 [ib_core] srpt_release_channel_work+0xdc/0x310 [ib_srpt] process_one_work+0x481/0x9e0 worker_thread+0x67/0x5b0 kthread+0x1cf/0x1f0 ret_from_fork+0x24/0x30 Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Cc: Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 882981f4a4112b44376ba21aa4d82dbdd5d8f148 Author: Bart Van Assche Date: Mon Dec 17 13:20:39 2018 -0800 RDMA/srp: Add support for immediate data Request permission to send immediate data during login. If the SRP target grants this request, send the payload of write requests <= 8 KB as immediate data. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 513d5647116b2aaeb6d99471f70ab9c9f3f65663 Author: Bart Van Assche Date: Mon Dec 17 13:20:38 2018 -0800 RDMA/srp: Rework handling of the maximum information unit length Move the maximum initiator to target information unit length parameter from struct srp_target_port into struct srp_rdma_ch. This patch does not change any functionality but makes the next patch easier to read. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 4f6d498c360c31006dec8062ce3d4601e557e9df Author: Bart Van Assche Date: Mon Dec 17 13:20:37 2018 -0800 RDMA/srp: Move srp_rdma_ch.max_ti_iu_len declaration Since srp_rdma_ch.max_ti_iu_len is used in the hot path, move it to the section with data structure members used in the hot path. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 2ee00f6a98c36f7e4ba07cc33f24cc5a69060cc9 Author: Bart Van Assche Date: Mon Dec 17 13:20:36 2018 -0800 RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer This patch avoids that the SCSI mid-layer keeps retrying forever if ib_post_send() fails. This was discovered while testing immediate data support and passing a too large num_sge value to ib_post_send(). Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 482fffc43c032ec09dd9ee792a546b36e973dcef Author: Bart Van Assche Date: Mon Dec 17 13:20:35 2018 -0800 RDMA/srp: Handle large SCSI CDBs correctly Reserve additional space for CDBs that contain more than sixteen bytes and set the add_cdb_len field for such CDBs as required. From the SRP standard: "The ADDITIONAL CDB LENGTH field contains the length in dwords of the ADDITIONAL CDB field." Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit e37df2d5b569390e3b80ebed9a73fd5b9dcda010 Author: Bart Van Assche Date: Mon Dec 17 13:20:34 2018 -0800 RDMA/srp: Document srp_parse_in() arguments This patch avoids that a warning is reported when building with W=1. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 16d14e01b7a100911804768b3ae4df083da2b53d Author: Bart Van Assche Date: Mon Dec 17 13:20:33 2018 -0800 include/scsi/srp.h: Add support for immediate data Add constants and data structures to support immediate data. These changes conform to SRP2r04. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit feafa20433466d6193d5686b188999391c873165 Author: Bart Van Assche Date: Mon Dec 17 13:20:32 2018 -0800 include/scsi/srp.h: Move response flag definitions into this file This patch moves all constants that come from the SRP standard into the include/scsi/srp.h header file. Cc: Sergey Gorenko Cc: Max Gurtovoy Cc: Laurence Oberman Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford commit 055722716c396ac1c7fd36a828250a78db1f22bc Author: Hoang Le Date: Wed Dec 19 11:42:19 2018 +0700 tipc: fix uninitialized value for broadcast retransmission When sending broadcast message on high load system, there are a lot of unnecessary packets restranmission. That issue was caused by missing in initial criteria for retransmission. To prevent this happen, just initialize this criteria for retransmission in next 10 milliseconds. Fixes: 31c4f4cc32f7 ("tipc: improve broadcast retransmission algorithm") Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 013dc9d55c2ee47bb4a509e10c5cad404059b686 Merge: 4a54877ee767f cf5f55f7f0139 Author: David S. Miller Date: Wed Dec 19 11:49:25 2018 -0800 Merge branch 'tipc-tracepoints' Tuong Lien says: ==================== tipc: tracepoints and trace_events in TIPC The patch series is the first step of introducing a tracing framework in TIPC, which will assist in collecting complete & plentiful data for post analysis, even in the case of a single failure occurrence e.g. when the failure is unreproducible. The tracing code in TIPC utilizes the powerful kernel tracepoints, trace events features along with particular dump functions to trace the TIPC object data and events (incl. bearer, link, socket, node, etc.). The tracing code should generate zero-load to TIPC when the trace events are not enabled. ==================== Signed-off-by: David S. Miller commit cf5f55f7f01397015dfa390256f2c20ceaabfcfb Author: Tuong Lien Date: Wed Dec 19 09:18:00 2018 +0700 tipc: add trace_events for tipc bearer The commit adds the new trace_event for TIPC bearer, L2 device event: trace_tipc_l2_device_event() Also, it puts the trace at the tipc_l2_device_event() function, then the device/bearer events and related info can be traced out during runtime when needed. Acked-by: Ying Xue Tested-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit eb18a510b5cd4daeb9736ad8db57a9fc49db185b Author: Tuong Lien Date: Wed Dec 19 09:17:59 2018 +0700 tipc: add trace_events for tipc node The commit adds the new trace_events for TIPC node object: trace_tipc_node_create() trace_tipc_node_delete() trace_tipc_node_lost_contact() trace_tipc_node_timeout() trace_tipc_node_link_up() trace_tipc_node_link_down() trace_tipc_node_reset_links() trace_tipc_node_fsm_evt() trace_tipc_node_check_state() Also, enables the traces for the following cases: - When a node is created/deleted; - When a node contact is lost; - When a node timer is timed out; - When a node link is up/down; - When all node links are reset; - When node state is changed; - When a skb comes and node state needs to be checked/updated. Acked-by: Ying Xue Tested-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 01e661ebfbad40e6280fb8ec25f2861d39ba4387 Author: Tuong Lien Date: Wed Dec 19 09:17:58 2018 +0700 tipc: add trace_events for tipc socket The commit adds the new trace_events for TIPC socket object: trace_tipc_sk_create() trace_tipc_sk_poll() trace_tipc_sk_sendmsg() trace_tipc_sk_sendmcast() trace_tipc_sk_sendstream() trace_tipc_sk_filter_rcv() trace_tipc_sk_advance_rx() trace_tipc_sk_rej_msg() trace_tipc_sk_drop_msg() trace_tipc_sk_release() trace_tipc_sk_shutdown() trace_tipc_sk_overlimit1() trace_tipc_sk_overlimit2() Also, enables the traces for the following cases: - When user creates a TIPC socket; - When user calls poll() on TIPC socket; - When user sends a dgram/mcast/stream message. - When a message is put into the socket 'sk_receive_queue'; - When a message is released from the socket 'sk_receive_queue'; - When a message is rejected (e.g. due to no port, invalid, etc.); - When a message is dropped (e.g. due to wrong message type); - When socket is released; - When socket is shutdown; - When socket rcvq's allocation is overlimit (> 90%); - When socket rcvq + bklq's allocation is overlimit (> 90%); - When the 'TIPC_ERR_OVERLOAD/2' issue happens; Note: a) All the socket traces are designed to be able to trace on a specific socket by either using the 'event filtering' feature on a known socket 'portid' value or the sysctl file: /proc/sys/net/tipc/sk_filter The file determines a 'tuple' for what socket should be traced: (portid, sock type, name type, name lower, name upper) where: + 'portid' is the socket portid generated at socket creating, can be found in the trace outputs or the 'tipc socket list' command printouts; + 'sock type' is the socket type (1 = SOCK_TREAM, ...); + 'name type', 'name lower' and 'name upper' are the service name being connected to or published by the socket. Value '0' means 'ANY', the default tuple value is (0, 0, 0, 0, 0) i.e. the traces happen for every sockets with no filter. b) The 'tipc_sk_overlimit1/2' event is also a conditional trace_event which happens when the socket receive queue (and backlog queue) is about to be overloaded, when the queue allocation is > 90%. Then, when the trace is enabled, the last skbs leading to the TIPC_ERR_OVERLOAD/2 issue can be traced. The trace event is designed as an 'upper watermark' notification that the other traces (e.g. 'tipc_sk_advance_rx' vs 'tipc_sk_filter_rcv') or actions can be triggerred in the meanwhile to see what is going on with the socket queue. In addition, the 'trace_tipc_sk_dump()' is also placed at the 'TIPC_ERR_OVERLOAD/2' case, so the socket and last skb can be dumped for post-analysis. Acked-by: Ying Xue Tested-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 26574db0c17fb29fac8b57f94ed1dfd46cc89887 Author: Tuong Lien Date: Wed Dec 19 09:17:57 2018 +0700 tipc: add trace_events for tipc link The commit adds the new trace_events for TIPC link object: trace_tipc_link_timeout() trace_tipc_link_fsm() trace_tipc_link_reset() trace_tipc_link_too_silent() trace_tipc_link_retrans() trace_tipc_link_bc_ack() trace_tipc_link_conges() And the traces for PROTOCOL messages at building and receiving: trace_tipc_proto_build() trace_tipc_proto_rcv() Note: a) The 'tipc_link_too_silent' event will only happen when the 'silent_intv_cnt' is about to reach the 'abort_limit' value (and the event is enabled). The benefit for this kind of event is that we can get an early indication about TIPC link loss issue due to timeout, then can do some necessary actions for troubleshooting. For example: To trigger the 'tipc_proto_rcv' when the 'too_silent' event occurs: echo 'enable_event:tipc:tipc_proto_rcv' > \ events/tipc/tipc_link_too_silent/trigger And disable it when TIPC link is reset: echo 'disable_event:tipc:tipc_proto_rcv' > \ events/tipc/tipc_link_reset/trigger b) The 'tipc_link_retrans' or 'tipc_link_bc_ack' event is useful to trace TIPC retransmission issues. In addition, the commit adds the 'trace_tipc_list/link_dump()' at the 'retransmission failure' case. Then, if the issue occurs, the link 'transmq' along with the link data can be dumped for post-analysis. These dump events should be enabled by default since it will only take effect when the failure happens. The same approach is also applied for the faulty case that the validation of protocol message is failed. Acked-by: Ying Xue Tested-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit b4b9771bcbbd5839b0f77aba55e2f85989ed6779 Author: Tuong Lien Date: Wed Dec 19 09:17:56 2018 +0700 tipc: enable tracepoints in tipc As for the sake of debugging/tracing, the commit enables tracepoints in TIPC along with some general trace_events as shown below. It also defines some 'tipc_*_dump()' functions that allow to dump TIPC object data whenever needed, that is, for general debug purposes, ie. not just for the trace_events. The following trace_events are now available: - trace_tipc_skb_dump(): allows to trace and dump TIPC msg & skb data, e.g. message type, user, droppable, skb truesize, cloned skb, etc. - trace_tipc_list_dump(): allows to trace and dump any TIPC buffers or queues, e.g. TIPC link transmq, socket receive queue, etc. - trace_tipc_sk_dump(): allows to trace and dump TIPC socket data, e.g. sk state, sk type, connection type, rmem_alloc, socket queues, etc. - trace_tipc_link_dump(): allows to trace and dump TIPC link data, e.g. link state, silent_intv_cnt, gap, bc_gap, link queues, etc. - trace_tipc_node_dump(): allows to trace and dump TIPC node data, e.g. node state, active links, capabilities, link entries, etc. How to use: Put the trace functions at any places where we want to dump TIPC data or events. Note: a) The dump functions will generate raw data only, that is, to offload the trace event's processing, it can require a tool or script to parse the data but this should be simple. b) The trace_tipc_*_dump() should be reserved for a failure cases only (e.g. the retransmission failure case) or where we do not expect to happen too often, then we can consider enabling these events by default since they will almost not take any effects under normal conditions, but once the rare condition or failure occurs, we get the dumped data fully for post-analysis. For other trace purposes, we can reuse these trace classes as template but different events. c) A trace_event is only effective when we enable it. To enable the TIPC trace_events, echo 1 to 'enable' files in the events/tipc/ directory in the 'debugfs' file system. Normally, they are located at: /sys/kernel/debug/tracing/events/tipc/ For example: To enable the tipc_link_dump event: echo 1 > /sys/kernel/debug/tracing/events/tipc/tipc_link_dump/enable To enable all the TIPC trace_events: echo 1 > /sys/kernel/debug/tracing/events/tipc/enable To collect the trace data: cat trace or cat trace_pipe > /trace.out & To disable all the TIPC trace_events: echo 0 > /sys/kernel/debug/tracing/events/tipc/enable To clear the trace buffer: echo > trace d) Like the other trace_events, the feature like 'filter' or 'trigger' is also usable for the tipc trace_events. For more details, have a look at: Documentation/trace/ftrace.txt MAINTAINERS | add two new files 'trace.h' & 'trace.c' in tipc Acked-by: Ying Xue Tested-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 18f2c4fcebf2582f96cbd5f2238f4f354a0e4847 Author: Theodore Ts'o Date: Wed Dec 19 14:36:58 2018 -0500 ext4: check for shutdown and r/o file system in ext4_write_inode() If the file system has been shut down or is read-only, then ext4_write_inode() needs to bail out early. Also use jbd2_complete_transaction() instead of ext4_force_commit() so we only force a commit if it is needed. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 8c5e14f438b8cee47ff01fc1cadd15e3eed44b59 Merge: 5132411985e14 8c33df1afd86c Author: Paolo Bonzini Date: Wed Dec 19 20:33:55 2018 +0100 Merge tag 'kvmarm-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for 4.21 - Large PUD support for HugeTLB - Single-stepping fixes - Improved tracing - Various timer and vgic fixups commit 4a54877ee767fe70a6966352c788fc5f405aa3c6 Merge: 8239d5790481b 4165079ba328d Author: David S. Miller Date: Wed Dec 19 11:21:45 2018 -0800 Merge branch 'sk_buff-add-extension-infrastructure' Florian Westphal says: ==================== sk_buff: add extension infrastructure TL;DR: - objdiff shows no change if CONFIG_XFRM=n && BR_NETFILTER=n - small size reduction when one or both options are set - no changes in ipsec performance Changes since v1: - Allocate entire extension space from a kmem_cache. - Avoid atomic_dec_and_test operation on skb_ext_put() for refcnt == 1 case. (similar to kfree_skbmem() fclone_ref use). This adds an optional extension infrastructure, with ispec (xfrm) and bridge netfilter as first users. The third (future) user is Multipath TCP which is still out-of-tree. MPTCP needs to map logical mptcp sequence numbers to the tcp sequence numbers used by individual subflows. This DSS mapping is read/written from tcp option space on receive and written to tcp option space on transmitted tcp packets that are part of and MPTCP connection. Extending skb_shared_info or adding a private data field to skb fclones doesn't work for incoming skb, so a different DSS propagation method would be required for the receive side. mptcp has same requirements as secpath/bridge netfilter: 1. extension memory is released when the sk_buff is free'd. 2. data is shared after cloning an skb (clone inherits extension) 3. adding extension to an skb will COW the extension buffer if needed. Two new members are added to sk_buff: 1. 'active_extensions' byte (filling a hole), telling which extensions are available for this skb. This has two purposes. a) avoids the need to initialize the pointer. b) allows to "delete" an extension by clearing its bit value in ->active_extensions. While it would be possible to store the active_extensions byte in the extension struct instead of sk_buff, there is one problem with this: When an extension has to be disabled, we can always clear the bit in skb->active_extensions. But in case it would be stored in the extension buffer itself, we might have to COW it first, if we are dealing with a cloned skb. On kmalloc failure we would be unable to turn an extension off. 2. extension pointer, located at the end of the sk_buff. If the active_extensions byte is 0, the pointer is undefined, it is not initialized on skb allocation. This adds extra code to skb clone and free paths (to deal with refcount/free of extension area) but this replaces similar code that manages skb->nf_bridge and skb->sp structs in the followup patches of the series. It is possible to add support for extensions that are not preseved on clones/copies: 1. define a bitmask of all extensions that need copy/cow on clone 2. change __skb_ext_copy() to check ->active_extensions & SKB_EXT_PRESERVE_ON_CLONE 3. set clone->active_extensions to 0 if test is false. This isn't done here because all extensions that get added here need the copy/cow semantics. Last patch converts skb->sp, secpath information gets stored as new SKB_EXT_SEC_PATH, so the 'sp' pointer is removed from skbuff. Extra code added to skb clone and free paths (to deal with refcount/free of extension area) replaces the existing code that does the same for skb->nf_bridge and skb->secpath. I don't see any other in-tree users that could benefit from this infrastructure, it doesn't make sense to add an extension just for the sake of a single flag bit (like skb->nf_trace). Adding a new extension is a good fit if all of the following are true: 1. Data is related to the skb/packet aggregate 2. Data should be freed when the skb is free'd 3. Data is not going to be relevant/needed in normal case (udp, tcp, forwarding workloads, ...) 4. There are no fancy action(s) needed on clone/free, such as callbacks into kernel modules. ==================== Signed-off-by: David S. Miller commit 4165079ba328dd47262a2183049d3591f0a750b1 Author: Florian Westphal Date: Tue Dec 18 17:15:27 2018 +0100 net: switch secpath to use skb extension infrastructure Remove skb->sp and allocate secpath storage via extension infrastructure. This also reduces sk_buff by 8 bytes on x86_64. Total size of allyesconfig kernel is reduced slightly, as there is less inlined code (one conditional atomic op instead of two on skb_clone). No differences in throughput in following ipsec performance tests: - transport mode with aes on 10GB link - tunnel mode between two network namespaces with aes and null cipher Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit a84e3f533324e40e4a99f50dee2188bf140d8098 Author: Florian Westphal Date: Tue Dec 18 17:15:26 2018 +0100 xfrm: prefer secpath_set over secpath_dup secpath_set is a wrapper for secpath_dup that will not perform an allocation if the secpath attached to the skb has a reference count of one, i.e., it doesn't need to be COW'ed. Also, secpath_dup doesn't attach the secpath to the skb, it leaves this to the caller. Use secpath_set in places that immediately assign the return value to skb. This allows to remove skb->sp without touching these spots again. secpath_dup can eventually be removed in followup patch. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit a053c866496d0c3647727f6a282a1db3afea3ed7 Author: Florian Westphal Date: Tue Dec 18 17:15:25 2018 +0100 drivers: chelsio: use skb_sec_path helper reduce noise when skb->sp is removed later in the series. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 26912e3756d0a13b188142d1ba0ab279cd3b657a Author: Florian Westphal Date: Tue Dec 18 17:15:24 2018 +0100 xfrm: use secpath_exist where applicable Will reduce noise when skb->sp is removed later in this series. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 56d1ac3260dadfc66c81ef2689bd1a09b05731a2 Author: Florian Westphal Date: Tue Dec 18 17:15:23 2018 +0100 drivers: net: netdevsim: use skb_sec_path helper ... so this won't have to be changed when skb->sp goes away. v2: no changes, preserve ack. Acked-by: Shannon Nelson Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 6362a6a04031cacc8ff54b65b84385d9fbab853d Author: Florian Westphal Date: Tue Dec 18 17:15:22 2018 +0100 drivers: net: ethernet: mellanox: use skb_sec_path helper Will avoid touching this when sp pointer is removed from sk_buff struct. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 2fdb435bc0d7492b8137d4c9db6a465511154e29 Author: Florian Westphal Date: Tue Dec 18 17:15:21 2018 +0100 drivers: net: intel: use secpath helpers in more places Use skb_sec_path and secpath_exists helpers where possible. This reduces noise in followup patch that removes skb->sp pointer. v2: no changes, preseve acks from v1. Acked-by: Shannon Nelson Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 2294be0f11e22b6197d025e5d3ab42888879ec4e Author: Florian Westphal Date: Tue Dec 18 17:15:20 2018 +0100 net: use skb_sec_path helper in more places skb_sec_path gains 'const' qualifier to avoid xt_policy.c: 'skb_sec_path' discards 'const' qualifier from pointer target type same reasoning as previous conversions: Won't need to touch these spots anymore when skb->sp is removed. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 7af8f4ca314a592e2ba49cb5ea1de1325974998e Author: Florian Westphal Date: Tue Dec 18 17:15:19 2018 +0100 net: move secpath_exist helper to sk_buff.h Future patch will remove skb->sp pointer. To reduce noise in those patches, move existing helper to sk_buff and use it in more places to ease skb->sp replacement later. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 0ca64da128b816b2826e9b469f47239c47f1df31 Author: Florian Westphal Date: Tue Dec 18 17:15:18 2018 +0100 xfrm: change secpath_set to return secpath struct, not error value It can only return 0 (success) or -ENOMEM. Change return value to a pointer to secpath struct. This avoids direct access to skb->sp: err = secpath_set(skb); if (!err) .. skb->sp-> ... Becomes: sp = secpath_set(skb) if (!sp) .. sp-> .. This reduces noise in followup patch which is going to remove skb->sp. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit de8bda1d22d38b7d5cd08b33f86efd94d4c86630 Author: Florian Westphal Date: Tue Dec 18 17:15:17 2018 +0100 net: convert bridge_nf to use skb extension infrastructure This converts the bridge netfilter (calling iptables hooks from bridge) facility to use the extension infrastructure. The bridge_nf specific hooks in skb clone and free paths are removed, they have been replaced by the skb_ext hooks that do the same as the bridge nf allocations hooks did. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit df5042f4c5b9326c593bf2e31ed859ebc3b4130a Author: Florian Westphal Date: Tue Dec 18 17:15:16 2018 +0100 sk_buff: add skb extension infrastructure This adds an optional extension infrastructure, with ispec (xfrm) and bridge netfilter as first users. objdiff shows no changes if kernel is built without xfrm and br_netfilter support. The third (planned future) user is Multipath TCP which is still out-of-tree. MPTCP needs to map logical mptcp sequence numbers to the tcp sequence numbers used by individual subflows. This DSS mapping is read/written from tcp option space on receive and written to tcp option space on transmitted tcp packets that are part of and MPTCP connection. Extending skb_shared_info or adding a private data field to skb fclones doesn't work for incoming skb, so a different DSS propagation method would be required for the receive side. mptcp has same requirements as secpath/bridge netfilter: 1. extension memory is released when the sk_buff is free'd. 2. data is shared after cloning an skb (clone inherits extension) 3. adding extension to an skb will COW the extension buffer if needed. The "MPTCP upstreaming" effort adds SKB_EXT_MPTCP extension to store the mapping for tx and rx processing. Two new members are added to sk_buff: 1. 'active_extensions' byte (filling a hole), telling which extensions are available for this skb. This has two purposes. a) avoids the need to initialize the pointer. b) allows to "delete" an extension by clearing its bit value in ->active_extensions. While it would be possible to store the active_extensions byte in the extension struct instead of sk_buff, there is one problem with this: When an extension has to be disabled, we can always clear the bit in skb->active_extensions. But in case it would be stored in the extension buffer itself, we might have to COW it first, if we are dealing with a cloned skb. On kmalloc failure we would be unable to turn an extension off. 2. extension pointer, located at the end of the sk_buff. If the active_extensions byte is 0, the pointer is undefined, it is not initialized on skb allocation. This adds extra code to skb clone and free paths (to deal with refcount/free of extension area) but this replaces similar code that manages skb->nf_bridge and skb->sp structs in the followup patches of the series. It is possible to add support for extensions that are not preseved on clones/copies. To do this, it would be needed to define a bitmask of all extensions that need copy/cow semantics, and change __skb_ext_copy() to check ->active_extensions & SKB_EXT_PRESERVE_ON_CLONE, then just set ->active_extensions to 0 on the new clone. This isn't done here because all extensions that get added here need the copy/cow semantics. v2: Allocate entire extension space using kmem_cache. Upside is that this allows better tracking of used memory, downside is that we will allocate more space than strictly needed in most cases (its unlikely that all extensions are active/needed at same time for same skb). The allocated memory (except the small extension header) is not cleared, so no additonal overhead aside from memory usage. Avoid atomic_dec_and_test operation on skb_ext_put() by using similar trick as kfree_skbmem() does with fclone_ref: If recount is 1, there is no concurrent user and we can free right away. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit c4b0e771f906f5beb7d90c3d28fe55ff9dbd038c Author: Florian Westphal Date: Tue Dec 18 17:15:15 2018 +0100 netfilter: avoid using skb->nf_bridge directly This pointer is going to be removed soon, so use the existing helpers in more places to avoid noise when the removal happens. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit ec5b5ad6e272d8d6b92d1007f79574919862a2d2 Author: Alexander Shishkin Date: Wed Dec 19 17:19:22 2018 +0200 intel_th: msu: Fix an off-by-one in attribute store The 'nr_pages' attribute of the 'msc' subdevices parses a comma-separated list of window sizes, passed from userspace. However, there is a bug in the string parsing logic wherein it doesn't exclude the comma character from the range of characters as it consumes them. This leads to an out-of-bounds access given a sufficiently long list. For example: > # echo 8,8,8,8 > /sys/bus/intel_th/devices/0-msc0/nr_pages > ================================================================== > BUG: KASAN: slab-out-of-bounds in memchr+0x1e/0x40 > Read of size 1 at addr ffff8803ffcebcd1 by task sh/825 > > CPU: 3 PID: 825 Comm: npktest.sh Tainted: G W 4.20.0-rc1+ > Call Trace: > dump_stack+0x7c/0xc0 > print_address_description+0x6c/0x23c > ? memchr+0x1e/0x40 > kasan_report.cold.5+0x241/0x308 > memchr+0x1e/0x40 > nr_pages_store+0x203/0xd00 [intel_th_msu] Fix this by accounting for the comma character. Signed-off-by: Alexander Shishkin Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Greg Kroah-Hartman commit 4cdd41585c5196f75e1e496c4f64345b2c700e0b Author: Alexander Shishkin Date: Wed Dec 19 17:19:21 2018 +0200 stm class: Add a reference to the SyS-T document Commit 4cb3653df0cd ("stm class: Document the MIPI SyS-T protocol usage") added a document describing the SyS-T protocol usage, but forgot to add it to the directory index. Fix that. Signed-off-by: Alexander Shishkin Fixes: 4cb3653df0cd ("stm class: Document the MIPI SyS-T protocol usage") Signed-off-by: Greg Kroah-Hartman commit c18614a1a11276837bdd44403d84d207c9951538 Author: Alexander Shishkin Date: Wed Dec 19 17:19:20 2018 +0200 stm class: Fix a module refcount leak in policy creation error path Commit c7fd62bc69d0 ("stm class: Introduce framing protocol drivers") adds a bug into the error path of policy creation, that would do a module_put() on a wrong module, if one tried to create a policy for an stm device which already has a policy, using a different protocol. IOW, | mkdir /config/stp-policy/dummy_stm.0:p_basic.test | mkdir /config/stp-policy/dummy_stm.0:p_sys-t.test # puts "p_basic" | mkdir /config/stp-policy/dummy_stm.0:p_sys-t.test # "p_basic" -> -1 throws: | general protection fault: 0000 [#1] SMP PTI | CPU: 3 PID: 2887 Comm: mkdir | RIP: 0010:module_put.part.31+0xe/0x90 | Call Trace: | module_put+0x13/0x20 | stm_put_protocol+0x11/0x20 [stm_core] | stp_policy_make+0xf1/0x210 [stm_core] | ? __kmalloc+0x183/0x220 | ? configfs_mkdir+0x10d/0x4c0 | configfs_mkdir+0x169/0x4c0 | vfs_mkdir+0x108/0x1c0 | do_mkdirat+0xe8/0x110 | __x64_sys_mkdir+0x1b/0x20 | do_syscall_64+0x5a/0x140 | entry_SYSCALL_64_after_hwframe+0x44/0xa9 Correct this sad mistake by calling calling 'put' on the correct reference, which happens to match another error path in the same function, so we consolidate the two at the same time. Signed-off-by: Alexander Shishkin Fixes: c7fd62bc69d0 ("stm class: Introduce framing protocol drivers") Reported-by: Ammy Yi Cc: stable Signed-off-by: Greg Kroah-Hartman commit fde872682e175743e0c3ef939c89e3c6008a1529 Author: Theodore Ts'o Date: Wed Dec 19 14:07:58 2018 -0500 ext4: force inode writes when nfsd calls commit_metadata() Some time back, nfsd switched from calling vfs_fsync() to using a new commit_metadata() hook in export_operations(). If the file system did not provide a commit_metadata() hook, it fell back to using sync_inode_metadata(). Unfortunately doesn't work on all file systems. In particular, it doesn't work on ext4 due to how the inode gets journalled --- the VFS writeback code will not always call ext4_write_inode(). So we need to provide our own ext4_nfs_commit_metdata() method which calls ext4_write_inode() directly. Google-Bug-Id: 121195940 Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 74fbc7d371d9a438b8e39d926d9d5012d2f762c4 Author: Song Hongyan Date: Tue Dec 11 09:58:23 2018 +0800 HID: intel-ish-hid: add MSI interrupt support Now ish hid ipc only support sideband interrupt but on some platforms they use MSI interrupt. In order to make the interrupt type coverage all the scenario add single MSI interrupt support, it can match all interrupt types. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 04d1532bd0b93cc4d0056f27da1591f086d341a6 Author: NeilBrown Date: Mon Dec 3 11:30:31 2018 +1100 SUNRPC discard cr_uid from struct rpc_cred. Just use ->cr_cred->fsuid directly. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 2edd8d746e51229705367528e95e5b49bccfa76e Author: NeilBrown Date: Mon Dec 3 11:30:31 2018 +1100 SUNRPC: simplify auth_unix. 1/ discard 'struct unx_cred'. We don't need any data that is not already in 'struct rpc_cred'. 2/ Don't keep these creds in a hash table. When a credential is needed, simply allocate it. When not needed, discard it. This can easily be faster than performing a lookup on a shared hash table. As the lookup can happen during write-out, use a mempool to ensure forward progress. This means that we cannot compare two credentials for equality by comparing the pointers, but we never do that anyway. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit d6efccd97e6de25e002d658593675ce8e07ceb8c Author: NeilBrown Date: Mon Dec 3 11:30:31 2018 +1100 SUNRPC: remove crbind rpc_cred operation This now always just does get_rpccred(), so we don't need an operation pointer to know to do that. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 89a4f758d9f55f197c2a461f61ffa4a75127b30d Author: NeilBrown Date: Mon Dec 3 11:30:31 2018 +1100 SUNRPC: remove generic cred code. This is no longer used. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit a52458b48af142bcc2b72fe810c0db20cfae7fdd Author: NeilBrown Date: Mon Dec 3 11:30:31 2018 +1100 NFS/NFSD/SUNRPC: replace generic creds with 'struct cred'. SUNRPC has two sorts of credentials, both of which appear as "struct rpc_cred". There are "generic credentials" which are supplied by clients such as NFS and passed in 'struct rpc_message' to indicate which user should be used to authorize the request, and there are low-level credentials such as AUTH_NULL, AUTH_UNIX, AUTH_GSS which describe the credential to be sent over the wires. This patch replaces all the generic credentials by 'struct cred' pointers - the credential structure used throughout Linux. For machine credentials, there is a special 'struct cred *' pointer which is statically allocated and recognized where needed as having a special meaning. A look-up of a low-level cred will map this to a machine credential. Signed-off-by: NeilBrown Acked-by: J. Bruce Fields Signed-off-by: Anna Schumaker commit 684f39b4cf5186bb0660e686f94296688b24fb32 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFS: struct nfs_open_dir_context: convert rpc_cred pointer to cred. Use the common 'struct cred' to pass credentials for readdir. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit b68572e07c58324cb8c274f1d84a20cad479c2d3 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFS: change access cache to use 'struct cred'. Rather than keying the access cache with 'struct rpc_cred', use 'struct cred'. Then use cred_fscmp() to compare credentials rather than comparing the raw pointer. A benefit of this approach is that in the common case we avoid the rpc_lookup_cred_nonblock() call which can be slow when the cred cache is large. This also keeps many fewer items pinned in the rpc cred cache, so the cred cache is less likely to get large. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 354698b7d47165ed2f52d6c2bf682096a4cd71d1 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: remove RPCAUTH_AUTH_NO_CRKEY_TIMEOUT This is no longer used. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit ddf529eeed59184c49dcad1633c11831f822bf6b Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFS: move credential expiry tracking out of SUNRPC into NFS. NFS needs to know when a credential is about to expire so that it can modify write-back behaviour to finish the write inside the expiry time. It currently uses functions in SUNRPC code which make use of a fairly complex callback scheme and flags in the generic credientials. As I am working to discard the generic credentials, this has to change. This patch moves the logic into NFS, in part by finding and caching the low-level credential in the open_context. We then make direct cred-api calls on that. This makes the code much simpler and removes a dependency on generic rpc credentials. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 1de7eea92946d7b581a8cd26084410913c80e594 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: add side channel to use non-generic cred for rpc call. The credential passed in rpc_message.rpc_cred is always a generic credential except in one instance. When gss_destroying_context() calls rpc_call_null(), it passes a specific credential that it needs to destroy. In this case the RPC acts *on* the credential rather than being authorized by it. This special case deserves explicit support and providing that will mean that rpc_message.rpc_cred is *always* generic, allowing some optimizations. So add "tk_op_cred" to rpc_task and "rpc_op_cred" to the setup data. Use this to pass the cred down from rpc_call_null(), and have rpcauth_bindcred() notice it and bind it in place. Credit to kernel test robot for finding a bug in earlier version of this patch. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit a68a72e135ef55bce136a0b604413fd6b0f6d3fc Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: introduce RPC_TASK_NULLCREDS to request auth_none In almost all cases the credential stored in rpc_message.rpc_cred is a "generic" credential. One of the two expections is when an AUTH_NULL credential is used such as for RPC ping requests. To improve consistency, don't pass an explicit credential in these cases, but instead pass NULL and set a task flag, similar to RPC_TASK_ROOTCREDS, which requests that NULL credentials be used by default. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 5e16923b432bfe79fdfb7cd95ed8e63f6438b663 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFS/SUNRPC: don't lookup machine credential until rpcauth_bindcred(). When NFS creates a machine credential, it is a "generic" credential, not tied to any auth protocol, and is really just a container for the princpal name. This doesn't get linked to a genuine credential until rpcauth_bindcred() is called. The lookup always succeeds, so various places that test if the machine credential is NULL, are pointless. As a step towards getting rid of generic credentials, this patch gets rid of generic machine credentials. The nfs_client and rpc_client just hold a pointer to a constant principal name. When a machine credential is wanted, a special static 'struct rpc_cred' pointer is used. rpcauth_bindcred() recognizes this, finds the principal from the client, and binds the correct credential. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit ecd5f97e1c7cd6124e3c3053beb5f2239aeacf8e Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: discard RPC_DO_ROOTOVERRIDE() it is never used. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit f15e1e8bc6427e4a0d38290937ccbfec1d1a2c44 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFSv4: don't require lock for get_renew_cred or get_machine_cred This lock is no longer necessary. If nfs4_get_renew_cred() needs to hunt through the open-state creds for a user cred, it still takes the lock to stablize the rbtree, but otherwise there are no races. Note that this completely removes the lock from nfs4_renew_state(). It appears that the original need for the locking here was removed long ago, and there is no longer anything to protect. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit a534ecb013bfc58a7f03653c7f2976bc341da98f Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 NFSv4: add cl_root_cred for use when machine cred is not available. NFSv4 state management tries a root credential when no machine credential is available, as can happen with kerberos. It does this by replacing the cl_machine_cred with a root credential. This means that any user of the machine credential needs to take a lock while getting a reference to the machine credential, which is a little cumbersome. So introduce an explicit cl_root_cred, and never free either credential until client shutdown. This means that no locking is needed to reference these credentials. Future patches will make use of this. This is only a temporary addition. both cl_machine_cred and cl_root_cred will disappear later in the series. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 1a80810fbf238e6dbaaaa5262a76d328ace21376 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: remove machine_cred field from struct auth_cred The cred is a machine_cred iff ->principal is set, so there is no need for the extra flag. There is one case which deserves some explanation. nfs4_root_machine_cred() calls rpc_lookup_machine_cred() with a NULL principal name which results in not getting a machine credential, but getting a root credential instead. This appears to be what is expected of the caller, and is clearly the result provided by both auth_unix and auth_gss which already ignore the flag. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 8276c902bbe95d628f48a7fdc13c71e265992085 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: remove uid and gid from struct auth_cred Use cred->fsuid and cred->fsgid instead. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit fc0664fd9bccafb00bd2dfe0d5218147994f81ee Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: remove groupinfo from struct auth_cred. We can use cred->groupinfo (from the 'struct cred') instead. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 97f68c6b02e0225b38d327103c59cfe2ab5ecda7 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 SUNRPC: add 'struct cred *' to auth_cred and rpc_cred The SUNRPC credential framework was put together before Linux has 'struct cred'. Now that we have it, it makes sense to use it. This first step just includes a suitable 'struct cred *' pointer in every 'struct auth_cred' and almost every 'struct rpc_cred'. The rpc_cred used for auth_null has a NULL 'struct cred *' as nothing else really makes sense. For rpc_cred, the pointer is reference counted. For auth_cred it isn't. struct auth_cred are either allocated on the stack, in which case the thread owns a reference to the auth, or are part of 'struct generic_cred' in which case gc_base owns the reference, and "acred" shares it. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit f06bc03339ad4c1baa964a5f0606247ac1c3c50b Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 cred: allow get_cred() and put_cred() to be given NULL. It is common practice for helpers like this to silently, accept a NULL pointer. get_rpccred() and put_rpccred() used by NFS act this way and using the same interface will ease the conversion for NFS, and simplify the resulting code. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit a6d8e7637faac93f362b694311bff64d5a8c701e Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 cred: export get_task_cred(). There is no reason that modules should not be able to use this, and NFS will need it when converted to use 'struct cred'. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 97d0fb239c041f5f99655af74812c3ab75cc4346 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 cred: add get_cred_rcu() Sometimes we want to opportunistically get a ref to a cred in an rcu_read_lock protected section. get_task_cred() does this, and NFS does as similar thing with its own credential structures. To prepare for NFS converting to use 'struct cred' more uniformly, define get_cred_rcu(), and use it in get_task_cred(). Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit d89b22d46a40da3a1630ecea111beaf3ef10bc21 Author: NeilBrown Date: Mon Dec 3 11:30:30 2018 +1100 cred: add cred_fscmp() for comparing creds. NFS needs to compare to credentials, to see if they can be treated the same w.r.t. filesystem access. Sometimes an ordering is needed when credentials are used as a key to an rbtree. NFS currently has its own private credential management from before 'struct cred' existed. To move it over to more consistent use of 'struct cred' we need a comparison function. This patch adds that function. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 8e2e5b7c492639109b1137c286dbad529c2b35e1 Author: Ben Dooks Date: Wed Nov 28 15:05:58 2018 +0000 SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG If we want /proc/sys/sunrpc the current kernel also drags in other debug features which we don't really want. Instead, we should always show the following entries: /proc/sys/sunrpc/udp_slot_table_entries /proc/sys/sunrpc/tcp_slot_table_entries /proc/sys/sunrpc/tcp_max_slot_table_entries /proc/sys/sunrpc/min_resvport /proc/sys/sunrpc/max_resvport /proc/sys/sunrpc/tcp_fin_timeout Signed-off-by: Ben Dooks Signed-off-by: Thomas Preston Signed-off-by: Anna Schumaker commit ac0aa5e843ca06ae55886dbbd2a1032d9b78b6bc Author: Pavel Tikhomirov Date: Wed Nov 14 11:12:05 2018 +0300 nfs: fix comment to nfs_generic_pg_test which does the opposite Please see comment to filelayout_pg_test for reference. To: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov Signed-off-by: Anna Schumaker commit 069d5bf5ec2650cfabc4bea9f6d779094a80b400 Author: Olga Kornievskaia Date: Fri Oct 26 16:16:58 2018 -0400 NFSv4: cleanup remove unused nfs4_xdev_fs_type commit e8f25e6d6d19 "NFS: Remove the NFS v4 xdev mount function" removed the last use of this. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit c9e585ebdc28a334b8100e560c9aaad6d4525a6e Author: Doug Ledford Date: Wed Dec 19 13:43:17 2018 -0500 IB/mlx5: Fix compile issue when ODP disabled When CONFIG_INFINIBAND_ON_DEMAND_PAGING is not enabled, we were getting build failures for defined but not used code. Fix that. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford commit 308144ce8e51bb6f9bed0ff0e72e7864f5f405f3 Author: Andrei.Stefanescu@microchip.com Date: Mon Dec 17 11:44:59 2018 +0000 regulator: mcp16502: code cleanup This patch does the following: - align parameter with parenthesis - fix compile error If CONFIG_SUSPEND is not set the dummy pm_ops callbacks are named mcp16502_suspend and mcp16502_resume instead of mcp16502_suspend_noirq and mcp16502_resume_noirq. Excerpt from compile log (kbuild test robot): In file included from include/linux/device.h:23:0, from include/linux/gpio/driver.h:5, from include/asm-generic/gpio.h:13, from include/linux/gpio.h:62, from drivers/regulator/mcp16502.c:11: >> drivers/regulator/mcp16502.c:527:32: error: 'mcp16502_suspend_noirq' undeclared here (not in a function); did you mean 'mcp16502_suspend'? SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mcp16502_suspend_noirq, >> drivers/regulator/mcp16502.c:528:10: error: 'mcp16502_resume_noirq' undeclared here (not in a function); did you mean 'mcp16502_suspend_noirq'? mcp16502_resume_noirq) vim +527 drivers/regulator/mcp16502.c 524 525 #ifdef CONFIG_PM 526 static const struct dev_pm_ops mcp16502_pm_ops = { > 527 SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mcp16502_suspend_noirq, > 528 mcp16502_resume_noirq) 529 }; 530 #endif 531 static const struct i2c_device_id mcp16502_i2c_id[] = { 532 { "mcp16502", 0 }, 533 { } 534 }; 535 MODULE_DEVICE_TABLE(i2c, mcp16502_i2c_id); 536 Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit 58331d618bd9ced88a21a9b68c7743b84c2f4803 Merge: 9b268ebe25cd6 c82ea33ead188 Author: Mark Brown Date: Wed Dec 19 18:38:33 2018 +0000 Merge remote-tracking branch 'regmap/topic/irq' into regmap-next commit 9b268ebe25cd649c8760c19dc8b7bda606bfba22 Merge: 7566ec393f416 580d48573c432 Author: Mark Brown Date: Wed Dec 19 18:38:31 2018 +0000 Merge branch 'regmap-4.21' into regmap-next commit c82ea33ead18801605b236523f21e5c893c7c253 Author: Bartosz Golaszewski Date: Wed Dec 19 12:18:05 2018 +0100 regmap: irq: add an option to clear status registers on unmask Some interrupt controllers whose interrupts are acked on read will set the status bits for masked interrupts without changing the state of the IRQ line. Some chips have an additional "feature" where if those set bits are not cleared before unmasking their respective interrupts, the IRQ line will change the state and we'll interpret this as an interrupt although it actually fired when it was masked. Add a new field to the irq chip struct that tells the regmap irq chip code to always clear the status registers before actually changing the irq mask values. Signed-off-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit 8239d5790481bf2e4e09e202bfd4a8a5ea8ca3a1 Merge: 7b98f63ea777d 610febc68ab79 Author: David S. Miller Date: Wed Dec 19 10:37:23 2018 -0800 Merge branch 'dpaa2-eth-add-QBMAN-statistics' Ioana Ciornei says: ==================== dpaa2-eth: add QBMAN statistics This patch set adds ethtool statistics for pending frames/bytes in Rx/Tx conf FQs and number of buffers in pool. The first patch adds support for the query APIs in the DPIO driver while the latter actually exposes the statistics through ethtool. ==================== Signed-off-by: David S. Miller commit 610febc68ab79863eccaf829946a3d9278666772 Author: Ioana Radulescu Date: Tue Dec 18 15:23:01 2018 +0000 dpaa2-eth: Add QBMAN related stats Add statistics for pending frames in Rx/Tx conf FQs and number of buffers in pool. Available through ethtool -S. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana ciornei Signed-off-by: David S. Miller commit e80081c34b03587cf6e89c0a1ea16c71b40bccca Author: Roy Pledge Date: Tue Dec 18 15:23:01 2018 +0000 soc: fsl: dpio: Add BP and FQ query APIs Add FQ (Frame Queue) and BP (Buffer Pool) query APIs that users of QBMan can invoke to see the status of the queues and pools that they are using. Signed-off-by: Roy Pledge Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1c2928e3e3212252b505b746ec10951027a95813 Author: Matti Vaittinen Date: Tue Dec 18 13:59:31 2018 +0200 regmap: regmap-irq/gpio-max77620: add level-irq support Add level active IRQ support to regmap-irq irqchip. Change breaks existing regmap-irq type setting. Convert the existing drivers which use regmap-irq with trigger type setting (gpio-max77620) to work with this new approach. So we do not magically support level-active IRQs on gpio-max77620 - but add support to the regmap-irq for chips which support them =) We do not support distinguishing situation where HW supports rising and falling edge detection but not both. Separating this would require inventing yet another flags for IRQ types. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit 7b98f63ea777d90abaca41beadf71e3f62d180e0 Author: Raju Lakkaraju Date: Tue Dec 18 14:57:56 2018 +0530 net: phy: mscc: Fix the VSC 8531/41 Chip Init sequence - Turn on Broadcast writes - UNH 1.8.1 clear bias for UNH 1000BT distortion - UNH 1.8.7 optimize pre-emphasis for 100BasTx UNH 100W fix - Enable Token-ring during 'Coma Mode' Signed-off-by: Raju Lakkaraju Signed-off-by: David S. Miller commit 78e6fbf321a9b4cb46b17d83f25abcd318859c70 Author: Wei Yongjun Date: Tue Dec 18 07:10:21 2018 +0000 regulator: act8945a-regulator: make symbol act8945a_pm static Fixes the following sparse warning: drivers/regulator/act8945a-regulator.c:340:1: warning: symbol 'act8945a_pm' was not declared. Should it be static? Fixes: 7482d6ecc68e ("regulator: act8945a-regulator: Implement PM functionalities") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown commit 84267d1b18abee0c141553396f52a23db71660d3 Author: Matti Vaittinen Date: Tue Dec 18 12:58:13 2018 +0200 regmap: regmap-irq: Remove default irq type setting from core The common code should not set IRQ type. Read HW defaults to the cache at startup instead of forcing type to EDGE_BOTH. If default setting is needed this should be done via normal mechanisms or by chip specific code if normal mechanisms are not suitable for some reason. Common regmap-irq code should not have defaults hard-coded but keep the HW/boot defaults untouched. Signed-off-by: Matti Vaittinen Tested-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit 8c33df1afd86c611da8473dc6fc5f3af3dabe984 Author: Marc Zyngier Date: Wed Dec 19 08:31:54 2018 +0000 arm: KVM: Add S2_PMD_{MASK,SIZE} constants They were missing, and it turns out that we do need them now. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 58466766cd35754a061414c0c93225db2962948e Author: Marc Zyngier Date: Wed Dec 19 08:28:38 2018 +0000 arm/arm64: KVM: Add ARM_EXCEPTION_IS_TRAP macro 32 and 64bit use different symbols to identify the traps. 32bit has a fine grained approach (prefetch abort, data abort and HVC), while 64bit is pretty happy with just "trap". This has been fine so far, except that we now need to decode some of that in tracepoints that are common to both architectures. Introduce ARM_EXCEPTION_IS_TRAP which abstracts the trap symbols and make the tracepoint use it. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier commit df655b75c43fba0f2621680ab261083297fd6d16 Author: Will Deacon Date: Thu Dec 13 16:06:14 2018 +0000 arm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1 Although bit 31 of VTCR_EL2 is RES1, we inadvertently end up setting all of the upper 32 bits to 1 as well because we define VTCR_EL2_RES1 as signed, which is sign-extended when assigning to kvm->arch.vtcr. Lucky for us, the architecture currently treats these upper bits as RES0 so, whilst we've been naughty, we haven't set fire to anything yet. Cc: Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier commit 6794ad5443a2118243e13879f94228524a1a2b92 Author: Christoffer Dall Date: Fri Nov 2 08:53:22 2018 +0100 KVM: arm/arm64: Fix unintended stage 2 PMD mappings There are two things we need to take care of when we create block mappings in the stage 2 page tables: (1) The alignment within a PMD between the host address range and the guest IPA range must be the same, since otherwise we end up mapping pages with the wrong offset. (2) The head and tail of a memory slot may not cover a full block size, and we have to take care to not map those with block descriptors, since we could expose memory to the guest that the host did not intend to expose. So far, we have been taking care of (1), but not (2), and our commentary describing (1) was somewhat confusing. This commit attempts to factor out the checks of both into a common function, and if we don't pass the check, we won't attempt any PMD mappings for neither hugetlbfs nor THP. Note that we used to only check the alignment for THP, not for hugetlbfs, but as far as I can tell the check needs to be applied to both scenarios. Cc: Ralph Palutke Cc: Lukas Braun Reported-by: Lukas Braun Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 107352a24900fb458152b92a4e72fbdc83fd5510 Author: Marc Zyngier Date: Tue Dec 18 14:59:09 2018 +0000 arm/arm64: KVM: vgic: Force VM halt when changing the active state of GICv3 PPIs/SGIs We currently only halt the guest when a vCPU messes with the active state of an SPI. This is perfectly fine for GICv2, but isn't enough for GICv3, where all vCPUs can access the state of any other vCPU. Let's broaden the condition to include any GICv3 interrupt that has an active state (i.e. all but LPIs). Cc: stable@vger.kernel.org Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 599d79dcd18fa0f88ae15b7042c9d6b011a678b2 Author: Marc Zyngier Date: Tue Dec 4 10:44:22 2018 +0000 arm64: KVM: Add trapped system register access tracepoint We're pretty blind when it comes to system register tracing, and rely on the ESR value displayed by kvm_handle_sys, which isn't much. Instead, let's add an actual name to the sysreg entries, so that we can finally print it as we're about to perform the access itself. The new tracepoint is conveniently called kvm_sys_access. Signed-off-by: Marc Zyngier commit da6f16662a6eba3de0d1a39f3b8913d38754bb2b Author: Christoffer Dall Date: Thu Nov 29 12:20:01 2018 +0100 KVM: arm64: Make vcpu const in vcpu_read_sys_reg vcpu_read_sys_reg should not be modifying the VCPU structure. Eventually, to handle EL2 sysregs for nested virtualization, we will call vcpu_read_sys_reg from places that have a const vcpu pointer, which will complain about the lack of the const modifier on the read path. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 6e14ef1d12dc26ab4f6bef9d47e6906002f0a1ba Author: Christoffer Dall Date: Tue Dec 11 09:54:11 2018 +0100 KVM: arm/arm64: arch_timer: Simplify kvm_timer_vcpu_terminate kvm_timer_vcpu_terminate can only be called in two scenarios: 1. As part of cleanup during a failed VCPU create 2. As part of freeing the whole VM (struct kvm refcount == 0) In the first case, we cannot have programmed any timers or mapped any IRQs, and therefore we do not have to cancel anything or unmap anything. In the second case, the VCPU will have gone through kvm_timer_vcpu_put, which will have canceled the emulated physical timer's hrtimer, and we do not need to that here as well. We also do not care if the irq is recorded as mapped or not in the VGIC data structure, because the whole VM is going away. That leaves us only with having to ensure that we cancel the bg_timer if we were blocking the last time we called kvm_timer_vcpu_put(). Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 8a411b060f820140e9894239fde5819bb213bef0 Author: Christoffer Dall Date: Tue Nov 27 13:48:08 2018 +0100 KVM: arm/arm64: Remove arch timer workqueue The use of a work queue in the hrtimer expire function for the bg_timer is a leftover from the time when we would inject interrupts when the bg_timer expired. Since we are no longer doing that, we can instead call kvm_vcpu_wake_up() directly from the hrtimer function and remove all workqueue functionality from the arch timer code. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 71a7e47f39a2fb971ef9934e98ba089581eff641 Author: Christoffer Dall Date: Mon Dec 3 21:31:24 2018 +0100 KVM: arm/arm64: Fixup the kvm_exit tracepoint The kvm_exit tracepoint strangely always reported exits as being IRQs. This seems to be because either the __print_symbolic or the tracepoint macros use a variable named idx. Take this chance to update the fields in the tracepoint to reflect the concepts in the arm64 architecture that we pass to the tracepoint and move the exception type table to the same location and header files as the exits code. We also clear out the exception code to 0 for IRQ exits (which translates to UNKNOWN in text) to make it slighyly less confusing to parse the trace output. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 9009782a4937ad0f4a4be6945080d7fa77fa4092 Author: Christoffer Dall Date: Sat Dec 1 13:21:47 2018 -0800 KVM: arm/arm64: vgic: Consider priority and active state for pending irq When checking if there are any pending IRQs for the VM, consider the active state and priority of the IRQs as well. Otherwise we could be continuously scheduling a guest hypervisor without it seeing an IRQ. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit c23b2e6fc4ca346018618266bcabd335c0a8a49e Author: Gustavo A. R. Silva Date: Wed Dec 12 14:11:23 2018 -0600 KVM: arm/arm64: vgic: Fix off-by-one bug in vgic_get_irq() When using the nospec API, it should be taken into account that: "...if the CPU speculates past the bounds check then * array_index_nospec() will clamp the index within the range of [0, * size)." The above is part of the header for macro array_index_nospec() in linux/nospec.h Now, in this particular case, if intid evaluates to exactly VGIC_MAX_SPI or to exaclty VGIC_MAX_PRIVATE, the array_index_nospec() macro ends up returning VGIC_MAX_SPI - 1 or VGIC_MAX_PRIVATE - 1 respectively, instead of VGIC_MAX_SPI or VGIC_MAX_PRIVATE, which, based on the original logic: /* SGIs and PPIs */ if (intid <= VGIC_MAX_PRIVATE) return &vcpu->arch.vgic_cpu.private_irqs[intid]; /* SPIs */ if (intid <= VGIC_MAX_SPI) return &kvm->arch.vgic.spis[intid - VGIC_NR_PRIVATE_IRQS]; are valid values for intid. Fix this by calling array_index_nospec() macro with VGIC_MAX_PRIVATE + 1 and VGIC_MAX_SPI + 1 as arguments for its parameter size. Fixes: 41b87599c743 ("KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_get_irq()") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva [dropped the SPI part which was fixed separately] Signed-off-by: Marc Zyngier commit 8a363970d1dc38c4ec4ad575c862f776f468d057 Author: Theodore Ts'o Date: Wed Dec 19 12:29:13 2018 -0500 ext4: avoid declaring fs inconsistent due to invalid file handles If we receive a file handle, either from NFS or open_by_handle_at(2), and it points at an inode which has not been initialized, and the file system has metadata checksums enabled, we shouldn't try to get the inode, discover the checksum is invalid, and then declare the file system as being inconsistent. This can be reproduced by creating a test file system via "mke2fs -t ext4 -O metadata_csum /tmp/foo.img 8M", mounting it, cd'ing into that directory, and then running the following program. #define _GNU_SOURCE #include struct handle { struct file_handle fh; unsigned char fid[MAX_HANDLE_SZ]; }; int main(int argc, char **argv) { struct handle h = {{8, 1 }, { 12, }}; open_by_handle_at(AT_FDCWD, &h.fh, O_RDONLY); return 0; } Google-Bug-Id: 120690101 Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit a805622a757b6d7f65def4141d29317d8e37b8a1 Author: Theodore Ts'o Date: Wed Dec 19 12:28:13 2018 -0500 ext4: include terminating u32 in size of xattr entries when expanding inodes In ext4_expand_extra_isize_ea(), we calculate the total size of the xattr header, plus the xattr entries so we know how much of the beginning part of the xattrs to move when expanding the inode extra size. We need to include the terminating u32 at the end of the xattr entries, or else if there is uninitialized, non-zero bytes after the xattr entries and before the xattr values, the list of xattr entries won't be properly terminated. Reported-by: Steve Graham Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit d82b51c855a20eb456ac09f2f40ea98312373263 Author: Pierre-Louis Bossart Date: Sat Dec 15 14:07:23 2018 -0600 ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection For HDaudio and Skylake drivers, add module parameter "pci_binding" When pci_binding == 0 (AUTO), the PCI class/subclass info is used to select drivers based on the presence of the DSP. pci_binding == 1 (LEGACY) forces the use of the HDAudio legacy driver, even if the DSP is present. pci_binding == 2 (ASOC) forces the use of the ASOC driver. The information on the DSP presence is bypassed. The value for the module parameter needs to be identical for both drivers. This parameter is intended as a back-up solution if the automatic detection fails or when the DSP usage fails. Such cases should be reported on the alsa-devel mailing list for analysis. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai commit c337104b1a16becc486fdc95d544c835b17021db Author: Pierre-Louis Bossart Date: Sat Dec 15 14:07:22 2018 -0600 ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected Now that the SST/Skylake driver supports per platform selectors, we can add logic to automatically select the right driver. If the Skylake driver is selected for a specific platform, and the DSP is detected at run-time based on the PCI class/subclass/prog-if information, the legacy HDaudio driver aborts the probe. This will result in a single driver probing and remove the need for modprobe blacklists. Follow-up patches will add a module parameter to bypass the logic if this automatic detection fails, or if the Skylake driver is unable to actually support the platform (firmware authentication, missing topology file, hardware issue, etc). The same mechanism will be used to conflicts generated by the same PCI ID being registered by both legacy HDAuudio and SOF drivers for Intel platforms. In other words SOF will not require changes to the HDaudio legacy. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai commit 18d43c9b88eb335440c5e769eb6c2d5bc908dc61 Author: Keyon Jie Date: Tue Dec 11 15:30:27 2018 -0600 ALSA: HDA: export process_unsol_events() The SOF implementation does not rely on the hdac_bus library, however for HDMI and HDaudio codec support it does need to deal with unsolicited events. Instead of re-inventing the wheel, export this symbol to reuse this part of the library directly. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai commit 6c503d0d88db9d57c1dc4c87175c94766b6a6c61 Author: Christoph Hellwig Date: Sun Dec 16 10:23:28 2018 +0100 sparc/iommu: fix ->map_sg return value Just decrementing the sz value will lead to an incorrect return value. Instead of just introducing a local variable switch to the standard for_each_sg helper and standard naming of the arguments. Fixes: ce65d36f3e ("sparc: remove the sparc32_dma_ops indirection") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Acked-by: Sam Ravnborg commit 1e2934ad7f93476e92039d4b8914d9f71789448f Author: Christoph Hellwig Date: Sun Dec 16 10:20:04 2018 +0100 sparc/io-unit: fix ->map_sg return value Just decrementing the sz value will lead to an incorrect return value. Instead of just introducing a local variable switch to the standard for_each_sg helper and standard naming of the arguments. Fixes: ce65d36f3e ("sparc: remove the sparc32_dma_ops indirection") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Acked-by: Sam Ravnborg commit 9ab91e7c5c514b675470d9b57393cbe455722060 Author: Christoph Hellwig Date: Fri Dec 14 15:18:08 2018 +0100 arm64: default to the direct mapping in get_arch_dma_ops Otherwise the direct mapping won't work at all given that a NULL dev->dma_ops causes a fallback. Note that we already explicitly set dev->dma_ops to dma_dummy_ops for dma-incapable devices, so this fallback should not be needed anyway. Fixes: 356da6d0cd ("dma-mapping: bypass indirect calls for dma-direct") Signed-off-by: Christoph Hellwig Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 2b3c5a99d5f314960e00950c1782eac9361de30f Author: Firoz Khan Date: Wed Nov 14 10:02:10 2018 +0530 sh: generate uapi header and syscall table header files System call table generation script must be run to gener- ate unistd_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by sh/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/syscall_32.S file. Signed-off-by: Firoz Khan Signed-off-by: Arnd Bergmann commit a0239c8eb9363d4c2c6d6411bff4e3ea744e3164 Author: Firoz Khan Date: Thu Nov 1 19:18:49 2018 +0530 sh: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/syscall_32.S - the real system call table. Please note, this support is only available for 32-bit kernel, not 64-bit kernel. As I came across the 64-bit kernel is not active for long time. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Arnd Bergmann commit 8a79633b4928cbb7cb575aa62dda0c49d37c2387 Author: Firoz Khan Date: Wed Nov 14 10:02:08 2018 +0530 sh: add __NR_syscalls along with NR_syscalls NR_syscalls macro holds the number of system call exist in sh architecture. We have to change the value of NR- _syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_sy- scalls value. 1. Update NR_syscalls in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_sys- calls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd_32/64.h along with NR_syscalls which is moved to asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_sys- calls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Arnd Bergmann commit 29d3c047b7038d7efce4f279e4d4165d69f6ccb9 Merge: 5a862f86b8e86 1629db9c75342 Author: David S. Miller Date: Wed Dec 19 08:41:45 2018 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2018-12-19 Here's the main bluetooth-next pull request for 4.21: - Multiple fixes & improvements for Broadcom-based controllers - New USB ID for an Intel controller - Support for new Broadcom controller variants - Use DEFINE_SHOW_ATTRIBUTE to simplify debugfs code - Eliminate confusing "last event is not cmd complete" warning message - Added vendor suspend/resume support for H:5 (3-Wire UART) controllers - Various other smaller improvements & fixes Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 5a862f86b8e86562fc8532160c5530a13e1e944b Merge: 33f18c96afdf4 d359bbce0601c Author: David S. Miller Date: Wed Dec 19 08:36:18 2018 -0800 Merge tag 'mac80211-next-for-davem-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time we have too many changes to list, highlights: * virt_wifi - wireless control simulation on top of another network interface * hwsim configurability to test capabilities similar to real hardware * various mesh improvements * various radiotap vendor data fixes in mac80211 * finally the nl_set_extack_cookie_u64() we talked about previously, used for * peer measurement APIs, right now only with FTM (flight time measurement) for location * made nl80211 radio/interface announcements more complete * various new HE (802.11ax) things: updates, TWT support, ... ==================== Signed-off-by: David S. Miller commit 3a762de55b4ede47a5369f57d0f92979738be638 Author: Ming Lei Date: Thu Dec 20 00:29:15 2018 +0800 block: save irq state in blkg_lookup_create() blkg_lookup_create() may be called from pool_map() in which irq state is saved, so we have to do that in blkg_lookup_create(). Otherwise, the following lockdep warning can be triggered: [ 104.258537] ================================ [ 104.259129] WARNING: inconsistent lock state [ 104.259725] 4.20.0-rc6+ #545 Not tainted [ 104.260268] -------------------------------- [ 104.260865] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 104.261727] swapper/49/0 [HC0[0]:SC1[1]:HE0:SE0] takes: [ 104.262444] 00000000db365b5d (&(&pool->lock)->rlock#3){+.?.}, at: thin_endio+0xcf/0x2a3 [dm_thin_pool] [ 104.263747] {SOFTIRQ-ON-W} state was registered at: [ 104.264417] _raw_spin_unlock_irq+0x29/0x4c [ 104.265014] blkg_lookup_create+0xdc/0xe6 [ 104.265609] bio_associate_blkg_from_css+0xd3/0x13f [ 104.266312] bio_associate_blkg+0x15a/0x1bb [ 104.266913] pool_map+0xe8/0x103 [dm_thin_pool] [ 104.267572] __map_bio+0x98/0x29c [dm_mod] [ 104.268162] __split_and_process_non_flush+0x29e/0x306 [dm_mod] [ 104.269003] __split_and_process_bio+0x16a/0x25b [dm_mod] [ 104.269971] __dm_make_request.isra.14+0xdc/0x124 [dm_mod] [ 104.270973] generic_make_request+0x3f5/0x68b [ 104.271676] process_prepared_mapping+0x166/0x1ef [dm_thin_pool] [ 104.272531] schedule_zero+0x239/0x273 [dm_thin_pool] [ 104.273245] process_cell+0x60c/0x6f1 [dm_thin_pool] [ 104.273967] do_worker+0x60c/0xca8 [dm_thin_pool] [ 104.274635] process_one_work+0x4eb/0x834 [ 104.275203] worker_thread+0x318/0x484 [ 104.275740] kthread+0x1d1/0x1e1 [ 104.276203] ret_from_fork+0x3a/0x50 [ 104.276714] irq event stamp: 170003 [ 104.277201] hardirqs last enabled at (170002): [] _raw_spin_unlock_irqrestore+0x44/0x6b [ 104.278535] hardirqs last disabled at (170003): [] _raw_spin_lock_irqsave+0x20/0x55 [ 104.280273] softirqs last enabled at (169978): [] irq_enter+0x4c/0x73 [ 104.281617] softirqs last disabled at (169979): [] irq_exit+0x7e/0x11d [ 104.282744] [ 104.282744] other info that might help us debug this: [ 104.283640] Possible unsafe locking scenario: [ 104.283640] [ 104.284452] CPU0 [ 104.284803] ---- [ 104.285150] lock(&(&pool->lock)->rlock#3); [ 104.285762] [ 104.286130] lock(&(&pool->lock)->rlock#3); [ 104.286750] [ 104.286750] *** DEADLOCK *** [ 104.286750] [ 104.287564] no locks held by swapper/49/0. [ 104.288129] [ 104.288129] stack backtrace: [ 104.288738] CPU: 49 PID: 0 Comm: swapper/49 Not tainted 4.20.0-rc6+ #545 [ 104.289700] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-2.fc27 04/01/2014 [ 104.290858] Call Trace: [ 104.291204] [ 104.291502] dump_stack+0x9a/0xe6 [ 104.291968] mark_lock+0x56c/0x7a6 [ 104.292442] ? check_usage_backwards+0x209/0x209 [ 104.293086] __lock_acquire+0x400/0x15bf [ 104.293662] ? check_chain_key+0x150/0x1aa [ 104.294236] lock_acquire+0x1a6/0x1e3 [ 104.294768] ? thin_endio+0xcf/0x2a3 [dm_thin_pool] [ 104.295444] ? _raw_spin_unlock_irqrestore+0x44/0x6b [ 104.296143] ? process_prepared_discard_fail+0x36/0x36 [dm_thin_pool] [ 104.297031] _raw_spin_lock_irqsave+0x46/0x55 [ 104.297659] ? thin_endio+0xcf/0x2a3 [dm_thin_pool] [ 104.298335] thin_endio+0xcf/0x2a3 [dm_thin_pool] [ 104.298997] ? process_prepared_discard_fail+0x36/0x36 [dm_thin_pool] [ 104.299886] ? check_flags+0x20a/0x20a [ 104.300408] ? lock_acquire+0x1a6/0x1e3 [ 104.300954] ? process_prepared_discard_fail+0x36/0x36 [dm_thin_pool] [ 104.301865] clone_endio+0x1bb/0x22d [dm_mod] [ 104.302491] ? disable_write_zeroes+0x20/0x20 [dm_mod] [ 104.303200] ? bio_disassociate_blkg+0xc6/0x15f [ 104.303836] ? bio_endio+0x2b2/0x2da [ 104.304349] clone_endio+0x1f3/0x22d [dm_mod] [ 104.304978] ? disable_write_zeroes+0x20/0x20 [dm_mod] [ 104.305709] ? bio_disassociate_blkg+0xc6/0x15f [ 104.306333] ? bio_endio+0x2b2/0x2da [ 104.306853] clone_endio+0x1f3/0x22d [dm_mod] [ 104.307476] ? disable_write_zeroes+0x20/0x20 [dm_mod] [ 104.308185] ? bio_disassociate_blkg+0xc6/0x15f [ 104.308817] ? bio_endio+0x2b2/0x2da [ 104.309319] blk_update_request+0x2de/0x4cc [ 104.309927] blk_mq_end_request+0x2a/0x183 [ 104.310498] blk_done_softirq+0x16a/0x1a6 [ 104.311051] ? blk_softirq_cpu_dead+0xe2/0xe2 [ 104.311653] ? __lock_is_held+0x2a/0x87 [ 104.312186] __do_softirq+0x250/0x4e8 [ 104.312705] irq_exit+0x7e/0x11d [ 104.313157] call_function_single_interrupt+0xf/0x20 [ 104.313860] [ 104.314163] RIP: 0010:native_safe_halt+0x2/0x3 [ 104.314792] Code: 63 02 df f0 83 44 24 fc 00 48 89 df e8 cc 3f 7a ff 48 8b 03 a8 08 74 0b 65 81 25 9d 31 45 7e ff ff ff 7f 5b 5d 41 5c c3 fb f4 f4 c3 0f 1f 44 00 00 41 56 41 55 41 54 55 53 e8 a2 0d 5c ff e8 [ 104.317339] RSP: 0018:ffff888106c9fdc0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff04 [ 104.318390] RAX: 1ffff11020d92100 RBX: 0000000000000000 RCX: ffffffff81159ac7 [ 104.319366] RDX: 1ffffffff05d5e69 RSI: 0000000000000007 RDI: ffff888106c90d1c [ 104.320339] RBP: 0000000000000000 R08: dffffc0000000000 R09: 0000000000000001 [ 104.321313] R10: ffffed1025d57ba0 R11: ffffed1025d57b9f R12: 1ffff11020d93fbf [ 104.322328] R13: 0000000000000031 R14: ffff888106c90040 R15: 0000000000000000 [ 104.323307] ? lockdep_hardirqs_on+0x26b/0x278 [ 104.323927] default_idle+0xd9/0x1a8 [ 104.324427] do_idle+0x162/0x2b2 [ 104.324891] ? arch_cpu_idle_exit+0x28/0x28 [ 104.325467] ? mark_held_locks+0x28/0x7f [ 104.326031] ? _raw_spin_unlock_irqrestore+0x44/0x6b [ 104.326719] cpu_startup_entry+0x1d/0x1f [ 104.327261] start_secondary+0x2cb/0x308 [ 104.327806] ? set_cpu_sibling_map+0x8a3/0x8a3 [ 104.328421] secondary_startup_64+0xa4/0xb0 Fixes: b978962ad4f7f9 ("blkcg: update blkg_lookup_create() to do locking") Cc: Mike Snitzer Cc: Dennis Zhou Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit dbe3ece1287dafe4113c64ada3113c39f344c64a Author: Jens Axboe Date: Wed Dec 19 09:13:34 2018 -0700 dm: don't reuse bio for flushes DM currently has a statically allocated bio that it uses to issue empty flushes. It doesn't submit this bio, it just uses it for maintaining state while setting up clones. Multiple users can access this bio at the same time. This wasn't previously an issue, even if it was a bit iffy, but with the blkg associations it can become one. We setup the blkg association, then clone bio's and submit, then remove the blkg assocation again. But since we can have multiple tasks doing this at the same time, against multiple blkg's, then we can either lose references to a blkg, or put it twice. The latter causes complaints on the percpu ref being <= 0 when released, and can cause use-after-free as well. Ming reports that xfstest generic/475 triggers this: ------------[ cut here ]------------ percpu ref (blkg_release) <= 0 (0) after switching to atomic WARNING: CPU: 13 PID: 0 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x2c9/0x4a0 Switch to just using an on-stack bio for this, and get rid of the embedded bio. Fixes: 5cdf2e3fea5e ("blkcg: associate blkg when associating a device") Reported-by: Ming Lei Tested-by: Ming Lei Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe commit 499aeb45b2e225e423ef333ec68bd9b33a42c8be Merge: cd19181bf9ad4 604c01d567cb9 Author: Jens Axboe Date: Wed Dec 19 08:08:41 2018 -0700 Merge branch 'nvme-4.21' of git://git.infradead.org/nvme into for-4.21/block Pull last batch of NVMe updates for 4.21 from Christoph: "This contains a series from Sagi to restore poll support for nvme-rdma, a new tracepoint from yupeng and various fixes." * 'nvme-4.21' of git://git.infradead.org/nvme: nvme-pci: trace SQ status on completions nvme-rdma: implement polling queue map nvme-fabrics: allow user to pass in nr_poll_queues nvme-fabrics: allow nvmf_connect_io_queue to poll nvme-core: optionally poll sync commands block: make request_to_qc_t public nvme-tcp: fix spelling mistake "attepmpt" -> "attempt" nvme-tcp: fix endianess annotations nvmet-tcp: fix endianess annotations nvme-pci: refactor nvme_poll_irqdisable to make sparse happy nvme-pci: only set nr_maps to 2 if poll queues are supported nvmet: use a macro for default error location nvmet: fix comparison of a u16 with -1 commit 57ce8ba0fd3a95bf29ed741df1c52bd591bf43ff Author: Geert Uytterhoeven Date: Mon Dec 3 13:20:47 2018 +0100 openrisc: Fix broken paths to arch/or32 OpenRISC was mainlined as "openrisc", not "or32". vmlinux.lds is generated from vmlinux.lds.S. Signed-off-by: Geert Uytterhoeven Signed-off-by: Stafford Horne commit 4f4b374332ec0ae9c738ff8ec9bed5cd97ff9adc Author: Daniel Vetter Date: Wed Dec 19 13:39:09 2018 +0100 sysfs: Disable lockdep for driver bind/unbind files This is the much more correct fix for my earlier attempt at: https://lkml.org/lkml/2018/12/10/118 Short recap: - There's not actually a locking issue, it's just lockdep being a bit too eager to complain about a possible deadlock. - Contrary to what I claimed the real problem is recursion on kn->count. Greg pointed me at sysfs_break_active_protection(), used by the scsi subsystem to allow a sysfs file to unbind itself. That would be a real deadlock, which isn't what's happening here. Also, breaking the active protection means we'd need to manually handle all the lifetime fun. - With Rafael we discussed the task_work approach, which kinda works, but has two downsides: It's a functional change for a lockdep annotation issue, and it won't work for the bind file (which needs to get the errno from the driver load function back to userspace). - Greg also asked why this never showed up: To hit this you need to unregister a 2nd driver from the unload code of your first driver. I guess only gpus do that. The bug has always been there, but only with a recent patch series did we add more locks so that lockdep built a chain from unbinding the snd-hda driver to the acpi_video_unregister call. Full lockdep splat: [12301.898799] ============================================ [12301.898805] WARNING: possible recursive locking detected [12301.898811] 4.20.0-rc7+ #84 Not tainted [12301.898815] -------------------------------------------- [12301.898821] bash/5297 is trying to acquire lock: [12301.898826] 00000000f61c6093 (kn->count#39){++++}, at: kernfs_remove_by_name_ns+0x3b/0x80 [12301.898841] but task is already holding lock: [12301.898847] 000000005f634021 (kn->count#39){++++}, at: kernfs_fop_write+0xdc/0x190 [12301.898856] other info that might help us debug this: [12301.898862] Possible unsafe locking scenario: [12301.898867] CPU0 [12301.898870] ---- [12301.898874] lock(kn->count#39); [12301.898879] lock(kn->count#39); [12301.898883] *** DEADLOCK *** [12301.898891] May be due to missing lock nesting notation [12301.898899] 5 locks held by bash/5297: [12301.898903] #0: 00000000cd800e54 (sb_writers#4){.+.+}, at: vfs_write+0x17f/0x1b0 [12301.898915] #1: 000000000465e7c2 (&of->mutex){+.+.}, at: kernfs_fop_write+0xd3/0x190 [12301.898925] #2: 000000005f634021 (kn->count#39){++++}, at: kernfs_fop_write+0xdc/0x190 [12301.898936] #3: 00000000414ef7ac (&dev->mutex){....}, at: device_release_driver_internal+0x34/0x240 [12301.898950] #4: 000000003218fbdf (register_count_mutex){+.+.}, at: acpi_video_unregister+0xe/0x40 [12301.898960] stack backtrace: [12301.898968] CPU: 1 PID: 5297 Comm: bash Not tainted 4.20.0-rc7+ #84 [12301.898974] Hardware name: Hewlett-Packard HP EliteBook 8460p/161C, BIOS 68SCF Ver. F.01 03/11/2011 [12301.898982] Call Trace: [12301.898989] dump_stack+0x67/0x9b [12301.898997] __lock_acquire+0x6ad/0x1410 [12301.899003] ? kernfs_remove_by_name_ns+0x3b/0x80 [12301.899010] ? find_held_lock+0x2d/0x90 [12301.899017] ? mutex_spin_on_owner+0xe4/0x150 [12301.899023] ? find_held_lock+0x2d/0x90 [12301.899030] ? lock_acquire+0x90/0x180 [12301.899036] lock_acquire+0x90/0x180 [12301.899042] ? kernfs_remove_by_name_ns+0x3b/0x80 [12301.899049] __kernfs_remove+0x296/0x310 [12301.899055] ? kernfs_remove_by_name_ns+0x3b/0x80 [12301.899060] ? kernfs_name_hash+0xd/0x80 [12301.899066] ? kernfs_find_ns+0x6c/0x100 [12301.899073] kernfs_remove_by_name_ns+0x3b/0x80 [12301.899080] bus_remove_driver+0x92/0xa0 [12301.899085] acpi_video_unregister+0x24/0x40 [12301.899127] i915_driver_unload+0x42/0x130 [i915] [12301.899160] i915_pci_remove+0x19/0x30 [i915] [12301.899169] pci_device_remove+0x36/0xb0 [12301.899176] device_release_driver_internal+0x185/0x240 [12301.899183] unbind_store+0xaf/0x180 [12301.899189] kernfs_fop_write+0x104/0x190 [12301.899195] __vfs_write+0x31/0x180 [12301.899203] ? rcu_read_lock_sched_held+0x6f/0x80 [12301.899209] ? rcu_sync_lockdep_assert+0x29/0x50 [12301.899216] ? __sb_start_write+0x13c/0x1a0 [12301.899221] ? vfs_write+0x17f/0x1b0 [12301.899227] vfs_write+0xb9/0x1b0 [12301.899233] ksys_write+0x50/0xc0 [12301.899239] do_syscall_64+0x4b/0x180 [12301.899247] entry_SYSCALL_64_after_hwframe+0x49/0xbe [12301.899253] RIP: 0033:0x7f452ac7f7a4 [12301.899259] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 80 00 00 00 00 8b 05 aa f0 2c 00 48 63 ff 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 f3 c3 66 90 55 53 48 89 d5 48 89 f3 48 83 [12301.899273] RSP: 002b:00007ffceafa6918 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [12301.899282] RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007f452ac7f7a4 [12301.899288] RDX: 000000000000000d RSI: 00005612a1abf7c0 RDI: 0000000000000001 [12301.899295] RBP: 00005612a1abf7c0 R08: 000000000000000a R09: 00005612a1c46730 [12301.899301] R10: 000000000000000a R11: 0000000000000246 R12: 000000000000000d [12301.899308] R13: 0000000000000001 R14: 00007f452af4a740 R15: 000000000000000d Looking around I've noticed that usb and i2c already handle similar recursion problems, where a sysfs file can unbind the same type of sysfs somewhere else in the hierarchy. Relevant commits are: commit 356c05d58af05d582e634b54b40050c73609617b Author: Alan Stern Date: Mon May 14 13:30:03 2012 -0400 sysfs: get rid of some lockdep false positives commit e9b526fe704812364bca07edd15eadeba163ebfb Author: Alexander Sverdlin Date: Fri May 17 14:56:35 2013 +0200 i2c: suppress lockdep warning on delete_device Implement the same trick for driver bind/unbind. v2: Put the macro into bus.c (Greg). Reviewed-by: Rafael J. Wysocki Cc: Ramalingam C Cc: Arend van Spriel Cc: Andy Shevchenko Cc: Geert Uytterhoeven Cc: Bartosz Golaszewski Cc: Heikki Krogerus Cc: Vivek Gautam Cc: Joe Perches Signed-off-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman commit b30204640192234d18f9168f19f9cd693485b86d Author: Tom Roeder Date: Tue Dec 18 14:49:07 2018 -0800 scripts: add a tool to produce a compile_commands.json file The LLVM/Clang project provides many tools for analyzing C source code. Many of these tools are based on LibTooling (https://clang.llvm.org/docs/LibTooling.html), which depends on a database of compiler flags. The standard container for this database is compile_commands.json, which consists of a list of JSON objects, each with "directory", "file", and "command" fields. Some build systems, like cmake or bazel, produce this compilation information directly. Naturally, Makefiles don't. However, the kernel makefiles already create ..o.cmd files that contain all the information needed to build a compile_commands.json file. So, this commit adds scripts/gen_compile_commands.py, which recursively searches through a directory for ..o.cmd files and extracts appropriate compile commands from them. It writes a compile_commands.json file that LibTooling-based tools can use. By default, gen_compile_commands.py starts its search in its working directory and (over)writes compile_commands.json in the working directory. However, it also supports --output and --directory flags for out-of-tree use. Note that while gen_compile_commands.py enables the use of clang-based tools, it does not require the kernel to be compiled with clang. E.g., the following sequence of commands produces a compile_commands.json file that works correctly with LibTooling. make defconfig make scripts/gen_compile_commands.py Also note that this script is written to work correctly in both Python 2 and Python 3, so it does not specify the Python version in its first line. For an example of the utility of this script: after running gen_compile_commands.json on the latest kernel version, I was able to use Vim + the YouCompleteMe pluging + clangd to automatically jump to definitions and declarations. Obviously, cscope and ctags provide some of this functionality; the advantage of supporting LibTooling is that it opens the door to many other clang-based tools that understand the code directly and do not rely on regular expressions and heuristics. Tested: Built several recent kernel versions and ran the script against them, testing tools like clangd (for editor/LSP support) and clang-check (for static analysis). Also extracted some test .cmd files from a kernel build and wrote a test script to check that the script behaved correctly with all permutations of the --output and --directory flags. Signed-off-by: Tom Roeder Signed-off-by: Masahiro Yamada commit 9cf6533e8060d3896b88ea14b27f620e6504b84b Author: Wandrille RONCE Date: Wed Dec 19 14:52:44 2018 +0100 ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with ALC294 By default, there is no sound on Asus UX391UA on Linux. This patch adds sound support on Asus UX391UA. Tested working by three different users. The problem has also been described at https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1784485 Signed-off-by: Wandrille RONCE Cc: Signed-off-by: Takashi Iwai commit 1629db9c75342325868243d6bca5853017d91cf8 Author: Johan Hedberg Date: Tue Nov 27 11:37:46 2018 +0200 Bluetooth: Fix unnecessary error message for HCI request completion In case a command which completes in Command Status was sent using the hci_cmd_send-family of APIs there would be a misleading error in the hci_get_cmd_complete function, since the code would be trying to fetch the Command Complete parameters when there are none. Avoid the misleading error and silently bail out from the function in case the received event is a command status. Signed-off-by: Johan Hedberg Acked-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 644b2e97405b0b74845e1d3c2b4fe4c34858062b Author: Takashi Sakamoto Date: Wed Dec 19 20:00:42 2018 +0900 ALSA: bebob: fix model-id of unit for Apogee Ensemble This commit fixes hard-coded model-id for an unit of Apogee Ensemble with a correct value. This unit uses DM1500 ASIC produced ArchWave AG (formerly known as BridgeCo AG). I note that this model supports three modes in the number of data channels in tx/rx streams; 8 ch pairs, 10 ch pairs, 18 ch pairs. The mode is switched by Vendor-dependent AV/C command, like: $ cd linux-firewire-utils $ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0600000000 (8ch pairs) $ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0601000000 (10ch pairs) $ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0602000000 (18ch pairs) When switching between different mode, the unit disappears from IEEE 1394 bus, then appears on the bus with different combination of stream formats. In a mode of 18 ch pairs, available sampling rate is up to 96.0 kHz, else up to 192.0 kHz. $ ./hinawa-config-rom-printer /dev/fw1 { 'bus-info': { 'adj': False, 'bmc': True, 'chip_ID': 21474898341, 'cmc': True, 'cyc_clk_acc': 100, 'generation': 2, 'imc': True, 'isc': True, 'link_spd': 2, 'max_ROM': 1, 'max_rec': 512, 'name': '1394', 'node_vendor_ID': 987, 'pmc': False}, 'root-directory': [ ['HARDWARE_VERSION', 19], [ 'NODE_CAPABILITIES', { 'addressing': {'64': True, 'fix': True, 'prv': False}, 'misc': {'int': False, 'ms': False, 'spt': True}, 'state': { 'atn': False, 'ded': False, 'drq': True, 'elo': False, 'init': False, 'lst': True, 'off': False}, 'testing': {'bas': False, 'ext': False}}], ['VENDOR', 987], ['DESCRIPTOR', 'Apogee Electronics'], ['MODEL', 126702], ['DESCRIPTOR', 'Ensemble'], ['VERSION', 5297], [ 'UNIT', [ ['SPECIFIER_ID', 41005], ['VERSION', 65537], ['MODEL', 126702], ['DESCRIPTOR', 'Ensemble']]], [ 'DEPENDENT_INFO', [ ['SPECIFIER_ID', 2037], ['VERSION', 1], [(58, 'IMMEDIATE'), 16777159], [(59, 'IMMEDIATE'), 1048576], [(60, 'IMMEDIATE'), 16777159], [(61, 'IMMEDIATE'), 6291456]]]]} Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 5ae4f61f012a097df93de2285070ec8e34716d29 Author: Gustavo A. R. Silva Date: Tue Dec 18 11:52:16 2018 -0600 ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities ipcm->substream is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: sound/pci/emu10k1/emufx.c:1031 snd_emu10k1_ipcm_poke() warn: potential spectre issue 'emu->fx8010.pcm' [r] (local cap) sound/pci/emu10k1/emufx.c:1075 snd_emu10k1_ipcm_peek() warn: potential spectre issue 'emu->fx8010.pcm' [r] (local cap) Fix this by sanitizing ipcm->substream before using it to index emu->fx8010.pcm Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai commit 0b84304ef5da92add8dc75a1b07879c5374cdb05 Author: Gustavo A. R. Silva Date: Tue Dec 18 11:18:34 2018 -0600 ALSA: rme9652: Fix potential Spectre v1 vulnerability info->channel is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: sound/pci/rme9652/hdsp.c:4100 snd_hdsp_channel_info() warn: potential spectre issue 'hdsp->channel_map' [r] (local cap) Fix this by sanitizing info->channel before using it to index hdsp->channel_map Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. Also, notice that I refactored the code a bit in order to get rid of the following checkpatch warning: ERROR: do not use assignment in if condition FILE: sound/pci/rme9652/hdsp.c:4103: if ((mapped_channel = hdsp->channel_map[info->channel]) < 0) [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai commit 8c32d47b151b675291ca4278bfce0ec3eb46fad8 Author: Yangtao Li Date: Fri Nov 30 21:49:51 2018 -0500 HID: debug: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Jiri Kosina commit a8da3c7873ea57acb8f9cea58c0af477522965aa Author: Alexander Shiyan Date: Wed Dec 19 14:19:20 2018 +0300 serial: max310x: Fix tx_empty() callback Function max310x_tx_empty() accesses the IRQSTS register, which is cleared by IC when reading, so if there is an interrupt status, we will lose it. This patch implement the transmitter check only by the current FIFO level. Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman commit 22bba80500fdf624a7cfbb65fdfa97a038ae224d Author: Jonathan Bakker Date: Wed Dec 19 12:22:28 2018 +0100 Bluetooth: hci_bcm: Handle specific unknown packets after firmware loading The Broadcom controller on aries S5PV210 boards sends out a couple of unknown packets after the firmware is loaded. This will cause logging of errors such as: Bluetooth: hci0: Frame reassembly failed (-84) This is probably also the case with other boards, as there are related Android userspace patches for custom ROMs such as https://review.lineageos.org/#/c/LineageOS/android_system_bt/+/142721/ Since this appears to be intended behaviour, treated them as diagnostic packets. Note that this is another variant of commit 01d5e44ace8a ("Bluetooth: hci_bcm: Handle empty packet after firmware loading") Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Marcel Holtmann commit e3ca60d06cf37ea57d77eb834dca418f9c2dea81 Author: Paweł Chmiel Date: Wed Dec 19 12:22:46 2018 +0100 Bluetooth: btbcm: Add entry for BCM4329B1 UART bluetooth This patch adds the device ID for the BCM 4329 combo module used in the Samsung Aries based phones (Galaxy S and it's variants). ``` [ 11.508980] Bluetooth: hci0: BCM: chip id 41 [ 11.518975] Bluetooth: hci0: BCM: features 0x04 [ 11.550132] Bluetooth: hci0: BCM4329B1 [ 11.557046] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0000 [ 13.737071] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0744 ``` Output from hciconfig ``` hci0: Type: Primary Bus: UART BD Address: 43:29:B1:55:00:00 ACL MTU: 1021:6 SCO MTU: 64:1 UP RUNNING RX bytes:1675 acl:0 sco:0 events:145 errors:0 TX bytes:20426 acl:0 sco:0 commands:146 errors:0 Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'aries' Class: 0x000000 Service Classes: Unspecified Device Class: Miscellaneous, HCI Version: 2.1 (0x4) Revision: 0x2e8 LMP Version: 2.1 (0x4) Subversion: 0x4217 Manufacturer: Broadcom Corporation (15) ``` Signed-off-by: Paweł Chmiel Signed-off-by: Marcel Holtmann commit 966e927bf8cc6a44f8b72582a1d6d3ffc73b12ad Author: Kangjie Lu Date: Tue Dec 18 23:04:13 2018 -0600 drivers/regulator: fix a missing check of return value If palmas_smps_read() fails, we should not use the read data in "reg" which may contain random value. The fix inserts a check for the return value of palmas_smps_read(): If it fails, we return the error code upstream and stop using "reg". Signed-off-by: Kangjie Lu Signed-off-by: Mark Brown commit fa89a4593b927b3f59c3b69379f31d3b22272e4e Author: YueHaibing Date: Wed Dec 19 14:45:09 2018 +0800 xfrm6_tunnel: Fix spi check in __xfrm6_tunnel_alloc_spi gcc warn this: net/ipv6/xfrm6_tunnel.c:143 __xfrm6_tunnel_alloc_spi() warn: always true condition '(spi <= 4294967295) => (0-u32max <= u32max)' 'spi' is u32, which always not greater than XFRM6_TUNNEL_SPI_MAX because of wrap around. So the second forloop will never reach. Signed-off-by: YueHaibing Signed-off-by: Steffen Klassert commit cc4acb1b6a86563ef5b6dc7c35d99f66d7b82557 Author: YueHaibing Date: Wed Dec 19 01:12:20 2018 +0000 xfrm: policy: remove set but not used variable 'priority' Fixes gcc '-Wunused-but-set-variable' warning: net/xfrm/xfrm_policy.c: In function 'xfrm_policy_lookup_bytype': net/xfrm/xfrm_policy.c:2079:6: warning: variable 'priority' set but not used [-Wunused-but-set-variable] It not used since commit 6be3b0db6db8 ("xfrm: policy: add inexact policy search tree infrastructure") Signed-off-by: YueHaibing Acked-by: Florian Westphal Signed-off-by: Steffen Klassert commit 75dfa87035f9a2659dd0c48af6b4d9899e79cdc9 Author: Patrick Havelange Date: Wed Dec 19 11:43:23 2018 +0100 EDAC, fsl_ddr: Add LS1021A to the list of supported hardware The Freescale ddr driver also works on the LS1021A board. Signed-off-by: Patrick Havelange Signed-off-by: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: York Sun Cc: arnout.vandecappelle@essensium.com Cc: linux-edac Cc: matthew.weber@rockwellcollins.com Cc: patrick.havelange@essensium.com Link: https://lkml.kernel.org/r/20181219104323.10324-1-patrick.havelange@essensium.com commit bd2bcaa565a2c07dd0492f6172f3ab6ad27c1acc Merge: 615740fd6b0c4 2e64d317e197e Author: Thomas Gleixner Date: Wed Dec 19 11:34:49 2018 +0100 Merge branch 'clockevents/4.21' of http://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevents/source update from Daniel Lezcano: - Add dt-bindings for RDA8810PL SoC (Manivannan Sadhasivam) commit c410abbbacb9b378365ba17a30df08b4b9eec64f Author: Dou Liyang Date: Tue Dec 4 23:51:21 2018 +0800 genirq/affinity: Add is_managed to struct irq_affinity_desc Devices which use managed interrupts usually have two classes of interrupts: - Interrupts for multiple device queues - Interrupts for general device management Currently both classes are treated the same way, i.e. as managed interrupts. The general interrupts get the default affinity mask assigned while the device queue interrupts are spread out over the possible CPUs. Treating the general interrupts as managed is both a limitation and under certain circumstances a bug. Assume the following situation: default_irq_affinity = 4..7 So if CPUs 4-7 are offlined, then the core code will shut down the device management interrupts because the last CPU in their affinity mask went offline. It's also a limitation because it's desired to allow manual placement of the general device interrupts for various reasons. If they are marked managed then the interrupt affinity setting from both user and kernel space is disabled. That limitation was reported by Kashyap and Sumit. Expand struct irq_affinity_desc with a new bit 'is_managed' which is set for truly managed interrupts (queue interrupts) and cleared for the general device interrupts. [ tglx: Simplify code and massage changelog ] Reported-by: Kashyap Desai Reported-by: Sumit Saxena Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: linux-pci@vger.kernel.org Cc: shivasharan.srikanteshwara@broadcom.com Cc: ming.lei@redhat.com Cc: hch@lst.de Cc: bhelgaas@google.com Cc: douliyang1@huawei.com Link: https://lkml.kernel.org/r/20181204155122.6327-3-douliyangs@gmail.com commit bec04037e4e484f41ee4d9409e40616874169d20 Author: Dou Liyang Date: Tue Dec 4 23:51:20 2018 +0800 genirq/core: Introduce struct irq_affinity_desc The interrupt affinity management uses straight cpumask pointers to convey the automatically assigned affinity masks for managed interrupts. The core interrupt descriptor allocation also decides based on the pointer being non NULL whether an interrupt is managed or not. Devices which use managed interrupts usually have two classes of interrupts: - Interrupts for multiple device queues - Interrupts for general device management Currently both classes are treated the same way, i.e. as managed interrupts. The general interrupts get the default affinity mask assigned while the device queue interrupts are spread out over the possible CPUs. Treating the general interrupts as managed is both a limitation and under certain circumstances a bug. Assume the following situation: default_irq_affinity = 4..7 So if CPUs 4-7 are offlined, then the core code will shut down the device management interrupts because the last CPU in their affinity mask went offline. It's also a limitation because it's desired to allow manual placement of the general device interrupts for various reasons. If they are marked managed then the interrupt affinity setting from both user and kernel space is disabled. To remedy that situation it's required to convey more information than the cpumasks through various interfaces related to interrupt descriptor allocation. Instead of adding yet another argument, create a new data structure 'irq_affinity_desc' which for now just contains the cpumask. This struct can be expanded to convey auxilliary information in the next step. No functional change, just preparatory work. [ tglx: Simplified logic and clarified changelog ] Suggested-by: Thomas Gleixner Suggested-by: Bjorn Helgaas Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: linux-pci@vger.kernel.org Cc: kashyap.desai@broadcom.com Cc: shivasharan.srikanteshwara@broadcom.com Cc: sumit.saxena@broadcom.com Cc: ming.lei@redhat.com Cc: hch@lst.de Cc: douliyang1@huawei.com Link: https://lkml.kernel.org/r/20181204155122.6327-2-douliyangs@gmail.com commit c2899c3470de04823870b28646981695c0046efe Author: Thomas Gleixner Date: Tue Dec 18 16:06:53 2018 +0100 genirq/affinity: Remove excess indentation Plus other coding style issues which stood out while staring at that code. Signed-off-by: Thomas Gleixner commit 7e6d5cd88a6f4961ed2968799ef98528c13ac5f8 Author: Kunihiko Hayashi Date: Fri Dec 7 09:53:12 2018 +0900 PCI: uniphier: Add UniPhier PCIe host controller support This introduces specific glue layer for UniPhier platform to support PCIe host controller that is based on the DesignWare PCIe core, and this driver supports Root Complex (host) mode. Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi commit db67cdb04234899d0c1a734beef4bfea4c38efef Author: Kunihiko Hayashi Date: Fri Dec 7 09:53:11 2018 +0900 dt-bindings: PCI: Add UniPhier PCIe host controller description Add DT bindings for PCIe controller implemented in UniPhier SoCs when configured in Root Complex (host) mode. This controller is based on the DesignWare PCIe core. Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 9c0ef6d34fdbfb4f948b96d7611f0fd47649044e Author: Yue Wang Date: Tue Dec 18 16:04:46 2018 +0800 PCI: amlogic: Add the Amlogic Meson PCIe controller driver The Amlogic Meson PCIe host controller is based on the Synopsys DesignWare PCI core. This patch adds the driver support for Meson PCIe controller. Link: https://lore.kernel.org/linux-pci/20181218224708.GB22610@google.com/ Signed-off-by: Yue Wang Signed-off-by: Hanjie Lin [lorenzo.pieralisi@arm.com: updated coding/comment style] Signed-off-by: Lorenzo Pieralisi commit 7cd2103911018ecc6f3d2e6239ab5e00fb684d76 Author: Yue Wang Date: Tue Dec 18 16:04:45 2018 +0800 dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller The Amlogic Meson PCIe host controller is based on the Synopsys DesignWare PCI core. This patch adds documentation for the DT bindings in Meson PCIe controller. Signed-off-by: Yue Wang Signed-off-by: Hanjie Lin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit a88c4736ea36396f4a7b1460202a8caa434238db Author: Fabrizio Castro Date: Wed Dec 19 10:06:25 2018 +0000 dt-bindings: serial: sh-sci: Document r8a774c0 bindings RZ/G2E (R8A774C0) SoC also has the R-Car Gen3 compatible SCIF and HSCIF ports, so document the SoC specific bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 6c4d975812677fdacfe657b8a1fae11de2fb4a37 Author: Fabrizio Castro Date: Wed Dec 19 10:06:24 2018 +0000 dt-bindings: serial: sh-sci: Document r8a774a1 bindings RZ/G2M (R8A774A1) SoC also has the R-Car Gen3 compatible SCIF and HSCIF ports, so document the SoC specific bindings. While at it, update the RZ/G1 and RZ/G2 family specific strings description as outdated. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 2e64d317e197ec390e3914773489fcade7bbbf15 Author: Manivannan Sadhasivam Date: Mon Dec 10 23:05:44 2018 +0530 dt-bindings: timer: Document RDA8810PL SoC timer Document RDA Micro RDA8810PL SoC timer. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano commit ac8b6f148fc97e9e10b48bd337ef571b1d1136aa Author: Amanoel Dawod Date: Wed Dec 5 18:56:37 2018 -0500 Fonts: New Terminus large console font This patch adds an option to compile-in a high resolution and large Terminus (ter16x32) bitmap console font for use with HiDPI and Retina screens. The font was convereted from standard Terminus ter-i32b.psf (size 16x32) with the help of psftools and minor hand editing deleting useless characters. This patch is non-intrusive, no options are enabled by default so most users won't notice a thing. I am placing my changes under the GPL 2.0 just as source Terminus font. Signed-off-by: Amanoel Dawod Signed-off-by: Greg Kroah-Hartman commit 1de24f362f32b1d290385558b4f94990e36f670e Author: Daniel Bovensiepen Date: Thu Dec 6 15:52:43 2018 +0000 staging: android: ashmem: doc: Fix spelling Fixed spelling in comment section. Signed-off-by: Daniel Bovensiepen Acked-by: Joel Fernandes (Google) Signed-off-by: Greg Kroah-Hartman commit fdfaef212694a139ebd5119f9a07f2e8e24be8a6 Author: Sudip Mukherjee Date: Fri Dec 7 14:27:34 2018 +0000 char: lp: use new parport device model Modify lp driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit e379c1a46068969a2b822a15dbc9a37577e1e04f Author: Sudip Mukherjee Date: Fri Dec 7 14:27:33 2018 +0000 char: lp: properly count the lp devices When the parallel port is usb based and the lp attaches to it based on LP_PARPORT_AUTO, we do get /dev/lp0 and when we remove the usb device /dev/lp0 is unregistered. If we now reconnect the usb device we get our /dev/lp0 back. But if we now disconnect and reconnect eight times we donot get any lp device and dmesg shows: lp: ignoring parallel port (max. 8) Decrement the lp_count when the device detaches as this represents the number of lp devices connected to the system. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit dc34da42860d8ce01f64ac11752eecccf53c1a6c Author: Sudip Mukherjee Date: Fri Dec 7 14:27:32 2018 +0000 char: lp: use first unused lp number while registering When the parallel port is usb based and the lp attaches to it based on LP_PARPORT_AUTO, we do get /dev/lp0 and when we remove the usb device /dev/lp0 is unregistered. But if we now reconnect the usb device we get /dev/lp1, another disconnection and reconnection and we get /dev/lp2. Use the port number array to find the first unused lp number and use that to register the lp device with the parallel port. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit d6318c0e8318c200aa95b50769d3635907381c08 Author: Sudip Mukherjee Date: Fri Dec 7 14:27:31 2018 +0000 char: lp: detach the device when parallel port is removed When the parallel port is usb based and the lp attaches to it, we do get /dev/lp0, but when we remove the usb device and the parallel port is gone, we are still left with /dev/lp0. Unregister the device properly in the detach routine based on the port number it has connected to. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit 0edf39d2c7dbb4947358dd102b6ff35eaaa92d68 Author: Sudip Mukherjee Date: Fri Dec 7 14:27:30 2018 +0000 char: lp: introduce list to save port number When we are registering lp in LP_PARPORT_AUTO mode, we are not keeping any record of the parallel port number to which lp is connecting. Add an array to save the port number to it. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit 2e79c1874968b8fdbf578a2a364ec9b6263c77ca Author: YueHaibing Date: Mon Dec 10 15:25:13 2018 +0800 bus: qcom: remove duplicated include from qcom-ebi2.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit d32dcc6c6970667e438e2b1fec92816d98dcb29f Author: Yangtao Li Date: Sat Dec 15 03:45:26 2018 -0500 PM / Domains: remove define_genpd_open_function() and define_genpd_debugfs_fops() We already have the DEFINE_SHOW_ATTRIBUTE, There is no need to define such a macro, so remove define_genpd_open_function and define_genpd_debugfs_fops. Convert them to DEFINE_SHOW_ATTRIBUTE. Signed-off-by: Yangtao Li Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 8234f6734c5d74ac794e5517437f51c57d65f865 Author: Vincent Guittot Date: Fri Dec 14 15:22:25 2018 +0100 PM-runtime: Switch autosuspend over to using hrtimers PM-runtime uses the timer infrastructure for autosuspend. This implies that the minimum time before autosuspending a device is in the range of 1 tick included to 2 ticks excluded -On arm64 this means between 4ms and 8ms with default jiffies configuration -And on arm, it is between 10ms and 20ms These values are quite high for embedded systems which sometimes want the duration to be in the range of 1 ms. It is possible to switch autosuspend over to using hrtimers to get finer granularity for short durations and take advantage of slack to retain some margins and get long timeouts with minimum wakeups. On an arm64 platform that uses 1ms for autosuspending timeout of its GPU, idle power is reduced by 10% with hrtimer. The latency impact on arm64 hikey octo cores is: - mark_last_busy: from 1.11 us to 1.25 us - rpm_suspend: from 15.54 us to 15.38 us [Only the code path of rpm_suspend() that starts hrtimer has been measured.] arm64 image (arm64 default defconfig) decreases by around 3KB with following details: $ size vmlinux-timer text data bss dec hex filename 12034646 6869268 386840 19290754 1265a82 vmlinux $ size vmlinux-hrtimer text data bss dec hex filename 12030550 6870164 387032 19287746 1264ec2 vmlinux The latency impact on arm 32bits snowball dual cores is : - mark_last_busy: from 0.31 us usec to 0.77 us - rpm_suspend: from 6.83 us to 6.67 usec The increase of the image for snowball platform that I used for testing performance impact, is neglictable (244B). $ size vmlinux-timer text data bss dec hex filename 7157961 2119580 264120 9541661 91981d build-ux500/vmlinux size vmlinux-hrtimer text data bss dec hex filename 7157773 2119884 264248 9541905 919911 vmlinux-hrtimer And arm 32bits image (multi_v7_defconfig) increases by around 1.7KB with following details: $ size vmlinux-timer text data bss dec hex filename 13304443 6803420 402768 20510631 138f7a7 vmlinux $ size vmlinux-hrtimer text data bss dec hex filename 13304299 6805276 402768 20512343 138fe57 vmlinux Signed-off-by: Vincent Guittot Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 8995fa1e1c9bcb76d407b860770e640b60ed8c76 Author: Wen Yang Date: Mon Dec 10 19:36:07 2018 +0800 VMCI: 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: Wen Yang CC: Arnd Bergmann CC: Greg Kroah-Hartman CC: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman commit f88fd666051b08eb3f3118e2dd8508bf0247af4c Author: Rob Herring Date: Wed Dec 5 13:50:19 2018 -0600 char/rtc: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. The open coded iterating thru the child node names is converted to use for_each_child_of_node() instead. Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 15b3048aeed8bf8232156456c884ae94ed52d6cd Author: Wenwen Wang Date: Tue Dec 4 09:16:41 2018 -0600 misc: mic: fix a DMA pool free failure In _scif_prog_signal(), a DMA pool is allocated if the MIC Coprocessor is not X100, i.e., the boolean variable 'x100' is false. This DMA pool will be freed eventually through the callback function scif_prog_signal_cb() with the parameter of 'status', which actually points to the start of DMA pool. Specifically, in scif_prog_signal_cb(), the 'ep' field and the 'src_dma_addr' field of 'status' are used to free the DMA pool by invoking dma_pool_free(). Given that 'status' points to the start address of the DMA pool, both 'status->ep' and 'status->src_dma_addr' are in the DMA pool. And so, the device has the permission to access them. Even worse, a malicious device can modify them. As a result, dma_pool_free() will not succeed. To avoid the above issue, this patch introduces a new data structure, i.e., scif_cb_arg, to store the arguments required by the call back function. A variable 'cb_arg' is allocated in _scif_prog_signal() to pass the arguments. 'cb_arg' will be freed after dma_pool_free() in scif_prog_signal_cb(). Signed-off-by: Wenwen Wang Signed-off-by: Greg Kroah-Hartman commit afdd273e269ca8dee3c70c150d96b4de4f83d39e Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:48 2018 +0800 ARM: dts: sunxi: Enable Broadcom-based Bluetooth for multiple boards This patch adds the Bluetooth node, and the underlying UART node if it's missing, to the board device tree file for several boards. The LPO clock is also added to the WiFi side's power sequencing node if it's missing, to correctly represent the shared connections. There is also a PCM connection for Bluetooth, but this is not covered in this patch. These boards all have a WiFi+BT module from AMPAK, which contains one or two Broadcom chips, depending on the model. The older AP6210 contains two, while the newer AP6212 and AP6330 contain just one, as they use two-in-one combo chips. The Bluetooth side of the module is always connected to a UART on the same pingroup as the SDIO pins for the WiFi side, in a 4 wire configuration. Power to the VBAT and VDDIO pins are provided either by the PMIC, using one or several of its regulator outputs, or other fixed regulators on the board. The VBAT and VDDIO pins are shared with the WiFi side, which would correspond to vmmc-supply and vqmmc-supply in the mmc host node. A clock output from the SoC or the external X-Powers RTC provides the LPO low power clock at 32.768 kHz. All the boards covered in this patch are ones that do not require extra changes to the SoC's dtsi file. For the remaining boards that I have worked on, properties or device nodes for the LPO clock's source are missing. For the Cubietruck, the LPO clock is fed from CLK_OUT_A, which needs to be muxed on pin PI12. This can be represented in multiple ways. This patch puts the pinctrl property in the pin controller node. This is due to limitations in Linux, where pinmux settings, even the same one, can not be shared by multiple devices. Thus we cannot put it in both the WiFi and Bluetooth device nodes. Putting it the CCU node is another option, but Linux's CCU driver does not handle pinctrl. Also the pin controller is guaranteed to be initialized after the CCU, when clocks are available. And any other devices that use muxed pins are guaranteed to be initialized after the pin controller. Thus having the CLK_OUT_A pinmux reference be in the pin controller node is a good choice without having to deal with implementation issues. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit c266a2b4407af7a6fc39f449782aa5c0be48be5a Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:49 2018 +0800 arm64: dts: allwinner: a64: bananapi-m64: Add Bluetooth device node The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side identifies as BCM43430, while the Bluetooth side identifies as BCM43438. The Bluetooth side is connected to UART1 in a 4 wire configuration. Same as the WiFi side, due to being the same chip and package, DLDO2 provides overall power via VBAT, and DLDO4 provides I/O power via VDDIO. The RTC clock output provides the LPO low power clock at 32.768 kHz. This patch enables Bluetooth on this board, and also adds the missing LPO clock on the WiFi side. There is also a PCM connection for Bluetooth, but this is not covered here. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit b9d93594c7679c108ea41dec731df6f986786a19 Author: Dan Carpenter Date: Fri Dec 7 09:00:46 2018 +0300 ptp: fix an IS_ERR() vs NULL check We recently modified pps_register_source() to return error pointers instead of NULL but it seems like there was a merge issue and part of the commit was lost. Anyway, the ptp_clock_register() function needs to be updated to check for IS_ERR() as well. Fixes: 3b1ad360acad ("pps: using ERR_PTR instead of NULL while pps_register_source fails") Signed-off-by: Dan Carpenter Acked-by: Richard Cochran Signed-off-by: Greg Kroah-Hartman commit b7b69fb840f50d7037b3ab0fd95a3a89086c8fad Author: Maxime Ripard Date: Fri Dec 14 10:55:38 2018 +0100 ARM: dts: suniv: Fix improper bindings include patch The clock and reset bindings are going through different trees, and while the patch doesn't contain any value defined in that header, it still includes those files and result in a build breakage when building the DT without the matching clock and reset patches applied. Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 5215b2e952f3f94d74cac1a59494eb8ac647e216 Author: jjian zhou Date: Tue Dec 18 20:33:18 2018 +0800 mmc: mediatek: Add MMC_CAP_SDIO_IRQ support This patch enables support SDIO IRQs. It enables MMC_CAP_SDIO_IRQ & MMC_CAP2_SDIO_IRQ_NOTHREAD and implement the ->ack_sdio_irq callback. Signed-off-by: Jjian Zhou Signed-off-by: Chaotian Jing Signed-off-by: Yong Mao Signed-off-by: Ulf Hansson commit fdd669684655c07dacbdb0d753fd13833de69a33 Author: Christian Borntraeger Date: Wed Dec 12 14:45:18 2018 +0100 genwqe: Fix size check Calling the test program genwqe_cksum with the default buffer size of 2MB triggers the following kernel warning on s390: WARNING: CPU: 30 PID: 9311 at mm/page_alloc.c:3189 __alloc_pages_nodemask+0x45c/0xbe0 CPU: 30 PID: 9311 Comm: genwqe_cksum Kdump: loaded Not tainted 3.10.0-957.el7.s390x #1 task: 00000005e5d13980 ti: 00000005e7c6c000 task.ti: 00000005e7c6c000 Krnl PSW : 0704c00180000000 00000000002780ac (__alloc_pages_nodemask+0x45c/0xbe0) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3 Krnl GPRS: 00000000002932b8 0000000000b73d7c 0000000000000010 0000000000000009 0000000000000041 00000005e7c6f9b8 0000000000000001 00000000000080d0 0000000000000000 0000000000b70500 0000000000000001 0000000000000000 0000000000b70528 00000000007682c0 0000000000277df2 00000005e7c6f9a0 Krnl Code: 000000000027809e: de7195001000 ed 1280(114,%r9),0(%r1) 00000000002780a4: a774fead brc 7,277dfe #00000000002780a8: a7f40001 brc 15,2780aa >00000000002780ac: 92011000 mvi 0(%r1),1 00000000002780b0: a7f4fea7 brc 15,277dfe 00000000002780b4: 9101c6b6 tm 1718(%r12),1 00000000002780b8: a784ff3a brc 8,277f2c 00000000002780bc: a7f4fe2e brc 15,277d18 Call Trace: ([<0000000000277df2>] __alloc_pages_nodemask+0x1a2/0xbe0) [<000000000013afae>] s390_dma_alloc+0xfe/0x310 [<000003ff8065f362>] __genwqe_alloc_consistent+0xfa/0x148 [genwqe_card] [<000003ff80658f7a>] genwqe_mmap+0xca/0x248 [genwqe_card] [<00000000002b2712>] mmap_region+0x4e2/0x778 [<00000000002b2c54>] do_mmap+0x2ac/0x3e0 [<0000000000292d7e>] vm_mmap_pgoff+0xd6/0x118 [<00000000002b081c>] SyS_mmap_pgoff+0xdc/0x268 [<00000000002b0a34>] SyS_old_mmap+0x8c/0xb0 [<000000000074e518>] sysc_tracego+0x14/0x1e [<000003ffacf87dc6>] 0x3ffacf87dc6 turns out the check in __genwqe_alloc_consistent uses "> MAX_ORDER" while the mm code uses ">= MAX_ORDER". Fix genwqe. Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger Signed-off-by: Frank Haverkamp Signed-off-by: Greg Kroah-Hartman commit e121a833745b4708b660e3fe6776129c2956b041 Author: Rafael J. Wysocki Date: Thu Dec 13 19:27:47 2018 +0100 driver core: Add missing dev->bus->need_parent_lock checks __device_release_driver() has to check dev->bus->need_parent_lock before dropping the parent lock and acquiring it again as it may attempt to drop a lock that hasn't been acquired or lock a device that shouldn't be locked and create a lock imbalance. Fixes: 8c97a46af04b (driver core: hold dev's parent lock when needed) Signed-off-by: Rafael J. Wysocki Cc: stable Reviewed-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman commit d359bbce0601c6a19203a4b813a7e3910fcba282 Author: Ilan Peer Date: Sat Dec 15 11:03:25 2018 +0200 mac80211: Properly access radiotap vendor data The radiotap vendor data might be placed after some other radiotap elements, and thus when accessing it, need to access the correct offset in the skb data. Fix the code accordingly. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 93bc8ac49e82a329160604556b805b7fa614ff9e Author: Johannes Berg Date: Sat Dec 15 11:03:16 2018 +0200 cfg80211: fix ieee80211_get_vht_max_nss() Fix two bugs in ieee80211_get_vht_max_nss(): * the spec says we should round down (reported by Nissim) * there's a double condition, the first one is wrong, supp_width == 0 / ext_nss_bw == 2 is valid in 80+80 (found by smatch) Fixes: b0aa75f0b1b2 ("ieee80211: add new VHT capability fields/parsing") Reported-by: Nissim Bendanan Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 3ad20fe393b31025bebfc2d76964561f65df48aa Author: Christian Brauner Date: Fri Dec 14 13:11:14 2018 +0100 binder: implement binderfs As discussed at Linux Plumbers Conference 2018 in Vancouver [1] this is the implementation of binderfs. /* Abstract */ binderfs is a backwards-compatible filesystem for Android's binder ipc mechanism. Each ipc namespace will mount a new binderfs instance. Mounting binderfs multiple times at different locations in the same ipc namespace will not cause a new super block to be allocated and hence it will be the same filesystem instance. Each new binderfs mount will have its own set of binder devices only visible in the ipc namespace it has been mounted in. All devices in a new binderfs mount will follow the scheme binder%d and numbering will always start at 0. /* Backwards compatibility */ Devices requested in the Kconfig via CONFIG_ANDROID_BINDER_DEVICES for the initial ipc namespace will work as before. They will be registered via misc_register() and appear in the devtmpfs mount. Specifically, the standard devices binder, hwbinder, and vndbinder will all appear in their standard locations in /dev. Mounting or unmounting the binderfs mount in the initial ipc namespace will have no effect on these devices, i.e. they will neither show up in the binderfs mount nor will they disappear when the binderfs mount is gone. /* binder-control */ Each new binderfs instance comes with a binder-control device. No other devices will be present at first. The binder-control device can be used to dynamically allocate binder devices. All requests operate on the binderfs mount the binder-control device resides in. Assuming a new instance of binderfs has been mounted at /dev/binderfs via mount -t binderfs binderfs /dev/binderfs. Then a request to create a new binder device can be made as illustrated in [2]. Binderfs devices can simply be removed via unlink(). /* Implementation details */ - dynamic major number allocation: When binderfs is registered as a new filesystem it will dynamically allocate a new major number. The allocated major number will be returned in struct binderfs_device when a new binder device is allocated. - global minor number tracking: Minor are tracked in a global idr struct that is capped at BINDERFS_MAX_MINOR. The minor number tracker is protected by a global mutex. This is the only point of contention between binderfs mounts. - struct binderfs_info: Each binderfs super block has its own struct binderfs_info that tracks specific details about a binderfs instance: - ipc namespace - dentry of the binder-control device - root uid and root gid of the user namespace the binderfs instance was mounted in - mountable by user namespace root: binderfs can be mounted by user namespace root in a non-initial user namespace. The devices will be owned by user namespace root. - binderfs binder devices without misc infrastructure: New binder devices associated with a binderfs mount do not use the full misc_register() infrastructure. The misc_register() infrastructure can only create new devices in the host's devtmpfs mount. binderfs does however only make devices appear under its own mountpoint and thus allocates new character device nodes from the inode of the root dentry of the super block. This will have the side-effect that binderfs specific device nodes do not appear in sysfs. This behavior is similar to devpts allocated pts devices and has no effect on the functionality of the ipc mechanism itself. [1]: https://goo.gl/JL2tfX [2]: program to allocate a new binderfs binder device: #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { int fd, ret, saved_errno; size_t len; struct binderfs_device device = { 0 }; if (argc < 2) exit(EXIT_FAILURE); len = strlen(argv[1]); if (len > BINDERFS_MAX_NAME) exit(EXIT_FAILURE); memcpy(device.name, argv[1], len); fd = open("/dev/binderfs/binder-control", O_RDONLY | O_CLOEXEC); if (fd < 0) { printf("%s - Failed to open binder-control device\n", strerror(errno)); exit(EXIT_FAILURE); } ret = ioctl(fd, BINDER_CTL_ADD, &device); saved_errno = errno; close(fd); errno = saved_errno; if (ret < 0) { printf("%s - Failed to allocate new binder device\n", strerror(errno)); exit(EXIT_FAILURE); } printf("Allocated new binder device with major %d, minor %d, and " "name %s\n", device.major, device.minor, device.name); exit(EXIT_SUCCESS); } Cc: Martijn Coenen Cc: Greg Kroah-Hartman Signed-off-by: Christian Brauner Acked-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 80cd795630d6526ba729a089a435bf74a57af927 Author: Todd Kjos Date: Fri Dec 14 15:58:21 2018 -0800 binder: fix use-after-free due to ksys_close() during fdget() 44d8047f1d8 ("binder: use standard functions to allocate fds") exposed a pre-existing issue in the binder driver. fdget() is used in ksys_ioctl() as a performance optimization. One of the rules associated with fdget() is that ksys_close() must not be called between the fdget() and the fdput(). There is a case where this requirement is not met in the binder driver which results in the reference count dropping to 0 when the device is still in use. This can result in use-after-free or other issues. If userpace has passed a file-descriptor for the binder driver using a BINDER_TYPE_FDA object, then kys_close() is called on it when handling a binder_ioctl(BC_FREE_BUFFER) command. This violates the assumptions for using fdget(). The problem is fixed by deferring the close using task_work_add(). A new variant of __close_fd() was created that returns a struct file with a reference. The fput() is deferred instead of using ksys_close(). Fixes: 44d8047f1d87a ("binder: use standard functions to allocate fds") Suggested-by: Al Viro Signed-off-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman commit efc38dd7d5fa5c8cdd0c917c5d00947aa0539443 Author: Johannes Berg Date: Sat Dec 15 11:03:12 2018 +0200 mac80211: fix radiotap vendor presence bitmap handling Due to the alignment handling, it actually matters where in the code we add the 4 bytes for the presence bitmap to the length; the first field is the timestamp with 8 byte alignment so we need to add the space for the extra vendor namespace presence bitmap *before* we do any alignment for the fields. Move the presence bitmap length accounting to the right place to fix the alignment for the data properly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 385e89d5b20f5a7c33fd7c1904da0e6a8e1b366f Author: Christophe Leroy Date: Wed Nov 28 17:21:10 2018 +0000 powerpc/mm: add exec protection on powerpc 603 The 603 doesn't have a HASH table, TLB misses are handled by software. It is then possible to generate page fault when _PAGE_EXEC is not set like in nohash/32. There is one "reserved" PTE bit available, this patch uses it for _PAGE_EXEC. In order to support it, set_pte_filter() and set_access_flags_filter() are made common, and the handling is made dependent on MMU_FTR_HPTE_TABLE Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman commit badb9687cec50bdba59746532de1969d6d26f3a7 Author: Christophe Leroy Date: Mon Dec 10 12:23:05 2018 +0000 powerpc/mm: define an empty slice_init_new_context_exec() Define slice_init_new_context_exec() at all time to avoid Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 Author: Christophe Leroy Date: Mon Dec 10 06:50:09 2018 +0000 powerpc/uaccess: fix warning/error with access_ok() With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; if (!access_ok(verify, ioarg, _IOC_SIZE(ioc))) { drivers/platform/test/dev.c: In function 'my_ioctl': drivers/platform/test/dev.c:219:7: warning: unused variable 'verify' [-Wunused-variable] int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; This patch fixes it by referencing 'type' in the macro allthough doing nothing with it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit c62ce9ef97ba8af4120c766c32e230215dd4df04 Author: Christophe Leroy Date: Tue Dec 4 17:59:15 2018 +0000 powerpc: remove remaining bits from CONFIG_APUS commit f21f49ea639a ("[POWERPC] Remove the dregs of APUS support from arch/powerpc") removed CONFIG_APUS, but forgot to remove the logic which adapts tophys() and tovirt() for it. This patch removes the last stale pieces. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 32c8c4c621897199e690760c2d57054f8b84b6e6 Author: Christophe Leroy Date: Fri Nov 16 17:31:08 2018 +0000 powerpc/xmon: fix dump_segments() mfsrin() takes segment num from bits 31-28 (IBM bits 0-3). Signed-off-by: Christophe Leroy [mpe: Clarify bit numbering] Signed-off-by: Michael Ellerman commit 0ed5b55884f8b1fa368454d47cc6ecf9790b8b99 Author: Christophe Leroy Date: Tue Nov 27 17:38:16 2018 +0000 powerpc/8xx: add exception frame marker This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [ 0.013964] Call Trace: [ 0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [ 0.014086] [c0745dc0] [c007aa20] tick_handle_periodic+0x20/0x9c [ 0.014181] [c0745de0] [c0009cd0] timer_interrupt+0xa0/0x264 [ 0.014258] [c0745e10] [c000e484] ret_from_except+0x0/0x14 [ 0.014390] --- interrupt: 901 at console_unlock.part.7+0x3f4/0x528 [ 0.014390] LR = console_unlock.part.7+0x3f0/0x528 [ 0.014455] [c0745ee0] [c0050334] console_unlock.part.7+0x114/0x528 (unreliable) [ 0.014542] [c0745f30] [c00524e0] register_console+0x3d8/0x44c [ 0.014625] [c0745f60] [c0675aac] cpm_uart_console_init+0x18/0x2c [ 0.014709] [c0745f70] [c06614f4] console_init+0x114/0x1cc [ 0.014795] [c0745fb0] [c0658b68] start_kernel+0x300/0x3d8 [ 0.014864] [c0745ff0] [c00022cc] start_here+0x44/0x98 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit e93ba1b7eb5b188c749052df7af1c90821c5f320 Author: Christophe Leroy Date: Fri Nov 16 17:27:42 2018 +0000 powerpc/book3s/32: fix number of bats in p/v_block_mapped() This patch fixes the loop in p_block_mapped() and v_block_mapped() to scan the entire bat_addrs[] array. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 712877f8740471d96f703647d813d8a74fccc816 Author: Christophe Leroy Date: Fri Nov 16 17:08:03 2018 +0000 powerpc/mm: Eliminate not possible mmu features at compile time Depending on the CONFIG selected, many of the MMU features are not possible. Lets only get the possible ones in MMU_FTRS_POSSIBLE. This allows gcc to get rid at compile time of code related to not possible features. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 8a01960fb5bd95b920657133de52259227ee6ad7 Author: Christophe Leroy Date: Fri Nov 9 17:33:32 2018 +0000 powerpc/smp: Use code patching to restore reset vector Instead of hardcoding reset vector restore, use patch_instruction() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 6c16816b91a64a33033930fbe2ae3f02e012d8bd Author: Christophe Leroy Date: Fri Nov 9 17:33:30 2018 +0000 powerpc/44x: use patch_sites for TLB handlers patching Use patch sites and associated helpers to manage TLB handlers patching instead of hardcoding. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d16952a629129ce3f20ff7299de87c4d63b27a30 Author: Christophe Leroy Date: Fri Nov 9 17:33:28 2018 +0000 powerpc/signal: Use code patching instead of hardcoding Instead of hardcoding code modifications, use code patching functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 002cdfc2c78642deef24a77fab400a7f88781266 Author: Christophe Leroy Date: Fri Nov 9 17:33:26 2018 +0000 powerpc/8xx: use modify_instruction_site() Instead of hardcoding the TLB handlers patching, use the newly created modify_instruction_site() helper. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 9efc74ff52952c854f4a1a3c1bc8cd82df6b9c9e Author: Christophe Leroy Date: Fri Nov 9 17:33:24 2018 +0000 powerpc/book3s/32: Use patch_site to patch hash functions Use patch_sites and the new modify_instruction_site() function instead of hardcoding hash functions patching. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 4a3a224c5ae31fc9dc86bc9d8011f6bdc0e0c48d Author: Christophe Leroy Date: Fri Nov 9 17:33:22 2018 +0000 powerpc/book3s/32: Use MMU_FTR_HPTE_TABLE in head_32.S Instead of manually patching a blr at hash_page() entry in MMU_init_hw(), this patch adds a features section in head_32.S Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 04b0a72f2807ba40b155fc1689e38569779527ca Author: Christophe Leroy Date: Fri Nov 9 17:33:20 2018 +0000 powerpc/32: use patch_site_addr() in machine_init() Use patch_site_addr() instead of hardcoding the address calculation in machine_init() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 36b08b431e2e282f78d09921ca55652d2c55eee5 Author: Christophe Leroy Date: Fri Nov 9 17:33:17 2018 +0000 powerpc: add modify_instruction() and modify_instruction_site() Add two helpers to avoid hardcoding of instructions modifications. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 45090c26614fe991d9d5a2cd08e65c4d6680549a Author: Christophe Leroy Date: Fri Nov 9 17:33:15 2018 +0000 powerpc: simplify patch_instruction_site() and patch_branch_site() Using patch_site_addr() helper, patch_instruction_site() and patch_branch_site() can be simplified and inlined. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 584dbc7727a22459dfcb6e4c9faef6467d08ab5e Author: Christophe Leroy Date: Thu Oct 18 05:22:06 2018 +0000 powerpc/mm: remove unused variable In file included from ./include/linux/hugetlb.h:445:0, from arch/powerpc/kernel/setup-common.c:37: ./arch/powerpc/include/asm/hugetlb.h: In function ‘huge_ptep_clear_flush’: ./arch/powerpc/include/asm/hugetlb.h:154:8: error: variable ‘pte’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 6bf752daca07c85c181159f75dcf65b12056883b Author: Christophe Leroy Date: Wed Dec 19 07:09:39 2018 +0000 powerpc: implement CONFIG_DEBUG_VIRTUAL This patch implements CONFIG_DEBUG_VIRTUAL to warn about incorrect use of virt_to_phys() and page_to_phys() Below is the result of test_debug_virtual: [ 1.438746] WARNING: CPU: 0 PID: 1 at ./arch/powerpc/include/asm/io.h:808 test_debug_virtual_init+0x3c/0xd4 [ 1.448156] CPU: 0 PID: 1 Comm: swapper Not tainted 4.20.0-rc5-00560-g6bfb52e23a00-dirty #532 [ 1.457259] NIP: c066c550 LR: c0650ccc CTR: c066c514 [ 1.462257] REGS: c900bdb0 TRAP: 0700 Not tainted (4.20.0-rc5-00560-g6bfb52e23a00-dirty) [ 1.471184] MSR: 00029032 CR: 48000422 XER: 20000000 [ 1.477811] [ 1.477811] GPR00: c0650ccc c900be60 c60d0000 00000000 006000c0 c9000000 00009032 c7fa0020 [ 1.477811] GPR08: 00002400 00000001 09000000 00000000 c07b5d04 00000000 c00037d8 00000000 [ 1.477811] GPR16: 00000000 00000000 00000000 00000000 c0760000 c0740000 00000092 c0685bb0 [ 1.477811] GPR24: c065042c c068a734 c0685b8c 00000006 00000000 c0760000 c075c3c0 ffffffff [ 1.512711] NIP [c066c550] test_debug_virtual_init+0x3c/0xd4 [ 1.518315] LR [c0650ccc] do_one_initcall+0x8c/0x1cc [ 1.523163] Call Trace: [ 1.525595] [c900be60] [c0567340] 0xc0567340 (unreliable) [ 1.530954] [c900be90] [c0650ccc] do_one_initcall+0x8c/0x1cc [ 1.536551] [c900bef0] [c0651000] kernel_init_freeable+0x1f4/0x2cc [ 1.542658] [c900bf30] [c00037ec] kernel_init+0x14/0x110 [ 1.547913] [c900bf40] [c000e1d0] ret_from_kernel_thread+0x14/0x1c [ 1.553971] Instruction dump: [ 1.556909] 3ca50100 bfa10024 54a5000e 3fa0c076 7c0802a6 3d454000 813dc204 554893be [ 1.564566] 7d294010 7d294910 90010034 39290001 <0f090000> 7c3e0b78 955e0008 3fe0c062 [ 1.572425] ---[ end trace 6f6984225b280ad6 ]--- [ 1.577467] PA: 0x09000000 for VA: 0xc9000000 [ 1.581799] PA: 0x061e8f50 for VA: 0xc61e8f50 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 604c01d567cb9ee7d19dc598272cb90ab6229a8a Author: yupeng Date: Tue Dec 18 17:59:53 2018 +0100 nvme-pci: trace SQ status on completions Export the disk name, queue id, sq_head, sq_tail to a trace event in completion handling. Usage example: cd /sys/kernel/debug/tracing/events/nvme/nvme_sq echo 'disk=="nvme1n1"' > filter echo 1 > enable cat /sys/kernel/debug/tracing/trace_pipe Signed-off-by: yupeng Reviewed-by: Sagi Grimberg Reviewed-by: Keith Busch [hch: slight formatting tweaks, use standard nvme tracepoint conventions] Signed-off-by: Christoph Hellwig wip commit 0fe6dc4d689286ef81fbc2f4833398fac89d798e Author: Michael Straube Date: Tue Dec 18 19:34:51 2018 +0100 staging: rtl8188eu: cleanup brace coding style issues Cleanup brace coding style issues reported by checkpatch. ERROR: space required before the open brace '{' WARNING: braces {} are not necessary for single statement blocks CHECK: Unbalanced braces around else statement Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 241e15dbfc9fe40a8ae1f046fa8a96e839a71161 Author: Michael Straube Date: Tue Dec 18 19:34:50 2018 +0100 staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c Add spaces around '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e54a823e90fe9a49cd6573dda99440045c164851 Author: Michael Straube Date: Tue Dec 18 19:34:49 2018 +0100 staging: rtl8188eu: change return type of is_basicrate() to bool The function is_basicrate() returns true or false, so change the return type from int to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 79ebad324b487729d4aabddcb81e80c94b6f11c3 Author: Michael Straube Date: Tue Dec 18 19:34:48 2018 +0100 staging: rtl8188eu: simplify null array initializations Simplfy initialization of null arrays to improve readability and save some lines. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit b7d54304d92facd3df766d1a1aa283379d719d96 Author: Michael Straube Date: Tue Dec 18 19:34:47 2018 +0100 staging: rtl8188eu: change order of declarations to improve readability Change the order of array declarations in rtw_mlme_ext.c to improve readability. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 7a6394398f4e2305ca91020683080e4da5dbbaca Author: Michael Straube Date: Tue Dec 18 19:34:46 2018 +0100 staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c Make some arrays that are only used in rtw_mlme_ext.c static and remove the corresponding extern declarations from rtw_mlme_ext.h. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 03449acb77fd8bdfb8b7101a2eb429b1cffe67c2 Author: Michael Straube Date: Tue Dec 18 19:34:45 2018 +0100 staging: rtl8188eu: constify some arrays The values of these arrays in rtw_mlme_ext.c and rtw_wlan_util.c are never changed, so make them const. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 0ef9f86b935274a00d781a0245cb16d62eda501a Author: Michael Straube Date: Tue Dec 18 19:34:44 2018 +0100 staging: rtl8188eu: convert unsigned char arrays to u8 Change the type of some arrays from unsigned char to u8. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 55fc57809a2b741a6b2a0779bb9544f60f410b71 Author: Michael Straube Date: Tue Dec 18 19:34:43 2018 +0100 staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c The array REALTEK_96B_IE is already declared in rtw_mlme.h, so remove the declaration in rtw_mlme_ext.c. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 4f1a961ae15cb416219ed5488627490f3f0ff358 Author: Michael Straube Date: Tue Dec 18 19:34:42 2018 +0100 staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI The arrays WFD_OUI and WMM_INFO_OUI are not used anywhere, so remove them. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 25c641ec2aa1b6952f6e1e193a9ecb65c88db89c Author: Michael Straube Date: Tue Dec 18 19:34:41 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c Remove unnecessary parentheses, most of them reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 011844addf0f6c272133c680ebf0406f47cfd09b Author: Michael Straube Date: Tue Dec 18 19:34:40 2018 +0100 staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c Remove comments from 'endif's where the corresponding 'if' is just a few lines above to improve readability. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 7acaed81abe13a279b375cfd2a863223baa97e55 Author: Michael Straube Date: Tue Dec 18 19:34:39 2018 +0100 staging: rtl8188eu: add blank line after declarations Add a missing blank line after declarations in rtw_mlme_ext.c. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f20ac243ff745f0e8a4d125ad9dcf50640b73fb7 Author: Michael Straube Date: Tue Dec 18 19:34:38 2018 +0100 staging: rtl8188eu: remove blank lines between declarations Remove blank lines between declarations in rtw_mlme_ext.c. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 83691365f1845754251e25619bae185f96279005 Author: Michael Straube Date: Tue Dec 18 19:34:37 2018 +0100 staging: rtl8188eu: remove commented declarations in rtw_mlme_ext.c Remove unused/commented declarations. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 1673616a006aa04758c17ad78f6d5286d6eed091 Author: Michael Straube Date: Tue Dec 18 19:34:36 2018 +0100 staging: rtl8188eu: replace tabs with spaces in rtw_mlme_ext.c Replace tabs with spaces where appropriate. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 502b90d4c68751bc0635f997fd33e92a57d250cf Author: Michael Straube Date: Tue Dec 18 19:34:35 2018 +0100 staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c Replace tabs with spaces and/or remove spaces in declarations. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit b57f944785c5764725a7a6eff548a70bafb41a2a Author: YueHaibing Date: Tue Dec 18 22:28:21 2018 +0800 staging: fbtft: fix strncmp() size warning strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit a86028f8e3eea59517cb47895faad04b6ae8d8e1 Author: Colin Ian King Date: Tue Dec 18 11:35:52 2018 +0000 staging: most: sound: replace snprintf with strscpy Using snprintf without a format specifier is potentially risky if the string device_name contains format specifiers. Replace this with the safer and more efficient strscpy. Cleans up clang warning: drivers/staging/most/sound/sound.c:673:41: warning: format string is not a string literal (potentially insecure) [-Wformat-security] Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 9d84d3e6bd6871a0c410fc1c0571fa025236bf7e Author: Aisheng Dong Date: Mon Dec 17 15:00:51 2018 +0000 dt-bindings: serial: lpuart: add imx8qxp compatible string Add imx8qxp compatible string Cc: Mark Rutland Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Greg Kroah-Hartman Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Greg Kroah-Hartman commit 260683137ab5276113fc322fdbbc578024185fee Author: Nava kishore Manne Date: Tue Dec 18 13:18:42 2018 +0100 serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly This patch Correct the RX interrupt mask value to handle the RX interrupts properly. Fixes: c8dbdc842d30 ("serial: xuartps: Rewrite the interrupt handling logic") Signed-off-by: Nava kishore Manne Cc: stable Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 32cf21ac4edd6c0d5b9614368a83bcdc68acb031 Author: Michal Simek Date: Tue Dec 18 13:18:41 2018 +0100 serial: uartps: Fix error path when alloc failed When cdns_uart_console allocation failed there is a need to also clear ID from ID list. Fixes: ae1cca3fa347 ("serial: uartps: Change uart ID port allocation") Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 82b1b2ec5d4057af11395ac03209884369418a0d Author: Shubhrajyoti Datta Date: Tue Dec 18 13:18:40 2018 +0100 serial: uartps: Check if the device is a console While checking for console_suspend_enabled also check if the device is a console. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 86df8dd147233fd1705b9f7a8541d1501d4c5295 Author: Shubhrajyoti Datta Date: Tue Dec 18 13:18:39 2018 +0100 serial: uartps: Add the device_init_wakeup Initialise the device wakeup. The device_init_wakeup is needed for the wakeup to work by default. Uart can be configured as the primary wakeup source so it is good to enable wakeup by default. The same functionality is enabled also by 8250_omap, atmel_serial, omap-serial and stm32-usart. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit c85400f886e3d41e69966470879f635a2b50084c Author: Jia-Ju Bai Date: Tue Dec 18 20:04:25 2018 +0800 usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable() The function r8a66597_endpoint_disable() and r8a66597_urb_enqueue() may be concurrently executed. The two functions both access a possible shared variable "hep->hcpriv". This shared variable is freed by r8a66597_endpoint_disable() via the call path: r8a66597_endpoint_disable kfree(hep->hcpriv) (line 1995 in Linux-4.19) This variable is read by r8a66597_urb_enqueue() via the call path: r8a66597_urb_enqueue spin_lock_irqsave(&r8a66597->lock) init_pipe_info enable_r8a66597_pipe pipe = hep->hcpriv (line 802 in Linux-4.19) The read operation is protected by a spinlock, but the free operation is not protected by this spinlock, thus a concurrency use-after-free bug may occur. To fix this bug, the spin-lock and spin-unlock function calls in r8a66597_endpoint_disable() are moved to protect the free operation. Signed-off-by: Jia-Ju Bai Cc: stable Signed-off-by: Greg Kroah-Hartman commit c710d0bb76ff0795d8b6c1cda1e01e6e1e661a4a Author: Kyle Tso Date: Mon Dec 17 21:22:13 2018 +0800 usb: typec: tcpm: Extend the matching rules on PPS APDO selection Current matching rules ensure that the voltage range of selected Source Capability is entirely within the range defined in one of the Sink Capabilities. This is reasonable but not practical because Sink may not support wide range of voltage when sinking power while Source could advertise its capabilities in relatively wider range. For example, a Source PDO advertising 3.3V-11V@3A (9V Prog of Fixed Nominal Voltage) will not be selected if the Sink requires 5V-12V@3A PPS power. However, the Sink could work well if the requested voltage range in RDOs is 5V-11V@3A. Currently accepted: |--------- source -----| |----------- sink ---------------| Currently not accepted: |--------- source -----| |----------- sink ---------------| |--------- source -----| |----------- sink ---------------| |--------- source -----------------| |------ sink -------| To improve the usability, change the matching rules to what listed below: a. The Source PDO is selectable if any portion of the voltage range overlaps one of the Sink PDO's voltage range. b. The maximum operational voltage will be the lower one between the selected Source PDO and the matching Sink PDO. c. The maximum power will be the maximum operational voltage times the maximum current defined in the selected Source PDO d. Select the Source PDO with the highest maximum power Signed-off-by: Kyle Tso Acked-by: Adam Thomson Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 28ce553985fa23815d942e8ad4294dec30645e5b Author: Heikki Krogerus Date: Tue Dec 18 13:53:08 2018 +0300 usb: typec: Improve Alt Mode documentation Adding the document to the usb index file and fixing a few references. Also, exposing the code examples as "literal blocks" so they are more easy to read. Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 2da711bcebe81209a9f2f90e145600eb1bae2b71 Author: Raghuram Hegde Date: Wed Dec 19 11:42:18 2018 +0530 Bluetooth: btusb: Add support for Intel bluetooth device 8087:0029 Include the new USB product ID for Intel Bluetooth device 22260 family(CcPeak) The /sys/kernel/debug/usb/devices portion for this device is: T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0029 Rev= 0.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 E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Raghuram Hegde Signed-off-by: Chethan T N Signed-off-by: Marcel Holtmann commit 33f18c96afdf4da20014f834874e2820ee880cde Author: Heiner Kallweit Date: Wed Dec 19 00:43:58 2018 +0100 net: ethernet: don't set phylib state CHANGELINK in drivers After phy_start() phylib takes care of all needed actions, including aneg settings and checking link state. There's no need to set state PHY_CHANGELINK in drivers. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2acc7957dbc354f3349261c2ebc6f56aff5829e7 Author: Leon Romanovsky Date: Thu Dec 6 14:40:11 2018 +0200 net/mlx5: Add shared Q counter bits Updated HW specification file with needed bits to allow sharing of Q counters between DEVX contexts and kernel. Signed-off-by: Leon Romanovsky commit 624b66f8c9945504232c253e64f7c28e5a5c04d6 Author: Alexandre Belloni Date: Tue Dec 18 15:25:39 2018 +0100 MAINTAINERS: Add a maintainer for Microsemi switches Microsemi has been bought by Microchip and Microchip is supporting those switches. Signed-off-by: Alexandre Belloni Acked-by: Woojung Huh Signed-off-by: David S. Miller commit 5679ee784c89793537d233022b55a331a64aed9d Author: Zhenbo Gao Date: Tue Dec 18 17:43:52 2018 +0800 tipc: handle broadcast NAME_DISTRIBUTOR packet when receiving it NAME_DISTRIBUTOR messages are transmitted through unicast link on TIPC 2.0, by contrast, the messages are delivered through broadcast link on TIPC 1.7. But at present, NAME_DISTRIBUTOR messages received by broadcast link cannot be handled in tipc_rcv() until an unicast message arrives, which may lead to a significant delay to update name table. To avoid this delay, we will also deal with broadcast NAME_DISTRIBUTOR message on broadcast receive path. Signed-off-by: Zhenbo Gao Reviewed-by: Ying Xue Signed-off-by: David S. Miller commit 935b8a59ac80bf3d3caae6460fb95d028f7c92c8 Author: Heiner Kallweit Date: Mon Dec 17 23:43:25 2018 +0100 net: phy: remove unused code in phy_probe 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") left some unused code in phy_probe(), remove it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 38417468d4f05cfed62fca8f407d2df0cbe3fcc8 Author: Christoph Hellwig Date: Thu Dec 13 16:17:10 2018 +0100 scsi: block: remove the cluster flag Now that the the SCSI layer replaced the use of the cluster flag with segment size limits and the DMA boundary we can remove the cluster flag from the block layer. Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Martin K. Petersen commit d6a9000b81befd436fe4bcdae76322928bda724c Author: Xiang Chen Date: Mon Dec 17 22:40:07 2018 +0800 scsi: hisi_sas: Add support for DIF feature for v2 hw For v3 hw, we support DIF operation for SAS, but not SATA. In addition, DIF CRC16 is supported. This patchset adds the SW support for the described features. The main components are as follows: - Get protection mask from module param - Fill PI fields - Fill related to DIF in DQ and protection iu memories Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 4e87eb2f46ea547d12a276b2e696ab934d16cfb6 Author: Ewan D. Milne Date: Thu Dec 13 15:25:16 2018 -0500 scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid Certain older adapters such as the OneConnect OCe10100 may not have a valid wqpcnt value. In this case, do not set queue->page_count to 0 in lpfc_sli4_queue_alloc() as this will prevent the driver from initializing. Fixes: 895427bd01 ("scsi: lpfc: NVME Initiator: Base modifications") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Ewan D. Milne Reviewed-by: Laurence Oberman Tested-by: Laurence Oberman Signed-off-by: Martin K. Petersen commit 4af14d113bcf95c12d1462ba623b7e7117bd3fb3 Author: Christoph Hellwig Date: Thu Dec 13 16:17:09 2018 +0100 scsi: remove the use_clustering flag The same effects can be achieved by setting the dma_boundary to PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those settings into the drivers. Note that in many cases the setting might be bogus, but this keeps the status quo. [mkp: fix myrs and myrb] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 1c3726ad30938725a53f471d7967abfd6838330f Author: Christoph Hellwig Date: Thu Dec 13 16:17:08 2018 +0100 scsi: mac53c94: remove DISABLE_CLUSTERING mac53c94 has no limitations on crossing pages for segments. Just make the 65535 byte segment size limit explicit, even if it matches the current block layer limit. Signed-off-by: Christoph Hellwig Tested-by: Paul Mackerras Signed-off-by: Martin K. Petersen commit 5bd6cd54bd01171176e8be510d429720a3fd2dce Author: Christoph Hellwig Date: Thu Dec 13 16:17:07 2018 +0100 scsi: mesh: remove DISABLE_CLUSTERING mesh has no limitations on crossing pages for segments. Just make the 65535 byte segment size limit explicit, even if it matches the current block layer limit. Signed-off-by: Christoph Hellwig Tested-by: Paul Mackerras Signed-off-by: Martin K. Petersen commit e08ea3009f539e62280eca98a70b5d26d29b62cf Author: Christoph Hellwig Date: Thu Dec 13 16:17:06 2018 +0100 scsi: xen-scsifront: remove DISABLE_CLUSTERING There is no such limitation in the protocol or implementation, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Juergen Gross Signed-off-by: Martin K. Petersen commit 7b44047bce9c9d2c5020f5fb3dc94dd7b88cc355 Author: Christoph Hellwig Date: Thu Dec 13 16:17:05 2018 +0100 scsi: powertec: remove the explicit use_clustering setting This driver already sets the dma_boundary to PAGE_SIZE - 1, which has the same result. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 736c23d6caa5a1383391e1d45537829cebf92257 Author: Christoph Hellwig Date: Thu Dec 13 16:17:04 2018 +0100 scsi: cumana_2: remove the explicit use_clustering setting This driver already sets the dma_boundary to PAGE_SIZE - 1, which has the same result. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 50c2e9107f176a82e14567b39c5d0f2a208cc82c Author: Christoph Hellwig Date: Thu Dec 13 16:17:03 2018 +0100 scsi: introduce a max_segment_size host_template parameters This allows the host driver to indicate the maximum supported segment size in a nice an easy way, so that the driver doesn't have to worry about DMA-layer imposed limitations. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2a3d4eb8e228061c09d5ca8bf39e7f00c2091213 Author: Christoph Hellwig Date: Thu Dec 13 16:17:02 2018 +0100 scsi: flip the default on use_clustering Most SCSI drivers want to enable "clustering", that is merging of segments so that they might span more than a single page. Remove the ENABLE_CLUSTERING define, and require drivers to explicitly set DISABLE_CLUSTERING to disable this feature. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 4dd4130a722fb046e941010cf5576aed252bb58a Author: Christoph Hellwig Date: Thu Dec 13 16:17:01 2018 +0100 scsi: make sure all drivers set the use_clustering flag A few drivers were not setting the use_clustering flag at all and thus default to disable. Fix them up to explicitly set this field in preparation for additional cleanups. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 8b2db98e814a5ec45e8800fc22ca9000ae0a517b Author: Wei Yongjun Date: Mon Dec 17 12:19:53 2018 +0000 scsi: target/core: Use kmem_cache_free() instead of kfree() memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Fixes: ad669505c4e9 ("scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough") Signed-off-by: Wei Yongjun Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit c29d7d10cd1ed04eb2fa6baef8af65f1fded6ea6 Author: Bart Van Assche Date: Fri Dec 14 09:35:11 2018 -0800 scsi: virtio_scsi: Remove per-target data because it is no longer used Commit b5b6e8c8d3b4 ("scsi: virtio_scsi: fix IO hang caused by automatic irq vector affinity") removed all virtio_scsi hostdata users. Since the SCSI host data is no longer used, also remove the host data itself. Cc: Paolo Bonzini Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen commit e00b64f7c54c4cbd88143bbd43e7c3d61a090e5c Author: Shamir Rabinovitch Date: Mon Dec 17 17:15:18 2018 +0200 RDMA: Cleanup undesired pd->uobject usage Drivers should be using udata to determine if a method is invoked from user space or kernel space. A pd does not necessarily say a different objects is kernel or user. Transforming the tests to use udata eliminates a large number of uobject references from the drivers. Signed-off-by: Shamir Rabinovitch Signed-off-by: Jason Gunthorpe commit 6c86bc23421ec7949d91b359d831bf8fcfa80ce5 Merge: a26d94bff4d5a ff9b85de5d5d2 Author: David S. Miller Date: Tue Dec 18 16:44:45 2018 -0800 Merge tag 'mlx5-uplink-rep-2018-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed: ==================== mlx5-uplink-rep-2018-12-15 Or Gerlitz says: This series is essentially a cleanup to align with the rest of the NIC switchdev drivers and make us more robust and clear/n: currently the PF netdev serves as the mlx5 e-switch uplink netdev representor when going into switchdev mode and back as plain NIC netdev when going out. This causes some irregularities and misc troubles. Move to use dedicated uplink rep, as we have for the VF vports. The uplink rep netdev does has sysfs link and supports the sriov vf mac ndo, these two are in use by libvirt and other orchestrators, It also has richer ethtool support to allow controlling the port link & mtu along with supporting dcb and plugging into the mlx5 lag logic. ==================== Signed-off-by: David S. Miller commit a26d94bff4d5af7c9bf5d5e779282e2258966ec3 Author: YueHaibing Date: Mon Dec 17 17:46:23 2018 +0800 net: bridge: remove unneeded variable 'err' function br_multicast_toggle now always return 0, so the variable 'err' is unneeded. Also cleanup dead branch in br_changelink. Signed-off-by: YueHaibing Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8937388acb09d6bf0f263fa8551d3e2b4e84de25 Author: YueHaibing Date: Mon Dec 17 17:27:16 2018 +0800 qlcnic: remove set but not used variables 'op, cmd_op' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1070:5: warning: variable 'op' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1342:5: warning: variable 'cmd_op' set but not used [-Wunused-but-set-variable] 'op' never used since introduction in commit 7cb03b2347d5 ("qlcnic: Support VF-PF communication channel commands.") 'cmd_op' not used since commit 6226204bcf20 ("qlcnic: Fix operation type and command type.") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 8589086f4efd5756d20cedd844b865e5d20164ec Author: Hans de Goede Date: Tue Oct 30 14:17:23 2018 +0100 Bluetooth: hci_h5: Turn off RTL8723BS on suspend, reprobe on resume On many devices the RTL8723BS device gets reset during suspend/resume, causing it to lose its firmware and all state. Testing has shown it drops back to communicating at 115200 bps and sends sync-request packages, indicating it has been fully reset. This commit fixes this by queueing a reprobe on resume. This mirrors how USB RTL BT devices, which have the same problem, are handled in the btusb driver, there we set the USB_QUIRK_RESET_RESUME for all RTL devices, which also causes a reprobe on resume. The only difference is that here we need to do the reprobe ourselves. Since we are doing a full reprobe on resume now, we can also turn off the device on suspend to save power while suspended. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann commit 28a75e4c813c7ae7de5b4baf4c29369769247cc6 Author: Hans de Goede Date: Tue Oct 30 14:17:22 2018 +0100 Bluetooth: hci_h5: Add suspend / resume ops Add support for vendor specific suspend / resume callbacks. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann commit 76c43ae84e3f455e0b460ed0c43799e018d09ee9 Author: Yonghong Song Date: Tue Dec 18 13:43:58 2018 -0800 bpf: log struct/union attribute for forward type Current btf internal verbose logger logs fwd type as [2] FWD A type_id=0 where A is the type name. Commit 9d5f9f701b18 ("bpf: btf: fix struct/union/fwd types with kind_flag") introduced kind_flag which can be used to distinguish whether a forward type is a struct or union. Also, "type_id=0" does not carry any meaningful information for fwd type as btf_type.type = 0 is simply enforced during btf verification and is not used anywhere else. This commit changed the log to [2] FWD A struct if kind_flag = 0, or [2] FWD A union if kind_flag = 1. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 7086b36b8080e6252162cf5d681f521738e7ced5 Author: Colin Ian King Date: Tue Oct 30 11:34:19 2018 +0000 Bluetooth: hci_intel: clean an indentation issue, remove extraneous spaces Trivial fix to clean up an indentation issue, remove spaces Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit 75edd1f2f916f06248cd6a6e8ea706b44431d3eb Author: Colin Ian King Date: Fri Nov 9 13:27:36 2018 +0000 Bluetooth: clean an indentation issue, remove extraneous space Trivial fix to clean up an indentation issue Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit cba736465e5cbae22027789de748b8500e647555 Author: Balakrishna Godavarthi Date: Thu Nov 22 18:20:47 2018 +0530 Bluetooth: hci_serdev: Remove setting of HCI_QUIRK_RESET_ON_CLOSE. HCI_QUIRK_RESET_ON_CLOSE quirk is required for BT v1.0 based devices, to send a reset command to the chip during hci device close. Serdev architecture is used for the latest BT chips, which doesn't require to send the reset command during close. If still chips required reset command during close, it would be better enabling it in the vendor probes or in proto setup. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit dff6d593b10fc04a24e07650c459947e9d6ff3c3 Author: Andrea Parri Date: Tue Nov 27 12:22:25 2018 +0100 Bluetooth: Remove unnecessary smp_mb__after_atomic() barriers The barriers are redundant because atomic_test_and_clear_bit() already provides the required full ordering for the cases in question (that is, when the bit is cleared). Signed-off-by: Andrea Parri Signed-off-by: Marcel Holtmann commit dd4bfda9cfd1b0b4aad8760fc027cc81e0c6787f Merge: 0bae2d4d62d52 945a47d87cee2 Author: Daniel Borkmann Date: Wed Dec 19 00:27:24 2018 +0100 Merge branch 'bpf-sk-msg-size-member' John Fastabend says: ==================== This adds a size field to the sk_msg_md data structure used by SK_MSG programs. Without this in the zerocopy case and in the copy case where multiple iovs are in use its difficult to know how much data can be pulled in. The normal method of reading data and data_end only give the current contiguous buffer. BPF programs can attempt to pull in extra data but have to guess if it exists. This can result in multiple "guesses" its much better if we know upfront the size of the sk_msg. ==================== Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 0697607acab976723bf67de95d7b87167c30abf8 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:47 2018 +0800 Bluetooth: btbcm: Add default address for BCM43430A0 The BCM43430A0 has the default MAC address 43:43:A0:12:1F:AC if none is given. This address was found when enabling Bluetooth on a bunch of boards with the AMPAK AP6210 module, all sharing the same address. It also contains the sequence 4343A0, which is suspicious as that is also the name the chip identifies itself as. Add this to the list of default MAC addresses and leave it to the user to configure a valid one. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 66904555191cbcefa8aa552df018b4f56d94e3ae Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:46 2018 +0800 Bluetooth: hci_bcm: Add compatible string for BCM4330 The BCM4330 chip is a 802.11 a/b/g/n + Bluetooth 4.0 + HS controller. This patch adds a compatible string match to the serdev driver for the Bluetooth part of the chip. Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 92ffe0db3c858ca568cf480899396e63344eab86 Author: Maxime Ripard Date: Mon Dec 17 12:04:45 2018 +0800 Bluetooth: hci_bcm: Add BCM20702A1 variant The BCM20702A1 chip is a single-chip Bluetooth 4.0 controller and transceiver. It is found in the AMPAK AP6210 WiFi+BT package. Signed-off-by: Maxime Ripard Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 91927a9b351f9779e323be1fb4e219a5951b1649 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:44 2018 +0800 Bluetooth: hci_bcm: Wait for device to come out of reset after power on The datasheets for BCM20702 and BCM43438 both have power up time sequence graphs, however they are slightly different. Both chips also have an internal power-on-reset, which holds the chip in reset for a short time after the regulators are enabled. For the BCM20702, the time period from when the regulators are enabled, until the chip settles and comes out of sleep state, is 6564 ~ 8171 us. For the BCM43438, the graph only shows the time period from when the regulators are enabled until the chip responds by driving the host's CTS line low, assuming the host has already driven its RTS line low. This is shown to be 6.5 sleep cycles, with the sleep clock at 32.768 kHz. This is around 2 ms. Wait a full 10 ms after the regulators are enabled to account for signal rising times. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 75d11676dccb643de1e850c8a29f5e9aa58157c0 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:43 2018 +0800 Bluetooth: hci_bcm: Add support for regulator supplies The Broadcom Bluetooth chips have two power inputs, VBAT and VDDIO. The former provides overall power for the chip, while the latter powers the I/O pins and buffers. Model these two as regulator supplies, and let the driver manage them in the same way as it does the clock supply. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 90bc07cc59ac32f37d6de78a501246575c8866bf Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:42 2018 +0800 Bluetooth: hci_bcm: Add support for LPO clock The Broadcom Bluetooth controllers support a secondary LPO clock at 32.768 kHz. This external clock provides low power timing, and also a way to detect the frequency of the main reference clock. On many designs without NVRAM and a non-default reference clock, this must be used or the controller will not function correctly. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 55dbfcd0f621a745acfd8e3221c41be181b5b128 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:41 2018 +0800 Bluetooth: hci_bcm: Use "txco" and "extclk" to get clock reference Originally the device tree binding only specified one clock reference, with the name "extclk". The driver simply retrieves the clock without bothering to specify a name. Since we added a second clock to the binding, we need to fetch the clocks by name now. First we try the new name "txco", then fall back to the old name "extclk", and finally try retrieving a clock without using any name, to cover any instances where a bad device tree or firmware worked by accident. In the last case, we should take care that we don't get the same clock twice when we add support for the "lpo" clock. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 8c08947b7c4f4496e7c23be970121280fcb6cbf5 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:40 2018 +0800 Bluetooth: hci_bcm: Simplify clk_get error handling The driver currently checks the clk pointer for an error condition, as returned by clk_get, before every invocation of the clk consumer API. This is redundant if the goal is simply to ignore the errors, thereby making the clk optional. The clk consumer API already checks if the pointer is NULL or not. Simplify the code a bit by assigning NULL to the clk pointer if the error condition is one we want to ignore, which is every error except deferred probing. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 28ac03b9ac3f784c2f048a910c8d0a7a87483b66 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:39 2018 +0800 Bluetooth: hci_bcm: Handle deferred probing for the clock supply On some systems that actually have the bluetooth controller wired up with an extra clock signal, it's possible the bluetooth controller probes before the clock provider. clk_get would return a defer probe error, which was not handled by this driver. Handle this properly, so that these systems can work reliably. Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 31f20f5f6d14ffe8d9a87c0ef58ee7ed72a3db63 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:38 2018 +0800 dt-bindings: net: broadcom-bluetooth: Add BCM4330 compatible string The BCM4330 is a 802.11 a/b/g/n WiFi + Bluetooth 4.0 chip from Broadcom. It is found in the Ampak AP6330 WiFi+BT module. The partiular one I have identifies as BCM4330B1 for Bluetooth and BCM4330/4 for WiFi. It is unclear if the AP6330 module uses this revision of the BCM4330, or if there are multiple revisions. The module does not have revision markings. This patch elects to use just BCM4330 for the compatible string. Reviewed-by: Rob Herring Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit bfbc47bd5901168f0fdb337e9be1759bedf8ff4e Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:37 2018 +0800 dt-bindings: net: broadcom-bluetooth: Add BCM20702A1 compatible string The BCM20702A1 is a Bluetooth 4.0 chip from Broadcom. It is found in the Ampak AP6210 WiFi+BT module, identified from the read verbose config info command response. However the Bluetooth firmware provided by vendors uses the name BCM20710. This patch elects to use the chip ID returned by the chip for the compatible string. Reviewed-by: Rob Herring Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 061a8aaf4c0f2885f1fa1dd6bf8ea27ab5059fa9 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:36 2018 +0800 dt-bindings: net: broadcom-bluetooth: Add VBAT and VDDIO supplies The Broadcom Bluetooth chips have two power inputs, VBAT and VDDIO. The former provides overall power for the chip, while the latter powers the I/O pins and buffers. This patch adds properties for the two so we can describe the power supply relationships. Reviewed-by: Rob Herring Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 6ae81eebdef97109c32e545e90865bc5b14178f1 Author: Chen-Yu Tsai Date: Mon Dec 17 12:04:35 2018 +0800 dt-bindings: net: broadcom-bluetooth: Fix external clock names The Broadcom Bluetooth controllers can take up to two external clocks: an external frequency reference, substituting the main crystal, and a LPO clock at 32.768 kHz substituting the internal LPO clock. In particular, the external LPO clock must be used when the controller does not have NVRAM connected, and the main reference frequency is not the default 20 MHz. This is described in detail in the datasheet. The original "extclk" clock name is ambiguous as to which of these it refers to, and some designs might even require both. This patch deprecates the existing name, and adds "txco" and "lpo". Tested-by: Ondrej Jirman Signed-off-by: Chen-Yu Tsai Signed-off-by: Marcel Holtmann commit 8e2924e383b714748e5891ac9ff2f5c945666891 Author: Yangtao Li Date: Mon Nov 5 09:56:19 2018 -0500 Bluetooth: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Reviewed-by: Kees Cook Signed-off-by: Marcel Holtmann commit f79ba4300202210eb10b3d41f70ef2b8538fa5c4 Author: Yangtao Li Date: Sat Dec 15 02:22:17 2018 -0500 6lowpan: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Marcel Holtmann commit 945a47d87cee24a95e11fdc0cd868b872f9b9616 Author: John Fastabend Date: Sun Dec 16 15:47:06 2018 -0800 bpf: sk_msg, add tests for size field This adds tests to read the size field to test_verifier. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 584e46813e689ff1a348343b73122c43d81d0ef7 Author: John Fastabend Date: Sun Dec 16 15:47:05 2018 -0800 bpf: add tools lib/include support sk_msg_md size field Add the size field to sk_msg_md for tools. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 3bdbd0228e7555ec745e08469b98e5a0966409d6 Author: John Fastabend Date: Sun Dec 16 15:47:04 2018 -0800 bpf: sockmap, metadata support for reporting size of msg This adds metadata to sk_msg_md for BPF programs to read the sk_msg size. When the SK_MSG program is running under an application that is using sendfile the data is not copied into sk_msg buffers by default. Rather the BPF program uses sk_msg_pull_data to read the bytes in. This avoids doing the costly memcopy instructions when they are not in fact needed. However, if we don't know the size of the sk_msg we have to guess if needed bytes are available by doing a pull request which may fail. By including the size of the sk_msg BPF programs can check the size before issuing sk_msg_pull_data requests. Additionally, the same applies for sendmsg calls when the application provides multiple iovs. Here the BPF program needs to pull in data to update data pointers but its not clear where the data ends without a size parameter. In many cases "guessing" is not easy to do and results in multiple calls to pull and without bounded loops everything gets fairly tricky. Clean this up by including a u32 size field. Note, all writes into sk_msg_md are rejected already from sk_msg_is_valid_access so nothing additional is needed there. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit c2c2ce1e9623fdce429c7df84ee8564074d84846 Author: Yongqiang Sun Date: Fri Dec 7 10:38:05 2018 -0500 drm/amd/display: Optimize passive update planes. [Why] passive update planes still spends a litte more time on some cases. [How] Remove unnecessary trace which involving in some register read. Disable debug output for release build. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1ae62f3114a95982f2f4cbe5c7bd14b81233597a Author: Wenjing Liu Date: Mon Dec 3 17:26:15 2018 -0500 drm/amd/display: verify lane status before exiting verify link cap [why] DP LL CTS1.4 4.3.2.1 test failure. [how] The failure is caused by not handling DP link loss hpd short pusle during set mode. The change is to read link status before set mode link training. If link is lost, re-verify link caps. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit fd0853567cdf2eeddf22ba9021deedf6b1f90f7a Author: SivapiriyanKumarasamy Date: Thu Nov 29 07:18:29 2018 -0500 drm/amd/display: Fix bug with not updating VSP infoframe [WHY] Currently, when the VSP infopacket is rebuilt in DM, it is not updated when being programmed in encoder. [HOW] Add new VSP case for update_info_frame Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit bd4905a9583c760da31ded7256dca6f71483c3dc Author: Paul Hsieh Date: Thu Nov 22 18:43:45 2018 +0800 drm/amd/display: Add retry to read ddc_clock pin [WHY] On customer board, there is one pluse (1v , < 1ms) on DDC_CLK pin when plug / unplug DP cable. Driver will read it and config DP to HDMI/DVI dongle. [HOW] If there is a real dongle, DDC_CLK should be always pull high. Try to read again to recovery this special case. Retry times = 3. Need additional 3ms to detect DP passive dongle(3 failures) Signed-off-by: Paul Hsieh Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 80adaebd2d411b7d6872a097634848a71eb13d20 Author: Eric Yang Date: Fri Nov 23 05:55:20 2018 -0500 drm/amd/display: Don't skip link training for empty dongle [Why] Skipping initial link training will result in no verified link cap for mode enumeration. Some versions of the BIOS seem to have PHY programming sequence issue as well if initial link training is skipped, resulting in a softlock in BIOS command table. [How] Identify the empty dongle hotplug case, and still do initial link training. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 0a6414e75d231ee1bb7ffb2f5eb246b682a884cd Author: Dale Zhao Date: Thu Nov 22 17:13:46 2018 +0800 drm/amd/display: Wait edp HPD to high in detect_sink [Why] In 99% user case, edp will be post by vbios. In 1% / current case: Lenovo don't light up edp panel in vbios post stage, vbios won't be lit up. Thus in dal when we init DCN 10 hw, we power up edp, then we start detect_sink, but internal time is too short, when we detect it, HPD is still low, so we don't detect the edp, and edp shows black. [How] When we init hw, we wait edp HPD to high after power up edp. Signed-off-by: Dale Zhao Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6fd3583b92318d6d8367cc3f325a81a222cdbc55 Author: Dmytro Laktyushkin Date: Mon Nov 19 16:25:23 2018 -0500 drm/amd/display: fix surface update sequence An earlier change added update of interdependent dlg/ttu params for pipes not being updated in the current call. The code fails to check if the other pipes are actually active yet causing an assert. This change adds a check for surface presence on the pipes before updating the interdepenednt params. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit 12750d1647f118496f1da727146f255f5e44d500 Author: Eric Yang Date: Thu Nov 22 02:07:06 2018 -0500 drm/amd/display: fix YCbCr420 blank color [Why] YCbCr420 packing format uses two chanels for luma, and 1 channel for both chroma component. Our previous implementation did not account for this and results in every other pixel having very high luma value, showing greyish color instead of black. YCbCr444 = ; ..... YCbCr420 = ; ..... [How] Program the second channel with the black color value for luma as well. Signed-off-by: Eric Yang Reviewed-by: Hugo Hu Acked-by: Leo Li Signed-off-by: Alex Deucher commit d71589f290a13bc2aa0d3d847aa8991d815d2f9e Author: David Francis Date: Wed Nov 21 10:44:07 2018 -0500 drm/amd/display: Warn instead of error on REG_WAIT timeout [Why] DC warns when a REG_WAIT takes a while and full-on errors with stack dump on REG_WAIT timeout. Most of the time it isn't a real issue. [How] Make DC cool its jets - taking a while is a debug message (because it is not something that normal users should need to be aware of), and timeouts are warnings (because it technically shouldn't happen, but it's not a big deal if it does) Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3a3cd1dfaf161ccbbf6d35ee92985d1b0285951e Author: Dmytro Laktyushkin Date: Mon Oct 22 14:41:40 2018 -0400 drm/amd/display: move AYCrCb8888 format to video section This is a dual channel format and should be treated like other video formats Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher commit d3302424e04d0c5ed478d80c0ff53783091f31f4 Author: Harry Wentland Date: Tue Dec 4 14:10:58 2018 -0500 drm/amd/display: Don't log error if we have no connectors [Why] In certain configurations, such as PX configs or some Vega20 parts DC gets created without connectors. [How] Drop the dm_error print when no connectors. Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher commit 809c67059162e7ba85c61a83ad7547b4ffbb1e6e Author: Arnd Bergmann Date: Sun Dec 16 20:48:21 2018 +0100 test_rhashtable: remove semaphore usage This is one of only two files that initialize a semaphore to a negative value. We don't really need the two semaphores here at all, but can do the same thing in more conventional and more effient way, by using a single waitqueue and an atomic thread counter. This gets us a little bit closer to eliminating classic semaphores from the kernel. It also fixes a corner case where we fail to continue after one of the threads fails to start up. An alternative would be to use a split kthread_create()+wake_up_process() and completely eliminate the separate synchronization. Acked-by: Phil Sutter Signed-off-by: Arnd Bergmann Acked-by: Herbert Xu Signed-off-by: David S. Miller commit fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4 Author: Heiner Kallweit Date: Sun Dec 16 19:18:26 2018 +0100 net: phy: print stack trace in phy_error So far phy_error() silently stops the PHY state machine. If the network driver doesn't inform about a MDIO error then the user may wonder why his network is down. Let's print the stack trace to facilitate search for the root cause of the error. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2b3e88ea65287ba738a798622405b15344871085 Author: Heiner Kallweit Date: Sun Dec 16 18:30:14 2018 +0100 net: phy: improve phy state checking Add helpers phy_is_started() and __phy_is_started() to avoid open-coded checks whether PHY has been started. To make the check easier move PHY_HALTED before PHY_UP in enum phy_state. Further improvements: phy_start_aneg(): Return -EBUSY and print warning if function is called from a non-started state (DOWN, READY, HALTED). Better check because function is exported and drivers may use it incorrectly. phy_interrupt(): Return IRQ_NONE also if state is DOWN or READY. We should never receive an interrupt in one of these states, but better play safe. phy_stop(): Just return and print a warning if PHY is in a non-started state. This warning should help to identify drivers with unbalanced calls to phy_start() / phy_stop(). phy_state_machine(): Schedule state machine run only if PHY is in a started state. E.g. if state is READY we don't need the state machine, it will be started by phy_start(). v2: - don't use __func__ within phy_warn_state v3: - use WARN() instead of printing error message to facilitate debugging Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 72a8f089c382c078f8c7c1c759cb726de80d4284 Author: Borislav Petkov Date: Tue Dec 18 19:25:46 2018 +0100 x86/mce: Restore MCE injector's module name It was mce-inject.ko but it turned into inject.ko since the containing source file got renamed. Restore it. Fixes: 21afaf181362 ("x86/mce: Streamline MCE subsystem's naming") Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: linux-edac Cc: Tony Luck Link: https://lkml.kernel.org/r/20181218182546.GA21386@zn.tnic commit 2429f13870d3d2abbe200807d0462272e16ec830 Author: Heiner Kallweit Date: Sun Dec 16 15:00:40 2018 +0100 net: fec: remove workaround to restart phylib state machine on MDIO timeout There's a workaround to restart the phylib state machine in case of a MDIO access timeout. Seems it was introduced to deal with the consequences of a too small MDIO timeout. See also commit message of c3b084c24c8a ("net: fec: Adjust ENET MDIO timeouts") which increased the timeout value later. Due to the later timeout value fix it seems to be safe to remove the workaround. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3379b3bfb71de154f44bca297f3aa039c5b12852 Author: Colin Ian King Date: Sun Dec 16 13:33:15 2018 +0000 bonding: fix indentation issues, remove extra spaces There are two statements that are indented too much by one space each, fix these. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 0bae2d4d62d523f06ff1a8e88ce38b45400acd28 Author: Jiong Wang Date: Sat Dec 15 03:34:40 2018 -0500 bpf: correct slot_type marking logic to allow more stack slot sharing Verifier is supposed to support sharing stack slot allocated to ptr with SCALAR_VALUE for privileged program. However this doesn't happen for some cases. The reason is verifier is not clearing slot_type STACK_SPILL for all bytes, it only clears part of them, while verifier is using: slot_type[0] == STACK_SPILL as a convention to check one slot is ptr type. So, the consequence of partial clearing slot_type is verifier could treat a partially overridden ptr slot, which should now be a SCALAR_VALUE slot, still as ptr slot, and rejects some valid programs. Before this patch, test_xdp_noinline.o under bpf selftests, bpf_lxc.o and bpf_netdev.o under Cilium bpf repo, when built with -mattr=+alu32 are rejected due to this issue. After this patch, they all accepted. There is no processed insn number change before and after this patch on Cilium bpf programs. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Reviewed-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 2849dd8bc72b62a315854863c84c523176bd55ce Author: Taniya Das Date: Fri Dec 14 09:40:24 2018 +0530 cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver The CPUfreq HW present in some QCOM chipsets offloads the steps necessary for changing the frequency of CPUs. The driver implements the cpufreq driver interface for this hardware engine. Signed-off-by: Saravana Kannan Signed-off-by: Taniya Das Reviewed-by: Stephen Boyd Tested-by: Stephen Boyd Acked-by: Viresh Kumar Tested-by: Amit Kucheria Signed-off-by: Rafael J. Wysocki commit 0a3b0c7f979563c97a136c51e43ef724121e83ed Author: Taniya Das Date: Fri Dec 14 09:40:23 2018 +0530 dt-bindings: cpufreq: Introduce QCOM cpufreq firmware bindings Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's SoCs. This is required for managing the cpu frequency transitions which are controlled by the hardware engine. Signed-off-by: Taniya Das Reviewed-by: Stephen Boyd Acked-by: Viresh Kumar Tested-by: Amit Kucheria Reviewed-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 1c01a45a86ed6991953e74be63b6a7e33b387954 Author: Leo Li Date: Wed Oct 31 17:07:41 2018 -0400 drm/amd/display: Add functionality to get XGMI SS info [Why] When XGMI is enabled, the DP reference clock needs to be adjusted according to the XGMI spread spectrum percentage and mode. But first, we need the ability to fetch this info. [How] Within the BIOS parser, Read from vBIOS when XGMI SS info is requested. In addition, diags build uses include_legacy/atomfirmware.h for the smu_info_v3_3 table headers. Update that as well. Signed-off-by: Leo Li Reviewed-by: Nicholas Kazlauskas Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit b8b6ce89016485cb92fdf2f527b40249aefbc470 Author: Leo Li Date: Wed Oct 31 16:56:54 2018 -0400 drm/amd/display: Add DCE_VERSION_12_1 enum for Vega 20 [Why] We'll need a way to differentiate Vega 20 in DC [How] Add a DCE_VERSION_12_1 enum, which will be returned as the DC version if the ASIC used is a Vega 20. Signed-off-by: Leo Li Reviewed-by: David Francis Signed-off-by: Alex Deucher commit f569da8c994c2254a106bdb537aa271399e288ec Author: Marco Felsch Date: Tue Dec 18 16:52:39 2018 +0100 device property: fix fwnode_graph_get_next_endpoint() documentation Sync documentation with code. Fixes: 07bb80d40b0e (device property: Add support for remote endpoints) Signed-off-by: Marco Felsch Acked-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit 180db303ff466a3887c841e805568b92233e2d0e Author: Nicholas Kazlauskas Date: Wed Dec 5 12:08:56 2018 -0500 drm/amd/display: Add below the range support for FreeSync [Why] When the flip-rate is below the minimum supported variable refresh rate range for the monitor the front porch wait will timeout and be frequently misaligned resulting in stuttering and/or flickering. The FreeSync module can still maintain a smooth and flicker free image when the monitor has a refresh rate range such that the maximum refresh > 2 * minimum refresh by utilizing low framerate compensation, "below the range". [How] Hook up the pre-flip and post-flip handlers from the FreeSync module. These adjust the minimum/maximum vrr range to duplicate frames when appropriate by tracking flip timestamps. Signed-off-by: Nicholas Kazlauskas Acked-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 8cd61c313d8b5a813a38b615796ea50563f3afae Author: Roman Li Date: Tue Nov 20 16:50:29 2018 -0500 drm/amd/display: Raise dispclk value for Polaris [Why] The visual corruption due to low display clock value observed on some systems [How] There was earlier patch for dspclk: 'drm/amd/display: Raise dispclk value for dce_update_clocks' Adding +15% workaround also to to dce112_update_clocks Signed-off-by: Roman Li Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 77acd1cd912987ffd62dad6a09275a1fb406f0c2 Author: Nicholas Kazlauskas Date: Fri Dec 14 12:26:58 2018 -0500 drm/amd/display: Skip fast cursor updates for fb changes [Why] The behavior of drm_atomic_helper_cleanup_planes differs depending on whether the commit was asynchronous or not. When it's called from amdgpu_dm_atomic_commit_tail during a typical atomic commit the plane state has been swapped so it calls cleanup_fb on the old plane state. However, in the asynchronous commit codepath the call to drm_atomic_helper_commit also calls dm_plane_helper_cleanup_fb after atomic_async_update has been called. Since the plane state is updated in place and has not been swapped the cleanup_fb call affects the new plane state. This results in a use after free for the given sequence: - Fast update, fb1 pin/ref, fb1 unpin/unref - Fast update, fb2 pin/ref, fb2 unpin/unref - Slow update, fb1 pin/ref, fb2 unpin/unref - Fast update, fb2 pin/ref -> use after free. bug [How] Disallow framebuffer changes in the fast path. Since this includes a NULL framebuffer, this means that only framebuffers that have been previously pin+ref at least once will be used, preventing a use after free. This has a significant throughput reduction for cursor updates where the framebuffer changes. For most desktop usage this isn't a problem, but it does introduce performance regressions for two specific IGT tests: - cursor-vs-flip-toggle - cursor-vs-flip-varying-size Fixes: 2cc751931afc ("drm/amd/display: Add fast path for cursor plane updates") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 379c237e392e4cec09ff5853b5c0724a1e5d51b0 Author: Evan Quan Date: Mon Dec 17 17:51:22 2018 +0800 drm/amdgpu: correct the return value for error case It should not return 0 for error case as '0' is actually a special value for index. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e98bdb8061305ec00ca9c11231a606e849477bc8 Author: Felix Kuehling Date: Fri Dec 14 11:57:02 2018 -0500 drm/amdkfd: Fix handling of return code of dma_buf_get On errors, dma_buf_get returns a negative error code, rather than NULL. Reported-by: Dan Carpenter Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7ab3f021bbc8078e7fbd1d06b6b3105dc010dc0e Author: James Zhu Date: Mon Dec 17 08:35:05 2018 -0500 drm/amdgpu:Improves robustness of SOC15_WAIT_ON_RREG If register value is updating, reset timeout counter. It improves robustness of SOC15_WAIT_ON_RREG. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 9194fb22ddd8e178e4e83e656b0c2346124ba9ec Author: James Zhu Date: Wed Dec 12 14:57:12 2018 -0500 drm/amdgpu/vcn:Remove bit 31 for scratch2 to indicate the WA is active Remove bit 31 for scratch2 to indicate the Hardware bug work around is active. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 12e8b30186b9682dc7e267ab988652b74abfa081 Author: James Zhu Date: Wed Dec 12 14:53:12 2018 -0500 drm/amdgpu/vcn:Scan enc/jpeg fences to init dpg pause new state Scan enc/jpeg fences to init dpg pause new state in begin use. It will help set dpg mode to desire state actively. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 8411f7dc5f61be650b6a26736cea5b1c318fc1f3 Author: James Zhu Date: Wed Dec 12 14:50:03 2018 -0500 drm/amdgpu/vcn:Always check all vcn ring status during dpg mode stop Always check all vcn ring status during dpg mode stop, it will help identify which vcn ring may cause the issue. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit e0d460a4d2d160afbfad4ac2b9acd17ccb3d110b Author: James Zhu Date: Wed Dec 12 14:48:33 2018 -0500 drm/amdgpu/vcn:Update ring point to JPEG before init JPEG wptr It is a bug fix. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit af8d70375d562034d375ca7a8b08997422223258 Author: Shamir Rabinovitch Date: Mon Dec 17 17:15:16 2018 +0200 RDMA/restrack: Resource-tracker should not use uobject pointers Having uobject pointer embedded in ib core objects is not aligned with a future shared ib_x model. The resource tracker only does this to keep track of user/kernel objects - track this directly instead. Signed-off-by: Shamir Rabinovitch Signed-off-by: Jason Gunthorpe commit 5d65cab6c614f95549b19416b2aad824c6d9283a Author: James Zhu Date: Wed Dec 12 14:46:10 2018 -0500 drm/amdgpu/vcn:Always gate vcn block during hw finishing Under Dynamic Power Gate mode, UVD_STATUS needn't be checked. Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit f9872f100aefd3b80eb4a61dbea326ee28cdc94a Author: James Zhu Date: Mon Dec 3 22:04:28 2018 -0500 drm/amdgpu/vcn: Update vcn.cur_state during suspend Replace vcn_v1_0_stop with vcn_v1_0_set_powergating_state during suspend, to keep adev->vcn.cur_state update. It will fix VCN S3 hung issue. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 813e90b1aeaa550641332625174d57edb15bc8bd Author: Moni Shoua Date: Tue Dec 11 13:37:53 2018 +0200 IB/mlx5: Add advise_mr() support The verb advise_mr() is used to give advice to the kernel about an address range that belongs to a MR. Implement the verb and register it on the device. The current implementation supports the only known advice to date, prefetch. Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ad8a4496757f6f7344011a20a07195bd27e3989c Author: Moni Shoua Date: Tue Dec 11 13:37:52 2018 +0200 IB/uverbs: Add support to advise_mr Add new ioctl method for the MR object - ADVISE_MR. This command can be used by users to give an advice or directions to the kernel about an address range that belongs to memory regions. A new ib_device callback, advise_mr(), is introduced here to suupport the new command. This command takes the following arguments: - pd: The protection domain to which all memory regions belong - advice: The type of the advice * IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH - Pre-fetch a range of an on-demand paging MR * IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE - Pre-fetch a range of an on-demand paging MR with write intention - flags: The properties of the advice * IB_UVERBS_ADVISE_MR_FLAG_FLUSH - Operation must end before return to the caller - sg_list: The list of memory ranges - num_sge: The number of memory ranges in the list - attrs: More attributes to be parsed by the provider Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cbfdd442c43eab8c62bf2ea5127511cd39e9046d Author: Moni Shoua Date: Tue Dec 11 13:37:51 2018 +0200 IB/uverbs: Add helper to get array size from ptr attribute When the parser of an ioctl command has the knowledge that a ptr attribute in a bundle represents an array of structures, it is useful for it to know the number of elements in the array. This is done by dividing the attribute length with the element size. Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a38d1107f937ca95dcf820161ef44ea683d6a0b1 Author: Matt Mullins Date: Wed Dec 12 16:42:37 2018 -0800 bpf: support raw tracepoints in modules Distributions build drivers as modules, including network and filesystem drivers which export numerous tracepoints. This enables bpf(BPF_RAW_TRACEPOINT_OPEN) to attach to those tracepoints. Signed-off-by: Matt Mullins Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit bbc13cda37711eb7baa4091017887a57074f5410 Author: Parav Pandit Date: Fri Nov 30 13:16:48 2018 +0200 RDMA/uverbs: Add an ioctl method to destroy an object Add an ioctl method to destroy the PD, MR, MW, AH, flow, RWQ indirection table and XRCD objects by handle which doesn't require any output response during destruction. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 615740fd6b0c44e6ba1beaa87ddbdf7ead57ecf4 Merge: 07daef8b41e0d 7f83a1327962b Author: Thomas Gleixner Date: Tue Dec 18 22:57:38 2018 +0100 Merge branch 'clockevents/4.21' of http://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event changes from Daniel Lezcano: - Add the sched_clock for the arc timer (Alexey Brodkin) - Change the file timer names for riscv, rockchip, tegra20, sun4i and meson6 (Daniel Lezcano) - Add the DT bindings for r8a7796, r8a77470 and r8a774a1 (Biju Das) - Remove the early platform driver registration for timer-ti-dm (Bartosz Golaszewski) - Provide the sched_clock for the riscv timer (Anup Patel) - Add support for ARM64 for the imx-gpt and convert the imx-tpm to the timer-of API (Anson Huang) - Remove useless irq protection for the imx-gpt (Clément Péron) - Remove a duplicate function name for the vt8500 (Dan Carpenter) - Remove obsolete inclusion of for the tegra20 (Geert Uytterhoeven) - Demote the prcmu and the custom sched_clock for the dbx500 and the ux500 (Linus Walleij) - Add a new timer clock for the RDA8810PL (Manivannan Sadhasivam) - Rename the macro to stick to the register name and add the delay timer (Martin Blumenstingl) - Switch the bcm2835 to the SPDX identifier (Stefan Wahren) - Fix the interrupt register access on the fttmr010 (Tao Ren) - Add missing of_node_put in the initialization path on the integrator-ap (Yangtao Li) commit 149d3845f4a548dbc83932fab3491aeb0b070b3a Author: Jason Gunthorpe Date: Fri Nov 30 13:16:47 2018 +0200 RDMA/uverbs: Add a method to introspect handles in a context Introduce a helper function gather_objects_handle() to copy object handles under a spin lock. Expose these objects handles via the uverbs ioctl interface. Signed-off-by: Jason Gunthorpe Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky commit 3c3d71013c7655b9cc4043c9f8845f0c4402d71d Author: Alexandre Belloni Date: Tue Dec 18 22:42:23 2018 +0100 rtc: pcf2123: Add Microcrystal rv2123 Add a compatible string for Microcrystal rv2123 as the reset procedure seem to be differing. However, the current driver works just fine. Signed-off-by: Alexandre Belloni commit a26944149374c19d92f785108b6980f2e54bb517 Author: Alexandre Belloni Date: Tue Dec 18 22:15:58 2018 +0100 rtc: class: reimplement devm_rtc_device_register Implement devm_rtc_device_register using devm_rtc_allocate_device and __rtc_register_device so there is only one path left to register rtc devices. Also mark it as deprecated so new drivers will hopefully use devm_rtc_allocate_device and rtc_register_device that are less race prone and allow avoiding the 2038, 2070, 2100 and 2106 bugs properly. Signed-off-by: Alexandre Belloni commit 9a03201170d3de1da47c1b7e2d514e0b15477881 Author: Alexandre Belloni Date: Tue Dec 18 22:11:26 2018 +0100 rtc: enforce rtc_timer_init private_data type All the remaining users of rtc_timers are passing the rtc_device as private data. Enforce that and rename private_data to rtc. Suggested-by: Arnd Bergmann Signed-off-by: Alexandre Belloni commit ffe1c5a2d4271a0e04e2576ab0a53ac09a14e065 Author: Marek Vasut Date: Fri Dec 7 18:40:53 2018 +0100 rtc: abx80x: Implement RTC_VL_READ,CLR ioctls Implement standard ioctls for polling the battery status and clearing the battery low indication from userspace. Signed-off-by: Marek Vasut Cc: Alexandre Belloni Signed-off-by: Alexandre Belloni commit 350b4c8ac1b4c07909ab7f8ad4303fff2505ab7c Author: Yuval Shaia Date: Tue Dec 11 10:36:47 2018 +0200 IB/mlx4: Utilize macro to calculate SQ spare size The macro MLX4_IB_SQ_HEADROOM calculates the spare room needed to be left. Use it instead of hard-coding the HW prefetch size. Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7f83a1327962b9b3712866db8cbafbdee239cce4 Author: Manivannan Sadhasivam Date: Mon Dec 10 23:05:46 2018 +0530 clocksource/drivers/rda: Add clock driver for RDA8810PL SoC Add clock driver for RDA Micro RDA8810PL SoC supporting OSTIMER and HWTIMER. RDA8810PL has two independent timers: OSTIMER (56 bit) and HWTIMER (64 bit). Each timer provides optional interrupt support. In this driver, OSTIMER is used for clockevents and HWTIMER is used for clocksource. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Signed-off-by: Daniel Lezcano commit adab4ec3c2341d0939a3a83b81320a934c64c3e2 Author: Daniel Lezcano Date: Sun Dec 9 17:40:14 2018 +0100 clocksource/drivers/meson6: Change name meson6_timer timer-meson6 In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Signed-off-by: Daniel Lezcano commit 493d09b7a7f5b23f176b00f944ad77e9e0c84672 Author: Daniel Lezcano Date: Sun Dec 9 17:38:54 2018 +0100 clocksource/drivers/sun4i: Change name sun4i_timer to timer-sun4i In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Signed-off-by: Daniel Lezcano commit f155ae2c35c9ea8ce52f3ac670ced0eb23eded19 Author: Daniel Lezcano Date: Sun Dec 9 17:37:13 2018 +0100 clocksource/drivers/tegra20: Change name tegra20_timer to timer-tegra20 In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Signed-off-by: Daniel Lezcano commit 2d3bc644dd161c6c3e92dac74a4112c0411d4698 Author: Daniel Lezcano Date: Sun Dec 9 17:35:44 2018 +0100 clocksource/drivers/rockchip: Change name rockchip_timer to timer-rockchip In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Signed-off-by: Daniel Lezcano commit 3d42b32b1d6bdee161f6d629fc850fdf0c0fb2a1 Author: Daniel Lezcano Date: Sun Dec 9 17:34:04 2018 +0100 clocksource/drivers/riscv: Change name riscv_timer to timer-riscv In order to unify the names in this directory, let's rename the driver to be prefixed with timer-* Reviewed-by: Palmer Dabbelt Signed-off-by: Daniel Lezcano commit 92e0d143fdef1faa7560c93fb0d6cd6c61da88ee Author: Anup Patel Date: Tue Dec 4 15:59:52 2018 +0530 clocksource/drivers/riscv_timer: Provide the sched_clock Currently, we don't have a sched_clock registered for RISC-V systems. This means Linux time keeping will use jiffies (running at HZ) as the default sched_clock. To avoid this, we explicity provide sched_clock using RISC-V rdtime instruction (similar to riscv_timer clocksource). Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Daniel Lezcano commit 4f352d1fc5a8d3220e29766a26172eff34867014 Author: Anson Huang Date: Fri Dec 7 06:05:36 2018 +0000 clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of i.MX TPM needs "ipg" clock for register access and "per" clock for timer function, the driver gets "ipg" clock by searching the clock name, but timer-of initialization will get first clock in device tree TPM node since no clock name specified in of_clk, that means the "per" clock MUST be the first clock entry in device tree TPM node, this patch specifies clock name for of_clk to avoid this restriction, it makes TPM driver work properly with different sequence of clock entries in device tree TPM node. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano commit 86fe57fc47b17b3528fa5497fc57e158d846c4ea Author: Tao Ren Date: Wed Oct 3 14:53:50 2018 -0700 clocksource/drivers/fttmr010: Fix invalid interrupt register access TIMER_INTR_MASK register (Base Address of Timer + 0x38) is not designed for masking interrupts on ast2500 chips, and it's not even listed in ast2400 datasheet, so it's not safe to access TIMER_INTR_MASK on aspeed chips. Similarly, TIMER_INTR_STATE register (Base Address of Timer + 0x34) is not interrupt status register on ast2400 and ast2500 chips. Although there is no side effect to reset the register in fttmr010_common_init(), it's just misleading to do so. Besides, "count_down" is renamed to "is_aspeed" in "fttmr010" structure, and more comments are added so the code is more readble. Signed-off-by: Tao Ren Reviewed-by: Linus Walleij Signed-off-by: Daniel Lezcano commit 5eb73c831171115d3b4347e1e7124a5a35d8086c Author: Yangtao Li Date: Sun Nov 25 00:00:49 2018 -0500 clocksource/drivers/integrator-ap: Add missing of_node_put() The function of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. integrator_ap_timer_init_of() doesn't do that. The pri_node and the sec_node are used as an identifier to compare against the current node, so we can directly drop the refcount after getting the node from the path as it is not used as pointer. By dropping the refcount right after getting it, a single variable is needed instead of two. Fix this by use a single variable and drop the refcount right after of_find_node_by_path(). Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano commit 64db8bb157cb8108ae017f00c2d47f03d4ebe8a6 Author: Stefan Wahren Date: Sat Nov 10 16:28:39 2018 +0100 clocksource/drivers/bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Also drop the FSF address. Cc: Simon Arlott Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Daniel Lezcano Signed-off-by: Daniel Lezcano commit e5a805202c8ebb3b27cd8ad1b227158ae9cb9464 Author: Biju Das Date: Mon Nov 19 16:14:13 2018 +0000 dt-bindings: timer: renesas, cmt: Document r8a774a1 CMT support Document SoC specific bindings for RZ/G2M (r8a774a1) SoC. Signed-off-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Daniel Lezcano commit 3825603a8076738d95b430d36896a760d7fc4909 Author: Anson Huang Date: Tue Nov 6 05:15:58 2018 +0000 clocksource/drivers/timer-imx-tpm: Convert the driver to timer-of Convert the driver to use the timer_of helpers. This allows to handle timer base, clock and irq using common timer_of driver and it simplifies the code. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano commit bf287607c80f24387fedb431a346dc67f25be12c Author: Alexey Brodkin Date: Mon Nov 19 14:29:17 2018 +0300 clocksource/drivers/arc_timer: Utilize generic sched_clock It turned out we used to use default implementation of sched_clock() from kernel/sched/clock.c which was as precise as 1/HZ, i.e. by default we had 10 msec granularity of time measurement. Now given ARC built-in timers are clocked with the same frequency as CPU cores we may get much higher precision of time tracking. Thus we switch to generic sched_clock which really reads ARC hardware counters. This is especially helpful for measuring short events. That's what we used to have: ------------------------------>8------------------------ $ perf stat /bin/sh -c /root/lmbench-master/bin/arc/hello > /dev/null Performance counter stats for '/bin/sh -c /root/lmbench-master/bin/arc/hello': 10.000000 task-clock (msec) # 2.832 CPUs utilized 1 context-switches # 0.100 K/sec 1 cpu-migrations # 0.100 K/sec 63 page-faults # 0.006 M/sec 3049480 cycles # 0.305 GHz 1091259 instructions # 0.36 insn per cycle 256828 branches # 25.683 M/sec 27026 branch-misses # 10.52% of all branches 0.003530687 seconds time elapsed 0.000000000 seconds user 0.010000000 seconds sys ------------------------------>8------------------------ And now we'll see: ------------------------------>8------------------------ $ perf stat /bin/sh -c /root/lmbench-master/bin/arc/hello > /dev/null Performance counter stats for '/bin/sh -c /root/lmbench-master/bin/arc/hello': 3.004322 task-clock (msec) # 0.865 CPUs utilized 1 context-switches # 0.333 K/sec 1 cpu-migrations # 0.333 K/sec 63 page-faults # 0.021 M/sec 2986734 cycles # 0.994 GHz 1087466 instructions # 0.36 insn per cycle 255209 branches # 84.947 M/sec 26002 branch-misses # 10.19% of all branches 0.003474829 seconds time elapsed 0.003519000 seconds user 0.000000000 seconds sys ------------------------------>8------------------------ Note how much more meaningful is the second output - time spent for execution pretty much matches number of cycles spent (we're runnign @ 1GHz here). Signed-off-by: Alexey Brodkin Cc: Daniel Lezcano Cc: Vineet Gupta Cc: Thomas Gleixner Cc: stable@vger.kernel.org Acked-by: Vineet Gupta Signed-off-by: Daniel Lezcano commit 2bbaf54216448486def1153486778a975a73041d Author: Biju Das Date: Fri Oct 26 09:36:13 2018 +0100 dt-bindings: timer: renesas, cmt: Document r8a77470 CMT support Document SoC specific compatible strings for r8a77470. No driver change is needed as the fallback strings will activate the right code. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano commit f9135ffa8a272bde9928e75ce14d02d4496159ae Author: Biju Das Date: Fri Oct 26 09:01:44 2018 +0100 dt-bindings: timer: renesas, cmt: Document r8a7796 CMT support Document SoC specific bindings for R-Car M3-W (r8a7796) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano commit ec3372f28f7bf589388780df5eda945d4cdd7c4b Author: Clément Péron Date: Mon Nov 5 15:15:11 2018 +0100 clocksource/drivers/imx-gpt: Remove unnecessary irq protection shutdown and oneshot are already protected against irq interruptions Signed-off-by: Clément Péron Signed-off-by: Daniel Lezcano commit df181e38281602bb404c5c8158a87317274dc653 Author: Anson Huang Date: Mon Nov 5 01:10:27 2018 +0000 clocksource/drivers/imx-gpt: Add support for ARM64 This patch allows building and compile-testing the i.MX GPT driver also for ARM64. The delay_timer is only supported on ARMv7. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano commit fa83c6f45aa560f814adfdf1a0bf523c1157dfe1 Author: Martin Blumenstingl Date: Thu Nov 15 23:46:57 2018 +0100 clocksource/drivers/meson6_timer: Implement the ARM delay timer Implement an ARM delay timer to be used for udelay(). This allows us to skip the delay loop calibration at boot. With this patch udelay() is now independent of CPU frequency changes. This is a good thing on Meson8, Meson8b and Meson8m2 because changing the CPU frequency requires running the CPU clock off the XTAL while changing the PLL or it's dividers. After changing the CPU clocks we need to wait a few usecs for the clock to become stable. So having an udelay() implementation that doesn't depend on the CPU frequency is beneficial. Suggested-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano commit bed8fc137e20df7dabcaff0bf2bfe494766aa556 Author: Martin Blumenstingl Date: Thu Nov 15 23:46:56 2018 +0100 clocksource/drivers/meson6_timer: Use register names from the datasheet This makes the driver use the names from S805 datasheet for the preprocessor #defines. This makes it easier to spot that the driver currently only supports Timer A (as clockevent with interrupt support) and Timer E (as clocksource without interrupts). Timer B, C and D (which are similar to Timer A) are currently not supported by the driver. While here, this also removes the internal "CED_ID" and "CSD_ID" defines which are used to identify the timer. These IDs are not described in the datasheet and thus make it harder to compare the code to what's written in the datasheet. Signed-off-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano commit 7b59263801077e480be79e5f9a3a3bcdefeb05b8 Author: Geert Uytterhoeven Date: Thu Nov 15 11:00:37 2018 +0100 clockevents/drivers/tegra20: Remove obsolete inclusion of As of commit da4a686a2cfb077a ("ARM: smp_twd: convert to use CLKSRC_OF init"), this header file is no longer used. Signed-off-by: Geert Uytterhoeven Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano commit 63136299721b4bfbd51ddd41181ab3a5897958bb Author: Bartosz Golaszewski Date: Wed Nov 14 10:53:12 2018 +0100 clocksource/drivers/timer-ti-dm: Remove the early platform driver registration This driver is no longer used as an early platform driver. Remove the registration macro. Signed-off-by: Bartosz Golaszewski Signed-off-by: Daniel Lezcano commit 85b6fcadcf6626ad520376eacfb2b77090e782ab Author: Linus Walleij Date: Thu Nov 15 14:32:03 2018 +0100 clocksource/drivers/ux500: Drop Ux500 custom SCHED_CLOCK The two drivers used for Ux500 sched_clock use two Kconfig symbols to select which of the two gets used as sched_clock. This isn't right: the workaround is trying to make sure that the NONSTOP timer is used for sched_clock in order to keep that clock ticking consistently over a suspend/resume cycle. (Otherwise sched_clock simply stops during suspend and continues after resume). This will notably affect any timetstamped debug prints, so that they show the absolute number of seconds since the system was booted and does not loose wall-clock time during suspend and resume as if time stood still. The real way to fix this problem is to make sched_clock take advantage of any NONSTOP clock source on the system and adjust accordingly, not to try to work around this by using a different sched_clock depending on what system we are compiling for. This can solve the problem for everyone instead of providing a local solution. Cc: Baolin Wang Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano commit bc0750e464d41e1234f56471b8f626b8d945b1a8 Author: Linus Walleij Date: Thu Nov 15 14:32:02 2018 +0100 clocksource/drivers/dbx500: Demote dbx500 PRCMU clocksource Demote the DBx500 PRCMU clocksource to quality 100 and mark it as NONSTOP so it will still be used for timekeeping across suspend/resume. The Nomadik MTU timer which has higher precision will be used when the system is up and running, thanks to the recent changes properly utilizing the suspend clocksources. This was discussed back in 2011 when the driver was written, but the infrastructure was not available upstream to use this timer properly. Now the infrastructure is there, so let's finalize the work. Cc: Baolin Wang Signed-off-by: Linus Walleij Reviewed-by: Baolin Wang Signed-off-by: Daniel Lezcano commit 30a85eb64347ef16aefba3aa96cb7f2c1615290a Author: Dan Carpenter Date: Sat Oct 13 13:22:22 2018 +0300 clocksource/drivers/timer-vt8500: Remove duplicate function name We print the function name twice in a row in the error message so I've removed one. Signed-off-by: Dan Carpenter Signed-off-by: Daniel Lezcano commit e9dfa53a399545056cf97cf8c996d71dcebb4d7e Author: Dan Carpenter Date: Mon Dec 17 10:08:15 2018 +0300 RDMA/hns: Fix an error code in hns_roce_create_srq() The function accidentally returns success on this error path. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Signed-off-by: Dan Carpenter Acked-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 5050ae5fa3d54c8e83e1e447cc7e3591110a7f57 Author: Dan Carpenter Date: Mon Dec 17 10:05:36 2018 +0300 IB/qib: Fix an error code in qib_sdma_verbs_send() We accidentally return success on this error path. Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") Signed-off-by: Dan Carpenter Signed-off-by: Jason Gunthorpe commit be5914c124bc3179536e5c4598f59aeb4b880517 Author: Parav Pandit Date: Tue Dec 18 14:16:00 2018 +0200 RDMA/core: Delete RoCE GID in hw when corresponding IP is deleted Currently a RoCE GID entry is removed from the hardware when all references to the GID entry drop to zero. This is a change in behavior from before the fixed patch. The GID entry should be removed from the hardware when GID entry deletion is requested. This allows the driver terminate ongoing traffic through the RoCE GID. While a GID is deleted from the hardware, GID slot in the software GID cache is not freed. GID slot is freed once all references of such GID are dropped. This continue to ensure that such GID slot of hardware is not allocated to new GID entry allocation request. It is allocated once all references to GID entry drop. This approach allows drivers to put a tombestone of some kind on the HW GID index to block the traffic. Fixes: b150c3862d21 ("IB/core: Introduce GID entry reference counts") Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ac2f7e623d47fd68d2517f191696fbc96a5d7270 Author: Gal Pressman Date: Tue Dec 18 17:57:32 2018 +0200 RDMA/mlx5: Fix function name typo 'fileds' -> 'fields' Fix typo in 'set_mr_fileds' -> 'set_mr_fields'. Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit b81a327dbc0d07c219ac48b7daf155ea6a51672b Author: Kamal Heib Date: Tue Dec 18 22:55:07 2018 +0200 RDMA/i40iw: Make sure to initialize ib_device_ops The initialization of the ib_device_ops was dropped by mistake when rebasing the ib_device_ops series, this patch fixes that. Fixes: 15644f57cb66 ("RDMA/i40iw: Initialize ib_device_ops struct") Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 8e3b688301863fba914883e3531b406c68cb7501 Author: Leon Romanovsky Date: Wed Dec 12 19:45:53 2018 +0200 RDMA/mlx5: Delete unreachable handle_atomic code by simplifying SW completion Handle atomic was left as unimplemented from 2013, remove the code till this part will be developed. Remove the dead code by simplifying SW completion logic which is supposed to be the same for send and receive paths. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Reported-by: Stephen Rothwell Signed-off-by: Leon Romanovsky Tested-by: Stephen Rothwell # compile tested Signed-off-by: Jason Gunthorpe commit a01aa7680e3dea204c64bb245dc7a6c46e2e15f9 Merge: 77c7a7b3e7da2 af854724e51e4 Author: David S. Miller Date: Tue Dec 18 12:01:02 2018 -0800 Merge branch 'hns3-next' Peng Li says: ==================== net: hns3: code optimizations & bugfixes for HNS3 driver This patchset includes bugfixes and code optimizations for the HNS3 ethernet controller driver ==================== Signed-off-by: David S. Miller commit af854724e51e4047f534ac6d19b3ef9fb3c35c49 Author: Yunsheng Lin Date: Tue Dec 18 19:37:59 2018 +0800 net: hns3: fix a SSU buffer checking bug When caculating the SSU buffer, it first allocate tx and rx private buffer, then the remaining buffer is for rx shared buffer. The remaining buffer size should be at least bigger than or equal to the shared_std, which is the minimum shared buffer size required by the driver, but currently if the remaining buffer size is equal to the shared_std, it returns failure, which causes SSU buffer allocation failure problem. This patch fixes this problem by rounding up shared_std before checking the the remaining buffer size bigger than or equal to the shared_std. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller commit b9a400ac295728b2d47445e09814e1880409b311 Author: Yunsheng Lin Date: Tue Dec 18 19:37:58 2018 +0800 net: hns3: aligning buffer size in SSU to 256 bytes The hardware expects the buffer size set to SSU is aligned to 256 bytes, this patch aligns the buffer size to 256 byte using roundup or rounddown function. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 368686be234daf365ef184a6ee1c4a6c18ede3b1 Author: Yunsheng Lin Date: Tue Dec 18 19:37:57 2018 +0800 net: hns3: getting tx and dv buffer size through firmware This patch adds support of getting tx and dv buffer size through firmware, because different version of hardware requires different size of tx and dv buffer. This patch also add dv_buf_size to tc' private buffer size even if pfc is not enable for the tc. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 0ad5ea5dbd6cb1e62bac547db5e61bab15af4f44 Author: Peng Li Date: Tue Dec 18 19:37:56 2018 +0800 net: hns3: synchronize speed and duplex from phy when phy link up Driver calls phy_connect_direct and registers hclge_mac_adjust_link to synchronize mac speed and duplex from phy. It is better to synchronize mac speed and duplex from phy when phy link up. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 8362089d787724bb252f13f942921051943369c7 Author: Fuyun Liang Date: Tue Dec 18 19:37:55 2018 +0800 net: hns3: remove 1000M/half support of phy Our phy does not support 1000M/half, this patch removes 1000M/half from PHY_SUPPORTED_FEATURES. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 7445565cd064679421e3cf4d440589ee723f6c08 Author: Peng Li Date: Tue Dec 18 19:37:54 2018 +0800 net: hns3: update coalesce param per second coalesce param updates every 100 napi times, it may update a little late if ping test after a high rate flow, may over napi poll is called 100 times as ping test sends packets every second. This patch updates coalesce param every second, instead with every 100 napi times. It can not update the param 100% in time, but the lag time is very short. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit ae6017a71115ebc4e5c1a3f0f451319ab3f5c447 Author: Huazhong Tan Date: Tue Dec 18 19:37:53 2018 +0800 net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() In the hns3_nic_uninit_vector_data(), the procedure of uninitializing the tqp_vector's IRQ has not set affinity_notify to NULL and changes its init flag. This patch fixes it. And for simplificaton, local variable tqp_vector is used instead of priv->tqp_vector[i]. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit b51c366df70da0100193d13975980f1990a2d47b Author: Huazhong Tan Date: Tue Dec 18 19:37:52 2018 +0800 net: hns3: remove unnecessary configuration recapture while resetting When doing reset, it is unnecessary to get the hardware's default configuration again, otherwise, the user's configuration will be overwritten. Fixes: 4ed340ab8f49 ("net: hns3: Add reset process in hclge_main") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit b644a8d4cb18305d31383188da75615490b2c6ef Author: Huazhong Tan Date: Tue Dec 18 19:37:51 2018 +0800 net: hns3: update some variables while hclge_reset()/hclgevf_reset() done When hclge_reset() completes successfully, it should update the last_reset_time, set reset_fail_cnt to 0, and set reset_type of hnae3_ae_dev to HNAE3_NONE_RESET. Also when hclgevf_reset() completes successfully, it should update the last_reset_time, and set reset_type of hnae3_ae_dev to HNAE3_NONE_RESET. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 531eba0fe2b5172ed0ab1cc6a311b2b6b9e6b402 Author: Huazhong Tan Date: Tue Dec 18 19:37:50 2018 +0800 net: hns3: fix napi_disable not return problem While doing DOWN, the calling of napi_disable() may not return, since the napi_complete() in the hns3_nic_common_poll() will never be called when HNS3_NIC_STATE_DOWN is set. So we need to call napi_complete() before checking HNS3_NIC_STETE_DOWN. Fixes: ff0699e04b97 ("net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit e3338205f0c700caae52a36cd0e3a815e6efd281 Author: Huazhong Tan Date: Tue Dec 18 19:37:49 2018 +0800 net: hns3: uninitialize pci in the hclgevf_uninit In the hclgevf_pci_reset(), it only uninitialize and initialize the msi, so if the initialization fails, hclgevf_uninit_hdev() does not need to uninitialize the msi, but needs to uninitialize the pci, otherwise it will cause pci resource not free. Fixes: 862d969a3a4d ("net: hns3: do VF's pci re-initialization while PF doing FLR") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit cda69d244585bc4497d3bb878c22fe2b6ad647c1 Author: Huazhong Tan Date: Tue Dec 18 19:37:48 2018 +0800 net: hns3: fix error handling int the hns3_get_vector_ring_chain When hns3_get_vector_ring_chain() failed in the hns3_nic_init_vector_data(), it should do the error handling instead of return directly. Also, cur_chain should be freed instead of chain and head->next should be set to NULL in error handling of hns3_get_vector_ring_chain. This patch fixes them. Fixes: 73b907a083b8 ("net: hns3: bugfix for buffer not free problem during resetting") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit c6d6e9b0f6b4201c77f2cea3964dd122697e3543 Author: Jaegeuk Kim Date: Tue Dec 18 09:25:37 2018 -0800 dm: do not allow readahead to limit IO size Update DM to set the bdi's io_pages. This fixes reads to be capped at the device's max request size (even if user's read IO exceeds the established readahead setting). Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting") Cc: stable@vger.kernel.org Reviewed-by: Jens Axboe Signed-off-by: Jaegeuk Kim Signed-off-by: Mike Snitzer commit 89a0948984896352cac1ebe079cb3d64d6c3adc6 Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 12:53:06 2018 -0300 tools uapi asm: Update asm-generic/unistd.h copy To get the change in: b7d624ab4312 ("asm-generic: unistd.h: fixup broken macro include.") That doesn't imply in any changes in the tools. This silences the following perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Cc: Adrian Hunter Cc: Arnd Bergmann Cc: Guo Ren Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-2e7xwm5i2qcc88jp2lyawdyd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bc055c54b887961bc3545c54e61c844fd4499c2b Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 12:39:08 2018 -0300 perf symbols: Relax checks on perf-PID.map ownership Those are simple enough, and usually not produced by root, instead by whatever user is running java, rust, Node.js JIT code that end up generating those /tmp/perf-PID.map for resolution of symbols in the anonymous executable maps. Having to use --force to resolve symbols in 'perf top' is a distraction, as recently I experienced when node.js symbols were not being resolved by 'perf top'. Acked-by: Ingo Molnar Cc: Adrian Hunter Cc: Frederic Weisbecker Cc: Hítalo Silva Cc: Jiri Olsa Cc: Namhyung Kim Cc: Pekka Enberg Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-tk2jgo2v4v2yjuj28axbpppo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 42337cb768ad9536150603b206acd6bbd320e75e Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 11:54:31 2018 -0300 perf trace: Wire up the fadvise 'advice' table generator That ends up generating this: $ cat /tmp/build/perf/trace/beauty/generated/fadvise_advice_array.c static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zwbslubagram8a8zdc003u8h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 069c1c6cc3646454f9c8e83084a25f8eb8cab7ae Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 11:49:58 2018 -0300 perf beauty: Add generator for fadvise64's 'advice' arg constants $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ This has a hack wrt the s390 difference. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-tb7jguv01u8p570piq13eioh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f9cdd63e79946d2f635d5c23d76811c2d710aa5c Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 16:15:53 2018 -0300 tools headers uapi: Grab a copy of fadvise.h Will be used to generate the string table for fadvise64's 'advice' argument. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-muswpnft8q9krktv052yrgsc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a66313408a08a9758e3007fe9a6cfe47b0dec88b Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 11:25:08 2018 -0300 perf beauty mmap: Print mmap's 'offset' arg in hexadecimal Also to make it match 'strace' output, for regression testing. Both now produce this option, when 'perf trace' uses a .perfconfig asking for the strace like output: mmap(0x7faf66e6a000, 1363968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7faf66e6a000 Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-27qhouo1kaac2iyl85nfnsf5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1355e09ab04bc583df9c4b2b68d445c535c8b66b Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 11:22:34 2018 -0300 perf beauty mmap: Print PROT_READ before PROT_EXEC to match strace output Helps with comparing 'strace' and 'perf trace' output, for mutual regression testing. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-va0qe95xbhep5hy52aq5qe0v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fb7068e73d2c24ba381938004ed0f285341ef1ba Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 11:05:56 2018 -0300 perf trace beauty: Beautify arch_prctl()'s arguments This actually so far, AFAIK is available only in x86, so the code was put in place with x86 prefixes, in arches where it is not available it will just not be called, so no further mechanisms are needed at this time. Later, when other arches wire this up, we'll just look at the uname (live sessions) or perf_env data in the perf.data header to auto-wire the right beautifier. With this the output is the same as produced by 'strace' when used with the following ~/.perfconfig: # cat ~/.perfconfig [llvm] dump-obj = true [trace] add_events = /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o show_zeros = yes show_duration = no no_inherit = yes show_timestamp = no show_arg_names = no args_alignment = -40 show_prefix = yes # And, on fedora 29, since the string tables are generated from the kernel sources, we don't know about 0x3001, just like strace: --- /tmp/strace 2018-12-17 11:22:08.707586721 -0300 +++ /tmp/trace 2018-12-18 11:11:32.037512729 -0300 @@ -1,49 +1,49 @@ -arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc8a92dc80) = -1 EINVAL (Invalid argument) +arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe4eb93ae0) = -1 EINVAL (Invalid argument) -arch_prctl(ARCH_SET_FS, 0x7faf6700f540) = 0 +arch_prctl(ARCH_SET_FS, 0x7fb507364540) = 0 And that seems to be related to the CET/Shadow Stack feature, that userland in Fedora 29 (glibc 2.28) are querying the kernel about, that 0x3001 seems to be ARCH_CET_STATUS, I'll check the situation and test with a fedora 29 kernel to see if the other codes are used. A diff that ignores the different pointers for different runs needs to be put in place in the upcoming regression tests comparing 'perf trace's output to strace's. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-73a9prs8ktkrt97trtdmdjs8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9614b8d697350d529743702f095b3db3f6d5a889 Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 10:54:19 2018 -0300 perf trace: When showing string prefixes show prefix + ??? for unknown entries To match 'strace' output, like in: arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc8a92dc80) = -1 EINVAL (Invalid argument) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-kx59j2dk5l1x04ou57mt99ck@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1f2d085e0f25a40eeb0ac032fd399be94f866adb Author: Arnaldo Carvalho de Melo Date: Tue Dec 18 10:25:28 2018 -0300 perf trace: Move strarrays to beauty.h for further reuse We'll use it in the upcoming arch_prctl() 'code' arg beautifier. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6e4tj2fjen8qa73gy4u49vav@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 40714e8b37723c31aa1b48dd2f346c3827059957 Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 17:00:14 2018 -0300 perf beauty: Wire up the x86_arch prctl code table generator $ cat /tmp/build/perf/trace/beauty/generated/x86_arch_prctl_code_array.c #define x86_arch_prctl_codes_1_offset 0x1001 static const char *x86_arch_prctl_codes_1[] = { [0x1001 - 0x1001]= "SET_GS", [0x1002 - 0x1001]= "SET_FS", [0x1003 - 0x1001]= "GET_FS", [0x1004 - 0x1001]= "GET_GS", [0x1011 - 0x1001]= "GET_CPUID", [0x1012 - 0x1001]= "SET_CPUID", }; #define x86_arch_prctl_codes_2_offset 0x2001 static const char *x86_arch_prctl_codes_2[] = { [0x2001 - 0x2001]= "MAP_VDSO_X32", [0x2002 - 0x2001]= "MAP_VDSO_32", [0x2003 - 0x2001]= "MAP_VDSO_64", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-3r9blij6n8wdlsyd5dujx86r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ff4cb769bc2dcc9a74a1c29e403bcfaf789365ef Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 16:11:37 2018 -0300 perf beauty: Add a string table generator for x86's 'arch_prctl' codes $ tools/perf/trace/beauty/x86_arch_prctl.sh #define x86_arch_prctl_codes_1_offset 0x1001 static const char *x86_arch_prctl_codes_1[] = { [0x1001 - 0x1001]= "SET_GS", [0x1002 - 0x1001]= "SET_FS", [0x1003 - 0x1001]= "GET_FS", [0x1004 - 0x1001]= "GET_GS", [0x1011 - 0x1001]= "GET_CPUID", [0x1012 - 0x1001]= "SET_CPUID", }; #define x86_arch_prctl_codes_2_offset 0x2001 static const char *x86_arch_prctl_codes_2[] = { [0x2001 - 0x2001]= "MAP_VDSO_X32", [0x2002 - 0x2001]= "MAP_VDSO_32", [0x2003 - 0x2001]= "MAP_VDSO_64", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-w0fux1psivphhx6rve8kn3vq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c22e2683c0cbfb8dcac84529d29386b094cd78cf Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 16:15:27 2018 -0300 tools include arch: Grab a copy of x86's prctl.h We need it to generate the tables for the 'code' arch_prctl's syscall argument. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-vu890pi18fpd4eyz61cazckj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ce05539f20b337221d3310baf73b45317dab067c Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 12:21:09 2018 -0300 perf trace: Show NULL when syscall pointer args are 0 Matching strace's output format. The 'format' file for the syscall tracepoints have an indication if the arg is a pointer, with some exceptions like 'mmap' that has its first arg as an 'unsigned long', so use a heuristic using the argument name, i.e. if it contains the 'addr' substring, format it with the pointer formatter. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ddghemr8qrm6i0sb8awznbze@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2c83dfae021306d528b21dceb8d128ca16524c5a Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 12:06:34 2018 -0300 perf trace: Enclose the errno strings with () To match strace, now both emit the same line for calls like: access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-krxl6klsqc9qyktoaxyih942@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c48ee107bb387f76b089e0c30e1fed26e8d921f0 Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 11:59:35 2018 -0300 perf augmented_raw_syscalls: Copy 'access' arg as well This will all come from userspace, but to test the changes to make 'perf trace' output similar to strace's, do this one more now manually. To update the precompiled augmented_raw_syscalls.o binary I just run: # perf record -e ~acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c sleep 1 LLVM: dumping /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.022 MB perf.data ] # Because to have augmented_raw_syscalls to be always used and a fast startup and remove the need to have the llvm toolchain installed, I'm using: # perf config | grep add_events trace.add_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o # So when doing changes to augmented_raw_syscals.c one needs to rebuild the .o file. This will be done automagically later, i.e. have a 'make' behaviour of recompiling when the .c gets changed. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-lw3i2atyq8549fpqwmszn3qp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4b8a240ed5e0a4e6b53c994ddfcff86a06879a66 Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 11:48:46 2018 -0300 perf trace: Add alignment spaces after the closing parens To use strace's style, helping in comparing the output of 'perf trace' with the one from 'strace', to help in upcoming regression tests. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mw6peotz4n84rga0fk78buff@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4785860e04bc8d7e244b25257168e1cf8a5529ab Author: Jason Gunthorpe Date: Fri Nov 30 13:06:21 2018 +0200 RDMA/uverbs: Implement an ioctl that can call write and write_ex handlers Now that the handlers do not process their own udata we can make a sensible ioctl that wrappers them. The ioctl follows the same format as the write_ex() and has the user explicitly specify the core and driver in/out opaque structures and a command number. This works for all forms of write commands. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 601d66d43309534eb7a268bdc42c205521014645 Author: Arnaldo Carvalho de Melo Date: Mon Dec 17 11:55:57 2018 -0300 perf trace beauty: Print O_RDONLY when (flags & O_ACCMODE) == 0 And there are more flags, to match strace's output. openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 Also to help with regression tests. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ofovpmvdli3bwch30936xn7t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c65c83ffe904590162bd762be185ac4d53ce5a85 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 17:06:47 2018 -0300 perf trace: Allow asking for not suppressing common string prefixes So far we've been suppressing common stuff such as "MAP_" in the mmap flags, showing "SHARED" instead of "MAP_SHARED", allow for those prefixes (and a few suffixes) to be shown: # trace -e *map,open*,*seek sleep 1 openat("/etc/ld.so.cache", CLOEXEC) = 3 mmap(0, 109093, READ, PRIVATE, 3, 0) = 0x7ff61c695000 openat("/lib64/libc.so.6", CLOEXEC) = 3 lseek(3, 792, SET) = 792 mmap(0, 8192, READ|WRITE, PRIVATE|ANONYMOUS) = 0x7ff61c693000 lseek(3, 792, SET) = 792 lseek(3, 864, SET) = 864 mmap(0, 1857568, READ, PRIVATE|DENYWRITE, 3, 0) = 0x7ff61c4cd000 mmap(0x7ff61c4ef000, 1363968, EXEC|READ, PRIVATE|FIXED|DENYWRITE, 3, 139264) = 0x7ff61c4ef000 mmap(0x7ff61c63c000, 311296, READ, PRIVATE|FIXED|DENYWRITE, 3, 1503232) = 0x7ff61c63c000 mmap(0x7ff61c689000, 24576, READ|WRITE, PRIVATE|FIXED|DENYWRITE, 3, 1814528) = 0x7ff61c689000 mmap(0x7ff61c68f000, 14368, READ|WRITE, PRIVATE|FIXED|ANONYMOUS) = 0x7ff61c68f000 munmap(0x7ff61c695000, 109093) = 0 openat("/usr/lib/locale/locale-archive", CLOEXEC) = 3 mmap(0, 217749968, READ, PRIVATE, 3, 0) = 0x7ff60f523000 # # vim ~/.perfconfig # # perf config llvm.dump-obj=true trace.add_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=yes trace.show_duration=no trace.no_inherit=yes trace.show_timestamp=no trace.show_arg_names=no trace.args_alignment=0 trace.string_quote=" trace.show_prefix=yes # # # trace -e *map,open*,*seek sleep 1 openat(AT_FDCWD, "/etc/ld.so.cache", O_CLOEXEC) = 3 mmap(0, 109093, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7ebbe59000 openat(AT_FDCWD, "/lib64/libc.so.6", O_CLOEXEC) = 3 lseek(3, 792, SEEK_SET) = 792 mmap(0, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS) = 0x7f7ebbe57000 lseek(3, 792, SEEK_SET) = 792 lseek(3, 864, SEEK_SET) = 864 mmap(0, 1857568, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7ebbc91000 mmap(0x7f7ebbcb3000, 1363968, PROT_EXEC|PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 139264) = 0x7f7ebbcb3000 mmap(0x7f7ebbe00000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 1503232) = 0x7f7ebbe00000 mmap(0x7f7ebbe4d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 1814528) = 0x7f7ebbe4d000 mmap(0x7f7ebbe53000, 14368, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS) = 0x7f7ebbe53000 munmap(0x7f7ebbe59000, 109093) = 0 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_CLOEXEC) = 3 mmap(0, 217749968, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7eaece7000 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mtn1i4rjowjl72trtnbmvjd4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2e3d7fac9db5e80d1cc26bb1453b85245c26d657 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 15:08:40 2018 -0300 perf trace: Add a prefix member to the strarray class So that the user, in an upcoming patch, can select printing it to get the full string as used in the source code, not one with a common prefix chopped off so as to make the output more compact. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zypczc88gzbmeqx7b372s138@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 721f5326fb35dcba18ee4d9ef2b32394f86d403e Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 14:02:03 2018 -0300 perf trace: Enclose strings with double quotes To match 'strace' output, helping with upcoming regression tests comparing both outputs. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-jab52t1dcuh6vlztqle9g7u9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9ed45d59aeae2211933b032acc4e5b40a1a2fcd3 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 13:40:49 2018 -0300 perf trace: Make the alignment of the syscall args be configurable Since the start 'perf trace' aligns the parens enclosing the list of syscall args to align the syscall results, allow this to be configurable, keeping the default of 70. Using: # perf config llvm.dump-obj=true trace.add_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=yes trace.show_duration=no trace.no_inherit=yes trace.show_timestamp=no trace.show_arg_names=no trace.args_alignment=0 # trace -e open*,close,*sleep sleep 1 openat(CWD, /etc/ld.so.cache, CLOEXEC) = 3 close(3) = 0 openat(CWD, /lib64/libc.so.6, CLOEXEC) = 3 close(3) = 0 openat(CWD, /usr/lib/locale/locale-archive, CLOEXEC) = 3 close(3) = 0 nanosleep(0x7ffc00de66f0, 0) = 0 close(1) = 0 close(2) = 0 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-r8cbhoz1lr5npq9tutpvoigr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f366d3854ec0fec0f9949dac46431598614a956b Merge: ccec4a4a4f27b b422847877e35 Author: Boris Brezillon Date: Tue Dec 18 20:00:52 2018 +0100 Merge tag 'spi-nor/for-4.21' of git://git.infradead.org/linux-mtd into mtd/next Core changes: - Parse the 4BAIT SFDP section - Add a bunch of SPI NOR entries to the flash_info table - Add the concept of SFDP fixups and use it to fix a bug on MX25L25635F - A bunch of minor cleanups/comestic changes commit ccec4a4a4f27b22e51ec6a143319db49b7570581 Merge: 7677ea0e8843e 732774437ae01 Author: Boris Brezillon Date: Tue Dec 18 19:59:16 2018 +0100 Merge tag 'nand/for-4.21' of git://git.infradead.org/linux-mtd into mtd/next NAND core changes: - kernel-doc miscellaneous fixes. - Third batch of fixes/cleanup to the raw NAND core impacting various controller drivers (ams-delta, marvell, fsmc, denali, tegra, vf610): * Stopping to pass mtd_info objects to internal functions * Reorganizing code to avoid forward declarations * Dropping useless test in nand_legacy_set_defaults() * Moving nand_exec_op() to internal.h * Adding nand_[de]select_target() helpers * Passing the CS line to be selected in struct nand_operation * Making ->select_chip() optional when ->exec_op() is implemented * Deprecating the ->select_chip() hook * Moving the ->exec_op() method to nand_controller_ops * Moving ->setup_data_interface() to nand_controller_ops * Deprecating the dummy_controller field * Fixing JEDEC detection * Providing a helper for polling GPIO R/B pin Raw NAND chip drivers changes: - Macronix: * Flagging 1.8V AC chips with a broken GET_FEATURES(TIMINGS) Raw NAND controllers drivers changes: - Ams-delta: * Fixing the error path * SPDX tag added * May be compiled with COMPILE_TEST=y * Conversion to ->exec_op() interface * Dropping .IOADDR_R/W use * Use GPIO API for data I/O - Denali: * Removing denali_reset_banks() * Removing ->dev_ready() hook * Including instead of * Changes to comply with the above fixes/cleanup done in the core. - FSMC: * Adding an SPDX tag to replace the license text * Making conversion from chip to fsmc consistent * Fixing unchecked return value in fsmc_read_page_hwecc * Changes to comply with the above fixes/cleanup done in the core. - Marvell: * Preventing timeouts on a loaded machine (fix) * Changes to comply with the above fixes/cleanup done in the core. - OMAP2: * Pass the parent of pdev to dma_request_chan() (fix) - R852: * Use generic DMA API - sh_flctl: * Converting to SPDX identifiers - Sunxi: * Write pageprog related opcodes to the right register: WCMD_SET (fix) - Tegra: * Stop implementing ->select_chip() - VF610: * Adding an SPDX tag to replace the license text * Changes to comply with the above fixes/cleanup done in the core. - Various trivial/spelling/coding style fixes. SPI-NAND drivers changes: - Removing the depreacated mt29f_spinand driver from staging. - Adding support for: * Toshiba TC58CVG2S0H * GigaDevice GD5FxGQ4xA * Winbond W25N01GV commit a9d25bde1e9b24161dd798e1d23eb7eb9674012a Author: Nick Bowler Date: Mon Dec 17 09:35:27 2018 -0800 xfs: Fix x32 ioctls when cmd numbers differ from ia32. Several ioctl structs change size between native 32-bit (ia32) and x32 applications, because x32 follows the native 64-bit (amd64) integer alignment rules and uses 64-bit time_t. In these instances, the ioctl number changes so userspace simply gets -ENOTTY. This scenario can be handled by simply adding more cases. Looking at the different ioctls implemented here: - All the ones marked 'No size or alignment issue on any arch' should presumably all be fine. - All the ones under BROKEN_X86_ALIGNMENT are different under integer alignment rules. Since x32 matches amd64 here, we just need both sets of cases handled. - XFS_IOC_SWAPEXT has both integer alignment differences and time_t differences. Since x32 matches amd64 here, we need to add a case which calls the native implementation. - The remaining ioctls have neither 64-bit integers nor time_t, so x32 matches ia32 here and no change is required at this level. The bulkstat ioctl implementations have some pointer chasing which is handled separately. Signed-off-by: Nick Bowler Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7ca860e3c1a74ad6bd8949364073ef1044cad758 Author: Nick Bowler Date: Mon Dec 17 09:35:27 2018 -0800 xfs: Fix bulkstat compat ioctls on x32 userspace. The bulkstat family of ioctls are problematic on x32, because there is a mixup of native 32-bit and 64-bit conventions. The xfs_fsop_bulkreq struct contains pointers and 32-bit integers so that matches the native 32-bit layout, and that means the ioctl implementation goes into the regular compat path on x32. However, the 'ubuffer' member of that struct in turn refers to either struct xfs_inogrp or xfs_bstat (or an array of these). On x32, those structures match the native 64-bit layout. The compat implementation writes out the 32-bit version of these structures. This is not the expected format for x32 userspace, causing problems. Fortunately the functions which actually output these xfs_inogrp and xfs_bstat structures have an easy way to select which output format is required, so we just need a little tweak to select the right format on x32. Signed-off-by: Nick Bowler Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c456d64449efe37da50832b63d91652a85ea1d20 Author: Nick Bowler Date: Mon Dec 17 09:35:27 2018 -0800 xfs: Align compat attrlist_by_handle with native implementation. While inspecting the ioctl implementations, I noticed that the compat implementation of XFS_IOC_ATTRLIST_BY_HANDLE does not do exactly the same thing as the native implementation. Specifically, the "cursor" does not appear to be written out to userspace on the compat path, like it is on the native path. This adjusts the compat implementation to copy out the cursor just like the native implementation does. The attrlist cursor does not require any special compat handling. This fixes xfstests xfs/269 on both IA-32 and x32 userspace, when running on an amd64 kernel. Signed-off-by: Nick Bowler Fixes: 0facef7fb053b ("xfs: in _attrlist_by_handle, copy the cursor back to userspace") Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 74694bcbdf7e28a5ad548cdda9ac56d30be00d13 Author: Heinz Mauelshagen Date: Tue Dec 18 17:35:41 2018 +0100 dm raid: fix false -EBUSY when handling check/repair message Sending a check/repair message infrequently leads to -EBUSY instead of properly identifying an active resync. This occurs because raid_message() is testing recovery bits in a racy way. Fix by calling decipher_sync_action() from raid_message() to properly identify the idle state of the RAID device. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit ff3730a497cd636e53d4cac5cbb9652b76de9ef5 Merge: c5f48c0a7aa1a fb94109b764e7 Author: Thomas Gleixner Date: Tue Dec 18 18:37:27 2018 +0100 Merge tag 'irqchip-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - A bunch of new irqchip drivers (RDA8810PL, Madera, imx-irqsteer) - Updates for new (and old) platforms (i.MX8MQ, F1C100s) - A number of SPDX cleanups - A workaround for a very broken GICv3 implementation - A platform-msi fix - Various cleanups commit 41c4f85cdac280d356df1f483000ecec4a8868be Author: Javier Barrio Date: Thu Dec 13 01:06:29 2018 +0100 quota: Lock s_umount in exclusive mode for Q_XQUOTA{ON,OFF} quotactls. Commit 1fa5efe3622db58cb8c7b9a50665e9eb9a6c7e97 (ext4: Use generic helpers for quotaon and quotaoff) made possible to call quotactl(Q_XQUOTAON/OFF) on ext4 filesystems with sysfile quota support. This leads to calling dquot_enable/disable without s_umount held in excl. mode, because quotactl_cmd_onoff checks only for Q_QUOTAON/OFF. The following WARN_ON_ONCE triggers (in this case for dquot_enable, ext4, latest Linus' tree): [ 117.807056] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: quota,prjquota [...] [ 155.036847] WARNING: CPU: 0 PID: 2343 at fs/quota/dquot.c:2469 dquot_enable+0x34/0xb9 [ 155.036851] Modules linked in: quota_v2 quota_tree ipv6 af_packet joydev mousedev psmouse serio_raw pcspkr i2c_piix4 intel_agp intel_gtt e1000 ttm drm_kms_helper drm agpgart fb_sys_fops syscopyarea sysfillrect sysimgblt i2c_core input_leds kvm_intel kvm irqbypass qemu_fw_cfg floppy evdev parport_pc parport button crc32c_generic dm_mod ata_generic pata_acpi ata_piix libata loop ext4 crc16 mbcache jbd2 usb_storage usbcore sd_mod scsi_mod [ 155.036901] CPU: 0 PID: 2343 Comm: qctl Not tainted 4.20.0-rc6-00025-gf5d582777bcb #9 [ 155.036903] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 155.036911] RIP: 0010:dquot_enable+0x34/0xb9 [ 155.036915] Code: 41 56 41 55 41 54 55 53 4c 8b 6f 28 74 02 0f 0b 4d 8d 7d 70 49 89 fc 89 cb 41 89 d6 89 f5 4c 89 ff e8 23 09 ea ff 85 c0 74 0a <0f> 0b 4c 89 ff e8 8b 09 ea ff 85 db 74 6a 41 8b b5 f8 00 00 00 0f [ 155.036918] RSP: 0018:ffffb09b00493e08 EFLAGS: 00010202 [ 155.036922] RAX: 0000000000000001 RBX: 0000000000000008 RCX: 0000000000000008 [ 155.036924] RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff9781b67cd870 [ 155.036926] RBP: 0000000000000002 R08: 0000000000000000 R09: 61c8864680b583eb [ 155.036929] R10: ffffb09b00493e48 R11: ffffffffff7ce7d4 R12: ffff9781b7ee8d78 [ 155.036932] R13: ffff9781b67cd800 R14: 0000000000000004 R15: ffff9781b67cd870 [ 155.036936] FS: 00007fd813250b88(0000) GS:ffff9781ba000000(0000) knlGS:0000000000000000 [ 155.036939] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 155.036942] CR2: 00007fd812ff61d6 CR3: 000000007c882000 CR4: 00000000000006b0 [ 155.036951] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 155.036953] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 155.036955] Call Trace: [ 155.037004] dquot_quota_enable+0x8b/0xd0 [ 155.037011] kernel_quotactl+0x628/0x74e [ 155.037027] ? do_mprotect_pkey+0x2a6/0x2cd [ 155.037034] __x64_sys_quotactl+0x1a/0x1d [ 155.037041] do_syscall_64+0x55/0xe4 [ 155.037078] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 155.037105] RIP: 0033:0x7fd812fe1198 [ 155.037109] Code: 02 77 0d 48 89 c1 48 c1 e9 3f 75 04 48 8b 04 24 48 83 c4 50 5b c3 48 83 ec 08 49 89 ca 48 63 d2 48 63 ff b8 b3 00 00 00 0f 05 <48> 89 c7 e8 c1 eb ff ff 5a c3 48 63 ff b8 bb 00 00 00 0f 05 48 89 [ 155.037112] RSP: 002b:00007ffe8cd7b050 EFLAGS: 00000206 ORIG_RAX: 00000000000000b3 [ 155.037116] RAX: ffffffffffffffda RBX: 00007ffe8cd7b148 RCX: 00007fd812fe1198 [ 155.037119] RDX: 0000000000000000 RSI: 00007ffe8cd7cea9 RDI: 0000000000580102 [ 155.037121] RBP: 00007ffe8cd7b0f0 R08: 000055fc8eba8a9d R09: 0000000000000000 [ 155.037124] R10: 00007ffe8cd7b074 R11: 0000000000000206 R12: 00007ffe8cd7b168 [ 155.037126] R13: 000055fc8eba8897 R14: 0000000000000000 R15: 0000000000000000 [ 155.037131] ---[ end trace 210f864257175c51 ]--- and then the syscall proceeds without s_umount locking. This patch locks the superblock ->s_umount sem. in exclusive mode for all Q_XQUOTAON/OFF quotactls too in addition to Q_QUOTAON/OFF. AFAICT, other than ext4, only xfs and ocfs2 are affected by this change. The VFS will now call in xfs_quota_* functions with s_umount held, which wasn't the case before. This looks good to me but I can not say for sure. Ext4 and ocfs2 where already beeing called with s_umount exclusive via quota_quotaon/off which is basically the same. Signed-off-by: Javier Barrio Signed-off-by: Jan Kara commit 58f9d806d16a38ed3bae11e2ada83393436a4956 Author: Oleksandr Andrushchenko Date: Fri Nov 30 09:42:05 2018 +0200 ALSA: xen-front: Use Xen common shared buffer implementation Use page directory based shared buffer implementation now available as common code for Xen frontend drivers. Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Takashi Iwai Signed-off-by: Boris Ostrovsky commit 5641f19bdfc4193f1c2d5a829896c25dd5c0ec3d Author: Oleksandr Andrushchenko Date: Fri Nov 30 09:42:04 2018 +0200 drm/xen-front: Use Xen common shared buffer implementation Use page directory based shared buffer implementation now available as common code for Xen frontend drivers. Remove flushing of shared buffer on page flip as this workaround needs a proper fix. Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Noralf Trønnes Signed-off-by: Boris Ostrovsky commit b3383974fee272ad0d444a2d083f456879447cd8 Author: Oleksandr Andrushchenko Date: Fri Nov 30 09:42:03 2018 +0200 xen: Introduce shared buffer helpers for page directory... based frontends. Currently the frontends which implement similar code for sharing big buffers between frontend and backend are para-virtualized DRM and sound drivers. Both define the same way to share grant references of a data buffer with the corresponding backend with little differences. Move shared code into a helper module, so there is a single implementation of the same functionality for all. This patch introduces code which is used by sound and display frontend drivers without functional changes with the intention to remove shared code from the corresponding drivers. Signed-off-by: Oleksandr Andrushchenko Acked-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 6ab7d47bcbf0144a8cb81536c2cead4cde18acfe Author: Dennis Zhou Date: Tue Dec 18 08:42:27 2018 -0800 percpu: convert spin_lock_irq to spin_lock_irqsave. From Michael Cree: "Bisection lead to commit b38d08f3181c ("percpu: restructure locking") as being the cause of lockups at initial boot on the kernel built for generic Alpha. On a suggestion by Tejun Heo that: So, the only thing I can think of is that it's calling spin_unlock_irq() while irq handling isn't set up yet. Can you please try the followings? 1. Convert all spin_[un]lock_irq() to spin_lock_irqsave/unlock_irqrestore()." Fixes: b38d08f3181c ("percpu: restructure locking") Reported-and-tested-by: Michael Cree Acked-by: Tejun Heo Signed-off-by: Dennis Zhou commit ff8519f9e91170cd24ed503aa77d144e71bd4d92 Author: Sagi Grimberg Date: Fri Dec 14 11:06:10 2018 -0800 nvme-rdma: implement polling queue map When passed with nr_poll_queues setup additional queues with cq polling context IB_POLL_DIRECT (no interrupts) and make sure to set QUEUE_FLAG_POLL on the connect_q. In addition add the third queue mapping for polling queues. nvmf connect on this queue is polled for like all other requests so make nvmf_connect_io_queue poll for polling queues. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 89d43802b0e7298bc0b464bdb5fff864074e2218 Author: Sagi Grimberg Date: Fri Dec 14 11:06:09 2018 -0800 nvme-fabrics: allow user to pass in nr_poll_queues This argument will specify how many polling I/O queues to connect when creating the controller. These I/O queues will host I/O that is set with REQ_HIPRI. Reviewed-by: Steve Wise Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 26c682274e0a7d055e123499eac8ec39d0e04283 Author: Sagi Grimberg Date: Fri Dec 14 11:06:08 2018 -0800 nvme-fabrics: allow nvmf_connect_io_queue to poll Preparation for polling support for fabrics. Polling support means that our completion queues are not generating any interrupts which means we need to poll for the nvmf io queue connect as well. Reviewed by Steve Wise Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6287b51c77e6d8f05f772931cf51d80e81651a9f Author: Sagi Grimberg Date: Fri Dec 14 11:06:07 2018 -0800 nvme-core: optionally poll sync commands Pass poll bool to indicate that we need it to poll. This prepares us for polling support in nvmf since connect is an I/O that will be queued and has to be polled in order to complete. If poll is passed, we call nvme_execute_rq_polled which sends the requests and polls for its completion. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 7b7ab780a048699d2b9f416bf2d5c089d8d1028c Author: Sagi Grimberg Date: Fri Dec 14 11:06:06 2018 -0800 block: make request_to_qc_t public block consumers will need it for polling requests that are sent with blk_execute_rq_nowait. Also, get rid of blk_tag_to_qc_t and open-code it instead. Reviewed-by: Jens Axboe Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 56a77d26d6316a3936497236c7e3a6a98fad950c Author: Colin Ian King Date: Fri Dec 14 11:42:43 2018 +0000 nvme-tcp: fix spelling mistake "attepmpt" -> "attempt" There is a spelling mistake in a dev_info message, fix it. Signed-off-by: Colin Ian King Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit a7273d40232fbc1f89212b973d588aeaa61161b2 Author: Christoph Hellwig Date: Thu Dec 13 09:46:59 2018 +0100 nvme-tcp: fix endianess annotations Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg commit f4d10b5c85b5f118c6e55288afd053f5c8c5fc98 Author: Christoph Hellwig Date: Thu Dec 13 09:41:15 2018 +0100 nvmet-tcp: fix endianess annotations Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg commit 91a509f8b7a8a518723e1755b876b46c537baaef Author: Christoph Hellwig Date: Thu Dec 13 09:48:00 2018 +0100 nvme-pci: refactor nvme_poll_irqdisable to make sparse happy By duplicating the nvme_process_cq in both branches we keep the sparse lock context checking happy, so do it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg commit ed92ad37e88555864f1f830db4037b9535b3392c Author: Christoph Hellwig Date: Fri Dec 14 14:06:59 2018 +0100 nvme-pci: only set nr_maps to 2 if poll queues are supported The block layer now enables polling support on a queue if nr_maps includes the poll map, so we should only set that if we actually support poll queues. Fixes: 6544d229bf ("block: enable polling by default if a poll map is initalized") Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Reviewed-by: Sagi Grimberg commit 5698b805fbf09a5dfa60829f5a179c0568a8dc3b Author: Chaitanya Kulkarni Date: Mon Dec 17 18:35:29 2018 -0800 nvmet: use a macro for default error location This patch defines a new macro NVMET_NO_ERROR_LOC to represent the default error location value in the nvme-error-log-page. This is a pure cleanup patch and it does not change any functionality. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 66c6afbd7321983be4c4160aff4d79e52af84a60 Author: Colin Ian King Date: Fri Dec 14 18:31:21 2018 +0000 nvmet: fix comparison of a u16 with -1 Currently the u16 req->error_loc is being compared to -1 which will always be false. Fix this by casting -1 to u16 to fix this. Detected by clang: warning: result of comparison of constant -1 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] Fixes: 76574f37bf4c ("nvmet: add interface to update error-log page") Signed-off-by: Colin Ian King Signed-off-by: Christoph Hellwig commit 77c7a7b3e7da2c97c182c7e57a16d16c6b555c24 Merge: b12c97d45cd06 77990464bb39e Author: David S. Miller Date: Tue Dec 18 08:49:48 2018 -0800 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 2018-12-18 1) Add xfrm policy selftest scripts. From Florian Westphal. 2) Split inexact policies into four different search list classes and use the rbtree infrastructure to store/lookup the policies. This is to improve the policy lookup performance after the flowcache removal. Patches from Florian Westphal. 3) Various coding style fixes, from Colin Ian King. 4) Fix policy lookup logic after adding the inexact policy search tree infrastructure. From Florian Westphal. 5) Remove a useless remove BUG_ON from xfrm6_dst_ifdown. From Li RongQing. 6) Use the correct policy direction for lookups on hash rebuilding. From Florian Westphal. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit bc0205612bbd4dd4026d4ba6287f5643c37366ec Author: Bob Peterson Date: Tue Dec 18 08:29:32 2018 -0600 gfs2: take jdata unstuff into account in do_grow Before this patch, function do_grow would not reserve enough journal blocks in the transaction to unstuff jdata files while growing them. This patch adds the logic to add one more block if the file to grow is jdata. Signed-off-by: Bob Peterson Reviewed-by: Andreas Gruenbacher commit fb94109b764e7676fa63834b9033ba97175877a0 Author: Benjamin Gaignard Date: Mon Dec 17 15:22:14 2018 +0100 irqchip/stm32: protect configuration registers with hwspinlock If a hwspinlock is defined in device tree use it to protect configuration registers. Do not request for hwspinlock during the exti driver init since the hwspinlock driver is not probed yet at that stage and the exti driver does not support deferred probe. Instead of this, postpone the hwspinlock request at the first time the hwspinlock is actually needed. Use the hwspin_trylock_raw() API which is the most appropriated here Indeed: - hwspin_lock_() calls are under spin_lock protection (chip_data->rlock or gc->lock). - the _timeout() API relies on jiffies count which won't work if IRQs are disabled which is the case here (a large part of the IRQ setup is done atomically (see irq/manage.c)) As a consequence implement the retry/timeout lock from here. And since all of this is done atomically, reduce the timeout delay to 1 ms. Signed-off-by: Benjamin Gaignard Signed-off-by: Fabien Dessenne Signed-off-by: Marc Zyngier commit 897898a69451dc31950d200c0fcdba24428a6482 Author: Benjamin Gaignard Date: Mon Dec 17 15:22:13 2018 +0100 dt-bindings: interrupt-controller: stm32: Document hwlock properties Add hwlocks as optional property Reviewed-by: Rob Herring Signed-off-by: Benjamin Gaignard Signed-off-by: Marc Zyngier commit 0136afa08967f6e160b9b4e85a7a70e4180a8333 Author: Lucas Stach Date: Mon Dec 17 15:01:20 2018 +0100 irqchip: Add driver for imx-irqsteer controller The irqsteer block is a interrupt multiplexer/remapper found on the i.MX8 line of SoCs. Signed-off-by: Fugang Duan Signed-off-by: Lucas Stach Signed-off-by: Marc Zyngier commit ff63495eff8139af1d33e9733d74b399fc8a84e7 Author: Lucas Stach Date: Mon Dec 17 15:01:19 2018 +0100 dt-bindings/irq: Add binding for Freescale IRQSTEER multiplexer This adds the DT binding for the Freescale IRQSTEER interrupt multiplexer found in the i.MX8 familiy SoCs. Reviewed-by: Rob Herring Signed-off-by: Lucas Stach Signed-off-by: Marc Zyngier commit 584923efe91f29b01697b6cd7519c92bde9e11da Merge: 663546903c835 f5a4c76ad7de9 Author: Rafael J. Wysocki Date: Tue Dec 18 16:32:12 2018 +0100 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat utility updates for v4.21 from Len Brown: "A couple of random fixes that were sitting in the queue." * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: consolidate duplicate model numbers tools/power turbostat: fix goldmont C-state limit decoding tools/power turbostat: reduce debug output tools/power turbosat: fix AMD APIC-id output commit 875736bb3f3ded168469f6a14df7a938416a99d5 Author: Jens Axboe Date: Tue Nov 20 20:06:23 2018 -0700 aio: abstract out io_event filler helper Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 88a6f18b950e2e4dce57d31daa151105f4f3dcff Author: Jens Axboe Date: Sat Nov 24 14:46:14 2018 -0700 aio: split out iocb copy from io_submit_one() In preparation of handing in iocbs in a different fashion as well. Also make it clear that the iocb being passed in isn't modified, by marking it const throughout. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 71ebc6fef0f53459f37fb39e1466792232fa52ee Author: Jens Axboe Date: Sat Nov 24 21:33:09 2018 -0700 aio: use iocb_put() instead of open coding it Replace the percpu_ref_put() + kmem_cache_free() with a call to iocb_put() instead. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a79d40e9b0f309dcddc4e0bf5b64e51e28153e55 Author: Jens Axboe Date: Tue Dec 4 09:45:32 2018 -0700 aio: only use blk plugs for > 2 depth submissions Plugging is meant to optimize submission of a string of IOs, if we don't have more than 2 being submitted, don't bother setting up a plug. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2bc4ca9bb600cbe36941da2b2a67189fc4302a04 Author: Jens Axboe Date: Tue Dec 4 09:44:49 2018 -0700 aio: don't zero entire aio_kiocb aio_get_req() It's 192 bytes, fairly substantial. Most items don't need to be cleared, especially not upfront. Clear the ones we do need to clear, and leave the other ones for setup when the iocb is prepared and submitted. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 432c79978c33ecef91b1b04cea6936c20810da29 Author: Christoph Hellwig Date: Mon Nov 19 15:57:42 2018 -0700 aio: separate out ring reservation from req allocation This is in preparation for certain types of IO not needing a ring reserveration. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit bc9bff61624ac33b7c95861abea1af24ee7a94fc Author: Jens Axboe Date: Tue Nov 6 14:27:13 2018 -0700 aio: use assigned completion handler We know this is a read/write request, but in preparation for having different kinds of those, ensure that we call the assigned handler instead of assuming it's aio_complete_rq(). Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4b9254328254bed12a4ac449cdff2c332e630837 Merge: 1a9430db2835c cd19181bf9ad4 Author: Jens Axboe Date: Tue Dec 18 08:29:53 2018 -0700 Merge branch 'for-4.21/block' into for-4.21/aio * for-4.21/block: (351 commits) blk-mq: enable IO poll if .nr_queues of type poll > 0 blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight() blk-mq: skip zero-queue maps in blk_mq_map_swqueue block: fix blk-iolatency accounting underflow blk-mq: fix dispatch from sw queue block: mq-deadline: Fix write completion handling nvme-pci: don't share queue maps blk-mq: only dispatch to non-defauly queue maps if they have queues blk-mq: export hctx->type in debugfs instead of sysfs blk-mq: fix allocation for queue mapping table blk-wbt: export internal state via debugfs blk-mq-debugfs: support rq_qos block: update sysfs documentation block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add() aoe: add __exit annotation block: clear REQ_HIPRI if polling is not supported blk-mq: replace and kill blk_mq_request_issue_directly blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests blk-mq: refactor the code of issue request directly block: remove the bio_integrity_advance export ... commit 9d6dc178f0c9e40e61f45d2ac86baa8ad77cb052 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 11:32:02 2018 -0300 perf trace: Allow suppressing the syscall argument names To show just the values: Default: # trace -e open*,close,*sleep sleep 1 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 openat(dfd: CWD, filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 close(fd: 3 ) = 0 nanosleep(rqtp: 0x7ffc0c4ea0d0, rmtp: 0 ) = 0 close(fd: 1 ) = 0 close(fd: 2 ) = 0 # Remove it: # perf config trace.show_arg_names=no # trace -e open*,close,*sleep sleep 1 openat(CWD, /etc/ld.so.cache, CLOEXEC ) = 3 close(3 ) = 0 openat(CWD, /lib64/libc.so.6, CLOEXEC ) = 3 close(3 ) = 0 openat(CWD, /usr/lib/locale/locale-archive, CLOEXEC ) = 3 close(3 ) = 0 nanosleep(0x7ffced3a8c40, 0 ) = 0 close(1 ) = 0 close(2 ) = 0 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ta9tbdwgodpw719sr2bjm8eb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b036146fd0f99209e87877115d090c69da2ab747 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 11:17:19 2018 -0300 perf trace: Allow configuring if the syscall start timestamp should be printed # trace -e open*,close,*sleep sleep 1 0.000 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 0.016 close(fd: 3 ) = 0 0.024 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC ) = 3 0.074 close(fd: 3 ) = 0 0.235 openat(dfd: CWD, filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 0.251 close(fd: 3 ) = 0 0.285 nanosleep(rqtp: 0x7ffd68e6d620, rmtp: 0 ) = 0 1000.386 close(fd: 1 ) = 0 1000.395 close(fd: 2 ) = 0 # # perf config trace.show_timestamp=no # trace -e open*,close,*sleep sleep 1 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 openat(dfd: CWD, filename: , flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 nanosleep(rqtp: 0x7fffa79c38e0, rmtp: 0 ) = 0 close(fd: 1 ) = 0 close(fd: 2 ) = 0 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mjjnicy48367jah6ls4k0nk8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d32de87e734191698dd1834146ee65ebd0f5e240 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 11:06:16 2018 -0300 perf trace: Allow configuring default for perf_event_attr.inherit I.f. if children should inherit the parent perf_event configuration, i.e. if we should trace children as well or just the parent. The default is to follow children, to disable this and have a behaviour similar to strace, set this config option or use the --no_inherit 'perf trace' option. E.g.: Default: # perf config trace.no_inherit # trace -e clone,*sleep time sleep 1 0.000 time/21107 clone(clone_flags: CHILD_CLEARTID|CHILD_SETTID|0x11, newsp: 0, child_tidptr: 0x7f7b8f9ae810) = 21108 (time) ? time/21108 ... [continued]: clone() 0.691 sleep/21108 nanosleep(rqtp: 0x7ffed01d0540, rmtp: 0 ) = 0 0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 1988maxresident)k 0inputs+0outputs (0major+76minor)pagefaults 0swaps # Disable it: # trace -e clone,*sleep time sleep 1 0.000 clone(clone_flags: CHILD_CLEARTID|CHILD_SETTID|0x11, newsp: 0, child_tidptr: 0x7ff41e100810) = 21414 (time) 0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 1964maxresident)k 0inputs+0outputs (0major+76minor)pagefaults 0swaps # Notice that since there is just one thread, the "comm/TID" column is suppressed. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-thd8s16pagyza71ufi5vjlan@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 41e0d040c475251eea14c8b92ea3a01c5e269856 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 10:29:44 2018 -0300 perf config: Show the configuration when no arguments are provided More convenient thah having to recall what letter is about showing/listing/dumping the configuration, i.e. no arguments means -l/--list: # perf config llvm.dump-obj=true trace.default_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=yes trace.show_duration=no # perf config -l llvm.dump-obj=true trace.default_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=yes trace.show_duration=no # perf config -h Usage: perf config [] [options] [section.name[=value] ...] -l, --list show current config variables --system use system config file --user use user config file # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Taeung Song Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-z2n63avz6tliqb5gmu4l1dti@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 42e4a52d01d087e7ce069049799e3e336eaec101 Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 10:22:18 2018 -0300 perf trace: Allow configuring if the syscall duration should be printed # perf config trace.show_duration=no # perf config -l | grep trace trace.default_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=true trace.show_duration=no # trace -e *sleep sleep 1 0.000 sleep/8729 nanosleep(rqtp: 0x7ffcb0b4c940, rmtp: 0) = 0 # perf config trace.show_duration=yes # trace -e *sleep sleep 1 0.000 (1000.212 ms): sleep/8735 nanosleep(rqtp: 0x7ffca15fa770, rmtp: 0) = 0 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-2c7h1m8fhzb9puxtj9nlevi8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e7c634fcc6ff921d725ba988cdb198ca8b59a39f Author: Arnaldo Carvalho de Melo Date: Fri Dec 14 10:12:09 2018 -0300 perf trace: Allow configuring if zeroed syscall args should be printed The default so far, since we show argument names followed by its values, was to make the output more compact by suppressing most zeroed args. Make this configurable so that users can choose what best suit their needs. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-q0gxws02ygodh94o0hzim5xd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ac96287cae0851797262da37347b83797db931b3 Author: Arnaldo Carvalho de Melo Date: Thu Dec 13 17:30:20 2018 -0300 perf trace: Allow specifying a set of events to add in perfconfig To add augmented_raw_syscalls to the events speficied by the user, or be the only one if no events were specified by the user, one can add this to perfconfig: # cat ~/.perfconfig [trace] add_events = /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o # I.e. pre-compile the augmented_raw_syscalls.c BPF program and make it always load, this way: # perf trace -e open* cat /etc/passwd > /dev/null 0.000 ( 0.013 ms): cat/31557 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3 0.035 ( 0.007 ms): cat/31557 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC) = 3 0.353 ( 0.009 ms): cat/31557 openat(dfd: CWD, filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 0.424 ( 0.006 ms): cat/31557 openat(dfd: CWD, filename: /etc/passwd) = 3 # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-0lgj7vh64hg3ce44gsmvj7ud@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4623ce405d0871e648ba72fdb9c561016e2cc41d Author: Arnaldo Carvalho de Melo Date: Thu Dec 13 15:05:43 2018 -0300 perf augmented_raw_syscalls: Do not include stdio.h We're not using that puts() thing, and thus we don't need to define the __bpf_stdout__ map, reducing the setup time. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-3452xgatncpil7v22minkwbo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7100b12cf474f575658e6e4a834f0e8a0b3c9867 Author: Leo Yan Date: Tue Dec 11 15:38:28 2018 +0800 perf cs-etm: Generate branch sample for exception packet The exception packet appears as one element with 'elem_type' == OCSD_GEN_TRC_ELEM_EXCEPTION or OCSD_GEN_TRC_ELEM_EXCEPTION_RET, which is present for exception entry and exit respectively. The decoder sets the packet fields 'packet->exc' and 'packet->exc_ret' to indicate the exception packets; but exception packets don't have a dedicated sample type and shares the same sample type CS_ETM_RANGE with normal instruction packets. As a result, the exception packets are taken as normal instruction packets and this introduces confusion in mixing different packet types. Furthermore, these instruction range packets will be processed for branch samples only when 'packet->last_instr_taken_branch' is true, otherwise they will be omitted, this can introduce a mess for exception and exception returning due to not having the complete address range info for context switching. To process exception packets properly, this patch introduces two new sample types: CS_ETM_EXCEPTION and CS_ETM_EXCEPTION_RET; these two types of packets will be handled by cs_etm__exception(). The function cs_etm__exception() forces setting the previous CS_ETM_RANGE packet flag 'prev_packet->last_instr_taken_branch' to true, this matches well with the program flow when the exception is trapped from user space to kernel space, no matter if the most recent flow has branch taken or not; this is also safe for returning to user space after exception handling. After exception packets have their own sample type, the packet fields 'packet->exc' and 'packet->exc_ret' aren't needed anymore, so remove them. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-9-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 02e7e2509e939b50f4f1b14c08b97f60256df3ea Author: Leo Yan Date: Tue Dec 11 15:38:27 2018 +0800 perf cs-etm: Treat EO_TRACE element as trace discontinuity If the decoder outputs an EO_TRACE element, it means the end of the trace buffer; this is a discontinuity and in this case the end of trace data needs to be saved. This patch generates a CS_ETM_DISCONTINUITY packet for the EO_TRACE element hereby flushing the end of trace data in cs-etm.c. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-8-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 37bb37168dc1b1f5e3ac791aeecd14ef980764fd Author: Leo Yan Date: Tue Dec 11 15:38:26 2018 +0800 perf cs-etm: Treat NO_SYNC element as trace discontinuity The CoreSight tracer driver might insert barrier packets between different buffers, thus the decoder can spot the boundaries based on the barrier packet; it is possible for the decoder to hit a barrier packet and emit a NO_SYNC element, then the decoder will find a periodic synchronisation point inside that next trace block that starts the trace again but does not have the TRACE_ON element as indicator - usually because this trace block has wrapped the buffer so we have lost the original point when the trace was enabled. In the first case it causes the insertion of a OCSD_GEN_TRC_ELEM_NO_SYNC in the middle of the tracing stream, but as we were not handling the NO_SYNC element properly this ends up making users miss the discontinuity indications. Though OCSD_GEN_TRC_ELEM_NO_SYNC is different from CS_ETM_TRACE_ON when output from the decoder, both indicate that the trace data is discontinuous; this patch treats OCSD_GEN_TRC_ELEM_NO_SYNC as a trace discontinuity and generates a CS_ETM_DISCONTINUITY packet for it, so cs-etm can handle the discontinuity for this case, finally it saves the last trace data for the previous trace block and restart samples for the new block. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-7-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 49ccf87bfb9e8517ab2f019e95845760c4c3a562 Author: Leo Yan Date: Tue Dec 11 15:38:25 2018 +0800 perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY TRACE_ON element is used at the beginning of trace, it also can be appeared in the middle of trace data to indicate discontinuity; for example, it's possible to see multiple TRACE_ON elements in the trace stream if the trace is being limited by address range filtering. Furthermore, except TRACE_ON element is for discontinuity, NO_SYNC and EO_TRACE also can be used to indicate discontinuity, though they are used for different scenarios for which the trace is interrupted. This patch renames sample type CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY, firstly the new name describes more closely the purpose of the packet; secondly this is a preparation for other output elements which also cause the trace discontinuity thus they can share the same one packet type. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-6-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit cfc1d4276b0453a752d8b31daf34f7f2dbd55e82 Author: Leo Yan Date: Tue Dec 11 15:38:24 2018 +0800 perf cs-etm: Refactor enumeration cs_etm_sample_type The values in enumeration cs_etm_sample_type are defined with setting bit N for each packet type, this is not suggested in the usual case. This patch refactor cs_etm_sample_type by converting from bit shifting values to continuous numbers. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-5-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit cee7a6a212ddb514d6e2ac1f9733501c43d63d0a Author: Leo Yan Date: Tue Dec 11 15:38:23 2018 +0800 perf cs-etm: Remove unused 'trace_on' in cs_etm_decoder cs_etm_decoder::trace_on is being assigned when TRACE_ON or NO_SYNC element is coming, but it is never used hence it is redundant and can be removed. So let's remove 'trace_on' field from cs_etm_decoder struct. Suggested-by: Mathieu Poirier Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-4-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 24fff5eb2b937951af5dce6cdb7a1e679ac8e751 Author: Leo Yan Date: Tue Dec 11 15:38:22 2018 +0800 perf cs-etm: Avoid stale branch samples when flush packet At the end of trace buffer handling, function cs_etm__flush() is invoked to flush any remaining branch stack entries. As a side effect, it also generates branch sample, because the 'etmq->packet' doesn't contains any new coming packet but point to one stale packet after packets swapping, so it wrongly makes synthesize branch samples with stale packet info. We could review below detailed flow which causes issue: Packet1: start_addr=0xffff000008b1fbf0 end_addr=0xffff000008b1fbfc Packet2: start_addr=0xffff000008b1fb5c end_addr=0xffff000008b1fb6c step 1: cs_etm__sample(): sample: ip=(0xffff000008b1fbfc-4) addr=0xffff000008b1fb5c step 2: flush packet in cs_etm__run_decoder(): cs_etm__run_decoder() `-> err = cs_etm__flush(etmq, false); sample: ip=(0xffff000008b1fb6c-4) addr=0xffff000008b1fbf0 Packet1 and packet2 are two continuous packets, when packet2 is the new coming packet, cs_etm__sample() generates branch sample for these two packets and use [packet1::end_addr - 4 => packet2::start_addr] as branch jump flow, thus we can see the first generated branch sample in step 1. At the end of cs_etm__sample() it swaps packets so 'etm->prev_packet'= packet2 and 'etm->packet'=packet1, so far it's okay for branch sample. If packet2 is the last one packet in trace buffer, even there have no any new coming packet, cs_etm__run_decoder() invokes cs_etm__flush() to flush branch stack entries as expected, but it also generates branch samples by taking 'etm->packet' as a new coming packet, thus the branch jump flow is as [packet2::end_addr - 4 => packet1::start_addr]; this is the second sample which is generated in step 2. So actually the second sample is a stale sample and we should not generate it. This patch introduces a new function cs_etm__end_block(), at the end of trace block this function is invoked to only flush branch stack entries and thus can avoid to generate branch sample for stale packet. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-3-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 43fd56669c28cd354e9228bdb58e4bca1c1a8b66 Author: Leo Yan Date: Tue Dec 11 15:38:21 2018 +0800 perf cs-etm: Correct packets swapping in cs_etm__flush() The structure cs_etm_queue uses 'prev_packet' to point to previous packet, this can be used to combine with new coming packet to generate samples. In function cs_etm__flush() it swaps packets only when the flag 'etm->synth_opts.last_branch' is true, this means that it will not swap packets if without option '--itrace=il' to generate last branch entries; thus for this case the 'prev_packet' doesn't point to the correct previous packet and the stale packet still will be used to generate sequential sample. Thus if dump trace with 'perf script' command we can see the incorrect flow with the stale packet's address info. This patch corrects packets swapping in cs_etm__flush(); except using the flag 'etm->synth_opts.last_branch' it also checks the another flag 'etm->sample_branches', if any flag is true then it swaps packets so can save correct content to 'prev_packet'. Finally this can fix the wrong program flow dumping issue. The patch has a minor refactoring to use 'etm->synth_opts.last_branch' instead of 'etmq->etm->synth_opts.last_branch' for condition checking, this is consistent with that is done in cs_etm__sample(). Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-2-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit bbab50dda724309eccec92132d3f36cb262e8728 Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 16:54:09 2018 -0300 perf trace: Switch to using a struct for the aumented_raw_syscalls syscalls map values We'll start adding more perf-syscall stuff, so lets do this prep step so that the next ones are just about adding more fields. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-vac4sn1ns1vj4y07lzj7y4b8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 27f2992e7bb12ca28e886e48838ba740d2eb95f4 Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 16:46:13 2018 -0300 perf augmented_syscalls: Switch to using a struct for the syscalls map values We'll start adding more perf-syscall stuff, so lets do this prep step so that the next ones are just about adding more fields. Run it with the .c file once to cache the .o file: # trace --filter-pids 2834,2199 -e openat,augmented_raw_syscalls.c LLVM: dumping augmented_raw_syscalls.o 0.000 ( 0.021 ms): tmux: server/4952 openat(dfd: CWD, filename: /proc/5691/cmdline ) = 11 349.807 ( 0.040 ms): DNS Res~er #39/11082 openat(dfd: CWD, filename: /etc/hosts, flags: CLOEXEC ) = 44 4988.759 ( 0.052 ms): gsd-color/2431 openat(dfd: CWD, filename: /etc/localtime ) = 18 4988.976 ( 0.029 ms): gsd-color/2431 openat(dfd: CWD, filename: /etc/localtime ) = 18 ^C[root@quaco bpf]# From now on, we can use just the newly built .o file, skipping the compilation step for a faster startup: # trace --filter-pids 2834,2199 -e openat,augmented_raw_syscalls.o 0.000 ( 0.046 ms): DNS Res~er #39/11088 openat(dfd: CWD, filename: /etc/hosts, flags: CLOEXEC ) = 44 1946.408 ( 0.190 ms): systemd/1 openat(dfd: CWD, filename: /proc/1071/cgroup, flags: CLOEXEC ) = 20 1946.792 ( 0.215 ms): systemd/1 openat(dfd: CWD, filename: /proc/954/cgroup, flags: CLOEXEC ) = 20 ^C# Now on to do the same in the builtin-trace.c side of things. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-k8mwu04l8es29rje5loq9vg7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 61d007138a44dc69265cf948eadd1759edbd3875 Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 15:31:28 2018 -0300 perf bpf: Move perf_event_output() from stdio.h to bpf.h So that we don't always carry that __bpf_output__ map, leaving that to the scripts wanting to use that facility. 'perf trace' will be changed to look if that map is present and only setup the bpf-output events if so. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-azwys8irxqx9053vpajr0k5h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b27b38ed9427b32e0194e03281e3a79dd49887b2 Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 13:39:24 2018 -0300 perf trace: Implement syscall filtering in augmented_syscalls Just another map, this time an BPF_MAP_TYPE_ARRAY, stating with one bool per syscall, stating if it should be filtered or not. So, with a pre-built augmented_raw_syscalls.o file, we use: # perf trace -e open*,augmented_raw_syscalls.o 0.000 ( 0.016 ms): DNS Res~er #37/29652 openat(dfd: CWD, filename: /etc/hosts, flags: CLOEXEC ) = 138 187.039 ( 0.048 ms): gsd-housekeepi/2436 openat(dfd: CWD, filename: /etc/fstab, flags: CLOEXEC ) = 11 187.348 ( 0.041 ms): gsd-housekeepi/2436 openat(dfd: CWD, filename: /proc/self/mountinfo, flags: CLOEXEC ) = 11 188.793 ( 0.036 ms): gsd-housekeepi/2436 openat(dfd: CWD, filename: /proc/self/mountinfo, flags: CLOEXEC ) = 11 189.803 ( 0.029 ms): gsd-housekeepi/2436 openat(dfd: CWD, filename: /proc/self/mountinfo, flags: CLOEXEC ) = 11 190.774 ( 0.027 ms): gsd-housekeepi/2436 openat(dfd: CWD, filename: /proc/self/mountinfo, flags: CLOEXEC ) = 11 284.620 ( 0.149 ms): DataStorage/3076 openat(dfd: CWD, filename: /home/acme/.mozilla/firefox/ina67tev.default/SiteSecurityServiceState.txt, flags: CREAT|TRUNC|WRONLY, mode: IRUGO|IWUSR|IWGRP) = 167 ^C# What is it that this gsd-housekeeping thingy needs to open /proc/self/mountinfo four times periodically? :-) This map will be extended to tell per-syscall parameters, i.e. how many bytes to copy per arg, using the function signature to get the types and then the size of those types, via BTF. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-cy222g9ucvnym3raqvxp0hpg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0df50e0b0e0f315c0d5e2ce8556aafe1403b4a4b Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 13:47:40 2018 -0300 perf trace: Avoid using raw_syscalls in duplicity with eBPF augmentation So when we do something like: # perf trace -e open*,augmented_raw_syscalls.o We need to set trace->trace_syscalls because there is logic that use that when mixing strace-like output with other events, such as scheduler tracepoints, but with that set we ended up having multiple raw_syscalls:sys_{enter,exit} setup, which garbled the output, so check if trace->augmented_raw_syscalls is set and avoid the two extra tracepoints. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-kjmnbrlgu0c38co1ye8egbsb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 246fbe03edaab9dfa5bd1f0e223c7c960d987982 Author: Arnaldo Carvalho de Melo Date: Wed Dec 12 11:06:53 2018 -0300 perf trace: Rename set_ev_qualifier_filter to clarify its a tracepoint filter Rename it to trace__set_ev_qualifier_tp_filter(), as this just sets up tracepoint filters on the raw_syscalls:sys_{enter,exit} tracepoints, and since we're going to do the same for the augmented_raw_syscalls codepath, when used, rename it to clarify. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-8bjsul8x7osw7nxjodnyfn14@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f643937aaab04881236b5aabec00f9802c1eda8 Author: Jiri Olsa Date: Wed Dec 12 14:29:40 2018 +0100 perf tools: Link libperf-jvmti.so with LDFLAGS variable So we could propagate distro flags into libperf-jvmti.so library. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181212132940.840-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 41fa483aeee567cc34f9fc4c2e7035f2df25299d Author: Jiri Olsa Date: Wed Dec 12 10:12:14 2018 +0100 tools lib traceevent: Use LDFLAGS in the build commands So that the user can specify outside LDFLAGS values. Keeping the CFLAGS in there as well, so we don't break existing scripts. Signed-off-by: Jiri Olsa Acked-by: Steven Rostedt (VMware) Cc: Herton Krzesinski Cc: Tzvetomir Stoyanov (VMware) Link: http://lkml.kernel.org/r/20181212091214.GC17489@krava Signed-off-by: Arnaldo Carvalho de Melo commit 866053bb644f754d1a93aaa9db9998fecf7a8978 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 16:43:40 2018 -0300 perf tools: Cast off_t to s64 to avoid warning on bionic libc To avoid this warning: CC /tmp/build/perf/util/s390-cpumsf.o util/s390-cpumsf.c: In function 's390_cpumsf_samples': util/s390-cpumsf.c:508:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'off_t' [-Wformat=] pr_err("[%#08" PRIx64 "] Invalid AUX trailer entry TOD clock base\n", ^ Now the various Android cross toolchains used in the perf tools container test builds are all clean and we can remove this: export EXTRA_MAKE_ARGS="WERROR=0" Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Richter Link: https://lkml.kernel.org/n/tip-5rav4ccyb0sjciysz2i4p3sx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d7a8c4a6a055097a67ccfa3ca7c9ff1b64603a70 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 16:31:19 2018 -0300 perf tools: Add missing open_memstream() prototype for systems lacking it There are systems such as the Android NDK API level 24 has the open_memstream() function but doesn't provide a prototype, adding noise to the build: builtin-timechart.c: In function 'cat_backtrace': builtin-timechart.c:486:2: warning: implicit declaration of function 'open_memstream' [-Wimplicit-function-declaration] FILE *f = open_memstream(&p, &p_len); ^ builtin-timechart.c:486:2: warning: nested extern declaration of 'open_memstream' [-Wnested-externs] builtin-timechart.c:486:12: warning: initialization makes pointer from integer without a cast FILE *f = open_memstream(&p, &p_len); ^ Define a LACKS_OPEN_MEMSTREAM_PROTOTYPE define so that code needing that can get a prototype. Checked in the bionic git repo to be available since level 23: https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h#241 FILE* open_memstream(char** __ptr, size_t* __size_ptr) __INTRODUCED_IN(23); Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-343ashae97e5bq6vizusyfno@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0afcf29bab35d3785204cd9bd51693b231ad7181 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 16:11:54 2018 -0300 perf header: Fix up argument to ctime() Reducing this noise when cross building to the Android NDK: util/header.c: In function 'perf_header__fprintf_info': util/header.c:2710:45: warning: pointer targets in passing argument 1 of 'ctime' differ in signedness [-Wpointer-sign] fprintf(fp, "# captured on : %s", ctime(&st.st_ctime)); ^ In file included from util/../perf.h:5:0, from util/evlist.h:11, from util/header.c:22: /opt/android-ndk-r15c/platforms/android-26/arch-arm/usr/include/time.h:81:14: note: expected 'const time_t *' but argument is of type 'long unsigned int *' extern char* ctime(const time_t*) __LIBC_ABI_PUBLIC__; ^ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-6bz74zp080yhmtiwb36enso9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 748fe0889c1ff12d378946bd5326e8ee8eacf5cf Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 15:48:47 2018 -0300 perf tools: Add missing sigqueue() prototype for systems lacking it There are systems such as the Android NDK API level 24 has the sigqueue() function but doesn't provide a prototype, adding noise to the build: util/evlist.c: In function 'perf_evlist__prepare_workload': util/evlist.c:1494:4: warning: implicit declaration of function 'sigqueue' [-Wimplicit-function-declaration] if (sigqueue(getppid(), SIGUSR1, val)) ^ util/evlist.c:1494:4: warning: nested extern declaration of 'sigqueue' [-Wnested-externs] Define a LACKS_SIGQUEUE_PROTOTYPE define so that code needing that can get a prototype. Checked in the bionic git repo to be available since level 23: https://android.googlesource.com/platform/bionic/+/master/libc/include/signal.h#123 int sigqueue(pid_t __pid, int __signal, const union sigval __value) __INTRODUCED_IN(23); Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lmhpev1uni9kdrv7j29glyov@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ece9804985b57e1ccd83b1fb6288520955a29d51 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 15:00:52 2018 -0300 tools lib subcmd: Don't add the kernel sources to the include path At some point we decided not to directly include kernel sources files when building tools/perf/, but when tools/lib/subcmd/ was forked from tools/perf it somehow ended up adding it via these two lines in its Makefile: CFLAGS += -I$(srctree)/include/uapi CFLAGS += -I$(srctree)/include As $(srctree) points to the kernel sources. Removing those lines and keeping just: CFLAGS += -I$(srctree)/tools/include/ Is enough to build tools/perf and tools/objtool. This fixes the build when building from the sources in environments such as the Android NDK crossbuilding from a fedora:26 system: subcmd-util.h:11:15: error: expected ',' or ';' before 'void' static inline void report(const char *prefix, const char *err, va_list params) ^ In file included from /git/perf/include/uapi/linux/stddef.h:2:0, from /git/perf/include/uapi/linux/posix_types.h:5, from /opt/android-ndk-r12b/platforms/android-24/arch-arm/usr/include/sys/types.h:36, from /opt/android-ndk-r12b/platforms/android-24/arch-arm/usr/include/unistd.h:33, from run-command.c:2: subcmd-util.h:18:17: error: '__no_instrument_function__' attribute applies only to functions The /opt/android-ndk-r12b/platforms/android-24/arch-arm/usr/include/sys/types.h file that includes linux/posix_types.h ends up getting the one in the kernel sources causing the breakage. Fix it. Test built tools/objtool/ too. Reported-by: Jiri Olsa Tested-by: Jiri Olsa Cc: Adrian Hunter Cc: Josh Poimboeuf Cc: Namhyung Kim Fixes: 4b6ab94eabe4 ("perf subcmd: Create subcmd library") Link: https://lkml.kernel.org/n/tip-5lhaoecrj12t0bqwvpiu14sm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 436651caa1ca3fd1d61e8daaff57453881f35a14 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 11:19:23 2018 -0300 perf trace beauty: renameat's newdirfd may also be AT_FDCWD Noticed while working on renameat2. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8omchrcjcvlwoxxv6wrjehfh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ca7ff2c8e7add62b661c414257e7ef12cd40a950 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 10:39:30 2018 -0300 perf trace: Beautify renameat2's flags argument # strace -e renameat2 -f perf trace -e rename* mv c /tmp strace: Process 10824 attached [pid 10824] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link) [pid 10824] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp/c", RENAME_NOREPLACE) = -1 EEXIST (File exists) 1.857 ( 0.008 ms): mv/10824 renameat2(olddfd: CWD, oldname: 0x7ffc72ff3d81, newdfd: CWD, newname: 0x7ffc72ff3d83, flags: NOREPLACE) = -1 EXDEV Invalid cross-device link 2.002 ( 0.006 ms): mv/10824 renameat2(olddfd: CWD, oldname: 0x7ffc72ff3d81, newdfd: CWD, newname: 0x55ad609efcc0, flags: NOREPLACE) = -1 EEXIST File exists mv: 'c' and '/tmp/c' are the same file [pid 10824] +++ exited with 1 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10824, si_uid=0, si_status=1, si_utime=0, si_stime=0} --- +++ exited with 0 +++ # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-glyt6nzlt1yx56m5bshy6g83@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5a1cb7edfbf6ee8087b75d32461775501213a8e9 Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 10:26:13 2018 -0300 perf beauty: Wire up the renameat flags table generator to the Makefile Now when we run 'make -C tools/perf O=/tmp/build/perf' we end up with: $ cat /tmp/build/perf/trace/beauty/generated/rename_flags_array.c static const char *rename_flags[] = { [0 + 1] = "NOREPLACE", [1 + 1] = "EXCHANGE", [2 + 1] = "WHITEOUT", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4fad4xahrn04y06o0lc49clm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bdc2a9d64a4c4c77c63ce2561bd644d233fcb1fc Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 10:16:42 2018 -0300 perf beauty: Add a string table generator for renameat2's flags constants Using the already copied tools/include/uapi/linux/fs.h file: $ tools/perf/trace/beauty/rename_flags.sh static const char *rename_flags[] = { [0 + 1] = "NOREPLACE", [1 + 1] = "EXCHANGE", [2 + 1] = "WHITEOUT", }; $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ta2jbh03spkymp4sbdh489g8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 84a835412cdc36f3821a1daa10853f9c9aa3fc7c Author: Arnaldo Carvalho de Melo Date: Tue Dec 11 09:53:21 2018 -0300 perf trace beauty: Beautify renameat2's fd arg wrt AT_FDCWD Just like is done with the 'renameat' syscall. # strace -e renameat2 -f perf trace -e rename* mv c /tmp [pid 12334] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link) [pid 12334] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp/c", RENAME_NOREPLACE) = -1 EEXIST (File exists) 1.947 ( 0.007 ms): mv/12334 renameat2(olddfd: CWD, oldname: 0x7ffce8b7fd81, newdfd: CWD, newname: 0x7ffce8b7fd83, flags: 1) = -1 EXDEV Invalid cross-device link 2.073 ( 0.009 ms): mv/12334 renameat2(olddfd: CWD, oldname: 0x7ffce8b7fd81, newdfd: CWD, newname: 0x55ce7f0a1cc0, flags: 1mv: ) = -1 EEXIST File exists'c' and '/tmp/c' are the same file # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8q9l92eh9eee3y2bwyqku3tc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a761a8d102e2a6edfef3ad5bb22baeb715f93abd Author: Arnaldo Carvalho de Melo Date: Mon Dec 10 16:27:33 2018 -0300 perf trace: Allow selecting use the use of the ordered_events code I was trigger happy on this one, as using ordered_events as implemented by Jiri for use with the --block code under discussion on lkml incurs in delaying processing to form batches that then get ordered and then printed. With 'perf trace' we want to process the events as they go, without that delay, and doing it that way works well for the common case which is to trace a thread or a workload started by 'perf trace'. So revert back to not using ordered_events but add an option to select that mode so that users can experiment with their particular use case to see if works better, i.e. if the added delay is not a problem and the ordering helps. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8ki7sld6rusnjhhtaly26i5o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7ba61524fa0337a919b2ec5fcce26db23c611ca7 Author: Arnaldo Carvalho de Melo Date: Mon Dec 10 16:09:51 2018 -0300 perf trace: Rename delivery functions to ease making ordered_events selectable Just hide a bit more how events gets delivered, hiding ordered_events details from the main loop. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lxwwf3238ta4neq2zh1y1h45@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f024cf085c423bac7512479f45c34ee9a24af7ce Author: Steven Rostedt (VMware) Date: Mon Dec 10 13:45:22 2018 -0500 tools lib traceevent: Fix processing of dereferenced args in bprintk events In the case that a bprintk event has a dereferenced pointer that is stored as a string, and there's more values to process (more args), the arg was not updated to point to the next arg after processing the dereferenced pointer, and it screwed up what was to be displayed. Signed-off-by: Steven Rostedt (VMware) Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 37db96bb49629 ("tools lib traceevent: Handle new pointer processing of bprint strings") Link: http://lkml.kernel.org/r/20181210134522.3f71e2ca@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo commit 51433ead1460fb3f46e1c34f68bb22fd2dd0f5d0 Author: Michael Petlan Date: Mon Dec 10 11:00:04 2018 -0500 perf stat: Avoid segfaults caused by negated options Some 'perf stat' options do not make sense to be negated (event, cgroup), some do not have negated path implemented (metrics). Due to that, it is better to disable the "no-" prefix for them, since otherwise, the later opt-parsing segfaults. Before: $ perf stat --no-metrics -- ls Segmentation fault (core dumped) After: $ perf stat --no-metrics -- ls Error: option `no-metrics' isn't available Usage: perf stat [] [] Signed-off-by: Michael Petlan Tested-by: Arnaldo Carvalho de Melo LPU-Reference: 1485912065.62416880.1544457604340.JavaMail.zimbra@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 4eaf97e8c5b13d01dd3c3b00181b6eed208aec01 Author: Michael Petlan Date: Wed Nov 21 16:39:18 2018 -0500 perf tests: Use shebangs in the shell scripts Since the first line was used as a test identification, it needs to be skipped by shell_test__description() function now. Further notes from Hendrik: It might be worth to note that adding the shebang is necessary to spot them as scripts. Using /bin/sh looks fine to. Just briefly checked whether the scripts contains some bash-specifics, which is not the case. Signed-off-by: Michael Petlan Reviewed-by: Hendrik Brueckner Cc: Jiri Olsa LPU-Reference: 2127419430.57657104.1542836358464.JavaMail.zimbra@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 571766010ea6bf9726b288eb2db1abb59b1841af Author: Adrian Hunter Date: Tue Nov 27 10:46:34 2018 +0200 perf auxtrace: Alter addr_filter__entire_dso() to work if there are no symbols addr_filter__entire_dso() uses the first and last symbols from a dso, and so does not work when there are no symbols. Alter it to filter the whole file instead. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Fixes: 1b36c03e3569 ("perf record: Add support for using symbols in address filters") Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hunter@intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit b5c2161cc415babb84d2b49599df8bd03b2b9b69 Author: Adrian Hunter Date: Tue Nov 27 10:46:34 2018 +0200 perf dso: Export data_file_size() method there are no symbols Will be used outside dso.c in a followup patch, so rename it and make it non-static. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hunter@intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit bea2ef803ade3359026d5d357348842bca9edcf1 Author: Marc Zyngier Date: Tue Dec 4 17:11:19 2018 +0000 KVM: arm/arm64: vgic: Cap SPIs to the VM-defined maximum SPIs should be checked against the VMs specific configuration, and not the architectural maximum. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier commit 6992195cc6c6c4d673a3266ae59cbeeb746d61af Author: Christoffer Dall Date: Tue Nov 6 13:33:38 2018 +0100 KVM: arm64: Clarify explanation of STAGE2_PGTABLE_LEVELS In attempting to re-construct the logic for our stage 2 page table layout I found the reasoning in the comment explaining how we calculate the number of levels used for stage 2 page tables a bit backwards. This commit attempts to clarify the comment, to make it slightly easier to read without having the Arm ARM open on the right page. While we're at it, fixup a typo in a comment that was recently changed. Reviewed-by: Suzuki K Poulose Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit 2e2f6c3c0b08eed3fcf7de3c7684c940451bdeb1 Author: Julien Thierry Date: Mon Nov 26 18:26:44 2018 +0000 KVM: arm/arm64: vgic: Do not cond_resched_lock() with IRQs disabled To change the active state of an MMIO, halt is requested for all vcpus of the affected guest before modifying the IRQ state. This is done by calling cond_resched_lock() in vgic_mmio_change_active(). However interrupts are disabled at this point and we cannot reschedule a vcpu. We actually don't need any of this, as kvm_arm_halt_guest ensures that all the other vcpus are out of the guest. Let's just drop that useless code. Signed-off-by: Julien Thierry Suggested-by: Christoffer Dall Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier commit b8e0ba7c8bea994011aff3b4c35256b180fab874 Author: Punit Agrawal Date: Tue Dec 11 17:10:41 2018 +0000 KVM: arm64: Add support for creating PUD hugepages at stage 2 KVM only supports PMD hugepages at stage 2. Now that the various page handling routines are updated, extend the stage 2 fault handling to map in PUD hugepages. Addition of PUD hugepage support enables additional page sizes (e.g., 1G with 4K granule) which can be useful on cores that support mapping larger block sizes in the TLB entries. Signed-off-by: Punit Agrawal Reviewed-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon [ Replace BUG() => WARN_ON(1) for arm32 PUD helpers ] Signed-off-by: Suzuki Poulose Signed-off-by: Marc Zyngier commit 35a63966194dd994f44150f07398c62f8dca011e Author: Punit Agrawal Date: Tue Dec 11 17:10:40 2018 +0000 KVM: arm64: Update age handlers to support PUD hugepages In preparation for creating larger hugepages at Stage 2, add support to the age handling notifiers for PUD hugepages when encountered. Provide trivial helpers for arm32 to allow sharing code. Signed-off-by: Punit Agrawal Reviewed-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon [ Replaced BUG() => WARN_ON(1) for arm32 PUD helpers ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit eb3f0624ea082def887acc79e97934e27d0188b7 Author: Punit Agrawal Date: Tue Dec 11 17:10:39 2018 +0000 KVM: arm64: Support handling access faults for PUD hugepages In preparation for creating larger hugepages at Stage 2, extend the access fault handling at Stage 2 to support PUD hugepages when encountered. Provide trivial helpers for arm32 to allow sharing of code. Signed-off-by: Punit Agrawal Reviewed-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon [ Replaced BUG() => WARN_ON(1) in PUD helpers ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 86d1c55ea605025f78d026e7fc3a2bb4c3fc2d6a Author: Punit Agrawal Date: Tue Dec 11 17:10:38 2018 +0000 KVM: arm64: Support PUD hugepage in stage2_is_exec() In preparation for creating PUD hugepages at stage 2, add support for detecting execute permissions on PUD page table entries. Faults due to lack of execute permissions on page table entries is used to perform i-cache invalidation on first execute. Provide trivial implementations of arm32 helpers to allow sharing of code. Signed-off-by: Punit Agrawal Reviewed-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon [ Replaced BUG() => WARN_ON(1) in arm32 PUD helpers ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 4ea5af53114091e23a8fc279f25637e6c4e892c6 Author: Punit Agrawal Date: Tue Dec 11 17:10:37 2018 +0000 KVM: arm64: Support dirty page tracking for PUD hugepages In preparation for creating PUD hugepages at stage 2, add support for write protecting PUD hugepages when they are encountered. Write protecting guest tables is used to track dirty pages when migrating VMs. Also, provide trivial implementations of required kvm_s2pud_* helpers to allow sharing of code with arm32. Signed-off-by: Punit Agrawal Reviewed-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon [ Replaced BUG() => WARN_ON() in arm32 pud helpers ] Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit f8df73388ee25b5e5f1d26249202e7126ca8139d Author: Punit Agrawal Date: Tue Dec 11 17:10:36 2018 +0000 KVM: arm/arm64: Introduce helpers to manipulate page table entries Introduce helpers to abstract architectural handling of the conversion of pfn to page table entries and marking a PMD page table entry as a block entry. The helpers are introduced in preparation for supporting PUD hugepages at stage 2 - which are supported on arm64 but do not exist on arm. Signed-off-by: Punit Agrawal Reviewed-by: Suzuki K Poulose Acked-by: Christoffer Dall Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 6396b852e46e562f4742ed0a9042b537eb26b8aa Author: Punit Agrawal Date: Tue Dec 11 17:10:35 2018 +0000 KVM: arm/arm64: Re-factor setting the Stage 2 entry to exec on fault Stage 2 fault handler marks a page as executable if it is handling an execution fault or if it was a permission fault in which case the executable bit needs to be preserved. The logic to decide if the page should be marked executable is duplicated for PMD and PTE entries. To avoid creating another copy when support for PUD hugepages is introduced refactor the code to share the checks needed to mark a page table entry as executable. Signed-off-by: Punit Agrawal Reviewed-by: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 3f58bf63455588a260b6abc8761c48bc8977b919 Author: Punit Agrawal Date: Tue Dec 11 17:10:34 2018 +0000 KVM: arm/arm64: Share common code in user_mem_abort() The code for operations such as marking the pfn as dirty, and dcache/icache maintenance during stage 2 fault handling is duplicated between normal pages and PMD hugepages. Instead of creating another copy of the operations when we introduce PUD hugepages, let's share them across the different pagesizes. Signed-off-by: Punit Agrawal Reviewed-by: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Marc Zyngier commit 60c3ab30d8c2ff3a52606df03f05af2aae07dc6b Author: Christoffer Dall Date: Tue Dec 11 12:51:03 2018 +0100 KVM: arm/arm64: vgic-v2: Set active_source to 0 when restoring state When restoring the active state from userspace, we don't know which CPU was the source for the active state, and this is not architecturally exposed in any of the register state. Set the active_source to 0 in this case. In the future, we can expand on this and exposse the information as additional information to userspace for GICv2 if anyone cares. Cc: stable@vger.kernel.org Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit d1878af3a5a6ac00bc8a3edfecf80539ee9c546e Author: Mark Rutland Date: Thu Dec 6 12:31:44 2018 +0000 KVM: arm/arm64: Log PSTATE for unhandled sysregs When KVM traps an unhandled sysreg/coproc access from a guest, it logs the guest PC. To aid debugging, it would be helpful to know which exception level the trap came from, along with other PSTATE/CPSR bits, so let's log the PSTATE/CPSR too. Acked-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier commit fb544d1ca65a89f7a3895f7531221ceeed74ada7 Author: Christoffer Dall Date: Tue Dec 11 13:23:57 2018 +0100 KVM: arm/arm64: Fix VMID alloc race by reverting to lock-less We recently addressed a VMID generation race by introducing a read/write lock around accesses and updates to the vmid generation values. However, kvm_arch_vcpu_ioctl_run() also calls need_new_vmid_gen() but does so without taking the read lock. As far as I can tell, this can lead to the same kind of race: VM 0, VCPU 0 VM 0, VCPU 1 ------------ ------------ update_vttbr (vmid 254) update_vttbr (vmid 1) // roll over read_lock(kvm_vmid_lock); force_vm_exit() local_irq_disable need_new_vmid_gen == false //because vmid gen matches enter_guest (vmid 254) kvm_arch.vttbr = : read_unlock(kvm_vmid_lock); enter_guest (vmid 1) Which results in running two VCPUs in the same VM with different VMIDs and (even worse) other VCPUs from other VMs could now allocate clashing VMID 254 from the new generation as long as VCPU 0 is not exiting. Attempt to solve this by making sure vttbr is updated before another CPU can observe the updated VMID generation. Cc: stable@vger.kernel.org Fixes: f0cf47d939d0 "KVM: arm/arm64: Close VMID generation race" Reviewed-by: Julien Thierry Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier commit e4b92b108c6cd6b311e4b6e85d6a87a34599a6e3 Author: Arnd Bergmann Date: Fri Dec 7 13:45:54 2018 +0100 timekeeping: remove obsolete time accessors There are no more remaining users of these deprecated wrappers, so let's remove them before new users have a chance to make it in. See Documentation/core-api/timekeeping.rst for replacements when porting old drivers that contain calls to this function. Signed-off-by: Arnd Bergmann Acked-by: John Stultz commit d651d1607f22fd0cd249cb045627569f8028092b Author: Arnd Bergmann Date: Wed Dec 5 11:14:27 2018 +1100 vfs: replace current_kernel_time64 with ktime equivalent current_time is the last remaining caller of current_kernel_time64(), which is a wrapper around ktime_get_coarse_real_ts64(). This calls the latter directly for consistency with the rest of the kernel that is moving to the ktime_get_ family of time accessors, as now documented in Documentation/core-api/timekeeping.rst. An open questions is whether we may want to actually call the more accurate ktime_get_real_ts64() for file systems that save high-resolution timestamps in their on-disk format. This would add a small overhead to each update of the inode stamps but lead to inode timestamps to actually have a usable resolution better than one jiffy (1 to 10 milliseconds normally). Experiments on a variety of hardware platforms show a typical time of around 100 CPU cycles to read the cycle counter and calculate the accurate time from that. On old platforms without a cycle counter, this can be signiciantly higher, up to several microseconds to access a hardware clock, but those have become very rare by now. I traced the original addition of the current_kernel_time() call to set the nanosecond fields back to linux-2.5.48, where Andi Kleen added a patch with subject "nanosecond stat timefields". Andi explains that the motivation was to introduce as little overhead as possible back then. At this time, reading the clock hardware was also more expensive when most architectures did not have a cycle counter. One side effect of having more accurate inode timestamp would be having to write out the inode every time that mtime/ctime/atime get touched on most systems, whereas many file systems today only write it when the timestamps have changed, i.e. at most once per jiffy unless something else changes as well. That change would certainly be noticed in some workloads, which is enough reason to not do it without a good reason, regardless of the cost of reading the time. One thing we could still consider however would be to round the timestamps from current_time() to multiples of NSEC_PER_JIFFY, e.g. full milliseconds rather than having six or seven meaningless but confusing digits at the end of the timestamp. Link: http://lkml.kernel.org/r/20180726130820.4174359-1-arnd@arndb.de Signed-off-by: Arnd Bergmann commit 437e78d3fd6d35e6d56230962e6d03bb5dcda7f6 Author: Arnd Bergmann Date: Fri Dec 7 13:41:02 2018 +0100 timekeeping: remove timespec_add/timespec_del The last users were removed a while ago since everyone moved to ktime_t, so we can remove the two unused interfaces for old timespec structures. With those two gone, set_normalized_timespec() is also unused, so remove that as well. Signed-off-by: Arnd Bergmann Acked-by: John Stultz commit 926617889dc8383a120c66a2ecf7959a69f96950 Author: Arnd Bergmann Date: Tue Aug 14 14:15:23 2018 +0200 timekeeping: remove unused {read,update}_persistent_clock After arch/sh has removed the last reference to these functions, we can remove them completely and just rely on the 64-bit time_t based versions. This cleans up a rather ugly use of __weak functions. Signed-off-by: Arnd Bergmann Acked-by: John Stultz commit 19f48591e67c83e74e1b612f180b96ce7f1eaf85 Author: Arnd Bergmann Date: Fri Apr 20 17:46:39 2018 +0200 sh: remove board_time_init() callback The only remaining user of board_time_init() is the of-generic machine, and that just calls the global timer_init() function. Calling that one has no effect on non-DT platforms, so we can simply call it unconditionally in place of board_time_init(). Signed-off-by: Arnd Bergmann commit 07df7800c6cd0bfc3bfcbfc5f12ebbd73423a5ec Author: Arnd Bergmann Date: Wed Jan 24 16:18:50 2018 +0100 sh: remove unused rtc_sh_get/set_time infrastructure All platforms are now converted to RTC drivers, so this has become obsolete. The board_time_init() callback still has one caller, but could otherwise also get killed. This removes one more usage of the deprecated timespec structure, which overflows in y2038. Signed-off-by: Arnd Bergmann commit 09e81263e5013ce5add177d50c0b1da0725ce266 Author: Arnd Bergmann Date: Wed Jan 24 16:08:13 2018 +0100 sh: sh03: rtc: push down rtc class ops into driver The SH RTC support has an extra level of indirection to provide either the old read_persistent_clock/update_persistent_clock interface or the rtc-generic device for hctosys/systohc. By removing the indirection and always using the RTC_CLASS interface, we can avoid the lossy double conversion between rtc_time and timespec, so we end up supporting the entire range of 'year' values, and clarifying the rtc_set_time callback. I did not change the behavior of sh03_rtc_settimeofday(), which keeps just updating the seconds/minutes by calling set_rtc_mmss(), this could be improved if anyone cares. Also, the file should ideally be moved into drivers/rtc and not use rtc-generic. Signed-off-by: Arnd Bergmann commit b0495e4b67b230cdb8a7ba244cd260e529c53b84 Author: Arnd Bergmann Date: Wed Jan 24 15:04:31 2018 +0100 sh: dreamcast: rtc: push down rtc class ops into driver The SH RTC support has an extra level of indirection to provide either the old read_persistent_clock/update_persistent_clock interface or the rtc-generic device for hctosys/systohc. Both do the same thing for dreamcast, so we can do away with the abstraction and simply let the RTC core code to take care of it. Signed-off-by: Arnd Bergmann commit 2367c4b5fa09b2947d03c5cd23d7bc0200b7fe4f Author: Arnd Bergmann Date: Wed Apr 18 16:18:35 2018 +0200 y2038: signal: Add compat_sys_rt_sigtimedwait_time64 Now that 32-bit architectures have two variants of sys_rt_sigtimedwaid() for 32-bit and 64-bit time_t, we also need to have a second compat system call entry point on the corresponding 64-bit architectures. The traditional system call keeps getting handled by compat_sys_rt_sigtimedwait(), and this adds a new compat_sys_rt_sigtimedwait_time64() that differs only in the timeout argument type. The naming remains a bit asymmetric for the moment. Ideally we would want to have compat_sys_rt_sigtimedwait_time32() for the old version and compat_sys_rt_sigtimedwait() for the new one to mirror the names of the native entry points, but renaming the existing system call tables causes unnecessary churn. I would suggest renaming all such system calls together at a later point. Signed-off-by: Arnd Bergmann commit df8522a340ee4ccb725036e1f9145f5646939aed Author: Arnd Bergmann Date: Wed Apr 18 16:15:37 2018 +0200 y2038: signal: Add sys_rt_sigtimedwait_time32 Once sys_rt_sigtimedwait() gets changed to a 64-bit time_t, we have to provide compatibility support for existing binaries. An earlier version of this patch reused the compat_sys_rt_sigtimedwait entry point to avoid code duplication, but this newer approach duplicates the existing native entry point instead, which seems a bit cleaner. Signed-off-by: Arnd Bergmann commit e11d4284e2f4de5048c6d1787c82226f0a198292 Author: Arnd Bergmann Date: Wed Apr 18 13:43:52 2018 +0200 y2038: socket: Add compat_sys_recvmmsg_time64 recvmmsg() takes two arguments to pointers of structures that differ between 32-bit and 64-bit architectures: mmsghdr and timespec. For y2038 compatbility, we are changing the native system call from timespec to __kernel_timespec with a 64-bit time_t (in another patch), and use the existing compat system call on both 32-bit and 64-bit architectures for compatibility with traditional 32-bit user space. As we now have two variants of recvmmsg() for 32-bit tasks that are both different from the variant that we use on 64-bit tasks, this means we also require two compat system calls! The solution I picked is to flip things around: The existing compat_sys_recvmmsg() call gets moved from net/compat.c into net/socket.c and now handles the case for old user space on all architectures that have set CONFIG_COMPAT_32BIT_TIME. A new compat_sys_recvmmsg_time64() call gets added in the old place for 64-bit architectures only, this one handles the case of a compat mmsghdr structure combined with __kernel_timespec. In the indirect sys_socketcall(), we now need to call either do_sys_recvmmsg() or __compat_sys_recvmmsg(), depending on what kind of architecture we are on. For compat_sys_socketcall(), no such change is needed, we always call __compat_sys_recvmmsg(). I decided to not add a new SYS_RECVMMSG_TIME64 socketcall: Any libc implementation for 64-bit time_t will need significant changes including an updated asm/unistd.h, and it seems better to consistently use the separate syscalls that configuration, leaving the socketcall only for backward compatibility with 32-bit time_t based libc. The naming is asymmetric for the moment, so both existing syscalls entry points keep their names, while the new ones are recvmmsg_time32 and compat_recvmmsg_time64 respectively. I expect that we will rename the compat syscalls later as we start using generated syscall tables everywhere and add these entry points. Signed-off-by: Arnd Bergmann commit 54578ee883e34d2d1c518d48f1c1e2dd3f387188 Author: Bin Liu Date: Tue Dec 18 07:58:05 2018 -0600 usb: musb: dsps: fix runtime pm for peripheral mode Since the runtime PM support was added in musb, dsps relies on the timer calling otg_timer() to activate the usb subsystem. However the driver doesn't enable the timer for peripheral port, then the peripheral port is unable to be enumerated by a host if the other usb port is disabled or in peripheral mode too. So let's start the timer for peripheral port too. Fixes: ea2f35c01d5e ("usb: musb: Fix sleeping function called from invalid context for hdrc glue") Acked-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman commit 6010abf2c2c0e382d7e8ee44bd11f343aae90cce Author: Bin Liu Date: Tue Dec 18 07:58:04 2018 -0600 usb: musb: dsps: fix otg state machine Due to lack of ID pin interrupt event on AM335x devices, the musb dsps driver uses polling to detect usb device attach for dual-role port. But in the case if a micro-A cable adapter is attached without a USB device attached to the cable, the musb state machine gets stuck in a_wait_vrise state waiting for the MUSB_CONNECT interrupt which won't happen due to the usb device is not attached. The state is stuck in a_wait_vrise even after the micro-A cable is detached, which could cause VBUS retention if then the dual-role port is attached to a host port. To fix the problem, make a_wait_vrise as a transient state, then move the state to either a_wait_bcon for host port or a_idle state for dual-role port, if no usb device is attached to the port. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman commit bd7d95cafb499e24903b7d21f9eeb2c5208160c2 Author: Mark Rutland Date: Fri Nov 9 15:07:11 2018 +0000 arm64: KVM: Consistently advance singlestep when emulating instructions When we emulate a guest instruction, we don't advance the hardware singlestep state machine, and thus the guest will receive a software step exception after a next instruction which is not emulated by the host. We bodge around this in an ad-hoc fashion. Sometimes we explicitly check whether userspace requested a single step, and fake a debug exception from within the kernel. Other times, we advance the HW singlestep state rely on the HW to generate the exception for us. Thus, the observed step behaviour differs for host and guest. Let's make this simpler and consistent by always advancing the HW singlestep state machine when we skip an instruction. Thus we can rely on the hardware to generate the singlestep exception for us, and never need to explicitly check for an active-pending step, nor do we need to fake a debug exception from the guest. Cc: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier commit 0d640732dbebed0f10f18526de21652931f0b2f2 Author: Mark Rutland Date: Fri Nov 9 15:07:10 2018 +0000 arm64: KVM: Skip MMIO insn after emulation When we emulate an MMIO instruction, we advance the CPU state within decode_hsr(), before emulating the instruction effects. Having this logic in decode_hsr() is opaque, and advancing the state before emulation is problematic. It gets in the way of applying consistent single-step logic, and it prevents us from being able to fail an MMIO instruction with a synchronous exception. Clean this up by only advancing the CPU state *after* the effects of the instruction are emulated. Cc: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier commit da0abe1a04110491697ca9ff146e1107f40b4808 Author: Richard Fitzgerald Date: Fri Dec 14 14:44:16 2018 +0000 irqchip: Add driver for Cirrus Logic Madera codecs The Cirrus Logic Madera codecs (Cirrus Logic CS47L35/85/90/91 and WM1840) are highly complex devices containing up to 7 programmable DSPs and many other internal sources of interrupts plus a number of GPIOs that can be used as interrupt inputs. The large number (>150) of internal interrupt sources are managed by an on-board interrupt controller. This driver provides the handling for the interrupt controller. As the codec is accessed via regmap, we can make use of the generic IRQ functionality from regmap to do most of the work. Only around half of the possible interrupt source are currently of interest from the driver so only this subset is defined. Others can be added in future if needed. The KConfig options are not user-configurable because this driver is mandatory so is automatically included when the parent MFD driver is selected. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Marc Zyngier commit 34743bfddef2c50af20234ae873324ca49320a55 Author: Mike Snitzer Date: Mon Dec 10 11:55:56 2018 -0500 dm rq: cleanup leftover code from recently removed q->mq_ops branching When commit 6a23e05c2fe3c6 ("dm: remove legacy request-based IO path") removed some q->mq_ops branching from map_request() it left in place a goto that was only needed if that branching (and conditional 'r' assignment) existed. Now that the branching is gone map_request()'s goto can be removed too. Signed-off-by: Mike Snitzer commit bbf6a566920e1b0244b27b5f9882fb7f8bc83a31 Author: Eric Biggers Date: Wed Dec 5 20:54:13 2018 -0800 dm verity: log the hash algorithm implementation Log the hash algorithm's driver name when a dm-verity target is created. This will help people determine whether the expected implementation is being used. It can make an enormous difference; e.g., SHA-256 on ARM can be 8x faster with the crypto extensions than without. It can also be useful to know if an implementation using an external crypto accelerator is being used instead of a software implementation. Example message: [ 35.281945] device-mapper: verity: sha256 using implementation "sha256-ce" We've already found the similar message in fs/crypto/keyinfo.c to be very useful. Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer commit af331ebae7e10699a023fcce4f0671a01419ee3c Author: Eric Biggers Date: Wed Dec 5 20:53:00 2018 -0800 dm crypt: log the encryption algorithm implementation Log the encryption algorithm's driver name when a dm-crypt target is created. This will help people determine whether the expected implementation is being used. In some cases we've seen people do benchmarks and reject using encryption for performance reasons, when in fact they used a much slower implementation than was possible on the hardware. It can make an enormous difference; e.g., AES-XTS on ARM can be over 10x faster with the crypto extensions than without. It can also be useful to know if an implementation using an external crypto accelerator is being used instead of a software implementation. Example message: [ 29.307629] device-mapper: crypt: xts(aes) using implementation "xts-aes-ce" We've already found the similar message in fs/crypto/keyinfo.c to be very useful. Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer commit e8c2566f83527f6bcced86739adc5cd5262e2dd2 Author: Colin Ian King Date: Wed Nov 28 15:15:31 2018 +0000 dm integrity: fix spelling mistake in workqueue name Rename the workqueue from dm-intergrity-recalc to dm-integrity-recalc. Signed-off-by: Colin Ian King Signed-off-by: Mike Snitzer commit a00f5276e26636cbf72f24f79831026d2e2868e7 Author: Sweet Tea Date: Tue Nov 13 08:04:24 2018 -0500 dm flakey: Properly corrupt multi-page bios. The flakey target is documented to be able to corrupt the Nth byte in a bio, but does not corrupt byte indices after the first biovec in the bio. Change the corrupting function to actually corrupt the Nth byte no matter in which biovec that index falls. A test device generating two-page bios, atop a flakey device configured to corrupt a byte index on the second page, verified both the failure to corrupt before this patch and the expected corruption after this change. Signed-off-by: John Dorminy Signed-off-by: Mike Snitzer commit ef87bfc24f9b8da82c89aff493df20f078bc9cb1 Author: Milan Broz Date: Wed Nov 7 22:24:55 2018 +0100 dm: Check for device sector overflow if CONFIG_LBDAF is not set Reference to a device in device-mapper table contains offset in sectors. If the sector_t is 32bit integer (CONFIG_LBDAF is not set), then several device-mapper targets can overflow this offset and validity check is then performed on a wrong offset and a wrong table is activated. See for example (on 32bit without CONFIG_LBDAF) this overflow: # dmsetup create test --table "0 2048 linear /dev/sdg 4294967297" # dmsetup table test 0 2048 linear 8:96 1 This patch adds explicit check for overflow if the offset is sector_t type. Signed-off-by: Milan Broz Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 8d683dcd65c037efc9fb38c696ec9b65b306e573 Author: AliOS system security Date: Mon Nov 5 15:31:42 2018 +0800 dm crypt: use u64 instead of sector_t to store iv_offset The iv_offset in the mapping table of crypt target is a 64bit number when IV algorithm is plain64, plain64be, essiv or benbi. It will be assigned to iv_offset of struct crypt_config, cc_sector of struct convert_context and iv_sector of struct dm_crypt_request. These structures members are defined as a sector_t. But sector_t is 32bit when CONFIG_LBDAF is not set in 32bit kernel. In this situation sector_t is not big enough to store the 64bit iv_offset. Here is a reproducer. Prepare test image and device (loop is automatically allocated by cryptsetup): # dd if=/dev/zero of=tst.img bs=1M count=1 # echo "tst"|cryptsetup open --type plain -c aes-xts-plain64 \ --skip 500000000000000000 tst.img test On 32bit system (use IV offset value that overflows to 64bit; CONFIG_LBDAF if off) and device checksum is wrong: # dmsetup table test --showkeys 0 2048 crypt aes-xts-plain64 dfa7cfe3c481f2239155739c42e539ae8f2d38f304dcc89d20b26f69daaf0933 3551657984 7:0 0 # sha256sum /dev/mapper/test 533e25c09176632b3794f35303488c4a8f3f965dffffa6ec2df347c168cb6c19 /dev/mapper/test On 64bit system (and on 32bit system with the patch), table and checksum is now correct: # dmsetup table test --showkeys 0 2048 crypt aes-xts-plain64 dfa7cfe3c481f2239155739c42e539ae8f2d38f304dcc89d20b26f69daaf0933 500000000000000000 7:0 0 # sha256sum /dev/mapper/test 5d16160f9d5f8c33d8051e65fdb4f003cc31cd652b5abb08f03aa6fce0df75fc /dev/mapper/test Signed-off-by: AliOS system security Tested-and-Reviewed-by: Milan Broz Signed-off-by: Mike Snitzer commit d7e6b8dfc7bcb3f4f3a18313581f67486a725b52 Author: Nikos Tsironis Date: Wed Oct 31 17:53:09 2018 -0400 dm kcopyd: Fix bug causing workqueue stalls When using kcopyd to run callbacks through dm_kcopyd_do_callback() or submitting copy jobs with a source size of 0, the jobs are pushed directly to the complete_jobs list, which could be under processing by the kcopyd thread. As a result, the kcopyd thread can continue running completed jobs indefinitely, without releasing the CPU, as long as someone keeps submitting new completed jobs through the aforementioned paths. Processing of work items, queued for execution on the same CPU as the currently running kcopyd thread, is thus stalled for excessive amounts of time, hurting performance. Running the following test, from the device mapper test suite [1], dmtest run --suite snapshot -n parallel_io_to_many_snaps_N , with 8 active snapshots, we get, in dmesg, messages like the following: [68899.948523] BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 95s! [68899.949282] Showing busy workqueues and worker pools: [68899.949288] workqueue events: flags=0x0 [68899.949295] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=2/256 [68899.949306] pending: vmstat_shepherd, cache_reap [68899.949331] workqueue mm_percpu_wq: flags=0x8 [68899.949337] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 [68899.949345] pending: vmstat_update [68899.949387] workqueue dm_bufio_cache: flags=0x8 [68899.949392] pwq 4: cpus=2 node=0 flags=0x0 nice=0 active=1/256 [68899.949400] pending: work_fn [dm_bufio] [68899.949423] workqueue kcopyd: flags=0x8 [68899.949429] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 [68899.949437] pending: do_work [dm_mod] [68899.949452] workqueue kcopyd: flags=0x8 [68899.949458] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=2/256 [68899.949466] in-flight: 13:do_work [dm_mod] [68899.949474] pending: do_work [dm_mod] [68899.949487] workqueue kcopyd: flags=0x8 [68899.949493] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 [68899.949501] pending: do_work [dm_mod] [68899.949515] workqueue kcopyd: flags=0x8 [68899.949521] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 [68899.949529] pending: do_work [dm_mod] [68899.949541] workqueue kcopyd: flags=0x8 [68899.949547] pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 [68899.949555] pending: do_work [dm_mod] [68899.949568] pool 0: cpus=0 node=0 flags=0x0 nice=0 hung=95s workers=4 idle: 27130 27223 1084 Fix this by splitting the complete_jobs list into two parts: A user facing part, named callback_jobs, and one used internally by kcopyd, retaining the name complete_jobs. dm_kcopyd_do_callback() and dispatch_job() now push their jobs to the callback_jobs list, which is spliced to the complete_jobs list once, every time the kcopyd thread wakes up. This prevents kcopyd from hogging the CPU indefinitely and causing workqueue stalls. Re-running the aforementioned test: * Workqueue stalls are eliminated * The maximum writing time among all targets is reduced from 09m37.10s to 06m04.85s and the total run time of the test is reduced from 10m43.591s to 7m19.199s [1] https://github.com/jthornber/device-mapper-test-suite Signed-off-by: Nikos Tsironis Signed-off-by: Ilias Tsitsimpis Signed-off-by: Mike Snitzer commit 721b1d98fb517ae99ab3b757021cf81db41e67be Author: Nikos Tsironis Date: Wed Oct 31 17:53:08 2018 -0400 dm snapshot: Fix excessive memory usage and workqueue stalls kcopyd has no upper limit to the number of jobs one can allocate and issue. Under certain workloads this can lead to excessive memory usage and workqueue stalls. For example, when creating multiple dm-snapshot targets with a 4K chunk size and then writing to the origin through the page cache. Syncing the page cache causes a large number of BIOs to be issued to the dm-snapshot origin target, which itself issues an even larger (because of the BIO splitting taking place) number of kcopyd jobs. Running the following test, from the device mapper test suite [1], dmtest run --suite snapshot -n many_snapshots_of_same_volume_N , with 8 active snapshots, results in the kcopyd job slab cache growing to 10G. Depending on the available system RAM this can lead to the OOM killer killing user processes: [463.492878] kthreadd invoked oom-killer: gfp_mask=0x6040c0(GFP_KERNEL|__GFP_COMP), nodemask=(null), order=1, oom_score_adj=0 [463.492894] kthreadd cpuset=/ mems_allowed=0 [463.492948] CPU: 7 PID: 2 Comm: kthreadd Not tainted 4.19.0-rc7 #3 [463.492950] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [463.492952] Call Trace: [463.492964] dump_stack+0x7d/0xbb [463.492973] dump_header+0x6b/0x2fc [463.492987] ? lockdep_hardirqs_on+0xee/0x190 [463.493012] oom_kill_process+0x302/0x370 [463.493021] out_of_memory+0x113/0x560 [463.493030] __alloc_pages_slowpath+0xf40/0x1020 [463.493055] __alloc_pages_nodemask+0x348/0x3c0 [463.493067] cache_grow_begin+0x81/0x8b0 [463.493072] ? cache_grow_begin+0x874/0x8b0 [463.493078] fallback_alloc+0x1e4/0x280 [463.493092] kmem_cache_alloc_node+0xd6/0x370 [463.493098] ? copy_process.part.31+0x1c5/0x20d0 [463.493105] copy_process.part.31+0x1c5/0x20d0 [463.493115] ? __lock_acquire+0x3cc/0x1550 [463.493121] ? __switch_to_asm+0x34/0x70 [463.493129] ? kthread_create_worker_on_cpu+0x70/0x70 [463.493135] ? finish_task_switch+0x90/0x280 [463.493165] _do_fork+0xe0/0x6d0 [463.493191] ? kthreadd+0x19f/0x220 [463.493233] kernel_thread+0x25/0x30 [463.493235] kthreadd+0x1bf/0x220 [463.493242] ? kthread_create_on_cpu+0x90/0x90 [463.493248] ret_from_fork+0x3a/0x50 [463.493279] Mem-Info: [463.493285] active_anon:20631 inactive_anon:4831 isolated_anon:0 [463.493285] active_file:80216 inactive_file:80107 isolated_file:435 [463.493285] unevictable:0 dirty:51266 writeback:109372 unstable:0 [463.493285] slab_reclaimable:31191 slab_unreclaimable:3483521 [463.493285] mapped:526 shmem:4903 pagetables:1759 bounce:0 [463.493285] free:33623 free_pcp:2392 free_cma:0 ... [463.493489] Unreclaimable slab info: [463.493513] Name Used Total [463.493522] bio-6 1028KB 1028KB [463.493525] bio-5 1028KB 1028KB [463.493528] dm_snap_pending_exception 236783KB 243789KB [463.493531] dm_exception 41KB 42KB [463.493534] bio-4 1216KB 1216KB [463.493537] bio-3 439396KB 439396KB [463.493539] kcopyd_job 6973427KB 6973427KB ... [463.494340] Out of memory: Kill process 1298 (ruby2.3) score 1 or sacrifice child [463.494673] Killed process 1298 (ruby2.3) total-vm:435740kB, anon-rss:20180kB, file-rss:4kB, shmem-rss:0kB [463.506437] oom_reaper: reaped process 1298 (ruby2.3), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB Moreover, issuing a large number of kcopyd jobs results in kcopyd hogging the CPU, while processing them. As a result, processing of work items, queued for execution on the same CPU as the currently running kcopyd thread, is stalled for long periods of time, hurting performance. Running the aforementioned test we get, in dmesg, messages like the following: [67501.194592] BUG: workqueue lockup - pool cpus=4 node=0 flags=0x0 nice=0 stuck for 27s! [67501.195586] Showing busy workqueues and worker pools: [67501.195591] workqueue events: flags=0x0 [67501.195597] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195611] pending: cache_reap [67501.195641] workqueue mm_percpu_wq: flags=0x8 [67501.195645] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195656] pending: vmstat_update [67501.195682] workqueue kblockd: flags=0x18 [67501.195687] pwq 5: cpus=2 node=0 flags=0x0 nice=-20 active=1/256 [67501.195698] pending: blk_timeout_work [67501.195753] workqueue kcopyd: flags=0x8 [67501.195757] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195768] pending: do_work [dm_mod] [67501.195802] workqueue kcopyd: flags=0x8 [67501.195806] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195817] pending: do_work [dm_mod] [67501.195834] workqueue kcopyd: flags=0x8 [67501.195838] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195848] pending: do_work [dm_mod] [67501.195881] workqueue kcopyd: flags=0x8 [67501.195885] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=1/256 [67501.195896] pending: do_work [dm_mod] [67501.195920] workqueue kcopyd: flags=0x8 [67501.195924] pwq 8: cpus=4 node=0 flags=0x0 nice=0 active=2/256 [67501.195935] in-flight: 67:do_work [dm_mod] [67501.195945] pending: do_work [dm_mod] [67501.195961] pool 8: cpus=4 node=0 flags=0x0 nice=0 hung=27s workers=3 idle: 129 23765 The root cause for these issues is the way dm-snapshot uses kcopyd. In particular, the lack of an explicit or implicit limit to the maximum number of in-flight COW jobs. The merging path is not affected because it implicitly limits the in-flight kcopyd jobs to one. Fix these issues by using a semaphore to limit the maximum number of in-flight kcopyd jobs. We grab the semaphore before allocating a new kcopyd job in start_copy() and start_full_bio() and release it after the job finishes in copy_callback(). The initial semaphore value is configurable through a module parameter, to allow fine tuning the maximum number of in-flight COW jobs. Setting this parameter to zero initializes the semaphore to INT_MAX. A default value of 2048 maximum in-flight kcopyd jobs was chosen. This value was decided experimentally as a trade-off between memory consumption, stalling the kernel's workqueues and maintaining a high enough throughput. Re-running the aforementioned test: * Workqueue stalls are eliminated * kcopyd's job slab cache uses a maximum of 130MB * The time taken by the test to write to the snapshot-origin target is reduced from 05m20.48s to 03m26.38s [1] https://github.com/jthornber/device-mapper-test-suite Signed-off-by: Nikos Tsironis Signed-off-by: Ilias Tsitsimpis Signed-off-by: Mike Snitzer commit ef9923739e6d2233dc16aba70b7d81767d85cfcb Author: Shenghui Wang Date: Tue Oct 30 15:35:54 2018 +0800 dm bufio: update comment in dm-bufio.c * Hashtable has been replaced by rbtree to manage buffers. Update the comment. * Fix typo in the comment for dm_bufio_issue_flush Signed-off-by: Shenghui Wang Signed-off-by: Mike Snitzer commit e8ea141a0f5e1d7b23f47d10c480d4fc55caaf14 Author: Shenghui Wang Date: Wed Oct 24 16:04:36 2018 +0800 dm writecache: fix typo in error msg for creating writecache_flush_thread The error msg should be "flush thread" instead of "endio thread" for writecache_flush_thread. Signed-off-by: Shenghui Wang Signed-off-by: Mike Snitzer commit 53b471687012c80a8c03250cecf7121ffa8781f8 Author: Mike Snitzer Date: Mon Dec 3 17:00:54 2018 -0500 dm: remove indirect calls from __send_changing_extent_only() No need to be so fancy. Signed-off-by: Mike Snitzer commit 935fcc56abc321ca828f2d1fbb732fd478fd3449 Author: wuzhouhui Date: Thu Mar 22 22:22:38 2018 +0800 dm mpath: only flush workqueue when needed The workqueues are shared by many multipath devices, only flush whole workqueue when necessary. Otherwise, we just flush works as needed. Signed-off-by: wuzhouhui Signed-off-by: Mike Snitzer commit 2adc5c559a0770ef75d1647fbf557c7f56194ef8 Author: Mike Snitzer Date: Thu Nov 8 14:59:41 2018 -0500 dm rq: remove unused arguments from rq_completed() Signed-off-by: Mike Snitzer commit 24113d4878439baf1f23c1a33dfcc340fba66e97 Author: Mikulas Patocka Date: Tue Nov 6 22:34:59 2018 +0100 dm: avoid indirect call in __dm_make_request Indirect calls are inefficient because of retpolines that are used for spectre workaround. This patch replaces an indirect call with a condition (that can be predicted by the branch predictor). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit ed49e839199e73966b9ff5946c3e87759827b40e Merge: 40906ebe3af6a a7a850dba8249 Author: Takashi Iwai Date: Tue Dec 18 14:59:56 2018 +0100 Merge tag 'asoc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v4.21 Not much work on the core this time around but we've seen quite a bit of driver work, including on the generic DT drivers. There's also a large part of the diff from a merge of the DaVinci and OMAP directories, along with some active development there: - Preparatory work from Morimoto-san for merging the audio-graph and audio-graph-scu cards. - A merge of the TI OMAP and DaVinci directories, the OMAP product line has been merged into the DaVinci product line so there is now a lot of IP sharing which meant that the split directories just got in the way. This has pulled in a few architecture changes as well. - A big cleanup of the Maxim MAX9867 driver from Ladislav Michl. - Support for Asahi Kaesi AKM4118, AMD ACP3x, Intel platforms with RT5660, Meson AXG S/PDIF inputs, several Qualcomm IPs and Xilinx I2S controllers. commit 46b14eef59a8157138dc02f916a7f97c73b3ec53 Author: Peter Hutterer Date: Thu Dec 13 11:28:51 2018 +1000 HID: doc: fix wrong data structure reference for UHID_OUTPUT Signed-off-by: Peter Hutterer Signed-off-by: Jiri Kosina commit 41c5c5b0e7c8a0fd03722f2b061e1d492e359d45 Author: Honghui Zhang Date: Fri Dec 14 09:25:42 2018 +0800 arm64: dts: mt7622: Remove un-used property for PCIe The "num-lanes" property for PCIe is not used, remove it. Signed-off-by: Honghui Zhang Signed-off-by: Lorenzo Pieralisi commit ebcd631df106561aa3906801053775e5f15a8e34 Author: Honghui Zhang Date: Fri Dec 14 09:25:41 2018 +0800 arm: dts: mt7623: Remove un-used property for PCIe The "num-lanes" property for PCIe is not used, remove it. Signed-off-by: Honghui Zhang Signed-off-by: Lorenzo Pieralisi commit f2bb7d6a82da32bfd59c65540758fd2a01cccf74 Author: Honghui Zhang Date: Fri Dec 14 09:25:40 2018 +0800 dt-bindings: PCI: MediaTek: Remove un-used property The "num-lanes" property is not used, remove it. Signed-off-by: Honghui Zhang Signed-off-by: Lorenzo Pieralisi commit 7b96dc91be5e86f94e950ffd947874839a8aee9d Author: Honghui Zhang Date: Fri Dec 14 09:25:39 2018 +0800 PCI: mediatek: Remove un-used variant in struct mtk_pcie_port The "lane" variant in struct mtk_pcie_port is not used, remove it. Signed-off-by: Honghui Zhang Signed-off-by: Lorenzo Pieralisi commit a137401d85129953a1713d443216eb6b1074c12e Merge: 0d7410ea6efcd 33221307c3f99 Author: Daniel Borkmann Date: Tue Dec 18 14:47:18 2018 +0100 Merge branch 'bpf-bpftool-mount-tracefs' Quentin Monnet says: ==================== This series focus on mounting (or not mounting) tracefs with bpftool. First patch makes bpftool attempt to mount tracefs if tracefs is not found when running "bpftool prog tracelog". Second patch adds an option to bpftool to prevent it from attempting to mount any file system (tracefs or bpffs), in case this behaviour is undesirable for some users. ==================== Signed-off-by: Daniel Borkmann commit 33221307c3f993500a9cfc6900811058c6bfc152 Author: Quentin Monnet Date: Tue Dec 18 10:13:19 2018 +0000 tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs In order to make life easier for users, bpftool automatically attempts to mount the BPF virtual file system, if it is not mounted already, before trying to pin objects in it. Similarly, it attempts to mount tracefs if necessary before trying to dump the trace pipe to the console. While mounting file systems on-the-fly can improve user experience, some administrators might prefer to avoid that. Let's add an option to block these mount attempts. Note that it does not prevent automatic mounting of tracefs by debugfs for the "bpftool prog tracelog" command. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit be3245e22d227ad68ab97785d506561374daa028 Author: Quentin Monnet Date: Tue Dec 18 10:13:18 2018 +0000 tools: bpftool: attempt to mount tracefs if required for tracelog cmd As a follow-up to commit 30da46b5dc3a ("tools: bpftool: add a command to dump the trace pipe"), attempt to mount the tracefs virtual file system if it is not detected on the system before trying to dump content of the tracing pipe on an invocation of "bpftool prog tracelog". Usually, tracefs in automatically mounted by debugfs when the user tries to access it (e.g. "ls /sys/kernel/debug/tracing" mounts the tracefs). So if we failed to find it, it is probably that debugfs is not here either. Therefore, we just attempt a single mount, at a location that does not involve debugfs: /sys/kernel/tracing. Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 0d7410ea6efcdfda56773999f692bbd5d4e4bc00 Author: Yonghong Song Date: Mon Dec 17 17:31:57 2018 -0800 tools/bpf: check precise {func, line, jited_line}_info_rec_size in test_btf Current btf func_info, line_info and jited_line are designed to be extensible. The record sizes for {func,line}_info are passed to kernel, and the record sizes for {func,line,jited_line}_info are returned to userspace during bpf_prog_info query. In bpf selftests test_btf.c, when testing whether kernel returns a legitimate {func,line, jited_line)_info rec_size, the test only compares to the minimum allowed size. If the returned rec_size is smaller than the minimum allowed size, it is considered incorrect. The minimum allowed size for these three info sizes are equal to current value of sizeof(struct bpf_func_info), sizeof(struct bpf_line_info) and sizeof(__u64). The original thinking was that in the future when rec_size is increased in kernel, the same test should run correctly. But this sacrificed the precision of testing under the very kernel the test is shipped with, and bpf selftest is typically run with the same repo kernel. So this patch changed the testing of rec_size such that the kernel returned value should be equal to the size defined by tools uapi header bpf.h which syncs with kernel uapi header. Martin discovered a bug in one of rec_size comparisons. Instead of comparing to minimum func_info rec_size 8, it compares to 4. This patch fixed that issue as well. Fixes: 999d82cbc044 ("tools/bpf: enhance test_btf file testing to test func info") Fixes: 05687352c600 ("bpf: Refactor and bug fix in test_func_type in test_btf.c") Fixes: 4d6304c76355 ("bpf: Add unit tests for bpf_line_info") Suggested-by: Martin KaFai Lau Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit ca46afdb2754dbb4a5d5772332fa16957d9bc618 Merge: 8162b3d1a728c 028713aa8389d Author: Ingo Molnar Date: Tue Dec 18 14:39:00 2018 +0100 Merge tag 'perf-core-for-mingo-4.21-20181217' 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: - Introduce 'perf record --aio' to use asynchronous IO trace writing, disabled by default (Alexey Budankov) - Add fallback routines to be used in places where we don't have the CPU mode (kernel/userspace/hypervisor) and thus must first fallback lookups looking at all map trees when trying to resolve symbols (Adrian Hunter) - Fix error with config term "pt=0", where we should just force "pt=1" and warn the user about the former being nonsensical (Adrian Hunter) - Fix 'perf test' entry where we expect 'sleep' to come in a PERF_RECORD_COMM but instead we get 'coreutils' when sleep is provided by some versions of the 'coreutils' package (Adrian Hunter) - Introduce 'perf top --kallsyms file' to match 'perf report --kallsyms', useful when dealing with BPF, where symbol resolution happens via kallsyms, not via the default vmlinux ELF symtabs (Arnaldo Carvalho de Melo) - Support 'srccode' output field in 'perf script' (Andi Kleen) - Introduce basic 'perf annotation' support for the ARC architecture (Eugeniy Paltsev) - Compute and display average IPC and IPC coverage per symbol in 'perf annotate' and 'perf report' (Jin Yao) - Make 'perf top' use ordered_events and process histograms in a separate thread (Jiri Olsa) - Make 'perf trace' use ordered_events (Jiri Olsa) - Add support for ETMv3 and PTMv1.1 decoding in cs-etm (Mathieu Poirier) - Support for ARM A32/T32 instruction sets in CoreSight trace (cs-etm) (Robert Walker) - Fix 'perf stat' shadow stats for clock events. (Ravi Bangoria) - Remove needless rb_tree extra indirection from map__find() (Eric Saint-Etienne) - Fix CSV mode column output for non-cgroup events in 'perf stat' (Stephane Eranian) - Add sanity check to libtraceevent's is_timestamp_in_us() (Tzvetomir Stoyanov) - Use ERR_CAST instead of ERR_PTR(PTR_ERR()) (Wen Yang) - Fix Load_Miss_Real_Latency on SKL/SKX intel vendor event files (Andi Kleen) - strncpy() fixes triggered by new warnings on gcc 8.2.0 (Arnaldo Carvalho de Melo) - Handle tracefs syscall tracepoint older 'nr' field in 'perf trace', that got renamed to '__syscall_nr' to work in older kernels (Arnaldo Carvalho de Melo) - Give better hint about devel package for libssl (Arnaldo Carvalho de Melo) - Fix the 'perf trace' build in architectures lacking explicit mmap.h file (Arnaldo Carvalho de Melo) - Remove extra rb_tree traversal indirection from map__find() (Eric Saint-Etienne) - Disable breakpoint tests for 32-bit ARM (Florian Fainelli) - Fix typos all over the place, mostly in comments, but also in some debug messages and JSON files (Ingo Molnar) - Allow specifying proc-map-timeout in config file (Mark Drayton) - Fix mmap_flags table generation script (Sihyeon Jang) - Fix 'size' parameter to snprintf in the 'perf config' code (Sihyeon Jang) - More libtraceevent renames to make it a proper library (Tzvetomir Stoyanov) - Implement new API tep_get_ref() in libtraceevent (Tzvetomir Stoyanov) - Added support for pkg-config in libtraceevent (Tzvetomir Stoyanov) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 221b35fedee1b38b9cee99320f0c60263d229e14 Merge: 272c1a9b49398 801c7a1e52862 Author: Daniel Vetter Date: Tue Dec 18 14:24:52 2018 +0100 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Lucas writes: "nothing major this time, mostly some cleanups that were found on the way of reworking the code in preparation for new feature additions." Small conflict in drivers/gpu/drm/etnaviv/etnaviv_drv.c because drm-misc-next also has a patch to switch over to _put() functions. Signed-off-by: Daniel Vetter From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/1545130845.5874.23.camel@pengutronix.de commit c5f48c0a7aa1a8c82d81cdf27e63aa0a5544c6e6 Author: Ingo Molnar Date: Mon Dec 3 11:44:51 2018 +0100 genirq: Fix various typos in comments Go over the IRQ subsystem source code (including irqchip drivers) and fix common typos in comments. No change in functionality intended. Signed-off-by: Ingo Molnar Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Peter Zijlstra Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org commit dc7eb0f2c23f58bc0e15574bda2dc8498d30a833 Author: Shaul Triebitz Date: Sat Dec 15 11:03:20 2018 +0200 mac80211: do not advertise HE cap IE if HE disabled When disabling HE due to the lack of HT/VHT, do it at an earlier stage to avoid advertising HE capabilities IE. Also, at this point, no need to check if AP supports HE, since it is already checked earlier (in ieee80211_prep_channel). Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 002245ec20b273bc1e31ed8fbee01396955a0f19 Author: Shaul Triebitz Date: Sat Dec 15 11:03:19 2018 +0200 mac80211: set STA flag DISABLE_HE if HE is not supported Up until now, the IEEE80211_STA_DISABLE_HE flag was set only based on whether the AP has advertised HE capabilities. This flag should be set also if STA does not support HE (regardless of the AP support). Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 2e249fc320862e3f75fd255a21554d6de90fb55a Author: Shaul Triebitz Date: Sat Dec 15 11:03:15 2018 +0200 mac80211: update driver when MU EDCA params change Similar to WMM IE, if MU_EDCA IE parameters changed (or ceased to exist) tell the Driver about it. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit daa5b83513a7a85491ffa03e7aabd9d7348e97d5 Author: Shaul Triebitz Date: Sat Dec 15 11:03:05 2018 +0200 mac80211: update HE operation fields to D3.0 HE Operation element has changed in 11ax D3.0. Update the fields accordingly. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 55ebd6e6c765cce4697a6fbb97acf6eec9ad7a51 Author: Emmanuel Grumbach Date: Sat Dec 15 11:03:04 2018 +0200 mac80211: propagate the support for TWT to the driver TWT is a feature that was added in 11ah and enhanced in 11ax. There are two bits that need to be set if we want to use the feature in 11ax: one in the HE Capability IE and one in the Extended Capability IE. This is because of backward compatibility between 11ah and 11ax. In order to simplify the flow for the low level driver in managed mode, aggregate the two bits and add a boolean that tells whether TWT is supported or not, but only if 11ax is supported. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit fdb313e3182094939b34234bdade0fbce28dfb2c Author: Emmanuel Grumbach Date: Sat Dec 15 11:03:03 2018 +0200 ieee80211: add bits for TWT in Extended Capabilities IE These bits are defined in ieee802.11ax to advertise support for TWT in addition to the bits in the HE IE. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 20c3a2c33e9fdc82e9e8e8d2a6445b3256d20191 Author: Thomas Lendacky Date: Thu Dec 13 23:03:54 2018 +0000 x86/speculation: Add support for STIBP always-on preferred mode Different AMD processors may have different implementations of STIBP. When STIBP is conditionally enabled, some implementations would benefit from having STIBP always on instead of toggling the STIBP bit through MSR writes. This preference is advertised through a CPUID feature bit. When conditional STIBP support is requested at boot and the CPU advertises STIBP always-on mode as preferred, switch to STIBP "on" support. To show that this transition has occurred, create a new spectre_v2_user_mitigation value and a new spectre_v2_user_strings message. The new mitigation value is used in spectre_v2_user_select_mitigation() to print the new mitigation message as well as to return a new string from stibp_state(). Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Cc: Andrea Arcangeli Cc: Konrad Rzeszutek Wilk Cc: Jiri Kosina Cc: Borislav Petkov Cc: Tim Chen Cc: David Woodhouse Link: https://lkml.kernel.org/r/20181213230352.6937.74943.stgit@tlendack-t1.amdoffice.net commit 30c63115e20b70f89b7cfb66b35e2a0ef4b0ef07 Author: Sriram R Date: Tue Dec 4 17:46:52 2018 +0530 nl80211: Add support to notify radar event info received from STA Currently radar detection and corresponding channel switch is handled at the AP device. STA ignores these detected radar events since the radar signal can be seen mostly by the AP as well. But in scenarios where a radar signal is seen only at STA, notifying this event to the AP which can trigger a channel switch can be useful. Stations can report such radar events autonomously through Spectrum management (Measurement Report) action frame to its AP. The userspace on processing the report can notify the kernel with the use of the added NL80211_CMD_NOTIFY_RADAR to indicate the detected event and inturn adding the reported channel to NOL. Signed-off-by: Sriram R Signed-off-by: Johannes Berg commit 8ca66b7ccf3c9aeb3b6796967bf48f776bfd5523 Author: Lucas Stach Date: Fri Dec 14 13:15:28 2018 +0100 irqchip/irq-imx-gpcv2: Add IRQCHIP_DECLARE for i.MX8MQ compatible The GPC node on i.MX8MQ can not claim to be compatible with the i.MX7D GPC, as the power gating part has some significant differences. Thus we can not rely on the irqchip being probed with the old compatible. Signed-off-by: Lucas Stach Signed-off-by: Marc Zyngier commit 1fb51c975a80eab6b36fec203a178852fbb37665 Author: Wei Yongjun Date: Mon Dec 17 11:58:18 2018 +0000 irqchip/irq-rda-intc: Fix return value check in rda8810_intc_init() In case of error, the function of_io_request_and_map() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d852e62ad689 ("irqchip: Add RDA8810PL interrupt driver") Acked-by: Manivannan Sadhasivam Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier commit aa02ef099cff042c2a9109782ec2bf1bffc955d4 Author: Hui Wang Date: Wed Nov 7 10:36:43 2018 +0800 x86/topology: Use total_cpus for max logical packages calculation nr_cpu_ids can be limited on the command line via nr_cpus=. This can break the logical package management because it results in a smaller number of packages while in kdump kernel. Check below case: There is a two sockets system, each socket has 8 cores, which has 16 logical cpus while HT was turn on. 0 1 2 3 4 5 6 7 | 16 17 18 19 20 21 22 23 cores on socket 0 threads on socket 0 8 9 10 11 12 13 14 15 | 24 25 26 27 28 29 30 31 cores on socket 1 threads on socket 1 While starting the kdump kernel with command line option nr_cpus=16 panic was triggered on one of the cpus 24-31 eg. 26, then online cpu will be 1-15, 26(cpu 0 was disabled in kdump), ncpus will be 16 and __max_logical_packages will be 1, but actually two packages were booted on. This issue can reproduced by set kdump option nr_cpus=, and then trigger panic on last socket's thread, for example: taskset -c 26 echo c > /proc/sysrq-trigger Use total_cpus which will not be limited by nr_cpus command line to calculate the value of __max_logical_packages. Signed-off-by: Hui Wang Signed-off-by: Thomas Gleixner Cc: Cc: Cc: Cc: Link: https://lkml.kernel.org/r/20181107023643.22174-1-john.wanghui@huawei.com commit a7a850dba82498a1e050d8d153cae67ce0edb3b2 Merge: c5fd9e77be443 0f4967bc21de0 Author: Mark Brown Date: Tue Dec 18 12:23:59 2018 +0000 Merge branch 'asoc-4.21' into asoc-next commit c5fd9e77be44360b4827069c59f524815517917b Merge: 7566ec393f416 a01b8d1d24451 Author: Mark Brown Date: Tue Dec 18 12:23:57 2018 +0000 Merge branch 'asoc-4.20' into asoc-linus commit 0f4967bc21de0bb9e107f9ad3ced852daf66acd2 Author: Peter Ujfalusi Date: Mon Dec 17 14:21:42 2018 +0200 ASoC: ti: Kconfig: Remove the deprecated options We no longer have these options used anywhere. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit 41e95652ee225f121d38916d8d6849e3c15a924a Author: Peter Ujfalusi Date: Mon Dec 17 14:21:41 2018 +0200 ARM: davinci_all_defconfig: Update the audio options Use the new options for default audio support. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit eab5b50a13de4717cad5eda3d26d889f2f4ea37d Author: Peter Ujfalusi Date: Mon Dec 17 14:21:40 2018 +0200 ARM: omap1_defconfig: Do not select ASoC by default No audio support is enabled by default via ASoC, disable the code as well. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit 3162b05fb74cd107b2a66f20485c62514b20048f Author: Peter Ujfalusi Date: Mon Dec 17 14:21:39 2018 +0200 ARM: omap2plus_defconfig: Update the audio options Use the new options for default audio support and enable Nokia n900 audio as well. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit 4d8c1e7efb9f915034c3dba2bc85ed1f8509ae0c Author: Peter Ujfalusi Date: Mon Dec 17 14:21:38 2018 +0200 ARM: davinci: dm365-evm: Update for the new ASoC Kcofnig options The codec selection config options for DMA365 has been changed. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit 558eb0bfb271323cfd9f864f34d3253a65f352dd Author: Peter Ujfalusi Date: Mon Dec 17 14:21:37 2018 +0200 ARM: OMAP2: Update for new MCBSP Kconfig option The MCBSP config option has been changed. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit c27ace2e95a29c3b359123363d4f88864452917d Author: Peter Ujfalusi Date: Mon Dec 17 14:21:36 2018 +0200 ARM: OMAP1: Makefile: Update for new MCBSP Kconfig option The MCBSP config option has been changed. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit ca1c4d6535249ad43068834687f78d0db82d9e2e Author: Peter Ujfalusi Date: Mon Dec 17 14:21:35 2018 +0200 MAINTAINERS: Add entry for sound/soc/ti and update the OMAP audio support The sound/soc/davinci and omap directories are merged under sound/soc/ti. Add myself as maintainer and update the OMAP audio support section with the new path and file names. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit f2055e145f2975a75dace8e386fad9364828cdb4 Author: Peter Ujfalusi Date: Mon Dec 17 14:21:34 2018 +0200 ASoC: ti: Merge davinci and omap directories Create new directory to contain all Texas Instruments specific DAI, platform and machine drivers instead of scattering them under davinci and omap directories. There is already inter dependency between the two directories becasue of McASP (on dra7x it is serviced by sDMA, not EDMA). With the upcoming AM654 we will need to introduce new platform driver for UDMA and it does not fit under davinci, nor under omap. With the move I have restructured the Kconfig to be more usable in the era of simple-sound-card: CPU DAIs can be selected individually and they will select the platform driver they can be served with. To avoid breakage, I have moved over deprecated Kconfig options so defconfig builds will work without regression. Signed-off-by: Peter Ujfalusi For sound/soc/{omap => ti}: Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula Acked-by: Tony Lindgren Signed-off-by: Mark Brown commit 344f8e00933da8c275fa293caadfc62680d46d21 Author: Sara Sharon Date: Sat Dec 15 11:03:07 2018 +0200 mac80211: don't build AMSDU from GSO packets If we build AMSDU from GSO packets, it can lead to bad results if anyone tries to call skb_gso_segment on the packets. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit fca1279f090b8e38eadb95c3914d51e544142e74 Author: Johannes Berg Date: Sat Dec 15 11:03:08 2018 +0200 mac80211: document RCU requirements for ieee80211_tx_dequeue() In the iwlwifi conversion, we sometimes call this from outside of the wake_tx_queue() method, and in those cases must be in an RCU critical section. Document this requirement. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 233e98dc9c3009943aa34d58925d94ac9330e17b Author: Johannes Berg Date: Sat Dec 15 11:03:09 2018 +0200 mac80211: remove superfluous NULL check At the place where this code lives now, the skb can never be NULL, so we can remove the pointless NULL check. It seems to exist because this code was moved around a few times and originally came from a place where it could in fact be NULL. Signed-off-by: Johannes Berg commit dd665d23c1e94ad81d8720e90666030c5714a158 Author: Johannes Berg Date: Sat Dec 15 11:03:11 2018 +0200 mac80211: never pass NULL params to ieee80211_if_add() This isn't really a problem now, but it means that the function has a few NULL checks that are only relevant when coming from the initial interface added in mac80211, and that's confusing. Just pass non-NULL (but equivalently empty) in that case and remove all the NULL checks. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 8020919a9b99d6c990dc6a50e8215e291fbbe5a6 Author: Ilan Peer Date: Sat Dec 15 11:03:17 2018 +0200 mac80211: Properly handle SKB with radiotap only The monitor interface Rx handling of SKBs that contain only radiotap information was buggy as it tried to access the SKB assuming it contains a frame. To fix this, check the RX_FLAG_NO_PSDU flag in the Rx status (indicting that the SKB contains only radiotap information), and do not perform data path specific processing when the flag is set. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 925b5978cdc7287ba08ed21bf27970131f147720 Author: Luca Coelho Date: Sat Dec 15 11:03:21 2018 +0200 cfg80211: add some missing fall through annotations There are talks about enabling -Wimplicit-fallthrough warnings in the mainline and it is already enabled in linux-next. Add all the missing annotations to prevent warnings when this happens. And in one case, remove the extra text from the annotation so that the compiler recognizes it. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg commit 30db641ef4f68054db9b191b6c0200fb1a96d458 Author: Johannes Berg Date: Sat Dec 15 11:03:23 2018 +0200 cfg80211: clarify LCI/civic location documentation The older code and current userspace assumed that this data is the content of the Measurement Report element, starting with the Measurement Token. Clarify this in the documentation. Signed-off-by: Johannes Berg commit 554be8333088e4a40f4b522c2b36ab23fb22f4be Author: Johannes Berg Date: Sat Dec 15 11:03:24 2018 +0200 mac80211: ftm responder: remove pointless defensive coding The pointer and corresponding length is always set in pairs in cfg80211, so no need to have this strange defensive check that also confuses static checkers. Clean it up. Signed-off-by: Johannes Berg commit 3453de98145fa1a9453d18a42406bb7a47bec269 Author: Randy Dunlap Date: Thu Dec 6 12:58:30 2018 -0800 wireless: FTM: fix kernel-doc "cannot understand" warnings Fix kernel-doc warnings in FTM due to missing "struct" keyword. Fixes 109 warnings from : ../include/net/cfg80211.h:2838: warning: cannot understand function prototype: 'struct cfg80211_ftm_responder_stats ' and fixes 88 warnings from : ../include/net/mac80211.h:477: warning: cannot understand function prototype: 'struct ieee80211_ftm_responder_params ' Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics") Fixes: bc847970f432 ("mac80211: support FTM responder configuration/statistics") Signed-off-by: Randy Dunlap Cc: Pradeep Kumar Chitrapu Cc: Johannes Berg Cc: David Spinadel Signed-off-by: Johannes Berg commit 3e8bf5234e4e23b66e49da636dc2ab165c8c91a0 Author: Linus Walleij Date: Wed Dec 12 10:19:50 2018 +0100 rfkill: gpio: Remove unused include The legacy header is no longer in use by the rfkill driver, so drop this include. Signed-off-by: Linus Walleij Signed-off-by: Johannes Berg commit 68406a9807e4db562a157df9a958b3b6e2cedb38 Author: James Prestwood Date: Tue Dec 11 16:52:14 2018 -0800 mac80211_hwsim: fix overwriting of if_combination Moved setting if_combination.num_different_channels/radar_detect_widths into an else after use_chanctx. In the case of use_chanctx, these two settings were getting overwritten. Signed-off-by: James Prestwood Signed-off-by: Johannes Berg commit 6848ac7ca39a226ede5df7af0efcc4ef0611e99c Author: Yangtao Li Date: Mon Nov 19 10:43:34 2018 -0500 x86/mm/dump_pagetables: Use DEFINE_SHOW_ATTRIBUTE() Use DEFINE_SHOW_ATTRIBUTE() instead of open coding it. Signed-off-by: Yangtao Li Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Cc: keescook@chromium.org Cc: luto@kernel.org Cc: peterz@infradead.org Cc: bp@alien8.de Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20181119154334.18265-1-tiny.windzz@gmail.com commit ffeccc22d59cd585ce2b176c1e65d833e8ddc890 Author: Lorenzo Pieralisi Date: Thu Nov 29 18:23:54 2018 +0000 MAINTAINERS: Remove Jianguo Sun from HiSilicon STB DWC entry Jianguo Sun's email address reported in MAINTAINERS is not active any longer, remove it from the DWC HiSilicon STB entry. Signed-off-by: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Acked-by: Shawn Guo commit 6d6b05e3d5337f645a411cdf72f1a083e495acb8 Author: Stephen Warren Date: Fri Nov 30 11:37:19 2018 -0700 PCI: dwc: Don't hard-code DBI/ATU offset The DWC PCIe core contains various separate register spaces: DBI, DBI2, ATU, DMA, etc. The relationship between the addresses of these register spaces is entirely determined by the implementation of the IP block, not by the IP block design itself. Hence, the DWC driver must not make assumptions that one register space can be accessed at a fixed offset from any other register space. To avoid such assumptions, introduce an explicit/separate register pointer for the ATU register space. In particular, the current assumption is not valid for NVIDIA's T194 SoC. The ATU register space is only used on systems that require unrolled ATU access. This property is detected at run-time for host controllers, and when this is detected, this patch provides a default value for atu_base that matches the previous assumption re: register layout. An alternative would be to update all drivers for HW that requires unrolled access to explicitly set atu_base. However, it's hard to tell which drivers would require atu_base to be set. The unrolled property is not detected for endpoint systems, and so any endpoint driver that requires unrolled access must explicitly set the iatu_unroll_enabled flag (none do at present), and so a check is added to require the driver to also set atu_base while at it. Signed-off-by: Stephen Warren Signed-off-by: Lorenzo Pieralisi Acked-by: Gustavo Pimentel Acked-by: Vidya Sagar commit 9e56f0df3684bd752347e7c3df5e8ed1fc55d139 Author: Leonard Crestez Date: Wed Nov 7 13:57:03 2018 +0000 PCI: imx: Add imx6sx suspend/resume support Enable PCI suspend/resume support on imx6sx SOCs. This is similar to imx7d with a few differences: * The PM_Turn_Off bit is exposed through an IOMUX GPR, like all other pcie control bits on 6sx. * The pcie_inbound_axi clk needs to be turned off in suspend. On resume it is restored via resume -> deassert_core_reset -> enable_ref_clk. Most of the resume logic is shared with the initial reset after probe. Signed-off-by: Leonard Crestez Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrey Smirnov Acked-by: Lucas Stach commit 3d71746c420c1c1c27cf5c4e48f8fa0a6cfdc185 Author: Baruch Siach Date: Wed Oct 3 15:49:43 2018 +0300 PCI: armada8k: Add support for gpio controlled reset signal Add support for the gpio reset signal binding as described in the designware-pcie.txt DT binding document. Both the documented 'reset-gpio' property name and the more standard 'reset-gpios' name are supported. Signed-off-by: Baruch Siach Signed-off-by: Lorenzo Pieralisi Acked-by: Thomas Petazzoni commit a3ed1446520ef68466ba75b774152d789710ea95 Author: Trent Piepho Date: Fri Nov 16 00:08:33 2018 +0000 PCI: dwc: Adjust Kconfig to allow IMX6 PCIe host on IMX7 The IMX6 PCI-e host driver also supports the IMX7d. However, the Kconfig dependencies of the driver prevented it from being enabled unless the kernel was built with both IMX6 and IMX7 support. It works fine to build with only IMX7 support enabled therefore adjust the Kconfig entry to allow this configuration. Signed-off-by: Trent Piepho Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach Cc: Andrey Smirnov commit edfd39f0a417111365442f07c04150d2950f3a25 Author: Stefan Agner Date: Mon Nov 19 11:00:22 2018 +0100 PCI: dwc: layerscape: Constify driver data Constify driver data since they do not get changed at runtime. Signed-off-by: Stefan Agner Signed-off-by: Lorenzo Pieralisi commit 3f7cceeab895fcc17ac8db0d9a5e8ca2954b4661 Author: Leonard Crestez Date: Mon Oct 8 18:06:21 2018 +0000 PCI: imx: Add multi-pd support On some chips the PCIe and PCIE_PHY blocks are in separate power domains which can be power-gated independently. The PCI driver needs to handle this by keeping both domain active. This is intended for imx6sx where PCIe is in DISPLAY and PCIE_PHY in its own domain. Defining the DISPLAY domain requires a way for PCIe to keep it active or it will break when displays are off. The power-domains on imx6sx are meant to look like this: power-domains = <&pd_disp>, <&pd_pci>; power-domain-names = "pcie", "pcie_phy"; Signed-off-by: Leonard Crestez [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ulf Hansson commit 07daef8b41e0d9e7802a448f6766504e7641a234 Author: YueHaibing Date: Sun Dec 9 14:22:25 2018 +0800 ntp: Remove duplicated include Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Cc: Cc: Link: https://lkml.kernel.org/r/20181209062225.4344-1-yuehaibing@huawei.com commit 801c7a1e528623f073c4007cb04d9a817e33b3a4 Author: Lucas Stach Date: Thu Nov 22 15:29:27 2018 +0100 drm/etnaviv: remove lastctx member from gpu struct It only written and we don't infer any useful information from it anymore. Remove it. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner commit f9d255f4549e9798dce30408f25645710b5eed58 Author: Lucas Stach Date: Mon Oct 15 12:49:07 2018 +0200 drm/etnaviv: replace header include with forward declaration The etnaviv_gpu header only needs to know about the pointer types, so replace by a forward declaration and only include the headers where needed. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner commit 5a23144cb507bda66b98666e46b8b677df14c2e7 Author: Lucas Stach Date: Wed Sep 12 12:55:42 2018 +0200 drm/etnaviv: remove unnecessary local irq disable The only event function that is called from IRQ context is event_free, which is already using atomic bitmap operations, so we can avoid taking the event spinlock in this function completely. As other the other functions still using the event spinlock are all called from normal process context, we can avoid disabling IRQs while holding the spinlock. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner commit f83f97684a737f66c9a10437544c92e3436ca4e0 Author: Geert Uytterhoeven Date: Wed Dec 12 13:38:59 2018 +0100 pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length pinmux_cfg_reg.var_field_width[] is actually a variable-length array, terminated by a zero, and counting at most r_width entries. Usually the number of entries is much smaller than r_width, so the ability to catch bugs at compile time through an "excess elements in array initializer" warning is fairly limited. Hence make the array variable-length, decreasing kernel size slightly. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit ce16e8dd0db2701265e6dfdb4fbed632b6ff61c2 Author: Geert Uytterhoeven Date: Thu Dec 13 15:20:13 2018 +0100 pinctrl: sh-pfc: Print actual field width for variable-width fields The debug code in sh_pfc_write_config_reg() prints the width of the field being modified. However, registers with a variable-width field layout are identified by pinmux_cfg_reg.field_width being zero, hence zeroes are printed instead of the actual field widths. Fix this by printing the Hamming weight of the field mask instead, which is correct for both fixed-width and variable-width fields. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 054f2400f706327f96770219c3065b5131f8f154 Author: Geert Uytterhoeven Date: Thu Dec 13 14:41:11 2018 +0100 pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10 Some values in the Peripheral Function Select Register 10 descriptor are shifted by one position, which may cause a peripheral function to be programmed incorrectly. Fixing this makes all HSCIF0 pins use Function 4 (value 3), like was already the case for the HSCK0 pin in field IP10[5:3]. Fixes: ac1ebc2190f575fc ("sh-pfc: Add sh7734 pinmux support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 4d374bacd7c9665179f9752a52d5d602c45d8190 Author: Geert Uytterhoeven Date: Thu Dec 13 14:32:34 2018 +0100 pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value The IP10[5:3] field in Peripheral Function Select Register 10 has a width of 3 bits, i.e. it allows programming one out of 8 different configurations. However, 9 values are provided instead of 8, overflowing into the subsequent field in the register, and thus breaking the configuration of the latter. Fix this by dropping a bogus zero value. Fixes: ac1ebc2190f575fc ("sh-pfc: Add sh7734 pinmux support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 9540cbdfcd861caf67a6f0e4bb7f46d41c4aad86 Author: Geert Uytterhoeven Date: Thu Dec 13 14:27:56 2018 +0100 pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field The Port C I/O Register 0 contains 7 reserved bits, but the descriptor contains only dummy configuration values for 6 reserved bits, thus breaking the configuration of all subsequent fields in the register. Fix this by adding the two missing configuration values. Fixes: f5e811f2a43117b2 ("sh-pfc: Add sh7269 pinmux support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 1b99d0c80bbe1810572c2cb77b90f67886adfa8d Author: Geert Uytterhoeven Date: Thu Dec 13 14:09:56 2018 +0100 pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration The Port F Control Register 3 (PFCR3) contains only a single field. However, counting from left to right, it is the fourth field, not the first field. Insert the missing dummy configuration values (3 fields of 16 values) to fix this. The descriptor for the Port F Control Register 0 (PFCR0) lacks the description for the 4th field (PF0 Mode, PF0MD[2:0]). Add the missing configuration values to fix this. Fixes: a8d42fc4217b1ea1 ("sh-pfc: Add sh7264 pinmux support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit e28dc3f09c9d2555a9bd982f0847988591052226 Author: Geert Uytterhoeven Date: Thu Dec 13 13:59:42 2018 +0100 pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations While the SEL_PWM[0-3] fields in the Module Select Register 0 support 4 possible configurations per PWM pin, only the first 3 are valid. Replace the invalid and unused configurations for SEL_PWM[0-3]_3 by dummies. Fixes: 794a6711764658a1 ("pinctrl: sh-pfc: Initial R8A77995 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 755a5b805fa7ff22e2934d67501efd92109f41ea Author: Geert Uytterhoeven Date: Thu Dec 13 10:53:11 2018 +0100 pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 SEL_I2C1 field width The SEL_I2C1 (MOD_SEL0[21:20]) field in Module Select Register 0 has a width of 2 bits, i.e. it allows programming one out of 4 different configurations. However, the MOD_SEL0_21_20 macro contains 8 values instead of 4, overflowing into the subsequent fields in the register, and thus breaking the configuration of the latter. Fix this by dropping the bogus last 4 values, including the non-existent SEL_I2C1_4 configuration. Fixes: 6d4036a1e3b3ac0f ("pinctrl: sh-pfc: Initial R8A77990 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 94482af7055e1ffa211c1135256b85590ebcac99 Author: Geert Uytterhoeven Date: Wed Dec 12 14:42:16 2018 +0100 pinctrl: sh-pfc: sh7734: Add missing IPSR11 field The Peripheral Function Select Register 11 contains 3 reserved bits and 15 variable-width fields, but the variable field descriptor does not contain the 3-bit field IP11[25:23]. Fixes: 856cb4bb337ee504 ("sh: Add support pinmux for SH7734") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit b0f77269f6bba385f1f4dce44e7756cf8fbc0176 Author: Geert Uytterhoeven Date: Wed Dec 12 14:36:54 2018 +0100 pinctrl: sh-pfc: r8a77980: Add missing MOD_SEL0 field The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12 single-bit fields, but the variable field descriptor lacks a field of 4 reserved bits. Fixes: f59125248a691dfe ("pinctrl: sh-pfc: Add R8A77980 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 67d7745bc78e16ec6b3af02bc1da6c8c868cbd89 Author: Geert Uytterhoeven Date: Wed Dec 12 14:29:02 2018 +0100 pinctrl: sh-pfc: r8a77970: Add missing MOD_SEL0 field The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12 single-bit fields, but the variable field descriptor lacks a field of 4 reserved bits. Fixes: b92ac66a1819602b ("pinctrl: sh-pfc: Add R8A77970 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 6a6c195d98a1a5e70faa87f594d7564af1dd1bed Author: Geert Uytterhoeven Date: Wed Dec 12 14:21:16 2018 +0100 pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field The Peripheral Function Select Register 9 contains 12 fields, but the variable field descriptor contains a 13th bogus field of 3 bits. Fixes: 43c4436e2f1890a7 ("pinctrl: sh-pfc: add R8A7794 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 9925e879572680125c5d00ad8b807aec720b1cb6 Author: Geert Uytterhoeven Date: Wed Dec 12 12:01:45 2018 +0100 pinctrl: sh-pfc: Validate pins/marks in pin groups at build time Add a build-time check, to ensure the number of pins and pin marks in a pin group matches. This helps catching bugs early. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 124cde98f856b6206b804acbdec3b7c80f8c3427 Author: Geert Uytterhoeven Date: Wed Dec 12 11:20:14 2018 +0100 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number. Add the missing pin number, for non-GPIO pin F26. Fixes: 5da4eb049de803c7 ("sh-pfc: sh73a0: Add TPU pin groups and functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 0d6256cb880166a4111bebce35790019e56b6e1b Author: Geert Uytterhoeven Date: Wed Dec 12 11:12:20 2018 +0100 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component. Fixes: 8e32c9671f84acd8 ("pinctrl: sh-pfc: r8a7791: Add VIN pins") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 884fa25fb6e5e63ab970d612a628313bb68f37cc Author: Geert Uytterhoeven Date: Wed Dec 12 11:05:57 2018 +0100 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b). Fixes: 2d0c386f135e4186 ("pinctrl: sh-pfc: r8a7791: Add QSPI pin groups") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b Author: Geert Uytterhoeven Date: Wed Dec 12 11:00:27 2018 +0100 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks. Fixes: 06c7dd866da70f6c ("sh-pfc: r8a7740: Add LCDC0 and LCDC1 pin groups and functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 Author: Geert Uytterhoeven Date: Wed Dec 12 10:57:27 2018 +0100 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number. Fixes: bae11d30d0cafdc5 ("sh-pfc: r8a7740: Add GETHER pin groups and functions") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 117774fbe6beae3fd4f1fed5b7f596acdd90a2ed Author: Geert Uytterhoeven Date: Wed Dec 12 11:35:35 2018 +0100 pinctrl: sh-pfc: r8a77990: Fix IOCTRL reg state after s2ram on R-Car E3 Due to an interaction with commit 9f2b76a2db3c4387 ("pinctrl: sh-pfc: r8a77990: Add R8A774C0 PFC support"), the state of the I/O Control Registers is saved/restored during s2ram on RZ/G2E, but not on R-Car E3. Hence on R-Car E3, SDHI voltage state is lost after system resume. Fix this by registering the I/O Control Registers on R-Car E3, too. Fixes: 33847a71373cd6ae ("pinctrl: sh-pfc: r8a77990: Add voltage switch operations for SDHI") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman commit db221412cd2014506642967155698825ad80f6b6 Author: Nicholas Mc Guire Date: Fri Dec 7 11:34:27 2018 +0100 pinctrl: rza1: Handle devm_kasprintf() failure cases devm_kasprintf() may return NULL on failure of internal allocation thus the assignments are not safe if not checked. On error rza1_pinctrl_register() respectively rza1_parse_gpiochip() return negative values so -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here. Signed-off-by: Nicholas Mc Guire Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller") Signed-off-by: Geert Uytterhoeven commit 28586a51eea666d5531bcaef2f68e4abbd87242c Author: Alex Hung Date: Tue Dec 18 12:00:54 2018 +0800 ACPI / OSI: Add OEM _OSI string to enable dGPU direct output For HP Inc. mobile workstation with hybrid graphics support, dGPU can directly output to external monitors; however, Nvidia and AMD's Linux drivers aren't able to support this feature. The OEM _OSI string "Linux-HPI-Hybrid-Graphics" is used by BIOS to implement dGPU direct output to external monitors. The form of the OEM _OSI strings is defined by each OEMs and is discussed in Documentation/acpi/osi.txt. Signed-off-by: Alex Hung Signed-off-by: Rafael J. Wysocki commit f4caa6ee736fa8a46c806ba4382c16f7e5a20248 Author: Geert Uytterhoeven Date: Thu Dec 6 17:30:39 2018 +0100 pinctrl: sh-pfc: r8a77990: Add support for pull-up only pins The R-Car Gen3 HardWare Manual Errata for Rev. 1.00 (Jul 2, 2018) states that the USB30_OVC pin supports pull-up only. It has a bit assigned in the pull-enable register (PUEN5), but not in the pull-up/down control register (PUD5). Add a check for this, to prevent configuring a prohibited setting. Reported-by: Yoshihiro Shimoda Fixes: 83f6941a42a5e773 ("pinctrl: sh-pfc: r8a77990: Add bias pinconf support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit 7edcbbf29006be46d5dbce5bac9aae73f3056d14 Author: Rafael J. Wysocki Date: Mon Dec 17 12:22:43 2018 +0100 ACPI: PM: Loop in full LPS0 mode only After a previous change, all non-wakeup GPEs are disabled for suspend-to-idle unless full Low-Power S0 (LPS0) mode is in use, so it is not necessary to do anything in acpi_s2idle_wake() unless in full LPS0 mode, which is only when lps0_device_handle is set. Modify the code accordingly. Tested-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit f941d3e41da7f86bdb9dcc1977c2bcc6b89bfe47 Author: Rafael J. Wysocki Date: Mon Dec 17 12:21:55 2018 +0100 ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle There are systems in which non-wakeup GPEs fire during the "noirq" suspend stage of suspending devices and that effectively prevents the system that tries to suspend to idle from entering any low-power state at all. If the offending GPE fires regularly and often enough, the system appears to be suspended, but in fact it is in a tight loop over "noirq" suspend and "noirq" resume of devices all the time. To prevent that from happening, disable all non-wakeup GPEs except for the EC GPE for suspend-to-idle (the EC GPE is special, because on some systems it has to be enabled for power button wakeup events to be generated as expected). Fixes: 147a7d9d25ca (ACPI / PM: Do not reconfigure GPEs for suspend-to-idle) Link: https://bugzilla.kernel.org/show_bug.cgi?id=201987 Reported-by: Zhang Rui Tested-by: Mika Westerberg Tested-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 663546903c835fe46308b1b1e53d32d1f2b33da9 Author: Doug Smythies Date: Mon Dec 17 23:34:04 2018 -0800 tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file This script is supposed to be allowed to run with regular user privileges if a previously captured trace is being post processed. Commit fbe313884d7d (tools/power/x86/intel_pstate_tracer: Free the trace buffer memory) introduced a bug that breaks that option. Commit 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional setting of trace buffer memory allocation) moved the code but kept the bug. This patch fixes the issue. Fixes: 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional ...) Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit 67e4eb30ea833e1a97f70e3aba00c6b165fd298c Merge: 7566ec393f416 901d32bc69f34 Author: Rafael J. Wysocki Date: Tue Dec 18 10:32:01 2018 +0100 Merge tag 'linux-cpupower-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for v4.21 from Shuah Khan: "This cpupower update Linux 4.21 adds support for auto-completion for cpupower tool from Abhishek Goel." * tag 'linux-cpupower-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower : Auto-completion for cpupower tool commit 5f30b2e823484ce6a79f2b59901b6351c15effa6 Author: Nicholas Mc Guire Date: Fri Dec 14 17:56:10 2018 +0100 livepatch: check kzalloc return values kzalloc() return should always be checked - notably in example code where this may be seen as reference. On failure of allocation in livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous allocation is freed (thanks to Petr Mladek for catching this) and NULL returned. Signed-off-by: Nicholas Mc Guire Fixes: 439e7271dc2b ("livepatch: introduce shadow variable API") Acked-by: Joe Lawrence Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina commit 8d503f206c336677954160ac62f0c7d9c219cd89 Author: Scott Chen Date: Thu Dec 13 06:01:47 2018 -0500 USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays Add device ids to pl2303 for the HP POS pole displays: LM920: 03f0:026b TD620: 03f0:0956 LD960TA: 03f0:4439 LD220TA: 03f0:4349 LM940: 03f0:5039 Signed-off-by: Scott Chen Cc: stable Signed-off-by: Johan Hovold commit 7aedd9d48f2a8332c2c51a40d2dca8c097f0dcdb Author: Michael Mueller Date: Mon Dec 3 10:20:22 2018 +0100 KVM: s390: fix kmsg component kvm-s390 Relocate #define statement for kvm related kernel messages before the include of printk to become effective. Signed-off-by: Michael Mueller Acked-by: Christian Borntraeger Signed-off-by: Christian Borntraeger commit 308c3e6673b012beecb96ef04cc65f4a0e7cdd99 Author: Michael Mueller Date: Fri Nov 30 15:32:06 2018 +0100 KVM: s390: unregister debug feature on failing arch init Make sure the debug feature and its allocated resources get released upon unsuccessful architecture initialization. A related indication of the issue will be reported as kernel message. Signed-off-by: Michael Mueller Reviewed-by: Cornelia Huck Reviewed-by: Pierre Morel Reviewed-by: David Hildenbrand Message-Id: <20181130143215.69496-2-mimu@linux.ibm.com> Signed-off-by: Christian Borntraeger commit b12c97d45cd061862b79fe02aa41a73d685ec7a1 Author: John Hurley Date: Mon Dec 17 19:18:39 2018 -0800 nfp: flower: fix cb_ident duplicate in indirect block register Previously the identifier used for indirect block callback registry and for block rule cb registry (when done via indirect blocks) was the pointer to the netdev we were interested in receiving updates on. This worked fine if a single app existed that registered one callback per netdev of interest. However, if multiple cards are in place and, in turn, multiple apps, then each app may register the same callback with the same identifier to both the netdev's indirect block cb list and to a block's cb list. This can lead to EEXIST errors and/or incorrect cb deletions. Prevent this conflict by using the app pointer as the identifier for netdev indirect block cb registry, allowing each app to register a unique callback per netdev. For block cb registry, the same app may register multiple cbs to the same block if using TC shared blocks. Instead of the app, use the pointer to the allocated cb_priv data as the identifier here. This means that there can be a unique block callback for each app/netdev combo. Fixes: 3166dd07a9cb ("nfp: flower: offload tunnel decap rules via indirect TC blocks") Reported-by: Edward Cree Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit d1675a16029610505895b60fc3e96c9dbac02d97 Author: Shalom Toledo Date: Tue Dec 18 07:31:31 2018 +0000 mlxsw: spectrum: Update the supported firmware to version 13.1910.622 This new firmware contains: * New packet traps for discarded packets * Secure firmware flash bug fix * Fence mechanism bug fix * TCAM RMA bug fix Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f5c6dfdefb21708aa0f382c1dc36d4e82c6c3ed5 Author: David Ahern Date: Mon Dec 17 15:36:11 2018 -0800 ip6mr: Drop mfc6_cache argument to ip6mr_forward2 mfc6_cache is not needed by ip6mr_forward2 so drop it from the input argument list. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 6e0735d1f7e573da0976d8b7447a82b09d8ec949 Author: David Ahern Date: Mon Dec 17 15:34:48 2018 -0800 ipmr: Drop mfc_cache argument to ipmr_queue_xmit mfc_cache is not needed by ipmr_queue_xmit so drop it from the input argument list. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit eedbbb0d98b2a89250a8bb83d9c71b77881e5247 Author: Peter Oskolkov Date: Sun Dec 16 15:42:48 2018 -0800 net: dccp: initialize (addr,port) listening hashtable Commit d9fbc7f6431f "net: tcp: prefer listeners bound to an address" removes port-only listener lookups. This caused segfaults in DCCP lookups because DCCP did not initialize the (addr,port) hashtable. This patch adds said initialization. The only non-trivial issue here is the size of the new hashtable. It seemed reasonable to make it match the size of the port-only hashtable (= INET_LHTABLE_SIZE) that was used previously. Other parameters to inet_hashinfo2_init() match those used in TCP. V2 changes: marked inet_hashinfo2_init as an exported symbol so that DCCP compiles when configured as a module. Tested: syzcaller issues fixed; the second patch in the patchset tests that DCCP lookups work correctly. Fixes: d9fbc7f6431f "net: tcp: prefer listeners bound to an address" Reported-by: syzcaller Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 6a95147c513190b8932c5ea695cb653272cf2c14 Merge: 11789039da536 56d3746247786 Author: David S. Miller Date: Mon Dec 17 23:08:54 2018 -0800 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. Two main changes in this seris plus some miscellaneous changes. 1. Improvements and fixes for resource accounting which are required for enabling SR-IOV and RDMA on the new 57500 chips. Only SR-IOV for 57500 chips is enabled in this series. 2. New statistics counters and improvements to keep the basic counters and port counters during IFDOWN. 3. Msic. small changes for ETS, returning proper error codes when flashing NVRAM, and a link speed related fix for ethtool loopback selftest. ==================== Signed-off-by: David S. Miller commit 56d374624778652d2a999e18c87a25338b127b41 Author: Vasundhara Volam Date: Sun Dec 16 18:46:31 2018 -0500 bnxt_en: query force speeds before disabling autoneg mode. With autoneg enabled, PHY loopback test fails. To disable autoneg, driver needs to send a valid forced speed to FW. FW is not sending async event for invalid speeds. To fix this, query forced speeds and send the correct speed when disabling autoneg mode. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit fd3ab1c70e0b953f4f772142051d215bffada718 Author: Michael Chan Date: Sun Dec 16 18:46:30 2018 -0500 bnxt_en: Do not free port statistics buffer when device is down. Port statistics which include RDMA counters are useful even when the netdevice is down. Do not free the port statistics DMA buffers when the netdevice is down. This is keep the snapshot of the port statistics and counters will just continue counting when the netdevice goes back up. Split the bnxt_free_stats() function into 2 functions. The port statistics buffers will only be freed when the netdevice is removed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b8875ca356f1c0b17ec68be6666269373a62288e Author: Michael Chan Date: Sun Dec 16 18:46:29 2018 -0500 bnxt_en: Save ring statistics before reset. With the current driver, the statistics reported by .ndo_get_stats64() are reset when the device goes down. Store a snapshot of the rtnl_link_stats64 before shutdown. This snapshot is added to the current counters in .ndo_get_stats64() so that the counters will not get reset when the device is down. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7c675421afef18253a86ffc383f57bc15ef32ea8 Author: Vasundhara Volam Date: Sun Dec 16 18:46:28 2018 -0500 bnxt_en: Return linux standard errors in bnxt_ethtool.c Currently firmware specific errors are returned directly in flash_device and reset ethtool hooks. Modify it to return linux standard errors to userspace when flashing operations fail. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 24654f095ed68eafcdfdbfccbe6324ad1475c1bb Author: Michael Chan Date: Sun Dec 16 18:46:27 2018 -0500 bnxt_en: Don't set ETS on unused TCs. Currently, the code allows ETS bandwidth weight 0 to be set on unused TCs. We should not set any DCB parameters on unused TCs at all. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e37fed790335631c57477e7bee952a039ccb7a50 Author: Michael Chan Date: Sun Dec 16 18:46:26 2018 -0500 bnxt_en: Add ethtool -S priority counters. Display the CoS counters as additional priority counters by looking up the priority to CoS queue mapping. If the TX extended port statistics block size returned by firmware is big enough to cover the CoS counters, then we will display the new priority counters. We call firmware to get the up-to-date pri2cos mapping to convert the CoS counters to priority counters. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b16b68918674af5e7beccb567fe7ebd8b44744b8 Author: Michael Chan Date: Sun Dec 16 18:46:25 2018 -0500 bnxt_en: Add SR-IOV support for 57500 chips. There are some minor differences when assigning VF resources on the new chips. The MSIX (NQ) resource has to be assigned and ring group is not needed on the new chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 36d65be9a88052cdfc8524eb591baf0e6c878408 Author: Michael Chan Date: Sun Dec 16 18:46:24 2018 -0500 bnxt_en: Disable MSIX before re-reserving NQs/CMPL rings. When bringing up a device, the code checks to see if the number of MSIX has changed. pci_disable_msix() should be called first before changing the number of reserved NQs/CMPL rings. This ensures that the MSIX vectors associated with the NQs/CMPL rings are still properly mapped when pci_disable_msix() masks the vectors. This patch will prevent errors when RDMA support is added for the new 57500 chips. When the RDMA driver shuts down, the number of NQs is decreased and we must use the new sequence to prevent MSIX errors. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 780baad44f0f1e87df5508d1ad5a87d359fb96d1 Author: Vasundhara Volam Date: Sun Dec 16 18:46:23 2018 -0500 bnxt_en: Reserve 1 stat_ctx for RDMA driver. bnxt_en requires same number of stat_ctxs as CP rings but RDMA requires only 1 stat_ctx. Also add a new parameter resv_stat_ctxs to better keep track of stat_ctxs reserved including resources used by RDMA. Add a stat_ctxs parameter to all the relevant resource reservation functions so we can reserve the correct number of stat_ctxs. Prior to this patch, we were not reserving the extra stat_ctx for RDMA and RDMA would not work on the new 57500 chips. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f4e896142de8304b433fd94f7eed55750c34defd Author: Vasundhara Volam Date: Sun Dec 16 18:46:22 2018 -0500 bnxt_en: Do not modify max_stat_ctxs after RDMA driver requests/frees stat_ctxs Calling bnxt_set_max_func_stat_ctxs() to modify max stat_ctxs requested or freed by the RDMA driver is wrong. After introducing reservation of resources recently, the driver has to keep track of all stat_ctxs including the ones used by the RDMA driver. This will provide a better foundation for accurate accounting of the stat_ctxs. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c027c6b4e91f21dfa4feab91e2155c8403f49f5c Author: Vasundhara Volam Date: Sun Dec 16 18:46:21 2018 -0500 bnxt_en: get rid of num_stat_ctxs variable For bnxt_en driver, stat_ctxs created will always be same as cp_nr_rings. Remove extra variable that duplicates the value. Also introduce bnxt_get_avail_stat_ctxs_for_en() helper to get available stat_ctxs and bnxt_get_ulp_stat_ctxs() helper to return number of stat_ctxs used by RDMA. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e916b0815a11c6cbc82f2d8510982ea022628880 Author: Michael Chan Date: Sun Dec 16 18:46:20 2018 -0500 bnxt_en: Add bnxt_get_avail_cp_rings_for_en() helper function. The available CP rings are calculated differently on the new 57500 chips, so add this helper to do this calculation correctly. The VFs will be assigned these available CP rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f7588cd89331211e2c4f0fdb94bb0ed4f92847be Author: Michael Chan Date: Sun Dec 16 18:46:19 2018 -0500 bnxt_en: Store the maximum NQs available on the PF. The PF has a pool of NQs and MSIX vectors assigned to it based on NVRAM configurations. The number of usable MSIX vectors on the PF is the minimum of the NQs and MSIX vectors. Any excess NQs without associated MSIX may be used for the VFs, so we need to store this max_nqs value. max_nqs minus the NQs used by the PF will be the available NQs for the VFs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 41e486f4f66d3e646fedd60469bc60e73662de50 Author: Paul Burton Date: Mon Dec 17 22:05:40 2018 -0800 MIPS: Remove struct mm_context_t fp_mode_switching field The fp_mode_switching field in struct mm_context_t was left unused by commit 8c8d953c2800 ("MIPS: Schedule on CPUs we need to lose FPU for a mode switch") in v4.19, with nothing modifying its value & nothing waiting on it having any particular value after that commit. Remove the unused field & the one remaining reference to it. Signed-off-by: Paul Burton commit 11789039da536fea96c98a40c2b441decf2e7323 Author: Stefano Brivio Date: Tue Dec 18 00:13:17 2018 +0100 fou: Prevent unbounded recursion in GUE error handler Handling exceptions for direct UDP encapsulation in GUE (that is, UDP-in-UDP) leads to unbounded recursion in the GUE exception handler, syzbot reported. While draft-ietf-intarea-gue-06 doesn't explicitly forbid direct encapsulation of UDP in GUE, it probably doesn't make sense to set up GUE this way, and it's currently not even possible to configure this. Skip exception handling if the GUE proto/ctype field is set to the UDP protocol number. Should we need to handle exceptions for UDP-in-GUE one day, we might need to either explicitly set a bound for recursion, or implement a special iterative handling for these cases. Reported-and-tested-by: syzbot+43f6755d1c2e62743468@syzkaller.appspotmail.com Fixes: b8a51b38e4d4 ("fou, fou6: ICMP error handlers for FoU and GUE") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit cd19181bf9ad4b7f40f2a4e0355d052109c76529 Author: Ming Lei Date: Tue Dec 18 12:15:29 2018 +0800 blk-mq: enable IO poll if .nr_queues of type poll > 0 The queue mapping of type poll only exists when set->map[HCTX_TYPE_POLL].nr_queues is bigger than zero, so enhance the constraint by checking .nr_queues of type poll before enabling IO poll. Otherwise IO race & timeout can be observed when running block/007. Cc: Jeff Moyer Cc: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 3c94d83cb352627f221d971b05f163c17527de74 Author: Jens Axboe Date: Mon Dec 17 21:11:17 2018 -0700 blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight() There's a single user of this function, dm, and dm just wants to check if IO is inflight, not that it's just allocated. This fixes a hang with srp/002 in blktests with dm, where it tries to suspend but waits for inflight IO to finish first. As it checks for just allocated requests, this fails. Tested-by: Mike Snitzer Signed-off-by: Jens Axboe commit 06aa151ad1fc74a49b45336672515774a678d78d Author: Taehee Yoo Date: Mon Nov 5 18:23:25 2018 +0900 netfilter: ipt_CLUSTERIP: check MAC address when duplicate config is set If same destination IP address config is already existing, that config is just used. MAC address also should be same. However, there is no MAC address checking routine. So that MAC address checking routine is added. test commands: %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \ -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:20 --total-nodes 2 --local-node 1 %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \ -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:21 --total-nodes 2 --local-node 1 After this patch, above commands are disallowed. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 2a61d8b883bbad26b06d2e6cc3777a697e78830d Author: Taehee Yoo Date: Mon Nov 5 18:23:13 2018 +0900 netfilter: ipt_CLUSTERIP: fix sleep-in-atomic bug in clusterip_config_entry_put() A proc_remove() can sleep. so that it can't be inside of spin_lock. Hence proc_remove() is moved to outside of spin_lock. and it also adds mutex to sync create and remove of proc entry(config->pde). test commands: SHELL#1 %while :; do iptables -A INPUT -p udp -i enp2s0 -d 192.168.1.100 \ --dport 9000 -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:21 --total-nodes 3 --local-node 3; \ iptables -F; done SHELL#2 %while :; do echo +1 > /proc/net/ipt_CLUSTERIP/192.168.1.100; \ echo -1 > /proc/net/ipt_CLUSTERIP/192.168.1.100; done [ 2949.569864] BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 [ 2949.579944] in_atomic(): 1, irqs_disabled(): 0, pid: 5472, name: iptables [ 2949.587920] 1 lock held by iptables/5472: [ 2949.592711] #0: 000000008f0ebcf2 (&(&cn->lock)->rlock){+...}, at: refcount_dec_and_lock+0x24/0x50 [ 2949.603307] CPU: 1 PID: 5472 Comm: iptables Tainted: G W 4.19.0-rc5+ #16 [ 2949.604212] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015 [ 2949.604212] Call Trace: [ 2949.604212] dump_stack+0xc9/0x16b [ 2949.604212] ? show_regs_print_info+0x5/0x5 [ 2949.604212] ___might_sleep+0x2eb/0x420 [ 2949.604212] ? set_rq_offline.part.87+0x140/0x140 [ 2949.604212] ? _rcu_barrier_trace+0x400/0x400 [ 2949.604212] wait_for_completion+0x94/0x710 [ 2949.604212] ? wait_for_completion_interruptible+0x780/0x780 [ 2949.604212] ? __kernel_text_address+0xe/0x30 [ 2949.604212] ? __lockdep_init_map+0x10e/0x5c0 [ 2949.604212] ? __lockdep_init_map+0x10e/0x5c0 [ 2949.604212] ? __init_waitqueue_head+0x86/0x130 [ 2949.604212] ? init_wait_entry+0x1a0/0x1a0 [ 2949.604212] proc_entry_rundown+0x208/0x270 [ 2949.604212] ? proc_reg_get_unmapped_area+0x370/0x370 [ 2949.604212] ? __lock_acquire+0x4500/0x4500 [ 2949.604212] ? complete+0x18/0x70 [ 2949.604212] remove_proc_subtree+0x143/0x2a0 [ 2949.708655] ? remove_proc_entry+0x390/0x390 [ 2949.708655] clusterip_tg_destroy+0x27a/0x630 [ipt_CLUSTERIP] [ ... ] Fixes: b3e456fce9f5 ("netfilter: ipt_CLUSTERIP: fix a race condition of proc file creation") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit b12f7bad5ad3724d19754390a3e80928525c0769 Author: Taehee Yoo Date: Mon Nov 5 18:22:55 2018 +0900 netfilter: ipt_CLUSTERIP: remove wrong WARN_ON_ONCE in netns exit routine When network namespace is destroyed, both clusterip_tg_destroy() and clusterip_net_exit() are called. and clusterip_net_exit() is called before clusterip_tg_destroy(). Hence cleanup check code in clusterip_net_exit() doesn't make sense. test commands: %ip netns add vm1 %ip netns exec vm1 bash %ip link set lo up %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \ -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:20 --total-nodes 2 --local-node 1 %exit %ip netns del vm1 splat looks like: [ 341.184508] WARNING: CPU: 1 PID: 87 at net/ipv4/netfilter/ipt_CLUSTERIP.c:840 clusterip_net_exit+0x319/0x380 [ipt_CLUSTERIP] [ 341.184850] Modules linked in: ipt_CLUSTERIP nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp iptable_filter bpfilter ip_tables x_tables [ 341.184850] CPU: 1 PID: 87 Comm: kworker/u4:2 Not tainted 4.19.0-rc5+ #16 [ 341.227509] Workqueue: netns cleanup_net [ 341.227509] RIP: 0010:clusterip_net_exit+0x319/0x380 [ipt_CLUSTERIP] [ 341.227509] Code: 0f 85 7f fe ff ff 48 c7 c2 80 64 2c c0 be a8 02 00 00 48 c7 c7 a0 63 2c c0 c6 05 18 6e 00 00 01 e8 bc 38 ff f5 e9 5b fe ff ff <0f> 0b e9 33 ff ff ff e8 4b 90 50 f6 e9 2d fe ff ff 48 89 df e8 de [ 341.227509] RSP: 0018:ffff88011086f408 EFLAGS: 00010202 [ 341.227509] RAX: dffffc0000000000 RBX: 1ffff1002210de85 RCX: 0000000000000000 [ 341.227509] RDX: 1ffff1002210de85 RSI: ffff880110813be8 RDI: ffffed002210de58 [ 341.227509] RBP: ffff88011086f4d0 R08: 0000000000000000 R09: 0000000000000000 [ 341.227509] R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1002210de81 [ 341.227509] R13: ffff880110625a48 R14: ffff880114cec8c8 R15: 0000000000000014 [ 341.227509] FS: 0000000000000000(0000) GS:ffff880116600000(0000) knlGS:0000000000000000 [ 341.227509] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 341.227509] CR2: 00007f11fd38e000 CR3: 000000013ca16000 CR4: 00000000001006e0 [ 341.227509] Call Trace: [ 341.227509] ? __clusterip_config_find+0x460/0x460 [ipt_CLUSTERIP] [ 341.227509] ? default_device_exit+0x1ca/0x270 [ 341.227509] ? remove_proc_entry+0x1cd/0x390 [ 341.227509] ? dev_change_net_namespace+0xd00/0xd00 [ 341.227509] ? __init_waitqueue_head+0x130/0x130 [ 341.227509] ops_exit_list.isra.10+0x94/0x140 [ 341.227509] cleanup_net+0x45b/0x900 [ ... ] Fixes: 613d0776d3fe ("netfilter: exit_net cleanup check added") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 5a86d68bcf02f2d1e9a5897dd482079fd5f75e7f Author: Taehee Yoo Date: Mon Nov 5 18:22:44 2018 +0900 netfilter: ipt_CLUSTERIP: fix deadlock in netns exit routine When network namespace is destroyed, cleanup_net() is called. cleanup_net() holds pernet_ops_rwsem then calls each ->exit callback. So that clusterip_tg_destroy() is called by cleanup_net(). And clusterip_tg_destroy() calls unregister_netdevice_notifier(). But both cleanup_net() and clusterip_tg_destroy() hold same lock(pernet_ops_rwsem). hence deadlock occurrs. After this patch, only 1 notifier is registered when module is inserted. And all of configs are added to per-net list. test commands: %ip netns add vm1 %ip netns exec vm1 bash %ip link set lo up %iptables -A INPUT -p tcp -i lo -d 192.168.0.5 --dport 80 \ -j CLUSTERIP --new --hashmode sourceip \ --clustermac 01:00:5e:00:00:20 --total-nodes 2 --local-node 1 %exit %ip netns del vm1 splat looks like: [ 341.809674] ============================================ [ 341.809674] WARNING: possible recursive locking detected [ 341.809674] 4.19.0-rc5+ #16 Tainted: G W [ 341.809674] -------------------------------------------- [ 341.809674] kworker/u4:2/87 is trying to acquire lock: [ 341.809674] 000000005da2d519 (pernet_ops_rwsem){++++}, at: unregister_netdevice_notifier+0x8c/0x460 [ 341.809674] [ 341.809674] but task is already holding lock: [ 341.809674] 000000005da2d519 (pernet_ops_rwsem){++++}, at: cleanup_net+0x119/0x900 [ 341.809674] [ 341.809674] other info that might help us debug this: [ 341.809674] Possible unsafe locking scenario: [ 341.809674] [ 341.809674] CPU0 [ 341.809674] ---- [ 341.809674] lock(pernet_ops_rwsem); [ 341.809674] lock(pernet_ops_rwsem); [ 341.809674] [ 341.809674] *** DEADLOCK *** [ 341.809674] [ 341.809674] May be due to missing lock nesting notation [ 341.809674] [ 341.809674] 3 locks held by kworker/u4:2/87: [ 341.809674] #0: 00000000d9df6c92 ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0xafe/0x1de0 [ 341.809674] #1: 00000000c2cbcee2 (net_cleanup_work){+.+.}, at: process_one_work+0xb60/0x1de0 [ 341.809674] #2: 000000005da2d519 (pernet_ops_rwsem){++++}, at: cleanup_net+0x119/0x900 [ 341.809674] [ 341.809674] stack backtrace: [ 341.809674] CPU: 1 PID: 87 Comm: kworker/u4:2 Tainted: G W 4.19.0-rc5+ #16 [ 341.809674] Workqueue: netns cleanup_net [ 341.809674] Call Trace: [ ... ] [ 342.070196] down_write+0x93/0x160 [ 342.070196] ? unregister_netdevice_notifier+0x8c/0x460 [ 342.070196] ? down_read+0x1e0/0x1e0 [ 342.070196] ? sched_clock_cpu+0x126/0x170 [ 342.070196] ? find_held_lock+0x39/0x1c0 [ 342.070196] unregister_netdevice_notifier+0x8c/0x460 [ 342.070196] ? register_netdevice_notifier+0x790/0x790 [ 342.070196] ? __local_bh_enable_ip+0xe9/0x1b0 [ 342.070196] ? __local_bh_enable_ip+0xe9/0x1b0 [ 342.070196] ? clusterip_tg_destroy+0x372/0x650 [ipt_CLUSTERIP] [ 342.070196] ? trace_hardirqs_on+0x93/0x210 [ 342.070196] ? __bpf_trace_preemptirq_template+0x10/0x10 [ 342.070196] ? clusterip_tg_destroy+0x372/0x650 [ipt_CLUSTERIP] [ 342.123094] clusterip_tg_destroy+0x3ad/0x650 [ipt_CLUSTERIP] [ 342.123094] ? clusterip_net_init+0x3d0/0x3d0 [ipt_CLUSTERIP] [ 342.123094] ? cleanup_match+0x17d/0x200 [ip_tables] [ 342.123094] ? xt_unregister_table+0x215/0x300 [x_tables] [ 342.123094] ? kfree+0xe2/0x2a0 [ 342.123094] cleanup_entry+0x1d5/0x2f0 [ip_tables] [ 342.123094] ? cleanup_match+0x200/0x200 [ip_tables] [ 342.123094] __ipt_unregister_table+0x9b/0x1a0 [ip_tables] [ 342.123094] iptable_filter_net_exit+0x43/0x80 [iptable_filter] [ 342.123094] ops_exit_list.isra.10+0x94/0x140 [ 342.123094] cleanup_net+0x45b/0x900 [ ... ] Fixes: 202f59afd441 ("netfilter: ipt_CLUSTERIP: do not hold dev") Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 07a09d1b73c9651289d35449460d10e195e2f197 Author: Prashant Bhole Date: Mon Dec 17 16:57:50 2018 +0900 bpf: libbpf: fix memleak by freeing line_info This patch fixes a memory leak in libbpf by freeing up line_info member of struct bpf_program while unloading a program. Fixes: 3d65014146c6 ("bpf: libbpf: Add btf_line_info support to libbpf") Signed-off-by: Prashant Bhole Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 37c7b1caeaf60c8d3bc3cedc9ff4b9cc2f015d7e Merge: 6c4fc209fcf9d 8772c8bc093b2 Author: Daniel Borkmann Date: Tue Dec 18 01:12:00 2018 +0100 Merge branch 'bpf-btf-type-fixes' Yonghong Song says: ==================== Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") introduced BTF, a debug info format for BTF. The original design has a couple of issues though. First, the bitfield size is only encoded in int type. If the struct member bitfield type is enum, pahole ([1]) or llvm is forced to replace enum with int type. As a result, the original type information gets lost. Second, the original BTF design does not envision the possibility of BTF=>header_file conversion ([2]), hence does not encode "struct" or "union" info for a forward type. Such information is necessary to convert BTF to a header file. This patch set fixed the issue by introducing kind_flag, using one bit in type->info. When kind_flag, the struct/union btf_member->offset will encode both bitfield_size and bit_offset, covering both int and enum base types. The kind_flag is also used to indicate whether the forward type is a union (when set) or a struct. Patch #1 refactors function btf_int_bits_seq_show() so Patch #2 can reuse part of the function. Patch #2 implemented kind_flag support for struct/union/fwd types. Patch #3 added kind_flag support for cgroup local storage map pretty print. Patch #4 syncs kernel uapi btf.h to tools directory. Patch #5 added unit tests for kind_flag. Patch #6 added tests for kernel bpffs based pretty print with kind_flag. Patch #7 refactors function btf_dumper_int_bits() so Patch #8 can reuse part of the function. Patch #8 added bpftool support of pretty print with kind_flag set. [1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=b18354f64cc215368c3bc0df4a7e5341c55c378c [2] https://lwn.net/SubscriberLink/773198/fe3074838f5c3f26/ Change logs: v2 -> v3: . Relocated comments about bitfield_size/bit_offset interpretation of the "offset" field right before the "offset" struct member. . Added missing byte alignment checking for non-bitfield enum member of a struct with kind_flag set. . Added two test cases in unit tests for struct type, kind_flag set, non-bitfield int/enum member, not-byte aligned bit offsets. . Added comments to help understand there is no overflow for total_bits_offset in bpftool function btf_dumper_int_bits(). . Added explanation of typedef type dumping fix in Patch #8 commit message. v1 -> v2: . If kind_flag is set for a structure, ensure an int member, whether it is a bitfield or not, is a regular int type. . Added support so cgroup local storage map pretty print works with kind_flag. ==================== Signed-off-by: Daniel Borkmann commit 8772c8bc093b2d5823125475e1206b80664f8acb Author: Yonghong Song Date: Sat Dec 15 22:13:58 2018 -0800 tools: bpftool: support pretty print with kind_flag set The following example shows map pretty print with structures which include bitfield members. enum A { A1, A2, A3, A4, A5 }; typedef enum A ___A; struct tmp_t { char a1:4; int a2:4; int :4; __u32 a3:4; int b; ___A b1:4; enum A b2:4; }; struct bpf_map_def SEC("maps") tmpmap = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(__u32), .value_size = sizeof(struct tmp_t), .max_entries = 1, }; BPF_ANNOTATE_KV_PAIR(tmpmap, int, struct tmp_t); and the following map update in the bpf program: key = 0; struct tmp_t t = {}; t.a1 = 2; t.a2 = 4; t.a3 = 6; t.b = 7; t.b1 = 8; t.b2 = 10; bpf_map_update_elem(&tmpmap, &key, &t, 0); With this patch, I am able to print out the map values correctly with this patch: bpftool map dump id 187 [{ "key": 0, "value": { "a1": 0x2, "a2": 0x4, "a3": 0x6, "b": 7, "b1": 0x8, "b2": 0xa } } ] Previously, if a function prototype argument has a typedef type, the prototype is not printed since function __btf_dumper_type_only() bailed out with error if the type is a typedef. This commit corrected this behavior by printing out typedef properly. The following example shows forward type and typedef type can be properly printed in function prototype with modified test_btf_haskv.c. struct t; union u; __attribute__((noinline)) static int test_long_fname_1(struct dummy_tracepoint_args *arg, struct t *p1, union u *p2, __u32 unused) ... int _dummy_tracepoint(struct dummy_tracepoint_args *arg) { return test_long_fname_1(arg, 0, 0, 0); } $ bpftool p d xlated id 24 ... int test_long_fname_1(struct dummy_tracepoint_args * arg, struct t * p1, union u * p2, __u32 unused) ... Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 9f95e37e31a4eabd7c8152f2ddcdbea5eafdb7c8 Author: Yonghong Song Date: Sat Dec 15 22:13:57 2018 -0800 tools: bpftool: refactor btf_dumper_int_bits() The core dump funcitonality in btf_dumper_int_bits() is refactored into a separate function btf_dumper_bitfield() which will be used by the next patch. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit d0ebce687edc5d5a899b3de6b1adbfa0c5b64021 Author: Yonghong Song Date: Sat Dec 15 22:13:56 2018 -0800 tools/bpf: test kernel bpffs map pretty print with struct kind_flag The new tests are added to test bpffs map pretty print in kernel with kind_flag for structure type. $ test_btf -p ...... BTF pretty print array(#1)......OK BTF pretty print array(#2)......OK PASS:8 SKIP:0 FAIL:0 Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit cd9de5d3d64b472f67a5ac8520f79ce42f7583b8 Author: Yonghong Song Date: Sat Dec 15 22:13:55 2018 -0800 tools/bpf: add test_btf unit tests for kind_flag This patch added unit tests for different types handling type->info.kind_flag. The following new tests are added: $ test_btf ... BTF raw test[82] (invalid int kind_flag): OK BTF raw test[83] (invalid ptr kind_flag): OK BTF raw test[84] (invalid array kind_flag): OK BTF raw test[85] (invalid enum kind_flag): OK BTF raw test[86] (valid fwd kind_flag): OK BTF raw test[87] (invalid typedef kind_flag): OK BTF raw test[88] (invalid volatile kind_flag): OK BTF raw test[89] (invalid const kind_flag): OK BTF raw test[90] (invalid restrict kind_flag): OK BTF raw test[91] (invalid func kind_flag): OK BTF raw test[92] (invalid func_proto kind_flag): OK BTF raw test[93] (valid struct kind_flag, bitfield_size = 0): OK BTF raw test[94] (valid struct kind_flag, int member, bitfield_size != 0): OK BTF raw test[95] (valid union kind_flag, int member, bitfield_size != 0): OK BTF raw test[96] (valid struct kind_flag, enum member, bitfield_size != 0): OK BTF raw test[97] (valid union kind_flag, enum member, bitfield_size != 0): OK BTF raw test[98] (valid struct kind_flag, typedef member, bitfield_size != 0): OK BTF raw test[99] (valid union kind_flag, typedef member, bitfield_size != 0): OK BTF raw test[100] (invalid struct type, bitfield_size greater than struct size): OK BTF raw test[101] (invalid struct type, kind_flag bitfield base_type int not regular): OK BTF raw test[102] (invalid struct type, kind_flag base_type int not regular): OK BTF raw test[103] (invalid union type, bitfield_size greater than struct size): OK ... PASS:122 SKIP:0 FAIL:0 The second parameter name of macro BTF_INFO_ENC(kind, root, vlen) in selftests test_btf.c is also renamed from "root" to "kind_flag". Note that before this patch "root" is not used and always 0. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 128b343dbef543e75793deed5cb3e5eeb9b69d0e Author: Yonghong Song Date: Sat Dec 15 22:13:53 2018 -0800 tools/bpf: sync btf.h header from kernel to tools Sync include/uapi/linux/btf.h to tools/include/uapi/linux/btf.h. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit ffa0c1cf59596fba54546ea828305acfcc2cf55e Author: Yonghong Song Date: Sat Dec 15 22:13:52 2018 -0800 bpf: enable cgroup local storage map pretty print with kind_flag Commit 970289fc0a83 ("bpf: add bpffs pretty print for cgroup local storage maps") added bpffs pretty print for cgroup local storage maps. The commit worked for struct without kind_flag set. This patch refactored and made pretty print also work with kind_flag set for the struct. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 9d5f9f701b1891466fb3dbb1806ad97716f95cc3 Author: Yonghong Song Date: Sat Dec 15 22:13:51 2018 -0800 bpf: btf: fix struct/union/fwd types with kind_flag This patch fixed two issues with BTF. One is related to struct/union bitfield encoding and the other is related to forward type. Issue #1 and solution: ====================== Current btf encoding of bitfield follows what pahole generates. For each bitfield, pahole will duplicate the type chain and put the bitfield size at the final int or enum type. Since the BTF enum type cannot encode bit size, pahole workarounds the issue by generating an int type whenever the enum bit size is not 32. For example, -bash-4.4$ cat t.c typedef int ___int; enum A { A1, A2, A3 }; struct t { int a[5]; ___int b:4; volatile enum A c:4; } g; -bash-4.4$ gcc -c -O2 -g t.c The current kernel supports the following BTF encoding: $ pahole -JV t.o [1] TYPEDEF ___int type_id=2 [2] INT int size=4 bit_offset=0 nr_bits=32 encoding=SIGNED [3] ENUM A size=4 vlen=3 A1 val=0 A2 val=1 A3 val=2 [4] STRUCT t size=24 vlen=3 a type_id=5 bits_offset=0 b type_id=9 bits_offset=160 c type_id=11 bits_offset=164 [5] ARRAY (anon) type_id=2 index_type_id=2 nr_elems=5 [6] INT sizetype size=8 bit_offset=0 nr_bits=64 encoding=(none) [7] VOLATILE (anon) type_id=3 [8] INT int size=1 bit_offset=0 nr_bits=4 encoding=(none) [9] TYPEDEF ___int type_id=8 [10] INT (anon) size=1 bit_offset=0 nr_bits=4 encoding=SIGNED [11] VOLATILE (anon) type_id=10 Two issues are in the above: . by changing enum type to int, we lost the original type information and this will not be ideal later when we try to convert BTF to a header file. . the type duplication for bitfields will cause BTF bloat. Duplicated types cannot be deduplicated later if the bitfield size is different. To fix this issue, this patch implemented a compatible change for BTF struct type encoding: . the bit 31 of struct_type->info, previously reserved, now is used to indicate whether bitfield_size is encoded in btf_member or not. . if bit 31 of struct_type->info is set, btf_member->offset will encode like: bit 0 - 23: bit offset bit 24 - 31: bitfield size if bit 31 is not set, the old behavior is preserved: bit 0 - 31: bit offset So if the struct contains a bit field, the maximum bit offset will be reduced to (2^24 - 1) instead of MAX_UINT. The maximum bitfield size will be 256 which is enough for today as maximum bitfield in compiler can be 128 where int128 type is supported. This kernel patch intends to support the new BTF encoding: $ pahole -JV t.o [1] TYPEDEF ___int type_id=2 [2] INT int size=4 bit_offset=0 nr_bits=32 encoding=SIGNED [3] ENUM A size=4 vlen=3 A1 val=0 A2 val=1 A3 val=2 [4] STRUCT t kind_flag=1 size=24 vlen=3 a type_id=5 bitfield_size=0 bits_offset=0 b type_id=1 bitfield_size=4 bits_offset=160 c type_id=7 bitfield_size=4 bits_offset=164 [5] ARRAY (anon) type_id=2 index_type_id=2 nr_elems=5 [6] INT sizetype size=8 bit_offset=0 nr_bits=64 encoding=(none) [7] VOLATILE (anon) type_id=3 Issue #2 and solution: ====================== Current forward type in BTF does not specify whether the original type is struct or union. This will not work for type pretty print and BTF-to-header-file conversion as struct/union must be specified. $ cat tt.c struct t; union u; int foo(struct t *t, union u *u) { return 0; } $ gcc -c -g -O2 tt.c $ pahole -JV tt.o [1] INT int size=4 bit_offset=0 nr_bits=32 encoding=SIGNED [2] FWD t type_id=0 [3] PTR (anon) type_id=2 [4] FWD u type_id=0 [5] PTR (anon) type_id=4 To fix this issue, similar to issue #1, type->info bit 31 is used. If the bit is set, it is union type. Otherwise, it is a struct type. $ pahole -JV tt.o [1] INT int size=4 bit_offset=0 nr_bits=32 encoding=SIGNED [2] FWD t kind_flag=0 type_id=0 [3] PTR (anon) kind_flag=0 type_id=2 [4] FWD u kind_flag=1 type_id=0 [5] PTR (anon) kind_flag=0 type_id=4 Pahole/LLVM change: =================== The new kind_flag functionality has been implemented in pahole and llvm: https://github.com/yonghong-song/pahole/tree/bitfield https://github.com/yonghong-song/llvm/tree/bitfield Note that pahole hasn't implemented func/func_proto kind and .BTF.ext. So to print function signature with bpftool, the llvm compiler should be used. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Acked-by: Martin KaFai Lau Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit f97be3ab044cf6dd342fed7668c977ba07a7cd95 Author: Yonghong Song Date: Sat Dec 15 22:13:50 2018 -0800 bpf: btf: refactor btf_int_bits_seq_show() Refactor function btf_int_bits_seq_show() by creating function btf_bitfield_seq_show() which has no dependence on btf and btf_type. The function btf_bitfield_seq_show() will be in later patch to directly dump bitfield member values. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 26cb5a328c6b2bda9e859307ce4cfc60df3a2c28 Author: Al Viro Date: Fri Nov 9 22:26:42 2018 -0500 exofs_mount(): fix leaks on failure exits ... and don't abuse mount_nodev(), while we are at it. Signed-off-by: Al Viro Reviewed-by: David Howells commit 9580913966488dc78d8d2893c7427d0a84124e74 Author: Michał Mirosław Date: Mon Dec 17 20:28:15 2018 +0100 power: supply: bq25890: fix BAT_COMP field definition According to datasheet, BAT_COMP field spans bits 5-7. The rest of the code seems to assume this already. Fixes: 4aeae9cb0dad ("power_supply: Add support for TI BQ25890 charger chip") Signed-off-by: Michał Mirosław Signed-off-by: Sebastian Reichel commit 241faeceb849cb02c6439ecb2a08f14bf409dd30 Author: Phil Sutter Date: Wed Dec 12 19:29:07 2018 +0100 netfilter: nf_tables: Speed up selective rule dumps If just a table name was given, nf_tables_dump_rules() continued over the list of tables even after a match was found. The simple fix is to exit the loop if it reached the bottom and ctx->table was not NULL. When iterating over the table's chains, the same problem as above existed. But worse than that, if a chain name was given the hash table wasn't used to find the corresponding chain. Fix this by introducing a helper function iterating over a chain's rules (and taking care of the cb->args handling), then introduce a shortcut to it if a chain name was given. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 8294059931448aa1ca112615bdffa3eab552c382 Author: Alin Nastac Date: Thu Dec 13 11:10:37 2018 +0100 netfilter: nf_nat_sip: fix RTP/RTCP source port translations Each media stream negotiation between 2 SIP peers will trigger creation of 4 different expectations (2 RTP and 2 RTCP): - INVITE will create expectations for the media packets sent by the called peer - reply to the INVITE will create expectations for media packets sent by the caller The dport used by these expectations usually match the ones selected by the SIP peers, but they might get translated due to conflicts with another expectation. When such event occur, it is important to do this translation in both directions, dport translation on the receiving path and sport translation on the sending path. This commit fixes the sport translation when the peer requiring it is also the one that starts the media stream. In this scenario, first media stream packet is forwarded from LAN to WAN and will rely on nf_nat_sip_expected() to do the necessary sport translation. However, the expectation matched by this packet does not contain the necessary information for doing SNAT, this data being stored in the paired expectation created by the sender's SIP message (INVITE or reply to it). Signed-off-by: Alin Nastac Signed-off-by: Pablo Neira Ayuso commit d6f0453391e042ba12f9571e6ded76c9e414d245 Author: Thierry Reding Date: Mon Dec 17 15:16:54 2018 +0100 i2c: tegra: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang commit 199fa087dc6b503baad06712716fac645a983e8a Author: Leon Romanovsky Date: Thu Dec 13 13:15:11 2018 +0200 net/mlx5: Continue driver initialization despite debugfs failure The failure to create debugfs entry is unpleasant event, but not enough to abort drier initialization. Align the mlx5_core code to debugfs design and continue execution whenever debugfs_create_dir() successes or not. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 0604ee4aefa20f493a32dc223599f922fb615367 Author: Thierry Reding Date: Mon Dec 17 15:16:53 2018 +0100 i2c: tegra: Add missing kerneldoc for some fields Not all fields were properly documented. Add kerneldoc for the missing fields to prevent the build from flagging them. Reported-by: Wolfram Sang Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang commit 5cbabeec1eb758233b35683123de446a57852932 Author: Florian Westphal Date: Thu Dec 13 16:01:34 2018 +0100 netfilter: nat: remove nf_nat_l4proto struct This removes the (now empty) nf_nat_l4proto struct, all its instances and all the no longer needed runtime (un)register functionality. nf_nat_need_gre() can be axed as well: the module that calls it (to load the no-longer-existing nat_gre module) also calls other nat core functions. GRE nat is now always available if kernel is built with it. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit faec18dbb0405c7d4dda025054511dc3a6696918 Author: Florian Westphal Date: Thu Dec 13 16:01:33 2018 +0100 netfilter: nat: remove l4proto->manip_pkt This removes the last l4proto indirection, the two callers, the l3proto packet mangling helpers for ipv4 and ipv6, now call the nf_nat_l4proto_manip_pkt() helper. nf_nat_proto_{dccp,tcp,sctp,gre,icmp,icmpv6} are left behind, even though they contain no functionality anymore to not clutter this patch. Next patch will remove the empty files and the nf_nat_l4proto struct. nf_nat_proto_udp.c is renamed to nf_nat_proto.c, as it now contains the other nat manip functionality as well, not just udp and udplite. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 76b90019e03d866eab85cb57c2a6416ab94284dc Author: Florian Westphal Date: Thu Dec 13 16:01:32 2018 +0100 netfilter: nat: remove l4proto->nlattr_to_range all protocols did set this to nf_nat_l4proto_nlattr_to_range, so just call it directly. The important difference is that we'll now also call it for protocols that we don't support (i.e., nf_nat_proto_unknown did not provide .nlattr_to_range). However, there should be no harm, even icmp provided this callback. If we don't implement a specific l4nat for this, nothing would make use of this information, so adding a big switch/case construct listing all supported l4protocols seems a bit pointless. This change leaves a single function pointer in the l4proto struct. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit fe2d0020994cd9d4f451e3024109319af287413b Author: Florian Westphal Date: Thu Dec 13 16:01:31 2018 +0100 netfilter: nat: remove l4proto->in_range With exception of icmp, all of the l4 nat protocols set this to nf_nat_l4proto_in_range. Get rid of this and just check the l4proto in the caller. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 40e786bd296d5517b1f6c4bcc9ed13e502606ced Author: Florian Westphal Date: Thu Dec 13 16:01:30 2018 +0100 netfilter: nat: fold in_range indirection into caller No need for indirections here, we only support ipv4 and ipv6 and the called functions are very small. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 203f2e78200c27e42e9f7d063091f950bf5fe4a0 Author: Florian Westphal Date: Thu Dec 13 16:01:29 2018 +0100 netfilter: nat: remove l4proto->unique_tuple fold remaining users (icmp, icmpv6, gre) into nf_nat_l4proto_unique_tuple. The static-save of old incarnation of resolved key in gre and icmp is removed as well, just use the prandom based offset like the others. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 716b23c19edd47134104d39e3537d21c0b68d7d1 Author: Florian Westphal Date: Thu Dec 13 16:01:28 2018 +0100 netfilter: nat: un-export nf_nat_l4proto_unique_tuple almost all l4proto->unique_tuple implementations just call this helper, so make ->unique_tuple() optional and call its helper directly if the l4proto doesn't override it. This is an intermediate step to get rid of ->unique_tuple completely. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c990bbafdb11c608bba2d529f72ded9bdff88678 Author: Thierry Reding Date: Mon Dec 17 15:16:52 2018 +0100 i2c: tegra: Cleanup kerneldoc comments Some of the kerneldoc uses a strange spelling for abbreviations. Turn them into all-uppercase and clean up some whitespace issues while at it. Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang commit 912da924a29fc6bd466b98a8791d6f7cf74caf61 Author: Florian Westphal Date: Thu Dec 13 16:01:27 2018 +0100 netfilter: remove NF_NAT_RANGE_PROTO_RANDOM support Historically this was net_random() based, and was then converted to a hash based algorithm (private boot seed + hash of endpoint addresses) due to concerns of leaking net_random() bits. RANDOM_FULLY mode was added later to avoid problems with hash based mode (see commit 34ce324019e76, "netfilter: nf_nat: add full port randomization support" for details). Just make prandom_u32() the default search starting point and get rid of ->secure_port() altogether. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit df7043bed47e0f525224c55c2e005c97f958d80d Author: Yafang Shao Date: Thu Dec 13 22:39:21 2018 +0800 netfilter: remove unused parameters in nf_ct_l4proto_[un]register_sysctl() These parameters aren't used now. So remove them. Signed-off-by: Yafang Shao Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a504b703bb1da526a01593da0e4be2af9d9f5fa8 Author: Florian Westphal Date: Mon Dec 10 17:18:46 2018 +0100 netfilter: nat: limit port clash resolution attempts In case almost or all available ports are taken, clash resolution can take a very long time, resulting in soft lockup. This can happen when many to-be-natted hosts connect to same destination:port (e.g. a proxy) and all connections pass the same SNAT. Pick a random offset in the acceptable range, then try ever smaller number of adjacent port numbers, until either the limit is reached or a useable port was found. This results in at most 248 attempts (128 + 64 + 32 + 16 + 8, i.e. 4 restarts with new search offset) instead of 64000+, Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 89a5e15bcba87df5120d4656e0ff33d4f7cd6152 Author: Linus Walleij Date: Mon Dec 17 22:36:25 2018 +0100 gpio/mmc/of: Respect polarity in the device tree The device tree bindings for the MMC card detect and write protect lines specify that these should be active low unless "cd-inverted" or "wp-inverted" has been specified. However that is not how the kernel code has worked. It has always respected the flags passed to the phandle in the device tree, but respected the "cd-inverted" and "wp-inverted" flags such that if those are set, the polarity will be the inverse of that specified in the device tree. Switch to behaving like the old code did and fix the regression. Fixes: 81c85ec15a19 ("gpio: OF: Parse MMC-specific CD and WP properties") Cc: Bartosz Golaszewski Cc: Guenter Roeck Reported-by: Guenter Roeck Signed-off-by: Linus Walleij commit b635cbf68ff35817d5a1634b0ade41f96ef70daf Author: Xiaozhou Liu Date: Wed Dec 5 23:50:15 2018 +0800 netfilter: nat: remove unnecessary 'else if' branch Since a pseudo-random starting point is used in finding a port in the default case, that 'else if' branch above is no longer a necessity. So remove it to simplify code. Signed-off-by: Xiaozhou Liu Signed-off-by: Pablo Neira Ayuso commit 3035a66934dadca3a7d2dcd059af93ccf5f49715 Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Thu Dec 13 12:09:38 2018 +0000 i2c: axxia: support sequence command mode In order to comply with SMBus specification, the Axxia I²C module will abort the multi message transfer if the delay between finishing sending one message and starting another is longer than 25ms. Unfortunately it isn't that hard to trigger this situation on a busy system. In order to fix this problem, we should make sure hardware does whole transaction without waiting for software to fill some data. Fortunately, in addition to Manual mode that is currently used by the driver to perform I²C transfers, the module supports also so called Sequence mode. In this mode, the module automatically performs predefined sequence of operations - it sends a slave address, transmits specified number of bytes from the FIFO, changes transfer direction, resends the slave address and then reads specified number of bytes to FIFO. While very inflexible, this does fit a most common case of multi message transfer - the one where you first write a register number you want to read and then read it. To use this mode effectively, a number of conditions must be met to ensure the transaction does fit the predefined sequence. In case this is not the case, a fallback to manual mode is used. The initialization of this mode is very similar to Manual mode. The most notable difference is different bit in the Master Interrupt Status designating finishing of transaction. Also some of the errors, like TSS, cannot happen in this mode. While it is possible to support transactions requesting a read of any size (RFL interrupt will be generated when FIFO size is not enough) the TFL interrupt is not available in this mode, thus the write part of the transaction cannot exceed FIFO_SIZE (8). Note that in case of a NAK during transaction, the NA/ND status bits will be set before STOP command is generated, triggering an interrupt while the controller is still busy. Current solution for this problem is to actively wait for this command to stop before leaving xfer callback. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin [wsa: added braces around else branch spotted by checkpatch] Signed-off-by: Wolfram Sang commit 03e6742584af8866ba014874669d0440bed3a623 Author: Thinh Nguyen Date: Mon Dec 10 14:08:01 2018 -0800 PCI: Override Synopsys USB 3.x HAPS device class Synopsys USB 3.x host HAPS platform has a class code of PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these devices should use dwc3-haps driver. Change these devices' class code to PCI_CLASS_SERIAL_USB_DEVICE to prevent the xhci-pci driver from claiming them. Signed-off-by: Thinh Nguyen Signed-off-by: Bjorn Helgaas commit b6061b1e566d70c7686d194a6c47dc6ffa665c77 Author: Thinh Nguyen Date: Mon Dec 10 14:07:54 2018 -0800 PCI: Move Synopsys HAPS platform device IDs Move Synopsys HAPS platform device IDs to pci_ids.h so that both drivers/pci/quirks.c and dwc3-haps driver can reference these IDs. Signed-off-by: Thinh Nguyen Signed-off-by: Bjorn Helgaas Acked-by: Felipe Balbi commit 1ccf1980e3e4853ecf11804774ef6ac071911150 Author: Fabrizio Castro Date: Thu Dec 13 20:19:02 2018 +0000 dt-bindings: i2c: rcar: Add r8a774c0 support Document RZ/G2E (R8A774C0) I2C compatibility with the relevant device dt-bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang commit 3f74383f29ca2e0c7d9362c4c65a7c2cb4e1fd5f Author: Fabrizio Castro Date: Fri Dec 14 08:41:47 2018 +0000 dt-bindings: i2c: sh_mobile: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang commit 51243b73455f2d12cb82abffa7bc9028aec656e0 Author: Fabrizio Castro Date: Thu Dec 13 20:22:34 2018 +0000 i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E) Similarly to R-Car E3, RZ/G2E doesn't come with automatic transmission registers, as such it is not considered compatible with the existing fallback bindings. Add SoC specific binding compatibility to allow for later support for automatic transmission. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang commit 0cb47164ed0c4f8133cc44915095a622f1293696 Merge: 02d26b9a57fae 37cf28d3b5bca Author: Wolfram Sang Date: Mon Dec 17 23:14:10 2018 +0100 Merge tag 'at24-4.21-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.0 at24: updates for 4.21 Adding a new compatible for 24c2048. commit 9b4924da4711674e62d97d4f5360446cc78337af Author: Martin Schiller Date: Fri Dec 14 08:48:25 2018 +0100 pinctrl: xway: fix gpio-hog related boot issues This patch is based on commit a86caa9ba5d7 ("pinctrl: msm: fix gpio-hog related boot issues"). It fixes the issue that the gpio ranges needs to be defined before gpiochip_add(). Therefore, we also have to swap the order of registering the pinctrl driver and registering the gpio chip. You also have to add the "gpio-ranges" property to the pinctrl device node to get it finally working. Signed-off-by: Martin Schiller Acked-by: John Crispin Signed-off-by: Linus Walleij commit c7f7e58fcbf33589f11bfde0506e076a00627e59 Author: Thiago Jung Bauermann Date: Wed Dec 12 23:39:09 2018 -0200 integrity: Remove references to module keyring From what I can tell, it has never been used. Mimi: This was introduced prior to Rusty's decision to use appended signatures for kernel modules. Signed-off-by: Thiago Jung Bauermann Acked-by: Mimi Zohar Signed-off-by: James Morris commit 02d26b9a57faeb600f4b6d39a5c417f959e8e503 Author: Enric Balletbo i Serra Date: Wed Jun 6 17:09:00 2018 +0200 i2c: i2c-cros-ec-tunnel: Switch to SPDX identifier. Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang commit 12d6dd06989171ba9486790116832a65c5316fb1 Author: Fabrizio Castro Date: Thu Dec 13 20:18:14 2018 +0000 dt-bindings: gpio: rcar: Add r8a774c0 (RZ/G2E) support Document Renesas' RZ/G2E (R8A774C0) GPIO blocks compatibility within the relevant dt-bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Linus Walleij commit a0752e9c3097b2c4fccd618802938e0951038dfa Author: Linus Walleij Date: Mon Dec 17 14:11:08 2018 +0100 memory: omap-gpmc: Get the header of the enum Commit 21abf103818a ("gpio: Pass a flag to gpiochip_request_own_desc()") started to pass an enum gpiod_flags but this file is not including the header file that defines that enum and the compiler spits: drivers/memory/omap-gpmc.c: In function 'gpmc_probe_generic_child': drivers/memory/omap-gpmc.c:2174:9: error: type of formal parameter 4 is incomplete 0); ^ Cc: Ladislav Michl Cc: Janusz Krzysztofik Reported-by: Stephen Rothwell Fixes: 21abf103818a ("gpio: Pass a flag to gpiochip_request_own_desc()") Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit d6543c0f3964f20cd6f585d4794d07b7b31207c0 Author: Linus Walleij Date: Sat Dec 15 12:50:59 2018 +0100 ARM: omap1: Fix new user of gpiochip_request_own_desc() This fixes up a new user of gpiochip_request_own_desc() in the AMS Delta board that appeared after the patch that was applied recently. Fixes: 21abf103818a ("gpio: Pass a flag to gpiochip_request_own_desc()") Reviewed-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Linus Walleij commit af5395c214c15c18de3decf2229373a8c88c4fde Author: Max Filippov Date: Sun Nov 11 21:51:49 2018 -0800 xtensa: implement syscall tracepoints Add TIF_SYSCALL_TRACEPOINT flag definition; add _TIF_SYSCALL_TRACEPOINT to _TIF_WORK_MASK. Call trace_sys_enter from do_syscall_trace_enter and trace_sys_exit from do_syscall_trace_leave when TIF_SYSCALL_TRACEPOINT flag is set. Add declaration of sys_call_table to arch/xtensa/include/asm/syscall.h Add definition of NR_syscalls to arch/xtensa/include/asm/unistd.h Select HAVE_SYSCALL_TRACEPOINTS. This change allows tracing each syscall entry and exit through the ftrace mechanism. Signed-off-by: Max Filippov commit 9f24f3c1067c8e4ffbbcd759180b422c9a761b1b Author: Max Filippov Date: Fri Nov 9 15:45:53 2018 -0800 xtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK Implement syscall_get_nr, syscall_rollback, syscall_get_error, syscall_{get,set}_return_value and syscall_{get,set}_arguments. Select HAVE_ARCH_TRACEHOOK as Xtensa now has all support for that. Signed-off-by: Max Filippov commit 921534473a6bc2ff822f19c222970d213d2e0f76 Author: Max Filippov Date: Tue Nov 20 20:09:58 2018 -0800 xtensa: enable CORE_DUMP_USE_REGSET Drop xtensa_elf_core_copy_regs function, ELF_CORE_COPY_REGS macro, and dump_fpu function. Define CORE_DUMP_USE_REGSET to make ELF core dumper use regset interface. Signed-off-by: Max Filippov commit 1819afcc0b1327a470898e0a76100884969aff17 Author: Max Filippov Date: Sat Nov 24 21:36:11 2018 -0800 xtensa: implement TIE regset Put all coprocessors and non-coprocessor TIE state into the REGSET_TIE. Mark TIE regset with NT_PRFPREG note type. Reimplement ptrace_getxregs and ptrace_setxregs using REGSET_TIE. Signed-off-by: Max Filippov commit 06fbac8e8971f2fa526e189304dd95ee62f39dbe Author: Max Filippov Date: Fri Nov 9 19:32:06 2018 -0800 xtensa: implement task_user_regset_view - define struct user_pt_regs in the arch/xtensa/include/uapi/asm/ptrace.h with the same layout as xtensa_gregset_t; make xtensa_gregset_t a typedef; - define REGSET_GPR regset, implement register get and set functions; - define task_user_regset_view function and expose REGSET_GPR. Signed-off-by: Max Filippov commit 3aee3e25deeab083df21012060c98e9987ac9177 Author: Max Filippov Date: Thu Nov 15 19:33:47 2018 -0800 xtensa: call do_syscall_trace_{enter,leave} selectively Check whether calls to do_syscall_trace_{enter,leave} are necessary in the system_call function. Define _TIF_WORK_MASK to a bitmask of flags that reuire the calls. Fix comment. Signed-off-by: Max Filippov commit 6a986984b63990c80252b2208036fe731a6ae113 Author: Max Filippov Date: Fri Nov 9 15:43:14 2018 -0800 xtensa: use NO_SYSCALL instead of -1 For the sake of clarity define macro NO_SYSCALL and use it for setting/checking struct pt_regs::syscall field. Signed-off-by: Max Filippov commit 98c3115a4ec56f03056efd9295e0fcb4c5c57a85 Author: Dmitry V. Levin Date: Tue Nov 20 03:17:01 2018 +0300 xtensa: define syscall_get_arch() syscall_get_arch() is required to be implemented on all architectures in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Signed-off-by: Dmitry V. Levin Acked-by: Max Filippov Signed-off-by: Max Filippov commit b61c41c28eb09ae1bb02479a8f65171c037124c6 Author: Dmitry V. Levin Date: Thu Dec 13 20:23:26 2018 +0300 Move EM_XTENSA to uapi/linux/elf-em.h This should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_XTENSA in order to define AUDIT_ARCH_XTENSA which is needed to implement syscall_get_arch() which in turn is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Cc: Max Filippov Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Chris Zankel Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Dmitry V. Levin Signed-off-by: Max Filippov commit 6c4fc209fcf9d27efbaa48368773e4d2bfbd59aa Author: Daniel Borkmann Date: Sun Dec 16 00:49:47 2018 +0100 bpf: remove useless version check for prog load Existing libraries and tracing frameworks work around this kernel version check by automatically deriving the kernel version from uname(3) or similar such that the user does not need to do it manually; these workarounds also make the version check useless at the same time. Moreover, most other BPF tracing types enabling bpf_probe_read()-like functionality have /not/ adapted this check, and in general these days it is well understood anyway that all the tracing programs are not stable with regards to future kernels as kernel internal data structures are subject to change from release to release. Back at last netconf we discussed [0] and agreed to remove this check from bpf_prog_load() and instead document it here in the uapi header that there is no such guarantee for stable API for these programs. [0] http://vger.kernel.org/netconf2018_files/DanielBorkmann_netconf2018.pdf Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit b5c8f358ce7c0cd1bd821962ccb2c7fd050e9339 Author: Anson Huang Date: Mon Dec 17 04:47:40 2018 +0000 dt-bindings: iio: magnetometer: add dt-bindings for freescale mag3110 Add Freescale MAG3110 dt-bindings and remove it from trivial-devices dt-bingding doc. Signed-off-by: Anson Huang [robh: fixup trivial-devices.txt change for trivial-devices.yaml] Signed-off-by: Rob Herring commit 3c259a1c36636553934d01562211ee8e86fc8079 Author: Frederick Lawler Date: Sun Dec 9 16:45:50 2018 -0600 PCI/ASPM: Remove unused lists from struct pcie_link_state ASPM does not make use of the children or link LIST_HEADs declared in struct pcie_link_state and defined in alloc_pcie_link_state(). Therefore, remove these lists. No functional change intended. Signed-off-by: Frederick Lawler Signed-off-by: Bjorn Helgaas commit 38b11beb73c52bd6fb3920775887fdd1004f2a68 Author: Sakari Ailus Date: Thu Dec 13 04:45:17 2018 -0500 media: staging/ipu3-imgu: Add MAINTAINERS entry Add a MAINTAINERS entry for the ImgU driver. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 5e44465ccf7a6f088a7e94856d49ebecda12083f Author: Sakari Ailus Date: Thu Dec 13 04:36:51 2018 -0500 media: staging/ipu3-imgu: Address documentation comments Address comments on the documentation after Yong's original patch. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d0276a2b830301e2320a96b458973cfe2af0f610 Author: Yong Zhi Date: Thu Dec 6 20:03:40 2018 -0500 media: v4l: Add Intel IPU3 meta buffer formats Add IPU3-specific meta formats for processing parameters and 3A statistics. V4L2_META_FMT_IPU3_PARAMS V4L2_META_FMT_IPU3_STAT_3A Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34fc0e1bf89208a8ca7f86d14fb1ff1b081c3f3d Author: Rajmohan Mani Date: Thu Dec 6 20:03:42 2018 -0500 media: doc-rst: Add Intel IPU3 documentation This patch adds the details about the IPU3 Imaging Unit driver (both CIO2 and IMGU). Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d84273453689038be914a31b28f372147ceafee6 Author: Sakari Ailus Date: Wed Dec 12 06:13:10 2018 -0500 media: ipu3-imgu: Fix firmware binary location The firmware binary is located under "intel" directory in the linux-firmware repository. Reflect this in the driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit faa9ce7c59a756dccb9fbc5a1dcabb143ddb6287 Author: Sakari Ailus Date: Mon Dec 10 03:59:51 2018 -0500 media: ipu3-imgu: Fix compiler warnings Address a few false positive compiler warnings related to uninitialised variables. While at it, use bool where bool is needed and %u to print an unsigned integer. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 51abe041c5ed56efbdd944cbd45d27e2cd711406 Author: Bingbu Cao Date: Thu Dec 6 20:03:39 2018 -0500 media: staging/intel-ipu3: Add dual pipe support This patch adds support to run dual pipes simultaneously. A private ioctl to configure the pipe mode (video or still) is also implemented. IPU3 hardware supports a maximum of 2 streams per pipe. With the support of dual pipes, more than 2 stream outputs can be achieved. This helps to support advanced camera features like Continuous View Finder (CVF) and Snapshot During Video(SDV). Extend ipu3 IMGU driver to support dual pipes 1. Extend current IMGU device to contain 2 groups of video nodes and 2 subdevs 2. Extend current css to support 2 pipeline and make CSS APIs to support 2 pipe 3. Add a v4l2 ctrl to allow user to specify the mode of the pipe 4. Check media pipeline link status to get enabled pipes Signed-off-by: Bingbu Cao Signed-off-by: Tian Shu Qiu Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit daad52c8aa4fcf27d2e8b69daf851d82c141fd2f Author: Mauro Carvalho Chehab Date: Fri Dec 7 08:07:55 2018 -0500 media: drxk_hard: check if parameter is not NULL There is a smatch warning: drivers/media/dvb-frontends/drxk_hard.c: drivers/media/dvb-frontends/drxk_hard.c:1478 scu_command() error: we previously assumed 'parameter' could be null (see line 1467) Telling that parameter might be NULL. Well, it can't, due to the way the driver works, but it doesn't hurt to add a check, in order to shut up smatch. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nick Desaulniers Signed-off-by: Mauro Carvalho Chehab commit 55b8cbe470d103b44104c64dbf89e5cad525d4e0 Merge: d63962e38cc0a 4fc96ee9085d3 Author: James Morris Date: Mon Dec 17 11:36:26 2018 -0800 Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp seccomp fixes for sparse warnings and s390 build (Tycho) commit 4e460f656e9c8756fae32440ef3f6887e2ed4808 Author: Max Filippov Date: Fri Dec 14 14:41:58 2018 -0800 xtensa: support memtest Call early_memtest from the bootmem_init to run memtest if it's configured and enabled. Signed-off-by: Max Filippov commit 0db51ef26e87845d1748c363702585e2f0a06266 Merge: 8bd8ea195f6d1 9488585b21bef Author: James Morris Date: Mon Dec 17 11:31:58 2018 -0800 Merge tag 'tpmdd-next-20181217' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm tpmdd updates for Linux v4.21 From Jarkko: v4.21 updates: * Support for partial reads of /dev/tpm0. * Clean up for TPM 1.x code: move the commands to tpm1-cmd.c and make everything to use the same data structure for building TPM commands i.e. struct tpm_buf. commit 5580b4a1a8ca85c53bd5b94c5d302e47dca3e5cb Merge: 8bd8ea195f6d1 eed9de3b4f471 Author: James Morris Date: Mon Dec 17 11:26:46 2018 -0800 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next-integrity From Mimi: In Linux 4.19, a new LSM hook named security_kernel_load_data was upstreamed, allowing LSMs and IMA to prevent the kexec_load syscall.  Different signature verification methods exist for verifying the kexec'ed kernel image.  This pull request adds additional support in IMA to prevent loading unsigned kernel images via the kexec_load syscall, independently of the IMA policy rules, based on the runtime "secure boot" flag.  An initial IMA kselftest is included. In addition, this pull request defines a new, separate keyring named ".platform" for storing the preboot/firmware keys needed for verifying the kexec'ed kernel image's signature and includes the associated IMA kexec usage of the ".platform" keyring. (David Howell's and Josh Boyer's patches for reading the preboot/firmware keys, which were previously posted for a different use case scenario, are included here.) commit a28777f250311ac574237e6145ac72c7b3b7b049 Author: Joakim Tjernlund Date: Fri Dec 14 15:17:08 2018 +0100 ucc_geth: Add change_carrier() for Fixed PHYs This allows to control carrier from /sys/class/net/ethX/carrier for Fixed PHYs. Signed-off-by: Joakim Tjernlund Signed-off-by: David S. Miller commit 6211d46713c5dc62bb87dff208134b253ff5e128 Author: Joakim Tjernlund Date: Fri Dec 14 15:17:07 2018 +0100 gianfar: Add change_carrier() for Fixed PHYs This allows to control carrier from /sys/class/net/ethX/carrier for Fixed PHYs. Signed-off-by: Joakim Tjernlund Signed-off-by: David S. Miller commit 6e8b0ff1ba4cc145a8fb13a3212de0f75d5f043c Author: Joakim Tjernlund Date: Fri Dec 14 15:17:06 2018 +0100 dpaa_eth: Add change_carrier() for Fixed PHYs This allows to control carrier from /sys/class/net/ethX/carrier for Fixed PHYs. Signed-off-by: Joakim Tjernlund Signed-off-by: David S. Miller commit b3e5464e36c07dba70b544044a297d5819351765 Author: Joakim Tjernlund Date: Fri Dec 14 15:17:05 2018 +0100 Fixed PHY: Add fixed_phy_change_carrier() Drivers can use this as .ndo_change_carrier() to change carrier via /sys/class/net/ethX/carrier. Signed-off-by: Joakim Tjernlund Signed-off-by: David S. Miller commit 8bd8ea195f6d135a8d85201116314eb5237ad7e7 Merge: 1072bd678547f 7566ec393f416 Author: James Morris Date: Mon Dec 17 11:24:28 2018 -0800 Merge tag 'v4.20-rc7' into next-general Sync with Linux 4.20-rc7, to pick up: Revert "ovl: relax permission checking on underlying layers" commit 74ebbdda7cecf789661c208faccbeef10a7f05da Author: Marek Szyprowski Date: Fri Dec 14 12:34:10 2018 +0100 arm64: dts: exynos: Add Bluetooth chip to TM2(e) boards TM2(e) boards have a Broadcom Bluetooth chip connected to 3rd UART port. Add a device tree node describing it and its resources (control GPIO lines and clock). Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 4beaacc6fea5a5ec43c55c22a6c83c03a5ecc775 Author: Eric Dumazet Date: Thu Dec 13 03:03:37 2018 -0800 net/mlx4_en: remove fallback after kzalloc_node() kzalloc_node(..., GFP_KERNEL, node) will attempt to allocate memory as close as possible to the node. There is no need to fallback to kzalloc() if this has failed. Signed-off-by: Eric Dumazet Cc: Tariq Toukan Signed-off-by: David S. Miller commit 580d48573c43211fe51f411d484dbb693cc93f7c Author: Yangtao Li Date: Sat Dec 15 03:41:19 2018 -0500 regmap: debugfs: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Mark Brown commit 32fa7b852feaf838a145ac0408ad0a14d24d2eec Author: Yangtao Li Date: Sat Dec 15 03:38:37 2018 -0500 regmap: rbtree: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Mark Brown commit ff9b85de5d5d292fa07869f194fd9e3966f1e720 Author: Or Gerlitz Date: Tue Nov 6 19:49:22 2018 +0200 net/mlx5e: Add some ethtool port control entries to the uplink rep netdev Some of the ethtool entries to control the port should be supported by the uplink rep netdev in switchdev mode, add them. While here, add also the get/set coalesce entries for all reps. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 371289b61ac1ac890c7e98b1bfd3b8f32e38efae Author: Or Gerlitz Date: Tue Nov 6 19:31:10 2018 +0200 net/mlx5e: Expose ethtool pause and link functions to mlx5e callers Towards supporting set/get of global pause for the port and get of the port link ksetting from the uplink representor, expose the relevant entries to other mlx5 callers. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 073caf508822750cde02086a6ac1b9131e69692c Author: Or Gerlitz Date: Thu Nov 1 19:14:21 2018 +0200 net/mlx5e: Add sriov and udp tunnel ndo support for the uplink rep Some of the sriov ndo calls are needed also on the switchdev mode - e.g setup VF mac and reading vport stats. Add them to the uplink rep netdev ops. Same for the UDP tunnel ones, need them there to identify offloaded udp tunnel ports. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit b36cdb42ad4b114d4b9bbba8770d7a4b8e1a62f6 Author: Or Gerlitz Date: Thu Nov 8 20:42:55 2018 +0200 net/mlx5e: Handle port mtu/link, dcb and lag for uplink reps Take care of setup/teardown for the port link, dcb, lag as well as dealing with port mtu and carrier for e-switch uplink representors. This is achieved by adding a dedicated profile instance for uplink representors which includes the enable/disable and more profile routines which are invoked by the general mlx5e code for netdev attach/detach. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit aec002f6f82cbfb39f92605614a88dd7a200a766 Author: Or Gerlitz Date: Wed Nov 7 16:34:52 2018 +0200 net/mlx5e: Uninstantiate esw manager vport netdev on switchdev mode Now, when we have a dedicated uplink representor, the netdev instance set over the esw manager vport (PF) is of no-use. As such, remove it once we're on switchdev mode and get it back to life when off switchdev. This is done by reloading the Ethernet interface as well (we already do that for the IB interface) from the eswitch code while going in/out of switchdev mode. The Eth add/remove entries are modified to act differently when called in switchdev mode. In this case we only deal with registration of the eth vport representors. The rep netdevices are created from the eswitch call to load the registered eth representors. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 13e509a4c1949855ddd5ef2e23bafdfb27b8337a Author: Or Gerlitz Date: Tue Feb 13 18:14:42 2018 +0200 net/mlx5e: Remove leftover code from the PF netdev being uplink rep Remove some last leftovers from using the PF netdev as the e-switch uplink representor. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit d9ee0491c2ffbb5bc8bc418dd857a045d0d0130f Author: Or Gerlitz Date: Tue Feb 13 15:48:30 2018 +0200 net/mlx5e: Use dedicated uplink vport netdev representor Currently, when running in sriov switchdev mode, we are using the PF netdevice as the uplink representor, this is problematic from few aspects: - will break when the PF isn't eswitch manager (e.g smart NIC env) - misalignment with other NIC switchdev drivers - makes us have and maintain special code, hurts the driver quality/robustness - which in turn opens the door for future bugs As of each and all of the above, we move to have a dedicated netdev representor for the uplink vport in a similar manner done for for the VF vports. This includes the following: 1. have an uplink rep netdev as we have for VF reps 2. all reps use same load/unload functions 3. HW stats for uplink based on physical port counters and not vport counters 4. link state for the uplink managed through PAOS and not vport state 5. the uplink rep has sysfs link to the PF PCI function && uses the PF MAC address Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 025380b20dc2a3b92a36394799157a63a2fe5814 Author: Or Gerlitz Date: Wed Nov 28 18:56:41 2018 +0200 net/mlx5e: Use single argument for the esw representor build params helper This is prep step towards adding dedicated uplink representor. The patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 915fe1a0d9cbf6d7657b388833dbcae13d22a567 Author: Or Gerlitz Date: Tue Nov 13 11:09:30 2018 +0200 net/mlx5: E-Switch, Remove redundant reloading of the IB interface The reload of the IB interface done on the offloads stop call is redundant b/c we do that on mlx5_eswitch_disable_sriov(), remove it. Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 7ba12bb676c2f7848a53224f9a65c6ef256bb3b6 Author: Anup Patel Date: Tue Dec 4 19:25:07 2018 +0530 RISC-V: Remove EARLY_PRINTK support The EARLY_PRINTK using SBI console calls is not required any more because we now have RISC-V SBI support in generic earlycon framework. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 2b3f786408c5400705ed722ab2f3065e86272857 Author: Anup Patel Date: Tue Dec 4 19:25:06 2018 +0530 RISC-V: defconfig: Enable RISC-V SBI earlycon support This patch enables RISC-V SBI earlycon support in default defconfig so that we can use "earlycon=sbi" in kernel parameters for early debug prints. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 028713aa8389d960cb1935a9954327bdaa163cf8 Author: Jiri Olsa Date: Wed Dec 5 17:05:09 2018 +0100 perf trace: Add ordered processing Sort events to provide the precise outcome of ordered events, just like is done with 'perf report' and 'perf top'. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Dmitry Levin Cc: Eugene Syromiatnikov Cc: Frederic Weisbecker Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181205160509.1168-9-jolsa@kernel.org [ split from a larger patch, added trace__ prefixes to new 'struct trace' methods ] Signed-off-by: Arnaldo Carvalho de Melo commit e5edd5f298fafda28284bafb8371e6f0b7681035 Author: Ming Lei Date: Tue Dec 18 01:28:56 2018 +0800 blk-mq: skip zero-queue maps in blk_mq_map_swqueue From 7e849dd9cf37 ("nvme-pci: don't share queue maps"), the mapping table won't be initialized actually if map->nr_queues is zero, so we can't use blk_mq_map_queue_type() to retrieve hctx any more. This way still may cause broken mapping, fix it by skipping zero-queues maps in blk_mq_map_swqueue(). Cc: Jeff Moyer Cc: Mike Snitzer Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 13369816cb648f897ce9cbf57e55eeb742ce4eb3 Author: Dennis Zhou Date: Mon Dec 17 11:03:51 2018 -0500 block: fix blk-iolatency accounting underflow The blk-iolatency controller measures the time from rq_qos_throttle() to rq_qos_done_bio() and attributes this time to the first bio that needs to create the request. This means if a bio is plug-mergeable or bio-mergeable, it gets to bypass the blk-iolatency controller. The recent series [1], to tag all bios w/ blkgs undermined how iolatency was determining which bios it was charging and should process in rq_qos_done_bio(). Because all bios are being tagged, this caused the atomic_t for the struct rq_wait inflight count to underflow and result in a stall. This patch adds a new flag BIO_TRACKED to let controllers know that a bio is going through the rq_qos path. blk-iolatency now checks if this flag is set to see if it should process the bio in rq_qos_done_bio(). Overloading BLK_QUEUE_ENTERED works, but makes the flag rules confusing. BIO_THROTTLED was another candidate, but the flag is set for all bios that have gone through blk-throttle code. Overloading a flag comes with the burden of making sure that when either implementation changes, a change in setting rules for one doesn't cause a bug in the other. So here, we unfortunately opt for adding a new flag. [1] https://lore.kernel.org/lkml/20181205171039.73066-1-dennis@kernel.org/ Fixes: 5cdf2e3fea5e ("blkcg: associate blkg when associating a device") Signed-off-by: Dennis Zhou Cc: Josef Bacik Signed-off-by: Jens Axboe commit c16d6b5a9f47d0e581882269fca1d73be60208b2 Author: Ming Lei Date: Mon Dec 17 08:44:05 2018 -0700 blk-mq: fix dispatch from sw queue When a request is added to rq list of sw queue(ctx), the rq may be from a different type of hctx, especially after multi queue mapping is introduced. So when dispach request from sw queue via blk_mq_flush_busy_ctxs() or blk_mq_dequeue_from_ctx(), one request belonging to other queue type of hctx can be dispatched to current hctx in case that read queue or poll queue is enabled. This patch fixes this issue by introducing per-queue-type list. Cc: Christoph Hellwig Signed-off-by: Ming Lei Changed by me to not use separately cacheline aligned lists, just place them all in the same cacheline where we had just the one list and lock before. Signed-off-by: Jens Axboe commit 7211aef86f79583e59b88a0aba0bc830566f7e8e Author: Damien Le Moal Date: Mon Dec 17 15:14:05 2018 +0900 block: mq-deadline: Fix write completion handling For a zoned block device using mq-deadline, if a write request for a zone is received while another write was already dispatched for the same zone, dd_dispatch_request() will return NULL and the newly inserted write request is kept in the scheduler queue waiting for the ongoing zone write to complete. With this behavior, when no other request has been dispatched, rq_list in blk_mq_sched_dispatch_requests() is empty and blk_mq_sched_mark_restart_hctx() not called. This in turn leads to __blk_mq_free_request() call of blk_mq_sched_restart() to not run the queue when the already dispatched write request completes. The newly dispatched request stays stuck in the scheduler queue until eventually another request is submitted. This problem does not affect SCSI disk as the SCSI stack handles queue restart on request completion. However, this problem is can be triggered the nullblk driver with zoned mode enabled. Fix this by always requesting a queue restart in dd_dispatch_request() if no request was dispatched while WRITE requests are queued. Fixes: 5700f69178e9 ("mq-deadline: Introduce zone locking support") Cc: Signed-off-by: Damien Le Moal Add missing export of blk_mq_sched_restart() Signed-off-by: Jens Axboe commit 8ba35b3a0046d6573c98f00461d9bd1b86250d35 Author: Nathan Chancellor Date: Fri Oct 19 11:04:27 2018 -0700 vfio-mdev/samples: Use u8 instead of char for handle functions Clang warns: samples/vfio-mdev/mtty.c:592:39: warning: implicit conversion from 'int' to 'char' changes value from 162 to -94 [-Wconstant-conversion] *buf = UART_MSR_DSR | UART_MSR_DDSR | UART_MSR_DCD; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ 1 warning generated. Turns out that all uses of buf in this function ultimately end up stored or cast to an unsigned type. Just use u8, which has the same number of bits but can store this larger number so Clang no longer warns. Signed-off-by: Nathan Chancellor Signed-off-by: Alex Williamson commit 83356b3d124af5ae472ce1358222f6b7749d2322 Author: Jiri Olsa Date: Thu Dec 6 14:38:52 2018 -0300 perf ordered_events: Add first_time() method To get the timestamp in the first event in the queue. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Dmitry Levin Cc: Eugene Syromiatnikov Cc: Frederic Weisbecker Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/n/tip-appp27jw1ul8kgg872j43r5o@git.kernel.org [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 1f44b3e2fc5d7a2c5f6d1e67c80ebc226d6bd25f Author: Jiri Olsa Date: Wed Dec 5 17:05:08 2018 +0100 perf trace: Move event delivery to a new deliver_event() function Mov event delivery code to a new trace__deliver_event() function, so it's easier to add ordered delivery coming in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Dmitry Levin Cc: Eugene Syromiatnikov Cc: Frederic Weisbecker Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181205160509.1168-8-jolsa@kernel.org [ Add trace__ prefix to the deliver_event method ] Signed-off-by: Arnaldo Carvalho de Melo commit 68ca5d07de207e56f57e887de23b03fbc1ebc2a6 Author: Jiri Olsa Date: Wed Dec 5 17:05:07 2018 +0100 perf ordered_events: Add ordered_events__flush_time interface Add OE_FLUSH__TIME flush type, to be able to flush only certain amount of the queue based on the provided timestamp. It will be used in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Dmitry Levin Cc: Eugene Syromiatnikov Cc: Frederic Weisbecker Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181205160509.1168-7-jolsa@kernel.org [ Fix the build on older systems such as centos 5 and 6 where 'time' shadows a global declaration ] Signed-off-by: Arnaldo Carvalho de Melo commit 6d99a79cb40da3eddafef844b7a679fe5162f224 Author: Eugeniy Paltsev Date: Tue Dec 4 20:51:18 2018 +0300 perf annotate: Introduce basic support for ARC Introduce basic 'perf annotate' support for ARC to be able to use anotation via stdio interface. Signed-off-by: Eugeniy Paltsev Cc: Alexander Shishkin Cc: Alexey Brodkin Cc: Jiri Olsa Cc: linux-snps-arc@lists.infradead.org Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vineet Gupta Link: http://lkml.kernel.org/r/20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com Signed-off-by: Arnaldo Carvalho de Melo commit 75c375c0ae7cc75cec6683ee2539937c60c3e4af Author: Sihyeon Jang Date: Sun Dec 2 00:46:03 2018 +0900 perf config: Modify size factor of snprintf According to definition of snprintf, it gets size factor including null('\0') byte. So '-1' is not neccessary. Also it will be helpful unfied style with other cases. (eg. builtin-script.c) Signed-off-by: Sihyeon Jang Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201154603.10093-1-uneedsihyeon@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit c8dd6ee51a4d0a119c8b4121d83008215e3209ed Author: Alexey Budankov Date: Wed Dec 5 20:19:41 2018 +0300 perf record: Fix memory leak on AIO objects deallocation Sending a part which was missed between v12 and v13 of the patch set introducing AIO trace streaming for perf record mode. The part is essential to avoid memory leakage during deallocation of AIO related trace data buffers. Signed-off-by: Alexey Budankov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/e5d3154e-1583-83bb-9527-28ddbc6dbf9d@linux.intel.com [ No need to test for NULL before calling zfree() ] Signed-off-by: Arnaldo Carvalho de Melo commit 91b2b97025097ce7ca7536bc87eba2bf14760fb4 Author: Andi Kleen Date: Mon Nov 19 21:06:35 2018 -0800 perf vendor events intel: Fix Load_Miss_Real_Latency on SKL/SKX Fix incorrect event names for the Load_Miss_Real_Latency metric for Skylake and Skylake Server. Fixes https://github.com/andikleen/pmu-tools/issues/158 Before: % perf stat -M Load_Miss_Real_Latency true event syntax error: '..ss.pending,mem_load_retired.l1_miss_ps,mem_load_retired.fb_hit_ps}:W' \___ parser error Usage: perf stat [] [] -M, --metrics monitor specified metrics or metric groups (separated by ,) After: % perf stat -M Load_Miss_Real_Latency true Performance counter stats for 'true': 279,204 l1d_pend_miss.pending # 14.0 Load_Miss_Real_Latency 4,784 mem_load_uops_retired.l1_miss 15,188 mem_load_uops_retired.hit_lfb 0.000899640 seconds time elapsed Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20181120050635.4215-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit bd8d57fb7e25e9fcf67a9eef5fa13aabe2016e07 Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 13:52:13 2018 -0300 perf parse-events: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: util/parse-events.c: In function 'print_symbol_events': util/parse-events.c:2465:4: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-truncation] strncpy(name, syms->symbol, MAX_NAME_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'print_symbol_events.constprop', inlined from 'print_events' at util/parse-events.c:2508:2: util/parse-events.c:2465:4: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-truncation] strncpy(name, syms->symbol, MAX_NAME_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'print_symbol_events.constprop', inlined from 'print_events' at util/parse-events.c:2511:2: util/parse-events.c:2465:4: error: 'strncpy' specified bound 100 equals destination size [-Werror=stringop-truncation] strncpy(name, syms->symbol, MAX_NAME_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: 947b4ad1d198 ("perf list: Fix max event string size") Link: https://lkml.kernel.org/n/tip-b663e33bm6x8hrkie4uxh7u2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bef0b8970f27da5ca223e522a174d03e2587761d Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:50:08 2018 -0300 perf probe: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. In this case the 'target' buffer is coming from a list of build-ids that are expected to have a len of at most (SBUILD_ID_SIZE - 1) chars, so probably we're safe, but since we're using strncpy() here, use strlcpy() instead to provide the intended safety checking without the using the problematic strncpy() function. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: util/probe-file.c: In function 'probe_cache__open.isra.5': util/probe-file.c:427:3: error: 'strncpy' specified bound 41 equals destination size [-Werror=stringop-truncation] strncpy(sbuildid, target, SBUILD_ID_SIZE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Fixes: 1f3736c9c833 ("perf probe: Show all cached probes") Link: https://lkml.kernel.org/n/tip-l7n8ggc9kl38qtdlouke5yp5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4d0f16d059ddb91424480d88473f7392f24aebdc Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:41:03 2018 -0300 perf ui helpline: Use strlcpy() as a shorter form of strncpy() + explicit set nul The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. In this case we are actually setting the null byte at the right place, but since we pass the buffer size as the limit to strncpy() and not it minus one, gcc ends up warning us about that, see below. So, lets just switch to the shorter form provided by strlcpy(). This fixes this warning on an Alpine Linux Edge system with gcc 8.2: ui/tui/helpline.c: In function 'tui_helpline__push': ui/tui/helpline.c:27:2: error: 'strncpy' specified bound 512 equals destination size [-Werror=stringop-truncation] strncpy(ui_helpline__current, msg, sz)[sz - 1] = '\0'; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: e6e904687949 ("perf ui: Introduce struct ui_helpline") Link: https://lkml.kernel.org/n/tip-d1wz0hjjsh19xbalw69qpytj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2f5302533f306d5ee87bd375aef9ca35b91762cb Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:29:48 2018 -0300 perf svghelper: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. In this specific case this would only happen if fgets() was buggy, as its man page states that it should read one less byte than the size of the destination buffer, so that it can put the nul byte at the end of it, so it would never copy 255 non-nul chars, as fgets reads into the orig buffer at most 254 non-nul chars and terminates it. But lets just switch to strlcpy to keep the original intent and silence the gcc 8.2 warning. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: In function 'cpu_model', inlined from 'svg_cpu_box' at util/svghelper.c:378:2: util/svghelper.c:337:5: error: 'strncpy' output may be truncated copying 255 bytes from a string of length 255 [-Werror=stringop-truncation] strncpy(cpu_m, &buf[13], 255); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Arjan van de Ven Fixes: f48d55ce7871 ("perf: Add a SVG helper library file") Link: https://lkml.kernel.org/n/tip-xzkoo0gyr56gej39ltivuh9g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b6313899f4ed2e76b8375cf8069556f5b94fbff0 Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:20:21 2018 -0300 perf help: Remove needless use of strncpy() Since we make sure the destination buffer has at least strlen(orig) + 1, no need to do a strncpy(dest, orig, strlen(orig)), just use strcpy(dest, orig). This silences this gcc 8.2 warning on Alpine Linux: In function 'add_man_viewer', inlined from 'perf_help_config' at builtin-help.c:284:3: builtin-help.c:192:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncpy((*p)->name, name, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ builtin-help.c: In function 'perf_help_config': builtin-help.c:187:15: note: length computed here size_t len = strlen(name); ^~~~~~~~~~~~ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: 078006012401 ("perf_counter tools: add in basic glue from Git") Link: https://lkml.kernel.org/n/tip-2f69l7drca427ob4km8i7kvo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5192bde7d98c99f2cd80225649e3c2e7493722f7 Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:09:46 2018 -0300 perf header: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: util/header.c: In function 'perf_event__synthesize_event_update_name': util/header.c:3625:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncpy(ev->data, evsel->name, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/header.c:3618:15: note: length computed here size_t len = strlen(evsel->name); ^~~~~~~~~~~~~~~~~~~ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: a6e5281780d1 ("perf tools: Add event_update event unit type") Link: https://lkml.kernel.org/n/tip-wycz66iy8dl2z3yifgqf894p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7572588085a13d5db02bf159542189f52fdb507e Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 11:02:57 2018 -0300 perf header: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: util/header.c: In function 'perf_event__synthesize_event_update_unit': util/header.c:3586:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncpy(ev->data, evsel->unit, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/header.c:3579:16: note: length computed here size_t size = strlen(evsel->unit); ^~~~~~~~~~~~~~~~~~~ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: a6e5281780d1 ("perf tools: Add event_update event unit type") Link: https://lkml.kernel.org/n/tip-fiikh5nay70bv4zskw2aa858@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fca5085c15255bbde203b7322c15f07ebb12f63e Author: Arnaldo Carvalho de Melo Date: Thu Dec 6 10:49:46 2018 -0300 perf dso: Fix unchecked usage of strncpy() The strncpy() function may leave the destination string buffer unterminated, better use strlcpy() that we have a __weak fallback implementation for systems without it. This fixes this warning on an Alpine Linux Edge system with gcc 8.2: In function 'decompress_kmodule', inlined from 'dso__decompress_kmodule_fd' at util/dso.c:305:9: util/dso.c:298:3: error: 'strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation] strncpy(pathname, tmpbuf, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC /tmp/build/perf/util/values.o CC /tmp/build/perf/util/debug.o cc1: all warnings being treated as errors Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: c9a8a6131fb6 ("perf tools: Move the temp file processing into decompress_kmodule") Link: https://lkml.kernel.org/n/tip-tl2hdxj64tt4k8btbi6a0ugw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 15a5cd19627a3046e7b66626abdeed3f92daafd2 Author: Mathieu Poirier Date: Tue Dec 4 13:39:04 2018 -0700 perf cs-etm: Add support for PTMv1.1 decoding This patch is re-using the mechanic set forth by ETMv3 to add support for PTM decoding. Configuration for both encoding protocol is similar but the generated stream itself is very different, hence requiring special handling. Signed-off-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1543955944-10042-4-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 7d0f4fefc492498a180da8fd5c9ebe11dc768c83 Author: Mathieu Poirier Date: Tue Dec 4 13:39:03 2018 -0700 perf cs-etm: Add support for ETMv3 trace decoding Add support for the creation of packet printer and decoder for the ETMv3 trace architecture. That way traces generated by tracers adhering to that trace protocol can be handled properly by the perf infrastructure. Signed-off-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1543955944-10042-3-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 78688342c547bb274b563e6d87ef7774c7686aaf Author: Mathieu Poirier Date: Tue Dec 4 13:39:02 2018 -0700 perf cs-etm: Add configuration for ETMv3 trace protocol This patch deals with the proper initialisation of configuration parameters for the ETMv3 trace protocol in order to properly handle packets generated by tracers following this specification. Signed-off-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1543955944-10042-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 8aa5c8eddcdd055c29a4c30df2587104c07c7c2d Author: Jiri Olsa Date: Tue Nov 13 11:15:34 2018 +0100 perf top: Move perf_top__reset_sample_counters() to after counts display Move the perf_top__reset_sample_counters() call to right after we display the counters so we can see the updated numbers for longer. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-o72pyiwt05f3p2juprwmz2jo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d8590430fb1e70132f1d330d6bbab7b943b35c3c Author: Jiri Olsa Date: Mon Nov 19 11:12:01 2018 +0100 perf top: Display slow reader warning when droping samples Currently we display the "Too slow to read ring buffer.." helpline only in the slow reader thread. This patch triggers it also when the processing thread drops samples, because it has the same reason, which is too many data on input. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-bnev2mloavyurmgchcr3o24o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 97f7e0b33db81fd821828390e9095771abe62816 Author: Jiri Olsa Date: Sun Nov 11 20:02:46 2018 +0100 perf top: Save and display the drop count stats Add drop count to 'perf top' headers: # perf top --stdio PerfTop: 3549 irqs/sec kernel:51.8% exact: 100.0% lost: 0/0 drop: 0/0 [4000Hz cycles:ppp], (all, 8 CPUs) # perf top Samples: 0 of event 'cycles:ppp', 4000 Hz, Event count (approx.): 0 lost: 0/0 drop: 0/0 The format is: / Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-2lj87zz8tq9ye1ntax3ulw0n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d63b9f6fea7613e2fdc8a5ef7e17ecc9cf24bf9d Author: Jiri Olsa Date: Sun Nov 11 19:52:06 2018 +0100 perf top: Drop samples which are behind the refresh rate Drop samples from processing thread if they get behind the latest event read from the kernel maps. If it gets behind more than the refresh rate (-d option), drop the sample. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-x533ra5c1pgofvbtsizzuydd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c94cef4beb66d3e1f4ed0f3bf6c2663a9c3cf3c0 Author: Jiri Olsa Date: Wed Nov 7 20:11:19 2018 +0100 perf top: Set the 'session_done' volatile variable when exiting So we can get out of hist processing ASAP on user request. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 94ad6e7e3606454498aeac1fdd1b9de5c1e6735a Author: Jiri Olsa Date: Mon Nov 5 21:23:40 2018 +0100 perf top: Use cond variable instead of a lock Use conditional variable logic to synchronize between the reading and processing threads. Currently it's done by having mutex around rotation code. Using a POSIX cond variable to sync both threads after queues rotation: Process thread: - Detects data - Switches queues - Sets rotate variable - Waits in pthread_cond_wait() Read thread: - Detects rotate is set - Kicks the process thread with a pthread_cond_signal() After this rotation is safely completed and both threads can continue with the new queue. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-3rdeg23rv3brvy1pwt3igvyw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 16c66bc167cc52992f66748aed7ac21396189457 Author: Jiri Olsa Date: Mon Nov 5 13:24:55 2018 +0100 perf top: Add processing thread Add a new thread that takes care of the hist creating to alleviate the main reader thread so it can keep perf mmaps served in time so that we reduce the possibility of losing events. The 'perf top' command now spawns 2 extra threads, the data processing is the following: 1) The main thread reads the data from mmaps and queues them to ordered events object; 2) The processing threads takes the data from the ordered events object and create initial histogram; 3) The GUI thread periodically sorts the initial histogram and presents it. Passing the data between threads 1 and 2 is done by having 2 ordered events queues. One is always being stored by thread 1 while the other is flushed out in thread 2. Passing the data between threads 2 and 3 stays the same as was initially for threads 1 and 3. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-hhf4hllgkmle9wl1aly1jli0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 254de74cd14a2e64323caeffe653de0f390a4e65 Author: Jiri Olsa Date: Mon Nov 5 21:34:47 2018 +0100 perf top: Move lost events warning to helpline We can't display the UI box saying that we are slow in the reader thread. That will make 'perf top' even slower and the user even more angry ;-) Move the UI box message from the reader thread to the UI thread and change it to a helpline, so there's no need to 'press any key'. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-x4k0iuw7tt6mywsaguq6jfwu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d24e3c98ac11b941669885cc09d88b3b970e9d66 Author: Jiri Olsa Date: Tue Nov 6 15:45:14 2018 +0100 perf top: Save and display the lost count stats Add a 'lost count' to 'perf top' headers: # perf top --stdio PerfTop: 3850 irqs/sec kernel:49.0% exact: 100.0% lost: 0/0 [4000Hz cycles:ppp], (all, 8 CPUs) # perf top Samples: 0 of event 'cycles:ppp', 4000 Hz, Event count (approx.): 0 lost: 0/0 The format is: / Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-zo11rn270gij5jtp8fknpf8u@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a4a6668a623e11f818a6abc9b5339855ee0407b1 Author: Jiri Olsa Date: Wed Nov 7 16:58:36 2018 +0100 perf ordered_events: Add private data member We will need it in following patch, where we can't use the container_of() trick to get the higher level object. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-vgs9aoek21v14o3obza586yy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b8494f1df875abba925374cf31bd96a464a7e5d1 Author: Jiri Olsa Date: Wed Nov 7 16:46:47 2018 +0100 perf ordered_events: Rework show_progress for __ordered_events__flush Decide to use the progress bar one level higher, we will need this in following patch. Signed-off-by: Jiri Olsa Acked-by: David S. Miller Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-ocjdukp2a8ujikkmafd0j5zv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit dd2e18e9ac20e3ffc27cabf318e83b43ed5ddb92 Author: Andi Kleen Date: Mon Dec 3 16:18:48 2018 -0800 perf tools: Support 'srccode' output When looking at PT or brstackinsn traces with 'perf script' it can be very useful to see the source code. This adds a simple facility to print them with 'perf script', if the information is available through dwarf % perf record ... % perf script -F insn,ip,sym,srccode ... 4004c6 main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004c6 main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004cd main 5 for (i = 0; i < 10000000; i++) 4004b3 main 6 v++; % perf record -b ... % perf script -F insn,ip,sym,srccode,brstackinsn ... main+22: 0000000000400543 insn: e8 ca ff ff ff # PRED |18 f1(); f1: 0000000000400512 insn: 55 |10 { 0000000000400513 insn: 48 89 e5 0000000000400516 insn: b8 00 00 00 00 |11 f2(); 000000000040051b insn: e8 d6 ff ff ff # PRED f2: 00000000004004f6 insn: 55 |5 { 00000000004004f7 insn: 48 89 e5 00000000004004fa insn: 8b 05 2c 0b 20 00 |6 c = a / b; 0000000000400500 insn: 8b 0d 2a 0b 20 00 0000000000400506 insn: 99 0000000000400507 insn: f7 f9 0000000000400509 insn: 89 05 29 0b 20 00 000000000040050f insn: 90 |7 } 0000000000400510 insn: 5d 0000000000400511 insn: c3 # PRED f1+14: 0000000000400520 insn: b8 00 00 00 00 |12 f2(); 0000000000400525 insn: e8 cc ff ff ff # PRED f2: 00000000004004f6 insn: 55 |5 { 00000000004004f7 insn: 48 89 e5 00000000004004fa insn: 8b 05 2c 0b 20 00 |6 c = a / b; Not supported for callchains currently, would need some layout changes there. Committer notes: Fixed the build on Alpine Linux (3.4 .. 3.8) by addressing this warning: In file included from util/srccode.c:19:0: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] #warning redirecting incorrect #include to ^~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Andi Kleen Tested-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181204001848.24769-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 42da438c1bc4ad9b904401aff03678ddbf1329b0 Author: Arnaldo Carvalho de Melo Date: Wed Dec 5 13:08:11 2018 -0300 perf trace: We need to consider "nr" if "__syscall_nr" is not there To cope with older kernels that don't have this patch backported: 026842d148b9 ("tracing/syscalls: Rename "/format" tracepoint field name "nr" to "__syscall_nr:") This makes 'perf trace' work again in RHEL7 kernels. Cc: Taeung Song Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6h1syw2isegnhb1bjmtr9x9k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3fcb10e496505e5573a7fc386cd1152781d37fe6 Author: Mark Drayton Date: Tue Dec 4 12:34:20 2018 -0800 perf tools: Allow specifying proc-map-timeout in config file The default timeout of 500ms for parsing /proc//maps files is too short for profiling many of our services. This can be overridden by passing --proc-map-timeout to the relevant command but it'd be nice to globally increase our default value. This patch permits setting a different default with the core.proc-map-timeout config file parameter. Signed-off-by: Mark Drayton Acked-by: Song Liu Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181204203420.1683114-1-mbd@fb.com Signed-off-by: Arnaldo Carvalho de Melo commit 65c9fee2da2fbbedbba402996ddb412072e762fc Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 tools lib subcmd: Fix a few source code comment typos Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry-picking and/or backporting, split this into multiple patches. Signed-off-by: Ingo Molnar Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit adba163441597ffb56141233a2ef722b75caca87 Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 perf tools: Fix diverse comment typos Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry-picking and/or backporting, split this into multiple patches. Just typos in comments, no need to backport, reducing the possibility of possible backporting artifacts. Signed-off-by: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit e4a8b0af5121392da2d40204ee330fd9e88d0858 Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 perf bpf-loader: Fix debugging message typo Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry picking and/or backporting, split this into multiple patches. This one has information that is presented to the user, albeit in debug mode. Signed-off-by: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 1a7ea3283f7d15d7ce76a30870c3ca648adf1fc4 Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 perf tools Documentation: Fix diverse typos Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry picking and/or backporting, split this into multiple patches. In this particular case, it affects documentation, so may be interesting to cherry pick as it is information that is presented to the user. Signed-off-by: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 3e449f7c36c3ac49f140b5dc3c40693e551f47d2 Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 tools lib traceevent: Fix diverse typos in comments Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry picking and/or backporting, split this into multiple patches. Signed-off-by: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit b1d6f155e1bbb67778c17aba661fb4ea4e1a3641 Author: Ingo Molnar Date: Mon Dec 3 11:22:00 2018 +0100 perf vendor events intel: Fix diverse typos Go over the tools/ files that are maintained in Arnaldo's tree and fix common typos: half of them were in comments, the other half in JSON files. ( Care should be taken not to re-import these typos in the future, if the JSON files get updated by the vendor without fixing the typos. ) No change in functionality intended. Committer notes: This was split from a larger patch as there are code that is, additionally, maintained outside the kernel tree, so to ease cherry picking and/or backporting, split this into multiple patches. Signed-off-by: Ingo Molnar Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181203102200.GA104797@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 24f967337f6d6bce931425769c0f5ff5cf2d212e Author: Florian Fainelli Date: Mon Dec 3 11:11:36 2018 -0800 perf tests ARM: Disable breakpoint tests 32-bit The breakpoint tests on the ARM 32-bit kernel are broken in several ways. The breakpoint length requested does not necessarily match whether the function address has the Thumb bit (bit 0) set or not, and this does matter to the ARM kernel hw_breakpoint infrastructure. See [1] for background. [1]: https://lkml.org/lkml/2018/11/15/205 As Will indicated, the overflow handling would require single-stepping which is not supported at the moment. Just disable those tests for the ARM 32-bit platforms and update the comment above to explain these limitations. Co-developed-by: Will Deacon Signed-off-by: Florian Fainelli Signed-off-by: Will Deacon Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181203191138.2419-1-f.fainelli@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a7ee4d625ede4f62146ff3bb2aeee074e4cf5fa1 Author: Robert Walker Date: Mon Dec 3 12:18:46 2018 +0000 perf cs-etm: Support for ARM A32/T32 instruction sets in CoreSight trace This patch adds support for generating instruction samples from trace of AArch32 programs using the A32 and T32 instruction sets. T32 has variable 2 or 4 byte instruction size, so the conversion between addresses and instruction counts requires extra information from the trace decoder, requiring version 0.10.0 of OpenCSD. A check for the OpenCSD library version has been added to the feature check for OpenCSD. Signed-off-by: Robert Walker Reviewed-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1543839526-30348-1-git-send-email-robert.walker@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 00879763fcf21f4b32d63d2241c877f8c1df950e Author: Sihyeon Jang Date: Sun Dec 2 17:06:51 2018 +0900 perf beauty mmap_flags: Fixed syntax error Fixed missing ']' error Committer testing: Before: # tools/perf/trace/beauty/mmap_flags.sh static const char *mmap_flags[] = { [ilog2(0x40) + 1] = "32BIT", tools/perf/trace/beauty/mmap_flags.sh: line 23: [: missing `]' [ilog2(0x01) + 1] = "SHARED", [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x10) + 1] = "FIXED", [ilog2(0x20) + 1] = "ANONYMOUS", [ilog2(0x100000) + 1] = "FIXED_NOREPLACE", tools/perf/trace/beauty/mmap_flags.sh: line 28: [: missing `]' [ilog2(0x0100) + 1] = "GROWSDOWN", [ilog2(0x0800) + 1] = "DENYWRITE", [ilog2(0x1000) + 1] = "EXECUTABLE", [ilog2(0x2000) + 1] = "LOCKED", [ilog2(0x4000) + 1] = "NORESERVE", [ilog2(0x8000) + 1] = "POPULATE", [ilog2(0x10000) + 1] = "NONBLOCK", [ilog2(0x20000) + 1] = "STACK", [ilog2(0x40000) + 1] = "HUGETLB", [ilog2(0x80000) + 1] = "SYNC", }; # After: $ tools/perf/trace/beauty/mmap_flags.sh static const char *mmap_flags[] = { [ilog2(0x40) + 1] = "32BIT", [ilog2(0x01) + 1] = "SHARED", [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x10) + 1] = "FIXED", [ilog2(0x20) + 1] = "ANONYMOUS", [ilog2(0x100000) + 1] = "FIXED_NOREPLACE", [ilog2(0x0100) + 1] = "GROWSDOWN", [ilog2(0x0800) + 1] = "DENYWRITE", [ilog2(0x1000) + 1] = "EXECUTABLE", [ilog2(0x2000) + 1] = "LOCKED", [ilog2(0x4000) + 1] = "NORESERVE", [ilog2(0x8000) + 1] = "POPULATE", [ilog2(0x10000) + 1] = "NONBLOCK", [ilog2(0x20000) + 1] = "STACK", [ilog2(0x40000) + 1] = "HUGETLB", [ilog2(0x80000) + 1] = "SYNC", }; $ Signed-off-by: Sihyeon Jang Cc: Jiri Olsa Cc: Namhyung Kim Fixes: aca70cc40a0b ("perf beauty mmap_flags: Check if the arch has a mmap.h file") Link: http://lkml.kernel.org/r/20181202080651.4685-1-uneedsihyeon@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6cd99d21741dbffb40e28ab7d955b27d09c3352f Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:10 2018 -0500 tools lib traceevent: traceevent API cleanup In order to make libtraceevent into a proper library, its API should be straightforward. This patch hides few API functions, intended for internal usage only: tep_free_event(), tep_free_format_field(), __tep_data2host2(), __tep_data2host4() and __tep_data2host8(). The patch also alignes the libtraceevent summary man page with these API changes. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.891651290@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit f0bba09ce3f88ddeef7a3e45f612d26b1e951d5b Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:09 2018 -0500 perf tools: traceevent API cleanup, remove __tep_data2host*() In order to make libtraceevent into a proper library, its API should be straightforward. The __tep_data2host*() functions are going to no longer be available as a libtraceevent API, tep_read_number() should be used instead. This patch replaces __tep_data2host*() usage with tep_read_number() in perf. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.743979275@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit fc39851c455ce9e593302c9e376cdb9593c10704 Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:08 2018 -0500 tools lib traceevent: Rename tep_free_format() to tep_free_event() In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. This renames tep_free_format() to tep_free_event(), which describes more closely the purpose of the function. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.591673556@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 97fbf3f0e0aa854ed33141dc9a5410f0ac6c71f3 Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:07 2018 -0500 tools lib traceevent, perf tools: Rename 'struct tep_event_format' to 'struct tep_event' In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. This renames 'struct tep_event_format' to 'struct tep_event', which describes more closely the purpose of the struct. Signed-off-by: Tzvetomir Stoyanov Cc: Adrian Hunter Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.436403995@goodmis.org Signed-off-by: Steven Rostedt (VMware) [ Fixup conflict with 6e33c250a88f ("tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c") ] Signed-off-by: Arnaldo Carvalho de Melo commit 4c784894ac29195af24362125a72beda4aeb8b9f Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:06 2018 -0500 tools lib traceevent: Install trace-seq.h API header file This patch installs trace-seq.h header file on "make install". Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.176265533@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit cc03e1a8f82dff36fb329469c28cbfe7d2e6156a Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:05 2018 -0500 tools lib traceevent: Added support for pkg-config This patch implements integration with pkg-config framework. pkg-config can be used by the library users to determine required CFLAGS and LDFLAGS in order to use the library Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154647.022471992@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 477be10ca781bbee29d6a1da958d63d5c9a2d83b Author: Tzvetomir Stoyanov Date: Fri Nov 30 10:44:04 2018 -0500 tools lib traceevent: Implement new API tep_get_ref() This patch implements a new API of the tracevent library: int tep_get_ref(struct tep_handle *tep); The API returns the reference counter "ref_count" of the tep handler. As "struct tep_handle" is internal only, its members cannot be accessed by the library users, the API is used to get the reference counter. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181130154646.890615385@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 239ca3e78609378a1ed5d9db1c7db629a71c2857 Author: Jin Yao Date: Fri Nov 30 21:54:57 2018 +0800 perf report: Documentation average IPC and IPC coverage Add explanations for new columns "IPC" and "IPC coverage" in perf documentation. v5: --- Update the description according to Ingo's comments. Signed-off-by: Jin Yao Reviewed-by: Ingo Molnar Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1543586097-27632-5-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ec6ae74fe8f00c7df018628ada9d33190de72efa Author: Jin Yao Date: Fri Nov 30 21:54:56 2018 +0800 perf report: Display average IPC and IPC coverage per symbol Support displaying the average IPC and IPC coverage per symbol in 'perf report' --tui and --stdio modes. For example, $ perf record -b ... $ perf report -s symbol Overhead Symbol IPC [IPC Coverage] 39.60% [.] __random 2.30 [ 54.8%] 18.02% [.] main 0.43 [ 54.3%] 14.21% [.] compute_flag 2.29 [100.0%] 14.16% [.] rand 0.36 [100.0%] 7.06% [.] __random_r 2.57 [ 70.5%] 6.85% [.] rand@plt 0.00 [ 0.0%] Jiri Olsa provided the patch to support the --stdio mode. I merged Jiri's code in this patch. $ perf report -s symbol --stdio # Overhead Symbol IPC [IPC Coverage] # ........ ........................... .................... # 39.60% [.] __random 2.30 [ 54.8%] 18.02% [.] main 0.43 [ 54.3%] 14.21% [.] compute_flag 2.29 [100.0%] 14.16% [.] rand 0.36 [100.0%] 7.06% [.] __random_r 2.57 [ 70.5%] 6.85% [.] rand@plt 0.00 [ 0.0%] 0.02% [k] run_timer_softirq 1.60 [ 57.2%] The columns "IPC" and "[IPC Coverage]" are automatically enabled when the sort-key "symbol" is specified. If the perf.data file doesn't contain timed LBR information, columns are filled with "-". For example, # Overhead Symbol IPC [IPC Coverage] # ........ ........................... .................... # 46.57% [.] main - - 17.60% [.] rand - - 15.84% [.] __random_r - - 11.90% [.] __random - - 6.50% [.] compute_flag - - 1.59% [.] rand@plt - - 0.00% [.] _dl_relocate_object - - 0.00% [k] tlb_flush_mmu - - 0.00% [k] perf_event_mmap - - 0.00% [k] native_sched_clock - - 0.00% [k] intel_pmu_handle_irq_v4 - - 0.00% [k] native_write_msr - - v3: --- Removed the sortkey 'ipc' from command-line. The columns "IPC" and "[IPC Coverage]" are automatically enabled when "symbol" is specified. v2: --- Merge in Jiri's patch to support stdio mode Signed-off-by: Jin Yao Reviewed-by: Ingo Molnar Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1543586097-27632-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 246fda09c127e689780d32ef72f2e870615ece3f Author: Jin Yao Date: Fri Nov 30 21:54:55 2018 +0800 perf annotate: Create a annotate2 flag in struct symbol We often use the symbol__annotate2() to annotate a specified symbol. While annotating may take some time, so in order to avoid annotating the same symbol repeatedly, the patch creates a new flag to indicate the symbol has been annotated. Signed-off-by: Jin Yao Reviewed-by: Ingo Molnar Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1543586097-27632-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ace4f8faea54f62521e349f70b49797e48873e1f Author: Jin Yao Date: Fri Nov 30 21:54:54 2018 +0800 perf annotate: Compute average IPC and IPC coverage per symbol Add support to 'perf report' annotate view or 'perf annotate --stdio2' to aggregate the IPC derived from timed LBRs per symbol. We compute the average IPC and the IPC coverage percentage. For example: $ perf annotate --stdio2 Percent IPC Cycle (Average IPC: 2.30, IPC Coverage: 54.8%) Disassembly of section .text: 000000000003aac0 : 8.32 3.28 sub $0x18,%rsp 3.28 mov $0x1,%esi 3.28 xor %eax,%eax 3.28 cmpl $0x0,argp_program_version_hook@@GLIBC_2.2.5+0x1e0 11.57 3.28 1 ↓ je 20 lock cmpxchg %esi,__abort_msg@@GLIBC_PRIVATE+0x8a0 ↓ jne 29 ↓ jmp 43 11.57 1.10 20: cmpxchg %esi,__abort_msg@@GLIBC_PRIVATE+0x8a0 0.00 1.10 1 ↓ je 43 29: lea __abort_msg@@GLIBC_PRIVATE+0x8a0,%rdi sub $0x80,%rsp → callq __lll_lock_wait_private add $0x80,%rsp 0.00 3.00 43: lea __ctype_b@GLIBC_2.2.5+0x38,%rdi 3.00 lea 0xc(%rsp),%rsi 8.49 3.00 1 → callq __random_r 7.91 1.94 cmpl $0x0,argp_program_version_hook@@GLIBC_2.2.5+0x1e0 0.00 1.94 1 ↓ je 68 lock decl __abort_msg@@GLIBC_PRIVATE+0x8a0 ↓ jne 70 ↓ jmp 8a 0.00 2.00 68: decl __abort_msg@@GLIBC_PRIVATE+0x8a0 21.56 2.00 1 ↓ je 8a 70: lea __abort_msg@@GLIBC_PRIVATE+0x8a0,%rdi sub $0x80,%rsp → callq __lll_unlock_wake_private add $0x80,%rsp 21.56 2.90 8a: movslq 0xc(%rsp),%rax 2.90 add $0x18,%rsp 9.03 2.90 1 ← retq It shows for this symbol the average IPC is 2.30 and the IPC coverage is 54.8%. Signed-off-by: Jin Yao Reviewed-by: Ingo Molnar Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1543586097-27632-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 44e92f8389b2242efde77d5321ffa88decd47df6 Author: Tzvetomir Stoyanov Date: Wed Nov 28 14:55:52 2018 -0500 tools lib traceevent: Add sanity check to is_timestamp_in_us() This patch adds a sanity check to is_timestamp_in_us() input parameter trace_clock. It avoids a potential segfault in this function for the case trace_clock is NULL. Reported-by: Slavomir Kaslev Signed-off-by: Tzvetomir Stoyanov Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181128145552.68c4f87b@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit a1c8cf293d57cb7c952b667805441b9fbb9c640a Author: Arnaldo Carvalho de Melo Date: Tue Nov 27 12:19:15 2018 -0300 perf beauty mmap_flags: Check if the arch has a mmap.h file If not, then just use what is in asm-generic. This fixes the build for my sh4, m68k and riscv64 perf test build containers that were failing due to 80ee5668b8a7 ("perf beauty: Add a generator for MAP_ mmap's flag constants"), that were not covered in the cset introducing those tools/arch/*/include/uapi/asm/mman.h files. f3539c12d819 ("tools include: Add uapi mman.h for each architecture") Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 80ee5668b8a7 ("perf beauty: Add a generator for MAP_ mmap's flag constants") Link: https://lkml.kernel.org/n/tip-rpy9t2e0wxpnum1yvxhreafe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 93f20c0fe3e86088ec041e47755367c4bed584c6 Author: Alexey Budankov Date: Tue Nov 6 12:07:19 2018 +0300 perf record: Extend trace writing to multi AIO Multi AIO trace writing allows caching more kernel data into userspace memory postponing trace writing for the sake of overall profiling data thruput increase. It could be seen as kernel data buffer extension into userspace memory. With an --aio option value different from 0 (default value is 1) the tool has capability to cache more and more data into user space along with delegating spill to AIO. That allows avoiding to suspend at record__aio_sync() between calls of record__mmap_read_evlist() and increases profiling data thruput at the cost of userspace memory. Signed-off-by: Alexey Budankov Reviewed-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/050bb053-e7f3-aa83-fde7-f27ff90be7f6@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d3d1af6f011a553a00d2bda90b2700c0d56bd8f7 Author: Alexey Budankov Date: Tue Nov 6 12:04:58 2018 +0300 perf record: Enable asynchronous trace writing The trace file offset is read once before mmaps iterating loop and written back after all performance data is enqueued for aio writing. The trace file offset is incremented linearly after every successful aio write operation. record__aio_sync() blocks till completion of the started AIO operation and then proceeds. record__aio_mmap_read_sync() implements a barrier for all incomplete aio write requests. Signed-off-by: Alexey Budankov Reviewed-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/ce2d45e9-d236-871c-7c8f-1bed2d37e8ac@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b77383134f3dbb461189a9c4f3b46b20152045d Author: Alexey Budankov Date: Tue Nov 6 12:03:35 2018 +0300 perf mmap: Map data buffer for preserving collected data The map->data buffer is used to preserve map->base profiling data for writing to disk. AIO map->cblock is used to queue corresponding map->data buffer for asynchronous writing. Signed-off-by: Alexey Budankov Reviewed-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/5fcda10c-6c63-68df-383a-c6d9e5d1f918@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2a07d814747b386feec7d7150fe519feb2a2a5f2 Author: Alexey Budankov Date: Tue Nov 6 12:03:35 2018 +0300 tools build feature: Check if libaio is available This will be used by 'perf record' to speed up reading the perf ring buffer. Committer testing: $ make -C tools/perf O=/tmp/build/perf make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j8' parallel build Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ OFF ] ... libaudit: [ OFF ] ... libbfd: [ OFF ] ... libelf: [ on ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] $ ls -la /tmp/build/perf/feature/test-libaio.* -rwxrwxr-x. 1 acme acme 18296 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.bin -rw-rw-r--. 1 acme acme 1165 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.d -rw-rw-r--. 1 acme acme 0 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.make.output $ $ grep -i aio /tmp/build/perf/FEATURE-DUMP feature-libaio=1 $ Signed-off-by: Alexey Budankov Tested-by: Arnaldo Carvalho de Melo Reviewed-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/5fcda10c-6c63-68df-383a-c6d9e5d1f918@linux.intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 1c6f709b9f96366cc47af23c05ecec9b8c0c392d Author: Adrian Hunter Date: Mon Nov 26 14:12:52 2018 +0200 perf intel-pt: Fix error with config term "pt=0" Users should never use 'pt=0', but if they do it may give a meaningless error: $ perf record -e intel_pt/pt=0/u uname Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (intel_pt/pt=0/u). Fix that by forcing 'pt=1'. Committer testing: # perf record -e intel_pt/pt=0/u uname Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (intel_pt/pt=0/u). /bin/dmesg | grep -i perf may provide additional information. # perf record -e intel_pt/pt=0/u uname pt=0 doesn't make sense, forcing pt=1 Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.020 MB perf.data ] # Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/b7c5b4e5-9497-10e5-fd43-5f3e4a0fe51d@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1b3aae90c6abdf8a844da2aa4aed1eb6947a7d39 Author: Arnaldo Carvalho de Melo Date: Tue Nov 27 10:31:03 2018 -0300 perf top: Allow passing a kallsyms file This basically replicates what was done for 'perf report' in: b226a5a72901 ("perf report: Allow user to specify path to kallsyms file") This should help with resolving eBPF symbols, that are in kallsyms but, of course, not in vmlinux. Reported-by: Ivan Babrou Tested-by: Ivan Babrou Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David Ahern Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-x52mx1ybq8128rtg9hjrj5qk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 19702894cd93d79c5b5a63f56f6f417595b1a57c Author: Wen Yang Date: Tue Nov 27 17:06:10 2018 +0800 perf bpf: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). This makes it more readable and also fix this warning detected by err_cast.cocci: tools/perf/util/bpf-loader.c:1606:11-18: WARNING: ERR_CAST can be used with op Signed-off-by: Wen Yang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Julia Lawall Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wen Yang Cc: zhong.weidong@zte.com.cn Link: http://lkml.kernel.org/r/20181127090610.28488-1-wen.yang99@zte.com.cn Signed-off-by: Arnaldo Carvalho de Melo commit 92151b0a230ce2792e4b2b1f43ca3ea80a83292e Author: Arnaldo Carvalho de Melo Date: Tue Nov 27 09:56:55 2018 -0300 tools include: Adopt ERR_CAST() from the kernel err.h header Add ERR_CAST(), so that tools can use it, just like the kernel. This addresses coccinelle checks that are being performed to tools/ in addition to kernel sources, so lets add this to cover that and to get tools code closer to kernel coding standards. This originally was introduced in the kernel headers in this cset: d1bc8e954452 ("Add an ERR_CAST() function to complement ERR_PTR and co.") Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: David Howells Cc: Jiri Olsa Cc: Julia Lawall Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Cc: Wen Yang Cc: zhong.weidong@zte.com.cn Link: https://lkml.kernel.org/n/tip-tlt97p066zyhzqhl5jt86og7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 741dad88dde296999da30332157ca47f0543747d Author: Adrian Hunter Date: Thu Nov 22 16:04:56 2018 +0200 perf test: Fix perf_event_attr test failure Fix inconsistent use of tabs and spaces error: # perf test 16 -v 16: Setup struct perf_event_attr : --- start --- test child forked, pid 20224 File "/usr/libexec/perf-core/tests/attr.py", line 119 log.warning("expected %s=%s, got %s" % (t, self[t], other[t])) ^ TabError: inconsistent use of tabs and spaces in indentation test child finished with -1 ---- end ---- Setup struct perf_event_attr: FAILED! Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181122140456.16817-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3c567356dbe0da4fc310cfcffafc39526e1ca43a Author: Peter Zijlstra Date: Mon Dec 3 18:03:53 2018 +0100 x86/mm/cpa: Rename @addrinarray to @numpages The CPA_ARRAY interface works in single pages, and everything, except in these 'few' locations is this variable called 'numpages'. Remove this 'addrinarray' abberation and use 'numpages' consistently. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.695039210@infradead.org Signed-off-by: Ingo Molnar commit c38116bb940ae37f51fccd315b420ee5961dcb76 Author: Peter Zijlstra Date: Mon Dec 3 18:03:52 2018 +0100 x86/mm/cpa: Better use CLFLUSHOPT Currently we issue an MFENCE before and after flushing a range. This means that if we flush a bunch of single page ranges -- like with the cpa array, we issue a whole bunch of superfluous MFENCEs. Reorgainze the code a little to avoid this. [ mingo: capitalize instructions, tweak changelog and comments. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.626999883@infradead.org Signed-off-by: Ingo Molnar commit fe0937b24ff5d7b343b9922201e469f9a6009d9d Author: Peter Zijlstra Date: Mon Dec 3 18:03:51 2018 +0100 x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into a single cpa_flush() function Note that the cache flush loop in cpa_flush_*() is identical when we use __cpa_addr(); further observe that flush_tlb_kernel_range() is a special case of to the cpa_flush_array() TLB invalidation code. This then means the two functions are virtually identical. Fold these two functions into a single cpa_flush() call. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.559855600@infradead.org Signed-off-by: Ingo Molnar commit 83b4e39146aa70913580966e0f2b78b7c3492760 Author: Peter Zijlstra Date: Mon Dec 3 18:03:50 2018 +0100 x86/mm/cpa: Make cpa_data::numpages invariant Make sure __change_page_attr_set_clr() doesn't modify cpa->numpages. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.493000228@infradead.org Signed-off-by: Ingo Molnar commit 2aac9f9d5b85da1cc77c51d78aa41012244f7518 Author: Adrian Hunter Date: Thu Nov 22 15:55:45 2018 +0200 perf tests record: Allow for 'sleep' being 'coreutils' If the 'sleep' command is provided by coreutils, then the "PERF_RECORD_* events & perf_sample fields" test will fail because the MMAP name is 'coreutils' not 'sleep', and there is an extra COMM event. Fix the test to detect that case. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181122135545.16295-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 935f5839827ef54b53406e80906f7c355eb73c1b Author: Peter Zijlstra Date: Mon Dec 3 18:03:49 2018 +0100 x86/mm/cpa: Optimize cpa_flush_array() TLB invalidation Instead of punting and doing tlb_flush_all(), do the same as flush_tlb_kernel_range() does and use single page invalidations. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.430001980@infradead.org Signed-off-by: Ingo Molnar commit 5fe26b7a8f4693d532c7a3c3632e47e7d7016238 Author: Peter Zijlstra Date: Mon Dec 3 18:03:48 2018 +0100 x86/mm/cpa: Simplify the code after making cpa->vaddr invariant Since cpa->vaddr is invariant, this means we can remove all workarounds that deal with it changing. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.366619025@infradead.org Signed-off-by: Ingo Molnar commit 98bfc9b038cde1ce108f69a50720e394fe774cb7 Author: Peter Zijlstra Date: Mon Dec 3 18:03:47 2018 +0100 x86/mm/cpa: Make cpa_data::vaddr invariant Currently __change_page_attr_set_clr() will modify cpa->vaddr when !(CPA_ARRAY | CPA_PAGES_ARRAY), whereas in the array cases it will increment cpa->curpage. Change __cpa_addr() such that its @idx argument also works in the !array case and use cpa->curpage increments for all cases. NOTE: since cpa_data::numpages is 'unsigned long' so should cpa_data::curpage be. NOTE: after this only cpa->numpages is still modified. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.295174892@infradead.org Signed-off-by: Ingo Molnar commit 16ebf031e8ab73779a382c9f2b097891da6af923 Author: Peter Zijlstra Date: Mon Dec 3 18:03:46 2018 +0100 x86/mm/cpa: Add __cpa_addr() helper The code to compute the virtual address of a cpa_data is duplicated; introduce a helper before more copies happen. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.229119497@infradead.org Signed-off-by: Ingo Molnar commit ecc729f1f47142ad31741549f400b611435c1af7 Author: Peter Zijlstra Date: Mon Dec 3 18:03:45 2018 +0100 x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftests The current pageattr-test code only uses the regular range interface, add code that also tests the array and pages interface. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tom.StDenis@amd.com Cc: dave.hansen@intel.com Link: http://lkml.kernel.org/r/20181203171043.162771364@infradead.org Signed-off-by: Ingo Molnar commit 0631ca3a6e6edd23a2ca7cab707d1abf291a097d Author: Adrian Hunter Date: Thu Nov 22 13:29:37 2018 +0200 tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c Fix following warnings: event-parse.c: In function ‘tep_find_event_by_name’: event-parse.c:3521:21: warning: ‘event’ may be used uninitialized in this function [-Wmaybe-uninitialized] pevent->last_event = event; ~~~~~~~~~~~~~~~~~~~^~~~~~~ CC ui/gtk/hists.o LINK plugin_mac80211.so CC nlattr.o event-parse.c: In function ‘tep_data_lat_fmt’: event-parse.c:5200:4: warning: ‘migrate_disable’ may be used uninitialized in this function [-Wmaybe-uninitialized] trace_seq_printf(s, "%d", migrate_disable); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ event-parse.c:5207:4: warning: ‘lock_depth’ may be used uninitialized in this function [-Wmaybe-uninitialized] trace_seq_printf(s, "%d", lock_depth); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LINK plugin_sched_switch.so LINK plugin_function.so LINK plugin_xen.so event-parse.c: In function ‘tep_event_info’: event-parse.c:5047:7: warning: ‘len_arg’ may be used uninitialized in this function [-Wmaybe-uninitialized] trace_seq_printf(s, format, len_arg, (char)val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ event-parse.c:4884:6: note: ‘len_arg’ was declared here int len_arg; ^~~~~~~ event-parse.c:4338:11: warning: ‘vsize’ may be used uninitialized in this function [-Wmaybe-uninitialized] val = tep_read_number(pevent, bptr, vsize); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ event-parse.c:4224:6: note: ‘vsize’ was declared here int vsize; ^~~~~ $ gcc --version gcc (Clear Linux OS for Intel Architecture) 8.2.1 20180502 Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Steven Rostedt (VMware) Cc: Tzvetomir Stoyanov (VMware) Link: http://lkml.kernel.org/r/20181122112937.10582-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 692d0e63324d2954a0c63a812a8588e97023a295 Author: Adrian Hunter Date: Tue Nov 6 23:07:12 2018 +0200 perf script: Use fallbacks for branch stacks Branch stacks do not necessarily have the same cpumode as the 'ip'. Use the fallback functions in those cases. This patch depends on patch "perf tools: Add fallback functions for cases where cpumode is insufficient". Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: David S. Miller Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/20181106210712.12098-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 225f99e0c811e23836c4911a2ff147e167dd1fe8 Author: Adrian Hunter Date: Tue Nov 6 23:07:11 2018 +0200 perf tools: Use fallback for sample_addr_correlates_sym() cases thread__resolve() is used in the sample_addr_correlates_sym() cases where 'addr' is a destination of a branch which does not necessarily have the same cpumode as the 'ip'. Use the fallback function in that case. This patch depends on patch "perf tools: Add fallback functions for cases where cpumode is insufficient". Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: David S. Miller Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/20181106210712.12098-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8e80ad9983caeee09c3a0a1a37e05bff93becce4 Author: Adrian Hunter Date: Tue Nov 6 23:07:10 2018 +0200 perf thread: Add fallback functions for cases where cpumode is insufficient For branch stacks or branch samples, the sample cpumode might not be correct because it applies only to the sample 'ip' and not necessary to 'addr' or branch stack addresses. Add fallback functions that can be used to deal with those cases Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: David S. Miller Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/20181106210712.12098-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ec1891afae740be581ecf5abc8bda74c4549203f Author: Adrian Hunter Date: Tue Nov 6 23:07:10 2018 +0200 perf machine: Record if a arch has a single user/kernel address space Some architectures have a single address space for kernel and user addresses, which makes it possible to determine if an address is in kernel space or user space. Some don't, e.g.: sparc. Cache that info in perf_env so that, for instance, code needing to fallback failed symbol lookups at the kernel space in single address space arches can lookup at userspace. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: David S. Miller Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: stable@vger.kernel.org # 4.19 Link: http://lkml.kernel.org/r/20181106210712.12098-2-adrian.hunter@intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 804234f27180dcf9a25cb98a88d5212f65b7f3fd Author: Arnaldo Carvalho de Melo Date: Tue Nov 27 11:45:49 2018 -0300 perf env: Also consider env->arch == NULL as local operation We'll set a new machine field based on env->arch, which for live mode, like with 'perf top' means we need to use uname() to figure the name of the arch, fix perf_env__arch() to consider both (env == NULL) and (env->arch == NULL) as local operation. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: David S. Miller Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Wang Nan Cc: stable@vger.kernel.org # 4.19 Link: https://lkml.kernel.org/n/tip-vcz4ufzdon7cwy8dm2ua53xk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b18e088825883bcb8dc4c4a641494049cf8ccec3 Author: Eric Saint-Etienne Date: Fri Nov 23 02:42:39 2018 -0800 perf map: Remove extra indirection from map__find() A double pointer is used in map__find() where a single pointer is enough because the function doesn't affect the rbtree and the rbtree is locked. Signed-off-by: Eric Saint-Etienne Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Eric Saint-Etienne Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1542969759-24346-1-git-send-email-eric.saint.etienne@oracle.com Signed-off-by: Arnaldo Carvalho de Melo commit bc4da38a4789e7819fca4c7723ded0b86aea27c0 Author: Stephane Eranian Date: Wed Nov 7 02:50:45 2018 -0800 perf stat: Fix CSV mode column output for non-cgroup events When using the -x option, perf stat prints CSV-style output with one event per line. For each event, it prints the count, the unit, the event name, the cgroup, and a bunch of other event specific fields (such as insn per cycles). When you use CSV-style mode, you expect a normalized output where each event is printed with the same number of fields regardless of what it is so it can easily be imported into a spreadsheet or parsed. For instance, if an event does not have a unit, then print an empty field for it. Although this approach was implemented for the unit, it was not for the cgroup. When mixing cgroup and non-cgroup events, then non-cgroup events would not show an empty field, instead the next field was printed, make columns not line up correctly. This patch fixes the cgroup output issues by forcing an empty field for non-cgroup events as soon as one event has cgroup. Before: @ @cycles @foo @ 0 @100.00@@ 2531614 @ @cycles @6420922@100.00@ @ foo cgroup lines up with time_running! After: @ @cycles @foo @0 @100.00@@ 2594834 @ @cycles @ @5287372 @100.00@@ Fields line up. Signed-off-by: Stephane Eranian Acked-by: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1541587845-9150-1-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 57ddf09173c1e7d0511ead8924675c7198e56545 Author: Ravi Bangoria Date: Fri Nov 16 09:58:43 2018 +0530 perf stat: Fix shadow stats for clock events Commit 0aa802a79469 ("perf stat: Get rid of extra clock display function") introduced scale and unit for clock events. Thus, perf_stat__update_shadow_stats() now saves scaled values of clock events in msecs, instead of original nsecs. But while calculating values of shadow stats we still consider clock event values in nsecs. This results in a wrong shadow stat values. Ex, # ./perf stat -e task-clock,cycles ls 2.60 msec task-clock:u # 0.877 CPUs utilized 2,430,564 cycles:u # 1215282.000 GHz Fix this by saving original nsec values for clock events in perf_stat__update_shadow_stats(). After patch: # ./perf stat -e task-clock,cycles ls 3.14 msec task-clock:u # 0.839 CPUs utilized 3,094,528 cycles:u # 0.985 GHz Suggested-by: Jiri Olsa Reported-by: Anton Blanchard Signed-off-by: Ravi Bangoria Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jin Yao Cc: Namhyung Kim Cc: Thomas Richter Cc: yuzhoujian@didichuxing.com Fixes: 0aa802a79469 ("perf stat: Get rid of extra clock display function") Link: http://lkml.kernel.org/r/20181116042843.24067-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 54fceb0bafd9f80fa2f8acb2fbadb039e2d55c9f Author: Arnaldo Carvalho de Melo Date: Thu Nov 29 20:41:54 2018 -0300 perf build: Give better hint about devel package for libssl In debian/ubuntu its libssl-dev, but for fedora/RHEL/Centos/etc its openssl-devel, fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Fixes: 8ee4646038e4 ("perf build: Add libcrypto feature detection") Link: https://lkml.kernel.org/n/tip-lnxqszts6aq2c9jy4b7mlnym@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 02117e42db7470e59910088b2b0ee42d581d2651 Merge: ba6f508d0ec4a 721066dfd4d5c Author: Ingo Molnar Date: Mon Dec 17 18:48:25 2018 +0100 Merge branch 'x86/urgent' into x86/mm, to pick up dependent fix Signed-off-by: Ingo Molnar commit c03b0358ab60504151b35587c88205c7b7fe22be Author: Paolo Abeni Date: Mon Dec 17 12:39:02 2018 +0100 net: unbreak CONFIG_RETPOLINE=n builds The kbuild bot reported a build breakage with CONFIG_RETPOLINE=n due to commit aaa5d90b395a ("net: use indirect call wrappers at GRO network layer"). I screwed the wrapper implementation for such config. Fix the issue properly ignoring the builtin symbols arguments, when retpoline is not enabled. Reported-by: kbuild test robot Fixes: aaa5d90b395a ("net: use indirect call wrappers at GRO network layer") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 8162b3d1a728cf63abf54be4167dd9beec5d9d37 Author: Masami Hiramatsu Date: Mon Dec 17 17:21:53 2018 +0900 kprobes/x86: Remove unneeded arch_within_kprobe_blacklist from x86 Remove x86 specific arch_within_kprobe_blacklist(). Since we have already added all blacklisted symbols to the kprobe blacklist by arch_populate_kprobe_blacklist(), we don't need arch_within_kprobe_blacklist() on x86 anymore. Tested-by: Andrea Righi Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/154503491354.26176.13903264647254766066.stgit@devbox Signed-off-by: Ingo Molnar commit fe6e65615415987629a2dda583b4495677d8c388 Author: Masami Hiramatsu Date: Mon Dec 17 17:21:24 2018 +0900 kprobes/x86: Show x86-64 specific blacklisted symbols correctly Show x86-64 specific blacklisted symbols in debugfs. Since x86-64 prohibits probing on symbols which are in entry text, those should be shown. Tested-by: Andrea Righi Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/154503488425.26176.17136784384033608516.stgit@devbox Signed-off-by: Ingo Molnar commit fb1a59fae8baa3f3c69b72a87ff94fc4fa5683ec Author: Masami Hiramatsu Date: Mon Dec 17 17:20:55 2018 +0900 kprobes: Blacklist symbols in arch-defined prohibited area Blacklist symbols in arch-defined probe-prohibited areas. With this change, user can see all symbols which are prohibited to probe in debugfs. All archtectures which have custom prohibit areas should define its own arch_populate_kprobe_blacklist() function, but unless that, all symbols marked __kprobes are blacklisted. Reported-by: Andrea Righi Tested-by: Andrea Righi Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/154503485491.26176.15823229545155174796.stgit@devbox Signed-off-by: Ingo Molnar commit 76aea1eeb98d2d75d9297fda777efeffe3657aeb Merge: 43b9e4febc66b 7566ec393f416 Author: Ingo Molnar Date: Mon Dec 17 17:46:26 2018 +0100 Merge tag 'v4.20-rc7' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 283ac6d5fb2a47f12bcef7806b78acf6ad89907e Author: Shuah Khan Date: Wed Dec 12 20:25:14 2018 -0700 selftests: Fix test errors related to lib.mk khdr target Commit b2d35fa5fc80 ("selftests: add headers_install to lib.mk") added khdr target to run headers_install target from the main Makefile. The logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize variables and include files to run headers_install from the top level Makefile. There are a few problems with this logic. 1. Exposes top_srcdir to all tests 2. Common logic impacts all tests 3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in some cases, and STATIC_LIBS in other cases. This makes this framework confusing to use. The common logic that runs for all tests even when KSFT_KHDR_INSTALL isn't defined by the test. top_srcdir is initialized to a default value when test doesn't initialize it. It works for all tests without a sub-dir structure and tests with sub-dir structure fail to build. e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory make: *** No rule to make target '../../../../scripts/subarch.include'. Stop. There is no reason to require all tests to define top_srcdir and there is no need to require tests to add khdr dependency using adhoc changes to TEST_* and other variables. Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests that have the dependency on headers_install. Change common logic to include khdr target define and "all" target with dependency on khdr when KSFT_KHDR_INSTALL is defined. Only tests that have dependency on headers_install have to define just the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to specify khdr dependency in the test Makefiles. Fixes: b2d35fa5fc80 ("selftests: add headers_install to lib.mk") Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan Reviewed-by: Khalid Aziz Reviewed-by: Anders Roxell Signed-off-by: Shuah Khan commit e7121ab4056ff3419f981bbf03c1e7db39223149 Author: Mauro Carvalho Chehab Date: Mon Dec 17 10:57:20 2018 -0500 media: docs: fix some GPL licensing ambiguity at the text Those files are meant to be dual GPL 2.0 and GFDL without implicit sections. However, by a wrong cut-and-paste, I ended by applying a GPL 2+ license text to it, while still using the GPL 2.0 SPDX tag, with would cause an ambiguity about the licensing model. Solve this by explicitly mentioning that the dual licensing is between GPL 2.0 and GFDL and correcting the text. Signed-off-by: Mauro Carvalho Chehab commit 4bd257d884902b81493cf11531915009ab5787cf Merge: d2b4387f3bdf0 7566ec393f416 Author: Mauro Carvalho Chehab Date: Mon Dec 17 10:34:24 2018 -0500 Merge tag 'v4.20-rc7' into patchwork Linux 4.20-rc7 * tag 'v4.20-rc7': (403 commits) Linux 4.20-rc7 scripts/spdxcheck.py: always open files in binary mode checkstack.pl: fix for aarch64 userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered fs/iomap.c: get/put the page in iomap_page_create/release() hugetlbfs: call VM_BUG_ON_PAGE earlier in free_huge_page() memblock: annotate memblock_is_reserved() with __init_memblock psi: fix reference to kernel commandline enable arch/sh/include/asm/io.h: provide prototypes for PCI I/O mapping in asm/io.h mm/sparse: add common helper to mark all memblocks present mm: introduce common STRUCT_PAGE_MAX_SHIFT define alpha: fix hang caused by the bootmem removal XArray: Fix xa_alloc when id exceeds max drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 MAINTAINERS: Daniel for drm co-maintainer drm/amdgpu: drop fclk/gfxclk ratio setting IB/core: Fix oops in netdev_next_upper_dev_rcu() dm thin: bump target version drm/vmwgfx: remove redundant return ret statement drm/i915: Flush GPU relocs harder for gen3 ... commit 1669907e3d1abfa3f7586e2d55dbbc117b5adba2 Author: Ross Lagerwall Date: Fri Dec 14 12:55:45 2018 +0000 xen/pciback: Check dev_data before using it If pcistub_init_device fails, the release function will be called with dev_data set to NULL. Check it before using it to avoid a NULL pointer dereference. Signed-off-by: Ross Lagerwall Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit bf9445a33ae6ac2f0822d2f1ce1365408387d568 Author: Andrea Righi Date: Mon Dec 10 16:12:57 2018 +0100 kprobes/x86/xen: blacklist non-attachable xen interrupt functions Blacklist symbols in Xen probe-prohibited areas, so that user can see these prohibited symbols in debugfs. See also: a50480cb6d61. Signed-off-by: Andrea Righi Acked-by: Masami Hiramatsu Signed-off-by: Boris Ostrovsky commit ec18f48bbc415bbdf6c9764603e2a18d5f04943d Author: Seung-Woo Kim Date: Fri Dec 14 12:34:09 2018 +0100 tty: serial: samsung: Increase maximum baudrate This driver can be used to communicate with Bluetooth chip in high-speed UART mode, so increase the maximum baudrate to 3Mbps. Signed-off-by: Seung-Woo Kim [mszyprow: rephrased commit message] Signed-off-by: Marek Szyprowski Signed-off-by: Greg Kroah-Hartman commit 31e933645742ee6719d37573a27cce0761dcf92b Author: Beomho Seo Date: Fri Dec 14 12:34:08 2018 +0100 tty: serial: samsung: Properly set flags in autoCTS mode Commit 391f93f2ec9f ("serial: core: Rework hw-assited flow control support") has changed the way the autoCTS mode is handled. According to that change, serial drivers which enable H/W autoCTS mode must set UPSTAT_AUTOCTS to prevent the serial core from inadvertently disabling TX. This patch adds proper handling of UPSTAT_AUTOCTS flag. Signed-off-by: Beomho Seo [mszyprow: rephrased commit message] Signed-off-by: Marek Szyprowski Signed-off-by: Greg Kroah-Hartman commit 778ec49c14018730ec177bdd34b17e15e2e748b8 Author: Rob Herring Date: Wed Dec 5 13:50:43 2018 -0600 tty: Use of_node_name_{eq,prefix} for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For hvc, the code can also be simplified by using of_stdout pointer instead of searching again for the stdout node. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-serial@vger.kernel.org Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Michael Ellerman Acked-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit d72402145ace0697a6a9e8e75a3de5bf3375f78d Author: Sergey Senozhatsky Date: Thu Dec 13 13:58:39 2018 +0900 tty/serial: do not free trasnmit buffer page under port lock LKP has hit yet another circular locking dependency between uart console drivers and debugobjects [1]: CPU0 CPU1 rhltable_init() __init_work() debug_object_init uart_shutdown() /* db->lock */ /* uart_port->lock */ debug_print_object() free_page() printk() call_console_drivers() debug_check_no_obj_freed() /* uart_port->lock */ /* db->lock */ debug_print_object() So there are two dependency chains: uart_port->lock -> db->lock And db->lock -> uart_port->lock This particular circular locking dependency can be addressed in several ways: a) One way would be to move debug_print_object() out of db->lock scope and, thus, break the db->lock -> uart_port->lock chain. b) Another one would be to free() transmit buffer page out of db->lock in UART code; which is what this patch does. It makes sense to apply a) and b) independently: there are too many things going on behind free(), none of which depend on uart_port->lock. The patch fixes transmit buffer page free() in uart_shutdown() and, additionally, in uart_port_startup() (as was suggested by Dmitry Safonov). [1] https://lore.kernel.org/lkml/20181211091154.GL23332@shao2-debian/T/#u Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Acked-by: Peter Zijlstra (Intel) Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Andrew Morton Cc: Waiman Long Cc: Dmitry Safonov Cc: Steven Rostedt Signed-off-by: Greg Kroah-Hartman commit d464b7dba1b82dce315af16de88cd6a866306b55 Author: Christian Gromm Date: Mon Dec 17 15:10:17 2018 +0100 staging: most: Documentation: add information to driver_usage file This patch updates driver_usage.txt file to reflect the latest changes that this patch set introduces. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit e6861b916e7d09b5692fd907e19d6f87e050c9b1 Author: Christian Gromm Date: Mon Dec 17 15:10:16 2018 +0100 staging: most: sound: remove channel number from ALSA card's long name Adding the channel number to the name of the sound card is wrong, as the card does not represent a single streaming channel of the MOST device. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 6cebb201963677795e8828c858c2e1502ba39b55 Author: Christian Gromm Date: Mon Dec 17 15:10:15 2018 +0100 staging: most: sound: use static name for ALSA card This patch uses a static name for the sound card's short name and long name. Having the card names configurable doesn't make sense anymore, as the card represents the same physical hardware. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 4c6375dc1c03a5097cb9f3575a441c15b270e397 Author: Christian Gromm Date: Mon Dec 17 15:10:14 2018 +0100 staging: most: sound: rename variable Since the channels of a MOST device are now being represented as individual PCM devices of one sound card, the variable card_name is not suitable anymore to describe them. Therefore, this patch renames the variable to device_name. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit ba99c631810bd9aef2fc7e62420d77371d2d04f5 Author: Christian Gromm Date: Mon Dec 17 15:10:13 2018 +0100 staging: most: sound: correct label name This patch fixes the lable name that is used to jump to error handling section of function audio_probe_channel() in case something went wrong. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 15600aea2754c3f0cd3440b95b91bbf1602a3fca Author: Christian Gromm Date: Mon Dec 17 15:10:12 2018 +0100 staging: most: sound: create one sound card w/ multiple PCM devices per MOST device This patch avoids that a sound card is created and registered with ALSA every time a channel is being linked. Instead the channels are hooked on the same card, which is registered not until the final link has been added to the component. The string provided by user space that used to be the card name becomes the PCM device name. The user space API to add a link is being expanded by a "create" flag to trigger the registration. Signed-off-by: Christian Gromm Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 6d7f677a2afa1c82d7fc7af7f9159cbffd5dc010 Author: Darwin Dingel Date: Mon Dec 10 11:29:09 2018 +1300 serial: 8250: Rate limit serial port rx interrupts during input overruns When a serial port gets faulty or gets flooded with inputs, its interrupt handler starts to work double time to get the characters to the workqueue for the tty layer to handle them. When this busy time on the serial/tty subsystem happens during boot, where it is also busy on the userspace trying to initialise, some processes can continuously get preempted and will be on hold until the interrupts subside. The fix is to backoff on processing received characters for a specified amount of time when an input overrun is seen (received a new character before the previous one is processed). This only stops receive and will continue to transmit characters to serial port. After the backoff period is done, it receive will be re-enabled. This is optional and will only be enabled by setting 'overrun-throttle-ms' in the dts. Signed-off-by: Darwin Dingel Signed-off-by: Greg Kroah-Hartman commit bdb48e4c7d0796850d4c1a24fe1386677e8a922c Author: Darwin Dingel Date: Mon Dec 10 11:27:39 2018 +1300 dt-bindings: serial: 8250: Add rate limit for serial port input overruns When a serial port continuously experiences input overrun from (1) continuous receive characters from remote and or (2) hardware issues, its interrupt handler can preempt other tasks especially when the system is busy (ie. boot up period). This can cause other tasks to get starved of processing time from the CPU. When this dts binding is enabled and input overrun on the serial port is detected, serial port receive will be throttled to give some breathing room for processing other tasks. Value provided will be in milliseconds. &serial0{ overrun-throttle-ms = <500>; }; Signed-off-by: Darwin Dingel Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 4bc16f9dd71a7a8590114e7d7e8812a0214d2994 Author: Marek Vasut Date: Sun Dec 16 18:38:58 2018 +0100 gpio: pca953x: Add regmap dependency for PCA953x driver Select REGMAP_I2C in Kconfig, since the driver now depends on regmap and this was missing, thus breaking build on various systems. Signed-off-by: Marek Vasut Cc: Linus Walleij Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 85af74c474b21940e88483fd48f6094145c89d97 Author: Nicolas Saenz Julienne Date: Mon Dec 10 17:50:05 2018 +0100 gpio: raspberrypi-exp: decrease refcount on firmware dt node We're getting a reference RPi's firmware node in order to be able to communicate with it's driver. We should decrease the reference count on the dt node after being done with it. Fixes: a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Linus Walleij commit 64a428077758383518c258641e81d57fcd454792 Author: Ryan Case Date: Thu Dec 13 11:43:20 2018 -0800 tty: serial: qcom_geni_serial: Remove interrupt storm Disable M_TX_FIFO_WATERMARK_EN after we've sent all data for a given transaction so we don't continue to receive a flurry of free space interrupts while waiting for the M_CMD_DONE notification. Re-enable the watermark when establishing the next transaction. Also clear the watermark interrupt after filling the FIFO so we do not receive notification again prior to actually having free space. Signed-off-by: Ryan Case Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 6e0856d317440a950b17c00a9283114f025e5699 Author: Pan Bian Date: Thu Nov 22 08:52:33 2018 +0800 HID: intel-ish-hid: fixes incorrect error handling The memory chunk allocated by hid_allocate_device() should be released by hid_destroy_device(), not kfree(). Fixes: 0b28cb4bcb1("HID: intel-ish-hid: ISH HID client driver") Signed-off-by: Pan Bian Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 71ab1c0336c71ace5725740f200beca9667a339f Author: Geert Uytterhoeven Date: Thu Dec 13 19:44:43 2018 +0100 serial: sh-sci: Resume PIO in sci_rx_interrupt() on DMA failure On (H)SCIF, sci_submit_rx() is called in the receive interrupt handler. Hence if DMA submission fails, the interrupt handler should resume handling reception using PIO, else no more data is received. Make sci_submit_rx() return an error indicator, so the receive interrupt handler can act appropriately. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman commit 2e948218b7c1262a3830823d6620eb227e3d4e3a Author: Geert Uytterhoeven Date: Thu Dec 13 19:44:42 2018 +0100 serial: sh-sci: Fix crash in rx_timer_fn() on PIO fallback When falling back to PIO, active_rx must be set to a different value than cookie_rx[i], else sci_dma_rx_find_active() will incorrectly find a match, leading to a NULL pointer dereference in rx_timer_fn() later. Use zero instead, which is the same value as after driver initialization. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman commit dd1f2250da95e87cb3e612858f94b14f99445a7c Author: Geert Uytterhoeven Date: Thu Dec 13 19:44:41 2018 +0100 serial: sh-sci: Fix locking in sci_submit_rx() Some callers of sci_submit_rx() hold the port spinlock, others don't. During fallback to PIO, the driver needs to obtain the port spinlock. If the lock was already held, spinlock recursion is detected, causing a deadlock: BUG: spinlock recursion on CPU#0. Fix this by adding a flag parameter to sci_submit_rx() for the caller to indicate the port spinlock is already held, so spinlock recursion can be avoided. Move the spin_lock_irqsave() up, so all DMA disable steps are protected, which is safe as the recently introduced dmaengine_terminate_async() can be called in atomic context. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 52042d8e82ff50d40e76a275ac0b97aa663328b0 Author: Andrea Gelmini Date: Wed Nov 28 12:05:13 2018 +0100 btrfs: Fix typos in comments and strings The typos accumulate over time so once in a while time they get fixed in a large patch. Signed-off-by: Andrea Gelmini Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1690dd41e0cb1dade80850ed8a3eb0121b96d22f Author: Johannes Thumshirn Date: Wed Dec 12 15:14:17 2018 +0100 btrfs: improve error handling of btrfs_add_link In the error handling block, err holds the return value of either btrfs_del_root_ref() or btrfs_del_inode_ref() but it hasn't been checked since it's introduction with commit fe66a05a0679 (Btrfs: improve error handling for btrfs_insert_dir_item callers) in 2012. If the error handling in the error handling fails, there's not much left to do and the abort either happened earlier in the callees or is necessary here. So if one of btrfs_del_root_ref() or btrfs_del_inode_ref() failed, abort the transaction, but still return the original code of the failure stored in 'ret' as this will be reported to the user. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 34a28e3d77535efc7761aa8d67275c07d1fe2c58 Author: Filipe Manana Date: Fri Dec 7 15:25:38 2018 +0000 Btrfs: use generic_remap_file_range_prep() for cloning and deduplication Since cloning and deduplication are no longer Btrfs specific operations, we now have generic code to handle parameter validation, compare file ranges used for deduplication, clear capabilities when cloning, etc. This change makes Btrfs use it, eliminating a lot of code in Btrfs and also fixing a few bugs, such as: 1) When cloning, the destination file's capabilities were not dropped (the fstest generic/513 tests this); 2) We were not checking if the destination file is immutable; 3) Not checking if either the source or destination files are swap files (swap file support is coming soon for Btrfs); 4) System limits were not checked (resource limits and O_LARGEFILE). Note that the generic helper generic_remap_file_range_prep() does start and waits for writeback by calling filemap_write_and_wait_range(), however that is not enough for Btrfs for two reasons: 1) With compression, we need to start writeback twice in order to get the pages marked for writeback and ordered extents created; 2) filemap_write_and_wait_range() (and all its other variants) only waits for the IO to complete, but we need to wait for the ordered extents to finish, so that when we do the actual reflinking operations the file extent items are in the fs tree. This is also important due to the fact that the generic helper, for the deduplication case, compares the contents of the pages in the requested range, which might require reading extents from disk in the very unlikely case that pages get invalidated after writeback finishes (so the file extent items must be up to date in the fs tree). Since these reasons are specific to Btrfs we have to do it in the Btrfs code before calling generic_remap_file_range_prep(). This also results in a simpler way of dealing with existing delalloc in the source/target ranges, specially for the deduplication case where we used to lock all the pages first and then if we found any dealloc for the range, or ordered extent, we would unlock the pages trigger writeback and wait for ordered extents to complete, then lock all the pages again and check if deduplication can be done. So now we get a simpler approach: lock the inodes, then trigger writeback and then wait for ordered extents to complete. So make btrfs use generic_remap_file_range_prep() (XFS and OCFS2 use it) to eliminate duplicated code, fix a few bugs and benefit from future bug fixes done there - for example the recent clone and dedupe bugs involving reflinking a partial EOF block got a counterpart fix in the generic helper, since it affected all filesystems supporting these operations, so we no longer need special checks in Btrfs for them. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 61ed3a144aa75e76a3b0f75c2f49c81435e74621 Author: Nikolay Borisov Date: Thu Nov 29 18:41:31 2018 +0200 btrfs: Refactor main loop in extent_readpages extent_readpages processes all pages in the readlist in batches of 16, this is implemented by a single for loop but thanks to an if condition the loop does 2 things based on whether we've filled the batch or not. Additionally due to the structure of the code there is an additional check which deals with partial batches. Streamline all of this by explicitly using two loops. The outter one is used to process all pages while the inner one just fills in the batch of 16 (currently). Due to this new structure the code guarantees that all pages are processed in the loop hence the code to deal with any leftovers is eliminated. This also enable the compiler to inline __extent_readpages: ./scripts/bloat-o-meter fs/btrfs/extent_io.o extent_io.for add/remove: 0/1 grow/shrink: 1/0 up/down: 660/-820 (-160) Function old new delta extent_readpages 476 1136 +660 __extent_readpages 820 - -820 Total: Before=44315, After=44155, chg -0.36% Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 15c8276302c42ebf704b44578f25bc35dfdbde24 Author: Nikolay Borisov Date: Wed Dec 5 10:48:50 2018 +0200 btrfs: Remove 1st shrink/grow phase from balance The first step of the rebalance process ensures there is 1MiB free on each device. This number seems rather small. And in fact when talking to the original authors their opinions were: "man that's a little bonkers" "i don't think we even need that code anymore" "I think it was there to make sure we had room for the blank 1M at the beginning. I bet it goes all the way back to v0" "we just don't need any of that tho, i say we just delete it" Clearly, this piece of code has lost its original intent throughout the years. It doesn't really bring any real practical benefits to the relocation process. Additionally, this patch makes the balance process more lightweight by removing a pair of shrink/grow operations which are rather expensive for heavily populated filesystems. This is mainly due to shrink requiring relocating block groups, involving heavy use of the btree. The intermediate shrink/grow can fail and leave the filesystem in a middle state that would need to be changed back by the user. Suggested-by: Josef Bacik Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov [ update changelog ] Signed-off-by: David Sterba commit be6821f82c3cc36e026f5afd10249988852b35ea Author: Filipe Manana Date: Tue Dec 11 10:19:45 2018 +0000 Btrfs: send, fix race with transaction commits that create snapshots If we create a snapshot of a snapshot currently being used by a send operation, we can end up with send failing unexpectedly (returning -ENOENT error to user space for example). The following diagram shows how this happens. CPU 1 CPU2 CPU3 btrfs_ioctl_send() (...) create_snapshot() -> creates snapshot of a root used by the send task btrfs_commit_transaction() create_pending_snapshot() __get_inode_info() btrfs_search_slot() btrfs_search_slot_get_root() down_read commit_root_sem get reference on eb of the commit root -> eb with bytenr == X up_read commit_root_sem btrfs_cow_block(root node) btrfs_free_tree_block() -> creates delayed ref to free the extent btrfs_run_delayed_refs() -> runs the delayed ref, adds extent to fs_info->pinned_extents btrfs_finish_extent_commit() unpin_extent_range() -> marks extent as free in the free space cache transaction commit finishes btrfs_start_transaction() (...) btrfs_cow_block() btrfs_alloc_tree_block() btrfs_reserve_extent() -> allocates extent at bytenr == X btrfs_init_new_buffer(bytenr X) btrfs_find_create_tree_block() alloc_extent_buffer(bytenr X) find_extent_buffer(bytenr X) -> returns existing eb, which the send task got (...) -> modifies content of the eb with bytenr == X -> uses an eb that now belongs to some other tree and no more matches the commit root of the snapshot, resuts will be unpredictable The consequences of this race can be various, and can lead to searches in the commit root performed by the send task failing unexpectedly (unable to find inode items, returning -ENOENT to user space, for example) or not failing because an inode item with the same number was added to the tree that reused the metadata extent, in which case send can behave incorrectly in the worst case or just fail later for some reason. Fix this by performing a copy of the commit root's extent buffer when doing a search in the context of a send operation. CC: stable@vger.kernel.org # 4.4.x: 1fc28d8e2e9: Btrfs: move get root out of btrfs_search_slot to a helper CC: stable@vger.kernel.org # 4.4.x: f9ddfd0592a: Btrfs: remove unused check of skip_locking CC: stable@vger.kernel.org # 4.4.x Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 827aa18e7b903c5ff3b3cd8fec328a99b1dbd411 Author: Filipe Manana Date: Mon Dec 10 17:53:35 2018 +0000 Btrfs: use nofs context when initializing security xattrs to avoid deadlock When initializing the security xattrs, we are holding a transaction handle therefore we need to use a GFP_NOFS context in order to avoid a deadlock with reclaim in case it's triggered. Fixes: 39a27ec1004e8 ("btrfs: use GFP_KERNEL for xattr and acl allocations") Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0568e82dbe2510fc1fa664f58e5c997d3f1e649e Author: Josef Bacik Date: Fri Nov 30 11:52:14 2018 -0500 btrfs: run delayed items before dropping the snapshot With my delayed refs patches in place we started seeing a large amount of aborts in __btrfs_free_extent: BTRFS error (device sdb1): unable to find ref byte nr 91947008 parent 0 root 35964 owner 1 offset 0 Call Trace: ? btrfs_merge_delayed_refs+0xaf/0x340 __btrfs_run_delayed_refs+0x6ea/0xfc0 ? btrfs_set_path_blocking+0x31/0x60 btrfs_run_delayed_refs+0xeb/0x180 btrfs_commit_transaction+0x179/0x7f0 ? btrfs_check_space_for_delayed_refs+0x30/0x50 ? should_end_transaction.isra.19+0xe/0x40 btrfs_drop_snapshot+0x41c/0x7c0 btrfs_clean_one_deleted_snapshot+0xb5/0xd0 cleaner_kthread+0xf6/0x120 kthread+0xf8/0x130 ? btree_invalidatepage+0x90/0x90 ? kthread_bind+0x10/0x10 ret_from_fork+0x35/0x40 This was because btrfs_drop_snapshot depends on the root not being modified while it's dropping the snapshot. It will unlock the root node (and really every node) as it walks down the tree, only to re-lock it when it needs to do something. This is a problem because if we modify the tree we could cow a block in our path, which frees our reference to that block. Then once we get back to that shared block we'll free our reference to it again, and get ENOENT when trying to lookup our extent reference to that block in __btrfs_free_extent. This is ultimately happening because we have delayed items left to be processed for our deleted snapshot _after_ all of the inodes are closed for the snapshot. We only run the delayed inode item if we're deleting the inode, and even then we do not run the delayed insertions or delayed removals. These can be run at any point after our final inode does its last iput, which is what triggers the snapshot deletion. We can end up with the snapshot deletion happening and then have the delayed items run on that file system, resulting in the above problem. This problem has existed forever, however my patches made it much easier to hit as I wake up the cleaner much more often to deal with delayed iputs, which made us more likely to start the snapshot dropping work before the transaction commits, which is when the delayed items would generally be run. Before, generally speaking, we would run the delayed items, commit the transaction, and wakeup the cleaner thread to start deleting snapshots, which means we were less likely to hit this problem. You could still hit it if you had multiple snapshots to be deleted and ended up with lots of delayed items, but it was definitely harder. Fix for now by simply running all the delayed items before starting to drop the snapshot. We could make this smarter in the future by making the delayed items per-root, and then simply drop any delayed items for roots that we are going to delete. But for now just a quick and easy solution is the safest. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 83354f0772cd07828b0fcdf1ef2872fd2032acb8 Author: Josef Bacik Date: Fri Nov 30 11:52:13 2018 -0500 btrfs: catch cow on deleting snapshots When debugging some weird extent reference bug I suspected that we were changing a snapshot while we were deleting it, which could explain my bug. This was indeed what was happening, and this patch helped me verify my theory. It is never correct to modify the snapshot once it's being deleted, so mark the root when we are deleting it and make sure we complain about it when it happens. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 01e0da48856fe964e2a981e5541cee234b8a43a3 Author: Qu Wenruo Date: Mon Dec 10 15:01:03 2018 +0800 btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down @blocksize variable in do_walk_down() is only used once, really no need to declare it. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 7c3c7cb99c771c4ce6a01a95e969dbc576fd7533 Author: Filipe Manana Date: Fri Dec 7 13:23:32 2018 +0000 Btrfs: scrub, move setup of nofs contexts higher in the stack Since scrub workers only do memory allocation with GFP_KERNEL when they need to perform repair, we can move the recent setup of the nofs context up to scrub_handle_errored_block() instead of setting it up down the call chain at insert_full_stripe_lock() and scrub_add_page_to_wr_bio(), removing some duplicate code and comment. So the only paths for which a scrub worker can do memory allocations using GFP_KERNEL are the following: scrub_bio_end_io_worker() scrub_block_complete() scrub_handle_errored_block() lock_full_stripe() insert_full_stripe_lock() -> kmalloc with GFP_KERNEL scrub_bio_end_io_worker() scrub_block_complete() scrub_handle_errored_block() scrub_write_page_to_dev_replace() scrub_add_page_to_wr_bio() -> kzalloc with GFP_KERNEL Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e94c4f45d14cf89d1f40c91b0a8517e791672a7 Author: David Sterba Date: Tue Dec 4 16:11:56 2018 +0100 btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex The scrub context is allocated with GFP_KERNEL and called from btrfs_scrub_dev under the fs_info::device_list_mutex. This is not safe regarding reclaim that could try to flush filesystem data in order to get the memory. And the device_list_mutex is held during superblock commit, so this would cause a lockup. Move the alocation and initialization before any changes that require the mutex. Signed-off-by: David Sterba commit 92f7ba434f51e8e9317f1d166105889aa230abd2 Author: David Sterba Date: Tue Dec 4 16:11:55 2018 +0100 btrfs: scrub: pass fs_info to scrub_setup_ctx We can pass fs_info directly as this is the only member of btrfs_device that's bing used inside scrub_setup_ctx. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 28bad2125767c51a2974c234470981b39d3623ab Author: Josef Bacik Date: Mon Dec 3 10:20:38 2018 -0500 btrfs: fix truncate throttling We have a bunch of magic to make sure we're throttling delayed refs when truncating a file. Now that we have a delayed refs rsv and a mechanism for refilling that reserve simply use that instead of all of this magic. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit db2462a6ad3dc490ac33250042e728226ef3ba00 Author: Josef Bacik Date: Mon Dec 3 10:20:37 2018 -0500 btrfs: don't run delayed refs in the end transaction logic Over the years we have built up a lot of infrastructure to keep delayed refs in check, mostly by running them at btrfs_end_transaction() time. We have a lot of different maths we do to figure out how much, if we should do it inline or async, etc. This existed because we had no feedback mechanism to force the flushing of delayed refs when they became a problem. However with the enospc flushing infrastructure in place for flushing delayed refs when they put too much pressure on the enospc system we have this problem solved. Rip out all of this code as it is no longer needed. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 64403612b73a94bc7b02cf8ca126e3b8ced6e921 Author: Josef Bacik Date: Mon Dec 3 10:20:36 2018 -0500 btrfs: rework btrfs_check_space_for_delayed_refs Now with the delayed_refs_rsv we can now know exactly how much pending delayed refs space we need. This means we can drastically simplify btrfs_check_space_for_delayed_refs by simply checking how much space we have reserved for the global rsv (which acts as a spill over buffer) and the delayed refs rsv. If our total size is beyond that amount then we know it's time to commit the transaction and stop any more delayed refs from being generated. With the introduction of dealyed_refs_rsv infrastructure, namely btrfs_update_delayed_refs_rsv we now know exactly how much pending delayed refs space is required. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 413df7252d5256df406a23d7efb679f46d19a23d Author: Josef Bacik Date: Mon Dec 3 10:20:35 2018 -0500 btrfs: add new flushing states for the delayed refs rsv A nice thing we gain with the delayed refs rsv is the ability to flush the delayed refs on demand to deal with enospc pressure. Add states to flush delayed refs on demand, and this will allow us to remove a lot of ad-hoc work around checking to see if we should commit the transaction to run our delayed refs. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 4c8edbc75cb9ff846066cd9781ede4f27caf3cf4 Author: Josef Bacik Date: Mon Dec 3 10:20:34 2018 -0500 btrfs: update may_commit_transaction to use the delayed refs rsv Any space used in the delayed_refs_rsv will be freed up by a transaction commit, so instead of just counting the pinned space we also need to account for any space in the delayed_refs_rsv when deciding if it will make a different to commit the transaction to satisfy our space reservation. If we have enough bytes to satisfy our reservation ticket then we are good to go, otherwise subtract out what space we would gain back by committing the transaction and compare that against the pinned space to make our decision. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit ba2c4d4e3bda7d6de2bc616ae6715e0a0725b294 Author: Josef Bacik Date: Mon Dec 3 10:20:33 2018 -0500 btrfs: introduce delayed_refs_rsv Traditionally we've had voodoo in btrfs to account for the space that delayed refs may take up by having a global_block_rsv. This works most of the time, except when it doesn't. We've had issues reported and seen in production where sometimes the global reserve is exhausted during transaction commit before we can run all of our delayed refs, resulting in an aborted transaction. Because of this voodoo we have equally dubious flushing semantics around throttling delayed refs which we often get wrong. So instead give them their own block_rsv. This way we can always know exactly how much outstanding space we need for delayed refs. This allows us to make sure we are constantly filling that reservation up with space, and allows us to put more precise pressure on the enospc system. Instead of doing math to see if its a good time to throttle, the normal enospc code will be invoked if we have a lot of delayed refs pending, and they will be run via the normal flushing mechanism. For now the delayed_refs_rsv will hold the reservations for the delayed refs, the block group updates, and deleting csums. We could have a separate rsv for the block group updates, but the csum deletion stuff is still handled via the delayed_refs so that will stay there. Historical background: The global reserve has grown to cover everything we don't reserve space explicitly for, and we've grown a lot of weird ad-hoc heuristics to know if we're running short on space and when it's time to force a commit. A failure rate of 20-40 file systems when we run hundreds of thousands of them isn't super high, but cleaning up this code will make things less ugly and more predictible. Thus the delayed refs rsv. We always know how many delayed refs we have outstanding, and although running them generates more we can use the global reserve for that spill over, which fits better into it's desired use than a full blown reservation. This first approach is to simply take how many times we're reserving space for and multiply that by 2 in order to save enough space for the delayed refs that could be generated. This is a niave approach and will probably evolve, but for now it works. Signed-off-by: Josef Bacik Reviewed-by: David Sterba # high-level review [ added background notes from the cover letter ] Signed-off-by: David Sterba commit 158ffa364bf723fa1ef128060646d23dc3942994 Author: Josef Bacik Date: Mon Dec 3 10:20:32 2018 -0500 btrfs: only track ref_heads in delayed_ref_updates We use this number to figure out how many delayed refs to run, but __btrfs_run_delayed_refs really only checks every time we need a new delayed ref head, so we always run at least one ref head completely no matter what the number of items on it. Fix the accounting to only be adjusted when we add/remove a ref head. In addition to using this number to limit the number of delayed refs run, a future patch is also going to use it to calculate the amount of space required for delayed refs space reservation. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit bedc661760a9837d592070669b296ab58e8f40c9 Author: Josef Bacik Date: Mon Dec 3 10:20:31 2018 -0500 btrfs: cleanup extent_op handling The cleanup_extent_op function actually would run the extent_op if it needed running, which made the name sort of a misnomer. Change it to run_and_cleanup_extent_op, and move the actual cleanup work to cleanup_extent_op so it can be used by check_ref_cleanup() in order to unify the extent op handling. Reviewed-by: Lu Fengqi Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 07c47775f410168c259494ecb8f62cee0a84ec81 Author: Josef Bacik Date: Mon Dec 3 10:20:30 2018 -0500 btrfs: add cleanup_ref_head_accounting helper We were missing some quota cleanups in check_ref_cleanup, so break the ref head accounting cleanup into a helper and call that from both check_ref_cleanup and cleanup_ref_head. This will hopefully ensure that we don't screw up accounting in the future for other things that we add. Reviewed-by: Omar Sandoval Reviewed-by: Liu Bo Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit d7baffdaf9f9df8c9715aa507e3be2f409347c74 Author: Josef Bacik Date: Mon Dec 3 10:20:29 2018 -0500 btrfs: add btrfs_delete_ref_head helper We do this dance in cleanup_ref_head and check_ref_cleanup, unify it into a helper and cleanup the calling functions. Reviewed-by: Omar Sandoval Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fdb1e121803433775d1e6f79b21a13add8b22f57 Author: Johannes Thumshirn Date: Wed Dec 5 15:23:04 2018 +0100 btrfs: use PAGE_ALIGNED instead of open-coding it When using a 'var & (PAGE_SIZE - 1)' construct one is checking for a page alignment and thus should use the PAGE_ALIGNED() macro instead of open-coding it. Convert all open-coded occurrences of PAGE_ALIGNED(). Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7073017aeb98db311ca407f0f552f2bfc1af3015 Author: Johannes Thumshirn Date: Wed Dec 5 15:23:03 2018 +0100 btrfs: use offset_in_page instead of open-coding it Constructs like 'var & (PAGE_SIZE - 1)' or 'var & ~PAGE_MASK' can denote an offset into a page. So replace them by the offset_in_page() macro instead of open-coding it if they're not used as an alignment check. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit cb5583dd52fab469a001a007385066fcd60629c5 Author: David Sterba Date: Fri Sep 7 16:11:23 2018 +0200 btrfs: dev-replace: open code trivial locking helpers The dev-replace locking functions are now trivial wrappers around rw semaphore that can be used directly everywhere. No functional change. Signed-off-by: David Sterba commit 53176dde0acd8fa49c6c2e6097283acc6241480f Author: David Sterba Date: Thu Apr 5 01:41:06 2018 +0200 btrfs: dev-replace: remove custom read/write blocking scheme After the rw semaphore has been added, the custom blocking using ::blocking_readers and ::read_lock_wq is redundant. The blocking logic in __btrfs_map_block is replaced by extending the time the semaphore is held, that has the same blocking effect on writes as the previous custom scheme that waited until ::blocking_readers was zero. Signed-off-by: David Sterba commit 129827e3001fd1e6892a0629b48f9c7c91cbb8b6 Author: David Sterba Date: Thu Apr 5 01:29:24 2018 +0200 btrfs: dev-replace: swich locking to rw semaphore This is the first part of removing the custom locking and waiting scheme used for device replace. It was probably copied from extent buffer locking, but there's nothing that would require more than is provided by the common locking primitives. The rw spinlock protects waiting tasks counter in case of incompatible locks and the waitqueue. Same as rw semaphore. This patch only switches the locking primitive, for better bisectability. There should be no functional change other than the overhead of the locking and potential sleeping instead of spinning when the lock is contended. Signed-off-by: David Sterba commit ceb21a8db48559fd0809e03c4df9eb37743d9170 Author: David Sterba Date: Fri Aug 24 19:35:04 2018 +0200 btrfs: reada: reorder dev-replace locks before radix tree preload The device-replace read lock is going to use rw semaphore in followup commits. The semaphore might sleep which is not possible in the radix tree preload section. The lock nesting is now: * device replace * radix tree preload * readahead spinlock Signed-off-by: David Sterba commit d1051d6ebf8ef3517a5a3cf82bba8436d190f1c2 Author: Nikolay Borisov Date: Wed Nov 21 17:10:52 2018 +0200 btrfs: Fix error handling in btrfs_cleanup_ordered_extents Running btrfs/124 in a loop hung up on me sporadically with the following call trace: btrfs D 0 5760 5324 0x00000000 Call Trace: ? __schedule+0x243/0x800 schedule+0x33/0x90 btrfs_start_ordered_extent+0x10c/0x1b0 [btrfs] ? wait_woken+0xa0/0xa0 btrfs_wait_ordered_range+0xbb/0x100 [btrfs] btrfs_relocate_block_group+0x1ff/0x230 [btrfs] btrfs_relocate_chunk+0x49/0x100 [btrfs] btrfs_balance+0xbeb/0x1740 [btrfs] btrfs_ioctl_balance+0x2ee/0x380 [btrfs] btrfs_ioctl+0x1691/0x3110 [btrfs] ? lockdep_hardirqs_on+0xed/0x180 ? __handle_mm_fault+0x8e7/0xfb0 ? _raw_spin_unlock+0x24/0x30 ? __handle_mm_fault+0x8e7/0xfb0 ? do_vfs_ioctl+0xa5/0x6e0 ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] do_vfs_ioctl+0xa5/0x6e0 ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe ksys_ioctl+0x3a/0x70 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x49/0xbe This happens because during page writeback it's valid for writepage_delalloc to instantiate a delalloc range which doesn't belong to the page currently being written back. The reason this case is valid is due to find_lock_delalloc_range returning any available range after the passed delalloc_start and ignoring whether the page under writeback is within that range. In turn ordered extents (OE) are always created for the returned range from find_lock_delalloc_range. If, however, a failure occurs while OE are being created then the clean up code in btrfs_cleanup_ordered_extents will be called. Unfortunately the code in btrfs_cleanup_ordered_extents doesn't consider the case of such 'foreign' range being processed and instead it always assumes that the range OE are created for belongs to the page. This leads to the first page of such foregin range to not be cleaned up since it's deliberately missed and skipped by the current cleaning up code. Fix this by correctly checking whether the current page belongs to the range being instantiated and if so adjsut the range parameters passed for cleaning up. If it doesn't, then just clean the whole OE range directly. Fixes: 524272607e88 ("btrfs: Handle delalloc error correctly to avoid ordered extent hang") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 3522e90301d7a669288611cb7e73cab4ac135545 Author: Lu Fengqi Date: Thu Nov 29 11:33:38 2018 +0800 btrfs: remove always true if branch in find_delalloc_range The @found is always false when it comes to the if branch. Besides, the bool type is more suitable for @found. Change the return value of the function and its caller to bool as well. Reviewed-by: Nikolay Borisov Signed-off-by: Lu Fengqi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 27a7ff554e8d349627a90bda275c527b7348adae Author: Lu Fengqi Date: Thu Nov 29 17:31:32 2018 +0800 btrfs: skip file_extent generation check for free_space_inode in run_delalloc_nocow The test case btrfs/001 with inode_cache mount option will encounter the following warning: WARNING: CPU: 1 PID: 23700 at fs/btrfs/inode.c:956 cow_file_range.isra.19+0x32b/0x430 [btrfs] CPU: 1 PID: 23700 Comm: btrfs Kdump: loaded Tainted: G W O 4.20.0-rc4-custom+ #30 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:cow_file_range.isra.19+0x32b/0x430 [btrfs] Call Trace: ? free_extent_buffer+0x46/0x90 [btrfs] run_delalloc_nocow+0x455/0x900 [btrfs] btrfs_run_delalloc_range+0x1a7/0x360 [btrfs] writepage_delalloc+0xf9/0x150 [btrfs] __extent_writepage+0x125/0x3e0 [btrfs] extent_write_cache_pages+0x1b6/0x3e0 [btrfs] ? __wake_up_common_lock+0x63/0xc0 extent_writepages+0x50/0x80 [btrfs] do_writepages+0x41/0xd0 ? __filemap_fdatawrite_range+0x9e/0xf0 __filemap_fdatawrite_range+0xbe/0xf0 btrfs_fdatawrite_range+0x1b/0x50 [btrfs] __btrfs_write_out_cache+0x42c/0x480 [btrfs] btrfs_write_out_ino_cache+0x84/0xd0 [btrfs] btrfs_save_ino_cache+0x551/0x660 [btrfs] commit_fs_roots+0xc5/0x190 [btrfs] btrfs_commit_transaction+0x2bf/0x8d0 [btrfs] btrfs_mksubvol+0x48d/0x4d0 [btrfs] btrfs_ioctl_snap_create_transid+0x170/0x180 [btrfs] btrfs_ioctl_snap_create_v2+0x124/0x180 [btrfs] btrfs_ioctl+0x123f/0x3030 [btrfs] The file extent generation of the free space inode is equal to the last snapshot of the file root, so the inode will be passed to cow_file_rage. But the inode was created and its extents were preallocated in btrfs_save_ino_cache, there are no cow copies on disk. The preallocated extent is not yet in the extent tree, and btrfs_cross_ref_exist will ignore the -ENOENT returned by check_committed_ref, so we can directly write the inode to the disk. Fixes: 78d4295b1eee ("btrfs: lift some btrfs_cross_ref_exist checks in nocow path") CC: stable@vger.kernel.org # 4.18+ Reviewed-by: Filipe Manana Signed-off-by: Lu Fengqi Signed-off-by: David Sterba commit 41bd60676923822de1df2c50b3f9a10171f4338a Author: Filipe Manana Date: Wed Nov 28 14:54:28 2018 +0000 Btrfs: fix fsync of files with multiple hard links in new directories The log tree has a long standing problem that when a file is fsync'ed we only check for new ancestors, created in the current transaction, by following only the hard link for which the fsync was issued. We follow the ancestors using the VFS' dget_parent() API. This means that if we create a new link for a file in a directory that is new (or in an any other new ancestor directory) and then fsync the file using an old hard link, we end up not logging the new ancestor, and on log replay that new hard link and ancestor do not exist. In some cases, involving renames, the file will not exist at all. Example: mkfs.btrfs -f /dev/sdb mount /dev/sdb /mnt mkdir /mnt/A touch /mnt/foo ln /mnt/foo /mnt/A/bar xfs_io -c fsync /mnt/foo In this example after log replay only the hard link named 'foo' exists and directory A does not exist, which is unexpected. In other major linux filesystems, such as ext4, xfs and f2fs for example, both hard links exist and so does directory A after mounting again the filesystem. Checking if any new ancestors are new and need to be logged was added in 2009 by commit 12fcfd22fe5b ("Btrfs: tree logging unlink/rename fixes"), however only for the ancestors of the hard link (dentry) for which the fsync was issued, instead of checking for all ancestors for all of the inode's hard links. So fix this by tracking the id of the last transaction where a hard link was created for an inode and then on fsync fallback to a full transaction commit when an inode has more than one hard link and at least one new hard link was created in the current transaction. This is the simplest solution since this is not a common use case (adding frequently hard links for which there's an ancestor created in the current transaction and then fsync the file). In case it ever becomes a common use case, a solution that consists of iterating the fs/subvol btree for each hard link and check if any ancestor is new, could be implemented. This solves many unexpected scenarios reported by Jayashree Mohan and Vijay Chidambaram, and for which there is a new test case for fstests under review. Fixes: 12fcfd22fe5b ("Btrfs: tree logging unlink/rename fixes") CC: stable@vger.kernel.org # 4.4+ Reported-by: Vijay Chidambaram Reported-by: Jayashree Mohan Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit bbe339cc323ca9d2a57ac203d2d9d11a09655dcc Author: David Sterba Date: Tue Nov 27 15:25:13 2018 +0100 btrfs: drop extra enum initialization where using defaults The first auto-assigned value to enum is 0, we can use that and not initialize all members where the auto-increment does the same. This is used for values that are not part of on-disk format. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 5b840301ac4b8a8e8d42d0c7edc31dc3e257145d Author: David Sterba Date: Tue Nov 27 15:17:47 2018 +0100 btrfs: switch BTRFS_ORDERED_* to enums We can use simple enum for values that are not part of on-disk format: ordered extent flags. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 50b5b6020fc3e2c4c67ff28bf3986a1e70bffc7d Author: David Sterba Date: Tue Nov 27 15:11:43 2018 +0100 btrfs: switch EXTENT_FLAG_* to enums We can use simple enum for values that are not part of on-disk format: extent map flags. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 80cb38362d330e1e4156a4904c17ce994589bd7d Author: David Sterba Date: Tue Nov 27 15:03:20 2018 +0100 btrfs: switch EXTENT_BUFFER_* to enums We can use simple enum for values that are not part of on-disk format: extent buffer flags; Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 61fa90c16b0b5efd1d5a6d1c74124c46e9138350 Author: David Sterba Date: Tue Nov 27 14:57:19 2018 +0100 btrfs: switch BTRFS_ROOT_* to enums We can use simple enum for values that are not part of on-disk format: root tree flags. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit eb1a524c95206e41c54e8cee25a66f9488a151ef Author: David Sterba Date: Tue Nov 27 14:55:46 2018 +0100 btrfs: switch BTRFS_FS_* to enums We can use simple enum for values that are not part of on-disk format: internal filesystem states. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 688a75b9a30a72cd944aa5e6a428a80472f44877 Author: David Sterba Date: Tue Nov 27 14:53:06 2018 +0100 btrfs: switch BTRFS_BLOCK_RSV_* to enums We can use simple enum for values that are not part of on-disk format: block reserve types. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit b00146b5d53c0306326eb46245901d20b69efd16 Author: David Sterba Date: Tue Nov 27 14:50:27 2018 +0100 btrfs: switch BTRFS_FS_STATE_* to enums We can use simple enum for values that are not part of on-disk format: global filesystem states. Reviewed-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit da12fe5414f922d896289f037515096f189c66da Author: Nikolay Borisov Date: Tue Nov 27 20:57:58 2018 +0200 btrfs: Refactor btrfs_merge_bio_hook This function really checks whether adding more data to the bio will straddle a stripe/chunk. So first let's give it a more appropraite name - btrfs_bio_fits_in_stripe. Secondly, the offset parameter was never used to just remove it. Thirdly, pages are submitted to either btree or data inodes so it's guaranteed that tree->ops is set so replace the check with an ASSERT. Finally, document the parameters of the function. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2ab4fd3135ee21514a50c4f139c4f80c0b43a8ec Author: Lu Fengqi Date: Wed Nov 28 11:22:54 2018 +0800 btrfs: cleanup the useless DEFINE_WAIT in cleanup_transaction When it was introduced in commit f094ac32aba3 ("Btrfs: fix NULL pointer after aborting a transaction"), it was not used. Signed-off-by: Lu Fengqi Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit d2e174d5d3eedb3b9dd97167307bf1f01bd2fa5c Author: Johannes Thumshirn Date: Wed Nov 28 09:54:56 2018 +0100 btrfs: document extent mapping assumptions in checksum Document why map_private_extent_buffer() cannot return '1' (i.e. the map spans two pages) for the csum_tree_block() case. The current algorithm for detecting a page boundary crossing in map_private_extent_buffer() will return a '1' *IFF* the extent buffer's offset in the page + the offset passed in by csum_tree_block() and the minimal length passed in by csum_tree_block() - 1 are bigger than PAGE_SIZE. We always pass BTRFS_CSUM_SIZE (32) as offset and a minimal length of 32 and the current extent buffer allocator always guarantees page aligned extends, so the above condition can't be true. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit cc2c39d605d23e7f1fbc376bf011fd06e46ee79f Author: Johannes Thumshirn Date: Wed Nov 28 09:54:54 2018 +0100 btrfs: don't initialize 'offset' in map_private_extent_buffer() In map_private_extent_buffer() the 'offset' variable is initialized to a page aligned version of the 'start' parameter. But later on it is overwritten with either the offset from the extent buffer's start or 0. So get rid of the initial initialization. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit a5fb11429167ee6ddeeacc554efaf5776b36433a Author: Filipe Manana Date: Mon Nov 26 20:07:17 2018 +0000 Btrfs: fix deadlock with memory reclaim during scrub When a transaction commit starts, it attempts to pause scrub and it blocks until the scrub is paused. So while the transaction is blocked waiting for scrub to pause, we can not do memory allocation with GFP_KERNEL from scrub, otherwise we risk getting into a deadlock with reclaim. Checking for scrub pause requests is done early at the beginning of the while loop of scrub_stripe() and later in the loop, scrub_extent() and scrub_raid56_parity() are called, which in turn call scrub_pages() and scrub_pages_for_parity() respectively. These last two functions do memory allocations using GFP_KERNEL. Same problem could happen while scrubbing the super blocks, since it calls scrub_pages(). We also can not have any of the worker tasks, created by the scrub task, doing GFP_KERNEL allocations, because before pausing, the scrub task waits for all the worker tasks to complete (also done at scrub_stripe()). So make sure GFP_NOFS is used for the memory allocations because at any time a scrub pause request can happen from another task that started to commit a transaction. Fixes: 58c4e173847a ("btrfs: scrub: use GFP_KERNEL on the submission path") CC: stable@vger.kernel.org # 4.6+ Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 78e62c02abb94e49ea739226a70325a6bf7a6603 Author: Nikolay Borisov Date: Thu Nov 22 10:17:49 2018 +0200 btrfs: Remove extent_io_ops::readpage_io_failed_hook For data inodes this hook does nothing but to return -EAGAIN which is used to signal to the endio routines that this bio belongs to a data inode. If this is the case the actual retrying is handled by bio_readpage_error. Alternatively, if this bio belongs to the btree inode then btree_io_failed_hook just does some cleanup and doesn't retry anything. This patch simplifies the code flow by eliminating readpage_io_failed_hook and instead open-coding btree_io_failed_hook in end_bio_extent_readpage. Also eliminate some needless checks since IO is always performed on either data inode or btree inode, both of which are guaranteed to have their extent_io_tree::ops set. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7b41ba71c1a08ae35805b562ae5e2f8ddfb8e00d Author: Johannes Thumshirn Date: Fri Nov 23 09:42:27 2018 +0100 btrfs: remove btrfs_bio_end_io_t The btrfs_bio_end_io_t typedef was introduced with commit a1d3c4786a4b ("btrfs: btrfs_multi_bio replaced with btrfs_bio") but never used anywhere. This commit also introduced a forward declaration of 'struct btrfs_bio' which is only needed for btrfs_bio_end_io_t. Remove both as they're not needed anywhere. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit b3a0dd50c3951ec1b9a12ec39034194022fd8693 Author: David Sterba Date: Thu Nov 22 17:16:49 2018 +0100 btrfs: replace btrfs_io_bio::end_io with a simple helper The end_io callback implemented as btrfs_io_bio_endio_readpage only calls kfree. Also the callback is set only in case the csum buffer is allocated and not pointing to the inline buffer. We can use that information to drop the indirection and call a helper that will free the csums only in the right case. This shrinks struct btrfs_io_bio by 8 bytes. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 31fecccbd7b2174487a6b7361153b60a4eda6108 Author: David Sterba Date: Thu Nov 22 17:16:46 2018 +0100 btrfs: remove redundant csum buffer in btrfs_io_bio The io_bio tracks checksums and has an inline buffer or an allocated one. And there's a third member that points to the right one, but we don't need to use an extra pointer for that. Let btrfs_io_bio::csum point to the right buffer and check that the inline buffer is not accidentally freed. This shrinks struct btrfs_io_bio by 8 bytes. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 600b6cf468b038798313da42d2438c10bcb10261 Author: David Sterba Date: Thu Nov 22 17:16:44 2018 +0100 btrfs: replace async_cow::root with fs_info The async_cow::root is used to propagate fs_info to async_cow_submit. We can't use inode to reach it because it could become NULL after write without compression in async_cow_start. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 06ea01b1eeb10450ee8448f8895dd641c8d37047 Author: David Sterba Date: Tue Jul 17 22:08:41 2018 +0200 btrfs: merge btrfs_submit_bio_done to its caller There's one caller and its code is simple, we can open code it in run_one_async_done. The errors are passed through bio. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 7333bd02dcb7cefa91eb94efb8e7578ec764145c Author: Anand Jain Date: Tue Nov 20 16:12:57 2018 +0800 btrfs: balance: print to system log when balance ends or is paused Print a kernel log message when the balance ends, either for cancel or completed or if it is paused. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 56fc37d936909cdfb6d8c8674fd64e66a9ec8f7d Author: Anand Jain Date: Tue Nov 20 16:12:56 2018 +0800 btrfs: balance: print args during start and resume The information about balance arguments is important for system audit, this patch prints the textual representation when balance starts or is resumed. Example command: $ btrfs balance start -f -mprofiles=raid1,convert=single,soft -dlimit=10..20,usage=50 /btrfs Example kernel log output: BTRFS info (device sdb): balance: start -f -dusage=50,limit=10..20 -mconvert=single,soft,profiles=raid1 -sconvert=single,soft,profiles=raid1 Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog, simplify code ] Signed-off-by: David Sterba commit f89e09cf45533eb25ca8e7fbedec697ecb37eb94 Author: Anand Jain Date: Tue Nov 20 16:12:55 2018 +0800 btrfs: add helper to describe block group flags Factor out helper that describes block group flags from describe_relocation. The result will not be longer than the given size. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ add comments ] Signed-off-by: David Sterba commit 9a6f209e36500efac51528132a3e3083586eda5f Author: Filipe Manana Date: Mon Nov 19 14:15:36 2018 +0000 Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation If the quota enable and snapshot creation ioctls are called concurrently we can get into a deadlock where the task enabling quotas will deadlock on the fs_info->qgroup_ioctl_lock mutex because it attempts to lock it twice, or the task creating a snapshot tries to commit the transaction while the task enabling quota waits for the former task to commit the transaction while holding the mutex. The following time diagrams show how both cases happen. First scenario: CPU 0 CPU 1 btrfs_ioctl() btrfs_ioctl_quota_ctl() btrfs_quota_enable() mutex_lock(fs_info->qgroup_ioctl_lock) btrfs_start_transaction() btrfs_ioctl() btrfs_ioctl_snap_create_v2 create_snapshot() --> adds snapshot to the list pending_snapshots of the current transaction btrfs_commit_transaction() create_pending_snapshots() create_pending_snapshot() qgroup_account_snapshot() btrfs_qgroup_inherit() mutex_lock(fs_info->qgroup_ioctl_lock) --> deadlock, mutex already locked by this task at btrfs_quota_enable() Second scenario: CPU 0 CPU 1 btrfs_ioctl() btrfs_ioctl_quota_ctl() btrfs_quota_enable() mutex_lock(fs_info->qgroup_ioctl_lock) btrfs_start_transaction() btrfs_ioctl() btrfs_ioctl_snap_create_v2 create_snapshot() --> adds snapshot to the list pending_snapshots of the current transaction btrfs_commit_transaction() --> waits for task at CPU 0 to release its transaction handle btrfs_commit_transaction() --> sees another task started the transaction commit first --> releases its transaction handle --> waits for the transaction commit to be completed by the task at CPU 1 create_pending_snapshot() qgroup_account_snapshot() btrfs_qgroup_inherit() mutex_lock(fs_info->qgroup_ioctl_lock) --> deadlock, task at CPU 0 has the mutex locked but it is waiting for us to finish the transaction commit So fix this by setting the quota enabled flag in fs_info after committing the transaction at btrfs_quota_enable(). This ends up serializing quota enable and snapshot creation as if the snapshot creation happened just before the quota enable request. The quota rescan task, scheduled after committing the transaction in btrfs_quote_enable(), will do the accounting. Fixes: 6426c7ad697d ("btrfs: qgroup: Fix qgroup accounting when creating snapshot") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5a8067c0d17feb7579db0476191417b441a8996e Author: Filipe Manana Date: Mon Nov 19 09:48:12 2018 +0000 Btrfs: fix access to available allocation bits when starting balance The available allocation bits members from struct btrfs_fs_info are protected by a sequence lock, and when starting balance we access them incorrectly in two different ways: 1) In the read sequence lock loop at btrfs_balance() we use the values we read from fs_info->avail_*_alloc_bits and we can immediately do actions that have side effects and can not be undone (printing a message and jumping to a label). This is wrong because a retry might be needed, so our actions must not have side effects and must be repeatable as long as read_seqretry() returns a non-zero value. In other words, we were essentially ignoring the sequence lock; 2) Right below the read sequence lock loop, we were reading the values from avail_metadata_alloc_bits and avail_data_alloc_bits without any protection from concurrent writers, that is, reading them outside of the read sequence lock critical section. So fix this by making sure we only read the available allocation bits while in a read sequence lock critical section and that what we do in the critical section is repeatable (has nothing that can not be undone) so that any eventual retry that is needed is handled properly. Fixes: de98ced9e743 ("Btrfs: use seqlock to protect fs_info->avail_{data, metadata, system}_alloc_bits") Fixes: 14506127979a ("btrfs: fix a bogus warning when converting only data or metadata") Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e6ec385b55f6001da8c6b1532494241e52c550d Author: Filipe Manana Date: Fri Nov 16 13:04:44 2018 +0000 Btrfs: allow clear_extent_dirty() to receive a cached extent state record We can have a lot freed extents during the life span of transaction, so the red black tree that keeps track of the ranges of each freed extent (fs_info->freed_extents[]) can get quite big. When finishing a transaction commit we find each range, process it (discard the extents, unpin them) and then remove it from the red black tree. We can use an extent state record as a cache when searching for a range, so that when we clean the range we can use the cached extent state we passed to the search function instead of iterating the red black tree again. Doing things as fast as possible when finishing a transaction (in state TRANS_STATE_UNBLOCKED) is convenient as it reduces the time we block another task that wants to commit the next transaction. So change clear_extent_dirty() to allow an optional extent state record to be passed as an argument, which will be passed down to __clear_extent_bit. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit cc5de4e70256cbf4f28c0340e2d9f14cb6ed10aa Author: Nikolay Borisov Date: Tue Oct 30 16:43:28 2018 +0200 btrfs: Handle final split-brain possibility during fsid change This patch lands the last case which needs to be handled by the fsid change code. Namely, this is the case where a multidisk filesystem has already undergone at least one successful fsid change i.e all disks have the METADATA_UUID incompat bit and power failure occurs as another fsid change is in progress. When such an event occurs, disks could be split in 2 groups. One of the groups will have both METADATA_UUID and CHANGING_FSID_V2 flags set coupled with old fsid/metadata_uuid pairs. The other group of disks will have only METADATA_UUID bit set and their fsid will be different than the one in disks in the first group. Here we look at the following cases: a) A disk from the first group is scanned first, so fs_devices is created with stale fsid/metdata_uuid. Then when a disk from the second group is scanned it needs to first check whether there exists such an fs_devices that has fsid_change set to true (because it was created with a disk having the CHANGING_FSID_V2 flag), the metadata_uuid and fsid of the fs_devices will be different (since it was created by a disk which already has had at least 1 successful fsid change) and finally the metadata_uuid of the fs_devices will equal that of the currently scanned disk (because metadata_uuid never really changes). When the correct fs_devices is found the information from the scanned disk will replace the current one in fs_devices since the scanned disk will have higher generation number. b) A disk from the second group is scanned so fs_devices is created as usual with differing fsid/metdata_uid. Then when a disk from the first group is scanned the code detects that it has both CHANGING_FSID_V2 and METADATA_UUID flags set and will search for fs_devices that has differing metadata_uuid/fsid and whose metadata_uuid is the same as that of the scanned device. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 7a62d0f07377b51a9033eb12fa537c264bcba3e5 Author: Nikolay Borisov Date: Tue Oct 30 16:43:27 2018 +0200 btrfs: Handle one more split-brain scenario during fsid change This commit continues hardening the scanning code to handle cases where power loss could have caused disks in a multi-disk filesystem to be in inconsistent state. Namely handle the situation that can occur when some of the disks in multi-disk fs have completed their fsid change i.e they have METADATA_UUID incompat flag set, have cleared the CHANGING_FSID_V2 flag and their fsid/metadata_uuid are different. At the same time the other half of the disks will have their fsid/metadata_uuid unchanged and will only have CHANGING_FSID_V2 flag. This is handled by introducing code in the scan path which: a) Handles the case when a device with CHANGING_FSID_V2 flag is scanned and as a result btrfs_fs_devices is created with matching fsid/metdata_uuid. Subsequently, when a device with completed fsid change is scanned it will detect this via the new code in find_fsid i.e that such an fs_devices exist that fsid_change flag is set to true, it's metadata_uuid/fsid match and the metadata_uuid of the scanned device matches that of the fs_devices. In this case, it's important to note that the devices which has its fsid change completed will have a higher generation number than the device with FSID_CHANGING_V2 flag set, so its superblock block will be used during mount. To prevent an assertion triggering because the sb used for mounting will have differing fsid/metadata_uuid than the ones in the fs_devices struct also add code in device_list_add which overwrites the values in fs_devices. b) Alternatively we can end up with a device that completed its fsid change be scanned first which will create the respective btrfs_fs_devices struct with differing fsid/metadata_uuid. In this case when a device with FSID_CHANGING_V2 flag set is scanned it will call the newly added find_fsid_inprogress function which will return the correct fs_devices. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d1a63002829a4d8014de20dc141b404cc808405e Author: Nikolay Borisov Date: Tue Oct 30 16:43:26 2018 +0200 btrfs: add members to fs_devices to track fsid changes In order to gracefully handle split-brain scenario during fsid change (which are very unlikely, yet possible), two more pieces of information will be necessary: 1. The highest generation number among all devices registered to a particular btrfs_fs_devices 2. A boolean flag whether a given btrfs_fs_devices was created by a device which had the FSID_CHANGING_V2 flag set. This is a preparatory patch and just introduces the variables as well as code which sets them, their actual use is going to happen in a later patch. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fbc6feaec98ac0c6a615bbe9e17c5689a1a84650 Author: Nikolay Borisov Date: Tue Oct 30 16:43:25 2018 +0200 btrfs: Add handling for disk split-brain scenario during fsid change Even though fsid change without rewrite is a very quick operation it's still possible to experience a split-brain scenario if power loss occurs at the most inconvenient time. This patch handles the case where power failure occurs while the first transaction (the one setting CHANGING_FSID_V2) flag is being persisted on disk. This can cause the btrfs_fs_devices of this filesystem to be created by a device which: a) has the CHANGING_FSID_V2 flag set but its fsid value is intact b) or a device which doesn't have CHANGING_FSID_V2 flag set and its fsid value is intact This situation is trivially handled by the current find_fsid code since in both cases the devices are going to be treated like ordinary devices. Since btrfs is always mounted using the superblock of the latest device (the one with highest generation number), meaning it will have the CHANGING_FSID_V2 flag set, ensure it's being cleared on mount. On the first transaction commit following mount all disks will have it cleared. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit de37aa513105f864d3c21105bf5542d498f21ca2 Author: Nikolay Borisov Date: Tue Oct 30 16:43:24 2018 +0200 btrfs: Remove fsid/metadata_fsid fields from btrfs_info Currently btrfs_fs_info structure contains a copy of the fsid/metadata_uuid fields. Same values are also contained in the btrfs_fs_devices structure which fs_info has a reference to. Let's reduce duplication by removing the fields from fs_info and always refer to the ones in fs_devices. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 56f20f4009d3c0b2e6165d9136fed40028c8225d Author: Nikolay Borisov Date: Mon Nov 19 17:37:45 2018 +0200 btrfs: Add sysfs support for metadata_uuid feature Since the metadata_uuid is a new incompat feature it requires the respective sysfs hooks. This patch adds the 'metdata_uuid' feature to be shown if it supported by the kernel. Additionally it adds /sys/fs/btrfs/UUID/metadata_uuid attribute which allows one to read the current metadata_uuid. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7239ff4b2be8ec0c3160da7fdd1475785fdb4cb9 Author: Nikolay Borisov Date: Tue Oct 30 16:43:23 2018 +0200 btrfs: Introduce support for FSID change without metadata rewrite This field is going to be used when the user wants to change the UUID of the filesystem without having to rewrite all metadata blocks. This field adds another level of indirection such that when the FSID is changed what really happens is the current UUID (the one with which the fs was created) is copied to the 'metadata_uuid' field in the superblock as well as a new incompat flag is set METADATA_UUID. When the kernel detects this flag is set it knows that the superblock in fact has 2 UUIDs: 1. Is the UUID which is user-visible, currently known as FSID. 2. Metadata UUID - this is the UUID which is stamped into all on-disk datastructures belonging to this file system. When the new incompat flag is present device scanning checks whether both fsid/metadata_uuid of the scanned device match any of the registered filesystems. When the flag is not set then both UUIDs are equal and only the FSID is retained on disk, metadata_uuid is set only in-memory during mount. Additionally a new metadata_uuid field is also added to the fs_info struct. It's initialised either with the FSID in case METADATA_UUID incompat flag is not set or with the metdata_uuid of the superblock otherwise. This commit introduces the new fields as well as the new incompat flag and switches all users of the fsid to the new logic. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ minor updates in comments ] Signed-off-by: David Sterba commit ce9f967f31ea91365c0aa897dbc2bddbd39d7a73 Author: Johannes Thumshirn Date: Mon Nov 19 10:38:17 2018 +0100 btrfs: use EXPORT_FOR_TESTS for conditionally exported functions Several functions in BTRFS are only used inside the source file they are declared if CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not defined. However if CONFIG_BTRFS_FS_RUN_SANITY_TESTS is defined these functions are shared with the unit tests code. Before the introduction of the EXPORT_FOR_TESTS macro, these functions could not be declared as static and the compiler had a harder task when optimizing and inlining them. As we have EXPORT_FOR_TESTS now, use it where appropriate to support the compiler. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit f8f591df7d725e3b1ea97e13ac830791b7c4a038 Author: Johannes Thumshirn Date: Mon Nov 19 10:38:16 2018 +0100 btrfs: introduce EXPORT_FOR_TESTS macro Depending on whether CONFIG_BTRFS_FS_RUN_SANITY_TESTS is set, some BTRFS functions are either local to the file they are implemented in and thus should be declared static or are called from within the test implementation defined in a different file. Introduce an EXPORT_FOR_TESTS macro which depending on CONFIG_BTRFS_FS_RUN_SANITY_TESTS either adds the 'static' keyword to a function or not. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit e9a05cf31bf1821a5885440dd0d27aca2a3dc324 Author: Johannes Thumshirn Date: Mon Nov 19 10:38:13 2018 +0100 btrfs: remove unused drop_on_err in btrfs_mkdir Up to commit 32955c5422a8 ("btrfs: switch to discard_new_inode()") the drop_on_err variable in btrfs_mkdir() was used to check whether the inode had to be dropped via iput(). After commit 32955c5422a8 ("btrfs: switch to discard_new_inode()") discard_new_inode() is called when err is set and inode is non NULL. Therefore drop_on_err is not used anymore and thus causes a warning when building with -Wunused-but-set-variable. Reviewed-by: Omar Sandoval Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 9bfd61d9755a515fc876aa70717824cea645bffd Author: Nikolay Borisov Date: Fri Oct 26 14:43:21 2018 +0300 btrfs: Replace BUG_ON with ASSERT in find_lock_delalloc_range lock_delalloc_pages should only return 2 values - 0 in case of success and -EAGAIN if the range of pages to be locked should be shrunk due to some of gone. Manual inspections confirms that this is indeed the case since __process_pages_contig is where lock_delalloc_pages gets its return value. The latter always returns 0 or -EAGAIN so the invariant holds. No functional changes. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 917aacecc567d56d0ec5f244043f403f7102eda8 Author: Nikolay Borisov Date: Fri Oct 26 14:43:20 2018 +0300 btrfs: Sink find_lock_delalloc_range's 'max_bytes' argument All callers of this function pass BTRFS_MAX_EXTENT_SIZE (128M) so let's reduce the argument count and make that a local variable. No functional changes. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 64bc6c2a34535515f8319b2054795f0ca0b842f9 Author: Nikolay Borisov Date: Fri Oct 26 14:43:19 2018 +0300 btrfs: Remove superfluous check form btrfs_remove_chunk It's unnecessary to check map->stripes[i].dev for NULL given its value is already set and dereferenced above the the check. No functional changes. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f9085abfaeaf45971044fad2281ffd917cde4526 Author: Anand Jain Date: Tue Nov 20 19:56:16 2018 +0800 btrfs: don't report user-requested cancel as an error As of now only user requested replace cancel can cancel the replace-scrub so no need to log the error. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 49365e69762715fb301db0bce3333e4c41dda810 Author: Anand Jain Date: Tue Nov 20 19:56:15 2018 +0800 btrfs: silence warning if replace is canceled When we successfully cancel the device replace, its scrub worker returns -ECANCELED, which is then passed to btrfs_dev_replace_finishing. It cleans up based on the returned status and propagates the same -ECANCELED back the parent function. As of now only user can cancel the replace-scrub, so its ok to silence the warning here. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53e62fb5a4aedeff05aa1efd277de32dc765f4bf Author: Anand Jain Date: Sun Nov 11 22:22:24 2018 +0800 btrfs: dev-replace: add explicit check for replace result "no error" We recast the replace return status BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no error. And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0, which is also declared as 0, so we just return. Instead add it to the if statement so that there is enough clarity while reading the code. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit fe97e2e173afb61f1bb889c45f9597102c9f4849 Author: Anand Jain Date: Sun Nov 11 22:22:21 2018 +0800 btrfs: dev-replace: replace's scrub must not be running in suspended state When the replace state is in the suspended state, btrfs_scrub_cancel() should fail with -ENOTCONN as there is no scrub running. As a safety catch check if btrfs_scrub_cancel() returns -ENOTCONN and assert if it doesn't. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b47dda2ef6d793b67fd5979032dcd106e3f0a5c9 Author: Anand Jain Date: Sun Nov 11 22:22:20 2018 +0800 btrfs: dev-replace: set result code of cancel by status of scrub The device-replace needs to check the result code of the scrub workers in btrfs_dev_replace_cancel and distinguish if successful cancel operation and when the there was no operation running. If btrfs_scrub_cancel() fails, return BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user can try to cancel the replace again. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit d189dd70e2556181732598956d808ea53cc8774e Author: Anand Jain Date: Wed Nov 14 13:50:26 2018 +0800 btrfs: fix use-after-free due to race between replace start and cancel The device replace cancel thread can race with the replace start thread and if fs_info::scrubs_running is not yet set, btrfs_scrub_cancel() will fail to stop the scrub thread. The scrub thread continues with the scrub for replace which then will try to write to the target device and which is already freed by the cancel thread. scrub_setup_ctx() warns as tgtdev is NULL. struct scrub_ctx *scrub_setup_ctx(struct btrfs_device *dev, int is_dev_replace) { ... if (is_dev_replace) { WARN_ON(!fs_info->dev_replace.tgtdev); <=== sctx->pages_per_wr_bio = SCRUB_PAGES_PER_WR_BIO; sctx->wr_tgtdev = fs_info->dev_replace.tgtdev; sctx->flush_all_writes = false; } [ 6724.497655] BTRFS info (device sdb): dev_replace from /dev/sdb (devid 1) to /dev/sdc started [ 6753.945017] BTRFS info (device sdb): dev_replace from /dev/sdb (devid 1) to /dev/sdc canceled [ 6852.426700] WARNING: CPU: 0 PID: 4494 at fs/btrfs/scrub.c:622 scrub_setup_ctx.isra.19+0x220/0x230 [btrfs] ... [ 6852.428928] RIP: 0010:scrub_setup_ctx.isra.19+0x220/0x230 [btrfs] ... [ 6852.432970] Call Trace: [ 6852.433202] btrfs_scrub_dev+0x19b/0x5c0 [btrfs] [ 6852.433471] btrfs_dev_replace_start+0x48c/0x6a0 [btrfs] [ 6852.433800] btrfs_dev_replace_by_ioctl+0x3a/0x60 [btrfs] [ 6852.434097] btrfs_ioctl+0x2476/0x2d20 [btrfs] [ 6852.434365] ? do_sigaction+0x7d/0x1e0 [ 6852.434623] do_vfs_ioctl+0xa9/0x6c0 [ 6852.434865] ? syscall_trace_enter+0x1c8/0x310 [ 6852.435124] ? syscall_trace_enter+0x1c8/0x310 [ 6852.435387] ksys_ioctl+0x60/0x90 [ 6852.435663] __x64_sys_ioctl+0x16/0x20 [ 6852.435907] do_syscall_64+0x50/0x180 [ 6852.436150] entry_SYSCALL_64_after_hwframe+0x49/0xbe Further, as the replace thread enters scrub_write_page_to_dev_replace() without the target device it panics: static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx, struct scrub_page *spage) { ... bio_set_dev(bio, sbio->dev->bdev); <====== [ 6929.715145] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a0 .. [ 6929.717106] Workqueue: btrfs-scrub btrfs_scrub_helper [btrfs] [ 6929.717420] RIP: 0010:scrub_write_page_to_dev_replace+0xb4/0x260 [btrfs] .. [ 6929.721430] Call Trace: [ 6929.721663] scrub_write_block_to_dev_replace+0x3f/0x60 [btrfs] [ 6929.721975] scrub_bio_end_io_worker+0x1af/0x490 [btrfs] [ 6929.722277] normal_work_helper+0xf0/0x4c0 [btrfs] [ 6929.722552] process_one_work+0x1f4/0x520 [ 6929.722805] ? process_one_work+0x16e/0x520 [ 6929.723063] worker_thread+0x46/0x3d0 [ 6929.723313] kthread+0xf8/0x130 [ 6929.723544] ? process_one_work+0x520/0x520 [ 6929.723800] ? kthread_delayed_work_timer_fn+0x80/0x80 [ 6929.724081] ret_from_fork+0x3a/0x50 Fix this by letting the btrfs_dev_replace_finishing() to do the job of cleaning after the cancel, including freeing of the target device. btrfs_dev_replace_finishing() is called when btrfs_scub_dev() returns along with the scrub return status. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05c49e6bc1e8866ecfd674ebeeb58cdbff9145c2 Author: Anand Jain Date: Sun Nov 11 22:22:18 2018 +0800 btrfs: dev-replace: go back to suspend state if another EXCL_OP is running In a secnario where balance and replace co-exists as below, - start balance - pause balance - start replace - reboot and when system restarts, balance resumes first. Then the replace is attempted to restart but will fail as the EXCL_OP lock is already held by the balance. If so place the replace state back to BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state. Fixes: 010a47bde9420 ("btrfs: add proper safety check before resuming dev-replace") CC: stable@vger.kernel.org # 4.18+ Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d228ece59a35a9b9e8ff0d40653234a6d90f61e Author: Anand Jain Date: Sun Nov 11 22:22:17 2018 +0800 btrfs: dev-replace: go back to suspended state if target device is missing At the time of forced unmount we place the running replace to BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes back and expect the target device is missing. Then let the replace state continue to be in BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state instead of BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED as there isn't any matching scrub running as part of replace. Fixes: e93c89c1aaaa ("Btrfs: add new sources for device replace code") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 54862d6d28fc439d1f99c6e19bb38d9dc08161e0 Author: Anand Jain Date: Sun Nov 11 22:22:16 2018 +0800 btrfs: mark btrfs_dev_replace_start as static There isn't any other consumer other than in its own file dev-replace.c. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit a9261d4125c97ce8624e9941b75dee1b43ad5df9 Author: Anand Jain Date: Mon Oct 15 10:45:17 2018 +0800 btrfs: harden agaist duplicate fsid on scanned devices It's not that impossible to imagine that a device OR a btrfs image is copied just by using the dd or the cp command. Which in case both the copies of the btrfs will have the same fsid. If on the system with automount enabled, the copied FS gets scanned. We have a known bug in btrfs, that we let the device path be changed after the device has been mounted. So using this loop hole the new copied device would appears as if its mounted immediately after it's been copied. For example: Initially.. /dev/mmcblk0p4 is mounted as / $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 29.2G 0 disk |-mmcblk0p4 179:4 0 4G 0 part / |-mmcblk0p2 179:2 0 500M 0 part /boot |-mmcblk0p3 179:3 0 256M 0 part [SWAP] `-mmcblk0p1 179:1 0 256M 0 part /boot/efi $ btrfs fi show Label: none uuid: 07892354-ddaa-4443-90ea-f76a06accaba Total devices 1 FS bytes used 1.40GiB devid 1 size 4.00GiB used 3.00GiB path /dev/mmcblk0p4 Copy mmcblk0 to sda $ dd if=/dev/mmcblk0 of=/dev/sda And immediately after the copy completes the change in the device superblock is notified which the automount scans using btrfs device scan and the new device sda becomes the mounted root device. $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 14.9G 0 disk |-sda4 8:4 1 4G 0 part / |-sda2 8:2 1 500M 0 part |-sda3 8:3 1 256M 0 part `-sda1 8:1 1 256M 0 part mmcblk0 179:0 0 29.2G 0 disk |-mmcblk0p4 179:4 0 4G 0 part |-mmcblk0p2 179:2 0 500M 0 part /boot |-mmcblk0p3 179:3 0 256M 0 part [SWAP] `-mmcblk0p1 179:1 0 256M 0 part /boot/efi $ btrfs fi show / Label: none uuid: 07892354-ddaa-4443-90ea-f76a06accaba Total devices 1 FS bytes used 1.40GiB devid 1 size 4.00GiB used 3.00GiB path /dev/sda4 The bug is quite nasty that you can't either unmount /dev/sda4 or /dev/mmcblk0p4. And the problem does not get solved until you take sda out of the system on to another system to change its fsid using the 'btrfstune -u' command. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b50836edf9fe531c66310071df59eac2d8dfc708 Author: Hans van Kranenburg Date: Thu Oct 4 23:24:42 2018 +0200 btrfs: introduce nparity raid_attr Instead of hardcoding exceptions for RAID5 and RAID6 in the code, use an nparity field in raid_attr. Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba commit da612e31aee51bd13231c78a47c714b543bd3ad8 Author: Hans van Kranenburg Date: Thu Oct 4 23:24:41 2018 +0200 btrfs: fix ncopies raid_attr for RAID56 RAID5 and RAID6 profile store one copy of the data, not 2 or 3. These values are not yet used anywhere so there's no change. Reviewed-by: Nikolay Borisov Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba commit baf92114c7e6dd6124aa3d506e4bc4b694da3bc3 Author: Hans van Kranenburg Date: Thu Oct 4 23:24:40 2018 +0200 btrfs: alloc_chunk: fix more DUP stripe size handling Commit 92e222df7b "btrfs: alloc_chunk: fix DUP stripe size handling" fixed calculating the stripe_size for a new DUP chunk. However, the same calculation reappears a bit later, and that one was not changed yet. The resulting bug that is exposed is that the newly allocated device extents ('stripes') can have a few MiB overlap with the next thing stored after them, which is another device extent or the end of the disk. The scenario in which this can happen is: * The block device for the filesystem is less than 10GiB in size. * The amount of contiguous free unallocated disk space chosen to use for chunk allocation is 20% of the total device size, or a few MiB more or less. An example: - The filesystem device is 7880MiB (max_chunk_size gets set to 788MiB) - There's 1578MiB unallocated raw disk space left in one contiguous piece. In this case stripe_size is first calculated as 789MiB, (half of 1578MiB). Since 789MiB (stripe_size * data_stripes) > 788MiB (max_chunk_size), we enter the if block. Now stripe_size value is immediately overwritten while calculating an adjusted value based on max_chunk_size, which ends up as 788MiB. Next, the value is rounded up to a 16MiB boundary, 800MiB, which is actually more than the value we had before. However, the last comparison fails to detect this, because it's comparing the value with the total amount of free space, which is about twice the size of stripe_size. In the example above, this means that the resulting raw disk space being allocated is 1600MiB, while only a gap of 1578MiB has been found. The second device extent object for this DUP chunk will overlap for 22MiB with whatever comes next. The underlying problem here is that the stripe_size is reused all the time for different things. So, when entering the code in the if block, stripe_size is immediately overwritten with something else. If later we decide we want to have the previous value back, then the logic to compute it was copy pasted in again. With this change, the value in stripe_size is not unnecessarily destroyed, so the duplicated calculation is not needed any more. Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba commit 23f0ff1ec4b0b2860e9faaa98149bd4f30e82a18 Author: Hans van Kranenburg Date: Thu Oct 4 23:24:39 2018 +0200 btrfs: alloc_chunk: improve chunk size variable name The variable num_bytes is really a way too generic name for a variable in this function. There are a dozen other variables that hold a number of bytes as value. Give it a name that actually describes what it does, which is holding the size of the chunk that we're allocating. Reviewed-by: David Sterba Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba commit 2f29df4fc24ee3467f0073300d93a55499c7dd9f Author: Hans van Kranenburg Date: Thu Oct 4 23:24:38 2018 +0200 btrfs: alloc_chunk: do not refurbish num_bytes The variable num_bytes is used to store the chunk length of the chunk that we're allocating. Do not reuse it for something really different in the same function. Reviewed-by: Nikolay Borisov Signed-off-by: Hans van Kranenburg Signed-off-by: David Sterba commit 3cd24c698004d2f7668e0eb9fc1f096f533c791b Author: Ethan Lien Date: Thu Nov 1 14:49:03 2018 +0800 btrfs: use tagged writepage to mitigate livelock of snapshot Snapshot is expected to be fast. But if there are writers steadily creating dirty pages in our subvolume, the snapshot may take a very long time to complete. To fix the problem, we use tagged writepage for snapshot flusher as we do in the generic write_cache_pages(), so we can omit pages dirtied after the snapshot command. This does not change the semantics regarding which data get to the snapshot, if there are pages being dirtied during the snapshotting operation. There's a sync called before snapshot is taken in old/new case, any IO in flight just after that may be in the snapshot but this depends on other system effects that might still sync the IO. We do a simple snapshot speed test on a Intel D-1531 box: fio --ioengine=libaio --iodepth=32 --bs=4k --rw=write --size=64G --direct=0 --thread=1 --numjobs=1 --time_based --runtime=120 --filename=/mnt/sub/testfile --name=job1 --group_reporting & sleep 5; time btrfs sub snap -r /mnt/sub /mnt/snap; killall fio original: 1m58sec patched: 6.54sec This is the best case for this patch since for a sequential write case, we omit nearly all pages dirtied after the snapshot command. For a multi writers, random write test: fio --ioengine=libaio --iodepth=32 --bs=4k --rw=randwrite --size=64G --direct=0 --thread=1 --numjobs=4 --time_based --runtime=120 --filename=/mnt/sub/testfile --name=job1 --group_reporting & sleep 5; time btrfs sub snap -r /mnt/sub /mnt/snap; killall fio original: 15.83sec patched: 10.35sec The improvement is smaller compared to the sequential write case, since we omit only half of the pages dirtied after snapshot command. Reviewed-by: Nikolay Borisov Signed-off-by: Ethan Lien Reviewed-by: David Sterba Signed-off-by: David Sterba commit c629732d247e253e811a7ef6667a53349ae5a0ab Author: Nikolay Borisov Date: Thu Nov 8 10:18:08 2018 +0200 btrfs: Remove unused extent_state argument from btrfs_writepage_endio_finish_ordered This parameter was never used, yet was part of the interface of the function ever since its introduction as extent_io_ops::writepage_end_io_hook in e6dcd2dc9c48 ("Btrfs: New data=ordered implementation"). Now that NULL is passed everywhere as a value for this parameter let's remove it for good. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8cc0237abc3f138d9b5fa4cd8af26f3c335ba7eb Author: Nikolay Borisov Date: Thu Nov 8 10:18:07 2018 +0200 btrfs: Remove extent_page_data argument from writepage_delalloc The only remaining use of the 'epd' argument in writepage_delalloc is to reference the extent_io_tree which was set in extent_writepages. Since it is guaranteed that page->mapping of any page passed to writepage_delalloc (and __extent_writepage as the sole caller) to be equal to that passed in extent_writepages we can directly get the io_tree via the already passed inode (which is also taken from page->mapping->host). No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7789a55aa1c98e3408a77167699f86fdb79f097b Author: Nikolay Borisov Date: Thu Nov 8 10:18:06 2018 +0200 btrfs: Move epd::extent_locked check to writepage_delalloc's caller If epd::extent_locked is set then writepage_delalloc terminates. Make this a bit more apparent in the caller by simply bubbling the check up. This enables to remove epd as an argument to writepage_delalloc in a future patch. No functional change. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fc8a168aa9ab1680c2bd52bf9db7c994e0f2524f Author: Nikolay Borisov Date: Thu Nov 8 16:16:38 2018 +0200 btrfs: Check for missing device before bio submission in btrfs_map_bio Before btrfs_map_bio submits all stripe bios it does a number of checks to ensure the device for every stripe is present. However, it doesn't do a DEV_STATE_MISSING check, instead this is relegated to the lower level btrfs_schedule_bio (in the async submission case, sync submission doesn't check DEV_STATE_MISSING at all). Additionally btrfs_schedule_bios does the duplicate device->bdev check which has already been performed in btrfs_map_bio. This patch moves the DEV_STATE_MISSING check in btrfs_map_bio and removes the duplicate device->bdev check. Doing so ensures that no bio cloning/submission happens for both async/sync requests in the face of missing device. This makes the async io submission path slightly shorter in terms of instruction count. No functional changes. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ab457246f8a45bbb3e79fd2a9c1044b5ac14ec99 Author: Anand Jain Date: Mon Nov 12 13:05:15 2018 +0800 btrfs: remove redundant replace_state init dev_replace::replace_state has been set to BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED (0) in the same function, So delete the line which sets replace_state = 0; Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 6d4cbf790307515dcd91eb2165e36e9b83d0fab6 Author: Filipe Manana Date: Mon Nov 12 10:24:30 2018 +0000 Btrfs: remove no longer used io_err from btrfs_log_ctx The io_err field of struct btrfs_log_ctx is no longer used after the recent simplification of the fast fsync path, where we now wait for ordered extents to complete before logging the inode. We did this in commit b5e6c3e170b7 ("btrfs: always wait on ordered extents at fsync time") and commit a2120a473a80 ("btrfs: clean up the left over logged_list usage") removed its last use. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 59b0713a8a6c0f72ab468507dcd6b866869b900a Author: Filipe Manana Date: Fri Nov 9 10:43:08 2018 +0000 Btrfs: simpler and more efficient cleanup of a log tree's extent io tree We currently are in a loop finding each range (corresponding to a btree node/leaf) in a log root's extent io tree and then clean it up. This is a waste of time since we are traversing the extent io tree's rb_tree more times then needed (one for a range lookup and another for cleaning it up) without any good reason. We free the log trees when we are in the critical section of a transaction commit (the transaction state is set to TRANS_STATE_COMMIT_DOING), so it's of great convenience to do everything as fast as possible in order to reduce the time we block other tasks from starting a new transaction. So fix this by traversing the extent io tree once and cleaning up all its records in one go while traversing it. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 46cc775e29c55d6ae9f4dbb733ec066ff56d3922 Author: Nikolay Borisov Date: Mon Oct 15 17:04:01 2018 +0300 btrfs: Adjust loop in free_extent_buffer The loop construct in free_extent_buffer was added in 242e18c7c1a8 ("Btrfs: reduce lock contention on extent buffer locks") as means of reducing the times the eb lock is taken, the non-last ref count is decremented and lock is released. As the special handling of UNMAPPED extent buffers was removed now there is only one decrement op which is happening for EXTENT_BUFFER_UNMAPPED case. This commit modifies the loop condition so that in case of UNMAPPED buffers the eb's lock is taken only if we are 100% sure the eb is going to be freed by the current executor of the code. Additionally, remove superfluous ref count ops in btrfs test. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9cfc8ba712be5abd476532bf672389f67e41f4ff Author: Nikolay Borisov Date: Wed Aug 15 18:26:57 2018 +0300 btrfs: Remove special handling of EXTENT_BUFFER_UNMAPPED while freeing Now that the whole of btrfs code has been audited for eb reference count management it's time to remove the hunk in free_extent_buffer that essentially considered the condition "eb->ref == 2 && EXTENT_BUFFER_DUMMY" to equal "eb->ref = 1". Also remove the last location which takes an extra reference count in alloc_test_extent_buffer. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit df44971468c1a960cac1ace116e4fa9be50a9479 Author: Nikolay Borisov Date: Wed Aug 15 18:26:56 2018 +0300 btrfs: Remove unnecessary tree locking code in qgroup_rescan_leaf In qgroup_rescan_leaf a copy is made of the target leaf by calling btrfs_clone_extent_buffer. The latter allocates a new buffer and attaches a new set of pages and copies the content of the source buffer. The new scratch buffer is only used to iterate it's items, it's not published anywhere and cannot be accessed by a third party. Hence, it's not necessary to perform any locking on it whatsoever. Furthermore, remove the extra extent_buffer_get call since the new buffer is always allocated with a reference count of 1 which is sufficient here. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8c7eeb6557877e3272f3105955ca103ee351f16d Author: Nikolay Borisov Date: Wed Aug 15 18:26:55 2018 +0300 btrfs: Remove extra reference count bumps in btrfs_compare_trees When the 2 comparison trees roots are initialised they are private to the function and already have reference counts of 1 each. There is no need to further increment the reference count since the cloned buffers are already accessed via struct btrfs_path. Eventually the 2 paths used for comparison are going to be released, effectively disposing of the cloned buffers. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24cee18a1c1d7c731ea5987e0c99daea22ae7f4a Author: Nikolay Borisov Date: Wed Aug 15 18:26:54 2018 +0300 btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind When a rewound buffer is created it already has a ref count of 1 and the dummy flag set. Then another ref is taken bumping the count to 2. Finally when this buffer is released from btrfs_release_path the extra reference is decremented by the special handling code in free_extent_buffer. However, this special code is in fact redundant sinca ref count of 1 is still correct since the buffer is only accessed via btrfs_path struct. This paves the way forward of removing the special handling in free_extent_buffer. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6c122e2a0c515cfb3f3a9cefb5dad4cb62109c78 Author: Nikolay Borisov Date: Wed Aug 15 18:26:53 2018 +0300 btrfs: Remove redundant extent_buffer_get in get_old_root get_old_root used used only by btrfs_search_old_slot to initialise the path structure. The old root is always a cloned buffer (either via alloc dummy or via btrfs_clone_extent_buffer) and its reference count is 2: 1 from allocation, 1 from extent_buffer_get call in get_old_root. This latter explicit ref count acquire operation is in fact unnecessary since the semantic is such that the newly allocated buffer is handed over to the btrfs_path for lifetime management. Considering this just remove the extra extent_buffer_get in get_old_root. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c623d334a4f7f270de223cde2a3f3b743023e2a Author: Nikolay Borisov Date: Wed Aug 15 18:26:52 2018 +0300 btrfs: Remove needless tree locking in iterate_inode_extrefs In iterate_inode_exrefs the eb is cloned via btrfs_clone_extent_buffer which creates a private extent buffer with the dummy flag set and ref count of 1. Then this buffer is locked for reading and its ref count is incremented by 1. Finally it's fed to the passed iterate_irefs_t function. The actual iterate call back is inode_to_path (coming from paths_from_inode) which feeds the eb to btrfs_ref_to_path. In this final function the passed eb is only read by first assigning it to the local eb variable. This variable is only modified in the case another eb was referenced from the passed path that is eb != eb_in check triggers. Considering this there is no point in locking the cloned eb in iterate_inode_refs since it's never being modified and is not published anywhere. Furthermore the cloned eb is completely fine having its ref count be 1. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e5bba0b0f843e047ca025b53f1dcfa7e6bd05d86 Author: Nikolay Borisov Date: Wed Aug 15 18:26:51 2018 +0300 btrfs: Remove needless tree locking in iterate_inode_refs In iterate_inode_refs the eb is cloned via btrfs_clone_extent_buffer which creates a private extent buffer with the dummy flag set and ref count of 1. Then this buffer is locked for reading and its ref count is incremented by 1. Finally it's fed to the passed iterate_irefs_t function. The actual iterate call back is inode_to_path (coming from paths_from_inode) which feeds the eb to btrfs_ref_to_path. In this final function the passed eb is only read by first assigning it to the local eb variable. This variable is only modified in the case another eb was referenced from the passed path that is eb != eb_in check triggers. Considering this there is no point in locking the cloned eb in iterate_inode_refs since it's never being modified and is not published anywhere. Furthermore the cloned eb is completely fine having its ref count be 1. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d9cb2459b2e96264246e3a78f43c2f74c2c72461 Author: Qu Wenruo Date: Sat Nov 3 17:24:52 2018 +0800 btrfs: tests: Use BTRFS_MAX_EXTENT_SIZE to replace the intermediate number In extent-io self test, we need 2 ordered extents at its maximum size to do the test. Instead of using the intermediate numbers, use BTRFS_MAX_EXTENT_SIZE for @max_bytes, and twice @max_bytes for @total_dirty. This should explain why we need all these magic numbers and prevent people to modify them by accident. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit ed46ff3d423780fa5173b38a844bf0fdb210a2a7 Author: Omar Sandoval Date: Thu Nov 3 10:28:14 2016 -0700 Btrfs: support swap files Btrfs has not allowed swap files since commit 35054394c4b3 ("Btrfs: stop providing a bmap operation to avoid swapfile corruptions"). However, now that the proper restrictions are in place, Btrfs can support swap files through the swap file a_ops, similar to iomap in commit 67482129cdab ("iomap: add a swapfile activation function"). For Btrfs, activation needs to make sure that the file can be used as a swap file, which currently means that it must be fully allocated as NOCOW with no compression on one device. It must also do the proper tracking so that ioctls will not interfere with the swap file. Deactivation clears this tracking. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 60ca842e345716eb8c3f7df070511848b9f1a796 Author: Omar Sandoval Date: Wed May 16 16:34:31 2018 -0700 Btrfs: rename and export get_chunk_map The Btrfs swap code is going to need it, so give it a btrfs_ prefix and make it non-static. Reviewed-by: Nikolay Borisov Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit eede2bf34f4fa84ce82e36878ccdd0fdc4b1463c Author: Omar Sandoval Date: Thu Nov 3 10:28:12 2016 -0700 Btrfs: prevent ioctls from interfering with a swap file A later patch will implement swap file support for Btrfs, but before we do that, we need to make sure that the various Btrfs ioctls cannot change a swap file. When a swap file is active, we must make sure that the extents of the file are not moved and that they don't become shared. That means that the following are not safe: - chattr +c (enable compression) - reflink - dedupe - snapshot - defrag Don't allow those to happen on an active swap file. Additionally, balance, resize, device remove, and device replace are also unsafe if they affect an active swapfile. Add a red-black tree of block groups and devices which contain an active swapfile. Relocation checks each block group against this tree and skips it or errors out for balance or resize, respectively. Device remove and device replace check the tree for the device they will operate on. Note that we don't have to worry about chattr -C (disable nocow), which we ignore for non-empty files, because an active swapfile must be non-empty and can't be truncated. We also don't have to worry about autodefrag because it's only done on COW files. Truncate and fallocate are already taken care of by the generic code. Device add doesn't do relocation so it's not an issue, either. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit abbb55f4cd56dffb20ba7dd8dfc53154c79934f1 Author: Nikolay Borisov Date: Thu Nov 1 14:09:53 2018 +0200 btrfs: Remove extent_io_ops::split_extent_hook callback This is the counterpart to merge_extent_hook, similarly, it's used only for data/freespace inodes so let's remove it, rename it and call it directly where necessary. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c848198aad3ad1c68309aa7002fa571a540568c Author: Nikolay Borisov Date: Thu Nov 1 14:09:52 2018 +0200 btrfs: Remove extent_io_ops::merge_extent_hook callback This callback is used only for data and free space inodes. Such inodes are guaranteed to have their extent_io_tree::private_data set to the inode struct. Exploit this fact to directly call the function. Also give it a more descriptive name. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a36bb5f9a90c9bab05b7084d21718450e8067fb0 Author: Nikolay Borisov Date: Thu Nov 1 14:09:51 2018 +0200 btrfs: Remove extent_io_ops::clear_bit_hook callback This is the counterpart to ex-set_bit_hook (now btrfs_set_delalloc_extent), similar to what was done before remove clear_bit_hook and rename the function. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e06a1fc99cc7eca09118cc02c4d7540fa69e9d09 Author: Nikolay Borisov Date: Thu Nov 1 14:09:50 2018 +0200 btrfs: Remove extent_io_ops::set_bit_hook extent_io callback This callback is used to properly account delalloc extents for data inodes (ordinary file inodes and freespace v1 inodes). Those can be easily identified since they have their extent_io trees ->private_data member point to the inode. Let's exploit this fact to remove the needless indirection through extent_io_hooks and directly call the function. Also give the function a name which reflects its purpose - btrfs_set_delalloc_extent. This patch also modified test_find_delalloc so that the extent_io_tree used for testing doesn't have its ->private_data set which would have caused a crash in btrfs_set_delalloc_extent due to the btrfs_inode->root member not being initialised. The old version of the code also didn't call set_bit_hook since the extent_io ops weren't set for the inode. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 65a680f6b7d6e83ca3a440588d3581f4a38265bf Author: Nikolay Borisov Date: Thu Nov 1 14:09:49 2018 +0200 btrfs: Remove extent_io_ops::check_extent_io_range callback This callback was only used in debug builds by btrfs_leak_debug_check. A better approach is to move its implementation in btrfs_leak_debug_check and ensure the latter is only executed for extent tree which have ->private_data set i.e. relate to a data node and not the btree one. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7087a9d8db88ef9b7f8a30ac5706aa396b78e6c9 Author: Nikolay Borisov Date: Thu Nov 1 14:09:48 2018 +0200 btrfs: Remove extent_io_ops::writepage_end_io_hook This callback is ony ever called for data page writeout so there is no need to actually abstract it via extent_io_ops. Lets just export it, remove the definition of the callback and call it directly in the functions that invoke the callback. Also rename the function to btrfs_writepage_endio_finish_ordered since what it really does is account finished io in the ordered extent data structures. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d75855b4518b525dbba4e461819b26bc5bb89a82 Author: Nikolay Borisov Date: Thu Nov 1 14:09:47 2018 +0200 btrfs: Remove extent_io_ops::writepage_start_hook This hook is called only from __extent_writepage_io which is already called only from the data page writeout path. So there is no need to make an indirect call via extent_io_ops. This patch just removes the callback definition, exports the callback function and calls it directly at the only call site. Also give the function a more descriptive name. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5eaad97af8aeff38debe7d3c69ec3a0d71f8350f Author: Nikolay Borisov Date: Thu Nov 1 14:09:46 2018 +0200 btrfs: Remove extent_io_ops::fill_delalloc This callback is called only from writepage_delalloc which in turn is guaranteed to be called from the data page writeout path. In the end there is no reason to have the call to this function to be indrected via the extent_io_ops structure. This patch removes the callback definition, exports the function and calls it directly. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ rename to btrfs_run_delalloc_range ] Signed-off-by: David Sterba commit 06f2548f9d74a925a16967bb4ff3d860e0c6b33f Author: Nikolay Borisov Date: Fri Nov 9 16:08:30 2018 +0200 btrfs: Add function to distinguish between data and btree inode This will be used in future patches that remove the optional extent_io_ops callbacks. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05a37c48604c19b50873fd9663f9140c150469d1 Author: Qu Wenruo Date: Fri Oct 5 17:45:55 2018 +0800 btrfs: volumes: Make sure no dev extent is beyond device boundary Add extra dev extent end check against device boundary. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5eb193812a42dc49331f25137a38dfef9612d3e4 Author: Qu Wenruo Date: Fri Oct 5 17:45:54 2018 +0800 btrfs: volumes: Make sure there is no overlap of dev extents at mount time Enhance btrfs_verify_dev_extents() to remember previous checked dev extents, so it can verify no dev extents can overlap. Analysis from Hans: "Imagine allocating a DATA|DUP chunk. In the chunk allocator, we first set... max_stripe_size = SZ_1G; max_chunk_size = BTRFS_MAX_DATA_CHUNK_SIZE ... which is 10GiB. Then... /* we don't want a chunk larger than 10% of writeable space */ max_chunk_size = min(div_factor(fs_devices->total_rw_bytes, 1), max_chunk_size); Imagine we only have one 7880MiB block device in this filesystem. Now max_chunk_size is down to 788MiB. The next step in the code is to search for max_stripe_size * dev_stripes amount of free space on the device, which is in our example 1GiB * 2 = 2GiB. Imagine the device has exactly 1578MiB free in one contiguous piece. This amount of bytes will be put in devices_info[ndevs - 1].max_avail Next we recalculate the stripe_size (which is actually the device extent length), based on the actual maximum amount of available raw disk space: stripe_size = div_u64(devices_info[ndevs - 1].max_avail, dev_stripes); stripe_size is now 789MiB Next we do... data_stripes = num_stripes / ncopies ...where data_stripes ends up as 1, because num_stripes is 2 (the amount of device extents we're going to have), and DUP has ncopies 2. Next there's a check... if (stripe_size * data_stripes > max_chunk_size) ...which matches because 789MiB * 1 > 788MiB. We go into the if code, and next is... stripe_size = div_u64(max_chunk_size, data_stripes); ...which resets stripe_size to max_chunk_size: 788MiB Next is a fun one... /* bump the answer up to a 16MB boundary */ stripe_size = round_up(stripe_size, SZ_16M); ...which changes stripe_size from 788MiB to 800MiB. We're not done changing stripe_size yet... /* But don't go higher than the limits we found while searching * for free extents */ stripe_size = min(devices_info[ndevs - 1].max_avail, stripe_size); This is bad. max_avail is twice the stripe_size (we need to fit 2 device extents on the same device for DUP). The result here is that 800MiB < 1578MiB, so it's unchanged. However, the resulting DUP chunk will need 1600MiB disk space, which isn't there, and the second dev_extent might extend into the next thing (next dev_extent? end of device?) for 22MiB. The last shown line of code relies on a situation where there's twice the value of stripe_size present as value for the variable stripe_size when it's DUP. This was actually the case before commit 92e222df7b "btrfs: alloc_chunk: fix DUP stripe size handling", from which I quote: "[...] in the meantime there's a check to see if the stripe_size does not exceed max_chunk_size. Since during this check stripe_size is twice the amount as intended, the check will reduce the stripe_size to max_chunk_size if the actual correct to be used stripe_size is more than half the amount of max_chunk_size." In the previous version of the code, the 16MiB alignment (why is this done, by the way?) would result in a 50% chance that it would actually do an 8MiB alignment for the individual dev_extents, since it was operating on double the size. Does this matter? Does it matter that stripe_size can be set to anything which is not 16MiB aligned because of the amount of remaining available disk space which is just taken? What is the main purpose of this round_up? The most straightforward thing to do seems something like... stripe_size = min( div_u64(devices_info[ndevs - 1].max_avail, dev_stripes), stripe_size ) ..just putting half of the max_avail into stripe_size." Link: https://lore.kernel.org/linux-btrfs/b3461a38-e5f8-f41d-c67c-2efac8129054@mendix.com/ Reported-by: Hans van Kranenburg Signed-off-by: Qu Wenruo [ add analysis from report ] Signed-off-by: David Sterba commit e72d79d6bcee564dbdf83169c743bbd3f8438108 Author: Qu Wenruo Date: Fri Nov 2 09:39:50 2018 +0800 btrfs: Refactor find_free_extent loops update into find_free_extent_update_loop We have a complex loop design for find_free_extent(), that has different behavior for each loop, some even includes new chunk allocation. Instead of putting such a long code into find_free_extent() and makes it harder to read, just extract them into find_free_extent_update_loop(). With all the cleanups, the main find_free_extent() should be pretty barebone: find_free_extent() |- Iterate through all block groups | |- Get a valid block group | |- Try to do clustered allocation in that block group | |- Try to do unclustered allocation in that block group | |- Check if the result is valid | | |- If valid, then exit | |- Jump to next block group | |- Push harder to find free extents |- If not found, re-iterate all block groups Signed-off-by: Qu Wenruo Reviewed-by: Su Yue [ copy callchain from changelog to function comment ] Signed-off-by: David Sterba commit e1a4184815672c0cd8ea91beca3dd6d0bd4b9e53 Author: Qu Wenruo Date: Fri Nov 2 09:39:49 2018 +0800 btrfs: Refactor unclustered extent allocation into find_free_extent_unclustered() This patch will extract unclsutered extent allocation code into find_free_extent_unclustered(). And this helper function will use return value to indicate what to do next. This should make find_free_extent() a little easier to read. Signed-off-by: Qu Wenruo Reviewed-by: Su Yue Reviewed-by: Josef Bacik [Update merge conflict with fb5c39d7a887 ("btrfs: don't use ctl->free_space for max_extent_size")] Reviewed-by: David Sterba Signed-off-by: David Sterba commit d06e3bb69009d21802776b8751dfe5deef7102f5 Author: Qu Wenruo Date: Fri Nov 2 09:39:48 2018 +0800 btrfs: Refactor clustered extent allocation into find_free_extent_clustered We have two main methods to find free extents inside a block group: 1) clustered allocation 2) unclustered allocation This patch will extract the clustered allocation into find_free_extent_clustered() to make it a little easier to read. Instead of jumping between different labels in find_free_extent(), the helper function will use return value to indicate different behavior. Signed-off-by: Qu Wenruo Reviewed-by: Su Yue Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit b4bd745d1230ddcf8de408997db9a45cd696508d Author: Qu Wenruo Date: Fri Nov 2 09:39:47 2018 +0800 btrfs: Introduce find_free_extent_ctl structure for later rework Instead of tons of different local variables in find_free_extent(), extract them into find_free_extent_ctl structure, and add better explanation for them. Some modification may looks redundant, but will later greatly simplify function parameter list during find_free_extent() refactor. Also add two comments to co-operate with fb5c39d7a887 ("btrfs: don't use ctl->free_space for max_extent_size"), to make ffe_ctl->max_extent_size update more reader-friendly. Signed-off-by: Qu Wenruo Reviewed-by: Su Yue Reviewed-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e2907c1a6ae1842f9c1d5393bbe966c1ccfbc335 Author: Lu Fengqi Date: Wed Oct 24 20:24:02 2018 +0800 btrfs: extent-tree: Detect bytes_pinned underflow earlier Introduce a new wrapper update_bytes_pinned to replace open coded bytes_pinned modifiers. Now the underflows of space_info::bytes_pinned get detected and reported. Reviewed-by: Josef Bacik Signed-off-by: Lu Fengqi Signed-off-by: David Sterba commit 9f9b8e8d0ebe1af42ddd3c86e12569c53914a89d Author: Qu Wenruo Date: Wed Oct 24 20:24:01 2018 +0800 btrfs: extent-tree: Detect bytes_may_use underflow earlier Although we have space_info::bytes_may_use underflow detection in btrfs_free_reserved_data_space_noquota(), we have more callers who are subtracting number from space_info::bytes_may_use. So instead of doing underflow detection for every caller, introduce a new wrapper update_bytes_may_use() to replace open coded bytes_may_use modifiers. This also introduce a macro to declare more wrappers, but currently space_info::bytes_may_use is the mostly interesting one. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: Lu Fengqi Signed-off-by: David Sterba commit 85dd506c8e022a5c5555ad22decfa0abf93a5d64 Author: Filipe Manana Date: Fri Oct 26 17:15:21 2018 +0100 Btrfs: remove no longer used stuff for tracking pending ordered extents Tracking pending ordered extents per transaction was introduced in commit 50d9aa99bd35 ("Btrfs: make sure logged extents complete in the current transaction V3") and later updated in commit 161c3549b45a ("Btrfs: change how we wait for pending ordered extents"). However now that on fsync we always wait for ordered extents to complete before logging, done in commit 5636cf7d6dc8 ("btrfs: remove the logged extents infrastructure"), we no longer need the stuff to track for pending ordered extents, which was not completely removed in the mentioned commit. So remove the remaining of the pending ordered extents infrastructure. Reviewed-by: Liu Bo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ce02f0326680562a905216d6601c8ac5020feaba Author: Filipe Manana Date: Fri Oct 26 21:26:40 2018 +0100 Btrfs: remove no longer used logged range variables when logging extents The logged_start and logged_end variables, at btrfs_log_changed_extents, were added in commit 8c6c592831a0 ("btrfs: log csums for all modified extents"). However since the recent simplification for fsync, which makes us wait for all ordered extents to complete before logging extents, we no longer need those variables. Commit a2120a473a80 ("btrfs: clean up the left over logged_list usage") forgot to remove them. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 2074e8a7d0257185c290e25d29a52d9601ee8701 Author: Dominic Braun Date: Fri Dec 14 13:05:10 2018 +0100 staging: vc04_services: Remove VCHIU_QUEUE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 2d0a0291135fd2f5591e0920d5eec04cba7846e3 Author: Dominic Braun Date: Fri Dec 14 13:05:09 2018 +0100 staging: vc04_services: Remove VCHIQ_STATE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit f5a98269861a92e60e7c9caa12ae6fc3b36bb752 Author: Dominic Braun Date: Fri Dec 14 13:05:08 2018 +0100 staging: vc04_services: Remove VCHIQ_SLOT_ZERO_T Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 6f1e4141c7516a2e1c5d380ed8f8da2db953299c Author: Dominic Braun Date: Fri Dec 14 13:05:07 2018 +0100 staging: vc04_services: Remove VCHIQ_SLOT_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit a610360370329cdf6ba2ec98940810629843d179 Author: Dominic Braun Date: Fri Dec 14 13:05:06 2018 +0100 staging: vc04_services: Remove VCHIQ_SLOT_INFO_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit c55aedfe60d06a7f8c6816583020c6035388a813 Author: Dominic Braun Date: Fri Dec 14 13:05:05 2018 +0100 staging: vc04_services: Remove VCHIQ_SHARED_STATE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 4f0922c87d47d95f87cfef3acf2d7549c5a6dfd8 Author: Dominic Braun Date: Fri Dec 14 13:05:04 2018 +0100 staging: vc04_services: Remove VCHIQ_SET_SERVICE_OPTION_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 7926c328d9586dcc5c5e993351d7c46442493102 Author: Dominic Braun Date: Fri Dec 14 13:05:03 2018 +0100 staging: vc04_services: Remove VCHIQ_SERVICE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit d3af2bcc6ea4e55884ee11b05a7d95002026017f Author: Dominic Braun Date: Fri Dec 14 13:05:02 2018 +0100 staging: vc04_services: Remove VCHIQ_SERVICE_QUOTA_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 0b53ca3127a674f9bdc94f6a4e1e6b92eb6b17fa Author: Dominic Braun Date: Fri Dec 14 13:05:01 2018 +0100 staging: vc04_services: Remove VCHIQ_SERVICE_PARAMS_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit c18cbdee798ce80688538c7820a9a399dc4b3f46 Author: Dominic Braun Date: Fri Dec 14 13:05:00 2018 +0100 staging: vc04_services: Remove VCHIQ_SERVICE_BASE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 87c091aadfacbf8c2d7d5329f923c7bbd46c840a Author: Dominic Braun Date: Fri Dec 14 13:04:59 2018 +0100 staging: vc04_services: Remove VCHIQ_QUEUE_MESSAGE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 4040a7ee5346c6d7e3f425acad1684298830ccc2 Author: Dominic Braun Date: Fri Dec 14 13:04:58 2018 +0100 staging: vc04_services: Remove VCHIQ_QUEUE_BULK_TRANSFER_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit e8968525282f6c12355f9ee1375ab36cb0bc0cbd Author: Dominic Braun Date: Fri Dec 14 13:04:57 2018 +0100 staging: vc04_services: Remove VCHIQ_HEADER_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 3515279e6ed1304085e044804d4906adf47ce501 Author: Dominic Braun Date: Fri Dec 14 13:04:56 2018 +0100 staging: vc04_services: Remove VCHIQ_GET_CONFIG_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 392342b77c26b1c7dc33e6d8dd000e40ab47a0f8 Author: Dominic Braun Date: Fri Dec 14 13:04:55 2018 +0100 staging: vc04_services: Remove VCHIQ_DUMP_MEM_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 8ca743a19a37a2c5374fb425e12b0e7065df6443 Author: Dominic Braun Date: Fri Dec 14 13:04:54 2018 +0100 staging: vc04_services: Remove VCHIQ_DEQUEUE_MESSAGE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit aa987e55132f78143b799b1e63167354b3029a67 Author: Dominic Braun Date: Fri Dec 14 13:04:53 2018 +0100 staging: vc04_services: Remove VCHIQ_DEBUGFS_NODE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 562943286c7466c44651a0e2972c54381e756601 Author: Dominic Braun Date: Fri Dec 14 13:04:52 2018 +0100 staging: vc04_services: Remove VCHIQ_CREATE_SERVICE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 8b867447536c0c9ee19bbc250c52e1c6412fe6a5 Author: Dominic Braun Date: Fri Dec 14 13:04:51 2018 +0100 staging: vc04_services: Remove VCHIQ_CONFIG_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit e69106e55d82375c2397099021366e03bbabc204 Author: Dominic Braun Date: Fri Dec 14 13:04:50 2018 +0100 staging: vc04_services: Remove VCHIQ_COMPLETION_DATA_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit bc96a5f0f7761731209b361380a9fb6614e4484a Author: Dominic Braun Date: Fri Dec 14 13:04:49 2018 +0100 staging: vc04_services: Remove VCHIQ_BULK_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 029a8a189478d05b7772316a59aaf4a67180e847 Author: Dominic Braun Date: Fri Dec 14 13:04:48 2018 +0100 staging: vc04_services: Remove VCHIQ_BULK_QUEUE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit cf69fc521676ccedad3cfd51fa50a98498f92484 Author: Dominic Braun Date: Fri Dec 14 13:04:47 2018 +0100 staging: vc04_services: Remove VCHIQ_AWAIT_COMPLETION_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit e376ef3535b6afe14083be3fa7bec320d85dd2bf Author: Dominic Braun Date: Fri Dec 14 13:04:46 2018 +0100 staging: vc04_services: Remove VCHIQ_ARM_STATE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 2be0bef086200fabe924ceefb5778ebf3dca20c7 Author: Dominic Braun Date: Fri Dec 14 13:04:45 2018 +0100 staging: vc04_services: Remove VCHI_MSG_VECTOR_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 2a6e3234d64acc4c292e16922abfb4ed046f5814 Author: Dominic Braun Date: Fri Dec 14 13:04:44 2018 +0100 staging: vc04_services: Remove VCHI_MSG_ITER_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 9d4d3ac473912a246b4cee119a44647f20ff4e57 Author: Dominic Braun Date: Fri Dec 14 13:04:43 2018 +0100 staging: vc04_services: Remove VCHI_HELD_MSG_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 4dfc415fc20e1897c5d83ee859b44fe312479413 Author: Dominic Braun Date: Fri Dec 14 13:04:42 2018 +0100 staging: vc04_services: Remove USER_SERVICE_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 477e5caec4ee1eff40bc46ea6fc2aa9a76a23752 Author: Dominic Braun Date: Fri Dec 14 13:04:41 2018 +0100 staging: vc04_services: Remove SERVICE_CREATION_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 4075fa9efc4ee653d3fbdfacf182a7a18340c6fc Author: Dominic Braun Date: Fri Dec 14 13:04:40 2018 +0100 staging: vc04_services: Remove REMOTE_EVENT_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 313b5681a37cffad9ae3793b78588d5f190d56f6 Author: Dominic Braun Date: Fri Dec 14 13:04:39 2018 +0100 staging: vc04_services: Remove PAGELIST_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit 4eef62d61c16f8a4042209c247afbf69132d0d9b Author: Dominic Braun Date: Fri Dec 14 13:04:38 2018 +0100 staging: vc04_services: Remove DUMP_CONTEXT_T typedef Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun Signed-off-by: Tobias Büttner Signed-off-by: Greg Kroah-Hartman commit cb9a242c33cab509bd09dadeb3bc83a57f0d5abd Author: Hardik Singh Rathore Date: Wed Dec 12 19:24:55 2018 +0530 Staging: rtl8723bs: Fix code style issue in rtl8723bs driver Add space between 'else' and '{' to solve code style issue in all the files for rtl8723bs driver. Signed-off-by: Hardik Singh Rathore Signed-off-by: Greg Kroah-Hartman commit 0022290f1e12e87512d37dec702cab2090a91dc4 Author: Yangtao Li Date: Sat Dec 15 03:53:12 2018 -0500 staging: greybus: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 892cb81ecec9a7bf7c4224119959b21580a40870 Author: Yangtao Li Date: Sat Dec 15 04:01:13 2018 -0500 staging: vc04_services: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 2be13945966afc600360b2fe146dde75b0f443ab Author: Yangtao Li Date: Sat Dec 15 03:59:12 2018 -0500 staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 29f85260edbb42308c21c063e2b6006117161d34 Author: Yangtao Li Date: Sat Dec 15 03:51:07 2018 -0500 staging: fwserial: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 0b7b9b6c3dee8232c7c6dd2a5a56100e20576717 Author: Ajay Singh Date: Sat Dec 15 02:32:29 2018 +0000 staging: wilc1000: fix NULL dereference inside wilc_scan() Added NULL check before accessing 'hidden_net' pointer inside wilc_scan() to fix the issue found by static code checker. Fixes: 8f1a0ac1eba7 ("staging: wilc1000: handle scan operation callback from cfg80211 context") Reported-by: Dan Carpenter Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 2da56630b1cc422f58408033102b8f91ae97bc91 Author: Nicolas Saenz Julienne Date: Wed Dec 12 19:51:35 2018 +0100 staging: vchiq: delete vchiq_killable.h There are no users for that header file. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit ff5979ad86368425b7da3a25f4e84650b51ff5fd Author: Nicolas Saenz Julienne Date: Wed Dec 12 19:51:34 2018 +0100 staging: vchiq_2835_arm: quit using custom down_interruptible() vchi_killable.h overrides down_interruptible() by implementing a function similar to down_killable(). To make things simpler we turn calls to down_interruptible() into kernel's implementation of down_killable(). Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit a772f116702e3f0afdd7e6acadc1b8fb3b20b9ff Author: Nicolas Saenz Julienne Date: Wed Dec 12 19:51:33 2018 +0100 staging: vchiq: switch to wait_for_completion_killable This fixes f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") as it neglected the subtle down_interruptible() macro override in vchiq_killable.h. Hence all completions should be killable instead of interruptible. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Reported-by: Arnd Bergmann Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 649496b603000135683ee76d7ea499456617bf17 Author: Dan Carpenter Date: Mon Dec 17 10:08:54 2018 +0300 staging: bcm2835-audio: double free in init error path We free instance here and in the caller. It should be only the caller which handles it. Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops") Signed-off-by: Dan Carpenter Reviewed-by: Takashi Iwai Cc: stable Signed-off-by: Greg Kroah-Hartman commit 4765f68374cfda16031fc747218c73aac6ca51c7 Author: Lou Knauer Date: Thu Dec 13 10:43:17 2018 +0100 staging: mt7621-dma: fix unbalanced braces Add braces to conditional statements if the other branch has them in order to be more compliant with the linux kernel coding style. Remaining checkpatch.pl issues include unnecessary line continuations and use of non-conventional types. Signed-off-by: Lou Knauer Signed-off-by: Philipp Panzer Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman commit 3dbf37c03bc6b1a460e88e1864f7fc184d206496 Author: Amir Mahdi Ghorbanian Date: Thu Dec 13 10:26:24 2018 -0800 Staging: comedi: cb_pcidas: fixed a spelling mistake coding style issue Fixed a coding style issue. Signed-off-by: Amir Mahdi Ghorbanian Signed-off-by: Greg Kroah-Hartman commit 1d6e81a288e28d8d0e38e0501a324216f79bba35 Author: Fabrizio Castro Date: Fri Dec 14 08:27:03 2018 +0000 usb: renesas_usbhs: add support for RZ/G2E HS-USB found in RZ/G2E (a.k.a. r8a774c0) is very similar to the one found in R-Car E3 (a.k.a. r8a77990), as it needs to release the PLL reset by the UGCTRL register like R-Car E3, therefore add r8a774c0 support in a similar fashion to what was done for the r8a77990. Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman Acked-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 8dc7623bf608495b6e6743e805807c7840673573 Author: Roger Quadros Date: Fri Dec 14 11:36:15 2018 +0200 usb: ehci-omap: Fix deferred probe for phy handling PHY model is being used on omap5 platforms even if port mode is not OMAP_EHCI_PORT_MODE_PHY. So don't guess if PHY is required or not based on PHY mode. If PHY is provided in device tree, it must be required. So, if devm_usb_get_phy_by_phandle() gives us an error code other than -ENODEV (no PHY) then error out. This fixes USB Ethernet on omap5-uevm if PHY happens to probe after EHCI thus causing a -EPROBE_DEFER. Cc: Johan Hovold Cc: Ladislav Michl Reported-by: Peter Ujfalusi Signed-off-by: Roger Quadros Tested-by: Peter Ujfalusi Acked-by: Tony Lindgren Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit c3788cd9963eb2e77de3c24142fb7c67b61f1a26 Author: Heikki Krogerus Date: Wed Dec 12 20:13:55 2018 +0300 usb: roles: Add a description for the class to Kconfig That makes the USB role switch support option visible and selectable for the user. The class driver is also moved to drivers/usb/roles/ directory. This will fix an issue that we have with the Intel USB role switch driver on systems that don't have USB Type-C connectors: Intel USB role switch driver depends on the USB role switch class as it should, but since there was no way for the user to enable the USB role switch class, there was also no way to select that driver. USB Type-C drivers select the USB role switch class which makes the Intel USB role switch driver available and therefore hides the problem. So in practice Intel USB role switch driver was depending on USB Type-C drivers. Fixes: f6fb9ec02be1 ("usb: roles: Add Intel xHCI USB role switch driver") Cc: Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 732774437ae01d9882e60314e303898e63c7f038 Author: Boris Brezillon Date: Sun Dec 16 09:34:17 2018 +0100 mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET The opcodes used by the controller when doing batched page prog should be written in NFC_REG_WCMD_SET not FC_REG_RCMD_SET. Luckily, the default NFC_REG_WCMD_SET value matches the one we set in the driver which explains why we didn't notice the problem. Fixes: 614049a8d904 ("mtd: nand: sunxi: add support for DMA assisted operations") Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 4733c0b4666dadd155d7fb006d41b04ade002fc1 Merge: eaf3074e0a8c2 9049fce897eda Author: Greg Kroah-Hartman Date: Mon Dec 17 13:58:44 2018 +0100 Merge tag 'usb-ci-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: - Improve the over-current handling for imx - Add the HSIC support for imx * tag 'usb-ci-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: imx: allow to configure oc polarity on i.MX25 usb: chipidea: imx: Warn if oc polarity isn't specified usb: chipidea: imx: support configuring for active low oc signal doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups usb: chipidea: host: override ehci->hub_control usb: chipidea: imx: add HSIC support usb: chipidea: add flag for imx hsic implementation commit 7e849dd9cf37bc52aff9b5236377c405040c959c Author: Christoph Hellwig Date: Mon Dec 17 12:16:27 2018 +0100 nvme-pci: don't share queue maps Now that the block layer checks if a queue map has any queues inside it there is no more reason to duplicate the maps for the non-default types. Reviewed-by: Ming Lei Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5aceaeb26394538858a9dbae5830d628469a44cf Author: Christoph Hellwig Date: Mon Dec 17 12:16:26 2018 +0100 blk-mq: only dispatch to non-defauly queue maps if they have queues We should check if a given queue map actually has queues enabled before dispatching to it. This allows drivers to not initialize optional but not used map types, which subsequently will allow fixing problems with queue map rebuilds for that case. Reviewed-by: Ming Lei Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 346fc1089e5d4734990b4b6c3cd0cdeae9ae482d Author: Ming Lei Date: Mon Dec 17 18:42:48 2018 +0800 blk-mq: export hctx->type in debugfs instead of sysfs Now we only export hctx->type via sysfs, and there isn't such info in hctx entry under debugfs. We often use debugfs only to diagnose queue mapping issue, so add the support in debugfs. Queue mapping becomes a bit more complicated after multiple queue mapping is supported, we may write blktest to verify if queue mapping is valid based on blk-mq-debugfs. Given not necessary to export hctx->type twice, so remove the export from sysfs. Cc: Jeff Moyer Cc: Mike Snitzer Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 07b35eb5a364fa59f88f65e6c786192f2c9163be Author: Ming Lei Date: Mon Dec 17 18:42:45 2018 +0800 blk-mq: fix allocation for queue mapping table Type of each element in queue mapping table is 'unsigned int, intead of 'struct blk_mq_queue_map)', so fix it. Cc: Jeff Moyer Cc: Mike Snitzer Cc: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 22a5a4a44c43e2993e96183039aef71566e1a514 Author: Claudiu Beznea Date: Mon Dec 17 10:37:51 2018 +0000 regulator: act8945a-regulator: fix 'defined but not used' compiler warning Fix 'defined but not used' compiler warning for act8945a_suspend() function in case CONFIG_PM_SLEEP is not defined. Fixes: b5ebba46e694 ("regulator: act8945a-regulator: add shutdown function") Signed-off-by: Claudiu Beznea Reported-by: Andrei Stefanescu Signed-off-by: Mark Brown commit 918446c96595636be81a224bf663b0f4e669aad7 Author: Priit Laes Date: Fri Dec 14 22:54:07 2018 +0200 regulator: axp20x: fix set_ramp_delay for AXP209/dcdc2 Initial commit of set_ramp_delay feature was missing an assignment which should have populated slew_rate table for dcdc2 regulator. Add it. Fixes: d29f54df8b16 ("regulator: axp20x: add support for set_ramp_delay for AXP209") Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit 052b8cfa4070caa53125cd589da0cfe744132a94 Author: Nikolay Borisov Date: Tue Dec 11 10:29:25 2018 +0200 locks: Use inode_is_open_for_write Use the aptly named function rather than open coding it. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: Jeff Layton commit d2e1a003af569e912d5f115a3c20b89a19f5caa0 Author: Joerg Roedel Date: Wed Dec 5 14:39:45 2018 +0100 ACPI/IORT: Don't call iommu_ops->add_device directly Make sure to invoke this call-back through the proper function of the IOMMU-API. Acked-by: Hanjun Guo Signed-off-by: Joerg Roedel commit 641fb0efbff063ed57f108c2eb4a4d26dbd5badd Author: Joerg Roedel Date: Wed Dec 5 14:39:45 2018 +0100 iommu/of: Don't call iommu_ops->add_device directly Make sure to invoke this call-back through the proper function of the IOMMU-API. Signed-off-by: Joerg Roedel commit cc5aed44a3a8e4fca721636cf881a52f8d68a098 Author: Joerg Roedel Date: Fri Nov 30 10:31:59 2018 +0100 iommu: Consolitate ->add/remove_device() calls Put them into separate functions and call those where the plain ops have been called before. Signed-off-by: Joerg Roedel commit 6954cf9bfda153f9544c63761aabf0199710aec3 Author: Joerg Roedel Date: Wed Dec 5 13:57:43 2018 +0100 iommu/sysfs: Rename iommu_release_device() Remove the iommu_ prefix from the function and a few other static data structures so that the iommu_release_device name can be re-used in iommu core code. Signed-off-by: Joerg Roedel commit f884f6ee62604aec60fe1760f94724be192d97c0 Author: Joerg Roedel Date: Fri Nov 30 14:29:01 2018 +0100 dmaengine: sh: rcar-dmac: Use device_iommu_mapped() Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Vinod Koul Signed-off-by: Joerg Roedel commit 05afde1a7ef3ddde5e7657b9faeb6347423a9acb Author: Joerg Roedel Date: Fri Nov 30 13:16:38 2018 +0100 xhci: Use device_iommu_mapped() Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Acked-by: Mathias Nyman Signed-off-by: Joerg Roedel commit 9488585b21bef0df1217e510c7134905d1d376a7 Author: Tadeusz Struk Date: Wed Nov 21 06:50:37 2018 -0800 tpm: add support for partial reads Currently to read a response from the TPM device an application needs provide big enough buffer for the whole response and read it in one go. The application doesn't know how big the response it beforehand so it always needs to maintain a 4K buffer and read the max (4K). In case if the user of the TSS library doesn't provide big enough buffer the TCTI spec says that the library should set the required size and return TSS2_TCTI_RC_INSUFFICIENT_BUFFER error code so that the application could allocate a bigger buffer and call receive again. To make it possible in the TSS library, this requires being able to do partial reads from the driver. The library would read the 10 bytes header first to get the actual size of the response from the header, and then read the rest of the response. This patch adds support for partial reads, i.e. the user can read the response in one or multiple reads, until the whole response is consumed. The user can also read only part of the response and ignore the rest by issuing a new write to send a new command. Signed-off-by: Tadeusz Struk Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 10fdf838e5f540beca466e9d1325999c072e5d3f Author: Christophe Leroy Date: Mon Dec 10 08:08:28 2018 +0000 lib: fix build failure in CONFIG_DEBUG_VIRTUAL test On several arches, virt_to_phys() is in io.h Build fails without it: CC lib/test_debug_virtual.o lib/test_debug_virtual.c: In function 'test_debug_virtual_init': lib/test_debug_virtual.c:26:7: error: implicit declaration of function 'virt_to_phys' [-Werror=implicit-function-declaration] pa = virt_to_phys(va); ^ Fixes: e4dace361552 ("lib: add test module for CONFIG_DEBUG_VIRTUAL") CC: stable@vger.kernel.org Signed-off-by: Christophe Leroy Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman commit ebd1d3b74f8542a8f3bb80b453692d6d18f84071 Author: Mathieu Malaterre Date: Wed Dec 5 18:53:55 2018 +0100 powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic The code: ifdef CONFIG_6xx KBUILD_CFLAGS += -mcpu=powerpc endif was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu explicitly in kernel compiles"). This change was acceptable since the TARGET_CPU logic was 64-bit only. Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32") this logic is no longer acceptable after the TARGET_CPU specific. It currently appends -mcpu=powerpc at the end of the command line, after any TARGET_CPU specific: gcc -Wp,-MD,init/.do_mounts.o.d ... -mcpu=powerpc -mbig-endian -m32 ... -mcpu=e300c2 ... -mcpu=powerpc ... ../init/do_mounts.c Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32") Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman commit c7e900c05b8f10894b649bdae50cf58656088dd0 Author: Michael Ellerman Date: Tue Dec 4 21:09:14 2018 +1100 powerpc/ipic: Remove unused ipic_set_priority() ipic_set_priority() has been unused since 2006 when the last usage was removed in commit b9f0f1bb2bca ("[POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ sense"). Reported-by: Dan Carpenter Signed-off-by: Michael Ellerman commit 4d6a19827387d8448afa1f5959b809ed2ba090d6 Merge: 7c91efce16083 a225f15674055 Author: Michael Ellerman Date: Mon Dec 17 22:11:54 2018 +1100 Merge branch 'fixes' into next Merge our fixes branch again, this has a couple of build fixes and also a change to do_syscall_trace_enter() that will conflict with a patch we want to apply in next. commit 0e1f37d120ec316e78b62ee570eec98e808ff0a4 Author: Aleix Roca Nonell Date: Sun Dec 16 16:53:19 2018 +0100 HID: asus: Add support for the ASUS T101HA keyboard dock The ASUS T101HA keyboard dock generates HID events using the ASUS vendor specific UsagePage 0xff31. In consequence, some multimedia keys such as brightness up and down are not working with hid-generic. This commit adds the T101HA dock into the supported device list of the hid-asus driver. It also prevents the dock's integrated touchpad to be bound with hid-asus given that it is already working fine with hid-multitouch. Signed-off-by: Aleix Roca Nonell Signed-off-by: Benjamin Tissoires commit bf8763d8f8376e98ea2a8e0fc4803f25ff91393e Author: Joerg Roedel Date: Fri Nov 30 14:23:19 2018 +0100 powerpc/iommu: Use device_iommu_mapped() Use the new function to replace the open-coded iommu check. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Russell Currey Cc: Sam Bobroff Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit 13e6a84d697e8eb8b61a3fe55b4109a666c4851d Author: Joerg Roedel Date: Fri Nov 30 13:14:05 2018 +0100 ACPI/IORT: Use device_iommu_mapped() Replace the iommu-check with a proper and readable function call. Cc: Lorenzo Pieralisi Acked-by: Robin Murphy Acked-by: Hanjun Guo Signed-off-by: Joerg Roedel commit 170ecbd5ff09aa9c8c1025a8563f76e01a24bb50 Author: Joerg Roedel Date: Fri Nov 30 14:29:01 2018 +0100 iommu/of: Use device_iommu_mapped() Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit dbba197edf32209d110727a02d3a91de4c88520f Author: Joerg Roedel Date: Fri Nov 30 12:51:52 2018 +0100 driver core: Introduce device_iommu_mapped() function Some places in the kernel check the iommu_group pointer in 'struct device' in order to find out whether a device is mapped by an IOMMU. This is not good way to make this check, as the pointer will be moved to 'struct dev_iommu_data'. This way to make the check is also not very readable. Introduce an explicit function to perform this check. Acked-by: Greg Kroah-Hartman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel commit db5d6a70043a0073e59af99cd4fd6bcb5bd3ace2 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/tegra: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Cc: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Joerg Roedel commit 2000e5f70322dcd612a9ccddfb56bf6716e0da9a Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/qcom: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Cc: Rob Clark Signed-off-by: Joerg Roedel commit 5c7e6bd71bfd96a65adb62593ea1b7d51a445b26 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/of: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Signed-off-by: Joerg Roedel commit a9bf2eec5a6fc01a0a5250eaf0bf61dfd382a78a Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/mediatek: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Cc: Matthias Brugger Tested-by: Yong Wu Signed-off-by: Joerg Roedel commit df90365580623b5c53cd9a46c14375191123d776 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/ipmmu-vmsa: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Signed-off-by: Joerg Roedel commit 98cc4f7196422ee20e00e2067e484e3136dbe4a5 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/dma: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Signed-off-by: Joerg Roedel commit 9b468f7d9cf1f089b7287865776eb100504681b7 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 iommu/arm-smmu: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Cc: Will Deacon Cc: Robin Murphy Acked-by: Will Deacon Signed-off-by: Joerg Roedel commit 8097e53eaba2bbae99dee661778ca20490b73951 Author: Joerg Roedel Date: Thu Nov 29 14:01:00 2018 +0100 ACPI/IORT: Use helper functions to access dev->iommu_fwspec Use the new helpers dev_iommu_fwspec_get()/set() to access the dev->iommu_fwspec pointer. This makes it easier to move that pointer later into another struct. Acked-by: Hanjun Guo Signed-off-by: Joerg Roedel commit b4ef725eeba158f365da9de1f05149094643ddea Author: Joerg Roedel Date: Wed Nov 28 13:35:24 2018 +0100 iommu: Introduce wrappers around dev->iommu_fwspec These wrappers will be used to easily change the location of the field later when all users are converted. Signed-off-by: Joerg Roedel commit b6d39cd82241bfc14a910eab032c53aabe678df7 Author: Fabrizio Castro Date: Thu Dec 13 20:22:44 2018 +0000 iommu/ipmmu-vmsa: Hook up r8a774c0 DT matching code Support RZ/G2E (a.k.a. R8A774C0) IPMMU. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit a6cf933a359f6cf0c642580602a0f5afc40d991a Author: Fabrizio Castro Date: Thu Dec 13 20:19:28 2018 +0000 dt-bindings: iommu: ipmmu-vmsa: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit 2713fe37153efb90b7a8427a2f53fa49216faf5c Author: Yong Wu Date: Thu Dec 13 17:19:48 2018 +0800 Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems" This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e. After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE"), v7s will return fail if the page table allocation isn't expected. this PHYS_OFFSET check is unnecessary now. And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE is enabled, the "memstart_addr" will be updated randomly, then the PHYS_OFFSET may be random. Reported-by: CK Hu Signed-off-by: Yong Wu Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 69d24c6ed67c1e15f76284fccd62feffe77c8d38 Author: Vivek Gautam Date: Thu Dec 13 14:35:07 2018 +0530 dt-bindings: arm-smmu: Add binding doc for Qcom smmu-500 Qcom's implementation of arm,mmu-500 works well with current arm-smmu driver implementation. Adding a soc specific compatible along with arm,mmu-500 makes the bindings future safe. Signed-off-by: Vivek Gautam Reviewed-by: Rob Herring Cc: Will Deacon Acked-by: Will Deacon Signed-off-by: Joerg Roedel commit ca804a5615a7c282dfb402805e657e735e1d864a Author: Biju Das Date: Thu Dec 13 20:22:27 2018 +0000 mmc: renesas_sdhi_internal_dmac: Whitelist r8a774c0 We need r8a774c0 to be whitelisted for SDHI to work on the RZ/G2E, but we don't care about the revision of the SoC, so just whitelist the generic part number. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit ab409be2be555e61516214885537dcb619f12e9e Author: Fabrizio Castro Date: Thu Dec 13 20:22:09 2018 +0000 dt-bindings: mmc: renesas_sdhi: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 0c204979c691f05666ecfb74501e7adfdde8fbf9 Author: Ulf Hansson Date: Mon Dec 10 17:52:40 2018 +0100 mmc: core: Cleanup BKOPS support It's been ~6 years ago since we introduced the BKOPS support for eMMC cards. The current code is a bit messy and primarily that's because it prepares to support running BKOPS in an asynchronous mode. However, that mode has never been fully implemented/enabled. Instead BKOPS is always executed in synchronously, when the card has reported an urgent BKOPS level. For these reasons, let's make the code more readable by dropping the unused parts. Let's also rename mmc_start_bkops() to mmc_run_bkops(), as to make it more descriptive. Cc: Jaehoon Chung Signed-off-by: Ulf Hansson commit 1217e61544922ab649fe4df94e2f272c01c159ea Author: Ulf Hansson Date: Mon Dec 10 17:52:39 2018 +0100 mmc: core: Drop redundant check in mmc_send_hpi_cmd() There is no point checking if HPI is supported in mmc_send_hpi_cmd() as mmc_interrupt_hpi(), which is the only caller, already checks if HPI has been enabled. Therefore, let's drop the check and the corresponding error path. Signed-off-by: Ulf Hansson commit 01e421feec0817bb3141eaae4c517410d193d440 Merge: 961de0a856e3a e3ae3401aa194 Author: Ulf Hansson Date: Mon Dec 17 09:00:52 2018 +0100 Merge branch 'fixes' into next commit 961de0a856e3a30c0238d1269c0b17f9b179b6c3 Author: Faiz Abbas Date: Tue Dec 11 19:52:53 2018 +0530 mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929) Errata i929 in certain OMAP5/DRA7XX/AM57XX silicon revisions (SPRZ426D - November 2014 - Revised February 2018 [1]) mentions unexpected tuning pattern errors. A small failure band may be present in the tuning range which may be missed by the current algorithm. Furthermore, the failure bands vary with temperature leading to different optimum tuning values for different temperatures. As suggested in the related Application Report (SPRACA9B - October 2017 - Revised July 2018 [2]), tuning should be done in two stages. In stage 1, assign the optimum ratio in the maximum pass window for the current temperature. In stage 2, if the chosen value is close to the small failure band, move away from it in the appropriate direction. References: [1] http://www.ti.com/lit/pdf/sprz426 [2] http://www.ti.com/lit/pdf/SPRACA9 Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 58fe8bbacd285af44831f68da1d2d50f0e2fc9a9 Author: Faiz Abbas Date: Tue Dec 11 19:52:52 2018 +0530 dt-bindings: sdhci-omap: Add note for cpu_thermal The driver fetches a thermal zone using the string "cpu_thermal" for tuning operation. Add a note for the same. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson commit 197ce1a5a0e9c27ca92f7dab51cd5bce4f09bdea Author: Adrian Hunter Date: Tue Dec 11 15:10:44 2018 +0200 mmc: sdhci-acpi: Disable LED control for Intel BYT-based controllers Intel BYT-based controllers do not have a LED signal line. Nevertheless sdhci_led_control() takes more than twice as long as sdhci_send_command(), even though it does nothing. Use the new SDHCI_QUIRK_NO_LED quirk to disable LED control for Intel BYT-based controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit aeae6ad35e973d9c31449de6868ef37ce6b7d05e Author: Adrian Hunter Date: Tue Dec 11 15:10:43 2018 +0200 mmc: sdhci-pci: Disable LED control for Intel BYT-based controllers Intel BYT-based controllers do not have a LED signal line. Nevertheless sdhci_led_control() takes more than twice as long as sdhci_send_command(), even though it does nothing. Use the new SDHCI_QUIRK_NO_LED quirk to disable LED control for Intel BYT-based controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit bd29f58bc0611ea9ebddc4091f71a8229572eb6a Author: Adrian Hunter Date: Tue Dec 11 15:10:42 2018 +0200 mmc: sdhci: Add quirk to disable LED control Host controllers may not have a LED signal line, whereas the register updates to control the non-existent LED can be relatively time consuming. Add a quirk to disable LED control. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit c8073e52851477514e98a032ae70f2dc8be19d32 Author: Ludovic Barre Date: Thu Dec 6 16:13:31 2018 +0100 mmc: mmci: add variant property to set command stop bit On cmd12 (STOP_TRANSMISSION), STM32 sdmmc variant needs to set cmdstop bit in command register. The CPSM ("Command Path State Machine") treats the command as a Stop Transmission command and signals abort to the DPSM ("Data Path State Machine"). Signed-off-by: Ludovic Barre Signed-off-by: Ulf Hansson commit 9e89a1526a9c23ce81584a0b612174342c611e47 Author: Colin Ian King Date: Thu Dec 6 09:19:36 2018 +0000 misc: alcor_pci: fix spelling mistake "invailid" -> "invalid" There are spelling mistakes in a couple of dev_dbg messages, fix these. Signed-off-by: Colin Ian King Reviewed-by: Oleksij Rempel Signed-off-by: Ulf Hansson commit 71645e65729f0c5aef8dccf961c97fa766835bd4 Author: Jerome Brunet Date: Thu Dec 6 16:18:28 2018 +0100 mmc: meson-gx: add signal resampling With some eMMC devices, there is still issues with the new phase settings. Enabling signal resampling seems to solve the problem for these. Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson commit c5e1766d3ac0abe4dde14e7ee620f6f3ac2a0bb9 Author: Jerome Brunet Date: Thu Dec 6 16:18:27 2018 +0100 mmc: meson-gx: align default phase on soc vendor tree Align the default Core and Tx phase with the SoC vendor tree. Even if the Tx phase is different from what the documentation recommends, it seems to provide better results. Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson commit 83076d2268c72d123f3d1eaf186a9f56ec1b943a Author: Jerome Brunet Date: Thu Dec 6 16:18:26 2018 +0100 mmc: meson-gx: remove useless lock The spinlock is only used within the irq handler so it does not seem very useful. Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson commit 18f92bc02f1739b5c4d5b70009fbb7eada45bca3 Author: Jerome Brunet Date: Thu Dec 6 16:18:25 2018 +0100 mmc: meson-gx: make sure the descriptor is stopped on errors On errors, if we don't stop the descriptor chain, it may continue to run and raise IRQ after we have called mmc_request_done(). This is bad because we won't be able to get cmd anymore and properly deal with the IRQ. This patch makes sure the descriptor chain is stopped before calling mmc_request_done() Fixes: 79ed05e329c3 ("mmc: meson-gx: add support for descriptor chain mode") Signed-off-by: Jerome Brunet Signed-off-by: Ulf Hansson commit 41fd4caeb00bbd6dc55f056f3e8e956697b0760d Author: Faiz Abbas Date: Tue Dec 11 00:05:07 2018 +0530 mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver The host controllers on TI's AM654 SOCs are not compatible with the phy and consumer model of the sdhci-of-arasan driver. It turns out that for optimal operation at higher speeds, a special tuning procedure needs to be implemented which involves configuration of platform specific phy registers. Therefore, branch out to a new sdhci_am654 driver and add the phy register space with all phy configurations to it. Populate AM654 specific callbacks to sdhci_ops and add SDHCI_QUIRKS wherever applicable. Only add support for upto High Speed for SD card and upto DDR52 speed mode for eMMC. Higher speeds will be added in subsequent patches. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 49d14adb0031e380e6a0d52d2b853a7f8db3f65f Author: Faiz Abbas Date: Tue Dec 11 00:05:06 2018 +0530 dt-bindings: mmc: sdhci-of-arasan: Add deprecated message for AM65 Commit 26a4f38d1316 ("dt-bindings: mmc: sdhci-of-arasan: Add new compatible for AM654 MMC PHY") added a new compatible for supporting controllers on TI's AM65x SOCs. It turns out that the controller is not compatible with the arasan driver's phy and consumer model as it requires some phy registers for core sdhci functionality. This calls for the binding to branch out to a new driver. Therefore, add a deprecated message for the ti,am654-sdhci-5.1 binding. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson commit f98b4f98bbc823d2f376f2c6c33d21bde20423cf Author: Faiz Abbas Date: Tue Dec 11 00:05:05 2018 +0530 dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's AM654 SOCs Add binding documentation for mmc host controllers present on TI's AM654 SOCs. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson commit 6809a5f7366ff0db60647bf4a860f4a07942276e Author: Arnd Bergmann Date: Mon Dec 10 21:45:36 2018 +0100 mmc: sdhci-msm: avoid unused function warning The newly added sdhci_msm_restore_sdr_dll_config() function is only called if CONFIG_PM is enabled: drivers/mmc/host/sdhci-msm.c:1050:12: error: 'sdhci_msm_restore_sdr_dll_config' defined but not used [-Werror=unused-function] Better remove the incorrect #ifdef altogether and just use __maybe_unused, which is harder to get wrong. Signed-off-by: Arnd Bergmann Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 0e6e7c2ff397e1bbebc882ca3132148aaaef1ddd Author: Adrian Hunter Date: Mon Dec 10 10:56:26 2018 +0200 mmc: sdhci-xenon: Fix timeout checks Always check the wait condition before returning timeout. Signed-off-by: Adrian Hunter Reviewed-by: Zhoujie Wu Signed-off-by: Ulf Hansson commit 9f0ea0bda1d06120b053bb0c283f54afec59293d Author: Adrian Hunter Date: Mon Dec 10 10:56:25 2018 +0200 mmc: sdhci-omap: Fix timeout checks Always check the wait condition before returning timeout. Signed-off-by: Adrian Hunter Acked-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson commit ea6d027312111c6d96309ad1a684b33cb37e6764 Author: Adrian Hunter Date: Mon Dec 10 10:56:24 2018 +0200 mmc: sdhci-of-esdhc: Fix timeout checks Always check the wait condition before returning timeout. Signed-off-by: Adrian Hunter Reviewed-by: Yangbo Lu Signed-off-by: Ulf Hansson commit 566b60209427ed6b442b0b0cb3dba04187fba330 Author: YueHaibing Date: Fri Dec 7 06:34:47 2018 +0000 mmc: alcor: remove set but not used variables 'len, clock_out' Fixes gcc '-Wunused-but-set-variable' warning: drivers/mmc/host/alcor.c: In function 'alcor_data_set_dma': drivers/mmc/host/alcor.c:124:12: warning: variable 'len' set but not used [-Wunused-but-set-variable] drivers/mmc/host/alcor.c:648:15: warning: variable 'clock_out' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Reviewed-by: Oleksij Rempel Signed-off-by: Ulf Hansson commit c4916c24ff54fb3dcf07fb64353f8e74e3482b64 Author: Linus Walleij Date: Thu Dec 6 13:08:17 2018 +0100 sh: ecovec24: Fix an ifdef I managed to put the ifdef/else statements wrong when registering the GPIO descriptor table for MMC CD/WP. Fixing it up! Cc: Laurent Pinchart Cc: Kuninori Morimoto Fixes: babd0b238d11 ("mmc: host: tmio: Use GPIO descriptors") Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit b11c36d5d8e393c5766d829c2af75f40e66706c9 Author: Colin Ian King Date: Thu Dec 6 09:24:11 2018 +0000 mmc: sdhci-of-esdhc: fix spelling mistake "upsupported" -> "unsupported" There is a spelling mistake in a pr_warn message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson commit 6827ca573c03385439fdfc8b512d556dc7c54fc9 Author: Kai-Heng Feng Date: Mon Nov 5 16:45:06 2018 +0800 memstick: rtsx_usb_ms: Support runtime power management In order to let host's parent device, rtsx_usb, to use USB remote wake up signaling to do card detection, it needs to be suspended. Hence it's necessary to add runtime PM support for the memstick host. To keep memstick host stays suspended when it's not in use, convert the card detection function from kthread to delayed_work, which can be scheduled when the host is resumed and can be canceled when the host is suspended. Put the device to suspend when there's no card and the power mode is MEMSTICK_POWER_OFF. Signed-off-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko Signed-off-by: Ulf Hansson commit ba9d5f83735fc00297e39ba5cd9ece1c61eb3995 Author: Kai-Heng Feng Date: Mon Nov 5 16:45:05 2018 +0800 memstick: rtsx_usb_ms: Use ms_dev() helper Use ms_dev() helper for consistency. Signed-off-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko Signed-off-by: Ulf Hansson commit e03e303edf1c63e6dd455ccd568c74e93ef3ba8c Author: Kai-Heng Feng Date: Mon Nov 5 16:45:04 2018 +0800 memstick: Prevent memstick host from getting runtime suspended during card detection We can use MEMSTICK_POWER_{ON,OFF} along with pm_runtime_{get,put} helpers to let memstick host support runtime pm. The rpm count may go down to zero before the memstick host powers on, so the host can be runtime suspended. So before doing card detection, increment the rpm count to avoid the host gets runtime suspended. Balance the rpm count after card detection is done. Signed-off-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko Signed-off-by: Ulf Hansson commit 883a87ddf2f118fbce617b1b3472b8224803eb14 Author: Kai-Heng Feng Date: Mon Nov 5 16:45:03 2018 +0800 misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection Although rtsx_usb doesn't support card removal detection, card insertion will resume rtsx_usb by USB remote wakeup signaling. When rtsx_usb gets resumed, also resumes its child devices, rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its slot. Signed-off-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko Signed-off-by: Ulf Hansson commit 01a7e8e066a505933b43a8df6da1ae1a1e7bddf2 Author: Kai-Heng Feng Date: Mon Nov 5 16:45:02 2018 +0800 memstick: rtsx_usb_ms: Add missing pm_runtime_disable() in probe function If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable(). Add missing pm_runtime_disable() for rtsx_usb_ms. Signed-off-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko Signed-off-by: Ulf Hansson commit 4dad599b8b5d1ffc5ef12a2edb13d15d537202ba Author: Ulf Hansson Date: Mon Jun 4 08:30:24 2018 +0200 mmc: rtsx_usb_sdmmc: Re-work card detection/removal support The rtsx USB parent device, has logic to detect when a card is inserted into the card slot. Although, the logic can't detect when a card is removed. This makes things a bit tricky, which is why the current method is simply to turn on MMC_CAP_NEEDS_POLL during probe. Using MMC_CAP_NEEDS_POLL means lots of energy being wasted, as the mmc host becomes runtime resumed frequently by the mmc core, while it polls for new cards being inserted. To address this problem, let's start relying on that the rtsx USB driver runtime resumes its child device, which is the rtsx_usb_sdmmc device, when it detects that a new card being inserted. This means dropping MMC_CAP_NEEDS_POLL from being set during probe. Instead let's implement a ->runtime_resume() callback to schedule a detect work and to set MMC_CAP_NEEDS_POLL. In this way, polling is enabled as long as there is card inserted, thus we can rely on the mmc core to detect also when the card becomes removed. Furthermore, to avoid polling forever after a card has been removed, let's implement a ->runtime_suspend() callback and make it clear MMC_CAP_NEEDS_POLL. Signed-off-by: Ulf Hansson Tested-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko commit f275179f7bdcf08f4c74c2d1d19c4e8269be3454 Author: Ulf Hansson Date: Thu May 31 11:40:40 2018 +0200 mmc: rtsx_usb_sdmmc: Re-work runtime PM support The current implementation uses the runtime PM autosuspend feature with a default timeout set to 50ms. This really doesn't makes sense, as it's a USB driven host device, which needs it rtsx USB device (parent device) to be runtime resumed to provide power to the card. In practise, using the autosuspend or any async runtime PM suspend method, means unnecessary delaying the host device and thus the parent, to be runtime suspended when a card is removed/powered off. For this reasons, let's simply drop the support for runtime PM autosuspend and tell the mmc core to use synced runtime PM suspend methods, via setting MMC_CAP_SYNC_RUNTIME_PM during probe. Moreover, as the mmc core nowadays deploys runtime PM reference counting of the mmc host device, convert ->set_ios() to use the more lightweight pm_runtime_get_noresume() and pm_runtime_put_noidle() APIs. Signed-off-by: Ulf Hansson Tested-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko commit 4bfdd76dcb672dd55121b04ed7f1c1ff4343f1ef Author: Ulf Hansson Date: Thu May 31 11:40:39 2018 +0200 mmc: rtsx_usb_sdmmc: Don't runtime resume the device while changing led In case the card has been powered off, it seems silly to continue to allow the led to be updated. Instead let's forbid that, as it enables us to prevent runtime resuming the device and thus avoids wasting energy. Signed-off-by: Ulf Hansson Tested-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko commit 7d5ef512575663695cf85f3aeb985a0aeb03e364 Author: Ulf Hansson Date: Thu May 31 11:40:38 2018 +0200 mmc: core: Introduce MMC_CAP_SYNC_RUNTIME_PM To allow mmc host drivers to inform the mmc core about rather using pm_runtime_put_sync_suspend() instead of pm_runtime_put_autosuspend(), let's introduce MMC_CAP_SYNC_RUNTIME_PM. This is especially useful for those mmc host drivers that don't benefit from using the runtime PM autosuspend feature. Typically this is those that relies on parent devices to power the card via runtime PM, like some USB host drivers for example. Signed-off-by: Ulf Hansson Tested-by: Kai-Heng Feng Tested-by: Oleksandr Natalenko commit a89e7bcb18081c611eb6cf50edd440fa4983a71a Author: Loic Poulain Date: Tue Dec 4 13:25:32 2018 +0100 mmc: sdhci-msm: Disable CDR function on TX The Clock Data Recovery (CDR) circuit allows to automatically adjust the RX sampling-point/phase for high frequency cards (SDR104, HS200...). CDR is automatically enabled during DLL configuration. However, according to the APQ8016 reference manual, this function must be disabled during TX and tuning phase in order to prevent any interferences during tuning challenges and unexpected phase alteration during TX transfers. This patch enables/disables CDR according to the current transfer mode. This fixes sporadic write transfer issues observed with some SDR104 and HS200 cards. Inspired by sdhci-msm downstream patch: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/432516/ Reported-by: Leonid Segal Reported-by: Manabu Igusa Signed-off-by: Loic Poulain Acked-by: Adrian Hunter Acked-by: Georgi Djakov Signed-off-by: Ulf Hansson commit c5413ad815a675b5c98a002353d8e96b44b164e9 Author: Oleksij Rempel Date: Sun Dec 2 11:30:46 2018 +0100 mmc: add new Alcor Micro Cardreader SD/MMC driver This driver provides support for Alcor Micro AU6601 and AU6621 SD/MMC controller. Signed-off-by: Oleksij Rempel Signed-off-by: Ulf Hansson commit 4f556bc04e3c0de2f5c69adc9e9f2bcefcad079d Author: Oleksij Rempel Date: Sun Dec 2 11:30:45 2018 +0100 misc: cardreader: add new Alcor Micro Cardreader PCI driver This driver provides support for Alcor Micro AU6601 and AU6621 card readers. This is single LUN HW and it is expected to work with following standards: - Support SDR104 / SDR50 - MultiMedia Card (MMC) - Memory Stick (MS) - Memory Stick PRO (MS_Pro) Since it is a PCIe controller, it should work on any architecture supporting PCIe. For now, it was developed and tested only on x86_64. This driver is a result of RE work and was created without any documentation or real knowledge of HW internals. Signed-off-by: Oleksij Rempel Signed-off-by: Ulf Hansson commit 8ceb29436c3acf90e5c3c4d1dc7758a828df969f Author: Yangtao Li Date: Sat Dec 1 10:24:57 2018 -0500 mmc: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Ulf Hansson commit feb357458baa0bd0f644a5bd790841555b959b48 Author: YueHaibing Date: Sat Dec 1 01:45:46 2018 +0000 mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing Acked-by: Joey Pabalinas Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson commit 67b4ff9fb796d8e572a9bb82d851639a81812aa9 Author: Evan Green Date: Wed Nov 28 14:34:26 2018 -0800 dt-bindings: mmc: sdhci-msm: Clarify register requirements In sdhci-msm-v5 and beyond, the MCI registers are removed, so there is only one register region required. Signed-off-by: Evan Green Signed-off-by: Ulf Hansson commit 809090e8e212c88fe011452b827d7a9a7e9c914b Author: Adrian Hunter Date: Tue Nov 27 13:58:33 2018 +0200 mmc: sdhci-pci: Add max-frequency device property for Intel controllers Add support for the mmc max-frequency device property for Intel BYT-based host controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit a622bb0a1e1f6224e2dae0f936006d937db94852 Author: Linus Walleij Date: Sun Dec 2 09:43:28 2018 +0100 mmc: slot-gpio: Delete legacy GPIO handling All host drivers are converted to look up GPIO descriptors from device tree, ACPI or machine descriptor tables, so now we can delete the legacy GPIO handling using hardcoded GPIO numbers from the kernel. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit f54005b508b9a9d9c375b445cd48b0e792b877c6 Author: Linus Walleij Date: Sun Dec 2 09:43:27 2018 +0100 mmc: pxa: Use GPIO descriptor for power After converting the PXA driver to use GPIO descriptors for card detect and write protect it is relatively simple to convert it to also use a descriptor for getting the optional power control GPIO. The polarity inversion flag can also go away from the platform data since this is indicated in the GPIO machine descriptor table. Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Ulf Hansson commit 80a68f387cd69da11aed9cf4911ce8f1a590cd5b Author: Linus Walleij Date: Sun Dec 2 09:43:26 2018 +0100 mmc: pxamci: Delete platform data handling of CD and WP This deletes the code dealing with handling card detect and write protect passed in as platform data and makes the host rely on just GPIO descriptors. The card read only inversion flag has to be kept around for now, as the core cannot handle the inversion flags on the descriptors yet. Since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Ulf Hansson commit e114cd33e678a0d206d60b709f0f0dc26431fde4 Author: Linus Walleij Date: Sun Dec 2 09:43:25 2018 +0100 ARM: pxa: Delete platform data for CD/WP This deletes the platform data passed for card detect and write protect from various PXA machines. Make sure to keep .gpio_card_ro_invert as this is still in use by some machines and needed to set the right flag to the MMC core (will be cleaned up later). Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Ulf Hansson commit c914a27c92f91fe2206a035a3d1f9ac8f7ea1fe5 Author: Linus Walleij Date: Sun Dec 2 09:43:24 2018 +0100 mmc: pxamci: Support getting GPIO descs for RO and WP This implements the code path for the PXAMCI hostso that it can retrieve GPIO descriptors rather than use the global GPIO numberspace for GPIO lines. If the GPIO descriptor is present, it will take precedence and get used in place of the platform data GPIO number. We move the code around a bit so we request the card detect first and the write protect second. We keep the code setting the host flag for the write protect polarity inversion semantics since the slot GPIO core needs to be refactored to deal with this before we can get rid of this. Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Ulf Hansson commit 58e2d877e37018b3804ab2601d9c9ad3fbcc74e7 Author: Linus Walleij Date: Sun Dec 2 09:43:23 2018 +0100 ARM: pxa: Add GPIO descriptors for Palm27x The Palm27x devices set up the MMC card detect and write protect lines with a special helper function. Augment this helper function to also accept an optional GPIO descriptor table and pass and register this for all the Palm27x devices in that family. Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 32d1544880aa87aebe4d20babb48615c65874b02 Author: Linus Walleij Date: Sun Dec 2 09:43:22 2018 +0100 ARM: pxa: Add gpio descriptor lookup tables for MMC CD/WP This adds GPIO descriptor look-up tables for a whole bunch of PXA boards with MMC card detect (CD) and write protect (WP) GPIO lines, so we can move away from the hard-coded GPIO numberspace. In some cases the platforms were compulsively including the header even if they weren't actually using it, and in these cases I simply replaced that inclusion with the more appropriate which is what board files should be including most of the time. Cc: Daniel Mack Cc: Robert Jarzmik Cc: Bartosz Golaszewski Cc: Andrea Adami Signed-off-by: Linus Walleij Acked-by: Robert Jarzmik Signed-off-by: Ulf Hansson commit 5128f8d4450159f59565d247437d3bedda3994cb Author: Linus Walleij Date: Sun Dec 2 09:43:21 2018 +0100 gpio: name PCA953x gpio chips after device name Instead of using the name directly from the I2C client to name the gpio_chip, use dev_name() on the client->dev, so we get the sometimes more unique device name, as I2C has a mechanism for naming its devices explicitly in e.g. board data. This is a prerequisite for being able to reference uniquely any I2C GPIO expander defined in a board file when setting up GPIO descriptor tables. Reviewed-by: Robert Jarzmik Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit d2951dfa070ddb3ae3c48ea8a5d7acb2fa8614bd Author: Linus Walleij Date: Sun Dec 2 09:43:20 2018 +0100 mmc: s3cmci: Use the slot GPIO descriptor Simplify things by making the S3CMCI driver just use slot GPIO with descriptors instead of passing around the global GPIO numbers that we want to get rid of. Getting the names of the GPIO chips into the machine descriptor tables was a bit of a challenge but I think I have them right. The platform data supports passing in inversion flags, but no platform is using them, and it is highly unlikely that we will add more, so drop them. The long term plan is to let the inversion flags on the GPIO machine descriptor do the job. The lines are flagged as GPIO_ACTIVE_[LOW|HIGH] as that is what they are, and since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Cc: Jaehoon Chung Cc: Sylwester Nawrocki Cc: Sergio Prado Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit faed9303067a0bd9d8ddb09c0de3bc742334773a Author: Linus Walleij Date: Sun Dec 2 09:43:19 2018 +0100 mmc: host: tmio: Use GPIO descriptors The TMIO MMC driver was passing global GPIO numbers around for card detect. It turns out only one single board in the kernel was actually making use of this feature so it is pretty easy to convert the driver to use only GPIO descriptors. The lines are flagged as GPIO_ACTIVE_[LOW|HIGH] as that is what they are, and since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Reviewed-by: Laurent Pinchart Acked-by: Kuninori Morimoto Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 5716fb9bd9c6d3e56da07d6ed219dfcfce7d7006 Author: Linus Walleij Date: Sun Dec 2 09:43:18 2018 +0100 mmc: spi: Convert to use GPIO descriptors Switch the SPI MMC driver to use GPIO descriptors internally and just look those up using the standard slot GPIO functions mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Make sure to request index 0 and 1 in accordance with the SPI MMC DT binding, and add the same GPIOs in machine descriptor tables on all boards that use SPI MMC in board files. The lines are flagged as GPIO_ACTIVE_[LOW|HIGH] as that is what they are, and since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Cc: Hartley Sweeten # Vision EP9307 Cc: Kuninori Morimoto Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit b0d06f1cb0e2079a3c64fb6e27c19d9a55c723a1 Author: Nicholas Mc Guire Date: Thu Nov 22 10:35:19 2018 +0100 mmc: meson-mx-sdio: check devm_kasprintf for failure devm_kasprintf() may return NULL on failure of internal allocation thus the assignments to init.name are not safe if not checked. On error meson_mx_mmc_register_clks() returns negative values so -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here. Signed-off-by: Nicholas Mc Guire Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") Acked-by: Martin Blumenstingl Signed-off-by: Ulf Hansson commit 48e304cc1970b65f43c0d2f82aaf48285f0eccd2 Author: Yangbo Lu Date: Fri Nov 23 11:15:37 2018 +0800 mmc: sdhci-of-esdhc: workaround for unreliable pulse width detection This was a SoC issue on LX2160A Rev1.0. eSDHC_DLLCFG1[DLL_PD_PULSE_STRETCH_SEL] must be set to 0 to get 4 delay cells in the pulse width detection logic for eMMC HS400 mode. Otherwise it would cause unexpected HS400 issue. This patch is to clear this bit always for affected SoC when reset for all, since this bit doesn't affect other speed modes. Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson commit 58d0bf843b49fa99588ac9f85178bd8dfd651b53 Author: Yangbo Lu Date: Fri Nov 23 11:15:36 2018 +0800 mmc: sdhci-of-esdhc: temporary fixup for eMMC HS400 issue Currently only LX2160A eSDHC supports eMMC HS400. According to a large number of tests, eMMC HS400 failed to work at 150MHz, and for a few boards failed to work at 175MHz. But eMMC HS400 worked fine on 200MHz. We hadn't found the root cause but setting eSDHC_DLLCFG0[DLL_FREQ_SEL] = 0 using slow delay chain seemed to resovle this issue. Let's use this as fixup for now. Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson commit 6079e63cdeac804bbf3ee7301d447812e5b81d84 Author: Yangbo Lu Date: Fri Nov 23 11:15:35 2018 +0800 mmc: sdhci-of-esdhc: add erratum A011334 support There are timing violations in case of few division ratio options are selected for card clock frequency. prescaler*divisor options /3,/5,/6,/7,/9,/10,/11,/13,/14 and /15 are not available in LX2 Rev1.0. prescaler*divisor options /4,/8 and /12 only available in LX2 Rev1.0. Applicable only for HS400 mode. so by add the erratum A011334 support to limit the prescaler*divisor in LX2 REV1.0 Signed-off-by: Yangbo Lu Signed-off-by: Yinbo Zhu Signed-off-by: Ulf Hansson commit 54e08d9a95ca54a192a9aef76742a4f7e81f6780 Author: Yangbo Lu Date: Fri Nov 23 11:15:34 2018 +0800 mmc: sdhci-of-esdhc: add hs400 mode support 1. Perform the Tuning Process at the HS400 target operating frequency. Latched the clock division value. 2. if read transaction, then set the SDTIMNGCTL[FLW_CTL_BG]. 3. Switch to High Speed mode and then set the card clock frequency to a value not greater than 52Mhz 4. Clear TBCTL[TB_EN],tuning block enable bit. 5. Change to 8 bit DDR Mode 6. Switch the card to HS400 mode. 7. Set TBCTL[TB_EN], tuning block enable bit. 8. Clear SYSCTL[SDCLKEN] 9. Wait for PRSSTAT[SDSTB] to be set 10. Change the clock division to latched value.Set TBCTL[HS 400 mode] and Set SDCLKCTL[CMD_CLK_CTRL] 11. Set SYSCTL[SDCLKEN] 12. Wait for PRSSTAT[SDSTB] to be set 13. Set DLLCFG0[DLL_ENABLE] and DLLCFG0[DLL_FREQ_SEL]. 14. Wait for delay chain to lock. 15. Set TBCTL[HS400_WNDW_ADJUST] 16. Again clear SYSCTL[SDCLKEN] 17. Wait for PRSSTAT[SDSTB] to be set 18. Set ESDHCCTL[FAF] 19. Wait for ESDHCCTL[FAF] to be cleared 20. Set SYSCTL[SDCLKEN] 21. Wait for PRSSTAT[SDSTB] to be set. Signed-off-by: Yangbo Lu Signed-off-by: Yinbo Zhu Signed-off-by: Ulf Hansson commit cc14eec0889bb06abab3d6ea1e0e0676521542c8 Author: Yinbo Zhu Date: Fri Nov 23 11:15:33 2018 +0800 mmc: core: Add ->hs400_prepare_ddr() callback Some eMMC controllers need specific settings for HS400 mode before the speed mode can be switched to DDR mode, during the HS400 initialization sequence. For that reason, let's introduce a new host callback, ->hs400_prepare_ddr() and invoked it just before switching to DDR mode. Signed-off-by: Yinbo Zhu Signed-off-by: Ulf Hansson commit 52b5f5cfa2f736f3e478b65490736b62412dc11c Author: Faiz Abbas Date: Wed Nov 21 16:03:57 2018 +0530 mmc: sdhci-omap: Remove redundant structure assignments The sdhci_execute_tuning() function has assignment of private pointers multiple times. Remove the redundant assignment. Acked-by: Kishon Vijay Abraham I Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 5b0d62108b468b13410533c0ceea3821942bf592 Author: Faiz Abbas Date: Wed Nov 21 16:03:56 2018 +0530 mmc: sdhci-omap: Add platform specific reset callback The TRM (SPRUIC2C - January 2017 - Revised May 2018 [1]) forbids assertion of data reset while tuning is happening. Implement a platform specific callback that takes care of this condition. [1] http://www.ti.com/lit/pdf/spruic2 Section 25.5.1.2.4 Acked-by: Kishon Vijay Abraham I Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 96e03fffa306f3a02e34c1dbc271ea040b8705d0 Author: Ezequiel Garcia Date: Tue Nov 20 15:21:21 2018 -0300 mmc: jz4740: rework pre_req/post_req implementation As reported by Aaro, the JZ4740 MMC driver throws a warning when the kernel is built without preemption (CONFIG_PREEMPT_NONE=y). [ 16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568 [ 16.473120] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 568 host->next_data.cookie 569 [ 16.485144] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 569 host->next_data.cookie 570 [ 16.497170] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 570 host->next_data.cookie 571 The problem seems to be related to how pre_req/post_req is implemented. Currently, it seems the driver expects jz4740_mmc_prepare_dma_data() to be called with monotonically increasing host_cookie values, which is wrong. Moreover, the implementation is overly complicated, keeping track of unneeded "next cookie" state. So, instead of attempting to fix the current pre_req/post_req implementation, this commit refactors the driver, dropping the state, following other drivers such as dw_mmc and sdhci. Cc: Paul Cercueil Cc: Mathieu Malaterre Reported-by: Aaro Koskinen Signed-off-by: Ezequiel Garcia Tested-by: Aaro Koskinen Signed-off-by: Ulf Hansson commit 09b4f706736fb9f9af763d8af41bf6f99944dc0c Author: Ludovic Barre Date: Wed Nov 7 10:30:40 2018 +0100 mmc: mmci: send stop command if sbc error issue Refer to "4.15 set block count command" of sd specification: Host needs to issue CMD12 if any error is detected in the CMD18 and CMD25 operations. In sbc case, the data->stop is fill by framework. Signed-off-by: Ludovic Barre Tested-by: Ulf Hansson Signed-off-by: Ulf Hansson commit 20427e5db3f96fc054c6a6ad95606906b834deb1 Author: Wolfram Sang Date: Mon Dec 3 20:56:47 2018 +0100 mmc: document 'Reliable Write' bit in uapi header If we use it this way, people should know about it. Also, replace true/false with nonzero/zero because the flag is not strictly a bool anymore. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Ulf Hansson commit 1970701f808095d28289c4add99a81be4ddd3790 Author: Wolfram Sang Date: Mon Nov 19 14:13:57 2018 +0100 mmc: tmio: introduce mask for 'always 1' bits Some variants (namely Renesas SDHI) have bits in the STATS and IRQ_MASK registers which are 'always 1' and should be written as such. Introduce a seperate mask for this and apply it whenever such a register is written. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund Signed-off-by: Ulf Hansson commit 0f4e2054c971c827dc9463ff14c7f8f90972eb52 Author: Niklas Söderlund Date: Wed Nov 28 17:18:29 2018 +0100 mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012] The Renesas BSP confirms that H3 ES1.x and M3-W ES1.[012] do not properly support HS400. Add a quirk to indicate this and disable HS400 in the MMC capabilities if the quirk is set. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 2c907f05dc3d8d130e732a4a5035f399e2f7f2c1 Author: Niklas Söderlund Date: Wed Nov 28 17:18:28 2018 +0100 mmc: renesas_sdhi: align compatibility properties for H3 and M3-W It was though all ES revisions of H3 and M3-W SoCs required the TMIO_MMC_HAVE_4TAP_HS400 flag. Recent datasheet updates tells us this is not true, only early ES revisions of the SoC do. Since quirk matching based on ES revisions is now used to handle the flag it's possible to align all Gen3 compatibility properties. This will allow later ES revisions of H3 and M3-W to use the correct 8-tap HS400 mode. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 164691aae88d7fb75c1b2a3e83737b2a52c2f956 Author: Niklas Söderlund Date: Wed Nov 28 17:18:27 2018 +0100 mmc: renesas_sdhi: handle 4tap hs400 mode quirk based on SoC revision Latest datasheet makes it clear that not all ES revisions of the H3 and M3-W have the 4-tap HS400 mode quirk, currently the quirk is set unconditionally for these two SoCs. Prepare to handle the quirk based on SoC revision instead of compatibility value by using soc_device_match() and set the TMIO_MMC_HAVE_4TAP_HS400 flag explicitly. The reason for adding a new quirks struct instead of just a flag is that looking ahead it seems more quirks needs to be handled in a SoC revision basis. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 202367cb8d09c5b003ba4a07860ecd0ea50148b8 Author: Niklas Söderlund Date: Mon Nov 26 18:02:47 2018 +0100 mmc: renesas_sdhi: add initial setting of interrupt mask register The initial value of the interrupt mask register may be different from the H/W manual at the startup of the kernel by setting from the bootloader. Since the error interrupts may be unmasked, the driver sets initial value. The initial value is only known for R-Car Gen2 and Gen3 platforms so limit the initialization to those platforms. Based on work from Masaharu Hayakawa. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit a87852c6b8827b7fece78ae57d871d56e4348e30 Author: Niklas Söderlund Date: Mon Nov 26 18:02:46 2018 +0100 mmc: tmio: fix reset operation SD / MMC did not operate properly when suspend transition failed. Because the SCC was not reset at resume, issue of the command failed. Call the host specific reset function and reset the hardware in order to add reset of SCC. This change also fixes tuning on some stubborn cards on Gen2. Based on work from Masaharu Hayakawa. Signed-off-by: Niklas Söderlund Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit ac1e25c870d30d43c626f2f9f073e74b383554d1 Author: Niklas Söderlund Date: Mon Nov 26 18:02:45 2018 +0100 mmc: tmio: enable module clock before resetting when resuming On runtime power management resume, the host clock needs to be enabled before calling tmio_mmc_reset. If the mmc device has a power domain entry, the host clock is enabled via genpd_runtime_resume, running before tmio_mmc_host_runtime_resume. If the mmc device has no power domain entry, however, genpd_runtime_resume is not called. This patch changes tmio_mmc_host_runtime_resume to enable the host clock before calling tmio_mmc_reset. Based on work from Masaharu Hayakawa. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Reviewed-by: Wolfram Sang Reviewed-by: Masahiro Yamada Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit b0715f04d0c136280da0cfd172f2bee49a64d2d2 Author: Wolfram Sang Date: Mon Nov 26 14:38:14 2018 +0100 mmc: core: remove obsolete mmc_set_blockcount() function The only user was converted to fill a sbc command which is the proper way to do it because of AutoCMD23 feature of some hosts. Signed-off-by: Wolfram Sang Tested-by: Clément Péron Reviewed-by: Avri Altman Reviewed-by: Niklas Söderlund Signed-off-by: Ulf Hansson commit 2f5da678351f0d504966fab113968202aa5713fb Author: Stefan Wahren Date: Sun Nov 11 21:23:59 2018 +0100 mmc: bcm2835: Properly handle dmaengine_prep_slave_sg In case dmaengine_prep_slave_sg fails we need to call dma_unmap_sg. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit 6dc6f2619017109e45550accc120f823fdc31c3e Author: Stefan Wahren Date: Sun Nov 11 21:23:58 2018 +0100 mmc: bcm2835: Refactor dma_map_sg handling There are two variables len within bcm2835_prepare_dma. So rename the result of dma_map_sg to sg_len. While we are at this add a bail out to simplify the following change. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit 37fefadee8bb665ae337a15aa635dabff9f66ade Author: Stefan Wahren Date: Sun Nov 11 21:23:57 2018 +0100 mmc: bcm2835: Terminate timeout work synchronously It's better to make sure that the timeout work is really terminated before calling mmc_request_done. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit af19b7ce76ba220f358c82b0a5e7d68909a23aa5 Author: Stefan Wahren Date: Sun Nov 11 21:23:56 2018 +0100 mmc: bcm2835: Avoid possible races on data requests There are two accesses on the data requests which are not protected by the mutex. So fix this accordingly. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit 5eae252db3856e62c778832d4d59f6efc5b0aaf9 Author: Stefan Wahren Date: Sun Nov 11 21:23:55 2018 +0100 mmc: bcm2835: Release DMA channel on driver unload We need to release the slave DMA channel during driver unload. Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit 07d405769afea5718529fc9e341f0b13b3189b6f Author: Phil Elwell Date: Sun Nov 11 21:23:54 2018 +0100 mmc: bcm2835: Recover from MMC_SEND_EXT_CSD If the user issues an "mmc extcsd read", the SD controller receives what it thinks is a SEND_IF_COND command with an unexpected data block. The resulting operations leave the FSM stuck in READWAIT, a state which persists until the MMC framework resets the controller, by which point the root filesystem is likely to have been unmounted. A less heavyweight solution is to detect the condition and nudge the FSM by asserting the (self-clearing) FORCE_DATA_MODE bit. Link: https://github.com/raspberrypi/linux/issues/2728 Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit f6000a4eb34e6462bc0dd39809c1bb99f9633269 Author: Michal Suchanek Date: Sun Nov 11 21:23:53 2018 +0100 mmc: bcm2835: reset host on timeout The bcm2835 mmc host tends to lock up for unknown reason so reset it on timeout. The upper mmc block layer tries retransimitting with single blocks which tends to work out after a long wait. This is better than giving up and leaving the machine broken for no obvious reason. Fixes: 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.") Signed-off-by: Michal Suchanek Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Signed-off-by: Ulf Hansson commit 74ff81e16c3275a7d0fd4137c8f2279b7a491810 Author: Linus Walleij Date: Mon Nov 12 15:12:35 2018 +0100 mmc: sdhci: imx: Use the slot GPIO descriptor Simplify things by making the i.MX SDHCI driver just use slot GPIO with descriptors instead of passing around the global GPIO numbers that we want to get rid of. As it turns out, just one single board is using the platform data to pass in GPIOs numbers for CD and WP, so we augment this to use a machine descriptor table instead. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij Reviewed-by: Dong Aisheng Signed-off-by: Ulf Hansson commit 0f6f3235b816ef7e6692d6f31920bf6aa2d1623d Author: Linus Walleij Date: Mon Nov 12 15:12:32 2018 +0100 mmc: jz4740: Use GPIO descriptor for power The power GPIO line is passed with inversion flags and all from the platform data. Switch to using an optional GPIO descriptor and use this to switch the power. Augment the only boardfile to pass in the proper "power" descriptor in the GPIO descriptor machine table instead. As the GPIO handling is now much simpler, we can cut down on some overhead code. Cc: Paul Cercueil Cc: linux-mips@linux-mips.org Signed-off-by: Linus Walleij Acked-by: Paul Burton Signed-off-by: Ulf Hansson commit 0c901c0566fb4edc2631c3786e5085a037be91f8 Author: Linus Walleij Date: Mon Nov 12 15:12:31 2018 +0100 mmc: jz4740: Get CD/WP GPIOs from descriptors Modifty the JZ4740 driver to retrieve card detect and write protect GPIO pins from GPIO descriptors instead of hard-coded global numbers. Augment the only board file using this in the process and cut down on passed in platform data. Preserve the code setting the caps2 flags for CD and WP as active low or high since the slot GPIO code currently ignores the gpiolib polarity inversion semantice and uses the raw accessors to read the GPIO lines, but set the right polarity flags in the descriptor table for jz4740. Cc: Paul Cercueil Cc: linux-mips@linux-mips.org Signed-off-by: Linus Walleij Acked-by: Paul Burton Signed-off-by: Ulf Hansson commit ec5af091b28abf6b61c219f08b3407ae24073495 Author: Linus Walleij Date: Mon Nov 12 15:12:30 2018 +0100 mmc: slot-gpio: Allocate GPIO labels dynamically The use of string pointers in the MMC slot GPIO context is pretty dubious, allocating some 2*len extra bytes for each label of the ro and wp pins. Tidy this up using kasprintf() with dynamic allocation of labels for these strings. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson commit 21f1e2d457ce678adc1269cef6e83cd66dc6fdc6 Author: Veerabhadrarao Badiganti Date: Mon Nov 12 12:22:17 2018 +0530 mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically On few SDHCI-MSM controllers, the host controller's clock tuning circuit may go out of sync if controller clocks are gated which eventually will result in data CRC, command CRC/timeout errors. To overcome this h/w limitation, the DLL needs to be re-initialized and restored with its old settings once clocks are ungated. Signed-off-by: Veerabhadrarao Badiganti Reviewed-by: Evan Green Signed-off-by: Ulf Hansson commit 247cb8b7a79670ff37b992012431b7f5ec0e196d Author: Veerabhadrarao Badiganti Date: Mon Nov 12 12:22:16 2018 +0530 dt-bindings: mmc: sdhci-msm: Add SoC-specific compatible strings Add SoC-specific compatible strings for qcom-sdhci controller. Signed-off-by: Veerabhadrarao Badiganti Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit af849c86109d79222e549826068bbf4e7f9a2472 Author: Adrian Hunter Date: Thu Nov 15 15:53:43 2018 +0200 mmc: sdhci: Handle auto-command errors If the host controller supports auto-commands then enable the auto-command error interrupt and handle it. In the case of auto-CMD23, the error is treated the same as manual CMD23 error. In the case of auto-CMD12, commands-during-transfer are not permitted, so the error handling is treated the same as a data error. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 869f8a69bb3a4aec4eb914a330d4ba53a9eed495 Author: Adrian Hunter Date: Thu Nov 15 15:53:42 2018 +0200 mmc: sdhci: Rename SDHCI_ACMD12_ERR and SDHCI_INT_ACMD12ERR The SDHCI_ACMD12_ERR register is used for auto-CMD23 and auto-CMD12 errors, as is the SDHCI_INT_ACMD12ERR interrupt bit. Rename them to SDHCI_AUTO_CMD_STATUS and SDHCI_INT_AUTO_CMD_ERR respectively. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 4bf780996669280171c9cd58196512849b93434e Author: Adrian Hunter Date: Thu Nov 15 15:53:41 2018 +0200 mmc: sdhci: Fix data command CRC error handling Existing data command CRC error handling is non-standard and does not work with some Intel host controllers. Specifically, the assumption that the host controller will continue operating normally after the error interrupt, is not valid. Change the driver to handle the error in the same manner as a data CRC error, taking care to ensure that the data line reset is done for single or multi-block transfers, and it is done before unmapping DMA. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson commit 7e2d23ec3a7d84fa5f64f2f6c66619d40adfdec3 Author: Stefan Wahren Date: Sat Nov 10 17:10:05 2018 +0100 mmc: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Phil Elwell Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Ulf Hansson commit 0204da24a735150310adc8f7530426dfb076f432 Author: Marek Vasut Date: Mon Nov 5 22:39:35 2018 +0100 mmc: renesas_sdhi: Whitelist R8A77990 SDHI Whitelist R8A77990 E3 SoC in the SDHI driver. The SDHI core present in the SoC is an 8tap variant of the Gen3 SDHI core. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: Ulf Hansson Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 2cec67865b0c5f5ce3c2db1a1addf33b24bbf044 Author: Masaharu Hayakawa Date: Thu Nov 1 00:00:43 2018 +0100 mmc: tmio: delete wait in tuning process The manual does not contain information that a wait is needed in the tuning process, this might be a leftover from early development. Removing the wait don't have any effect on operation so delete the wait to shorten the initialization time. Signed-off-by: Masaharu Hayakawa Signed-off-by: Takeshi Saito [Niklas: fixup commit message] Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit df7507b50b496ad9c2da6ad1405ea04c4dfdcc4d Author: Niklas Söderlund Date: Wed Oct 31 23:59:44 2018 +0100 mmc: renesas_sdhi: remove workaround for HS400 clock The driver sets an incorrect clock and depends on the clock driver knowledge of this incorrect setting to still set a 200Mhz SDn clock. Instead of spreading the workaround between the two drivers the clock driver should be made aware of the ES versions where the special clock handling is needed no need to keep this workaround in the SDHI driver. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit cd7a0d211386c1464a7565d01ed00c2d7d2adeae Author: Masahiro Yamada Date: Tue Oct 30 20:05:06 2018 +0900 mmc: sdhci-cadence: include instead of The reason of including here is just for BIT() and GENMASK() macros. Since commit 8bd9cb51daac8 ("locking/atomics, asm-generic: Move some macros from to a new file"), is enough for such compile-time macros. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson commit a68dd9a008e190420f8d44df5c1ba9650fc341f8 Author: Chunyan Zhang Date: Thu Oct 25 10:12:36 2018 +0800 mmc: sdhci: Convert sdhci_allocate_bounce_buffer() to return void The function sdhci_allocate_bounce_buffer() always return zero at present, so there's no need to have a return value, that will also make error path easier. CC: Linus Walleij Signed-off-by: Chunyan Zhang Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson commit bb16956e239e8d859b18a008e783550d6200aa7c Author: Chris Brandt Date: Wed Oct 24 17:23:01 2018 -0500 dt-bindings: mmc: tmio_mmc: Document Renesas R7S9210 Document support for the RZ/A2 (R7S9210) SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson commit 9706b4722e120f2b6ed59e71ff2ff908c264558d Author: Chris Brandt Date: Wed Oct 24 17:23:00 2018 -0500 mmc: renesas_sdhi_internal_dmac: Add R7S9210 support The SDHI/MMC controller in the RZ/A2 is almost the same as R-Car gen3, but with some minor differences. Signed-off-by: Chris Brandt Signed-off-by: Ulf Hansson commit c42160d8efd885b54e681893b615e31b38e3d207 Author: A.s. Dong Date: Thu Oct 18 18:19:24 2018 +0000 dt-bindings: mmc: fsl-imx-esdhc: add imx8qxp compatible string Add imx8qxp compatible string Cc: Rob Herring Cc: Mark Rutland Cc: Ulf Hansson Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: Haibo Chen Signed-off-by: Dong Aisheng Reviewed-by: Rob Herring Signed-off-by: Ulf Hansson commit ae460c115b7aa50c9a36cf78fced07b27962c9d0 Author: Jonas Danielsson Date: Fri Oct 19 16:40:05 2018 +0200 mmc: atmel-mci: do not assume idle after atmci_request_end On our AT91SAM9260 board we use the same sdio bus for wifi and for the sd card slot. This caused the atmel-mci to give the following splat on the serial console: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 538 at drivers/mmc/host/atmel-mci.c:859 atmci_send_command+0x24/0x44 Modules linked in: CPU: 0 PID: 538 Comm: mmcqd/0 Not tainted 4.14.76 #14 Hardware name: Atmel AT91SAM9 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (__warn+0xd8/0xf4) [] (__warn) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null) from [] (atmci_send_command+0x24/0x44) [] (atmci_send_command) from [] (atmci_start_request+0x1f4/0x2dc) [] (atmci_start_request) from [] (atmci_request+0xf0/0x164) [] (atmci_request) from [] (mmc_start_request+0x280/0x2d0) [] (mmc_start_request) from [] (mmc_start_areq+0x230/0x330) [] (mmc_start_areq) from [] (mmc_blk_issue_rw_rq+0xc4/0x310) [] (mmc_blk_issue_rw_rq) from [] (mmc_blk_issue_rq+0x118/0x5ac) [] (mmc_blk_issue_rq) from [] (mmc_queue_thread+0xc4/0x118) [] (mmc_queue_thread) from [] (kthread+0x100/0x118) [] (kthread) from [] (ret_from_fork+0x14/0x34) ---[ end trace 594371ddfa284bd6 ]--- This is: WARN_ON(host->cmd); This was fixed on our board by letting atmci_request_end determine what state we are in. Instead of unconditionally setting it to STATE_IDLE on STATE_END_REQUEST. Signed-off-by: Jonas Danielsson Signed-off-by: Ulf Hansson commit 3df407b2a5346db1c48809706ece7a8616c79e0b Author: Liming Sun Date: Fri Oct 19 10:26:14 2018 -0400 mmc: dw_mmc-bluefield: simplify the probe() function This commit removes the unnecessary of-node check since the dw_mci_bluefield_match[] structure has only one entry. Signed-off-by: Liming Sun Signed-off-by: Ulf Hansson commit f7f41722efacc121cbfd36a8480cd2e66223479d Author: Yangtao Li Date: Wed Dec 5 11:19:00 2018 -0500 dmaengine: qcom_hidma: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Sinan Kaya Signed-off-by: Vinod Koul commit e00f50a79e61396ca531b71e04857120332948d5 Author: Yangtao Li Date: Wed Dec 5 11:18:59 2018 -0500 dmaengine: pxa: remove DBGFS_FUNC_DECL() We already have the DEFINE_SHOW_ATTRIBUTE, There is no need to define such a macro, so remove DBGFS_FUNC_DECL. Signed-off-by: Yangtao Li Acked-by: Robert Jarzmik Signed-off-by: Vinod Koul commit 0f7ab39a6b401a4fef3f3b7004a2e58ef67079af Author: Yangtao Li Date: Wed Dec 5 11:18:58 2018 -0500 dmaengine: mic_x100_dma: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Vinod Koul commit 8e1897bc8eaf1383d6b33d5232136221ffd9c818 Author: Yangtao Li Date: Wed Dec 5 11:18:57 2018 -0500 dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Vinod Koul commit f80f9988a26d71a37dd56c927bb87d2865cc5c29 Author: Seraj Alijan Date: Mon Dec 10 08:52:42 2018 +0000 dmaengine: Documentation: Add documentation for multi chan testing Modify documentation to add multi channel testing support. Signed-off-by: Seraj Alijan Signed-off-by: Vinod Koul commit 13396a130ffec45a736bcc08ad92d35e45f67dd8 Author: Seraj Alijan Date: Mon Dec 10 08:52:39 2018 +0000 dmaengine: dmatest: Add transfer_size parameter Existing transfer size "len" is either generated randomly or set to the size of test_buf_size. In some cases we need to explicitly specify a transfer size that is different from the buffer size and non aligned to test the target device's ability to handle unaligned transfers. This patch adds optional parameter "transfer_size" to allow setting explicit transfer size for dma transfers. Signed-off-by: Seraj Alijan Signed-off-by: Vinod Koul commit a875abfadf265cb1970036898068b34fc63759b7 Author: Seraj Alijan Date: Mon Dec 10 08:52:37 2018 +0000 dmaengine: dmatest: Add alignment parameter Add parameter "alignment" to allow setting the address alignment manually. Having the ability to configure address alignment from user space adds new testing capabilities where different alignments can be configured for testing without having to modify the dma device alignment properties. If configured, the alignment value will override the device alignment property of the target device. Signed-off-by: Seraj Alijan Signed-off-by: Vinod Koul commit 6138f967bccc7a84a167769c2e045c346ad37191 Author: Seraj Alijan Date: Mon Dec 10 08:52:34 2018 +0000 dmaengine: dmatest: Use fixed point div to calculate iops Use fixed point division to calculate iops to prevent reporting 0 iops when operations last for longer than a second. Signed-off-by: Seraj Alijan Signed-off-by: Vinod Koul commit d53513d5dc285d9a95a534fc41c5c08af6b60eac Author: Seraj Alijan Date: Mon Dec 10 08:52:31 2018 +0000 dmaengine: dmatest: Add support for multi channel testing Add support for running tests on multiple channels simultaneously as the driver currently limits to 1 channel per test run. This will add support for stress testing DMA controllers with multi channel capabilities. This is done by adding a callback function to the "channel" parameter that registers the requested channel prior to the "run" parameter being set to 1. Each time the "channel" parameter is populated with a new dma channel, a new test is appended to the thread queue. Once the "run" parameter is set to 1, the test will kick start all pending threads. Signed-off-by: Seraj Alijan Signed-off-by: Vinod Koul commit 47ec4cf405e238dac55df5e380bfe97842e0be68 Author: Fabrizio Castro Date: Thu Dec 13 20:17:43 2018 +0000 dmaengine: rcar-dmac: Document R8A774C0 bindings Renesas' RZ/G2E (R8A774C0) SoC has DMA controllers compatible with this driver, therefore document RZ/G2E specific bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit 3eaba568b54e572187a3f4a08d5582d4d623e7e3 Author: Fabrizio Castro Date: Thu Dec 13 20:21:31 2018 +0000 dt-bindings: dmaengine: usb-dmac: Add binding for r8a774c0 This patch adds bindings for the r8a774c0 (RZ/G2E). Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit d19afebca47602bd9909944eb0ee406dce66174d Author: Ming Lei Date: Mon Dec 17 09:46:01 2018 +0800 blk-wbt: export internal state via debugfs This information is helpful to either investigate issues, or understand wbt's internal behaviour. Cc: Bart Van Assche Cc: Omar Sandoval Cc: Christoph Hellwig Cc: Josef Bacik Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit cc56694f132a8f5fa9334e3afe990de8c3378866 Author: Ming Lei Date: Mon Dec 17 09:46:00 2018 +0800 blk-mq-debugfs: support rq_qos blk-mq-debugfs has been proved as very helpful for debug some tough issues, such as IO hang. We have seen blk-wbt related IO hang several times, even inside Red Hat BZ, there is such report not sovled yet, so this patch adds support debugfs on rq_qos. Cc: Bart Van Assche Cc: Omar Sandoval Cc: Christoph Hellwig Cc: Josef Bacik Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit f9824952ee1cd02ae1a74e35e0e8653f8a4db772 Author: Damien Le Moal Date: Fri Nov 30 14:36:24 2018 +0900 block: update sysfs documentation Add the description of the zoned, nr_zones and chunk_sectors sysfs queue attributes to Documentation/block/queue-sysfs.txt. The description of the zoned and chunk_sector attributes are mostly copied from ABI/testing/sysfs-block (added a typo fix). While at it, also fix a typo in the description of the io_poll_delay attribute. nr_zones description is also added to ABI/testing/sysfs-block and contact email address updated for the zoned attribute. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 95d386c2d2e7660a6447df1507a9845665dab7d8 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:10 2018 +1100 KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L3 guest Previously when a device was being emulated by an L1 guest for an L2 guest, that device couldn't then be passed through to an L3 guest. This was because the L1 guest had no method for accessing L3 memory. The hcall H_COPY_TOFROM_GUEST provides this access. Thus this setup for passthrough can now be allowed. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 6ff887b8bd0d820d9f3371c0ce093d96b73035d6 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:09 2018 +1100 KVM: PPC: Book3S: Introduce new hcall H_COPY_TOFROM_GUEST to access quadrants 1 & 2 A guest cannot access quadrants 1 or 2 as this would result in an exception. Thus introduce the hcall H_COPY_TOFROM_GUEST to be used by a guest when it wants to perform an access to quadrants 1 or 2, for example when it wants to access memory for one of its nested guests. Also provide an implementation for the kvm-hv module. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 873db2cd9a6d7f017d8f4c637cf4166c038c27d6 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:08 2018 +1100 KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L2 guest Allow for a device which is being emulated at L0 (the host) for an L1 guest to be passed through to a nested (L2) guest. The existing kvmppc_hv_emulate_mmio function can be used here. The main challenge is that for a load the result must be stored into the L2 gpr, not an L1 gpr as would normally be the case after going out to qemu to complete the operation. This presents a challenge as at this point the L2 gpr state has been written back into L1 memory. To work around this we store the address in L1 memory of the L2 gpr where the result of the load is to be stored and use the new io_gpr value KVM_MMIO_REG_NESTED_GPR to indicate that this is a nested load for which completion must be done when returning back into the kernel. Then in kvmppc_complete_mmio_load() the resultant value is written into L1 memory at the location of the indicated L2 gpr. Note that we don't currently let an L1 guest emulate a device for an L2 guest which is then passed through to an L3 guest. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit cc6929cc842cceee714c66cd55346b1a9f114a98 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:07 2018 +1100 KVM: PPC: Update kvmppc_st and kvmppc_ld to use quadrants The functions kvmppc_st and kvmppc_ld are used to access guest memory from the host using a guest effective address. They do so by translating through the process table to obtain a guest real address and then using kvm_read_guest or kvm_write_guest to make the access with the guest real address. This method of access however only works for L1 guests and will give the incorrect results for a nested guest. We can however use the store_to_eaddr and load_from_eaddr kvmppc_ops to perform the access for a nested guesti (and a L1 guest). So attempt this method first and fall back to the old method if this fails and we aren't running a nested guest. At this stage there is no fall back method to perform the access for a nested guest and this is left as a future improvement. For now we will return to the nested guest and rely on the fact that a translation should be faulted in before retrying the access. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit dceadcf91b2e0971abe706b6d605ed25de61db0e Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:06 2018 +1100 KVM: PPC: Add load_from_eaddr and store_to_eaddr to the kvmppc_ops struct The kvmppc_ops struct is used to store function pointers to kvm implementation specific functions. Introduce two new functions load_from_eaddr and store_to_eaddr to be used to load from and store to a guest effective address respectively. Also implement these for the kvm-hv module. If we are using the radix mmu then we can call the functions to access quadrant 1 and 2. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit d7b456152230fcec3e98699dc137c763199f509a Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:05 2018 +1100 KVM: PPC: Book3S HV: Implement functions to access quadrants 1 & 2 The POWER9 radix mmu has the concept of quadrants. The quadrant number is the two high bits of the effective address and determines the fully qualified address to be used for the translation. The fully qualified address consists of the effective lpid, the effective pid and the effective address. This gives then 4 possible quadrants 0, 1, 2, and 3. When accessing these quadrants the fully qualified address is obtained as follows: Quadrant | Hypervisor | Guest -------------------------------------------------------------------------- | EA[0:1] = 0b00 | EA[0:1] = 0b00 0 | effLPID = 0 | effLPID = LPIDR | effPID = PIDR | effPID = PIDR -------------------------------------------------------------------------- | EA[0:1] = 0b01 | 1 | effLPID = LPIDR | Invalid Access | effPID = PIDR | -------------------------------------------------------------------------- | EA[0:1] = 0b10 | 2 | effLPID = LPIDR | Invalid Access | effPID = 0 | -------------------------------------------------------------------------- | EA[0:1] = 0b11 | EA[0:1] = 0b11 3 | effLPID = 0 | effLPID = LPIDR | effPID = 0 | effPID = 0 -------------------------------------------------------------------------- In the Guest; Quadrant 3 is normally used to address the operating system since this uses effPID=0 and effLPID=LPIDR, meaning the PID register doesn't need to be switched. Quadrant 0 is normally used to address user space since the effLPID and effPID are taken from the corresponding registers. In the Host; Quadrant 0 and 3 are used as above, however the effLPID is always 0 to address the host. Quadrants 1 and 2 can be used by the host to address guest memory using a guest effective address. Since the effLPID comes from the LPID register, the host loads the LPID of the guest it would like to access (and the PID of the process) and can perform accesses to a guest effective address. This means quadrant 1 can be used to address the guest user space and quadrant 2 can be used to address the guest operating system from the hypervisor, using a guest effective address. Access to the quadrants can cause a Hypervisor Data Storage Interrupt (HDSI) due to being unable to perform partition scoped translation. Previously this could only be generated from a guest and so the code path expects us to take the KVM trampoline in the interrupt handler. This is no longer the case so we modify the handler to call bad_page_fault() to check if we were expecting this fault so we can handle it gracefully and just return with an error code. In the hash mmu case we still raise an unknown exception since quadrants aren't defined for the hash mmu. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit d232afebf97168487e83d1366e41d53609cd1f55 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:04 2018 +1100 KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix() There exists a function kvm_is_radix() which is used to determine if a kvm instance is using the radix mmu. However this only applies to the first level (L1) guest. Add a function kvmhv_vcpu_is_radix() which can be used to determine if the current execution context of the vcpu is radix, accounting for if the vcpu is running a nested guest. Currently all nested guests must be radix but this may change in the future. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 693ac10a88a2219bde553b2e8460dbec97e594e6 Author: Suraj Jitindar Singh Date: Fri Dec 14 16:29:03 2018 +1100 KVM: PPC: Book3S: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines The kvm capability KVM_CAP_SPAPR_TCE_VFIO is used to indicate the availability of in kernel tce acceleration for vfio. However it is currently the case that this is only available on a powernv machine, not for a pseries machine. Thus make this capability dependent on having the cpu feature CPU_FTR_HVMODE. [paulus@ozlabs.org - fixed compilation for Book E.] Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 5af3e9d06d830d52864b39c86724dc39b463eddd Author: Paul Mackerras Date: Wed Dec 12 15:17:17 2018 +1100 KVM: PPC: Book3S HV: Flush guest mappings when turning dirty tracking on/off This adds code to flush the partition-scoped page tables for a radix guest when dirty tracking is turned on or off for a memslot. Only the guest real addresses covered by the memslot are flushed. The reason for this is to get rid of any 2M PTEs in the partition-scoped page tables that correspond to host transparent huge pages, so that page dirtiness is tracked at a system page (4k or 64k) granularity rather than a 2M granularity. The page tables are also flushed when turning dirty tracking off so that the memslot's address space can be repopulated with THPs if possible. To do this, we add a new function kvmppc_radix_flush_memslot(). Since this does what's needed for kvmppc_core_flush_memslot_hv() on a radix guest, we now make kvmppc_core_flush_memslot_hv() call the new kvmppc_radix_flush_memslot() rather than calling kvm_unmap_radix() for each page in the memslot. This has the effect of fixing a bug in that kvmppc_core_flush_memslot_hv() was previously calling kvm_unmap_radix() without holding the kvm->mmu_lock spinlock, which is required to be held. Signed-off-by: Paul Mackerras Reviewed-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit c43c3a8683fe624b67b91a06f1c25cd752a05b3b Author: Paul Mackerras Date: Wed Dec 12 15:16:48 2018 +1100 KVM: PPC: Book3S HV: Cleanups - constify memslots, fix comments This adds 'const' to the declarations for the struct kvm_memory_slot pointer parameters of some functions, which will make it possible to call those functions from kvmppc_core_commit_memory_region_hv() in the next patch. This also fixes some comments about locking. Signed-off-by: Paul Mackerras Reviewed-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit f460f6791a0224cfb019462363caa014c3aec8d7 Author: Paul Mackerras Date: Wed Dec 12 15:16:17 2018 +1100 KVM: PPC: Book3S HV: Map single pages when doing dirty page logging For radix guests, this makes KVM map guest memory as individual pages when dirty page logging is enabled for the memslot corresponding to the guest real address. Having a separate partition-scoped PTE for each system page mapped to the guest means that we have a separate dirty bit for each page, thus making the reported dirty bitmap more accurate. Without this, if part of guest memory is backed by transparent huge pages, the dirty status is reported at a 2MB granularity rather than a 64kB (or 4kB) granularity for that part, causing userspace to have to transmit more data when migrating the guest. Signed-off-by: Paul Mackerras Reviewed-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit f032b73459eed4897bcafee2b1d37a817f1bb596 Author: Bharata B Rao Date: Wed Dec 12 15:15:30 2018 +1100 KVM: PPC: Pass change type down to memslot commit function Currently, kvm_arch_commit_memory_region() gets called with a parameter indicating what type of change is being made to the memslot, but it doesn't pass it down to the platform-specific memslot commit functions. This adds the `change' parameter to the lower-level functions so that they can use it in future. [paulus@ozlabs.org - fix book E also.] Signed-off-by: Bharata B Rao Reviewed-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit ae6750e0a5ef3ec93b01008306183fd7a6d2721f Merge: 0634d694b06fb 5d06a76d9e6d2 Author: David S. Miller Date: Sun Dec 16 15:20:35 2018 -0800 Merge branch 'mlxsw-spectrum_acl-Add-Bloom-filter-support' Ido Schimmel says: ==================== mlxsw: spectrum_acl: Add Bloom filter support Nir says: Spectrum-2 uses Bloom filter to reduce the number of lookups in the algorithmic TCAM (A-TCAM). HW performs multiple exact match lookups in a given region using a key composed of { packet & mask, mask ID, region ID }. The masks which are used in a region are called rule patterns or RP. When such multiple masks are used, the A-TCAM region uses an eRP (extended RP) table that describes which rule patterns are in use and defines the order of the lookup. When eRP table is used in a region, one way to reduce the number of the lookups is to consult a Bloom filter before doing the lookup. A Bloom filter is a space-efficient probabilistic data structure, on which a query returns either "possibly in set" or "definitely not in set". HW can skip a lookup if a query on the Bloom filter results a "definitely not set" response. The mlxsw driver implements a "counting filter" and when either a new entry is marked or the last entry is removed it will update the HW. Update of this counting filter occurs when rule is configured or deleted from a region. Patch #1 adds PEABFE register which is used for setting Bloom filter entries. Patch #2 adds Bloom filter resources. Patch #3 and patch #4 provide Bloom filter handling within mlxsw, by adding initialization and logic for updating the Bloom bit vector in HW. Patch #5 and patch #6 add required calls for Bloom filter update as part of rule configuration flow. Patch #7 handles transitions to and from eRP table. It uses a list to keep A-TCAM rules in order to update rules in Bloom filter, in cases of transitions from master mask based A-TCAM region to an eRP table based region and vice versa. Patch #8 removes a trick done on master RP index to a remaining RP, since Bloom filter is updated on eRP transitions. Finally, patch #9 activates Bloom filter mechanism in HW, by cancelling the bypass that was configured before and the remaining three patches are selftests that exercise the new code. ==================== Signed-off-by: David S. Miller commit 5d06a76d9e6d2d00eadba72548636ff0ff6fabde Author: Nir Dotan Date: Sun Dec 16 08:49:37 2018 +0000 selftests: mlxsw: Add Bloom delta test The eRP table is active when there is more than a single rule pattern. It may be that the patterns are close enough and use delta mechanism. Bloom filter index computation is based on the values of {rule & mask, mask ID, region ID} where the rule delta bits must be cleared. Add a test that exercises Bloom filter with delta mechanism. Configure rules within delta range and pass a packet which is supposed to hit the correct rule. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5118ca4edf9939ed3812ffbfabe7b97164f29635 Author: Nir Dotan Date: Sun Dec 16 08:49:36 2018 +0000 selftests: mlxsw: Add Bloom filter complex test Bloom filter index computation is based on the values of {rule & mask, mask ID, region ID} and the computation also varies according to the region key size. Add a test that exercises the possible combinations by creating multiple chains using different key sizes and then pass a frame that is supposed to to produce a hit on all of the regions. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 095c720807499953b7e16528f705d09675c96c0c Author: Nir Dotan Date: Sun Dec 16 08:49:35 2018 +0000 selftests: mlxsw: Add Bloom filter simple test Add a test that exercises Bloom filter code. Activate eRP table in the region by adding multiple rule patterns which with very high probability use different entries in the Bloom filter. Then send packets in order to check lookup hits on all relevant rules. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 03ce5bd187603ca916ca53843426526f38eab659 Author: Nir Dotan Date: Sun Dec 16 08:49:34 2018 +0000 mlxsw: reg: Activate Bloom filter Now that mlxsw driver handles all aspects of updating the Bloom filter mechanism, set bf_bypass value to false and allow HW to use Bloom filter. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit dd97d85f1e4daaa86d7a2813d718b91e5261df57 Author: Nir Dotan Date: Sun Dec 16 08:49:33 2018 +0000 mlxsw: spectrum_acl: Set master RP index on transition to eRP Bloom filter is updated on transitions from a single rule pattern, also called master RP, to eRP table and vice versa. Since rules are being written to or deleted from the Bloom filter on such transitions, it is not required to keep the same eRP bank ID for the master RP. Change master RP index assignment so it will be assigned with zero. This is consistent with the assignment of the first available spot that is used for allocating eRP's indices. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 135fd957288ed5f6a4ae490373a7910b3e7f7722 Author: Nir Dotan Date: Sun Dec 16 08:49:32 2018 +0000 mlxsw: spectrum_acl: Update Bloom filter on eRP transitions Bloom filter update is required only for rules which reside on an eRP. When the region has only a single rule pattern then eRP table is not used, however insertion of another pattern would trigger a move to an active eRP table so it is imperative to update the Bloom filter with all previously configured rules. Add a method that updates Bloom filter entries for all rules currently configured in the region, on the event of a transition from master mask to eRP, or vice versa. For that purpose, maintain a list of all A-TCAM rules within mlxsw_sp_acl_atcam_region. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8c81b7438bf6abb035ee3009394a837ac8af64a8 Author: Nir Dotan Date: Sun Dec 16 08:49:30 2018 +0000 mlxsw: spectrum_acl: Set A-TCAM rules in Bloom filter Add calls to eRP module for updating Bloom filter when a rule is added or removed from the A-TCAM. eRP module will update the Bloom filter only for cases in which the region has an active eRP table. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f5a2852ed0d74a9b6d9c92bc1ad5124e5e4a703c Author: Nir Dotan Date: Sun Dec 16 08:49:29 2018 +0000 mlxsw: spectrum_acl: Add Bloom filter update Add Bloom filter update for rule insertion and rule removal scenarios. This is done within eRP module in order to assure that Bloom filter updates are done only for rules which are part of an eRP, as HW does not consult Bloom filter for entries when there is a single (master) mask in the region. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7585cacdb978a0cd8d47bff9e5dcecdc9d903add Author: Nir Dotan Date: Sun Dec 16 08:49:28 2018 +0000 mlxsw: spectrum_acl: Add Bloom filter handling Spectrum-2 HW uses Bloom filter in order to skip lookups on specific eRPs. It uses crc-16-Msbit-first calculation over a specific layout of a rule's key fields combined with eRP ID as well as region ID. Per potential lookup, iff the Bloom filter entry of the calculated index is empty, then the lookup can be skipped. Hence, the mlxsw driver should update the Bloom filter entry per each rule insertion or deletion when rules are part of an eRP. Add functions for adding and deleting entries in the Bloom filter. In order to do so also add crc-16 computation based on the specific Spectrum-2 polynomial and a function for encoding the crc-16 input in the manner dictated by HW implementation. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0487cfba866a7f985c51ce7553d37439e10e71c1 Author: Nir Dotan Date: Sun Dec 16 08:49:26 2018 +0000 mlxsw: spectrum_acl: Introduce Bloom filter Lay the foundations for Bloom filter handling. Introduce a new file for Bloom filter actions. Add struct mlxsw_sp_acl_bf to struct mlxsw_sp_acl_erp_core and initialize the Bloom filter data structure. Also take care of proper destruction when terminating. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 944068582fe6e69fd76cb7b90ba2fd5cac04d78e Author: Nir Dotan Date: Sun Dec 16 08:49:25 2018 +0000 mlxsw: resources: Add Spectrum-2 Bloom filter resource Add the maximum Bloom filter logarithmic size per eRP table bank. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 418089a850c751ada5e3535d0e71c3312fe3c432 Author: Nir Dotan Date: Sun Dec 16 08:49:24 2018 +0000 mlxsw: reg: Add Policy Engine Algorithmic Bloom Filter Entries Register Bloom filter is a bit vector which allows the HW a fast lookup on a small size bit vector, that may reduce the number of lookups on the A-TCAM memory. PEABFE register allows setting values to the bits of the bit vector mentioned above. Add the register to be later used in A-TCAM optimizations. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f9facc24a6441d6a82d6cca942b162a394ecba66 Author: YueHaibing Date: Wed Dec 12 08:36:36 2018 +0000 hwmon: (asus_atk0110) Fix debugfs_simple_attr.cocci warnings Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: YueHaibing Signed-off-by: Guenter Roeck commit 626f5eaed15ab81e9ece29d3dc1cf9e5881110f3 Author: Guenter Roeck Date: Mon Dec 10 14:02:06 2018 -0800 hwmon: (ftsteutates) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 22ed7883c138ee5f7c8eec3c12f494f8bd59d8fe Author: Guenter Roeck Date: Mon Dec 10 14:02:06 2018 -0800 hwmon: (fschmd) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 7a61d7197b8eb43fdbc036cd0eeea44986267202 Author: Guenter Roeck Date: Mon Dec 10 14:02:06 2018 -0800 hwmon: (emc6w201) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 94bf70da8ac3f815411a24a6ca42e7327c4a4bbb Author: Guenter Roeck Date: Mon Dec 10 14:02:06 2018 -0800 hwmon: (emc2103) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Steve Glendinning Signed-off-by: Guenter Roeck commit ae66d2d9e881148acb0092be5a3e39982603ac07 Author: Guenter Roeck Date: Mon Dec 10 14:02:05 2018 -0800 hwmon: (emc1403) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 57549f3360eefde08b63886b1477c5751fe2e446 Author: Guenter Roeck Date: Mon Dec 10 14:02:05 2018 -0800 hwmon: (ds620) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 0ad85c07a1053bf95cae6218f4d06328b6dd1b2f Author: Guenter Roeck Date: Mon Dec 10 14:02:05 2018 -0800 hwmon: (ds1621) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit ba949ed62dcd51ba2a514f9a7b6b7de252621536 Author: Guenter Roeck Date: Mon Dec 10 14:02:04 2018 -0800 hwmon: (dell-smm-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: "Pali Rohár" Signed-off-by: Guenter Roeck commit 4b76a6c9b7bb9d0198e2f4e75979a2178925a762 Author: Guenter Roeck Date: Mon Dec 10 14:02:04 2018 -0800 hwmon: (da9055-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Support Opensource Acked-by: Steve Twiss Signed-off-by: Guenter Roeck commit 6db587b73fcebf254454468590b93d294a3368f9 Author: Guenter Roeck Date: Mon Dec 10 14:02:04 2018 -0800 hwmon: (da9052-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Support Opensource Acked-by: Steve Twiss Signed-off-by: Guenter Roeck commit 0cd709d0ddbfc2ed64ecbe2dbe8819b90b977684 Author: Guenter Roeck Date: Mon Dec 10 14:02:04 2018 -0800 hwmon: (coretemp) Replace S_ with octal values Replace S_ with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Fenghua Yu Signed-off-by: Guenter Roeck commit b51c14c736e355c7c7c642a2ea766d8eedf49907 Author: Guenter Roeck Date: Mon Dec 10 14:02:03 2018 -0800 hwmon: (asus_atk0110) Replace S_ with octal values Replace S_ with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Luca Tettamanti Signed-off-by: Guenter Roeck commit e98dd5388b24f8516a058e83a251681dbccfb0c0 Author: Guenter Roeck Date: Mon Dec 10 14:02:03 2018 -0800 hwmon: (aspeed-pwm-tacho) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Joel Stanley Cc: Andrew Jeffery Tested-by: Joel Stanley Signed-off-by: Guenter Roeck commit 71ee4a400013ad187393b9cb32faee98d520516e Author: Guenter Roeck Date: Mon Dec 10 14:02:03 2018 -0800 hwmon: (applesmc) Replace S_ with octal values Replace S_ with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Henrik Rydberg Signed-off-by: Guenter Roeck commit a7818350f60e69737fa053f6b1fb9441bc4d11a6 Author: Guenter Roeck Date: Mon Dec 10 14:02:02 2018 -0800 hwmon: (amc6821) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit f9fe9de0e62d02a1e64abfde55b1032f0d43aec8 Author: Guenter Roeck Date: Mon Dec 10 14:02:02 2018 -0800 hwmon: (adt7x10) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit c24f9ba9adfb0de712da83c626355da29a9e5462 Author: Guenter Roeck Date: Mon Dec 10 14:02:02 2018 -0800 hwmon: (adt7475) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 42291a5aaed748a88dc69c0854a8101cf8f3b3eb Author: Guenter Roeck Date: Mon Dec 10 14:02:02 2018 -0800 hwmon: (adt7470) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit d60a51a690dd359a2973c4f6a58319abbf20a0b0 Author: Guenter Roeck Date: Mon Dec 10 14:02:01 2018 -0800 hwmon: (adt7462) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 595a86af49f0bfba8bf89a69b4b91c1aa038a373 Author: Guenter Roeck Date: Mon Dec 10 14:02:01 2018 -0800 hwmon: (ads7871) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 3ecd2783839c28e41baff1a7f8e9dfa6aa805616 Author: Guenter Roeck Date: Mon Dec 10 14:02:01 2018 -0800 hwmon: (ads7828) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 7e77d1e76d36a231498d17265a1dae9dd337d397 Author: Guenter Roeck Date: Mon Dec 10 14:02:00 2018 -0800 hwmon: (ads1015) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Dirk Eibach Signed-off-by: Guenter Roeck commit cfc5bca6db53eb9ddc062a89993a29731d96c619 Author: Guenter Roeck Date: Mon Dec 10 14:02:00 2018 -0800 hwmon: (adm1021) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit b0c130fdaac18b69abcf577dfd21f84ec53c1eb9 Author: Guenter Roeck Date: Mon Dec 10 14:02:00 2018 -0800 hwmon: (adcxx) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 0594462f97058cb620ffb849b2ffb85e34cb43fe Author: Guenter Roeck Date: Mon Dec 10 14:02:00 2018 -0800 hwmon: (adc128d818) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 6fdc5d7fa9471aba8eba6a1950dab704d313227f Author: Guenter Roeck Date: Mon Dec 10 14:01:59 2018 -0800 hwmon: (ad7418) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit cbf6cb2b7eeac1a87386f3275b3c724019e4401d Author: Guenter Roeck Date: Mon Dec 10 14:01:59 2018 -0800 hwmon: (ad7414) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 1ba3e02376497661348f6ad9a734287d171f4fd7 Author: Guenter Roeck Date: Mon Dec 10 14:01:59 2018 -0800 hwmon: (ad7314) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 419eeabc0df6a13e03ed175b85d74d9c1b599d52 Author: Guenter Roeck Date: Mon Dec 10 14:01:58 2018 -0800 hwmon: (acpi_power_meter) Replace S_ with octal values Replace S_ with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit 4708e96831aa21df56aad1b65c74e265687042ea Author: Guenter Roeck Date: Mon Dec 10 14:01:58 2018 -0800 hwmon: (abx500) Use permission specific SENSOR[_DEVICE]_ATTR variants Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsistencies. Also replace any remaining S_ in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck commit d93217d84c6c7ef74bfeb606a1fb1ee28720646b Author: Pu Wen Date: Sat Dec 8 14:33:28 2018 +0800 hwmon: (k10temp) Add Hygon Dhyana support Add support for Hygon Dhyana family 18h processor for k10temp to get the temperature. As Hygon Dhyana shares the same function interface with AMD family 17h, so add Hygon PCI Vendor ID and reuse the code path of AMD. Signed-off-by: Pu Wen Acked-by: Borislav Petkov Signed-off-by: Guenter Roeck commit d7f2a8f596ba2a8c7b7cc6d7a86f1e419def87b6 Author: Guenter Roeck Date: Thu Dec 6 11:07:32 2018 -0800 hwmon: (ltc4215) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 6a0f234fb42111545f071971b25e5f8462621a8a Author: Guenter Roeck Date: Thu Dec 6 11:06:23 2018 -0800 hwmon: (ina2xx) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit e36917f486a85e81ed02490a476cde8179e6b14f Author: Guenter Roeck Date: Thu Dec 6 10:59:49 2018 -0800 hwmon: (tmp401) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 740c2f2b86a71ad673f329241ac25cfe647aacd4 Author: Guenter Roeck Date: Thu Dec 6 10:54:38 2018 -0800 hwmon: (max6697) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit cb1d85341fd781ef166525cfd5e3b33c5c05f7c9 Author: Guenter Roeck Date: Thu Dec 6 10:48:56 2018 -0800 hwmon: (pwm-fan) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit c4043410f73d76e07b85685366758e4e16ee0082 Author: Guenter Roeck Date: Thu Dec 6 10:47:37 2018 -0800 hwmon: (ntc_thermistor) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 4400711732fb1f9451d4f86319118148c3da670b Author: Guenter Roeck Date: Thu Dec 6 10:46:16 2018 -0800 hwmon: (max6650) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 3d628b29dbec70d7a0eda3d6bcf30198586666e2 Author: Guenter Roeck Date: Thu Dec 6 10:44:42 2018 -0800 hwmon: (ltc4260) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 4aabaf30976eac011b70aa7c0e1fb385331e22f2 Author: Guenter Roeck Date: Thu Dec 6 10:41:54 2018 -0800 hwmon: (nct7802) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 33721d90c0444133219f9773cb6d88f380699fa4 Author: Guenter Roeck Date: Thu Dec 6 10:38:29 2018 -0800 hwmon: (lm95234) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/blob/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit fac5ba6f5bf7fe9d2923ac4bbd85fa905f249633 Author: Guenter Roeck Date: Thu Dec 6 10:33:21 2018 -0800 hwmon: (k10temp) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Auto-conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/blob/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit 5614e26d84a99a83f8b7092f1f68d3b04895506f Author: Guenter Roeck Date: Thu Dec 6 10:23:25 2018 -0800 hwmon: (ltc2945): Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} Conversion was done done using the coccinelle script at https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci Signed-off-by: Guenter Roeck commit a5c47c0d388b939dd578fd466aa804b7f2445390 Author: Guenter Roeck Date: Tue Dec 27 15:28:19 2016 -0800 hwmon: Introduce SENSOR_DEVICE_ATTR_{RO, RW, WO} and variants Introduce SENSOR_DEVICE_ATTR_{RO,RW,WO} and SENSOR_DEVICE_ATTR_2_{RO,RW,WO} as simplified variants of SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 to simplify the source code, improve readbility, and reduce the chance of inconsistencies. Signed-off-by: Guenter Roeck commit 2e9a41bbc1079776dabe42ed8113b086b99ae56c Author: Jagan Teki Date: Thu Dec 6 02:44:22 2018 +0530 hwmon: (lm75) Add STLM75 support The STLM75 is a high-precision digital CMOS temperature sensor IC with a sigma-delta temperature-to-digital converter. The configuration register mapping is similar to existing lm75 but the sample rate is 150ms(max). Tested on real hardware and verified temperature readings are correct. Signed-off-by: Jagan Teki Signed-off-by: Guenter Roeck commit 48049e205e7071c733508e12b036c3845d0e84a9 Author: Thierry Reding Date: Fri Nov 23 13:08:46 2018 +0100 dt-bindings: hwmon: (lm90) Document ti,tmp451 compatible string The TI TMP451 temperature sensors are compatible with the National LM90 temperature sensors. Signed-off-by: Thierry Reding Signed-off-by: Guenter Roeck commit 737c086eddab6fae699ad7fc6963a91837b62b51 Author: Peter Rosin Date: Wed Nov 21 16:03:46 2018 +0000 hwmon: (ntc_thermistor) use a table to lookup the thermistor type Sort the entries while at it. Signed-off-by: Peter Rosin Signed-off-by: Guenter Roeck commit e056fe25d9f021d45c3fb6068d11e56e9579754b Author: Peter Rosin Date: Wed Nov 21 16:03:39 2018 +0000 hwmon: (ntc_thermistor) sort thermistor id lists alphabetically Use an enum to index the array, so that it is possible to add sorted entries without causing churn. Signed-off-by: Peter Rosin Signed-off-by: Guenter Roeck commit e8fda2c8646e504a732fbe7507c543279323c3d9 Author: Peter Rosin Date: Sat Nov 17 12:13:00 2018 +0000 hwmon: (ntc_thermistor): add support for B57891S0103 from Epcos More of the same... Signed-off-by: Peter Rosin Signed-off-by: Guenter Roeck commit e1fd3be613e9d00c4b04ba0e9de1a6233fceedf2 Author: Peter Rosin Date: Sat Nov 17 12:12:57 2018 +0000 dt-bindings: hwmon: (ntc_thermistor) add B57891S0103 thermistor from Epcos These are Negative Temperature Coefficient thermistors, like the others in the list. Signed-off-by: Peter Rosin Signed-off-by: Guenter Roeck commit 89688e8d1ecda59edc4e0ceb430aedaac18ca071 Author: Colin Ian King Date: Mon Nov 26 16:28:32 2018 +0000 hwmon: (ltc2978) Fix spelling mistake "comppatible" -> "compatible" There is a spelling mistake in the module description text, fix it. Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck commit 772df3c51e808bb6a71f8540c3c9a2b4ce4e2ead Author: Corentin Labbe Date: Thu Nov 29 20:09:15 2018 +0000 hwmon: Remove multiple space after dot This patch remove extra space after a dot. Signed-off-by: Corentin Labbe Signed-off-by: Guenter Roeck commit b71464c937f19f4e33d03c8379f03142d2381811 Author: Corentin Labbe Date: Thu Nov 29 20:09:14 2018 +0000 hwmon: fix typo build -> built This patch fix a typo where build is used instead of built. Signed-off-by: Corentin Labbe Signed-off-by: Guenter Roeck commit 162372b08879e970a4ca4b65e5acede6ebe7d1dc Author: Michele Sorcinelli Date: Fri Nov 30 18:42:56 2018 +0000 dell-smm-hwmon.c: Add XPS 9570 to supported devices list Allow the module to be loaded on Dell XPS 9570, without having to provide the "force=1" option. Signed-off-by: Michele Sorcinelli Reviewed-by: Pali Rohár Signed-off-by: Guenter Roeck commit 3f9ffa5c3a25bf2a3c880b07f620c8ef029dc261 Author: Vadim Pasternak Date: Tue Nov 20 23:16:36 2018 +0000 hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading Modify macros for tachometer fault status reading for making it more simple and clear. Signed-off-by: Vadim Pasternak Signed-off-by: Guenter Roeck commit 9a629d7ada78c32e2100eb5ca6a25c6248d90bd9 Author: Nicolin Chen Date: Mon Nov 19 12:31:16 2018 -0800 Documentation: hwmon: Add descriptions for ina2xx sysfs entries There are a few sysfs entries being exposed to user space by the ina2xx hwmon driver while not getting explicitly documented. So this patch just adds a description section for them. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 1b1f4efab0e4c8a75b772369682ff423d2df59f3 Author: Rob Herring Date: Fri Nov 16 16:05:38 2018 -0600 hwmon: (ina3221) Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Jean Delvare Cc: Guenter Roeck Signed-off-by: Rob Herring Signed-off-by: Guenter Roeck commit 25bbdccfcd8c07c44feb74700f556546ef340f0f Author: Heiko Stuebner Date: Wed Nov 7 16:47:08 2018 +0100 dt-bindings: hwmon: tmp108: add optional interrupts and #thermal-sensor-cells The tmp108 does have an alert output that can be used as interrupt source and can of course also be used as part of a thermal sensor setup for things like thermal-based cpu frequencies, so document the necessary properties. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck commit b6611bcd5144e61a9cc21ee55c74aff688dff3f0 Author: Nicolin Chen Date: Mon Nov 12 20:36:56 2018 -0800 hwmon (lm63) Do not overwrite data->kind According to the code right before the removed line, data->kind should be either from DT or from id pointer. So there shouldn't be an additional overwriting after the if-else statement. So this patch just removes the overwriting line. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 323aeb0eb5d9a6820130dfab1214a83edf385dcd Author: Nicolin Chen Date: Mon Nov 5 12:48:43 2018 -0800 hwmon: (ina3221) Add PM runtime support If all three channels are disabled via in[123]_enable ABI, the driver could suspend the chip for power saving purpose. So this patch adds the PM runtime support in order to gain more power control than system suspend and resume use case. For PM runtime, there are a few related changes happening: 1) Added a new pm_dev device pointer for all the PM runtime callbacks. This is because hwmon core registers a child device for each hwmon driver and passes it back to each driver. So there might be a mismatch between two device pointers in the driver if mixing using them. 2) Added a check in ina3221_is_enabled() to make sure that the chip is resumed. 3) Bypassed the unchanged status in ina3221_write_enable() in order to keep the PM runtime refcount being matched. 4) Removed the reset routine in the probe() by calling the resume() via pm_runtime_get_sync() instead, as they're similar. It's also necessary to do so to match initial PM refcount with the number of enabled channels. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 4c0415a371fdbac6531d435a50745255e32d0e0e Author: Nicolin Chen Date: Mon Nov 5 12:48:42 2018 -0800 hwmon: (ina3221) Make sure data is ready before reading The data might need some time to get ready after channel enabling, although the data register is always readable. The CVRF bit is to indicate that data conversion is finished, so polling the CVRF bit before data reading could ensure the result being valid. An alternative way could be to wait for expected time between the channel enabling and the data reading. And this could avoid extra I2C communications. However, INA3221 seemly takes longer time than what's stated in the datasheet. Test results show that sometimes it couldn't finish data conversion in time. So this patch plays safe by adding a CVRF polling to make sure the data register is updated with the new data. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit 87625b24986bc2aeea20cf8a795b01a799a471b0 Author: Nicolin Chen Date: Mon Nov 5 12:48:41 2018 -0800 hwmon: (ina3221) Serialize sysfs ABI accesses This change adds a mutex to serialize accesses of sysfs attributes. This is required when polling CVRF bit of the MASK/ENABLE register because this bit is cleared on a read of this MASK/ENABLE register or a write to CONFIG register, which means that this bit might be accidentally cleared by reading other fields like alert flags. So this patch adds a mutex lock to protect the write() and read() callbacks. The read_string() callback won't need the lock since it just returns the label without touching any hardware register. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit efb0489ea8fa12c6a5b51c0b3e35f4f3d5d54939 Author: Nicolin Chen Date: Mon Nov 5 12:48:40 2018 -0800 hwmon: (ina3221) Check channel status for alarms attribute read There is nothing critically wrong to read these two attributes without having a is_enabled() check at this point. But reading the MASK_ENABLE register would clear the CVRF bit according to the datasheet. So it'd be safer to fence for disabled channels in order to add pm runtime feature. Signed-off-by: Nicolin Chen Signed-off-by: Guenter Roeck commit df04ced684d48f6ec5729ccd034702952160c6b3 Author: Eddie James Date: Thu Nov 8 15:05:29 2018 -0600 hwmon (occ): Add sysfs attributes for additional OCC data The OCC provides a variety of additional information about the state of the host processor, such as throttling, error conditions, and the number of OCCs detected in the system. This information is essential to service processor applications such as fan control and host management. Therefore, export this data in the form of sysfs attributes attached to the platform device (to which the hwmon device is also attached). Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit 54076cb3b5ff21f6474f5fd254a0b018b24771df Author: Eddie James Date: Thu Nov 8 15:05:28 2018 -0600 hwmon (occ): Add sensor attributes and register hwmon device Setup the sensor attributes for every OCC sensor found by the first poll response. Register the attributes with hwmon. Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit c10e753d43ebd1d17e1c62bcee20c6124c2c7cca Author: Eddie James Date: Thu Nov 8 15:05:27 2018 -0600 hwmon (occ): Add sensor types and versions Add structures to define all sensor types and versions. Add sysfs show and store functions for each sensor type. Add a method to construct the "set user power cap" command and send it to the OCC. Add rate limit to polling the OCC (in case user-space reads our hwmon entries rapidly). Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit aa195fe49b033db545ad986cdb2c431c37bea557 Author: Eddie James Date: Thu Nov 8 15:05:26 2018 -0600 hwmon (occ): Parse OCC poll response Add method to parse the response from the OCC poll command. This only needs to be done during probe(), since the OCC shouldn't change the number or format of sensors while it's running. The parsed response allows quick access to sensor data, as well as information on the number and version of sensors, which we need to instantiate hwmon attributes. Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit 88be37c07c1524102aed5736094cfacf24407b46 Author: Eddie James Date: Thu Nov 8 15:05:25 2018 -0600 hwmon (occ): Add command transport method for P8 and P9 For the P8 OCC, add the procedure to send a command to the OCC over I2C bus. This involves writing the OCC command registers with serial communication operations (SCOMs) interpreted by the I2C slave. For the P9 OCC, add a procedure to use the OCC in-kernel API to send a command to the OCC through the SBE. Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit 5b5513b8800291226a8fa63fd22a14cc235b313e Author: Eddie James Date: Thu Nov 8 15:05:24 2018 -0600 hwmon: Add On-Chip Controller (OCC) hwmon driver The OCC is a device embedded on a POWER processor that collects and aggregates sensor data from the processor and system. The OCC can provide the raw sensor data as well as perform thermal and power management on the system. This driver provides a hwmon interface to the OCC from a service processor (e.g. a BMC). The driver supports both POWER8 and POWER9 OCCs. Communications with the POWER8 OCC are established over standard I2C bus. The driver communicates with the POWER9 OCC through the FSI-based OCC driver, which handles the lower-level communication details. This patch lays out the structure of the OCC hwmon driver. There are two platform drivers, one each for P8 and P9 OCCs. These are probed through the I2C tree and the FSI-based OCC driver, respectively. The patch also defines the first common structures and methods between the two OCC versions. Signed-off-by: Eddie James [groeck: Fix up SPDX license identifier] Signed-off-by: Guenter Roeck commit 0634d694b06fb522ec6bc8001b24c4b828897f69 Merge: 5312b93b04208 31d31951d00a3 Author: David S. Miller Date: Sun Dec 16 14:42:35 2018 -0800 Merge branch 'rtnl-fdb-get' Roopa Prabhu says: ==================== rtnl fdb get This series adds support for rtnl fdb get similar to route get. v2: add nda_policy, fixes to exact msgs, strict nlmsg parsing v3: remove unnecessary attribute length checks + simplify code as pointed out by david ==================== Signed-off-by: David S. Miller commit 31d31951d00a3ec6335dad36cd49a4767e2bb304 Author: Roopa Prabhu Date: Sat Dec 15 22:35:11 2018 -0800 selftests: net: rtnetlink.sh: add fdb get test tests the below three cases of bridge fdb get: [bridge, mac, vlan] [bridge_port, mac, vlan, flags=[NTF_MASTER]] [vxlandev, mac, flags=NTF_SELF] depends on iproute2 support for bridge fdb get. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller commit 474c3c896ff29fbd69b13d99f2f66dd6da3b6634 Author: Roopa Prabhu Date: Sat Dec 15 22:35:10 2018 -0800 vxlan: support for ndo_fdb_get This patch implements ndo_fdb_get for a vxlan device. Signed-off-by: Roopa Prabhu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4767456212f8cd70775dc55d9bc72e184ff84642 Author: Roopa Prabhu Date: Sat Dec 15 22:35:09 2018 -0800 bridge: support for ndo_fdb_get This patch implements ndo_fdb_get for the bridge fdb. Signed-off-by: Roopa Prabhu Acked-by: Nikolay Aleksandrov Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5b2f94b27622d5b92d1cebf4bb5a627db4444607 Author: Roopa Prabhu Date: Sat Dec 15 22:35:08 2018 -0800 net: rtnetlink: support for fdb get This patch adds support for fdb get similar to route get. arguments can be any of the following (similar to fdb add/del/dump): [bridge, mac, vlan] or [bridge_port, mac, vlan, flags=[NTF_MASTER]] or [dev, mac, [vni|vlan], flags=[NTF_SELF]] Signed-off-by: Roopa Prabhu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5312b93b04208bb055a2ee1fd6c8617905d8b330 Merge: 036b9e7caeb09 8a75b9d4c9d32 Author: David S. Miller Date: Sun Dec 16 14:23:33 2018 -0800 Merge branch 'dsa-tag-cleanups' Marek Vasut says: ==================== net: dsa: ksz: Clean up the tag code in prep for more switches Clean up the KSZ DSA tag code in preparation for adding more switches. ==================== Signed-off-by: David S. Miller commit 8a75b9d4c9d32c88b487bd98bf8019f029215165 Author: Marek Vasut Date: Sat Dec 15 01:58:06 2018 +0100 net: dsa: ksz: Add STP multicast handling In case the destination address is link local, add override bit into the switch tag to let such a packet through the switch even if the port is blocked. Signed-off-by: Marek Vasut Cc: Tristram Ha Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bafe9ba7d908f6240b3ca898b167072c55502609 Author: Tristram Ha Date: Sat Dec 15 01:58:05 2018 +0100 net: dsa: ksz: Factor out common tag code Factor out common code from the tag_ksz , so that the code can be used with other KSZ family switches which use differenly sized tags. Signed-off-by: Tristram Ha Signed-off-by: Marek Vasut Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 39d6b96f9fc2d99c4619954f462ba32e5d48502e Author: Tristram Ha Date: Sat Dec 15 01:58:04 2018 +0100 net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 Rename the tag Kconfig option and related macros in preparation for addition of new KSZ family switches with different tag formats. Signed-off-by: Tristram Ha Signed-off-by: Marek Vasut Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 036b9e7caeb09598afb297a6d4fb36b477a4f6b2 Author: Jakub Kicinski Date: Fri Dec 14 15:01:54 2018 -0800 nfp: abm: allow to opt-out of RED offload FW team asks to be able to not support RED even if NIC is capable of buffering for testing and experimentation. Add an opt-out flag. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 9c46ae0ea1ee84012737c3da3af2930b494d56f7 Author: David S. Miller Date: Sun Dec 16 12:36:41 2018 -0800 Revert "net: dccp: initialize (addr,port) listening hashtable" This reverts commit ec49d83f245453515a9b6e88324e27bbcb69fbae. Cause build failures when DCCP is modular. ERROR: "inet_hashinfo2_init" [net/dccp/dccp.ko] undefined! Signed-off-by: David S. Miller commit df9b0e30d44c901ac27c0f38cd54511b3f130c6d Author: David Ahern Date: Sat Dec 15 14:09:06 2018 -0800 neighbor: Add protocol attribute Similar to routes and rules, add protocol attribute to neighbor entries for easier tracking of how each was created. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 11fb60d1089f52dd9003d02cf2590c9b56eda840 Author: Peter Oskolkov Date: Sat Dec 15 14:27:24 2018 -0800 selftests: net: reuseport_addr_any: add DCCP This patch adds coverage of DCCP to reuseport_addr_any selftest. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit ec49d83f245453515a9b6e88324e27bbcb69fbae Author: Peter Oskolkov Date: Sat Dec 15 14:27:23 2018 -0800 net: dccp: initialize (addr,port) listening hashtable Commit d9fbc7f6431f "net: tcp: prefer listeners bound to an address" removes port-only listener lookups. This caused segfaults in DCCP lookups because DCCP did not initialize the (addr,port) hashtable. This patch adds said initialization. The only non-trivial issue here is the size of the new hashtable. It seemed reasonable to make it match the size of the port-only hashtable (= INET_LHTABLE_SIZE) that was used previously. Other parameters to inet_hashinfo2_init() match those used in TCP. Tested: syzcaller issues fixed; the second patch in the patchset tests that DCCP lookups work correctly. Fixes: d9fbc7f6431f "net: tcp: prefer listeners bound to an address" Reported-by: syzcaller Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 38a3499f6d0cb15bd673e517b0656807e22bfd24 Author: Chengguang Xu Date: Sun Dec 16 17:35:00 2018 +0800 block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add() blk_mq_init_queue() will not return NULL pointer to its caller, so it's better to replace IS_ERR_OR_NULL using IS_ERR in loop_add(). If in the future things change to check NULL pointer inside loop_add(), we should return -ENOMEM as return code instead of PTR_ERR(NULL). Signed-off-by: Chengguang Xu Signed-off-by: Jens Axboe commit e7cc005fef03d2b13246d800e497418d570ad6da Author: Chengguang Xu Date: Sun Dec 16 14:08:18 2018 +0800 aoe: add __exit annotation Add __exit annotation to cleanup helper which is only called once in the module. Signed-off-by: Chengguang Xu Signed-off-by: Jens Axboe commit d04c406f29d9f4dbcb5eb5aa79ce0445c7e9d652 Author: Christoph Hellwig Date: Fri Dec 14 17:21:22 2018 +0100 block: clear REQ_HIPRI if polling is not supported This prevents a HIPRI bio from being submitted through a stacking driver that does not support polling and thus won't poll for I/O completion. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d6a51a97c0b2e21fec224746c2683ff739bcf4ae Author: Jianchao Wang Date: Fri Dec 14 09:28:20 2018 +0800 blk-mq: replace and kill blk_mq_request_issue_directly Replace blk_mq_request_issue_directly with blk_mq_try_issue_directly in blk_insert_cloned_request and kill it as nobody uses it any more. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 5b7a6f128aad761b471ca0ff620b4841b38e596f Author: Jianchao Wang Date: Fri Dec 14 09:28:19 2018 +0800 blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests It is not necessary to issue request directly with bypass 'true' in blk_mq_sched_insert_requests and handle the non-issued requests itself. Just set bypass to 'false' and let blk_mq_try_issue_directly handle them totally. Remove the blk_rq_can_direct_dispatch check, because blk_mq_try_issue_directly can handle it well.If request is direct-issued unsuccessfully, insert the reset. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 7f556a44e61d0b62d78db9a2662a5f0daef010f2 Author: Jianchao Wang Date: Fri Dec 14 09:28:18 2018 +0800 blk-mq: refactor the code of issue request directly Merge blk_mq_try_issue_directly and __blk_mq_try_issue_directly into one interface to unify the interfaces to issue requests directly. The merged interface takes over the requests totally, it could insert, end or do nothing based on the return value of .queue_rq and 'bypass' parameter. Then caller needn't any other handling any more and then code could be cleaned up. And also the commit c616cbee ( blk-mq: punt failed direct issue to dispatch list ) always inserts requests to hctx dispatch list whenever get a BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE, this is overkill and will harm the merging. We just need to do that for the requests that has been through .queue_rq. This patch also could fix this. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe commit 4c9770c90fc5b6d6b6d190d108c061015f5804f7 Author: Christoph Hellwig Date: Thu Dec 13 21:32:14 2018 +0100 block: remove the bio_integrity_advance export Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 61a0902a06d602377cb6526deacfe4f0a7eade73 Author: Masahiro Yamada Date: Fri Dec 14 17:05:39 2018 +0900 kbuild: add -Werror=implicit-int flag unconditionally This flag is documented in the GCC 4.6 manual, and recognized by Clang as well. Let's rip off the cc-option switch. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit eeb5687a7139649e1724674441580b778f5ff7ab Author: Masahiro Yamada Date: Fri Dec 14 17:05:38 2018 +0900 kbuild: add -Werror=strict-prototypes flag unconditionally -Wstrict-prototypes is added to KBUILD_CFLAGS first, then overridden by -Werror=strict-prototypes later. Let's add -Werror=strict-prototypes unconditionally because it is supported by GCC 4.6, and also by Clang. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 42a92bccd213ce4b7198d2e943ac0efe88cbe1aa Author: Masahiro Yamada Date: Fri Dec 14 17:05:37 2018 +0900 kbuild: add -fno-PIE flag unconditionally This flag is documented in the GCC 4.6 manual, and recognized by Clang as well. Let's rip off the cc-option switch. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 518d8a5644197abd3d5efb23c71afff25194da7e Author: Julia Lawall Date: Wed Dec 12 12:55:57 2018 +0100 scripts: coccinelle: Correct warning message "Assignment" requires the assigned value before the place that value is stored into. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada commit b825b4325354db65fd632b26ba585ced85f33902 Author: Julia Lawall Date: Wed Dec 12 12:55:56 2018 +0100 scripts: coccinelle: only suggest true/false in files that already use them Some code may overall use 0 and 1, so don't introduce occasional uses of true and false in these cases. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada commit 1d467bb8a8b95caa01a240362589215739505233 Author: Masahiro Yamada Date: Tue Dec 11 21:01:56 2018 +0900 kbuild: handle part-of-module correctly for *.ll and *.symtypes The single targets *.ll and *.symtypes have never been treated as a module. Fix it. Signed-off-by: Masahiro Yamada commit 96c0a9180a1279c8ca5d9ea3096f2944828194d3 Author: Masahiro Yamada Date: Tue Dec 11 21:01:55 2018 +0900 kbuild: refactor part-of-module Use $(foreach ...) to make it shorter. Signed-off-by: Masahiro Yamada commit 45c4372d002bbf7342ea0426af896691ebc3a2f7 Author: Masahiro Yamada Date: Tue Dec 11 21:01:54 2018 +0900 kbuild: refactor quiet_modtag part-of-module and quiet_modtag are set for the same targets. Define quiet_modtag based on part-of-module. Signed-off-by: Masahiro Yamada commit b39a691617e4a7ba83bb33386e09206e60261a22 Author: Masahiro Yamada Date: Tue Dec 11 21:01:53 2018 +0900 kbuild: remove redundant quiet_modtag for $(obj-m) All objects in $(obj-m) are contained in $(real-obj-m) as well. It is true composite objects are only contained in $(obj-m), but [M] is hard-coded in quiet_cmd_link_multi-m. This line is redundant. Signed-off-by: Masahiro Yamada commit 74030653f0b9736f179c1c4e713ba1f2070aa0dd Author: Christoph Hellwig Date: Thu Dec 13 21:32:13 2018 +0100 block: remove the bioset_integrity_free export Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7d0e5c2056c70ff443188b6e603b6254af1304cc Author: Masahiro Yamada Date: Wed Dec 5 20:28:04 2018 +0900 kbuild: refactor Makefile.asm-generic - Use conventional $(MAKE) $(asm-generic)= style for directory descending - Remove unneeded FORCE since "all" is a phony target - Remove unneeded "_dummy :=" assignment - Skip $(shell mkdir ...) when headers exist in the directory - Misc cleanups Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit 40906ebe3af6a48457151b3c6726b480f6a6cb13 Author: Mantas Mikulėnas Date: Sun Dec 16 15:44:47 2018 +0200 ALSA: hda: add mute LED support for HP EliteBook 840 G4 Tested with 4.19.9. v2: Changed from CXT_FIXUP_MUTE_LED_GPIO to CXT_FIXUP_HP_DOCK because that's what the existing fixups for EliteBooks use. Signed-off-by: Mantas Mikulėnas Cc: Signed-off-by: Takashi Iwai commit 3bbc9abbfb8cc6d76b388699501eeda005850929 Author: Baruch Siach Date: Sun Dec 9 14:26:11 2018 +0000 arm64: dts: imx8mq-evk: enable watchdog The external nWDOG signal connects to the EVK board reset circuit. Tested on the i.MX8MQ EVK rev B3. Signed-off-by: Baruch Siach Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit d3a2d72bcf17b3f26d88454b4b34d1742e5b06ac Author: Baruch Siach Date: Sun Dec 9 14:26:10 2018 +0000 arm64: dts: imx8mq: add watchdog devices Signed-off-by: Baruch Siach Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit 915975757d982391848c538713d3c4963f3a9725 Author: Lucas Stach Date: Sun Dec 9 14:26:09 2018 +0000 MAINTAINERS: add i.MX8 DT path to i.MX architecture Shawn agreed to take patches for the i.MX8 parts through his tree. Signed-off-by: Lucas Stach Reviewed-by: Dong Aisheng Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit 9079aca4aacd2c13cc0a8e3f7c9e9e2e9154ff08 Author: Lucas Stach Date: Sun Dec 9 14:26:08 2018 +0000 arm64: add support for i.MX8M EVK board This is the evaluation kit board for the i.MX8M. The current level of support yields a working console and is able to boot userspace from SD card or Network. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam (v1) Reviewed-by: Rob Herring (v3) Tested-by: Tested-by: Baruch Siach (v1) Reviewed-by: Dong Aisheng Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit 748f908cc882021df5a917baf19ef7363eaa5776 Author: Lucas Stach Date: Sun Dec 9 14:26:07 2018 +0000 arm64: add basic DTS for i.MX8MQ This adds the basic DTS for the i.MX8MQ. For now only the following peripherals are supported: - IOMUXC (pin controller) - CCM (clock controller) - GPIO - UART - uSDHC (SD/eMMC controller) - FEC (ethernet controller) - i2c This is enough to get a very basic board support up and running. One known limitation is that the driver for the GPC interrupt controller is still missing, rendering the CPU sleep states unusable as there is nothing waking them up anymore. Signed-off-by: Lucas Stach Reviewed-by: Dong Aisheng Signed-off-by: Abel Vesa Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 930507c1830498e00ede089890f188de4a108cc7 Author: Lucas Stach Date: Sun Dec 9 14:26:06 2018 +0000 arm64: add basic Kconfig symbols for i.MX8 Add basic Kconfig symbols to make the MXC architecture available in the ARM64 world. Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit 35a38903b9a579f5c6305b4424fdd715aec75eef Merge: 58f5fa6837250 1cf3817bf1f52 Author: Shawn Guo Date: Sun Dec 16 17:27:56 2018 +0800 Merge commit '1cf3817bf1f52e57b3f5eb0413ee0d7f0c2e9829' into imx8mq/dt commit 6d1ef1bbfed5f903aaab743a08bde41cc372d646 Author: Takashi Sakamoto Date: Sun Dec 16 17:32:33 2018 +0900 ALSA: fireface: code refactoring to handle model-specific registers As a result of investigation for Fireface 800, 'struct snd_ff_spec.regs' is just for higher address to receive tx asynchronous packets of MIDI messages, thus it can be simplified. This commit simplifies it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit fc716397a5c7a20247a39c9347fb7a543e0ae4ad Author: Takashi Sakamoto Date: Sun Dec 16 17:32:32 2018 +0900 ALSA: fireface: add support for packet streaming on Fireface 800 This commit adds a functionality to multiplex PCM frames into isochronous packets and demultiplex PCM frames from isochronous packets for ALSA PCM applications. Fireface 800 voluntarily maintains resources for tx isochronous communication. It performs reservation of isochronous channel and allocation/update of bandwidth in some cases below: - at a first request to allocation after bus resets - at requests to allocation when further bandwidth is required When request is grant and the unit is prepared, read data from 0x0000801c0008 represents isochronous channel for tx stream, then the unit can handle requests to start communication. If driver send the request without checking the register, the unit takes panic to continue bus resets. The unit starts transmission of tx packets after receiving several rx packets from driver. I note that the unit can process tx/rx packets and generate/record sound regardless of HOST LED. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 365c00d0b91bb347945982845c9af1b7c0f2bdce Author: Takashi Sakamoto Date: Sun Dec 16 17:32:31 2018 +0900 ALSA: fireface: allocate isochronous resources in mode-specific implementation The way to maintain isochronous resources on bus is different between Fireface 400/800. This commit is a preparation. This commit moves a function to allocate resource to model-dependent implementation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 76ea46887729d0765b1fd39291a69c2c6781ada0 Author: Takashi Sakamoto Date: Sun Dec 16 17:32:30 2018 +0900 ALSA: fireface: code refactoring to handle multiplier mode Fireface 400/800 use three modes against the number of data channels in data block for both tx/rx packets. This commit adds refactoring for it. Some enumerators are added to represent each of mode and a function is added to calculate the mode from sampling frequency code (sfc). Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit d4a0b6cbf26ce7c22bcb070595957590736fec85 Author: Takashi Sakamoto Date: Sun Dec 16 17:32:29 2018 +0900 ALSA: fireface: share helper function to switch fetching mode Both of Fireface 400/800 have the same register to switch frame fetching mode regardless of difference of available number of PCM frames in rx isochronous packet. This commit moves a helper function from model-dependent implementation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 3d16200a3e55a39caa1c88419cb559c00316f721 Author: Takashi Sakamoto Date: Sat Dec 15 19:06:48 2018 +0900 ALSA: fireface: fix for state to fetch PCM frames According to my memo at hand and saved records, writing 0x00000001 to SND_FF_REG_FETCH_PCM_FRAMES disables fetching PCM frames in corresponding channel, however current implement uses reversed logic. This results in muted volume in device side during playback. This commit corrects the bug. Cc: # v4.12+ Fixes: 76fdb3a9e13a ('ALSA: fireface: add support for Fireface 400') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 5ef108c53e6efd695e32aad969638ccbc35b4be9 Author: Takashi Sakamoto Date: Sat Dec 15 19:03:21 2018 +0900 ALSA: firewire-lib: use the same print format for 'without_header' tracepoints An initial commit to add tracepoints for packets without CIP headers uses different print formats for added tracepoints. However this is not convenient for users/developers to prepare debug tools. This commit uses the same format for the two tracepoints. Cc: # v4.12+ Fixes: b164d2fd6e49 ('ALSA: firewire_lib: add tracepoints for packets without CIP headers') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit aa9a9e39b4f65733bf19d90cbd026e85a74efb99 Author: Takashi Sakamoto Date: Sat Dec 15 19:03:20 2018 +0900 ALSA: firewire-lib: fix wrong assignment for 'out_packet_without_header' tracepoint An initial commit to add tracepoints for packets without CIP headers introduces a wrong assignment to 'data_blocks' value of 'out_packet_without_header' tracepoint. This commit fixes the bug. Cc: # v4.12+ Fixes: b164d2fd6e49 ('ALSA: firewire_lib: add tracepoints for packets without CIP headers') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit ada79fa5a0b374dd2c2262137c734da7524a8263 Author: Takashi Sakamoto Date: Sat Dec 15 19:03:19 2018 +0900 ALSA: firewire-lib: fix wrong handling payload_length as payload_quadlet In IEC 61883-1/6 engine of ALSA firewire stack, a packet handler has a second argument for 'the number of bytes in payload of isochronous packet'. However, an incoming packet handler without CIP header uses the value as 'the number of quadlets in the payload'. This brings userspace applications to receive the number of PCM frames as four times against real time. This commit fixes the bug. Cc: # v4.12+ Fixes: 3b196c394dd ('ALSA: firewire-lib: add no-header packet processing') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 30648e9f864774388d261f42e79955362f4739e7 Author: Frieder Schrempf Date: Mon Dec 10 16:28:49 2018 +0000 arm64: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller We will move the FSL QSPI driver to the SPI framework soon. To prepare and to make sure the full buswidth is used (as it is with the current driver), let's add the right properties. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit a0578d2419e1833b3014c6ef63ba8139549d875b Author: Frieder Schrempf Date: Mon Dec 10 16:28:48 2018 +0000 arm64: dts: Remove unused properties from FSL QSPI driver nodes The properties 'num-cs' and 'bus-num' were never read by the driver and can be removed. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 4f15a4e0d21b9b171aaa78efde2fd60f44f2e62c Author: Frieder Schrempf Date: Mon Dec 10 16:28:50 2018 +0000 ARM: dts: Add spi-[tx/rx]-bus-width for the FSL QSPI controller We will move the FSL QSPI driver to the SPI framework soon. To prepare and to make sure the full buswidth is used (as it is with the current driver), let's add the right properties. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 00b79b07cb2aab508e00d4a80ba2525e34b8b9c6 Author: Frieder Schrempf Date: Mon Dec 10 16:28:49 2018 +0000 ARM: dts: imx6sx-sdb: Fix the reg properties for the FSL QSPI nodes The current driver does not use the reg properties, but we will add a new driver soon. To make sure we have a consistent scheme, let's fix the reg properties here. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 63f2d2a34011e8326c18d691b7c6261624e39667 Author: Frieder Schrempf Date: Mon Dec 10 16:28:48 2018 +0000 ARM: dts: Remove unused properties from FSL QSPI driver nodes The properties 'bus-num', 'fsl,spi-num-chipselects' and 'fsl,spi-flash-chipselects' were never read by the driver and can be removed. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 744284fa15a1acc8601ddc0a349678e033100925 Merge: 79da07dec740a 58f5fa6837250 Author: Shawn Guo Date: Sun Dec 16 16:20:47 2018 +0800 Merge tag 'imx-dt64-4.21' into imx/qspi-dt Freescale arm64 device tree update for 4.21: - Add device tree for LS1028A SoC and NXP FRWY & QDS boards support based on this SoC. - Add device tree for LX2160A SoC and NXP QDS & RDB boards support based on this SoC. - Add qdma devices for LS1043A and LS1046A SoC. - Disable PCIe device by default in SoC device tree and let board level device tree to enable as needed. - Drop compatible string "snps,dw-pcie" from LayerScape PCIe devices to avoid incorrect matching. - Move fsl-mc device as a child node of soc node, and add missing dma-ranges property for LS1088A SoC. - Update LayerScape SoCs' cooling maps to include all devices affected by individual trip points. commit c151acc6e9ffa08972aa20d8bc07a66081922c1e Author: Sam Protsenko Date: Fri Dec 14 19:59:21 2018 +0200 l2tp: Add protocol field decompression When Protocol Field Compression (PFC) is enabled, the "Protocol" field in PPP packet will be received without leading 0x00. See section 6.5 in RFC 1661 for details. So let's decompress protocol field if needed, the same way it's done in drivers/net/ppp/pptp.c. In case when "nopcomp" pppd option is not enabled, PFC (pcomp) can be negotiated during LCP handshake, and L2TP driver in kernel will receive PPP packets with compressed Protocol field, which in turn leads to next error: Protocol Rejected (unsupported protocol 0x2145) because instead of Protocol=0x0021 in PPP packet there will be Protocol=0x21. This patch unwraps it back to 0x0021, which fixes the issue. Sending the compressed Protocol field will be implemented in subsequent patch, this one is self-sufficient. Signed-off-by: Sam Protsenko Signed-off-by: David S. Miller commit 7f07675c117aac08c403ee02d4a865f76a0ce55a Author: Nathan Chancellor Date: Mon Dec 10 17:05:06 2018 -0700 pinctrl: aspeed: Wrap -Woverride-init with cc-option Clang does not support this option: warning: unknown warning option '-Woverride-init'; did you mean '-Woverride-module'? [-Wunknown-warning-option] 1 warning generated. Signed-off-by: Nathan Chancellor Acked-by: Andrew Jeffery Acked-by: Joel Stanley Signed-off-by: Linus Walleij commit 63de273f34b5eeb5ead8440f20516fae9b7b1165 Merge: bedf3b332034c 9582466640432 Author: David S. Miller Date: Sat Dec 15 13:29:56 2018 -0800 Merge tag 'mlx5e-updates-2018-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-12-14 (VF Lag) From Aviv Heller, Subsequent patches introduce VF LAG, which provdies load-balancing and high-availability capabilities for VFs associated with different physical ports of the same Connect-X card. This series consists of the following: - mlx5 devcom, driver infrastructure that facilitates operations that involve both core devices (physical functions) of the same card, to synchronize and communicate between two driver instances of the same card. - Infrastructure for TC rule duplication. - Changes to LAG logic to enable its use when SR-IOV is enabled - PFs in switchdev mode is the only mode currently supported. ==================== Signed-off-by: David S. Miller commit bedf3b332034c82af4f15ff6afa90ec5aa7cfc84 Merge: 35e07d2347397 4f24ed77dec9b Author: David S. Miller Date: Sat Dec 15 13:23:03 2018 -0800 Merge branch 'net-mitigate-retpoline-overhead' Paolo Abeni says: ==================== net: mitigate retpoline overhead The spectre v2 counter-measures, aka retpolines, are a source of measurable overhead[1]. We can partially address that when the function pointer refers to a builtin symbol resorting to a list of tests vs well-known builtin function and direct calls. Experimental results show that replacing a single indirect call via retpoline with several branches and a direct call gives performance gains even when multiple branches are added - 5 or more, as reported in [2]. This may lead to some uglification around the indirect calls. In netconf 2018 Eric Dumazet described a technique to hide the most relevant part of the needed boilerplate with some macro help. This series is a [re-]implementation of such idea, exposing the introduced helpers in a new header file. They are later leveraged to avoid the indirect call overhead in the GRO path, when possible. Overall this gives > 10% performance improvement for UDP GRO benchmark and smaller but measurable for TCP syn flood. The added infra can be used in follow-up patches to cope with retpoline overhead in other points of the networking stack (e.g. at the qdisc layer) and possibly even in other subsystems. v2 -> v3: - fix build error with CONFIG_IPV6=m v1 -> v2: - list explicitly the builtin function names in INDIRECT_CALL_*(), as suggested by Ed Cree - expand the recipients list rfc -> v1: - use branch prediction hints, as suggested by Eric [1] http://vger.kernel.org/netconf2018_files/PaoloAbeni_netconf2018.pdf [2] https://linuxplumbersconf.org/event/2/contributions/99/attachments/98/117/lpc18_paper_af_xdp_perf-v2.pdf ==================== Signed-off-by: David S. Miller commit 4f24ed77dec9b067d08f7958a287cbf48665f35e Author: Paolo Abeni Date: Fri Dec 14 11:52:00 2018 +0100 udp: use indirect call wrappers for GRO socket lookup This avoids another indirect call for UDP GRO. Again, the test for the IPv6 variant is performed first. v1 -> v2: - adapted to INDIRECT_CALL_ changes Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 028e0a4766844e7eeb31b93479ea6dd40cfc2895 Author: Paolo Abeni Date: Fri Dec 14 11:51:59 2018 +0100 net: use indirect call wrappers at GRO transport layer This avoids an indirect call in the receive path for TCP and UDP packets. TCP takes precedence on UDP, so that we have a single additional conditional in the common case. When IPV6 is build as module, all gro symbols except UDPv6 are builtin, while the latter belong to the ipv6 module, so we need some special care. v1 -> v2: - adapted to INDIRECT_CALL_ changes v2 -> v3: - fix build issue with CONFIG_IPV6=m Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit aaa5d90b395a72faff797b00d815165ee0e664c0 Author: Paolo Abeni Date: Fri Dec 14 11:51:58 2018 +0100 net: use indirect call wrappers at GRO network layer This avoids an indirect calls for L3 GRO receive path, both for ipv4 and ipv6, if the latter is not compiled as a module. Note that when IPv6 is compiled as builtin, it will be checked first, so we have a single additional compare for the more common path. v1 -> v2: - adapted to INDIRECT_CALL_ changes Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 283c16a2dfd332bf5610c874f7b9f9c8b601ce53 Author: Paolo Abeni Date: Fri Dec 14 11:51:57 2018 +0100 indirect call wrappers: helpers to speed-up indirect calls of builtin This header define a bunch of helpers that allow avoiding the retpoline overhead when calling builtin functions via function pointers. It boils down to explicitly comparing the function pointers to known builtin functions and eventually invoke directly the latter. The macros defined here implement the boilerplate for the above schema and will be used by the next patches. rfc -> v1: - use branch prediction hint, as suggested by Eric v1 -> v2: - list explicitly the builtin function names in INDIRECT_CALL_*(), as suggested by Ed Cree Suggested-by: Eric Dumazet Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 35e07d23473972b8876f98bcfc631ebcf779e870 Author: Ilias Apalodimas Date: Fri Dec 14 10:59:01 2018 +0200 net: socionext: remove mmio reads on Tx Currently the driver issues 2 mmio reads to figure out the number of transmitted packets and clean them. We can get rid of the expensive reads since BIT 31 of the Tx descriptor can be used for that. We can also remove the budget counting of Tx completions since all of the descriptors are not deliberately processed. Performance numbers using pktgen are: size pre-patch(pps) post-patch(pps) 64 362483 427916 128 358315 411686 256 352725 389683 512 215675 216464 1024 113812 114442 Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 17a12eaaf09a2fa3ea6997e3b5be8bc05fc60ee4 Author: Ilias Apalodimas Date: Fri Dec 14 10:59:00 2018 +0200 net: socionext: correctly recover txq after being full Running pktgen with packets sizes > 512b ends up in the interface Txq getting stuck. "netsec 522d0000.ethernet eth0: netsec_netdev_start_xmit: TxQFull!" appears on dmesg but the interface never recovers. It requires an ifconfig down/up to make the interface usable again. The reason that triggers this, is a race condition between .ndo_start_xmit and the napi completion. The available budget is calculated first and indicates the queue is full. Due to a costly netif_err() the queue is not stopped in time while the napi completion runs, clears the irq and frees up descriptors, thus the queue never wakes up again. Fix this by moving the print after stopping the queue, make the print ratelimited, add barriers and check for cleaned descriptors.. Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 1811caa0cf91320baff40c82cbb157c772cfd365 Author: Fabrizio Castro Date: Thu Dec 13 20:18:34 2018 +0000 dt-bindings: net: ravb: Add support for r8a774c0 SoC Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 4b7cd11f22e5e62b68c543ee74ed3c9f9e70baba Author: David Ahern Date: Thu Dec 13 08:16:50 2018 -0800 neighbor: Improve neighbour struct layout Move arp_queue_len_bytes ahead of arp_queue to remove two 4-byte holes. Ensure ha element is always 8-byte aligned. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 2561f97267d656c9b2c62b32614870abb3eabfe6 Author: Tonghao Zhang Date: Thu Dec 13 00:43:23 2018 -0800 net: sched: simplify the qdisc_leaf code Except for returning, the var leaf is not used in the qdisc_leaf(). For simplicity, remove it. Signed-off-by: Tonghao Zhang Acked-by: Cong Wang Signed-off-by: David S. Miller commit c2027d1e17582903e368abf5d4838b22a98f2b7b Author: David Ahern Date: Wed Dec 12 15:27:38 2018 -0800 ipv6: Fix handling of LLA with VRF and sockets bound to VRF A recent commit allows sockets bound to a VRF to receive ipv6 link local packets. However, it only works for UDP and worse TCP connection attempts to the LLA with the only listener bound to the VRF just hang where as before the client gets a reset and connection refused. Fix by adjusting ir_iif for LL addresses and packets received through a device enslaved to a VRF. Fixes: 6f12fa775530 ("vrf: mark skb for multicast or link-local as enslaved to VRF") Reported-by: Donald Sharp Cc: Mike Manning Signed-off-by: David Ahern Signed-off-by: David S. Miller commit e782410ed2378a2ddac58d944c3cf0c6f96b1ff3 Author: Heiner Kallweit Date: Sat Dec 15 16:25:05 2018 +0100 r8169: improve spurious interrupt detection Improve detection of spurious interrupts by checking against the interrupt mask as currently set in the chip. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b09026c6913eeef1b21914a9d441ba275df40f27 Author: Yangtao Li Date: Sat Dec 15 02:59:30 2018 -0500 cxgb4: remove DEFINE_SIMPLE_DEBUGFS_FILE() We already have the DEFINE_SHOW_ATTRIBUTE. There is no need to define such a macro, so remove DEFINE_SIMPLE_DEBUGFS_FILE. Also use the DEFINE_SHOW_ATTRIBUTE macro to simplify some code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 70f98d7c7d51402e7b40c9ec0299bd46b7890da9 Author: Yangtao Li Date: Sat Dec 15 02:19:53 2018 -0500 ipconfig: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit a6b981079c766d4783fc29d9d3811d412192bbed Merge: b9948e1113913 82e00b86a5b60 Author: David S. Miller Date: Sat Dec 15 10:54:18 2018 -0800 Merge branch 'hns3-Add-more-commands-to-Debugfs-in-HNS3-driver' Salil Mehta says: ==================== net: hns3: Add more commands to Debugfs in HNS3 driver This patch-set adds few more debugfs commands to HNS3 Ethernet Driver. Support has been added to query info related to below items: 1. Packet buffer descriptor ("echo bd info [queue no] [bd index] > cmd") 2. Manager table("echo dump mng tbl > cmd") 3. Dfx status register("echo dump reg ssu [prt id] > cmd") 4. Dcb status register("echo dump reg dcb [port id] > cmd") 5. Queue map ("echo queue map [queue no] > cmd") 6. Tm map ("echo tm map [queue no] > cmd") NOTE: Above commands are *read-only* and are only intended to query the information from the SoC(and dump inside the kernel, for now) and in no way tries to perform write operations for the purpose of configuration etc. Change Log: V1-->V2: 1. Addressed the GCC-8.2 compiler issue reported by David S. Miller. Link: https://lkml.org/lkml/2018/12/14/1298 ==================== Signed-off-by: David S. Miller commit 82e00b86a5b60d21e85564ec7dccaddc37ec2b00 Author: liuzhongzhu Date: Sat Dec 15 15:31:58 2018 +0000 net: hns3: Add "tm map" status information query function This patch prints dcb register status information by module. debugfs command: root@(none)# echo dump tm map 100 > cmd queue_id | qset_id | pri_id | tc_id 0100 | 0065 | 08 | 00 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 0c29d1912b81a0d8ab7eb46ce7036a8c0fb073e3 Author: liuzhongzhu Date: Sat Dec 15 15:31:57 2018 +0000 net: hns3: Add "queue map" information query function This patch prints queue map information. debugfs command: echo dump queue map > cmd Sample Command: root@(none)# echo queue map > cmd local queue id | global queue id | vector id 0 32 769 1 33 770 2 34 771 3 35 772 4 36 773 5 37 774 6 38 775 7 39 776 8 40 777 9 41 778 10 42 779 11 43 780 12 44 781 13 45 782 14 46 783 15 47 784 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit c0ebebb9ccc1363e117b52189e93d6ec646b33df Author: liuzhongzhu Date: Sat Dec 15 15:31:56 2018 +0000 net: hns3: Add "dcb register" status information query function This patch prints dcb register status information by module. debugfs command: root@(none)# echo dump reg dcb > cmd roce_qset_mask: 0x0 nic_qs_mask: 0x0 qs_shaping_pass: 0x0 qs_bp_sts: 0x0 pri_mask: 0x0 pri_cshaping_pass: 0x0 pri_pshaping_pass: 0x0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 27cf979a15841eed5de06b6f46ae490ce2fda46b Author: liuzhongzhu Date: Sat Dec 15 15:31:55 2018 +0000 net: hns3: Add "status register" information query function This patch prints status register information by module. debugfs command: echo dump reg [mode name] > cmd Sample Command: root@(none)# echo dump reg bios common > cmd BP_CPU_STATE: 0x0 DFX_MSIX_INFO_NIC_0: 0xc000 DFX_MSIX_INFO_NIC_1: 0xf DFX_MSIX_INFO_NIC_2: 0x2 DFX_MSIX_INFO_NIC_3: 0x2 DFX_MSIX_INFO_ROC_0: 0xc000 DFX_MSIX_INFO_ROC_1: 0x0 DFX_MSIX_INFO_ROC_2: 0x0 DFX_MSIX_INFO_ROC_3: 0x0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7737f1fbb5ba1581e8b77ed4b2302485fa237f1e Author: liuzhongzhu Date: Sat Dec 15 15:31:54 2018 +0000 net: hns3: Add "manager table" information query function This patch prints manager table information. debugfs command: echo dump mng tbl > cmd Sample Command: root@(none)# echo dump mng tbl > cmd entry|mac_addr |mask|ether|mask|vlan|mask|i_map|i_dir|e_type 00 |01:00:5e:00:00:01|0 |00000|0 |0000|0 |00 |00 |0 01 |c2:f1:c5:82:68:17|0 |00000|0 |0000|0 |00 |00 |0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 122bedc56a6c4f5be3bc56fdc59d4b3a25097ead Author: liuzhongzhu Date: Sat Dec 15 15:31:53 2018 +0000 net: hns3: Add "bd info" query function This patch prints Sending and receiving package descriptor information. debugfs command: echo dump bd info 1 > cmd Sample Command: root@(none)# echo bd info 1 > cmd hns3 0000:7d:00.0: TX Queue Num: 0, BD Index: 0 hns3 0000:7d:00.0: (TX) addr: 0x0 hns3 0000:7d:00.0: (TX)vlan_tag: 0 hns3 0000:7d:00.0: (TX)send_size: 0 hns3 0000:7d:00.0: (TX)vlan_tso: 0 hns3 0000:7d:00.0: (TX)l2_len: 0 hns3 0000:7d:00.0: (TX)l3_len: 0 hns3 0000:7d:00.0: (TX)l4_len: 0 hns3 0000:7d:00.0: (TX)vlan_tag: 0 hns3 0000:7d:00.0: (TX)tv: 0 hns3 0000:7d:00.0: (TX)vlan_msec: 0 hns3 0000:7d:00.0: (TX)ol2_len: 0 hns3 0000:7d:00.0: (TX)ol3_len: 0 hns3 0000:7d:00.0: (TX)ol4_len: 0 hns3 0000:7d:00.0: (TX)paylen: 0 hns3 0000:7d:00.0: (TX)vld_ra_ri: 0 hns3 0000:7d:00.0: (TX)mss: 0 hns3 0000:7d:00.0: RX Queue Num: 0, BD Index: 120 hns3 0000:7d:00.0: (RX)addr: 0xffee7000 hns3 0000:7d:00.0: (RX)pkt_len: 0 hns3 0000:7d:00.0: (RX)size: 0 hns3 0000:7d:00.0: (RX)rss_hash: 0 hns3 0000:7d:00.0: (RX)fd_id: 0 hns3 0000:7d:00.0: (RX)vlan_tag: 0 hns3 0000:7d:00.0: (RX)o_dm_vlan_id_fb: 0 hns3 0000:7d:00.0: (RX)ot_vlan_tag: 0 hns3 0000:7d:00.0: (RX)bd_base_info: 0 Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7677ea0e8843e1a45e35253c0c5e22db11a99a62 Author: Boris Brezillon Date: Mon Dec 3 11:23:15 2018 +0100 MAINTAINERS: Update my email address Use my korg address instead of the bootlin one. Signed-off-by: Boris Brezillon commit cafb56dd741e61c99709bcd2b193a9a1d36def3b Author: Miquel Raynal Date: Tue Dec 11 18:38:28 2018 +0100 mtd: rawnand: marvell: prevent timeouts on a loaded machine marvell_nfc_wait_op() waits for completion during 'timeout_ms' milliseconds before throwing an error. While the logic is fine, the value of 'timeout_ms' is given by the core and actually correspond to the maximum time the NAND chip will take to complete the operation. Assuming there is no overhead in the propagation of the interrupt signal to the the NAND controller (through the Ready/Busy line), this delay does not take into account the latency of the operating system. For instance, for a page write, the delay given by the core is rounded up to 1ms. Hence, when the machine is over loaded, there is chances that this timeout will be reached. There are two ways to solve this issue that are not incompatible: 1/ Enlarge the timeout value (if so, how much?). 2/ Check after the waiting method if we did not miss any interrupt because of the OS latency (an interrupt is still pending). In this case, we assume the operation exited successfully. We choose the second approach that is a must in all cases, with the possibility to also modify the timeout value to be, e.g. at least 1 second in all cases. Fixes: 02f26ecf8c77 ("mtd: nand: add reworked Marvell NAND controller driver") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit 664204410afb3b0f538d176ad0c2713b04abd4b9 Author: Nathan Chancellor Date: Fri Dec 14 18:49:01 2018 -0700 PCI: Remove unused attr variable in pci_dma_configure Clang warns: drivers/pci/pci-driver.c:1603:21: error: unused variable 'attr' [-Werror,-Wunused-variable] Commit e5361ca29f2f ("ACPI / scan: Refactor _CCA enforcement") removed attr's use and replaced it with its assigned value so it is no longer needed. Signed-off-by: Nathan Chancellor Signed-off-by: Christoph Hellwig commit 8ee94e3fc54d989897969d7ca8deacfe7850855c Author: Christoph Hellwig Date: Sat Dec 15 11:01:25 2018 +0100 ia64: only select ARCH_HAS_DMA_COHERENT_TO_PFN if swiotlb is enabled Otherwise we get a build failure due in swiotlb-less configs with non-generic kernels. Signed-off-by: Christoph Hellwig commit 893b0aff9a7aa68d2fcc999f16d66d142f180ca8 Author: Marc Zyngier Date: Sat Dec 15 09:10:46 2018 +0000 irqchip/irq-imx-gpcv2: Silence "fall through" warning The -Wimplicit-fallthrough option requires that the /* fall through */ comment is placed in the 'case' statement that falls through, rather than in the following one. Case seems to matter as well. Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier commit a01e5d242d932f67f2657ceb0d76be777cd05a04 Author: Masahiro Yamada Date: Tue Dec 11 20:00:58 2018 +0900 kconfig: remove redundant token defines These are already defined as %left. Signed-off-by: Masahiro Yamada commit 4b5ec81bfeda09bda9cd8f545226c65291e4952b Author: Masahiro Yamada Date: Tue Dec 11 20:00:57 2018 +0900 kconfig: rename depends_list to comment_option_list Now the comment_stmt is the only user of depends_list. Rename it to comment_option_list Signed-off-by: Masahiro Yamada commit 1f31be9ec0a9d59053fb3d78591f6dd7a64a174e Author: Masahiro Yamada Date: Tue Dec 11 20:00:56 2018 +0900 kconfig: loosen the order of "visible" and "depends on" in menu entry Currently, "visible" and "depends on", if defined in a menu entry, must appear in that order. The real example is in drivers/media/tuners/Kconfig: menu "Customize TV tuners" visible if depends on ... is fine, but you cannot change the property order like this: menu "Customize TV tuners" depends on visible if Kconfig does not require a specific order of properties. In this case, menu_add_visibility(() and menu_add_dep() are orthogonal. Loosen this unreasonable restriction. Signed-off-by: Masahiro Yamada commit 94d4e1b6021b8d63274c9961c70f95dd2b43e6fb Author: Masahiro Yamada Date: Tue Dec 11 20:00:55 2018 +0900 kconfig: remove redundant menu_block rule The code block surrounded by "menu" ... "endmenu" is stmt_list. Remove the redundant menu_block symbol entirely. Signed-off-by: Masahiro Yamada commit 4891796c6f83bb3be5567b3053428a40329d7e37 Author: Masahiro Yamada Date: Tue Dec 11 20:00:54 2018 +0900 kconfig: remove redundant if_block rule The code block surrounded by "if" ... "endif" is stmt_list. Remove the redundant if_block symbol entirely. Remove "stmt_list: stmt_list end" rule as well since it would obviously cause conflicts. Signed-off-by: Masahiro Yamada commit 2f60e46e605a9bcd8dc4fe7745b5576084900850 Author: Masahiro Yamada Date: Tue Dec 11 20:00:53 2018 +0900 kconfig: remove grammatically ambiguous option_error This commit decreases 6 shift/reduce conflicts, and finally achieves conflict-free parser. Since Kconfig has no terminator for a config block, detecting the end of config_stmt is not easy. For example, there are two ways for handling the error in the following code: 1 config FOO 2 = [A] Print "unknown option" error, assuming the line 2 is a part of config_option_list [B] Print "invalid statement", assuming the line 1 is reduced into a config_stmt by itself Bison actually chooses [A] because it performs the shift rather than the reduction where both are possible. However, there is no reason to choose one over the other. Let's remove the option_error, and let it fall back to [B]. Signed-off-by: Masahiro Yamada commit 6900ae9eeee397436df25ef51835a8b27865d46d Author: Masahiro Yamada Date: Tue Dec 11 20:00:52 2018 +0900 kconfig: remove grammatically ambiguous "unexpected option" diagnostic This commit decreases 15 shift/reduce conflicts. The location of this error recovery is ambiguous. For example, there are two ways to interpret the following code: 1 config FOO 2 bool "foo" [A] Both lines are reduced together into a config_stmt. [B] The only line 1 is reduced into a config_stmt, and the line 2 matches to "option_name error T_EOL" Of course, we expect [A], but [B] could be grammatically possible. Kconfig has no terminator for a config block. So, we cannot detect its end until we see a non-property keyword. People often insert a blank line between two config blocks, but it is just a coding convention. Blank lines are actually allowed anywhere in Kconfig files. The real error is when a property keyword appears right after "endif", "endchoice", "endmenu", "source", "comment", or variable assignment. Instead of fixing the grammatical ambiguity, I chose to simply remove this error recovery. The difference is unexpected option "bool" ... is turned into a more generic message: invalid statement Signed-off-by: Masahiro Yamada commit 723679339d087d79e36c0af67f4be84d866fee20 Author: Masahiro Yamada Date: Tue Dec 11 20:00:51 2018 +0900 kconfig: warn no new line at end of file It would be nice to warn if a new line is missing at end of file. We could do this by checkpatch.pl for arbitrary files, but new line is rather essential as a statement terminator in Kconfig. The warning message looks like this: kernel/Kconfig.preempt:60:warning: no new line at end of file Currently, kernel/Kconfig.preempt is the only file with no new line at end of file. Fix it. I know there are some false negative cases. For example, no warning is displayed when the last line contains some whitespaces/comments, but no new line. Yet, this commit works well for most cases. Signed-off-by: Masahiro Yamada commit f5a4c76ad7de96d47baef3d8810a88b10d60ec82 Author: Len Brown Date: Fri Dec 14 16:26:37 2018 -0500 tools/power turbostat: consolidate duplicate model numbers Often a new processor gets a new model number, but from a turbostat point of view, it is the same as a previous model. Support duplicates with 1-line updates, rather than error-prone scattering of model #'s. Signed-off-by: Len Brown commit 445640a563493f28d15f47e151e671281101e7dc Author: Len Brown Date: Fri Dec 14 20:02:27 2018 -0500 tools/power turbostat: fix goldmont C-state limit decoding When the C-state limit is 8 on Goldmont, PC10 is enabled. Previously turbostat saw this as "undefined", and thus assumed it should not show some counters, such as pc3, pc6, pc7. Signed-off-by: Len Brown commit 034565da0fe6cc60c4df26805c8c78d8f365173b Merge: bab89add3e7b7 c101189bc9680 Author: Daniel Borkmann Date: Sat Dec 15 01:31:49 2018 +0100 Merge branch 'bpf-bpftool-cleanups' Quentin Monnet says: ==================== This series contains several minor fixes for bpftool source and documentation. The first patches focus on documentation: addition of an option in the page for "bpftool prog", clean up and update of the same page, and addition of an example of prog array map manipulation in "bpftool map" page. The last two fix warnings susceptible to appear when libbfd is not present (patch 4), or with additional warning flags passed to the compiler (last patch). ==================== Signed-off-by: Daniel Borkmann commit c101189bc9680675a2686bafe908015a07a0da51 Author: Quentin Monnet Date: Fri Dec 14 13:56:01 2018 +0000 tools: bpftool: fix -Wmissing declaration warnings Help compiler check arguments for several utility functions used to print items to the console by adding the "printf" attribute when declaring those functions. Also, declare as "static" two functions that are only used in prog.c. All of them discovered by compiling bpftool with -Wmissing-format-attribute -Wmissing-declarations. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 8c03ecf712f5bbbb9d353ed69715aef3cc2b4029 Author: Quentin Monnet Date: Fri Dec 14 13:56:00 2018 +0000 tools: bpftool: fix warning on struct bpf_prog_linfo definition The following warning appears when compiling bpftool without BFD support: main.h:198:23: warning: 'struct bpf_prog_linfo' declared inside parameter list will not be visible outside of this definition or declaration const struct bpf_prog_linfo *prog_linfo, Fix it by declaring struct bpf_prog_linfo even in the case BFD is not supported. Fixes: b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit bd0fb9d0078edbfa2c983ad61901d90f1c0f5747 Author: Quentin Monnet Date: Fri Dec 14 13:55:59 2018 +0000 tools: bpftool: add a prog array map update example to documentation Add an example in map documentation to show how to use bpftool in order to update the references to programs hold by prog array maps. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 32870ba4078c3b4deac7ccb35b078c9ab69488a3 Author: Quentin Monnet Date: Fri Dec 14 13:55:58 2018 +0000 tools: bpftool: fix examples in documentation for bpftool prog Bring various fixes to the manual page for "bpftool prog" set of commands: - Fix typos ("dum" -> "dump") - Harmonise indentation and format for command output - Update date format for program load time - Add instruction numbers on program dumps - Fix JSON format for the example program listing Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit bc6cd664609b92aa437ed3f384e332faab5949c8 Author: Quentin Monnet Date: Fri Dec 14 13:55:57 2018 +0000 tools: bpftool: add doc for -m option to bpftool-prog.rst The --mapcompat|-m option has been documented on the main bpftool.rst page, and on the interactive help. As this option is useful for loading programs with maps with the "bpftool prog load" command, it should also appear in the related bpftool-prog.rst documentation page. Let's add it. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit bab89add3e7b74be46e319d1fcba7835cb60ea2b Merge: eb415c98980fd 9242b5f5615c8 Author: Daniel Borkmann Date: Sat Dec 15 01:28:33 2018 +0100 Merge branch 'bpf-improve-verifier-state-analysis' Alexei Starovoitov says: ==================== v1->v2: With optimization suggested by Jakub patch 4 safety check became cheap enough. Several improvements to verifier state logic. Patch 1 - trivial optimization Patch 3 - significant optimization for stack state equivalence Patch 4 - safety check for liveness and prep for future state merging ==================== Signed-off-by: Daniel Borkmann commit 9242b5f5615c823bfc1e9aea284617ff25a55f10 Author: Alexei Starovoitov Date: Thu Dec 13 11:42:34 2018 -0800 bpf: add self-check logic to liveness analysis Introduce REG_LIVE_DONE to check the liveness propagation and prepare the states for merging. See algorithm description in clean_live_states(). Signed-off-by: Alexei Starovoitov Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 19e2dbb7dd978d24505e918ac54d6f7dfdc88b1d Author: Alexei Starovoitov Date: Thu Dec 13 11:42:33 2018 -0800 bpf: improve stacksafe state comparison "if (old->allocated_stack > cur->allocated_stack)" check is too conservative. In some cases explored stack could have allocated more space, but that stack space was not live. The test case improves from 19 to 15 processed insns and improvement on real programs is significant as well: before after bpf_lb-DLB_L3.o 1940 1831 bpf_lb-DLB_L4.o 3089 3029 bpf_lb-DUNKNOWN.o 1065 1064 bpf_lxc-DDROP_ALL.o 28052 26309 bpf_lxc-DUNKNOWN.o 35487 33517 bpf_netdev.o 10864 9713 bpf_overlay.o 6643 6184 bpf_lcx_jit.o 38437 37335 Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 730ff40f80c5b09b2402958321f2762a3f852e30 Author: Alexei Starovoitov Date: Thu Dec 13 11:42:32 2018 -0800 selftests/bpf: check insn processed in test_verifier Teach test_verifier to parse verifier output for insn processed and compare with expected number. Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit b233920c97a6201eb47fbafd78365c6946e6d7b6 Author: Alexei Starovoitov Date: Thu Dec 13 11:42:31 2018 -0800 bpf: speed up stacksafe check Don't check the same stack liveness condition 8 times. once is enough. Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit b9948e1113913237d6ee5d30c886514220f69163 Merge: 8e2ea53a83dfb 6254e5c6a8d7c Author: David S. Miller Date: Fri Dec 14 15:55:21 2018 -0800 Merge branch 'net-prefer-listeners-bound-to-an-address' Peter Oskolkov says: ==================== net: prefer listeners bound to an address A relatively common use case is to have several IPs configured on a host, and have different listeners for each of them. We would like to add a "catch all" listener on addr_any, to match incoming connections not served by any of the listeners bound to a specific address. However, port-only lookups can match addr_any sockets when sockets listening on specific addresses are present if so_reuseport flag is set. This patchset eliminates lookups into port-only hashtable, as lookups by (addr,port) tuple are easily available. In a future patchset I plan to explore whether it is possible to remove port-only hashtables completely: additional refactoring will be required, as some non-lookup code uses the hashtables. ==================== Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 6254e5c6a8d7c19e51e671e2648de2db06f8d504 Author: Peter Oskolkov Date: Wed Dec 12 13:15:37 2018 -0800 selftests: net: test that listening sockets match on address properly This patch adds a selftest that verifies that a socket listening on a specific address is chosen in preference over sockets that listen on any address. The test covers UDP/UDP6/TCP/TCP6. It is based on, and similar to, reuseport_dualstack.c selftest. Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 0ee58dad5b065f5910c2c926d8c9f07cbe2db86c Author: Peter Oskolkov Date: Wed Dec 12 13:15:36 2018 -0800 net: tcp6: prefer listeners bound to an address A relatively common use case is to have several IPs configured on a host, and have different listeners for each of them. We would like to add a "catch all" listener on addr_any, to match incoming connections not served by any of the listeners bound to a specific address. However, port-only lookups can match addr_any sockets when sockets listening on specific addresses are present if so_reuseport flag is set. This patch eliminates lookups into port-only hashtable, as lookups by (addr,port) tuple are easily available. In addition, compute_score() is tweaked to _not_ match addr_any sockets to specific addresses, as hash collisions could result in the unwanted behavior described above. Tested: the patch compiles; full test in the last patch in this patchset. Existing reuseport_* selftests also pass. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit d9fbc7f6431fc0e5c0ddedf72206d7c5175c5c9a Author: Peter Oskolkov Date: Wed Dec 12 13:15:35 2018 -0800 net: tcp: prefer listeners bound to an address A relatively common use case is to have several IPs configured on a host, and have different listeners for each of them. We would like to add a "catch all" listener on addr_any, to match incoming connections not served by any of the listeners bound to a specific address. However, port-only lookups can match addr_any sockets when sockets listening on specific addresses are present if so_reuseport flag is set. This patch eliminates lookups into port-only hashtable, as lookups by (addr,port) tuple are easily available. In addition, compute_score() is tweaked to _not_ match addr_any sockets to specific addresses, as hash collisions could result in the unwanted behavior described above. Tested: the patch compiles; full test in the last patch in this patchset. Existing reuseport_* selftests also pass. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 23b0269e58aee1165133b9696e43992f969b5088 Author: Peter Oskolkov Date: Wed Dec 12 13:15:34 2018 -0800 net: udp6: prefer listeners bound to an address A relatively common use case is to have several IPs configured on a host, and have different listeners for each of them. We would like to add a "catch all" listener on addr_any, to match incoming connections not served by any of the listeners bound to a specific address. However, port-only lookups can match addr_any sockets when sockets listening on specific addresses are present if so_reuseport flag is set. This patch eliminates lookups into port-only hashtable, as lookups by (addr,port) tuple are easily available. In addition, compute_score() is tweaked to _not_ match addr_any sockets to specific addresses, as hash collisions could result in the unwanted behavior described above. Tested: the patch compiles; full test in the last patch in this patchset. Existing reuseport_* selftests also pass. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 4cdeeee9252af1ba50482f91d615f326365306bd Author: Peter Oskolkov Date: Wed Dec 12 13:15:33 2018 -0800 net: udp: prefer listeners bound to an address A relatively common use case is to have several IPs configured on a host, and have different listeners for each of them. We would like to add a "catch all" listener on addr_any, to match incoming connections not served by any of the listeners bound to a specific address. However, port-only lookups can match addr_any sockets when sockets listening on specific addresses are present if so_reuseport flag is set. This patch eliminates lookups into port-only hashtable, as lookups by (addr,port) tuple are easily available. In addition, compute_score() is tweaked to _not_ match addr_any sockets to specific addresses, as hash collisions could result in the unwanted behavior described above. Tested: the patch compiles; full test in the last patch in this patchset. Existing reuseport_* selftests also pass. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: David S. Miller commit 8e2ea53a83dfb4b892ba35ddd9e78e6091202fa6 Author: yupeng Date: Wed Dec 12 00:14:10 2018 -0800 add snmp counters document Add explainations for some general IP counters, SACK and DSACK related counters Signed-off-by: yupeng Signed-off-by: David S. Miller commit 384aee46ca942db05195c32b03e856ceceb1127c Merge: aeb3fecde811d e997f8a20a57c Author: David S. Miller Date: Fri Dec 14 15:44:47 2018 -0800 Merge branch 'neighbor-More-gc_list-changes' David Ahern says: ==================== neighbor: More gc_list changes More gc_list changes and cleanups. The first 2 patches are bug fixes from the first gc_list change. Specifically, fix the locking order to be consistent - table lock followed by neighbor lock, and then entries in the FAILED state should always be candidates for forced_gc without waiting for any time span (return to the eviction logic prior to the separate gc_list). Patch 3 removes 2 now unnecessary arguments to neigh_del. Patch 4 moves a helper from a header file to core code in preparation for Patch 5 which removes NTF_EXT_LEARNED entries from the gc_list. These entries are already exempt from forced_gc; patch 5 removes them from consideration and makes them on par with PERMANENT entries given that they are also managed by userspace. ==================== Signed-off-by: David S. Miller commit e997f8a20a57cae16ed0c7a2bff6d3ab75f58123 Author: David Ahern Date: Tue Dec 11 18:57:25 2018 -0700 neighbor: Remove externally learned entries from gc_list Externally learned entries are similar to PERMANENT entries in the sense they are managed by userspace and can not be garbage collected. As such remove them from the gc_list, remove the flags check from neigh_forced_gc and skip threshold checks in neigh_alloc. As with PERMANENT entries, this allows unlimited number of NTF_EXT_LEARNED entries. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 526f1b587cf826d78c3e522428ce6b24a8da0d65 Author: David Ahern Date: Tue Dec 11 18:57:24 2018 -0700 neighbor: Move neigh_update_ext_learned to core file neigh_update_ext_learned has one caller in neighbour.c so does not need to be defined in the header. Move it and in the process remove the intialization of ndm_flags and just set it based on the flags check. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 7e6f182bec7debb420a2c12ae0ea1813645a7ac4 Author: David Ahern Date: Tue Dec 11 18:57:23 2018 -0700 neighbor: Remove state and flags arguments to neigh_del neigh_del now only has 1 caller, and the state and flags arguments are both 0. Remove them and simplify neigh_del. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 758a7f0b32ab890831d321145c3fe72bb85c0350 Author: David Ahern Date: Tue Dec 11 18:57:22 2018 -0700 neighbor: Fix state check in neigh_forced_gc PERMANENT entries are not on the gc_list so the state check is now redundant. Also, the move to not purge entries until after 5 seconds should not apply to FAILED entries; those can be removed immediately to make way for newer ones. This restores the previous logic prior to the gc_list. Fixes: 58956317c8de ("neighbor: Improve garbage collection") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 9c29a2f55ec05cc8b525ee3b2d75d3cd37911123 Author: David Ahern Date: Tue Dec 11 18:57:21 2018 -0700 neighbor: Fix locking order for gc_list changes Lock checker noted an inverted lock order between neigh_change_state (neighbor lock then table lock) and neigh_periodic_work (table lock and then neighbor lock) resulting in: [ 121.057652] ====================================================== [ 121.058740] WARNING: possible circular locking dependency detected [ 121.059861] 4.20.0-rc6+ #43 Not tainted [ 121.060546] ------------------------------------------------------ [ 121.061630] kworker/0:2/65 is trying to acquire lock: [ 121.062519] (____ptrval____) (&n->lock){++--}, at: neigh_periodic_work+0x237/0x324 [ 121.063894] [ 121.063894] but task is already holding lock: [ 121.064920] (____ptrval____) (&tbl->lock){+.-.}, at: neigh_periodic_work+0x194/0x324 [ 121.066274] [ 121.066274] which lock already depends on the new lock. [ 121.066274] [ 121.067693] [ 121.067693] the existing dependency chain (in reverse order) is: ... Fix by renaming neigh_change_state to neigh_update_gc_list, changing it to only manage whether an entry should be on the gc_list and taking locks in the same order as neigh_periodic_work. Invoke at the end of neigh_update only if diff between old or new states has the PERMANENT flag set. Fixes: 8cc196d6ef86 ("neighbor: gc_list changes should be protected by table lock") Signed-off-by: David Ahern Signed-off-by: David S. Miller commit aeb3fecde811d5392ed481d8558f5751ac542e77 Author: Cong Wang Date: Tue Dec 11 11:15:46 2018 -0800 net_sched: fold tcf_block_cb_call() into tc_setup_cb_call() After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"), tc_setup_cb_call() is nearly identical to tcf_block_cb_call(), so we can just fold tcf_block_cb_call() into tc_setup_cb_call() and remove its unused parameter 'exts'. Fixes: 69bd48404f25 ("net/sched: Remove egdev mechanism") Cc: Oz Shlomo Cc: Jiri Pirko Signed-off-by: Cong Wang Acked-by: Jiri Pirko Acked-by: Oz Shlomo Signed-off-by: David S. Miller commit eb415c98980fd13618c64b0d88c2439103b4a627 Merge: 28c1272914613 d9762e84ede3e Author: Alexei Starovoitov Date: Fri Dec 14 14:17:34 2018 -0800 Merge branch 'bpf_line_info-in-verifier' Martin Lau says: ==================== This patch set provides bpf_line_info during the verifier's verbose log. Please see individual patch for details. ==================== Signed-off-by: Alexei Starovoitov commit d9762e84ede3eae9636f5dbbe0c8f0390d37e114 Author: Martin KaFai Lau Date: Thu Dec 13 10:41:48 2018 -0800 bpf: verbose log bpf_line_info in verifier This patch adds bpf_line_info during the verifier's verbose. It can give error context for debug purpose. ~~~~~~~~~~ Here is the verbose log for backedge: while (a) { a += bpf_get_smp_processor_id(); bpf_trace_printk(fmt, sizeof(fmt), a); } ~> bpftool prog load ./test_loop.o /sys/fs/bpf/test_loop type tracepoint 13: while (a) { 3: a += bpf_get_smp_processor_id(); back-edge from insn 13 to 3 ~~~~~~~~~~ Here is the verbose log for invalid pkt access: Modification to test_xdp_noinline.c: data = (void *)(long)xdp->data; data_end = (void *)(long)xdp->data_end; /* if (data + 4 > data_end) return XDP_DROP; */ *(u32 *)data = dst->dst; ~> bpftool prog load ./test_xdp_noinline.o /sys/fs/bpf/test_xdp_noinline type xdp ; data = (void *)(long)xdp->data; 224: (79) r2 = *(u64 *)(r10 -112) 225: (61) r2 = *(u32 *)(r2 +0) ; *(u32 *)data = dst->dst; 226: (63) *(u32 *)(r2 +0) = r1 invalid access to packet, off=0 size=4, R2(id=0,off=0,r=0) R2 offset is outside of the packet Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 23127b33ec80e656921362d7dc82a0064bac20a2 Author: Martin KaFai Lau Date: Thu Dec 13 10:41:46 2018 -0800 bpf: Create a new btf_name_by_offset() for non type name use case The current btf_name_by_offset() is returning "(anon)" type name for the offset == 0 case and "(invalid-name-offset)" for the out-of-bound offset case. It fits well for the internal BTF verbose log purpose which is focusing on type. For example, offset == 0 => "(anon)" => anonymous type/name. Returning non-NULL for the bad offset case is needed during the BTF verification process because the BTF verifier may complain about another field first before discovering the name_off is invalid. However, it may not be ideal for the newer use case which does not necessary mean type name. For example, when logging line_info in the BPF verifier in the next patch, it is better to log an empty src line instead of logging "(anon)". The existing bpf_name_by_offset() is renamed to __bpf_name_by_offset() and static to btf.c. A new bpf_name_by_offset() is added for generic context usage. It returns "\0" for name_off == 0 (note that btf->strings[0] is "\0") and NULL for invalid offset. It allows the caller to decide what is the best output in its context. The new btf_name_by_offset() is overlapped with btf_name_offset_valid(). Hence, btf_name_offset_valid() is removed from btf.h to keep the btf.h API minimal. The existing btf_name_offset_valid() usage in btf.c could also be replaced later. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit b677574bdf292e31c8f9810ff0fc0b35839d4636 Merge: 2de34ed964891 7128d7f7bae11 Author: Stephen Boyd Date: Fri Dec 14 14:03:38 2018 -0800 Merge branch 'clk-imx7ulp' into clk-next * clk-imx7ulp: clk: imx: imx7ulp: add arm hsrun mode clocks support dt-bindings: clock: imx7ulp: add HSRUN mode related clocks commit 7128d7f7bae11217cdd304b0620a4461102e599b Author: Anson Huang Date: Fri Dec 7 10:03:34 2018 +0000 clk: imx: imx7ulp: add arm hsrun mode clocks support i.MX7ULP has a Cortex-A7 CPU which can run in RUN mode or HSRUN mode, it is controlled in SMC1 module. The RUN mode and HSRUN mode will use different clock source for ARM, "divcore" for RUN mode and "hsrun_divcore" for HSRUN mode, so the control bits in SMC1 module can be abstracted as a HW clock mux, this patch adds HSRUN mode related clocks in SCG1 module and adds "arm" clock in SMC1 module to support RUN mode and HSRUN mode switch. Latest clock tree in RUN mode as below: firc 0 0 0 48000000 0 0 50000 firc_bus_clk 0 0 0 48000000 0 0 50000 hsrun_scs_sel 0 0 0 48000000 0 0 50000 hsrun_divcore 0 0 0 48000000 0 0 50000 sosc 3 3 3 24000000 0 0 50000 spll_pre_sel 1 1 1 24000000 0 0 50000 spll_pre_div 1 1 2 24000000 0 0 50000 spll 1 1 2 528000000 0 0 50000 spll_pfd0 1 1 1 500210526 0 0 50000 spll_pfd_sel 1 1 0 500210526 0 0 50000 spll_sel 1 1 0 500210526 0 0 50000 scs_sel 1 1 0 500210526 0 0 50000 divcore 1 1 0 500210526 0 0 50000 arm 1 1 0 500210526 0 0 50000 Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 401371fb597e035c3e7de5b69a4fa0e8243cb6a4 Author: Anson Huang Date: Fri Dec 7 10:03:29 2018 +0000 dt-bindings: clock: imx7ulp: add HSRUN mode related clocks There are HSRUN mode clock mux and divider in SCG1 module, and SMC1 can control i.MX7ULP CPU to run in RUN mode or HSRUN mode, the mode switch bits are actually a clock mux, add these clocks for clock driver and dtb to use. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 2de34ed964891c0a58d03b20705437d8831fd6de Merge: 5964ac60131c0 87ab115185e11 Author: Stephen Boyd Date: Fri Dec 14 14:02:55 2018 -0800 Merge branch 'clk-of' into clk-next * clk-of: clk: Use of_node_name_eq for node name comparisons commit 87ab115185e116f0349ba5bd0555d0b0e935166b Author: Rob Herring Date: Wed Dec 5 13:50:21 2018 -0600 clk: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Geert Uytterhoeven Cc: Michael Turquette Cc: Stephen Boyd Cc: Tero Kristo Cc: Ulf Hansson Cc: linux-renesas-soc@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven (clk-mstp) Acked-by: Ulf Hansson (ux500) Signed-off-by: Stephen Boyd commit 3e42f200c195fd3a39142028194b67ffaf2b5f6d Merge: c5510b8dafce5 b76574300504e Author: Linus Walleij Date: Fri Dec 14 22:51:05 2018 +0100 Merge branch 'ib-pca953x' into devel commit 9b432630e0150b777c423fdef6a7b8d17dfa70b6 Author: Boris Brezillon Date: Thu Dec 13 20:22:27 2018 +0100 mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan() Commit e1e6255c311b ("mtd: rawnand: omap2: convert driver to nand_scan()") moved part of the init code in the ->attach_chip hook and at the same time changed the struct device object passed to dma_request_chan() (&pdev->dev instead of pdev->dev.parent). Fixes: e1e6255c311b ("mtd: rawnand: omap2: convert driver to nand_scan()") Reported-by: Alexander Sverdlin Cc: Signed-off-by: Boris Brezillon Tested-by: Alexander Sverdlin Signed-off-by: Miquel Raynal commit b637ef779575a977068025f842ecd480a9671f3f Author: Boris Brezillon Date: Thu Dec 13 11:55:26 2018 +0100 mtd: rawnand: Fix JEDEC detection nand_jedec_detect() should return 1 when the PARAM page parsing succeeds, otherwise the core considers JEDEC detection failed and falls back to ID-based detection. Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip") Cc: Signed-off-by: Boris Brezillon Acked-by: Miquel Raynal Signed-off-by: Miquel Raynal commit 5964ac60131c0829f6fa9883c6c578028f553267 Merge: 9dc3204247083 8cbdc1f09f7ac Author: Stephen Boyd Date: Fri Dec 14 13:44:19 2018 -0800 Merge branch 'clk-vc5-suspend' into clk-next - Proper suspend/resume on VersaClock5 * clk-vc5-suspend: clk: vc5: Add suspend/resume support commit 8cbdc1f09f7ac5c082818909da104f92d3f38d77 Author: Marek Vasut Date: Thu Dec 13 17:15:28 2018 +0100 clk: vc5: Add suspend/resume support Add simple suspend/resume handlers to the driver to restore the chip configuration after resume. It is possible that the chip was configured with non-default values before suspend-resume cycle and that the chip is powered down during this cycle, so the configuration could get lost. Signed-off-by: Marek Vasut Cc: Alexey Firago Cc: Laurent Pinchart Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Stephen Boyd commit 9dc320424708378b7a2137a148fc4fc816105ba2 Merge: 44a6951777a3c 8a034aad4892b Author: Stephen Boyd Date: Fri Dec 14 13:42:08 2018 -0800 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: qcom: qcs404: Fix gpll0_out_main parent clk: zynqmp: Off by one in zynqmp_is_valid_clock() clk: mmp: Off by one in mmp_clk_add() clk: mvebu: Off by one bugs in cp110_of_clk_get() arm64: dts: qcom: sdm845-mtp: Mark protected gcc clocks clk: zynqmp: handle fixed factor param query error clk: qcom: gcc: Fix board clock node name clk: meson: axg: mark fdiv2 and fdiv3 as critical clk: meson-gxbb: set fclk_div3 as CLK_IS_CRITICAL clk: fixed-factor: fix of_node_get-put imbalance commit 44a6951777a3c6bd6f934e23537c2965a0283985 Merge: 58c05c823b834 0f1c6ca83fb48 Author: Stephen Boyd Date: Fri Dec 14 13:42:00 2018 -0800 Merge branch 'clk-qcom-8998-resets' into clk-next - Add resets and make Qualcomm MSM8998 GCC driver more functional * clk-qcom-8998-resets: clk: qcom: Drop unused 8998 clock clk: qcom: Leave mmss noc on for 8998 clk: qcom: Add missing msm8998 resets clk: qcom: gcc-msm8998: Add clkref clocks clk: qcom: gcc-msm8998: Disable halt check of UFS clocks clk: qcom: gcc-msm8998: Drop hmss_dvm and lpass_at clk: qcom: Enumerate remaining msm8998 resets clk: qcom: Add xo dummy clk on msm8998 clk: qcom: Fix MSM8998 resets commit 0f1c6ca83fb483a5ea85fe239588a90bb29d519d Author: Jeffrey Hugo Date: Thu Dec 13 10:09:09 2018 -0700 clk: qcom: Drop unused 8998 clock gcc_lpass_trig_clk is not used downstream, therefore there is no reason to expect it to be needed for clients. Let's remove it because messing with the clock has been observed to cause Linux hangs when the qdss_clk is initialized by rpmcc. Signed-off-by: Jeffrey Hugo Reviewed-by: Marc Gonzalez Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) Signed-off-by: Stephen Boyd commit 12eced09cd301aa7b1868a67c50a651c2aacd363 Author: Jeffrey Hugo Date: Thu Dec 13 15:43:40 2018 -0700 clk: qcom: Leave mmss noc on for 8998 Similar to other qcom targets, gcc_mmss_noc_cfg_ahb_clk should not be disabled. Any mmss access depends on this clock, and its been observed that enabling mmssnoc_axi_rpm_clk with rpmcc results in an implicit access to mmss and will crash the system if gcc_mmss_noc_cfg_ahb_clk is disabled. Signed-off-by: Jeffrey Hugo Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) Signed-off-by: Stephen Boyd commit 390de1940441a72625283098dd0d9303d0ceb8fb Author: Wen Yang Date: Tue Dec 11 12:20:46 2018 +0800 net/ibmvnic: Remove tests of member address The driver was checking for non-NULL address. - adapter->napi[i] This is pointless as these will be always non-NULL, since the 'dapter->napi' is allocated in init_napi(). It is safe to get rid of useless checks for addresses to fix the coccinelle warning: >>drivers/net/ethernet/ibm/ibmvnic.c: test of a variable/field address Since such statements always return true, they are redundant. Signed-off-by: Wen Yang CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Thomas Falcon CC: John Allen CC: "David S. Miller" CC: linuxppc-dev@lists.ozlabs.org CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 6342ca644713601b42dcb8f35e3751afc0943373 Author: Prashant Bhole Date: Tue Dec 11 11:43:07 2018 +0900 tun: replace get_cpu_ptr with this_cpu_ptr when bh disabled tun_xdp_one() runs with local bh disabled. So there is no need to disable preemption by calling get_cpu_ptr while updating stats. This patch replaces the use of get_cpu_ptr() with this_cpu_ptr() as a micro-optimization. Also removes related put_cpu_ptr call. Acked-by: Jason Wang Signed-off-by: Prashant Bhole Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 58c05c823b8347daf03a8448e38318820fad6645 Merge: ffe05540d1801 b1260067ac3dd 3cc48976e9763 929914946fa61 1e3121bfe51a3 d360b130e210f Author: Stephen Boyd Date: Fri Dec 14 13:34:47 2018 -0800 Merge branches 'clk-imx7ulp', 'clk-imx6-fixes', 'clk-imx-fixes', 'clk-imx8qxp' and 'clk-imx8mq' into clk-next - NXP i.MX7ULP SoC clock support - Support for i.MX8QXP SoC clocks - Support for NXP i.MX8MQ clock controllers * clk-imx7ulp: clk: imx: add imx7ulp clk driver clk: imx: implement new clk_hw based APIs clk: imx: make mux parent strings const dt-bindings: clock: add imx7ulp clock binding doc clk: imx: add imx7ulp composite clk support clk: imx: add pfdv2 support clk: imx: add pllv4 support clk: fractional-divider: add CLK_FRAC_DIVIDER_ZERO_BASED flag support clk: imx: add gatable clock divider support * clk-imx6-fixes: clk: imx6q: handle ENET PLL bypass clk: imx6q: optionally get CCM inputs via standard clock handles clk: imx6q: reset exclusive gates on init * clk-imx-fixes: clk: imx6q: add DCICx clocks gate clk: imx6sl: ensure MMDC CH0 handshake is bypassed clk: imx7d: remove UART1 clock setting * clk-imx8qxp: clk: imx: add imx8qxp lpcg driver clk: imx: add lpcg clock support clk: imx: add imx8qxp clk driver clk: imx: add scu clock common part clk: imx: add configuration option for mmio clks dt-bindings: clock: add imx8qxp lpcg clock binding dt-bindings: clock: imx8qxp: add SCU clock IDs firmware: imx: add pm svc headfile dt-bindings: fsl: scu: update power domain binding firmware: imx: remove resource id enums dt-bindings: imx: add scu resource id headfile * clk-imx8mq: clk: imx: Make the i.MX8MQ CCM clock driver CLK_IMX8MQ dependant clk: imx: remove redundant initialization of ret to zero clk: imx: Add SCCG PLL type clk: imx: Add fractional PLL output clock clk: imx: Add clock driver for i.MX8MQ CCM clk: imx: Add imx composite clock dt-bindings: Add binding for i.MX8MQ CCM commit ffe05540d18013db62c43627836a3638e9a2c7aa Merge: 1a501c8defe95 60baf75e3f5b7 67ee606a6bbb5 08441a966219a e74581b79ddd9 5b5bb7c77a87f Author: Stephen Boyd Date: Fri Dec 14 13:34:00 2018 -0800 Merge branches 'clk-renesas', 'clk-allwinner', 'clk-tegra', 'clk-meson' and 'clk-rockchip' into clk-next * clk-renesas: clk: renesas: rcar-gen3: Add HS400 quirk for SD clock clk: renesas: rcar-gen3: Add documentation for SD clocks clk: renesas: rcar-gen3: Set state when registering SD clocks clk: renesas: r8a77995: Simplify PLL3 multiplier/divider clk: renesas: r8a77995: Add missing CPEX clock clk: renesas: r8a77995: Remove non-existent SSP clocks clk: renesas: r8a77995: Remove non-existent VIN5-7 module clocks clk: renesas: r8a77995: Correct parent clock of DU clk: renesas: r8a77990: Correct parent clock of DU clk: renesas: r8a77970: Add CPEX clock clk: renesas: r8a77965: Add CPEX clock clk: renesas: r8a7796: Add CPEX clock clk: renesas: r8a7795: Add CPEX clock clk: renesas: r8a774a1: Add CPEX clock dt-bindings: clock: r8a7796: Remove CSIREF clock dt-bindings: clock: r8a7795: Remove CSIREF clock clk: renesas: Mark rza2_cpg_clk_register static clk: renesas: r7s9210: Add USB clocks clk: renesas: r8a77970: Add RPC clocks clk: renesas: r7s9210: Add SDHI clocks * clk-allwinner: clk: sunxi-ng: a64: Allow parent change for VE clock clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for all audio module clocks clk: sunxi-ng: a33: Use sigma-delta modulation for audio PLL clk: sunxi-ng: h3: Allow parent change for ve clock clk: sunxi-ng: add support for suniv F1C100s SoC dt-bindings: clock: Add Allwinner suniv F1C100s CCU clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output clk: sunxi-ng: sun50i: a64: Use sigma-delta modulation for audio PLL clk: sunxi-ng: a64: Fix gate bit of DSI DPHY clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I clk: sunxi-ng: Add support for H6 DE3 clocks dt-bindings: clock: sun8i-de2: Add H6 DE3 clock description clk: sunxi-ng: h6: Set video PLLs limits clk: sunxi-ng: Use u64 for calculation of NM rate clk: sunxi-ng: Adjust MP clock parent rate when allowed clk: sunxi-ng: sun50i: h6: Fix MMC clock mux width clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock * clk-tegra: clk: tegra: Return the exact clock rate from clk_round_rate clk: tegra30: Use Tegra CPU powergate helper function soc/tegra: pmc: Drop SMP dependency from CPU APIs clk: tegra: Fix maximum audio sync clock for Tegra124/210 clk: tegra: get rid of duplicate defines clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC clk: tegra20: Turn EMC clock gate into divider * clk-meson: (25 commits) clk: meson: axg-audio: use the clk input helper function clk: meson: add clk-input helper function clk: meson: Mark some things static clk: meson: meson8b: add the read-only video clock trees clk: meson: meson8b: add the fractional divider for vid_pll_dco clk: meson: meson8b: fix the offset of vid_pll_dco's N value clk: meson: Fix GXL HDMI PLL fractional bits width clk: meson: meson8b: add the CPU clock post divider clocks clk: meson: meson8b: rename cpu_div2/cpu_div3 to cpu_in_div2/cpu_in_div3 clk: meson: clk-regmap: add read-only gate ops clk: meson: meson8b: allow changing the CPU clock tree clk: meson: meson8b: run from the XTAL when changing the CPU frequency clk: meson: meson8b: add support for more M/N values in sys_pll clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL clk: meson: meson8b: do not use cpu_div3 for cpu_scale_out_sel clk: meson: clk-pll: check if the clock is already enabled clk: meson: meson8b: fix the width of the cpu_scale_div clock clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table clk: meson: meson8b: use the HHI syscon if available dt-bindings: clock: meson8b: use the registers from the HHI syscon ... * clk-rockchip: clk: rockchip: add clock-id to gate of ACODEC for rk3328 clk: rockchip: add clock ID of ACODEC for rk3328 clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328 clk: rockchip: fix I2S1 clock gate register for rk3328 clk: rockchip: make rk3188 hclk_vio_bus critical clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering clk: rockchip: fix rk3188 sclk_smc gate data clk: rockchip: fix typo in rk3188 spdif_frac parent commit 1a501c8defe950571316d5ddd917bf44f5ed7bd4 Merge: 3315fe5faff4e 2e62246b08a69 e1bd55e5a567a 0f51659a438ee 56950ff82325b Author: Stephen Boyd Date: Fri Dec 14 13:33:44 2018 -0800 Merge branches 'clk-managed-registration', 'clk-spdx', 'clk-remove-basic' and 'clk-ops-const' into clk-next - Make devm_of_clk_add_hw_provider() use parent dt node if necessary - Various SPDX taggings - Mark clk_ops const when possible * clk-managed-registration: clk: bd718x7: Initial support for ROHM bd71837/bd71847 PMIC clock clk: apcs-msm8916: simplify probe cleanup by using devm clk: clk-twl6040: Free of_provider at remove clk: rk808: use managed version of of_provider registration clk: clk-hi655x: Free of_provider at remove clk: of-provider: look at parent if registered device has no provider info clk: Add kerneldoc to managed of-provider interfaces * clk-spdx: clk: Tag basic clk types with SPDX clk: Tag clk core files with SPDX clk: bcm2835: Switch to SPDX identifier * clk-remove-basic: clk: Loongson1: Remove usage of CLK_IS_BASIC clk: samsung: s3c2410: Remove usage of CLK_IS_BASIC clk: versatile: sp810: Remove usage of CLK_IS_BASIC clk: hisilicon: Remove usage of CLK_IS_BASIC clk: h8300: Remove usage of CLK_IS_BASIC clk: axm5516: Remove usage of CLK_IS_BASIC clk: st: Remove usage of CLK_IS_BASIC clk: renesas: Remove usage of CLK_IS_BASIC * clk-ops-const: clk: s2mps11: constify clk_ops structure clk: pxa: constify clk_ops structures clk: pistachio: constify clk_ops structures clk: palmas: constify clk_ops structure clk: max77686: constify clk_ops structure commit 08441a966219aee513cf802ca8de170c6655c61a Author: Robert Yang Date: Tue Sep 25 17:49:40 2018 -0400 clk: tegra: Return the exact clock rate from clk_round_rate The current behavior is that clk_round_rate would return the same clock rate passed to it for valid PLL configurations. This change will return the exact rate the PLL will provide in accordance with clk API. Signed-off-by: Robert Yang Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit b158aeeacc551a689dc26824800a0a27f3668bb1 Author: Jon Hunter Date: Mon Dec 3 10:28:41 2018 +0000 clk: tegra30: Use Tegra CPU powergate helper function Rather than using the tegra_powergate_is_powered() function for determining if a CPU is powered, use the tegra_pmc_cpu_is_powered() instead which was created to get the CPU power status. Internally tegra_pmc_cpu_is_powered() calls tegra_powergate_is_powered() and so is equivalent. The Tegra30 clock driver is the only public user of tegra_powergate_is_powered() and so by updating the Tegra30 clock driver to use tegra_pmc_cpu_is_powered(), we can then make tegra_powergate_is_powered() a non-public function. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit f9c380efa792f313d3366a935fe38091d4c98ccb Author: Jon Hunter Date: Thu Dec 13 09:46:14 2018 +0000 soc/tegra: pmc: Drop SMP dependency from CPU APIs When CONFIG_SMP is disabled, the tegra clk driver now fails to build: drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’: drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration] cpu_pwr_status = tegra_pmc_cpu_is_powered(1) || ^ Fix the above error by removing the CONFIG_SMP ifdef around the declaration around the PMC CPU APIs because although these are not needed for non-SMP configurations, there is no harm in including these for non-SMP builds either. Fixes: 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function") Reported-by: Arnd Bergmann Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit 845d782d91448e0fbca686bca2cc9f9c2a9ba3e7 Author: Jon Hunter Date: Mon Dec 3 10:28:40 2018 +0000 clk: tegra: Fix maximum audio sync clock for Tegra124/210 The maximum frequency supported for I2S on Tegra124 and Tegra210 is 24.576MHz (as stated in the Tegra TK1 data sheet for Tegra124 and the Jetson TX1 module data sheet for Tegra210). However, the maximum I2S frequency is limited to 24MHz because that is the maximum frequency of the audio sync clock. Increase the maximum audio sync clock frequency to 24.576MHz for Tegra124 and Tegra210 in order to support 24.576MHz for I2S. Update the tegra_clk_register_sync_source() function so that it does not set the initial rate for the sync clocks and use the clock init tables to set the initial rate instead. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit 7514557c1c57c1973b7c2c6095c160f0a18f5da1 Author: Marcel Ziswiler Date: Thu Nov 1 02:52:28 2018 +0100 clk: tegra: get rid of duplicate defines Get rid of 3 duplicate defines. Signed-off-by: Marcel Ziswiler Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit 9582466640432c86fb060a4fa4d9d3c48e708ca6 Author: Aviv Heller Date: Mon Aug 27 15:39:40 2018 +0300 net/mlx5: Handle LAG FW commands failure gracefully When create_lag or destroy_lag FW commands fail, display an appropriate error message, and try to recover, if possible. Signed-off-by: Aviv Heller Reviewed-by: Roi Dayan Reviewed-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 7c34ec19e10c0d13ca2f3435fb85d2dddccad917 Author: Aviv Heller Date: Thu Aug 23 13:47:53 2018 +0300 net/mlx5: Make RoCE and SR-IOV LAG modes explicit With the introduction of SR-IOV LAG, checking whether LAG is active is no longer good enough, since RoCE and SR-IOV LAG each entails different behavior by both the core and infiniband drivers. This patch introduces facilities to discern LAG type, in addition to mlx5_lag_is_active(). These are implemented in such a way as to allow more complex mode combinations in the future. Signed-off-by: Aviv Heller Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 292612d68c4ed3063cdc99512e865a819b8c9423 Author: Aviv Heller Date: Thu Aug 23 13:34:10 2018 +0300 net/mlx5: Rename mlx5_lag_is_bonded() to __mlx5_lag_is_active() The new name better represents the function's aim, and sets a precedent for a '__' prefix for internal, non-locked versions of LAG APIs. Signed-off-by: Aviv Heller Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8aaca1976e2757e15edf43866a0549b321a4222f Author: Rabie Loulou Date: Wed May 23 14:19:07 2018 +0300 net/mlx5: Allow co-enablement of uplink LAG and SRIOV Enable setting uplink LAG if sriov is enabled on both ports in switchdev mode. Once the sriov mode is changed from switchdev for any of the ports, the LAG instance is disabled. Signed-off-by: Rabie Loulou Signed-off-by: Aviv Heller Signed-off-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit eff849b2c669ebf0df88762f082bcb252f8e883c Author: Rabie Loulou Date: Wed Jun 6 16:31:34 2018 +0300 net/mlx5: Allow/disallow LAG according to pre-req only Remove the lag forbid/allow functions, change the lag prereq check to run in the do-bond logic, so every change in the prereq state will cause LAG to be disabled/enabled accordingly after the next do-bond run. Add lag update function, so every component which changes the prereq state and want the LAG to re-calc the conditions can call the update function. Signed-off-by: Rabie Loulou Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 3b5ff59fd851d8e8c7c3ba08b01011baffa60cb6 Author: Rabie Loulou Date: Thu Apr 26 16:45:41 2018 +0300 net/mlx5: Adjustments for the activate LAG logic to run under sriov When HW lag is set/unset, roce must not be enabled on the port, as such we wrap such changes with roce enable/disable either directly or through re-creation of IB device. Currently, lag and sriov are mutually exclusive, so by definition this code doesn't run under sriov. Towards changing this exclusion, we need to make sure that roce will not be enabled on the eswitch manager port under sriov since this is requirement of the switchdev mode. We are going strict here and avoiding this all together under sriov. Signed-off-by: Rabie Loulou Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 1418ddd96afdb097ab9a2fe09c94e820d596321a Author: Aviv Heller Date: Tue Oct 2 17:18:44 2018 +0300 net/mlx5e: Duplicate offloaded TC eswitch rules under uplink LAG Under uplink LAG, packets that match a flow might arrive on both uplink ports and transmitted through both as part of supporting aggregation and high-availability. When the netdevs representing the uplinks are set into LAG (bonding, teaming), duplicate the TC flow offloading into each of the per-uplink e-switches. Duplication is not required if the source is the bond device, since in this case it is assumed that the bond and the uplink netdevs share the same TC block, and thus duplication will occur naturally by the stack. Note that under encapsulation scheme, both flows will use the same neighbour and hence both will contribute to the last-used feedback towards the stack. Signed-off-by: Aviv Heller Signed-off-by: Rabie Loulou Reviewed-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 7ba58ba7ba5e19324b3879000ef341966b19727b Author: Rabie Loulou Date: Wed Jun 6 16:27:08 2018 +0300 net/mlx5e: Offload TC e-switch rules with egress LAG device When parsing TC FDB actions, if the egress device is a bond/team net-device which enslaved the uplink representor of the e-switch, use the uplink representor as the destination in the HW rule. Signed-off-by: Rabie Loulou Signed-off-by: Aviv Heller Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 491c37e49b48e7a18dc79e29f3ac13e0c3d0fb54 Author: Rabie Loulou Date: Wed Jun 6 15:49:27 2018 +0300 net/mlx5e: In case of LAG, one switch parent id is used for all representors When the uplink representors are put into lag, set all the representors (VFs and uplinks) of the same NIC to return the same switchdev id. Currently, the route lookup code on the encapsulation offload path assumes that same switchdev id for the source and dest devices means that the dest is also mlx5 HW netdev. This doesn't hold anymore when we align the switchdev Id of the uplinks to be same, which in turn causes the bond/team to return that id to the caller. As such, enhance the relevant check to take into account the uplink lag case. Signed-off-by: Rabie Loulou Signed-off-by: Aviv Heller Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit f9392795e2e35449a7dca46574b1a86eace20e9c Author: Shahar Klein Date: Thu Nov 30 17:55:46 2017 +0200 net/mlx5e: Enhance flow counter scheme for offloaded TC eswitch rules Assign a counter dev attribute according to device capability and use it for management of counters related to offloaded eswitch TC flows. With upcoming support for uplink LAG, we have two HW rules per one logical SW (TC) rule. Although the HW supports attaching one counter to multiple rules, we are allocating counter per HW rule. We need this separation for two reasons: 1. "flow eswitch" counter affinity HW require the counter to be allocated on the device where the eswitch rule is set. 2. for some use-cases (multi-path routing) each HW flow relates to different neighbour, hence our neigh update logic must have a per-rule HW accountant in order to provide the proper feedback to the kernel. Signed-off-by: Shahar Klein Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d Author: Roi Dayan Date: Sun Nov 11 22:24:03 2018 +0200 net/mlx5e: Infrastructure for duplicated offloading of TC flows Under uplink LAG or multipath schemes, traffic that matches one flow might arrive on both uplink ports and transmitted through both as part of supporting aggregation and high-availability. To cope with the fact that the SW model might use logical SW port (e.g uplink team or bond) but we have two HW ports with e-switch on each, there are cases where in order to offload a SW TC rule we need to duplicate it to two HW flows. Since each HW rule has its own counter we also aggregate the counter of both rules when a flow stats query is executed from user-space. Introduce the changes for the different elements (add/delete/stats), currently nothing is duplicated. Signed-off-by: Roi Dayan Signed-off-by: Aviv Heller Signed-off-by: Shahar Klein Signed-off-by: Saeed Mahameed commit ac004b8321281b9da7d9a99674241e60e49ffc8a Author: Roi Dayan Date: Sun Nov 11 17:50:16 2018 +0200 net/mlx5e: E-Switch, Add peer miss rules In the sriov offloads mode, packets that are not matched by any other rule are sent towards the e-switch vport manager for further processing. Under upcoming patches (e.g for uplink LAG), packets sent from VF vports belonging to esw0 (e-switch related to PF0) might end up in esw1 (e-switch related to PF1) due to muxing logic applied by the FW. In such a case we still want the missed packet to be sent to the "base" esw manager vport in order to present the control plane a consistent view of the source (VF reresentor) port. Signed-off-by: Roi Dayan Signed-off-by: Aviv Heller Signed-off-by: Shahar Klein Signed-off-by: Saeed Mahameed commit fadd59fc50d010145f251db583c7ccef37393d19 Author: Aviv Heller Date: Tue Dec 4 21:24:46 2018 +0200 net/mlx5: Introduce inter-device communication mechanism This introduces devcom, a generic mechanism for performing operations on both physical functions of the same Connect-X card. The first user of this API is merged eswitch, which will be introduced in subsequent patches. Signed-off-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 3315fe5faff4e38fafba8434ea75d90ed66a44c6 Merge: f4ad7fba066f7 8d3e5b9c1f2cd Author: Stephen Boyd Date: Fri Dec 14 13:27:39 2018 -0800 Merge branch 'clk-qcom-sdm845-lpass' into clk-next - Qualcomm SDM845 audio subsystem clks * clk-qcom-sdm845-lpass: clk: qcom: Add lpass clock controller driver for SDM845 dt-bindings: clock: Introduce QCOM LPASS clock bindings dt-bindings: clock: Update GCC bindings for protected-clocks commit f4ad7fba066f70ccd50816476e2f8700013c0724 Merge: aab184d23b450 f071bcebee0ad 922b8fae085d6 eaeee28db2893 f87d33e663d65 c51ba54f6349e Author: Stephen Boyd Date: Fri Dec 14 13:26:21 2018 -0800 Merge branches 'clk-qcom-kconfig', 'clk-qcom-gpucc', 'clk-qcom-qcs404-rpm', 'clk-qcom-spi' and 'clk-qcom-videocc-binding' into clk-next - Qualcomm SDM845 GPU clock controllers - Qualcomm QCS404 RPM clk support * clk-qcom-kconfig: clk: qcom: Move to menuconfig and reduce lines * clk-qcom-gpucc: dt-bindings: clock: qcom: Fix the xo parent in gpucc example clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6 clk: qcom: Add a dummy enable function for GX gdsc clk: qcom: gdsc: Don't override existing gdsc pd functions clk: qcom: Add graphics clock controller driver for SDM845 dt-bindings: clock: Introduce QCOM Graphics clock bindings * clk-qcom-qcs404-rpm: clk: qcom: smd: Add support for QCS404 rpm clocks * clk-qcom-spi: clk: qcom: msm8916: Additional clock rates for spi * clk-qcom-videocc-binding: dt-bindings: clock: Require #reset-cells in sdm845-videocc commit c2c79a32fb860ee374afe58fee6d67ab6aa83081 Author: Arnd Bergmann Date: Mon Dec 10 22:52:56 2018 +0100 hamradio, ppp: change semaphore to completion ppp and hamradio have copies of the same code that uses a semaphore in place of a completion for historic reasons. Make it use the proper interface instead in all copies. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit aab184d23b4502c21f35a80e5e75fe7a78d00812 Merge: d7d458cb29e1e b8b211ca763a6 b181b3b801da8 e374e06880f93 25bf466bd2bd0 Author: Stephen Boyd Date: Fri Dec 14 13:24:54 2018 -0800 Merge branches 'clk-qoriq-t1023', 'clk-protected-binding', 'clk-define-show-macro' and 'clk-static' into clk-next - NXP QorIQ T1023 SoC support - Introduce a 'protected-clocks' binding for firmware protected clks - Shrink code some with DEFINE_SHOW_ATTRIBUTE() * clk-qoriq-t1023: clk: qoriq: add more chips support * clk-protected-binding: clk: qcom: Support 'protected-clocks' property dt-bindings: clk: Introduce 'protected-clocks' property * clk-define-show-macro: clk: tegra: Change to use DEFINE_SHOW_ATTRIBUTE macro clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro * clk-static: clk: stm32mp1: drop pointless static qualifier in stm32_register_hw_clk() commit d7d458cb29e1ec5857a7d73ca89846e4240bb5a4 Merge: 819ed0ad91cdd 8b627f616ed63 d42925189b416 Author: Stephen Boyd Date: Fri Dec 14 13:24:47 2018 -0800 Merge branches 'clk-bcm-module-license', 'clk-boston-leak' and 'clk-mtk-mt7629' into clk-next - Mediatek MT7629 SoC clk controllers * clk-bcm-module-license: clk: bcm2835: make license text and module license match * clk-boston-leak: clk: boston: unregister clks on failure in clk_boston_setup() clk: boston: fix possible memory leak in clk_boston_setup() * clk-mtk-mt7629: clk: mediatek: fix the PCIe MAC clock parent clk: mediatek: Drop more __init markings for driver probe clk: mediatek: Drop __init from mtk_clk_register_cpumuxes() dt-bindings: arm: mediatek: document clk bindings for MT7629 clk: mediatek: add clock support for MT7629 SoC commit 2aa55dccf83d7ca9f1da59ae005426c44fbeb890 Author: Arnd Bergmann Date: Mon Dec 10 21:44:34 2018 +0100 hns3: prevent building without CONFIG_INET We now get a link failure when CONFIG_INET is disabled, since tcp_gro_complete is unavailable: drivers/net/ethernet/hisilicon/hns3/hns3_enet.o: In function `hns3_set_gro_param': hns3_enet.c:(.text+0x230c): undefined reference to `tcp_gro_complete' Add an explicit CONFIG_INET dependency here to avoid the broken configuration. Fixes: a6d53b97a2e7 ("net: hns3: Adds GRO params to SKB for the stack") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 1e3121bfe51a3424050ae66326e8a113f0ed7fb8 Author: Aisheng Dong Date: Thu Dec 13 15:43:05 2018 +0000 clk: imx: add imx8qxp lpcg driver Add imx8qxp lpcg driver support Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Michael Turquette Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 2f77296d3df9915490f41fc8a971cba00e0b4a2c Author: Aisheng Dong Date: Thu Dec 13 15:43:01 2018 +0000 clk: imx: add lpcg clock support The Low-Power Clock Gate (LPCG) modules contain a local programming model to control the clock gates for the peripherals. An LPCG module is used to locally gate the clocks for the associated peripheral. And they're bedind the SCU clock. Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Michael Turquette Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit c2cccb6d0b33bad71154ec0c208d060456bcf6d4 Author: Aisheng Dong Date: Thu Dec 13 15:42:58 2018 +0000 clk: imx: add imx8qxp clk driver Add imx8qxp clk driver which is based on SCU firmware clock service. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Stephen Boyd Cc: Michael Turquette Signed-off-by: Dong Aisheng [sboyd@kernel.org: Move the makefile rule higher in the file] Signed-off-by: Stephen Boyd commit d360b130e210f2468b2ff9cae5177c6cba780e83 Author: Abel Vesa Date: Fri Dec 14 14:20:34 2018 +0000 clk: imx: Make the i.MX8MQ CCM clock driver CLK_IMX8MQ dependant Remove the dependency between the i.MX8MQ CCM clock driver and the CONFIG_SOC_IMX8MQ and use CONFIG_CLK_IMX8MQ instead. CONFIG_CLK_IMX8MQ depends on ARCH_MXC && ARM64. Signed-off-by: Abel Vesa Signed-off-by: Stephen Boyd commit a3a0ebd10a9b6cf6c33885016393729112c85083 Author: Michel Dänzer Date: Thu Dec 13 17:05:31 2018 +0100 drm/amdgpu: WARN once if amdgpu_bo_unpin is called for an unpinned BO It indicates a pin/unpin imbalance bug somewhere. While the bug isn't necessarily in the call chain hitting this, it's at least one part involved. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 344e7ad467f5bd057b9d4d66adafbfa8077ccaa6 Author: Evan Quan Date: Tue Dec 11 11:28:20 2018 +0800 drm/amdgpu: enable Vega20 page queue support Page queue is supported on Vega20 with SDMA firmware 123 onwards. Signed-off-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit fefdc6cc0af87fff149b797ce308e98c302fddd3 Author: Evan Quan Date: Mon Dec 10 15:12:29 2018 +0800 drm/amdgpu: use different irq ring ID for Vega20 page queues Vega20 uses ring id 1 for page queues EOP irq while previous ASICs take ring id 3. Signed-off-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit c713a461459202504050305242cd854bad57837c Author: Evan Quan Date: Wed Nov 21 13:04:48 2018 +0800 drm/amdgpu: update the vm invalidation engine layout V2 We need new invalidation engine layout due to new SDMA page queues added. V2: fix coding style and add correct return value Signed-off-by: Evan Quan Reviewed-by: Christian König Reviewed-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1b3f6bc96883f685224b14f04f587643a47109dd Author: Evan Quan Date: Wed Nov 21 11:25:53 2018 +0800 drm/amdgpu: increase the MAX ring number As two more SDMA page queue rings are added on Vega20. Signed-off-by: Evan Quan Reviewed-by: Oak Zeng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4e9177134e7dd992dd96875143413dbc303f355e Author: Christian König Date: Mon Dec 3 14:05:34 2018 +0100 drm/amdgpu: fix NULL fence handling in amdgpu_cs_fence_to_handle_ioctl When the fence is already signaled it is perfectly normal to get a NULL fence here. But since we can't export that we need to use a stub fence. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher commit 93d77e7f1410c366050d6035dcba1a5167c7cf0b Author: Vincent Whitchurch Date: Fri Dec 14 17:05:55 2018 +0100 ARM: module: Fix function kallsyms on Thumb-2 Thumb-2 functions have the lowest bit set in the symbol value in the symtab. When kallsyms are generated for the vmlinux, the kallsyms are generated from the output of nm, and nm clears the lowest bit. $ arm-linux-gnueabihf-readelf -a vmlinux | grep show_interrupts 95947: 8015dc89 686 FUNC GLOBAL DEFAULT 2 show_interrupts $ arm-linux-gnueabihf-nm vmlinux | grep show_interrupts 8015dc88 T show_interrupts $ cat /proc/kallsyms | grep show_interrupts 8015dc88 T show_interrupts However, for modules, the kallsyms uses the values in the symbol table without modification, so for functions in modules, the lowest bit is set in kallsyms. $ arm-linux-gnueabihf-readelf -a drivers/net/tun.ko | grep tun_get_socket 333: 00002d4d 36 FUNC GLOBAL DEFAULT 1 tun_get_socket $ arm-linux-gnueabihf-nm drivers/net/tun.ko | grep tun_get_socket 00002d4c T tun_get_socket $ cat /proc/kallsyms | grep tun_get_socket 7f802d4d t tun_get_socket [tun] Because of this, the symbol+offset of the crashing instruction shown in oopses is incorrect when the crash is in a module. For example, given a tun_get_socket which starts like this, 00002d4c : 2d4c: 6943 ldr r3, [r0, #20] 2d4e: 4a07 ldr r2, [pc, #28] 2d50: 4293 cmp r3, r2 a crash when tun_get_socket is called with NULL results in: PC is at tun_xdp+0xa3/0xa4 [tun] pc : [<7f802d4c>] As can be seen, the "PC is at" line reports the wrong symbol name, and the symbol+offset will point to the wrong source line if it is passed to gdb. To solve this, add a way for archs to fixup the reading of these module kallsyms values, and use that to clear the lowest bit for function symbols on Thumb-2. After the fix: # cat /proc/kallsyms | grep tun_get_socket 7f802d4c t tun_get_socket [tun] PC is at tun_get_socket+0x0/0x24 [tun] pc : [<7f802d4c>] Signed-off-by: Vincent Whitchurch Signed-off-by: Jessica Yu commit 5439c985c5a83a8419f762115afdf560ab72a452 Author: Vincent Whitchurch Date: Fri Dec 14 17:05:54 2018 +0100 module: Overwrite st_size instead of st_info st_info is currently overwritten after relocation and used to store the elf_type(). However, we're going to need it fix kallsyms on ARM's Thumb-2 kernels, so preserve st_info and overwrite the st_size field instead. st_size is neither used by the module core nor by any architecture. Reviewed-by: Miroslav Benes Reviewed-by: Dave Martin Signed-off-by: Vincent Whitchurch Signed-off-by: Jessica Yu commit 99bf73ebf9c4193dbcc5331b29d316a89ada43d1 Author: Firoz Khan Date: Thu Dec 13 14:37:39 2018 +0530 mips: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_(nr_)n64/n32/o32.h and syscall_table_32_o32/ 64_n64/64_n32/64-o32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_(nr_)n64/n32/o32.h and syscall_table_32_o32/64_n64/64-n32/64-o32.h files by the syscall table generation script invoked by parisc/Make- file and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/scall32-o32/64-n64/64-n32/- 64-o32.Sfile. Signed-off-by: Firoz Khan Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 9bcbf97c62931f27ab2c52f0848dec0cd48aee78 Author: Firoz Khan Date: Thu Dec 13 14:37:38 2018 +0530 mips: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. - Compat entry name, if required. syscallhdr.sh, syscallnr.sh and syscalltbl.sh will gene- rate uapi header unistd_n64/n32/o32.h, unistd_nr_n64/n32/- o32.h and syscall_table_32_o32/64_n64/64-n32/64-o32.h files respectively. All *.sh files will parse the content sys- call.tbl to generate the header and table files. unistd- _n64/n32/o32.h and unistd_nr_n64/n32/o32.h will be included by uapi/asm/unistd.h and syscall_table_32_o32/64_n64/64-n32- /64-o32.h is included by kernel/syscall_table32_o32/64- _n64/64-n32/64-o32.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan [paul.burton@mips.com: - Change sysnr_pfx_unistd_nr_n64 to 64.] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 6a00cb6175a4212e314a8f3166a66cfc2eee9e05 Author: Firoz Khan Date: Thu Dec 13 14:37:37 2018 +0530 mips: remove syscall table entries The config flag - CONFIG_MIPS_MT_FPAFF uses to check whether which syscall entries need to be used in scall32-o32.S file. One of the patch in this patch series will generate syscall table file. But CONFIG_MIPS_MT_FPAFF flag will add more complexity in the script to generate the syscall table file. In order to come up with a common implementation across all archit- ecture, we need to remove mipsmt_sys_sched_setaffinity and mipsmt- _sys_sched_getaffinity from the table and define it in other way. Signed-off-by: Firoz Khan Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit be856439c998854c009b1f2ef9084a39b1295cec Author: Firoz Khan Date: Thu Dec 13 14:37:36 2018 +0530 mips: add +1 to __NR_syscalls in uapi header All other architectures are hold a value for __NR_syscalls will be equal to the last system call number +1. But in mips architecture, __NR_syscalls hold the value equal to total number of system exits in the architecture. One of the patch in this patch series will genarate uapi header files. In order to make the implementation common across all architect- ures, add +1 to __NR_syscalls, which will be equal to the last system call number +1. Signed-off-by: Firoz Khan Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 6d92c26815c57682fad35eeb3e5747ce75d79212 Author: Firoz Khan Date: Thu Dec 13 14:37:35 2018 +0530 mips: rename scall64-64.S to scall64-n64.S When we get nanoMIPS support we'll be introducing the p32 ABI, and there's a reasonable chance that the equivalent p64 ABI may come along in the future. Using 'n64' now would avoid confusion in that case where we may have 2 different 64-bit ABIs. Suggested-by: Paul Burton Signed-off-by: Firoz Khan [paul.burton@mips.com: - Remove UAPI macro renaming, github code search shows at least the chromium project uses __NR_64_Linux & __NR_64_Linux_syscalls.] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 64e4cf0dab16ad432fcbe7ac1109488e5a282c7b Merge: 522185d5cb40f 4c283e6155988 Author: Saeed Mahameed Date: Fri Dec 14 11:15:25 2018 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux mlx5-next shared branch with rdma subtree to avoid mlx5 rdma v.s. netdev conflicts. Highlights: 1) Lag refactroing and flow counter affinity bits. 2) mlx5 core cleanups By Roi Dayan (2) and others * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Fold the modify lag code into function net/mlx5: Add lag affinity info to log net/mlx5: Split the activate lag function into two routines net/mlx5: E-Switch, Introduce flow counter affinity IB/mlx5: Unify e-switch representors load approach between uplink and VFs net/mlx5: Use lowercase 'X' for hex values net/mlx5: Remove duplicated include from eswitch.c Signed-off-by: Saeed Mahameed commit a5ee2be91acb6fcee6c70d5f7d62da7c6804e1eb Author: Firoz Khan Date: Thu Dec 13 14:37:34 2018 +0530 mips: remove unused macros Remove __NR_Linux_syscalls from uapi/asm/unistd.h as there is no users to use NR_syscalls macro in mips kernel. MAX_SYSCALL_NO can also remove as there is commit 2957c9e61ee9 ("[MIPS] IRIX: Goodbye and thanks for all the fish"), eight years ago. Signed-off-by: Firoz Khan [paul.burton@mips.com: - Drop the removal of NR_syscalls which is used by kernel/trace/trace.h.] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 4c283e6155988486e2c83a2f273f919ecd3ce721 Author: Shahar Klein Date: Wed Dec 12 19:11:41 2018 -0800 net/mlx5: Fold the modify lag code into function Handle the code of modifying the lag affinity within a separate function. Signed-off-by: Shahar Klein Signed-off-by: Roi Dayan Reviewed-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 3cfe432e1b3a6f5b48f146f72d6dde029a1640a1 Author: Roi Dayan Date: Wed Dec 12 19:11:40 2018 -0800 net/mlx5: Add lag affinity info to log Report the initial LAG port affinity upon LAG creation. Signed-off-by: Roi Dayan Signed-off-by: Shahar Klein Reviewed-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 8252cf728ce230bab2f5898449ffe94ff02c3622 Author: Roi Dayan Date: Wed Dec 12 19:11:39 2018 -0800 net/mlx5: Split the activate lag function into two routines Split the activate lag function in order to be symmetric with the deactivate lag function. Signed-off-by: Roi Dayan Signed-off-by: Shahar Klein Reviewed-by: Aviv Heller Signed-off-by: Saeed Mahameed commit 8bb957d2557db072b46f6a1339c2dd709bb25ef6 Author: Shahar Klein Date: Wed Dec 12 19:11:38 2018 -0800 net/mlx5: E-Switch, Introduce flow counter affinity This dictates the device affinity for eswitch flow counters, set by the FW according to the HW device capabilities. Under "source eswitch" affinity, the counter should be allocated on the device related to the source vport in the match. This covers both non merged e-switch mode as well as old FW that does not advertise this cap. Under "flow eswitch" affinity, the counter should be allocated on the device where the eswitch rule is set. Signed-off-by: Shahar Klein Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 06cc74af05c33091a9877b54f1821966b446003c Author: Mark Bloch Date: Wed Dec 12 19:11:37 2018 -0800 IB/mlx5: Unify e-switch representors load approach between uplink and VFs When in switchdev mode and the add function is called by the core level driver, make sure we only register the callbacks, but don't create the mlx5 IB device or initialize anything. With this change all the IB devices in switchdev mode are created only once the load callback is invoked by the e-switch core sub-module. This follows the design paradigm under which the all the Eth representors must be loaded before any of IB reprs is loaded. Signed-off-by: Mark Bloch Acked-by: Or Gerlitz Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 4c8b85187c22ee65637035efd2ae0cb10836d8e8 Author: Saeed Mahameed Date: Wed Dec 12 19:11:36 2018 -0800 net/mlx5: Use lowercase 'X' for hex values Apparently gcc is cool with upper case '0X' but it is not commonly used. Replace '0X' with lowercase '0x' in mlx5_ifc.h file. Signed-off-by: Saeed Mahameed commit b8eee0e90f9797b747113638bc75e739b192ad38 Author: Benjamin Coddington Date: Thu Nov 1 13:39:49 2018 -0400 lockd: Show pid of lockd for remote locks Commit 9d5b86ac13c5 ("fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks") specified that the l_pid returned for F_GETLK on a local file that has a remote lock should be the pid of the lock manager process. That commit, while updating other filesystems, failed to update lockd, such that locks created by lockd had their fl_pid set to that of the remote process holding the lock. Fix that here to be the pid of lockd. Also, fix the client case so that the returned lock pid is negative, which indicates a remote lock on a remote file. Fixes: 9d5b86ac13c5 ("fs/locks: Remove fl_nspid and use fs-specific...") Cc: stable@vger.kernel.org Signed-off-by: Benjamin Coddington Signed-off-by: J. Bruce Fields commit 03b31f489614d8ac7a08bd458451a037cc0b1149 Author: Olga Kornievskaia Date: Tue Dec 4 14:09:21 2018 -0500 NFSD remove OP_CACHEME from 4.2 op_flags OP_CACHEME is only for the 4.0 operations. Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit d406db524c32ca35bd85cada28a547fff3115715 Author: YueHaibing Date: Sun Dec 9 14:25:02 2018 +0800 audit: remove duplicated include from audit.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Paul Moore commit e27a73d1305f22cc093b16ea9f2a81cfa9e5193c Author: Emily Deng Date: Wed Dec 12 18:06:16 2018 +0800 drm/amdgpu/psp: Correct and refine the vmr support. (v2) Currently driver only psp v11 support vmr. v2: squash in unused variable removal (Alex) Signed-off-by: Emily Deng Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher commit e30c50cd79f088f33098b76ed01a33c724eafee3 Author: Emily Deng Date: Wed Dec 12 18:08:24 2018 +0800 drm/amdgpu/psp_v3_1: Get psp fw version through reading register If PSP FW is running already, driver will not load PSP FW again and skip it. So psp fw version is not correct if reading it from FW binary file, need to get right version from register. Signed-off-by: Emily Deng Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher commit 07944623c775a3ef2b85beab769a4e68b2bed979 Author: Emily Deng Date: Wed Dec 12 17:00:13 2018 +0800 drm/amdgpu: access register without KIQ There is no need to access register such as mmSMC_IND_INDEX_11 and mmSMC_IND_DATA_11, PCIE_INDEX, PCIE_DATA through KIQ because they are VF-copy. Signed-off-by: Emily Deng Acked-by: Christian König Signed-off-by: Alex Deucher commit 7b184b006185215daf4e911f8de212964c99a514 Author: wentalou Date: Fri Dec 7 13:53:18 2018 +0800 drm/amdgpu: kfd_pre_reset outside req_full_gpu cause sriov hang XGMI hive put kfd_pre_reset into amdgpu_device_lock_adev, but outside req_full_gpu of sriov. It would make sriov hang during reset. Signed-off-by: Wentao Lou Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 5132411985e14b8dda69173abee8ea9ba942698f Author: Paolo Bonzini Date: Fri Dec 14 12:29:43 2018 +0100 kvm: selftests: ucall: improve ucall placement in memory, fix unsigned comparison Based on a patch by Andrew Jones. Reported-by: Dan Carpenter Signed-off-by: Paolo Bonzini commit b666a4b697397f8492dc11a2a1877557d3e0af56 Author: Marc Orr Date: Tue Nov 6 14:53:56 2018 -0800 kvm: x86: Dynamically allocate guest_fpu Previously, the guest_fpu field was embedded in the kvm_vcpu_arch struct. Unfortunately, the field is quite large, (e.g., 4352 bytes on my current setup). This bloats the kvm_vcpu_arch struct for x86 into an order 3 memory allocation, which can become a problem on overcommitted machines. Thus, this patch moves the fpu state outside of the kvm_vcpu_arch struct. With this patch applied, the kvm_vcpu_arch struct is reduced to 15168 bytes for vmx on my setup when building the kernel with kvmconfig. Suggested-by: Dave Hansen Signed-off-by: Marc Orr Signed-off-by: Paolo Bonzini commit 240c35a3783ab9b3a0afaba0dde7291295680a6b Author: Marc Orr Date: Tue Nov 6 14:53:55 2018 -0800 kvm: x86: Use task structs fpu field for user Previously, x86's instantiation of 'struct kvm_vcpu_arch' added an fpu field to save/restore fpu-related architectural state, which will differ from kvm's fpu state. However, this is redundant to the 'struct fpu' field, called fpu, embedded in the task struct, via the thread field. Thus, this patch removes the user_fpu field from the kvm_vcpu_arch struct and replaces it with the task struct's fpu field. This change is significant because the fpu struct is actually quite large. For example, on the system used to develop this patch, this change reduces the size of the vcpu_vmx struct from 23680 bytes down to 19520 bytes, when building the kernel with kvmconfig. This reduction in the size of the vcpu_vmx struct moves us closer to being able to allocate the struct at order 2, rather than order 3. Suggested-by: Dave Hansen Signed-off-by: Marc Orr Signed-off-by: Paolo Bonzini commit 4e445aee9654dc4aee61919d4f1d379b77cf3435 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:12 2018 -0500 KVM: nVMX: Move the checks for Guest Non-Register States to a separate helper function .. to improve readability and maintainability, and to align the code as per the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit 254b2f3b0f7b45c2f2232a2e0da77577233750e2 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:11 2018 -0500 KVM: nVMX: Move the checks for Host Control Registers and MSRs to a separate helper function .. to improve readability and maintainability, and to align the code as per the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit 5fbf963400a39919e53d20fe43bd3be072622944 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:10 2018 -0500 KVM: nVMX: Move the checks for VM-Entry Control Fields to a separate helper function .. to improve readability and maintainability, and to align the code as per the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit 61446ba75e9ad95446e057ac59e23e257493a3b3 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:09 2018 -0500 KVM: nVMX: Move the checks for VM-Exit Control Fields to a separate helper function .. to improve readability and maintainability, and to align the code as per the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit f9b245e182ac9beb40f48faa0fd04ed3f3830d50 Author: Sean Christopherson Date: Wed Dec 12 13:30:08 2018 -0500 KVM: nVMX: Remove param indirection from nested_vmx_check_msr_switch() Passing the enum and doing an indirect lookup is silly when we can simply pass the field directly. Remove the "fast path" code in nested_vmx_check_msr_switch_controls() as it's now nothing more than a redundant check. Remove the debug message rather than continue passing the enum for the address field. Having debug messages for the MSRs themselves is useful as MSR legality is a huge space, whereas messing up a physical address means the VMM is fundamentally broken. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 461b4ba4c7ad79137171de2887e5d4d05a0ec8c1 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:07 2018 -0500 KVM: nVMX: Move the checks for VM-Execution Control Fields to a separate helper function .. to improve readability and maintainability, and to align the code as per the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit 16322a3b5e7ce8250025361c092903a7259c1677 Author: Krish Sadhukhan Date: Wed Dec 12 13:30:06 2018 -0500 KVM: nVMX: Prepend "nested_vmx_" to check_vmentry_{pre,post}reqs() .. as they are used only in nested vmx context. Signed-off-by: Krish Sadhukhan Reviewed-by: Liran Alon Reviewed-by: Mihai Carabas Reviewed-by: Mark Kanda Signed-off-by: Paolo Bonzini commit 53963a70ac268c8e813e6d5cd24cbd1b03f56059 Author: Lan Tianyu Date: Thu Dec 6 15:34:36 2018 +0800 KVM/VMX: Check ept_pointer before flushing ept tlb This patch is to initialize ept_pointer to INVALID_PAGE and check it before flushing ept tlb. If ept_pointer is invalid, bypass the flush request. Signed-off-by: Lan Tianyu Signed-off-by: Paolo Bonzini commit a0d4f8034446df402a879dac04cab61f71c4fafc Author: Krish Sadhukhan Date: Tue Dec 4 19:00:13 2018 -0500 KVM nVMX: MSRs should not be stored if VM-entry fails during or after loading guest state According to section "VM-entry Failures During or After Loading Guest State" in Intel SDM vol 3C, "No MSRs are saved into the VM-exit MSR-store area." when bit 31 of the exit reason is set. Reported-by: Krish Sadhukhan Suggested-by: Jim Mattson Signed-off-by: Krish Sadhukhan Reviewed-by: Darren Kenny Signed-off-by: Paolo Bonzini commit e53d88af63ab4104e1226b8f9959f1e9903da10b Author: Jim Mattson Date: Tue Oct 30 12:20:21 2018 -0700 kvm: x86: Don't modify MSR_PLATFORM_INFO on vCPU reset If userspace has provided a different value for this MSR (e.g with the turbo bits set), the userspace-provided value should survive a vCPU reset. For backwards compatibility, MSR_PLATFORM_INFO is initialized in kvm_arch_vcpu_setup. Signed-off-by: Jim Mattson Reviewed-by: Drew Schmitt Cc: Abhiroop Dabral Signed-off-by: Paolo Bonzini commit 3d82c565a7a237b9dd4666f17c84dcc028d2bed5 Author: Wei Huang Date: Mon Dec 3 14:13:32 2018 -0600 kvm: vmx: add cpu into VMX preemption timer bug list This patch adds Intel "Xeon CPU E3-1220 V2", with CPUID.01H.EAX=0x000306A8, into the list of known broken CPUs which fail to support VMX preemption timer. This bug was found while running the APIC timer test of kvm-unit-test on this specific CPU, even though the errata info can't be located in the public domain for this CPU. Signed-off-by: Wei Huang Signed-off-by: Paolo Bonzini commit d7b09c827a6cf291f66637a36f46928dd1423184 Author: Eduardo Habkost Date: Wed Dec 5 17:19:56 2018 -0200 kvm: x86: Report STIBP on GET_SUPPORTED_CPUID Months ago, we have added code to allow direct access to MSR_IA32_SPEC_CTRL to the guest, which makes STIBP available to guests. This was implemented by commits d28b387fb74d ("KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL") and b2ac58f90540 ("KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL"). However, we never updated GET_SUPPORTED_CPUID to let userspace know that STIBP can be enabled in CPUID. Fix that by updating kvm_cpuid_8000_0008_ebx_x86_features and kvm_cpuid_7_0_edx_x86_features. Signed-off-by: Eduardo Habkost Reviewed-by: Jim Mattson Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Paolo Bonzini commit 87a8d795b2f1d926b4e831d27144d3e6ab7e33dc Author: Vitaly Kuznetsov Date: Wed Dec 5 16:36:21 2018 +0100 x86/hyper-v: Stop caring about EOI for direct stimers Turns out we over-engineered Direct Mode for stimers a bit: unlike traditional stimers where we may want to try to re-inject the message upon EOI, Direct Mode stimers just set the irq in APIC and kvm_apic_set_irq() fails only when APIC is disabled (see APIC_DM_FIXED case in __apic_accept_irq()). Remove the redundant part. Suggested-by: Roman Kagan Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 08a800ac257a2eeed1fad34b55ed55b2578e9b4e Author: Vitaly Kuznetsov Date: Mon Nov 26 16:47:32 2018 +0100 x86/kvm/hyper-v: avoid open-coding stimer_mark_pending() in kvm_hv_notify_acked_sint() stimers_pending optimization only helps us to avoid multiple kvm_make_request() calls. This doesn't happen very often and these calls are very cheap in the first place, remove open-coded version of stimer_mark_pending() from kvm_hv_notify_acked_sint(). Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 8644f771e07c52617627dffa4c67ba0ea120fd13 Author: Vitaly Kuznetsov Date: Mon Nov 26 16:47:31 2018 +0100 x86/kvm/hyper-v: direct mode for synthetic timers Turns out Hyper-V on KVM (as of 2016) will only use synthetic timers if direct mode is available. With direct mode we notify the guest by asserting APIC irq instead of sending a SynIC message. The implementation uses existing vec_bitmap for letting lapic code know that we're interested in the particular IRQ's EOI request. We assume that the same APIC irq won't be used by the guest for both direct mode stimer and as sint source (especially with AutoEOI semantics). It is unclear how things should be handled if that's not true. Direct mode is also somewhat less expensive; in my testing stimer_send_msg() takes not less than 1500 cpu cycles and stimer_notify_direct() can usually be done in 300-400. WS2016 without Hyper-V, however, always sticks to non-direct version. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 6a058a1eadc3882eff6efaa757f2c71a31fe9906 Author: Vitaly Kuznetsov Date: Mon Nov 26 16:47:30 2018 +0100 x86/kvm/hyper-v: use stimer config definition from hyperv-tlfs.h As a preparation to implementing Direct Mode for Hyper-V synthetic timers switch to using stimer config definition from hyperv-tlfs.h. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 0aa67255f54df192d29aec7ac6abb1249d45bda7 Author: Vitaly Kuznetsov Date: Mon Nov 26 16:47:29 2018 +0100 x86/hyper-v: move synic/stimer control structures definitions to hyperv-tlfs.h We implement Hyper-V SynIC and synthetic timers in KVM too so there's some room for code sharing. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Signed-off-by: Paolo Bonzini commit 7edcb73433276d1b7bc82863df0aa9d229f5686c Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:59 2018 +0100 KVM: selftests: Add hyperv_cpuid test Add a simple (and stupid) hyperv_cpuid test: check that we got the expected number of entries with and without Enlightened VMCS enabled and that all currently reserved fields are zeroed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 7e50c424f8e2315182540a32edb6f19024d26c8b Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:58 2018 +0100 KVM: selftests: implement an unchecked version of vcpu_ioctl() In case we want to test failing ioctls we need an option to not fail. Following _vcpu_run() precedent implement _vcpu_ioctl(). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 2bc39970e9327ceb06cb210f86ba35f81d00e350 Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:56 2018 +0100 x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID With every new Hyper-V Enlightenment we implement we're forced to add a KVM_CAP_HYPERV_* capability. While this approach works it is fairly inconvenient: the majority of the enlightenments we do have corresponding CPUID feature bit(s) and userspace has to know this anyways to be able to expose the feature to the guest. Add KVM_GET_SUPPORTED_HV_CPUID ioctl (backed by KVM_CAP_HYPERV_CPUID, "one cap to rule them all!") returning all Hyper-V CPUID feature leaves. Using the existing KVM_GET_SUPPORTED_CPUID doesn't seem to be possible: Hyper-V CPUID feature leaves intersect with KVM's (e.g. 0x40000000, 0x40000001) and we would probably confuse userspace in case we decide to return these twice. KVM_CAP_HYPERV_CPUID's number is interim: we're intended to drop KVM_CAP_HYPERV_STIMER_DIRECT and use its number instead. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit e2e871ab2f02dc9ca5f06065234475393dcec38b Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:55 2018 +0100 x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper The upcoming KVM_GET_SUPPORTED_HV_CPUID ioctl will need to return Enlightened VMCS version in HYPERV_CPUID_NESTED_FEATURES.EAX when it was enabled. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 220d6586ecb46c163e13576d3143097eebc907e7 Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:54 2018 +0100 x86/hyper-v: Drop HV_X64_CONFIGURE_PROFILER definition BIT(13) in HYPERV_CPUID_FEATURES.EBX is described as "ConfigureProfiler" in TLFS v4.0 but starting 5.0 it is replaced with 'Reserved'. As we don't currently us it in kernel it can just be dropped. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Acked-by: Thomas Gleixner Signed-off-by: Paolo Bonzini commit a4987defc1e66c5b88c2a97e3a0ef386631587fa Author: Vitaly Kuznetsov Date: Mon Dec 10 18:21:53 2018 +0100 x86/hyper-v: Do some housekeeping in hyperv-tlfs.h hyperv-tlfs.h is a bit messy: CPUID feature bits are not always sorted, it's hard to get which CPUID they belong to, some items are duplicated (e.g. HV_X64_MSR_CRASH_CTL_NOTIFY/HV_CRASH_CTL_CRASH_NOTIFY). Do some housekeeping work. While on it, replace all (1 << X) with BIT(X) macro. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Acked-by: Thomas Gleixner Signed-off-by: Paolo Bonzini commit ec084491727b078a6628c690ec96f9c3a2253a61 Author: Vitaly Kuznetsov Date: Wed Dec 12 18:57:01 2018 +0100 x86/hyper-v: Mark TLFS structures packed The TLFS structures are used for hypervisor-guest communication and must exactly meet the specification. Compilers can add alignment padding to structures or reorder struct members for randomization and optimization, which would break the hypervisor ABI. Mark the structures as packed to prevent this. 'struct hv_vp_assist_page' and 'struct hv_enlightened_vmcs' need to be properly padded to support the change. Suggested-by: Nadav Amit Signed-off-by: Vitaly Kuznetsov Acked-by: Thomas Gleixner Acked-by: Nadav Amit Reviewed-by: Michael Kelley Signed-off-by: Paolo Bonzini commit 7deec5e0df741102c9b54156c88cd1476d272ae5 Author: Roman Kagan Date: Mon Dec 10 18:47:27 2018 +0000 x86: kvm: hyperv: don't retry message delivery for periodic timers The SynIC message delivery protocol allows the message originator to request, should the message slot be busy, to be notified when it's free. However, this is unnecessary and even undesirable for messages generated by SynIC timers in periodic mode: if the period is short enough compared to the time the guest spends in the timer interrupt handler, so the timer ticks start piling up, the excessive interactions due to this notification and retried message delivery only makes the things worse. [This was observed, in particular, with Windows L2 guests setting (temporarily) the periodic timer to 2 kHz, and spending hundreds of microseconds in the timer interrupt handler due to several L2->L1 exits; under some load in L0 this could exceed 500 us so the timer ticks started to pile up and the guest livelocked.] Relieve the situation somewhat by not retrying message delivery for periodic SynIC timers. This appears to remain within the "lazy" lost ticks policy for SynIC timers as implemented in KVM. Note that it doesn't solve the fundamental problem of livelocking the guest with a periodic timer whose period is smaller than the time needed to process a tick, but it makes it a bit less likely to be triggered. Signed-off-by: Roman Kagan Signed-off-by: Paolo Bonzini commit 3a0e7731724f6ac684129f1763eef4d2d3e7dec7 Author: Roman Kagan Date: Mon Dec 10 18:47:26 2018 +0000 x86: kvm: hyperv: simplify SynIC message delivery SynIC message delivery is somewhat overengineered: it pretends to follow the ordering rules when grabbing the message slot, using atomic operations and all that, but does it incorrectly and unnecessarily. The correct order would be to first set .msg_pending, then atomically replace .message_type if it was zero, and then clear .msg_pending if the previous step was successful. But this all is done in vcpu context so the whole update looks atomic to the guest (it's assumed to only access the message page from this cpu), and therefore can be done in whatever order is most convenient (and is also the reason why the incorrect order didn't trigger any bugs so far). While at this, also switch to kvm_vcpu_{read,write}_guest_page, and drop the no longer needed synic_clear_sint_msg_pending. Signed-off-by: Roman Kagan Signed-off-by: Paolo Bonzini commit eb1ff0a913ca092ae5a4e7c9277b0a634c645eee Author: Peng Hao Date: Tue Dec 4 17:42:50 2018 +0800 kvm: x86: remove unnecessary recalculate_apic_map In the previous code, the variable apic_sw_disabled influences recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map" (commit: 3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a), the access to apic_sw_disabled in recalculate_apic_map has been deleted. Signed-off-by: Peng Hao Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini commit b2227ddec1cca6c52f49a19ec1c7a40cd27e0566 Author: Peng Hao Date: Fri Dec 14 16:18:03 2018 +0800 kvm: svm: remove unused struct definition structure svm_init_data is never used. So remove it. Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini commit 84c8c5b8f82f9939b1bcb3b5e25da2b5fc47ab50 Author: Jim Mattson Date: Wed Dec 5 15:29:01 2018 -0800 kvm: vmx: Skip all SYSCALL MSRs in setup_msrs() when !EFER.SCE Like IA32_STAR, IA32_LSTAR and IA32_FMASK only need to contain guest values on VM-entry when the guest is in long mode and EFER.SCE is set. Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Marc Orr Signed-off-by: Paolo Bonzini commit db31c8f5af7de0e78f63fd4c255cf3868d667bf4 Author: Jim Mattson Date: Wed Dec 5 15:29:00 2018 -0800 kvm: vmx: Don't set hardware IA32_CSTAR MSR on VM-entry SYSCALL raises #UD in compatibility mode on Intel CPUs, so it's pointless to load the guest's IA32_CSTAR value into the hardware MSR. IA32_CSTAR still provides 48 bits of storage on Intel CPUs that have CPUID.80000001:EDX.LM[bit 29] set, so we cannot remove it from the vmx_msr_index[] array. Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 898a811f1486df3209ce857027d0564d6a616cf2 Author: Jim Mattson Date: Wed Dec 5 15:28:59 2018 -0800 kvm: vmx: Document the need for MSR_STAR in i386 builds Add a comment explaining why MSR_STAR must be included in vmx_msr_index[] even for i386 builds. The elided comment has not been relevant since move_msr_up() was introduced in commit a75beee6e4f5d ("KVM: VMX: Avoid saving and restoring msrs on lightweight vmexit"). Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 0023ef39dc35c773c436eaa46ca539a26b308b55 Author: Jim Mattson Date: Wed Dec 5 15:28:58 2018 -0800 kvm: vmx: Set IA32_TSC_AUX for legacy mode guests RDTSCP is supported in legacy mode as well as long mode. The IA32_TSC_AUX MSR should be set to the correct guest value before entering any guest that supports RDTSCP. Fixes: 4e47c7a6d714 ("KVM: VMX: Add instruction rdtscp support for guest") Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Marc Orr Reviewed-by: Liran Alon Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 55d2375e58a61be072431dd3d3c8a320f4a4a01b Author: Sean Christopherson Date: Mon Dec 3 13:53:18 2018 -0800 KVM: nVMX: Move nested code to dedicated files From a functional perspective, this is (supposed to be) a straight copy-paste of code. Code was moved piecemeal to nested.c as not all code that could/should be moved was obviously nested-only. The nested code was then re-ordered as needed to compile, i.e. stats may not show this is being a "pure" move despite there not being any intended changes in functionality. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 7c97fcb3b68cd4d48a071bc1929c753d255dea47 Author: Sean Christopherson Date: Mon Dec 3 13:53:17 2018 -0800 KVM: VMX: Expose nested_vmx_allowed() to nested VMX as a non-inline Exposing only the function allows @nested, i.e. the module param, to be statically defined in vmx.c, ensuring we aren't unnecessarily checking said variable in the nested code. nested_vmx_allowed() is exposed due to the need to verify nested support in vmx_{get,set}_nested_state(). The downside is that nested_vmx_allowed() likely won't be inlined in vmx_{get,set}_nested_state(), but that should be a non-issue as they're not a hot path. Keeping vmx_{get,set}_nested_state() in vmx.c isn't a viable option as they need access to several nested-only functions. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 97b7ead392637247569818b6603e54b0a6277dd0 Author: Sean Christopherson Date: Mon Dec 3 13:53:16 2018 -0800 KVM: VMX: Expose various getters and setters to nested VMX ...as they're used directly by the nested code. This will allow moving the bulk of the nested code out of vmx.c without concurrent changes to vmx.h. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cf3646eb3adfd9149e3c29fc765a59e8bd6ff82d Author: Sean Christopherson Date: Mon Dec 3 13:53:15 2018 -0800 KVM: VMX: Expose misc variables needed for nested VMX Exposed vmx_msr_index, vmx_return and host_efer via vmx.h so that the nested code can be moved out of vmx.c. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ff241486ac90671ddf7c18e38c474f32b832af3a Author: Sean Christopherson Date: Mon Dec 3 13:53:14 2018 -0800 KVM: nVMX: Move "vmcs12 to shadow/evmcs sync" to helper function ...so that the function doesn't need to be created when moving the nested code out of vmx.c. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 3e8eacccae9d998e0f5074f4fe411c747d85dfd8 Author: Sean Christopherson Date: Mon Dec 3 13:53:13 2018 -0800 KVM: nVMX: Call nested_vmx_setup_ctls_msrs() iff @nested is true ...so that it doesn't need access to @nested. The only case where the provided struct isn't already zeroed is the call from vmx_create_vcpu() as setup_vmcs_config() zeroes the struct in the other use cases. This will allow @nested to be statically defined in vmx.c, i.e. this removes the last direct reference from nested code. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit e4027cfafd7846cf795217ce6d1829728d95ad89 Author: Sean Christopherson Date: Mon Dec 3 13:53:12 2018 -0800 KVM: nVMX: Set callbacks for nested functions during hardware setup ...in nested-specific code so that they can eventually be moved out of vmx.c, e.g. into nested.c. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a3203381ca95dcf1faa4053e84bd0cd10bc0ca8c Author: Sean Christopherson Date: Mon Dec 3 13:53:11 2018 -0800 KVM: VMX: Move the hardware {un}setup functions to the bottom ...so that future patches can reference e.g. @kvm_vmx_exit_handlers without having to simultaneously move a big chunk of code. Speaking from experience, resolving merge conflicts is an absolute nightmare without pre-moving the code. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5158917c7b0196aefc1a4e9bc4458777dd2c41ec Author: Sean Christopherson Date: Mon Dec 3 13:53:10 2018 -0800 KVM: x86: nVMX: Allow nested_enable_evmcs to be NULL ...so that it can conditionally set by the VMX code, i.e. iff @nested is true. This will in turn allow it to be moved out of vmx.c and into a nested-specified file. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 944c3464538de42b92284a922f0929b5fe6bd893 Author: Sean Christopherson Date: Mon Dec 3 13:53:09 2018 -0800 KVM: VMX: Move nested hardware/vcpu {un}setup to helper functions Eventually this will allow us to move the nested VMX code out of vmx.c. Note that this also effectively wraps @enable_shadow_vmcs with @nested so that it too can be moved out of vmx.c. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 89b0c9f58350f6820f062ea12000e8a171177f3b Author: Sean Christopherson Date: Mon Dec 3 13:53:07 2018 -0800 KVM: VMX: Move VMX instruction wrappers to a dedicated header file VMX has a few hundred lines of code just to wrap various VMX specific instructions, e.g. VMWREAD, INVVPID, etc... Move them to a dedicated header so it's easier to find/isolate the boilerplate. With this change, more inlines can be moved from vmx.c to vmx.h. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 9a2a566adb00a44bfb9243462a8d5b2330afc756 Author: Maxime Ripard Date: Thu Dec 6 15:02:03 2018 +0100 pinctrl: sunxi: Deal with per-bank regulators The Allwinner SoCs have on most of their GPIO banks a regulator input. This issue was mainly ignored so far because either the regulator was a static regulator that would be providing power anyway, or the bank was used for a feature unsupported so far (CSI). For the odd cases, enabling it in the bootloader was the preferred option. However, now that we are starting to support those features, and that we can't really rely on the bootloader for this, we need to model those regulators as such in the DT. This is slightly more complicated than what it looks like, since some regulators will be tied to the PMIC, and in order to have access to the PMIC bus, you need to mux its pins, which will need the pinctrl driver, that needs the regulator driver to be registered. And this is how you get a circular dependency. In practice however, the hardware cannot fall into this case since it would result in a completely unusable bus. In order to avoid that circular dependency, we can thus get and enable the regulators at pin_request time. We'll then need to account for the references of all the pins of a particular branch to know when to put the reference, but it works pretty nicely once implemented. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij commit c5510b8dafce5f3f5a039c9b262ebcae0092c462 Author: Krzysztof Kozlowski Date: Thu Dec 6 10:45:49 2018 +0100 gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB If CONFIG_GPOILIB is not set, the stub of gpio_to_desc() should return the same type of error as regular version: NULL. All the callers compare the return value of gpio_to_desc() against NULL, so returned ERR_PTR would be treated as non-error case leading to dereferencing of error value. Fixes: 79a9becda894 ("gpiolib: export descriptor-based GPIO interface") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij commit eaeee373c97c638769c1e3546b32f46d30df1dbe Author: Rob Herring Date: Wed Dec 5 13:50:36 2018 -0600 pinctrl: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Sylwester Nawrocki Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Tomasz Figa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij commit 30ed3c6c0922a1f67c3409b9e81087442614db7b Merge: e3e454b7047a8 55ed14cdaec50 Author: Kalle Valo Date: Fri Dec 14 16:58:00 2018 +0200 Merge tag 'iwlwifi-next-for-kalle-2018-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Third batch of iwlwifi patches intended for v4.21 * Some cleanups in the HW configuration structures; * More work on the debugging infrastructure; * Fixes related to 802.11ax; * Other cleanups and small fixes; commit 07a496de4c7eb0b1e80ab53f9d6465ea55ac1bd7 Author: Russell King Date: Thu Dec 13 12:54:26 2018 +0000 ARM: omap2: remove unnecessary boot_lock The boot_lock is something that was required for ARM development platforms to ensure that the delay calibration worked properly. This is not necessary for modern platforms that have better bus bandwidth and do not need to calibrate the delay loop for secondary cores. Remove the boot_lock entirely. Acked-by: Tony Lindgren Signed-off-by: Russell King commit d9b778e7bf2d37251d7ce365b39ebe86332c7a10 Author: Russell King Date: Thu Dec 13 12:54:26 2018 +0000 ARM: versatile: rename and comment SMP implementation Rename pen_release and boot_lock in the Versatile specific SMP implementation, describe why these exist and state clearly that they should not be used in production implementations. Signed-off-by: Russell King commit 830eec24673a982bff4df85ba4d17e4a6ff201a7 Author: Sebastian Andrzej Siewior Date: Tue Dec 11 22:23:22 2018 +0100 ARM: versatile: convert boot_lock to raw The arm boot_lock is used by the secondary processor startup code. The locking task is the idle thread, which has idle->sched_class == &idle_sched_class. idle_sched_class->enqueue_task == NULL, so if the idle task blocks on the lock, the attempt to wake it when the lock becomes available will fail: try_to_wake_up() ... activate_task() enqueue_task() p->sched_class->enqueue_task(rq, p, flags) Fix by converting boot_lock to a raw spin lock. Cc: Linus Walleij Signed-off-by: Frank Rowand Link: http://lkml.kernel.org/r/4E77B952.3010606@am.sony.com Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Russell King commit 4fb68e12f2cf93176f1b7542c754a4d0413eb290 Author: Russell King Date: Thu Dec 13 12:54:26 2018 +0000 ARM: vexpress/realview: consolidate immitation CPU hotplug The only difference between the hotplug implementation for Realview and Versatile Express are the bit in the auxiliary control register to disable coherency. Combine the two implentations accounting for that difference. Rename the functions to try to discourage cargo-cult copying of this code. Tested-by: Sudeep Holla Acked-by: Sudeep Holla Signed-off-by: Russell King commit 8d64d365aed355b2e2465d19ba61df02462fff4d Author: Chao Yu Date: Wed Dec 12 18:12:30 2018 +0800 f2fs: fix to reorder set_page_dirty and wait_on_page_writeback This patch reorders flow from - update page - set_page_dirty - wait_on_page_writeback to - wait_on_page_writeback - update page - set_page_dirty The reason is: - set_page_dirty will increase reference of dirty page, the reference should be cleared before wait_on_page_writeback to keep its consistency. - some devices need stable page during page writebacking, so we should not change page's data. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2062e0c3daa0bcfc806f4f7331f8bba16dd42632 Author: Sheng Yong Date: Tue Dec 4 22:59:21 2018 +0800 f2fs: clear PG_writeback if IPU failed If IPU failed, nothing is commited, we should end page writeback. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0cd6d9b0d23416af3bfb8736f8be5bb66bc8060b Author: Jaegeuk Kim Date: Wed Nov 28 13:26:03 2018 -0800 f2fs: add an ioctl() to explicitly trigger fsck later This adds an option in ioctl(F2FS_IOC_SHUTDOWN) in order to trigger fsck by setting a NEED_FSCK flag. Generally, shutdown is used for the test to validate filesystem consistency, and setting NEED_FSCK flag can be used for Android to trigger fsck.f2fs at boot time explicitly so that we could measure the elapsed time as well as force filesystem check. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b76574300504e56e2878ade185d5f47893512d25 Author: Marek Vasut Date: Wed Dec 12 02:40:02 2018 +0100 gpio: pca953x: Restore registers after suspend/resume cycle It is possible that the PCA953x is powered down during suspend. Use regmap cache to assure the registers in the PCA953x are in line with the driver state after resume. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 87813cf30a89012d77012347284ad7dd71c7b0b9 Author: Marek Vasut Date: Wed Dec 12 02:40:01 2018 +0100 gpio: pca953x: Zap single use of pca953x_read_single() Drop pca953x_write_single() which is used in one place. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit ec82d1eba346190171f9fa0f24e2e6eff5e5304c Author: Marek Vasut Date: Wed Dec 12 02:40:00 2018 +0100 gpio: pca953x: Zap ad-hoc reg_output cache Replace the ad-hoc reg_output output register caching with generic regcache cache. Drop pca953x_write_single() which is no longer used. This reduces code duplication. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 0f25fda840a9420172dfa6a3f333066017b78a04 Author: Marek Vasut Date: Wed Dec 12 02:39:59 2018 +0100 gpio: pca953x: Zap ad-hoc reg_direction cache Replace the ad-hoc reg_direction direction register caching with generic regcache cache. This reduces code duplication. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 49427232764d62e5933b2c23cc841739abc9804c Author: Marek Vasut Date: Wed Dec 12 02:39:58 2018 +0100 gpio: pca953x: Perform basic regmap conversion Convert the driver to use regmap to access the chips. Due to the convoluted register mapping scheme, implement read/write/volatile check functions that untangle the mess and perform check accordingly. This patch does not zap the internal register cache of the PCA953x driver, nor does it push the regmap access down into the gpiochip accessors to simplify the review. All that is in subsequent patches. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit b32cecb46bdc8b3ea36c7a71aaca1853c0342cae Author: Marek Vasut Date: Wed Dec 12 02:39:57 2018 +0100 gpio: pca953x: Extract the register address mangling to single function Instead of having the I2C register calculation function spread across multiple accessor functions, pull it out into a single function which returns the adjusted register address. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 25a1b7102f3f1181be1feaa0ed6ff82f1b526acd Author: Marek Vasut Date: Wed Dec 12 02:39:56 2018 +0100 gpio: pca953x: Zap ad-hoc I2C block write in multi GPIO set The ad-hoc i2c block write can be replaced by standard register accessor function, which correctly handles all the chip details and differences. Do so to simplify the code. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 7a04aaa32cbc449588fecc77da637e0da771283f Author: Marek Vasut Date: Wed Dec 12 02:39:55 2018 +0100 gpio: pca953x: Factor out common code from device_pca95xx_init() The PCA957x and PCA953x init functions are almost the same, except for the different register mapping and one extra write to BKEN register in case of PCA957x. Factor out the common code. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 90adb0979947ab9ee2bd5fffa28c6812a47cd7f2 Author: Marek Vasut Date: Wed Dec 12 02:39:54 2018 +0100 gpio: pca953x: Unify pca953x_{read,write}_regs_{8,mul}() At this point, the pca953x_{read,write}_regs_mul() can read single bank PCA953x GPIO chips as well. Merge the _8 and _mul functions together to simplify the code a bit. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 49e713738f9ebfe659d16bff3ff1fb0a054aa9f7 Author: Marek Vasut Date: Wed Dec 12 02:39:53 2018 +0100 gpio: pca953x: Unify pca953x_{read,write}_regs_{16,24}() At this point, these two functions only differ in whether they do or do not set the address increment bit. The 16 GPIO case does not need to set the AI bit, except for PCA9575 on write, while the 24 GPIO and more case does set the AI bit always. Merge these two functions together to simplify the code a bit. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 028a219ae5b4661ccc400d7f182766853275f0eb Author: Marek Vasut Date: Wed Dec 12 02:39:52 2018 +0100 gpio: pca953x: Unify pca95{3,7}x_write_regs_16() At this point, these two functions only differ in whether they do or do not set the address increment bit on PCA9575. Merge these two functions together to simplify the code a bit. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 8958262af3fb832c9817e50f599c5552957ceaba Author: Marek Vasut Date: Wed Dec 12 02:39:51 2018 +0100 gpio: pca953x: Repair multi-byte IO address increment on PCA9575 The multi-byte IO on various pca953x chips requires the auto-increment bit, while other chips toggle the LSbit automatically. Note that LSbit toggling only alternates between two registers during the IO, it is not the same as address auto-increment. The driver currently assumes that #gpios > 16 implies auto-increment, while #gpios <= 16 implies LSbit toggling. This is incorrect at there are chips with 16 GPIOs which require the auto-increment bit. The PCA9575, according to NXP datasheet rev. 4.2 from 16 April 2015, section 7.3 Command Register, the bit 7 in command register is the auto-increment bit, which allows programming multiple registers sequentially. Set this bit both in pca953x_gpio_set_multiple(), where it fixes the multi register programming, and in pca957x_write_regs_16(), where is simplifies the function. In fact, the pca957x_write_regs_16() now looks rather similar to pca953x_write_regs_24() and pca953x_write_regs_16(), which is intended for subsequent patches. Signed-off-by: Marek Vasut Signed-off-by: Linus Walleij commit 92f45ebe68181c2d7f76633ffae55bc9447d62cd Author: Marek Vasut Date: Wed Dec 12 02:39:50 2018 +0100 gpio: pca953x: Fix AI overflow on PCAL6524 The PCAL_PINCTRL_MASK is too large. The extended register block on PCAL6524, which is the largest chip with this block, has the block limited to address range 0x40..0x7f. This is because the bit 7 in the command register is used for the Address Increment functionality. Trim the mask to 0x60 to match the datasheet and to prevent accidental overwrite of the AI bit. Signed-off-by: Marek Vasut Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 873d1e8e6fafabc7750e5ef0fe0289548f540f5b Author: Marek Vasut Date: Wed Dec 12 02:39:49 2018 +0100 gpio: pca953x: Deduplicate the bank_shift The bank_shift = fls(...) code was duplicated in the driver 5 times, pull it into separate function. Signed-off-by: Marek Vasut Cc: Bartosz Golaszewski Reviewed-by: Kieran Bingham Signed-off-by: Linus Walleij commit 3a2fa906c0a92d1a0813162a3252f24d383a5374 Author: Thierry Reding Date: Thu Nov 29 18:03:10 2018 +0100 gpio: tegra186: Rename flow variable to type The IRQ core code refers to the interrupt type by that name, whereas the term flow is almost never used. Some GPIO controllers use the term flow_type, but it is most consistent to just go with the IRQ core terminology. Signed-off-by: Thierry Reding Signed-off-by: Linus Walleij commit 493872e074148ae11d5dd5d78453101003829485 Merge: 21abf103818a4 aaa21231698c0 Author: Linus Walleij Date: Fri Dec 14 14:27:41 2018 +0100 Merge tag 'intel-gpio-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v4.21-1 Use managed resource allocation in pch and sodaville drivers. Switch to use for_each_set_bit() in IRQ handlers. Headers clean up. Sort headers in inclusion block alphabetically for better maintenance. Convert to SPDX identifier and fixing MODULE_LICENSE() when appropriate. Additional format fixes to rectify debug and message printing. There is a commit which had been applied to v4.20-rc4, that's why dup. - c3bc3ff9e8019fba74ce62bfb501d710c2fca9d3 MAINTAINERS: Do maintain Intel GPIO drivers via separate tree The following is an automated git shortlog grouped by driver: ich: - Convert to use SPDX identifier - Sort headers alphabetically - Join string literals back - Convert pr_ to dev_ - Switch to use struct device instead of platform_device - Simplify error handling in ichx_write_bit() intel-mid: - Convert to use SPDX identifier - Remove linux/module.h and sort headers lynxpoint: - Convert to use SPDX identifier - Remove linux/init.h and sort headers - Use for_each_set_bit() in IRQ handler MAINTAINERS: - Do maintain Intel GPIO drivers via separate tree merrifield: - Convert to use SPDX identifier - Remove linux/init.h pch: - Convert to use SPDX identifier - Sort headers alphabetically - Remove duplicate assignments - Remove redundant __func__ from debug print - Use for_each_set_bit() in IRQ handler - Convert to dev_pm_ops - Convert to use managed functions pcim_* and devm_* sch: - Convert to use SPDX identifier - Remove linux/init.h and sort headers sodaville: - Convert to use SPDX identifier - Sort headers alphabetically - Use for_each_set_bit() in IRQ handler - Convert to use managed functions pcim_* and devm_* commit 21abf103818a4735e80fb0ab03934bed8ae9a028 Author: Linus Walleij Date: Tue Sep 4 13:31:45 2018 +0200 gpio: Pass a flag to gpiochip_request_own_desc() Before things go out of hand, make it possible to pass flags when requesting "own" descriptors from a gpio_chip. This is necessary if the chip wants to request a GPIO with active low semantics, for example. Cc: Janusz Krzysztofik Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Jiri Kosina Cc: Roger Quadros Reviewed-by: Gregory CLEMENT Signed-off-by: Linus Walleij commit a45eb575cdb44d8b493fead6352f17bcc36da66a Author: Christoph Hellwig Date: Thu Dec 13 21:32:12 2018 +0100 block: remove the unused bio_set_pages_dirty and bio_check_pages_dirty exports Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0374e1132217711bc2e920cde877dd7fc3dbd2d9 Author: Christoph Hellwig Date: Thu Dec 13 21:32:11 2018 +0100 block: remove the unused bio_iov_iter_get_pages export Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 637b60ade37ed5465c038c03f0fd1deabadac49c Author: Christoph Hellwig Date: Thu Dec 13 21:32:10 2018 +0100 block: remove the blk_recount_segments export Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6c210aa596d0ecf6f3eea65c02ac807877385a18 Author: Christoph Hellwig Date: Thu Dec 13 21:32:09 2018 +0100 block: remove the bio_phys_segments export Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 75edce8a45486fe5fa5becdb43a7c36354b2a379 Author: Sean Christopherson Date: Mon Dec 3 13:53:06 2018 -0800 KVM: VMX: Move eVMCS code to dedicated files The header, evmcs.h, already exists and contains a fair amount of code, but there are a few pieces in vmx.c that can be moved verbatim. In addition, move an array definition to evmcs.c to prepare for multiple consumers of evmcs.h. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 8373d25d25d14fe644feae007c15a5a10cf8e888 Author: Sean Christopherson Date: Mon Dec 3 13:53:08 2018 -0800 KVM: VMX: Add vmx.h to hold VMX definitions Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 0718f87b0df49570cdcb96179997bd372cac1742 Author: Rohit kumar Date: Fri Dec 14 17:59:29 2018 +0530 ASoC: qdsp6: q6routing: add display_port_rx port routing This patch add support to Display_port_rx mixers required to select path between ASM stream and AFE ports. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 32d2c61ba05944aa1e61d186611310dd911e1703 Author: Rohit kumar Date: Fri Dec 14 17:59:28 2018 +0530 ASoC: qdsp6: q6afe-dai: add support to Display port RX dais This patch adds support of AFE DAI for Display_port_rx port. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 3f6856a28f5eeb4fcaeb3ae25118171747354e51 Author: Rohit kumar Date: Fri Dec 14 17:59:27 2018 +0530 ASoC: qdsp6: qdafe: add support for display_port_rx This patch adds support for Display_Port_Rx port in AFE. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 76119509d23cdd9fbc71585042b27b6511b44b4d Author: Rohit kumar Date: Fri Dec 14 17:59:26 2018 +0530 ASoC: qdsp6: dt-bindings: Add q6afe display_port dt binding This patch adds bindings required for DISPLAY_PORT_RX port on AFE. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 22930c79ac5c243c95e46508f0989e153836adc7 Author: Srinivas Kandagatla Date: Thu Nov 15 18:13:24 2018 +0000 ASoC: qdsp6: q6asm-dai: Add support to compress offload This patch adds MP3 playback support in q6asm dais, adding other codec support should be pretty trivial. Signed-off-by: Srinivas Kandagatla Acked-by: Vinod Koul Signed-off-by: Mark Brown commit f2e6c6aa0cb5f39e48627850680b87ec688070f8 Author: Srinivas Kandagatla Date: Thu Nov 15 18:13:23 2018 +0000 ASoC: qdsp6: q6asm: add support to MP3 format This patch adds support to mp3 format in ASM module. Signed-off-by: Srinivas Kandagatla Acked-by: Vinod Koul Signed-off-by: Mark Brown commit ee23cf37fd586769febab95e2fbbbb50da5f9f2d Author: Srinivas Kandagatla Date: Thu Nov 15 18:13:22 2018 +0000 ASoC: q6asm-dai: dt-bindings: Add support to compress dais This patch adds board specific bindings required for dais, In particular for compressed dais and dai direction. Board specific setup involves setting up some of dais as compressed dais and also specify direction of any dai. Some of the dais might only support capture/playback depending on the board level wiring. These two new dt properties will allow such flexibilty at board level dts. Signed-off-by: Srinivas Kandagatla Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Acked-by: Vinod Koul Signed-off-by: Mark Brown commit d00f749b00f7802bf944688ad2971455f84fdacb Author: Srinivas Kandagatla Date: Thu Nov 15 18:13:21 2018 +0000 ALSA: compress: make use of runtime buffer for copy Default copy function uses kmalloc to allocate buffers, lets check if the runtime buffers are setup before making this allocations. This can be useful if the buffers are dma buffers. Signed-off-by: Srinivas Kandagatla Acked-by: Vinod Koul Signed-off-by: Mark Brown commit ba02eed9f300b6512181d526311d4e11aaa9714f Author: Srinivas Kandagatla Date: Thu Nov 15 18:13:20 2018 +0000 ALSA: soc-compress: add support to snd_compr_set_runtime_buffer() Existing compress offload code allocates data buffers using simple kmalloc, however there are situations where these buffers have to be mapped in smmu. So provide a way to set the runtime buffer by the driver itself, simillar to what we do with pcm. This patch adds support to set runtime dma buffer on compressed stream. Signed-off-by: Srinivas Kandagatla Acked-by: Vinod Koul Signed-off-by: Mark Brown commit 079e7f8709bb41cd0dc13efaffb24a0f17841955 Author: Fabrizio Castro Date: Thu Dec 13 20:19:57 2018 +0000 spi: sh-msiof: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 35bc99aaa1a3af23cf78b6b56f14230b5da3993b Author: Pierre-Louis Bossart Date: Thu Dec 13 13:03:00 2018 -0600 ASoC: Intel: Skylake: Add more platform granularity The current SKYLAKE kconfig is a all-you-can-eat selection that will support all known plaforms. This is however not necessarily a good thing: most platforms for SKL and KBL don't support the DSP, but a number of CNL/WHL ones do. Selecting this driver in all cases isn't really smart and will require users to muck with blacklists. Partition the configs to allow distributions to select on which platform this driver is used. Keep the existing SND_SOC_INTEL_SKYLAKE config to select everything for backwards compatibility. This patch does not provide new functionality, only finer-grained choices in supported platforms. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit ae38d267417291db40de7439f2b0b690ab615f0e Author: Fabrizio Castro Date: Thu Dec 13 20:20:06 2018 +0000 ASoC: rsnd: Add r8a774c0 support Document RZ/G2E (R8A774C0) SoC bindings. Signed-off-by: Fabrizio Castro Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3cee7a7d05b11038c8b5fa093e45c6f839ffc867 Author: Rob Herring Date: Wed Dec 5 13:50:44 2018 -0600 backlight: 88pm860x_bl: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is. Signed-off-by: Rob Herring Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit bcbeef5f001ca7f004147df0132a18e582bf3122 Merge: 83fd1e52496b7 ade0c9493e972 Author: Rafael J. Wysocki Date: Fri Dec 14 12:53:34 2018 +0100 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull more operating performance points (OPP) framework changes for v4.21 from Viresh Kumar: "- Fix missing OPP debugfs directory (Viresh Kumar). - Make genpd performance states orthogonal to idlestates (Ulf Hansson). - Propagate performance state changes from genpd to its master (Viresh Kumar). - Minor improvement of some OPP helpers (Viresh Kumar)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: PM / Domains: Propagate performance state updates PM / Domains: Factorize dev_pm_genpd_set_performance_state() PM / Domains: Save OPP table pointer in genpd OPP: Don't return 0 on error from of_get_required_opp_performance_state() OPP: Add dev_pm_opp_xlate_performance_state() helper OPP: Improve _find_table_of_opp_np() PM / Domains: Make genpd performance states orthogonal to the idlestates OPP: Fix missing debugfs supply directory for OPPs OPP: Use opp_table->regulators to verify no regulator case commit cfc652a73331c3b465e3f8dd39a3d6b71e6b3a66 Author: Kuninori Morimoto Date: Fri Dec 14 11:35:24 2018 +0900 ASoC: simple-card: tidyup prefix for snd_soc_codec_conf Current simple-card is handling "prefix" by many ways. But, it is not useful and readable. We want to do is that allow having it everywere. This patch supports it. It will be overwrote if lower node has it. sound { simple-audio-card,prefix = "xxx"; // initial simple-audio-card,dai-link { prefix = "xxx"; // overwrite cpu { ... }; codec { prefix = "xxx"; // overwrite }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit dd82410f7e939f00591c415d62915a89ac2fb8f0 Author: Kuninori Morimoto Date: Fri Dec 14 11:35:20 2018 +0900 ASoC: simple-card: tidyup convert_rate/channel method Current simple-card is handling "convert_rate/channel" by many ways. But, it is not useful and readable. We want to do is that allow having it everywere. This patch support it. It will be overwrote if lower node has it. sound { simple-audio-card,convert_channels = ; // initial simple-audio-card,dai-link { convert_channels = ; // overwrite cpu { convert_channels = ; // overwrite }; codec { convert_channels = ; // overwrite }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 79e834914d1fa2d078c586094ad347cc05aa428c Author: Kuninori Morimoto Date: Fri Dec 14 11:35:15 2018 +0900 ASoC: simple-card: tidyup mclk-fs method Current simple-card is handling "mclk-fs" by many way. But, it is not useful and readable. We want to do is that allow having mclk-fs everywere. This patch support it. It will be overwrote if lower node has it. sound { simple-audio-card,mclk-fs = ; // for initial simple-audio-card,dai-link { mclk-fs = ; // overwrite cpu { mclk-fs = ; // overwrite }; codec { mclk-fs = ; // overwrite }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit da215354eb55c382d3d5c426ea0e9aa7ef7c10e1 Author: Kuninori Morimoto Date: Fri Dec 14 11:35:10 2018 +0900 ASoC: simple-card: merge simple-scu-card simple-card and simple-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same time by one sound card. This patch merges both sound card into simple-card. Now we can use both feature on same driver. simple-card is now supporting .compatible = "simple-scu-audio-card". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c4e8ebb9f2624da8302b6683ecb5ead7108ccb79 Author: Kuninori Morimoto Date: Fri Dec 14 11:35:05 2018 +0900 ASoC: simple-card: merge simple-scu-card on Doc simple-card and simple-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same time by one sound card. This patch merges both sound card into simple-card. Now we can use both feature on same driver. simple-card is now supporting .compatible = "simple-scu-audio-card". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 66164a4da30dd295a1b60568c02bee37cfd9895a Author: Kuninori Morimoto Date: Fri Dec 14 11:32:43 2018 +0900 ASoC: audio-graph-card: tidyup prefix for snd_soc_codec_conf Current audio-graph-card is handling "prefix" by many ways. But, it is not useful and readable. We want to do is that allow having it everywere. This patch supports it. It will be overwrote if lower node has it. sound { prefix = "xxx"; // initial }; codec { audio-graph-card,prefix = "xxx"; // overwrite ports { prefix = "xxx"; // overwrite port { prefix = "xxx"; // overwrite }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7ced65ffb82fa58c6e314c16770288fe9ce3dfc8 Author: Kuninori Morimoto Date: Fri Dec 14 11:32:36 2018 +0900 ASoC: audio-graph-card: tidyup convert_rate/channel method Current audio-graph-card is handling "convert_rate/channel" by many ways. But, it is not useful and readable. We want to do is that allow having it everywere. This patch support it. It will be overwrote if lower node has it. sound { convert-channels = ; // initial }; codec { audio-graph-card,convert-channels = ; // overwrite ports { convert_channels = ; // overwrite port { convert_channels = ; // overwrite endpoint { convert_channels = ; // overwrite }; }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 56eb818191fbe4b93bbe6e884f96061013c9a6ab Author: Kuninori Morimoto Date: Fri Dec 14 11:32:30 2018 +0900 ASoC: audio-graph-card: tidyup mclk-fs method Current audio-graph-card is handling "mclk-fs" by many way. But, it is not useful and readable. We want to do is that allow having mclk-fs everywere. This patch support it. It will be overwrote if lower node has it. sound { mclk-fs = ; // initial }; codec { ports { mclk-fs = ; // overwrite port { mclk-fs = ; // overwrite endpoint { mclk-fs = ; // overwrite }; }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit ae3cb5790906b5caf519f6f21792c30fb5ddf8db Author: Kuninori Morimoto Date: Fri Dec 14 11:32:25 2018 +0900 ASoC: audio-graph-card: merge audio-graph-scu-card audio-graph-card and audio-graph-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same sound card by audio-graph-card. This patch merges both sound card into it. Now we can use both feature on same driver. audio-grap-card is now supporting .compatible = "audio-graph-scu-card". Signed-off-by: Kuninori Morimoto Tested-by: Tony Lindgren Signed-off-by: Mark Brown commit 91a531e48b20677c1f820f3bbd4237abd8144919 Author: Kuninori Morimoto Date: Fri Dec 14 11:32:06 2018 +0900 ASoC: audio-graph-card: merge audio-graph-scu-card on Doc audio-graph-card and audio-graph-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same sound card by audio-graph-card. This patch merges both feature into it on Documentation. Now we can use both feature on same driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit b8b89f5ee0b2555fa5a9d778685d2d6fb5122bb9 Author: Kuninori Morimoto Date: Fri Dec 14 11:29:42 2018 +0900 ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() ID method commit b6f3fc005a2c8 ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting") fixuped getting DAI ID method. It will get DAI ID from OF graph "port", but, we want to consider about "endpoint", too. And, we also want to keep compatibility. This patch fixup it as if (driver has specified DAI ID) use it as DAI ID else if (OF graph endpoint has reg) use it as DAI ID else if (OF graph port has reg) use it as DAI ID else use endpoint count as DAI ID Fixes: commit b6f3fc005a2c8 ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting") Reported-by: Tony Lindgren Signed-off-by: Kuninori Morimoto Tested-by: Tony Lindgren Signed-off-by: Mark Brown commit fc401cb98a736fa010aeaf863618a904ca70ba2c Author: Andrei.Stefanescu@microchip.com Date: Fri Dec 14 08:09:31 2018 +0000 regulator: mcp16502: add support for suspend This patch adds support for entering/resuming suspend states. It does this by setting the LPM pin of the PMIC. When suspending the PMIC will enter the Low-power mode when the LPM pin will be set to high. If the suspend target state is suspend-to-mem, the PMIC will transition to Hibernate mode, otherwise, if it is standby, it will remain in Low-power mode. Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit 609363cf81fcbd2c7fc93d1f920cef3a71154de8 Author: Sean Christopherson Date: Mon Dec 3 13:53:05 2018 -0800 KVM: nVMX: Move vmcs12 code to dedicated files vmcs12 is the KVM-defined struct used to track a nested VMCS, e.g. a VMCS created by L1 for L2. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cb1d474b322550630841a58ea960a448fe8ddce3 Author: Sean Christopherson Date: Mon Dec 3 13:53:04 2018 -0800 KVM: VMX: Move VMCS definitions to dedicated file This isn't intended to be a pure reflection of hardware, e.g. struct loaded_vmcs and struct vmcs_host_state are KVM-defined constructs. Similar to capabilities.h, this is a standalone file to avoid circular dependencies between yet-to-be-created vmx.h and nested.h files. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2c4fd91d26643504011b7c2b75563a437e19d6a1 Author: Sean Christopherson Date: Mon Dec 3 13:53:03 2018 -0800 KVM: VMX: Expose various module param vars via capabilities.h Expose the variables associated with various module params that are needed by the nested VMX code. There is no ulterior logic for what variables are/aren't exposed, this is purely "what's needed by the nested code". Note that @nested is intentionally not exposed. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 3077c191088255932c9e3780d8c6a59f147b75b8 Author: Sean Christopherson Date: Mon Dec 3 13:53:02 2018 -0800 KVM: VMX: Move capabilities structs and helpers to dedicated file Defining a separate capabilities.h as opposed to putting this code in e.g. vmx.h avoids circular dependencies between (the yet-to-be-added) vmx.h and nested.h. The aforementioned circular dependencies are why struct nested_vmx_msrs also resides in capabilities instead of e.g. nested.h. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 7caaa71108676944d60672b3446fadb6bcf29de4 Author: Sean Christopherson Date: Mon Dec 3 13:53:01 2018 -0800 KVM: VMX: Pass vmx_capability struct to setup_vmcs_config() ...instead of referencing the global struct. This will allow moving setup_vmcs_config() to a separate file that may not have access to the global variable. Modify nested_vmx_setup_ctls_msrs() appropriately since vmx_capability.ept may not be accurate when called by vmx_check_processor_compat(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c73da3fcab43357feb68cac227194b13e998a8db Author: Sean Christopherson Date: Mon Dec 3 13:53:00 2018 -0800 KVM: VMX: Properly handle dynamic VM Entry/Exit controls EFER and PERF_GLOBAL_CTRL MSRs have dedicated VM Entry/Exit controls that KVM dynamically toggles based on whether or not the guest's value for each MSRs differs from the host. Handle the dynamic behavior by adding a helper that clears the dynamic bits so the bits aren't set when initializing the VMCS field outside of the dynamic toggling flow. This makes the handling consistent with similar behavior for other controls, e.g. pin, exec and sec_exec. More importantly, it eliminates two global bools that are stealthily modified by setup_vmcs_config. Opportunistically clean up a comment and print related to errata for IA32_PERF_GLOBAL_CTRL. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 71d9409e20934e16f2d2ea88f0d1fb9851a7da3b Author: Sean Christopherson Date: Mon Dec 3 13:52:59 2018 -0800 KVM: VMX: Move caching of MSR_IA32_XSS to hardware_setup() MSR_IA32_XSS has no relation to the VMCS whatsoever, it doesn't belong in setup_vmcs_config() and its reference to host_xss prevents moving setup_vmcs_config() to a dedicated file. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 4cebd747d78559d1e8666d3e68a75f08966abc0c Author: Sean Christopherson Date: Mon Dec 3 13:52:58 2018 -0800 KVM: VMX: Drop the "vmx" prefix from vmx_evmcs.h VMX specific files now reside in a dedicated subdirectory, i.e. the file name prefix is redundant. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit e0123119a564de1a9aff712e0b968b3e21296a22 Author: Sean Christopherson Date: Mon Dec 3 13:52:57 2018 -0800 KVM: VMX: rename vmx_shadow_fields.h to vmcs_shadow_fields.h VMX specific files now reside in a dedicated subdirectory. Drop the "vmx" prefix, which is redundant, and add a "vmcs" prefix to clarify that the file is referring to VMCS shadow fields. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a821bab2d1ee869e04b218b198837bf07f2d27c1 Author: Sean Christopherson Date: Mon Dec 3 13:52:56 2018 -0800 KVM: VMX: Move VMX specific files to a "vmx" subdirectory ...to prepare for shattering vmx.c into multiple files without having to prepend "vmx_" to all new files. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 3592cda6bc27fd6e73f73a6e793cbd0c09a07a36 Author: Sean Christopherson Date: Mon Dec 3 13:52:55 2018 -0800 KVM: x86: Add requisite includes to hyperv.h Until this point vmx.c has been the only consumer and included the file after many others. Prepare for multiple consumers, i.e. the shattering of vmx.c Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 8ba2e525ecd7428e25d80f37c533612d62f2dc26 Author: Sean Christopherson Date: Mon Dec 3 13:52:54 2018 -0800 KVM: x86: Add requisite includes to kvm_cache_regs.h Until this point vmx.c has been the only consumer and included the file after many others. Prepare for multiple consumers, i.e. the shattering of vmx.c Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 199b118ab3d528371f6e3ac9f6001a0f3fd11d04 Author: Sean Christopherson Date: Mon Dec 3 13:52:53 2018 -0800 KVM: VMX: Alphabetize the includes in vmx.c ...to prepare for the creation of a "vmx" subdirectory that will contain a variety of headers. Clean things up now to avoid making a bigger mess in the future. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit dfae3c03b89fd5547b1adee857b10dc6f1c66132 Author: Sean Christopherson Date: Mon Dec 3 13:52:52 2018 -0800 KVM: nVMX: Allocate and configure VM{READ,WRITE} bitmaps iff enable_shadow_vmcs ...and make enable_shadow_vmcs depend on nested. Aside from the obvious memory savings, this will allow moving the relevant code out of vmx.c in the future, e.g. to a nested specific file. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 1b3ab5ad1b8ad99bae76ec583809c5f5a31c707c Author: Sean Christopherson Date: Mon Dec 3 13:52:51 2018 -0800 KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails Fixes: 34a1cd60d17f ("kvm: x86: vmx: move some vmx setting from vmx_init() to hardware_setup()") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2a31b9db153530df4aa02dac8c32837bf5f47019 Author: Paolo Bonzini Date: Tue Oct 23 02:36:47 2018 +0200 kvm: introduce manual dirty log reprotect There are two problems with KVM_GET_DIRTY_LOG. First, and less important, it can take kvm->mmu_lock for an extended period of time. Second, its user can actually see many false positives in some cases. The latter is due to a benign race like this: 1. KVM_GET_DIRTY_LOG returns a set of dirty pages and write protects them. 2. The guest modifies the pages, causing them to be marked ditry. 3. Userspace actually copies the pages. 4. KVM_GET_DIRTY_LOG returns those pages as dirty again, even though they were not written to since (3). This is especially a problem for large guests, where the time between (1) and (3) can be substantial. This patch introduces a new capability which, when enabled, makes KVM_GET_DIRTY_LOG not write-protect the pages it returns. Instead, userspace has to explicitly clear the dirty log bits just before using the content of the page. The new KVM_CLEAR_DIRTY_LOG ioctl can also operate on a 64-page granularity rather than requiring to sync a full memslot; this way, the mmu_lock is taken for small amounts of time, and only a small amount of time will pass between write protection of pages and the sending of their content. Signed-off-by: Paolo Bonzini commit 8fe65a8299f9e1f40cb95308ab7b3c4ad80bf801 Author: Paolo Bonzini Date: Tue Oct 23 02:18:42 2018 +0200 kvm: rename last argument to kvm_get_dirty_log_protect When manual dirty log reprotect will be enabled, kvm_get_dirty_log_protect's pointer argument will always be false on exit, because no TLB flush is needed until the manual re-protection operation. Rename it from "is_dirty" to "flush", which more accurately tells the caller what they have to do with it. Signed-off-by: Paolo Bonzini commit e5d83c74a5800c2a1fa3ba982c1c4b2b39ae6db2 Author: Paolo Bonzini Date: Thu Feb 16 10:40:56 2017 +0100 kvm: make KVM_CAP_ENABLE_CAP_VM architecture agnostic The first such capability to be handled in virt/kvm/ will be manual dirty page reprotection. Signed-off-by: Paolo Bonzini commit bb22dc14a2c29f6efef40ee72344c5d283a92987 Merge: fca91f6d60b6e 211929fd3f7c8 Author: Paolo Bonzini Date: Fri Dec 14 12:33:31 2018 +0100 Merge branch 'khdr_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest into HEAD Merge topic branch from Shuah. commit 55ed14cdaec503bfe6a94f0524d0d2c9b7226aed Author: Emmanuel Grumbach Date: Tue Aug 14 16:49:30 2018 +0300 iwlwifi: mvm: don't check if a pointer is set if it can't be unset We used to have many versions of statistics notification coming from the firmware. In one of the cleanup patches, we forgot to clean the code that checks if data->general is set. Since it is always set, remove the check. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 956343a61226e1af3d146386f70a059feb567d0c Author: Sara Sharon Date: Mon Aug 20 10:07:32 2018 +0300 iwlwifi: pcie: set cmd_len in the correct place command len is set too early in the code, since when building AMSDU, the size changes. This causes the byte count table to have the wrong size. Fixes: a0ec0169b7a9 ("iwlwifi: support new tx api") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 7969454b37f25d38a48bdbd9932e8aa49ed2ed77 Author: Shaul Triebitz Date: Wed Jul 25 22:11:52 2018 +0300 iwlwifi: mvm: radiotap: remove UL_DL bit in HE TRIG_BASED UL_DL is irrelevant to HE TRIG_BASED PPDU. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 6721039d5b8adfd57291c54e96eaa9f54da23753 Author: Shaul Triebitz Date: Mon Jul 2 17:16:48 2018 +0200 iwlwifi: mvm: add L-SIG length to radiotap We may have the L-SIG length depending on the phy_data info type; add it to radiotap when we do. Move getting the phy_data out one layer up and the info type into it so we can use this data more generically. We need to call the iwl_mvm_rx_he() function for other reasons as well, so can't just combine all of that into something like iwl_mvm_parse_phy_data(). Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit bdf180c8d375ee75493d79ae384dd1f9686fc974 Author: Shaul Triebitz Date: Mon Jul 2 14:35:26 2018 +0200 iwlwifi: mvm: change PHY data RX for HE radiotap The firmware changed the PHY data API, so follow suit. Some data is now available even for HT/VHT frames, so the info type in the metadata was changed. This change isn't backwards compatible, but 1) the firmware with the old API was never released; 2) the only overlap in the info type field is from the old type of TB to the new of HT, so this basically just means that with older FW and newer driver the data will be considered missing. While at it, remove the extra code to set the LTF syms corresponding to the streams and use the data from the device instead - we don't really need this in any case other than when we have it from the device. As the new API gives use the spatial reuse 1-4 fields for trigger-based PPDUs, also expose that to radiotap. Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 0916224eaa77bff0fbbc747961d550ff8db45457 Author: Sara Sharon Date: Thu Aug 16 13:01:09 2018 +0300 iwlwifi: pcie: fix erroneous print When removing the driver, the following flow can happen: 1. host command is in progress, for example at index 68. 2. RX interrupt is received with the response. 3. Before it is processed, the remove flow kicks in, and calls iwl_pcie_txq_unmap. The function cleans all DMA, and promotes the read pointer to 69. 4. RX thread proceeds with the processing, and is calling iwl_pcie_cmdq_reclaim, which will print this error: iwl_pcie_cmdq_reclaim: Read index for DMA queue txq id (0), index 4 is out of range [0-256] 69 69. Detect this situation, and avoid the print. Change it to warning while at it, to make such issues more noticeable in the future. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 7bc2468277033e05401d5f8fd48a772f407338c2 Author: Avraham Stern Date: Wed Aug 15 12:23:39 2018 +0300 iwlwifi: mvm: force TCM re-evaluation on TCM resume When traffic load is not low or low latency is active, TCM schedules re-evaluation work so in case traffic stops TCM will detect that traffic load has become low or that low latency is no longer active. However, if TCM is paused when the re-evaluation work runs, it does not re-evaluate and the re-evaluation work is no longer scheduled. As a result, TCM will not indicate that low latency is no longer active or that traffic load is low when traffic stops. Fix this by forcing TCM re-evaluation when TCM is resumed in case low latency is active or traffic load is not low. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit cc2af963f5dac19e1f0a9725c52927be98a80193 Author: Luca Coelho Date: Thu Aug 16 10:01:00 2018 +0300 iwlwifi: remove all unnecessary occurrences of nvm_calib_ver Now that nvm_calib_ver is not checked in opmodes other than dvm, we can remove it from all irrelevant configurations. Signed-off-by: Luca Coelho commit 64866e5da1eabd0c52ff45029b245f5465920031 Author: Luca Coelho Date: Thu Aug 16 09:23:08 2018 +0300 iwlwifi: move iwl_nvm_check_version() into dvm This function is only half-used by mvm (i.e. only the nvm_version part matters, since the calibration version is irrelevant), so it's pointless to export it from iwlwifi. If mvm uses this function, it has the additional complexity of setting the calib version to a bogus value on all cfg structs. To avoid this, move the function to dvm and make a simple comparison of the nvm_version in mvm instead. Signed-off-by: Luca Coelho commit 4aeaccd6b5f05a20fd3154581f1ec2e6793cd998 Author: Luca Coelho Date: Thu Aug 16 09:01:31 2018 +0300 iwlwifi: remove useless NVM_HW_SECTION_NUM_FAMILY_* macros These macros are useless because each one of them is used only once and the element they are assigned to is already pretty clear about what they mean, "nvm_hw_section_num". Signed-off-by: Luca Coelho commit 3e2b49d66f2eef7f01eb8b2c74589015c72c006c Author: Luca Coelho Date: Thu Aug 16 08:53:10 2018 +0300 iwlwifi: don't define OTP_LOW_IMAGE_SIZE per family, but per size Using OTP_LOW_IMAGE_SIZE_FAMILY_8000/9000/22000 only obfuscates the actual values, since these 3 are the same. Redefine the values per size so it's easier to understand and compare the different configurations. Signed-off-by: Luca Coelho commit da2eb669c2c9cc8ece953d4d249791ce139dd05c Author: Sara Sharon Date: Wed Jun 13 15:22:48 2018 +0300 iwlwifi: mvm: activate apply points Call the previously introduced apply points entry point when reaching an apply point. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit fe1b7d6c28885642dc3dd59d3710ae2b283aa486 Author: Sara Sharon Date: Thu Jun 21 09:42:12 2018 +0300 iwlwifi: add support for triggering ini triggers Add support for ini triggers. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 7a14c23dcdee68782acb90be29590ad683c3aeb4 Author: Sara Sharon Date: Wed Jun 13 15:24:13 2018 +0300 iwlwifi: dbg: dump data according to the new ini TLVs When ini TLVs are loaded, dump data according to the stored configuration. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 09b0b99007ff4e250a479de731d897bea34f0b4e Author: Luca Coelho Date: Thu Aug 9 13:51:08 2018 +0300 iwlwifi: move common 9000 cfg parameters to common macro The ht_params, nvm_ver, nvm_calib_ver and max_ht_ampdu_exponent elements in 9000 devices are always the same. Move them to the common macro. Signed-off-by: Luca Coelho commit ade0c9493e972171103c7d804840248c32032954 Merge: 46f48aca2e5ae 18edf49c45544 Author: Viresh Kumar Date: Fri Dec 14 16:28:52 2018 +0530 Merge branch 'opp/genpd/propagation' into opp/linux-next commit 18edf49c45544cfb93002b3b31fe8fc7fc14d95c Author: Viresh Kumar Date: Fri Nov 2 14:40:19 2018 +0530 PM / Domains: Propagate performance state updates Currently a genpd only handles the performance state requirements from the devices under its control. This commit extends that to also handle the performance state requirement(s) put on the master genpd by its sub-domains. There is a separate value required for each master that the genpd has and so a new field is added to the struct gpd_link (link->performance_state), which represents the link between a genpd and its master. The struct gpd_link also got another field prev_performance_state, which is used by genpd core as a temporary variable during transitions. On a call to dev_pm_genpd_set_performance_state(), the genpd core first updates the performance state of the masters of the device's genpd and then updates the performance state of the genpd. The masters do the same and propagate performance state updates to their masters before updating their own. The performance state transition from genpd to its master is done with the help of dev_pm_opp_xlate_performance_state(), which looks at the OPP tables of both the domains to translate the state. Tested-by: Rajendra Nayak Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit cd50c6d3eb91bdff9ac37ee645c49ae274385d35 Author: Viresh Kumar Date: Wed Oct 31 14:56:54 2018 +0530 PM / Domains: Factorize dev_pm_genpd_set_performance_state() Separate out _genpd_set_performance_state() and _genpd_reeval_performance_state() from dev_pm_genpd_set_performance_state() to handle performance state update related stuff. This will be used by a later commit. Tested-by: Rajendra Nayak Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 1067ae3e427fba60965fc519e20d54d0b210fd27 Author: Viresh Kumar Date: Fri Nov 2 11:18:08 2018 +0530 PM / Domains: Save OPP table pointer in genpd dev_pm_genpd_set_performance_state() will be required to call dev_pm_opp_xlate_performance_state() going forward to translate from performance state of a sub-domain to performance state of its master. And dev_pm_opp_xlate_performance_state() needs pointers to the OPP tables of both genpd and its master. Lets fetch and save them while the OPP tables are added. Fetching the OPP tables should never fail as we just added the OPP tables and so add a WARN_ON() for such a bug instead of full error paths. Tested-by: Rajendra Nayak Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 2feb5a896c42fb24f6d6f7028574dc59bfc9306f Author: Viresh Kumar Date: Fri Dec 14 15:20:56 2018 +0530 OPP: Don't return 0 on error from of_get_required_opp_performance_state() of_get_required_opp_performance_state() returns 0 on errors currently and a positive performance state otherwise. Since 0 is a valid performance state (representing off), it would be better if this routine returns negative values on error. That will also make it behave similar to dev_pm_opp_xlate_performance_state(), which also returns performance states and returns negative values on error. Change the return type of the function to "int" in order to return negative values. This doesn't have any users for now and so no other part of the kernel will be impacted with this change. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit c8a59103e22b191e363fc0a90e08515a915b278d Author: Viresh Kumar Date: Fri Nov 2 14:36:42 2018 +0530 OPP: Add dev_pm_opp_xlate_performance_state() helper dev_pm_genpd_set_performance_state() needs to handle performance state propagation going forward. Currently this routine only gets the required performance state of the device's genpd as an argument, but it doesn't know how to translate that to master genpd(s) of the device's genpd. Introduce a new helper dev_pm_opp_xlate_performance_state() which will be used to translate from performance state of a device (or genpd sub-domain) to another device (or master genpd). Normally the src_table (of genpd sub-domain) will have the "required_opps" property set to point to one of the OPPs in the dst_table (of master genpd), but in some cases the genpd and its master have one to one mapping of performance states and so none of them have the "required-opps" property set. Return the performance state of the src_table as it is in such cases. Tested-by: Rajendra Nayak Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 699e21e4170add1c4c954838d94feec2014ee83c Author: Viresh Kumar Date: Thu Nov 22 11:04:00 2018 +0530 OPP: Improve _find_table_of_opp_np() Make _find_table_of_opp_np() more efficient by using of_get_parent() to find the parent OPP table node. Tested-by: Rajendra Nayak Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 41158dabfd913c04058d54e9561a2a159a8e5082 Author: Yong Zhi Date: Thu Dec 6 20:03:38 2018 -0500 media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI These meta formats are used on Intel IPU3 ImgU video queues to carry 3A statistics and ISP pipeline parameters. V4L2_META_FMT_IPU3_3A V4L2_META_FMT_IPU3_PARAMS Signed-off-by: Yong Zhi Signed-off-by: Chao C Li Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 68de2fe57a8f2746db1064d39c697595cd76bb16 Author: Ulf Hansson Date: Tue Dec 11 11:04:55 2018 +0100 PM / Domains: Make genpd performance states orthogonal to the idlestates It's quite questionable whether genpd internally should care about if the corresponding PM domain for a device is powered on, as to allow setting a new performance state for it. The assumptions creates an unnecessary limitation at this point, for both consumers and providers, but more importantly it also makes the code more complicated. Therefore, let's simplify the code to allow setting a performance state, by invoking the ->set_performance_state() callback, no matter whether the PM domain is powered on or off. Do note, this change means genpd providers needs to restore the performance state themselves during power on, via the ->power_on() callback. Moreover, they may also need to check that the PM domain is powered on, from their ->set_performance_state() callback, before deciding to update the state. Tested-by: Rajendra Nayak Acked-by: Viresh Kumar Signed-off-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 7fc7af649ca77fd6a184a0d74269206fd3836a9c Author: Yong Zhi Date: Thu Dec 6 20:03:37 2018 -0500 media: staging/intel-ipu3: Add imgu top level pci device driver This patch adds support for the Intel IPU v3 as found on Skylake and Kaby Lake SoCs. The driver glues v4l2, css(camera sub system) and other pieces together to perform its functions, it also loads the IPU3 firmware binary as part of its initialization. Signed-off-by: Yong Zhi Signed-off-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a0ca1627b4501d266c92ed84669309d33deca0df Author: Yong Zhi Date: Thu Dec 6 20:03:36 2018 -0500 media: staging/intel-ipu3: Add v4l2 driver based on media framework Implement video driver that utilizes v4l2, vb2 queue support and media controller APIs. The driver exposes single subdevice and six nodes. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f5f2e427351896fc55e6340567438e3e980d3012 Author: Yong Zhi Date: Thu Dec 6 20:03:35 2018 -0500 media: staging/intel-ipu3: Add css pipeline programming This provides helper library to be used by v4l2 level to program imaging pipelines and control the streaming. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit edfe84526099548fbad85ad0a4820a8ca614f640 Author: Yong Zhi Date: Thu Dec 6 20:03:34 2018 -0500 media: staging/intel-ipu3: css: Initialize css hardware This patch implements the functions to initialize and configure IPU3 h/w such as clock, irq and power. Signed-off-by: Yong Zhi Signed-off-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 272c1a9b493986a95219dce674c49877d98cf90f Merge: 2a3c83f5fe077 3b5129b3a7c62 Author: Daniel Vetter Date: Fri Dec 14 11:27:24 2018 +0100 Merge tag 'exynos-drm-next-for-v4.21-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Add configurable plane alpha and pixel blend mode support - This patch series adds configurable plane alpha and pixel blend mode support for FIMD device driver. Signed-off-by: Daniel Vetter From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1544772430-8295-1-git-send-email-inki.dae@samsung.com commit e11110a5b74487cfc99dad8a5744fe26782f5d9c Author: Yong Zhi Date: Thu Dec 6 20:03:33 2018 -0500 media: staging/intel-ipu3: css: Compute and program ccs A collection of routines that are mainly used to calculate the parameters for accelerator cluster. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 15e2f1ba09ad7ea3f641f9dc335e8e0999ab5363 Author: Yong Zhi Date: Thu Dec 6 20:03:32 2018 -0500 media: staging/intel-ipu3: css: Add static settings for image pipeline This adds coeff, config parameters etc const definitions for IPU3 programming. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 09d290f0ba2165666c583726836ab761e099cc2d Author: Yong Zhi Date: Thu Dec 6 20:03:31 2018 -0500 media: staging/intel-ipu3: css: Add support for firmware management Introduce functions to load and install ImgU FW blobs. Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e9fad6f1d2307d42e6b8f40c78b51c1f59c61922 Author: Yong Zhi Date: Thu Dec 6 20:03:30 2018 -0500 media: staging/intel-ipu3: css: Add dma buff pool utility functions The pools are used to store previous parameters set by user with the parameter queue. Due to pipelining, there needs to be multiple sets (up to four) of parameters which are queued in a host-to-sp queue. [mchehab@kernel.org: fixed two minor issues on comments: a space before tab and a typo: "vaid" -> "valid"] Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2a2c51d3287e2e2bdbfd5f08716cee141e3cefa2 Author: Tomasz Figa Date: Thu Dec 6 20:03:29 2018 -0500 media: staging/intel-ipu3: Implement DMA mapping functions This driver uses IOVA space for buffer mapping through IPU3 MMU to transfer data between imaging pipelines and system DDR. Signed-off-by: Tomasz Figa Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 26f5689592e2f9442a4e46c2d375c70b1e99b62e Author: Tomasz Figa Date: Thu Dec 6 20:03:28 2018 -0500 media: staging/intel-ipu3: mmu: Implement driver This driver translates IO virtual address to physical address based on two levels page tables. Signed-off-by: Tomasz Figa Signed-off-by: Yong Zhi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2da6500d335ed6c86bf12d11158507b1719aea5f Author: Yong Zhi Date: Thu Dec 6 20:03:27 2018 -0500 media: staging/intel-ipu3: abi: Add structs This add all the structs of IPU3 firmware ABI. Signed-off-by: Yong Zhi Signed-off-by: Rajmohan Mani Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 88aa9d2045717a895c1548ada75e93b005a2cc43 Author: Yong Zhi Date: Thu Dec 6 20:03:26 2018 -0500 media: staging/intel-ipu3: abi: Add register definitions and enum Add macros and enums used for IPU3 firmware interface. Signed-off-by: Yong Zhi Signed-off-by: Rajmohan Mani Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 934a040be674f7420e4b8691b97519e5ac588d28 Author: Sakari Ailus Date: Fri Jun 16 09:49:29 2017 -0400 media: docs-rst: v4l: Document V4L2_BUF_TYPE_META_OUTPUT interface Document the interface for metadata output, including V4L2_BUF_TYPE_META_OUTPUT buffer type and V4L2_CAP_META_OUTPUT capability bits. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Tomasz Figa Tested-by: Tian Shu Qiu Signed-off-by: Mauro Carvalho Chehab commit 72148d1a57e7c76745e68c94ad5d235240d26ac8 Author: Sakari Ailus Date: Fri Jun 16 08:38:31 2017 -0400 media: v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT The V4L2_BUF_TYPE_META_OUTPUT mirrors the V4L2_BUF_TYPE_META_CAPTURE with the exception that it is an OUTPUT type. The use case for this is to pass buffers to the device that are not image data but metadata. The formats, just as the metadata capture formats, are typically device specific and highly structured. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Tomasz Figa Tested-by: Tian Shu Qiu Signed-off-by: Mauro Carvalho Chehab commit 12f799c8c739518e12248bbd000eb0a246e8e5f8 Author: Miles Chen Date: Wed Dec 12 18:56:49 2018 +0800 arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset() When debug with kaslr, it is sometimes necessary to have PHYS_OFFSET to perform linear virtual address to physical address translation. Sometimes we're debugging with only few information such as a kernel log and a symbol file, print PHYS_OFFSET in dump_kernel_offset() for that case. Tested by: echo c > /proc/sysrq-trigger [ 11.996161] SMP: stopping secondary CPUs [ 11.996732] Kernel Offset: 0x2522200000 from 0xffffff8008000000 [ 11.996881] PHYS_OFFSET: 0xffffffeb40000000 Cc: Ard Biesheuvel Signed-off-by: Miles Chen Signed-off-by: Will Deacon commit 5da94b50475acaa728560e8c1d3f7291e1062eb3 Author: Vignesh R Date: Sun Dec 9 15:52:22 2018 +0530 arm64: dts: ti: k3-am654: Enable main domain McSPI0 Enable McSPI0 of main domain and add DT node for the SPI NOR flash connected to CS0. Signed-off-by: Vignesh R Signed-off-by: Tero Kristo commit 2cd7d393f461b931bd6ba2f3971f20b087a1b952 Author: Vignesh R Date: Sun Dec 9 15:52:21 2018 +0530 arm64: dts: ti: k3-am654: Add McSPI DT nodes There are 3 instances of McSPI in MCU domain and 4 instances in Main domain. Add DT nodes for all McSPI instances present on AM654 SoC. Signed-off-by: Vignesh R Signed-off-by: Tero Kristo commit c484fc957219e95e023efe74bfc6cc189303e6f4 Author: Vignesh R Date: Wed Dec 12 10:48:06 2018 +0530 arm64: dts: ti: k3-am654: Populate power-domain property for UART nodes Populate power-domain property for UART nodes, this is required for Linux to enable UART clocks via PM calls. Without this UART instances not initialized by bootloader (like main_uart1) fails to work in Linux. Also, drop current-speed property from main_uart1 and main_uart2 nodes as these UARTs are not initialized before Linux boots up and current speed is unknown. Signed-off-by: Vignesh R Signed-off-by: Tero Kristo commit e577d79424c07af63d0f19817a425bf4ccf0ec81 Author: Vignesh R Date: Fri Dec 7 15:05:35 2018 +0530 arm64: dts: ti: k3-am654-base-board: Enable ECAP PWM Enable ECAP PWM which is used for LCD backlight. Signed-off-by: Vignesh R Signed-off-by: Tero Kristo commit 07c663b0ee576a33c29f211d2e23484a9aa5ff30 Author: Vignesh R Date: Fri Dec 7 15:05:34 2018 +0530 arm64: dts: ti: k3-am65-main: Add ECAP PWM node Add DT entry for ECAP0 PWM node present in main domain Signed-off-by: Vignesh R Signed-off-by: Tero Kristo commit 19a1768fc34acc57d3ce2d945a676dfa032e6ba4 Author: Vignesh R Date: Tue Nov 13 11:31:11 2018 +0530 arm64: dts: ti: k3-am654-base-board: Add I2C nodes Add DT entries for I2C instances present in AM654 SoC. Signed-off-by: Vignesh R Acked-by: Nishanth Menon Signed-off-by: Tero Kristo commit 3f94859fd7ba4f5efa84767dba569d82e060b295 Author: Vignesh R Date: Tue Nov 13 11:31:10 2018 +0530 arm64: dts: ti: am654-base-board: Add pinmux for main uart0 Add pinmux for main uart0 that is serves as console on AM654 EVM Signed-off-by: Vignesh R Acked-by: Nishanth Menon Signed-off-by: Tero Kristo commit 1d79b4375fbc9ba4a113529090dab6b98e7b572c Author: Tero Kristo Date: Tue Nov 13 11:31:09 2018 +0530 arm64: dts: ti: k3-am65: Add pinctrl regions Add pinctrl regions for the main and wkup mmr. The range for main pinctrl region contains a gap at offset 0x2e4, and because of this, the pinctrl range is split into two sections. Signed-off-by: Tero Kristo Signed-off-by: Vignesh R Acked-by: Nishanth Menon commit fc66393ab5d695533a5eb0bce8ceffa11d747933 Author: Vignesh R Date: Tue Nov 13 11:31:08 2018 +0530 dt-bindings: pinctrl: k3: Introduce pinmux definitions The dt-bindings header for TI K3 AM6 SoCs define a set of macros for defining pinmux configs in human readable form, instead of raw-coded hex values. Signed-off-by: Vignesh R Acked-by: Linus Walleij Reviewed-by: Rob Herring Acked-by: Nishanth Menon Acked-by: Tony Lindgren Signed-off-by: Tero Kristo commit 19d111ccce9f4c3e0820585d991bf5ae9172cbe3 Author: Masahiro Yamada Date: Fri Dec 7 20:33:57 2018 +0900 microblaze: remove the explicit removal of system.dtb I guess || (rm -f $@ && echo false) ... should be || (rm -f $@ && false) In fact, no Makefile needs to delete a target explicitly on error. It is automatically done since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). I also reused equivalent cmd_shipped from scripts/Makefile.lib. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit 52e79c4f0bfd972d7176a26d58d163cc18bf6d6a Author: Masahiro Yamada Date: Fri Dec 7 20:33:56 2018 +0900 microblaze: fix race condition in building boot images I fixed a race condition in the parallel building of ARM in commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images"). I see the same problem for MicroBlaze too. "make -j ARCH=microblaze all linux.bin.ub" results in a broken build because two threads descend into arch/microblaze/boot simultaneously. Add proper dependencies to avoid it. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit 3dda563b8349ccc27547883e6cf2be4391d19cb1 Author: Masahiro Yamada Date: Fri Dec 7 20:33:55 2018 +0900 microblaze: add linux.bin* and simpleImage.* to PHONY linux.bin, linux.bin.gz, and linux.bin.ub are phony targets to generate a corresponding image under arch/microblaze/boot/. simpleImage.% also works like a phony target, but a pattern that contains '%' cannot be a phony target. I replaced it with equivalent simpleImage.$(DTB). Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit 4722a3e6b716d9d4594c3cf3856b03bbd24a59a8 Author: Masahiro Yamada Date: Fri Dec 7 20:33:54 2018 +0900 microblaze: fix multiple bugs in arch/microblaze/boot/Makefile This commit fixes some build issues. The first issue is the breakage of linux.bin.ub target since commit ece97f3a5fb5 ("microblaze: Fix simpleImage format generation") because the addition of UIMAGE_{IN,OUT} affected it. make ARCH=microblaze CROSS_COMPILE=microblaze-linux- linux.bin.ub [ snip ] OBJCOPY arch/microblaze/boot/linux.bin UIMAGE arch/microblaze/boot/linux.bin.ub.ub /usr/bin/mkimage: Can't open arch/microblaze/boot/linux.bin.ub: No such file or directory make[1]: *** [arch/microblaze/boot/Makefile;14: arch/microblaze/boot/linux.bin.ub] Error 1 make: *** [arch/microblaze/Makefile;83: linux.bin.ub] Error 2 The second issue is the use of the "if_changed" multiple times for the same target. As commit 92a4728608a8 ("x86/boot: Fix if_changed build flip/flop bug") pointed out, this never works properly. Moreover, generating multiple images as a side-effect is confusing. Let's split the build recipe for each image. simpleImage.
*.unstrip is just a copy of vmlinux. simpleImage.
and simpleImage.
.ub are created in the same way as linux.bin and linux.bin.ub, respectively. I kept simpleImage.* recipes independent of linux.bin.* ones to not change the behavior. Lastly, this commit fixes "make ARCH=microblaze clean". Previously, it only cleaned up the unstrip image. Now, all the simpleImage files are cleaned. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit 2e14f94cf4bc2f15ca5362e81ca3a987c79e3062 Author: Masahiro Yamada Date: Fri Dec 7 20:33:53 2018 +0900 microblaze: move "... is ready" messages to arch/microblaze/Makefile To prepare for more fixes, move this to arch/microblaze/Makefile. Otherwise, the same "... is ready" would be printed multiple times. Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit bafcc61d998c1ca18f556d92a0e95335ac68c7da Author: Masahiro Yamada Date: Fri Dec 7 20:33:52 2018 +0900 microblaze: adjust the help to the real behavior "make ARCH=microblaze help" mentions simpleImage.
.unstrip, but it is not a real Make target. It does not work because Makefile assumes "system.unstrip" is the name of DT. $ make ARCH=microblaze CROSS_COMPILE=microblaze-linux- simpleImage.system.unstrip [ snip ] make[1]: *** No rule to make target 'arch/microblaze/boot/dts/system.unstrip.dtb', needed by 'arch/microblaze/boot/dts/system.dtb'. Stop. make: *** [Makefile;1060: arch/microblaze/boot/dts] Error 2 make: *** Waiting for unfinished jobs.... simpleImage.
works like a phony target that generates multiple images. Reflect the real behavior. I removed the DT directory path information because it is already explained a few lines below. While I am here, I deleted the redundant *_defconfig explanation. The top-level Makefile caters to list available defconfig files: mmu_defconfig - Build for mmu nommu_defconfig - Build for nommu Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek commit 3b5129b3a7c62fdec9cc69b1b3f20917c36ab5d4 Author: Christoph Manszewski Date: Thu Oct 25 17:23:50 2018 +0200 drm/exynos: fimd: Make pixel blend mode configurable The fimd hardware supports different blend modes. Add pixel blend mode property and make it configurable, by modifying the blend equation. Tested on TRATS2 with Exynos 4412 CPU, on top of linux-next-20181019. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit 6f8ee5c21722f93d486b2ff041c28580c9511349 Author: Christoph Manszewski Date: Thu Oct 25 17:23:49 2018 +0200 drm/exynos: fimd: Make plane alpha configurable The fimd hardware supports variable plane alpha. Currently planes are opaque, make this configurable. Tested on TRATS2 with Exynos 4412 CPU, on top of linux-next-20181019. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit fe37b482041709753365bfca739cba24ada297ef Author: Aisheng Dong Date: Thu Dec 13 15:42:54 2018 +0000 clk: imx: add scu clock common part Add SCU clock common part which will be used by client clock drivers. SCU clocks are totally different from the legacy clocks (No much legacy things can be reused), it's using a firmware interface now based on SCU protocol. So a new configuration option CONFIG_MXC_CLK_SCU is added. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Stephen Boyd Cc: Michael Turquette Signed-off-by: Dong Aisheng [sboyd@kernel.org: Mark ccm_ipc_handle static] Signed-off-by: Stephen Boyd commit 3a48d918a4615f0287ac2e106981b3987bf75a3d Author: Aisheng Dong Date: Thu Dec 13 15:42:50 2018 +0000 clk: imx: add configuration option for mmio clks The patch introduces CONFIG_MXC_CLK option for legacy MMIO clocks, this is required to compile legacy MMIO clock conditionally when adding SCU based clocks for MX8 platforms later. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Stephen Boyd Cc: Michael Turquette Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 0f5ab411f5878274b41839bad8bdcc7af1fcaa27 Author: Aisheng Dong Date: Thu Dec 13 01:08:06 2018 +0000 dt-bindings: clock: add imx8qxp lpcg clock binding The Low-Power Clock Gate (LPCG) modules contain a local programming model to control the clock gates for the peripherals. An LPCG module is used to locally gate the clocks for the associated peripheral. Note: This level of clock gating is provided after the clocks are generated by the SCU resources and clock controls. Thus even if the clock is enabled by these control bits, it might still not be running based on the base resource. Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 8cecda9164d35f72768dcfd47ebe708537348bed Author: Aisheng Dong Date: Thu Dec 13 01:07:59 2018 +0000 dt-bindings: clock: imx8qxp: add SCU clock IDs Add IMX8QXP SCU clock IDs. Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 6142236cd9f761d6f696f477c2669f8b0820de03 Author: Suraj Jitindar Singh Date: Fri Dec 7 12:17:03 2018 +1100 KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments When booting a kvm-pr guest on a POWER9 machine the following message is observed: "qemu-system-ppc64: KVM does not support 1TiB segments which guest expects" This is because the guest is expecting to be able to use 1T segments however we don't indicate support for it. This is because we don't set the BOOK3S_HFLAG_MULTI_PGSIZE flag in the hflags in kvmppc_set_pvr_pr() on POWER9. POWER9 does indeed have support for 1T segments, so add a case for POWER9 to the switch statement to ensure it is set. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras commit 0f6ddf34be2a2076bfa7b049c2d270fdda19fa19 Author: Yangtao Li Date: Mon Nov 5 09:47:17 2018 -0500 KVM: PPC: Book3S HV: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Paul Mackerras commit 234ff0b729ad882d20f7996591a964965647addf Author: Paul Mackerras Date: Fri Nov 16 21:28:18 2018 +1100 KVM: PPC: Book3S HV: Fix race between kvm_unmap_hva_range and MMU mode switch Testing has revealed an occasional crash which appears to be caused by a race between kvmppc_switch_mmu_to_hpt and kvm_unmap_hva_range_hv. The symptom is a NULL pointer dereference in __find_linux_pte() called from kvm_unmap_radix() with kvm->arch.pgtable == NULL. Looking at kvmppc_switch_mmu_to_hpt(), it does indeed clear kvm->arch.pgtable (via kvmppc_free_radix()) before setting kvm->arch.radix to NULL, and there is nothing to prevent kvm_unmap_hva_range_hv() or the other MMU callback functions from being called concurrently with kvmppc_switch_mmu_to_hpt() or kvmppc_switch_mmu_to_radix(). This patch therefore adds calls to spin_lock/unlock on the kvm->mmu_lock around the assignments to kvm->arch.radix, and makes sure that the partition-scoped radix tree or HPT is only freed after changing kvm->arch.radix. This also takes the kvm->mmu_lock in kvmppc_rmap_reset() to make sure that the clearing of each rmap array (one per memslot) doesn't happen concurrently with use of the array in the kvm_unmap_hva_range_hv() or the other MMU callbacks. Fixes: 18c3640cefc7 ("KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Paul Mackerras commit 20bb4cb4fb9fb994d757932abc4404cf0f0f56cc Merge: 1072bd678547f 55b078f031f55 Author: James Morris Date: Thu Dec 13 19:30:33 2018 -0800 Merge branch 'smack-for-4.21-a' of https://github.com/cschaufler/next-smack into next-smack From Casey. "I have two Smack patches for 4.21. One Jose's patch adds missing documentation and Zoran's fleshes out the access checks on keyrings." commit 522185d5cb40fafeab807c1ff5ec4ad3a4688b0d Merge: 95302c394c3de 9651ee10ce3bc Author: David S. Miller Date: Thu Dec 13 18:41:39 2018 -0800 Merge branch 'Introduce-NETDEV_PRE_CHANGEADDR' Petr Machata says: ==================== Introduce NETDEV_PRE_CHANGEADDR Spectrum devices have a limitation that all router interfaces need to have the same address prefix. In Spectrum-1, the requirement is for the initial 38 bits of all RIFs to be the same, in Spectrum-2 the limit is 36 bits. Currently violations of this requirement are not diagnosed. At the same time, if the condition is not upheld, the mismatched MAC address ends up overwriting the common prefix, and all RIF MAC addresses silently change to the new prefix. It is therefore desirable to be able at least to diagnose the issue, and better to reject attempts to change MAC addresses in ways that is incompatible with the device. Currently MAC address changes are notified through emission of NETDEV_CHANGEADDR, which is done after the change. Extending this message to allow vetoing is certainly possible, but several other notification types have instead adopted a simple two-stage approach: first a "pre" notification is sent to make sure all interested parties are OK with the change that's about to be done. Then the change is done, and afterwards a "post" notification is sent. This dual approach is easier to use: when the change is vetoed, nothing has changed yet, and it's therefore unnecessary to roll anything back. Therefore this patchset introduces it for NETDEV_CHANGEADDR as well. One prominent path to emitting NETDEV_CHANGEADDR is through dev_set_mac_address(). Therefore in patch #1, give this function an extack argument, so that a textual reason for rejection (or a warning) can be communicated back to the user. In patch #2, add the new notification type. In patch #3, have dev.c emit the notification for instances of dev_addr change, or addition of an address to dev_addrs list. In patches #4 and #5, extend the bridge driver to handle and emit the new notifier. In patch #6, change IPVLAN to emit the new notifier. Likewise for bonding driver in patches #7 and #8. Note that the team driver doesn't need this treatment, as it goes through dev_set_mac_address(). In patches #9, #10 and #11 adapt mlxsw to veto MAC addresses on router interfaces, if they violate the requirement that all RIF MAC addresses have the same prefix. Finally in patches #12 and #13, add a test for vetoing of a direct change of a port device MAC, and indirect change of a bridge MAC. ==================== Signed-off-by: David S. Miller commit 9651ee10ce3bc1e7a71242727711da93441602ac Author: Petr Machata Date: Thu Dec 13 11:54:56 2018 +0000 selftests: mlxsw: Test FID RIF MAC vetoing When a FID RIF is created for a bridge with IP address, its MAC address must obey the same requirements as other RIFs. Test that attempts to change the address incompatibly by attaching a device are vetoed with extack. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 555afaae121ada40d10e538e888c6ecf3cd731eb Author: Petr Machata Date: Thu Dec 13 11:54:54 2018 +0000 selftests: mlxsw: Test RIF MAC vetoing Test that attempts to change address in a way that violates Spectrum requirements are vetoed with extack. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 74bc99397438352bf063329bf22c7a7b4f7e8220 Author: Petr Machata Date: Thu Dec 13 11:54:52 2018 +0000 mlxsw: spectrum_router: Veto unsupported RIF MAC addresses On NETDEV_PRE_CHANGEADDR, if the change is related to a RIF interface, verify that it satisfies the criterion that all RIF interfaces have the same MAC address prefix, as indicated by mlxsw_sp.mac_mask. Additionally, besides explicit address changes, check that the address of an interface for which a RIF is about to be added matches the required pattern as well. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 9329b8162b95200d046b7ef5c9830af9dc74d2ca Author: Petr Machata Date: Thu Dec 13 11:54:50 2018 +0000 mlxsw: spectrum: Add mlxsw_sp.mac_mask The Spectrum hardware demands that all router interfaces in the system have the same first 38 resp. 36 bits of MAC address: the former limit holds on Spectrum, the latter on Spectrum-2. Add a field that refers to the required prefix mask and initialize in mlxsw_sp1_init() and mlxsw_sp2_init(). Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 9735f2d2fe2c0078684c1ed17e53b7640af1c21b Author: Petr Machata Date: Thu Dec 13 11:54:48 2018 +0000 mlxsw: spectrum_router: Generalize mlxsw_sp_netdevice_router_port_event() Prepare mlxsw_sp_netdevice_router_port_event() for handling of NETDEV_PRE_CHANGEADDR. Split out the part that deals with the actual changes and call it for the two events currently handled. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 1caf40dec1e2098d5f0bef3a627f0b08b2f65f9c Author: Petr Machata Date: Thu Dec 13 11:54:46 2018 +0000 net: bonding: Issue NETDEV_PRE_CHANGEADDR Give interested parties an opportunity to veto an impending HW address change. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b9245914282c3ddf86e60ff5dbb3136c2298f842 Author: Petr Machata Date: Thu Dec 13 11:54:44 2018 +0000 net: bonding: Give bond_set_dev_addr() a return value Before NETDEV_CHANGEADDR, bond driver should emit NETDEV_PRE_CHANGEADDR, and allow consumers to veto the address change. To propagate further the return code from NETDEV_PRE_CHANGEADDR, give the function that implements address change a return value. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 61345fab484b97cca47149c90396c74ac76072f5 Author: Petr Machata Date: Thu Dec 13 11:54:41 2018 +0000 net: ipvlan: Issue NETDEV_PRE_CHANGEADDR A NETDEV_CHANGEADDR event implies a change of address of each of the IPVLANs of this IPVLAN device. Therefore propagate NETDEV_PRE_CHANGEADDR to all the IPVLANs. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b89df65c5e2ab2ce674997e44e87452f4d2e9b05 Author: Petr Machata Date: Thu Dec 13 11:54:39 2018 +0000 net: bridge: Handle NETDEV_PRE_CHANGEADDR from ports When a port device seeks approval of a potential new MAC address, make sure that should the bridge device end up using this address, all interested parties would agree with it. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit ca935da7f41bb2186f2a007ae183b27f37c8f5a3 Author: Petr Machata Date: Thu Dec 13 11:54:37 2018 +0000 net: bridge: Issue NETDEV_PRE_CHANGEADDR When a port is attached to a bridge, the address of the bridge in question may change as well. Even if it would not change at this point (because the current bridge address is lower), it might end up changing later as a result of detach of another port, which can't be vetoed. Therefore issue NETDEV_PRE_CHANGEADDR regardless of whether the address will be used at this point or not, and make sure all involved parties would agree with the change. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit d59cdf9475ad84d1f57cab1d162cf289702cfb15 Author: Petr Machata Date: Thu Dec 13 11:54:35 2018 +0000 net: dev: Issue NETDEV_PRE_CHANGEADDR When a device address is about to be changed, or an address added to the list of device HW addresses, it is necessary to ensure that all interested parties can support the address. Therefore, send the NETDEV_PRE_CHANGEADDR notification, and if anyone bails on it, do not change the address. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 1570415f0810fce085066fb39827397452c3965a Author: Petr Machata Date: Thu Dec 13 11:54:33 2018 +0000 net: dev: Add NETDEV_PRE_CHANGEADDR The NETDEV_CHANGEADDR notification is emitted after a device address changes. Extending this message to allow vetoing is certainly possible, but several other notification types have instead adopted a simple two-stage approach: first a "pre" notification is sent to make sure all interested parties are OK with a change that's about to be done. Then the change is done, and afterwards a "post" notification is sent. This dual approach is easier to use: when the change is vetoed, nothing has changed yet, and it's therefore unnecessary to roll anything back. Therefore adopt it for NETDEV_CHANGEADDR as well. To that end, add NETDEV_PRE_CHANGEADDR and an info structure to go along with it. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 3a37a9636cf3a1af2621a33f7eef8a2a3da81030 Author: Petr Machata Date: Thu Dec 13 11:54:30 2018 +0000 net: dev: Add extack argument to dev_set_mac_address() A follow-up patch will add a notifier type NETDEV_PRE_CHANGEADDR, which allows vetoing of MAC address changes. One prominent path to that notification is through dev_set_mac_address(). Therefore give this function an extack argument, so that it can be packed together with the notification. Thus a textual reason for rejection (or a warning) can be communicated back to the user. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 4c6926a23b76ea23403976290cd45a7a143f6500 Author: Dave Jiang Date: Thu Dec 6 12:40:01 2018 -0800 acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs Add support to unlock the dimm via the kernel key management APIs. The passphrase is expected to be pulled from userspace through keyutils. The key management and sysfs attributes are libnvdimm generic. Encrypted keys are used to protect the nvdimm passphrase at rest. The master key can be a trusted-key sealed in a TPM, preferred, or an encrypted-key, more flexible, but more exposure to a potential attacker. Signed-off-by: Dave Jiang Co-developed-by: Dan Williams Reported-by: Randy Dunlap Signed-off-by: Dan Williams commit 37833fb7989a9d3c3e26354e6878e682c340d718 Author: Dave Jiang Date: Thu Dec 6 09:14:08 2018 -0800 acpi/nfit, libnvdimm: Add freeze security support to Intel nvdimm Add support for freeze security on Intel nvdimm. This locks out any changes to security for the DIMM until a hard reset of the DIMM is performed. This is triggered by writing "freeze" to the generic nvdimm/nmemX "security" sysfs attribute. Signed-off-by: Dave Jiang Co-developed-by: Dan Williams Signed-off-by: Dan Williams commit f2989396553a0bd13f4b25f567a3dee3d722ce40 Author: Dave Jiang Date: Wed Dec 5 23:39:29 2018 -0800 acpi/nfit, libnvdimm: Introduce nvdimm_security_ops Some NVDIMMs, like the ones defined by the NVDIMM_FAMILY_INTEL command set, expose a security capability to lock the DIMMs at poweroff and require a passphrase to unlock them. The security model is derived from ATA security. In anticipation of other DIMMs implementing a similar scheme, and to abstract the core security implementation away from the device-specific details, introduce nvdimm_security_ops. Initially only a status retrieval operation, ->state(), is defined, along with the base infrastructure and definitions for future operations. Signed-off-by: Dave Jiang Co-developed-by: Dan Williams Signed-off-by: Dan Williams commit 9db67581b91d9e9e05c35570ac3f93872e6c84ca Author: Dave Jiang Date: Tue Dec 4 10:31:33 2018 -0800 keys-encrypted: add nvdimm key format type to encrypted keys Adding nvdimm key format type to encrypted keys in order to limit the size of the key to 32bytes. Signed-off-by: Dave Jiang Acked-by: Mimi Zohar Signed-off-by: Dan Williams commit 76ef5e17252789da79db78341851922af0c16181 Author: Dave Jiang Date: Tue Dec 4 10:31:27 2018 -0800 keys: Export lookup_user_key to external users Export lookup_user_key() symbol in order to allow nvdimm passphrase update to retrieve user injected keys. Signed-off-by: Dave Jiang Acked-by: David Howells Signed-off-by: Dan Williams commit d6548ae4d16dc231dec22860c9c472bcb991fb15 Author: Dave Jiang Date: Tue Dec 4 10:31:20 2018 -0800 acpi/nfit, libnvdimm: Store dimm id as a member to struct nvdimm The generated dimm id is needed for the sysfs attribute as well as being used as the identifier/description for the security key. Since it's constant and should never change, store it as a member of struct nvdimm. As nvdimm_create() continues to grow parameters relative to NFIT driver requirements, do not require other implementations to keep pace. Introduce __nvdimm_create() to carry the new parameters and keep nvdimm_create() with the long standing default api. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 4fc96ee9085d39ceeaa7b60cd475d0a474e7062f Author: Tycho Andersen Date: Thu Dec 13 13:10:30 2018 -0700 seccomp, s390: fix build for syscall type change A recent patch landed in the security tree [1] that changed the type of the seccomp syscall. Unfortunately, I didn't quite get every instance of the forward declarations, and thus there is a build failure. Here's the last one that I could find, for s390. It should go through the security tree, although hopefully some s390 people can check and make sure it looks reasonable? The only oddity is the trailing semicolon; some lines around this patch have it, and some lines don't. I've left this one as-is. [1]: https://lore.kernel.org/lkml/20181212231630.GA31584@beast/T/#u Signed-off-by: Tycho Andersen Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Kees Cook commit 319deec7db6c0aab276d2447f778e7cffed24c7c Author: Tycho Andersen Date: Wed Dec 12 19:46:54 2018 -0700 seccomp: fix poor type promotion sparse complains, kernel/seccomp.c:1172:13: warning: incorrect type in assignment (different base types) kernel/seccomp.c:1172:13: expected restricted __poll_t [usertype] ret kernel/seccomp.c:1172:13: got int kernel/seccomp.c:1173:13: warning: restricted __poll_t degrades to integer Instead of assigning this to ret, since we don't use this anywhere, let's just test it against 0 directly. Signed-off-by: Tycho Andersen Reported-by: 0day robot Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Kees Cook commit 211929fd3f7c8de4d541b1cc243b82830e5ea1e8 Author: Shuah Khan Date: Wed Dec 12 20:25:14 2018 -0700 selftests: Fix test errors related to lib.mk khdr target Commit b2d35fa5fc80 ("selftests: add headers_install to lib.mk") added khdr target to run headers_install target from the main Makefile. The logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize variables and include files to run headers_install from the top level Makefile. There are a few problems with this logic. 1. Exposes top_srcdir to all tests 2. Common logic impacts all tests 3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in some cases, and STATIC_LIBS in other cases. This makes this framework confusing to use. The common logic that runs for all tests even when KSFT_KHDR_INSTALL isn't defined by the test. top_srcdir is initialized to a default value when test doesn't initialize it. It works for all tests without a sub-dir structure and tests with sub-dir structure fail to build. e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory make: *** No rule to make target '../../../../scripts/subarch.include'. Stop. There is no reason to require all tests to define top_srcdir and there is no need to require tests to add khdr dependency using adhoc changes to TEST_* and other variables. Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests that have the dependency on headers_install. Change common logic to include khdr target define and "all" target with dependency on khdr when KSFT_KHDR_INSTALL is defined. Only tests that have dependency on headers_install have to define just the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to specify khdr dependency in the test Makefiles. Fixes: b2d35fa5fc80 ("selftests: add headers_install to lib.mk") Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan commit 00ec3ab0601280d00978ac4245a62b470cfa81bb Author: Qian Cai Date: Mon Dec 10 14:39:38 2018 +0100 netfilter: ipset: replace a strncpy() with strscpy() To make overflows as obvious as possible and to prevent code from blithely proceeding with a truncated string. This also has a side-effect to fix a compilation warning when using GCC 8.2.1. net/netfilter/ipset/ip_set_core.c: In function 'ip_set_sockfn_get': net/netfilter/ipset/ip_set_core.c:2027:3: warning: 'strncpy' writing 32 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=] Signed-off-by: Qian Cai Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 8e350ce1f78ef5a7d8250b9b4bdf733ce2fa5b1f Author: Florent Fourcot Date: Tue Nov 27 17:15:56 2018 +0100 netfilter: ipset: fix ip_set_byindex function New function added by "Introduction of new commands and protocol version 7" is not working, since we return skb2 to user Signed-off-by: Victorien Molle Signed-off-by: Florent Fourcot Signed-off-by: Pablo Neira Ayuso commit 28c1272914613b6c5a0129d6d502c790d4f23d6c Author: Andrey Ignatov Date: Thu Dec 13 13:19:01 2018 -0800 selftests/bpf: Fix sk lookup usage in test_sock_addr Semantic of netns_id argument of bpf_sk_lookup_tcp and bpf_sk_lookup_udp was changed (fixed) in f71c6143c203. Corresponding changes have to be applied to all call sites in selftests. The patch fixes corresponding call sites in test_sock_addr test: pass BPF_F_CURRENT_NETNS instead of 0 in netns_id argument. Fixes: f71c6143c203 ("bpf: Support sk lookup in netns with id 0") Reported-by: Yonghong Song Signed-off-by: Andrey Ignatov Acked-by: Joe Stringer Tested-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 82e4eb4e96539c76518425a5b5a6c56fa400bce3 Author: Wang Dongsheng Date: Tue Nov 13 18:46:23 2018 +0800 ACPI / tables: add DSDT AmlCode new declaration name support A new naming rule was added in ACPICA version 20180427 changing the DSDT AML code name from "AmlCode" to "dsdt_aml_code". That change was made by commit 83b2fa943ba8 "ACPICA: iASL: Enhance the -tc option (create AML hex file in C)". Tested: ACPICA release version 20180427+. ARM64: QCOM QDF2400 GCC: 4.8.5 20150623 Signed-off-by: Wang Dongsheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit 3b15e830ba59ae20a52b401e8f9e981bd21ab577 Author: Bob Moore Date: Thu Dec 13 12:30:35 2018 -0800 ACPICA: Update version to 20181213 Version 20181213. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 55e8054dbb35a97c39c270c8fd9478e2c938ebab Author: Erik Kaneda Date: Thu Dec 13 12:30:34 2018 -0800 ACPICA: change coding style to match ACPICA, no functional change This commit alters the coding style of the following commit to match ACPICA to keep divergences between Linux and ACPICA at a minimum. This is not intended to result in functional changes. ae6b3e54aa52cd29965b8e4e47000ed2c5d78eb8 Author: Hans de Goede Date: Sun Nov 18 20:25:35 2018 +0100 ACPICA: Fix handling of buffer-size in acpi_ex_write_data_to_field() Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 4c1379d7bb42fa664e0784539208ed74108c53f1 Author: Bob Moore Date: Thu Dec 13 12:30:33 2018 -0800 ACPICA: Debug output: Add option to display method/object evaluation Adds entry/exit messages for all objects that are evaluated. Works for the kernel-level code as well as acpiexec. The "-eo" flag enables acpiexec to display these messages. The messages are very useful when debugging the flow of table initialization. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 73a049a90fb241afcd9e489e764dbcecd38a0161 Author: Erik Kaneda Date: Thu Dec 13 12:30:32 2018 -0800 ACPICA: disassembler: disassemble OEMx tables as AML Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 0fcb9a31da91533c71184cf3a1b68cdd3002f58b Author: Jung-uk Kim Date: Thu Dec 13 12:30:31 2018 -0800 ACPICA: Add "Windows 2018.2" string in the _OSI support Signed-off-by: Jung-uk Kim Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 6d3decda043f95632ae75cc9edaa9d703680c157 Author: Bob Moore Date: Thu Dec 13 12:30:30 2018 -0800 ACPICA: Expressions in package elements are not supported Return AE_SUPPORT if encountered, fixes a previous fault if encountered. Note: Other ACPI implementations do not support this type of construct. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit c47511760ecdb93847e3aa7f23c2ae52f9ab0ab2 Author: Bob Moore Date: Thu Dec 13 12:30:29 2018 -0800 ACPICA: Update buffer-to-string conversions Add "0x" prefix for hex values. Provides compatibility with other ACPI implementations. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 9f4a297660afe172558cade31d24de99ff0bd189 Author: Bob Moore Date: Thu Dec 13 12:30:28 2018 -0800 ACPICA: add comments, no functional change Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 178a0f6379698a4e23ad077c9a71dc84ee69d3a9 Author: Erik Kaneda Date: Thu Dec 13 12:30:27 2018 -0800 ACPICA: Remove defines that use deprecated flag This commit removes the use of ACPI_NO_METHOD_EXECUTE flag Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 2db90876700030bcf18bf045b9f1ca70fc2aa7d1 Author: Bob Moore Date: Thu Dec 13 12:30:26 2018 -0800 ACPICA: Add "Windows 2018" string in the _OSI support Latest windows string. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 55b078f031f556ea18963bd808e79a1dfaa4be44 Author: José Bollo Date: Thu Dec 13 13:31:01 2018 -0800 Smack: Improve Documentation Add some words about the mount option "smackfstransmute=label". Signed-off-by: José Bollo Signed-off-by: Casey Schaufler commit 72d7e948febe2e9c06825d4d3bf81d4cbef7393a Author: Kamil Konieczny Date: Tue Dec 4 17:52:47 2018 +0100 arm64: dts: exynos: Add IMEM clock controller to Exynos5433 Add node for IMEM clock controller, necessary for Security SubSystem (SSS) on Exynos5433. Signed-off-by: Kamil Konieczny Signed-off-by: Krzysztof Kozlowski commit 092ff0520070fad8407b196f3bb6156ce77a6f98 Author: Sagi Grimberg Date: Thu Dec 13 12:34:07 2018 -0800 nvme: fix kernel paging oops free the controller discard_page correctly. Fixes: cb5b7262b011 ("nvme: provide fallback for discard alloc failure") Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 8ac686d7dfed721102860ff2571e6b9f529ae81a Author: Sylwester Nawrocki Date: Wed Dec 12 18:57:44 2018 +0100 ARM: dts: exynos: Specify I2S assigned clocks in proper node The assigned parent clocks should be normally specified in the consumer device's DT node, this ensures respective driver always sees correct clock settings when required. This patch fixes regression in audio subsystem on Odroid XU3/XU4 boards that appeared after commits: commit 647d04f8e07a ("ASoC: samsung: i2s: Ensure the RCLK rate is properly determined") commit 995e73e55f46 ("ASoC: samsung: i2s: Fix rclk_srcrate handling") commit 48279c53fd1d ("ASoC: samsung: i2s: Prevent external abort on exynos5433 I2S1 access") Without this patch the driver gets wrong clock as the I2S function clock (op_clk) in probe() and effectively the clock which is finally assigned from DT is not being enabled/disabled in the runtime resume/suspend ops. Without the above listed commits the EXYNOS_I2S_BUS clock was always set as parent of CLK_I2S_RCLK_SRC regardless of DT settings so there was no issue with not enabled EXYNOS_SCLK_I2S. Cc: # 4.17.x Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 497f1bcb9009fbcf1376aaa19b0b23a7e6988832 Author: Markus Reichl Date: Sat Dec 8 21:56:56 2018 +0100 ARM: dts: exynos: Add missing CPUs in cooling maps for Odroid X2 While updating cooling maps, the exynos4412-prime.dtsi was left untouched. This is not a problem with Odroid U3 because it uses its own map with fan (which was updated). However the cooling maps of Odroid X2 rely only on exynos4412-prime.dtsi. Signed-off-by: Markus Reichl Signed-off-by: Krzysztof Kozlowski commit 9f8c1c5712954f9d8877ac55b18adbdf03e51e1f Author: Daniel Borkmann Date: Wed Dec 12 10:45:38 2018 +0100 bpf: remove obsolete prog->aux sanitation in bpf_insn_prepare_dump This logic is not needed anymore since we got rid of the verifier rewrite that was using prog->aux address in f6069b9aa993 ("bpf: fix redirect to map under tail calls"). Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 356da6d0cde3323236977fce54c1f9612a742036 Author: Christoph Hellwig Date: Thu Dec 6 13:39:32 2018 -0800 dma-mapping: bypass indirect calls for dma-direct Avoid expensive indirect calls in the fast path DMA mapping operations by directly calling the dma_direct_* ops if we are using the directly mapped DMA operations. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 190d4e5916a2d70a11009022b968fca948fb5dc7 Author: Christoph Hellwig Date: Thu Dec 6 13:37:00 2018 -0800 vmd: use the proper dma_* APIs instead of direct methods calls With the bypass support for the direct mapping we might not always have methods to call, so use the proper APIs instead. The only downside is that we will create two dma-debug entries for each mapping if CONFIG_DMA_DEBUG is enabled. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 55897af63091ebc2c3f239c6a6666f748113ac50 Author: Christoph Hellwig Date: Mon Dec 3 11:43:54 2018 +0100 dma-direct: merge swiotlb_dma_ops into the dma_direct code While the dma-direct code is (relatively) clean and simple we actually have to use the swiotlb ops for the mapping on many architectures due to devices with addressing limits. Instead of keeping two implementations around this commit allows the dma-direct implementation to call the swiotlb bounce buffering functions and thus share the guts of the mapping implementation. This also simplified the dma-mapping setup on a few architectures where we don't have to differenciate which implementation to use. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 17ac524719f3fc88c1a90528f4789e4b4f618512 Author: Christoph Hellwig Date: Mon Dec 3 11:14:09 2018 +0100 dma-direct: use dma_direct_map_page to implement dma_direct_map_sg No need to duplicate the mapping logic. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 58dfd4ac022037c6a562e92fc6d2a778819b2162 Author: Christoph Hellwig Date: Mon Dec 3 07:43:05 2018 +0100 dma-direct: improve addressability error reporting Only report report a DMA addressability report once to avoid spewing the kernel log with repeated message. Also provide a stack trace to make it easy to find the actual caller that caused the problem. Last but not least move the actual check into the fast path and only leave the error reporting in a helper. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 68c608345cc569bcfa1c1b2add4c00c343ecf933 Author: Christoph Hellwig Date: Thu Dec 6 07:06:04 2018 -0800 swiotlb: remove dma_mark_clean Instead of providing a special dma_mark_clean hook just for ia64, switch ia64 to use the normal arch_sync_dma_for_cpu hooks instead. This means that we now also set the PG_arch_1 bit for pages in the swiotlb buffer, which isn't stricly needed as we will never execute code out of the swiotlb buffer, but otherwise harmless. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit b907e20508d02462a50c2841da0a5e3883fdab39 Author: Christoph Hellwig Date: Mon Dec 3 11:42:52 2018 +0100 swiotlb: remove SWIOTLB_MAP_ERROR We can use DMA_MAPPING_ERROR instead, which already maps to the same value. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit e5361ca29f2fea345c08d2b5cb5e3b1840cbafb8 Author: Robin Murphy Date: Thu Dec 6 13:20:49 2018 -0800 ACPI / scan: Refactor _CCA enforcement Rather than checking the DMA attribute at each callsite, just pass it through for acpi_dma_configure() to handle directly. That can then deal with the relatively exceptional DEV_DMA_NOT_SUPPORTED case by explicitly installing dummy DMA ops instead of just skipping setup entirely. This will then free up the dev->dma_ops == NULL case for some valuable fastpath optimisations. Signed-off-by: Robin Murphy Reviewed-by: Rafael J. Wysocki Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Signed-off-by: Christoph Hellwig Tested-by: Tony Luck commit 90ac706e98fcb24fb0b0a259558987f33cc2f0f6 Author: Robin Murphy Date: Thu Dec 6 13:14:44 2018 -0800 dma-mapping: factor out dummy DMA ops The dummy DMA ops are currently used by arm64 for any device which has an invalid ACPI description and is thus barred from using DMA due to not knowing whether is is cache-coherent or not. Factor these out into general dma-mapping code so that they can be referenced from other common code paths. In the process, we can prune all the optional callbacks which just do the same thing as the default behaviour, and fill in .map_resource for completeness. Signed-off-by: Robin Murphy [hch: moved to a separate source file] Reviewed-by: Rafael J. Wysocki Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck Signed-off-by: Christoph Hellwig commit 3731c3d4774e38b9d91c01943e1e6a243c1776be Author: Christoph Hellwig Date: Thu Dec 6 12:50:26 2018 -0800 dma-mapping: always build the direct mapping code All architectures except for sparc64 use the dma-direct code in some form, and even for sparc64 we had the discussion of a direct mapping mode a while ago. In preparation for directly calling the direct mapping code don't bother having it optionally but always build the code in. This is a minor hardship for some powerpc and arm configs that don't pull it in yet (although they should in a relase ot two), and sparc64 which currently doesn't need it at all, but it will reduce the ifdef mess we'd otherwise need significantly. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 8ddbe5943c0b1259b5ddb6dc1729863433fc256c Author: Christoph Hellwig Date: Thu Dec 6 12:47:50 2018 -0800 dma-mapping: move dma_cache_sync out of line This isn't exactly a slow path routine, but it is not super critical either, and moving it out of line will help to keep the include chain clean for the following DMA indirection bypass work. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 7249c1a52df9967cd23550f3dc24fb6ca43cdc6a Author: Christoph Hellwig Date: Thu Dec 6 12:43:30 2018 -0800 dma-mapping: move various slow path functions out of line There is no need to have all setup and coherent allocation / freeing routines inline. Move them out of line to keep the implemeation nicely encapsulated and save some kernel text size. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 05887cb610a54bf568de7f0bc07c4a64e45ac6f9 Author: Christoph Hellwig Date: Thu Dec 6 12:25:54 2018 -0800 dma-mapping: move dma_get_required_mask to kernel/dma dma_get_required_mask should really be with the rest of the DMA mapping implementation instead of in drivers/base as a lone outlier. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 7f0fee242e899f2eb42fd9e72bcfc3cb59aad1ce Author: Christoph Hellwig Date: Thu Dec 6 12:24:27 2018 -0800 dma-mapping: merge dma_unmap_page_attrs and dma_unmap_single_attrs The two functions are exactly the same, so don't bother implementing them twice. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 8d59b5f2a44611d7327a2a14b36090d692186f60 Author: Christoph Hellwig Date: Mon Dec 3 14:58:59 2018 +0100 dma-mapping: simplify the dma_sync_single_range_for_{cpu,device} implementation We can just call the regular calls after adding offset the the address instead of reimplementing them. Signed-off-by: Christoph Hellwig Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Tony Luck commit 20b105feda8d42360bd690b8fdf6b2f00ba4a993 Author: Christoph Hellwig Date: Tue Dec 4 08:04:31 2018 -0800 dma-mapping: remove a pointless memset in dma_atomic_pool_init We already zero the memory after allocating it from the pool that this function fills, and having the memset here in this form means we can't support CMA highmem allocations. Signed-off-by: Christoph Hellwig Reported-by: Russell King - ARM Linux commit 6edf2e3710f4ef2555ad7a2681dbeb4a69092b2d Author: Tom Murphy Date: Tue Nov 27 10:33:08 2018 +0000 fix dma-buf/udmabuf selftest This patch fixes the udmabuf selftest. Currently the selftest is broken. I fixed the selftest by setting the F_SEAL_SHRINK seal on the memfd file descriptor which is required by udmabuf and added the test to the selftest Makefile. Signed-off-by: Tom Murphy Reviewed-by: Gerd Hoffmann Signed-off-by: Shuah Khan commit 64bafd2f1e484e27071e7584642005d56516cb77 Author: Darrick J. Wong Date: Wed Dec 12 15:18:52 2018 -0800 xfs: require both realtime inodes to mount Since mkfs always formats the filesystem with the realtime bitmap and summary inodes immediately after the root directory, we should expect that both of them are present and loadable, even if there isn't a realtime volume attached. There's no reason to skip this if rbmino == NULLFSINO; in fact, this causes an immediate crash if the there /is/ a realtime volume and someone writes to it. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell commit 0ca2923e2a1e1eb3376900e1e3fc74e9b6345ee9 Author: Colin Ian King Date: Thu Dec 13 09:40:15 2018 +0000 selftests: watchdog: fix spelling mistake "experies" -> "expires" There is a spelling mistake in the --gettimeleft help text, fix it. Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan commit 2d9a058e3f83dca48b8056148089711c552e2475 Merge: e78bd0d26f739 b65bb777ef223 Author: Jens Axboe Date: Thu Dec 13 12:59:37 2018 -0700 Merge branch 'nvme-4.21' of git://git.infradead.org/nvme into for-4.21/block Pull NVMe updates from Christoph: "Here is the second large chunk of nvme updates for 4.21: - host and target support for NVMe over TCP (Sagi Grimberg, Roy Shterman, Solganik Alexander) - error log page support in target (Chaitanya Kulkarni) plus small fixes and improvements from Jens Axboe and Chengguang Xu." * 'nvme-4.21' of git://git.infradead.org/nvme: (33 commits) nvme-rdma: support separate queue maps for read and write nvme-tcp: support separate queue maps for read and write nvme-fabrics: allow user to set nr_write_queues for separate queue maps nvme-fabrics: add missing nvmf_ctrl_options documentation blk-mq-rdma: pass in queue map to blk_mq_rdma_map_queues nvmet: update smart log with num err log entries nvmet: add error log page cmd handler nvmet: add error log support for file backend nvmet: add error log support for bdev backend nvmet: add error log support for admin-cmd nvmet: add error log support for rdma backend nvmet: add error log support for fabrics-cmd nvmet: add error log support in the core nvmet: add interface to update error-log page nvmet: add error-log definitions nvme: add error log page slot definition nvme: remove nvme_common command cdw10 array nvmet: remove unused variable nvme: provide fallback for discard alloc failure nvme: add __exit annotation ... commit ef2512c826592d40918a7de0a4ee31c67775db17 Author: Firoz Khan Date: Thu Dec 13 14:37:33 2018 +0530 mips: add __NR_syscalls along with __NR_Linux_syscalls __NR_Linux_syscalls macro holds the number of system call exist in mips architecture. We have to change the value of __NR_Linux_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update __NR- _Linux_syscalls value. 1. Update __NR_Linux_syscalls in asm/unistd.h manually by counting the no.of system calls. No need to update __NR_Linux_syscalls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update __NR_Linux_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with __NR_Linux_syscalls. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: Thomas Gleixner Cc: Kate Stewart Cc: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: arnd@arndb.de Cc: deepa.kernel@gmail.com Cc: marcin.juszkiewicz@linaro.org commit 2a3c83f5fe0770d13bbb71b23674886ff4111f44 Merge: d675ba4b9e6cc 0660d8cd83938 Author: Dave Airlie Date: Fri Dec 14 04:57:39 2018 +1000 Merge tag 'vmwgfx-next-2018-12-13' of git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2018-12-13 Two minor fixes for next pull. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20181213130848.3080-1-thellstrom@vmware.com commit 716ff017a39e552f47de7667ba934d0547ba7535 Author: Maran Wilson Date: Mon Dec 10 11:09:35 2018 -0800 KVM: x86: Allow Qemu/KVM to use PVH entry point For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, Qemu should be able to boot directly into the uncompressed Linux kernel binary without the need to run firmware. There already exists an ABI to allow this for Xen PVH guests and the ABI is supported by Linux and FreeBSD: https://xenbits.xen.org/docs/unstable/misc/pvh.html This patch enables Qemu to use that same entry point for booting KVM guests. Signed-off-by: Maran Wilson Suggested-by: Konrad Rzeszutek Wilk Suggested-by: Boris Ostrovsky Tested-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit d907be2b5b042536d15687ac0a86f27c8c9aebd4 Author: Maran Wilson Date: Mon Dec 10 11:09:11 2018 -0800 xen/pvh: Add memory map pointer to hvm_start_info struct The start info structure that is defined as part of the x86/HVM direct boot ABI and used for starting Xen PVH guests would be more versatile if it also included a way to pass information about the memory map to the guest. This would allow KVM guests to share the same entry point. Signed-off-by: Maran Wilson Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit a43fb7da53007e67ad593e179f01a1925b04f586 Author: Maran Wilson Date: Mon Dec 10 11:08:46 2018 -0800 xen/pvh: Move Xen code for getting mem map via hcall out of common file We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The original design for PVH entry in Xen guests relies on being able to obtain the memory map from the hypervisor using a hypercall. When we extend the PVH entry ABI to support other hypervisors like Qemu/KVM, a new mechanism will be added that allows the guest to get the memory map without needing to use hypercalls. For Xen guests, the hypercall approach will still be supported. In preparation for adding support for other hypervisors, we can move the code that uses hypercalls into the Xen specific file. This will allow us to compile kernels in the future without CONFIG_XEN that are still capable of being booted as a Qemu/KVM guest via the PVH entry point. Signed-off-by: Maran Wilson Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 8cee3974b35bfb235d4637e10de5c5b364a9057e Author: Maran Wilson Date: Mon Dec 10 11:08:45 2018 -0800 xen/pvh: Move Xen specific PVH VM initialization out of common file We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. This patch moves the small block of code used for initializing Xen PVH virtual machines into the Xen specific file. This initialization is not going to be needed for Qemu/KVM guests. Moving it out of the common file is going to allow us to compile kernels in the future without CONFIG_XEN that are still capable of being booted as a Qemu/KVM guest via the PVH entry point. Signed-off-by: Maran Wilson Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 4df7363e52105bf7a8589efb2959c907872644fb Author: Maran Wilson Date: Mon Dec 10 11:08:44 2018 -0800 xen/pvh: Create a new file for Xen specific PVH code We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The first step in that direction is to create a new file that will eventually hold the Xen specific routines. Signed-off-by: Maran Wilson Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit fcd4747698150bc3a9596481d3eb2b3ae71d82f1 Author: Maran Wilson Date: Mon Dec 10 11:07:55 2018 -0800 xen/pvh: Move PVH entry code out of Xen specific tree Once hypervisors other than Xen start using the PVH entry point for starting VMs, we would like the option of being able to compile PVH entry capable kernels without enabling CONFIG_XEN and all the code that comes along with that. To allow that, we are moving the PVH code out of Xen and into files sitting at a higher level in the tree. This patch is not introducing any code or functional changes, just moving files from one location to another. Signed-off-by: Maran Wilson Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 7733607fb3aa72e3df47e6165156feb92ced8f5f Author: Maran Wilson Date: Mon Dec 10 11:07:28 2018 -0800 xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH In order to pave the way for hypervisors other than Xen to use the PVH entry point for VMs, we need to factor the PVH entry code into Xen specific and hypervisor agnostic components. The first step in doing that, is to create a new config option for PVH entry that can be enabled independently from CONFIG_XEN. Signed-off-by: Maran Wilson Reviewed-by: Juergen Gross Acked-by: Borislav Petkov Signed-off-by: Boris Ostrovsky commit de17f14ea576d8a0f2932404467fa916542da94d Author: Rohit kumar Date: Thu Nov 1 18:08:49 2018 +0530 ASoC: core: Invoke pcm_new() for all DAI-link Remove no_pcm check to invoke pcm_new() for backend dai-links too. This fixes crash in hdmi codec driver during hdmi_codec_startup() while accessing chmap_info struct. chmap_info struct memory is allocated in pcm_new() of hdmi codec driver which is not invoked in case of DPCM when hdmi codec driver is part of backend dai-link. Below is the crash stack: [ 61.635493] Unable to handle kernel NULL pointer dereference at virtual address 00000018 .. [ 61.666696] CM = 0, WnR = 1 [ 61.669778] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc0d6633000 [ 61.676526] [0000000000000018] *pgd=0000000153fc8003, *pud=0000000153fc8003, *pmd=0000000000000000 [ 61.685793] Internal error: Oops: 96000046 [#1] PREEMPT SMP [ 61.722955] CPU: 7 PID: 2238 Comm: aplay Not tainted 4.14.72 #21 .. [ 61.740269] PC is at hdmi_codec_startup+0x124/0x164 [ 61.745308] LR is at hdmi_codec_startup+0xe4/0x164 Signed-off-by: Rohit kumar Signed-off-by: Mark Brown commit 3500f1c589e92e0b6b1f8d31b4084fbde08d49cb Author: Dimitris Papavasiliou Date: Sat Nov 24 22:05:42 2018 +0200 ASoC: pcm512x: Implement the digital_mute interface Clicks and pops of various volumes can be produced while the device is opened, closed, put into and taken out of standby, or reconfigured. Fix this, by implementing the digital_mute interface, so that the output is muted during such operations. Signed-off-by: Dimitris Papavasiliou Signed-off-by: Mark Brown commit 9c8114c20d1876c8053d58dd92ea2a81c67dc198 Author: Srinivas Kandagatla Date: Mon Dec 10 13:56:32 2018 +0000 irqchip/gic-v3: Add quirk for msm8996 broken registers Access to GICR_WAKER is restricted on msm8996 SoC in Hypervisor. Its been more than 2+ years of wait for this to be fixed, which has no hopes to be fixed. This change was introduced for the "lead device" on msm8996 platform. It looks like all publicly available msm8996 and other Qualcomm SoCs have this implementation. So add a quirk to not access this register on msm8996. With this quirk MSM8996 can at least boot out of mainline, which can help community to work with boards based on MSM8996 and other SoCs with have this restrictions. This Quirk is based on device tree compatible string. Without this patch Qualcomm DB820c board reboots when GICR_WAKER is accessed. Signed-off-by: Srinivas Kandagatla Signed-off-by: Marc Zyngier commit f70fdb42a095d265813d6cc8bd10497d7c592ab6 Author: Srinivas Kandagatla Date: Mon Dec 10 13:56:31 2018 +0000 irqchip/gic: Add support to device tree based quirks This patch adds support to device tree based quirks based on device tree compatible string. Signed-off-by: Srinivas Kandagatla Signed-off-by: Marc Zyngier commit 7c813152cf9ba1901a4d621ebba1edbac910095e Author: Srinivas Kandagatla Date: Mon Dec 10 13:56:30 2018 +0000 dt-bindings/gic-v3: Add msm8996 compatible string Access to GICR_WAKER is restricted on msm8996 SoC in Hypervisor. There are many devices out there with this restriction in place and there has been no update to this firmware since last few years, making those devices totally unusable for upstream development. IIDR register value conflicts with other SoCs, using compatible seems to be the only way to apply quirks required for msm8996 based SoCs. Without this quirk many qcom SoCs (atleast 3 that I know) are unable to boot mainline. Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Marc Zyngier commit acc2038738bd6f881e7a277ba14fa7c589fd3058 Merge: cd1cc0bef46fc 2c9b0b00af23c Author: Rob Herring Date: Thu Dec 13 11:20:36 2018 -0600 Merge branch 'yaml-bindings-for-v4.21' into dt/next commit 2c9b0b00af23cdc70d28d82e077dc1d280bcb84a Author: Rob Herring Date: Thu Apr 26 16:08:29 2018 -0500 dt-bindings: Convert trivial-devices.txt to json-schema Convert trivial-devices.txt to DT schema format using json-schema. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit cd1cc0bef46fc8d8f9ebe82d2064d4f4bd5ecf16 Author: Lubomir Rintel Date: Sun Dec 2 12:40:08 2018 +0100 dt-bindings: arm: mrvl: amend Browstone compatible string The Brownstone board is compatible with "mrvl,mmp2". The actual DTS already contains the string -- add it to the binding doc as well. Signed-off-by: Lubomir Rintel Signed-off-by: Rob Herring commit f4d1577e9bc66b3699c7c43b98735e1dcc0a83d0 Author: Rob Herring Date: Mon May 14 18:56:50 2018 -0500 dt-bindings: arm: Convert Tegra board/soc bindings to json-schema Convert Tegra SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: Jonathan Hunter Cc: devicetree@vger.kernel.org Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding Signed-off-by: Rob Herring commit 738d57f23c2b3193aa187d7ecdaa1e83985af8e3 Author: Rob Herring Date: Mon May 14 18:57:35 2018 -0500 dt-bindings: arm: Convert ZTE board/soc bindings to json-schema Convert ZTE SoC bindings to DT schema format using json-schema. Cc: Jun Nie Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Acked-by: Shawn Guo Signed-off-by: Rob Herring commit 3da3d9be44954d5b0b5d0fdfc0aafaa2a905d206 Author: Michal Simek Date: Thu Nov 8 14:28:54 2018 +0100 dt-bindings: arm: Add missing Xilinx boards Add missing description for Ultra96, zcu104, zcu106 and zcu111. Signed-off-by: Michal Simek Signed-off-by: Rob Herring commit c808c7b950ce0e106e8d6eef8d54ec409483c319 Author: Rob Herring Date: Tue Mar 20 05:38:45 2018 -0500 dt-bindings: arm: Convert Xilinx board/soc bindings to json-schema Convert Xilinx SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Michal Simek Signed-off-by: Rob Herring commit f3fb5732e3bde702f9ae0aef6c96ee60799459b5 Author: Rob Herring Date: Mon May 14 18:57:10 2018 -0500 dt-bindings: arm: Convert VIA board/soc bindings to json-schema Convert VIA SoC bindings to DT schema format using json-schema. Cc: Tony Prisk Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit c74acbf039ca5b68363f804971cd63d0e78e8529 Author: Rob Herring Date: Mon May 14 18:56:27 2018 -0500 dt-bindings: arm: Convert ST STi board/soc bindings to json-schema Convert ST STi SoC bindings to DT schema format using json-schema. Acked-by: Patrice Chotard Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 26282485aedd93528b15bc3f7e1d03d3ca9a3d98 Author: Rob Herring Date: Mon May 14 18:56:08 2018 -0500 dt-bindings: arm: Convert SPEAr board/soc bindings to json-schema Convert SPEAr SoC bindings to DT schema format using json-schema. Cc: Shiraz Hashim Cc: Mark Rutland Cc: devicetree@vger.kernel.org Acked-by: Viresh Kumar Signed-off-by: Rob Herring commit cf7e48dad101d648e8d569d84247cd20163871ff Author: Rob Herring Date: Mon May 14 18:55:23 2018 -0500 dt-bindings: arm: Convert CSR SiRF board/soc bindings to json-schema Convert CSR SiRF SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: Barry Song Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit 9d3ef77fe5688b761bdee91803af0c613717b52e Author: Rob Herring Date: Mon May 14 18:53:47 2018 -0500 dt-bindings: arm: Convert QCom board/soc bindings to json-schema Convert QCom SoC bindings to DT schema format using json-schema. Acked-by: Andy Gross Cc: David Brown Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit da5faf32ad2d74144c14f1c8212e0063a3dc1d0b Author: Rob Herring Date: Mon May 14 18:52:51 2018 -0500 dt-bindings: arm: Convert TI nspire board/soc bindings to json-schema Convert TI NSpire SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 5afa43780f7c735ee83a015db69821b45a011ef6 Author: Rob Herring Date: Mon May 14 18:49:44 2018 -0500 dt-bindings: arm: Convert TI davinci board/soc bindings to json-schema Convert TI Davinci SoC bindings to DT schema format using json-schema. Reviewed-by: Sekhar Nori Cc: Kevin Hilman Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit c7a851b7050e2b7b8ed6e96c1437e19ca5720851 Author: Tony Lindgren Date: Wed Dec 12 15:57:27 2018 -0800 ARM: dts: Cosmetic fix for omap5 USB node names These should be now using offset from the module base and not the full physical address. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren commit bc998a730367a69a1449320d321187d7414668fa Author: Bartosz Golaszewski Date: Fri Dec 7 14:04:52 2018 +0100 regmap: irq: handle HW using separate rising/falling edge interrupts Some interrupt controllers use separate bits for controlling rising and falling edge interrupts in the mask register i.e. they have one interrupt for rising edge and one for falling. We already handle the case where we have a single interrupt in the mask register and a separate type configuration register. Add a new switch to regmap_irq_chip which tells the framework to use the mask_base address for configuring the edge of the interrupts that define type_falling/rising_mask values. For such interrupts we never update the type_base bits. For interrupts that don't define type masks or their regmap irq chip doesn't set the type_in_mask to true everything stays the same. Signed-off-by: Bartosz Golaszewski Signed-off-by: Mark Brown commit 97bebc5facf7d495e72df0b7c50be3699c7bdd73 Author: Will Deacon Date: Tue Dec 11 16:42:31 2018 +0000 arm64: sysreg: Use _BITUL() when defining register bits Using shifts directly is error-prone and can cause inadvertent sign extensions or build problems with older versions of binutils. Consistent use of the _BITUL() macro makes these problems disappear. Signed-off-by: Will Deacon commit 1e013d06120cbf67e771848fc5d98174c33b078a Author: Will Deacon Date: Wed Dec 12 15:53:54 2018 +0000 arm64: cpufeature: Rework ptr auth hwcaps using multi_entry_cap_matches Open-coding the pointer-auth HWCAPs is a mess and can be avoided by reusing the multi-cap logic from the CPU errata framework. Move the multi_entry_cap_matches code to cpufeature.h and reuse it for the pointer auth HWCAPs. Reviewed-by: Suzuki Poulose Signed-off-by: Will Deacon commit a56005d3210500f8a166fcb83cbb5ac5d0f909e4 Author: Will Deacon Date: Wed Dec 12 15:52:02 2018 +0000 arm64: cpufeature: Reduce number of pointer auth CPU caps from 6 to 4 We can easily avoid defining the two meta-capabilities for the address and generic keys, so remove them and instead just check both of the architected and impdef capabilities when determining the level of system support. Reviewed-by: Suzuki Poulose Signed-off-by: Will Deacon commit fbedc599e9b891a6756b1c9bc2eead02b02cce77 Author: Mark Rutland Date: Fri Dec 7 18:39:31 2018 +0000 arm64: docs: document pointer authentication Now that we've added code to support pointer authentication, add some documentation so that people can figure out if/how to use it. Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Reviewed-by: Ramana Radhakrishnan Cc: Andrew Jones Cc: Catalin Marinas Cc: Ramana Radhakrishnan Cc: Will Deacon Signed-off-by: Will Deacon commit 84931327a807a4dd65d0d6b53a8ae47845c91f79 Author: Will Deacon Date: Thu Dec 13 13:14:06 2018 +0000 arm64: ptr auth: Move per-thread keys from thread_info to thread_struct We don't need to get at the per-thread keys from assembly at all, so they can live alongside the rest of the per-thread register state in thread_struct instead of thread_info. This will also allow straighforward whitelisting of the keys for hardened usercopy should we expose them via a ptrace request later on. Signed-off-by: Will Deacon commit 04ca3204fa09f5f55c8f113b0072004a7b364ff4 Author: Mark Rutland Date: Fri Dec 7 18:39:30 2018 +0000 arm64: enable pointer authentication Now that all the necessary bits are in place for userspace, add the necessary Kconfig logic to allow this to be enabled. Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit ba830885656414101b2f8ca88786524d4bb5e8c1 Author: Kristina Martsenko Date: Fri Dec 7 18:39:28 2018 +0000 arm64: add prctl control for resetting ptrauth keys Add an arm64-specific prctl to allow a thread to reinitialize its pointer authentication keys to random values. This can be useful when exec() is not used for starting new processes, to ensure that different processes still have different keys. Signed-off-by: Kristina Martsenko Signed-off-by: Will Deacon commit ccc43810827f9feb5e588e4b7098dc55b1d972f8 Author: Mark Rutland Date: Fri Dec 7 18:39:27 2018 +0000 arm64: perf: strip PAC when unwinding userspace When the kernel is unwinding userspace callchains, we can't expect that the userspace consumer of these callchains has the data necessary to strip the PAC from the stored LR. This patch has the kernel strip the PAC from user stackframes when the in-kernel unwinder is used. This only affects the LR value, and not the FP. This only affects the in-kernel unwinder. When userspace performs unwinding, it is up to userspace to strip PACs as necessary (which can be determined from DWARF information). Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Ramana Radhakrishnan Cc: Will Deacon Signed-off-by: Will Deacon commit ec6e822d1a22d0eef1d1fa260dff751dba9a4258 Author: Mark Rutland Date: Fri Dec 7 18:39:26 2018 +0000 arm64: expose user PAC bit positions via ptrace When pointer authentication is in use, data/instruction pointers have a number of PAC bits inserted into them. The number and position of these bits depends on the configured TCR_ELx.TxSZ and whether tagging is enabled. ARMv8.3 allows tagging to differ for instruction and data pointers. For userspace debuggers to unwind the stack and/or to follow pointer chains, they need to be able to remove the PAC bits before attempting to use a pointer. This patch adds a new structure with masks describing the location of the PAC bits in userspace instruction and data pointers (i.e. those addressable via TTBR0), which userspace can query via PTRACE_GETREGSET. By clearing these bits from pointers (and replacing them with the value of bit 55), userspace can acquire the PAC-less versions. This new regset is exposed when the kernel is built with (user) pointer authentication support, and the address authentication feature is enabled. Otherwise, the regset is hidden. Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Ramana Radhakrishnan Cc: Will Deacon [will: Fix to use vabits_user instead of VA_BITS and rename macro] Signed-off-by: Will Deacon commit 7503197562567b57ec14feb3a9d5400ebc56812f Author: Mark Rutland Date: Fri Dec 7 18:39:25 2018 +0000 arm64: add basic pointer authentication support This patch adds basic support for pointer authentication, allowing userspace to make use of APIAKey, APIBKey, APDAKey, APDBKey, and APGAKey. The kernel maintains key values for each process (shared by all threads within), which are initialised to random values at exec() time. The ID_AA64ISAR1_EL1.{APA,API,GPA,GPI} fields are exposed to userspace, to describe that pointer authentication instructions are available and that the kernel is managing the keys. Two new hwcaps are added for the same reason: PACA (for address authentication) and PACG (for generic authentication). Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Tested-by: Adam Wallis Cc: Catalin Marinas Cc: Ramana Radhakrishnan Cc: Suzuki K Poulose Cc: Will Deacon [will: Fix sizeof() usage and unroll address key initialisation] Signed-off-by: Will Deacon commit 6984eb47d5c1a74bb44467ee4eee22d680f10785 Author: Mark Rutland Date: Fri Dec 7 18:39:24 2018 +0000 arm64/cpufeature: detect pointer authentication So that we can dynamically handle the presence of pointer authentication functionality, wire up probing code in cpufeature.c. From ARMv8.3 onwards, ID_AA64ISAR1 is no longer entirely RES0, and now has four fields describing the presence of pointer authentication functionality: * APA - address authentication present, using an architected algorithm * API - address authentication present, using an IMP DEF algorithm * GPA - generic authentication present, using an architected algorithm * GPI - generic authentication present, using an IMP DEF algorithm This patch checks for both address and generic authentication, separately. It is assumed that if all CPUs support an IMP DEF algorithm, the same algorithm is used across all CPUs. Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon commit b3669b1e1c09890d61109a1a8ece2c5b66804714 Author: Mark Rutland Date: Fri Dec 7 18:39:23 2018 +0000 arm64: Don't trap host pointer auth use to EL2 To allow EL0 (and/or EL1) to use pointer authentication functionality, we must ensure that pointer authentication instructions and accesses to pointer authentication keys are not trapped to EL2. This patch ensures that HCR_EL2 is configured appropriately when the kernel is booted at EL2. For non-VHE kernels we set HCR_EL2.{API,APK}, ensuring that EL1 can access keys and permit EL0 use of instructions. For VHE kernels host EL0 (TGE && E2H) is unaffected by these settings, and it doesn't matter how we configure HCR_EL2.{API,APK}, so we don't bother setting them. This does not enable support for KVM guests, since KVM manages HCR_EL2 itself when running VMs. Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Acked-by: Christoffer Dall Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Will Deacon commit a1ee8abb95c55948dc187d0cccc88814841c85d2 Author: Mark Rutland Date: Fri Dec 7 18:39:22 2018 +0000 arm64/kvm: hide ptrauth from guests In subsequent patches we're going to expose ptrauth to the host kernel and userspace, but things are a bit trickier for guest kernels. For the time being, let's hide ptrauth from KVM guests. Regardless of how well-behaved the guest kernel is, guest userspace could attempt to use ptrauth instructions, triggering a trap to EL2, resulting in noise from kvm_handle_unknown_ec(). So let's write up a handler for the PAC trap, which silently injects an UNDEF into the guest, as if the feature were really missing. Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Reviewed-by: Andrew Jones Reviewed-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Will Deacon commit 4eaed6aa2c628101246bcabc91b203bfac1193f8 Author: Mark Rutland Date: Fri Dec 7 18:39:21 2018 +0000 arm64/kvm: consistently handle host HCR_EL2 flags In KVM we define the configuration of HCR_EL2 for a VHE HOST in HCR_HOST_VHE_FLAGS, but we don't have a similar definition for the non-VHE host flags, and open-code HCR_RW. Further, in head.S we open-code the flags for VHE and non-VHE configurations. In future, we're going to want to configure more flags for the host, so lets add a HCR_HOST_NVHE_FLAGS defintion, and consistently use both HCR_HOST_VHE_FLAGS and HCR_HOST_NVHE_FLAGS in the kvm code and head.S. We now use mov_q to generate the HCR_EL2 value, as we use when configuring other registers in head.S. Reviewed-by: Marc Zyngier Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Reviewed-by: Christoffer Dall Cc: Catalin Marinas Cc: Marc Zyngier Cc: Will Deacon Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Will Deacon commit aa6eece8ec5095e479a354365f5e5102bfab4f5a Author: Mark Rutland Date: Fri Dec 7 18:39:20 2018 +0000 arm64: add pointer authentication register bits The ARMv8.3 pointer authentication extension adds: * New fields in ID_AA64ISAR1 to report the presence of pointer authentication functionality. * New control bits in SCTLR_ELx to enable this functionality. * New system registers to hold the keys necessary for this functionality. * A new ESR_ELx.EC code used when the new instructions are affected by configurable traps This patch adds the relevant definitions to and for these, to be used by subsequent patches. Reviewed-by: Richard Henderson Signed-off-by: Mark Rutland Signed-off-by: Kristina Martsenko Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon Signed-off-by: Will Deacon commit 15560657358539aafcac027445f1f34c29a889a6 Author: Kristina Martsenko Date: Fri Dec 7 18:39:19 2018 +0000 arm64: add comments about EC exception levels To make it clear which exceptions can't be taken to EL1 or EL2, add comments next to the ESR_ELx_EC_* macro definitions. Reviewed-by: Richard Henderson Signed-off-by: Kristina Martsenko Signed-off-by: Will Deacon commit 82b4d99725aedc3de731faa4e23f256fbe2821cf Author: Olliver Schinagl Date: Tue Dec 11 17:17:12 2018 +0200 mfd: axp20x: use explicit bit defines The AXP20X_OFF define is an actual specific bit, define it as such. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Acked-by: Lee Jones Signed-off-by: Mark Brown commit dcea4d5c0a349034686ef9f8ba8a9910e0a1c14b Author: Olliver Schinagl Date: Tue Dec 11 17:17:11 2018 +0200 mfd: axp20x: Clean up included headers Add the bitops.h header as we need it, alphabetize header order. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Acked-by: Lee Jones Signed-off-by: Mark Brown commit c1132b006785b14d01ccf40922493278984555d5 Author: Olliver Schinagl Date: Tue Dec 11 17:17:10 2018 +0200 regulator: dts: enable soft-start and ramp delay for the OLinuXino Lime2 The OLinuXino Lime2 has a big capacitor on its LDO3 output. It is actually too large, causing the PMIC to shutdown when toggling the LDO3. By enabling soft-start and ramp delay we increase the time for the capacitor to charge lowering the current drain on the power regulator. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit eb51c6eb9775d5e7ef810327dbc84bb0d15f72b5 Author: Olliver Schinagl Date: Tue Dec 11 17:17:09 2018 +0200 dt-bindings: mfd: axp20x: Add software based soft_start for AXP209 LDO3 In the past, there have been words on various lists that if LDO3 is disabled in u-boot, but enabled in the DTS, the axp209 driver would fail to continue/hang. Several enable/disable patches have been issues to devicetree's in both the kernel and u-boot to address this issue. What really happened however, was that the AXP209 shuts down without a notice and without setting an interrupt. This is caused when LDO3 gets overloaded, for example with large capacitors on the LDO3 output. Normally, we would expect that AXP209 would source 200 mA as per datasheet and set and trigger an interrupt when being overloaded. For some reason however, this does not happen. As a work-around, implement software-based 'regulator-soft-start' property for AXP209 LDO3 regulator, which is used to first bring up the LDO3 to the lowest possible voltage and then enable the LDO. After that, we can set the requested voltage as usual. Combining this setting with the regulator-ramp-delay allows LDO3 to come up slowly and staggered, potentially reducing overall inrush current. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit 77e3e3b165db94dc48c0de30498f51fa38f19d4d Author: Olliver Schinagl Date: Tue Dec 11 17:17:08 2018 +0200 regulator: axp20x: add software based soft_start for AXP209 LDO3 In the past, there have been words on various lists that if LDO3 is disabled in u-boot, but enabled in the DTS, the axp209 driver would fail to continue/hang. Several enable/disable patches have been issues to devicetree's in both the kernel and u-boot to address this issue. What really happened however, was that the AXP209 shuts down without a notice and without setting an interrupt. This is caused when LDO3 gets overloaded, for example with large capacitors on the LDO3 output. Normally, we would expect that AXP209 would source 200 mA as per datasheet and set and trigger an interrupt when being overloaded. For some reason however, this does not happen. As a work-around, we use the soft-start constraint of the regulator node to first bring up the LDO3 to the lowest possible voltage and then enable the LDO. After that, we can set the requested voltage as usual. Combining this setting with the regulator-ramp-delay allows LDO3 to enable voltage slowly and staggered, potentially reducing overall inrush current. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit fdb0436c35b86759da6d7fce27323e3cdced0e13 Author: Olliver Schinagl Date: Tue Dec 11 17:17:07 2018 +0200 dt-bindings: mfd: axp20x: add support for regulator-ramp-delay for AXP209 The AXP209 supports ramping up voltages on several regulators such as DCDC2 and LDO3, therefore we can use the standard 'regulator-ramp-delay' property for those 2 regulators. Note that the voltage ramp only works when the regulator is already enabled. E.g. when going from say 0.7 V to 3.6 V. When turning on the regulator, no voltage ramp is performed in hardware. What this means, is that if the bootloader brings up the voltage at 0.7 V, the ramp delay property is properly applied. If however, the bootloader leaves the power off, no ramp delay is applied when the power is enabled by the regulator framework. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Acked-for-MFD-by: Lee Jones Signed-off-by: Mark Brown commit d29f54df8b167be6174881f265b12453a558e48a Author: Olliver Schinagl Date: Tue Dec 11 17:17:06 2018 +0200 regulator: axp20x: add support for set_ramp_delay for AXP209 The AXP209 supports ramping up voltages on several regulators such as DCDC2 and LDO3. This patch adds preliminary support for the regulator-ramp-delay property for these 2 regulators. Note that the voltage ramp only works when regulator is already enabled. E.g. when going from say 0.7 V to 3.6 V. When turning on the regulator, no voltage ramp is performed in hardware. What this means, is that if the bootloader brings up the voltage at 0.7 V, the ramp delay property is properly applied. If however, the bootloader leaves the power off, no ramp delay is applied when the power is enabled by the regulator framework. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit 16aa70e95947e0870ec9e5bf7c7db33fcbacb957 Author: Olliver Schinagl Date: Tue Dec 11 17:17:05 2018 +0200 mfd: axp20x: name voltage ramping define properly The current axp20x names the ramping register 'scal' which probably means scaling. Since the register really has nothing to do with scaling, but really is the voltage ramp we rename it appropriately. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Acked-by: Lee Jones Signed-off-by: Mark Brown commit c33c83354c323e5c190fc0115b894394fcb81740 Merge: 919261c03e7ca db4a555f7c4cf Author: Mark Brown Date: Thu Dec 13 16:37:11 2018 +0000 Merge branch 'topic/axp20x' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21 commit 165be3c260f88a5f8c55d89458ad1f1d9efd701f Author: Jerome Brunet Date: Thu Dec 13 16:44:28 2018 +0100 ASoC: meson: fix do_div warning in spdifin Even if this spdif input driver is only supposed to be used on 64bits platform, there is possible problem with 32bits and do_div, as reported by the kbuild robot. Just fix it. Fixes: 5ce5658375e6 ("ASoC: meson: add axg spdif input") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit c2dacddc5f6772f38bf04c950967fe41bb5c9600 Author: Rob Herring Date: Mon May 14 18:47:39 2018 -0500 dt-bindings: arm: Convert Calxeda board/soc bindings to json-schema Convert Calxeda SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit f8139316cab4f3e5cf31b65157b27e785e05965b Author: Rob Herring Date: Mon May 14 18:46:53 2018 -0500 dt-bindings: arm: Convert Altera board/soc bindings to json-schema Convert Altera SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit d3c207eeb9059cf055a887f15e5f41b096386448 Author: Rob Herring Date: Mon May 14 18:42:04 2018 -0500 dt-bindings: arm: Convert primecell binding to json-schema Convert ARM Primecell binding to DT schema format using json-schema. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 672951cbd1b70a9ede6f9c6eba4ed6b726d32b03 Author: Rob Herring Date: Mon May 14 18:41:07 2018 -0500 dt-bindings: arm: Convert cpu binding to json-schema Convert ARM CPU binding to DT schema format using json-schema. Cc: Mark Rutland Cc: Matthias Brugger Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Rob Herring commit 4d2bb3e65035954dce7c666616906004f2c049f8 Author: Rob Herring Date: Mon May 14 18:42:37 2018 -0500 dt-bindings: timer: Convert ARM timer bindings to json-schema Convert ARM timers to DT schema format using json-schema. Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 0175ce4a58d6e42a707c413f21e1a1f354ea4988 Author: Rob Herring Date: Fri Nov 2 16:29:38 2018 -0500 dt-bindings: i2c: Convert i2c-gpio binding to json-schema Convert the i2c-gpio binding to DT schema format using json-schema. This serves as an example of how to include other schema (i2c-controller.yaml in this case). Signed-off-by: Rob Herring commit b31abceb0fec717948e4e8dae6705baf6914db96 Author: Rob Herring Date: Mon May 14 18:40:09 2018 -0500 dt-bindings: altera: Convert clkmgr binding to json-schema Convert Altera clkmgr to DT schema format using json-schema. Cc: Mark Rutland Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 00ce8a800060c80c6d0c895fad10cacb03277fcc Author: Rob Herring Date: Fri Jun 29 08:19:52 2018 -0600 dt-bindings: Add a writing DT schemas how-to and annotated example Add a how-to doc on writing DT schema documentation. This gives a description of each section and details on how to validate the DT schema file. The DT schema are written using json-schema vocabulary in a YAML encoded document. Using jsonschema gives us access to existing tooling. A YAML encoding gives us something easy to edit. The example is annotated to help explain what each section does. This example is just the tip of the iceberg, but is it the part most developers writing bindings will interact with. Backing all this up are meta-schema (to validate the binding schemas), some DT core schema, YAML encoded DT output with dtc, and a small number of python scripts to run validation. Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 4f0e3a57d6eb727c54249542c509e0b7aa122465 Author: Rob Herring Date: Thu Sep 6 13:26:07 2018 -0500 kbuild: Add support for DT binding schema checks This adds the build infrastructure for checking DT binding schema documents and validating dts files using the binding schema. Check DT binding schema documents: make dt_binding_check Build dts files and check using DT binding schema: make dtbs_check Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to use for validation. This makes it easier to find and fix errors generated by a specific schema. Currently, the validation targets are separate from a normal build to avoid a hard dependency on the external DT schema project and because there are lots of warnings generated. Cc: Jonathan Corbet Cc: Mark Rutland Acked-by: Masahiro Yamada Cc: Michal Marek Cc: linux-doc@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Signed-off-by: Rob Herring commit f231c34ca9772f0b0e2d1b781e9c415847aff522 Author: Pierre-Louis Bossart Date: Fri Dec 7 17:50:07 2018 -0600 ASoC: Intel: Skylake: add error logs on probe, remove dependency on NHLT Add error logs to make probe debug easier. Also remove hard-coded dependency on NHLT. NHLT literally stands for NonHdaudioLinkTable and is only required for SSP/DMIC interfaces. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 7f981bdcf55fda28a9a70c9e8151dd200771a0a8 Author: Pierre-Louis Bossart Date: Fri Dec 7 17:50:06 2018 -0600 ASoC: Intel: Skylake: remove useless tests on HDaudio capabilities bus->ppcap is now tested upfront, there is no need to re-check if the hardware is exposed as needed. Remove tests and remove indentation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit fa11ab5688f744bc868356f3f14c3bb9f283a780 Author: Pierre-Louis Bossart Date: Fri Dec 7 17:50:05 2018 -0600 ASoC: Intel: Skylake: stop probe if HDaudio capabilities don't exist Check immediately if required HDaudio capabilities can't be found (no PPCAP or no streams exposed in GCAP), and move all DMA inits after the error tests. PPCAP and GCAP are not reliable indicators of DSP presence, but if they don't exist then the driver will not work. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit c746de8dbc7b0ae9df491f7a99a6dab34203b51b Author: Pierre-Louis Bossart Date: Fri Dec 7 17:50:04 2018 -0600 ASoC: Intel: Skylake: Harden DSP detection with PCI class/subclass info The existing PPCAP and GCAP fields cannot be used reliably to determine if the DSP is enabled by the BIOS. Instead rely on the class/subclass information to find out if this driver can run or not. The values in the code don't seem to be documented in publicly available documents but are part of recommendations made to BIOS writers and have been verified to be accurate on a number of platforms. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit e6b98db945124987b1ecec3f5f030877627e01a9 Author: Takashi Iwai Date: Fri Dec 7 17:50:03 2018 -0600 ASoC: Intel: Skylake: Add CFL-S support It's with CNP, supposed to be equivalent with CNL entry. Keep the existing declaration style for now, at a later point we may transition and use PCI_DEVICE_DATA(). Signed-off-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 26a25c841d9e6ba4ceba4b8d7ce3f3227f7510ce Author: Will Deacon Date: Thu Dec 13 15:34:44 2018 +0000 arm64: perf: Treat EXCLUDE_EL* bit definitions as unsigned Although the upper 32 bits of the PMEVTYPER_EL0 registers are RES0, we should treat the EXCLUDE_EL* bit definitions as unsigned so that we avoid accidentally sign-extending the privilege filtering bit (bit 31) into the upper half of the register. Signed-off-by: Will Deacon commit bb9963b850ea9e1ef39f4368eae83a9462f60166 Author: Kirill Marinushkin Date: Fri Dec 7 20:02:34 2018 +0100 ASoC: pcm3060: Add powersaving widgets for DAC and ADC Enable DAC/ADC only when playing/capturing Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit 33f8db9a89200c18ff65d494a3dbd325d129e15e Author: Maruthi Srinivas Bayyavarapu Date: Sat Dec 8 00:02:38 2018 +0530 ASoC: xlnx: enable i2s driver build Enabled i2s driver build option. Signed-off-by: Maruthi Srinivas Bayyavarapu Signed-off-by: Mark Brown commit 112a8900d4b0399f45d6ea025d3e1a4a1d6fa3f3 Author: Maruthi Srinivas Bayyavarapu Date: Sat Dec 8 00:02:37 2018 +0530 ASoC: xlnx: Add i2s driver I2S IP instance can work in transmitter/playback or receiver/capture mode exclusively. The patch registers corresponding instance as ASoC component with audio framework. Signed-off-by: Maruthi Srinivas Bayyavarapu Signed-off-by: Mark Brown commit 644c2dcf2f2ea113602aa24170d3203942d3d140 Author: Maruthi Srinivas Bayyavarapu Date: Sat Dec 8 00:02:36 2018 +0530 dt-bindings: ASoC: xlnx, i2s: Document i2s bindings Added documentation for I2S IP core DT bindings. Signed-off-by: Maruthi Srinivas Bayyavarapu Signed-off-by: Mark Brown commit e78bd0d26f7396c7bd17be60d9686be8ef8e453a Author: Guoju Fang Date: Thu Dec 13 22:53:57 2018 +0800 bcache: print number of keys in trace_bcache_journal_write Sometimes flush journal may be very frequent, so it's useful to dump number of keys every time write journal. Signed-off-by: Guoju Fang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit cc38ca7ed54a1df04ae9f23614b348ebfc918029 Author: Coly Li Date: Thu Dec 13 22:53:56 2018 +0800 bcache: set writeback_percent in a flexible range Because CUTOFF_WRITEBACK is defined as 40, so before the changes of dynamic cutoff writeback values, writeback_percent is limited to [0, CUTOFF_WRITEBACK]. Any value larger than CUTOFF_WRITEBACK will be fixed up to 40. Now cutof writeback limit is a dynamic value bch_cutoff_writeback, so the range of writeback_percent can be a more flexible range as [0, bch_cutoff_writeback]. The flexibility is, it can be expended to a larger or smaller range than [0, 40], depends on how value bch_cutoff_writeback is specified. The default value is still strongly recommended to most of users for most of workloads. But for people who want to do research on bcache writeback perforamnce tuning, they may have chance to specify more flexible writeback_percent in range [0, 70]. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 9aaf51654672b16566c5fe787da3ca41ebf6d297 Author: Coly Li Date: Thu Dec 13 22:53:55 2018 +0800 bcache: make cutoff_writeback and cutoff_writeback_sync tunable Currently the cutoff writeback and cutoff writeback sync thresholds are defined by CUTOFF_WRITEBACK (40) and CUTOFF_WRITEBACK_SYNC (70) as static values. Most of time these they work fine, but when people want to do research on bcache writeback mode performance tuning, there is no chance to modify the soft and hard cutoff writeback values. This patch introduces two module parameters bch_cutoff_writeback_sync and bch_cutoff_writeback which permit people to tune the values when loading bcache.ko. If they are not specified by module loading, current values CUTOFF_WRITEBACK_SYNC and CUTOFF_WRITEBACK will be used as default and nothing changes. When people want to tune this two values, - cutoff_writeback can be set in range [1, 70] - cutoff_writeback_sync can be set in range [1, 90] - cutoff_writeback always <= cutoff_writeback_sync The default values are strongly recommended to most of users for most of workloads. Anyway, if people wants to take their own risk to do research on new writeback cutoff tuning for their own workload, now they can make it. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 009673d02fa92acaa7ed0b1e1389610e4390ba49 Author: Coly Li Date: Thu Dec 13 22:53:54 2018 +0800 bcache: add MODULE_DESCRIPTION information This patch moves MODULE_AUTHOR and MODULE_LICENSE to end of super.c, and add MODULE_DESCRIPTION("Bcache: a Linux block layer cache"). This is preparation for adding module parameters. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7a671d8ef821bf5743fdff17fae0600648345b03 Author: Coly Li Date: Thu Dec 13 22:53:53 2018 +0800 bcache: option to automatically run gc thread after writeback The option gc_after_writeback is disabled by default, because garbage collection will discard SSD data which drops cached data. Echo 1 into /sys/fs/bcache//internal/gc_after_writeback will enable this option, which wakes up gc thread when writeback accomplished and all cached data is clean. This option is helpful for people who cares writing performance more. In heavy writing workload, all cached data can be clean only happens when writeback thread cleans all cached data in I/O idle time. In such situation a following gc running may help to shrink bcache B+ tree and discard more clean data, which may be helpful for future writing requests. If you are not sure whether this is helpful for your own workload, please leave it as disabled by default. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit cb07ad63682ffcce10e9beaed7828a26780e3df9 Author: Coly Li Date: Thu Dec 13 22:53:52 2018 +0800 bcache: introduce force_wake_up_gc() Garbage collection thread starts to work when c->sectors_to_gc is negative value, otherwise nothing will happen even the gc thread is woken up by wake_up_gc(). force_wake_up_gc() sets c->sectors_to_gc to -1 before calling wake_up_gc(), then gc thread may have chance to run if no one else sets c->sectors_to_gc to a positive value before gc_should_run(). This routine can be called where the gc thread is woken up and required to run in force. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit f383ae300c4b6466824fd5c8cbd0a6c4ed2b53d3 Author: Shenghui Wang Date: Thu Dec 13 22:53:51 2018 +0800 bcache: cannot set writeback_running via sysfs if no writeback kthread created "echo 1 > writeback_running" marks writeback_running even if no writeback kthread created as "d_strtoul(writeback_running)" will simply set dc-> writeback_running without checking the existence of dc->writeback_thread. Add check for setting writeback_running via sysfs: if no writeback kthread available, reject setting to 1. v2 -> v3: * Make message on wrong assignment more clear. * Print name of bcache device instead of name of backing device. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 79b791466e525c98f6aeee9acf5726e7b27f4231 Author: Shenghui Wang Date: Thu Dec 13 22:53:50 2018 +0800 bcache: do not mark writeback_running too early A fresh backing device is not attached to any cache_set, and has no writeback kthread created until first attached to some cache_set. But bch_cached_dev_writeback_init run " dc->writeback_running = true; WARN_ON(test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); " for any newly formatted backing devices. For a fresh standalone backing device, we can get something like following even if no writeback kthread created: ------------------------ /sys/block/bcache0/bcache# cat writeback_running 1 /sys/block/bcache0/bcache# cat writeback_rate_debug rate: 512.0k/sec dirty: 0.0k target: 0.0k proportional: 0.0k integral: 0.0k change: 0.0k/sec next io: -15427384ms The none ZERO fields are misleading as no alive writeback kthread yet. Set dc->writeback_running false as no writeback thread created in bch_cached_dev_writeback_init(). We have writeback thread created and woken up in bch_cached_dev_writeback _start(). Set dc->writeback_running true before bch_writeback_queue() called, as a writeback thread will check if dc->writeback_running is true before writing back dirty data, and hung if false detected. After the change, we can get the following output for a fresh standalone backing device: ----------------------- /sys/block/bcache0/bcache$ cat writeback_running 0 /sys/block/bcache0/bcache# cat writeback_rate_debug rate: 0.0k/sec dirty: 0.0k target: 0.0k proportional: 0.0k integral: 0.0k change: 0.0k/sec next io: 0ms v1 -> v2: Set dc->writeback_running before bch_writeback_queue() called, Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 4e361e020e7220fa8fc812acdca4d08814633f49 Author: Shenghui Wang Date: Thu Dec 13 22:53:49 2018 +0800 bcache: update comment in sysfs.c We have struct cached_dev allocated by kzalloc in register_bcache(), which initializes all the fields of cached_dev with 0s. And commit ce4c3e19e520 ("bcache: Replace bch_read_string_list() by __sysfs_match_string()") has remove the string "default". Update the comment. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 3db4d0783eaf2a2537f6b83679ad57cba0ad0481 Author: Shenghui Wang Date: Thu Dec 13 22:53:48 2018 +0800 bcache: update comment for bch_data_insert commit 220bb38c21b8 ("bcache: Break up struct search") introduced changes to struct search and s->iop. bypass/bio are fields of struct data_insert_op now. Update the comment. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit ae17102316550b4b230a283febe31b2a9ff30084 Author: Shenghui Wang Date: Thu Dec 13 22:53:47 2018 +0800 bcache: do not check if debug dentry is ERR or NULL explicitly on remove debugfs_remove and debugfs_remove_recursive will check if the dentry pointer is NULL or ERR, and will do nothing in that case. Remove the check in cache_set_free and bch_debug_init. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit d2f96f487f471b4c718324ecd1540c89d2be52ac Author: Shenghui Wang Date: Thu Dec 13 22:53:46 2018 +0800 bcache: add comment for cache_set->fill_iter We have the following define for btree iterator: struct btree_iter { size_t size, used; #ifdef CONFIG_BCACHE_DEBUG struct btree_keys *b; #endif struct btree_iter_set { struct bkey *k, *end; } data[MAX_BSETS]; }; We can see that the length of data[] field is static MAX_BSETS, which is defined as 4 currently. But a btree node on disk could have too many bsets for an iterator to fit on the stack - maybe far more that MAX_BSETS. Have to dynamically allocate space to host more btree_iter_sets. bch_cache_set_alloc() will make sure the pool cache_set->fill_iter can allocate an iterator equipped with enough room that can host (sb.bucket_size / sb.block_size) btree_iter_sets, which is more than static MAX_BSETS. bch_btree_node_read_done() will use that pool to allocate one iterator, to host many bsets in one btree node. Add more comment around cache_set->fill_iter to make code less confusing. Signed-off-by: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit fee10bd2267868f2a3e7ba008ef7665aac5e4412 Author: Naga Sureshkumar Relli Date: Thu Dec 6 18:17:34 2018 +0530 memory: pl353: Add driver for arm pl353 static memory controller Add driver for arm pl353 static memory controller. This controller is used in Xilinx Zynq SoC for interfacing the NAND and NOR/SRAM memory devices. Signed-off-by: Naga Sureshkumar Relli Reviewed-by: Linus Walleij Signed-off-by: Michal Simek commit e3e454b7047a8bb11c0311ab1708e040481a6044 Author: YueHaibing Date: Thu Dec 6 12:06:08 2018 +0000 rtlwifi: rtl8821ae: remove set but not used variable 'type' in translate_rx_signal_stuff Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c: In function 'translate_rx_signal_stuff': drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c:309:6: warning: variable 'type' set but not used [-Wunused-but-set-variable] It never used since commit 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit b0b41af12a1bf21a45ccfe48da194ee688170d03 Author: Naga Sureshkumar Relli Date: Thu Dec 6 18:17:33 2018 +0530 dt-bindings: memory: Add pl353 smc controller devicetree binding information Add pl353 static memory controller devicetree binding information. Signed-off-by: Naga Sureshkumar Relli Reviewed-by: Linus Walleij Signed-off-by: Michal Simek commit f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35 Author: Wesley Sheng Date: Mon Dec 10 17:12:24 2018 +0800 switchtec: Add MRPC DMA mode support MRPC normal mode requires the host to read the MRPC command status and output data from BAR. This results in high latency responses from the Memory Read TLP and potential Completion Timeout (CTO). Add support for MRPC DMA mode, including related macro definitions and data structures and code to: * Retrieve MRPC DMA mode version from adapter firmware * Allocate DMA buffer, register ISR, and enable DMA during init * Check MRPC execution status and get execution results from DMA buffer * Release DMA buffer and disable DMA function when unloading module MRPC DMA mode is a new feature of firmware, and the driver will fall back to MRPC normal mode if there is no support in the legacy firmware. Add a module parameter, "use_dma_mrpc", to select between MRPC DMA mode and MRPC normal mode. Since the driver automatically detects DMA support in the firmware, this parameter is just for debugging and testing. Include so that readq/writeq is replaced by two readl/writel on systems that do not support it. Signed-off-by: Wesley Sheng [bhelgaas: changelog, simplify dma_ver check] Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 52d8db8e0cd7c28316514568fe5df0cfd4fa2075 Author: Kelvin Cao Date: Mon Dec 10 17:12:23 2018 +0800 switchtec: Improve MRPC efficiency by enabling write combining The MRPC Input buffer is mostly memory without any side effects, so we can improve the access time by enabling write combining on this region of the BAR. In a few places, we still need to flush the WC buffer. To do this, we simply read from the Outbound Doorbell register because reads to this register are processed by low latency hardware. Signed-off-by: Kelvin Cao Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit afbb1947db94eacc5a13302eee88a9772fb78935 Author: Pan Bian Date: Thu Nov 29 18:48:10 2018 +0800 rtl818x: fix potential use after free entry is released via usb_put_urb just after calling usb_submit_urb. However, entry is used if the submission fails, resulting in a use after free bug. The patch fixes this. Signed-off-by: Pan Bian ACKed-by: Larry Finger Signed-off-by: Kalle Valo commit 662a7b078cff6ab246d875775af7affedcf6e2d5 Author: YueHaibing Date: Wed Dec 5 07:26:06 2018 +0000 b43: remove set but not used variables 'tx_pwr_state,tmp2' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/broadcom/b43/phy_n.c: In function 'b43_nphy_op_recalc_txpower': drivers/net/wireless/broadcom/b43/phy_n.c:5898:7: warning: variable 'tx_pwr_state' set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/b43/phy_n.c:6047:20: warning: variable 'tmp2' set but not used [-Wunused-but-set-variable] 'tx_pwr_state' never used since introduction in commit 8615eb2870f1 ("b43: N-PHY: support setting custom TX power") 'tmp2' not used any more since commit c002831a07dd ("b43: N-PHY: use helper for checking IPA") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 412dd15c8177d93abe0c8787b83b31c5eb061405 Author: Arnd Bergmann Date: Mon Dec 10 21:55:37 2018 +0100 brcmfmac: fix false-positive -Wmaybe-unintialized warning When CONFIG_NO_AUTO_INLINE is set, we get a false-postive warning for the brcmf_fw_request_nvram_done() function, after gcc figures out that brcmf_fw_nvram_from_efi() might not set the 'data_len' variable, but fails to notice that it always returns NULL: drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c: In function 'brcmf_fw_request_nvram_done': drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:560:11: error: 'data_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] Mark it 'inline' to force gcc to understand this. Fixes: ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Kalle Valo commit 29f6589140a10ece8c1d73f58043ea5b3473ab3e Author: Wright Feng Date: Wed Nov 21 07:53:52 2018 +0000 brcmfmac: disable command decode in sdio_aos AOS is a part of the SDIOD core that becomes active when the rest of SDIOD is sleeping to keep SDIO bus alive responding to reduced set of commands. Transaction between AOS and SDIOD is not protected, and if cmd 52 is received in AOS and in the middle of response state changed from AOS to SDIOD, response is corrupted and it causes to SDIO Host controller to hang. Command decode for below chips are disabled in this commit: - 4339 - 4345 - 4354 - 4373 Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Double Lo Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 2f2d389efda4caa4c1b69cb4fa2ab217f0fe6d6f Author: Chi-Hsien Lin Date: Wed Nov 21 07:53:50 2018 +0000 brcmfmac: 4373 save-restore support Use chipcommon sr_control0 register to check 4373 sr support. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit f95a8d9c6aca196f1ace5b2e53a3dd3bc491b1b3 Author: Naveen Gupta Date: Wed Nov 21 07:53:49 2018 +0000 brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic The number of words that the read FIFO has to contain except the end of frame before sends data back to the host. Max watermark = (512B - 2* (BurstLength))/4 = (512 - 128)/4 = 384/4 = 0x60 so if burst length (i.e. BurstLength = 64) is increased, watermark has to be reduced. This is the optimal setting for this chip. Reviewed-by: Arend van Spriel Signed-off-by: Naveen Gupta Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit b021a6bc1175442609af0b66d64f850883e155fb Author: Chi-Hsien Lin Date: Wed Nov 21 07:53:48 2018 +0000 brcmfmac: allow GCI core enumuration GCI core is needed for ULP operation. Allow GCI core enumuration with below changes: - Allow GCI to be added to core list even when it doesn't have a wrapper. - Allow 8K address space size. - Don't overwrite the address value when an additional size descriptor is in place. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 35cb51b2162a1a7c5cd977f92595e60ab14d3b22 Author: Chi-Hsien Lin Date: Wed Nov 21 07:53:47 2018 +0000 brcmfmac: add support for CYW43012 SDIO chipset CYW43012 is a 1x1 802.11a/b/g/n Dual-Band HT20, 256-QAM/Turbo QAM. It is an Ultra Low Power WLAN+BT combo chip. Reviewed-by: Arend van Spriel Signed-off-by: Chi-Hsien Lin Signed-off-by: Praveen Babu C Signed-off-by: Kalle Valo commit 58e4bbea0c1d9b5ace11df968c5dc096ce052a73 Author: Madhan Mohan R Date: Wed Nov 21 07:53:45 2018 +0000 brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Along with F2 watermark (existing) configuration, F1 MesBusyCtrl should be enabled & sdio device RX FIFO watermark should be configured to avoid overflow errors. Reviewed-by: Arend van Spriel Signed-off-by: Madhan Mohan R Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit e1a08730eeb0bad4d82c3bc40e74854872de618d Author: Wright Feng Date: Wed Nov 21 07:53:44 2018 +0000 brcmfmac: set F2 watermark to 256 for 4373 We got SDIO_CRC_ERROR with 4373 on SDR104 when doing bi-directional throughput test. Enable watermark to 256 to guarantee the operation stability. Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit eb6b33bfb8f56859df7264dccc2ca8ab7c57342a Author: Winnie Chang Date: Wed Nov 21 07:53:42 2018 +0000 brcmfmac: add 4354 raw pcie device id Add the raw 4354 PCIe device ID for unprogrammed Cypress boards. Reviewed-by: Arend Van Spriel Signed-off-by: Winnie Chang Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit e4af3ffb43d50f070134aa1b40d5c3573f57deb1 Author: Chung-Hsien Hsu Date: Mon Nov 5 05:52:05 2018 +0000 brcmfmac: handle compressed tx status signal Firmware inform the driver about tx status by normal tx status signal or compressed tx status signal. This patch adds support to handle the compressed tx status signal. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Wright Feng Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit a3bdc6deb60bf6be4405058ca49a686c4db08c39 Author: Wright Feng Date: Mon Nov 5 05:51:59 2018 +0000 brcmfmac: enable frameburst mode in default firmware setting The frameburst feature can enable per-packet framebursting in firmware side and get higher TX throughput in High Throughput(HT) mode. To enhance TX throughput, we enable frameburst mode in default firmware setting. Signed-off-by: Wright Feng Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit 153e22c0ff1260035cd7fe72c8aeead1f5fac757 Author: Wright Feng Date: Mon Nov 5 05:51:54 2018 +0000 brcmfmac: add credit numbers updating support The credit numbers are static and tunable per chip in firmware side. However the credit number may be changed that is based on packet pool length and will send BRCMF_E_FIFO_CREDIT_MAP event to notify host driver updates the credit numbers during interface up. The purpose of this patch is making host driver has ability of updating the credit numbers when receiving the BRCMF_E_FIFO_CREDIT_MAP event. Signed-off-by: Wright Feng Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit ed0b2b067bad9d923842ac4c68c6b652b5885b84 Author: Brian Norris Date: Thu Dec 6 16:12:49 2018 -0800 mwifiex: add NL80211_STA_INFO_RX_BITRATE support Comparing the existing TX_BITRATE parsing code (in mwifiex_parse_htinfo()) with the RX bitrate histograms in debugfs.c, it appears that the rxpd_rate and rxpd_htinfo fields have the same format. At least, they give reasonable results when I parse them this way. So this patch adds support for RX_BITRATE to our station info dump. Along the way, I add legacy bitrate parsing into the same function, using the debugfs code (mwifiex_histogram_read() and mwifiex_adjust_data_rate()) as reference. Additionally, to satisfy the requirements of NL80211_STA_INFO_RX_BITRATE, I skip logging the bitrate of multicast packets. This shouldn't add a lot of overhead to the RX path, as there are already several similar 802.3 header checks in this same codepath. We can also bias the branch behavior to favor unicast, as that's the common performance-sensitive case. I'd consider this support somewhat experimental, as I have zero documentation from Marvell. But the existing driver code gives me good reason to think this is correct. I've tested this on a few different 802.11{a,b,g,n,ac} networks, and the reported bitrates look good to me. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit a256707fbd4b1d153d0152c502aa5b87837aeb6c Author: Brian Norris Date: Thu Dec 6 16:12:48 2018 -0800 mwifiex: refactor mwifiex_parse_htinfo() for reuse This function converts some firmware-specific parameters into cfg80211 'rate_info' structures. It currently assumes it's dealing only with TX bitrate, but the RX bitrate looks to be the same, so refactor this function to be reusable. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 4cb777c64e030778c569f605398d7604d8aabc0f Author: Brian Norris Date: Mon Dec 3 14:26:55 2018 -0800 mwifiex: debugfs: correct histogram spacing, formatting Currently, snippets of this file look like: rx rates (in Mbps): 0=1M 1=2M2=5.5M 3=11M 4=6M 5=9M 6=12M 7=18M 8=24M 9=36M 10=48M 11=54M12-27=MCS0-15(BW20) 28-43=MCS0-15(BW40) 44-53=MCS0-9(VHT:BW20)54-63=MCS0-9(VHT:BW40)64-73=MCS0-9(VHT:BW80) ... noise_flr[--96dBm] = 22 noise_flr[--95dBm] = 149 noise_flr[--94dBm] = 9 noise_flr[--93dBm] = 2 We're missing some spaces, and we're adding a minus sign ('-') on values that are already negative signed integers. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 1dcd9429212b98bea87fc6ec92fb50bf5953eb47 Author: Pan Bian Date: Thu Nov 29 18:25:19 2018 +0800 mwifiex: fix potential NULL dereference and use after free There are two defects: (1) passing a NULL bss to mwifiex_save_hidden_ssid_channels will result in NULL dereference, (2) using bss after dropping the reference to it via cfg80211_put_bss. To fix them, the patch moves the buggy code to the branch that bss is not NULL and puts it before cfg80211_put_bss. Signed-off-by: Pan Bian Signed-off-by: Kalle Valo commit 8625db9416923b2941ef68776f55062555f7ce65 Author: Hui Wang Date: Thu Dec 13 21:02:16 2018 +0800 ASoC: Intel: kbl_rt5660: Add a new machine driver for kbl with rt5660 The new Dell IoT platform uses kabylake + alc3277 codec, and alc3277 shares the driver with the codec rt5660, here we generate a new machine driver based on kbl_da7219_max98357a. The audio design on this IoT platform is as below: - Intel kabylake platform - connect the codec ALC3277 via SSP0 - line-out and line-in with Micbias jacks - line-out mute control and jack detection of line-out and line-in - two HDMI ports with audio capability Signed-off-by: Hui Wang Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8fe8915b6c0b5298fa547be21957b3860c39c46e Merge: 1b46ed96961db a01b8d1d24451 Author: Mark Brown Date: Thu Dec 13 14:36:46 2018 +0000 Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep commit 2a355ec25729053bb9a1a89b6c1d1cdd6c3b3fb1 Author: Will Deacon Date: Thu Dec 13 13:47:38 2018 +0000 arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field While the CSV3 field of the ID_AA64_PFR0 CPU ID register can be checked to see if a CPU is susceptible to Meltdown and therefore requires kpti to be enabled, existing CPUs do not implement this field. We therefore whitelist all unaffected Cortex-A CPUs that do not implement the CSV3 field. Signed-off-by: Will Deacon commit 074b145a05835e9f93a52323a4770b70b4b782fd Merge: d9bbd6a1a56ec e28487ea84a9c Author: Kalle Valo Date: Thu Dec 13 16:02:19 2018 +0200 Merge tag 'mt76-for-kvalo-2018-11-30' of https://github.com/nbd168/wireless first batch of mt76 patches for 4.21 * use the same firmware for mt76x2e and mt76x2u * mt76x2 fixes * mt76x0 fixes * mt76x0e survey support * more unification between mt76x2 and mt76x0 * mt76x0e AP mode support * mt76x0e DFS support * rework and fix tx status handling for mt76x0 and mt76x2 kvalo: fixed a conflict in drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c and a build problem in drivers/net/wireless/mediatek/mt76/mt76x02_util.c commit f836b94444d6b2e75f59dc7a161233ad99c08999 Merge: 0cef02031e74e 1adde32a2ede4 Author: Linus Walleij Date: Thu Dec 13 14:02:18 2018 +0100 Merge tag 'intel-pinctrl-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v4.21-1 Switch to generic ->probe() callbacks. Simplify getting .driver_data. Code formatting fixes and headers clean up. Special case is the driver for Intel Cherryview SoC, where GPIO enabling bit was mistakenly cleared when pin gets freed. It's fixed now. The below commit went to v4.20-rc3, that's why duplication. - ad774315c3765ffb27abb6db987a2121d871a942 MAINTAINERS: Add tree link for Intel pin control driver The following is an automated git shortlog grouped by driver: baytrail: - Code formatting fixes - simplify getting .driver_data broxton: - Code formatting fixes - Get rid of unneeded ->probe() stub cannonlake: - Code formatting fixes - Get rid of unneeded ->probe() stub cedarfork: - Replace acpi.h with mod_devicetable.h - Get rid of unneeded ->probe() stub cherryview: - Stop clearing the GPIO_EN bit from chv_gpio_disable_free - Add chv_gpio_clear_triggering() helper function - simplify getting .driver_data denverton: - Replace acpi.h with mod_devicetable.h - Get rid of unneeded ->probe() stub geminilake: - Code formatting fixes icelake: - Code formatting fixes - Get rid of unneeded ->probe() stub intel: - Unexport intel_pinctrl_probe() - simplify getting .driver_data lewisburg: - Replace acpi.h with mod_devicetable.h - Get rid of unneeded ->probe() stub MAINTAINERS: - Add tree link for Intel pin control driver merrifield: - include bits.h instead of bitops.h sunrisepoint: - Get rid of unneeded ->probe() stub commit 6f61a2c8f1f6163c7e08c77c5f71df0427e4d2f6 Author: Laurent Pinchart Date: Mon Dec 10 11:43:55 2018 +0200 arm64: dts: renesas: draak: Fix CVBS input A typo in the adv7180 DT node prevents successful probing of the VIN. Fix it. Fixes: 6a0942c20f5c ("arm64: dts: renesas: draak: Describe CVBS input") Signed-off-by: Laurent Pinchart Acked-by: Jacopo Mondi Signed-off-by: Simon Horman commit c6cbcdea7ab94120b676a4865e9782ed3c06dc80 Merge: e894075934a44 db23d88756abd Author: Greg Kroah-Hartman Date: Thu Dec 13 13:37:24 2018 +0100 Merge tag 'iio-for-4.21b' 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.21 cycle. Staging graduation * ad2s90 - Driver for this resolver to digital chip. New drivers and device support. * ad5686 - Add support for ad5310r DAC and associated fix in value read back. * exynos-adc - Support for S5PV210 which is slightly different from other parts. * mcp41010 - Driver supporting MCP41010, MCP41050, MCP41100, MCP42010, MCP42050 and MCP42100 microchip potentiometers. New ACPI ids. * ak8975 - AKM9911 ACPI HID. * kxcjk-1013 - KXJ2109 ACPI HID. - KIOX010A ACPI HID. New features * ad5933 - Explicit DT binding. * ad2s90 - Explicit DT binding including dropping spi setup that is done via dt in favour of verifying the settings form DT. * adt7316 - Explicit DT binding and support for gpio, irq_flags etc. * stm32-adc - Runtime power management. Minor fixes and cleanups * core - Protect against missing info structure. * ad2s90 - SPDX - Add documentation fo the mutex. * ad7280a - Check allocation failure. - Fix an accidental replacement of an error return. * adt7316 - Switch some variables to be local and rename for consistency with other drivers. - Revert a false handling of 0 as an error introduced earlier this cycle. * bmi160 - Use devm functions throughout probe() to avoid need for remove(). * hid-sensor-hub - White space cleanup. * hts221 - MAINTAINERS entry. * lis302 - Use generic name in the DT binding doc. * Messon-saradc - Check for allocation error. - Fix some presented clock names that break clk debugfs. * qcom-spmi-adc - A fix for initialization of the prescale property. Came late in the cycle, so merge window is probably the best route for this. * st_lsm6dsx - Allow for variable read length to support wider range of slave devices. * tag 'iio-for-4.21b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (37 commits) iio: adc: qcom-spmi-adc5: Initialize prescale properly dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant iio: adc: Allow selection of Exynos ADC on S5PV210 iio: adc: exynos-adc: Add S5PV210 variant iio: bmi160: use all devm functions in probe iio: dac: ad5686: fix bit shift read register iio:dac:ad5686: Add AD5310R support Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0" dt-bindings: iio: accel: use a generic node name for lis302 iio: core: check 'info' value before registering the device staging: iio: adc: ad7280a: fix overwrite of the returned value staging: iio: adc: ad7280a: check for devm_kasprint() failure iio: humidity: hts221: add entry in MAINTAINERS file iio: magnetometer: ak8975: Add the "AKM9911" ACPI HID staging:iio:ad2s90: Move out of staging staging:iio:ad2s90: Add comment to device state mutex staging:iio:ad2s90: Replace license text w/ SPDX identifier dt-bindings:iio:resolver: Add docs for ad2s90 staging:iio:ad2s90: Add max frequency check at probe staging:iio:ad2s90: Remove spi setup that should be done via dt ... commit 919261c03e7cae9854f25812d4b529fbfbdb4c14 Author: Andrei.Stefanescu@microchip.com Date: Wed Dec 12 18:31:18 2018 +0000 regulator: mcp16502: add regulator driver for MCP16502 This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit fef9f28a2ea4eff1b203e3ad6629778be20b4714 Author: Andrei.Stefanescu@microchip.com Date: Wed Dec 12 18:31:11 2018 +0000 MAINTAINERS: add maintainer for MCP16502 PMIC driver This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit 96f3fb86d70fe64ba88a7f567bafe9c504b87d25 Author: Andrei.Stefanescu@microchip.com Date: Wed Dec 12 18:31:08 2018 +0000 regulator: dt-bindings: add MCP16502 regulator bindings This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 1b46ed96961db1a826b3e5cadac18c7c4857f054 Author: Jerome Brunet Date: Tue Dec 11 14:47:13 2018 +0100 MAINTAINERS: Add Amlogic sound drivers entry Add sound/soc/meson drivers entry for Amlogic audio drivers. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 5ce5658375e6de2468c4884f7ae474c4ed40a13f Author: Jerome Brunet Date: Tue Dec 11 14:47:12 2018 +0100 ASoC: meson: add axg spdif input Add support for the spdif input decoder of the axg SoC family Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 18dc4665fb6f3bb617c2e6d7da3f19586d06ab17 Author: Jerome Brunet Date: Tue Dec 11 14:47:11 2018 +0100 ASoC: meson: add axg spdif input DT binding documentation Add the DT binding documentation for axg's SPDIF input. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 984463a94d5cb23120bfe7d689077b940c25128b Author: Jerome Brunet Date: Tue Dec 11 14:47:10 2018 +0100 ASoC: meson: axg-toddr: add support for spdifin backend add IEC958_SUBFRAME_LE to the list of format accepted by the fifo frontend. As opposed to what was initially noted in the toddr dai driver, the spdifin does not place the msb at bit 28, it just output a whole spdif subframe. Placing the msb at bit 28 in the toddr driver just filters out the parity, user, channel status and validity bits. It is better to just provide the whole spdif subframe to the userspace and let the iec958 plugin deal with it. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown commit 62f82df488ce16f7068c7285820b2b7f7dcd7597 Author: Clark Wang Date: Fri Dec 7 02:50:41 2018 +0000 doc: lpspi: Document DT bindings for LPSPI slave mode Add introductions of interrupt-parent and spi-slave. Signed-off-by: Clark Wang Signed-off-by: Mark Brown commit cf86874bb9bdb99ba3620428b59b0408fbc703d0 Author: Clark Wang Date: Fri Dec 7 02:50:38 2018 +0000 spi: lpspi: Let watermark change with send data length Configure watermark to change with the length of the sent data. Support LPSPI sending message shorter than tx/rxfifosize. Signed-off-by: Clark Wang Signed-off-by: Mark Brown commit bcd87317aae26b9ac497cbc1232783aaea1aeed4 Author: Clark Wang Date: Fri Dec 7 02:50:36 2018 +0000 spi: lpspi: Add slave mode support Add slave mode support to the fsl-lpspi driver, only in PIO mode. For now, there are some limitations for slave mode transmission: 1. The stale data in RXFIFO will be dropped when the Slave does any new transfer. 2. One transfer can be finished only after all transfer->len data been transferred to master device 3. Slave device only accepts transfer->len data. Any data longer than this from master device will be dropped. Any data shorter than this from master will cause LPSPI to stuck due to mentioned limitation 2. 4. Only PIO transfer is supported in Slave Mode. Wire connection: GND, SCK, MISO(to MISO of slave), MOSI(to MOSI of slave), SCS Signed-off-by: Clark Wang Signed-off-by: Mark Brown commit 07d71557494c05b0651def1651bf6d7e7f47bbbb Author: Clark Wang Date: Fri Dec 7 02:50:34 2018 +0000 spi: lpspi: Replace all "master" with "controller" In order to enable the slave mode and make the code more readable, replace all related structure names and object names which is named "master" with "controller". Signed-off-by: Clark Wang Signed-off-by: Mark Brown commit eb896a69a0cf3afa69f0983470cc41f9cb04c017 Author: Song Liu Date: Wed Dec 12 09:37:47 2018 -0800 bpf: sync tools/include/uapi/linux/bpf.h Sync bpf.h for nr_prog_tags and prog_tags. Signed-off-by: Song Liu Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit c872bdb38febb4c31ece3599c52cf1f833b89f4e Author: Song Liu Date: Wed Dec 12 09:37:46 2018 -0800 bpf: include sub program tags in bpf_prog_info Changes v2 -> v3: 1. remove check for bpf_dump_raw_ok(). Changes v1 -> v2: 1. Fix error path as Martin suggested. This patch adds nr_prog_tags and prog_tags to bpf_prog_info. This is a reliable way for user space to get tags of all sub programs. Before this patch, user space need to find sub program tags via kallsyms. This feature will be used in BPF introspection, where user space queries information about BPF programs via sys_bpf. Signed-off-by: Song Liu Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 869858f84a65b646052eff1ec75c1f49e638b62b Author: Nathan Chancellor Date: Thu Dec 13 14:15:20 2018 +0900 ASoC: simple-card: Dereference pointer for memcpy sizeof in asoc_simple_card_probe Commit 4fb7f4df49d3 ("ASoC: simple-card: use cpu/codec pointer on simple_dai_props") updated {cpu,codec}_dai to be pointers in struct simple_dai_props but didn't update these locations to dereference the pointers. This patch fixup it for non DT simple-card use case. Signed-off-by: Nathan Chancellor Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 0ad379ffd654aa4348fdffa33aada4c9de76a22e Merge: 00842be52f201 177e77169b0b7 Author: Daniel Borkmann Date: Thu Dec 13 12:16:31 2018 +0100 Merge branch 'bpf-fix-kptr-checks' Martin KaFai Lau says: ==================== This patch set removes the bpf_dump_raw_ok() guard for the func_info and line_info during bpf_prog_get_info_by_fd(). ==================== Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 177e77169b0b71587c74382d5f2207a16da34790 Author: Martin KaFai Lau Date: Wed Dec 12 10:18:22 2018 -0800 bpf: Remove !func_info and !line_info check from test_btf and bpftool kernel can provide the func_info and line_info even it fails the btf_dump_raw_ok() test because they don't contain kernel address. This patch removes the corresponding '== 0' test. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 9e794163a69c103633fefb10a3879408d4e4e2c8 Author: Martin KaFai Lau Date: Wed Dec 12 10:18:21 2018 -0800 bpf: Remove bpf_dump_raw_ok() check for func_info and line_info The func_info and line_info have the bpf insn offset but they do not contain kernel address. They will still be useful for the userspace tool to annotate the xlated insn. This patch removes the bpf_dump_raw_ok() guard for the func_info and line_info during bpf_prog_get_info_by_fd(). The guard stays for jited_line_info which contains the kernel address. Although this bpf_dump_raw_ok() guard behavior has started since the earlier func_info patch series, I marked the Fixes tag to the latest line_info patch series which contains both func_info and line_info and this patch is fixing for both of them. Fixes: c454a46b5efd ("bpf: Add bpf_line_info support") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit f0b3f8418711d2e482bd57d6c0b5790947ca6863 Author: Fabio Estevam Date: Thu Dec 13 08:36:38 2018 -0200 ASoC: fsl-sai: Fix typo in "transmitter" Fix the spelling of "transmitter". Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown commit 00842be52f2015c3c1028e16b565f325f4ca20fc Merge: 8f9a8a6193119 907b22365115f Author: Daniel Borkmann Date: Thu Dec 13 12:08:45 2018 +0100 Merge branch 'bpf-bpftool-license-update' Jakub Kicinski says: ==================== We are changing/clarifying the license on bpftool to GPLv2-only + BSD-2-Clause for all files. Current license mix is incompatible with libbfd (which is GPLv3-only) and therefore Debian maintainers are apprehensive about packaging bpftool. Acks include authors of code which has been copied into bpftool (e.g. JSON writer from iproute2, code from tools/bpf, code from BPF samples and selftests, etc.) Thanks again to all the authors who acked the change! ==================== Acked-by: Roman Gushchin Acked-by: YueHaibing Acked-by: Yonghong Song Acked-by: Stanislav Fomichev Acked-by: Sean Young Acked-by: Jiri Benc Acked-by: David Calavera Acked-by: Andrey Ignatov Acked-by: Joe Stringer Acked-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Petar Penkov Acked-by: Sandipan Das Acked-by: Prashant Bhole Acked-by: Stephen Hemminger Acked-by: John Fastabend Acked-by: Taeung Song Acked-by: Jiri Olsa Acked-by: Daniel Borkmann CC: okash.khawaja@gmail.com Signed-off-by: Daniel Borkmann commit 907b22365115fb86196152909915108d7c8243d1 Author: Jakub Kicinski Date: Wed Dec 12 19:59:26 2018 -0800 tools: bpftool: dual license all files Currently bpftool contains a mix of GPL-only and GPL or BSD2 licensed files. Make sure all files are dual licensed under GPLv2 and BSD-2-Clause. Signed-off-by: Jakub Kicinski Acked-by: Roman Gushchin Acked-by: YueHaibing Acked-by: Yonghong Song Acked-by: Stanislav Fomichev Acked-by: Sean Young Acked-by: Jiri Benc Acked-by: David Calavera Acked-by: Andrey Ignatov Acked-by: Joe Stringer Acked-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Petar Penkov Acked-by: Sandipan Das Acked-by: Prashant Bhole Acked-by: Stephen Hemminger Acked-by: John Fastabend Acked-by: Taeung Song Acked-by: Jiri Olsa Acked-by: Daniel Borkmann CC: okash.khawaja@gmail.com Signed-off-by: Daniel Borkmann commit 02ff58dcf70ad7d11b01523dc404166ed11021da Author: Jakub Kicinski Date: Wed Dec 12 19:59:25 2018 -0800 tools: bpftool: replace Netronome boilerplate with SPDX license headers Replace the repeated license text with SDPX identifiers. Signed-off-by: Jakub Kicinski Acked-by: Roman Gushchin Acked-by: YueHaibing Acked-by: Yonghong Song Acked-by: Stanislav Fomichev Acked-by: Sean Young Acked-by: Jiri Benc Acked-by: David Calavera Acked-by: Andrey Ignatov Acked-by: Joe Stringer Acked-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Petar Penkov Acked-by: Sandipan Das Acked-by: Prashant Bhole Acked-by: Stephen Hemminger Acked-by: John Fastabend Acked-by: Taeung Song Acked-by: Jiri Olsa Acked-by: Daniel Borkmann CC: okash.khawaja@gmail.com Signed-off-by: Daniel Borkmann commit afc7c944ef828b431c564818f8cbc80f3e16f0d6 Author: Jakub Kicinski Date: Wed Dec 12 19:59:24 2018 -0800 tools: bpftool: fix SPDX format in headers Documentation/process/license-rules.rst sayeth: 2. Style: The SPDX license identifier is added in form of a comment. The comment style depends on the file type:: C source: // SPDX-License-Identifier: C header: /* SPDX-License-Identifier: */ Headers should use C comment style. Signed-off-by: Jakub Kicinski Acked-by: Roman Gushchin Acked-by: YueHaibing Acked-by: Yonghong Song Acked-by: Stanislav Fomichev Acked-by: Sean Young Acked-by: Jiri Benc Acked-by: David Calavera Acked-by: Andrey Ignatov Acked-by: Joe Stringer Acked-by: David Ahern Acked-by: Alexei Starovoitov Acked-by: Petar Penkov Acked-by: Sandipan Das Acked-by: Prashant Bhole Acked-by: Stephen Hemminger Acked-by: John Fastabend Acked-by: Taeung Song Acked-by: Jiri Olsa Acked-by: Daniel Borkmann CC: okash.khawaja@gmail.com Signed-off-by: Daniel Borkmann commit add6883619a9e3bf9658eaff1a547354131bbcd9 Author: Fabio Estevam Date: Thu Dec 13 00:08:38 2018 -0200 ASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M eukrea-tlv320.c machine driver runs on non-DT platforms and include header file in order to be able to use some machine_is_eukrea_xxx() macros. Building it for ARM64 causes the following build error: sound/soc/fsl/eukrea-tlv320.c:28:10: fatal error: asm/mach-types.h: No such file or directory Avoid this error by not allowing to build the SND_SOC_EUKREA_TLV320 driver when ARM64 is selected. This is needed in preparation for the i.MX8M support. Reported-by: kbuild test robot Signed-off-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: Mark Brown commit 00c9fe37a7f27a306bcaa5737f0787fe139f8aba Author: Eric Biggers Date: Mon Dec 10 11:45:58 2018 -0800 crypto: adiantum - fix leaking reference to hash algorithm crypto_alg_mod_lookup() takes a reference to the hash algorithm but crypto_init_shash_spawn() doesn't take ownership of it, hence the reference needs to be dropped in adiantum_create(). Fixes: 059c2a4d8e16 ("crypto: adiantum - add Adiantum support") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0ac6b8fb23c724b015d9ca70a89126e8d1563166 Author: Eric Biggers Date: Thu Dec 6 15:55:41 2018 -0800 crypto: user - support incremental algorithm dumps CRYPTO_MSG_GETALG in NLM_F_DUMP mode sometimes doesn't return all registered crypto algorithms, because it doesn't support incremental dumps. crypto_dump_report() only permits itself to be called once, yet the netlink subsystem allocates at most ~64 KiB for the skb being dumped to. Thus only the first recvmsg() returns data, and it may only include a subset of the crypto algorithms even if the user buffer passed to recvmsg() is large enough to hold all of them. Fix this by using one of the arguments in the netlink_callback structure to keep track of the current position in the algorithm list. Then userspace can do multiple recvmsg() on the socket after sending the dump request. This is the way netlink dumps work elsewhere in the kernel; it's unclear why this was different (probably just an oversight). Also fix an integer overflow when calculating the dump buffer size hint. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c6018e1a00b5c70610cdfb3650cc5622c917ed17 Author: Eric Biggers Date: Thu Dec 6 14:21:59 2018 -0800 crypto: adiantum - adjust some comments to match latest paper The 2018-11-28 revision of the Adiantum paper has revised some notation: - 'M' was replaced with 'L' (meaning "Left", for the left-hand part of the message) in the definition of Adiantum hashing, to avoid confusion with the full message - ε-almost-∆-universal is now abbreviated as ε-∆U instead of εA∆U - "block" is now used only to mean block cipher and Poly1305 blocks Also, Adiantum hashing was moved from the appendix to the main paper. To avoid confusion, update relevant comments in the code to match. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 282c14852d00d6d1b8fadf3e01e4180f02ddda84 Author: Eric Biggers Date: Thu Dec 6 13:00:08 2018 -0800 crypto: xchacha20 - fix comments for test vectors The kernel's ChaCha20 uses the RFC7539 convention of the nonce being 12 bytes rather than 8, so actually I only appended 12 random bytes (not 16) to its test vectors to form 24-byte nonces for the XChaCha20 test vectors. The other 4 bytes were just from zero-padding the stream position to 8 bytes. Fix the comments above the test vectors. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5569e8c07447344cdc3771378ba4e0da0b94c2a4 Author: Eric Biggers Date: Thu Dec 6 12:31:54 2018 -0800 crypto: xchacha - add test vector from XChaCha20 draft RFC There is a draft specification for XChaCha20 being worked on. Add the XChaCha20 test vector from the appendix so that we can be extra sure the kernel's implementation is compatible. I also recomputed the ciphertext with XChaCha12 and added it there too, to keep the tests for XChaCha20 and XChaCha12 in sync. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a033aed5a84eb93a32929b6862602cb283d39e82 Author: Eric Biggers Date: Tue Dec 4 22:20:05 2018 -0800 crypto: x86/chacha - yield the FPU occasionally To improve responsiveness, yield the FPU (temporarily re-enabling preemption) every 4 KiB encrypted/decrypted, rather than keeping preemption disabled during the entire encryption/decryption operation. Alternatively we could do this for every skcipher_walk step, but steps may be small in some cases, and yielding the FPU is expensive on x86. Suggested-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7a507d62258afd514583fadf1482451079fa0e4d Author: Eric Biggers Date: Tue Dec 4 22:20:04 2018 -0800 crypto: x86/chacha - add XChaCha12 support Now that the x86_64 SIMD implementations of ChaCha20 and XChaCha20 have been refactored to support varying the number of rounds, add support for XChaCha12. This is identical to XChaCha20 except for the number of rounds, which is 12 instead of 20. This can be used by Adiantum. Reviewed-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8b65f34c5821e7361488dc668d21195ea4c9f14d Author: Eric Biggers Date: Tue Dec 4 22:20:03 2018 -0800 crypto: x86/chacha20 - refactor to allow varying number of rounds In preparation for adding XChaCha12 support, rename/refactor the x86_64 SIMD implementations of ChaCha20 to support different numbers of rounds. Reviewed-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 4af78261870a7d36dd222af8dad9688b705e365e Author: Eric Biggers Date: Tue Dec 4 22:20:02 2018 -0800 crypto: x86/chacha20 - add XChaCha20 support Add an XChaCha20 implementation that is hooked up to the x86_64 SIMD implementations of ChaCha20. This can be used by Adiantum. An SSSE3 implementation of single-block HChaCha20 is also added so that XChaCha20 can use it rather than the generic implementation. This required refactoring the ChaCha permutation into its own function. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0f961f9f670e7c07690bfde2f533b93c653569cc Author: Eric Biggers Date: Tue Dec 4 22:20:01 2018 -0800 crypto: x86/nhpoly1305 - add AVX2 accelerated NHPoly1305 Add a 64-bit AVX2 implementation of NHPoly1305, an ε-almost-∆-universal hash function used in the Adiantum encryption mode. For now, only the NH portion is actually AVX2-accelerated; the Poly1305 part is less performance-critical so is just implemented in C. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 012c82388c032cd4a9821e11bae336cf4a014822 Author: Eric Biggers Date: Tue Dec 4 22:20:00 2018 -0800 crypto: x86/nhpoly1305 - add SSE2 accelerated NHPoly1305 Add a 64-bit SSE2 implementation of NHPoly1305, an ε-almost-∆-universal hash function used in the Adiantum encryption mode. For now, only the NH portion is actually SSE2-accelerated; the Poly1305 part is less performance-critical so is just implemented in C. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b299362ee48db8eab34208302ee9730ff9d6091c Author: Eric Biggers Date: Tue Dec 4 16:46:54 2018 -0800 crypto: adiantum - propagate CRYPTO_ALG_ASYNC flag to instance If the stream cipher implementation is asynchronous, then the Adiantum instance must be flagged as asynchronous as well. Otherwise someone asking for a synchronous algorithm can get an asynchronous algorithm. There are no asynchronous xchacha12 or xchacha20 implementations yet which makes this largely a theoretical issue, but it should be fixed. Fixes: 059c2a4d8e16 ("crypto: adiantum - add Adiantum support") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2fe55987b2624a86a5c709a8df65d4de2608dc07 Author: Ard Biesheuvel Date: Tue Dec 4 14:13:33 2018 +0100 crypto: arm64/chacha - use combined SIMD/ALU routine for more speed To some degree, most known AArch64 micro-architectures appear to be able to issue ALU instructions in parellel to SIMD instructions without affecting the SIMD throughput. This means we can use the ALU to process a fifth ChaCha block while the SIMD is processing four blocks in parallel. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f2ca1cbd0fb584b5b5e0dbd9bda819f49cf9cdb6 Author: Ard Biesheuvel Date: Tue Dec 4 14:13:32 2018 +0100 crypto: arm64/chacha - optimize for arbitrary length inputs Update the 4-way NEON ChaCha routine so it can handle input of any length >64 bytes in its entirety, rather than having to call into the 1-way routine and/or memcpy()s via temp buffers to handle the tail of a ChaCha invocation that is not a multiple of 256 bytes. On inputs that are a multiple of 256 bytes (and thus in tcrypt benchmarks), performance drops by around 1% on Cortex-A57, while performance for inputs drawn randomly from the range [64, 1024) increases by around 30%. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ee5bbc9fd3a1fb81e9f6103d6c52ab88926a9603 Author: Ard Biesheuvel Date: Tue Dec 4 14:13:31 2018 +0100 crypto: tcrypt - add block size of 1472 to skcipher template In order to have better coverage of algorithms operating on block sizes that are in the ballpark of a VPN packet, add 1472 to the block_sizes array. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit cf718eaa8f9b2cb8a372dcfd5ef701188e233558 Author: Srikanth, Jampala Date: Tue Dec 4 12:55:54 2018 +0000 crypto: cavium/nitrox - Enabled Mailbox support Enabled the PF->VF Mailbox support. Mailbox message are interpreted as {type, opcode, data}. Supported message types are REQ, ACK and NACK. Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 19c11c97c39f5c6280b4d523ea170ef9a8f7ed12 Author: Eric Biggers Date: Mon Dec 3 19:52:52 2018 -0800 crypto: arm64/chacha - add XChaCha12 support Now that the ARM64 NEON implementation of ChaCha20 and XChaCha20 has been refactored to support varying the number of rounds, add support for XChaCha12. This is identical to XChaCha20 except for the number of rounds, which is 12 instead of 20. This can be used by Adiantum. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 95a34b779e2a45b14e73cee1e7eec11870efb2ea Author: Eric Biggers Date: Mon Dec 3 19:52:51 2018 -0800 crypto: arm64/chacha20 - refactor to allow varying number of rounds In preparation for adding XChaCha12 support, rename/refactor the ARM64 NEON implementation of ChaCha20 to support different numbers of rounds. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cc7cf991e9eb54cac7733dc7d8f3a8591ba6e1c3 Author: Eric Biggers Date: Mon Dec 3 19:52:50 2018 -0800 crypto: arm64/chacha20 - add XChaCha20 support Add an XChaCha20 implementation that is hooked up to the ARM64 NEON implementation of ChaCha20. This can be used by Adiantum. A NEON implementation of single-block HChaCha20 is also added so that XChaCha20 can use it rather than the generic implementation. This required refactoring the ChaCha20 permutation into its own function. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a00fa0c88774bea9a102fc616598d9ee52765451 Author: Eric Biggers Date: Mon Dec 3 19:52:49 2018 -0800 crypto: arm64/nhpoly1305 - add NEON-accelerated NHPoly1305 Add an ARM64 NEON implementation of NHPoly1305, an ε-almost-∆-universal hash function used in the Adiantum encryption mode. For now, only the NH portion is actually NEON-accelerated; the Poly1305 part is less performance-critical so is just implemented in C. Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # big-endian Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ec10574d00da0d8b6ec9d0099410aae8aad4695a Merge: a7b1868a5f473 4868d2b662f55 Author: Martin Schwidefsky Date: Thu Dec 13 10:44:18 2018 +0100 Merge tag 'vfio-ccw-20181213' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw from Cornelia Huck with the following changes: - remove unneeded BOXED state - maintainership changes commit a7b1868a5f473fb93d912a618883cef0d43653b9 Author: Harald Freudenberger Date: Thu Nov 29 11:50:16 2018 +0100 s390/zcrypt: rework ap scan bus code Rework of the AP bus scan code. The ap_scan_bus() function is large, so this patch splits the code by introducing a new new function _ap_scan_bus_adapter() which deals with just one adapter and thus reduces the scan function code complexity. Now the AP bus scan can handle a type change of an crypto adapter on the fly (e.g. from CEX5 to CEX6). This may be the case with newer versions of zVM where the card may be pure virtual and a type change is just one click. However a type or function change requires to unregister all queue devices and the card device and re-register them. Comments around the AP bus scan code have been added and/or improved to provide some hopefully useful hints about what the code is actually doing. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 42a87d4103ae365e18c3be1333592ab583b8ad9d Author: Harald Freudenberger Date: Mon Nov 26 15:50:04 2018 +0100 s390/zcrypt: make sysfs reset attribute trigger queue reset Until now there is no way to reset a AP queue or card. Driving a card or queue offline and online again does only toggle the 'software' online state. The only way to trigger a (hardware) reset is by running hot-unplug/hot-plug for example on the HMC. This patch makes the queue reset attribute in sysfs writable. Writing into this attribute triggers a reset on the AP queue's state machine. So the AP queue is flushed and state machine runs through the initial states which cause a reset (PQAP(RAPQ)) and a re-registration to interrupts (PQAP(AQIC)) if available. The reset sysfs attribute is writable by root only. So only an administrator is allowed to initiate a reset of AP queues. Please note that the queue's counter values are left untouched by the reset. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 98dfd32620e970eb576ebce5ea39d905cb005e72 Author: Sebastian Ott Date: Thu Oct 18 11:11:08 2018 +0200 s390/pci: fix sleeping in atomic during hotplug When triggered by pci hotplug (PEC 0x306) clp_get_state is called with spinlocks held resulting in the following warning: zpci: n/a: Event 0x306 reconfigured PCI function 0x0 BUG: sleeping function called from invalid context at mm/page_alloc.c:4324 in_atomic(): 1, irqs_disabled(): 0, pid: 98, name: kmcheck 2 locks held by kmcheck/98: Change the allocation to use GFP_ATOMIC. Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 9594ca6b87d9f11e9f14ac31581e0e5d79a8e839 Author: Sebastian Ott Date: Tue Oct 30 14:04:46 2018 +0100 s390/pci: remove bit_lock usage in interrupt handler The interrupt handler uses bit_spin_lock around a call to retrieve per irq data (the irq number). However this per irq data is only set during irq setup time and never changed until the irq is freed. Thus it's safe to remove the lock usage. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit 87ccdcfa9c706be835fea226eda0b1ae9c671413 Author: Sebastian Ott Date: Mon Dec 3 13:19:12 2018 +0100 s390/drivers: fix proc/debugfs file permissions Remove write permissions for fops without a write callback. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit ca92b93d17f8c546d10ae175430fb22d6bd2d60b Author: Yangtao Li Date: Sat Dec 1 22:28:11 2018 -0500 s390: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky commit b0c4b9f35555f02d2d8a701cd336b432415b1a55 Author: Mesih Kilinc Date: Sun Dec 2 23:23:41 2018 +0300 irqchip/sun4i: Add support for Allwinner ARMv5 F1C100s This patch adds support for suniv Allwinner ARMv5 F1C100s SoC which has stripped version of interrupt controller that found in A10/A13. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Marc Zyngier commit d4fc2ea0f0f883539d91e5e38263e143bc249774 Author: Mesih Kilinc Date: Sun Dec 2 23:23:40 2018 +0300 irqchip/sun4i: Move IC specific register offsets to struct This patch moves IC specific register offsets to sun4i_irq_chip_data struct in order to support different chips. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Marc Zyngier commit 177304cf9286355a6f383f8340bf81fbe37ccd6c Author: Mesih Kilinc Date: Sun Dec 2 23:23:39 2018 +0300 irqchip/sun4i: Add a struct to hold global variables In order to support different chips, IC specific data should be hold in a struct. This patch moves irq_base and irq_domain global variables to struct. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Marc Zyngier commit a15b7439083c30030f6269c4c0ec70af57949109 Author: Mesih Kilinc Date: Sun Dec 2 23:23:38 2018 +0300 dt-bindings: interrupt-controller: Add suniv interrupt-controller Add compatible string for Alwinner suniv F1C100s SoC interrupt controller which is stripped version of sun4i Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier commit d852e62ad689a4be2e48c4a9c8926f53a7894942 Author: Manivannan Sadhasivam Date: Mon Dec 10 23:05:43 2018 +0530 irqchip: Add RDA8810PL interrupt driver Add interrupt driver for RDA Micro RDA8810PL SoC. Signed-off-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam Reviewed-by: Marc Zyngier Signed-off-by: Marc Zyngier commit cdf6179630a5aa877fba986e1c5dc91f2285eb08 Author: Manivannan Sadhasivam Date: Mon Dec 10 23:05:39 2018 +0530 dt-bindings: interrupt-controller: Document RDA8810PL intc Document interrupt controller in RDA Micro RDA8810PL SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier commit f9c75bca44d4754456cba7d3b4f0e15518177b0e Author: Yangtao Li Date: Fri Nov 23 11:54:18 2018 -0500 irqchhip: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: Yangtao Li Signed-off-by: Marc Zyngier commit ed01edc0ab6fec0ff675a6b16ccf7069bde98769 Author: Andrey Smirnov Date: Wed Dec 5 23:31:25 2018 -0800 irqchip/irq-imx-gpcv2: Add support for i.MX8MQ Add code needed to support i.MX8MQ. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier commit fb7348abb119e9ac497c95bec6615c6e56619c2e Author: Andrey Smirnov Date: Wed Dec 5 23:31:24 2018 -0800 irqchip/irq-imx-gpcv2: Make error messages more consistent Make error messages more consistent by making sure each starts with "%pOF:". Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier commit f2dace5f972576040477cc8a559254facebd3e10 Author: Andrey Smirnov Date: Wed Dec 5 23:31:23 2018 -0800 irqchip/irq-imx-gpcv2: Make use of BIT() macro Convert all instances of 1 << x to BIT(x) for consistency with other kernel code. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier commit bd654fb67acf737952e97822c8681dbcf4b6d462 Author: Andrey Smirnov Date: Wed Dec 5 23:31:22 2018 -0800 irqchip/irq-imx-gpcv2: Share reg offset calculation code Move identical offset calculation code into a small helper function and make use of it in the rest of the code. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier commit b87442b0745e9d54889caa8c9f28528cb8abac9d Author: Andrey Smirnov Date: Wed Dec 5 23:31:21 2018 -0800 irqchip/irq-imx-gpcv2: Remove unused code Varaible 'reg' in imx_gpcv2_irq_set_wake() has no users. Remove it. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier commit bf9732857ba58d4c3fdedcf793783030b4ad388f Author: Kuninori Morimoto Date: Wed Dec 5 08:25:00 2018 +0000 irqchip/irq-renesas-intc-irqpin: Convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier commit e25a96d708fde7ab66e96eb53a41ffeffa02dd49 Author: Kuninori Morimoto Date: Wed Dec 5 08:24:48 2018 +0000 irqchip/irq-renesas-irqc: Convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier commit 7728819c2190decbb871e08362d92c2409f9faa5 Author: Stefan Wahren Date: Sat Nov 10 16:54:23 2018 +0100 irqchip: bcm283x: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Simon Arlott Cc: Eric Anholt Signed-off-by: Stefan Wahren Signed-off-by: Marc Zyngier commit 06459901d55ee2f690b8e1fe084fb03061d617cf Author: Bartosz Golaszewski Date: Fri Nov 9 18:21:32 2018 +0100 irq/irq_sim: Store multiple interrupt offsets in a bitmap Two threads can try to fire the irq_sim with different offsets and will end up fighting for the irq_work asignment. Thomas Gleixner suggested a solution based on a bitfield where we set a bit for every offset associated with an interrupt that should be fired and then iterate over all set bits in the interrupt handler. This is a slightly modified solution using a bitmap so that we don't impose a limit on the number of interrupts one can allocate with irq_sim. Suggested-by: Thomas Gleixner Signed-off-by: Bartosz Golaszewski Signed-off-by: Marc Zyngier commit 81b1e6e6a8590a19257e37a1633bec098d499c57 Author: Miquel Raynal Date: Thu Oct 11 11:12:34 2018 +0200 platform-msi: Free descriptors in platform_msi_domain_free() Since the addition of platform MSI support, there were two helpers supposed to allocate/free IRQs for a device: platform_msi_domain_alloc_irqs() platform_msi_domain_free_irqs() In these helpers, IRQ descriptors are allocated in the "alloc" routine while they are freed in the "free" one. Later, two other helpers have been added to handle IRQ domains on top of MSI domains: platform_msi_domain_alloc() platform_msi_domain_free() Seen from the outside, the logic is pretty close with the former helpers and people used it with the same logic as before: a platform_msi_domain_alloc() call should be balanced with a platform_msi_domain_free() call. While this is probably what was intended to do, the platform_msi_domain_free() does not remove/free the IRQ descriptor(s) created/inserted in platform_msi_domain_alloc(). One effect of such situation is that removing a module that requested an IRQ will let one orphaned IRQ descriptor (with an allocated MSI entry) in the device descriptors list. Next time the module will be inserted back, one will observe that the allocation will happen twice in the MSI domain, one time for the remaining descriptor, one time for the new one. It also has the side effect to quickly overshoot the maximum number of allocated MSI and then prevent any module requesting an interrupt in the same domain to be inserted anymore. This situation has been met with loops of insertion/removal of the mvpp2.ko module (requesting 15 MSIs each time). Fixes: 552c494a7666 ("platform-msi: Allow creation of a MSI-based stacked irq domain") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Signed-off-by: Marc Zyngier commit 5b5bb7c77a87fd0f1b887dd3d44abf7d0fd579e7 Merge: 651022382c7f8 d0618247a80f0 Author: Stephen Boyd Date: Thu Dec 13 01:07:54 2018 -0800 Merge tag 'v4.21-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull rockchip clk driver updates from Heiko Stuebner: - register fixes for rk3188 and rk3328 - one new critical clock for rk3188 and a fixed clock id (double used number) - new clock id for rk3328 * tag 'v4.21-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: add clock-id to gate of ACODEC for rk3328 clk: rockchip: add clock ID of ACODEC for rk3328 clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328 clk: rockchip: fix I2S1 clock gate register for rk3328 clk: rockchip: make rk3188 hclk_vio_bus critical clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering clk: rockchip: fix rk3188 sclk_smc gate data clk: rockchip: fix typo in rk3188 spdif_frac parent commit 48cc8f7a1d5a4b1c5b32de5ad8a53b1c9194c6d5 Author: Christoph Hellwig Date: Wed Dec 12 17:09:58 2018 +0100 sparc: use DT node full_name in sparc_dma_alloc_resource The sparc tree already has this change for the pre-refactored code, but pulling it into the dma-mapping tree like this should ease the merge conflicts a bit. Signed-off-by: Christoph Hellwig Acked-by: Sam Ravnborg Acked-by: David Miller commit e74581b79ddd9b49b8c61e2791fc4dffc0245afb Merge: 8913e8a73d034 f03566d0aa79f Author: Stephen Boyd Date: Thu Dec 13 01:05:44 2018 -0800 Merge tag 'meson-clk-4.21-2' of https://github.com/BayLibre/clk-meson into clk-meson Pull more meson clk driver updates from Neil Armstrong: - Fix GXL HDMI Pll fractional bits (from first round) - Add the Meson8/Meson8b video clocks - Add clk-input helper and use it for axg-audio clock driver * tag 'meson-clk-4.21-2' of https://github.com/BayLibre/clk-meson: clk: meson: axg-audio: use the clk input helper function clk: meson: add clk-input helper function clk: meson: meson8b: add the read-only video clock trees clk: meson: meson8b: add the fractional divider for vid_pll_dco clk: meson: meson8b: fix the offset of vid_pll_dco's N value clk: meson: Fix GXL HDMI PLL fractional bits width commit b65bb777ef2237030f2802f2263ae9a0108f7acf Author: Sagi Grimberg Date: Tue Dec 11 23:38:58 2018 -0800 nvme-rdma: support separate queue maps for read and write llow NVMF_OPT_NR_WRITE_QUEUES to describe additional write queues. In addition, implement .map_queues that will apply 2 queue maps for read and write queue sets. Note that with the separate queue map, HCTX_TYPE_READ will always use nr_io_queues and HCTX_TYPE_DEFAULT will use nr_write_queues. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 873946f4b957bf6e6a0351dd5282c73e0c870be9 Author: Sagi Grimberg Date: Tue Dec 11 23:38:57 2018 -0800 nvme-tcp: support separate queue maps for read and write Allow NVMF_OPT_NR_WRITE_QUEUES to describe additional write queues. In addition, implement .map_queues that will apply 2 queue maps for read and write queue sets. Note that with the separate queue map, HCTX_TYPE_READ will always use nr_io_queues and HCTX_TYPE_DEFAULT will use nr_write_queues. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 330f6b8a70771f0b059b7bcbc9a28d8023235b55 Author: Sagi Grimberg Date: Tue Dec 11 23:38:56 2018 -0800 nvme-fabrics: allow user to set nr_write_queues for separate queue maps This argument will specify how many I/O queues will be connected in create_ctrl in addition to nr_io_queues. With this configuration, I/O that carries payload from the host to the target, will use the default hctx queue map, and I/O that involves target to host transfers will use the read hctx queue map. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit fa9a1811e094658e53b0c82b6ce0431c4c54fc1b Author: Sagi Grimberg Date: Tue Dec 11 23:38:55 2018 -0800 nvme-fabrics: add missing nvmf_ctrl_options documentation Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e42b3867de4bd5ee3a1849afb68a1fa8627f7282 Author: Sagi Grimberg Date: Tue Dec 11 23:38:54 2018 -0800 blk-mq-rdma: pass in queue map to blk_mq_rdma_map_queues Will be used by nvme-rdma for queue map separation support. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 23454d59cc16ddddf4b2290bbe60d2d9581dfd9a Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:48 2018 -0800 nvmet: update smart log with num err log entries Now that we have error log page implementation update smart log command handler to provide number of error log entries in the lifetime of the controller field. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 11ad507784ed5113af97903af1b0c4aea6b90690 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:47 2018 -0800 nvmet: add error log page cmd handler Now that we have support for all the major parts of the target we add a NVMe error log page handler so that host can read the log page. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit c6aa3542e01026a94d24713ee2c0dce517e9b6de Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:43 2018 -0800 nvmet: add error log support for file backend This patch adds support for the file backend to populate the error log entries. Here we map the errno to the NVMe status codes. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3b031d15995f3e4c43e38159072f07efe3fa35d9 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:42 2018 -0800 nvmet: add error log support for bdev backend This patch adds the support for the block device backend to populate the error log entries. Here we map the blk_status_t to the NVMe status. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 2da6e00580f5bc13ed0ba0acaa9d7ce0df226e7e Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:46 2018 -0800 nvmet: add error log support for admin-cmd This patch adds the support to maintain the error log page for admin commands. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 762a11dfee10783a2fe4c467a68bac601e5acf1c Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:45 2018 -0800 nvmet: add error log support for rdma backend This patch adds the support to maintain the error log page for rdma transport, we mainly focus here on the NVME_INVALID_FIELD errors. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 84faf42b8aff3be95d96249da4152c77d81e1469 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:44 2018 -0800 nvmet: add error log support for fabrics-cmd This patch adds the support to maintain error log page for the fabrics prop get, prop set, and admin connect commands. Here we also update the discovery.c and add update set/get features and parse functions to support error log page. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e81446afc7f5ee45fd90b1b5a22ffa247dca5b15 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:41 2018 -0800 nvmet: add error log support in the core This patch adds the support to maintain error log page for the nvmet-core. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 76574f37bf4caa7150ea1559cd98e3017b9752d2 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:40 2018 -0800 nvmet: add interface to update error-log page This patch adds nvmet_req based interface to the nvmet-core so that we can update the error log page. We update error log page in the request completion path when status is not set to NVME_SC_SUCCESS. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e4a976254ec5ebdcdb3e1e1b40e795b3db6b6dab Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:39 2018 -0800 nvmet: add error-log definitions This patch adds necessary fields in the target data structures to support error log page. For a target controller, we add a new error log field to maintain the error log, at any given point we maintain error entries equal to NVMET_ERROR_LOG_SLOTS for each controller. In the following patch, we also update the error log page entry in the I/O completion path so we introduce a spinlock for synchronization of the log. For nvmet_req, we add a new field error_loc to hold the location of the error in the command when the actual error occurs for each request and a starting LBA if applicable. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit b34de7cee0a65f2557bb05447fbe2cc7a9c46750 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:38 2018 -0800 nvme: add error log page slot definition This patch adds the NVMe error slot definition from the spec. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit b7c8f3663d0e0773aca3324c26bce3ca8343ec14 Author: Chaitanya Kulkarni Date: Wed Dec 12 15:11:37 2018 -0800 nvme: remove nvme_common command cdw10 array This is a preparation patch which removes the nvme common command cdw10 array and replace with individual fields. This is needed for the nvmet error log page implementation make is error log page entry offset assignment easier. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 16d3a280d4d73eae786ebf2576cd597a031bc9df Author: Sagi Grimberg Date: Wed Dec 12 23:01:54 2018 -0800 nvmet: remove unused variable Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit cb5b7262b011cfb793519bf97e54dff5282da23c Author: Jens Axboe Date: Wed Dec 12 09:18:11 2018 -0700 nvme: provide fallback for discard alloc failure When boxes are run near (or to) OOM, we have a problem with the discard page allocation in nvme. If we fail allocating the special page, we return busy, and it'll get retried. But since ordering is honored for dispatch requests, we can keep retrying this same IO and failing. Behind that IO could be requests that want to free memory, but they never get the chance. Allocate a fixed discard page per controller for a safe fallback, and use that if the initial allocation fails. Signed-off-by: Jens Axboe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 8eb5d89f483141dd076529bf5f6aa235b425886e Author: Chengguang Xu Date: Tue Dec 11 07:24:34 2018 +0800 nvme: add __exit annotation Add __exit annotation to cleanup helper which is only called once in the module. Signed-off-by: Chengguang Xu Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3f2304f8c6d6ed97849057bd16fee99e434ca796 Author: Sagi Grimberg Date: Mon Dec 3 17:52:17 2018 -0800 nvme-tcp: add NVMe over TCP host driver This patch implements the NVMe over TCP host driver. It can be used to connect to remote NVMe over Fabrics subsystems over good old TCP/IP. The driver implements the TP 8000 of how nvme over fabrics capsules and data are encapsulated in nvme-tcp pdus and exchaged on top of a TCP byte stream. nvme-tcp header and data digest are supported as well. To connect to all NVMe over Fabrics controllers reachable on a given taget port over TCP use the following command: nvme connect-all -t tcp -a $IPADDR This requires the latest version of nvme-cli with TCP support. Signed-off-by: Sagi Grimberg Signed-off-by: Roy Shterman Signed-off-by: Solganik Alexander Signed-off-by: Christoph Hellwig commit ad4f530e95a7b88a332035b9e0c5384441356576 Author: Sagi Grimberg Date: Mon Dec 3 17:52:16 2018 -0800 nvmet: allow configfs tcp trtype configuration Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 872d26a391da92ed8f0c0f5cb5fef428067b7f30 Author: Sagi Grimberg Date: Mon Dec 3 17:52:15 2018 -0800 nvmet-tcp: add NVMe over TCP target driver This patch implements the TCP transport driver for the NVMe over Fabrics target stack. This allows exporting NVMe over Fabrics functionality over good old TCP/IP. The driver implements the TP 8000 of how nvme over fabrics capsules and data are encapsulated in nvme-tcp pdus and exchaged on top of a TCP byte stream. nvme-tcp header and data digest are supported as well. Signed-off-by: Sagi Grimberg Signed-off-by: Roy Shterman Signed-off-by: Solganik Alexander Signed-off-by: Christoph Hellwig commit fc221d05447aa6db686a6724dd08aa6cce0924d1 Author: Sagi Grimberg Date: Mon Dec 3 17:52:14 2018 -0800 nvme-tcp: Add protocol header Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 20d44e86321299f61bb782a39aaa30f579823f58 Author: Sagi Grimberg Date: Mon Dec 3 17:52:13 2018 -0800 nvme-fabrics: allow user passing data digest Data digest is a nvme-tcp specific feature, but nothing prevents other transports reusing the concept so do not associate with tcp transport solely. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3b49fa807284ec30669a95fd5f3806e127d29f4d Author: Sagi Grimberg Date: Mon Dec 3 17:52:12 2018 -0800 nvme-fabrics: allow user passing header digest Header digest is a nvme-tcp specific feature, but nothing prevents other transports reusing the concept so do not associate with tcp transport solely. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 1672ddb8d691e4433806373ec4104f37a86efab0 Author: Sagi Grimberg Date: Mon Dec 3 17:52:11 2018 -0800 nvmet: Add install_queue callout nvmet-tcp will implement it to allocate queue commands which are only known at nvmf connect time (sq size). Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 65d69e2505bb64f6a8d7f417f6e46e2a351174c6 Author: Sagi Grimberg Date: Mon Dec 3 17:52:10 2018 -0800 datagram: introduce skb_copy_and_hash_datagram_iter helper Introduce a helper to copy datagram into an iovec iterator but also update a predefined hash. This is useful for consumers of skb_copy_datagram_iter to also support inflight data digest without having to finish to copy and only then traverse the iovec and calculate the digest hash. Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit d05f443554b3c7dc6d46e3ba9c3c4de468875d4f Author: Sagi Grimberg Date: Mon Dec 3 17:52:09 2018 -0800 iov_iter: introduce hash_and_copy_to_iter helper Allow consumers that want to use iov iterator helpers and also update a predefined hash calculation online when copying data. This is useful when copying incoming network buffers to a local iterator and calculate a digest on the incoming stream. nvme-tcp host driver that will be introduced in following patches is the first consumer via skb_copy_and_hash_datagram_iter. Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 950fcaecd5cc6c014bb96506fd0652a501c85276 Author: Sagi Grimberg Date: Mon Dec 3 17:52:08 2018 -0800 datagram: consolidate datagram copy to iter helpers skb_copy_datagram_iter and skb_copy_and_csum_datagram are essentialy the same but with a couple of differences: The first is the copy operation used which either a simple copy or a csum_and_copy, and the second are the behavior on the "short copy" path where simply copy needs to return the number of bytes successfully copied while csum_and_copy needs to fault immediately as the checksum is partial. Introduce __skb_datagram_iter that additionally accepts: 1. copy operation function pointer 2. private data that goes with the copy operation 3. fault_short flag to indicate the action on short copy Suggested-by: David S. Miller Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit cb002d074dabfaa2248507fd9478d16a542e4f1e Author: Sagi Grimberg Date: Mon Dec 3 17:52:07 2018 -0800 iov_iter: pass void csum pointer to csum_and_copy_to_iter The single caller to csum_and_copy_to_iter is skb_copy_and_csum_datagram and we are trying to unite its logic with skb_copy_datagram_iter by passing a callback to the copy function that we want to apply. Thus, we need to make the checksum pointer private to the function. Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 0fc07791bc775478d9450ca9c6c674b45f6c1998 Author: Sagi Grimberg Date: Mon Dec 3 17:52:06 2018 -0800 datagram: open-code copy_page_to_iter This will be useful to consolidate skb_copy_and_hash_datagram_iter and skb_copy_and_csum_datagram to a single code path. Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3152a974678a1e80c3c16d4b86522ecc500be529 Author: Sagi Grimberg Date: Mon Dec 3 17:52:05 2018 -0800 ath6kl: add ath6kl_ prefix to crypto_type Prevent a namespace conflict as in following patches as skbuff.h will include the crypto API. Acked-by: David S. Miller Cc: Kalle Valo Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 576d28812d82e94e2836632ff7e2d093099a1139 Merge: 94ffb030b6d31 e2744fd7097dd Author: Takashi Iwai Date: Thu Dec 13 09:26:19 2018 +0100 Merge branch 'topic/huawei-leds' into for-next Pull Huawei LEDS and hotkey support. Signed-off-by: Takashi Iwai commit e2744fd7097dd06b751b15395256ec7b7bb62124 Author: Ayman Bagabas Date: Wed Dec 12 18:07:59 2018 -0500 ALSA: hda: add support for Huawei WMI micmute LED Some of Huawei laptops come with a LED in the micmute key. This patch enables the use of micmute LED for these devices: 1. Matebook X (19e5:3200), (19e5:3201) 2. Matebook X Pro (19e5:3204) Reviewed-by: Andy Shevchenko Reviewed-by: Takashi Iwai Signed-off-by: Ayman Bagabas Signed-off-by: Takashi Iwai commit bf4fb28c6e74495de9e1e4ad359cd2272ac12c53 Author: Ayman Bagabas Date: Wed Dec 12 18:07:58 2018 -0500 platform/x86: add support for Huawei WMI hotkeys This driver adds support for missing hotkeys on some Huawei laptops. Laptops such as the Matebook X have non functioning hotkeys. Whereas newer laptops such as the Matebook X Pro come with working hotkeys out of the box. Old laptops, such as the Matebook X, report hotkey events through ACPI device "\WMI0". However, new laptops, such as the Matebook X Pro, does not have this WMI device. All the hotkeys on the Matebook X Pro work fine without this patch except (micmute, wlan, and huawei key). These keys and the brightness keys report events to "\AMW0" ACPI device. One problem is that brightness keys on the Matebook X Pro work without this patch. This results in reporting two brightness key press events one is captured by ACPI and another by this driver. A solution would be to check if such event came from the "\AMW0" WMI driver then skip reporting event. Another solution would be to leave this to user-space to handle. Which can be achieved by using "hwdb" tables and remap those keys to "unknown". This solution seems more natural to me because it leaves the decision to user-space. Acked-by: Andy Shevchenko Reviewed-by: Takashi Iwai Signed-off-by: Ayman Bagabas Signed-off-by: Takashi Iwai commit 8ac51bbc4cfec4ef08b03bef24b31e2d50ef8b37 Author: Ayman Bagabas Date: Wed Dec 12 18:07:57 2018 -0500 ALSA: hda: fix front speakers on Huawei MBXP This patch solves bug 200501 'Only 2 of 4 speakers playing sound.' It enables the front speakers on Huawei Matebook X Pro laptops. These laptops come with Dolby Atmos sound system and these pins configuration enables the front speakers. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200501 Reviewed-by: Andy Shevchenko Reviewed-by: Takashi Iwai Signed-off-by: Ayman Bagabas Signed-off-by: Takashi Iwai commit 94ffb030b6d31ec840bb811be455dd2e26a4f43e Author: Gustavo A. R. Silva Date: Wed Dec 12 15:36:28 2018 -0600 ALSA: pcm: Fix potential Spectre v1 vulnerability stream is indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: sound/core/pcm.c:140 snd_pcm_control_ioctl() warn: potential spectre issue 'pcm->streams' [r] (local cap) Fix this by sanitizing stream before using it to index pcm->streams Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai commit 4aea96f4237cea0c51a8bc87c0db31f0f932f1f0 Author: Gustavo A. R. Silva Date: Wed Dec 12 11:20:49 2018 -0600 ALSA: emux: Fix potential Spectre v1 vulnerabilities info.mode and info.port are indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. These issues were detected with the help of Smatch: sound/synth/emux/emux_hwdep.c:72 snd_emux_hwdep_misc_mode() warn: potential spectre issue 'emu->portptrs[i]->ctrls' [w] (local cap) sound/synth/emux/emux_hwdep.c:75 snd_emux_hwdep_misc_mode() warn: potential spectre issue 'emu->portptrs' [w] (local cap) sound/synth/emux/emux_hwdep.c:75 snd_emux_hwdep_misc_mode() warn: potential spectre issue 'emu->portptrs[info.port]->ctrls' [w] (local cap) Fix this by sanitizing both info.mode and info.port before using them to index emu->portptrs[i]->ctrls, emu->portptrs[info.port]->ctrls and emu->portptrs. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai commit c7072f5f2aa1124d57042d1d7f17521532657dc6 Merge: a91f676074c05 46594d3345f04 Author: Takashi Iwai Date: Thu Dec 13 09:10:09 2018 +0100 Merge branch 'topic/hda-pm-refactor' into for-next Pull refactoring / fixes of HD-audio PM and display power management Signed-off-by: Takashi Iwai commit 95302c394c3de19bdf24fff5e44a2bf935eadf74 Merge: 43d4b2971810e 5c7e8bbb02572 Author: David S. Miller Date: Wed Dec 12 22:22:53 2018 -0800 Merge tag 'mlx5e-updates-2018-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-12-11 From Eli Britstein, Patches 1-10 adds remote mirroring support. Patches 1-4 refactor encap related code as pre-steps for using per destination encapsulation properties. Patches 5-7 use extended destination feature for single/multi destination scenarios that have a single encap destination. Patches 8-10 enable multiple encap destinations for a TC flow. From, Daniel Jurgens, Patch 11, Use CQE padding for Ethernet CQs, PPC showed up to a 24% improvement in small packet throughput From Eyal Davidovich, patches 12-14, FW monitor counter support FW monitor counters feature came to solve the delayed reporting of FW stats in the atomic get_stats64 ndo, since we can't access the FW at that stage, this feature will enable immediate FW stats updates in the driver via fw events on specific stats updates. Patch 12, cleanup to avoid querying a FW counter when it is not supported Patch 13, Monitor counters FW commands support Patch 14, Use monitor counters in ethernet netdevice to update FW stats reported in the atomic get_stats64 ndo. ==================== Signed-off-by: David S. Miller commit 43d4b2971810edded68098b996e917ed768d3dbb Author: Biao Huang Date: Thu Dec 13 10:41:37 2018 +0800 net-next: stmmac: dwmac-mediatek: add module license info Add MODULE_LICENSE info to fix this: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.o Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit c784a28b025a22f8c791e14096fb7079236739c0 Author: YueHaibing Date: Wed Dec 12 08:33:53 2018 +0000 net/mlx5e: Remove set but not used variable 'upriv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_load': drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1490:21: warning: variable 'upriv' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_unload': drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1557:21: warning: variable 'upriv' set but not used [-Wunused-but-set-variable] It not used any more since commit ef381359e3a8 ("net/mlx5e: Replace egdev with indirect block notifications"). Also remove unused variable 'uplink_rpriv' after this change. Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit eed9de3b4f47114f440980203ca27c5fab70f529 Author: Nikolay Borisov Date: Tue Dec 11 10:31:40 2018 +0200 ima: Use inode_is_open_for_write Use the aptly named function rather than open coding the check. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: Mimi Zohar commit d7cecb676dd364b28a5a8f5e4a30ce2e9cfdfcc3 Author: Nayna Jain Date: Sun Dec 9 01:57:05 2018 +0530 ima: Support platform keyring for kernel appraisal On secure boot enabled systems, the bootloader verifies the kernel image and possibly the initramfs signatures based on a set of keys. A soft reboot(kexec) of the system, with the same kernel image and initramfs, requires access to the original keys to verify the signatures. This patch allows IMA-appraisal access to those original keys, now loaded on the platform keyring, needed for verifying the kernel image and initramfs signatures. [zohar@linux.ibm.com: only use platform keyring if it's enabled (Thiago)] Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge Hallyn Reviewed-by: James Morris Reviewed-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar commit 386b49f51dc24d1f9139eb11f49aa075eeb35363 Author: Josh Boyer Date: Sun Dec 9 01:57:04 2018 +0530 efi: Allow the "db" UEFI variable to be suppressed If a user tells shim to not use the certs/hashes in the UEFI db variable for verification purposes, shim will set a UEFI variable called MokIgnoreDB. Have the uefi import code look for this and ignore the db variable if it is found. [zohar@linux.ibm.com: removed reference to "secondary" keyring comment] Signed-off-by: Josh Boyer Signed-off-by: David Howells Acked-by: Nayna Jain Acked-by: Serge Hallyn Reviewed-by: James Morris Signed-off-by: Mimi Zohar commit 15ea0e1e3e185040bed6119f815096f2e4326242 Author: Josh Boyer Date: Thu Dec 13 01:37:56 2018 +0530 efi: Import certificates from UEFI Secure Boot Secure Boot stores a list of allowed certificates in the 'db' variable. This patch imports those certificates into the platform keyring. The shim UEFI bootloader has a similar certificate list stored in the 'MokListRT' variable. We import those as well. Secure Boot also maintains a list of disallowed certificates in the 'dbx' variable. We load those certificates into the system blacklist keyring and forbid any kernel signed with those from loading. [zohar@linux.ibm.com: dropped Josh's original patch description] Signed-off-by: Josh Boyer Signed-off-by: David Howells Signed-off-by: Nayna Jain Acked-by: Serge Hallyn Signed-off-by: Mimi Zohar commit 0bc9ae395b3f3b6557f0c5f0a0b0cd2fd5c00a04 Author: Dave Howells Date: Sun Dec 9 01:57:02 2018 +0530 efi: Add an EFI signature blob parser Add a function to parse an EFI signature blob looking for elements of interest. A list is made up of a series of sublists, where all the elements in a sublist are of the same type, but sublists can be of different types. For each sublist encountered, the function pointed to by the get_handler_for_guid argument is called with the type specifier GUID and returns either a pointer to a function to handle elements of that type or NULL if the type is not of interest. If the sublist is of interest, each element is passed to the handler function in turn. Signed-off-by: David Howells Signed-off-by: Nayna Jain Acked-by: Serge Hallyn Signed-off-by: Mimi Zohar commit 5c126ba22f894427cc770240faa1bf6b02ce7aca Author: Dave Howells Date: Sun Dec 9 01:57:01 2018 +0530 efi: Add EFI signature data types Add the data types that are used for containing hashes, keys and certificates for cryptographic verification along with their corresponding type GUIDs. Signed-off-by: David Howells Acked-by: Nayna Jain Acked-by: Serge Hallyn Reviewed-by: James Morris Signed-off-by: Mimi Zohar commit 60740accf78494e166ec76bdc39b7d75fc2fe1c7 Author: Nayna Jain Date: Sun Dec 9 01:57:00 2018 +0530 integrity: Load certs to the platform keyring The patch refactors integrity_load_x509(), making it a wrapper for a new function named integrity_add_key(). This patch also defines a new function named integrity_load_cert() for loading the platform keys. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge Hallyn Reviewed-by: James Morris Reviewed-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar commit 9dc92c45177ab70e20ae94baa2f2e558da63a9c7 Author: Nayna Jain Date: Sun Dec 9 01:56:59 2018 +0530 integrity: Define a trusted platform keyring On secure boot enabled systems, a verified kernel may need to kexec additional kernels. For example, it may be used as a bootloader needing to kexec a target kernel or it may need to kexec a crashdump kernel. In such cases, it may want to verify the signature of the next kernel image. It is further possible that the kernel image is signed with third party keys which are stored as platform or firmware keys in the 'db' variable. The kernel, however, can not directly verify these platform keys, and an administrator may therefore not want to trust them for arbitrary usage. In order to differentiate platform keys from other keys and provide the necessary separation of trust, the kernel needs an additional keyring to store platform keys. This patch creates the new keyring called ".platform" to isolate keys provided by platform from keys by kernel. These keys are used to facilitate signature verification during kexec. Since the scope of this keyring is only the platform/firmware keys, it cannot be updated from userspace. This keyring can be enabled by setting CONFIG_INTEGRITY_PLATFORM_KEYRING. Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Acked-by: Serge Hallyn Reviewed-by: James Morris Reviewed-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar commit 6c8d5f051251f64af9026a9a763bb96a0f4a8d6f Author: YueHaibing Date: Tue Nov 13 01:26:17 2018 +0000 scsi: ufs: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit ed4c1136ac2a0dd8ca3ec37de2658eadb9d83c43 Author: Suganath Prabu Date: Fri Dec 7 12:58:35 2018 +0530 scsi: mpt3sas: Update driver version to 27.101.00.00 Update driver version from 27.100.00.00 to 27.101.00.00. Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 306eaf276b02aa0852b7efdff6552a3dbfdbb943 Author: Suganath Prabu Date: Fri Dec 7 12:58:34 2018 +0530 scsi: mpt3sas: Replace readl with ioc->base_readl Use ioc->base_readl to restrict the readl retries to only Aero controllers. Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit b899202901a8add28adc73a1ae077217fa341dfe Author: Suganath Prabu Date: Fri Dec 7 12:58:33 2018 +0530 scsi: mpt3sas: Add separate function for aero doorbell reads Sometimes Aero controllers appears to be returning bad data (0) for doorbell register read and if retries are performed immediately after the bad read, they return good data. Workaround is added to retry read from doorbell registers for maximum three times if driver get the zero. Added functions base_readl_aero for Aero IOC and base_readl for gen35 and other controllers. Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit cc68e6077bbf09de3e792716a1d38588bdb7a785 Author: Suganath Prabu Date: Fri Dec 7 12:58:32 2018 +0530 scsi: mpt3sas: Introduce flag for aero based controllers Adding flag "is_aero_ioc" to differentiate aero based controllers from other gen35 controllers. Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 6db831f4ef764ca19d7300d56ab9455af3cb930d Author: Xiang Chen Date: Thu Dec 6 21:34:42 2018 +0800 scsi: hisi_sas: Make sg_tablesize consistent value Sht->sg_tablesize is set in the driver, and it will be assigned to shost->sg_tablesize in SCSI mid-layer. So it is not necessary to assign shost->sg_table one more time in the driver. In addition to the change, change each scsi_host_template.sg_tablesize to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 6e1b731b535231e199c7810451c851398afccd33 Author: Xiang Chen Date: Thu Dec 6 21:34:41 2018 +0800 scsi: hisi_sas: Relocate some code to reduce complexity Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to reduce complexity, with a view to add DIF/DIX support. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 735bcc77e6ba83e464665cea9041072190ede37e Author: John Garry Date: Thu Dec 6 21:34:40 2018 +0800 scsi: hisi_sas: Fix warnings detected by sparse This patchset fixes some warnings detected by the sparse tool, like these: drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: warning: incorrect type in assignment (different base types) drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: warning: incorrect type in assignment (different base types) drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: got restricted __le16 [usertype] Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit d9678adbe733a770428a98651beaa2817d503ed3 Author: Marc Gonzalez Date: Fri Nov 9 02:07:07 2018 +0100 arm64: defconfig: Enable FSL_MC_BUS and FSL_MC_DPIO Commit e8342cc7954e ("enable CAAM crypto engine on QorIQ DPAA2 SoCs") enabled CRYPTO_DEV_FSL_DPAA2_CAAM, which depends on FSL_MC_DPIO, which is not set. Enable FSL_MC_BUS, and build FSL_MC_DPIO and CRYPTO_DEV_FSL_DPAA2_CAAM as modules. Signed-off-by: Marc Gonzalez [olof: refreshed due to churn] Signed-off-by: Olof Johansson commit 3cf9e6d0095479dee5748c441da876995c97354f Author: Marc Gonzalez Date: Fri Nov 9 02:03:20 2018 +0100 arm64: defconfig: Replace PINCTRL_MT7622 with PINCTRL_MTK_MOORE Commit e78d57b2f87c ("pinctrl: mediatek: add pinctrl-moore that implements the generic pinctrl dt-bindings") made PINCTRL_MT7622 depend on PINCTRL_MTK_MOORE, so it fell off in the refresh. Add MTK_MOORE, which automatically enables MT7622. Signed-off-by: Marc Gonzalez [olof: refresh and minor commit message reword] Signed-off-by: Olof Johansson commit 1f4fa50dd48f8467188b48328164ac9ca7eae254 Author: Marc Gonzalez Date: Fri Nov 9 01:56:44 2018 +0100 arm64: defconfig: Regenerate for v4.20 Run the platform defconfig through kbuild, and handle the trivial case where options merely move around. Signed-off-by: Marc Gonzalez [olof: refreshed due to some recent churn] Signed-off-by: Olof Johansson Signed-off-by: Olof Johansson commit b125eb0bf4699e1645f71bed72674a2634874bc0 Merge: a323a513c7128 8b3e6f8999f8d Author: Olof Johansson Date: Wed Dec 12 17:50:39 2018 -0800 Merge tag 'amlogic-dt64-2-redo' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt arm64: dts: Amlogic updates for v4.21, round2 Highlights: - fix IRQ trigger type - AXG: enable GPIO IRQs, PHY IRQ, watchdog * tag 'amlogic-dt64-2-redo' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: Fix IRQ trigger type for macirq arm64: dts: meson-axg: Enable GPIO interrupt controller arm64: dts: meson-axg: s400: Enable PHY interrupt arm64: dts: meson: add clock controller clock inputs dt-bindings: clk: meson: add main controller clock input dt-bindings: clk: meson: add ao controller clock inputs arm64: dts: meson-axg: remove alternate xtal arm64: dts: meson-axg: Enable watchdog on Meson AXG SoCs Signed-off-by: Olof Johansson commit b8222335938a9c6425b9f14e61c3ca67c8189dfc Author: Tony Lindgren Date: Wed Dec 12 15:46:16 2018 -0800 ARM: dts: Fix wrong address for omap5 sata phy Looks like I missed converting the omap5 sata phy addresses to use offset from the module base instead of full physical address. While at it, we can also more it to be a direct child of the interconnect target module, it is not really a child of the ocp2scp control device. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 86d540ff3319e3f60a48a83bd8a770fce7fe66b5 Author: Himanshu Madhani Date: Mon Dec 10 12:36:25 2018 -0800 scsi: qla2xxx: Update driver version to 10.00.00.12-k Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 835aa4f2691e4ed4ed16de81f3cabf17a87a164f Author: Giridhar Malavali Date: Mon Dec 10 12:36:24 2018 -0800 scsi: qla2xxx: Fix for FC-NVMe discovery for NPIV port This patch fixes NVMe discovery by setting SKIP_PRLI flag, so that PRLI is driven by driver and is retried when the NPIV port is detected to have NVMe capability. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5e6803b409ba3c18434de6693062d98a470bcb1e Author: Himanshu Madhani Date: Mon Dec 10 12:36:23 2018 -0800 scsi: qla2xxx: Fix NPIV handling for FC-NVMe This patch fixes issues with NPIV port with FC-NVMe. Clean up code for remoteport delete and also call nvme_delete when deleting VPs. Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 850f6acd343663ff988888184df6af5cb0bc61c4 Author: Anil Gurumurthy Date: Mon Dec 10 12:36:22 2018 -0800 scsi: qla2xxx: Enable FC-NVME on NPIV ports Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit bc127d93e4eca0f45caf2e68e9aeb06284b15b86 Author: Arnd Bergmann Date: Mon Dec 10 22:32:41 2018 +0100 scsi: aacraid: change event_wait to a completion The event_wait semaphore has completion semantics, so we can change it over to the completion interface for clarity without changing the behavior. Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen commit dc71eccc175eae4959b06ae697ebef019719063d Author: Arnd Bergmann Date: Mon Dec 10 22:32:40 2018 +0100 scsi: aacraid: change wait_sem to a completion The wait_sem member is used like a completion, so we should use the respective API. The behavior is unchanged. Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen commit 719162bd5bb968203397b9b1d0dd30a9797bbd09 Author: James Smart Date: Mon Dec 10 19:37:01 2018 -0800 scsi: lpfc: Enable Management features for IF_TYPE=6 Addition of support for if_type=6 missed several checks for interface type, resulting in the failure of several key management features such as firmware dump and loopback testing. Correct the checks on the if_type so that both SLI4 IF_TYPE's 2 and 6 are supported. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 2d1036aea463e34d03b402e6a918ec89a742b2bb Author: Martin K. Petersen Date: Wed Dec 12 20:26:56 2018 -0500 Revert "scsi: lpfc: ls_rjt erroneus FLOGIs" This reverts commit 287aba2592870fa5b76134b28173b77f1f7a4492. We killed the bad firmware and this mod is no longer necessary. Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 186599f89ea57e9b444dcb0793723b9148770161 Author: YueHaibing Date: Wed Dec 12 08:03:38 2018 +0000 net/mlx5: Remove duplicated include from eswitch.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 0273ac349f08f4ff9ef88aaaf9c9f2aa6e87d2be Author: Dennis Zhou Date: Tue Dec 11 18:03:08 2018 -0500 blkcg: handle dying request_queue when associating a blkg Between v3 [1] and v4 [2] of the blkg association series, the association point moved from generic_make_request_checks(), which is called after the request enters the queue, to bio_set_dev(), which is when the bio is formed before submit_bio(). When the request_queue goes away, the blkgs supporting the request_queue are destroyed and then the q->root_blkg is set to %NULL. This patch adds a %NULL check to blkg_tryget_closest() to prevent the NPE caused by the above. It also adds a guard to see if the request_queue is dying when creating a blkg to prevent creating a blkg for a dead request_queue. [1] https://lore.kernel.org/lkml/20180911184137.35897-1-dennisszhou@gmail.com/ [2] https://lore.kernel.org/lkml/20181126211946.77067-1-dennis@kernel.org/ Fixes: 5cdf2e3fea5e ("blkcg: associate blkg when associating a device") Reported-and-tested-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit 02e1dbe402de8c41787da7b1ef9acd2457b0b84b Merge: 351cbde969230 06a2fc8f1498d Author: David S. Miller Date: Wed Dec 12 16:34:22 2018 -0800 Merge branch 'Pass-extack-to-SWITCHDEV_PORT_OBJ_ADD' Petr Machata says: ==================== Pass extack to SWITCHDEV_PORT_OBJ_ADD Drivers may need to do validation as a result of port object addition. An example is mlxsw, which needs to check the configuration of a VXLAN device attached to an offloaded bridge. Without a mapped VLAN, the invalidity of the device is not important, but as soon as a pvid, untagged VLAN is configured for the device, it has to be validated and offloaded. Should the validation fail, there's currently no way to communicate details of the failure to the user, beyond an error number. Because currently, extack is not available at all in that area of code, this patch starts down at the RTNL level and progresses up towards the driver(s). In patch #1, ndo_bridge_setlink is updated to include extack, and callbacks of all clients are updated as well (ignoring the argument). In patch #2, the bridge driver is updated to propagate the extack through to the switchdev border, br_switchdev_port_vlan_add(). Patches #3, #4 and #5 then gradually extend switchdev to pass the extack argument through to the switchdev blocking notifier chain. Patches #6 and #7 then update mlxsw to pass the extack argument from VXLAN events resp. port events on to mlxsw_sp_bridge_8021q_vxlan_join(). Finally in patches #8 and #9, the code paths from the previous two patches are verified to yield an error message. v2: - Patch #1: - In ndo_bridge_setlink(), keep the whole extack declaration on the same line. ==================== Signed-off-by: David S. Miller commit 06a2fc8f1498dc978e856ef5ded6667b476a3b5b Author: Petr Machata Date: Wed Dec 12 17:03:06 2018 +0000 selftests: mlxsw: extack: Test VLAN add on a port device Test mapping a VLAN at a port device such that on the same VLAN, there already is an unoffloadable VXLAN device. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b498dc7d29bd6b4a108451671f81d712fba008ec Author: Petr Machata Date: Wed Dec 12 17:03:04 2018 +0000 selftests: mlxsw: extack: Test VLAN add on a VXLAN device Test mapping a VLAN at a VXLAN device that can't be offloaded. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 7357eb3d4b3e33e3a08fb5916d6ae0dbb389a96a Author: Petr Machata Date: Wed Dec 12 17:03:02 2018 +0000 mlxsw: spectrum_switchdev: Propagate extack on port VLAN events After switchdev_handle_port_obj_add() was extended in a preceding patch, mlxsw_sp_port_obj_add() now takes an extack argument. Propagate it further by extending a callee chain from mlxsw_sp_port_vlans_add(), via mlxsw_sp_bridge_port_vlan_add() via mlxsw_sp_port_vlan_bridge_join() via mlxsw_sp_port_vlan_fid_join() to mlxsw_sp_bridge_ops.fid_get, adding an extack argument for each of them. This code path is used when a VLAN is added to a port netdevice if there already is an unoffloadable VXLAN device with that VLAN mapped. mlxsw_sp_bridge_8021d_port_join() is updated to obey the new interfaces changed by the abovementioned code, propagating extack ultimately from NETDEV_CHANGEUPPER events. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 0a5a2aee6f38073b6ae5d946bc668e965f29f3b0 Author: Petr Machata Date: Wed Dec 12 17:03:00 2018 +0000 mlxsw: spectrum_switchdev: Propagate extack on VXLAN VLAN events Now that VLAN port object addition notifications carry an extack, propagate it from mlxsw_sp_switchdev_vxlan_vlans_add() through mlxsw_sp_switchdev_vxlan_vlan_add() to mlxsw_sp_bridge_8021q_vxlan_join(). This code path is used when a VLAN is added to a VXLAN netdevice that cannot be offloaded. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 6921351359395a6c6ac72cd275a8393f399cecc7 Author: Petr Machata Date: Wed Dec 12 17:02:56 2018 +0000 net: switchdev: Add extack to switchdev_handle_port_obj_add() callback Drivers use switchdev_handle_port_obj_add() to handle recursive descent through lower devices. Change this function prototype to take add_cb that itself takes an extack argument. Decode extack from switchdev_notifier_port_obj_info and pass it to add_cb. Update mlxsw and ocelot drivers which use this helper. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Acked-by: Ivan Vecera Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 479c86dc551c9720765ed19433990eae6a1f899f Author: Petr Machata Date: Wed Dec 12 17:02:54 2018 +0000 net: switchdev: Add extack to struct switchdev_notifier_info In order to pass extack to the drivers that need it, add an extack field to struct switchdev_notifier_info, and an extack argument to the function call_switchdev_blocking_notifiers(). Also add a helper function switchdev_notifier_info_to_extack(). Signed-off-by: Petr Machata Acked-by: Jiri Pirko Acked-by: Ivan Vecera Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 69b7320e14e6e8c7a77fa5803cecc86434a1162d Author: Petr Machata Date: Wed Dec 12 17:02:52 2018 +0000 net: switchdev: Add extack argument to switchdev_port_obj_add() After the previous patch, bridge driver has extack argument available to pass to switchdev. Therefore extend switchdev_port_obj_add() with this argument, updating all callers, and passing the argument through to switchdev_port_obj_notify(). Signed-off-by: Petr Machata Acked-by: Jiri Pirko Acked-by: Ivan Vecera Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 169327d5850cb80d98d095cfaf8dfbb63d576864 Author: Petr Machata Date: Wed Dec 12 17:02:50 2018 +0000 net: bridge: Propagate extack to switchdev ndo_bridge_setlink has been updated in the previous patch to have extack available, and changelink RTNL op has had this argument since the time extack was added. Propagate both through the bridge driver to eventually reach br_switchdev_port_vlan_add(), where it will be used by subsequent patches. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Acked-by: Nikolay Aleksandrov Acked-by: Ivan Vecera Acked-by: Roopa Prabhu Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 2fd527b72bb6f95dfe8a1902e998cb76390c431e Author: Petr Machata Date: Wed Dec 12 17:02:48 2018 +0000 net: ndo_bridge_setlink: Add extack Drivers may not be able to implement a VLAN addition or reconfiguration. In those cases it's desirable to explain to the user that it was rejected (and why). To that end, add extack argument to ndo_bridge_setlink. Adapt all users to that change. Following patches will use the new argument in the bridge driver. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 351cbde969230a072cabca9969c68ab04e58e6b3 Author: Jonathan Toppins Date: Wed Dec 12 11:58:51 2018 -0500 bnxt: remove printing of hwrm message bnxt_en 0000:19:00.0 (unregistered net_device) (uninitialized): hwrm req_type 0x190 seq id 0x6 error 0xffff The message above is commonly seen when a newer driver is used on hardware with older firmware. The issue is this message means nothing to anyone except Broadcom. Remove the message to not confuse users as this message is really not very informative. Signed-off-by: Jonathan Toppins Acked-by: Michael Chan Signed-off-by: David S. Miller commit d675ba4b9e6ccd782e4db9109cbab708a85b8ff8 Merge: 02c4fb0210dc2 ba0ede185ef4c Author: Dave Airlie Date: Thu Dec 13 10:29:14 2018 +1000 Merge tag 'drm-msm-next-2018-12-12' of git://people.freedesktop.org/~robclark/linux into drm-next This time around, seeing some love for some older hw: - a2xx gpu support for apq8060 (hp touchpad) and imx5 (headless gpu-only mode) - a2xx gpummu support (a2xx was pre-iommu) - mdp4 display support for apq8060/touchpad For display/dpu: - a big pile of continuing dpu fixes and cleanups On the gpu side of things: - per-submit statistics and traceevents for better profiling - a6xx crashdump support - decouple get_iova() and page pinning.. so we can unpin from physical memory inactive bo's while using softpin to lower cpu overhead - new interface to set debug names on GEM BOs and debugfs output improvements - additional submit flag to indicate buffers that are used to dump (so $debugfs/rd cmdstream dumping is useful with softpin + state-objects) Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvVvLPD9_Z4kyfGe98Y--byj6HbxHivEYSgF7Rq7=bFnw@mail.gmail.com commit 02c4fb0210dc2773e0d7f0a5a1b866986f8edc40 Merge: 29a1da27c4e41 8ff01abcccbb5 Author: Dave Airlie Date: Thu Dec 13 10:21:31 2018 +1000 Merge branch 'linux-4.21' of git://github.com/skeggsb/linux into drm-next Mostly just initial support for Turing TU104/TU106 chipsets. Support for TU102 is missing as I don't yet have HW, but it should be trivial to add in later in the merge window (in theory). It's a bit of a rough first pass that'll get improved in future releases as a finish figuring out some of the other HW changes, but it's good enough as it stands for modesetting and suspend/resume etc. Acceleration bring-up is incomplete due to NVIDIA not yet having provided FW images for me to use, though command submission and copy engines are functional already. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv7KmfcQqZcx+wh_1UKjTovp4PH_5UVMfeyxUu-M9WLZfw@mail.gmail.com commit 29a1da27c4e41c2b4ad85f02bbf412926d4b38df Merge: e7df065a69778 180b46ecdc9f7 Author: Dave Airlie Date: Thu Dec 13 10:16:09 2018 +1000 Merge tag 'drm/tegra/for-4.21-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.21-rc1 These changes contain a couple of minor fixes for host1x and the Falcon library in Tegra DRM. There are also a couple of missing pieces that finally enable support for host1x, VIC and display on Tegra194. I've also added a patch that enables audio over HDMI using the SOR which has been tested, and works, on both Tegra186 and Tegra194. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20181207134712.32683-1-thierry.reding@gmail.com commit e7df065a697783ecb5c6eaa5692d78dcfceb71dd Merge: e69aa5f9b97f7 674e78acae0df Author: Dave Airlie Date: Thu Dec 13 09:49:04 2018 +1000 Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next [airlied: make etnaviv build again] amdgpu: - DC trace support - More DC documentation - XGMI hive reset support - Rework IH interaction with KFD - Misc fixes and cleanups - Powerplay updates for newer polaris variants - Add cursor plane update fast path - Enable gpu reset by default on CI parts - Fix config with KFD/HSA not enabled amdkfd: - Limit vram overcommit - dmabuf support - Support for doorbell BOs ttm: - Support for simultaneous submissions to multiple engines scheduler: - Add helpers for hw with preemption support Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181207233119.16861-1-alexander.deucher@amd.com commit e6652f0ff037d3cad81b82afd4f75c964ef611ec Author: Yangtao Li Date: Wed Dec 12 11:40:07 2018 -0500 netdevsim: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit d63962e38cc0a94cce4f39b8b171cdb55b69a4a5 Merge: 1072bd678547f fec7b6690541b Author: James Morris Date: Wed Dec 12 15:44:29 2018 -0800 Merge tag 'seccomp-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp Add SECCOMP_RET_USER_NOTIF From Kees. commit 8f9a8a61931197d32ae31960f4179ff60ccbe3db Author: Roman Gushchin Date: Mon Dec 10 15:43:02 2018 -0800 selftests/bpf: add btf annotations for cgroup_local_storage maps Add btf annotations to cgroup local storage maps (per-cpu and shared) in the network packet counting example. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 9a1126b63190e2541dd5d643f4bfeb5a7f493729 Author: Roman Gushchin Date: Mon Dec 10 15:43:01 2018 -0800 bpf: add bpffs pretty print for cgroup local storage maps Implement bpffs pretty printing for cgroup local storage maps (both shared and per-cpu). Output example (captured for tools/testing/selftests/bpf/netcnt_prog.c): Shared: $ cat /sys/fs/bpf/map_2 # WARNING!! The output is for debug purpose only # WARNING!! The output format will change {4294968594,1}: {9999,1039896} Per-cpu: $ cat /sys/fs/bpf/map_1 # WARNING!! The output is for debug purpose only # WARNING!! The output format will change {4294968594,1}: { cpu0: {0,0,0,0,0} cpu1: {0,0,0,0,0} cpu2: {1,104,0,0,0} cpu3: {0,0,0,0,0} } Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 1b2b234b1318afb3775d4c6624fd5a96558f19df Author: Roman Gushchin Date: Mon Dec 10 15:43:00 2018 -0800 bpf: pass struct btf pointer to the map_check_btf() callback If key_type or value_type are of non-trivial data types (e.g. structure or typedef), it's not possible to check them without the additional information, which can't be obtained without a pointer to the btf structure. So, let's pass btf pointer to the map_check_btf() callbacks. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit a0517a0f7ef23550b4484c37e2b9c2d32abebf64 Author: Stanislav Fomichev Date: Tue Dec 11 19:20:52 2018 -0800 selftests/bpf: use __bpf_constant_htons in test_prog.c For some reason, my older GCC (< 4.8) isn't smart enough to optimize the !__builtin_constant_p() branch in bpf_htons, I see: error: implicit declaration of function '__builtin_bswap16' Let's use __bpf_constant_htons as suggested by Daniel Borkmann. I tried to use simple htons, but it produces the following: test_progs.c:54:17: error: braced-group within expression allowed only inside a function .eth.h_proto = htons(ETH_P_IP), Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov commit 9a58ee2f00fb558297c44f69833e408fdadd26db Merge: 3f9b7eeea0268 58ee90284ffa4 Author: David S. Miller Date: Wed Dec 12 15:21:01 2018 -0800 Merge branch 'stmmac-mt2712-support' Biao Huang says: ==================== add Ethernet driver support for mt2712 Changes in v6: modifications according to comments from Rob/Andrew/Sean: 1. use delay_ps instead of delay stage. 2. add comments in driver to avoid confusion. 2. rewrite set_delay function. 3. modify binding document for properties: tx-delay-ps/rx-delay-ps/pericfg etc. ==================== Signed-off-by: David S. Miller commit 58ee90284ffa495b04d56d643001d6f64a13a580 Author: Biao Huang Date: Wed Dec 12 17:35:32 2018 +0800 dt-binding: mediatek-dwmac: add binding document for MediaTek MT2712 DWMAC The commit adds the device tree binding documentation for the MediaTek DWMAC found on MediaTek MT2712. Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit 9992f37e346bb00369c261981f2839a5926bf2eb Author: Biao Huang Date: Wed Dec 12 17:35:31 2018 +0800 stmmac: dwmac-mediatek: add support for mt2712 Add Ethernet support for MediaTek SoCs from the mt2712 family Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit fb4d49448026bf1aee917426f74dc1f5342ba908 Author: Sebastian Reichel Date: Sat Sep 29 10:03:27 2018 +0200 power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_* Signed-off-by: Sebastian Reichel commit fbd17e58d472d7ec49810c6cd87900d73e75bb2b Author: Sebastian Reichel Date: Sat Sep 29 08:47:43 2018 +0200 power: supply: ds2781: switch to devm_power_supply_register Simplify/Cleanup the driver by switching to devm_power_supply_register and dropping the driver's remove function. Signed-off-by: Sebastian Reichel commit 63fac6cb63b06eb1ee471d7d62a1c2e8cf72bdf0 Author: Sebastian Reichel Date: Sat Sep 29 08:01:12 2018 +0200 power: supply: ds2780: switch to devm_power_supply_register Simplify/Cleanup the driver by switching to devm_power_supply_register and dropping the driver's remove function. Signed-off-by: Sebastian Reichel commit 711aebcfe3ba6bfe70f9fe9041f568552affd8b7 Author: Sebastian Reichel Date: Sat Sep 29 08:46:02 2018 +0200 power: supply: ds2781: fix race-condition in bin attribute registration This is a follow-up patch to the previous one, which fixed a race-condition during registration of the attribute group. This fixes the same issue for the binary attributes by adding them to the properly registered group. As a side effect the code is further cleaned up. Signed-off-by: Sebastian Reichel commit 88635b6da891522e6099c0bfc97ce03788dd6888 Author: Sebastian Reichel Date: Sat Sep 29 07:57:30 2018 +0200 power: supply: ds2780: fix race-condition in bin attribute registration This is a follow-up patch to the previous one, which fixed a race-condition during registration of the attribute group. This fixes the same issue for the binary attributes by adding them to the properly registered group. As a side effect the code is further cleaned up. Signed-off-by: Sebastian Reichel commit 451ba0e4363c053201065f0f2ba9405fbdf0f731 Author: Sebastian Reichel Date: Sat Sep 29 07:44:28 2018 +0200 power: supply: pcf50633: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit 157ba1bb5fcb91366df3be5e63a04b799ff9cf64 Author: Sebastian Reichel Date: Fri Sep 28 17:35:37 2018 +0200 power: supply: charger-manager: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit efcca6bdfba1d579d86bd3f5ea65e5bf8e7deebe Author: Sebastian Reichel Date: Fri Sep 28 15:14:22 2018 +0200 power: supply: charger-manager: simplify generation of sysfs attribute group name This is a simple cleanup and there should be no functional changes. Signed-off-by: Sebastian Reichel commit 750688c7cdfd3ffd6189d96cbf0ff8f19bdebbdb Author: Sebastian Reichel Date: Fri Sep 28 11:46:04 2018 +0200 power: supply: bq24257: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit 348a3c079bfccbdf63767dfb5bb0521d2e889fa9 Author: Sebastian Reichel Date: Fri Sep 28 11:39:16 2018 +0200 power: supply: bq24190_charger: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit b1f7ee898bdcad18e5a5c008ff7bf30ae9941265 Author: Sebastian Reichel Date: Fri Sep 28 11:25:20 2018 +0200 power: supply: lp8788: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit a45cefb0ca1fdec07495117c1d325d99fa9f5bbc Author: Sebastian Reichel Date: Fri Sep 28 11:10:51 2018 +0200 power: supply: ds2781: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit b10474aafe80cf50afe7d299d3cc8a60efe3e69b Author: Sebastian Reichel Date: Fri Sep 28 11:00:32 2018 +0200 power: supply: ds2780: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit 06215ce99988b8ce1e44ea096c5ef1fd202efb15 Author: Sebastian Reichel Date: Fri Sep 28 10:38:09 2018 +0200 power: supply: bq2415x: fix race-condition in sysfs registration This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel commit cef8fe6a382cb556b590269e9d1dfc0241014903 Author: Sebastian Reichel Date: Thu Sep 27 15:46:03 2018 +0200 power: supply: core: add support for custom sysfs attributes Add functionality to setup device specific sysfs attributes in a race condition free manner Signed-off-by: Sebastian Reichel commit 1072bd678547f8663cfb81a22fdb50c589e4976e Author: Paul Gortmaker Date: Sun Dec 9 15:36:31 2018 -0500 security: fs: make inode explicitly non-modular The Makefile/Kconfig entry controlling compilation of this code is: security/Makefile:obj-$(CONFIG_SECURITYFS) += inode.o security/Kconfig:config SECURITYFS security/Kconfig: bool "Enable the securityfs filesystem" ...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. The removal of module.h uncovered a couple previously hidden implicit header requirements which are now included explicitly. Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit 876979c9308b7228cdaf6785909c57eebc85d911 Author: Paul Gortmaker Date: Sun Dec 9 15:36:29 2018 -0500 security: 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 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 might have been the implicit 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. Cc: James Morris Cc: "Serge E. Hallyn" Cc: John Johansen Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: David Howells Cc: linux-security-module@vger.kernel.org Cc: linux-integrity@vger.kernel.org Cc: keyrings@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit 3aafb1fbe654fce86e79e10b3dc496b50cb04284 Author: Paul Gortmaker Date: Sun Dec 9 15:36:32 2018 -0500 security: integrity: make evm_main explicitly non-modular The Makefile/Kconfig entry controlling compilation of this code is: obj-$(CONFIG_EVM) += evm.o evm-y := evm_main.o evm_crypto.o evm_secfs.o security/integrity/evm/Kconfig:config EVM security/integrity/evm/Kconfig: bool "EVM 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. Cc: Mimi Zohar Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-ima-devel@lists.sourceforge.net Cc: linux-security-module@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit a79860800e0b500902baf745c259625e48a403db Author: Paul Gortmaker Date: Sun Dec 9 15:36:30 2018 -0500 keys: remove needless modular infrastructure from ecryptfs_format Even though the support can be modular, only one file needs to use all the macros like MODULE_AUTHOR, MODULE_LICENSE etc. Only the one responsible for registering/removal with module_init/module_exit needs to declare these. In this case, that file is "encrypted.c" and it already has the MODULE_LICENSE that we are removing here. Since the file does EXPORT_SYMBOL, we add export.h - and build tests show that module.h (which includes everything) was hiding an implicit use of string.h - so that is added as well. Cc: Mimi Zohar Cc: David Howells Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-integrity@vger.kernel.org Cc: keyrings@vger.kernel.org Cc: linux-security-module@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit 4f83d5ea643af8892459d9852c88f3892201b864 Author: Paul Gortmaker Date: Sun Dec 9 15:36:33 2018 -0500 security: integrity: make ima_main explicitly non-modular The Makefile/Kconfig entry controlling compilation of this code is: obj-$(CONFIG_IMA) += ima.o ima-y := ima_fs.o ima_queue.o ima_init.o ima_main.o ima_crypto.o ima_api.o \ ima_policy.o ima_template.o ima_template_lib.o security/integrity/ima/Kconfig:config IMA security/integrity/ima/Kconfig- bool "Integrity Measurement Architecture(IMA)" ...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. Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-ima-devel@lists.sourceforge.net Cc: linux-security-module@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: James Morris commit e4a7dca5de625018b29417ecc39dc5037d9a5a36 Author: Joey Zhang Date: Mon Dec 10 17:12:22 2018 +0800 switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite In the ioctl_event_ctl() SWITCHTEC_IOCTL_EVENT_IDX_ALL case, we call event_ctl() several times with the same "ctl" struct. Each call clobbers ctl.flags, which leads to the problem that we may not actually enable or disable all events as the user requested. Preserve the event flag value with a temporary variable. Fixes: 52eabba5bcdb ("switchtec: Add IOCTLs to the Switchtec driver") Signed-off-by: Joey Zhang Signed-off-by: Wesley Sheng [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit aff614c6339c1ee2a74ea0afc491d6e30d0bad61 Author: Boris Glimcher Date: Mon Dec 10 17:12:21 2018 +0800 switchtec: Set DMA coherent mask Switchtec hardware supports 64-bit DMA, so set the correct DMA mask. This allows the CMA to allocate larger buffers for memory windows. Signed-off-by: Boris Glimcher Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 526180408b815aa7b96fd48bd23cdd33ef04e38e Author: Kelvin Cao Date: Mon Dec 10 17:12:20 2018 +0800 switchtec: Remove immediate status check after submitting MRPC command After submitting a Firmware Download MRPC command, Switchtec firmware will delay Management EP BAR MemRd TLP responses by more than 10ms. This is a firmware limitation. Delayed MemRd completions are a problem for systems with a low Completion Timeout (CTO). The current driver checks the MRPC status immediately after submitting an MRPC command, which results in a delayed MemRd completion that may cause a Completion Timeout. Remove the immediate status check and rely on the check after receiving an interrupt or timing out. This is only a software workaround to the READ issue and a proper fix of this should be done in firmware. Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Signed-off-by: Kelvin Cao Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 1a2fa02f7489dc4d746f2a15fb77b3ce1affade8 Author: Hans de Goede Date: Sat Dec 8 13:59:24 2018 +0100 ACPI / LPSS: Ignore acpi_device_fix_up_power() return value Ignore acpi_device_fix_up_power() return value. If we return an error we end up with acpi_default_enumeration() still creating a platform- device for the device and we end up with the device still being used but without the special LPSS related handling which is not useful. Specicifically ignoring the error fixes the touchscreen no longer working after a suspend/resume on a Prowise PT301 tablet. This tablet has a broken _PS0 method on the touchscreen's I2C controller, causing acpi_device_fix_up_power() to fail, causing fallback to standard platform-dev handling and specifically causing acpi_lpss_save/restore_ctx to not run. The I2C controllers _PS0 method does actually turn on the device, but then does some more nonsense which fails when run during early boot trying to use I2C opregion handling on another not-yet registered I2C controller. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 943a10f85265d4c14753d445003b6f5d8e3d959a Author: Yangtao Li Date: Tue Dec 11 11:20:48 2018 -0500 PM / sleep: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki commit 04dab58a39d402162a7effe7278df8cd41557252 Author: Rafael J. Wysocki Date: Mon Dec 10 12:30:23 2018 +0100 cpuidle: Add 'above' and 'below' idle state metrics Add two new metrics for CPU idle states, "above" and "below", to count the number of times the given state had been asked for (or entered from the kernel's perspective), but the observed idle duration turned out to be too short or too long for it (respectively). These metrics help to estimate the quality of the CPU idle governor in use. Signed-off-by: Rafael J. Wysocki commit 8e22bce990b5d502360e15ecb0d69f963666d7fc Merge: 24161e726f67c 690e16bada602 Author: Olof Johansson Date: Wed Dec 12 14:21:26 2018 -0800 Merge tag 'v4.20-rockchip-dts64fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes rockpro64 regulator fixes that cause stability issues * tag 'v4.20-rockchip-dts64fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios Signed-off-by: Olof Johansson commit a6f119a06960ef1dc30570401e43b71f9ebdd2c2 Merge: 389cf4e42e204 c2ade654dbf7d Author: Olof Johansson Date: Wed Dec 12 14:20:55 2018 -0800 Merge tag 'omap-for-v4.21/driver-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers Few more omap driver fixes and improvments for v4.21 merge window This series of changes improves the TI module flag handling to allow booting with older dts files until the module flags have been moved to the interconnect target module level. And there's a of_node_name_eq() clean-up patch from Rob Herring for the GPMC driver. * tag 'omap-for-v4.21/driver-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: memory: omap-gpmc: Use of_node_name_eq for node name comparisons bus: ti-sysc: Check for no-reset and no-idle flags at the child level ARM: OMAP2+: Check also the first dts child for hwmod flags Signed-off-by: Olof Johansson commit 24161e726f67cf7047141893c18d3f1591a52159 Merge: 0603a9a84679e 84fb6c7feb149 Author: Olof Johansson Date: Wed Dec 12 14:20:02 2018 -0800 Merge tag 'omap-for-v4.20/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Few device fixes for omaps Here's a collection of minor fixes for annoying usability issues people have noticed using various devices. There are two regression fixes: - A regression fix for omap5 usb3 dual role mode - A regression fix to ams-delta audio being muted permanently And two one-liners: - Fix polarity for am335x-pdu001 SD card detection - Fix non-working omap4-sdp Ethernet startup for rebind It would be nice to get these merged during the -rc cycle if possible. Naturally these can all wait for the merge window too if we start running out of time. * tag 'omap-for-v4.20/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Fix OMAP4430 SDP Ethernet startup ARM: dts: am335x-pdu001: Fix polarity of card detection input ARM: OMAP1: ams-delta: Fix audio permanently muted ARM: dts: omap5: Fix dual-role mode on Super-Speed port Signed-off-by: Olof Johansson commit a323a513c7128e1597e59f6d3db38c426d229cb9 Author: Rob Herring Date: Wed Dec 12 09:50:11 2018 +0100 dt-bindings: arm: Convert Rockchip board/soc bindings to json-schema Convert Rockchip SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: Heiko Stuebner Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring [move to per-board entries after confirming with Rob and added recently added boards] Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson commit bd3fde386decf09317ff4a07cd0d05380a22f525 Author: Arnd Bergmann Date: Mon Dec 10 22:58:36 2018 +0100 ARM: omap2: avoid section mismatch warning WARNING: vmlinux.o(.text+0x27530): Section mismatch in reference from the function am43xx_suspend_init() to the function .init.text:am43xx_map_scu() The function am43xx_suspend_init() references the function __init am43xx_map_scu(). This is often because am43xx_suspend_init lacks a __init annotation or the annotation of am43xx_map_scu is wrong. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Acked-by: Santosh Shilimkar Reviewed-by: Kevin Hilman Signed-off-by: Olof Johansson commit 6dc7e8764b0879157899aa9ca15f894e001f0c20 Merge: 4238973b2ecd8 e9e863dc1dc88 Author: Olof Johansson Date: Wed Dec 12 14:03:48 2018 -0800 Merge tag 'amlogic-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/soc soc: Amlogic updates for v4.21 - ARM: meson: Kconfig: select HAVE_ARM_TWD and ARM_GLOBAL_TIMER - misc MAINTAINERS updates * tag 'amlogic-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: meson: select HAVE_ARM_TWD and ARM_GLOBAL_TIMER MAINTAINERS: add drivers/soc/amlogic/ to amlogic list MAINTAINERS: Remove myself from the list Signed-off-by: Olof Johansson commit 4f474037cf0656f4a59bbd61006fa2fa60e74c3b Merge: 69c5f266d8808 f18fd0f560eb3 Author: Olof Johansson Date: Wed Dec 12 14:01:03 2018 -0800 Merge tag 'gemini-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt Gemini DTS updates for v4.21: - Fix the erroneous partition table on D-Link DIR-685 - Multiplex flash usage with other usage using pin control handling (merged to the MTD tree) - Use the RedBoot partition parser on SQ201 - Add the USB blocks (DT bindings merged in the last merge window) - Bump the debounce times a bit to avoid bouncing * tag 'gemini-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: Bump Gemini platforms to use 100ms debounce ARM: dts: Add the FOTG210 USB host to Gemini boards ARM: dts: Fix up SQ201 flash access ARM: dts: Enable Gemini flash access ARM: dts: Fix up the D-Link DIR-685 MTD partition info Signed-off-by: Olof Johansson commit 69c5f266d8808cd507a12b2c7c9ed7fc678c6487 Merge: 5cc60b0497c38 8be5b161bb3d0 Author: Olof Johansson Date: Wed Dec 12 13:59:58 2018 -0800 Merge tag 'sunxi-h3-h5-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner H3/H5 changes for 4.21 Our usual pull request with the changes shared between the H3 and H5 SoCs. The major changes for this release are: - Addition of the video engine for the H5 - H3 Camera support - New board: Emlid Neutis N5, Mapleboard MP130 * tag 'sunxi-h3-h5-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h5: Add Video Engine node ARM/arm64: dts: allwinner: Move H3/H5 syscon label over to soc-specific nodes arm64: dts: allwinner: h5: Add system-control node with SRAM C1 ARM: dts: sun8i: h3: Fix the system-control register range ARM: dts: sun8i: Add the H3/H5 CSI controller ARM: dts: sun8i-h3: Add dts for the Mapleboard MP130 arm64: dts: allwinner: new board - Emlid Neutis N5 dt-bindings: vendor-prefix: new vendor - Emlid ARM: dts: sun8i-h3: add sy8106a to orange pi plus Signed-off-by: Olof Johansson commit 4238973b2ecd84412d78cc72c4ab3bdae064f2e8 Merge: 4dd201beec951 5a87809b89b64 Author: Olof Johansson Date: Wed Dec 12 13:58:34 2018 -0800 Merge tag 'omap-for-v4.21/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Changes for omap1 variants for v4.21 merge window In this set of changes Aaro Koskinen revives Palm Tungsten E for the MMC and USB making it usable again. And Janusz Krzysztofik follows up on the clean-up of ams-delta GPIO handling. The other changes are clean-up for DEFINE_SHOW_ATTRIBUTE by Yangtao Li. * tag 'omap-for-v4.21/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: fix USB configuration for device-only setups ARM: OMAP1: add MMC configuration for Palm Tungsten E ARM: OMAP1: devices: configure omap1_spi100k only on OMAP7xx ARM: OMAP1/2: fix SoC name printing ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file ARM: OMAP1: ams-delta: Drop unused symbols from the board header ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers ARM: OMAP: PM: Change to use DEFINE_SHOW_ATTRIBUTE macro ARM: OMAP1: clock: Change to use DEFINE_SHOW_ATTRIBUTE macro ARM: OMAP1: ams-delta: Provide GPIO lookup table for LED device ARM: OMAP1: ams-delta: make board header file local to mach-omap1 Signed-off-by: Olof Johansson commit 4dd201beec9512c44d11ac97791a33f5c3536d7b Author: Arnd Bergmann Date: Mon Dec 10 22:58:37 2018 +0100 ARM: tegra: avoid section mismatch warning WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references the (unknown reference) __initconst (unknown). This is often because tegra114_gic_cpu_pm_registration lacks a __initconst annotation or the annotation of (unknown) is wrong. Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Olof Johansson commit 4aa64677330beeeed721b4b122884dabad845d66 Author: Arnd Bergmann Date: Mon Dec 10 22:58:38 2018 +0100 ARM: ks8695: fix section mismatch warning WARNING: vmlinux.o(.text+0x13250): Section mismatch in reference from the function acs5k_i2c_init() to the (unknown reference) .init.data:(unknown) The function acs5k_i2c_init() references the (unknown reference) __initdata (unknown). This is often because acs5k_i2c_init lacks a __initdata annotation or the annotation of (unknown) is wrong. Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 88af3209aa0881aa5ffd99664b6080a4be5f24e5 Author: Arnd Bergmann Date: Mon Dec 10 22:58:39 2018 +0100 ARM: pxa: avoid section mismatch warning WARNING: vmlinux.o(.text+0x19f90): Section mismatch in reference from the function littleton_init_lcd() to the function .init.text:pxa_set_fb_info() The function littleton_init_lcd() references the function __init pxa_set_fb_info(). This is often because littleton_init_lcd lacks a __init annotation or the annotation of pxa_set_fb_info is wrong. WARNING: vmlinux.o(.text+0xf824): Section mismatch in reference from the function zeus_register_ohci() to the function .init.text:pxa_set_ohci_info() The function zeus_register_ohci() references the function __init pxa_set_ohci_info(). This is often because zeus_register_ohci lacks a __init annotation or the annotation of pxa_set_ohci_info is wrong. WARNING: vmlinux.o(.text+0xf95c): Section mismatch in reference from the function cm_x300_init_u2d() to the function .init.text:pxa3xx_set_u2d_info() The function cm_x300_init_u2d() references the function __init pxa3xx_set_u2d_info(). This is often because cm_x300_init_u2d lacks a __init annotation or the annotation of pxa3xx_set_u2d_info is wrong. Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 5d3e11c4782156f529deac2afc066f28308d9a80 Author: Arnd Bergmann Date: Mon Dec 10 21:43:02 2018 +0100 ARM: mmp: fix pxa168_device_usb_phy use on aspenite This one ended up in the wrong header file, causing a build failure on at least one platform: arch/arm/mach-mmp/aspenite.c: In function 'common_init': arch/arm/mach-mmp/aspenite.c:260:28: error: 'pxa168_device_usb_phy' undeclared (first use in this function); did you mean 'pxa168_device_ssp5'? We can just include both the pxa168.h and pxa910.h headers to make that work, which gets us to the next failure: arch/arm/mach-mmp/aspenite.o: In function `common_init': aspenite.c:(.init.text+0x1c0): undefined reference to `pxa168_device_usb_phy' This is solved by using the matching ifdef check around the USB device registration, enabling them only when either USB host or gadget mode are enabled. Fixes: a225daf72ee7 ("ARM: mmp: add a pxa-usb-phy device") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 Author: Arnd Bergmann Date: Mon Dec 10 21:43:01 2018 +0100 ARM: mmp: fix timer_init calls The change to passing the timer frequency as a function argument was a good idea, but caused a build failure for one user that was missed in the update: arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer': arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration] Change that as well to fix the build error, and rename the function to put it into a proper namespace and make it clearer what is actually going on. I saw that the high 6500000 HZ frequency was previously only set with CONFIG_MMP2, but is now also used with MMP (pxa910), so I'm changing that back here. Please make sure that the frequencies are all correct now. Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson commit c8730395ea515e9592c0cdc474e0aa61fa9a7902 Merge: 3aab54033a850 167e63702d090 Author: Olof Johansson Date: Wed Dec 12 13:52:48 2018 -0800 Merge tag 'imx-soc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc i.MX SoC changes for 4.21: - An improvement on i.MX debugging options that only defines DEBUG_IMX_UART_PORT if needed, so that the option will not be present in the kernel config when DEBUG_LL is disabled. - Adds the necessary platform support for i.MX7ULP SoC and configures power mode to Partial Stop mode 3 with system/bus clock enabled. Otherwise the default STOP mode will gate off system/bus clock when WFI gets executed on i.MX7ULP. - A fix from Arnd on SOC_IMX7ULP option dependency. * tag 'imx-soc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: fix dependencies on imx7ulp ARM: imx: add initial support for imx7ulp ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed Signed-off-by: Olof Johansson commit 3aab54033a8506af70cabb7c7db81442ea63944e Merge: abd488c00194f cafbc79e327f4 Author: Olof Johansson Date: Wed Dec 12 13:52:15 2018 -0800 Merge tag 'samsung-soc-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Samsung mach/soc changes for v4.21 Just cleanups of: legacy way of setting external wakeup interrupts, old power management debugging functions and duplicated secondary startup initialization. * tag 'samsung-soc-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: Remove secondary startup initialization from smp_prepare_cpus ARM: samsung: Limit SAMSUNG_PM_DEBUG config option to non-Exynos platforms ARM: exynos: Remove no longer needed s3c_pm_check_*() calls ARM: exynos: Remove legacy setting of external wakeup interrupts ARM: s5pv210: Remove legacy setting of external wakeup interrupts Signed-off-by: Olof Johansson commit abd488c00194fb43abde35aad44fa134794fd5b4 Merge: 767ae01748223 dabfc8364ca76 Author: Olof Johansson Date: Wed Dec 12 13:51:29 2018 -0800 Merge tag 'sunxi-core-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/soc Allwinner core changes for 4.21 A few patches to enable a new Allwinner SoC based on an armv5 CPU. * tag 'sunxi-core-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: watchdog: Add Allwinner ARMv5 F1C100s wdt ARM: sunxi: add Allwinner ARMv5 SoCs dt-bindings: arm: Add new Allwinner ARMv5 F1C100s SoC ARM: Check ARCH_MULTI_V7 to differentiate ARMv5/v7 Allwinner SoCs Signed-off-by: Olof Johansson commit 767ae01748223c6c02aa10ff657a04b76c9c2bb9 Merge: 50ba37008f6ea a2ce9a67051bb Author: Olof Johansson Date: Wed Dec 12 13:51:05 2018 -0800 Merge tag 'davinci-for-v4.21/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc DaVinci SoC updates for v4.21 ----------------------------- This set of patches moves DaVinci one step closer to not relying on at24 platform data by relying on nvmem cell lookups instead. Once other dependencies are merged, for v4.22, plan is to merge another series of patches removing at24 platform data. * tag 'davinci-for-v4.21/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da850-evm: remove unnecessary include ARM: davinci: dm850-evm: use cell nvmem lookup for mac address ARM: davinci: mityomapl138: use cell nvmem lookup for mac address ARM: davinci: da830-evm: use cell nvmem lookup for mac address ARM: davinci: dm646x-evm: use cell nvmem lookup for mac address ARM: davinci: dm644x-evm: use cell nvmem lookup for mac address ARM: davinci: dm365-evm: use cell nvmem lookup for mac address Signed-off-by: Olof Johansson commit 50ba37008f6ea249ff508c617ed57c589aa1d989 Merge: ac21e9af5a5cc 2ed29e15e4b25 Author: Olof Johansson Date: Wed Dec 12 13:49:58 2018 -0800 Merge tag 'renesas-soc-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM Based SoC Updates for v4.21 * pm-rmobile driver - Move to drivers/soc/renesas/ - Clean up struct rmobile_pm_domain * Renesas SoC Kconfig Symbols - Move symbols for ARM and SoCs to drivers/soc/renesas/ - Hide ARCH_RZN1 to improve consistency * SH-Mobile AG5 (sh73a0) SoC: Remove obsolete inclusion of * Restrict TWD and SCU to Renesas ARM based SoCs where they are present * Enable GPIOLIB on Renesas arm64 based SoCs to allow GPIO driver selection * tag 'renesas-soc-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: R-Mobile: Move pm-rmobile to drivers/soc/renesas/ ARM: shmobile: R-Mobile: Clean up struct rmobile_pm_domain ARM: shmobile: Move SoC Kconfig symbols to drivers/soc/renesas/ arm64: renesas: Move SoC Kconfig symbols to drivers/soc/renesas/ ARM: shmobile: Hide ARCH_RZN1 to improve consistency ARM: shmobile: sh73a0: Remove obsolete inclusion of ARM: shmobile: Restrict TWD support to SoCs that have it ARM: shmobile: Restrict SCU support to SoCs that have it arm64: renesas: Enable GPIOLIB to allow GPIO driver selection Signed-off-by: Olof Johansson commit 44593ea9f3bf34d92c4def133264bc43c29cd443 Merge: 42196048c6e92 bb9c90ab4eddf Author: Olof Johansson Date: Wed Dec 12 13:47:42 2018 -0800 Merge tag 'imx-defconfig-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig i.MX defconfig update for 4.21: - Enable build of i.MX7ULP SoC support. - Enable Goodix touchscreen driver which is needed by ConnectCore 6UL SBC Pro (ccimx6ulsbcpro) board support. - Enable USB_ANNOUNCE_NEW_DEVICES to help USB issue debugging and BT_BNEP to support network over bluetooth. - Remove explicit ARM_UNWIND disabling as it's selected by ARM EABI support. - Enable DA9063 PMIC for emtrion i.MX6 boards support. - Enable driver support for Pixel Pipeline (PXP) and DCP crypto block which are found on i.MX6 and i.MX7 SoCs. * tag 'imx-defconfig-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: add imx7ulp support ARM: imx_v6_v7_defconfig: Select TOUCHSCREEN_GOODIX ARM: imx_v6_v7_defconfig: Enable USB_ANNOUNCE_NEW_DEVICES ARM: imx_v6_v7_defconfig: Enable BT_BNEP ARM: imx_v6_v7_defconfig: Remove explicit ARM_UNWIND disable ARM: imx_v6_v7_defconfig: Enable DA9063 PMIC support ARM: imx_v6_v7_defconfig: Select the PXP driver ARM: imx_v6_v7_defconfig: Enable CRYPTO_DEV_MXS_DCP Signed-off-by: Olof Johansson commit 42196048c6e92ec7bbccf8fbab6358854c6f5b31 Merge: 7d1396177ca9b 24c8e4b85399b Author: Olof Johansson Date: Wed Dec 12 13:47:15 2018 -0800 Merge tag 'samsung-defconfig-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Samsung defconfig changes for v4.21 Enable drivers in exynos and multi_v7 defconfigs for MAX8952, MAX8998 (Samsung UniversalC210 board) and TC358764 (Arndale board). * tag 'samsung-defconfig-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Add TOSHIBA TC358764 bridge driver ARM: multi_v7_defconfig: Add MAX8952 regulator driver ARM: exynos_defconfig: Add TOSHIBA TC358764 bridge driver ARM: exynos_defconfig: Add MAX8952 regulator driver ARM: exynos_defconfig: Add MAX8998 RTC and charger drivers Signed-off-by: Olof Johansson commit 7d1396177ca9bc8b9cae3ab401cc229212ddb44e Merge: d72c6acee4366 4f49b73442016 Author: Olof Johansson Date: Wed Dec 12 13:46:39 2018 -0800 Merge tag 'sunxi-config64-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/defconfig Allwinner arm64 defconfig for 4.21 A bunch of patches to improve the coverage of Allwinner drivers in the arm64 defconfig, mostly targeted at adding display drivers support. * tag 'sunxi-config64-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: Enable PWM_SUN4I arm64: defconfig: Enable DRM_SUN8I_DW_HDMI arm64: defconfig: Enable DRM_SUN8I_MIXER arm64: defconfig: Enable MFD_AXP20X_I2C Signed-off-by: Olof Johansson commit 389cf4e42e204fd0117318054a4abf18ef8f80d4 Merge: efa00b24fc283 96e5da7c84242 Author: Olof Johansson Date: Wed Dec 12 13:43:54 2018 -0800 Merge tag 'tegra-for-4.21-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers memory: tegra: Changes for v4.21-rc1 This contains a single commit that adds support for the EMC driver on Tegra20. * tag 'tegra-for-4.21-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Introduce Tegra20 EMC driver Signed-off-by: Olof Johansson commit d72c6acee4366e455c780d82b577dbde0ff82422 Merge: d4907292ab19e 65a8c17a39f62 Author: Olof Johansson Date: Wed Dec 12 13:43:01 2018 -0800 Merge tag 'renesas-arm-defconfig-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig Renesas ARM Based SoC Defconfig Updates for v4.21 * Enable SII902X in shmobile defconfig * tag 'renesas-arm-defconfig-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: defconfig: Enable SII902X Signed-off-by: Olof Johansson commit efa00b24fc28393bc6fbc1c72ae192b92962e859 Merge: d1a1cc9a3fade 446e8986a2417 Author: Olof Johansson Date: Wed Dec 12 13:38:50 2018 -0800 Merge tag 'at91-4.21-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/drivers AT91 SoC for 4.21: - Add new SoC IDs * tag 'at91-4.21-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: add support in soc driver for new SAM9X60 ARM: at91: add support in soc driver for LPDDR2 SiP Signed-off-by: Olof Johansson commit c5eb1190074cfb14c5d9cac692f1912eecf1a5e4 Author: Jarkko Nikula Date: Tue Oct 23 14:45:52 2018 +0300 PCI / PM: Allow runtime PM without callback functions a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") nullified the runtime PM suspend/resume callback pointers while keeping the runtime PM enabled. This caused the SMBus PCI device to stay in D0 with /sys/devices/.../power/runtime_status showing "error" when the runtime PM framework attempted to autosuspend the device. This is due to PCI bus runtime PM, which checks for driver runtime PM callbacks and returns -ENOSYS if they are not set. Since i2c-i801.c doesn't need to do anything device-specific for runtime PM, Jean Delvare proposed this be fixed in the PCI core rather than adding dummy runtime PM callback functions in the PCI drivers. Change pci_pm_runtime_suspend()/pci_pm_runtime_resume() so they allow changing the PCI device power state during runtime PM transitions even if the driver supplies no runtime PM callbacks. This fixes the runtime PM regression on i2c-i801.c. It is not obvious why the code previously required the runtime PM callbacks. The test has been there since the code was introduced by 6cbf82148ff2 ("PCI PM: Run-time callbacks for PCI bus type"). On the other hand, a similar change was done to generic runtime PM callbacks in 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks"). Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") Reported-by: Mika Westerberg Signed-off-by: Jarkko Nikula Signed-off-by: Bjorn Helgaas Reviewed-by: Jean Delvare Reviewed-by: Rafael J. Wysocki Cc: stable@vger.kernel.org # v4.18+ commit d1a1cc9a3fadeb14ba71abd54de8b89a37113a56 Merge: e3154317a0630 f56c06271c1c3 Author: Olof Johansson Date: Wed Dec 12 13:34:14 2018 -0800 Merge tag 'amlogic-drivers-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers soc: amlogic: updates for v4.21, round 2 - meson-clk-measure: Add missing REGMAP_MMIO dependency * tag 'amlogic-drivers-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: meson-clk-measure: Add missing REGMAP_MMIO dependency Signed-off-by: Olof Johansson commit e3154317a063051a66231d43736276b5e3402f83 Merge: 8986f4c2172f9 b6444cf5fa607 Author: Olof Johansson Date: Wed Dec 12 13:33:06 2018 -0800 Merge tag 'imx-drivers-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers i.MX drivers change for 4.21: - A series from Aisheng that improves SCU power domain bindings by defining '#power-domain-cells' as 1, and adds i.MX8 SCU power domain driver support on top of it. - A series from Lucas that updates gpcv2 driver for scalability and adds i.MX8MQ support into the driver. - Increase gpc driver GPC_CLK_MAX definition to 7, as DISPLAY power domain on imx6sx has 7 clocks. * tag 'imx-drivers-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpc: Increase GPC_CLK_MAX to 7 soc: imx: gpcv2: add support for i.MX8MQ SoC soc: imx: gpcv2: move register access table to domain data soc: imx: gpcv2: prefix i.MX7 specific defines firmware: imx: add SCU power domain driver firmware: imx: add pm svc headfile dt-bindings: fsl: scu: update power domain binding firmware: imx: remove resource id enums dt-bindings: imx: add scu resource id headfile Signed-off-by: Olof Johansson commit 8986f4c2172f9d31f3eaa4e0e4a1efb2a7cbefb5 Merge: bb7ece5fc43fb 576f1b4bc8022 Author: Olof Johansson Date: Wed Dec 12 13:32:27 2018 -0800 Merge tag 'v4.20-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/drivers add helper functions to create and send commands to the global command engine (GCE) device using the command queue driver (cmdq). * tag 'v4.20-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: Add Mediatek CMDQ helper Signed-off-by: Olof Johansson commit bb7ece5fc43fb597ff965c79ddd62c3806f3e319 Merge: 2d32d65741040 d44d37cb27df5 Author: Olof Johansson Date: Wed Dec 12 13:31:43 2018 -0800 Merge tag 'sunxi-drivers-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/drivers Allwinner drivers changes for 4.21 Those patches are all about our SRAM driver, to enable new SoCs: the F1c100s, the H5 and the A64 C1 SRAM, that is used by the video decoding engine. * tag 'sunxi-drivers-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: sram: sunxi: Add compatible for the A64 SRAM C1 dt-bindings: sram: sunxi: Add bindings for the H5 with SRAM C1 dt-bindings: sram: Add Allwinner suniv F1C100s soc: sunxi: sram: Add support for the H5 SoC system control soc: sunxi: sram: Enable EMAC clock access for H3 variant soc: sunxi: Change to use DEFINE_SHOW_ATTRIBUTE macro Signed-off-by: Olof Johansson commit 2d32d65741040b2908b2d948d0925d13392caf33 Merge: 4a598c7b3f00e af51c25fb59d4 Author: Olof Johansson Date: Wed Dec 12 13:29:26 2018 -0800 Merge tag 'tegra-for-4.21-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers firmware: tegra: Changes for v4.21-rc1 These changes update the BPMP ABI header and implement a new variant of the BPMP firmware version tag query if supported. * tag 'tegra-for-4.21-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Use in-band messages for firmware version query soc/tegra: bpmp: Update ABI header firmware: tegra: Print version tag at full firmware: tegra: Switch to global mrq_is_supported() firmware: tegra: Add helper to check for supported MRQs Signed-off-by: Olof Johansson commit 4a598c7b3f00e30148a3cc2e314961328f8a277e Merge: 48ff08dd9aa93 e3e403c218cd0 Author: Olof Johansson Date: Wed Dec 12 13:28:24 2018 -0800 Merge tag 'tegra-for-4.21-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers soc/tegra: Changes for v4.21-rc1 These changes are mostly cleanups to the PMC driver, but they also add support for wake events on Tegra186 and Tegra194, which can be used to wake the system from sleep. With this and the corresponding device tree additions suspend/resume is finally working on these SoCs. * tag 'tegra-for-4.21-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Add initial Tegra194 wake events soc/tegra: pmc: Add initial Tegra186 wake events soc/tegra: pmc: Add wake event support soc/tegra: pmc: Add Tegra194 support soc/tegra: pmc: Change to use DEFINE_SHOW_ATTRIBUTE macro soc/tegra: Don't leak device tree node reference soc/tegra: fuse: Remove duplicated function declaration soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() soc/tegra: pmc: Add sysfs entries for reset info soc/tegra: pmc: Don't power-up XUSB power-domains Signed-off-by: Olof Johansson commit 48ff08dd9aa9353ece8f5bebd217e824f1c6098c Merge: 330a7809cf90f 7fc4650cc2417 Author: Olof Johansson Date: Wed Dec 12 13:27:40 2018 -0800 Merge tag 'renesas-drivers-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC Drivers Updates for v4.21 SYSC Driver: * Common - Fix power domain control after system resume - Merge PM Domain registration and linking - Remove rcar_sysc_power_{down,up}() helpers * R-Car E3 (r8a77990) SoC - Fix initialization order of 3DG-{A,B} * R-Car V3H (r8a77980) SoC - Correct A3VIP[012] power domain hierarchy - Correct names of A2DP[01] power domains * R-Car V3M (r8a77970) SoC - Correct names of A2DP/A2CN power domains - emove non-existent CR7 power domain * R-Car M3-N (r8a77965) SoC - Remove non-existent A3IR power domain * tag 'renesas-drivers-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: rcar-sysc: Fix power domain control after system resume soc: renesas: rcar-sysc: Merge PM Domain registration and linking soc: renesas: rcar-sysc: Remove rcar_sysc_power_{down,up}() helpers soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains soc: renesas: r8a77970-sysc: Remove non-existent CR7 power domain soc: renesas: r8a77965-sysc: Remove non-existent A3IR power domain Signed-off-by: Olof Johansson commit 330a7809cf90f8e6d29cb3c13e58bc7bb532b1ae Merge: 202f9977b012d c2a70a319afb9 Author: Olof Johansson Date: Wed Dec 12 13:26:49 2018 -0800 Merge tag 'pxa-for-4.21' of https://github.com/rjarzmik/linux into next/drivers This pxa update brings only a single patch, finishing the dmaengine conversion. * tag 'pxa-for-4.21' of https://github.com/rjarzmik/linux: dmaengine: pxa: make the filter function internal Signed-off-by: Olof Johansson commit 189af4657186da08a2e79fb8e906cfd82b2ccddc Author: Ard Biesheuvel Date: Thu Dec 6 09:32:57 2018 +0100 ARM: smp: add support for per-task stack canaries On ARM, we currently only change the value of the stack canary when switching tasks if the kernel was built for UP. On SMP kernels, this is impossible since the stack canary value is obtained via a global symbol reference, which means a) all running tasks on all CPUs must use the same value b) we can only modify the value when no kernel stack frames are live on any CPU, which is effectively never. So instead, use a GCC plugin to add a RTL pass that replaces each reference to the address of the __stack_chk_guard symbol with an expression that produces the address of the 'stack_canary' field that is added to struct thread_info. This way, each task will use its own randomized value. Cc: Russell King Cc: Kees Cook Cc: Emese Revfy Cc: Arnd Bergmann Cc: Laura Abbott Cc: kernel-hardening@lists.openwall.com Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook commit 5cc60b0497c38fc7357ce049f474e8bdee69e90d Merge: 33afb48f32e56 953d9f3903659 Author: Olof Johansson Date: Wed Dec 12 13:07:51 2018 -0800 Merge tag 'v4.21-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Support for the onboard LEDs of the 2 96boards (ficus, rock960), hdmi output for rockpro64, vpu node on rk3399 and adding the always on 32kHz clock on rk3399-Gru to get a more complete clock tree. * tag 'v4.21-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add on-board LED support on rk3399-rock960 arm64: dts: rockchip: Add on-board LED support on rk3399-ficus arm64: dts: rockchip: enable hdmi output on rk3399-rockpro64 arm64: dts: rockchip: add VPU device node for RK3399 arm64: dts: rockchip: Add 32k clk on rk3399-gru Signed-off-by: Olof Johansson commit 33afb48f32e56700ca77d7d345555927d205d6af Merge: 0abf32a837ed6 7841b88a8fddd Author: Olof Johansson Date: Wed Dec 12 13:06:47 2018 -0800 Merge tag 'v4.21-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt RV1108 improvements (uart-dma, clocks, interrupt numbers, gmac support timer and emmc pins) from its first real-world user. RK3188 improvements (OPPv2, cpu node updates) to prepare for a new devicetree, the BQ Edison 2 Quad-Core. VPU device node for rk3288, right now only the jpeg encoder part will be in the kernel but hopefully other codecs will follow. * tag 'v4.21-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add internal timer support for rv1108 ARM: dts: rockchip: add BQ Edison 2 QC devicetree ARM: dts: rockchip: add VPU device node for RK3288 ARM: dts: rockchip: update cpu supplies on rk3188 ARM: dts: rockchip: add phandles to secondary cpu cores ARM: dts: rockchip: add cpu-core resets for rk3188 ARM: dts: rockchip: convert rk3188 to opp-v2 ARM: dts: rockchip: add #sound-dai-cells to Cortex-A9 i2s ARM: dts: rockchip: Add UART DMA support for rv1108 ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108 ARM: dts: rockchip: Fix the PMU interrupt number for rv1108 ARM: dts: rockchip: Pass the 'arm,cpu-registers-not-fw-configured' property on rv1108 ARM: dts: rockchip: Pass the 'clock-latency' property on rv1108 ARM: dts: rockchip: Add rv1108 GMAC support ARM: dts: rockchip: add rv1108 eMMC pin settings Signed-off-by: Olof Johansson commit 0abf32a837ed68dae8991e91491dd610fb2cfda7 Merge: ac3e0be697e92 d8007306f6ad1 Author: Olof Johansson Date: Wed Dec 12 13:04:41 2018 -0800 Merge tag 'at91-4.21-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into next/dt AT91 DT for 4.21 - Switch most platforms to the new clock binding - Small improvement for Axentia nattis * tag 'at91-4.21-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: nattis: initialize the BLON pin as output-low early ARM: dts: at91: at91sam9rl: switch to new clock bindings ARM: dts: at91: at91sam9x5: switch to new clock bindings ARM: dts: at91: at91sam9263: switch to new clock bindings ARM: dts: at91: at91sam9261: switch to new clock bindings ARM: dts: at91: at91sam9260: switch to new clock bindings ARM: dts: at91: sama5d2: switch to new clock binding ARM: dts: at91: sama5d4: switch to new clock bindings ARM: dts: at91: sama5d2: use the divided clock for SMC Signed-off-by: Olof Johansson commit ac3e0be697e92413a1cd045da5550ea4bb783b72 Merge: ba97d019fc1d1 c311552a8eadf Author: Olof Johansson Date: Wed Dec 12 13:02:51 2018 -0800 Merge tag 'amlogic-dt-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt ARM: dts: Amlogic updates for v4.21, round 2 Highlights - add CPU OPP tables - timers: add global timer and TWD * tag 'amlogic-dt-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: meson8b: add the CPU OPP tables ARM: dts: meson: meson8: add the CPU OPP table ARM: dts: meson8b: add the Cortex-A5 global timer ARM: dts: meson8b: add the ARM TWD timer ARM: dts: meson8: add the Cortex-A9 global timer ARM: dts: meson8: add the ARM TWD timer ARM: dts: meson: group the Cortex-A5 / Cortex-A9 peripherals dt-bindings: clock: meson8b: export the CPU post dividers Signed-off-by: Olof Johansson commit 6059c6b1d526d47c0b9f028e106f30ad539dc323 Author: Jerry Hoemann Date: Fri Nov 30 10:35:41 2018 -0700 selftests: watchdog: Add gettimeleft command line arg Add command line argument to call and display the results of ioctl WDIOC_GETTIMELEFT. Signed-off-by: Jerry Hoemann Signed-off-by: Shuah Khan commit ba97d019fc1d12d95ed27fa878f70bd94ad5bb9b Merge: dd980900e2fc5 5fd98eb7e8ce0 Author: Olof Johansson Date: Wed Dec 12 13:01:24 2018 -0800 Merge tag 'uniphier-dt-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt UniPhier ARM SoC DT updates for v4.21 - Add bindings for all SoCs/boards of UniPhier platform - Move binding docs to socionext directory - Add all CPUs in cooling maps - Add MIO DMAC nodes * tag 'uniphier-dt-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add MIO DMAC nodes arm64: dts: uniphier: Add all CPUs in cooling maps ARM: dts: uniphier: Add all CPUs in cooling maps dt-bindings: uniphier: move cache-uniphier.txt to vendor directory dt-bindings: uniphier: add bindings for UniPhier SoC family Signed-off-by: Olof Johansson commit dd980900e2fc52951933082be97b38ff6fb6fe3e Merge: fafda335f81a6 58f5fa6837250 Author: Olof Johansson Date: Wed Dec 12 12:59:14 2018 -0800 Merge tag 'imx-dt64-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Freescale arm64 device tree update for 4.21: - Add device tree for LS1028A SoC and NXP FRWY & QDS boards support based on this SoC. - Add device tree for LX2160A SoC and NXP QDS & RDB boards support based on this SoC. - Add qdma devices for LS1043A and LS1046A SoC. - Disable PCIe device by default in SoC device tree and let board level device tree to enable as needed. - Drop compatible string "snps,dw-pcie" from LayerScape PCIe devices to avoid incorrect matching. - Move fsl-mc device as a child node of soc node, and add missing dma-ranges property for LS1088A SoC. - Update LayerScape SoCs' cooling maps to include all devices affected by individual trip points. * tag 'imx-dt64-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: ls1046a: add qdma device tree nodes arm64: dts: ls1043a: add qdma device tree nodes arm64: dts: ls1088a: Add missing dma-ranges property arm64: dts: ls1088a: Move fsl-mc node arm64: dts: fsl: Add all CPUs in cooling maps arm64: dts: Add support for NXP LS1028A SoC arm64: dts: layerscape: removed compatible string "snps,dw-pcie" arm64: dts: fsl: Add the status property disable PCIe arm64: dts: ls1012a: Add FRWY-LS1012A board support arm64: dts: add LX2160AQDS board support arm64: dts: add LX2160ARDB board support arm64: dts: add QorIQ LX2160A SoC support Signed-off-by: Olof Johansson commit fafda335f81a6e5af64a3452185299c86ec32b5e Merge: 2b6464560852f a73900b826ce6 Author: Olof Johansson Date: Wed Dec 12 12:56:36 2018 -0800 Merge tag 'imx7ulp-dt-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX7ULP device tree for 4.21: - It includes the initial device tree for i.MX7ULP SoC and EVK board support. * tag 'imx7ulp-dt-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx: add imx7ulp evk support ARM: dts: imx: add common imx7ulp dtsi support dt-bindings: fsl: add imx7ulp pm related components bindings dt-bindings: fsl: add compatible for imx7ulp evk clk: imx: add imx7ulp clk driver clk: imx: implement new clk_hw based APIs clk: imx: make mux parent strings const dt-bindings: clock: add imx7ulp clock binding doc clk: imx: add imx7ulp composite clk support clk: imx: add pfdv2 support clk: imx: add pllv4 support clk: fractional-divider: add CLK_FRAC_DIVIDER_ZERO_BASED flag support clk: imx: add gatable clock divider support Signed-off-by: Olof Johansson commit 2b6464560852f6c2ee2a37230cf29a23f324737c Merge: 80b451cd68b49 7f68ffe0617b4 Author: Olof Johansson Date: Wed Dec 12 12:55:34 2018 -0800 Merge tag 'imx7d-pico-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX7D PICO boards update for 4.21: - It contains a series from Otavio Salvador that improves i.MX7D PICO SoM, and then adds Hobbit baseboard support on top of the improvement. * tag 'imx7d-pico-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7d-pico: Add the imx7d-pico-hobbit variant ARM: dts: imx7d-pico-pi: Extend peripherals support ARM: dts: imx7d-pico: Extend peripherals support ARM: dts: imx7d-pico: Improve WiFi regulator name ARM: dts: imx7d-pico: Pass the Ethernet PHY reset GPIO ARM: dts: imx7d-pico: Pass the USBOTG1_PWR pinctrl ARM: dts: imx7d-pico-pi: Move SoM related part to imx7d-pico.dtsi ARM: dts: imx7d-pico: Switch to SPDX identifier ARM: dts: imx7d-pico: Do not harcode the memory size ARM: dts: imx7d-nitrogen7: Fix the description of the Wifi clock ARM: imx: update the cpu power up timing setting on i.mx6sx ARM: dts: imx7d-pico: Describe the Wifi clock ARM: dts: imx51-zii-rdu1: Remove EEPROM node Signed-off-by: Olof Johansson commit 80b451cd68b490ee612c7f5ca04854d488b4a20d Merge: 457a728d800a9 79da07dec740a Author: Olof Johansson Date: Wed Dec 12 12:54:48 2018 -0800 Merge tag 'imx-dt-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX device tree update for 4.21: - New boards support: emtrion emCON-MX6, imx6ul-pico-pi, imx7d-sdb-reva and vf610 based Liebherr's BK4 device, ZII SCU4 AIB board. - Add flexcan support for i.MX6UL SoC, turn on stop mode wakeup feature for flexcan, and enable devices on a few i.MX6 NXP boards. - Enable AUO G101EVN010 lcd panel and Goodix touch support for imx6ul-ccimx6ulsbcpro board. - Enable sensors support for imx6qdl-sabresd board: egalax touch, light, magnetometer and accelerometer sensor. - Switch more boards to use SPDX identifier. - Fix memory node duplication in i.MX device tree sources. - Correct GIC PPI interrupts mask for i.MX6UL and i.MX7 SoCs. - Drop 'snps,dw-pcie' compatible from LS1021A PCIe device to avoid incorrect device matching. - Add the gpu nodes for the adreno 200 GPU on iMX51 and iMX53, which are now supported by the freedreno driver. - Add DCP device support for i.MX6ULL, which requires explicit clock enabling. - Add '#thermal-sensor-cells' for thermal device and '#cooling-cells' for cooling devices. - Add missing clock information for EPIT on i.MX25 SoC. - Add PWM and qdma devices for LS1021A SoC. - Update cooling maps of LS1021A SoC to include all devices affected by individual trip points. - Random device addition and cleanup on various boards. * tag 'imx-dt-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (82 commits) ARM: dts: imx51-zii-rdu1: Do not specify "power-gpio" for hpa1 ARM: dts: imx6ul: Remove extra space between node name and brace ARM: dts: imx6qdl-sabresd: Use GPIO_ACTIVE_HIGH for regulators ARM: dts: imx6ul: add flexcan support ARM: dts: imx5: add gpu nodes ARM: dts: imx6qdl-sabresd: add accelerometer sensor support ARM: dts: imx6qdl-sabresd: add magnetometer sensor support ARM: dts: imx6qdl-sabresd: add light sensor support ARM: dts: imx6qdl-sabresd: Move regulators outside of "simple-bus" ARM: dts: imx6qdl: Fix memory node duplication ARM: dts: imx6dl-mamoj: Add a memory node ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication ARM: dts: vf610-zii-scu4-aib: Add HI8435 support ARM: dts: imx6qdl-sabresd: add egalax touch screen support on i2c2 bus ARM: dts: imx7s: Add flexcan stop mode wakeup support ARM: dts: imx6ul: Add flexcan stop mode wakeup support ARM: dts: imx6qdl: Add flexcan stop mode wakeup support ARM: dts: imx6sx: Add flexcan stop mode wakeup support ARM: dts: imx6ul-pico: Add the imx6ul-pico-pi variant ARM: dts: imx6ul-pico-hobbit: Extend peripherals support ... Signed-off-by: Olof Johansson commit 457a728d800a95ace9e4fa4a6fa8b9e00270b13c Merge: 333524bcd361c c2e66b8f7c375 Author: Olof Johansson Date: Wed Dec 12 12:53:47 2018 -0800 Merge tag 'v4.20-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into next/dt mt8173: add node for the command queue device * tag 'v4.20-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8173: Add GCE node Signed-off-by: Olof Johansson commit 333524bcd361cd13559eeda981195c35b397e0cf Merge: df6aeaef1c408 9deffb5ee78e4 Author: Olof Johansson Date: Wed Dec 12 12:53:05 2018 -0800 Merge tag 'samsung-dt64-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM64 changes for v4.21 1. Update DWC3 hardware modules to Exynos5433 specific variant. 2. Update cooling maps to include all CPU devices in multiple DTS files. * tag 'samsung-dt64-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add all CPUs in cooling maps arm64: dts: exynos: Update DWC3 modules on Exynos5433 SoCs Signed-off-by: Olof Johansson commit df6aeaef1c4083a77f13dd1437460e7565ca01a9 Merge: d4dcfc7c93436 57b13b8b34002 Author: Olof Johansson Date: Wed Dec 12 12:52:20 2018 -0800 Merge tag 'samsung-dt-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DTS ARM changes for v4.21 1. Add missing properties and nodes for PMIC clocks in multiple DTS files. 2. Add UHS-I bus speed support to Odroid XU3/XU4/HC SD card and bump the maximum clock frequency to 200 MHz for SD and eMMC. 3. Update cooling maps to include all CPU devices in multiple DTS files. 4. Enable quirks for Exynos3250 DWC. 5. Add JPEG CODEC node to S5Pv210. 6. Add opp-suspend to devfreq OPPs on Exynos4 boards to fix resuming from suspend to RAM. 7. Remove eDP from Arndale board as it does not work and breaks also DSI. * tag 'samsung-dt-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: remove display-port node from Arndale ARM: dts: exynos: Add opp-suspend to DMC and leftbus devfreq OPPs on Exynos4 ARM: dts: s5pv210: Add s5p-jpeg codec node. ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module ARM: dts: exynos: Add all CPUs in cooling maps ARM: dts: exynos: Clarify comment explaining purpose of Odroid XU3 DTSI ARM: dts: exynos: Add pin configuration for SD write protect on Odroid XU3/XU4/HC1 ARM: dts: exynos: Update maximum frequency for eMMC to 200MHz on Odroid XU3/XU4 ARM: dts: exynos: Update maximum frequency for SD card to 200MHz on Odroid XU3/XU4/HC1 ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 ARM: dts: exynos: Add UHS-I bus speed support to Odroid XU3/XU4/HC1 ARM: dts: exynos: Add missing clocks to RTC node for Arndale board ARM: dts: exynos: Add compatible for s5m8767 clocks node on Itop Core ARM: dts: exynos: Add compatible for s2mps11 clocks node on Exynos542x Signed-off-by: Olof Johansson commit d4dcfc7c93436d84421415286bc6aa95d1c96558 Merge: e7828317a479e dfc1259a3f7a1 Author: Olof Johansson Date: Wed Dec 12 12:51:46 2018 -0800 Merge tag 'mvebu-dt64-4.21-1' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt64 for 4.21 (part 1) - complete the description of the clearfog-gt-8k board (Armada 8040 based board) - declare eMMC on espressobin (Armada 3720 based board) which still need to be enable by the bootloader as it is not present on all the board. - add a new version of the Macchiatobin (Armada 8040 based board): the Single Shot (without the 10G 3310 PHYs). * tag 'mvebu-dt64-4.21-1' of git://git.infradead.org/linux-mvebu: arm64: dts: clearfog-gt-8k: describe mini-PCIe CON2 USB arm64: dts: add support for Macchiatobin Single Shot board arm64: dts: marvell: armada-37xx: Enable emmc on espressobin arm64: dts: marvell: armada37xx: Add emmc/sdio pinctrl definition arm64: dts: clearfog-gt-8k: enable mini-PCIe CON2 USB arm64: dts: clearfog-gt-8k: 1G eth PHY reset signal arm64: dts: clearfog-gt-8k: fix USB regulator gpio polarity Signed-off-by: Olof Johansson commit e7828317a479eb6fd06bbf5010ed80a9b8a5506b Merge: ee261c7e822a5 1504b91c81935 Author: Olof Johansson Date: Wed Dec 12 12:50:46 2018 -0800 Merge tag 'qcom-arm64-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm ARM64 Updates for v4.21 Part 2 * Switch to use dwc3-qcom glue driver on MSM8996 * Fix issue with xo clk name on MSM8998 * Add cooling maps on MSM8916 * Add UART nodes on SDM845 * Add camera subsystem support on MSM8996 and MSM8916 * tag 'qcom-arm64-for-4.21-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: msm8996: Use dwc3-qcom glue driver for USB arm64: dts: qcom: msm8998: Fixup clock to use xo_board arm64: dts: qcom: sdm845: Add UART nodes arm64: dts: qcom: msm8996: Add CAMSS support arm64: dts: qcom: msm8996: Add VFE SMMU node arm64: dts: qcom: Add pinctrls for camera sensors arm64: dts: qcom: Add Camera Control Interface pinctrls arm64: dts: qcom: msm8916: Add CAMSS support arm64: dts: qcom: msm8916: Add IOMMU sub-node for VFE context bank arm64: dts: msm8916: Add all CPUs in cooling maps Signed-off-by: Olof Johansson commit ee261c7e822a53a257b4c03997398a3f8a76ec8d Merge: 2c94db389bbae 44ff3cafcd7f4 Author: Olof Johansson Date: Wed Dec 12 12:50:00 2018 -0800 Merge tag 'sunxi-dt64-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner arm64 DT changes for 4.21 Our usual set of arm64 DT changes, with the biggest additions being: - Support for the video decoding engine in the A64 - Support for the audio codec in the A64 - USB Support in the H6 - HDMI Support in the H6 - EMAC Support in the H6 - New board: Orange Pi Lite2 * tag 'sunxi-dt64-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (27 commits) arm64: dts: allwinner: a64: Fix up RTC device node and clock references arm64: dts: allwinner: a64: Add Video Engine node arm64: dts: allwinner: a64: Add support for the SRAM C1 section arm64: dts: allwinner: a64: pinebook: enable power supplies arm64: dts: allwinner: a64: sopine-baseboard: enable power supplies arm64: dts: allwinner: axp803: add AC and battery power supplies arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec arm64: dts: allwinner: a64: enable sound on Pinebook arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine arm64: dts: allwinner: a64: add nodes necessary for analog sound support arm64: dts: allwinner: h6: orangepi: Add device nodes for LEDs arm64: dts: allwinner: h6: orangepi: Enable USB 2.0 host and OTG ports arm64: dts: allwinner: h6: orangepi: Add board-wide 5V regulator arm64: dts: allwinner: h6: fix EMAC compatible string sequence arm64: dts: allwinner: a64: Add device node for Mali-400 GPU dt-bindings: gpu: mali-utgard: Add compatible for A64 Mali arm64: dts: allwinner: h6: enable USB2 on Pine H64 arm64: dts: allwinner: h6: add USB Vbus regulator for Pine H64 arm64: dts: allwinner: h6: add USB2-related device nodes arm64: dts: allwinner: h6: Enable HDMI output on Pine H64 board ... Signed-off-by: Olof Johansson commit 2c94db389bbae850a6f353d9b93ee22c170d8497 Merge: 91eac9139ed44 5719ac19fc32d Author: Olof Johansson Date: Wed Dec 12 12:48:57 2018 -0800 Merge tag 'sunxi-dt-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.21 This is a quite big pull request this time, with a huge number of changes (and patches) due to us fixing the vast majority of the DTC warnings our DT had. We also have a bunch of other good, more meaningful, changes: - Support for the new Allwinner T3 (rebranded R40) and f1c100s (armv5) SoCs - AXP803 PMIC AC Power supply support - Rework of the oscillators tree - Two new boards: the t3-cqa3t-bv3 and Lichee Pi Nano Plus a few enhancements here and there. * tag 'sunxi-dt-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (84 commits) ARM: dts: sunxi: Fix PMU compatible strings ARM: dts: sun8i: r40: Add RTC device node ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock references ARM: dts: sun8i: a23/a33: Fix up RTC device node ARM: dts: sun8i: r40: Add clock accuracy for external oscillators ARM: dts: sunxi: h3/h5: Add clock accuracy for external oscillators ARM: dts: sun8i: a33: Drop audio codec oversampling rate to 128 fs ARM: dts: sun8i: h3: Remove unnecessary reserved memory node ARM: dts: sun8i: a33: Remove unnecessary reserved memory node ARM: dts: suniv: Add device tree for Lichee Pi Nano ARM: dts: suniv: add initial DTSI file for F1C100s ARM: dts: axp81x: add AC power supply subnode ARM: dts: sun8i: v3s: Remove skeleton and memory to avoid warnings ARM: dts: sun8i: v3s: Provide default muxing for relevant controllers ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning ARM: dts: sun8i: v3s: Change LRADC node names to avoid warnings ARM: dts: sun8i: h3: Remove leading zeros from unit-addresses ARM: dts: sun8i: BPI-M2M: Remove i2c nodes ARM: dts: sun8i: a23/a33: Provide default muxing for relevant controllers ARM: dts: sunxi: reference: Move the muxing back to the common DTSI ... Signed-off-by: Olof Johansson commit 674e78acae0dfb4beb56132e41cbae5b60f7d662 Author: Nicholas Kazlauskas Date: Wed Dec 5 14:59:07 2018 -0500 drm/amd/display: Add fast path for cursor plane updates [Why] Legacy cursor plane updates from drm helpers go through the full atomic codepath. A high volume of cursor updates through this slow code path can cause subsequent page-flips to skip vblank intervals since each individual update is slow. This problem is particularly noticeable for the compton compositor. [How] A fast path for cursor plane updates is added by using DRM asynchronous commit support provided by async_check and async_update. These don't do a full state/flip_done dependency stall and they don't block other commit work. However, DC still expects itself to be single-threaded for anything that can issue register writes. Screen corruption or hangs can occur if write sequences overlap. Every call that potentially perform register writes needs to be guarded for asynchronous updates to work. The dc_lock mutex was added for this. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106175 Signed-off-by: Nicholas Kazlauskas Acked-by: Andrey Grodzovsky Reviewed-by Leo Li Signed-off-by: Alex Deucher commit 9422f5871d5d9ad9e168e1329a43cf9169b04712 Author: Paolo Cretaro Date: Tue Nov 13 09:45:43 2018 +0100 vfio/mdev: add static modifier to add_mdev_supported_type Set add_mdev_supported_type as static since it is only used within mdev_sysfs.c. This fixes -Wmissing-prototypes gcc warning. Signed-off-by: Paolo Cretaro Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit e309df5b0c9e67cc929eedd3e32f4907fa49543e Author: Alex Williamson Date: Wed Dec 12 12:51:07 2018 -0700 vfio/pci: Parallelize device open and release In commit 61d792562b53 ("vfio-pci: Use mutex around open, release, and remove") a mutex was added to freeze the refcnt for a device so that we can handle errors and perform bus resets on final close. However, bus resets can be rather slow and a global mutex here is undesirable. Evaluating the potential locking granularity, a per-device mutex provides the best resolution but with multiple devices on a bus all released concurrently, they'll race to acquire each other's mutex, likely resulting in no reset at all if we use trylock. We therefore lock at the granularity of the bus/slot reset as we're only attempting a single reset for this group of devices anyway. This allows much greater scaling as we're bounded in the number of devices protected by a single reflck object. Reported-by: Christian Ehrhardt Tested-by: Christian Ehrhardt Reviewed-by: Eric Auger Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit fc42d47ce0118e2f59a67ac0b0da56f9dc454bd9 Author: Andrey Grodzovsky Date: Tue Dec 11 15:31:35 2018 -0500 drm/amdgpu: Enable GPU recovery by default for CI I retested Bonaire (gfx7 dGPU) and it works fine. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b47f515bdcd4e22b0b87141157c9ee8bc7c9bb98 Merge: 0a1213fa74327 69c32972d5938 Author: Will Deacon Date: Wed Dec 12 18:59:39 2018 +0000 Merge branch 'for-next/perf' into aarch64/for-next/core Merge in arm64 perf and PMU driver updates, including support for the system/uncore PMU in the ThunderX2 platform. commit 0a1213fa7432778b71a1c0166bf56660a3aab030 Author: Ard Biesheuvel Date: Wed Dec 12 13:08:44 2018 +0100 arm64: enable per-task stack canaries This enables the use of per-task stack canary values if GCC has support for emitting the stack canary reference relative to the value of sp_el0, which holds the task struct pointer in the arm64 kernel. The $(eval) extends KBUILD_CFLAGS at the moment the make rule is applied, which means asm-offsets.o (which we rely on for the offset value) is built without the arguments, and everything built afterwards has the options set. Reviewed-by: Kees Cook Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit db23d88756abd38e0995ea8449d0025b3de4b26b Author: Evan Green Date: Tue Dec 4 11:14:19 2018 -0800 iio: adc: qcom-spmi-adc5: Initialize prescale properly adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, and then puts the result into adc->chan_props. The problem is adc5_get_dt_channel_data may not initialize that structure fully, so a garbage value is used for prescale if the optional "qcom,pre-scaling" is not defined in DT. adc5_read_raw then uses this as an array index, generating a crash that looks like this: [ 6.683186] Unable to handle kernel paging request at virtual address ffffff90e78c7964 Call trace: qcom_vadc_scale_code_voltage_factor+0x74/0x104 qcom_vadc_scale_hw_calib_die_temp+0x20/0x60 qcom_adc5_hw_scale+0x78/0xa4 adc5_read_raw+0x3d0/0x65c iio_channel_read+0x240/0x30c iio_read_channel_processed+0x10c/0x150 qpnp_tm_get_temp+0xc0/0x40c of_thermal_get_temp+0x7c/0x98 thermal_zone_get_temp+0xac/0xd8 thermal_zone_device_update+0xc0/0x38c qpnp_tm_probe+0x624/0x81c platform_drv_probe+0xe4/0x11c really_probe+0x188/0x3fc driver_probe_device+0xb8/0x188 __device_attach_driver+0x114/0x180 bus_for_each_drv+0xd8/0x118 __device_attach+0x180/0x27c device_initial_probe+0x20/0x2c bus_probe_device+0x78/0x124 deferred_probe_work_func+0xfc/0x138 process_one_work+0x3d8/0x8b0 process_scheduled_works+0x48/0x6c worker_thread+0x488/0x7cc kthread+0x24c/0x264 ret_from_fork+0x10/0x18 Unfortunately, when I went to add the initializer for this and tried to boot it, my machine shut down immediately, complaining that it was hotter than the sun. It appears that adc5_chans_pmic and adc5_chans_rev2 were initializing prescale_index as if it were directly a divisor, rather than the index into adc5_prescale_ratios that it is. Fix the uninitialized value, and change the static initialization to use indices into adc5_prescale_ratios. Signed-off-by: Evan Green Reviewed-by: Matthias Kaehlcke Cc: Signed-off-by: Jonathan Cameron commit a9b0a2a7c19316588421b94946c8e2e5a84ac14e Author: Jonathan Bakker Date: Fri Dec 7 20:11:36 2018 +0100 dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Add information about new compatible for S5PV210 Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Jonathan Cameron commit fa09d06522ceac428fdc5c2b57c572f6cfd0a8bb Author: Ondrej Jirman Date: Fri Dec 7 10:56:01 2018 -0500 media: v4l2-fwnode: Fix setting V4L2_MBUS_DATA_ACTIVE_HIGH/LOW flag When parallel bus is used and data-active is being parsed, incorrect flags are cleared. Clear the correct flag bits. Fixes: e9be1b863e2c2948deb003df8edd9635b4611a8a (media: v4l: fwnode: Use default parallel flags). Cc: stable@vger.kernel.org # for Kernel 4.20 Signed-off-by: Ondrej Jirman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d1655c7f4871eea894921fbff65d4a7e1d17f763 Author: Jonathan Bakker Date: Fri Dec 7 20:11:35 2018 +0100 iio: adc: Allow selection of Exynos ADC on S5PV210 Make it possible to use Exynos ADC driver on S5PV210 based devices. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Jonathan Cameron commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 Author: Jonathan Bakker Date: Fri Dec 7 20:11:34 2018 +0100 iio: adc: exynos-adc: Add S5PV210 variant S5PV210's ADC variant is almost the same as v1 except that it has 10 channels and doesn't require the pmu register Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Jonathan Cameron commit d2b4387f3bdf016e266d23cf657465f557721488 Author: Eddie James Date: Tue Dec 11 11:57:01 2018 -0500 media: platform: Add Aspeed Video Engine driver The Video Engine (VE) embedded in the Aspeed AST2400 and AST2500 SOCs can capture and compress video data from digital or analog sources. With the Aspeed chip acting a service processor, the Video Engine can capture the host processor graphics output. Add a V4L2 driver to capture video data and compress it to JPEG images. Make the video frames available through the V4L2 streaming interface. Signed-off-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8a582fa9429108c247ff56dfbc4e3ead08a76956 Author: Claudiu Beznea Date: Tue Dec 11 15:56:59 2018 +0000 regulator: add documentation for regulator modes and suspend states Add documentation for regulator modes and suspend states. Signed-off-by: Claudiu Beznea Signed-off-by: Mark Brown commit b5ebba46e694a6e8e4322a80bb2a5a448f8f8b04 Author: Claudiu Beznea Date: Tue Dec 11 15:56:50 2018 +0000 regulator: act8945a-regulator: add shutdown function Implement shutdown method to make sure the PMIC will not enter the suspend state when the system is shutdown. This work is based on work done by Borris Brezillon on [1]. [1] https://www.spinics.net/lists/kernel/msg2942960.html Signed-off-by: Claudiu Beznea Signed-off-by: Mark Brown commit 03ffbf9c0891caf8723c81967ceea5faf5d099d5 Author: Claudiu Beznea Date: Tue Dec 11 15:56:45 2018 +0000 regulator: act8945a-regulator: fix line over 80 chars warning Fix line over 80 chars checkpatch.pl warning. Signed-off-by: Claudiu Beznea Signed-off-by: Mark Brown commit 7482d6ecc68e16a2b8272b0c9cbcc5c50edf013f Author: Boris Brezillon Date: Tue Dec 11 15:56:41 2018 +0000 regulator: act8945a-regulator: Implement PM functionalities The regulator supports a dedicated suspend mode. Implement the appropriate ->set_suspend_xx() hooks, add support for ->set_mode(), and provide basic PM ops functionalities to setup the regulator in a suspend state when the system is entering suspend. Signed-off-by: Boris Brezillon [claudiu.beznea@microchip.com: remove shutdown function, use dev_pm_ops, fix checkpatch warning, adapt commit message, add LDO modes support, move modes constants to active-semi,8945a-regulator.h, remove rdevs from struct act8945a_pmic, add op_mode to act8945a_pmic] Signed-off-by: Claudiu Beznea Signed-off-by: Mark Brown commit 90bc8ac220aab82df91322e67587d0418ec3b251 Author: Claudiu Beznea Date: Tue Dec 11 15:56:36 2018 +0000 regulator: act8945a-regulator: unlock expert registers Unlock expert registers for act8945a. This is based on orginal work of Boris Brezillon at [1]. [1] https://www.spinics.net/lists/kernel/msg2942960.html Signed-off-by: Claudiu Beznea Signed-off-by: Mark Brown commit f306d76082358fa9a3fb3e66674a5852bb48845f Author: Linus Walleij Date: Tue Dec 11 10:53:19 2018 +0100 regulator: arizona-ldo1: Rely on core to handle GPIO descriptor After making sure that the regulator core always take over handling of the GPIO descriptors, the gpiod_put() on the errorpath of the Arizona LDO1 driver becomes redundant. Reported-by: Charles Keepax Signed-off-by: Linus Walleij Acked-by: Charles Keepax Signed-off-by: Mark Brown commit 355e3532132b487ebf6a4900fad8f3525fa3e137 Author: Omar Sandoval Date: Wed Dec 12 08:46:32 2018 -0800 xfs: cache minimum realtime summary level The realtime summary is a two-dimensional array on disk, effectively: u32 rsum[log2(number of realtime extents) + 1][number of blocks in the bitmap] rsum[log][bbno] is the number of extents of size 2**log which start in bitmap block bbno. xfs_rtallocate_extent_near() uses xfs_rtany_summary() to check whether rsum[log][bbno] != 0 for any log level. However, the summary array is stored in row-major order (i.e., like an array in C), so all of these entries are not adjacent, but rather spread across the entire summary file. In the worst case (a full bitmap block), xfs_rtany_summary() has to check every level. This means that on a moderately-used realtime device, an allocation will waste a lot of time finding, reading, and releasing buffers for the realtime summary. In particular, one of our storage services (which runs on servers with 8 very slow CPUs and 15 8 TB XFS realtime filesystems) spends almost 5% of its CPU cycles in xfs_rtbuf_get() and xfs_trans_brelse() called from xfs_rtany_summary(). One solution would be to also store the summary with the dimensions swapped. However, this would require a disk format change to a very old component of XFS. Instead, we can cache the minimum size which contains any extents. We do so lazily; rather than guaranteeing that the cache contains the precise minimum, it always contains a loose lower bound which we tighten when we read or update a summary block. This only uses a few kilobytes of memory and is already serialized via the realtime bitmap and summary inode locks, so the cost is minimal. With this change, the same workload only spends 0.2% of its CPU cycles in the realtime allocator. Signed-off-by: Omar Sandoval Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2c2d9d3a205afa93bf6105e4ab6f1ff536291dc6 Author: Darrick J. Wong Date: Wed Dec 12 08:46:26 2018 -0800 xfs: count inode blocks correctly in inobt scrub A big block filesystem might require more than one inobt record to cover all the inodes in the block. In these cases it is not correct to round the irec count up to the nearest block because this causes us to overestimate the number of inode blocks we expect to find. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c1b4a321ede083521b91c314e1c4fa233ac33740 Author: Darrick J. Wong Date: Wed Dec 12 08:46:25 2018 -0800 xfs: precalculate cluster alignment in inodes and blocks Store the inode cluster alignment information in units of inodes and blocks in the mount data so that we don't have to keep recalculating them. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 83dcdb4469e759f984db92616d7885fc14329841 Author: Darrick J. Wong Date: Wed Dec 12 08:46:25 2018 -0800 xfs: precalculate inodes and blocks per inode cluster Store the number of inodes and blocks per inode cluster in the mount data so that we don't have to keep recalculating them. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 43004b2a8da2652b5ec526269a8acfba7d3d219c Author: Darrick J. Wong Date: Wed Dec 12 08:46:24 2018 -0800 xfs: add a block to inode count converter Add new helpers to convert units of fs blocks into inodes, and AG blocks into AG inodes, respectively. Convert all the open-coded conversions and XFS_OFFBNO_TO_AGINO(, , 0) calls to use them, as appropriate. The OFFBNO_TO_AGINO macro is retained for xfs_repair. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 7280fedaf3a0f9097c0621c7d5b35849954d7f54 Author: Darrick J. Wong Date: Wed Dec 12 08:46:23 2018 -0800 xfs: remove xfs_rmap_ag_owner and friends Owner information for static fs metadata can be defined readonly at build time because it never changes across filesystems. This enables us to reduce stack usage (particularly in scrub) because we can use the statically defined oinfo structures. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 66e3237e724c6650dca03627b40bb00a812d3f7a Author: Darrick J. Wong Date: Wed Dec 12 08:46:23 2018 -0800 xfs: const-ify xfs_owner_info arguments Only certain functions actually change the contents of an xfs_owner_info; the rest can accept a const struct pointer. This will enable us to save stack space by hoisting static owner info types to be const global variables. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 02b100fb83f9b0f8719deef6c4ed973b4d9ce00c Author: Darrick J. Wong Date: Wed Dec 12 08:46:22 2018 -0800 xfs: streamline defer op type handling There's no need to bundle a pointer to the defer op type into the defer op control structure. Instead, store the defer op type enum, which enables us to shorten some of the lines. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Brian Foster commit bc9f2b7c8a732d896753709cc9d495780ba7e9f9 Author: Darrick J. Wong Date: Wed Dec 12 08:46:22 2018 -0800 xfs: idiotproof defer op type configuration Recently, we forgot to port a new defer op type to xfsprogs, which caused us some userspace pain. Reorganize the way we make libxfs clients supply defer op type information so that all type information has to be provided at build time instead of risky runtime dynamic configuration. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Brian Foster commit 43feeea88c9cb2955b9f7ba8152ec5abeea42810 Author: Dave Chinner Date: Wed Dec 12 08:46:21 2018 -0800 xfs: zero length symlinks are not valid A log recovery failure has been reproduced where a symlink inode has a zero length in extent form. It was caused by a shutdown during a combined fstress+fsmark workload. The underlying problem is the issue in xfs_inactive_symlink(): the inode is unlocked between the symlink inactivation/truncation and the inode being freed. This opens a window for the inode to be written to disk before it xfs_ifree() removes it from the unlinked list, marks it free in the inobt and zeros the mode. For shortform inodes, the fix is simple. xfs_ifree() clears the data fork state, so there's no need to do it in xfs_inactive_symlink(). This means the shortform fork verifier will not see a zero length data fork as it mirrors the inode size through to xfs_ifree()), and hence if the inode gets written back and the fork verifiers are run they will still see a fork that matches the on-disk inode size. For extent form (remote) symlinks, it is a little more tricky. Here we explicitly set the inode size to zero, so the above race can lead to zero length symlinks on disk. Because the inode is unlinked at this point (i.e. on the unlinked list) and unreferenced, it can never be seen again by a user. Hence when we set the inode size to zeor, also change the type to S_IFREG. xfs_ifree() expects S_IFREG inodes to be of zero length, and so this avoids all the problems of zero length symlinks ever hitting the disk. It also avoids the problem of needing to handle zero length symlink inodes in log recovery to replay the extent free intents and the remaining deferops to free the extents the symlink used. Also add a couple of asserts to warn us if zero length symlinks end up in either the symlink create or inactivation paths. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit daa531db8a09dc00084a6030c81f2555a8de70ac Author: Linus Walleij Date: Tue Dec 11 10:53:18 2018 +0100 regulator: wm8994: Rely on core to handle GPIO descriptor After making sure that the regulator core always take over handling of the GPIO descriptors, the gpiod_put() on the errorpath of the wm8994 driver becomes redundant. Reported-by: Charles Keepax Signed-off-by: Linus Walleij Acked-by: Charles Keepax Signed-off-by: Mark Brown commit 95f0455c549cb926804f71cadb9be8b0af792e00 Author: Eddie James Date: Tue Dec 11 11:57:00 2018 -0500 media: dt-bindings: media: Add Aspeed Video Engine binding documentation Document the bindings. Signed-off-by: Eddie James Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c4ce794ee7aa31d7330ea3616f9d63444df1728 Author: Colin Ian King Date: Wed Dec 12 08:46:20 2018 -0800 xfs: clean up indentation issues, remove an unwanted space There is a statement that has an unwanted space in the indentation. Remove it. Signed-off-by: Colin Ian King Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fe5ed6c22e94b131ed5608d66ebce1efc39a7edb Author: Pan Bian Date: Wed Dec 12 08:46:20 2018 -0800 xfs: libxfs: move xfs_perag_put late The function xfs_alloc_get_freelist calls xfs_perag_put to drop the reference. However, pag->pagf_btreeblks is read and written after the put operation. This patch moves the put operation later. Signed-off-by: Pan Bian Reviewed-by: Carlos Maiolino [darrick: minor changelog edits] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d6f215f359637db116f0a671cc445317ea82d01e Author: Darrick J. Wong Date: Wed Dec 12 08:46:19 2018 -0800 xfs: split up the xfs_reflink_end_cow work into smaller transactions In xfs_reflink_end_cow, we allocate a single transaction for the entire end_cow operation and then loop the CoW fork mappings to move them to the data fork. This design fails on a heavily fragmented filesystem where an inode's data fork has exactly one more extent than would fit in an extents-format fork, because the unmap can collapse the data fork into extents format (freeing the bmbt block) but the remap can expand the data fork back into a (newly allocated) bmbt block. If the number of extents we end up remapping is large, we can overflow the block reservation because we reserved blocks assuming that we were adding mappings into an already-cleared area of the data fork. Let's say we have 8 extents in the data fork, 8 extents in the CoW fork, and the data fork can hold at most 7 extents before needing to convert to btree format; and that blocks A-P are discontiguous single-block extents: 0......7 D: ABCDEFGH C: IJKLMNOP When a write to file blocks 0-7 completes, we must remap I-P into the data fork. We start by removing H from the btree-format data fork. Now we have 7 extents, so we convert the fork to extents format, freeing the bmbt block. We then move P into the data fork and it now has 8 extents again. We must convert the data fork back to btree format, requiring a block allocation. If we repeat this sequence for blocks 6-5-4-3-2-1-0, we'll need a total of 8 block allocations to remap all 8 blocks. We reserved only enough blocks to handle one btree split (5 blocks on a 4k block filesystem), which means we overflow the block reservation. To fix this issue, create a separate helper function to remap a single extent, and change _reflink_end_cow to call it in a tight loop over the entire range we're completing. As a side effect this also removes the size restrictions on how many extents we can end_cow at a time, though nobody ever hit that. It is not reasonable to reserve N blocks to remap N blocks. Note that this can be reproduced after ~320 million fsx ops while running generic/938 (long soak directio fsx exerciser): XFS: Assertion failed: tp->t_blk_res >= tp->t_blk_res_used, file: fs/xfs/xfs_trans.c, line: 116 Call Trace: xfs_trans_dup+0x211/0x250 [xfs] xfs_trans_roll+0x6d/0x180 [xfs] xfs_defer_trans_roll+0x10c/0x3b0 [xfs] xfs_defer_finish_noroll+0xdf/0x740 [xfs] xfs_defer_finish+0x13/0x70 [xfs] xfs_reflink_end_cow+0x2c6/0x680 [xfs] xfs_dio_write_end_io+0x115/0x220 [xfs] iomap_dio_complete+0x3f/0x130 iomap_dio_rw+0x3c3/0x420 xfs_file_dio_aio_write+0x132/0x3c0 [xfs] xfs_file_write_iter+0x8b/0xc0 [xfs] __vfs_write+0x193/0x1f0 vfs_write+0xba/0x1c0 ksys_write+0x52/0xc0 do_syscall_64+0x50/0x160 entry_SYSCALL_64_after_hwframe+0x49/0xbe Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit b7169ddea2f2a90538f606688adf4948f2da82ce Author: Kuninori Morimoto Date: Wed Dec 12 16:03:58 2018 +0900 ASoC: rsnd: remove RSND_REG_ from rsnd_reg Current rsnd is using RSND_REG_xxx for register naming, and using RSND_REG_##f style macro for read/write. The biggest reason why it uses this style is that we can avoid non-existing register access. But, its demerit is sequential register access code will be very ugly. Current rsnd driver is well tested, so, let's remove RSND_REG_ from rsnd_reg, and cleanup sequential register access code. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit 25ac3da61ba144f8dbfe377eeec6b1da7ad0854a Author: Przemyslaw Gaj Date: Wed Dec 12 11:39:40 2018 +0000 i3c: master: cdns: fix I2C transfers in Cadence I3C master driver This patch fixes I2C transfers in Cadence I3C master driver. There was no way to queue more than one I2C transfer before. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Przemyslaw Gaj Signed-off-by: Boris Brezillon commit 4868d2b662f55ff2e27e92c44b14016531a022a0 Author: Christian Borntraeger Date: Wed Dec 12 15:59:29 2018 +0100 MAINTAINERS/vfio-ccw: add Farhan and Eric, make Halil Reviewer Eric and Farhan will help with maintaining vfio-ccw. Cc: Cornelia Huck Cc: Halil Pasic Cc: Farhan Ali Cc: Eric Farman Signed-off-by: Christian Borntraeger Message-Id: <20181212145929.136522-1-borntraeger@de.ibm.com> Acked-by: Halil Pasic Acked-by: Farhan Ali Acked-by: Eric Farman Signed-off-by: Cornelia Huck commit 0bcc547ec4b03a0b66615694561cce9c5a9a1014 Author: Masahiro Yamada Date: Tue Dec 11 20:00:50 2018 +0900 kconfig: clean up EOF handling in the lexer A new file should always start in the INITIAL state. When the lexer bumps into EOF, the lexer must get back to the INITIAL state anyway. Remove the redundant <> pattern in the PARAM state. Signed-off-by: Masahiro Yamada commit cc66bca775eeb81ef24456338bcd97e2e780c236 Author: Masahiro Yamada Date: Tue Dec 11 20:00:49 2018 +0900 kconfig: fix ambiguous grammar in terms of new lines This commit decreases 8 shift/reduce conflicts. A certain amount of grammatical ambiguity comes from how to reduce excessive T_EOL tokens. Let's take a look at the example code below: 1 config A 2 bool "a" 3 4 depends on B 5 6 config B 7 def_bool y The line 3 is melt into "config_option_list", but the line 5 can be either a part of "config_option_list" or "common_stmt" by itself. Currently, the lexer converts '\n' to T_EOL verbatim. In Kconfig, a new line works as a statement terminator, but new lines in empty lines are not critical since empty lines (or lines that contain only whitespaces/comments) are just no-op. If the lexer simply discards no-op lines, the parser will not be bothered by excessive T_EOL tokens. Of course, this means we are shifting the complexity from the parser to the lexer, but it is much easier than tackling on shift/reduce conflicts. I introduced the second stage lexer to tweak the behavior. Discard T_EOL if the previous token is T_EOL or T_HELPTEXT. Two T_EOL tokens in a row is meaningless. T_HELPTEXT is a special token that is reduced without T_EOL. Signed-off-by: Masahiro Yamada commit 21c5ecf60472be9f1b5bfe0b94870bef93db4202 Author: Masahiro Yamada Date: Tue Dec 11 20:00:48 2018 +0900 kconfig: refactor pattern matching in STRING state Here, similar matching patters are duplicated in order to look ahead the '\n' character. If the next character is '\n', the lexer returns T_WORD_QUOTE because it must be prepared to return T_EOL at the next match. Use unput('\n') trick to reduce the code duplication. Signed-off-by: Masahiro Yamada commit be3c8075978a420b6eae944250bf336aa11d4964 Author: Masahiro Yamada Date: Tue Dec 11 20:00:47 2018 +0900 kconfig: remove unneeded pattern matching to whitespaces Whitespaces are consumed in the COMMAND state anyway. Signed-off-by: Masahiro Yamada commit 413cd19d81fd675c6932abf91fe2b54d5ae72c7d Author: Masahiro Yamada Date: Tue Dec 11 20:00:46 2018 +0900 kconfig: require T_EOL to reduce visible statement All line-oriented statements should be reduced when seeing a T_EOL token. I guess missing T_EOL for the "visible" statement is just a mistake. This commit decreases one shift/reduce conflict. Signed-off-by: Masahiro Yamada commit fbac5977d81cb2b2b7e37b11c459055d9585273c Author: Masahiro Yamada Date: Tue Dec 11 20:00:45 2018 +0900 kconfig: fix memory leak when EOF is encountered in quotation An unterminated string literal followed by new line is passed to the parser (with "multi-line strings not supported" warning shown), then handled properly there. On the other hand, an unterminated string literal at end of file is never passed to the parser, then results in memory leak. [Test Code] ----------(Kconfig begin)---------- source "Kconfig.inc" config A bool "a" -----------(Kconfig end)----------- --------(Kconfig.inc begin)-------- config B bool "b\No new line at end of file ---------(Kconfig.inc end)--------- [Summary from Valgrind] Before the fix: LEAK SUMMARY: definitely lost: 16 bytes in 1 blocks ... After the fix: LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks ... Eliminate the memory leak path by handling this case. Of course, such a Kconfig file is wrong already, so I will add an error message later. Signed-off-by: Masahiro Yamada commit 77c1c0fa8b1477c5799bdad65026ea5ff676da44 Author: Masahiro Yamada Date: Tue Dec 11 20:00:44 2018 +0900 kconfig: fix file name and line number of warn_ignored_character() Currently, warn_ignore_character() displays invalid file name and line number. The lexer should use current_file->name and yylineno, while the parser should use zconf_curname() and zconf_lineno(). This difference comes from that the lexer is always going ahead of the parser. The parser needs to look ahead one token to make a shift/reduce decision, so the lexer is requested to scan more text from the input file. This commit fixes the warning message from warn_ignored_character(). [Test Code] ----(Kconfig begin)---- / -----(Kconfig end)----- [Output] Before the fix: :0:warning: ignoring unsupported character '/' After the fix: Kconfig:1:warning: ignoring unsupported character '/' Signed-off-by: Masahiro Yamada commit d288d95842f1503414b7eebce3773bac3390457e Author: Jan Kara Date: Wed Dec 12 14:29:20 2018 +0100 udf: Fix BUG on corrupted inode When inode is corrupted so that extent type is invalid, some functions (such as udf_truncate_extents()) will just BUG. Check that extent type is valid when loading the inode to memory. Reported-by: Anatoly Trosinenko Signed-off-by: Jan Kara commit 4ab215061554ae2a4b78744a5dd3b3c6639f16a7 Author: Robin Murphy Date: Tue Dec 11 18:48:48 2018 +0000 arm64: Add memory hotplug support Wire up the basic support for hot-adding memory. Since memory hotplug is fairly tightly coupled to sparsemem, we tweak pfn_valid() to also cross-check the presence of a section in the manner of the generic implementation, before falling back to memblock to check for no-map regions within a present section as before. By having arch_add_memory(() create the linear mapping first, this then makes everything work in the way that __add_section() expects. We expect hotplug to be ACPI-driven, so the swapper_pg_dir updates should be safe from races by virtue of the global device hotplug lock. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 6e4ede698d1c17102e42c6f734f7d8cf60df28d5 Author: Will Deacon Date: Wed Dec 12 14:17:20 2018 +0000 arm64: percpu: Fix LSE implementation of value-returning pcpu atomics Commit 959bf2fd03b5 ("arm64: percpu: Rewrite per-cpu ops to allow use of LSE atomics") introduced alternative code sequences for the arm64 percpu atomics, so that the LSE instructions can be patched in at runtime if they are supported by the CPU. Unfortunately, when patching in the LSE sequence for a value-returning pcpu atomic, the argument registers are the wrong way round. The implementation of this_cpu_add_return() therefore ends up adding uninitialised stack to the percpu variable and returning garbage. As it turns out, there aren't very many users of the value-returning percpu atomics in mainline and we only spotted this due to a failure in the kprobes selftests. In this case, when attempting to single-step over the out-of-line instruction slot, the debug monitors would not be enabled because calling this_cpu_inc_return() on the kernel debug monitor refcount would fail to detect the transition from 0. We would consequently execute past the slot and take an undefined instruction exception from the kernel, resulting in a BUG: | kernel BUG at arch/arm64/kernel/traps.c:421! | PREEMPT SMP | pc : do_undefinstr+0x268/0x278 | lr : do_undefinstr+0x124/0x278 | Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____)) | Call trace: | do_undefinstr+0x268/0x278 | el1_undef+0x10/0x78 | 0xffff00000803c004 | init_kprobes+0x150/0x180 | do_one_initcall+0x74/0x178 | kernel_init_freeable+0x188/0x224 | kernel_init+0x10/0x100 | ret_from_fork+0x10/0x1c Fix the argument order to get the value-returning pcpu atomics working correctly when implemented using the LSE instructions. Reported-by: Catalin Marinas Tested-by: Catalin Marinas Signed-off-by: Will Deacon commit 241414967fb92fdd6f4da27df74b9c9eb11d05f7 Author: Parvi Kaustubhi Date: Tue Dec 11 14:15:43 2018 -0800 MAINTAINERS: Update usnic driver maintainers Add Nelson Escobar and myself as maintainers for drivers/infiniband/hw/usnic Signed-off-by: Parvi Kaustubhi Signed-off-by: Jason Gunthorpe commit 3023a1e93656c02b8d6a3a46e712b815843fa514 Author: Kamal Heib Date: Mon Dec 10 21:09:48 2018 +0200 RDMA: Start use ib_device_ops Make all the required change to start use the ib_device_ops structure. Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 02a42f8e40caed53fd357c9c33912e1bfb6f0365 Author: Kamal Heib Date: Mon Dec 10 21:09:47 2018 +0200 RDMA/rdmavt: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops() and remove the use of check_driver_override(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 573efc4b3ce8f01b0ca6abbf22154f73c7ee1012 Author: Kamal Heib Date: Mon Dec 10 21:09:46 2018 +0200 RDMA/rxe: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 20a6b5886102bac96e7dc5f1c6ffb6543ad4b479 Author: Kamal Heib Date: Mon Dec 10 21:09:45 2018 +0200 RDMA/vmw_pvrdma: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit e761058190b49e1d672bc5fef8cfefdec3b7d555 Author: Kamal Heib Date: Mon Dec 10 21:09:44 2018 +0200 RDMA/usnic: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 16b0ba9571f99a3beb9e13e7340b04f34608c93a Author: Kamal Heib Date: Mon Dec 10 21:09:43 2018 +0200 RDMA/qib: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit bd59461e57b4163dbba8aaa131a6c2a61e1bdaab Author: Kamal Heib Date: Mon Dec 10 21:09:42 2018 +0200 RDMA/qedr: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit a263c1241a18975756fcdbb6ccdb6460c89b04a5 Author: Kamal Heib Date: Mon Dec 10 21:09:41 2018 +0200 RDMA/ocrdma: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 5a6c6e71acb069f0d7707fbc9b29a93cbe241d46 Author: Kamal Heib Date: Mon Dec 10 21:09:40 2018 +0200 RDMA/nes: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 56e2a43136b77205fc4a33f8915d6a289396668a Author: Kamal Heib Date: Mon Dec 10 21:09:39 2018 +0200 RDMA/mthca: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 96458233ee73b6082f75c1a55c9a4ad6ea7913d5 Author: Kamal Heib Date: Mon Dec 10 21:09:38 2018 +0200 RDMA/mlx5: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c3296a1391cb0ffbea95ee2249af63cb45e4899b Author: Mark Rutland Date: Wed Dec 12 12:22:19 2018 +0000 arm64: add While we can export symbols from assembly files, CONFIG_MODVERIONS requires C declarations of anyhting that's exported. Let's account for this as other architectures do by placing these declarations in , which kbuild will automatically use to generate modversion information for assembly files. Since we already define most prototypes in existing headers, we simply need to include those headers in , and don't need to duplicate these. Reviewed-by: Robin Murphy Signed-off-by: Mark Rutland Signed-off-by: Will Deacon commit 1554509b0d007287ecd4be887ae94d3730cbf2b7 Author: Pierre Morel Date: Wed Oct 17 11:18:39 2018 +0200 vfio: ccw: Merge BUSY and BOXED states VFIO_CCW_STATE_BOXED and VFIO_CCW_STATE_BUSY have identical actions for the same events. Let's merge both into a single state to simplify the code. We choose to keep VFIO_CCW_STATE_BUSY. Signed-off-by: Pierre Morel Message-Id: <1539767923-10539-2-git-send-email-pmorel@linux.ibm.com> Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck commit 544fbd16a461a318cd80537d1331c0df5c6cf930 Author: Ming Lei Date: Wed Dec 12 19:44:34 2018 +0800 block: deactivate blk_stat timer in wbt_disable_default() rwb_enabled() can't be changed when there is any inflight IO. wbt_disable_default() may set rwb->wb_normal as zero, however the blk_stat timer may still be pending, and the timer function will update wrb->wb_normal again. This patch introduces blk_stat_deactivate() and applies it in wbt_disable_default(), then the following IO hang triggered when running parted & switching io scheduler can be fixed: [ 369.937806] INFO: task parted:3645 blocked for more than 120 seconds. [ 369.938941] Not tainted 4.20.0-rc6-00284-g906c801e5248 #498 [ 369.939797] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 369.940768] parted D 0 3645 3239 0x00000000 [ 369.941500] Call Trace: [ 369.941874] ? __schedule+0x6d9/0x74c [ 369.942392] ? wbt_done+0x5e/0x5e [ 369.942864] ? wbt_cleanup_cb+0x16/0x16 [ 369.943404] ? wbt_done+0x5e/0x5e [ 369.943874] schedule+0x67/0x78 [ 369.944298] io_schedule+0x12/0x33 [ 369.944771] rq_qos_wait+0xb5/0x119 [ 369.945193] ? karma_partition+0x1c2/0x1c2 [ 369.945691] ? wbt_cleanup_cb+0x16/0x16 [ 369.946151] wbt_wait+0x85/0xb6 [ 369.946540] __rq_qos_throttle+0x23/0x2f [ 369.947014] blk_mq_make_request+0xe6/0x40a [ 369.947518] generic_make_request+0x192/0x2fe [ 369.948042] ? submit_bio+0x103/0x11f [ 369.948486] ? __radix_tree_lookup+0x35/0xb5 [ 369.949011] submit_bio+0x103/0x11f [ 369.949436] ? blkg_lookup_slowpath+0x25/0x44 [ 369.949962] submit_bio_wait+0x53/0x7f [ 369.950469] blkdev_issue_flush+0x8a/0xae [ 369.951032] blkdev_fsync+0x2f/0x3a [ 369.951502] do_fsync+0x2e/0x47 [ 369.951887] __x64_sys_fsync+0x10/0x13 [ 369.952374] do_syscall_64+0x89/0x149 [ 369.952819] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 369.953492] RIP: 0033:0x7f95a1e729d4 [ 369.953996] Code: Bad RIP value. [ 369.954456] RSP: 002b:00007ffdb570dd48 EFLAGS: 00000246 ORIG_RAX: 000000000000004a [ 369.955506] RAX: ffffffffffffffda RBX: 000055c2139c6be0 RCX: 00007f95a1e729d4 [ 369.956389] RDX: 0000000000000001 RSI: 0000000000001261 RDI: 0000000000000004 [ 369.957325] RBP: 0000000000000002 R08: 0000000000000000 R09: 000055c2139c6ce0 [ 369.958199] R10: 0000000000000000 R11: 0000000000000246 R12: 000055c2139c0380 [ 369.959143] R13: 0000000000000004 R14: 0000000000000100 R15: 0000000000000008 Cc: stable@vger.kernel.org Cc: Paolo Valente Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit f9dca0f0675e7249e10bba259392a582836e5e6e Author: Nishanth Menon Date: Sat Dec 8 10:00:42 2018 -0600 PM / AVS: SmartReflex: Switch to SPDX Licence ID Fix up licensing to be inline with Linux conventions. Signed-off-by: Nishanth Menon Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit 14d338a857f05f894ba3badd9e6d3039c68b8180 Author: Thomas Meyer Date: Sun Dec 2 21:52:11 2018 +0100 PM / AVS: SmartReflex: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit 9b31cf493ffa40914e02998381993116e574c651 Author: Will Deacon Date: Wed Dec 12 11:51:40 2018 +0000 arm64: mm: Introduce MAX_USER_VA_BITS definition With the introduction of 52-bit virtual addressing for userspace, we are now in a position where the virtual addressing capability of userspace may exceed that of the kernel. Consequently, the VA_BITS definition cannot be used blindly, since it reflects only the size of kernel virtual addresses. This patch introduces MAX_USER_VA_BITS which is either VA_BITS or 52 depending on whether 52-bit virtual addressing has been configured at build time, removing a few places where the 52 is open-coded based on explicit CONFIG_ guards. Signed-off-by: Will Deacon commit eaf3074e0a8c2a39c4c14aa8ef1c2ec09ace9c79 Author: Arnd Bergmann Date: Tue Dec 11 11:06:25 2018 +0100 usb: renesas_usbhs: mark PM functions as __maybe_unused Without CONFIG_PM, we get a new build warning here: drivers/usb/renesas_usbhs/common.c:860:12: error: 'usbhsc_resume' defined but not used [-Werror=unused-function] static int usbhsc_resume(struct device *dev) ^~~~~~~~~~~~~ drivers/usb/renesas_usbhs/common.c:844:12: error: 'usbhsc_suspend' defined but not used [-Werror=unused-function] static int usbhsc_suspend(struct device *dev) ^~~~~~~~~~~~~~ Fixes: d54d334e75b9 ("usb: renesas_usbhs: Use SIMPLE_DEV_PM_OPS macro") Signed-off-by: Arnd Bergmann Reviewed-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit c238ec3ef638f87d8d701600d13a185b011fa078 Author: Suwan Kim Date: Tue Dec 4 23:31:43 2018 +0900 usb: core: Remove unnecessary memset() register_root_hub() calls memset() setting usb_dev->bus->devmap. devicemap to 0 during hcd probe function (usb_hcd_pci_probe). But in previous function which is also the procedure of usb_hcd_pci_probe(), usb_bus_init() already initialized bus->devmap calling memset(). Furthermore, register_root_hub() is called only once in kernel. So, calling memset() which resets usb_bus->devmap.devicemap in register_root_hub() is redundant. Signed-off-by: Suwan Kim Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 9e412c66a8a24fabad97b706132ee270db2e4c8e Author: Yangtao Li Date: Wed Dec 5 11:33:39 2018 -0500 usb: host: isp1362-hcd: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 27a2660f1ef944724956d92e8a312b6da0936fae Author: Bob Peterson Date: Wed Apr 18 12:05:01 2018 -0700 gfs2: Dump nrpages for inodes and their glocks This patch is based on an idea from Steve Whitehouse. The idea is to dump the number of pages for inodes in the glock dumps. The additional locking required me to drop const from quite a few places. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 2d29f6b96d8f80322ed2dd895bca590491c38d34 Author: Andreas Gruenbacher Date: Tue Dec 4 15:06:27 2018 +0100 gfs2: Fix loop in gfs2_rbm_find Fix the resource group wrap-around logic in gfs2_rbm_find that commit e579ed4f44 broke. The bug can lead to unnecessary repeated scanning of the same bitmaps; there is a risk that future changes will turn this into an endless loop. Fixes: e579ed4f44 ("GFS2: Introduce rbm field bii") Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson commit 5ac93d0c5d8cb12156933d1dc358e59f559e5b31 Merge: ed0a773bff5f2 4fe4f9fecc369 Author: Greg Kroah-Hartman Date: Wed Dec 12 12:29:23 2018 +0100 Merge tag 'usb-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB changes for v4.21 So it looks like folks are interested in dwc3 again. Almost 64% of the changes are in dwc3 this time around with some other bits in gadget functions and dwc2. There are two important parts here: a. removal of the waitqueue from dwc3's dequeue implementation, which will guarantee that gadget functions can dequeue from any context and; b. better method for starting isochronous transfers to avoid, as much as possible, missed isoc frames. Apart from these, we have the usual set of non-critical fixes and new features all over the place. * tag 'usb-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (56 commits) usb: dwc2: Fix disable all EP's on disconnect usb: dwc3: gadget: Disable CSP for stream OUT ep usb: dwc2: disable power_down on Amlogic devices Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs" USB: gadget: udc: s3c2410_udc: convert to DEFINE_SHOW_ATTRIBUTE usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler usb: dwc3: trace: add missing break statement to make compiler happy usb: dwc3: gadget: Report isoc transfer frame number usb: gadget: Introduce frame_number to usb_request usb: renesas_usbhs: Use SIMPLE_DEV_PM_OPS macro usb: renesas_usbhs: Remove dummy runtime PM callbacks usb: dwc2: host: use hrtimer for NAK retries usb: mtu3: clear SOFTCONN when clear USB3_EN if work as HS mode usb: mtu3: enable SETUPENDISR interrupt usb: mtu3: fix the issue about SetFeature(U1/U2_Enable) usb: mtu3: enable hardware remote wakeup from L1 automatically usb: mtu3: remove QMU checksum usb/mtu3: power down device ip at setup usb: dwc2: Disable power down feature on Samsung SoCs usb: dwc3: Correct the logic for checking TRB full in __dwc3_prepare_one_trb() ... commit e894075934a44ef66413fd1046808542011d8552 Author: Nishad Kamdar Date: Thu Dec 6 21:27:06 2018 +0530 staging: mt7621-mmc: Fix incompletely removed #if 0 block in sd.c Commit 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") does not completely remove an #if 0 block in sd.c. This causes the function msdc_select_clksrc() which was eariler not compiled, to be compiled. That causes an error - MSDC_CLKSRC_REG is not defined. This patch completely removes the #if 0 block Reported-by: NeilBrown Fixes: 2a54e3259e2a ("staging: mt7621-mmc: Remove #if 0 blocks in sd.c") Signed-off-by: Nishad Kamdar Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 4cc357c500d38d964e98bfa417af50063cf38c67 Author: Stefan Wahren Date: Thu Dec 6 19:29:00 2018 +0100 staging: bcm2835-camera: Add hint about possible faulty config As per default the GPU memory config of the Raspberry Pi isn't sufficient for the camera usage. Even worse the bcm2835 camera driver doesn't provide a helpful error message in this case. So let's add a hint to point the user to the likely cause. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 9c85a4d0aeab2c70c18ce4e3939c202d9c1c8235 Author: Stefan Wahren Date: Thu Dec 6 19:28:59 2018 +0100 staging: bcm2835-camera: Provide more specific probe error messages Currently there is only a catch-all info message which print the relevant error code without any context. So add more specific error messages in order to narrow down possible issues. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit b7491a9fca2dc2535b9dc922550a37c5baae9d3d Author: Stefan Wahren Date: Thu Dec 6 19:28:58 2018 +0100 staging: bcm2835-audio: Drop DT dependency Just like the bcm2835-video make this a platform driver which is probed by vchiq. In order to change the number of channels use a module parameter instead, but use the maximum as default. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit c04a8fe45845cc9e977de7fefd9d1871a3c905f2 Author: Stefan Wahren Date: Thu Dec 6 19:28:57 2018 +0100 staging: bcm2835-audio: use module_platform_driver() macro There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 736b0ec4865aeb426b71f3a14dc7b6cd18b611ab Author: Stefan Wahren Date: Thu Dec 6 19:28:56 2018 +0100 staging: bcm2835-audio: Enable compile test Enable the compilation test for bcm2835-audio to gain more build coverage. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 25c7597af20d2b1d042bafd9be84eaa69c1690b7 Author: Stefan Wahren Date: Thu Dec 6 19:28:55 2018 +0100 staging: vchiq_arm: Register a platform device for audio Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") this register the audio driver as a platform device, too. Signed-off-by: Stefan Wahren Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 405e2f98637d79b17434afc2596f5a49f418cc72 Author: Stefan Wahren Date: Thu Dec 6 19:28:54 2018 +0100 staging: vchiq_arm: Fix camera device registration Since the camera driver isn't probed via DT, we need to properly setup DMA. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 1a321ea68b0f20dbd7654c09116a87b96b0cde3e Author: Stefan Wahren Date: Thu Dec 6 19:28:53 2018 +0100 staging: bcm2835-camera: Move module info to the end In order to have this more consistent between the vc04 services move the module information to the end of the file. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 3a2c20024a2b47adbf514e7f3ab79342739c3926 Author: Stefan Wahren Date: Thu Dec 6 19:28:52 2018 +0100 staging: bcm2835-camera: fix module autoloading In order to make the module bcm2835-camera load automatically, we need to add a module alias. Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.") Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 7566f39dfdc11f8a97d5810c6e6295a88f97ef91 Author: Stefan Wahren Date: Thu Dec 6 19:28:51 2018 +0100 staging: bcm2835-camera: Abort probe if there is no camera Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit a36b2606795800a15f6f33ee4c283ad66e1d7bfe Author: Uwe Kleine-König Date: Mon Oct 15 10:21:52 2018 +0200 pwm: Drop legacy wrapper for changing polarity The API to configure a PWM using pwm_enable(), pwm_disable(), pwm_config() and pwm_set_polarity() is superseeded by atomically setting the parameters using pwm_apply_state(). To get forward with deprecating the former set of functions use the opportunity that there is no current user of pwm_set_polarity() and remove it. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 99c22707ef647f692b6beb274fed2b6893955a3a Author: NeilBrown Date: Sun Dec 9 16:20:33 2018 +1100 staging: mt7621-dts: avoid warnings in pinctrl definitions The device-tree checking code sees node names "i2c" and "spi" in the pinctrl definition and thinks these are defining i2c or spi devices, and complains that they look wrong. So add a '0' to the end of each name (much like "uart" and "rgmii" have numbers at the end) to avoid the warning. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit d17f5ff7713f9be7da820f4295e35d1862b3eb29 Author: NeilBrown Date: Sun Dec 9 16:20:33 2018 +1100 staging: mt7621-mmc: fix compile warnging: cmd_buf cmd_buf is only used when MT6575_SD_DEBUG is defined. So only declare it in that case. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit a6bf8820224dc226bc3fd4aac27169f6fc38d26f Author: NeilBrown Date: Sun Dec 9 16:20:33 2018 +1100 staging: mt7621-mmc: add missing header. is sometimes included by other include files, and sometimes not, depending on config, particularly CONFIG_HIGHMEM. So include it explicitly rather than relying on implicit inclusion. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 5b0d9cd7211d2f4bf4acc539c3ba4f346c43b0fe Author: NeilBrown Date: Sun Dec 9 16:20:32 2018 +1100 staging: mt7621-eth: fix compile warning. This code generates a waring as PHY_GBIT_FEATURES is "long" but ->supported in "int". It looks likely that "PHY_1000BT_FEATURES" is the correct define to use - it is intended to be used with the ->features field. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 90dedc973b867afe514e13c4c3de3e03aa1ee951 Author: NeilBrown Date: Sun Dec 9 16:20:32 2018 +1100 staging: mt7621-dts: allow gnubee to reboot cleanly. Since commit bb276262e88d ("mtd: spi-nor: only apply reset hacks to broken hardware"), we need to mark the spi-nor as "broken" for reboot to work. Note that nothing is actually broken here. The hardware-watchdog in the SoC isn't wired in a way that works, but then the board doesn't claim to support a hardware watchdog - and the SPI certain isn't "broken". This causes an annoying warning on every boot, but that is better than failing on ever reboot. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 84519a4b0fae9e20085cef0369aa6a5d144860e4 Author: NeilBrown Date: Sun Dec 9 16:20:32 2018 +1100 staging: mt7621-mmc: set correct dma mask. Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the mmc driver fails because it doesn't have a dma mask is set. So set the correct dma mask. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 370e0a71012744383b4a3ea8882961b63e626d09 Author: NeilBrown Date: Sun Dec 9 16:20:32 2018 +1100 staging: mt7621-eth: set correct dma mask. Since commit f8c55dc6e828 ("MIPS: use generic dma noncoherent ops for simple noncoherent platforms") changed MIPS dma handling, the eth driver fails because the dma mask is set on the wrong 'struct device'. Move the setting to the correct struct device. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 446e8986a2417148aed14f362831bf2425d434cb Author: Sandeep Sheriker Mallikarjun Date: Wed Dec 12 11:41:10 2018 +0100 ARM: at91: add support in soc driver for new SAM9X60 Add detection of new SAM9X60 by this soc.c driver. Signed-off-by: Nicolas Ferre [nicolas.ferre@microchip.com: split patch] Signed-off-by: Sandeep Sheriker Mallikarjun Signed-off-by: Alexandre Belloni commit bf9b0b1b0b6cd51797ce79b6fa5fc2d1baa2719e Author: Michal Vokáč Date: Mon Oct 1 16:19:48 2018 +0200 pwm: imx: Implement get_state() function for hardware readout Implement the get_state() function and set the initial state to reflect real state of the hardware. This allows to keep the PWM running if it was enabled in bootloader. It is very similar to the GPIO behavior. GPIO pin set as output in bootloader keep the same setting in Linux unless it is reconfigured. If we find the PWM block enabled we need to prepare and enable its source clock otherwise the clock will be disabled late in the boot as unused. That will leave the PWM in enabled state but with disabled clock. That has a side effect that the PWM output is left at its current level at which the clock was disabled. It is totally non-deterministic and it may be LOW or HIGH. Signed-off-by: Michal Vokáč Signed-off-by: Thierry Reding commit 9f617ada9f823dff1944ebcf92ef4a05f5f322b7 Author: Michal Vokáč Date: Mon Oct 1 16:19:47 2018 +0200 pwm: imx: Use bitops and bitfield macros to define register values Use existing macros to define register fields instead of manually shifting the bit masks. Also define some more register bits. Signed-off-by: Michal Vokáč Signed-off-by: Thierry Reding commit e3adc7efe678ba907f99791f5adfee81faea10e6 Author: Michal Vokáč Date: Mon Oct 1 16:19:46 2018 +0200 pwm: imx: Sort include files Sort included header files alphabetically. Signed-off-by: Michal Vokáč Signed-off-by: Thierry Reding commit 852b2876a8a82f2c618da40b881bb07c2d42eb5c Author: Arnd Bergmann Date: Mon Dec 10 22:11:58 2018 +0100 staging: vchiq: rework remove_event handling I had started the removal of semaphores in this driver without knowing that Nicolas Saenz Julienne also worked on this. In case of the "remote event" infrastructure, my solution seemed significantly better, so I'm proposing this as a change on top. The problem with using either semaphores or completions here is that it's an overly complex way of waking up a thread, and it looks like the 'count' of the semaphore can easily get out of sync, even though I found it hard to come up with a specific example. Changing it to a 'wait_queue_head_t' instead of a completion simplifies this by letting us wait directly on the 'event->fired' variable that is set by the videocore. Another simplification is passing the wait queue directly into the helper functions instead of going through the fragile logic of recording the offset inside of a structure as part of a shared memory variable. This also avoids one uncached memory read and should be faster. Note that I'm changing it back to 'killable' after the previous patch changed 'killable' to 'interruptible', apparently based on a misunderstanding of the subtle down_interruptible() macro override in vchiq_killable.h. Fixes: f27e47bc6b8b ("staging: vchiq: use completions instead of semaphores") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 8bdf15fa67d8f24af31fb418bde9d02c563e8da8 Author: Arnd Bergmann Date: Mon Dec 10 22:40:32 2018 +0100 staging: rtl8723bs: remove semaphore remnants Nothing uses the semaphores any more in this driver, so remove all references to that type. Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 07e3a844ff05ad2587247987ac0e79d446e40682 Author: Arnd Bergmann Date: Mon Dec 10 22:40:31 2018 +0100 staging: rtl8723bs: change pwrctrl lock to a mutex This semaphore is used like a mutex, so it should use the regular mutex API, as we do in the other copies of this driver. Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 09a8ea34cf431bfb77159197e46753d101c528c5 Author: Arnd Bergmann Date: Mon Dec 10 22:40:30 2018 +0100 staging: rtl8723bs: change semaphores to completions This driver uses many semaphores, most of them are equivalent to completions. The other copies of this driver got moved over to completions a while ago, so do the same here. In this usage scenario, the two are equivalent, so the behavior should not change. Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 5e8f616103b8970aee1c1790306ccbc8cd3b6b16 Author: Michael Straube Date: Mon Dec 10 10:52:02 2018 +0100 staging: rtl8723bs: fix typo in the TODO file HGz -> GHz Signed-off-by: Michael Straube Acked-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit c45140bce3f428865d8971a2fe6f0877506632e7 Author: Michael Straube Date: Mon Dec 10 10:52:01 2018 +0100 staging: rtl8723bs: remove dead code, rtw_port_switch_chk() The function rtw_port_switch_chk() returns always false. Remove the function and related dead code. Signed-off-by: Michael Straube Acked-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 15f11e0ffce0affbc256fcc1925c9e3cb2739b22 Author: Michael Straube Date: Fri Dec 7 21:55:15 2018 +0100 staging: rtl8188eu: reuse Hal_GetChnlGroup88E() Use Hal_GetChnlGroup88E() instead of duplicating it's code in get_rx_power_val_by_reg(). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a793dbe926014e6fee2c643fbfa966cb0cdf86ef Author: Michael Straube Date: Fri Dec 7 21:55:14 2018 +0100 staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate() Zeroing the array result[m][n] and setting only the values at even 'n's simplifies the code and slightly reduces object file size. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f8bc1b2efa05183f10451b7618243a4278bf6b16 Author: Spencer E. Olson Date: Tue Dec 4 12:07:50 2018 -0700 staging: comedi: change do_insn*_ioctl to allow more samples Changes do_insn*_ioctl functions to allow for data lengths for each comedi_insn of up to 2^16. This patch also changes these functions to only allocate as much memory as is necessary for each comedi_insn, rather than allocating a fixed-sized scratch space. In testing some user-space code for the new INSN_DEVICE_CONFIG_GET_ROUTES facility with some newer hardware, I discovered that do_insn_ioctl and do_insnlist_ioctl limited the amount of data that can be passed into the kernel for insn's to a length of 256. For some newer hardware, the number of routes can be greater than 1000. Working around the old limits (256) would complicate the user-space/kernel interaction. The new upper limit is reasonable with current memory available and does not otherwise impact the memory footprint for any current or otherwise typical configuration. Signed-off-by: Spencer E. Olson Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 354ea2ee6d2bc08d2f73b67096e67760089887cb Author: Chuanhong Guo Date: Thu Dec 6 21:15:09 2018 +0800 staging: mt7621-spi: drop support for SPI mode 1/2/3 As explained in previous patch, this SPI controller seems to be tested on SPI flash only before mass production and some bits are swizzled under other SPI modes probably due to incorrect wiring inside the silicon. Drop implementation of SPI mode 1/2/3 since they are broken. Also drop RT2880_SPI_MODE_BITS macro because we now have only SPI_LSB_FIRST implemented and the mode_bits is so short that we don't need a macro there. Signed-off-by: Chuanhong Guo Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 108d9dd51363e52de92019aa2107885493ddb5f3 Author: Chuanhong Guo Date: Thu Dec 6 21:15:08 2018 +0800 staging: mt7621-spi: drop the broken full-duplex mode According to John Crispin (aka blogic) on IRC on Nov 26 2018: so basically i made cs1 work for MTK/labs when i built the linkit smart for them. the req-sheet said that cs1 should be proper duplex spi. however .... 1) the core will always send 1 byte before any transfer, this is the m25p80 command. 2) mode 3 is broken and bit reversed (?) 3) some bit are incorrectly wired in hw for mode2/3 we wrote a test script and test for [0-0xffff] on all modes and certain bits are swizzled under certain conditions and it was not possible to fix this even using a hack. we then decided to use spi-gpio and i never removed the errornous code basically the spi is fecked for anything but half duplex spi mode0 running a sflash on it The controller will always send some data from OPCODE register under half duplex mode before starting a full-duplex transfer, so the full-duplex mode is broken. This piece of code also make CS1 unavailable since it forces the broken full-duplex mode to be used on CS1. Signed-off-by: Chuanhong Guo Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit d6a0de493374642ee8bb2f473d7b6e10cad82e85 Author: Arnd Bergmann Date: Mon Dec 10 22:41:50 2018 +0100 staging: speakup: change semaphore to completion In this driver, both function the same way, but we want to eventually kill off semaphores, so a completion is the better choice here. Signed-off-by: Arnd Bergmann Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman commit 019ec6c14fbdfaeb361c84f68158fb9097f41004 Author: Aaron Strahlberger Date: Tue Dec 11 11:54:41 2018 +0100 staging: erofs: Fix spelling issue Changed "stoped" to "stopped". Signed-off-by: Aaron Strahlberger Signed-off-by: Julius Wiedmann Signed-off-by: Dominik Huber Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit ccd9c19c7ae165c70221b0a4927c31a56e395658 Author: Gao Xiang Date: Wed Dec 12 01:57:30 2018 +0800 staging: erofs: remove __EROFS_BIT It's better to use pre-calculated values to make on-disk definition more straight-forward and human-readable. Since there is the only one user, let's remove __EROFS_BIT entirely. Suggested-by: Joe Perches Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 07c17732bd687567802aaa5fa5c101c2776565d1 Author: Tetsuo Handa Date: Tue Dec 11 18:49:05 2018 +0900 printk: Remove print_prefix() calls with NULL buffer. We can save lines/size by removing print_prefix() with buf == NULL. This patch makes no functional change. Link: http://lkml.kernel.org/r/1544521745-11925-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp To: Steven Rostedt Cc: linux-kernel@vger.kernel.org Signed-off-by: Tetsuo Handa Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 15653dc850e4bc64dffd9105faab063f81c4b3b2 Author: Nicolas Ferre Date: Wed Nov 28 12:00:35 2018 +0100 ARM: at91: add support in soc driver for LPDDR2 SiP Add some more SiP components to be detected by this soc.c driver. Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni commit b8e076a6ef253e763bfdb81e5c72bcc828b0fbeb Author: Gao Xiang Date: Tue Dec 11 15:17:50 2018 +0800 staging: erofs: unzip_vle_lz4.c,utils.c: rectify BUG_ONs remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 70b17991d89554cdd16f3e4fb0179bcc03c808d9 Author: Gao Xiang Date: Tue Dec 11 15:17:49 2018 +0800 staging: erofs: unzip_{pagevec.h,vle.c}: rectify BUG_ONs remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit ed0a773bff5f2966c1c8b85e471a4d7a61f9dd62 Merge: b53bde6686fb6 2e38c2e7026a9 Author: Greg Kroah-Hartman Date: Wed Dec 12 09:26:04 2018 +0100 Merge tag 'phy-for-4.21_v1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.21 *) Change phy set_mode ops to take both mode and setmode as arguments *) Add phy_configure() and phy_validate() API's mostly used for MIPI D-PHY *) Add helpers to get default values of parameters define in MIPI D-PHY spec *) Add driver for TI's CPSW Port PHY Interface Mode selection *) Add driver for Cadence Sierra PHY used with USB and PCIe *) Add driver for Freescale i.MX8MQ USB3 PHY *) Fixes QMP PHY bindings to allow the clocks provided by the PHY to be pointed at in device tree *) Fix for using fully specified regions (in device tree) for configuring the second lane in dual lane PHYs in QMP PHY *) Add support for Allwinner H6 USB2 PHY in phy-sun4i-usb driver *) Update phy-rcar-gen3-usb driver to follow the hardware manual *) Add support for fine grained power management in mapphone-mdm6600 driver Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-4.21_v1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: (30 commits) phy: qcom-qmp: Expose provided clocks to DT dt-bindings: phy-qcom-qmp: Move #clock-cells to child phy: qcom-qmp: Utilize fully-specified DT registers dt-bindings: phy-qcom-qmp: Fix register underspecification phy: ti: fix semicolon.cocci warnings phy: dphy: Add configuration helpers phy: Add MIPI D-PHY configuration options phy: Add configuration interface phy: Add MIPI D-PHY mode phy: add driver for Freescale i.MX8MQ USB3 PHY dt-bindings: phy: add binding for Freescale i.MX8MQ USB3 PHY phy: Use of_node_name_eq for node name comparisons net: ethernet: ti: cpsw: add support for port interface mode selection phy dt-bindings: net: ti: cpsw: switch to use phy-gmii-sel phy phy: ti: introduce phy-gmii-sel driver dt-bindings: phy: add cpsw port interface mode selection phy bindings phy: mvebu-cp110-comphy: fix spelling in structure name phy: mapphone-mdm6600: Improve phy related runtime PM calls phy: renesas: rcar-gen3-usb2: follow the hardware manual procedure phy: cadence: Add driver for Sierra PHY ... commit 3f9b7eeea0268eba57e2c18b48a9621f38c66101 Merge: e1a76515b0c20 6d4efada3b823 Author: David S. Miller Date: Tue Dec 11 23:01:34 2018 -0800 Merge branch 'mlxsw-Add-Spectrum-2-multicast-routing-support' Ido Schimmel says: ==================== mlxsw: Add Spectrum-2 multicast routing support Nir says: In Spectrum the firmware provided an abstraction for multicast routing on top of the policy engine. In Spectrum-2 this is no longer the case and the driver must interact directly with the policy engine in order to program multicast routes. Every route is written as an ACL rule, its priority set according to route type (*,G) or (S,G) and its action is an appropriate multicast routing action. Multicast routes are written to a specific ACL group which is bound to the appropriate IP protocol IPv4/IPv6. Patch #1 adds PEMRBT register needed to declare which ACL group is dedicated for each IP protocol multicast routing function. Patch #2 Changes initialization order and puts ACL before router as multicast router now uses ACL module. Patch #3 adds Spectrum-2 ACL keys needed for multicast route matching. Patch #4 adds another ACL profile - in addition to existing flower profile - which allows the multicast routing module to program rules directly into the ACL block. Patch #5 adds the ability to update ACL rules' action, since multicast routes actions may be updated after being configured. Patch #6 separates rule creation operation and rule action creation operation as in multicast router the action is created before the route is inserted. Patch #7 sharpens priority handling in Spectrum-2, to ensure incorrect values are not set to rule's priority. Patch #8 adds the implementation of multicast routing for IPv4 and IPv6 over existing ACL rule programming Finally, patch #9 adds a test for IPv4/IPv6 multicast routing. ==================== Signed-off-by: David S. Miller commit 6d4efada3b823b3e9019e50c40114abca43a677b Author: Nir Dotan Date: Mon Dec 10 07:11:46 2018 +0000 selftests: forwarding: Add multicast routing test Introduce basic testing for both IPv4 and IPv6 multicast. The test creates an (S,G) type route, sends traffic and verifies traffic arrives when the route is present and then verifies traffic does not arrive after deleting the route. This test requires smcroute - https://github.com/troglobit/smcroute which is a tool that allows creation of static multicast routes. Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit cf7221a4f5a53f4975bdf55a9fa5de7a32acfc6d Author: Nir Dotan Date: Mon Dec 10 07:11:45 2018 +0000 mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2 Add implementation of Spectrum-2 multicast routes for both IPv4 and IPv6 by using ACL module explicitly. In Spectrum-2, multicast routes are set as ACL rules, so initialization takes care of creating dedicated ACL groups and binding them to the appropriate multicast routing protocol IPv4/IPv6, and afterwards routes configuration translates to setting explicit ACL rules. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d7263ab35be25505ab57ebecd93cbc5dba8be717 Author: Nir Dotan Date: Mon Dec 10 07:11:44 2018 +0000 mlxsw: spectrum_acl: Limit priority value In Spectrum-2, higher priority value wins and priority valid values are in the range of {1,cap_kvd_size-1}. mlxsw_sp_acl_tcam_priority_get converts from lower-bound priorities alike tc flower to Spectrum-2 HW range. Up until now tc flower did not provide priority 0 or reached the maximal value, however multicast routing does provide priority 0. Therefore, Change mlxsw_sp_acl_tcam_priority_get to verify priority is in the correct range. Make sure priority is never set to zero and never exceeds the maximal allowed value. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c20580c21f80d676f6e128eea4dc482c4e51b265 Author: Nir Dotan Date: Mon Dec 10 07:11:43 2018 +0000 mlxsw: spectrum_acl: Support rule creation without action creation Up until now, when ACL rule was created its action was created with it. It suits well for tc flower where ACL rule always needs an action, however it does not suit multicast router, where the action is created prior to setting a route, which in Spectrum-2 is actually an ACL rule. Add support for rule creation without action creation. Do it by adding afa_block argument to mlxsw_sp_acl_rule_create, which if NULL then an action would be created, also add an indication within struct mlxsw_sp_acl_rule_info that tells if the action should be destroyed when the rule is destroyed. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2507a64c17e646800025dfeb508d5c406bf24ec4 Author: Nir Dotan Date: Mon Dec 10 07:11:41 2018 +0000 mlxsw: spectrum_acl: Add replace rule action operation Multicast routes actions may be updated after creation. An example for that is an addition of an egress interface to an existing route. So far, as tc flower API dictated, ACL rules were either created or deleted. Since multicast routes in Spectrum-2 are written to ACL as any rule, it is required to allow the update of a rule's action as it may change. Add methods and operations to support updating rule's action. This is supported only for Spectrum-2. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1a29d29394c79648928f4a2b82cf2fafc460dc55 Author: Nir Dotan Date: Mon Dec 10 07:11:40 2018 +0000 mlxsw: spectrum_acl: Add multicast router profile operations Add specific ACL operations needed for programming multicast routing ACL groups and routes. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit add4550fca4018f74dd8a8e98fc49f6141f96177 Author: Nir Dotan Date: Mon Dec 10 07:11:39 2018 +0000 mlxsw: spectrum_acl: Add Spectrum-2 keys Add virtual router ID fields to Spectrum-2 key blocks set, as the field is required for multicast routing. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 254cec14649ebdb891d75fc69be6c801762a9a09 Author: Nir Dotan Date: Mon Dec 10 07:11:37 2018 +0000 mlxsw: spectrum: Change stage of ACL initialization In Spectrum-2, MC routing is implemented using ACL block explicitly, so router initialization should take place after ACL initialization. Set the initialization of the ACL block before IP router initizalization takes place, so multicast router will be able to allocate ACL data structures and create its required chains. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a75e41d37a7ac5a8020f9fec54656c71209075fd Author: Nir Dotan Date: Mon Dec 10 07:11:33 2018 +0000 mlxsw: reg: Add Policy Engine Multicast Router Binding Table Register In Spectrum-2, multicast routing is implemented explicitly using policy engine (ACL) block. PEMRBT register is used to bind a dedicated ACL group to a specific IP protocol. Add the register to be later used in multicast router implementation. Signed-off-by: Nir Dotan Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e1a76515b0c20c3477200c1345c477cc0e68c4ad Author: Xue Chaojing Date: Sun Dec 9 19:14:19 2018 +0000 hinic: optmize rx refill buffer mechanism There is no need to schedule a different tasklet for refill, This patch remove it. Suggested-by: Neil Horman Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit 2e38c2e7026a9846b5bdadf0bf82808ec2c2f446 Author: Evan Green Date: Mon Dec 10 11:32:07 2018 -0800 phy: qcom-qmp: Expose provided clocks to DT Register a simple clock provider for the PHY pipe clock sources so that device tree users can point at these clocks via phandles to the lane nodes. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd Tested-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I commit d21aafe9a4a55ae5efcd640c0f3dc64ac047d38e Author: Evan Green Date: Mon Dec 10 11:32:04 2018 -0800 dt-bindings: phy-qcom-qmp: Move #clock-cells to child The phy-qcom-qmp bindings specified #clock-cells as 1. This was never used because of_clk_add_provider() was never called, so there was no way anybody could reference these clocks from DT. Furthermore, even if they could be accessed, the bindings never specified what should go in that additional cell. Fix these incomplete and broken bindings. Move the #clock-cells into the child node, since that is the actual clock provider, and not all instances of qcom-qmp-phy are clock providers. Also set #clock-cells to zero, since there's nothing to pass to it. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I commit 5e17b95d9893dbbe3366c4d66b0f1677cce99997 Author: Evan Green Date: Mon Dec 10 11:28:23 2018 -0800 phy: qcom-qmp: Utilize fully-specified DT registers Utilize the newly fixed up DT bindings to get the tx2 and rx2 register regions for the second lane of dual-lane PHYs. Before this change, the driver was simply using lane one's register region and adding 0x400, which reached well beyond the DT-specified register allocation. This would have been a crash were it not for the page size on ARM64. Fix the driver not to rely on the magic of virtual memory by using the newly specified DT register regions for tx2 and rx2. In order to support existing device trees, this change also contains a fallback mode for when those new register regions don't exist, which reverts to the original behavior of overreaching and prints a complaint. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I commit 2517d09b39f3bb811e7349efa8248147ccb2eaa1 Author: Evan Green Date: Mon Dec 10 11:28:22 2018 -0800 dt-bindings: phy-qcom-qmp: Fix register underspecification Add register regions for the second lane of dual-lane nodes. This additional specification is needed so that the driver can stop reaching beyond the tx and rx register allocations to get at the second lane registers in a dual-lane PHY. While in there, document #clock-cells as optional for PHYs that don't provide a pipe clock. Also, document the pcs_misc register region, which was being quietly supplied and used. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 1a3a09270668d92755cc6efe8e0395bbb3de8629 Author: kbuild test robot Date: Sun Dec 9 22:20:03 2018 +0800 phy: ti: fix semicolon.cocci warnings drivers/phy/ti/phy-gmii-sel.c:91:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 1811851f4e73 ("phy: ti: introduce phy-gmii-sel driver") CC: Grygorii Strashko Signed-off-by: kbuild test robot Signed-off-by: Kishon Vijay Abraham I commit dddc97e823033b705bbc06bc08b078200ad736a3 Author: Maxime Ripard Date: Fri Dec 7 14:55:31 2018 +0100 phy: dphy: Add configuration helpers The MIPI D-PHY spec defines default values and boundaries for most of the parameters it defines. Introduce helpers to help drivers get meaningful values based on their current parameters, and validate the boundaries of these parameters if needed. Signed-off-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I commit 2ed869990e14bc5528aeb00c45e42793c5406637 Author: Maxime Ripard Date: Fri Dec 7 14:55:30 2018 +0100 phy: Add MIPI D-PHY configuration options Now that we have some infrastructure for it, allow the MIPI D-PHY phy's to be configured through the generic functions through a custom structure added to the generic union. The parameters added here are the ones defined in the MIPI D-PHY spec, plus the number of lanes in use. The current set of parameters should cover all the potential users. Signed-off-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I commit aeaac93ddb28eeacc0dff9c12cb338eb1de7481d Author: Maxime Ripard Date: Fri Dec 7 14:55:29 2018 +0100 phy: Add configuration interface The phy framework is only allowing to configure the power state of the PHY using the init and power_on hooks, and their power_off and exit counterparts. While it works for most, simple, PHYs supported so far, some more advanced PHYs need some configuration depending on runtime parameters. These PHYs have been supported by a number of means already, often by using ad-hoc drivers in their consumer drivers. That doesn't work too well however, when a consumer device needs to deal with multiple PHYs, or when multiple consumers need to deal with the same PHY (a DSI driver and a CSI driver for example). So we'll add a new interface, through two funtions, phy_validate and phy_configure. The first one will allow to check that a current configuration, for a given mode, is applicable. It will also allow the PHY driver to tune the settings given as parameters as it sees fit. phy_configure will actually apply that configuration in the phy itself. Signed-off-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I commit c8457828ff481411dca4cdea944c1a0980c862e1 Author: Maxime Ripard Date: Fri Dec 7 14:55:28 2018 +0100 phy: Add MIPI D-PHY mode MIPI D-PHY is a MIPI standard meant mostly for display and cameras in embedded systems. Add a mode for it. Reviewed-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I commit efe81bea891586680a928ea5dde40eb1fff34be2 Author: Li Jun Date: Thu Nov 15 15:12:47 2018 +0100 phy: add driver for Freescale i.MX8MQ USB3 PHY This is a cleaned up port of the downstream i.MX8MQ USB3 PHY driver. Signed-off-by: Li Jun Signed-off-by: Lucas Stach Signed-off-by: Kishon Vijay Abraham I commit 3c2ce40b2fbb52b5e861f8664f5422d39f11b39e Author: Lucas Stach Date: Thu Nov 15 15:12:46 2018 +0100 dt-bindings: phy: add binding for Freescale i.MX8MQ USB3 PHY This adds the binding for the USB3 PHY found on the i.MX8M SoC. Signed-off-by: Lucas Stach Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 03e7d002526dc447902d15aba7d24919d9a13f92 Author: Rob Herring Date: Wed Dec 5 13:50:35 2018 -0600 phy: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Kishon Vijay Abraham I Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 3ff18849eb658b16ff4a22da9360bba5dc68a2d2 Author: Grygorii Strashko Date: Sun Nov 25 18:15:25 2018 -0600 net: ethernet: ti: cpsw: add support for port interface mode selection phy Add support for port interface mode selection phy (phy-gmii-sel): - try to request interface mode selection phy from Port DT node and fail silently if not defined and old CONFIG_TI_CPSW_PHY_SEL driver enabled. - use new phy if requested successfully. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit ad57b78579ab477d105b3349dad73af8633fe49a Author: Grygorii Strashko Date: Sun Nov 25 18:15:24 2018 -0600 dt-bindings: net: ti: cpsw: switch to use phy-gmii-sel phy The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings and update CPSW binding to use phy-gmii-sel PHY bindings. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 92b58b34741ff5b9efa583add6e63ca4103f8e29 Author: Grygorii Strashko Date: Sun Nov 25 18:15:23 2018 -0600 phy: ti: introduce phy-gmii-sel driver TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. The interface mode is selected by configuring the MII mode selection register(s) (GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and bit fields placement in SCM are different between SoCs while fields meaning is the same. Historically CPSW external Port's interface mode selection configuration was introduced using custom API and driver cpsw-phy-sel.c. This leads to unnecessary driver, DT binding and custom API support effort. This patch introduces CPSW Port's PHY Interface Mode selection Driver (phy-gmii-sel) which implements standard Linux PHY interface and used as a replacement for TI's specific driver cpsw-phy-sel.c and corresponding custom API. Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 5b9bf512ca93a46d370215966d21208ca2e7dc64 Author: Grygorii Strashko Date: Sun Nov 25 18:15:22 2018 -0600 dt-bindings: phy: add cpsw port interface mode selection phy bindings Add CPSW Port's Interface Mode Selection PHY (phy-gmii-sel) DT Bindings Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Acked-by: Tony Lindgren Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit c5e18b3413b56ac9a8eadb96c44fcda26d1b49ff Author: Miquel Raynal Date: Fri Nov 23 10:21:15 2018 +0100 phy: mvebu-cp110-comphy: fix spelling in structure name Rename the mvebu_comhy_conf structure to be mvebu_comphy_conf, which is probably what the original author meant. Signed-off-by: Miquel Raynal Acked-by: Antoine Tenart Signed-off-by: Kishon Vijay Abraham I commit 2ad2af0816221ac9ce9d5c8b979868b58a696c40 Author: Tony Lindgren Date: Sun Dec 2 15:51:35 2018 -0800 phy: mapphone-mdm6600: Improve phy related runtime PM calls I noticed that phy_pm_runtime_get_sync() and phy_pm_runtime_put() are not currently doing anything for phy-mapphone-mdm6600, only the sysfs interface for works for "auto" and "on". This is because of the shared GPIO pins between mdm6600 USB port and n_gsm port. We have not enabled runtime PM for the phy driver until after we've booted up mdm6600 properly to the USB mode. Otherwise phy_create() would have called pm_runtime_enable() and pm_runtime_no_callbacks() automatically on init. Let's fix this by registering the phy a bit later after we've powered up the mdm6600 USB port. And as the PM runtime support is only needed for the n_gsm mode and not for USB, we can allow the device to idle between phy_mdm6600_power_on() and phy_mdm6600_power_off(). Note that for suspend, runtime_pm is already disabled for the phy so we need to check for pm_runtime_enabled(). Cc: Johan Hovold Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 72c0339c115b31b3c0b22b1809854136cadd49be Author: Yoshihiro Shimoda Date: Fri Nov 30 16:00:57 2018 +0900 phy: renesas: rcar-gen3-usb2: follow the hardware manual procedure This patch modifies rcar_gen3_init_otg() procedure to follow Figure 73.4 of "R-Car Series, 3rd Generation User's Manual: Hardware Rev.1.00". Signed-off-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I commit 44d30d622821d3bf7fa74b62e2ea62bde314ec1b Author: Alan Douglas Date: Mon Nov 12 16:42:16 2018 +0000 phy: cadence: Add driver for Sierra PHY Add a Sierra PHY driver with PCIe and USB support. The PHY has multiple lanes, which can be configured into groups, and a generic PHY device is created for each group. There are two resets controlling the overall PHY block, one to enable the APB interface for programming registers, and another to enable the PHY itself. Additionally there are resets for each PHY lane. The PHY can be configured in hardware to read register settings from ROM, or they can be written by the driver. The sequence of operation on startup is to enable the APB bus, write the PHY registers (if required) for each lane group, and then enable the PHY. Each group of lanes can then be individually controlled using the power_on()/ power_off() function for that generic PHY Signed-off-by: Alan Douglas Signed-off-by: Kishon Vijay Abraham I commit cb96a690724e105f149b27a88d66669c53b01625 Author: Alan Douglas Date: Mon Nov 12 16:42:01 2018 +0000 dt-bindings: phy: Document cadence Sierra PHY bindings Add DT binding documentation for Sierra PHY. The PHY supports a number of different protocols, including PCIe and USB. The PHY lanes may be configured as single or multi-lane links. Each link is treated as a separate sub-node. For example, if there are 4 lanes in total the first 2 might be configured as a multi-lane PCIe link while the other two are single lane USB links, and in this case there would be 3 sub-nodes. There are two resets for the PHY block (one for APB register access, one for the PHY link) and separate resets for each link. For multi-lane links, the reset corresponds to the reset line on the master lane, the resets on other lanes have no effect. Signed-off-by: Alan Douglas Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit b3af06451bf859a45a306678e02b12bb676a9687 Author: Grygorii Strashko Date: Mon Nov 19 19:24:24 2018 -0600 phy: core: clean up unused ethernet specific phy modes After recent changes PHY_MODE_SGMII, PHY_MODE_2500SGMII, PHY_MODE_QSGMII, PHY_MODE_10GKR are not used any more and can be removed. Hence - remove them. Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit cccc43b853df4d2663d3890e3365513d55612794 Author: Grygorii Strashko Date: Mon Nov 19 19:24:23 2018 -0600 phy: mvebu-cp110-comphy: convert to use eth phy mode and submode Convert mvebu-cp110-comphy PHY driver to use recently introduced PHY_MODE_ETHERNET and phy_set_mode_ext(). Cc: Russell King - ARM Linux Cc: Maxime Chevallier Cc: Antoine Tenart Signed-off-by: Grygorii Strashko Acked-by: Antoine Tenart Signed-off-by: Kishon Vijay Abraham I commit c8fe6d7f3f8345ba1d4b4f38d3163f6f94412f0a Author: Grygorii Strashko Date: Mon Nov 19 19:24:22 2018 -0600 phy: ocelot-serdes: convert to use eth phy mode and submode Convert ocelot-serdes PHY driver to use recently introduced PHY_MODE_ETHERNET and phy_set_mode_ext(). Cc: Quentin Schulz Signed-off-by: Grygorii Strashko Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz Signed-off-by: Kishon Vijay Abraham I commit 2af8caeee47846a84bc96abc3a72f7c991153040 Author: Grygorii Strashko Date: Mon Nov 19 19:24:21 2018 -0600 phy: core: add PHY_MODE_ETHERNET Add new PHY's mode to be used by Ethernet PHY interface drivers or multipurpose PHYs like serdes. It will be reused in further changes. Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 79a5a18aa9d1062205cdcfa183d4cd5241d1b8da Author: Grygorii Strashko Date: Mon Nov 19 19:24:20 2018 -0600 phy: core: rework phy_set_mode to accept phy mode and submode Currently the attempt to add support for Ethernet interface mode PHY (MII/GMII/RGMII) will lead to the necessity of extending enum phy_mode and duplicate there values from phy_interface_t enum (or introduce more PHY callbacks) [1]. Both approaches are ineffective and would lead to fast bloating of enum phy_mode or struct phy_ops in the process of adding more PHYs for different subsystems which will make them unmaintainable. As discussed in [1] the solution could be to introduce dual level PHYs mode configuration - PHY mode and PHY submode. The PHY mode will define generic PHY type (subsystem - PCIE/ETHERNET/USB_) while the PHY submode - subsystem specific interface mode. The last is usually already defined in corresponding subsystem headers (phy_interface_t for Ethernet, enum usb_device_speed for USB). This patch is cumulative change which refactors PHY framework code to support dual level PHYs mode configuration - PHY mode and PHY submode. It extends .set_mode() callback to support additional parameter "int submode" and converts all corresponding PHY drivers to support new .set_mode() callback declaration. The new extended PHY API int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode) is introduced to support dual level PHYs mode configuration and existing phy_set_mode() API is converted to macros, so PHY framework consumers do not need to be changed (~21 matches). [1] http://lkml.kernel.org/r/d63588f6-9ab0-848a-5ad4-8073143bd95d@ti.com Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 640ac14744862b8b95652e7bc38b4ee987fa5eaf Author: Rob Herring Date: Thu Oct 18 08:31:05 2018 -0500 MAINTAINERS: Add Kishon as maintainer of PHY bindings DT bindings normally go in via subsystem maintainers, so add PHY bindings under generic PHY framework. Reported-by: Gustavo A. R. Silva Cc: Kishon Vijay Abraham I Signed-off-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit ae409cc7c3cdb9ac4a1dba3eae70efec3d6b6c79 Author: Icenowy Zheng Date: Thu Oct 4 20:28:48 2018 +0800 phy: sun4i-usb: add support for H6 USB2 PHY The USB 2.0 PHY on Allwinner H6 SoC is similar to older Allwinner SoCs, with some USB0 quirk like A83T and PHY index 1/2 missing. Add support for it. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I commit 2659392e5c08dff626e6db1d739adff58a94604d Author: Icenowy Zheng Date: Thu Oct 4 20:28:47 2018 +0800 phy: sun4i-usb: add support for missing USB PHY index The new Allwinner H6 SoC's USB2 PHY has two holes -- USB1 (which is a 3.0 port with dedicated PHY) and USB2 (which doesn't exist at all). Add support for this kind of missing USB PHY index. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I commit 1726ea907a7f52d66560ccdb7d0c4da8a6094c14 Author: Icenowy Zheng Date: Thu Oct 4 20:28:46 2018 +0800 dt-bindings: phy: add binding for Allwinner H6 USB2 PHY The USB2.0 PHY on Allwinner H6 is similar to the ones on the ones on older SoCs, but with holes in PHY number (USB1 and USB2 are missing, in which USB1 is a USB3 PHY). Add binding for the PHY. Signed-off-by: Icenowy Zheng Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit e2affdbef2aca880f4b9e758779c72540db5f168 Author: Stefan Wahren Date: Sat Nov 10 16:59:15 2018 +0100 mailbox: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Lubomir Rintel Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Lubomir Rintel Signed-off-by: Jassi Brar commit 78f3ff524fca63e7d2a57149a34ade23d2c12798 Author: Dan Carpenter Date: Mon Dec 3 17:50:11 2018 +0300 mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate() The > comparison should be >= or we access one element beyond the end of the array. (The inst->qinsts[] array is allocated in the ti_msgmgr_probe() function and it has ->num_valid_queues elements.) Fixes: a2b79838b891 ("mailbox: ti-msgmgr: Add support for Secure Proxy") Signed-off-by: Dan Carpenter Acked-by: Nishanth Menon Signed-off-by: Jassi Brar commit 2e4ac7cc493f36e45facb921a992a145351d280c Author: Kevin Wangtao Date: Mon Dec 3 11:55:09 2018 +0800 mailbox: Hi3660: Fixup mailbox state machine malfunction issue Current mailbox driver of Hi3660 release the mailbox directly before sending a new message which may cause last message lost and next message sending doesn't take effect actually. This patch fixs this issue by following the right progress below, each time before sending a message, mailbox driver will check whether the mailbox is in ready state, if last message has been acknowledged, the mailbox driver will clear the ack state to turn the mailbox to ready state again. Signed-off-by: Kevin Wangtao Reviewed-and-tested-by: Leo Yan Tested-by: Valentin Schneider Signed-off-by: Jassi Brar commit b5452838c661726880652f14e20ab58efed54fa5 Author: Julia Lawall Date: Fri Nov 2 16:11:55 2018 +0100 mailbox: hi3660: constify mbox_chan_ops structure The mbox_chan_ops structure can be const as it is only stored in the ops field of an mbox_controller structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Jassi Brar commit 5b20c6fd6a60e182243da31c47f2ebff5b0e3d57 Author: Yangtao Li Date: Tue Dec 11 11:37:44 2018 -0500 timekeeping: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Thomas Gleixner Cc: john.stultz@linaro.org Cc: sboyd@kernel.org Link: https://lkml.kernel.org/r/20181211163744.22133-1-tiny.windzz@gmail.com commit b2dbff1bb893d5dfdf501231ff5505ca10cdede3 Author: Jens Axboe Date: Tue Dec 11 18:39:41 2018 -0700 sbitmap: flush deferred clears for resize and shallow gets We're missing a deferred clear off the shallow get, which can cause a hang. Additionally, when we resize the sbitmap, we should also flush deferred clears for good measure. Ensure we have full coverage on batch clears, even for paths where we would not be doing deferred clear. This makes it less error prone for future additions. Reported-by: Bart Van Assche Tested-by: Ming Lei Signed-off-by: Jens Axboe commit 37ab566c178d79807b2d20b4c999133780355c6c Author: Martin KaFai Lau Date: Tue Dec 11 16:02:05 2018 -0800 bpf: arm64: Enable arm64 jit to provide bpf_line_info This patch enables arm64's bpf_int_jit_compile() to provide bpf_line_info by calling bpf_prog_fill_jited_linfo(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit fec7b6690541b8128663a13c9586b1daf42b0a6c Author: Tycho Andersen Date: Sun Dec 9 11:24:14 2018 -0700 samples: add an example of seccomp user trap The idea here is just to give a demonstration of how one could safely use the SECCOMP_RET_USER_NOTIF feature to do mount policies. This particular policy is (as noted in the comment) not very interesting, but it serves to illustrate how one might apply a policy dodging the various TOCTOU issues. Signed-off-by: Tycho Andersen CC: Kees Cook CC: Andy Lutomirski CC: Oleg Nesterov CC: Eric W. Biederman CC: "Serge E. Hallyn" CC: Christian Brauner CC: Tyler Hicks CC: Akihiro Suda Signed-off-by: Kees Cook commit 6a21cc50f0c7f87dae5259f6cfefe024412313f6 Author: Tycho Andersen Date: Sun Dec 9 11:24:13 2018 -0700 seccomp: add a return code to trap to userspace This patch introduces a means for syscalls matched in seccomp to notify some other task that a particular filter has been triggered. The motivation for this is primarily for use with containers. For example, if a container does an init_module(), we obviously don't want to load this untrusted code, which may be compiled for the wrong version of the kernel anyway. Instead, we could parse the module image, figure out which module the container is trying to load and load it on the host. As another example, containers cannot mount() in general since various filesystems assume a trusted image. However, if an orchestrator knows that e.g. a particular block device has not been exposed to a container for writing, it want to allow the container to mount that block device (that is, handle the mount for it). This patch adds functionality that is already possible via at least two other means that I know about, both of which involve ptrace(): first, one could ptrace attach, and then iterate through syscalls via PTRACE_SYSCALL. Unfortunately this is slow, so a faster version would be to install a filter that does SECCOMP_RET_TRACE, which triggers a PTRACE_EVENT_SECCOMP. Since ptrace allows only one tracer, if the container runtime is that tracer, users inside the container (or outside) trying to debug it will not be able to use ptrace, which is annoying. It also means that older distributions based on Upstart cannot boot inside containers using ptrace, since upstart itself uses ptrace to monitor services while starting. The actual implementation of this is fairly small, although getting the synchronization right was/is slightly complex. Finally, it's worth noting that the classic seccomp TOCTOU of reading memory data from the task still applies here, but can be avoided with careful design of the userspace handler: if the userspace handler reads all of the task memory that is necessary before applying its security policy, the tracee's subsequent memory edits will not be read by the tracer. Signed-off-by: Tycho Andersen CC: Kees Cook CC: Andy Lutomirski CC: Oleg Nesterov CC: Eric W. Biederman CC: "Serge E. Hallyn" Acked-by: Serge Hallyn CC: Christian Brauner CC: Tyler Hicks CC: Akihiro Suda Signed-off-by: Kees Cook commit a5662e4d81c4d4b08140c625d0f3c50b15786252 Author: Tycho Andersen Date: Sun Dec 9 11:24:12 2018 -0700 seccomp: switch system call argument type to void * The const qualifier causes problems for any code that wants to write to the third argument of the seccomp syscall, as we will do in a future patch in this series. The third argument to the seccomp syscall is documented as void *, so rather than just dropping the const, let's switch everything to use void * as well. I believe this is safe because of 1. the documentation above, 2. there's no real type information exported about syscalls anywhere besides the man pages. Signed-off-by: Tycho Andersen CC: Kees Cook CC: Andy Lutomirski CC: Oleg Nesterov CC: Eric W. Biederman CC: "Serge E. Hallyn" Acked-by: Serge Hallyn CC: Christian Brauner CC: Tyler Hicks CC: Akihiro Suda Signed-off-by: Kees Cook commit db5113911abaa7eb20cf115d4339959c1aecea95 Author: Tycho Andersen Date: Sun Dec 9 11:24:11 2018 -0700 seccomp: hoist struct seccomp_data recalculation higher In the next patch, we're going to use the sd pointer passed to __seccomp_filter() as the data to pass to userspace. Except that in some cases (__seccomp_filter(SECCOMP_RET_TRACE), emulate_vsyscall(), every time seccomp is inovked on power, etc.) the sd pointer will be NULL in order to force seccomp to recompute the register data. Previously this recomputation happened one level lower, in seccomp_run_filters(); this patch just moves it up a level higher to __seccomp_filter(). Thanks Oleg for spotting this. Signed-off-by: Tycho Andersen CC: Kees Cook CC: Andy Lutomirski CC: Oleg Nesterov CC: Eric W. Biederman CC: "Serge E. Hallyn" Acked-by: Serge Hallyn CC: Christian Brauner CC: Tyler Hicks CC: Akihiro Suda Signed-off-by: Kees Cook commit 5c7e8bbb025726f9cb9b2bc050509a94262426f8 Author: Eyal Davidovich Date: Sat Oct 20 16:18:00 2018 +0300 net/mlx5e: Use monitor counters for update stats - Adding new notifier block (struct mlx5_nb) monitor_counters_nb for handeling MONITOR_COUNTER new event type. - Adding work queue element: monitor_counters_work for re-arm and update stats. - We re-queue the update stat work, only when working over firmware that doesn't support the monitored counters. Signed-off-by: Eyal Davidovich Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 2f8bc4917a86f4504f85f0e24d67d17bd2a9bfc1 Author: Eyal Davidovich Date: Mon Oct 8 12:16:01 2018 +0300 net/mlx5e: Monitor counters commands support new file monitor_stats.c for the new API. add arm_monitor_counter new command support. add set_monitor_counter new command support. The device can monitor specific counters and provide an event to notify when these counters are changed. The monitoring is done in best effort manner where the minimum notification period is 200 ms, however when the device is loaded, the notification might be delayed. To configure the required counters to be monitored, the SET_MONITOR_COUNTER command shall be used with a list of counters to be monitored. The device firmware can monitor up to HCA_CAP.max_num_of_monitor_counters. The configuration is done based on counter type (such as ppcnt, q counter, etc) and additional param according to the type of counter selected. Upon monitor counter change, the device will generate Monitor_Counter_Change event. The device will not generate new events unless the driver re-arms the monitoring functionality, using the ARM_MONITOR_COUNTER command. Signed-off-by: Eyal Davidovich Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 75370eb0d3b802f54600f2fc3ae5255fe9270112 Author: Eyal Davidovich Date: Sun Oct 7 15:18:37 2018 +0300 net/mlx5e: Avoid query PPCNT register if not supported by the device PPCNT is not supported if PCAM access reg is supported and ppcnt bit is clear. Signed-off-by: Eyal Davidovich Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 939de57d30344ce728b0de61be87984e75af420e Author: Daniel Jurgens Date: Mon Nov 5 16:05:37 2018 -0600 net/mlx5e: Use CQE padding for Ethernet CQs Writing 64B CQEs to 128B cache lines results in a RMW operation. Padding the CQEs to 128B if possible improves performance on 128B cache line systems like PPC. Testing on PPC showed up to a 24% improvement in small packet throughput vs the default behavior, depending on the workload and system topology. Signed-off-by: Daniel Jurgens Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8c4dc42bf6e4ffeda49cf5e26bfc991b548fc0aa Author: Eli Britstein Date: Sun Nov 18 14:21:46 2018 +0200 net/mlx5e: Support multiple encapsulations for a TC flow Currently a flow is associated with a single encap structure. The FW extended destination features enables the driver to associate a flow with multiple encap instances. Change the encap id field from a flow scope to a per destination value in the flow attributes struct. Use the encaps array to associate a flow table entry with multiple encap entries. Update the neigh logic to offload only if all encapsulations used in a flow are connected, and un-offload upon the first one disconnected. Note that the driver can now support up to two encap destinations. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 79baaec71989afa805a0f2dd532451a6103e11b4 Author: Eli Britstein Date: Sun Dec 2 09:44:13 2018 +0200 net/mlx5e: Allow association of a flow to multiple encaps Currently a flow can be associated with a single encap entry. The extended destination feature enables the driver to configure multiple encap entries per flow. Change the encap flow association field to array as a pre-step towards supporting multiple encap destinations. Use only the first array element, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 98b66cb1c9ff6ffbc6133ed649b2731638520992 Author: Eli Britstein Date: Sun Nov 18 13:16:52 2018 +0200 net/mlx5e: Change parse attr struct to accommodate multiple tunnel infos Currently the driver can support only a single TC tunnel_set action. Change the tunnel info fields to arrays, as a pre-step to support multiple encapsulations for a single flow, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 1cc26d74bb98bd9693f0e630ee1cac87d5ba9f20 Author: Eli Britstein Date: Mon Nov 26 07:24:08 2018 +0200 net/mlx5e: Support header rewrite actions with remote port mirroring A rule with the following actions is split to a two level FDB: 1. Forward to local mirror vport 2. Header rewrite 3. Forward to local vport In the first level flow table, forward the packet to the local port and forward the packet to the second level flow table for header rewrite and local port forwarding. This configuration fails when mirroring to a remote encapsulated destination because currently an FTE cannot support encap and table destinations. Use the extended destination capabilities to configure the first level flow table with a multi-destination FTE to the uplink and second level table and the second level flow table for the header rewrite and local port forwarding. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 38c9d2697b9c0d928875ea45b5e2fd706df7ad7e Author: Eli Britstein Date: Thu Nov 22 14:04:33 2018 +0200 net/mlx5e: Replace the split logic with extended destination Currently the FTE encap flag applies to all destinations. To support mirroring encapsulated traffic to a local port the driver split the two destinations to two flow table entries: Table#0: - FWD to the local vport - Goto table#1 Table#1: - Encap and FWD to wire The firmware extended destination capabilities enable the driver to set an encapsulation flag per destination. Remove the split logic and use the extended destination mechanism instead. Note that split technique is still required for pedit and VLAN push scenarios. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit a18e879d4e45b6aef73f42c765cd0da4b26f4260 Author: Eli Britstein Date: Tue Dec 4 08:06:41 2018 +0200 net/mlx5e: Annul encap action ordering requirement Currently a FW syndrome is emitted if the driver configures a multi-destination FTE where the first destination is a tunneled uplink port and the second destination is a local vPort. Support this scenario by creating a multi-destination FTE using the firmware's extended destination capabilities. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit f493f15534ecb5c2c295ba49a2add5822d05ae19 Author: Eli Britstein Date: Sat Dec 1 09:40:43 2018 +0200 net/mlx5e: Move flow attr reformat action bit to per dest flags Flow attr reformat action bit is moved from the global action bits to a per destination flags field, as a pre-step for adding additional flags to support encapsulation properties per destination, with no functionality change. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit df65a573eab28059e5dd1d5c32ad270dcf9cbf24 Author: Eli Britstein Date: Sat Dec 1 09:40:43 2018 +0200 net/mlx5e: Refactor eswitch flow attr for destination specific properties Currently the eswitch flow attr structure stores each destination specific property in its own specific array. Group them in an array of destination structures as a pre-step towards adding additional destination specific field properties. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit e85e02bad29e822c3ebde80e7c9e7428329c4a5b Author: Eli Britstein Date: Fri Nov 23 09:38:27 2018 +0200 net/mlx5: E-Switch, Rename esw attr mirror count field The mirror count esw attributes field is used to determine if splitting the rule to two FTEs is required while programming e-switch mirroring. Rename it to split count, making it clearer with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 1228e912c9343d35b21663af82dea39dd8a575b8 Author: Eli Britstein Date: Sun Nov 18 08:25:17 2018 +0200 net/mlx5: Consider encapsulation properties when comparing destinations Currently the driver identifies identical vport destinations by comparing the vport ID. The FW extended destination feature enables the driver to forward the packet to the same vport with multiple encapsulation properties. Change the vport destination comparison logic to compare the encapsulation properties in addition to the vport ID. Signed-off-by: Eli Britstein Acked-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 4725c4ba8d1c81c0b44a7a4f9b7f21bb0331e705 Author: Kamal Heib Date: Mon Dec 10 21:09:37 2018 +0200 RDMA/mlx4: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 15644f57cb6659349bc1ca7419fa89a28fbcfe61 Author: Kamal Heib Date: Mon Dec 10 21:09:36 2018 +0200 RDMA/i40iw: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 7f645a58d00155b93800fdd4e157c8f58fb3122f Author: Kamal Heib Date: Mon Dec 10 21:09:35 2018 +0200 RDMA/hns: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit e3c320caa10713e1276cd2b813a6cdac37810e51 Author: Kamal Heib Date: Mon Dec 10 21:09:34 2018 +0200 RDMA/hfi1: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit dad3b05d050a8ce5825b2bd7c680fc127b3c2c69 Author: Kamal Heib Date: Mon Dec 10 21:09:33 2018 +0200 RDMA/cxgb4: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 071b2ca40ae31bf1ce0c4a6edb5fc52988dafa54 Author: Kamal Heib Date: Mon Dec 10 21:09:32 2018 +0200 RDMA/cxgb3: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 9615f86be981a41a830ae088856da3e5ac362ab6 Author: Kamal Heib Date: Mon Dec 10 21:09:31 2018 +0200 RDMA/bnxt_re: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 521ed0d92ab0db3edd17a5f4716b7f698f4fce61 Author: Kamal Heib Date: Mon Dec 10 21:09:30 2018 +0200 RDMA/core: Introduce ib_device_ops This change introduces the ib_device_ops structure that defines all the InfiniBand device operations in one place, so the code will be more readable and clean, unlike today when the ops are mixed with ib_device data members. The providers will need to define the supported operations and assign them using ib_set_device_ops(), that will also make the providers code more readable and clean. Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 2dd8e44cb4f3893f26ca29e9593450f289a0b48a Author: Yuval Shaia Date: Tue Dec 11 12:26:35 2018 +0200 IB/mlx4: Remove unneeded NULL check NULL check for kfree is unnecessary, remove it. Fixes: b42dde478bca ("IB/mlx4: Rework special QP creation error path") Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8cc0698f46ca9cb38e77323e1074f182aac4040a Author: Leon Romanovsky Date: Tue Dec 11 12:04:42 2018 +0200 RDMA/ocrdma: Use PCI-ID as an identification in debugfs In opposite to current implementation of identification based on device name, PCI-ID identification provides stable names suitable for device rename. Change ocrdma debugfs representation to use PCI-ID. Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 9435ef4caeea0a1141e461f9ee6f91b173867c05 Author: Leon Romanovsky Date: Tue Dec 11 11:41:05 2018 +0200 RDMA/uverbs: Optimize clearing of extra bytes in response Clear extra bytes in response in batch manner instead of doing it per-byte. Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe commit a276a4d93bf1580d737f38d1810e5f4b166f3edd Author: Gal Pressman Date: Mon Dec 10 17:17:25 2018 +0200 RDMA/vmw_pvrdma: Use atomic memory allocation in create AH Create address handle callback should not sleep, use GFP_ATOMIC instead of GFP_KERNEL for memory allocation. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Cc: Adit Ranadive Signed-off-by: Gal Pressman Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe commit 59590b8ad2eea9543a639880fc0d2c139b66d164 Author: Yuval Shaia Date: Sun Dec 9 13:06:10 2018 +0200 IB/{mlx5,ocrdma,qedr,rxe}: Omit port validation from IB verbs RDMA core layer already make sure port is valid, no need to check it here again. For the pkey validation this depends on commit b3ac5742fead ("RDMA/core: Validate port number in query_pkey verb") Signed-off-by: Yuval Shaia Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a1462351b590a4fa8eed6e5bf14245425635be0d Author: Leon Romanovsky Date: Mon Dec 10 11:19:49 2018 +0200 RDMA/mlx5: Fail early if user tries to create flows on IB representors IB representors don't support creation of RAW ethernet QP flows. Disable them by reusing existing RDMA/core support macros. We do it for both creation and matcher because latter is not usable if no flow creation is available. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f94e02ddfd88a511ed64fb68905e35d727635fea Author: YueHaibing Date: Mon Dec 10 15:27:59 2018 +0800 IB/mlx5: Remove duplicated include from mlx5_ib.h Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d764970bcea34b2d907ef1b9fe29d09b17099552 Author: Michael Guralnik Date: Sun Dec 9 11:49:54 2018 +0200 IB/mlx5: Add 2X width support to query_port Report to the user 2x width over MAD interface. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a1697aba2721bebd5af2a041b9c251ce9bf7631e Author: Jeffrey Hugo Date: Tue Dec 11 13:00:04 2018 -0700 clk: qcom: Add missing msm8998 resets commit c0cb7c7e7164 ("clk: qcom: Enumerate remaining msm8998 resets") missed two USB2 resets. Add them. Fixes: c0cb7c7e7164 ("clk: qcom: Enumerate remaining msm8998 resets") Signed-off-by: Jeffrey Hugo Signed-off-by: Stephen Boyd commit 28ab1bb0e8f031dd7dd3462ff8f6b2e93fc77e7f Merge: b874155a5fa45 40e020c129cfc Author: Jason Gunthorpe Date: Tue Dec 11 14:24:57 2018 -0700 Merge tag 'v4.20-rc6' into rdma.git for-next For dependencies in following patches. commit 52eb74339a6233c69f4e3794b69ea7c98eeeae1b Author: Reinette Chatre Date: Mon Dec 10 14:31:13 2018 -0800 x86/resctrl: Fix rdt_find_domain() return value and checks rdt_find_domain() returns an ERR_PTR() that is generated from a provided domain id when the value is negative. Care needs to be taken when creating an ERR_PTR() from this value because a subsequent check using IS_ERR() expects the error to be within the MAX_ERRNO range. Using an invalid domain id as an ERR_PTR() does work at this time since this is currently always -1. Using this undocumented assumption is fragile since future users of rdt_find_domain() may not be aware of thus assumption. Two related issues are addressed: - Ensure that rdt_find_domain() always returns a valid error value by forcing the error to be -ENODEV when a negative domain id is provided. - In a few instances the return value of rdt_find_domain() is just checked for NULL - fix these to include a check of ERR_PTR. Fixes: d89b7379015f ("x86/intel_rdt/cqm: Add mon_data") Fixes: 521348b011d6 ("x86/intel_rdt: Introduce utility to obtain CDP peer") Signed-off-by: Reinette Chatre Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Tony Luck Cc: fenghua.yu@intel.com Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: x86-ml Link: https://lkml.kernel.org/r/b88cd4ff6a75995bf8db9b0ea546908fe50f69f3.1544479852.git.reinette.chatre@intel.com commit 922454c2e77c58062c81d33c564c5133343ab3e9 Author: Nicholas Kazlauskas Date: Fri Dec 7 10:07:09 2018 -0500 drm/amd/display: Fix duplicating scaling/underscan connector state [Why] These properties aren't being carried over when the atomic state. This tricks atomic check and commit tail into performing underscan and scaling operations when they aren't needed. With the patch that forced scaling/RMX_ASPECT on by default this results in many unnecessary surface updates and hangs under certain conditions. [How] Duplicate the properties. Fixes: 91b66c47ba34 ("drm/amd/display: Set RMX_ASPECT as default") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 65276f2bebea047338196a584291c6c8ccd7ea13 Author: Nicholas Kazlauskas Date: Wed Nov 28 16:17:50 2018 -0500 drm/amd/display: Fix unintialized max_bpc state values [Why] If the "max bpc" isn't explicitly set in the atomic state then it have a value of 0. This has the correct behavior of limiting a panel to 8bpc in the case where the panel supports 8bpc. In the case of eDP panels this isn't a true assumption - there are panels that can only do 6bpc. Banding occurs for these displays. [How] Initialize the max_bpc when the connector resets to 8bpc. Also carry over the value when the state is duplicated. Bugzilla: https://bugs.freedesktop.org/108825 Fixes: 307638884f72 ("drm/amd/display: Support amdgpu "max bpc" connector property") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 05f224ca669398b567d09feb6e2ceefcb7d7f945 Author: Douglas Anderson Date: Thu Dec 6 14:23:18 2018 -0800 regulator: core: Clean enabling always-on regulators + their supplies At the end of regulator_resolve_supply() we have historically turned on our supply in some cases. This could be for one of two reasons: 1. If resolving supplies was happening before the call to set_machine_constraints() we needed to predict if set_machine_constraints() was going to turn the regulator on and we needed to preemptively turn the supply on. 2. Maybe set_machine_constraints() happened before we could resolve supplies (because we failed the first time to resolve) and thus we might need to propagate an enable that already happened up to our supply. Historically regulator_resolve_supply() used _regulator_is_enabled() to decide whether to turn on the supply. Let's change things a little bit. Specifically: 1. Let's try to enable the supply and the regulator in the same place, both in set_machine_constraints(). This means that we have exactly the same logic for enabling the supply and the regulator. 2. Let's properly set use_count when we enable always-on or boot-on regulators even for those that don't have supplies. The previous commit 1fc12b05895e ("regulator: core: Avoid propagating to supplies when possible") only did this right for regulators with supplies. 3. Let's make it clear that the only time we need to enable the supply in regulator_resolve_supply() is if the main regulator is currently in use. By using use_count (like the rest of the code) to decide if we're going to enable our supply we keep everything consistent. Overall the new scheme should be cleaner and easier to reason about. In addition to fixing regulator_summary to be more correct (because of the more correct use_count), this change also has the effect of no longer using _regulator_is_enabled() in this code path. _regulator_is_enabled() could return an error code for some regulators at bootup (like RPMh) that can't read their initial state. While one can argue that the design of those regulators is sub-optimal, the new logic sidesteps this brokenness. This fix in particular fixes observed problems on Qualcomm sdm845 boards which use the above-mentioned RPMh regulator. Those problems were made worse by commit 1fc12b05895e ("regulator: core: Avoid propagating to supplies when possible") because now we'd think at bootup that the SD regulators were already enabled and we'd never try them again. Fixes: 1fc12b05895e ("regulator: core: Avoid propagating to supplies when possible") Reported-by: Evan Green Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit e6202e8249aa7115af65f2d80b43c132816224ef Merge: 2b96edb570709 d407c81adae57 Author: Mark Brown Date: Tue Dec 11 20:44:49 2018 +0000 Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21 commit 6ff9b09e00a441599f3aacdf577254455a048bc9 Author: Andreas Gruenbacher Date: Mon Nov 26 18:45:35 2018 +0100 gfs2: Get rid of potential double-freeing in gfs2_create_inode In gfs2_create_inode, after setting and releasing the acl / default_acl, the acl / default_acl pointers are not set to NULL as they should be. In that state, when the function reaches label fail_free_acls, gfs2_create_inode will try to release the same acls again. Fix that by setting the pointers to NULL after releasing the acls. Slightly simplify the logic. Also, posix_acl_release checks for NULL already, so there is no need to duplicate those checks here. Fixes: e01580bf9e4d ("gfs2: use generic posix ACL infrastructure") Reported-by: Pan Bian Cc: Christoph Hellwig Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson commit cbbe76c8bb27c0bea4bfa6cac56b5d4073b90687 Author: Bob Peterson Date: Fri Nov 16 14:18:32 2018 -0600 gfs2: Remove vestigial bd_ops Field bd_ops was set but never used, so I removed it, and all code supporting it. Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse Signed-off-by: Andreas Gruenbacher commit 28c59469302a39277029b19672db32b0a5e9c30b Author: Nicholas Kazlauskas Date: Fri Dec 7 12:15:01 2018 -0500 Revert "drm/amd/display: Set RMX_ASPECT as default" This reverts commit 91b66c47ba3468f7882ea4a84d5e0e0c186b638f. Forcing RMX_ASPECT as default uses the preferred/native mode's timings for any mode the user selects and scales the image. This provides a a consistently nicer result in the case where the selected mode's refresh rate matches the native mode's refresh but this isn't always the case. For example, if the monitor is 1080p@144Hz and the preferred mode is 60Hz then even if the user selects 1080p@144Hz as their selected mode they'll get 1080p@60Hz. Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit b874155a5fa450bf5e4b5303cbfff05958805bf8 Author: Michael Guralnik Date: Sun Dec 9 11:49:52 2018 +0200 IB/mlx5: Add HDR speed support to query port Report HDR speed when HDR is supported in CapabilityMask2 and the actual speed is HDR. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4106a758f791de11502cc6be89c971735cab360f Author: Michael Guralnik Date: Sun Dec 9 11:49:51 2018 +0200 IB/mlx5: Report CapabilityMask2 in ib_query_port CapabilityMask2 exists when IB_PORT_CAP_MASK2_SUP is set in the original capability mask. In such cases, query its value and report it in query port. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a5a5d1993696419e7d5357fc3128e53d219d382e Author: Michael Guralnik Date: Sun Dec 9 11:49:50 2018 +0200 IB/core: Add new IB rates Add the new rates that were added to Infiniband spec as part of HDR and 2x support. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 48f9c33c25bf9d2dcf8518b4c56ea50b7735a310 Author: Rob Herring Date: Wed Dec 5 13:50:24 2018 -0600 i2c: powermac: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Signed-off-by: Rob Herring Signed-off-by: Wolfram Sang commit 4d08d20f1c94b2da5847d3f9ba6c93ae5b1520c2 Author: Arnd Bergmann Date: Tue Dec 11 15:08:10 2018 +0100 arm64: fix ARM64_USER_VA_BITS_52 builds In some randconfig builds, the new CONFIG_ARM64_USER_VA_BITS_52 triggered a build failure: arch/arm64/mm/proc.S:287: Error: immediate out of range As it turns out, we were incorrectly setting PGTABLE_LEVELS here, lacking any other default value. This fixes the calculation of CONFIG_PGTABLE_LEVELS to consider all combinations again. Fixes: 68d23da4373a ("arm64: Kconfig: Re-jig CONFIG options for 52-bit VA") Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon commit 7faa313f05cad184e8b17750f0cbe5216ac6debb Author: Will Deacon Date: Tue Dec 11 13:41:32 2018 +0000 arm64: preempt: Fix big-endian when checking preempt count in assembly Commit 396244692232 ("arm64: preempt: Provide our own implementation of asm/preempt.h") extended the preempt count field in struct thread_info to 64 bits, so that it consists of a 32-bit count plus a 32-bit flag indicating whether or not the current task needs rescheduling. Whilst the asm-offsets definition of TSK_TI_PREEMPT was updated to point to this new field, the assembly usage was left untouched meaning that a 32-bit load from TSK_TI_PREEMPT on a big-endian machine actually returns the reschedule flag instead of the count. Whilst we could fix this by pointing TSK_TI_PREEMPT at the count field, we're actually better off reworking the two assembly users so that they operate on the whole 64-bit value in favour of inspecting the thread flags separately in order to determine whether a reschedule is needed. Acked-by: Ard Biesheuvel Reported-by: "kernelci.org bot" Tested-by: Kevin Hilman Signed-off-by: Will Deacon commit dbabf68574f96d49cfa4eb6e8e56178874477535 Author: Michael Guralnik Date: Sun Dec 9 11:49:49 2018 +0200 IB/core: Add 2X port width Add the new 2X port width that is part of IB spec 1.3 Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1e8f43b7fb25aa7a85db1e81b4689dd394e23b35 Author: Michael Guralnik Date: Sun Dec 9 11:49:48 2018 +0200 IB/core: Add CapabilityMask2 to port attributes CapabilityMask2 was added in IB Spec 1.3 under PortInfo attribute. The new Capapbility mask is needed in order to expose the new 2X width and HDR speed. Signed-off-by: Michael Guralnik Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4f5c85fe3a60ace555d09898166af372547f97fc Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Mon Dec 10 15:01:27 2018 +0000 i2c-axxia: check for error conditions first It was observed that when using seqentional mode contrary to the documentation, the SS bit (which is supposed to only be set if automatic/sequence command completed normally), is sometimes set together with NA (NAK in address phase) causing transfer to falsely be considered successful. My assumption is that this does not happen during manual mode since the controller is stopping its work the moment it sets NA/ND bit in status register. This is not the case in Automatic/Sequentional mode where it is still working to send STOP condition and the actual status we get depends on the time when the ISR is run. This patch changes the order of checking status bits in ISR - error conditions are checked first and only if none of them occurred, the transfer may be considered successful. This is required to introduce using of sequentional mode in next patch. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang commit eb9907789ac373fc122c4b3a3c2d3f061d9ee922 Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Mon Dec 10 15:00:52 2018 +0000 i2c-axxia: dedicated function to set client addr This patch moves configuration of hardware registers used for setting i2c client address to separate function. It is preparatory change for next commit. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang commit 66693960f574aa830986e1603657af36423b24eb Merge: 3ca3f86f7f485 40e020c129cfc Author: Wolfram Sang Date: Tue Dec 11 20:58:20 2018 +0100 Merge tag 'v4.20-rc6' into i2c/for-5.0 Linux 4.20-rc6 commit 3ca3f86f7f4856222a8b697d60d32717160a1a1b Author: Thierry Reding Date: Fri Nov 23 13:51:38 2018 +0100 dt-bindings: i2c: Use correct vendor prefix for Atmel The "at," prefix was never correct for Atmel, so fix the few occurrences that got it wrong. Use "atmel," instead. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski Acked-by: Peter Rosin [wsa: merged two patches into one, dropped 'trivial-devices' hunk which needs to go in seperately] Signed-off-by: Wolfram Sang commit 3782cc3725b31767101de6439f26ed8693d80c4c Author: jun qian Date: Tue Sep 11 07:54:46 2018 -0700 i2c: tegra: replace spin_lock_irqsave with spin_lock in ISR As you are already in ISR, it is unnecessary to call spin_lock_irqsave. Signed-off-by: jun qian Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Wolfram Sang commit 7841b88a8fdddc0e7f3377fc42efe4cb3be1ed8b Author: Otavio Salvador Date: Mon Nov 26 15:35:06 2018 -0200 ARM: dts: rockchip: Add internal timer support for rv1108 Add support for the internal timer peripheral on RV1108. Signed-off-by: Otavio Salvador Signed-off-by: Heiko Stuebner commit 6db21d8986e14e2e86573a3b055b05296188bd2c Author: Yuval Shaia Date: Sun Dec 9 15:53:49 2018 +0200 IB/rxe: Fix incorrect cache cleanup in error flow Array iterator stays at the same slot, fix it. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yuval Shaia Reviewed-by: Bart Van Assche Reviewed-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2c4d5356e64d7d538f24c23045478330fae4a065 Author: Igor Konopko Date: Tue Dec 11 20:16:27 2018 +0100 lightnvm: pblk: do not overwrite ppa list with meta list Ehen using pblk with 0 sized metadata both ppa list and meta list points to the same memory since pblk_dma_meta_size() returns 0 in that case. This patch fix that issue by ensuring that pblk_dma_meta_size() always returns space equal to sizeof(struct pblk_sec_meta) and thus ppa list and meta list points to different memory address. Even that in that case drive does not really care about meta_list pointer, this is the easiest way to fix that issue without introducing changes in many places in the code just for 0 sized metadata case. The same approach needs to be also done for pblk_get_sec_meta() since we also cannot point to the same memory address in meta buffer when we are using it for pblk recovery process Reported-by: Hans Holmberg Tested-by: Hans Holmberg Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 55d8ec35398e7ab001989473cf6ed6f40b5ef4a6 Author: Igor Konopko Date: Tue Dec 11 20:16:26 2018 +0100 lightnvm: pblk: support packed metadata pblk performs recovery of open lines by storing the LBA in the per LBA metadata field. Recovery therefore only works for drives that has this field. This patch adds support for packed metadata, which store l2p mapping for open lines in last sector of every write unit and enables drives without per IO metadata to recover open lines. After this patch, drives with OOB size <16B will use packed metadata and metadata size larger than16B will continue to use the device per IO metadata. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit a16816b9e462e8ee86a908606bde54b53cfeca80 Author: Igor Konopko Date: Tue Dec 11 20:16:25 2018 +0100 lightnvm: disable interleaved metadata Currently pblk only check the size of I/O metadata and does not take into account if this metadata is in a separate buffer or interleaved in a single metadata buffer. In reality only the first scenario is supported, where second mode will break pblk functionality during any IO operation. This patch prevents pblk to be instantiated in case device only supports interleaved metadata. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 24828d0536bbedc9b265f2b01ffca99de3f6a7c7 Author: Igor Konopko Date: Tue Dec 11 20:16:24 2018 +0100 lightnvm: dynamic DMA pool entry size Currently lightnvm and pblk uses single DMA pool, for which the entry size always is equal to PAGE_SIZE. The contents of each entry allocated from the DMA pool consists of a PPA list (8bytes * 64), leaving 56bytes * 64 space for metadata. Since the metadata field can be bigger, such as 128 bytes, the static size does not cover this use-case. This patch adds support for I/O metadata above 56 bytes by changing DMA pool size based on device meta size and allows pblk to use OOB metadata >=16B. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit faa79f27f0a46cd6c3ac3de5e7f3e142598217fc Author: Igor Konopko Date: Tue Dec 11 20:16:23 2018 +0100 lightnvm: pblk: add helpers for OOB metadata pblk currently assumes that size of OOB metadata on drive is always equal to size of pblk_sec_meta struct. This commit add helpers which will allow to handle different sizes of OOB metadata on drive in the future. After this patch only OOB metadata equal to 16 bytes is supported. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit dd439496dfbcfee1eb1e0d14984f98acb2b84c16 Author: Igor Konopko Date: Tue Dec 11 20:16:22 2018 +0100 lightnvm: pblk: move lba list to partial read context Currently DMA allocated memory is reused on partial read for lba_list_mem and lba_list_media arrays. In preparation for dynamic DMA pool sizes we need to move this arrays into pblk_pr_ctx structures. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 42bd0384d77ef7552954056928018f5cfa91a013 Author: Javier González Date: Tue Dec 11 20:16:21 2018 +0100 lightnvm: pblk: avoid ref warning on cache creation The current kref implementation around pblk global caches triggers a false positive on refcount_inc_checked() (when called) as the kref is initialized to 0. Instead of usint kref_inc() on a 0 reference, which is in principle correct, use kref_init() to avoid the check. This is also more explicit about what actually happens on cache creation. In the process, do a small refactoring to use kref helpers. Fixes: 1864de94ec9d6 "lightnvm: pblk: stop recreating global caches" Signed-off-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 85136c0102852fe505c0fbd3f1bf9d17038bb94d Author: Matias Bjørling Date: Tue Dec 11 20:16:20 2018 +0100 lightnvm: simplify geometry enumeration Currently the geometry of an OCSSD is enumerated using a two step approach: First, nvm_register is called, the OCSSD identify command is issued, and second the geometry sos and csecs values are read either from the OCSSD identify if it is a 1.2 drive, or from the NVMe namespace data structure if it is a 2.0 device. This patch recombines it into a single step, such that nvm_register can use the csecs and sos fields independent of which version is used. This enables one to dynamically size the lightnvm subsystem dma pool. Reviewed-by: Igor Konopko Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 361d889f830ef61e4eae442c4c89fb14b626375f Author: Javier González Date: Tue Dec 11 20:16:19 2018 +0100 lightnvm: pblk: add comments wrt locking in recovery path pblk's recovery path is single threaded and therefore a number of assumptions regarding concurrency can be made. To avoid confusion, make this explicit with a couple of comments in the code. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit fde201a466c6ad5efd72cb54fdf2cefa8b6c6ad7 Author: Hua Su Date: Tue Dec 11 20:16:18 2018 +0100 lightnvm: pblk: add lock protection to list operations Protect the list_add on the pblk_line_init_bb() error path in case this code is used for some other purpose in the future. Signed-off-by: Hua Su Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 6e82f0ba00b0addeec27b3a95eb41e6223fc8c4f Author: Hua Su Date: Tue Dec 11 20:16:17 2018 +0100 lightnvm: pblk: fix spelling in comment Signed-off-by: Hua Su Updated description. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit e698d9f4e6254b838e4f1a3116ee069bbc378dc0 Author: Hans Holmberg Date: Tue Dec 11 20:16:16 2018 +0100 lightnvm: pblk: remove dead code in pblk_recov_l2p Remove the call to pblk_line_replace_data as it returns directly because we have not set l_mg->data_next yet. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 0934ce87b588a3da657b41804bf07518103875a4 Author: Hans Holmberg Date: Tue Dec 11 20:16:15 2018 +0100 lightnvm: pblk: fix pblk_lines_init error handling path The chunk metadata is allocated with vmalloc, so we need to use vfree to free it. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit c9a1d640d519b40d00dac850d1f17a7df1954689 Author: Hans Holmberg Date: Tue Dec 11 20:16:14 2018 +0100 lightnvm: pblk: remove unused macro ADDR_POOL_SIZE is not used anymore, so remove the macro. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 3bcebc5bac0935d662f30d317e33ffa660bebf93 Author: Hans Holmberg Date: Tue Dec 11 20:16:13 2018 +0100 lightnvm: pblk: set conservative threshold for user writes In a worst-case scenario (random writes), OP% of sectors in each line will be invalid, and we will then need to move data out of 100/OP% lines to free a single line. So, to prevent the possibility of running out of lines, temporarily block user writes when there is less than 100/OP% free lines. Also ensure that pblk creation does not produce instances with insufficient over provisioning. Insufficient over-provising is not a problem on real hardware, but often an issue when running QEMU simulations (with few lines). 100 lines is enough to create a sane instance with the standard (11%) over provisioning. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 525f7bb2c9f9b2c6673854eade89e98fb3ba7802 Author: Hans Holmberg Date: Tue Dec 11 20:16:12 2018 +0100 lightnvm: pblk: stop writes gracefully when running out of lines If mapping fails (i.e. when running out of lines), handle the error and stop writing. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit ab3887be1e1a2594c9818a77b0f9dfabf0e4ab59 Author: Hans Holmberg Date: Tue Dec 11 20:16:11 2018 +0100 lightnvm: pblk: account for write error sectors in emeta Lines inflicted with write errors lines might be recovered if they have not been recycled after write error garbage collection. Ensure that the emeta accounting of valid lbas is correct for such lines to avoid recovery inconsistencies. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit c12fa401ac8c94a74aff68bb5736b3f1dc695fa8 Author: Hans Holmberg Date: Tue Dec 11 20:16:10 2018 +0100 lightnvm: pblk: fix resubmission of overwritten write err lbas Make sure we only look up valid lba addresses on the resubmission path. If an lba is invalidated in the write buffer, that sector will be submitted to disk (as it is already mapped to a ppa), and that write might fail, resulting in a crash when trying to look up the lba in the mapping table (as the lba is marked as invalid). Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 96076f7dde51f332bce5fc5644ddc1e221f64a5a Author: Hans Holmberg Date: Tue Dec 11 20:16:09 2018 +0100 lightnvm: pblk: fix chunk close trace event check The check for chunk closes suffers from an off-by-one issue, leading to chunk close events not being traced. Fixes: 4c44abf43d00 ("lightnvm: pblk: add trace events for chunk states") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 55e58c5e78aad9d3246f57e7718cf5ee7adde9e3 Author: Geert Uytterhoeven Date: Tue Dec 11 20:16:08 2018 +0100 lightnvm: Fix uninitialized return value in nvm_get_chunk_meta() With gcc 4.1: drivers/lightnvm/core.c: In function ‘nvm_get_bb_meta’: drivers/lightnvm/core.c:977: warning: ‘ret’ may be used uninitialized in this function and drivers/nvme/host/lightnvm.c: In function ‘nvme_nvm_get_chk_meta’: drivers/nvme/host/lightnvm.c:580: warning: ‘ret’ may be used uninitialized in this function Indeed, if (for the former) the number of channels or LUNs is zero, or (for both) the passed number of chunks is zero, ret will be returned uninitialized. Fix this by preinitializing ret to zero. Fixes: aff3fb18f957de93 ("lightnvm: move bad block and chunk state logic to core") Fixes: a294c199455187d1 ("lightnvm: implement get log report chunk helpers") Signed-off-by: Geert Uytterhoeven Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit f40a62d2674b317a263512996f9a7abbfc8178ec Author: Zhoujie Wu Date: Tue Dec 11 20:16:07 2018 +0100 lightnvm: pblk: ignore the smeta oob area scan The smeta area l2p mapping is empty, and actually the recovery procedure only need to restore data sector's l2p mapping. So ignore the smeta oob scan. Signed-off-by: Zhoujie Wu Reviewed-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe commit 953d9f3903659fb1e21f6453ef5221a7652ec908 Author: Manivannan Sadhasivam Date: Mon Oct 29 15:12:40 2018 +0530 arm64: dts: rockchip: Add on-board LED support on rk3399-rock960 Add on-board LED support for Rock960 board based on the following standard used by rest of the 96Boards: green:user1 default-trigger: heartbeat green:user2 default-trigger: mmc0/disk-activity(onboard-storage) green:user3 default-trigger: mmc1 (SD-card) green:user4 default-trigger: none, panic-indicator yellow:wlan default-trigger: phy0tx blue:bt default-trigger: hci0-power Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Heiko Stuebner commit ba0abee70a9825b321f9b3499329b781d1d32f1c Author: Manivannan Sadhasivam Date: Mon Oct 29 15:12:39 2018 +0530 arm64: dts: rockchip: Add on-board LED support on rk3399-ficus Add on-board LED support for Ficus board based on the following standard used by other 96Boards: red:user1 default-trigger: heartbeat red:user2 default-trigger: mmc0/disk-activity (onboard-storage) red:user3 default-trigger: mmc1 (SD-card) red:user4 default-trigger: none, panic-indicator red:wlan default-trigger: phy0tx red:bt default-trigger: hci0-power Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Heiko Stuebner commit 0bd72117fba2dd51a65eaa7b480adc0eea9a4409 Author: Daniel Borkmann Date: Tue Dec 11 10:26:33 2018 +0100 bpf: fix up uapi helper description and sync bpf header with tools Minor markup fixup from bpf-next into net-next merge in the BPF helper description of bpf_sk_lookup_tcp() and bpf_sk_lookup_udp(). Also sync up the copy of bpf.h from tooling infrastructure. Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 0c1c3880442f07532780533457ba0784790d8de2 Author: Lijun Ou Date: Sat Dec 8 18:40:11 2018 +0800 RDMA/hns: Bugfix for RoCE loopback test This patch implements a cmdq to enable the loopback of ssu module according to the modified hardware desgin. The ssu consists of ingress unit, packet buffer and programmable packet process unit. if the loopback bit of ssu is not enabled, the roce packet with loopback bit will fail. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit f747b689451821fdf4bea53998feb38000595095 Author: Lijun Ou Date: Sat Dec 8 18:40:10 2018 +0800 RDMA/hns: Update posting & querying mailbox This patch updates the implementation of the mailbox command interface by using command queue instead of operating registers. With this update, the software can be well decoupled with the hardware. Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Jason Gunthorpe commit 4af07f01f7a787ba5158352b98c9e3cb74995a1c Author: Lijun Ou Date: Sat Dec 8 18:40:09 2018 +0800 RDMA/hns: Fix the bug while use multi-hop of pbl It will prevent multiply overflow when defines the pbl for u64 type. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 233673e422de70d6ba32e7b41dd75e47f036d03b Author: Lijun Ou Date: Sat Dec 8 18:40:08 2018 +0800 RDMA/hns: Encapsulate and simplify qp state transition This patch move the codes of qp state transition into the new function as well as simplify the logic for other qp states transition. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 9f5071010347b2134e1139dca2396a0cea8130dc Author: Lijun Ou Date: Sat Dec 8 18:40:07 2018 +0800 RDMA/hns: Init qp context when modify qp from reset to init It needs to clear qp context previous when init qp context. Otherwise, the newly created qp context residue has the contents of the qp context before the uninstall, and the qp context content is disordered, causing the task to fail. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 4f01b73e5adf5619d3e85a3c5845c89aad7a744d Author: Kuehling, Felix Date: Mon Dec 10 21:29:00 2018 +0000 drm/amdgpu: Fix stub function name This function was renamed in a previous commit. Update the stub function name for builds with CONFIG_HSA_AMD disabled. Fixes: 611736d8447c ("drm/amdgpu: Add KFD VRAM limit checking") Acked-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit ba0ede185ef4c74bfecfe1c992be5dbcc5c5ac04 Author: Jayant Shekhar Date: Wed Dec 5 21:51:47 2018 +0530 drm/msm/dpu: Fix clock issue after bind failure In case of msm drm bind failure, pm runtime put sync is called from dsi driver which issues an asynchronous put on mdss device. Subsequently when dpu_mdss_destroy is triggered the change will make sure to put the mdss device in suspend and clearing pending work if not scheduled. Signed-off-by: Jayant Shekhar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 7adc4a343f94589f1954e93fcadee3f55e263a0d Author: Jordan Crouse Date: Mon Dec 3 15:47:23 2018 -0700 drm/msm/dpu: Clean up dpu_media_info.h static inline functions Do some cleanup in the static inline functions defined in dpu_media_info.h by cleaning up gotos and unneeded local variables. v3: Added spaces between operators per Seal Paul and Sam Ravnborg Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3804a9824186af7c10f36fd4262b4e97326f1ef1 Author: Jordan Crouse Date: Mon Dec 3 15:47:22 2018 -0700 drm/msm/dpu: Further cleanups for static inline functions Remove more static inline functions that are lightly used and/or very simple and easy to build into the calling functions. v3: Fix a nit from Sean Paul v2: Removed another unused function from dpu_hw_lm.c and add back dpu_crtc_get_client_type() since there was a question regarding its usefulness. Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3d688410e6419d3d9cffa160506fe954039e0cc7 Author: Jordan Crouse Date: Mon Dec 3 15:47:21 2018 -0700 drm/msm/dpu: Cleanup the debugfs functions Do some debugfs cleanups from across the DPU driver. The DRM destroy functions will do a recursive delete on the entire debugfs node so there is no need to store dentry pointers for the debugfs files that are persistent for the life of the driver. This also means that the destroy functions can go away too. Also, use standard API functions where applicable instead of using hand written code. v3: No changes v2: Add more code; most of the dpu debugfs files should be addressed now. Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 8fe62a63a867184ff94b02d618d88deddfda0cc0 Author: Jordan Crouse Date: Mon Dec 3 15:47:20 2018 -0700 drm/msm/dpu: Remove dpu_irq and unused functions dpu_irq.c does some unneeded checks and passes control to dpu_core_irq.c The simple functions can be defined in the same file where we use them and the files and their associated hangers on can be deleted. Additionally the postinstall hook isn't used even in dpu_core_irq.c so zap that entire path. v3: No changes Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit ab07e0c19fda03712c979626178cf9e23d610aaf Author: Jordan Crouse Date: Mon Dec 3 15:47:19 2018 -0700 drm/msm: Make irq_postinstall optional Allow the KMS operation 'irq_postinstall' to be optional so that the target display drivers don't need to define a dummy function if they don't need one. v3: No changes Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 53edf462596623f853deb70c190bf25e231fb6b5 Author: Jordan Crouse Date: Mon Dec 3 15:47:18 2018 -0700 drm/msm/dpu: Cleanup callers of dpu_hw_blk_init Outside of superfluous parameter checks the dpu_hw_blk_init() doesn't have any failure paths. Switch it over to be a void function and we can remove error handling paths in all the functions that call it. While we're in those functions remove unneeded initialization for a static variable. v3: No changes v2: Removed a cleanup intended for a different patch Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit fa79bcc3d18bf365a88134afc3211e6450feeaf0 Author: Jordan Crouse Date: Mon Dec 3 15:47:17 2018 -0700 drm/msm/dpu: Remove unused functions Remove some unused container_of() helper functions. v3: No changes v2: Retained still used helper functions in the name of readability Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 49dfe764797b1eb0fe9e7f392645b9161d6cfce6 Author: Jordan Crouse Date: Mon Dec 3 15:47:16 2018 -0700 drm/msm/dpu: Remove dpu_crtc_is_enabled() The static inline function dpu_crtc_enabled() is only called once and the function that calls it in turn is only called once and the return value can be easily checked in the calling functions so collapse everything down. v3: No changes Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 35d600dd92489bcec8e91279a9c708e0e11f4bd4 Author: Jordan Crouse Date: Mon Dec 3 15:47:15 2018 -0700 drm/msm/dpu: Remove dpu_crtc_get_mixer_height dpu_crtc_get_mixer_height() is only used once and the value it returns can be easily derived from the calling function. v3: No changes Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 27bc773aa69cf9aa03020a9d87abbcf06d4af1c2 Author: Jordan Crouse Date: Mon Dec 3 15:47:14 2018 -0700 drm/msm/dpu: Remove dpu_dbg The functions in dpu_dbg.c aren't used. The two main dump functions fail after a lookup from dpu_dbg_base.reg_base_list which turns out to never be populated and once those are removed the rest of the file doesn't make any sense. v3: No changes v2: Moved some unrelated changes to another patch Reviewed-by: Sean Paul Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit f9e81b8da34d79978ae4effa18b16cb71cc5cb4a Author: Sean Paul Date: Fri Nov 16 13:42:34 2018 -0500 drm/msm: dpu: Remove crtc_lock Each time it's called we're holding the crtc modeset lock, so it's redundant. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3e46c5df667b361627a57861877c5881a22ef071 Author: Sean Paul Date: Fri Nov 16 13:42:33 2018 -0500 drm/msm: dpu: Remove vblank_requested flag from dpu_crtc It's just for debugfs output, we don't need it Changes in v2: - None Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a796ba2cb3dde3d155401e91e8341879de1248ec Author: Sean Paul Date: Fri Nov 16 13:42:32 2018 -0500 drm/msm: dpu: Separate crtc assignment from vblank enable Instead of assigning/clearing the crtc on vblank enable/disable, we can just assign and clear the crtc on modeset. That allows us to just toggle the encoder's vblank interrupts on vblank_enable. So why is this important? Previously the driver was using the legacy pointers to assign/clear the crtc. Legacy pointers are cleared _after_ disabling the hardware, so the legacy pointer was valid during vblank_disable, but that's not something we should rely on. Instead of relying on the core ordering the legacy pointer assignments just so, we'll assign the crtc in dpu_crtc enable/disable. This is the only place that mapping can change, so we're covered there. We're also taking advantage of drm_crtc_vblank_on/off. By using this, we ensure that vblank_enable/disable can never be called while the crtc is off (which means the assigned crtc will always be valid). As such, we don't need to use modeset locks or the crtc_lock in the vblank_enable/disable routine to be sure state is consistent. ...I think. Changes in v2: - Changed crtc check in toggle_vblank to != (Jeykumar) Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul [dpu_crtc.c change needed to be manually applied b/c of the dpu_crtc_reset change] Signed-off-by: Rob Clark commit 5c6277c1d25b5fbb1555f7962ce0d72f78fea266 Author: Sean Paul Date: Fri Nov 16 13:42:31 2018 -0500 drm/msm: dpu: Don't bother checking ->enabled in dpu_crtc_vblank The drm_crtc_vblank_on/off calls in enable/disable guarantee that we won't call this function when crtc is not enabled. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit f7aafc8d53482be6c0e6faf6746bff21b772a1a5 Author: Sean Paul Date: Fri Nov 16 13:42:30 2018 -0500 drm/msm: dpu: Use atomic_disable for dpu_crtc_disable Matches dpu_crtc_enable and we'll need the old state in a future patch Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit e4914867ac99caee9a239c227a07791098ab5e53 Author: Sean Paul Date: Fri Nov 16 13:42:29 2018 -0500 drm/msm: dpu: Remove vblank_callback from encoder The indirection of registering a callback and opaque pointer isn't reall useful when there's only one callsite. So instead of having the vblank_cb registration, just give encoder a crtc and let it directly call the vblank handler. In a later patch, we'll make use of this further. Changes in v2: - None Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit a9d629d71dc7f8d93538f783a7a9ee15e9f1a328 Author: Sean Paul Date: Fri Nov 16 13:42:28 2018 -0500 drm/msm: dpu: Remove crtc_lock from setup_mixers I think the intention here was to protect the enc->crtc access, but that's insufficient to avoid enc->crtc changing. Fortunately we're already holding the modeset lock when this is called (from atomic_check), so remove the crtc_lock and add a modeset lock check. While we're at it, use the encoder mask from crtc state instead of legacy pointer. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b77d0f0d4ee757e0a27a269a8b679108162f9bd2 Author: Sean Paul Date: Fri Nov 16 13:42:27 2018 -0500 drm/msm: dpu: Move pm_runtime_(get|put) from vblank_enable There are 4 times that _dpu_crtc_vblank_enable_no_lock() is called: 1- crtc enable 2- crtc disable 3- crtc vblank enable 4- crtc vblank disable When we enable or disable the crtc, we call drm_crtc_vblank_on and drm_crtc_vblank_off respectively. That will gate vblank enables and disables to only being called when the crtc is active. That means that we can just enable/disable pm runtime in crtc enable/disable. This will be beneficial in trying to eliminate blocking calls from the vblank call chain. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 1dfdb0e107dbe6ebff3f6bbbe4aad0b5aa87bba4 Author: Sean Paul Date: Fri Nov 16 13:42:26 2018 -0500 drm/msm: dpu: Add modeset lock checks where applicable Add modeset lock checks to functions that could be called outside the core atomic stack. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 4b8c6279593aa6b412d42bc77fbf73b497e1f4ec Author: Sean Paul Date: Fri Nov 16 13:42:25 2018 -0500 drm/msm: dpu: Stop using encoder->crtc pointer It's for legacy drivers, for atomic drivers crtc->state->encoder_mask should be used to map encoder to crtc. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul [seanpaul resolved conflict with async param of dpu_encoder_kickoff] Signed-off-by: Rob Clark commit f449aa6e447c321585dbb97178fedac7183bc2f3 Author: Sean Paul Date: Fri Nov 30 17:00:02 2018 -0500 drm/msm: dpu: Grab the modeset locks in frame_event This patch wraps dpu_core_perf_crtc_release_bw() with modeset locks since it digs into the state objects. Changes in v2: - None Changes in v3: - Use those nifty new DRM_MODESET_LOCK_ALL_* helpers (Daniel) Cc: Daniel Vetter Cc: Jeykumar Sankaran Acked-by: Daniel Vetter Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b01c2399226c294fe9b22d26ce0ebf1707acb8d9 Author: Sean Paul Date: Fri Nov 16 13:42:23 2018 -0500 drm/msm: dpu: Don't drop locks in crtc_vblank_enable Now that runtime resume is handled in encoder, we don't need to worry about crtc_lock recursion when calling pm_runtime_(get|put). So drop the lock drops in _dpu_crtc_vblank_enable_no_lock(). Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 18a63b3c6f0b6247f93f5eb05353b0486512017e Author: Sean Paul Date: Fri Nov 16 13:42:22 2018 -0500 drm/msm: dpu: Move crtc runtime resume to encoder The crtc runtime resume doesn't actually operate on the crtc, but rather its encoders. The problem with this is that we need to inspect the crtc state to get the currently connected encoders. Since runtime resume isn't guaranteed to be called while holding the modeset locks (although it sometimes is), this presents a race condition. Now that we have ->enabled on the virtual encoders, and a lock to protect it, just call resume on each encoder and only restore the ones that are enabled. Changes in v2: - None Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit fba7427eb594964726ab92bde7b9c20c995b4685 Author: Sean Paul Date: Fri Nov 16 13:42:21 2018 -0500 drm/msm: dpu: Add ->enabled to dpu_encoder_virt Add a bool to dpu_encoder_virt to track whether the encoder is enabled or not. Repurpose the enc_lock mutex to ensure that it is consistent with the hw state. Changes in v2: - None Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 585b3f9472eea88b82f9cde6a3129fd0c36e7e67 Author: Sean Paul Date: Fri Nov 16 13:42:20 2018 -0500 drm/msm: dpu: Fix typo in dpu_encoder enc_spinlock instead of enc_spin_lock. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 09a2e645b0f7a5af061b0bf66dd1e04a7a78caf5 Author: Sean Paul Date: Fri Nov 16 13:42:19 2018 -0500 drm/msm: dpu: Remove dpu_power_handle Now that we don't have any event handlers, remove dpu_power_handle! Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit aeb7b49a1b0fc2c8d8de6bb890ccbf40015ecb2c Author: Sean Paul Date: Fri Nov 16 13:42:18 2018 -0500 drm/msm: dpu: Move DPU_POWER_HANDLE_DBUS_ID to core_perf It's only used in core_perf, so stick it there (and change the name to reflect that). Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d53a61e1c055de1174cd227ecc07dbcdfe1f2530 Author: Sean Paul Date: Fri Nov 16 13:42:17 2018 -0500 drm/msm: dpu: Include dpu_io_util.h directly in dpu_kms.h It's needed for struct dss_module_power, and is currently being pulled in by dpu_power_handle.h Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b2bb51e83539c9bebd58c3d809c862ea52410969 Author: Sean Paul Date: Fri Nov 16 13:42:16 2018 -0500 drm/msm: dpu: Remove power_handle from core_perf It's unused Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3cf63cd5f880988fd0a223f36c08cdd1b628c78d Author: Sean Paul Date: Fri Nov 16 13:42:15 2018 -0500 drm/msm: dpu: Handle crtc pm_runtime_resume() directly Instead of registering through dpu_power_handle just to get a call on runtime_resume, call the crtc function directly. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit c24b6330035acd992bc1bd682bbc955f21153294 Author: Sean Paul Date: Fri Nov 16 13:42:14 2018 -0500 drm/msm: dpu: Don't use power_event for vbif_init_memtypes power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Changes in v2: - Removed obsolete comment (Jeykumar) Cc: Jeykumar Sankaran Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 88447b9b58fab9aedb9fdb090e17694dd4933639 Author: Sean Paul Date: Fri Nov 16 13:42:13 2018 -0500 drm/msm: dpu: Remove dpu_power_client There's only one client -- core, and it's only used for runtime pm which is already refcounted. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d05994dfa9509ccc88a4f687817410328902c5de Author: Sean Paul Date: Fri Nov 16 13:42:12 2018 -0500 drm/msm: dpu: Remove unused trace_dpu_perf_update_bus() Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 5e1228d7fdedfbb1227e53706264bc7631c8e49c Author: Sean Paul Date: Fri Nov 16 13:42:11 2018 -0500 drm/msm: dpu: Remove dpu_power_handle_get_dbus_name() It's only used for debugfs, so just output the enum value instead. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit ff5952a72cb4d04c976eeffd8443e4eef22e1bfb Author: Sean Paul Date: Mon Dec 3 14:55:56 2018 -0500 drm/msm: dpu: Allocate proper amount for dpu_crtc_state Since dpu_crtc subclasses crtc_state, we need a custom .reset hook in order to allocate the right amount of memory to accommodate the additional struct members in dpu_crtc_state. So bring it [partially] back. Relevant KASAN splat: [ 10.333382] ================================================================== [ 10.344288] BUG: KASAN: slab-out-of-bounds in kmemdup+0x50/0x80 [ 10.350390] Read of size 736 at addr ffffffc0d9f06080 by task frecon/394 [ 10.358861] CPU: 6 PID: 394 Comm: frecon Tainted: G W 4.19.4 #121 [ 10.366476] Hardware name: Google Cheza (rev2) (DT) [ 10.371514] Call trace: [ 10.374087] dump_backtrace+0x0/0x194 [ 10.377878] show_stack+0x20/0x28 [ 10.381330] dump_stack+0xa0/0xc8 [ 10.384783] print_address_description+0x78/0x2e0 [ 10.389639] kasan_report+0x290/0x2d0 [ 10.393428] check_memory_region+0x20/0x14c [ 10.397740] __asan_loadN+0x14/0x1c [ 10.401345] kmemdup+0x50/0x80 [ 10.404524] dpu_crtc_duplicate_state+0x58/0xa0 [ 10.409228] drm_atomic_get_crtc_state+0xac/0x178 [ 10.414095] __drm_atomic_helper_set_config+0x54/0x4a4 [ 10.419393] drm_atomic_helper_set_config+0x60/0xb4 [ 10.424435] drm_mode_setcrtc+0x720/0x760 [ 10.428570] drm_ioctl_kernel+0xd8/0x13c [ 10.432617] drm_ioctl+0x380/0x4f4 [ 10.436150] drm_compat_ioctl+0x54/0x13c [ 10.440219] __arm64_compat_sys_ioctl+0x1d8/0xef4 [ 10.445086] el0_svc_common+0xd8/0x138 [ 10.448961] el0_svc_compat_handler+0x58/0x68 [ 10.453463] el0_svc_compat+0x8/0x18 [ 10.458712] Allocated by task 56: [ 10.462148] kasan_kmalloc.part.4+0x48/0xf4 [ 10.466465] kasan_kmalloc+0x8c/0xa0 [ 10.470165] kmem_cache_alloc_trace+0x25c/0x27c [ 10.474848] drm_atomic_helper_crtc_reset+0x68/0x98 [ 10.479877] drm_mode_config_reset+0xc4/0x19c [ 10.484383] msm_drm_bind+0x814/0x8dc [ 10.488169] try_to_bring_up_master.part.7+0x48/0xac [ 10.493282] component_master_add_with_match+0x158/0x198 [ 10.498758] msm_pdev_probe+0x328/0x348 [ 10.502736] platform_drv_probe+0x74/0xc8 [ 10.506877] really_probe+0x1ac/0x35c [ 10.510659] driver_probe_device+0xd4/0x118 [ 10.514975] __device_attach_driver+0xc8/0xf4 [ 10.519477] bus_for_each_drv+0xb4/0xe4 [ 10.523439] __device_attach+0xd0/0x158 [ 10.527394] device_initial_probe+0x24/0x30 [ 10.531715] bus_probe_device+0x50/0xe4 [ 10.535681] deferred_probe_work_func+0xac/0xdc [ 10.540376] process_one_work+0x3f0/0x6d4 [ 10.544521] worker_thread+0x3f4/0x520 [ 10.548399] kthread+0x1b4/0x1c8 [ 10.551740] ret_from_fork+0x10/0x18 [ 10.556986] Freed by task 0: [ 10.559967] (stack is not available) [ 10.565216] The buggy address belongs to the object at ffffffc0d9f06080 which belongs to the cache kmalloc-1024 of size 1024 [ 10.578268] The buggy address is located 0 bytes inside of 1024-byte region [ffffffc0d9f06080, ffffffc0d9f06480) [ 10.590248] The buggy address belongs to the page: [ 10.595195] page:ffffffbf0367c000 count:1 mapcount:0 mapping:ffffffc0de40f680 index:0x0 compound_mapcount: 0 [ 10.605321] flags: 0x4000000000008100(slab|head) [ 10.610100] raw: 4000000000008100 ffffffbf0369fa08 ffffffbf0367f008 ffffffc0de40f680 [ 10.618077] raw: 0000000000000000 0000000000150015 00000001ffffffff 0000000000000000 [ 10.626049] page dumped because: kasan: bad access detected [ 10.633341] Memory state around the buggy address: [ 10.638282] ffffffc0d9f06180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 10.645710] ffffffc0d9f06200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 10.653139] >ffffffc0d9f06280: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc [ 10.660571] ^ [ 10.665774] ffffffc0d9f06300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.673210] ffffffc0d9f06380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 10.680639] ================================================================== Fixes: a6ba45afda41 (drm/msm/dpu: Replace dpu_crtc_reset by atomic helper) Cc: Sean Paul Cc: Bruce Wang Cc: Rob Clark Reviewed-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit e6f6d63ed14c20528aa6df05a8f0707c183c6ba3 Author: Jonathan Marek Date: Tue Dec 4 10:16:58 2018 -0500 drm/msm: add headless gpu device for imx5 This patch allows using drm/msm without qcom display hardware. It adds a amd,imageon compatible, which is used instead of qcom,adreno, but does not require a top level msm node. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit fb42b5354d71b09d3dcfcf4e38b1e98b277a0fc8 Author: Matthias Kaehlcke Date: Tue Dec 4 14:42:27 2018 -0800 dt-bindings: msm/dsi: Add ref clock for PHYs Allow the PHY drivers to get the ref clock from the DT. Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Rob Clark commit e888c279579e9c2409899eb3a5e9ad5b9f91260e Author: Jonathan Marek Date: Tue Dec 4 10:17:01 2018 -0500 dt-bindings: display: msm/gpu: document amd,imageon compatible Document the new amd,imageon compatible, used for non-qcom hardware that uses the drm/msm driver (iMX5). Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Signed-off-by: Rob Clark commit f72f4f1ae498a3c93c23c3d0e600df92977e86b1 Author: Jonathan Marek Date: Tue Dec 4 10:16:57 2018 -0500 drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment This allows controlling which of the 8 lanes are used for 6 bit color. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Signed-off-by: Rob Clark commit c2052a4e5c99f7edcb0283e6e12b2fb6975b7353 Author: Jonathan Marek Date: Wed Nov 14 17:08:04 2018 -0500 drm/msm: implement a2xx mmu A2XX has its own very simple MMU. Added a msm_use_mmu() function because we can't rely on iommu_present to decide to use MMU or not. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit d1d9d0e1724d6a7123b4280fdf6630ae70f96c9c Author: Douglas Anderson Date: Tue Dec 4 10:04:41 2018 -0800 drm/msm: Only add available components When trying to get the display up on my sdm845 board I noticed that the display wouldn't probe if I had the dsi1 node marked as "disabled" even though my board doesn't use dsi1. It looks like the msm code adds all nodes to its list of components even if they are disabled. I believe this doesn't work because all registered components need to come up before we finish probing. Let's do like other DRM code and only add available components. Signed-off-by: Douglas Anderson Reviewed-by: Rob Clark Signed-off-by: Rob Clark commit e400b9edb078ba1c72a7017aab52c4a4a5c1fae8 Author: Jordan Crouse Date: Mon Dec 3 12:40:31 2018 -0700 drm/msm/a6xx: Add a name for the crashdumper buffer Add a buffer object name for the a6xx crashdumper so it can be seen with the changes introduced by 7799a98edd ("drm/msm: Add a name field for gem objects"). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit d135c7ebb7bd13af8e09ff03fba73de113a6b501 Author: Jordan Crouse Date: Mon Dec 3 12:39:45 2018 -0700 drm/msm/a6xx: Use new kernel API free function for gpu state dadb36b7ec42 ("drm/msm: Add a common function to free kernel buffer objects") missed freeing the crashdumper state for a6xx. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 50bcc689b1f1c5eb00eda0db76e00783b97c02c2 Author: Sean Paul Date: Tue Oct 30 12:00:09 2018 -0400 drm/msm: dpu: Make legacy cursor updates asynchronous This patch sprinkles a few async/legacy_cursor_update checks through commit to ensure that cursor updates aren't blocked on vsync. There are 2 main components to this, the first is that we don't want to wait_for_commit_done in msm_atomic before returning from atomic_complete. The second is that in dpu we don't want to wait for frame_done events when updating the cursor. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 5f79e03b1f7c1b2cf0019ce6365fe5d52629813d Author: Sean Paul Date: Tue Oct 30 12:00:08 2018 -0400 drm/msm: dpu: Only check flush register against pending flushes There exists a case where a flush of a plane/dma may have been triggered & started from an async commit. If that plane/dma is subsequently disabled by the next commit, the flush register will continue to hold the flush bit for the disabled plane. Since the bit remains active, pending_kickoff_cnt will never decrement and we'll miss frame_done events. This patch limits the check of flush_register to include only those bits which have been updated with the latest commit. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit d4e98855d170dc808e7f52c478f1beb18b700139 Author: Jayant Shekhar Date: Fri Nov 2 18:19:17 2018 +0530 drm/msm/dpu: Correct dpu destroy and disable order In case of msm drm bind failure, dpu_mdss_destroy is triggered. In this function, resources are freed and pm runtime disable is called, which triggers dpu_mdss_disable. Now in dpu_mdss_disable, driver tries to access a memory which is already freed. This results in kernel panic. Fix this by ensuring proper sequence of dpu destroy and disable calls. Changes in v2: - Removed double spacings [Jeykumar] Tested-by: Douglas Anderson Signed-off-by: Jayant Shekhar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit c1866d44d149a1ea5c303632114fb6aa08cfd263 Author: Abhinav Kumar Date: Thu Oct 11 10:18:57 2018 -0700 drm/msm/dsi: fix dsi clock names in DSI 10nm PLL driver Fix the dsi clock names in the DSI 10nm PLL driver to match the names in the dispcc driver as those are according to the clock plan of the chipset. Changes in v2: - Update the clock diagram with the new clock name Reviewed-by: Sean Paul Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b2ccfdf1dde588d0e90d6d235b9ae557cbea5d4d Author: Jonathan Marek Date: Wed Nov 21 20:52:35 2018 -0500 drm/msm: set priv->kms to NULL before uninit otherwise, priv->kms is non-NULL and msm_drm_uninit will cause a panic. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit a5cd7b55dfac41a45432de0bf261f8b92c43c3fa Author: Jonathan Marek Date: Wed Nov 21 20:52:34 2018 -0500 drm/msm/mdp5: add config for msm8917 Add the mdp5_cfg_hw entry for MDP5 version v1.15 found on msm8917. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 21af872cd8c695060dd1d045293bf21ea9156a51 Author: Jonathan Marek Date: Wed Nov 21 20:52:32 2018 -0500 drm/msm/adreno: add a2xx derived from the a3xx driver and tested on the following hardware: imx51-zii-rdu1 (a200 with 128kb gmem) imx53-qsrb (a200) msm8060-tenderloin (a220) Signed-off-by: Jonathan Marek Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 86f46f25d8ff8dc32e1c8cd9b5ab0d285d5c3523 Author: Jonathan Marek Date: Wed Nov 21 20:52:30 2018 -0500 drm/msm: use contiguous vram for MSM_BO_SCANOUT when possible Makes it possible to have MMU for GPU but not display. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 373931d2d7cd37d627c0713940c4c5abfdda043d Author: Jonathan Marek Date: Wed Nov 21 20:52:28 2018 -0500 drm/msm/mdp4: allocate blank_cursor_no with MSM_BO_SCANOUT flag For allocation in contiguous memory when the GPU has MMU but not mdp4. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit eb2b47bb9a03206a645af40a3128a00264b0207e Author: Jonathan Marek Date: Wed Nov 21 20:52:27 2018 -0500 drm/msm/mdp4: only use lut_clk on mdp4.2+ Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 1fed8df301336d904ba45b1bda0c7ce5bd7e6932 Author: Rob Clark Date: Thu Nov 29 10:30:04 2018 -0500 drm/msm: bump UAPI version Signed-off-by: Rob Clark commit f05c83e7746088e6ada6ce83fd7840b4b7b52ffe Author: Rob Clark Date: Thu Nov 29 10:27:22 2018 -0500 drm/msm: add uapi to get/set debug name Add UAPI to get/set GEM objects' debug name. Signed-off-by: Rob Clark commit 789d2e5a772ce312a7a2b81ffaf304946195beb5 Author: Rob Clark Date: Thu Nov 29 09:54:42 2018 -0500 drm/msm: rework GEM_INFO ioctl Prep work to add a way to get/set the GEM objects debug name. Signed-off-by: Rob Clark commit 7a93d5c38e5ee68376ca88d9e3f9841451b9efb1 Author: Rob Clark Date: Tue Oct 23 14:42:37 2018 -0400 drm/msm/gpu: add submit flag to hint which buffers should be dumped To lower CPU overhead, future userspace will be switching to pinning iova and avoiding the use of relocs, and only include cmds table entries for IB1 level cmdstream (but not IB2 or state-groups). This leaves the kernel unsure what to dump for rd/hangrd cmdstream dumping. So add a MSM_SUBMIT_BO_DUMP flag so userspace can indicate buffers that contain cmdstream (or are otherwise important to dump). Signed-off-by: Rob Clark commit 1df4289d5b23178a8a2c38ca766feb3d9c40d9fb Author: Sharat Masetty Date: Thu Nov 1 20:16:45 2018 +0530 drm/msm: Optimize adreno_show_object() When the userspace tries to read the crashstate dump, the read side implementation in the driver currently ascii85 encodes all the binary buffers and it does this each time the read system call is called. A userspace tool like cat typically does a page by page read and the number of read calls depends on the size of the data captured by the driver. This is certainly not desirable and does not scale well with large captures. This patch encodes the buffer only once in the read path. With this there is an immediate >10X speed improvement in crashstate save time. Signed-off-by: Sharat Masetty Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 84c6127580c1cee58d57d5f97ce22f1131ecdfc9 Author: Jordan Crouse Date: Wed Nov 7 15:35:54 2018 -0700 drm/msm/gpu: Map the ringbuffer in the iova at create time For reasons that I'm sure made perfect sense at the time we were opting to defer the iova alloc / pin on the ringbuffer until HW init time so when we moved to iova reference counting we ended up adding a reference count every time the hardware started. Not that it mattered (because the ring is always around) but it did make the debug output look odd. Allocate and pin the iova at create time instead. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 0815d7749a68527adabe2ac40d49f6fc0800eae5 Author: Jordan Crouse Date: Wed Nov 7 15:35:52 2018 -0700 drm/msm: Add a name field for gem objects For debugging purposes it is useful to assign descriptions to buffers so that we know what they are used for. Add a field to the buffer object and use that to name the various kernel side allocations which ends up looking like like this in /d/dri/X/gem: flags id ref offset kaddr size madv name 00040000: I 0 ( 1) 00000000 0000000070b79eca 00004096 memptrs vmas: [gpu: 01000000,mapped,inuse=1] 00020000: I 0 ( 1) 00000000 0000000031ed4074 00032768 ring0 Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 7ad0e8cf6317825d2b7fc52a9000fb16461c2857 Author: Jordan Crouse Date: Wed Nov 7 15:35:51 2018 -0700 drm/msm: Count how many times iova memory is pinned Add a reference count to track how many times a particular chunk of iova memory is pinned (mapped) in the iomu and add msm_gem_unpin_iova to give up references. It is important to note that msm_gem_unpin_iova replaces msm_gem_put_iova because the new implicit behavior that an assigned iova in a given vma is now valid for the life of the buffer and what we are really focusing on is the use of that iova. For now the unmappings are lazy; once the reference counts go to zero they *COULD* be unmapped dynamically but that will require an outside force such as a shrinker or mm_notifiers. For now, we're just focusing on getting the counting right and setting ourselves up to be ready for the future. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 9fe041f6fdfedd92e15dd81d96475ff04bdf879e Author: Jordan Crouse Date: Wed Nov 7 15:35:50 2018 -0700 drm/msm: Add msm_gem_get_and_pin_iova() Add a new function to get and pin the iova memory in one step (basically renaming the old msm_gem_get_iova function) and switch msm_gem_get_iova() to only allocate an iova but not map it in the IOMMU. This is only currently used by msm_ioctl_gem_info() since all other users of of the iova expect that the memory be immediately available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 575f0485508bb210914d8b45bdd8481d0ecd4a72 Author: Jordan Crouse Date: Wed Nov 7 15:35:49 2018 -0700 drm/msm: Clean up and enhance the output of the 'gem' debugfs node Add headers for the 'gem' debugfs file to make it easier to remember what all the values mean and move the list of virtual address regions to the next line and add the name and map status to make it clearer what we are looking at. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit c0ee9794693c1ff5bf540fc642fac954e39234a0 Author: Jordan Crouse Date: Wed Nov 7 15:35:48 2018 -0700 drm/msm: Split msm_gem_get_iova into two steps Split the operation of msm_gem_get_iova into two operations: 1) allocate an iova and 2) map (pin) the backing memory int the iommu. This is the first step toward allowing memory pinning to occur independently of the iova management. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 70dc51b447f570ba3881e289b8134d364977a6f0 Author: Jordan Crouse Date: Wed Nov 7 15:35:47 2018 -0700 drm/msm: Remove sgt from the mmu unmap function The scatter gather table doesn't need to be passed in for the MMU unmap function. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 1e29dff00400d40fdd3d52f2a76c188f5126f033 Author: Jordan Crouse Date: Wed Nov 7 15:35:46 2018 -0700 drm/msm: Add a common function to free kernel buffer objects Buffer objects allocated with msm_gem_kernel_new() are mostly freed the same way so we can save a few lines of code with a common function. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit d6852b4b2d0140b0fbfe112edf4fe66c1857b561 Author: Jordan Crouse Date: Fri Nov 2 09:25:26 2018 -0600 drm/msm/a6xx: Track and manage a6xx state memory The a6xx GPU state allocates a LOT of memory. Add a bit of infrastructure to track the memory allocations in the GPU structure and delete them when the state is destroyed much the same way that devm works with the device model as a whole. This protects against the developer accidentally forgetting to add a kfree() to an ever growing list. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 1707add815519da406c2d1444a1f10ef8bb4ad5b Author: Jordan Crouse Date: Fri Nov 2 09:25:25 2018 -0600 drm/msm/a6xx: Add a6xx gpu state Add support for gathering and dumping the a6xx GPU state including registers, GMU registers, indexed registers, shader blocks, context clusters and debugbus. v2: Fix bugs discovered by Sharat Masetty Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit b9fc230252e7d0cbf109292bead71e50476f14c9 Author: Jordan Crouse Date: Fri Nov 2 09:25:24 2018 -0600 drm/msm/adreno: Don't capture register values if target doesn't define them If the GPU target doesn't define a list of registers then gracefully skip capturing and/or printing them. This is used by more complex targets like 6xx that have other means of capturing register values. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 983674e24b4684045340b33dda1ecb81125d4cad Author: Jordan Crouse Date: Fri Nov 2 09:25:23 2018 -0600 drm/msm/gpu: Move gpu_poll_timeout() to adreno_gpu.h The gpu_poll_timeout() function can be useful to multiple targets so mvoe it into adreno_gpu.h from the a5xx code. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 896a248a9034bf2226ec2cc1d314d94ea4266274 Author: Jordan Crouse Date: Fri Nov 2 09:25:22 2018 -0600 drm/msm/gpu: Only store local command buffers in the GPU state Instead of trying to store all the tagged buffers from a hanging submit only store the command buffers that were not imported. This cuts down on the amount of data stored in the GPU state to the base minimum of useful information. The downside is that this will make it more difficult to successfully replay a hang with just the GPU state but there isn't any reason why that functionality can't be added back in later once we've figured out how to better communicate such massive amounts of data. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 4241db42e474ffc6d432e60eb5aaea98f12fda20 Author: Jordan Crouse Date: Fri Nov 2 09:25:21 2018 -0600 drm/msm/gpu: Add trace events for tracking GPU submissions Add trace events to track the progress of a GPU submission msm_gpu_submit occurs at the beginning of the submissions, msm_gpu_submit_flush happens when the submission is put on the ringbuffer and msm_submit_flush_retired is sent when the operation is retired. To make it easier to track the operations a unique sequence number is assigned to each submission and displayed in each event output so a human or a script can easily associate the events related to a specific submission. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 568692102b6ad52fae27bef66793bc2e5770e429 Author: Jordan Crouse Date: Fri Nov 2 09:25:20 2018 -0600 drm/msm/gpu: Add per-submission statistics Add infrastructure to track statistics for GPU submissions by sampling certain perfcounters before and after a submission. To store the statistics, the per-ring memptrs region is expanded to include room for up to 64 entries - this should cover a reasonable amount of inflight submissions without worrying about losing data. The target specific code inserts PM4 commands to sample the counters before and after submission and store them in the data region. The CPU can access the data after the submission retires to make sense of the statistics and communicate them to the user. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 93f7abf19dad2d0ad3c93597c87bbaff03218cb9 Author: Jordan Crouse Date: Fri Nov 2 09:25:19 2018 -0600 drm/msm: Gracefully handle failure in _msm_gem_kernel_new If any of the function calls in _msm_gem_kernel_new fail we need to make sure to dereference the GEM object with the appropriate function for the current locking state. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 546ec7b471bcae78463426a218b8c7f35bbb71f4 Author: Jordan Crouse Date: Fri Nov 2 09:25:18 2018 -0600 drm/msm/gpu: Allocate the correct size for the GPU memptrs Allocate the correct buffer size for the GPU memptrs. The incorrect size hasn't affected us thus far since the incorrect size was larger than the intended size and we're still stuck on page sized granularity anyway but technically correct is the best kind of correct. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit ccdf7e28b4ab4bc8c08912e9466f1686b06f6394 Author: Rob Clark Date: Sun Dec 2 13:07:41 2018 -0500 drm/msm: update generated headers Signed-off-by: Rob Clark commit 01665c64b47597753a57efabfea36e9cb2443cff Author: Jeykumar Sankaran Date: Tue Nov 27 15:58:13 2018 -0800 drm/msm/dpu: set geometry for iommu domain Specify geometry for DPU iommu domain which sets the address space for gem allocations. Signed-off-by: Jeykumar Sankaran Suggested-by: Jordan Crouse Suggested-by: Vivek Gautam Acked-by: Jordan Crouse Signed-off-by: Rob Clark commit 6a41da17e87dee2936645d9a51fccf932fa42981 Author: Mamta Shukla Date: Sat Oct 20 23:19:26 2018 +0530 drm: msm: Use DRM_DEV_* instead of dev_* Use DRM_DEV_INFO/ERROR/WARN instead of dev_info/err/debug to generate drm-formatted specific log messages so that it will be easy to differentiate in case of multiple instances of driver. Signed-off-by: Mamta Shukla Signed-off-by: Rob Clark commit e1bd55e5a567a90c5b26238a46bbaf1c775e9661 Author: Stephen Boyd Date: Tue Dec 11 09:57:48 2018 -0800 clk: Tag basic clk types with SPDX These are all GPL-2.0 files per the existing license text. Replace the boiler plate with the tag. Signed-off-by: Stephen Boyd commit ebafb63dc7759c4cc54065b5aa675080b5f453ce Author: Stephen Boyd Date: Tue Dec 11 09:43:03 2018 -0800 clk: Tag clk core files with SPDX These are all GPL-2.0 files per the existing license text. Replace the boiler plate with the tag. Signed-off-by: Stephen Boyd commit 84511abc47bd79e1e4a550cb7a662c09bcddd92b Author: Sean Paul Date: Thu Oct 4 14:09:45 2018 -0400 drm/msm: dpu: Remove checks from dpu_plane_destroy_state() They're not needed. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit aa4df9bf2862956b88d3f63b7c55911e93c15e45 Author: Sean Paul Date: Thu Sep 20 10:58:18 2018 -0400 drm/msm: dpu: Clean up _dpu_core_video_mode_intf_connected() Local variable is not needed and condition can't be hit. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 0841851f3b22bc1da09683aa458efe9f9e2abf51 Author: Sean Paul Date: Thu Sep 20 10:58:17 2018 -0400 drm/msm: dpu: Remove empty/useless labels I noticed an empty label while driving by and decided to use coccinelle to see if there were any more. Here's the spatch and the invocation: --- @@ identifier lbl; expression E; @@ - goto lbl; + return E; ... - lbl: return E; @@ identifier lbl; @@ - goto lbl; + return; ... - lbl: - return; --- spatch --allow-inconsistent-paths --sp-file file.spatch --dir drivers/gpu/drm/msm/disp/dpu1 --in-place --- Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 58fba464eaeff6533236d334cf2a2df24241dc76 Author: Sean Paul Date: Thu Sep 20 10:58:16 2018 -0400 drm/msm: dpu: Remove 'inline' from several functions Per chapter 15 of coding-style, removing 'inline' keyword from functions that are larger than a typical macro. In a couple of cases I've simplified the function and kept the inline. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit bf711751c882e5f406ad484111285b258fb012c4 Author: Sean Paul Date: Thu Sep 20 10:58:15 2018 -0400 drm/msm: dpu: Remove _dpu_encoder_power_enable() It's unused, remove it. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 37686b5ec41a58ae136f91471d039f2418d8d192 Author: Sean Paul Date: Thu Sep 20 10:58:14 2018 -0400 drm/msm: dpu: Remove unused functions from msm_media_info.h These functions aren't used anywhere, remove them. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 01b09d53ad5b7e183386887cbc536dfda9f6ce65 Author: Sean Paul Date: Thu Sep 20 10:58:13 2018 -0400 drm/msm: Remove dpu_encoder_phys_ops->hw_reset() We call out of the virt encoder into phys only to call back into the virt for hw reset. So remove the indirection and just call the virt function directly. Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 9a5e3fce4b74035ef8d5d3c5b9795e8859c69c67 Author: Bruce Wang Date: Fri Oct 5 17:04:03 2018 -0400 drm/msm/dpu: Replace dpu_crtc_reset by atomic helper Since we removed all suspend logic from the crtc code (see patch 3/4), dpu_crtc_reset does the same things as drm_atomic_helper_crtc_reset, so let's just replace it with a call to the atomic helper. v3: added patch to patchset Reviewed-by: Sean Paul Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 7a007a121d342f0948be1f06ad61cdc953f7dab6 Author: Bruce Wang Date: Fri Oct 5 17:04:02 2018 -0400 drm/msm/dpu: Remove suspend state tracking from crtc Since drm core's modeset locks serialize atomic commits, we don't need to track whether or not we're in a suspended state from inside the crtc for dpu_crtc_enable/disable. This patch removes the suspend logic from the crtc and removes the relevant tracing from dpu_trace. Since we removed all calls to dpu_kms_is_suspend_state, we can remove that function and the suspend_state field of dpu_kms as well. v2: added patch to patchset v3: reworded commit body and moved deletion of dpu_kms_is_suspend_state and suspend_state to this patch Reviewed-by: Sean Paul Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 3750e78c72da3c35292dcf531ebe3062faaa33bc Author: Bruce Wang Date: Fri Oct 5 17:04:01 2018 -0400 drm/msm: Cut dpu_kms hooks from msm_pm_suspend/resume Removes the traces of the non-atomic helper calls in msm_pm_suspend/resume since we just deleted those functions (see patch 1). Also removes the drm_kms_helper_poll_disable/enable calls, since the DRM_CONNECTOR_POLL_CONNECT flag is never set so periodic polling doesn't happen anyways. v2: reorganized patch order v3: made error checks less severe Reviewed-by: Sean Paul Signed-off-by: Bruce Wang Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit b2b83523b1768828c3122a2862fa0dd88fb40489 Author: Bruce Wang Date: Fri Oct 5 17:04:00 2018 -0400 drm/msm/dpu: Remove dpu_kms_pm_suspend/resume PM resume was crashing during dpu_kms_pm_resume. This patch removes dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic helpers instead (see next patch). This patch also removes dpu_kms_is_suspend_blocked since it is never called. v2: Reorganized patches in patchset Signed-off-by: Bruce Wang Reviewed-by: Sean Paul Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 812eeeb6b59e15e0f2dece81b4600d2206283cd3 Author: Sean Paul Date: Wed Oct 3 14:36:44 2018 -0400 drm/msm: dpu: Add tracing around CTL_FLUSH I found these tracepoints useful for debugging cursor/ctl, someone else might find them useful too Reviewed-by: Jeykumar Sankaran Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Signed-off-by: Rob Clark commit 2a5f14f279f59143139bcd1606903f2f80a34241 Author: Abhi Das Date: Fri Nov 9 09:57:20 2018 -0600 gfs2: read journal in large chunks to locate the head Use bio(s) to read in the journal sequentially in large chunks and locate the head of the journal. This version addresses the issues Christoph pointed out w.r.t error handling and using deprecated API. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson Cc: Christoph Hellwig commit 40e0e61e366bed56b71edb3b970245165090ec9a Author: Abhi Das Date: Fri Nov 9 09:54:18 2018 -0600 gfs2: add a helper function to get_log_header that can be used elsewhere Move and re-order the error checks and hash/crc computations into another function __get_log_header() so it can be used in scenarios where buffer_heads are not being used for the log header. Signed-off-by: Abhi Das Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 5b84609532d6e48a769a735d214e2cd705ed395e Author: Abhi Das Date: Fri Nov 9 09:49:01 2018 -0600 gfs2: changes to gfs2_log_XXX_bio Change gfs2_log_XXX_bio family of functions so they can be used with different bios, not just sdp->sd_log_bio. This patch also contains some clean up suggested by Andreas. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson commit 98583b3e87303e5941c30d4cf0c117cbfaa89116 Author: Abhi Das Date: Fri Nov 9 09:35:14 2018 -0600 gfs2: add more timing info to journal recovery process Tells you how many milliseconds map_journal_extents and find_jhead take. Signed-off-by: Abhi Das Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 0ebbe4f974a6035542f32f0ed16859c4e128477b Author: Andreas Gruenbacher Date: Tue Nov 6 10:31:33 2018 +0000 gfs2: Fix the gfs2_invalidatepage description The comment incorrectly states that the function always returns 0. Signed-off-by: Andreas Gruenbacher commit 977767a7e1ee32ae85377d88b5383da789d2a6b5 Author: Andreas Gruenbacher Date: Fri Oct 12 20:07:27 2018 +0200 gfs2: Clean up gfs2_is_{ordered,writeback} The gfs2_is_ordered and gfs2_is_writeback checks are weird in that they implicitly check for !gfs2_is_jdata. This makes understanding how to use those functions correctly a challenge. Clean this up by making gfs2_is_ordered and gfs2_is_writeback take a super block instead of an inode and by removing the implicit !gfs2_is_jdata checks. Update the callers accordingly. Signed-off-by: Andreas Gruenbacher commit c2ade654dbf7d02f09ad491f5621fc321d4af96b Author: Rob Herring Date: Wed Dec 5 13:50:30 2018 -0600 memory: omap-gpmc: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is. Cc: Roger Quadros Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Tony Lindgren commit 04491ab0c4f03061f2b402e8b74f101abc8a8a15 Merge: 3be5e10daf1fc 4014c08ba3947 Author: Tony Lindgren Date: Tue Dec 11 08:30:23 2018 -0800 Merge branch 'omap-for-v4.21/ti-sysc' into omap-for-v4.21/driver commit 5a87809b89b64c0ccd82261de53c41f2fffb56da Merge: 1e6755f5e8f01 c7b7b5cbd0c85 Author: Tony Lindgren Date: Tue Dec 11 08:14:58 2018 -0800 Merge branch 'omap1-usb-fix' into omap-for-v4.21/omap1 commit c7b7b5cbd0c859b1546a5a3455d457708bdadf4c Author: Aaro Koskinen Date: Tue Dec 4 19:57:42 2018 +0200 ARM: OMAP1: fix USB configuration for device-only setups Currently we do USB configuration only if the host mode (CONFIG_USB) is enabled. But it should be done also in the case of device-only setups, so change the condition to CONFIG_USB_SUPPORT. This allows to use omap_udc on Palm Tungsten E. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 1e6755f5e8f01a92ab29b86aed9d9db3ec39a681 Author: Aaro Koskinen Date: Tue Dec 4 19:58:12 2018 +0200 ARM: OMAP1: add MMC configuration for Palm Tungsten E Add initial MMC configuration for Palm Tungsten E to allow using a proper rootfs on the device. This still assumes the bootloader enabling the MMC, and that the card is always present and writeable. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 91eac9139ed440ec1a911e005e21cf1df8418798 Merge: 622523c75ff84 611a1c69f8ca8 Author: Olof Johansson Date: Tue Dec 11 08:10:09 2018 -0800 Merge tag 'tegra-for-4.21-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt arm64: tegra: Device tree change for v4.21-rc1 These changes add a bunch of features for Tegra194 and Tegra186, such as wake events, on-die RTC, temperature sensors, HDA for audio over HDMI and fan support on Jetson Xavier to allow cooling of the device. * tag 'tegra-for-4.21-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (29 commits) arm64: tegra: Set reg property for display-hub on Tegra194 arm64: tegra: Set reg property for display-hub on Tegra186 arm64: dts: tegra186: Enable IOMMU for SDHCI arm64: tegra: Enable HDA controller on Jetson TX1 arm64: tegra: Add CEC controller on Tegra194 arm64: tegra: Enable HDA on Jetson Xavier arm64: tegra: Add HDA controller on Tegra194 arm64: tegra: Add CEC controller on Tegra186 arm64: tegra: Enable HDA on Jetson TX2 arm64: tegra: Add HDA controller on Tegra186 arm64: tegra: Add temperature sensor on P2888 arm64: tegra: Add gpio-keys on Jetson Xavier arm64: tegra: Add AON GPIO controller on Tegra194 arm64: tegra: p2888: Enable on-die RTC arm64: tegra: Add RTC support on Tegra194 arm64: tegra: Enable PMC wake events on Tegra194 arm64: tegra: p3310: Enable on-die RTC arm64: tegra: Add RTC support on Tegra186 arm64: tegra: Enable PMC wake events on Tegra186 arm64: tegra: Fix power key interrupt type on Jetson TX2 ... Signed-off-by: Olof Johansson commit 622523c75ff8440dbd1047420f8e9b018bbcfca5 Merge: 44a26c894ba2b 3dde5a2342cd2 Author: Olof Johansson Date: Tue Dec 11 08:06:35 2018 -0800 Merge tag 'tegra-for-4.21-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt ARM: tegra: Device tree changes for v4.21-rc1 These changes add the external memory controller on Tegra20 as well as the VIC on Tegra124. * tag 'tegra-for-4.21-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Add VIC on Tegra124 ARM: dts: tegra20: Add clock entry to External Memory Controller ARM: dts: tegra20: Add interrupt entry to External Memory Controller Signed-off-by: Olof Johansson commit 44a26c894ba2bcae449ffd37f02c104883c499ce Merge: c5a06e704abe2 b4c7bf003cb57 Author: Olof Johansson Date: Tue Dec 11 08:05:17 2018 -0800 Merge tag 'tegra-for-4.21-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt dt-bindings: Changes for v4.21-rc1 This contains a few cleanups of and additions to existing device tree bindings, such as XUSB, EMC, PMC and thermal. * tag 'tegra-for-4.21-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: tegra186-pmc: Add interrupt controller properties dt-bindings: thermal: tegra-bpmp: Add Tegra194 support dt: bindings: Move tegra20-emc binding to memory-controllers directory dt: bindings: tegra20-emc: Document clock property dt: bindings: tegra20-emc: Document interrupt property dt-bindings: usb: xhci-tegra: Add power-domain details Signed-off-by: Olof Johansson commit c5a06e704abe21ba4c5461d860a9745f44a209a2 Merge: 857f00213315e 74791d15fd7c4 Author: Olof Johansson Date: Tue Dec 11 08:05:01 2018 -0800 Merge tag 'renesas-dt-bindings-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Bindings Updates for v4.21 * Move 'renesas,prr' binding to its own document - Prepration for converting board-level bindings to json-schema * Document iW-RainboW-G20D-Qseven-RZG1N board and iWave RZ/G1N SOM * tag 'renesas-dt-bindings-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: dt-bindings: arm: renesas: Move 'renesas,prr' binding to its own doc dt-bindings: arm: renesas: Document iW-RainboW-G20D-Qseven-RZG1N board dt-bindings: arm: renesas: Document iWave RZ/G1N SOM Signed-off-by: Olof Johansson commit 857f00213315e4502e5bc1170baf740b639ae73d Merge: e2bc560635cdf e259e04748e27 Author: Olof Johansson Date: Tue Dec 11 08:03:48 2018 -0800 Merge tag 'renesas-arm-dt2-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Updates for v4.21 * RZ/G1N (r8a7744) SoC - Describe in DT: SYS-DMAC, GPIO, Ethernet AVB, SMP, [H]SCIF{A|B}, I2C, USB 2.0 and 3.0 hosts, USB-DMAC, HSUSB, RWDT, Audio, CAN, IRQC, thermal, CMT, VIN, VSP, IPMMU, PMU, TPU, QSPI MSIOF, and PCIE - iWave G20D-Q7 board - Initial support - Enable eMMC, SDHI and SPIO NOR support - Add camera daughterboard * RZ/G1M (r8a7743) SoC - Remove legacy "renesas,rcar-thermal" compatibility * tag 'renesas-arm-dt2-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (34 commits) ARM: dts: r8a7744-iwg20m: Add SPI NOR support ARM: dts: iwg20d-q7-common: Move cmt/rwdt node out of RZ/G1M SOM ARM: dts: r8a7744: Add PCIe Controller device node ARM: dts: r8a7744: Add xhci support ARM: dts: r8a7744: Add MSIOF[012] support ARM: dts: r8a7744: Add QSPI support ARM: dts: r8a7744-iwg20d-q7-dbcm-ca: Add device tree for camera DB ARM: dts: r8a7744: Add TPU support ARM: dts: r8a7744: Add PWM SoC support ARM: dts: r8a7744: Add IPMMU DT nodes ARM: dts: r8a7744: Add VSP support ARM: dts: r8a7744: add VIN dt support ARM: dts: r8a7744: Add CMT SoC specific support ARM: dts: r8a7744: Add thermal device to DT ARM: dts: r8a7744: Add IRQC support ARM: dts: r8a7744: Add CAN support ARM: dts: r8a7744: Add audio support ARM: dts: r8a7744: Add RWDT node ARM: dts: r8a7744: Add USB-DMAC and HSUSB device nodes ARM: dts: r8a7744: USB 2.0 host support ... Signed-off-by: Olof Johansson commit e2bc560635cdf02413c95cb388871584c4060443 Merge: 2fd1a4091f392 4fbd4158fe896 Author: Olof Johansson Date: Tue Dec 11 08:01:55 2018 -0800 Merge tag 'renesas-arm64-dt2-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM64 Based SoC DT Updates for v4.21 * R-Car D3 (r8a77995) SoC based Draak board - Add the backlight device for the LVDS1 output * R-Car H3 (r8a7795) ES1.0 SoC - Add missing power domains to IPMMU nodes * R-Car M3-N (r8a77965) SoC - Remove non-existent IPMMU-IR * tag 'renesas-arm64-dt2-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: r8a77995: draak: Add backlight arm64: dts: renesas: r8a7795-es1: Add missing power domains to IPMMU nodes arm64: dts: renesas: r8a77965: Remove non-existent IPMMU-IR Signed-off-by: Olof Johansson commit 2fd1a4091f392d6c20fa3dea72b70a58267481bd Merge: 287eedda7c064 76d0bbd8a4ef1 Author: Olof Johansson Date: Tue Dec 11 07:59:16 2018 -0800 Merge tag 'aspeed-4.21-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt ASPEED device tree updates for 4.20 - New machine: Facebook Backpack-CMM BMC and flash layout - OpenPower reference systems (Palmetto P8, Romulus P9) move to the ColdFire based FSI driver - Misc device tree updates from the OpenBMC project * tag 'aspeed-4.21-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Add Facebook Backpack-CMM BMC ARM: dts: Add Facebook BMC flash layout ARM: dts: aspeed: wspoon: Enable iio-hwmon battery ARM: dts: aspeed: romulus: Enable iio-hwmon-battery ARM: dts: aspeed: Enable VHUB on Romulus ARM: dts: aspeed-palmetto: Add LPC control node ARM: dts: aspeed: Palmetto system can use coprocessor for FSI ARM: dts: aspeed: Romulus system can use coprocessor for FSI Signed-off-by: Olof Johansson commit 287eedda7c064fb2d2981e56564528c8d34ea5d4 Merge: 332da8486b58e ad8044f87c0b5 Author: Olof Johansson Date: Tue Dec 11 07:43:46 2018 -0800 Merge tag 'pxa-dt-4.21' of https://github.com/rjarzmik/linux into next/dt This device-tree pxa update brings : - various fixes from Daniel (W=12 issues mainly) - support for the first pxa3xx devicetree pxa board * tag 'pxa-dt-4.21' of https://github.com/rjarzmik/linux: ARM: dts: pxa3xx: Add Raumfeld DTS files ARM: dts: pxa: clean up USB controller nodes ARM: dts: pxa3xx: clean up pxa3xx clock controller node name ARM: dts: pxa3xx: order timer and gcu nodes under /pxabus ARM: dts: pxa2xx: fix hwuart memory range ARM: dts: pxa3xx: drop #address-cells and #size-cells from pinctrl node ARM: dts: pxa2xx: drop #address-cells and #size-cells from /cpus ARM: dts: pxa3xx: add gcu node Signed-off-by: Olof Johansson commit 5241ccbf2819426e0b55c784105eee7f1c57c9b2 Author: Tony Lindgren Date: Fri Dec 7 16:52:46 2018 -0800 ARM: dts: Add missing ranges for dra7 mcasp l3 ports We need to add mcasp l3 port ranges for mcasp to use a correct l3 data port address for dma. And we're also missing the optional clocks that we have tagged with HWMOD_OPT_CLKS_NEEDED in omap_hwmod_7xx_data.c. Note that for reading the module revision register HWMOD_OPT_CLKS_NEEDED do not seem to be needed. So they could be probably directly managed only by the mcasp driver, and then we could leave them out for the interconnect target module. Fixes: 4ed0dfe3cf39 ("ARM: dts: dra7: Move l4 child devices to probe them with ti-sysc") Reported-by: Peter Ujfalusi Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren commit f4ef6fd0789da20b32d303859b8f9f8a11396c09 Author: Tony Lindgren Date: Mon Dec 10 13:43:11 2018 -0800 ARM: dts: Fix ranges for am335x epwmss Looks like I missed the ranges for am335x epwmss. Let's set it up the same way as for am437x and dra7. Fixes: 87fc89ced3a7 ("ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc") Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit f03566d0aa79f9e09a288936980741c479a22fdb Author: Jerome Brunet Date: Tue Dec 4 17:58:19 2018 +0100 clk: meson: axg-audio: use the clk input helper function Rework the axg audio clock controller to use the new clk-input helper function. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong [narmstrong: fixed pclk input clock name to axg_audio_pclk] Link: http://lkml.kernel.org/r/20181204165819.21541-3-jbrunet@baylibre.com commit c4576aed8d85d808cd6443bda58393d525207d01 Author: Mike Snitzer Date: Tue Dec 11 09:10:26 2018 -0500 dm: fix request-based dm's use of dm_wait_for_completion The md->wait waitqueue is used by both bio-based and request-based DM. Commit dbd3bbd291 ("dm rq: leverage blk_mq_queue_busy() to check for outstanding IO") lost sight of the requirement that dm_wait_for_completion() must work with all types of DM devices. Fix md_in_flight() to call the blk-mq or bio-based method accordingly. Fixes: dbd3bbd291 ("dm rq: leverage blk_mq_queue_busy() to check for outstanding IO") Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 0660d8cd83938ef5cc91582fe6f951e8935f2d0f Author: Deepak Rawat Date: Thu Dec 6 11:44:44 2018 -0800 drm: Fix docs warning in drm_damage_helper.c Modify description to match actual argument list. Signed-off-by: Deepak Rawat Signed-off-by: Thomas Hellstrom commit d74380ba0e6318d97907b675cef0a02c5a15771e Author: Colin Ian King Date: Mon Dec 10 09:26:19 2018 +0000 drm/selftest: fix spelling mistake "dimention" -> "dimension" There is a spelling mistake in a pr_err message, fix this. Signed-off-by: Colin Ian King Signed-off-by: Thomas Hellstrom commit 732cd75b8c920d3727e69957b14faa7c2d7c3b75 Author: Quentin Perret Date: Mon Dec 3 09:56:27 2018 +0000 sched/fair: Select an energy-efficient CPU on task wake-up If an Energy Model (EM) is available and if the system isn't overutilized, re-route waking tasks into an energy-aware placement algorithm. The selection of an energy-efficient CPU for a task is achieved by estimating the impact on system-level active energy resulting from the placement of the task on the CPU with the highest spare capacity in each performance domain. This strategy spreads tasks in a performance domain and avoids overly aggressive task packing. The best CPU energy-wise is then selected if it saves a large enough amount of energy with respect to prev_cpu. Although it has already shown significant benefits on some existing targets, this approach cannot scale to platforms with numerous CPUs. This is an attempt to do something useful as writing a fast heuristic that performs reasonably well on a broad spectrum of architectures isn't an easy task. As such, the scope of usability of the energy-aware wake-up path is restricted to systems with the SD_ASYM_CPUCAPACITY flag set, and where the EM isn't too complex. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-15-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 390031e4c309c94ecc07a558187eb5185200df83 Author: Quentin Perret Date: Mon Dec 3 09:56:26 2018 +0000 sched/fair: Introduce an energy estimation helper function In preparation for the definition of an energy-aware wakeup path, introduce a helper function to estimate the consequence on system energy when a specific task wakes-up on a specific CPU. compute_energy() estimates the capacity state to be reached by all performance domains and estimates the consumption of each online CPU according to its Energy Model and its percentage of busy time. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-14-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 2802bf3cd936fe2c8033a696d375a4d9d3974de4 Author: Morten Rasmussen Date: Mon Dec 3 09:56:25 2018 +0000 sched/fair: Add over-utilization/tipping point indicator Energy-aware scheduling is only meant to be active while the system is _not_ over-utilized. That is, there are spare cycles available to shift tasks around based on their actual utilization to get a more energy-efficient task distribution without depriving any tasks. When above the tipping point task placement is done the traditional way based on load_avg, spreading the tasks across as many cpus as possible based on priority scaled load to preserve smp_nice. Below the tipping point we want to use util_avg instead. We need to define a criteria for when we make the switch. The util_avg for each cpu converges towards 100% regardless of how many additional tasks we may put on it. If we define over-utilized as: sum_{cpus}(rq.cfs.avg.util_avg) + margin > sum_{cpus}(rq.capacity) some individual cpus may be over-utilized running multiple tasks even when the above condition is false. That should be okay as long as we try to spread the tasks out to avoid per-cpu over-utilization as much as possible and if all tasks have the _same_ priority. If the latter isn't true, we have to consider priority to preserve smp_nice. For example, we could have n_cpus nice=-10 util_avg=55% tasks and n_cpus/2 nice=0 util_avg=60% tasks. Balancing based on util_avg we are likely to end up with nice=-10 tasks sharing cpus and nice=0 tasks getting their own as we 1.5*n_cpus tasks in total and 55%+55% is less over-utilized than 55%+60% for those cpus that have to be shared. The system utilization is only 85% of the system capacity, but we are breaking smp_nice. To be sure not to break smp_nice, we have defined over-utilization conservatively as when any cpu in the system is fully utilized at its highest frequency instead: cpu_rq(any).cfs.avg.util_avg + margin > cpu_rq(any).capacity IOW, as soon as one cpu is (nearly) 100% utilized, we switch to load_avg to factor in priority to preserve smp_nice. With this definition, we can skip periodic load-balance as no cpu has an always-running task when the system is not over-utilized. All tasks will be periodic and we can balance them at wake-up. This conservative condition does however mean that some scenarios that could benefit from energy-aware decisions even if one cpu is fully utilized would not get those benefits. For systems where some cpus might have reduced capacity on some cpus (RT-pressure and/or big.LITTLE), we want periodic load-balance checks as soon a just a single cpu is fully utilized as it might one of those with reduced capacity and in that case we want to migrate it. [ peterz: Added a comment explaining why new tasks are not accounted during overutilization detection. ] Signed-off-by: Morten Rasmussen Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-13-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 630246a06ae2a7a12d1fce85f1e5681032982791 Author: Quentin Perret Date: Mon Dec 3 09:56:24 2018 +0000 sched/fair: Clean-up update_sg_lb_stats parameters In preparation for the introduction of a new root domain flag which can be set during load balance (the 'overutilized' flag), clean-up the set of parameters passed to update_sg_lb_stats(). More specifically, the 'local_group' and 'local_idx' parameters can be removed since they can easily be reconstructed from within the function. While at it, transform the 'overload' parameter into a flag stored in the 'sg_status' parameter hence facilitating the definition of new flags when needed. Suggested-by: Peter Zijlstra Suggested-by: Valentin Schneider Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-12-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 1f74de8798c93ce14801cc4e772603e51c841c33 Author: Quentin Perret Date: Mon Dec 3 09:56:22 2018 +0000 sched/toplogy: Introduce the 'sched_energy_present' static key In order to make sure Energy Aware Scheduling (EAS) will not impact systems where no Energy Model is available, introduce a static key guarding the access to EAS code. Since EAS is enabled on a per-root-domain basis, the static key is enabled when at least one root domain meets all conditions for EAS. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-10-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 531b5c9f5cd05ead53324f419b32685a22eebe8b Author: Quentin Perret Date: Mon Dec 3 09:56:21 2018 +0000 sched/topology: Make Energy Aware Scheduling depend on schedutil Energy Aware Scheduling (EAS) is designed with the assumption that frequencies of CPUs follow their utilization value. When using a CPUFreq governor other than schedutil, the chances of this assumption being true are small, if any. When schedutil is being used, EAS' predictions are at least consistent with the frequency requests. Although those requests have no guarantees to be honored by the hardware, they should at least guide DVFS in the right direction and provide some hope in regards to the EAS model being accurate. To make sure EAS is only used in a sane configuration, create a strong dependency on schedutil being used. Since having sugov compiled-in does not provide that guarantee, make CPUFreq call a scheduler function on governor changes hence letting it rebuild the scheduling domains, check the governors of the online CPUs, and enable/disable EAS accordingly. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-9-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit b68a4c0dba3b1e1dda1ede49f3c2fc72d3b54567 Author: Quentin Perret Date: Mon Dec 3 09:56:20 2018 +0000 sched/topology: Disable EAS on inappropriate platforms Energy Aware Scheduling (EAS) in its current form is most relevant on platforms with asymmetric CPU topologies (e.g. Arm big.LITTLE) since this is where there is a lot of potential for saving energy through scheduling. This is particularly true since the Energy Model only includes the active power costs of CPUs, hence not providing enough data to compare packing-vs-spreading strategies. As such, disable EAS on root domains where the SD_ASYM_CPUCAPACITY flag is not set. While at it, disable EAS on systems where the complexity of the Energy Model is too high since that could lead to unacceptable scheduling overhead. All in all, EAS can be used on a root domain if and only if: 1. an Energy Model is available; 2. the root domain has an asymmetric CPU capacity topology; 3. the complexity of the root domain's EM is low enough to keep scheduling overheads low. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-8-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 011b27bb5d3139e8b5fe9ceff1fc7f6dc3145071 Author: Quentin Perret Date: Mon Dec 3 09:56:19 2018 +0000 sched/topology: Add lowest CPU asymmetry sched_domain level pointer Add another member to the family of per-cpu sched_domain shortcut pointers. This one, sd_asym_cpucapacity, points to the lowest level at which the SD_ASYM_CPUCAPACITY flag is set. While at it, rename the sd_asym shortcut to sd_asym_packing to avoid confusions. Generally speaking, the largest opportunity to save energy via scheduling comes from a smarter exploitation of heterogeneous platforms (i.e. big.LITTLE). Consequently, the sd_asym_cpucapacity shortcut will be used at first as the lowest domain where Energy-Aware Scheduling (EAS) should be applied. For example, it is possible to apply EAS within a socket on a multi-socket system, as long as each socket has an asymmetric topology. Energy-aware cross-sockets wake-up balancing will only happen when the system is over-utilized, or this_cpu and prev_cpu are in different sockets. Suggested-by: Morten Rasmussen Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-7-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 6aa140fa4508933a6ac6717d65a403eb904d6c02 Author: Quentin Perret Date: Mon Dec 3 09:56:18 2018 +0000 sched/topology: Reference the Energy Model of CPUs when available The existing scheduling domain hierarchy is defined to map to the cache topology of the system. However, Energy Aware Scheduling (EAS) requires more knowledge about the platform, and specifically needs to know about the span of Performance Domains (PD), which do not always align with caches. To address this issue, use the Energy Model (EM) of the system to extend the scheduler topology code with a representation of the PDs, alongside the scheduling domains. More specifically, a linked list of PDs is attached to each root domain. When multiple root domains are in use, each list contains only the PDs covering the CPUs of its root domain. If a PD spans over CPUs of multiple different root domains, it will be duplicated in all lists. The lists are fully maintained by the scheduler from partition_sched_domains() in order to cope with hotplug and cpuset changes. As for scheduling domains, the list are protected by RCU to ensure safe concurrent updates. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-6-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 27871f7a8a341ef5c636a337856369acf8013e4e Author: Quentin Perret Date: Mon Dec 3 09:56:16 2018 +0000 PM: Introduce an Energy Model management framework Several subsystems in the kernel (task scheduler and/or thermal at the time of writing) can benefit from knowing about the energy consumed by CPUs. Yet, this information can come from different sources (DT or firmware for example), in different formats, hence making it hard to exploit without a standard API. As an attempt to address this, introduce a centralized Energy Model (EM) management framework which aggregates the power values provided by drivers into a table for each performance domain in the system. The power cost tables are made available to interested clients (e.g. task scheduler or thermal) via platform-agnostic APIs. The overall design is represented by the diagram below (focused on Arm-related drivers as an example, but applicable to any architecture): +---------------+ +-----------------+ +-------------+ | Thermal (IPA) | | Scheduler (EAS) | | Other | +---------------+ +-----------------+ +-------------+ | | em_pd_energy() | | | em_cpu_get() | +-----------+ | +--------+ | | | v v v +---------------------+ | | | Energy Model | | | | Framework | | | +---------------------+ ^ ^ ^ | | | em_register_perf_domain() +----------+ | +---------+ | | | +---------------+ +---------------+ +--------------+ | cpufreq-dt | | arm_scmi | | Other | +---------------+ +---------------+ +--------------+ ^ ^ ^ | | | +--------------+ +---------------+ +--------------+ | Device Tree | | Firmware | | ? | +--------------+ +---------------+ +--------------+ Drivers (typically, but not limited to, CPUFreq drivers) can register data in the EM framework using the em_register_perf_domain() API. The calling driver must provide a callback function with a standardized signature that will be used by the EM framework to build the power cost tables of the performance domain. This design should offer a lot of flexibility to calling drivers which are free of reading information from any location and to use any technique to compute power costs. Moreover, the capacity states registered by drivers in the EM framework are not required to match real performance states of the target. This is particularly important on targets where the performance states are not known by the OS. The power cost coefficients managed by the EM framework are specified in milli-watts. Although the two potential users of those coefficients (IPA and EAS) only need relative correctness, IPA specifically needs to compare the power of CPUs with the power of other components (GPUs, for example), which are still expressed in absolute terms in their respective subsystems. Hence, specifying the power of CPUs in milli-watts should help transitioning IPA to using the EM framework without introducing new problems by keeping units comparable across sub-systems. On the longer term, the EM of other devices than CPUs could also be managed by the EM framework, which would enable to remove the absolute unit. However, this is not absolutely required as a first step, so this extension of the EM framework is left for later. On the client side, the EM framework offers APIs to access the power cost tables of a CPU (em_cpu_get()), and to estimate the energy consumed by the CPUs of a performance domain (em_pd_energy()). Clients such as the task scheduler can then use these APIs to access the shared data structures holding the Energy Model of CPUs. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-4-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 938e5e4b0d1502a93e787985cb95b136b40717b7 Author: Quentin Perret Date: Mon Dec 3 09:56:15 2018 +0000 sched/cpufreq: Prepare schedutil for Energy Aware Scheduling Schedutil requests frequency by aggregating utilization signals from the scheduler (CFS, RT, DL, IRQ) and applying a 25% margin on top of them. Since Energy Aware Scheduling (EAS) needs to be able to predict the frequency requests, it needs to forecast the decisions made by the governor. In order to prepare the introduction of EAS, introduce schedutil_freq_util() to centralize the aforementioned signal aggregation and make it available to both schedutil and EAS. Since frequency selection and energy estimation still need to deal with RT and DL signals slightly differently, schedutil_freq_util() is called with a different 'type' parameter in those two contexts, and returns an aggregated utilization signal accordingly. While at it, introduce the map_util_freq() function which is designed to make schedutil's 25% margin usable easily for both sugov and EAS. As EAS will be able to predict schedutil's frequency requests more accurately than any other governor by design, it'd be sensible to make sure EAS cannot be used without schedutil. This will be done later, once EAS has actually been introduced. Suggested-by: Peter Zijlstra Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-3-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 5bd0988be12733a42a1a3d50e3e2ddfd79e57518 Author: Quentin Perret Date: Mon Dec 3 09:56:14 2018 +0000 sched/topology: Relocate arch_scale_cpu_capacity() to the internal header By default, arch_scale_cpu_capacity() is only visible from within the kernel/sched folder. Relocate it to include/linux/sched/topology.h to make it visible to other clients needing to know about the capacity of CPUs, such as the Energy Model framework. This also shrinks the public header. Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adharmap@codeaurora.org Cc: chris.redpath@arm.com Cc: currojerez@riseup.net Cc: dietmar.eggemann@arm.com Cc: edubezval@gmail.com Cc: gregkh@linuxfoundation.org Cc: javi.merino@kernel.org Cc: joel@joelfernandes.org Cc: juri.lelli@redhat.com Cc: morten.rasmussen@arm.com Cc: patrick.bellasi@arm.com Cc: pkondeti@codeaurora.org Cc: rjw@rjwysocki.net Cc: skannan@codeaurora.org Cc: smuckle@google.com Cc: srinivas.pandruvada@linux.intel.com Cc: thara.gopinath@linaro.org Cc: tkjos@google.com Cc: valentin.schneider@arm.com Cc: vincent.guittot@linaro.org Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/20181203095628.11858-2-quentin.perret@arm.com Signed-off-by: Ingo Molnar commit 9ebc6053814d37b9de8cc291fba28f30a729c929 Author: Yangtao Li Date: Sat Nov 3 13:26:02 2018 -0400 sched/core: Remove unnecessary unlikely() in push_*_task() WARN_ON() already contains an unlikely(), so it's not necessary to use WARN_ON(1). Signed-off-by: Yangtao Li Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181103172602.1917-1-tiny.windzz@gmail.com Signed-off-by: Ingo Molnar commit 765d0af19f5f388a34bf4533378f8398b72ded46 Author: Vincent Guittot Date: Wed Aug 29 15:19:11 2018 +0200 sched/topology: Remove the ::smt_gain field from 'struct sched_domain' ::smt_gain is used to compute the capacity of CPUs of a SMT core with the constraint 1 < ::smt_gain < 2 in order to be able to compute number of CPUs per core. The field has_free_capacity of struct numa_stat, which was the last user of this computation of number of CPUs per core, has been removed by: 2d4056fafa19 ("sched/numa: Remove numa_has_capacity()") We can now remove this constraint on core capacity and use the defautl value SCHED_CAPACITY_SCALE for SMT CPUs. With this remove, SCHED_CAPACITY_SCALE becomes the maximum compute capacity of CPUs on every systems. This should help to simplify some code and remove fields like rd->max_cpu_capacity Furthermore, arch_scale_cpu_capacity() is used with a NULL sd in several other places in the code when it wants the capacity of a CPUs to scale some metrics like in pelt, deadline or schedutil. In case on SMT, the value returned is not the capacity of SMT CPUs but default SCHED_CAPACITY_SCALE. So remove it. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1535548752-4434-4-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar commit 43b9e4febc66b98d83cc1560196d56ac7fef3c32 Author: Mukesh Ojha Date: Tue Nov 27 14:43:32 2018 +0530 perf/core: Declare the __percpu attribute on non-deref types Sparse reports the current declaration of two perf percpu variables with this warning: warning: incorrect type in initializer (different address spaces) expected void const [noderef] *__vpp_verify got struct perf_cpu_context * While it's normally perfectly fine to place GCC attributes anywhere in the definition, this particular attribute is for a checking compiler's such as Sparse's benefit, which doesn't want __percpu on pointers. So reorder the attribute to come after the structure type, not after the pointer type. [ mingo: Rewrote the changelog. ] Signed-off-by: Mukesh Ojha Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/1543310012-7967-1-git-send-email-mojha@codeaurora.org Signed-off-by: Ingo Molnar commit a91f676074c05b3c455700b90849adcfda50079e Author: Takashi Sakamoto Date: Tue Dec 11 19:17:35 2018 +0900 ALSA: fireface: add support for Fireface 800 with MIDI functionality only Fireface 800 is a flagship model of RME GmbH for audio and music units on IEEE 1394 bus, shipped 2004. This model consists of four chips: - TI TSB81BA3D for physical layer on cable environment of EEE 1394 bus - TI TSB82AA2 for link layer for 1394 OHCI bus bridge to PCI bus - Xilinx Spartan-3 FPGA XC3S400 - Xilinx High-Performance CPLD XC9572XL This commit adds support Fireface 800. In this time, the support is restricted to its MIDI functionality, thus this commit adds some condition statements to avoid touching streaming functionality. Unlike Fireface 400, Fireface 800 has no functionality to suppress asynchronous transactions for MIDI messages except for unregister of listen address in controller side, thus the feature is available as is. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit aef4ad2f5aa27ec05f0306547bcf7cf86a9e9873 Author: Takashi Sakamoto Date: Tue Dec 11 19:17:34 2018 +0900 ALSA: fireface: localize a handler for MIDI messages on tx transaction Content of asynchronous transaction for MIDI messages differs between Fireface 400 and 800. This commit adds a model-specific handler for the transaction and adds arrangement. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 3eb8a24459491acc40440b655ca640c87125c5a3 Author: Takashi Sakamoto Date: Tue Dec 11 19:17:33 2018 +0900 ALSA: fireface: add driver data for register for MIDI high address Fireface 400 and 800 have the same mechanism to decide address to which asynchronous transactions are sent for MIDI messages, however they use different registers for controllers to notify higher 4 byte of the address. This commit adds a model-specific parameter to represent the address. Additionally, it corrects some comments. I note that these two models have a difference to enable/disable the transaction. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 0085c6edabe85fd39d6ad4340dba2587511e2b3e Author: Takashi Sakamoto Date: Tue Dec 11 19:17:32 2018 +0900 ALSA: fireface: share register for async transaction of MIDI messages As long as investigating packet dumps from Fireface 400/800, a register to receive asynchronous transactions for MIDI messages is the same. For Fireface 800, minor register is used. This commit declares macros for the transactions and obsoletes model-specific parameters. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 5bfb841e2f5952f5a6d8540dfda196769b358f8c Author: Takashi Sakamoto Date: Tue Dec 11 19:17:31 2018 +0900 ALSA: fireface: add support for second optical interface for ADAT stream Unlike Fireface 400, Fireface 800 have two pair of optical interface for ADAT signal and S/PDIF signal. ADAT signals for the interface are handled for sampling clock source separately. This commit modifies a parser for clock configuration to distinguish these two ADAT signals. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 3c3b892b3735edcc9e0be0aa129c72613e3f156e Author: Takashi Sakamoto Date: Tue Dec 11 19:17:30 2018 +0900 ALSA: fireface: share helper function to get current sampling rate and clock source As long as investigating packet dumps from Fireface 400/800, bits on status registers for clock synchronization are the same. This commit moves a parser for a register of clock configuration to obsolete model-specific operations. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 72f10f08b6e95cfeb7cad9ebd165d5cca771e0e7 Author: Takashi Sakamoto Date: Tue Dec 11 19:17:29 2018 +0900 ALSA: fireface: share status and configuration dump As long as investigating packet dumps from Fireface 400/800, bits on status registers for clock synchronization are the same. This commit moves a parser for the registers to obsolete model-specific operations. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 3ae49ed923028b93c790910d362e3af7f0b87d09 Author: Takashi Sakamoto Date: Tue Dec 11 19:17:28 2018 +0900 ALSA: fireface: share some registers for status of clock synchronization As long as investigating packet dumps from Fireface 400/800, status registers for clock synchronization is common. This commit moves some macros for them to header file. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 80eb865768703c0f85a0603762742ae1dedf21f0 Author: Andrea Parri Date: Tue Nov 27 12:01:10 2018 +0100 sched/fair: Clean up comment in nohz_idle_balance() Concerning the comment associated to the atomic_fetch_andnot() in nohz_idle_balance(), Vincent explains [1]: "[...] the comment is useless and can be removed [...] it was referring to a line code above the comment that was present in a previous iteration of the patchset. This line disappeared in final version but the comment has stayed." So remove the comment. Vincent also points out that the full ordering associated to the atomic_fetch_andnot() primitive could be relaxed, but this patch insists on the current more conservative/fully ordered solution: "Performance" isn't a concern, stay away from "correctness"/subtle relaxed (re)ordering if possible..., just make sure not to confuse the next reader with misleading/out-of-date comments. [1] http://lkml.kernel.org/r/CAKfTPtBjA-oCBRkO6__npQwL3+HLjzk7riCcPU1R7YdO-EpuZg@mail.gmail.com Suggested-by: Vincent Guittot Signed-off-by: Andrea Parri Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20181127110110.5533-1-andrea.parri@amarulasolutions.com Signed-off-by: Ingo Molnar commit fe27b0de8dfcdf8482558ce5d25e697fe74d851e Author: Bart Van Assche Date: Thu Dec 6 17:11:37 2018 -0800 locking/lockdep: Stop using RCU primitives to access 'all_lock_classes' Due to the previous patch all code that accesses the 'all_lock_classes' list holds the graph lock. Hence use regular list primitives instead of their RCU variants to access this list. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-14-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 786fa29e9cb6810e21ab0d9c41a81d81d54d1d1b Author: Bart Van Assche Date: Thu Dec 6 17:11:36 2018 -0800 locking/lockdep: Make concurrent lockdep_reset_lock() calls safe Since zap_class() removes items from the all_lock_classes list and the classhash_table, protect all zap_class() calls against concurrent data structure modifications with the graph lock. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-13-bvanassche@acm.org Signed-off-by: Ingo Molnar commit a66b6922dc6a5ece60ea9326153da3b062977a4d Author: Bart Van Assche Date: Thu Dec 6 17:11:35 2018 -0800 locking/lockdep: Remove a superfluous INIT_LIST_HEAD() statement Initializing a list entry just before it is passed to list_add_tail_rcu() is not necessary because list_add_tail_rcu() overwrites the next and prev pointers anyway. Hence remove the INIT_LIST_HEAD() statement. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-12-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 2904d9fa45d3ce7153f1e10d78c570ecf7f19c35 Author: Bart Van Assche Date: Thu Dec 6 17:11:34 2018 -0800 locking/lockdep: Introduce lock_class_cache_is_registered() This patch does not change any functionality but makes the lockdep_reset_lock() function easier to read. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-11-bvanassche@acm.org Signed-off-by: Ingo Molnar commit d35568bdb6ce4be3f885f8f189bbde5adc7e0160 Author: Bart Van Assche Date: Thu Dec 6 17:11:33 2018 -0800 locking/lockdep: Inline __lockdep_init_map() Since the function __lockdep_init_map() only has one caller, inline it into its caller. This patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-10-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 1431a5d2cfa18d7006d9b0e7ab4548d9bb19ce55 Author: Bart Van Assche Date: Thu Dec 6 17:11:32 2018 -0800 locking/lockdep: Declare local symbols static This patch avoids that sparse complains about a missing declaration for the lock_classes array when building with CONFIG_DEBUG_LOCKDEP=n. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-9-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 886adbed7ac19352315e9f1dd880360c7544d25c Author: Bart Van Assche Date: Thu Dec 6 17:11:31 2018 -0800 tools/lib/lockdep/tests: Test the lockdep_reset_lock() implementation This patch makes sure that the lockdep_reset_lock() function gets tested. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-8-bvanassche@acm.org Signed-off-by: Ingo Molnar commit ac862d9b2fd084b50ee7a332a35d8d8d3228ce09 Author: Bart Van Assche Date: Thu Dec 6 17:11:30 2018 -0800 tools/lib/lockdep: Add dummy print_irqtrace_events() implementation This patch avoids that linking against liblockdep fails due to no print_irqtrace_events() definition being available. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-7-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 7f3c7952d111ac93573fb86f4d5aeff527a07fcc Author: Bart Van Assche Date: Thu Dec 6 17:11:29 2018 -0800 tools/lib/lockdep: Rename "trywlock" into "trywrlock" This patch avoids that the following compiler warning is reported while compiling the lockdep unit tests: include/liblockdep/rwlock.h: In function 'liblockdep_pthread_rwlock_trywlock': include/liblockdep/rwlock.h:66:9: warning: implicit declaration of function 'pthread_rwlock_trywlock'; did you mean 'pthread_rwlock_trywrlock'? [-Wimplicit-function-declaration] return pthread_rwlock_trywlock(&lock->rwlock) == 0 ? 1 : 0; ^~~~~~~~~~~~~~~~~~~~~~~ pthread_rwlock_trywrlock Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Fixes: 5a52c9b480e0 ("liblockdep: Add public headers for pthread_rwlock_t implementation") Link: https://lkml.kernel.org/r/20181207011148.251812-6-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 2b28a8609ec9891e37607ae20688b4ab34f2778c Author: Bart Van Assche Date: Thu Dec 6 17:11:28 2018 -0800 tools/lib/lockdep/tests: Run lockdep tests a second time under Valgrind This improves test coverage. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-5-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 5ecb8e94b494af0df8de4ca9b9ef88d87b30a9c1 Author: Bart Van Assche Date: Thu Dec 6 17:11:27 2018 -0800 tools/lib/lockdep/tests: Improve testing accuracy Instead of checking whether the tests produced any output, check the output itself. This patch avoids that e.g. debug output causes the message "PASSED!" to be reported for failed tests. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-4-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 7e9798871a9186cb831cf693d7ff58085384ccbd Author: Bart Van Assche Date: Thu Dec 6 17:11:26 2018 -0800 tools/lib/lockdep/tests: Fix shellcheck warnings Use find instead of ls to avoid splitting filenames that contain spaces. Use rm -f instead of if ... then rm ...; fi. This patch addresses all shellcheck complaints about the run_tests.sh shell script. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-3-bvanassche@acm.org Signed-off-by: Ingo Molnar commit da087b2229618f78ecea5c203fed8ba2245de636 Author: Bart Van Assche Date: Thu Dec 6 17:11:25 2018 -0800 tools/lib/lockdep/tests: Display compiler warning and error messages If compilation of liblockdep fails, display an error message and exit immediately. Display compiler warning and error messages that are generated while building a test. Only run a test if compilation of it succeeded. Signed-off-by: Bart Van Assche Signed-off-by: Peter Zijlstra (Intel) Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Cc: Waiman Long Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-2-bvanassche@acm.org Signed-off-by: Ingo Molnar commit 2421b7f3573babfe1673a5ffee1677a5013e6df1 Author: Waiman Long Date: Mon Nov 19 13:55:10 2018 -0500 locking/lockdep: Remove ::version from lock_class structure It turns out the version field in the lock_class structure isn't used anywhere. Just remove it. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Petr Mladek Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Tejun Heo Cc: Thomas Gleixner Cc: Will Deacon Cc: iommu@lists.linux-foundation.org Cc: kasan-dev@googlegroups.com Link: https://lkml.kernel.org/r/1542653726-5655-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit bd44735418221e15b45102c31f0bc00046194f35 Author: YueHaibing Date: Tue Dec 11 17:52:07 2018 +0800 EDAC, i5000: Remove set but not used local variables Remove unused local variables as reported by gcc's -Wunused-but-set-variable option. [ bp: simplify commit message. ] Signed-off-by: YueHaibing Signed-off-by: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: linux-edac Link: https://lkml.kernel.org/r/20181211095207.25936-1-yuehaibing@huawei.com commit fcf9ab35ba418edbab3ba0882ff230f82b16403b Author: Randy Dunlap Date: Sat Dec 1 09:31:34 2018 -0800 PCI/P2PDMA: Clean up documentation and kernel-doc Fix typos, spellos, and grammar in p2pdma.rst and p2pdma.c. Fix return value(s) in function pci_p2pmem_alloc_sgl(). Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Acked-by: Logan Gunthorpe Cc: Jonathan Corbet commit 6aa69750ef1b162417811aa2d940a8df30acd930 Author: Christoph Hellwig Date: Sat Dec 8 09:40:03 2018 -0800 sparc: merge 32-bit and 64-bit version of pci.h There are enough common defintions that a single header seems nicer. Also drop the pointless include. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller Acked-by: Sam Ravnborg commit b535d1fca6d63ae6096e7030331e6e698aac4455 Author: Christoph Hellwig Date: Sat Dec 8 09:39:12 2018 -0800 sparc: move the leon PCI memory space comment to It has nothing to do with the content of the pci.h header. Suggested by: Sam Ravnborg Signed-off-by: Christoph Hellwig Acked-by: David S. Miller commit a24ca8a253bd6e2644eba069b78fec80928d7b76 Author: Christoph Hellwig Date: Mon Dec 3 14:21:58 2018 +0100 sparc: remove not required includes from dma-mapping.h The only thing we need to explicitly pull in is the defines for the CPU type. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller commit ce65d36f3ea79368170ca58f2efd28cdba3d70e9 Author: Christoph Hellwig Date: Mon Dec 3 14:04:32 2018 +0100 sparc: remove the sparc32_dma_ops indirection There is no good reason to have a double indirection for the sparc32 dma ops, so remove the sparc32_dma_ops and define separate dma_map_ops instance for the different IOMMU types. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller commit 53b7670e5735ba1c662230377d764799aaf57300 Author: Christoph Hellwig Date: Mon Dec 3 14:02:26 2018 +0100 sparc: factor the dma coherent mapping into helper Factor the code to remap memory returned from the DMA coherent allocator into two helpers that can be shared by the IOMMU and direct mapping code. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller Acked-by: Sam Ravnborg commit 7227b202623986505c9dd6d2eadad977cd43625e Author: Christoph Hellwig Date: Mon Dec 3 12:28:35 2018 +0100 sparc: remove not needed sbus_dma_ops methods No need to BUG_ON() on the cache maintainance ops - they are no-ops by default, and there is nothing in the DMA API contract that prohibits calling them on sbus devices (even if such drivers are unlikely to ever appear). Similarly a dma_supported method that always returns 0 is rather pointless. The only thing that indicates is that no one ever calls the method on sbus devices. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller commit 4fe4f9fecc36956fd53c8edf96dd0c691ef98ff9 Author: Minas Harutyunyan Date: Mon Dec 10 18:09:32 2018 +0400 usb: dwc2: Fix disable all EP's on disconnect Disabling all EP's allow to reset EP's to initial state. Introduced new function dwc2_hsotg_ep_disable_lock() which before calling dwc2_hsotg_ep_disable() function acquire hsotg->lock and release on exiting. From dwc2_hsotg_ep_disable() function removed acquiring hsotg->lock. In dwc2_hsotg_core_init_disconnected() function when USB reset interrupt asserted disabling all ep’s by dwc2_hsotg_ep_disable() function. This updates eliminating sparse imbalance warnings. Reverted changes in dwc2_hostg_disconnect() function. Introduced new function dwc2_hsotg_ep_disable_lock(). Changed dwc2_hsotg_ep_ops. Now disable point to dwc2_hsotg_ep_disable_lock() function. In functions dwc2_hsotg_udc_stop() and dwc2_hsotg_suspend() dwc2_hsotg_ep_disable() function replaced by dwc2_hsotg_ep_disable_lock() function. In dwc2_hsotg_ep_disable() function removed acquiring of hsotg->lock. Fixes: dccf1bad4be7 ("usb: dwc2: Disable all EP's on disconnect") Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit 3c15ddb97c77f34ba009910becd5921f169770a2 Author: Victor Chong Date: Wed Apr 11 10:19:53 2018 +0100 tee: optee: log message if dynamic shm is enabled When dynamic shared memory support is enabled in the OP-TEE Trusted OS, it doesn't mean that the driver supports it, which can confuse users during debugging. Log a message when dynamic shared memory is enabled in the driver, to let users know for sure. Suggested-by: Jerome Forissier Signed-off-by: Victor Chong Reviewed-by: Jerome Forissier Signed-off-by: Jens Wiklander commit b2d102bd0146d9eb1fa630ca0cd19a15ef2f74c8 Author: Zhizhou Zhang Date: Wed Nov 21 11:01:43 2018 +0800 tee: optee: avoid possible double list_del() This bug occurs when: - a new request arrives, one thread(let's call it A) is pending in optee_supp_req() with req->busy is initial value false. - tee-supplicant is killed, then optee_supp_release() is called, this function calls list_del(&req->link), and set supp->ctx to NULL. And it also wake up process A. - process A continues, it firstly checks supp->ctx which is NULL, then checks req->busy which is false, at last run list_del(&req->link). This triggers double list_del() and results kernel panic. For solve this problem, we rename req->busy to req->in_queue, and associate it with state of whether req is linked to supp->reqs. So we can just only check req->in_queue to make decision calling list_del() or not. Signed-off-by: Zhizhou Zhang Signed-off-by: Jens Wiklander commit ad78dee0b630527bdfed809d1f5ed95c601886ae Author: Robin Murphy Date: Mon Dec 10 14:00:33 2018 +0000 dma-debug: Batch dma_debug_entry allocation DMA debug entries are one of those things which aren't that useful individually - we will always want some larger quantity of them - and which we don't really need to manage the exact number of - we only care about having 'enough'. In that regard, the current behaviour of creating them one-by-one leads to a lot of unwarranted function call overhead and memory wasted on alignment padding. Now that we don't have to worry about freeing anything via dma_debug_resize_entries(), we can optimise the allocation behaviour by grabbing whole pages at once, which will save considerably on the aforementioned overheads, and probably offer a little more cache/TLB locality benefit for traversing the lists under normal operation. This should also give even less reason for an architecture-level override of the preallocation size, so make the definition unconditional - if there is still any desire to change the compile-time value for some platforms it would be better off as a Kconfig option anyway. Since freeing a whole page of entries at once becomes enough of a challenge that it's not really worth complicating dma_debug_init(), we may as well tweak the preallocation behaviour such that as long as we manage to allocate *some* pages, we can leave debugging enabled on a best-effort basis rather than otherwise wasting them. Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit 0cb0e25e421436a83ee39857923e4213b983e463 Author: Robin Murphy Date: Mon Dec 10 14:00:32 2018 +0000 dma/debug: Remove dma_debug_resize_entries() With the only caller now gone, we can clean up this part of dma-debug's exposed internals and make way to tweak the allocation behaviour. Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit a8a4c98fc9ac84ee9e068fbb16210d2ab8cfefe0 Author: Robin Murphy Date: Mon Dec 10 14:00:31 2018 +0000 x86/dma/amd-gart: Stop resizing dma_debug_entry pool dma-debug is now capable of adding new entries to its pool on-demand if the initial preallocation was insufficient, so the IOMMU_LEAK logic no longer needs to explicitly change the pool size. This does lose it the ability to save a couple of megabytes of RAM by reducing the pool size below its default, but it seems unlikely that that is a realistic concern these days (or indeed that anyone is actively debugging AGP drivers' DMA usage any more). Getting rid of dma_debug_resize_entries() will make room for further streamlining in the dma-debug code itself. Removing the call reveals quite a lot of cruft which has been useless for nearly a decade since commit 19c1a6f5764d ("x86 gart: reimplement IOMMU_LEAK feature by using DMA_API_DEBUG"), including the entire 'iommu=leak' parameter, which controlled nothing except whether dma_debug_resize_entries() was called or not. Signed-off-by: Robin Murphy Acked-by: Thomas Gleixner Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit ceb51173b2b5bd7af0d99079f6bbacdcfc58fe08 Author: Robin Murphy Date: Mon Dec 10 14:00:30 2018 +0000 dma-debug: Make leak-like behaviour apparent Now that we can dynamically allocate DMA debug entries to cope with drivers maintaining excessively large numbers of live mappings, a driver which *does* actually have a bug leaking mappings (and is not unloaded) will no longer trigger the "DMA-API: debugging out of memory - disabling" message until it gets to actual kernel OOM conditions, which means it could go unnoticed for a while. To that end, let's inform the user each time the pool has grown to a multiple of its initial size, which should make it apparent that they either have a leak or might want to increase the preallocation size. Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit 2b9d9ac02b9d8d32c515c82bb17401c429f160ab Author: Robin Murphy Date: Mon Dec 10 14:00:29 2018 +0000 dma-debug: Dynamically expand the dma_debug_entry pool Certain drivers such as large multi-queue network adapters can use pools of mapped DMA buffers larger than the default dma_debug_entry pool of 65536 entries, with the result that merely probing such a device can cause DMA debug to disable itself during boot unless explicitly given an appropriate "dma_debug_entries=..." option. Developers trying to debug some other driver on such a system may not be immediately aware of this, and at worst it can hide bugs if they fail to realise that dma-debug has already disabled itself unexpectedly by the time their code of interest gets to run. Even once they do realise, it can be a bit of a pain to emprirically determine a suitable number of preallocated entries to configure, short of massively over-allocating. There's really no need for such a static limit, though, since we can quite easily expand the pool at runtime in those rare cases that the preallocated entries are insufficient, which is arguably the least surprising and most useful behaviour. To that end, refactor the prealloc_memory() logic a little bit to generalise it for runtime reallocations as well. Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit f737b095c60c635db260e02fdb9f0efb9f3360c4 Author: Robin Murphy Date: Mon Dec 10 14:00:27 2018 +0000 dma-debug: Use pr_fmt() Use pr_fmt() to generate the "DMA-API: " prefix consistently. This results in it being added to a couple of pr_*() messages which were missing it before, and for the err_printk() calls moves it to the actual start of the message instead of somewhere in the middle. Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit 9f191555ba4ba8fc82e589670e46a7f79b72a157 Author: Robin Murphy Date: Mon Dec 10 14:00:28 2018 +0000 dma-debug: Expose nr_total_entries in debugfs Expose nr_total_entries in debugfs, so that {num,min}_free_entries become even more meaningful to users interested in current/maximum utilisation. This becomes even more relevant once nr_total_entries may change at runtime beyond just the existing AMD GART debug code. Suggested-by: John Garry Signed-off-by: Robin Murphy Tested-by: Qian Cai Signed-off-by: Christoph Hellwig commit 6451fe73fa0f542a49bfacd7205b88a597897f58 Author: Jens Axboe Date: Sun Dec 9 11:21:45 2018 -0700 nvme: fix irq vs io_queue calculations Guenter reported an boot hang issue on HPPA after we default to 0 poll queues. We have two issues in the queue count calculations: 1) We don't separate the poll queues from the read/write queues. This is important, since the former doesn't need interrupts. 2) The adjust logic is broken. Adjust the poll queue count before doing nvme_calc_io_queues(). The poll queue count is only limited by the IO queue count we were able to get from the controller, not failures in the IRQ allocation loop. This leaves nvme_calc_io_queues() just adjusting the read/write queue map. Reported-by: Reported-by: Guenter Roeck Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 2701e804f00f79823f69f37c87fef171ac345484 Merge: c20c809f92591 a2dc50914744e Author: Greg Kroah-Hartman Date: Tue Dec 11 14:24:54 2018 +0100 Merge tag 'extcon-next-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 4.21 Detailed description for this pull request: 1. Fix minor issue of Maxim MUIC (Micro USB IC) device driver - Avoid forcing UART path on probe for extcon-max77843/77693/14577/8997.c - Set USB path in USB device mode for extcon-max8997.c * tag 'extcon-next-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: max8997: Fix lack of path setting in USB device mode extcon: max8997: Avoid forcing UART path on drive probe extcon: max14577: Avoid forcing UART path on drive probe extcon: max77693: Avoid forcing UART path on drive probe extcon: max77843: Avoid forcing UART path on drive probe commit e4f752dda0de351efd198f438b68e743029da68a Author: Nick Desaulniers Date: Mon Dec 10 14:27:16 2018 -0800 x86/um/vdso: Drop implicit common-page-size linker flag GNU linker's -z common-page-size's default value is based on the target architecture. arch/x86/um/vdso/Makefile sets it to the architecture default, which is implicit and redundant. Drop it so that one more LLVM build issue gets addressed. Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Acked-by: Richard Weinberger Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jeff Dike Cc: Masahiro Yamada Cc: Thomas Gleixner Cc: linux-um@lists.infradead.org Cc: x86-ml Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com commit a802ed0dd9c2607cc219574e881062d43ea3b7e0 Author: Mimi Zohar Date: Wed Nov 14 12:30:19 2018 -0500 selftests/ima: kexec_load syscall test The kernel CONFIG_KEXEC_VERIFY_SIG option is limited to verifying a kernel image's signature, when loaded via the kexec_file_load syscall. There is no method for verifying a kernel image's signature loaded via the kexec_load syscall. This test verifies loading the kernel image via the kexec_load syscall fails when the kernel CONFIG_KEXEC_VERIFY_SIG option is enabled on systems with secureboot enabled[1]. [1] Detecting secureboot enabled is architecture specific. Signed-off-by: Mimi Zohar commit 060190fbe676268a04a80d5f4b426fc3db9c2401 Author: Mimi Zohar Date: Wed Nov 14 17:24:13 2018 -0500 ima: don't measure/appraise files on efivarfs Update the builtin IMA policies specified on the boot command line (eg. ima_policy="tcb|appraise_tcb") to permit accessing efivar files. Signed-off-by: Mimi Zohar commit 399574c64eaf94e82b7cf056978d7e68748c0f1d Author: Mimi Zohar Date: Sun Nov 18 04:08:12 2018 -0500 x86/ima: retry detecting secure boot mode The secure boot mode may not be detected on boot for some reason (eg. buggy firmware). This patch attempts one more time to detect the secure boot mode. Signed-off-by: Mimi Zohar commit 0a26d6df4fd8aa8f4fb444446d162e01c3e349c0 Author: Kuninori Morimoto Date: Tue Dec 11 03:25:37 2018 +0000 ASoC: simple-scu-card: care multi DPCM codec_conf Current simple-scu-card didn't care about codec_conf for multi DPCM case. This patch cares it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit e6a3ff2ed4c9c4df217c64e0fc0a280a24055790 Author: Kuninori Morimoto Date: Tue Dec 11 03:25:27 2018 +0000 ASoC: simple-scu-card: use cpu/codec pointer on graph_dai_props In DPCM case, it uses CPU-dummy / dummy-Codec dai links, and non DPCM case, it uses CPU-Codec dai links. Now, we want to merge simple-card and simple-scu-card. These sound cards are using silimar but not same logic on each functions. Then, of course we want to share same logic. To compromise, this patch uses cpu/codec pointer on simple-scu-card. It is same logic with simple-card, thus easy merging. This is prepare for merging simple card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 09ee833679761f4995daaa6fd6200c77b8fcdaef Author: Kuninori Morimoto Date: Tue Dec 11 03:25:18 2018 +0000 ASoC: simple-scu-card: tidyup "convert-rate/channels" parsing simple-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit b8d8f9a58fd971ec215fb8bfec5a4fb6e539a3ab Author: Kuninori Morimoto Date: Tue Dec 11 03:25:08 2018 +0000 ASoC: simple-scu-card: care link / dai count In DPCM case, it uses CPU-dummy / dummy-Codec dai links. If sound card is caring only DPCM, link count = dai count, but, if non DPCM case, link count != dai count. Now, we want to merge simple-card and simple-scu-card, then, we need to care both link / dai count more carefly This patch cares it, and prepare for merging simple card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit da32d6537802a257879e9ba91a5e351a24ada889 Author: Kuninori Morimoto Date: Tue Dec 11 03:24:57 2018 +0000 ASoC: simple-scu-card: add dai-link support simple-card is supporting dai-link support, but simple-scu-card doesn't have it. This patch support it. This is prepare for merging simple-card and simple-scu-card. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4264f27a0815c46dfda9c9dd6d5f4abc1df04415 Author: Stefan Berger Date: Fri Oct 19 06:17:58 2018 -0400 docs: Extend trusted keys documentation for TPM 2.0 Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar Reviewed-by: Dave Jiang Acked-by: Dan Williams Acked-by: Jerry Snitselaar Signed-off-by: Mimi Zohar commit d958083a8f6408e76850bc7394976050d7e43173 Author: Eric Richter Date: Tue Oct 9 23:00:37 2018 +0530 x86/ima: define arch_get_ima_policy() for x86 On x86, there are two methods of verifying a kexec'ed kernel image signature being loaded via the kexec_file_load syscall - an architecture specific implementaton or a IMA KEXEC_KERNEL_CHECK appraisal rule. Neither of these methods verify the kexec'ed kernel image signature being loaded via the kexec_load syscall. Secure boot enabled systems require kexec images to be signed. Therefore, this patch loads an IMA KEXEC_KERNEL_CHECK policy rule on secure boot enabled systems not configured with CONFIG_KEXEC_VERIFY_SIG enabled. When IMA_APPRAISE_BOOTPARAM is configured, different IMA appraise modes (eg. fix, log) can be specified on the boot command line, allowing unsigned or invalidly signed kernel images to be kexec'ed. This patch permits enabling IMA_APPRAISE_BOOTPARAM or IMA_ARCH_POLICY, but not both. Signed-off-by: Eric Richter Signed-off-by: Nayna Jain Cc: David Howells Cc: Eric Biederman Cc: Peter Jones Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Mimi Zohar commit 6191706246de99ff2fac4b6f157f20205a0943cd Author: Nayna Jain Date: Tue Oct 9 23:00:36 2018 +0530 ima: add support for arch specific policies Builtin IMA policies can be enabled on the boot command line, and replaced with a custom policy, normally during early boot in the initramfs. Build time IMA policy rules were recently added. These rules are automatically enabled on boot and persist after loading a custom policy. There is a need for yet another type of policy, an architecture specific policy, which is derived at runtime during kernel boot, based on the runtime secure boot flags. Like the build time policy rules, these rules persist after loading a custom policy. This patch adds support for loading an architecture specific IMA policy. Signed-off-by: Nayna Jain Co-Developed-by: Mimi Zohar Signed-off-by: Mimi Zohar commit c52657d93b0530449233979514a08cf9fe5c24bc Author: Nayna Jain Date: Tue Oct 9 23:00:35 2018 +0530 ima: refactor ima_init_policy() This patch removes the code duplication in ima_init_policy() by defining a new function named add_rules(). The new function adds the rules to the initial IMA policy, the custom policy or both based on the policy mask (IMA_DEFAULT_POLICY, IMA_CUSTOM_POLICY). Signed-off-by: Nayna Jain Signed-off-by: Mimi Zohar commit b5ca117365d960fe5e4fe272bcc8142c28769383 Author: Nayna Jain Date: Tue Oct 9 23:00:34 2018 +0530 ima: prevent kexec_load syscall based on runtime secureboot flag When CONFIG_KEXEC_VERIFY_SIG is enabled, the kexec_file_load syscall requires the kexec'd kernel image to be signed. Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIFY_SIG is configured and the system is booted with secureboot enabled. This patch disables the kexec_load syscall only for systems booted with secureboot enabled. [zohar@linux.ibm.com: add missing mesage on kexec_load failure] Signed-off-by: Nayna Jain Cc: David Howells Cc: Eric Biederman Cc: Peter Jones Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Mimi Zohar commit 3f75720d0ebb388ff52200d00f2455cc0e6d95a9 Author: Uwe Kleine-König Date: Fri Nov 30 07:47:09 2018 +0100 spi: imx: drop useless member speed_hz from driver data struct The driver data's member variable just caches the transfer's speed_hz member. All users of the former now have access directly to the latter. So fix them to use the uncached value and remove the cache. Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown commit 1d374703fb988d5c78c8ee68c4e56df4a4f37217 Author: Uwe Kleine-König Date: Fri Nov 30 07:47:08 2018 +0100 spi: imx: rename config callback and add useful parameters The config callback is called once per transfer while some things can (and should) be done on a per message manner. To have unambiguous naming in the end include "transfer" in the callback's name and rename the implementations accordingly. Also pass the driver struct and transfer which allows further simplifications in the following patch. There is no change in behavior intended here. Reviewed-by: Marek Vasut Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown commit 30d6714223c4972b05fbf2ec92ca7a5a4b6ee1fd Author: Uwe Kleine-König Date: Fri Nov 30 07:47:07 2018 +0100 spi: imx: style fixes This change fixes some random style issues that I noticed while debugging the driver: Remove some double spaces, use tabs for indention instead of spaces if possible, fix comment style. Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown commit 00b80ac9355397455adec24c9ee76f1b0225cd27 Author: Uwe Kleine-König Date: Fri Nov 30 07:47:06 2018 +0100 spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook. The relevant difference between prepare_message and config is that the former is run before the CS signal is asserted. So the polarity of the CLK line must be configured in prepare_message as an edge generated by config might already result in a latch of the MOSI line. Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown commit e697271c4e2987b333148e16a2eb8b5b924fd40a Author: Uwe Kleine-König Date: Fri Nov 30 07:47:05 2018 +0100 spi: imx: add a device specific prepare_message callback This is just preparatory work which allows to move some initialisation that currently is done in the per transfer hook .config to an earlier point in time in the next few patches. There is no change in behaviour introduced by this patch. Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown commit 46f48aca2e5aef3f430e95d1a5fb68227ec8ec85 Author: Viresh Kumar Date: Tue Dec 11 16:39:36 2018 +0530 OPP: Fix missing debugfs supply directory for OPPs There is one case where we may end up with no "supply" directory for the OPPs in debugfs. That happens when the OPP core isn't managing the regulators for the device and the device's OPP do have microvolt property. It happens because the opp_table->regulator_count remains set to 0 and the debugfs routines don't add any supply directory in such a case. This commit fixes that by setting opp_table->regulator_count to 1 in that particular case. But to make everything work nicely and not break other parts of the core, regulator_count is defined as "int" now instead of "unsigned int" and it can have different special values now. It is set to -1 initially to mark it "uninitialized" and later only we set it to 0 or positive values after checking how many supplies are there. This also helps in finding the bugs where only few of the OPPs have the "opp-microvolt" property set and not all. Fixes: 1fae788ed640 ("PM / OPP: Don't create debugfs "supply-0" directory unnecessarily") Reported-by: Quentin Perret Signed-off-by: Viresh Kumar commit d84f18d6673f6d93bddfce1aea6cfdd78b822d3e Author: Colin Ian King Date: Thu Dec 6 17:05:57 2018 +0000 drivers: base: swnode: remove need for a temporary string for the node name Currently the node name is being formatting into a temporary string node_name, however, kobject_init_and_add allows one to format up a node name, so use that instead. This removes the need for the node_name string and also cleans up the following warning: Fixes clang warning: warning: format string is not a string literal (potentially insecure) [-Wformat-security] Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit 56131d6d8638b7cb6feee67a8794b3dfa626396e Author: Jay Fang Date: Mon Dec 3 11:15:49 2018 +0800 ACPI / APD: Add clock frequency for Hisilicon Hip08 SPI controller The SPI clock frequency of Designware IP for Hisilicon Hip08 is 250M. The ACPI ID used is "HISI0173". Signed-off-by: Jay Fang Signed-off-by: Rafael J. Wysocki commit 0c166c3deda577955cb39f0242b734634949f1d3 Author: Yangtao Li Date: Fri Nov 30 12:01:06 2018 -0500 ACPI, APEI, EINJ: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Rafael J. Wysocki commit a67d5849c9f1ff6b2afa0704b68ba5e192a3cb32 Author: Yangtao Li Date: Wed Dec 5 10:57:51 2018 -0500 cpufreq: nforce2: Remove meaningless return Delete a line of meaningless return and some useless blank lines. In a function whose return type is void, returning on the last line is not required. Signed-off-by: Yangtao Li Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit df3e1c83a3a7bd65dac951c117cc9c796acd96b0 Author: Yangtao Li Date: Wed Dec 5 10:44:49 2018 -0500 cpufreq: ia64: Remove unused header files seq_file.h does not need to be included, so remove it. Moreover deleted a line of meaningless return and some useless blank lines. In a function whose return type is void, returning on the last line is not required. Signed-off-by: Yangtao Li Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 9456823c842f346c74265fcd98d008d87a7eb6f5 Author: Yangtao Li Date: Mon Dec 10 11:26:41 2018 -0500 cpuidle: big.LITTLE: fix refcount leak of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. bl_idle_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 61cb5758d3c46bc1ba87694fefc0d9653613ce6b Author: Rafael J. Wysocki Date: Wed Dec 5 23:45:34 2018 +0100 cpuidle: Add cpuidle.governor= command line parameter Add cpuidle.governor= command line parameter to allow the default cpuidle governor to be replaced. That is useful, for example, if someone running a tickful kernel wants to use the menu governor on it. Signed-off-by: Rafael J. Wysocki commit 800fb34a99ce7d22dca839c90f869c7a12b50f70 Author: Rafael J. Wysocki Date: Mon Dec 3 13:32:53 2018 +0100 cpuidle: poll_state: Disregard disable idle states When computing the limit of time to spend in the loop in poll_idle(), use the target residency of the first enabled idle state deeper than state 0 instead of always using the target residency of state 1. This helps when state 1 is disabled for diagnostics, for instance. Signed-off-by: Rafael J. Wysocki commit 90e3577b5feb42bac1269e16bb3d2bdd8f6df40f Author: Viresh Kumar Date: Tue Dec 11 16:32:47 2018 +0530 OPP: Use opp_table->regulators to verify no regulator case The value of opp_table->regulator_count is not very consistent right now and it may end up being 0 while we do have a "opp-microvolt" property in the OPP table. It was kept that way as we used to check if any regulators are set with the OPP core for a device or not using value of regulator_count. Lets use opp_table->regulators for that purpose as the meaning of regulator_count is going to change in the later patches. Reported-by: Quentin Perret Signed-off-by: Viresh Kumar commit c76aa322070ecba18e2269349de4b31a80354ceb Merge: 40e020c129cfc 2d12df47eafe7 Author: Rafael J. Wysocki Date: Tue Dec 11 12:02:46 2018 +0100 Merge back staging AVS changes for v4.21. commit 5b5e4d623ec8a34689df98e42d038a3b594d2ff9 Author: Michal Hocko Date: Tue Nov 13 19:49:10 2018 +0100 x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off Swap storage is restricted to max_swapfile_size (~16TB on x86_64) whenever the system is deemed affected by L1TF vulnerability. Even though the limit is quite high for most deployments it seems to be too restrictive for deployments which are willing to live with the mitigation disabled. We have a customer to deploy 8x 6,4TB PCIe/NVMe SSD swap devices which is clearly out of the limit. Drop the swap restriction when l1tf=off is specified. It also doesn't make much sense to warn about too much memory for the l1tf mitigation when it is forcefully disabled by the administrator. [ tglx: Folded the documentation delta change ] Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2") Signed-off-by: Michal Hocko Signed-off-by: Thomas Gleixner Reviewed-by: Pavel Tatashin Reviewed-by: Andi Kleen Acked-by: Jiri Kosina Cc: Linus Torvalds Cc: Dave Hansen Cc: Andi Kleen Cc: Borislav Petkov Cc: Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181113184910.26697-1-mhocko@kernel.org commit 3f7bb2ec20ce07c02b2002349d256c91a463fcc5 Author: Marc Zyngier Date: Tue Nov 13 22:57:34 2018 +0000 PCI: dwc: Move interrupt acking into the proper callback The write to the status register is really an ACK for the HW, and should be treated as such by the driver. Let's move it to the irq_ack() callback, which will prevent people from moving it around in order to paper over other bugs. Fixes: 8c934095fa2f ("PCI: dwc: Clear MSI interrupt status after it is handled, not before") Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API") Link: https://lore.kernel.org/linux-pci/20181113225734.8026-1-marc.zyngier@arm.com/ Reported-by: Trent Piepho Tested-by: Niklas Cassel Tested-by: Gustavo Pimentel Tested-by: Stanimir Varbanov Signed-off-by: Marc Zyngier [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org commit fce5423e4f431c71933d6c1f850b540a314aa6ee Author: Marc Zyngier Date: Tue Nov 13 22:57:33 2018 +0000 PCI: dwc: Take lock when ACKing an interrupt Bizarrely, there is no lock taken in the irq_ack() helper. This puts the ACK callback provided by a specific platform in a awkward situation where there is no synchronization that would be expected on other callback. Introduce the required lock, giving some level of uniformity among callbacks. Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API") Link: https://lore.kernel.org/linux-pci/20181113225734.8026-1-marc.zyngier@arm.com/ Tested-by: Niklas Cassel Tested-by: Gustavo Pimentel Tested-by: Stanimir Varbanov Signed-off-by: Marc Zyngier [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org commit 732291c4fab8b790847aa572703c01ad483b14d0 Author: Arnd Bergmann Date: Tue Dec 11 11:05:46 2018 +0100 arm64: kexec_file: include linux/vmalloc.h This is needed for compilation in some configurations that don't include it implicitly: arch/arm64/kernel/machine_kexec_file.c: In function 'arch_kimage_file_post_load_cleanup': arch/arm64/kernel/machine_kexec_file.c:37:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] Fixes: 52b2a8af7436 ("arm64: kexec_file: load initrd and device-tree") Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon commit 830920e065e90db318a0da98bf13a02b641eae7f Author: Marc Zyngier Date: Tue Nov 13 22:57:32 2018 +0000 PCI: dwc: Use interrupt masking instead of disabling The dwc driver is showing an interesting level of brokeness, as it insists on using the enable/disable set of registers to mask/unmask MSIs, meaning that an MSIs being generated while the interrupt is in that "disabled" state will simply be lost. Let's move to the mask/unmask set of registers, which offers the expected semantics. Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API") Link: https://lore.kernel.org/linux-pci/20181113225734.8026-1-marc.zyngier@arm.com/ Tested-by: Niklas Cassel Tested-by: Gustavo Pimentel Tested-by: Stanimir Varbanov Signed-off-by: Marc Zyngier [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org commit 108c35a908d484df094f46a1e9d961d732737013 Author: Daniel Lezcano Date: Mon Dec 3 11:29:29 2018 +0100 sched/cpufreq: Add the SPDX tags The SPDX tags are not present in cpufreq.c and cpufreq_schedutil.c. Add them and remove the license descriptions Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 2c3b0463bb28e07e5d4c0ae10f440d5d1bf0d72e Merge: 40e020c129cfc 5903195605287 Author: Rafael J. Wysocki Date: Tue Dec 11 10:58:17 2018 +0100 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq Pull devfreq framework changes for v4.21 from MyungJoo Ham: "This includes the suspend-frequency support for devfreq, which is similar with suspend_freq in cpufreq." * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: add devfreq_suspend/resume() functions PM / devfreq: add support for suspend/resume of a devfreq device PM / devfreq: refactor set_target frequency function commit ac9498d6864495c3e5e4439300111d7b61a35fea Author: Nikolay Borisov Date: Tue Dec 11 10:27:23 2018 +0200 fanotify: Use inode_is_open_for_write Use the aptly named function rather than opencoding i_writecount check. No functional changes. Reviewed-by: Jan Kara Signed-off-by: Nikolay Borisov Signed-off-by: Jan Kara commit cb6f4c2c3478b2ff68bd5d0b6020394120075e30 Merge: e69aa5f9b97f7 d1810909d8413 Author: Jani Nikula Date: Tue Dec 11 11:48:43 2018 +0200 Merge tag 'gvt-next-2018-12-07' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-2018-12-07 - Fix -next regression on shadow ctx's ppgtt destroy (Xiong) - Update force-to-nonpriv register list (Yan) - three typo fixes Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20181207043659.GI12743@zhen-hp.sh.intel.com commit 6d68b88e0993d67e9ebb1240f84240b712fbc8a4 Author: Lu Baolu Date: Mon Dec 10 09:59:06 2018 +0800 iommu/vt-d: Remove deferred invalidation Deferred invalidation is an ECS specific feature. It will not be supported when IOMMU works in scalable mode. As we deprecated the ECS support, remove deferred invalidation and cleanup the code. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Sanjay Kumar Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 1c4f88b7f1f9298b56c7dac18c0bcd8d2f75059a Author: Lu Baolu Date: Mon Dec 10 09:59:05 2018 +0800 iommu/vt-d: Shared virtual address in scalable mode This patch enables the current SVA (Shared Virtual Address) implementation to work in the scalable mode. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 437f35e1cd4c8d043633bb72f4260369af68fbf7 Author: Lu Baolu Date: Mon Dec 10 09:59:04 2018 +0800 iommu/vt-d: Add first level page table interface This adds an interface to setup the PASID entries for first level page table translation. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 7373a8cc381978cfafa4b0285cdd935682f1b2d2 Author: Lu Baolu Date: Mon Dec 10 09:59:03 2018 +0800 iommu/vt-d: Setup context and enable RID2PASID support This patch enables the translation for requests without PASID in the scalable mode by setting up the root and context entries. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit ca6e322d60498087a160fad1c4ea8765ff2d21e7 Author: Lu Baolu Date: Mon Dec 10 09:59:02 2018 +0800 iommu/vt-d: Pass pasid table to context mapping So that the pasid related info, such as the pasid table and the maximum of pasid could be used during setting up scalable mode context. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Sanjay Kumar Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel commit ef848b7e5a6a0ef5b10640debce790e12717375b Author: Lu Baolu Date: Mon Dec 10 09:59:01 2018 +0800 iommu/vt-d: Setup pasid entry for RID2PASID support when the scalable mode is enabled, there is no second level page translation pointer in the context entry any more (for DMA request without PASID). Instead, a new RID2PASID field is introduced in the context entry. Software can choose any PASID value to set RID2PASID and then setup the translation in the corresponding PASID entry. Upon receiving a DMA request without PASID, hardware will firstly look at this RID2PASID field and then treat this request as a request with a pasid value specified in RID2PASID field. Though software is allowed to use any PASID for the RID2PASID, we will always use the PASID 0 as a sort of design decision. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 6f7db75e1c469057fe7588ed959328ead771ccc7 Author: Lu Baolu Date: Mon Dec 10 09:59:00 2018 +0800 iommu/vt-d: Add second level page table interface This adds the interfaces to setup or tear down the structures for second level page table translations. This includes types of second level only translation and pass through. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 3b33d4ab3217337f648f7ff3e57e755e6444c748 Author: Lu Baolu Date: Mon Dec 10 09:58:59 2018 +0800 iommu/vt-d: Reserve a domain id for FL and PT modes Vt-d spec rev3.0 (section 6.2.3.1) requires that each pasid entry for first-level or pass-through translation should be programmed with a domain id different from those used for second-level or nested translation. It is recommended that software could use a same domain id for all first-only and pass-through translations. This reserves a domain id for first-level and pass-through translations. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Sanjay Kumar Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 5d308fc1ecf5351418a4f003ccb74dc91b424bd1 Author: Lu Baolu Date: Mon Dec 10 09:58:58 2018 +0800 iommu/vt-d: Add 256-bit invalidation descriptor support Intel vt-d spec rev3.0 requires software to use 256-bit descriptors in invalidation queue. As the spec reads in section 6.5.2: Remapping hardware supporting Scalable Mode Translations (ECAP_REG.SMTS=1) allow software to additionally program the width of the descriptors (128-bits or 256-bits) that will be written into the Queue. Software should setup the Invalidation Queue for 256-bit descriptors before progra- mming remapping hardware for scalable-mode translation as 128-bit descriptors are treated as invalid descriptors (see Table 21 in Section 6.5.2.10) in scalable-mode. This patch adds 256-bit invalidation descriptor support if the hardware presents scalable mode capability. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 4f2ed183cfebf42b29ed8fe442169de97bc0fe61 Author: Lu Baolu Date: Mon Dec 10 09:58:57 2018 +0800 iommu/vt-d: Move page table helpers into header So that they could also be used in other source files. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Sanjay Kumar Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel commit 0bbeb01a4fafbf8422e5c8882d461d6ac4f71e15 Author: Lu Baolu Date: Mon Dec 10 09:58:56 2018 +0800 iommu/vt-d: Manage scalalble mode PASID tables In scalable mode, pasid structure is a two level table with a pasid directory table and a pasid table. Any pasid entry can be identified by a pasid value in below way. 1 9 6 5 0 .-----------------------.-------. | PASID | | '-----------------------'-------' .-------------. | | | | | | | | | | | | | .-----------. | .-------------. | | | |----->| PASID Entry | | | | | '-------------' | | | |Plus | | | .-----------. | | | |---->| DIR Entry |-------->| | | '-----------' '-------------' .---------. |Plus | | | Context | | | | | Entry |------->| | '---------' '-----------' This changes the pasid table APIs to support scalable mode PASID directory and PASID table. It also adds a helper to get the PASID table entry according to the pasid value. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Signed-off-by: Joerg Roedel commit 765b6a98c1de3d84dfdae344cc4ee4c24d9447f7 Author: Lu Baolu Date: Mon Dec 10 09:58:55 2018 +0800 iommu/vt-d: Enumerate the scalable mode capability The Intel vt-d spec rev3.0 introduces a new translation mode called scalable mode, which enables PASID-granular translations for first level, second level, nested and pass-through modes. At the same time, the previous Extended Context (ECS) mode is deprecated (no production ever implements ECS). This patch adds enumeration for Scalable Mode and removes the deprecated ECS enumeration. It provides a boot time option to disable scalable mode even hardware claims to support it. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Ashok Raj Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel commit c4b17afb0a4e8d042320efaf2acf55cb26795f78 Author: Ganapatrao Kulkarni Date: Fri Nov 30 19:14:00 2018 +0800 iommu/dma: Use NUMA aware memory allocations in __iommu_dma_alloc_pages() Change function __iommu_dma_alloc_pages() to allocate pages for DMA from respective device NUMA node. The ternary operator which would be for alloc_pages_node() is tidied along with this. The motivation for this change is to have a policy for page allocation consistent with direct DMA mapping, which attempts to allocate pages local to the device, as mentioned in [1]. In addition, for certain workloads it has been observed a marginal performance improvement. The patch caused an observation of 0.9% average throughput improvement for running tcrypt with HiSilicon crypto engine. We also include a modification to use kvzalloc() for kzalloc()/vzalloc() combination. [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1692998.html Signed-off-by: Ganapatrao Kulkarni [JPG: Added kvzalloc(), drop pages ** being device local, remove ternary operator, update message] Signed-off-by: John Garry Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 1e73359a24fad529b0794515b46cbfff99e5fbe6 Author: Arnd Bergmann Date: Mon Dec 10 21:54:25 2018 +0100 ALSA: hda/ca0132 - make pci_iounmap() call conditional When building without CONFIG_PCI, we can (depending on the architecture) get a link failure: ERROR: "pci_iounmap" [sound/pci/hda/snd-hda-codec-ca0132.ko] undefined! Adding a compile-time check for PCI gets it to work correctly on 32-bit ARM. Fixes: d99501b8575d ("ALSA: hda/ca0132 - Call pci_iounmap() instead of iounmap()") Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai commit 46594d3345f0432ddc83b9f3c1b04492fdfafd07 Author: Takashi Iwai Date: Sun Dec 9 10:10:19 2018 +0100 ALSA: hda/hdmi: Always set display_power_control for Intel HSW+ codecs We've excluded the display_power_control flag for Intel HSW and BDW codecs as the HD-audio controllers of the corresponding platforms take care of the display power as well. But the recent refactoring separates the controller and the codec power accounting, so it's fine to call the display PM even for HSW/BDW codecs. This is less confusing since we can avoid this well-hidden condition. Signed-off-by: Takashi Iwai commit 77a49672aae384125942ce621365b11d42cefa32 Author: Takashi Iwai Date: Sun Dec 9 10:06:59 2018 +0100 ASoC: hdac_hdmi: Add missing display power-off at driver removal The display power is in unbalance at removing the driver since it misses the snd_hdac_display_power(OFF) call. Acked-by: Mark Brown Signed-off-by: Takashi Iwai commit 4f799e734094f09feaae89ee75982fac84742c56 Author: Takashi Iwai Date: Sun Dec 9 10:04:25 2018 +0100 ALSA: hda: Make snd_hdac_display_power() void function After the recent refactoring, snd_hdac_display_power() doesn't return any error, hence it can be defined to return void. This makes many error checks redundant and allows us to reduce them gracefully. Signed-off-by: Takashi Iwai commit 457f3c86d3358beb0ae19774fef8a9035dedd88f Author: Takashi Iwai Date: Sun Dec 9 09:59:03 2018 +0100 ALSA: hda/intel: Properly free the display power at error path When an error occurs in azx_probe_continue(), we should release the display power. However, the current code ignores it and releases the display power only for HSW/BDW cases. Fix it. Signed-off-by: Takashi Iwai commit e454ff8e89b6db0a2054260d48635fbc781e94ce Author: Takashi Iwai Date: Sun Dec 9 09:57:37 2018 +0100 ALSA: hda/intel: Drop superfluous AZX_DCAPS_I915_POWERWELL checks snd_hdac_display_power() can be called even for a HDA controller without DRM binding. The same is true for other helpers, snd_hdac_i915_set_bclk() and snd_hdac_set_codec_wakeup(). So all superfluous AZX_DCAPS_I915_POWERWELL checks in hda_intel.c can be dropped, and the definition of AZX_DCAPS_I915_POWERWELL itself can be removed as well. This simplifies the code a lot. Signed-off-by: Takashi Iwai commit 029d92c289bdad08ed08e61bf31b17cdc9ee61cf Author: Takashi Iwai Date: Sat Dec 8 17:31:49 2018 +0100 ALSA: hda: Refactor display power management The current HD-audio code manages the DRM audio power via too complex redirections, and this seems even still unbalanced in a corner case as Intel DRM CI has been intermittently reporting. This patch is a big surgery for addressing the complexity and the possible unbalance. Basically the patch changes the display PM in the following ways: - Both HD-audio controller and codec drivers call a single helper, snd_hdac_display_power(). (Formerly, the display power control from a codec was done indirectly via link_power bus ops.) - snd_hdac_display_power() receives the codec address index. For turning on/off from the controller, pass HDA_CODEC_IDX_CONTROLLER. - snd_hdac_display_power() doesn't manage refcounts any longer, but keeps the power status in bitmap. If any of controller or codecs is turned on, the function updates the DRM power state via get_power() or put_power(). Also this refactor allows us more cleanup: - The link_power bus ops is dropped, so there is no longer indirect management, as mentioned in the above. - hdac_device link_power_control flag is moved to hda_codec display_power_control flag, as it's only for HDA legacy. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106525 Signed-off-by: Takashi Iwai commit 8ff01abcccbb563fbf50b84a476bd9b22c42c0a3 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ce/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 1b2a5aff3505b49873777247ccf4372eea5959f3 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 7f7bc32e23e72a96c2fed518166d16abea24504e Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/disp/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 1a38496cdd444e870b2bbbbc8f8c7f6b21291656 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/dma/tu106: initial support Appears to be compatible with GV100. Signed-off-by: Ben Skeggs commit bb1e3ff70128ee18f2a8902e695ef08c4fe96d59 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/therm/tu106: initial support Appears to be compatible with GP100. Signed-off-by: Ben Skeggs commit 25a46a4a95d8298d0451ac90a1471263522d9571 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/pmu/tu106: initial support Appears to be compatible with GP102. Signed-off-by: Ben Skeggs commit f5459f34f5ed18aacea1780dd174632dab4131ea Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fault/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 340e96a7c3aa6e47287ca048847f5fc871d03014 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bar/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 70ec09080d85802e2f1514fe8401007890e3f7f4 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/mmu/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 13f91e8e5ae50d84875431e03102acf137edff35 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ltc/tu106: initial support Appears to be compatible with GP102. Signed-off-by: Ben Skeggs commit cfcfb6d0a34fdd552f6f1dea5252ead3575a34a0 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fb/tu106: initial support Appears to be compatible with GV100. Signed-off-by: Ben Skeggs commit 75794c41242c54b229978e2cc4e0af023d07bceb Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/imem/tu106: initial support Appears to be compatible with NV50. Signed-off-by: Ben Skeggs commit 2fedee302da0a0f767f2a18deb6a7b7071b5f82e Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/tmr/tu106: initial support Appears to be compatible with GK20A. Signed-off-by: Ben Skeggs commit 25e6a89076df4760710ea26812e091dbd349ad0b Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bus/tu106: initial support Appears to be compatible with GF100. Signed-off-by: Ben Skeggs commit 476740843bf84bde9c96f414b6cd62a3644ad57f Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/mc/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit 6a9207ecf5df0d4987fab5d30ea0dc48b904346f Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fuse/tu106: initial support Appears to be compatible with GM107. Signed-off-by: Ben Skeggs commit 52c887539d6ddc226da0fa53736e491477aa7250 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/i2c/tu106: initial support Appears to be compatible with GM200. Signed-off-by: Ben Skeggs commit 1b0a47548274eecdd802857060636058134c1efe Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/gpio/tu106: initial support Appears to be compatible with GK104. Signed-off-by: Ben Skeggs commit 8d12c4846d4ba7cfe17e0b4c5181f37d0bb550e4 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ibus/tu106: initial support Appears to be compatible with GM200. Signed-off-by: Ben Skeggs commit 73010b8e2b9a0b82e43a3c01a8c7a94f839eb480 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/top/tu106: initial support Appears to be compatible with GK104. Signed-off-by: Ben Skeggs commit 9d7693fe07d67f45dcf619d41a6cc9efb5e5c773 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/devinit/tu106: initial support Appears to be compatible with TU104. Signed-off-by: Ben Skeggs commit b0216803e361446b2b849fd3e802cbbb7c0d5c8c Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bios/tu106: initial support No real surprised here so far. Signed-off-by: Ben Skeggs commit a39cb42a754168f6f88800edce426d3de0621945 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/pci/tu106: initial support Appears to be compatible with GP100. Signed-off-by: Ben Skeggs commit 2cc0d7c0f761b1cfad7a904919397d245df2f129 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/core: recognise TU106 Signed-off-by: Ben Skeggs commit 2d583ade740939f679c7f99e07c40f17dc9de1ab Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/core: increase maximum number of nvdec instances to 3 RTX2070 appears to have 3 copies of the engine. Signed-off-by: Ben Skeggs commit 563737c525ea4bbe1edea0075d61eff4f954c5df Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/kms/tu104: initial support Signed-off-by: Ben Skeggs commit c36322d23d5d84cbe03c93beaa5dd6c705d48122 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ce/tu104: initial support Signed-off-by: Ben Skeggs commit 641d0b3056e058fa64a02e41535050d896fa5a75 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/tu104: initial support Various different bits and pieces vs GV100. Signed-off-by: Ben Skeggs commit 114b6556db76b0377a1c8a92fec6d760c91f715e Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/disp/tu104: initial support Signed-off-by: Ben Skeggs commit aff70760be71a9d2fa38814d23cbb851c0c08d4c Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/dma/tu104: initial support Appears to be compatible with GV100. Signed-off-by: Ben Skeggs commit 5a991efdfa81c48fbff3df957568fd07569c9f53 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/therm/tu104: initial support Appears to be compatible with GP100. Signed-off-by: Ben Skeggs commit e7e0e946bbf26cb974a904508213ec60111b5a30 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/pmu/tu104: initial support Appears to be compatible with GP102. Signed-off-by: Ben Skeggs commit 17fb2807c678ae30f02129c0c5ab3c616e6579af Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fault/tu104: initial support New registers. Currently uncertain how exactly to mask fault buffer interrupts. This will likely be corrected at around the same time as the new MC interrupt stuff has been properly figured out and implemented. For the moment, it shouldn't matter too much. Signed-off-by: Ben Skeggs commit 838efaa5743802f78a64fc64d3237b79517cee9f Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bar/tu104: initial support New registers. Signed-off-by: Ben Skeggs commit 7986f813c62b295c618a1612e468b84d37c7e2fc Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/mmu/tu104: initial support New flush method. Signed-off-by: Ben Skeggs commit 01e0930617d072e306db2fdfaee75c708d9db5fd Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ltc/tu104: initial support Appears to be compatible with GP102. Signed-off-by: Ben Skeggs commit 5386148b31b2729f29d80f9635cff746d46d475d Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fb/tu104: initial support Appears to be compatible with GV100. Signed-off-by: Ben Skeggs commit c44349b054c8f13f9759fec1ce8aea1d74173ba3 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/imem/tu104: initial support Appears to be compatible with NV50. Signed-off-by: Ben Skeggs commit ead5bf1e3cd82fd9baf63eb631518a1df0a0b4a3 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/tmr/tu104: initial support Appears to be compatible with GK20A. Signed-off-by: Ben Skeggs commit 75ad1b00208ce34bf3a17936e2e75bf0aef46b9b Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bus/tu104: initial support Appears to be compatible with GF100. Signed-off-by: Ben Skeggs commit f2e55b9ea903ccd31f8d38f460a063f41e646232 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/mc/tu104: initial support Things are a bit different here on Turing, and will require further changes yet once I've investigated them more thoroughly. For now though, the existing GP100 code is compatible enough with one small hack to forward on fault buffer interrupts. Signed-off-by: Ben Skeggs commit 575d583ab6a497499010489035e683787f2b385b Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fuse/tu104: initial support Appears to be compatible with GM107. Signed-off-by: Ben Skeggs commit 298fd472ea4dbb8cdff104de65166e9528dd88cb Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/i2c/tu104: initial support Appears to be compatible with GM200. Signed-off-by: Ben Skeggs commit 3273483c32ab0836b7fe187bde629754a06d2d71 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/gpio/tu104: initial support Appears to be compatible with GK104. Signed-off-by: Ben Skeggs commit ba9070d3ecaa4d55232c5c8d43752eacf3ea0dd2 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/ibus/tu104: initial support Appears to be compatible with GM200. Signed-off-by: Ben Skeggs commit 67e5abb78d0e5a5c019b7c62fb0c5461a724c3e0 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/top/tu104: initial support Appears to be compatible with GK104. Signed-off-by: Ben Skeggs commit 43d61cda30653e4c13e92f604cf8a29cb4440146 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/devinit/tu104: initial support The GPU executes DEVINIT itself now, which makes our lives a bit easier. Signed-off-by: Ben Skeggs commit acbe55a5d4c3e36585700044365a957e14c81951 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bios/tu104: initial support No real surprises here so far. Signed-off-by: Ben Skeggs commit 2d7ca8cb19953b4424ab97b92510e1bf434bacfd Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/pci/tu104: initial support Appears to be compatible with GP100. Signed-off-by: Ben Skeggs commit 344d9c8f35b99bbb893d0e2bce5f41b72f9b5f26 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/core: recognise TU104 Signed-off-by: Ben Skeggs commit cb55cd0c66a16fd965a44e2634755b060dc64bd7 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/kms/nv50-: allow more flexibility with lut formats Will be required for Turing. Signed-off-by: Ben Skeggs commit 5949dd8ee2a4e09926240c7009df95ea6e0a6684 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau: remove left-over struct member Signed-off-by: Ben Skeggs commit 9d24907ccffefc45c7ae53dede30f5bba93a4245 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gv100: return work submission token in channel ctor args The token will also contain runlist ID on Turing, so instead expose it as an opaque value from NVKM so the client doesn't need to care. Signed-off-by: Ben Skeggs commit a98a3c52f81d20d61b43d084ddb724ab55d32526 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gv100: allocate method buffer The GPU saves off some stuff to the address specified in this part of RAMFC when the channel faults, so we should probably point it at a valid address. Signed-off-by: Ben Skeggs commit f7cc47e436c1238031548e0380eecc1ab66f24ba Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gm200-: read pbdma count more directly The trick we used (and still use for older GPUs) doesn't work on Turing. Signed-off-by: Ben Skeggs commit f37a302e67195af7d5a410901c5e8ddbbe895182 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gk104-: virtualise pbdma enable function Turing will require different code. Signed-off-by: Ben Skeggs commit fb80ad15f86f9e7eb510930b1e02dfa86adffa8f Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gk104-: group pbdma functions together We're about to be adding more of them. Signed-off-by: Ben Skeggs commit efa44c664f6aef0a2b94cffd197c501b0965db97 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gk104-: separate runlist building from committing to hw We will need to bash different registers on Turing. Signed-off-by: Ben Skeggs commit 85532bd984d77cef5a59e9cbb73e8161b94017ae Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gk104-: support enabling privileged ce functions Will be used by SVM code to allow direct (without going through MMU) memcpy using the GPU copy engines. Signed-off-by: Ben Skeggs commit 86b442d74c333936a3085354d8c8d73ab21863ad Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gk104-: return channel instance in ctor args Will be used to match fault buffer entries with a channel. Signed-off-by: Ben Skeggs commit 302daab1a7b1206d33a9191d5b42ce606ed46e21 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fifo/gf100-: call into BAR to reset BARs after MMU fault This is needed for Turing, but we're supposed to wait for completion after re-writing the value on older GPUs anyway. Signed-off-by: Ben Skeggs commit 03da9faae1562746e85f1a5e94e4c50a3b85b6b5 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/disp/gv100: fix name of window channels in debug output Signed-off-by: Ben Skeggs commit 729eba3355674f2d9524629b73683ba1d1cd3f10 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/mmu: add more general vmm free/node handling functions Aside from being a nice cleanup, these will to allow the upcoming direct page mapping interfaces to play nicely with normal mappings. Signed-off-by: Ben Skeggs commit 3968d6920bf3fef56eab1f21e71d135ef43e7b88 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fault: add explicit control over fault buffer interrupts The GPU will continually fire interrupts while a fault buffer GET != PUT, and to stop the spurious interrupts while the handler does its thing, we were disabling the fault buffer temporarily. This is not actually a great idea to begin with, and made worse by Volta resetting GET/PUT when it's reactivated. So, let's not do that. Signed-off-by: Ben Skeggs commit 809724560f3403c2bc15a40cbe4efd55764ae8e2 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fault: store get/put pri address in nvkm_fault_buffer Will allow more shared fault buffer handling code between Pascal/Volta. Signed-off-by: Ben Skeggs commit 4d326469d98a9ea64d20a34ad064ada04a0891fb Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/fault: remove manual mapping of fault buffers into BAR2 Signed-off-by: Ben Skeggs commit 1786bf56e4180dfd6a51929230e60d11b899032e Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/imem/nv50: support pinning objects in BAR2 and returning address Various structures are accessed by the GPU through BAR2 for some reason on newer GPUs. This commit makes it more convenient to handle. Will be used for GP100- fault buffers, and GV100- fault method buffers. Signed-off-by: Ben Skeggs commit e4f90a35c9668f8d0469a0160482b1856d07c2b5 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/tmr: detect stalled gpu timer and break out of waits Signed-off-by: Ben Skeggs commit a31e24a781bc0cb60ec43499673ef49460597fec Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/devinit/gm200-: export function to upload+execute PMU/PRE_OS Will be used for Turing. Signed-off-by: Ben Skeggs commit 7919faab51e616e1e1aaa6709ea18fb488603eb4 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bios: translate USB-C connector type Signed-off-by: Ben Skeggs commit 2d5257b73e1ac97e1ead4328940cd10d8b4956ee Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/bios: translate additional memory types Signed-off-by: Ben Skeggs commit 936a1678f3f8b3c918185f0c5ba3a03ccedfb8d5 Author: Ben Skeggs Date: Tue Dec 11 14:50:02 2018 +1000 drm/nouveau/core: support multiple nvdec instances Turing GPUs can have more than one. Signed-off-by: Ben Skeggs commit 3c7fc252b3fab080db110057d2d6d8c9a56d349b Author: Lyude Paul Date: Thu Jul 12 13:13:52 2018 -0400 drm/nouveau/drm/nouveau: Don't forget to label dp_aux devices This makes debugging with DP tracing a lot harder to interpret, so name each i2c based off the name of the encoder that it's for Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit b89fdf7ae8500feae1100d8b283176a44d31d698 Author: Lyude Paul Date: Wed Nov 14 20:39:51 2018 -0500 drm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume() We need to actually make sure we check this on resume since otherwise we won't know whether or not the topology is still there once we've resumed, which will cause us to still think the topology is connected even after it's been removed if the removal happens mid-suspend. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs Signed-off-by: Ben Skeggs commit 6f5521da028c7905ce292a60184ffd64abddad8e Author: Lyude Paul Date: Wed Sep 19 13:13:52 2018 -0400 drm/nouveau: Add size to vbios.rom file in debugfs With this, nvbios /sys/kernel/debug/dri/*/vbios.rom now works! Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit 67287964dae3aae65ec006f15c094936f0146812 Author: Lyude Paul Date: Wed Sep 19 13:13:51 2018 -0400 drm/nouveau: Add strap_peek to debugfs Since we already expose the vbios.rom file here, why not also expose the strap_peek? Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs commit 167e63702d090b831c513d726b11a412b70aab09 Author: Arnd Bergmann Date: Mon Dec 10 21:47:59 2018 +0100 ARM: imx: fix dependencies on imx7ulp The i.MX7D configuration was reworked, but that change did not get propagated into the newly added i.MX7ULP, which now produces a Kconfig warning: WARNING: unmet direct dependencies detected for HAVE_ARM_ARCH_TIMER Depends on [n]: CPU_V7 [=n] Selected by [y]: - SOC_IMX7ULP [=y] && ARCH_MXC [=y] && (ARCH_MULTI_V7 [=n] || ARM_SINGLE_ARMV7M [=y]) Change it to work the same way as i.MX7D. Fixes: 1a1f919eb52e ("ARM: imx: Provide support for NXP i.MX7D Cortex-M4") Fixes: de70d0e9d43d ("ARM: imx: add initial support for imx7ulp") Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 5903195605287681f55094bbcdf8711ea109969b Author: Lukasz Luba Date: Wed Dec 5 12:05:54 2018 +0100 PM / devfreq: add devfreq_suspend/resume() functions This patch adds implementation for global suspend/resume for devfreq framework. System suspend will next use these functions. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Signed-off-by: Lukasz Luba Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit 83f8ca45afbf041e312909f442128b99657d90b7 Author: Lukasz Luba Date: Wed Dec 5 12:05:53 2018 +0100 PM / devfreq: add support for suspend/resume of a devfreq device The patch prepares devfreq device for handling suspend/resume functionality. The new fields will store needed information during this process. Devfreq framework handles opp-suspend DT entry and there is no need of modyfications in the drivers code. It uses atomic variables to make sure no race condition affects the process. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Signed-off-by: Lukasz Luba Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham commit 633141721b5bfce7017033a767208af591134b8f Author: Lukasz Luba Date: Wed Dec 5 12:05:52 2018 +0100 PM / devfreq: refactor set_target frequency function The refactoring is needed for the new client in devfreq: suspend. To avoid code duplication, move it to the new local function devfreq_set_target. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba Signed-off-by: MyungJoo Ham commit addb0679839a1f74da6ec742137558be244dd0e9 Merge: 8cc196d6ef86b aa570ff4fd368 Author: David S. Miller Date: Mon Dec 10 18:00:43 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-12-11 The following pull-request contains BPF updates for your *net-next* tree. It has three minor merge conflicts, resolutions: 1) tools/testing/selftests/bpf/test_verifier.c Take first chunk with alignment_prevented_execution. 2) net/core/filter.c [...] case bpf_ctx_range_ptr(struct __sk_buff, flow_keys): case bpf_ctx_range(struct __sk_buff, wire_len): return false; [...] 3) include/uapi/linux/bpf.h Take the second chunk for the two cases each. The main changes are: 1) Add support for BPF line info via BTF and extend libbpf as well as bpftool's program dump to annotate output with BPF C code to facilitate debugging and introspection, from Martin. 2) Add support for BPF_ALU | BPF_ARSH | BPF_{K,X} in interpreter and all JIT backends, from Jiong. 3) Improve BPF test coverage on archs with no efficient unaligned access by adding an "any alignment" flag to the BPF program load to forcefully disable verifier alignment checks, from David. 4) Add a new bpf_prog_test_run_xattr() API to libbpf which allows for proper use of BPF_PROG_TEST_RUN with data_out, from Lorenz. 5) Extend tc BPF programs to use a new __sk_buff field called wire_len for more accurate accounting of packets going to wire, from Petar. 6) Improve bpftool to allow dumping the trace pipe from it and add several improvements in bash completion and map/prog dump, from Quentin. 7) Optimize arm64 BPF JIT to always emit movn/movk/movk sequence for kernel addresses and add a dedicated BPF JIT backend allocator, from Ard. 8) Add a BPF helper function for IR remotes to report mouse movements, from Sean. 9) Various cleanups in BPF prog dump e.g. to make UAPI bpf_prog_info member naming consistent with existing conventions, from Yonghong and Song. 10) Misc cleanups and improvements in allowing to pass interface name via cmdline for xdp1 BPF example, from Matteo. 11) Fix a potential segfault in BPF sample loader's kprobes handling, from Daniel T. 12) Fix SPDX license in libbpf's README.rst, from Andrey. ==================== Signed-off-by: David S. Miller commit fb7255a923115188ac134bb562d1c44f4f3a413b Author: Vadim Pasternak Date: Thu Nov 15 17:27:00 2018 +0000 platform/x86: mlx-platform: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit 52675da1d087f009b59d2808b1a7363c9ab2c6e7 Author: Vadim Pasternak Date: Thu Nov 15 17:26:59 2018 +0000 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add documentation for the new attributes for systems of type MQM87xx, MSN34xx, MSN37xx. It includes the attributes related to ComEx resets, system platform reset, JTAG interface enabling, additional CPLD device. All the above system are equipped with ComEX board, have JTAG selector and extra CPLD. Signed-off-by: Vadim Pasternak [dvhart: Change kernel version from 5.0 to 4.21 until we know for sure] Signed-off-by: Darren Hart (VMware) commit e2883859dd0b4ee6fc70151e417fed8680efaa4b Author: Vadim Pasternak Date: Thu Nov 15 17:26:58 2018 +0000 platform/x86: mlx-platform: Allow mlxreg-io driver activation for new systems Allow mlxreg-io platform driver activation for the next generation systems, in particular for MQM87xx, MSN34xx, MSN37xx types, which have: - extended reset causes bits related to ComEx reset, voltage devices firmware upgrade, system platform reset; - additional CPLD device; - JTAG select capability; Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit 440f343df1996302d9a3904647ff11b689bf27bc Author: Vadim Pasternak Date: Thu Nov 15 17:26:57 2018 +0000 platform/x86: mlx-platform: Fix LED configuration Exchange LED configuration between msn201x and next generation systems types. Bug was introduced when LED driver activation was added to mlx-platform. LED configuration for the three new system MQMB7, MSN37, MSN34 was assigned to MSN21 and vice versa. This bug affects MSN21 only and likely requires backport to v4.19. Fixes: 1189456b1cce ("platform/x86: mlx-platform: Add LED platform driver activation") Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit edd45cba5ed7f53974475ddc9a1453c2c87b3328 Author: Vadim Pasternak Date: Thu Nov 15 17:26:56 2018 +0000 platform/x86: mlx-platform: Fix tachometer registers Shift by one the registers for tachometers (7 - 12). This fix is relevant for the same new systems MQMB7, MSN37, MSN34, which are about to be released to the customers. At the moment, none of them is at customers sites. The customers will not suffer from this change. This fix is necessary, because register used before for tachometer 7 has been than reserved for the second PWM for newer systems, which are not supported yet in mlx-platform driver. So registers of tachometers 7-12 have been shifted by one. Fixes: 0378123c5800 ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation") Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit 3752e5c764b4fb1abe43c78f635bf019c8e98db2 Author: Vadim Pasternak Date: Thu Nov 15 17:26:55 2018 +0000 platform/x86: mlx-platform: Rename new systems product names Rename product names for next generation systems QMB7, SN37, SN34 to respectively MQMB7, MSN37, MSN34. All these systems are about to be released to the customers. At the moment, none of them is at customers sites. The customers will not suffer from this change. The names have been changed due to marketing decision. Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit 59e96ec85e8e59170f6d5cba028e199a2e5dfe67 Author: Vadim Pasternak Date: Thu Nov 15 17:26:54 2018 +0000 platform/x86: mlx-platform: Add definitions for new registers Add definitions for new registers: - CPLD3 version - next generation systems are equipped with three CPLD; - Two reset cause registers, which store the system reset reason (like system failures, upgrade failures and so on; Signed-off-by: Vadim Pasternak Signed-off-by: Darren Hart (VMware) commit 8cc196d6ef86bbab01dbf16f6c596cf56aa0839e Author: David Ahern Date: Mon Dec 10 13:54:07 2018 -0800 neighbor: gc_list changes should be protected by table lock Adding and removing neighbor entries to / from the gc_list need to be done while holding the table lock; a couple of places were missed in the original patch. Move the list_add_tail in neigh_alloc to ___neigh_create where the lock is already obtained. Since neighbor entries should rarely be moved to/from PERMANENT state, add lock/unlock around the gc_list changes in neigh_change_state rather than extending the lock hold around all neighbor updates. Fixes: 58956317c8de ("neighbor: Improve garbage collection") Reported-by: Andrei Vagin Reported-by: syzbot+6cc2fd1d3bdd2e007363@syzkaller.appspotmail.com Reported-by: syzbot+35e87b87c00f386b041f@syzkaller.appspotmail.com Reported-by: syzbot+b354d1fb59091ea73c37@syzkaller.appspotmail.com Reported-by: syzbot+3ddead5619658537909b@syzkaller.appspotmail.com Reported-by: syzbot+424d47d5c456ce8b2bbe@syzkaller.appspotmail.com Reported-by: syzbot+e4d42eb35f6a27b0a628@syzkaller.appspotmail.com Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d407c81adae57041ba82577e604e351f36b8afce Merge: 40e020c129cfc 2bb1666369339 Author: Mark Brown Date: Tue Dec 11 01:17:23 2018 +0000 Merge branch 'regulator-4.20' into regulator-linus commit 2a9d92fb3a1282a4659f1bb6d5684018846537b7 Author: Arnd Bergmann Date: Mon Dec 10 21:38:16 2018 +0100 mtd: atmel-quadspi: disallow building on ebsa110 I ran into a link-time error with the atmel-quadspi driver on the EBSA110 platform: drivers/mtd/built-in.o: In function `atmel_qspi_run_command': :(.text+0x1ee3c): undefined reference to `_memcpy_toio' :(.text+0x1ee48): undefined reference to `_memcpy_fromio' The problem is that _memcpy_toio/_memcpy_fromio are not available on that platform, and we have to prevent building the driver there. In case we want to backport this to older kernels: between linux-4.8 and linux-4.20, the Kconfig entry was in drivers/mtd/spi-nor/Kconfig but had the same problem. Link: https://lore.kernel.org/patchwork/patch/812860/ Fixes: 161aaab8a067 ("mtd: atmel-quadspi: add driver for Atmel QSPI controller") Signed-off-by: Arnd Bergmann Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 9049fce897edae50835a8f799d4b05f67a538e9a Author: Uwe Kleine-König Date: Tue Dec 4 09:31:31 2018 +0100 usb: chipidea: imx: allow to configure oc polarity on i.MX25 Up to now the polarity of the over current pin was hard coded to active high. Use the already defined device tree properties to configure polarity on i.MX25, too. In difference to i.MX6/7 use active high behavior if the polarity is unspecified to keep compatibility to existing device trees. Signed-off-by: Uwe Kleine-König Signed-off-by: Peter Chen commit 1bf4743f641d85f32fe3f3a4d8aa01a387549e3e Author: Uwe Kleine-König Date: Tue Dec 4 09:31:30 2018 +0100 usb: chipidea: imx: Warn if oc polarity isn't specified The polarity of the over current detection pin isn't configured on i.MX6/7 if it's unspecified in the device tree. So the actual configuration depends on bootloader behavior which is bad. So encourage users to fix their device tree by issuing a warning in this case. Signed-off-by: Uwe Kleine-König Signed-off-by: Peter Chen commit a82bf696aa39b08c0dfce5569525e61368c6827f Author: Uwe Kleine-König Date: Tue Dec 4 09:31:29 2018 +0100 usb: chipidea: imx: support configuring for active low oc signal The status quo on i.MX6 is that if "over-current-active-high" is specified in the device tree this is configured as expected. If the property is missing polarity isn't changed and so the polarity is kept as setup by the bootloader. Reset default is active high, so active low can only be used with help by the bootloader. On i.MX7 it is similar, but there disabling of over current detection has a similar inconsistency. This patch introduces a new property that allows to explicitly configure for active low over current detection and consistently sets this up. In the absence of an explicit configuration the bit is kept as is. On i.MX7 over current detection is used unless disabled in the device tree. Signed-off-by: Uwe Kleine-König Signed-off-by: Peter Chen commit 4dddb862d3e3438129927bfcce6ee2c2c7064eaf Author: Peter Chen Date: Tue Oct 16 12:30:37 2018 +0800 doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups For USB HSIC, the data and strobe pin needs to be pulled down at default, we consider it as "idle" state. When the USB host is ready to be used, the strobe pin needs to be pulled up, we consider it as "active" state. Signed-off-by: Peter Chen commit 2c4593ecc920b6f3c148f2d123a5c6aa2f1f3e73 Author: Peter Chen Date: Tue Oct 16 10:11:42 2018 +0800 usb: chipidea: host: override ehci->hub_control The chipidea controller has some special requirements during suspend/resume, override common ehci->hub_control to implement it. Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peter Chen commit 7c8e8909417eb6342ac487dc5ab3076d46718f71 Author: Peter Chen Date: Tue Oct 16 09:17:02 2018 +0800 usb: chipidea: imx: add HSIC support To support imx HSIC, there are some special requirement: - The HSIC pad is 1.2v, it may need to supply from external - The data/strobe pin needs to be pulled down first, and after host mode is initialized, the strobe pin needs to be pulled up - During the USB suspend/resume, special setting is needed Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peter Chen commit 014abe34a9095daaa6cbb2693ee90bbb54674693 Author: Peter Chen Date: Mon Oct 15 17:02:57 2018 +0800 usb: chipidea: add flag for imx hsic implementation NXP (Freecale) imx HSIC design has some special requirements, add some flags at host code to handle them. Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peter Chen commit dbd08fe59cf8c2f4bad0a72e912913c20db4774e Author: Kuninori Morimoto Date: Tue Dec 4 08:20:13 2018 +0000 ASoC: simple-scu-card: tidyup asoc_simple_card_parse_daifmt() timing Current simple-scu-card driver is parsing codec position for DPCM and consider DAI format. But, current operation is doing totally pointless, because it should be called for each CPU/Codec pair. Let's tidyup asoc_simple_card_parse_daifmt() timing. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4fb7f4df49d37a9a769b6e8ba517e453903142cc Author: Kuninori Morimoto Date: Tue Dec 4 08:19:43 2018 +0000 ASoC: simple-card: use cpu/codec pointer on simple_dai_props In DPCM case, it uses CPU-dummy / dummy-Codec dai links, and non DPCM case, it uses CPU-Codec dai links. Now, we want to merge simple-card and simple-scu-card. These sound cards are using silimar but not same logic on each functions. Then, of course we want to share same logic. To compromise, this patch uses cpu/codec pointer on simple-card. It is same logic with simple-scu-card, thus easy merging. This is prepare for merging audio card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit b7934ba4147a883f7a1b32c6408179274a4d6ed1 Author: Jens Axboe Date: Mon Dec 10 15:45:53 2018 -0700 dm: fix inflight IO check After switching to percpu inflight counters, the inflight check is totally buggy. It's perfectly valid for some counters to be non-zero while having a total inflight IO count of 0, that's how these kinds of counters work (inc on one CPU, dec on another). Fix the md_in_flight() check to sum all counters before returning a false positive, potentially. While at it, remove the inflight read for IO completion. We don't need it, just wake anyone that's waiting for the IO count to drop to zero. The caller needs to re-check that value anyway when woken, which it does. Fixes: 6f75723190d8 ("dm: remove the pending IO accounting") Acked-by: Mike Snitzer Reported-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2b320e046495e6cf02d1f0b1abf07042ac5635ea Author: Arnd Bergmann Date: Mon Dec 10 21:46:10 2018 +0100 ASoC: simple-card-utils: fix build warning without CONFIG_OF When CONFIG_OF is disabled, of_graph_parse_endpoint() does not initialize 'info', and gcc can see that: sound/soc/generic/simple-card-utils.c: In function 'asoc_simple_card_parse_graph_dai': sound/soc/generic/simple-card-utils.c:284:13: error: 'info.port' may be used uninitialized in this function [-Werror=maybe-uninitialized] It's probably best to check the return code anyway, and that also takes care of the warning. Fixes: b6f3fc005a2c ("ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting") Signed-off-by: Arnd Bergmann Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 93698321f72cb351ae6ab59185b611ba26e6e1d0 Merge: d8ed257f313f6 69bd48404f251 Author: David S. Miller Date: Mon Dec 10 17:06:58 2018 -0800 Merge tag 'mlx5e-updates-2018-12-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed: ==================== mlx5e-updates-2018-12-10 (gre) This patch set adds GRE offloading support to Mellanox ethernet driver. Patches 1-5 replace the existing egdev mechanism with the new TC indirect block binds mechanism that was introduced by Netronome: 7f76fa36754b ("net: sched: register callbacks for indirect tc block binds") Patches 6-9 add GRE offloading support along with some required refactoring work. Patch 10, Add netif_is_gretap()/netif_is_ip6gretap() - Changed the is_gretap_dev and is_ip6gretap_dev logic from structure comparison to string comparison of the rtnl_link_ops kind field. Patch 11, add GRE offloading support to mlx5. Patch 12 removes the egdev mechanism from TC as it is no longer used by any of the drivers. ==================== Signed-off-by: David S. Miller commit e9dc919043c56dccedce93fe402e6c94423a70b0 Author: Arnd Bergmann Date: Mon Dec 10 21:49:28 2018 +0100 ASoC: sdm845: add rt5663 codec select Calling into the codec driver adds a dependency on that being reachable from the module: ERROR: "rt5663_sel_asrc_clk_src" [sound/soc/qcom/snd-soc-sdm845.ko] undefined! Add the corresponding select statement, as it is done in the other user (Intel). Fixes: f7485875a687 ("ASoC: sdm845: Add configuration for headset codec") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown commit 2b96edb570709d6ca2e06842941c4bdf04b55f47 Author: Linus Walleij Date: Thu Dec 6 13:43:51 2018 +0100 regulator: s2mps11: Hand over GPIO to regulator core The GPIO descriptors used by the S2MPS11 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 870311e52bbf53838df937a5099ec92a657c1db5 Author: Linus Walleij Date: Thu Dec 6 13:43:50 2018 +0100 regulator: tps65090: Hand over GPIO to regulator core The GPIO descriptors used by the TPS65090 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 1f5163fcf1523e2890d3e8909daed777661765ab Author: Linus Walleij Date: Thu Dec 6 13:43:49 2018 +0100 regulator: s5m8767: Hand over GPIO to regulator core The GPIO descriptors used by the S5M8767 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit b23328d76dba826265f4b0fc625280865eec9782 Author: Linus Walleij Date: Thu Dec 6 13:43:48 2018 +0100 regulator: da9211: Hand over GPIO to regulator core The GPIO descriptors used by the DA9211 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 48bd226f0ab3b91a837213cbfa15319f377effad Author: Linus Walleij Date: Thu Dec 6 13:43:47 2018 +0100 regulator: max8973: Let core handle GPIO descriptor The probe path of this driver is a bit complex: sometimes the GPIO descriptor is passed to the regulator core, sometimes it is not. To handle it in a simple way: stick with the devm_* resource management and unhinge the GPIO descriptor devres handling right before passing it to the regulator core, if we pass it to the regulator core. Fixes: e7d2be696faa ("regulator: max8973: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 891ddbc79a61eb5b919cf56202ecaf7259878cb2 Author: Linus Walleij Date: Thu Dec 6 13:43:46 2018 +0100 gpio: Add devm_gpiod_unhinge() This adds a function named devm_gpiod_unhinge() that removes the resource management from a GPIO descriptor. I am not sure if this is the best anglosaxon name for the function, no other managed resources have an equivalent currently, but I chose "unhinge" as the closest intuitive thing I could imagine that fits Rusty Russell's API design criterions "the obvious use is the correct one" and "the name tells you how to use it". The idea came out of a remark from Mark Brown that it should be possible to handle over management of a resource from devres to the regulator core, and indeed we can do that. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit cb28ee388e465a956b05ada682f9ef90e776a9b7 Author: Linus Walleij Date: Thu Dec 6 13:43:45 2018 +0100 gpio: devres: Handle nonexclusive GPIOs When we get a nonexeclusive GPIO descriptor using managed resources, we should only add it to the list of managed resources once: on the first user. Augment the devm_gpiod_get_index() and devm_gpiod_get_from_of_node() calls to account for this by checking if the descriptor is already resource managed before we proceed to allocate a new resource management struct. Fixes: b0ce7b29bfcd ("regulator/gpio: Allow nonexclusive GPIO access") Reported-by: Marek Szyprowski Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit ec757001c818c175e6b610e8ef80c2a25d1ed1a5 Author: Linus Walleij Date: Thu Dec 6 13:43:44 2018 +0100 gpio: Enable nonexclusive gpiods from DT nodes This makes gpiod_get_from_of_node() respect the GPIOD_FLAGS_BIT_NONEXCLUSIVE flag which is especially nice when getting regulator GPIOs right out of device tree nodes. Suggested-by: Marek Szyprowski Fixes: b0ce7b29bfcd ("regulator/gpio: Allow nonexclusive GPIO access") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit d03c63dbcaa1ee570d0435a7f79c7083ffb59245 Author: Linus Walleij Date: Thu Dec 6 13:43:43 2018 +0100 regulator: max77686: Let core handle GPIO descriptor Use the gpiod_get_from_of_node() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fix up the errorpath so that we free this descriptor if an error occurs in the callback. Rely on the regulator core to deal with it after this point: a previous patch fixed up the regulator core to properly dispose any GPIO descriptors once you call regulator_register(). Fixes: 96392c3d8ca4 ("regulator: max77686: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit fe6c473e3e41114301bfbf5710be56bf0eb233dc Author: Linus Walleij Date: Thu Dec 6 13:43:42 2018 +0100 gpio: Export gpiod_get_from_of_node() This function already exist inside gpiolib, we were just reluctant to make it available to the kernel at large as the devm_* seemed to be enough for anyone. However we found out that regulators need to do their own lifecycle/refcounting on GPIO descriptors and explicitly call gpiod_put() when done with a descriptor, so export this function so we can hand the refcounting over to the regulator core for these descriptors after retrieveal. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 894077d5c871f86e6c88a70ac016b6811a910b23 Author: Linus Walleij Date: Thu Dec 6 13:43:41 2018 +0100 regulator: max8952: Let core handle GPIO descriptor Use the gpiod_get() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: d7a261c2d1f2 ("regulator: max8952: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 2bb8ede0b14187c19b5eedc62cf0b18b3bf00d3b Author: Linus Walleij Date: Thu Dec 6 13:43:40 2018 +0100 regulator: lp8788-ldo: Let core handle GPIO descriptor Use the gpiod_get() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: 2468f0d51548 ("regulator: lp8788-ldo: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit e8a33aa0e3bc22134bf2bf3ca6339d6a1b7ffe16 Author: Linus Walleij Date: Thu Dec 6 13:43:39 2018 +0100 regulator: lm363x: Let core handle GPIO descriptor Use the gpiod_get() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: b2d751b7f69b ("regulator: lm363x: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 5e6f3ae5c13b12ecd440da2f511fc5fd3c8de520 Author: Linus Walleij Date: Thu Dec 6 13:43:38 2018 +0100 regulator: fixed: Let core handle GPIO descriptor Use the gpiod_get() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 0edb040d416ab350c02ac710233349aeaf8c2a26 Author: Linus Walleij Date: Thu Dec 6 13:43:37 2018 +0100 regulator: core: Track dangling GPIO descriptors If a GPIO descriptor is passed to the regulator_register() function inside the config->ena_gpiod callers must be sure that once they call this API the regulator core owns that descriptor and will make sure to issue gpiod_put() on it, no matter whether the call is successful or not. For device tree regulators, the regulator core will automatically set up regulator init data from the device tree when registering a regulator by calling regulator_of_get_init_data() which in turn calls down to the regulator driver's .of_parse_cb() callback. This callback (in drivers such as for max77686) may also choose to fill in the config->ena_gpiod field with a GPIO descriptor. Harden the errorpath of regulator_register() to properly gpiod_put() any passed in cfg->ena_gpiod or any gpiod coming from the device tree on any type of error. Signed-off-by: Linus Walleij Reviewed-by: Marek Szyprowski Tested-by: Marek Szyprowski Reviewed-by: Charles Keepax Signed-off-by: Mark Brown commit 3d9cbe37c16ffd19eeab6b49a0311bbb999627d8 Author: Andy Shevchenko Date: Mon Jun 11 16:47:21 2018 +0300 libnvdimm, namespace: Replace kmemdup() with kstrndup() kstrndup() takes care of '\0' terminator for the strings. Use it here instead of kmemdup() + explicit terminating the input string. Signed-off-by: Andy Shevchenko Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 9065ed1281a57f8cf84695b4a1e86ee9bd586b01 Author: Andy Shevchenko Date: Thu Aug 30 13:32:07 2018 +0300 libnvdimm, label: Switch to bitmap_zalloc() Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko Reviewed-by: Johannes Thumshirn Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 69bd48404f251b9c45a15799fdcfc87a7ad6ab8a Author: Oz Shlomo Date: Tue Nov 6 09:58:37 2018 +0200 net/sched: Remove egdev mechanism The egdev mechanism was replaced by the TC indirect block notifications platform. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Jiri Pirko Cc: John Hurley Cc: Jakub Kicinski Signed-off-by: Saeed Mahameed commit df2ef3bff193229973830fd3fd8acf29fa92715e Author: Oz Shlomo Date: Mon Oct 29 08:54:42 2018 +0200 net/mlx5e: Add GRE protocol offloading Add HW offloading support for TC flower filters configured on gretap/ip6gretap net devices. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 0621e6fc5ed2b6e58a2ba6904074e366f290b1d8 Author: Oz Shlomo Date: Wed Nov 21 12:15:34 2018 +0200 net: Add netif_is_gretap()/netif_is_ip6gretap() Changed the is_gretap_dev and is_ip6gretap_dev logic from structure comparison to string comparison of the rtnl_link_ops kind field. This approach aligns with the current identification methods and function names of vxlan and geneve network devices. Convert mlxsw to use these helpers and use them in downstream mlx5 patch. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Ido Schimmel Signed-off-by: Saeed Mahameed commit 101f4de9dd521c6d06dfdacaa35e506a8db8494b Author: Oz Shlomo Date: Sun Dec 2 14:43:27 2018 +0200 net/mlx5e: Move TC tunnel offloading code to separate source file Move tunnel offloading related code to a separate source file for better code maintainability. Code refactoring with no functional change. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 54c177ca9c6efe5df516eefb886761b89a82eaf0 Author: Oz Shlomo Date: Wed Nov 14 15:21:27 2018 +0200 net/mlx5e: Branch according to classified tunnel type Currently the tunnel offloading encap/decap methods assumes that VXLAN is the sole tunneling protocol. Lay the infrastructure for supporting multiple tunneling protocols by branching according to the tunnel net device kind. Encap filters tunnel type is determined according to the egress/mirred net device. Decap filters classify the tunnel type according to the filter's ingress net device kind. Distinguish between the tunnel type as defined by the SW model and the FW reformat type that specifies the HW operation being made. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 4d70564d1c9e812b83f30c8dc23cd506abfcfc08 Author: Oz Shlomo Date: Wed Nov 14 15:41:50 2018 +0200 net/mlx5e: Refactor VXLAN tunnel decap offloading code Separates the vxlan header match handling from the matching on the general fields of ipv4/6 tunnels, thus allowing the common IP tunnel match code to branch in down stream patch, to multiple IP tunnels. This patch doesn't add any functionality. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit ea7162ac3a33a44a7bb0b5793057015d25617e68 Author: Oz Shlomo Date: Wed Nov 14 15:41:50 2018 +0200 net/mlx5e: Refactor VXLAN tunnel encap offloading code Separates the vxlan header encap logic from the general ipv4/6 encapsulation methods, thus allowing the common IP encap/decap code to branch in downstream patch to multiple IP tunnels. Code refactoring with no functional change. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit ef381359e3a81422cee85ddee1f7dc3ac90f3c38 Author: Oz Shlomo Date: Sun Oct 28 13:03:54 2018 +0200 net/mlx5e: Replace egdev with indirect block notifications Use TC indirect block notifications to offload filters that are configured on higher level device interfaces (e.g. tunnel devices). This mechanism replaces the current egdev implementation. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit d11afc2600377c6775abcbc1fd410f199c5bf458 Author: Oz Shlomo Date: Sun Oct 28 10:46:34 2018 +0200 net/mlx5e: Propagate the filter's net device to mlx5e structures Propagate the filter's net_device parameter to the tc flower parsed attributes structure so that it can later be used in tunnel decap offloading sequences. Pre-step for replacing egdev logic with the indirect block notification mechanism. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 71d82d2a90327c9c816e65471b7859b601993f89 Author: Oz Shlomo Date: Sun Oct 28 09:14:50 2018 +0200 net/mlx5e: Provide the TC filter netdev as parameter to flower callbacks Currently the driver controls flower filters that are installed on its devices. However, with the introduction of the indirect block notifications platform the driver may receive control events for filters that are installed on higher level net devices (e.g. tunnel devices). Therefore, the driver filter control API will not be able to implicitly assume the filter's net device. Explicitly specify the filter's net device, no functional change Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit f5bc2c5de1015caf7e49b0bf9e7e97077736045a Author: Oz Shlomo Date: Sun Oct 28 08:34:51 2018 +0200 net/mlx5e: Support TC indirect block notifications for eswitch uplink reprs Towards using this mechanism as the means to offload tunnel decap rules set on SW tunnel devices instead of egdev, add the supporting structures and functions. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit ec1366c20721157cc2d077e84d2a062f93175ce5 Author: Oz Shlomo Date: Thu Oct 25 21:51:11 2018 +0300 net/mlx5e: Store eswitch uplink representor state on a dedicated struct Currently only a single field in the representor private structure is relevant for uplink representors. As a pre-step to allow adding additional uplink representor fields, introduce uplink representor private structure. This is prepration step towards replacing egdev logic with the indirect block notification mechanism. This patch doesn't change any functionality. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Acked-by: Or Gerlitz Signed-off-by: Saeed Mahameed commit 2f62747c77e2e5a8acb720aaec9ee4860d55118f Merge: d8ed257f313f6 6c22a11957f46 Author: Saeed Mahameed Date: Mon Dec 10 15:43:47 2018 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux mlx5-next shared branch with rdma subtree to avoid mlx5 rdma v.s. netdev conflicts. Highlights: 1) RDMA ODP (On Demand Paging) improvements and moving ODP logic to mlx5 RDMA driver 2) Improved mlx5 core driver and device events handling and provided API for upper layers to subscribe to device events. 3) RDMA only code cleanup from mlx5 core 4) Add helper to get CQE opcode 5) Rework handling of port module events 6) shared mlx5_ifc.h updates to avoid conflicts Signed-off-by: Saeed Mahameed commit fc979933bcf162595b6004d0de4effb64c323152 Author: Biju Das Date: Fri Dec 7 11:27:44 2018 +0000 rtc: pcf85363: Add support for NXP pcf85263 rtc Add support for NXP pcf85263 real-time clock. pcf85263 rtc is compatible with pcf85363,except that pcf85363 has additional 64 bytes of RAM. 1 byte of nvmem is supported and exposed in sysfs (# is the instance number,starting with 0): /sys/bus/nvmem/devices/pcf85x63-#/nvmem Signed-off-by: Biju Das Signed-off-by: Alexandre Belloni commit bae5e94bea188e652d798eeb4b92b88a355591f6 Author: Biju Das Date: Fri Dec 7 11:27:43 2018 +0000 dt-bindings: rtc: pcf85363: Document pcf85263 real-time clock The pcf85263 RTC is compatible with the pcf85363 RTC. The difference between the pcf85263 and pcf85363 RTC is that the latter has 64 bytes more RAM. This renders them incompatible from a DT point of view. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Alexandre Belloni commit ecb4a353d3afd45b9bb30c85d03ee113a0589079 Author: Baruch Siach Date: Wed Dec 5 17:00:09 2018 +0200 rtc: pcf8523: don't return invalid date when battery is low The RTC_VL_READ ioctl reports the low battery condition. Still, pcf8523_rtc_read_time() happily returns invalid dates in this case. Check the battery health on pcf8523_rtc_read_time() to avoid that. Reported-by: Erik Čuk Signed-off-by: Baruch Siach Signed-off-by: Alexandre Belloni commit 9f619d4769a22b1c2f9d8687adbbe4baae12c375 Author: Ocean He Date: Tue Aug 7 02:15:31 2018 -0400 ACPI/nfit: Adjust annotation for why return 0 if fail to find NFIT at start Add detailed explanation for why it's ok to return 0 if we fail to find an NFIT at startup. Refer to chapter 9.20.2 NVDIMM Root Device in ACPI 6.2 spec. Signed-off-by: Ocean He Reviewed-by: Vishal Verma Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 9bf3aa44644721b287724ecac835d38f1dae4e2d Author: Ocean He Date: Fri Aug 3 08:08:33 2018 -0400 libnvdimm, bus: Check id immediately following ida_simple_get The id check was not executed immediately following ida_simple_get. Just change the codes position, without function change. Signed-off-by: Ocean He Reviewed-by: Vishal Verma Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2cb5e4743ab52d3a43ef25f229f6770fd9ca0065 Author: Lubomir Rintel Date: Mon Dec 3 12:47:36 2018 +0100 dt-bindings: rtc: use a generic node name for ds1307 The example should follow the practice or using a generic node name instead of the precise programming model, as recommended by the DTSpec. Signed-off-by: Lubomir Rintel Signed-off-by: Alexandre Belloni commit aa570ff4fd3682d35cdcc5190c380e6c4d7d08e2 Merge: 7a5725ddc6e18 cfc542411bd40 Author: Alexei Starovoitov Date: Mon Dec 10 14:51:45 2018 -0800 Merge branch 'rename-info_cnt-to-nr_info' Yonghong Song says: ==================== Before func_info and line_info are added to the kernel, there are several fields in structure bpf_prog_info specifying the "count" of a user buffer, e.g., __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; The naming convention has the prefix "nr_". The func_info and line_info support added several fields __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; to indicate the "count" of buffers func_info, line_info and jited_line_info. The original intention is to keep the field names the same as those in structure bpf_attr, so it will be clear that the "count" returned to user space will be the same as the one passed to the kernel during prog load. Unfortunately, the field names *_info_cnt are not consistent with other existing fields in bpf_prog_info. This patch set renamed the fields *_info_cnt to nr_*_info to keep naming convention consistent. ==================== Signed-off-by: Alexei Starovoitov commit cfc542411bd40ff4f8a70b3d061bd6acdfb05629 Author: Yonghong Song Date: Mon Dec 10 14:14:10 2018 -0800 tools/bpf: rename *_info_cnt to nr_*_info Rename all occurances of *_info_cnt field access to nr_*_info in tools directory. The local variables finfo_cnt, linfo_cnt and jited_linfo_cnt in function do_dump() of tools/bpf/bpftool/prog.c are also changed to nr_finfo, nr_linfo and nr_jited_linfo to keep naming convention consistent. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit b4f8623c0cefdfb818f99b3eb3c1e4c7708dd84e Author: Yonghong Song Date: Mon Dec 10 14:14:09 2018 -0800 tools/bpf: sync kernel uapi bpf.h to tools directory Sync kernel uapi bpf.h "*_info_cnt => nr_*_info" changes to tools directory. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 11d8b82d2222cade12caad2c125f23023777dcbc Author: Yonghong Song Date: Mon Dec 10 14:14:08 2018 -0800 bpf: rename *_info_cnt to nr_*_info in bpf_prog_info In uapi bpf.h, currently we have the following fields in the struct bpf_prog_info: __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; The above field names "func_info_cnt" and "line_info_cnt" also appear in union bpf_attr for program loading. The original intention is to keep the names the same between bpf_prog_info and bpf_attr so it will imply what we returned to user space will be the same as what the user space passed to the kernel. Such a naming convention in bpf_prog_info is not consistent with other fields like: __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; This patch made this adjustment so in bpf_prog_info newly introduced *_info_cnt becomes nr_*_info. Acked-by: Song Liu Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 7a5725ddc6e18aab61f647c0996d3b7eb03ff5cb Author: Song Liu Date: Mon Dec 10 11:17:50 2018 -0800 bpf: clean up bpf_prog_get_info_by_fd() info.nr_jited_ksyms and info.nr_jited_func_lens cannot be 0 in these two statements, so we don't need to check them. Signed-off-by: Song Liu Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 0f51659a438eebd84b0b96cb910b67b141653b83 Author: Stephen Boyd Date: Fri Nov 30 12:59:38 2018 -0800 clk: Loongson1: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in the clk init structure and then never tested again. Remove it from this driver as it doesn't provide any benefit. Also remove parenthesis nearby that are not needed and include clk.h to fix a sparse warning about static function definition. Signed-off-by: Stephen Boyd commit f246affc0825cb7c1b4938802d33075afb0ca996 Author: Stephen Boyd Date: Fri Nov 30 12:59:38 2018 -0800 clk: samsung: s3c2410: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in the clk init structure and then never tested again. Remove it from this drivers as it doesn't provide any benefit. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 354e12100665a30537bc816aa1a1607436948677 Author: Stephen Boyd Date: Fri Nov 30 11:07:30 2018 -0800 clk: versatile: sp810: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in the clk init structure and then never tested again. Remove it from this driver as it doesn't provide any benefit. Cc: Linus Walleij Acked-by: Linus Walleij Signed-off-by: Stephen Boyd commit 5a727ff63032dc6cde780f960c6e3f22f8bf2783 Author: Stephen Boyd Date: Fri Nov 30 11:07:30 2018 -0800 clk: hisilicon: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in various clk init structures and then never tested again. Remove it from these drivers as it doesn't provide any benefit. Cc: Jiancheng Xue Cc: Leo Yan Cc: Jianguo Sun Cc: Wei Yongjun Signed-off-by: Stephen Boyd commit c0156e5509e41453adff9b70dc32b92a10b3f185 Author: Stephen Boyd Date: Fri Nov 30 11:07:30 2018 -0800 clk: h8300: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in various clk init structures and then never tested again. Remove it from these drivers as it doesn't provide any benefit. Cc: Yoshinori Sato Cc: Signed-off-by: Stephen Boyd commit 2239fe59ace650bb22345ba6f8ea9bb291bbaacc Author: Stephen Boyd Date: Fri Nov 30 11:07:30 2018 -0800 clk: axm5516: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in various clk init structures and then never tested again. Remove it from these drivers as it doesn't provide any benefit. Cc: Anders Berg Signed-off-by: Stephen Boyd commit c179c21e2c7a83b521984b75505c6bbfed23242a Author: Stephen Boyd Date: Thu Dec 6 10:38:31 2018 -0800 clk: st: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in various clk init structures and then never tested again. Remove it from these drivers as it doesn't provide any benefit. Signed-off-by: Stephen Boyd commit ddbae6658d4dc495ac62f7977062b33bb15d1af6 Author: Stephen Boyd Date: Fri Nov 30 11:05:35 2018 -0800 clk: renesas: Remove usage of CLK_IS_BASIC This flag doesn't look to be used by any code, just set in various clk init structures and then never tested again. Remove it from these drivers as it doesn't provide any benefit. Cc: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Cc: Signed-off-by: Stephen Boyd commit 4014c08ba39476a18af546186da625a6833a1529 Author: Tony Lindgren Date: Mon Dec 10 14:11:26 2018 -0800 bus: ti-sysc: Check for no-reset and no-idle flags at the child level With ti-sysc, we need to now have the device tree properties for ti,no-reset-on-init and ti,no-idle-on-init at the module level instead of the child device level. Let's check for these properties at the child device level to enable quirks, and warn about moving the properties to the module level. Otherwise am335x-evm based boards tagging gpio1 with ti,no-reset-on-init will have their DDR power disabled if wired up in such a tricky way. Note that this should not be an issue for earlier kernels as we don't rely on this until the dts files have been updated to probe with ti-sysc interconnect target driver. Cc: Peter Ujfalusi Reported-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 4f2122473363b569db652dc09029715ad808e1a6 Author: Tony Lindgren Date: Mon Dec 10 14:11:10 2018 -0800 ARM: OMAP2+: Check also the first dts child for hwmod flags Until the board specific dts files are updated to have hwmod flags at the interconnect target module level, we want to keep things working both for old and new dts files. So let's also check the first child for hwmod flags. The module flags are for the whole module, so only the first child should ever have them. Cc: Peter Ujfalusi Reported-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 6c22a11957f46ca7e9b8db20ac7c6b05441c55ed Author: Or Gerlitz Date: Mon Dec 10 13:15:17 2018 -0800 net/mlx5: Remove the get protocol device interface entry This isn't used anywhere across the mlx5 driver stack, remove it. Signed-off-by: Or Gerlitz Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit a2c6162b12f15fbbbe38d0eb3a38186bcfc79c0f Author: Eli Britstein Date: Mon Dec 10 13:15:16 2018 -0800 net/mlx5: Support extended destination format in flow steering command Update the flow steering command formatting according to the extended destination API. Note that the FW dictates that multi destination FTEs that involve at least one encap must use the extended destination format, while single destination ones must use the legacy format. Using extended destination format requires FW support. Check for its capabilities and return error if not supported. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit aa39c2c0e44d16b5804f8fb6b5350cdf4e33b4c3 Author: Eli Britstein Date: Mon Dec 10 13:15:15 2018 -0800 net/mlx5: E-Switch, Change vhca id valid bool field to bit flag Change the driver flow destination struct to use bit flags with the vhca id valid being the 1st one. The flags field is more extendable and will be used in downstream patch. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 1b115498598f25d578cfc0df7b7aea9772bae0a1 Author: Eli Britstein Date: Mon Dec 10 13:15:14 2018 -0800 net/mlx5: Introduce extended destination fields Extended destinations provide the ability to configure different encapsulation properties per destination on a single FTE. This is needed for use-cases such as remote mirroring over tunneled networks. Signed-off-by: Eli Britstein Reviewed-by: Or Gerlitz Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 5886a96ad19dacebe6c4f7f8c001d489b06125dc Author: Oz Shlomo Date: Mon Dec 10 13:15:13 2018 -0800 net/mlx5: Revise gre and nvgre key formats GRE RFC defines a 32 bit key field. NVGRE RFC splits the 32 bit key field to 24 bit VSID (gre_key_h) and 8 bit flow entropy (gre_key_l). Define the two key parsing alternatives in a union, thus enabling both access methods. Signed-off-by: Oz Shlomo Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit fd4572b3ff3ff57ca7fa612f9ea42b90afdd8bff Author: Eyal Davidovich Date: Mon Dec 10 13:15:12 2018 -0800 net/mlx5: Add monitor commands layout and event data Will be used in downstream patch to monitor counter changes by the HCA and report it to the driver by an event. The driver will update its counters cached data accordingly. Signed-off-by: Eyal Davidovich Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 8d6b57e6445989e9f34077ef1aac80b621029b08 Author: Mikhael Goikhman Date: Mon Dec 10 13:15:11 2018 -0800 net/mlx5: Add support for plugged-disabled cable status in PME Support a new hardware module status in port module events: - module_status=0x4 (Cable plugged, but disabled) Signed-off-by: Mikhael Goikhman Signed-off-by: Saeed Mahameed commit 37a12aae06fda00f36eadb168d5d7ba0be3a8c86 Author: Mikhael Goikhman Date: Mon Dec 10 13:15:10 2018 -0800 net/mlx5: Add support for PCIe power slot exceeded error in PME Support a new hardware error type in port module events: - error_type=0xc (PCIe system power slot exceeded) Signed-off-by: Mikhael Goikhman Signed-off-by: Saeed Mahameed commit c2fb3db22d35f01774d0547b1d8e5085df193646 Author: Mikhael Goikhman Date: Mon Dec 10 13:15:09 2018 -0800 net/mlx5: Rework handling of port module events Add explicit HW defined error values. For simplicity, keep counters for all statuses starting from 0, although currently status=0 is not used. Additionally, when HW signals an unexpected cable status, it is reported now rather than ignored. And status counter is now updated on errors. Signed-off-by: Mikhael Goikhman Signed-off-by: Saeed Mahameed commit 4ba09f69e20d0a768d91277847ddbd31f476590e Author: Jens Axboe Date: Mon Dec 10 14:45:19 2018 -0700 mtip32xx: use BLK_STS_DEV_RESOURCE for device resources For cases where we can only fail with IO in-flight, we should be using BLK_STS_DEV_RESOURCE instead of BLK_STS_RESOURCE. The latter refers to system wide resource constraints. Signed-off-by: Jens Axboe commit e4025e46f093d4549d3043c2c54d444cec480d2b Author: Arnd Bergmann Date: Mon Dec 10 22:34:39 2018 +0100 mtip32xx: avoid using semaphores The "cmd_slot_unal" semaphore is never used in a blocking way but only as an atomic counter. Change the code to using atomic_dec_if_positive() as a better API. Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit a07995be61e18a504f37db0169b50de4036fc02d Author: Andy Shevchenko Date: Tue Dec 4 23:23:30 2018 +0200 PM: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 906254441564f27ec360b72d487fbee314481c75 Author: Andy Shevchenko Date: Tue Dec 4 23:23:29 2018 +0200 m68k/mac: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Geert Uytterhoeven Cc: linux-m68k Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni commit 804cfcb98232ee8acfa187cc59d6aec39aa50bdb Author: Andy Shevchenko Date: Tue Dec 4 23:23:28 2018 +0200 Input: hp_sdc_rtc - Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Dmitry Torokhov Signed-off-by: Andy Shevchenko Acked-by: Dmitry Torokhov Signed-off-by: Alexandre Belloni commit d54fb4861666c8259933547841e1a0c04471c4da Author: Andy Shevchenko Date: Tue Dec 4 23:23:27 2018 +0200 rtc: tegra: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Thierry Reding Cc: Jonathan Hunter Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Alexandre Belloni commit 5527842eab2331ed58abf69aa77f5c81e21025e4 Author: Andy Shevchenko Date: Tue Dec 4 23:23:26 2018 +0200 rtc: s5m: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Bartlomiej Zolnierkiewicz Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 9a1bacf4239ec197fe6a04d04ce924a8e6e701ce Author: Andy Shevchenko Date: Tue Dec 4 23:23:25 2018 +0200 rtc: s3c: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 1921cab117237bfe84e22ec3b525e0e075b420c8 Author: Andy Shevchenko Date: Tue Dec 4 23:23:24 2018 +0200 rtc: rx8025: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit a3f60bb35fcad65ad1d727f93fcb19d6d932533b Author: Andy Shevchenko Date: Tue Dec 4 23:23:23 2018 +0200 rtc: rx6110: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 0991e754b99cc262f7dfd5e33390404327446d51 Author: Andy Shevchenko Date: Tue Dec 4 23:23:22 2018 +0200 rtc: rk808: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit b2db0a291ac66a3526a8d9592263d40791b72e50 Author: Andy Shevchenko Date: Tue Dec 4 23:23:21 2018 +0200 rtc: puv3: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Cc: Guan Xuetao Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 4f5ef6eec475cbcef92dd905db195b551fba867d Author: Andy Shevchenko Date: Tue Dec 4 23:23:20 2018 +0200 rtc: pm8xxx: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 93206f9315bba8a1c00fad5d9fe29bdb79938a5b Author: Andy Shevchenko Date: Tue Dec 4 23:23:19 2018 +0200 rtc: pic32: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 8d2e6b22bbc609d08f22d3a63541d978ad729c6d Author: Andy Shevchenko Date: Tue Dec 4 23:23:18 2018 +0200 rtc: pcf50633: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 1481376072460fee7f25f142f3e3dac81651dfb6 Author: Andy Shevchenko Date: Tue Dec 4 23:23:17 2018 +0200 rtc: mcp795: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit ad78343e40cb03f3eb8d713ed67ca8a5941967da Author: Andy Shevchenko Date: Tue Dec 4 23:23:16 2018 +0200 rtc: m48t59: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 22b844ae3318fa4bc097cf24d30b6512f198ebae Author: Andy Shevchenko Date: Tue Dec 4 23:23:15 2018 +0200 rtc: m41t80: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 285166cb8c77a01c510f05003cb38efcd2a66740 Author: Andy Shevchenko Date: Tue Dec 4 23:23:14 2018 +0200 rtc: at91sam9: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit d422f8835d29e1d0f915fe11fbfa61875df3508f Author: Andy Shevchenko Date: Tue Dec 4 23:23:13 2018 +0200 rtc: at91rm9200: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 5548cbf7f148b9a039b19fa4697f1b9beaba2c78 Author: Andy Shevchenko Date: Tue Dec 4 23:23:12 2018 +0200 rtc: Switch to use %ptR Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Note, we drop the validation option. This is only used in a deprecated ABI and is mostly wrong as many RTCs will still be valid after 2100. Cc: Arnd Bergmann Acked-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni commit 4d42c44727a062e233e446c6c86da1c84d762d79 Author: Andy Shevchenko Date: Tue Dec 4 23:23:11 2018 +0200 lib/vsprintf: Print time and date in human readable format via %pt There are users which print time and date represented by content of struct rtc_time in human readable format. Instead of open coding that each time introduce %ptR[dt][r] specifier. Cc: Arnd Bergmann Cc: Bartlomiej Zolnierkiewicz Cc: Dmitry Torokhov Cc: Geert Uytterhoeven Cc: Guan Xuetao Cc: Ingo Molnar Cc: Jason Wessel Cc: Jonathan Corbet Cc: Jonathan Hunter Cc: Krzysztof Kozlowski Cc: "Rafael J. Wysocki" Cc: Thierry Reding Cc: Petr Mladek Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Alexandre Belloni commit 27b4feb7fe373e1ed92b9362b1e33cead271ac84 Author: Stefano Stabellini Date: Mon Dec 3 14:26:09 2018 -0800 devicetree,xen: add xen,shared-memory binding Introduce a device tree binding for Xen reserved-memory regions. They are used to share memory across VMs from the VM config files. (See static_shm config option.) Signed-off-by: Stefano Stabellini Cc: julien.grall@arm.com Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: xen-devel@lists.xen.org Signed-off-by: Rob Herring commit 6e9982918c3fc4f0c4c32c95d1eb0a345baea5f1 Author: Martin Kelly Date: Sun Dec 9 19:14:55 2018 -0800 iio: bmi160: use all devm functions in probe Currently, we're using the devm version of some but not all functions. Switch to the devm version of iio_triggered_buffer_setup and iio_device_register to simplify the code a bit and decrease the chance of bugs. Signed-off-by: Martin Kelly Signed-off-by: Jonathan Cameron commit b422847877e35d6818f65cb359a60f529fe22c4b Author: Fabrizio Castro Date: Thu Nov 8 17:04:41 2018 +0000 mtd: spi-nor: Add support for is25lp016d The is25lp016d is found on the iwg23s from iWave, therefore add driver support for it so that we can upstream board support. Signed-off-by: Fabrizio Castro Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit 816873eaeec63ba2e58bbd514d15a7efc6e572f7 Author: Cyrille Pitchen Date: Thu Dec 6 14:43:39 2018 +0000 mtd: spi-nor: parse SFDP 4-byte Address Instruction Table Add support for SFDP (JESD216B) 4-byte Address Instruction Table. This table is optional but when available, we parse it to get the 4-byte address op codes supported by the memory. Using these op codes is stateless as opposed to entering the 4-byte address mode or setting the Base Address Register (BAR). Flashes that have the 4BAIT table declared can now support SPINOR_OP_PP_1_1_4_4B and SPINOR_OP_PP_1_4_4_4B opcodes. Tested on MX25L25673G. Signed-off-by: Cyrille Pitchen [tudor.ambarus@microchip.com: - rework erase and page program logic, - pass DMA-able buffer to spi_nor_read_sfdp(), - introduce SPI_NOR_HAS_4BAIT - various minor updates.] Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit d05e21e3cfc7f2d4d152c7f8b0738cacdc913cb5 Author: Liu Xiang Date: Wed Nov 14 20:55:18 2018 +0800 mtd: spi-nor: Add 4B_OPCODES flag to is25lp256 The is25lp256 supports 4-byte opcodes and quad output. Suggested-by: Boris Brezillon Signed-off-by: Liu Xiang Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit e9f3a2bcc3742960e28c8d37165406c6c55500b9 Author: Boris Brezillon Date: Thu Dec 6 11:41:20 2018 +0100 mtd: spi-nor: Add an SPDX tag to spi-nor.{c,h} Add SPDX tags to replace the license boiler-plate and fix the MODULE_LICENSE() definition in spi-nor.c to match the license text (GPL v2). Interestingly, spi-nor.h and spi-nor.c do not use the same license (GPL v2+ for spi-nor.h, GPL v2 for spi-nor.c). Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit eb6ec1d79b40badeecea4194547ebd90dc560d5e Author: Boris Brezillon Date: Thu Dec 6 11:41:19 2018 +0100 mtd: spi-nor: Make the enable argument passed to set_byte() a bool No need to use an integer when the value is either true or false. Make it a boolean. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit b296379fef7ce9f96129798825ab04683414313b Author: Boris Brezillon Date: Thu Dec 6 11:41:18 2018 +0100 mtd: spi-nor: Stop passing flash_info around Some functions called from spi_nor_scan() need a flash_info object. Let's assign nor->info early on to avoid passing info as an extra argument to each of these sub-functions. We also stop passing a flash_info object to set_4byte() and use nor->info directly. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit f10aa369d5c2ccfc734e158c0a802009953e8c68 Author: Boris Brezillon Date: Thu Dec 6 11:41:17 2018 +0100 mtd: spi-nor: Avoid forward declaration of internal functions Reorganize the code to kill forward declarations of spi_nor_match_id() macronix_quad_enable() and spi_nor_hwcaps_read2cmd(). Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 87f3ed184d97a76fb8ad3a4eb07d89750307616a Author: Boris Brezillon Date: Thu Dec 6 11:41:16 2018 +0100 mtd: spi-nor: Drop inline on all internal helpers gcc should be smart enough to decide when inlining a function makes sense. Drop all inline specifiers. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 2bffa65da43e399079dad5947c6aa9ab3cfa4ad4 Author: Boris Brezillon Date: Thu Dec 6 11:37:36 2018 +0100 mtd: spi-nor: Add a post BFPT fixup for MX25L25635E MX25L25635F and MX25L25635E share the same JEDEC-ID, but the F variant supports 4-byte opcodes while the E variant doesn't. We need a way to differentiate those 2 chips and set the SNOR_F_4B_OPCODES flag only for the F variant. Luckily, 4-byte opcode support is not the only difference: Fast Read 4-4-4 is only supported by the F variant, and this feature is advertised in the BFPT table. Use this to decide when to set the SNOR_F_4B_OPCODES flag. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 2aaa5f7e0c07a0f14e514ed3b343d66a31dfb300 Author: Boris Brezillon Date: Thu Dec 6 11:37:35 2018 +0100 mtd: spi-nor: Add a post BFPT parsing fixup hook Experience has proven that SFDP tables are sometimes wrong, and parsing of these broken tables can lead to erroneous flash config. This leaves us 2 options: 1/ set the SPI_NOR_SKIP_SFDP flag and completely ignore SFDP parsing 2/ fix things at runtime While #1 should always work, it might imply extra work if most of the SFDP is correct. #2 has the benefit of keeping the generic SFDP parsing logic almost untouched while allowing SPI NOR manufacturer drivers to fix the broken bits. Add a spi_nor_fixups struct where we'll put all our fixup hooks, each of them being called at a different point in the scan process. We start a hook called just after the BFPT parsing to allow fixing up info extracted from the BFPT section. More hooks will be added if other sections need to be fixed. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 548ed6847f5303e4f33ecd6de5670cac15bfe6ac Author: Boris Brezillon Date: Thu Dec 6 11:37:34 2018 +0100 mtd: spi-nor: Add the SNOR_F_4B_OPCODES flag Some flash_info entries have the SPI_NOR_4B_OPCODES flag set to let the core know that the flash supports 4B opcode. While this solution works fine for id-based caps detection, it doesn't work that well when relying on SFDP-based caps detection. Let's add an SNOR_F_4B_OPCODES flag so that the SFDP parsing code can set it when appropriate. Signed-off-by: Boris Brezillon Reviewed-by: Tudor Ambarus commit 84a1c2109d23df3543d96231c4fee1757299bb1a Author: huijin.park Date: Wed Nov 28 03:02:14 2018 -0500 mtd: spi-nor: cast to u64 to avoid uint overflows The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64. Signed-off-by: huijin.park Reviewed-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon commit 4cc106f8f245bae0c458224804733240cb22394d Author: Uwe Kleine-König Date: Wed Nov 21 14:34:00 2018 +0100 mtd: spi-nor: Add support for IS25LP032/064 The datasheet is publically available at http://www.issi.com/WW/pdf/IS25LP032-064-128.pdf. The parameters fit to what is already available for IS25LP128/256. Signed-off-by: Uwe Kleine-König Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit a98086e00420ad92cfa961bcbb457fbe52ec28c9 Author: Yogesh Narayan Gaur Date: Fri Oct 12 02:23:13 2018 +0000 mtd: spi-nor: add entry for mt35xu512aba flash Add entry for mt35xu512aba Micron NOR flash. This flash is having uniform sector erase size of 128KB, have support of FSR(flag status register), flash size is 64MB and supports 4-byte commands. Signed-off-by: Yogesh Gaur Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit 0005aad094538e1c290b1cdb5b940e4a16f405b0 Author: Yogesh Narayan Gaur Date: Fri Oct 12 02:23:08 2018 +0000 mtd: spi-nor: add macros related to MICRON flash Some MICRON related macros in spi-nor domain were ST. Rename entries related to STMicroelectronics under macro SNOR_MFR_ST. Added entry of MFR Id for Micron flashes, 0x002C. Signed-off-by: Yogesh Gaur Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit f66734ae2d8d2b5e39f4ac3c5dc9666125bcb76e Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 17:40:21 2018 +0000 mtd: spi-nor: mark desirable switch case fall through gcc 7 with -Wimplicit-fallthrough raises: drivers/mtd/spi-nor/spi-nor.c: In function ‘set_4byte’: drivers/mtd/spi-nor/spi-nor.c:289:13: warning: this statement may fall through [-Wimplicit-fallthrough=] need_wren = true; ~~~~~~~~~~^~~~~~ drivers/mtd/spi-nor/spi-nor.c:290:2: note: here case SNOR_MFR_MACRONIX: ^~~~ Quiet the warning by marking the expected switch fall through. Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit 81554171373018b83f3554b9e725d2b5bf1844a5 Author: Alexander Sverdlin Date: Fri Jul 13 15:06:46 2018 +0200 mtd: spi-nor: Add support for mx25u12835f This chip supports dual and quad read and uniform 4K-byte erase. Signed-off-by: Alexander Sverdlin Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit d720a43333b0c21694a00bd67a24fac8bebfbc3f Author: Robert Marko Date: Mon Jun 25 13:17:48 2018 +0200 mtd: spi-nor: Add Winbond w25q128jv support Datasheet: http://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf Testing done on Mikrotik Routerboard wAP R board. It does not support Dual or Quad modes. Signed-off-by: Robert Marko Reviewed-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit e7b65a49c43fffb61c489a5e07e6d2f6c8a5efe2 Author: Tudor.Ambarus@microchip.com Date: Fri Nov 9 16:56:56 2018 +0000 mtd: spi-nor: remove unneeded smpt zeroization The entire smpt array is initialized with data read from sfdp, there is no need to init it with zeroes before. Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon commit 2e62246b08a69a35fb7ea832873f6e005d672cd5 Author: Matti Vaittinen Date: Fri Dec 7 12:01:44 2018 +0200 clk: bd718x7: Initial support for ROHM bd71837/bd71847 PMIC clock ROHM bd71837 and bd71847 contain 32768Hz clock gate. Support the clock using generic clock framework. Note, only bd71837 is tested but bd71847 should be identical what comes to clk parts. Signed-off-by: Matti Vaittinen Signed-off-by: Stephen Boyd commit e9e863dc1dc88212b09d279a143027e1521b35d1 Author: Martin Blumenstingl Date: Fri Nov 23 20:53:06 2018 +0100 ARM: meson: select HAVE_ARM_TWD and ARM_GLOBAL_TIMER The 32-bit Meson SoCs use multiple Cortex-A9 (Meson8 and Meson8m2) or Cortex-A5 (Meson8b) CPU cores. These come with the "ARM global timer" and "Timer-Watchdog" (aka TWD, which provides both a per-cpu local timer and watchdog). Selecting ARM_GLOBAL_TIMER and HAVE_ARM_TWD allows us to add the timers to the SoC.dtsi files. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 816b6931315b641c5864cf33a9363cb89da05d0b Author: Alex Deucher Date: Thu Dec 6 10:41:27 2018 -0500 drm/amdgpu/powerplay: Add special avfs cases for some polaris asics (v3) Add special avfs handling for some polaris variants. v2: fix copy paste typo. v3: fix asic rid check Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8146aace60c7409cc60a1598bc9647a5bbb12eb4 Author: Krzysztof Kozlowski Date: Mon Dec 10 10:29:59 2018 +0100 led: triggers: Initialize LED_INIT_DEFAULT_TRIGGER if trigger is brought after class Trigger driver can be initialized after the LED class device driver. In such case led_trigger_set_default() won't be called and flag LED_INIT_DEFAULT_TRIGGER should be set from led_trigger_register(). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jacek Anaszewski commit 02d31765bb35101d711b862fc619a49857bb9070 Author: Jacek Anaszewski Date: Mon Dec 10 10:29:58 2018 +0100 led: triggers: Add LED_INIT_DEFAULT_TRIGGER flag Add the flag LED_INIT_DEFAULT_TRIGGER for indicating that trigger being set is a default trigger for the LED class device, and thus it should be initialized with settings provided in the fwnode. Set the flag in the led_trigger_set_default(). It is expected to be cleared in the activate() op of a trigger after trigger fwnode initialization data is parsed and applied. This should happen only once after LED class device registration, to allow leaving triggers in the idle state on re-apply and let the users apply their own settings without interference from the default ones. Signed-off-by: Jacek Anaszewski Acked-by: Pavel Machek Signed-off-by: Krzysztof Kozlowski commit 10a5ce98539948affbdc28dc0f39a1b6b2307f9d Author: Martin KaFai Lau Date: Mon Dec 10 10:53:24 2018 -0800 bpf: bpftool: Fix newline and p_err issue This patch fixes a few newline issues and also replaces p_err with p_info in prog.c Fixes: b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump") Cc: Jakub Kicinski Signed-off-by: Martin KaFai Lau Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 2e431a1788c52d510bb24229cef93ba935f5785b Author: YueHaibing Date: Sat Dec 8 15:01:13 2018 +0000 drm/amdgpu: remove set but not used variable 'grbm_soft_reset' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_pre_soft_reset': drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4950:27: warning: variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_post_soft_reset': drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:5054:27: warning: variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable] It never used since introduction in commit d31a501ead7f ("drm/amdgpu: add pre_soft_reset ip func") and e4ae0fc33631 ("drm/amdgpu: implement gfx8 post_soft_reset") Reviewed-by: Chunming Zhou Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 08d1bdd4cc57e89d037205687a61d2b6ff9dddd4 Author: Rex Zhu Date: Wed Oct 24 16:10:33 2018 +0800 drm/amdgpu: Limit vm max ctx number to 4096 driver need to reserve resource for each ctx for some hw features. so add this limitation. Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 31edd7c0a813d9dc778fcb5da1eb8202c140dc4d Author: Tiecheng Zhou Date: Fri Dec 7 09:11:35 2018 +0800 drm/amdgpu: bypass RLC init under sriov for Tonga (v2) RLC will go wrong in soft_reset under sriov Workaroound: only need to init RLC csb, and skip RLC stop, reset, start this is because host-driver has already done full initialization on RLC v2: squash in build fix Signed-off-by: Tiecehng Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 05d9fcbcf402fa4dd219ffeeb341d1b48d75404c Author: Corentin Labbe Date: Mon Dec 10 19:45:54 2018 +0000 MAINTAINERS: add drivers/soc/amlogic/ to amlogic list While sending a patch for drivers/soc/amlogic/Kconfig, I saw that getmaintainer.pl give nobody for it. This patchs adds drivers/soc/amlogic/ to amlogic maintainers. Signed-off-by: Corentin Labbe Signed-off-by: Kevin Hilman commit f56c06271c1c3caef9c7ef200e3d89967fd98a8e Author: Corentin Labbe Date: Mon Dec 10 19:45:55 2018 +0000 soc: amlogic: meson-clk-measure: Add missing REGMAP_MMIO dependency This patchs adds a missing dependency on REGMAP_MMIO. This cause the following build failure on SPARC: drivers/soc/amlogic/meson-clk-measure.o: In function `meson_msr_probe': meson-clk-measure.c:(.text+0xc4): undefined reference to `__devm_regmap_init_mmio_clk' Signed-off-by: Corentin Labbe Signed-off-by: Kevin Hilman commit c4f7bd4a42758ed42cf7f7a5fd46e0b54ce23ad2 Author: Jacek Anaszewski Date: Mon Dec 10 10:29:57 2018 +0100 led: triggers: Break the for loop after default trigger is found It is of no avail to continue iterating through registered triggers in the led_trigger_set_default() after the trigger to set has been found. Add "break" statement to fix this omission. Signed-off-by: Jacek Anaszewski Acked-by: Pavel Machek Signed-off-by: Krzysztof Kozlowski commit d8ed257f313f64e9835e61d1365dea95a0a1c9c6 Author: Eric Dumazet Date: Mon Dec 10 06:10:02 2018 -0800 tcp: handle EOR and FIN conditions the same in tcp_tso_should_defer() In commit f9bfe4e6a9d0 ("tcp: lack of available data can also cause TSO defer") we moved the test in tcp_tso_should_defer() for packets with a FIN flag, and we mentioned that the same would be done later for EOR flag. Both flags should be handled at the same time, after all other heuristics have been considered. They both mean that no more bytes can be added to this skb by an application. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit c535293f6351c7047fdaebde4d8b0f665a98a481 Merge: 4e6feb7adb9a6 924352c3d6347 Author: David S. Miller Date: Mon Dec 10 12:07:56 2018 -0800 Merge branch 'dsa-ksz-Add-reset-GPIO-handling' Marek Vasut says: ==================== net: dsa: ksz: Add reset GPIO handling Add code to handle optional reset GPIO in the KSZ switch driver and a matching DT property adjustments. ==================== Signed-off-by: David S. Miller commit 924352c3d6347d96528cebcef9461cebe928c117 Author: Marek Vasut Date: Mon Dec 10 14:43:06 2018 +0100 net: dsa: ksz: Add reset GPIO handling Add code to handle optional reset GPIO in the KSZ switch driver. The switch has a reset GPIO line which can be controlled by the CPU, so make sure it is configured correctly in such setups. Signed-off-by: Marek Vasut Cc: Vivien Didelot Cc: Woojung Huh Cc: David S. Miller Cc: Tristram Ha Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a324d6e454aa986d64cb650caa8ed7150023b3f3 Author: Marek Vasut Date: Mon Dec 10 14:43:05 2018 +0100 net: dsa: ksz: Add optional reset GPIO to Microchip KSZ switch binding Add optional reset GPIO, as such a signal is available on the KSZ switches. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Woojung Huh Cc: David S. Miller Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4e6feb7adb9a69e51271eae4715d546507c1e998 Author: Yangtao Li Date: Mon Dec 10 11:08:45 2018 -0500 bonding: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit a93f5b56962538b85aa0594492aa27d539295d5e Author: Yangtao Li Date: Mon Dec 10 10:57:38 2018 -0500 fjes: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 5061e3f43b7da28e1fe13c300b66fc5a4f98b0e8 Author: Yangtao Li Date: Mon Dec 10 10:53:29 2018 -0500 net: xenbus: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Wei Liu Signed-off-by: David S. Miller commit f578e6764958704960e78daf624887da1d3e6d90 Author: Yangtao Li Date: Mon Dec 10 10:46:03 2018 -0500 ieee802154: at86rf230: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit b1dd054dbb72551d42686862f935f96c3e2a53ea Author: YueHaibing Date: Mon Dec 10 19:25:38 2018 +0800 ipvlan: Remove a useless comparison Fix following gcc warning: drivers/net/ipvlan/ipvlan_main.c:543:12: warning: comparison is always false due to limited range of data type [-Wtype-limits] 'mode' is a u16 variable, IPVLAN_MODE_L2 is zero, the comparison is always false Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit c1c8c27701b8fcc0cbbe4af0f9304df466b0123e Author: Colin Ian King Date: Mon Dec 10 09:29:48 2018 +0000 net: hns3: fix spelling mistake "offser" -> "offset" There is a spelling mistake in a msg string, fix this. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit f071bcebee0ad2d8c3e22736210110523fb4b692 Author: Stephen Boyd Date: Wed Nov 21 12:39:44 2018 -0800 clk: qcom: Move to menuconfig and reduce lines We duplicate the 'depends on' in almost every Kconfig here, and it's getting out of hand now that we have tens of options for various SoC drivers here. Let's clean it up a little by making a menuconfig for a submenu and adding an if wrapper around the driver section. Cc: Bjorn Andersson Cc: Taniya Das Signed-off-by: Stephen Boyd commit 3cc48976e9763209ccf0ccc47c8e3e5fc464c557 Author: Lucas Stach Date: Thu Nov 15 15:30:28 2018 +0100 clk: imx6q: handle ENET PLL bypass The ENET PLL is different from the other i.MX6 PLLs, as it has multiple outputs with different post-dividers, which are all bypassed if the single bypass bit is activated. The hardware setup looks something like this: _ refclk-o---PLL---o----DIV1-----| \ | | |M |----OUT1 o-----------------------|_/ | | _ | o----DIV2-----| \ | | |M |----OUT2 o-----------------------|_/ | | _ | `----DIV3-----| \ | |M |----OUT3 `-----------------------|_/ The bypass bit not only bypasses the PLL, but also the attached post-dividers. This would be reasonbly straight forward to model with a single output, or with different bypass bits for each output, but sadly the HW guys decided that it would be good to actuate all 3 muxes with a single bit. So the need to have the PLL bypassed for one of the outputs always affects 2 other (in our model) independent branches of the clock tree. This means the decision to bypass this PLL is a system wide design choice and should not be changed on-the-fly, so we can treat any bapass configuration as static. As such we can just register the post-dividiers with a ratio that reflects the bypass status, which allows us to bypass the PLL without breaking our abstraction model and with it DT stability. Signed-off-by: Lucas Stach Signed-off-by: Stephen Boyd commit a29be9185d195bf5abd5ff5482a26800d58bac19 Author: Lucas Stach Date: Thu Nov 15 15:30:27 2018 +0100 clk: imx6q: optionally get CCM inputs via standard clock handles When specifying external clock inputs to the CCM the current code requires the clocks to be in a "clocks" child node of the DT root. This is not really conformant with DT best practices. To avoid the need to deviate from those best practices, allow the clock inputs to be specified via standard clock handles. This is in line with how drivers of the later CCM driver revisions on newer i.MX SoCs handle this. As we can't retroactively change the DT binding, allow this as an option with a fallback to the old way of how this has been handled. Signed-off-by: Lucas Stach Acked-by: Rob Herring Reviewed-by: Dong Aisheng Signed-off-by: Stephen Boyd commit f7542d817733f461258fd3a47d77da35b2d9fc81 Author: Lucas Stach Date: Thu Nov 15 15:30:26 2018 +0100 clk: imx6q: reset exclusive gates on init The exclusive gates may be set up in the wrong way by software running before the clock driver comes up. In that case the exclusive setup is locked in its initial state, as the complementary function can't be activated without disabling the initial setup first. To avoid this lock situation, reset the exclusive gates to the off state and allow the kernel to provide the proper setup. Signed-off-by: Lucas Stach Reviewed-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 929914946fa615889d176568b175984e5128e0a3 Author: Anson Huang Date: Fri Nov 30 06:31:40 2018 +0000 clk: imx6q: add DCICx clocks gate On i.MX6QP/i.MX6Q/i.MX6DL, there are DCIC1/DCIC2 clocks gate in CCM_CCGR0 register, add them into clock tree for clock management. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 0efcc2c0fd2001a83240a8c3d71f67770484917e Author: Anson Huang Date: Fri Nov 30 07:23:47 2018 +0000 clk: imx6sl: ensure MMDC CH0 handshake is bypassed Same as other i.MX6 SoCs, ensure unused MMDC channel's handshake is bypassed, this is to make sure no request signal will be generated when periphe_clk_sel is changed or SRC warm reset is triggered. Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 4a1daf29d33d766a1a6f03015b93bfb01b93f46e Author: Will Deacon Date: Mon Dec 10 19:20:23 2018 +0000 arm64: mm: EXPORT vabits_user to modules TASK_SIZE is defined using the vabits_user variable for 64-bit tasks, so ensure that this variable is exported to modules to avoid the following build breakage with allmodconfig: | ERROR: "vabits_user" [lib/test_user_copy.ko] undefined! | ERROR: "vabits_user" [drivers/misc/lkdtm/lkdtm.ko] undefined! | ERROR: "vabits_user" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined! Signed-off-by: Will Deacon commit 67ee606a6bbb5ed2df86e968b6d0d60ad6c60b76 Author: Jernej Skrabec Date: Sat Dec 8 19:02:22 2018 +0100 clk: sunxi-ng: a64: Allow parent change for VE clock Cedrus driver wants to set VE clock higher than it's possible without changing parent rate. Allow changing parent rate for VE clock, so clock rate can be set freely. Signed-off-by: Jernej Skrabec Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd commit d34664f63bba9c884920d86ab67379a08a4ee8e9 Merge: bc84a2d106bea 394135c1ff13e Author: Will Deacon Date: Mon Dec 10 18:57:17 2018 +0000 Merge branch 'for-next/kexec' into aarch64/for-next/core Merge in kexec_file_load() support from Akashi Takahiro. commit bc84a2d106beab6000223b569c3bcb9ebf49d9ec Merge: f357b3a7e17af a457b0f7f50d4 Author: Will Deacon Date: Mon Dec 10 18:53:03 2018 +0000 Merge branch 'kvm/cortex-a76-erratum-1165522' into aarch64/for-next/core Pull in KVM workaround for A76 erratum #116522. Conflicts: arch/arm64/include/asm/cpucaps.h commit f357b3a7e17af7736d67d8267edc1ed3d1dd9391 Author: Suzuki K Poulose Date: Mon Dec 10 18:07:33 2018 +0000 arm64: smp: Handle errors reported by the firmware The __cpu_up() routine ignores the errors reported by the firmware for a CPU bringup operation and looks for the error status set by the booting CPU. If the CPU never entered the kernel, we could end up in assuming stale error status, which otherwise would have been set/cleared appropriately by the booting CPU. Reported-by: Steve Capper Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 66f16a24512fa44680504effe908df8326885594 Author: Will Deacon Date: Mon Dec 10 14:21:13 2018 +0000 arm64: smp: Rework early feature mismatched detection Rather than add additional variables to detect specific early feature mismatches with secondary CPUs, we can instead dedicate the upper bits of the CPU boot status word to flag specific mismatches. This allows us to communicate both granule and VA-size mismatches back to the primary CPU without the need for additional book-keeping. Tested-by: Steve Capper Signed-off-by: Will Deacon commit 68d23da4373aba76f5300017c4746440f276698e Author: Will Deacon Date: Mon Dec 10 14:15:15 2018 +0000 arm64: Kconfig: Re-jig CONFIG options for 52-bit VA Enabling 52-bit VAs for userspace is pretty confusing, since it requires you to select "48-bit" virtual addressing in the Kconfig. Rework the logic so that 52-bit user virtual addressing is advertised in the "Virtual address space size" choice, along with some help text to describe its interaction with Pointer Authentication. The EXPERT-only option to force all user mappings to the 52-bit range is then made available immediately below the VA size selection. Signed-off-by: Will Deacon commit b9567720a1b8e739380e0241413606c056c57859 Author: Steve Capper Date: Thu Dec 6 22:50:42 2018 +0000 arm64: mm: Allow forcing all userspace addresses to 52-bit On arm64 52-bit VAs are provided to userspace when a hint is supplied to mmap. This helps maintain compatibility with software that expects at most 48-bit VAs to be returned. In order to help identify software that has 48-bit VA assumptions, this patch allows one to compile a kernel where 52-bit VAs are returned by default on HW that supports it. This feature is intended to be for development systems only. Signed-off-by: Steve Capper Acked-by: Catalin Marinas Signed-off-by: Will Deacon commit 67e7fdfcc6824a4f768d76d89377b33baad58fad Author: Steve Capper Date: Thu Dec 6 22:50:41 2018 +0000 arm64: mm: introduce 52-bit userspace support On arm64 there is optional support for a 52-bit virtual address space. To exploit this one has to be running with a 64KB page size and be running on hardware that supports this. For an arm64 kernel supporting a 48 bit VA with a 64KB page size, some changes are needed to support a 52-bit userspace: * TCR_EL1.T0SZ needs to be 12 instead of 16, * TASK_SIZE needs to reflect the new size. This patch implements the above when the support for 52-bit VAs is detected at early boot time. On arm64 userspace addresses translation is controlled by TTBR0_EL1. As well as userspace, TTBR0_EL1 controls: * The identity mapping, * EFI runtime code. It is possible to run a kernel with an identity mapping that has a larger VA size than userspace (and for this case __cpu_set_tcr_t0sz() would set TCR_EL1.T0SZ as appropriate). However, when the conditions for 52-bit userspace are met; it is possible to keep TCR_EL1.T0SZ fixed at 12. Thus in this patch, the TCR_EL1.T0SZ size changing logic is disabled. Reviewed-by: Catalin Marinas Signed-off-by: Steve Capper Signed-off-by: Will Deacon commit a96a33b1ca57dbea4285893dedf290aeb8eb090b Author: Steve Capper Date: Thu Dec 6 22:50:40 2018 +0000 arm64: mm: Prevent mismatched 52-bit VA support For cases where there is a mismatch in ARMv8.2-LVA support between CPUs we have to be careful in allowing secondary CPUs to boot if 52-bit virtual addresses have already been enabled on the boot CPU. This patch adds code to the secondary startup path. If the boot CPU has enabled 52-bit VAs then ID_AA64MMFR2_EL1 is checked to see if the secondary can also enable 52-bit support. If not, the secondary is prevented from booting and an error message is displayed indicating why. Technically this patch could be implemented using the cpufeature code when considering 52-bit userspace support. However, we employ low level checks here as the cpufeature code won't be able to run if we have mismatched 52-bit kernel va support. Signed-off-by: Steve Capper Signed-off-by: Will Deacon commit e842dfb5a2d3b4c43766508ef89a4eb67471d53a Author: Steve Capper Date: Thu Dec 6 22:50:39 2018 +0000 arm64: mm: Offset TTBR1 to allow 52-bit PTRS_PER_PGD Enabling 52-bit VAs on arm64 requires that the PGD table expands from 64 entries (for the 48-bit case) to 1024 entries. This quantity, PTRS_PER_PGD is used as follows to compute which PGD entry corresponds to a given virtual address, addr: pgd_index(addr) -> (addr >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1) Userspace addresses are prefixed by 0's, so for a 48-bit userspace address, uva, the following is true: (uva >> PGDIR_SHIFT) & (1024 - 1) == (uva >> PGDIR_SHIFT) & (64 - 1) In other words, a 48-bit userspace address will have the same pgd_index when using PTRS_PER_PGD = 64 and 1024. Kernel addresses are prefixed by 1's so, given a 48-bit kernel address, kva, we have the following inequality: (kva >> PGDIR_SHIFT) & (1024 - 1) != (kva >> PGDIR_SHIFT) & (64 - 1) In other words a 48-bit kernel virtual address will have a different pgd_index when using PTRS_PER_PGD = 64 and 1024. If, however, we note that: kva = 0xFFFF << 48 + lower (where lower[63:48] == 0b) and, PGDIR_SHIFT = 42 (as we are dealing with 64KB PAGE_SIZE) We can consider: (kva >> PGDIR_SHIFT) & (1024 - 1) - (kva >> PGDIR_SHIFT) & (64 - 1) = (0xFFFF << 6) & 0x3FF - (0xFFFF << 6) & 0x3F // "lower" cancels out = 0x3C0 In other words, one can switch PTRS_PER_PGD to the 52-bit value globally provided that they increment ttbr1_el1 by 0x3C0 * 8 = 0x1E00 bytes when running with 48-bit kernel VAs (TCR_EL1.T1SZ = 16). For kernel configuration where 52-bit userspace VAs are possible, this patch offsets ttbr1_el1 and sets PTRS_PER_PGD corresponding to the 52-bit value. Reviewed-by: Catalin Marinas Reviewed-by: Suzuki K Poulose Suggested-by: Catalin Marinas Signed-off-by: Steve Capper [will: added comment to TTBR1_BADDR_4852_OFFSET calculation] Signed-off-by: Will Deacon commit e5d99157459f79ed26953e8a77addb9d3e0122b7 Author: Steve Capper Date: Thu Dec 6 22:50:38 2018 +0000 arm64: mm: Define arch_get_mmap_end, arch_get_mmap_base Now that we have DEFAULT_MAP_WINDOW defined, we can arch_get_mmap_end and arch_get_mmap_base helpers to allow for high addresses in mmap. Signed-off-by: Steve Capper Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon commit 363524d2b12270d86677e1154ecc1c5061f43219 Author: Steve Capper Date: Thu Dec 6 22:50:37 2018 +0000 arm64: mm: Introduce DEFAULT_MAP_WINDOW We wish to introduce a 52-bit virtual address space for userspace but maintain compatibility with software that assumes the maximum VA space size is 48 bit. In order to achieve this, on 52-bit VA systems, we make mmap behave as if it were running on a 48-bit VA system (unless userspace explicitly requests a VA where addr[51:48] != 0). On a system running a 52-bit userspace we need TASK_SIZE to represent the 52-bit limit as it is used in various places to distinguish between kernelspace and userspace addresses. Thus we need a new limit for mmap, stack, ELF loader and EFI (which uses TTBR0) to represent the non-extended VA space. This patch introduces DEFAULT_MAP_WINDOW and DEFAULT_MAP_WINDOW_64 and switches the appropriate logic to use that instead of TASK_SIZE. Signed-off-by: Steve Capper Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon commit f6795053dac8d4d2f90d4a98842dd6d2ccd544ad Author: Steve Capper Date: Thu Dec 6 22:50:36 2018 +0000 mm: mmap: Allow for "high" userspace addresses This patch adds support for "high" userspace addresses that are optionally supported on the system and have to be requested via a hint mechanism ("high" addr parameter to mmap). Architectures such as powerpc and x86 achieve this by making changes to their architectural versions of arch_get_unmapped_* functions. However, on arm64 we use the generic versions of these functions. Rather than duplicate the generic arch_get_unmapped_* implementations for arm64, this patch instead introduces two architectural helper macros and applies them to arch_get_unmapped_*: arch_get_mmap_end(addr) - get mmap upper limit depending on addr hint arch_get_mmap_base(addr, base) - get mmap_base depending on addr hint If these macros are not defined in architectural code then they default to (TASK_SIZE) and (base) so should not introduce any behavioural changes to architectures that do not define them. Signed-off-by: Steve Capper Reviewed-by: Catalin Marinas Acked-by: Andrew Morton Signed-off-by: Will Deacon commit 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 Author: Sergei Shtylyov Date: Sat Nov 24 21:14:16 2018 +0300 sata_rcar: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Switch to propagating the error code upstream, still checking/overriding IRQ0 as libata regards it as "no IRQ" (thus polling) anyway... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Sergei Shtylyov Signed-off-by: Jens Axboe commit b708a3cc9600390ccaa2b68a88087dd265154b2b Author: Dmitry V. Levin Date: Mon Dec 10 02:00:47 2018 +0300 selftests: do not macro-expand failed assertion expressions I've stumbled over the current macro-expand behaviour of the test harness: $ gcc -Wall -xc - <<'__EOF__' TEST(macro) { int status = 0; ASSERT_TRUE(WIFSIGNALED(status)); } TEST_HARNESS_MAIN __EOF__ $ ./a.out [==========] Running 1 tests from 1 test cases. [ RUN ] global.macro :4:global.macro:Expected 0 (0) != (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) (0) global.macro: Test terminated by assertion [ FAIL ] global.macro [==========] 0 / 1 tests passed. [ FAILED ] With this change the output of the same test looks much more comprehensible: [==========] Running 1 tests from 1 test cases. [ RUN ] global.macro :4:global.macro:Expected 0 (0) != WIFSIGNALED(status) (0) global.macro: Test terminated by assertion [ FAIL ] global.macro [==========] 0 / 1 tests passed. [ FAILED ] The issue is very similar to the bug fixed in glibc assert(3) three years ago: https://sourceware.org/bugzilla/show_bug.cgi?id=18604 Cc: Shuah Khan Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: linux-kselftest@vger.kernel.org Signed-off-by: Dmitry V. Levin Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 33e7a8422546b5cd65d4af4dfe4ed92ea543d8df Author: Colin Ian King Date: Sun Dec 9 15:08:32 2018 +0000 clk: imx: remove redundant initialization of ret to zero The initialization of ret is redundant as it is being re-assigned to the return value from the call to imx8m_clk_composite_compute_dividers. Clean this up by removing the initialization. Signed-off-by: Colin Ian King Signed-off-by: Stephen Boyd commit 6e8830674ea77f57d57a33cca09083b117a71f41 Author: Qian Cai Date: Fri Dec 7 17:34:49 2018 -0500 arm64: kasan: Increase stack size for KASAN_EXTRA If the kernel is configured with KASAN_EXTRA, the stack size is increased significantly due to setting the GCC -fstack-reuse option to "none" [1]. As a result, it can trigger a stack overrun quite often with 32k stack size compiled using GCC 8. For example, this reproducer https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/madvise/madvise06.c can trigger a "corrupted stack end detected inside scheduler" very reliably with CONFIG_SCHED_STACK_END_CHECK enabled. There are other reports at: https://lore.kernel.org/lkml/1542144497.12945.29.camel@gmx.us/ https://lore.kernel.org/lkml/721E7B42-2D55-4866-9C1A-3E8D64F33F9C@gmx.us/ There are just too many functions that could have a large stack with KASAN_EXTRA due to large local variables that have been called over and over again without being able to reuse the stacks. Some noticiable ones are, size 7536 shrink_inactive_list 7440 shrink_page_list 6560 fscache_stats_show 3920 jbd2_journal_commit_transaction 3216 try_to_unmap_one 3072 migrate_page_move_mapping 3584 migrate_misplaced_transhuge_page 3920 ip_vs_lblcr_schedule 4304 lpfc_nvme_info_show 3888 lpfc_debugfs_nvmestat_data.constprop There are other 49 functions over 2k in size while compiling kernel with "-Wframe-larger-than=" on this machine. Hence, it is too much work to change Makefiles for each object to compile without -fsanitize-address-use-after-scope individually. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715#c23 Signed-off-by: Qian Cai Signed-off-by: Will Deacon commit e434b8cdf788568ba65a0a0fd9f3cb41f3ca1803 Author: Jiong Wang Date: Fri Dec 7 12:16:18 2018 -0500 bpf: relax verifier restriction on BPF_MOV | BPF_ALU Currently, the destination register is marked as unknown for 32-bit sub-register move (BPF_MOV | BPF_ALU) whenever the source register type is SCALAR_VALUE. This is too conservative that some valid cases will be rejected. Especially, this may turn a constant scalar value into unknown value that could break some assumptions of verifier. For example, test_l4lb_noinline.c has the following C code: struct real_definition *dst 1: if (!get_packet_dst(&dst, &pckt, vip_info, is_ipv6)) 2: return TC_ACT_SHOT; 3: 4: if (dst->flags & F_IPV6) { get_packet_dst is responsible for initializing "dst" into valid pointer and return true (1), otherwise return false (0). The compiled instruction sequence using alu32 will be: 412: (54) (u32) r7 &= (u32) 1 413: (bc) (u32) r0 = (u32) r7 414: (95) exit insn 413, a BPF_MOV | BPF_ALU, however will turn r0 into unknown value even r7 contains SCALAR_VALUE 1. This causes trouble when verifier is walking the code path that hasn't initialized "dst" inside get_packet_dst, for which case 0 is returned and we would then expect verifier concluding line 1 in the above C code pass the "if" check, therefore would skip fall through path starting at line 4. Now, because r0 returned from callee has became unknown value, so verifier won't skip analyzing path starting at line 4 and "dst->flags" requires dereferencing the pointer "dst" which actually hasn't be initialized for this path. This patch relaxed the code marking sub-register move destination. For a SCALAR_VALUE, it is safe to just copy the value from source then truncate it into 32-bit. A unit test also included to demonstrate this issue. This test will fail before this patch. This relaxation could let verifier skipping more paths for conditional comparison against immediate. It also let verifier recording a more accurate/strict value for one register at one state, if this state end up with going through exit without rejection and it is used for state comparison later, then it is possible an inaccurate/permissive value is better. So the real impact on verifier processed insn number is complex. But in all, without this fix, valid program could be rejected. >From real benchmarking on kernel selftests and Cilium bpf tests, there is no impact on processed instruction number when tests ares compiled with default compilation options. There is slightly improvements when they are compiled with -mattr=+alu32 after this patch. Also, test_xdp_noinline/-mattr=+alu32 now passed verification. It is rejected before this fix. Insn processed before/after this patch: default -mattr=+alu32 Kernel selftest === test_xdp.o 371/371 369/369 test_l4lb.o 6345/6345 5623/5623 test_xdp_noinline.o 2971/2971 rejected/2727 test_tcp_estates.o 429/429 430/430 Cilium bpf === bpf_lb-DLB_L3.o: 2085/2085 1685/1687 bpf_lb-DLB_L4.o: 2287/2287 1986/1982 bpf_lb-DUNKNOWN.o: 690/690 622/622 bpf_lxc.o: 95033/95033 N/A bpf_netdev.o: 7245/7245 N/A bpf_overlay.o: 2898/2898 3085/2947 NOTE: - bpf_lxc.o and bpf_netdev.o compiled by -mattr=+alu32 are rejected by verifier due to another issue inside verifier on supporting alu32 binary. - Each cilium bpf program could generate several processed insn number, above number is sum of them. v1->v2: - Restrict the change on SCALAR_VALUE. - Update benchmark numbers on Cilium bpf tests. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit 45fe439bc3699851802062c05acf4cbac4d672bc Author: Steven Rostedt (VMware) Date: Fri Dec 7 12:25:52 2018 -0500 fgraph: Add comment to describe ftrace_graph_get_ret_stack The ret_stack should not be accessed directly via the curr_ret_stack variable on the task_struct. This is because the ret_stack is going to be converted into a series of longs and not an array of ret_stack structures. The way that a ret_stack should be retrieved is via the ftrace_graph_get_ret_stack structure, but it needs to be documented on how to use it. Signed-off-by: Steven Rostedt (VMware) commit e4c07bf9867aeaec14bac042fbbd50d885f6ed3a Author: Steven Rostedt (VMware) Date: Wed Dec 5 12:48:54 2018 -0500 arm64: ftrace: Set FTRACE_MAY_SLEEP before ftrace_modify_all_code() It has been reported that ftrace_replace_code() which is called by ftrace_modify_all_code() can cause a soft lockup warning for an allmodconfig kernel. This is because all the debug options enabled causes the loop in ftrace_replace_code() (which loops over all the functions being enabled where there can be 10s of thousands), is too slow, and never schedules out. To solve this, setting FTRACE_MAY_SLEEP to the command passed into ftrace_replace_code() will make it call cond_resched() in the loop, which prevents the soft lockup warning from triggering. Link: http://lkml.kernel.org/r/20181204192903.8193-1-anders.roxell@linaro.org Link: http://lkml.kernel.org/r/20181205183304.000714627@goodmis.org Acked-by: Will Deacon Reported-by: Anders Roxell Tested-by: Anders Roxell Signed-off-by: Steven Rostedt (VMware) commit a0572f687fb3c46e15554f4789797a077cc393b4 Author: Steven Rostedt (VMware) Date: Wed Dec 5 12:48:53 2018 -0500 ftrace: Allow ftrace_replace_code() to be schedulable The function ftrace_replace_code() is the ftrace engine that does the work to modify all the nops into the calls to the function callback in all the functions being traced. The generic version which is normally called from stop machine, but an architecture can implement a non stop machine version and still use the generic ftrace_replace_code(). When an architecture does this, ftrace_replace_code() may be called from a schedulable context, where it can allow the code to be preemptible, and schedule out. In order to allow an architecture to make ftrace_replace_code() schedulable, a new command flag is added called: FTRACE_MAY_SLEEP Which can be or'd to the command that is passed to ftrace_modify_all_code() that calls ftrace_replace_code() and will have it call cond_resched() in the loop that modifies the nops into the calls to the ftrace trampolines. Link: http://lkml.kernel.org/r/20181204192903.8193-1-anders.roxell@linaro.org Link: http://lkml.kernel.org/r/20181205183303.828422192@goodmis.org Reported-by: Anders Roxell Tested-by: Anders Roxell Signed-off-by: Steven Rostedt (VMware) commit dbc3f042fbc8d75392b128af0eafbcf357733dd6 Author: Masami Hiramatsu Date: Mon Nov 5 18:05:26 2018 +0900 selftests/ftrace: Add testcases for dynamic event Add common testcases for dynamic_events interface. - Add/remove kprobe events via dynamic_events - Add/remove synthetic events via dynamic_events - Selective clear events (clear events other interfaces) - Genelic clear events ("!LINE" syntax) Link: http://lkml.kernel.org/r/154140872590.17322.10394440849261743052.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1ce25e9f6fff7633955e8ce776e5e9d7a780d34b Author: Masami Hiramatsu Date: Mon Nov 5 18:04:57 2018 +0900 tracing: Add generic event-name based remove event method Add a generic method to remove event from dynamic event list. This is same as other system under ftrace. You just need to pass the event name with '!', e.g. # echo p:new_grp/new_event _do_fork > dynamic_events This creates an event, and # echo '!p:new_grp/new_event _do_fork' > dynamic_events Or, # echo '!p:new_grp/new_event' > dynamic_events will remove new_grp/new_event event. Note that this doesn't check the event prefix (e.g. "p:") strictly, because the "group/event" name must be unique. Link: http://lkml.kernel.org/r/154140869774.17322.8887303560398645347.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7e1413edd6194a9807aa5f3ac0378b9b4b9da879 Author: Steven Rostedt (VMware) Date: Tue Dec 4 13:35:45 2018 -0500 tracing: Consolidate trace_add/remove_event_call back to the nolock functions The trace_add/remove_event_call_nolock() functions were added to allow the tace_add/remove_event_call() code be called when the event_mutex lock was already taken. Now that all callers are done within the event_mutex, there's no reason to have two different interfaces. Remove the current wrapper trace_add/remove_event_call()s and rename the _nolock versions back to the original names. Link: http://lkml.kernel.org/r/154140866955.17322.2081425494660638846.stgit@devbox Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 5fd98eb7e8ce0f7d7e4f3c138e5b46fc98389804 Author: Masahiro Yamada Date: Wed Nov 28 11:42:30 2018 +0900 ARM: dts: uniphier: add MIO DMAC nodes Add MIO-DMAC (Media IO DMA Controller) nodes, and use them as the DMA engine of SD/eMMC controllers. Signed-off-by: Masahiro Yamada commit 072ae88ad2f60cbe95bec147892046df3f195d79 Author: Viresh Kumar Date: Fri Nov 16 15:34:33 2018 +0530 arm64: dts: uniphier: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Masahiro Yamada commit 7f63196eaa83e033de523602324ff91288390a67 Author: Zhuohao Lee Date: Mon Dec 10 12:32:13 2018 +0800 ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping From the da7219 spec, the button A, B, C and D are remapped to 0, 1, 2 and 3 respectively where button A is KEY_PLAYPAUSE, B is KEY_VOLUMEUP, C is KEY_VOLUMEDOWN and D is KEY_VOICECOMMAND. Signed-off-by: Zhuohao Lee Signed-off-by: Max Chang Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 02e5af6575627ca0692d5b93e7c3fc3b86f62f40 Author: Hans de Goede Date: Sat Dec 8 14:01:14 2018 +0100 ASoC: Intel: bytcr_rt5640: Add quirk for the Point of View Mobii TAB-P1005W-232 Add a quirk for the Point of View Mobii TAB-P1005W-232 v2.0 tablet, this BYTCR device uses IN1 for its MIC and JD2 for jack-detect, rather then the default IN3 and JD1. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 271248f4c2bf56dc6b3582e37c7ac19dd483d989 Author: Hans de Goede Date: Sat Dec 8 14:01:13 2018 +0100 ASoC: Intel: bytcr_rt5640: Add quirk for the Prowise PT301 tablet Add a quirk for the Prowise PT301 tablet, this BYTCR tablet has no CHAN package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which is the default for BYTCR devices. Also it uses IN1 for its MIC and JD2 for jack-detect, rather then the default IN3 and JD1. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 6f75723190d88e1319bea623bfe0292bf3917965 Author: Mikulas Patocka Date: Thu Dec 6 11:41:22 2018 -0500 dm: remove the pending IO accounting Remove the "pending" atomic counters, that duplicate block-core's in_flight counters, and update md_in_flight() to look at percpu in_flight counters. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit e016b78201a2d9ff40f3f0da072292689af24c7f Author: Mikulas Patocka Date: Thu Dec 6 11:41:21 2018 -0500 block: return just one value from part_in_flight The previous patches deleted all the code that needed the second value returned from part_in_flight - now the kernel only uses the first value. Consequently, part_in_flight (and blk_mq_in_flight) may be changed so that it only returns one value. This patch just refactors the code, there's no functional change. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 1226b8dd0e91331cfab500f305b2c264445a0392 Author: Mikulas Patocka Date: Thu Dec 6 11:41:20 2018 -0500 block: switch to per-cpu in-flight counters Now when part_round_stats is gone, we can switch to per-cpu in-flight counters. We use the local-atomic type local_t, so that if part_inc_in_flight or part_dec_in_flight is reentrantly called from an interrupt, the value will be correct. The other counters could be corrupted due to reentrant interrupt, but the corruption only results in slight counter skew - the in_flight counter must be exact, so it needs local_t. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 5b18b5a737600fd20ba2045f320d5926ebbf341a Author: Mikulas Patocka Date: Thu Dec 6 11:41:19 2018 -0500 block: delete part_round_stats and switch to less precise counting We want to convert to per-cpu in_flight counters. The function part_round_stats needs the in_flight counter every jiffy, it would be too costly to sum all the percpu variables every jiffy, so it must be deleted. part_round_stats is used to calculate two counters - time_in_queue and io_ticks. time_in_queue can be calculated without part_round_stats, by adding the duration of the I/O when the I/O ends (the value is almost as exact as the previously calculated value, except that time for in-progress I/Os is not counted). io_ticks can be approximated by increasing the value when I/O is started or ended and the jiffies value has changed. If the I/Os take less than a jiffy, the value is as exact as the previously calculated value. If the I/Os take more than a jiffy, io_ticks can drift behind the previously calculated value. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 112f158f66cbe25fd561a5dfe9c3826e06abf757 Author: Mike Snitzer Date: Thu Dec 6 11:41:18 2018 -0500 block: stop passing 'cpu' to all percpu stats methods All of part_stat_* and related methods are used with preempt disabled, so there is no need to pass cpu around to allow of them. Just call smp_processor_id() as needed. Suggested-by: Jens Axboe Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit dbd3bbd291a03f1383de6242e7999e8487cb869b Author: Mike Snitzer Date: Thu Dec 6 11:41:17 2018 -0500 dm rq: leverage blk_mq_queue_busy() to check for outstanding IO Now that request-based dm-multipath only supports blk-mq, make use of the newly introduced blk_mq_queue_busy() to check for outstanding IO -- rather than (ab)using the block core's in_flight counters. Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 80a787ba3809deb694ee632919badb73890daf05 Author: Mikulas Patocka Date: Thu Dec 6 11:41:16 2018 -0500 dm: dont rewrite dm_disk(md)->part0.in_flight generic_start_io_acct and generic_end_io_acct already update the variable in_flight using atomic operations, so we don't have to overwrite them again. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 37cf28d3b5bca1b532a0b6aac722e7f2788a9294 Author: Adrian Bunk Date: Thu Nov 29 21:58:58 2018 +0200 eeprom: at24: add support for 24c2048 Works with ST M24M02. Signed-off-by: Adrian Bunk Signed-off-by: Bartosz Golaszewski commit 6c0c5dc33ff42af49243e94842d0ebdb153189ea Author: Adrian Bunk Date: Thu Nov 29 21:58:57 2018 +0200 dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string Add new compatible to the device tree bindings. Signed-off-by: Adrian Bunk Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit c7fe060885c4c0b78934c3d7507aa5e68de4099f Author: Eugen Cazacu Date: Sat Dec 1 17:03:22 2018 +0100 user/Makefile: Fix typo and capitalization in comment section Signed-off-by: Eugen Cazacu Signed-off-by: Masahiro Yamada commit 33309ecda0070506c49182530abe7728850ebe78 Author: Will Deacon Date: Mon Dec 10 13:39:48 2018 +0000 arm64: Fix minor issues with the dcache_by_line_op macro The dcache_by_line_op macro suffers from a couple of small problems: First, the GAS directives that are currently being used rely on assembler behavior that is not documented, and probably not guaranteed to produce the correct behavior going forward. As a result, we end up with some undefined symbols in cache.o: $ nm arch/arm64/mm/cache.o ... U civac ... U cvac U cvap U cvau This is due to the fact that the comparisons used to select the operation type in the dcache_by_line_op macro are comparing symbols not strings, and even though it seems that GAS is doing the right thing here (undefined symbols by the same name are equal to each other), it seems unwise to rely on this. Second, when patching in a DC CVAP instruction on CPUs that support it, the fallback path consists of a DC CVAU instruction which may be affected by CPU errata that require ARM64_WORKAROUND_CLEAN_CACHE. Solve these issues by unrolling the various maintenance routines and using the conditional directives that are documented as operating on strings. To avoid the complexity of nested alternatives, we move the DC CVAP patching to __clean_dcache_area_pop, falling back to a branch to __clean_dcache_area_poc if DCPOP is not supported by the CPU. Reported-by: Ard Biesheuvel Suggested-by: Robin Murphy Signed-off-by: Will Deacon commit e9e685480b74aef3f3d0967dadb52eea3ff625d2 Author: Tony Lindgren Date: Wed Dec 5 14:48:51 2018 -0800 ARM: dts: Fix hsi gdd range for omap4 While reviewing the missing mcasp ranges I noticed omap4 hsi range for gdd is wrong so let's fix it. I'm not aware of any omap4 devices in mainline kernel though that use hsi though. Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") Reviewed-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 89cddc563743cb1e0068867ac97013b2a5bf86aa Author: Vivek Gautam Date: Tue Dec 4 11:52:13 2018 +0530 iommu/arm-smmu: Add support for qcom,smmu-v2 variant qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. On msm8996, multiple cores, viz. mdss, video, etc. use this smmu. On sdm845, this smmu is used with gpu. Add bindings for the same. Signed-off-by: Vivek Gautam Reviewed-by: Rob Herring Reviewed-by: Tomasz Figa Tested-by: Srinivas Kandagatla Reviewed-by: Robin Murphy Signed-off-by: Will Deacon commit f1518cd84b44d6c28fb40e0551a9785bc38f55af Author: Vivek Gautam Date: Tue Dec 4 11:52:12 2018 +0530 dt-bindings: arm-smmu: Add bindings for qcom,smmu-v2 Add bindings doc for Qcom's smmu-v2 implementation. Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa Tested-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Signed-off-by: Will Deacon commit 655e364374e74a910d87dbe758bad3e4794f659e Author: Sricharan R Date: Tue Dec 4 11:52:11 2018 +0530 iommu/arm-smmu: Add the device_link between masters and smmu Finally add the device link between the master device and smmu, so that the smmu gets runtime enabled/disabled only when the master needs it. This is done from add_device callback which gets called once when the master is added to the smmu. Signed-off-by: Sricharan R Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa Tested-by: Srinivas Kandagatla Reviewed-by: Robin Murphy Signed-off-by: Will Deacon commit d4a44f0750bb9bf7c44c22444a482756b2344a79 Author: Sricharan R Date: Tue Dec 4 11:52:10 2018 +0530 iommu/arm-smmu: Invoke pm_runtime across the driver Enable pm-runtime on devices that implement a pm domain. Then, add pm runtime hooks to several iommu_ops to power cycle the smmu device for explicit TLB invalidation requests, and register space accesses, etc. We need these hooks when the smmu, linked to its master through device links, has to be powered-up without the master device being in context. Signed-off-by: Sricharan R [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa Tested-by: Srinivas Kandagatla Reviewed-by: Robin Murphy Signed-off-by: Will Deacon commit 96a299d24cfb6b9659304131b598fa09f4c9041e Author: Sricharan R Date: Tue Dec 4 11:52:09 2018 +0530 iommu/arm-smmu: Add pm_runtime/sleep ops The smmu needs to be functional only when the respective master's using it are active. The device_link feature helps to track such functional dependencies, so that the iommu gets powered when the master device enables itself using pm_runtime. So by adapting the smmu driver for runtime pm, above said dependency can be addressed. This patch adds the pm runtime/sleep callbacks to the driver and the corresponding bulk clock handling for all the clocks needed by smmu. Also, while we enable the runtime pm, add a pm sleep suspend callback that pushes devices to low power state by turning the clocks off in a system sleep. Add corresponding clock enable path in resume callback as well. Signed-off-by: Sricharan R Signed-off-by: Archit Taneja [Thor: Rework to get clocks from device tree] Signed-off-by: Thor Thayer [vivek: rework for clock and pm ops] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa Tested-by: Srinivas Kandagatla Reviewed-by: Robin Murphy Tested-by: Thor Thayer Signed-off-by: Will Deacon commit a868e8530441286342f90c1fd9c5f24de3aa2880 Author: Will Deacon Date: Wed Nov 7 22:58:24 2018 +0000 iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer After removing an entry from a queue (e.g. reading an event in arm_smmu_evtq_thread()) it is necessary to advance the MMIO consumer pointer to free the queue slot back to the SMMU. A memory barrier is required here so that all reads targetting the queue entry have completed before the consumer pointer is updated. The implementation of queue_inc_cons() relies on a writel() to complete the previous reads, but this is incorrect because writel() is only guaranteed to complete prior writes. This patch replaces the call to writel() with an mb(); writel_relaxed() sequence, which gives us the read->write ordering which we require. Cc: Robin Murphy Signed-off-by: Will Deacon commit 84a9a75774961612d0c7dd34a1777e8f98a65abd Author: Zhen Lei Date: Wed Oct 31 12:02:07 2018 +0800 iommu/arm-smmu-v3: Avoid memory corruption from Hisilicon MSI payloads The GITS_TRANSLATER MMIO doorbell register in the ITS hardware is architected to be 4 bytes in size, yet on hi1620 and earlier, Hisilicon have allocated the adjacent 4 bytes to carry some IMPDEF sideband information which results in an 8-byte MSI payload being delivered when signalling an interrupt: MSIAddr: |----4bytes----|----4bytes----| | MSIData | IMPDEF | This poses no problem for the ITS hardware because the adjacent 4 bytes are reserved in the memory map. However, when delivering MSIs to memory, as we do in the SMMUv3 driver for signalling the completion of a SYNC command, the extended payload will corrupt the 4 bytes adjacent to the "sync_count" member in struct arm_smmu_device. Fortunately, the current layout allocates these bytes to padding, but this is fragile and we should make this explicit. Reviewed-by: Robin Murphy Signed-off-by: Zhen Lei [will: Rewrote commit message and comment] Signed-off-by: Will Deacon commit 3cd508a8c1379427afb5e16c2e0a7c986d907853 Author: Robin Murphy Date: Wed Oct 17 21:32:58 2018 +0100 iommu/arm-smmu-v3: Fix big-endian CMD_SYNC writes When we insert the sync sequence number into the CMD_SYNC.MSIData field, we do so in CPU-native byte order, before writing out the whole command as explicitly little-endian dwords. Thus on big-endian systems, the SMMU will receive and write back a byteswapped version of sync_nr, which would be perfect if it were targeting a similarly-little-endian ITS, but since it's actually writing back to memory being polled by the CPUs, they're going to end up seeing the wrong thing. Since the SMMU doesn't care what the MSIData actually contains, the minimal-overhead solution is to simply add an extra byteswap initially, such that it then writes back the big-endian format directly. Cc: Fixes: 37de98f8f1cf ("iommu/arm-smmu-v3: Use CMD_SYNC completion MSI") Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit c20c809f925910737bdb932fe86cfa261a12e559 Merge: c4aa8b2a8b63a dcc3c9e37fbd7 Author: Greg Kroah-Hartman Date: Mon Dec 10 13:26:17 2018 +0100 Merge tag 'thunderbolt-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next Mika writes: thunderbolt: Changes for v4.21 merge window * tag 'thunderbolt-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Export IOMMU based DMA protection support to userspace iommu/vt-d: Do not enable ATS for untrusted devices iommu/vt-d: Force IOMMU on for platform opt in hint PCI / ACPI: Identify untrusted PCI devices commit a457b0f7f50d4d189f0d009617885e4341133e8e Author: Marc Zyngier Date: Thu Dec 6 17:31:26 2018 +0000 arm64: Add configuration/documentation for Cortex-A76 erratum 1165522 Now that the infrastructure to handle erratum 1165522 is in place, let's make it a selectable option and add the required documentation. Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit eb036ad2ddf008309ea25e34470898c8cd122f6b Author: Marc Zyngier Date: Thu Dec 6 17:31:25 2018 +0000 arm64: KVM: Handle ARM erratum 1165522 in TLB invalidation In order to avoid TLB corruption whilst invalidating TLBs on CPUs affected by erratum 1165522, we need to prevent S1 page tables from being usable. For this, we set the EL1 S1 MMU on, and also disable the page table walker (by setting the TCR_EL1.EPD* bits to 1). This ensures that once we switch to the EL1/EL0 translation regime, speculated AT instructions won't be able to parse the page tables. Acked-by: Christoffer Dall Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 1e4448c5ddbe93ab6070160f094f49e7c95477e6 Author: Marc Zyngier Date: Thu Dec 6 17:31:24 2018 +0000 arm64: KVM: Add synchronization on translation regime change for erratum 1165522 In order to ensure that slipping HCR_EL2.TGE is done at the right time when switching translation regime, let insert the required ISBs that will be patched in when erratum 1165522 is detected. Take this opportunity to add the missing include of asm/alternative.h which was getting there by pure luck. Acked-by: Christoffer Dall Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 8b2cca9ade2c0f1d2ba94e39781e7306c918e544 Author: Marc Zyngier Date: Thu Dec 6 17:31:23 2018 +0000 arm64: KVM: Force VHE for systems affected by erratum 1165522 In order to easily mitigate ARM erratum 1165522, we need to force affected CPUs to run in VHE mode if using KVM. Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 793d5d9213c701fcef8823e053ecd6919d1e4c21 Author: Marc Zyngier Date: Thu Dec 6 17:31:22 2018 +0000 arm64: Add TCR_EPD{0,1} definitions We are soon going to play with TCR_EL1.EPD{0,1}, so let's add the relevant definitions. Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit bfae1b98ef0baeac1b724ef890cc75f77eccbdd9 Author: Marc Zyngier Date: Thu Dec 6 17:31:21 2018 +0000 arm64: KVM: Install stage-2 translation before enabling traps It is a bit odd that we only install stage-2 translation after having cleared HCR_EL2.TGE, which means that there is a window during which AT requests could fail as stage-2 is not configured yet. Let's move stage-2 configuration before we clear TGE, making the guest entry sequence clearer: we first configure all the guest stuff, then only switch to the guest translation regime. While we're at it, do the same thing for !VHE. It doesn't hurt, and keeps things symmetric. Acked-by: Christoffer Dall Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 33e5f4e50917c2508c05898f391a971b15eec93e Author: Marc Zyngier Date: Thu Dec 6 17:31:20 2018 +0000 KVM: arm64: Rework detection of SVE, !VHE systems An SVE system is so far the only case where we mandate VHE. As we're starting to grow this requirements, let's slightly rework the way we deal with that situation, allowing for easy extension of this check. Acked-by: Christoffer Dall Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit c987876a80e7bcb98a839f10dca9ce7fda4feced Author: Marc Zyngier Date: Thu Dec 6 17:31:19 2018 +0000 arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible Contrary to the non-VHE version of the TLB invalidation helpers, the VHE code has interrupts enabled, meaning that we can take an interrupt in the middle of such a sequence, and start running something else with HCR_EL2.TGE cleared. That's really not a good idea. Take the heavy-handed option and disable interrupts in __tlb_switch_to_guest_vhe, restoring them in __tlb_switch_to_host_vhe. The latter also gain an ISB in order to make sure that TGE really has taken effect. Cc: stable@vger.kernel.org Acked-by: Christoffer Dall Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 2a9cee5b7a7e39245b835403520f5e80de537130 Author: Mark Rutland Date: Fri Dec 7 18:08:23 2018 +0000 arm64: remove arm64ksyms.c Now that arm64ksyms.c has been reduced to a stub, let's remove it entirely. New exports should be associated with their function definition. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit dbd3196299fe5878caf43f6637ee08feb0942411 Author: Mark Rutland Date: Fri Dec 7 18:08:22 2018 +0000 arm64: frace: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the ftrace exports to the assembly files the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit ac0e8c72b03b0e2634a355b99e1d3b780090c403 Author: Mark Rutland Date: Fri Dec 7 18:08:21 2018 +0000 arm64: string: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the string routine exports to the assembly files the functions are defined in. Routines which should only be exported for !KASAN builds are exported using the EXPORT_SYMBOL_NOKASAN() helper. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Will Deacon commit 56c08ec5162c7cf87632c59714ac625e7d54106a Author: Mark Rutland Date: Fri Dec 7 18:08:20 2018 +0000 arm64: uaccess: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the uaccess exports to the assembly files the functions are defined in. As we have to include , the existing includes are fixed to follow the usual ordering conventions. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Will Deacon commit 50fdecb292e0b2d98b0b2bf319a4faa1aa7d666f Author: Mark Rutland Date: Fri Dec 7 18:08:19 2018 +0000 arm64: page: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the copy_page and clear_page exports to the assembly files the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Will Deacon commit 23fe04c0c58c0432d26fd9c8d974d2fd9ab8a493 Author: Mark Rutland Date: Fri Dec 7 18:08:18 2018 +0000 arm64: smccc: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the SMCCC exports to the assembly file the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Will Deacon commit abb77f3d96407cf30c2068f4a23a14b9540a1c1f Author: Mark Rutland Date: Fri Dec 7 18:08:17 2018 +0000 arm64: tishift: use asm EXPORT_SYMBOL() For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the tishift exports to the assembly file the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Will Deacon commit 386b3c7bdafcc67aaf4168e9627b381370b6538a Author: Mark Rutland Date: Fri Dec 7 18:08:16 2018 +0000 arm64: add EXPORT_SYMBOL_NOKASAN() So that we can export symbols directly from assembly files, let's make use of the generic . We have a few symbols that we'll want to conditionally export for !KASAN kernel builds, so we add a helper for that in . Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit 03ef055fd364e498c0633c163e7b0b0a52418e96 Author: Mark Rutland Date: Fri Dec 7 18:08:15 2018 +0000 arm64: move memstart_addr export inline Since we define memstart_addr in a C file, we can have the export immediately after the definition of the symbol, as we do elsewhere. As a step towards removing arm64ksyms.c, move the export of memstart_addr to init.c, where the symbol is defined. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit 2d7c89b02c62e02879c1fcecaaaccc7da0ea18e0 Author: Mark Rutland Date: Fri Dec 7 18:08:14 2018 +0000 arm64: remove bitop exports Now that the arm64 bitops are inlines built atop of the regular atomics, we don't need to export anything. Remove the redundant exports. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit 77990464bb39eb0f5cd41e4f9e3d6411f2883cac Author: Colin Ian King Date: Thu Dec 6 17:52:28 2018 +0000 xfrm: clean an indentation issue, remove a space Trivial fix to clean up indentation issue, remove an extraneous space. Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert commit 83fd1e52496b782a261804fadef8ff086e978584 Merge: 40e020c129cfc e822eac560a89 Author: Rafael J. Wysocki Date: Mon Dec 10 12:11:04 2018 +0100 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework changes for v4.21 from Viresh Kumar. * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Remove of_dev_pm_opp_find_required_opp() OPP: Rename and relocate of_genpd_opp_to_performance_state() OPP: Configure all required OPPs OPP: Add dev_pm_opp_{set|put}_genpd_virt_dev() helper PM / Domains: Add genpd_opp_to_performance_state() OPP: Populate OPPs from "required-opps" property OPP: Populate required opp tables from "required-opps" property OPP: Separate out custom OPP handler specific code OPP: Identify and mark genpd OPP tables PM / Domains: Rename genpd virtual devices as virt_dev commit 244add8ebfb231c39db9e33b204bd0ce8f24f782 Author: Tejas Joglekar Date: Mon Dec 10 16:08:13 2018 +0530 usb: dwc3: gadget: Disable CSP for stream OUT ep In stream mode, when fast-forwarding TRBs, the stream number is not cleared causing the new stream to not get assigned. So we don't want controller to carry on transfers when short packet is received. So disable the CSP for stream capable endpoint. This is based on the 3.30a Programming guide, where table 3-1 device descriptor structure field definitions says for CSP bit If this bit is 0, the controller generates an XferComplete event and remove the stream. So if we keep CSP as 1 then switching between streams would not happen as in stream mode, when fast-forwarding TRBs, the stream number is not cleared causing the new stream to not get assigned. Signed-off-by: Tejas Joglekar Signed-off-by: Felipe Balbi commit 46079bacb469c2eff15802fcccc88b0bd56b1e6e Merge: e854747d7593c 0bea4cc838351 Author: Takashi Iwai Date: Mon Dec 10 11:26:53 2018 +0100 Merge branch 'for-linus' into for-next Back-merge for resolving the conflict of fixup entries added in both branches. Signed-off-by: Takashi Iwai commit e80c1a9d5f514ce5134c6c4263a11607341466c9 Author: Tetsuo Handa Date: Tue Dec 4 19:00:01 2018 +0900 printk: fix printk_time race. Since printk_time can be toggled via /sys/module/printk/parameters/time , it is not safe to assume that output length does not change across multiple msg_print_text() calls. If we hit this race, we can observe failures such as SYSLOG_ACTION_READ_ALL writes more bytes than userspace has supplied, SYSLOG_ACTION_SIZE_UNREAD returns -EFAULT when succeeded, SYSLOG_ACTION_READ reads garbage memory or even triggers an kernel oops at _copy_to_user() due to integer overflow. To close this race, get a snapshot value of printk_time and pass it to SYSLOG_ACTION_READ, SYSLOG_ACTION_READ_ALL, SYSLOG_ACTION_SIZE_UNREAD and kmsg_dump_get_buffer(). Link: http://lkml.kernel.org/r/555af37c-b9e0-f940-cb73-a78eba2d4944@i-love.sakura.ne.jp To: Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org Signed-off-by: Tetsuo Handa Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit ef688fc79c5442d7115c6dffa31c5a87f95bc0d6 Author: Yangtao Li Date: Wed Dec 5 10:12:55 2018 -0500 platform/x86: intel_telemetry: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Andy Shevchenko commit 3b1f99558ddc204f1ece3dc8d4996dbdc26eb18d Author: Yangtao Li Date: Wed Dec 5 10:12:54 2018 -0500 platform/x86: intel_pmc_core: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Andy Shevchenko commit 599eefffcf6b9cff3e8cc2d96fd8eebfadab339c Author: Jouke Witteveen Date: Wed Dec 5 12:17:52 2018 +0100 platform/x86: thinkpad_acpi: Cleanup quirks macros - Use generic quirks macros for fan quirks The fan-specific quirks macros were duplicates of the generic ones. - Remove useless #undef lines The referenced macros are not defined anywhere. Signed-off-by: Jouke Witteveen Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko commit 01688a6d66b5aaa06f49d4d1336a9ee641fe3c46 Author: YueHaibing Date: Fri Dec 7 02:50:42 2018 +0000 USB: serial: mos7840: remove set but not used variables 'number, serial' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/serial/mos7840.c: In function 'mos7840_send_cmd_write_baud_rate': drivers/usb/serial/mos7840.c:1584:16: warning: variable 'number' set but not used [-Wunused-but-set-variable] drivers/usb/serial/mos7840.c: In function 'mos7840_change_port_settings': drivers/usb/serial/mos7840.c:1695:21: warning: variable 'serial' set but not used [-Wunused-but-set-variable] 'number' never used since introduction in commit 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") 'serial' not used since commit 5833041f1b13 ("USB: serial: remove unnecessary reinitialisations of urb->dev") Signed-off-by: YueHaibing Signed-off-by: Johan Hovold commit b53bde6686fb6952f560e82c5b6c529966d205a4 Merge: e67ebf1b3815b 40e020c129cfc Author: Greg Kroah-Hartman Date: Mon Dec 10 10:19:08 2018 +0100 Merge 4.20-rc6 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 9c96f401e91a4358eb4a5e227c1521dea1c20127 Merge: 1528e40fd7d38 40e020c129cfc Author: Greg Kroah-Hartman Date: Mon Dec 10 10:17:45 2018 +0100 Merge 4.20-rc6 into tty-next We want the TTY changes in here as well. Signed-off-by: Greg Kroah-Hartman commit 4addd2640fcaeb150b42a8a352b6c9d13d6c00af Author: Chanho Min Date: Mon Dec 10 16:49:54 2018 +0900 exec: make prepare_bprm_creds static prepare_bprm_creds is not used outside exec.c, so there's no reason for it to have external linkage. Signed-off-by: Chanho Min Signed-off-by: Al Viro commit a40612ef0ee1e524aafee58d0e5713cf5fdb3d62 Author: Al Viro Date: Mon Dec 10 03:40:11 2018 -0500 genheaders: %-s had been there since v6; %-*s - since v7 Please, use at least K&R C; printf had been able to left-adjust a field for as long as stdio existed and use of '*' for variable width had been there since v7. Yes, the first edition of K&R didn't cover the latter feature (it slightly predates v7), but you are using a much later feature of the language than that - in K&R C static char *stoupperx(const char *s) { ... } would've been spelled as static char *stoupperx(s) char *s; { ... } While we are at it, the use of strstr() is bogus - it finds the _first_ instance of substring, so it's a lousy fit for checking if a string ends with given suffix... Signed-off-by: Al Viro commit d3086550faea48d87343b34aca15be853ea79f96 Merge: 7146a4f02635f 40e020c129cfc Author: Greg Kroah-Hartman Date: Mon Dec 10 09:23:50 2018 +0100 Merge 4.20-rc6 into staging-next We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563 Merge: 48d365de7746a 40e020c129cfc Author: Greg Kroah-Hartman Date: Mon Dec 10 09:22:34 2018 +0100 Merge 4.20-rc6 into char-misc-next This should resolve the hv driver merge conflict. Signed-off-by: Greg Kroah-Hartman commit 67566ae474e628c0077163d1e20d09d3e33b0ae3 Author: Vladimir Zapolskiy Date: Sat Dec 8 16:38:41 2018 +0200 gpio: lpc18xx: fix GPIO controller driver build as a module The problem is reported for allmodconfig build setup: ERROR: "irq_chip_retrigger_hierarchy" [drivers/gpio/gpio-lpc18xx.ko] undefined! make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 make[1]: *** [Makefile:1271: modules] Error 2 My testing in runtime shows that it is sufficient to remove .irq_retrigger callback, which is assigned to unexported irq_chip_retrigger_hierarchy() function, I did't observe any regressions, and thus apparently it is a better fix rather than exporting the function defined in kernel/irq/chip.c (see commit 52b2a05fa7c8 ("genirq: Export IRQ functions for module use")) or sticking the GPIO controller driver build to built-in option only. Reported-by: kbuild test robot Fixes: 5ddabfe8d3de ("gpio: lpc18xx: add GPIO pin interrupt controller support") Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit 930e12992ed32a71048e4bf7abc8939eabcad0d7 Author: Firoz Khan Date: Mon Oct 8 09:36:47 2018 +0530 parisc: syscalls: ignore nfsservctl for other architectures This adds an exception to the syscall table checking script. nfsservctl entry is only provided on x86, and there is no reason to add it elsewhere. However, including it on the syscall table caused a warning for most configurations on non-x86. :696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp] Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit 575afc4d7f6040d7227dfcdd29cf0538fe644359 Author: Firoz Khan Date: Mon Nov 19 12:04:36 2018 +0530 parisc: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_32/64.h and syscall_table_32/64/c32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32.h files by the syscall table generation script invoked by parisc/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/syscall.S file. Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit 85e69701f58c9b2ec2975e31518b60e056bfebdf Author: Firoz Khan Date: Sun Sep 9 07:22:50 2018 +0530 parisc: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. - Compat entry name, if required. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32/64.h and syscall_table_32/64/c32.h files respect- ively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32/64.h will be included by uapi/asm/unistd.h and syscall_table_32/64/- c32.h is included by kernel/syscall.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit 28ff62a4b41ea782d07a4f219fbbb60d3c705e39 Author: Firoz Khan Date: Mon Nov 19 11:41:59 2018 +0530 parisc: remove __NR_Linux from uapi header file. The __NR_Linux defined as 0 to support HP-UX syscalls along with an offset to other system call. But support for HP-UX is gone and there is no need to define __NR_Linux as 0. One of the patch in this patch series will generate uapi header file which does have offset logic support. But here the offset value __NR_Linux defined as 0 and it doesn't make much effect. So remove the offset __NR_Linux from uapi header file. Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit dbf91a54f7cbf2b33c622e42ec0ec87f0423426c Author: Firoz Khan Date: Wed Sep 26 11:06:25 2018 +0530 parisc: add __NR_syscalls along with __NR_Linux_syscalls __NR_Linux_syscalls macro holds the number of system call exist in parisc architecture. We have to change the value of __NR_Linux_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update __NR- _Linux_syscalls value. 1. Update __NR_Linux_syscalls in asm/unistd.h manually by counting the no.of system calls. No need to update __NR- _Linux_syscalls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update __NR_Linux_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with __NR_Linux_syscalls asm/unistd.h. The macro __NR_sys- calls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit dfddd1a841c67d73dea4a24762c24194cb81808f Author: Firoz Khan Date: Sun Sep 9 07:04:16 2018 +0530 parisc: move __IGNORE* entries to non uapi header All the __IGNORE* entries are resides in the uapi header file move to non uapi header asm/unistd.h as it is not used by any user space applications. It is correct to keep __IGNORE* entry in non uapi header asm/unistd.h while uapi/asm/unistd.h must hold information only useful for user space applications. One of the patch in this patch series will generate uapi header file. The information which directly used by the user space application must be present in uapi file. Signed-off-by: Firoz Khan Acked-by: Helge Deller Signed-off-by: Helge Deller commit cc10ce0c51b13d1566d0ec1dcb472fb86330b391 Author: Martin Blumenstingl Date: Sun Dec 9 20:01:29 2018 +0100 usb: dwc2: disable power_down on Amlogic devices Disable power_down by setting the parameter to DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic Meson SoCs where USB devices are only recognized when plugged in before booting Linux. A hot-plugged USB device was not detected even though the device got power (my USB thumb drive for example has an LED which lit up). A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def ("usb: dwc2: disable power_down on rockchip devices"). That commit suggests that a change in the dwc2 driver is the cause because the default value for the "hibernate" parameter (which then got renamed to "power_down" to support other modes) was changed in the v4.17 merge window with: commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing"). Cc: # 4.19 Acked-by: Minas Harutyunyan Suggested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi commit c4bff35ca1bfba886da6223c9fed76a2b1382b8e Author: Helge Deller Date: Thu Nov 15 21:06:34 2018 +0100 parisc: Fix HP SDC hpa address output Show the hpa address of the HP SDC instead of a hashed value, e.g.: HP SDC: HP SDC at 0xf0201000, IRQ 23 (NMI IRQ 24) Signed-off-by: Helge Deller commit 785145171d17af2554128becd6a7c8f89e101141 Author: Helge Deller Date: Thu Nov 15 21:09:59 2018 +0100 parisc: Fix serio address output We want the hpa addresses printed in the serio modules, not some virtual ioremap()ed address, e.g.: serio: gsc-ps2-keyboard port at 0xf0108000 irq 22 @ 2:0:11 serio: gsc-ps2-mouse port at 0xf0108100 irq 22 @ 2:0:12 Signed-off-by: Helge Deller commit 8cc28269b9574103aae9088a02a20929ec75f983 Author: Helge Deller Date: Sat Nov 10 16:14:59 2018 +0100 parisc: Split out alternative live patching code Move the alternative implemenation coding to alternative.c and add code to patch modules while loading. Signed-off-by: Helge Deller commit 4cc1feeb6ffc2799f8badb4dea77c637d340cb0d Merge: a60956ed72f7b 40e020c129cfc Author: David S. Miller Date: Sun Dec 9 21:27:48 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Several conflicts, seemingly all over the place. I used Stephen Rothwell's sample resolutions for many of these, if not just to double check my own work, so definitely the credit largely goes to him. The NFP conflict consisted of a bug fix (moving operations past the rhashtable operation) while chaning the initial argument in the function call in the moved code. The net/dsa/master.c conflict had to do with a bug fix intermixing of making dsa_master_set_mtu() static with the fixing of the tagging attribute location. cls_flower had a conflict because the dup reject fix from Or overlapped with the addition of port range classifiction. __set_phy_supported()'s conflict was relatively easy to resolve because Andrew fixed it in both trees, so it was just a matter of taking the net-next copy. Or at least I think it was :-) Joe Stringer's fix to the handling of netns id 0 in bpf_sk_lookup() intermixed with changes on how the sdif and caller_net are calculated in these code paths in net-next. The remaining BPF conflicts were largely about the addition of the __bpf_md_ptr stuff in 'net' overlapping with adjustments and additions to the relevant data structure where the MD pointer macros are used. Signed-off-by: David S. Miller commit 0a1e8258a4fecd5aad2815b43bbe0ff014de1d8a Author: Chengguang Xu Date: Mon Dec 10 00:22:38 2018 -0500 ext4: compare old and new mode before setting update_mode flag If new mode is the same as old mode we don't have to reset inode mode in the rest of the code, so compare old and new mode before setting update_mode flag. Signed-off-by: Chengguang Xu Signed-off-by: Theodore Ts'o commit a73900b826ce6faded48ee3e41aa890fbeba4068 Author: A.s. Dong Date: Sat Nov 10 15:13:12 2018 +0000 ARM: dts: imx: add imx7ulp evk support The NXP i.MX 7ULP Evaluation Kit (EVK) provides a platform for rapid evaluation of the i.MX 7ULP, which features NXP's advanced implementation of the Arm Cortex-A7 core, the Arm Cortex-M4 core, as well as a 3D and 2D Graphics Processing Units (GPUs). The EVK enables HDMI output for simple out-of-the-box to bring up but allows reconfiguration for MIPI displays. The EVK is designed as a System-On-Module(SOM) board that connects to an associated baseboard. The SOM provides 1 GB LPDDR3, 8 MB Quad SPI flash, Micro SD 3.0 card socket, WiFi/ Bluetooth capability, USB 2.0 OTG with Type C connector and an NXP PF1550 power management IC (PMIC). The baseboard provides additional capabilities including a full SD/MMC 3.0 card socket, audio codec, multiple sensors, an HDMI connector, and an alternate MIPI display connector. Additionally, the EVK facilitates software development with the ultimate goal of faster time to market through the support of both Linux OS and AndroidTM rich operating systems, as well as FreeRTOS. This patch aims to support the preliminary booting up features as follows: GPIO LPUART FEC SD/MMC See more board details: https://www.nxp.com/products/processors-and-microcontrollers/ arm-based-processors-and-mcus/i.mx-applications-processors/ i.mx-7-processors/evaluation-kit-for-the-i.mx-7ulp-applications -processor:MCIMX7ULP-EVK Cc: Rob Herring Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 20434dc92c058898cc394e352e9c1f83f503dcfe Author: A.s. Dong Date: Sat Nov 10 15:13:08 2018 +0000 ARM: dts: imx: add common imx7ulp dtsi support The i.MX 7ULP family of processors features NXP's advanced implementation of the Arm Cortex-A7 core, the Arm Cortex-M4 core, as well as a 3D and 2D Graphics Processing Units (GPUs). This patch aims to add the initial support including: 1) CLK 2) GPIO PTC, PTD, PTE, PTF 3) uSDHC 1/2 4) LPUART 4/5/6/7 5) LPI2C 6/7 Cc: Rob Herring Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 61ccb001534b7d555e01d013ecb7f94bbf3d1bbe Author: A.s. Dong Date: Sat Nov 10 15:13:00 2018 +0000 dt-bindings: fsl: add imx7ulp pm related components bindings Add imx7ulp pm related components bindings. Cc: Shawn Guo Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2bf5751726e8face217a39f2132df643b995d8bc Author: A.s. Dong Date: Sat Nov 10 15:12:56 2018 +0000 dt-bindings: fsl: add compatible for imx7ulp evk Add compatible string for imx7ulp evk board. Cc: devicetree@vger.kernel.org Cc: Shawn Guo Acked-by: Rob Herring Signed-off-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7f68ffe0617b44fe189271701f6443beb23907ad Author: Fabio Estevam Date: Thu Dec 6 08:09:05 2018 -0200 ARM: dts: imx7d-pico: Add the imx7d-pico-hobbit variant The imx7d-pico-hobbit contains a imx7d-pico SoM and a hobbit baseboard. Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 9c77ba961ff2bca9ad0b158d0e23a76773c3eaf1 Author: Fabio Estevam Date: Thu Dec 6 08:09:04 2018 -0200 ARM: dts: imx7d-pico-pi: Extend peripherals support This adds following peripherals for the imx7d-pico-pi as: - LED - Touchscreen - GPIO Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit f13f571ac8a18c45f4c21bceda7cff3ad4e7ba03 Author: Fabio Estevam Date: Thu Dec 6 08:09:03 2018 -0200 ARM: dts: imx7d-pico: Extend peripherals support This extends the peripherals supported by the imx7d-pico.dtsi. It adds: - I2C2 - Flexcan (flexcan1 and flexcan2 ports) - USDHC1 - UART (6 and 7 ports) - PWM (4 ports) - eCSPI3 Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit bb1ff7ed6c1abfa1d4a376dd8750a0f7c731709f Author: Otavio Salvador Date: Thu Dec 6 08:09:02 2018 -0200 ARM: dts: imx7d-pico: Improve WiFi regulator name There are different models of WiFi being used in the SoM and the handle name was too restrictive. This reworks it to a more generic and meaningful name. Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 26255a529769e93736d1a9f955ec379513f71e27 Author: Fabio Estevam Date: Thu Dec 6 08:09:01 2018 -0200 ARM: dts: imx7d-pico: Pass the Ethernet PHY reset GPIO Pass the "phy-reset-gpios" property in order to describe the GPIO that performs the Ethernet PHY reset. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit ce48443443303904032686bf50587c2cf08a83e7 Author: Fabio Estevam Date: Thu Dec 6 08:09:00 2018 -0200 ARM: dts: imx7d-pico: Pass the USBOTG1_PWR pinctrl Pass the USBOTG1_PWR pinctrl description in the USBOTG GPIO controlled regulator. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 4edbe6aa46d15c8ac632b2b9f15c27414f940051 Author: Fabio Estevam Date: Thu Dec 6 08:08:59 2018 -0200 ARM: dts: imx7d-pico-pi: Move SoM related part to imx7d-pico.dtsi imx7d-pico-pi board contains: - One SoM board (imx7d pico) - One base board (pi). In order to make it easier for adding support for other board variants, move the commom SoM part to the imx7d-pico.dtsi file. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit a26aec533ec065cd54949d6958f97e0fd79c3bfb Author: Fabio Estevam Date: Thu Dec 6 08:08:58 2018 -0200 ARM: dts: imx7d-pico: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 50536c661194dcb43faeba8aaae85e3f34145ee4 Author: Fabio Estevam Date: Thu Dec 6 08:08:57 2018 -0200 ARM: dts: imx7d-pico: Do not harcode the memory size Currently the memory size described in dts is 2GB, which is incorrect. There are 512MB and 1GB versions of imx7d-pico boards, so remove the hardcoded memory size and let the bootloader pass the correct value to the kernel. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 2e8566106d284badf6ec94509f77fdf7725d04b4 Merge: 79da07dec740a f15096f12a4e9 Author: Shawn Guo Date: Mon Dec 10 10:32:51 2018 +0800 Merge tag 'imx-fixes-4.20-3' into imx7d/pico i.MX fixes for 4.20, round 3: - A couple of fixes on imx7d-pico and imx7d-nitrogen7 boards to correct the description of the Wifi clock. - Change SW2ISO count to get a safer ARM LDO ramp-up time, so that different boards can be covered. This fixes the ARM LDO failure seen on some customer boards. commit 7300375f181e06ba98183509065c6b71bead442d Author: Saeed Mahameed Date: Tue Dec 4 18:03:03 2018 -0800 net/mlx5: Move flow counters data structures from flow steering header After the following flow counters API refactoring: ("net/mlx5: Use flow counter IDs and not the wrapping cache object") flow counters private data structures mlx5_fc_cache and mlx5_fc are redundantly exposed in fs_core.h, they have nothing to do with flow steering core and they are private to fs_counter.c, this patch moves them to where they belong and reduces their exposure in the driver. Signed-off-by: Saeed Mahameed commit bdefffd13bf294a5a0c16255650020bff98954c7 Author: Tariq Toukan Date: Tue Dec 4 18:03:02 2018 -0800 IB/mlx5: Use helper to get CQE opcode Use the new helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Acked-by: Leon Romanovsky commit 6254adeb1f6943a66cbed892a5f683400b9db194 Author: Tariq Toukan Date: Tue Dec 4 18:03:01 2018 -0800 net/mlx5: Use helper to get CQE opcode Introduce and use a helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit fe206c209314f3cebe232518db9b5ad2606e34f1 Author: Daniel Jurgens Date: Tue Dec 4 18:03:00 2018 -0800 net/mlx5: When fetching CQEs return CQE instead of void pointer The function is only used to retrieve CQEs, use the proper type as the return value. Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit 79da07dec740a42c70963ebacbd2bf8866af9e20 Author: Andrey Smirnov Date: Thu Dec 6 21:41:17 2018 -0200 ARM: dts: imx51-zii-rdu1: Do not specify "power-gpio" for hpa1 TPA6130A2 SD pin on RDU1 is not really controlled by SoC and instead is only meant to notify the system that audio was "muted" by external actors. To accommodate that, drop "power-gpio" property of hpa1 node as well as specify a name for that GPIO so that userspace can access it. Signed-off-by: Andrey Smirnov Signed-off-by: Fabio Estevam Tested-by: Chris Healy Signed-off-by: Shawn Guo commit 81c0039b13c11bf77bbca700350d4f25d5cb2ec8 Author: Leonard Crestez Date: Thu Dec 6 19:22:16 2018 +0000 ARM: dts: imx6ul: Remove extra space between node name and brace Fixes: 7d1cd2978664 ("ARM: dts: imx6ul: add gpmi support") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 5649dbd31ef7c74acbf14c2f18c779572f75485e Author: Fabio Estevam Date: Thu Dec 6 08:36:41 2018 -0200 ARM: dts: imx6qdl-sabresd: Use GPIO_ACTIVE_HIGH for regulators Passing GPIO_ACTIVE_HIGH as GPIO flags for the GPIO controlled regulator improves the readability, so use it instead of the hardcoded number. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ca5c36ba42c1ad65f874c5e41edbd72866e47f83 Author: Dong Aisheng Date: Thu Dec 6 03:51:27 2018 +0000 ARM: dts: imx6ul: add flexcan support Add flexcan support for i.MX6UL board. Change the place of CAN node delete due to i.MX6ULZ include i.MX6UL dts but not support flexcan. Signed-off-by: Dong Aisheng Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 006303d6ba8edda0bbb2c2a271c2faa2968f18c8 Author: Jonathan Marek Date: Tue Dec 4 10:17:00 2018 -0500 ARM: dts: imx5: add gpu nodes This adds the gpu nodes for the adreno 200 GPU on iMX51 and iMX53, now supported by the freedreno driver. The compatible for the iMX51 uses a patchid of 1, which is used by drm/msm driver to identify the smaller 128KiB GMEM size. Signed-off-by: Jonathan Marek Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 47853f18b63557740ef730cb212035fae8d13c88 Author: Anson Huang Date: Thu Dec 6 01:42:42 2018 +0000 ARM: dts: imx6qdl-sabresd: add accelerometer sensor support Add accelerometer sensor mma8451 support on i2c1 bus. Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9e6a7c47c3c4b5478c0ba0e42b271930038b1765 Author: Anson Huang Date: Thu Dec 6 01:42:38 2018 +0000 ARM: dts: imx6qdl-sabresd: add magnetometer sensor support Add magnetometer sensor mag3110 support on i2c3 bus. Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit ab43e984049008ecfca7cba7a9d7666da4916d2e Author: Anson Huang Date: Thu Dec 6 01:42:34 2018 +0000 ARM: dts: imx6qdl-sabresd: add light sensor support Add isl29023 light sensor support on i2c3 bus, the light sensor's power is controlled by a fixed regulator, since the isl29023 driver and most of other sensors on same board like mag3110 and mma8451 do NOT support regulator operation currently, they are all controlled by this regulator, so this patch also adds the fixed regulator support and make it always on. Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 75ad7ff1797f62b011c7dde68981b10a089cfef9 Author: Fabio Estevam Date: Thu Dec 6 01:42:30 2018 +0000 ARM: dts: imx6qdl-sabresd: Move regulators outside of "simple-bus" It is not recommended to place regulators inside "simple-bus", so move them out to make it cleaner the addition of new regulators. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 404c0c9314f4f204ad82ef059424ff7e0b20fcd0 Author: Marco Franchi Date: Wed Dec 5 16:10:03 2018 -0200 ARM: dts: imx6qdl: Fix memory node duplication Boards based on imx6qdl have duplicate memory nodes: - One coming from the board device tree file: memory@ - One coming from the imx6qdl.dtsi file. Fix the duplication by removing the memory node from the imx6qdl.dtsi file and by adding 'device_type = "memory";' in the board Device Tree. Converted using the following command: perl -p0777i -e 's/memory\@10000000 \{\n/memory\@10000000 \{\n\t\tdevice_type = \"memory\";\n/m' `find ./arch/arm/boot/dts -name "imx6*"`` Reported-by: Rob Herring Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 69bf2fec500b59e2011bbf528e39c4a8f1b25020 Author: Fabio Estevam Date: Wed Dec 5 16:10:02 2018 -0200 ARM: dts: imx6dl-mamoj: Add a memory node Add a memory node, with an empty memory size, which will be filled by the bootloader. This is done in preparation for removing the memory node from imx6qdl.dtsi. Reported-by: Marco Franchi Signed-off-by: Fabio Estevam Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo commit 998a84c27a7f3f9133d32af64e19c05cec161a1a Author: Fabio Estevam Date: Wed Dec 5 16:10:01 2018 -0200 ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication imx53-voipac-dmm-668 has two memory nodes, but the correct representation would be to use a single one with two reg entries - one for each RAM chip select, so fix it accordingly. Reported-by: Marco Franchi Signed-off-by: Fabio Estevam Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo commit 3e03b4ac50454ea2dfacc135f2a5e2e935937ae6 Author: Fabio Estevam Date: Wed Dec 5 09:19:35 2018 -0200 ARM: dts: vf610-zii-scu4-aib: Add HI8435 support On the vf610-zii-scu4-aib board there is a hi8435 (32-channel discrete-to-digital SPI sensor device) in the DSPI0 bus. Add support for it. Signed-off-by: Fabio Estevam Reviewed-by: Chris Healy Signed-off-by: Shawn Guo commit c9a8cf0f1d6960911aa7303f95aef8a49a7e1f1f Author: Anson Huang Date: Wed Dec 5 01:14:25 2018 +0000 ARM: dts: imx6qdl-sabresd: add egalax touch screen support on i2c2 bus Add egalax touch screen support on i2c2 bus, it is connected to LVDS0, while the existing one on i2c3 bus is connected to LVDS1. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit cf1bb82b0bd5ac64b8a19674283558a79968305f Author: Aisheng Dong Date: Mon Dec 3 05:20:31 2018 +0000 ARM: dts: imx7s: Add flexcan stop mode wakeup support Add stop-mode property which is required by stop mode wakeup feature. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit f049557e478b96d654e7d7e29d1855bf031ca293 Author: Aisheng Dong Date: Mon Dec 3 05:20:27 2018 +0000 ARM: dts: imx6ul: Add flexcan stop mode wakeup support Add stop-mode property which is required by stop mode wakeup feature. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit d2463e8631ce5d4f7e7c294cac6ee6bbfbbd01c7 Author: Aisheng Dong Date: Mon Dec 3 05:20:23 2018 +0000 ARM: dts: imx6qdl: Add flexcan stop mode wakeup support Add stop-mode property which is required by stop mode wakeup feature. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 807d043c1226fe9f807fcebe498b51f96c822207 Author: Aisheng Dong Date: Mon Dec 3 05:20:19 2018 +0000 ARM: dts: imx6sx: Add flexcan stop mode wakeup support Add stop-mode property which is required by stop mode wakeup feature. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 0aa49c61995fdffd1b9bb7d222ca8f105f3e7c36 Author: Fabio Estevam Date: Sun Dec 2 19:18:09 2018 -0200 ARM: dts: imx6ul-pico: Add the imx6ul-pico-pi variant The imx6ul-pico-pi contains a imx6ul-pico SoM and a pi baseboard: https://www.technexion.com/products/pico-baseboards/detail/PICO-PI Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit cb430d971a568b4de940ef3aebd6e75e413283fd Author: Fabio Estevam Date: Sun Dec 2 19:18:08 2018 -0200 ARM: dts: imx6ul-pico-hobbit: Extend peripherals support This adds following peripherals support: - ADC - GPIO LED - GPIOs Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 4a20c26023f379ac41edd1479aec01d6de30e02b Author: Fabio Estevam Date: Sun Dec 2 19:18:07 2018 -0200 ARM: dts: imx6ul-pico-hobbit: Make the child led nodes standard Use the same child led node and label name as used in the imx7d-pico-hobbit board. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 093f911dba8c882225af0340fdedaf4a6118f4f6 Author: Fabio Estevam Date: Sun Dec 2 19:18:06 2018 -0200 ARM: dts: imx6ul-pico-hobbit: Move SoM related part to imx6ul-pico.dtsi imx6ul-pico-hobbit board contains: - One SoM board (imx6ul pico) - One base board (hobbit). In order to make it easier for adding support for other board variants, move the commom SoM part to the imx6ul-pico.dtsi file. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit dda0553cc270ee7e0b07674ab615be1d2700bda8 Author: Fabio Estevam Date: Sun Dec 2 19:18:05 2018 -0200 ARM: dts: imx6ul-pico-hobbit: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 1b9c329e1d02a0175f8bb77729ff13ba832d9752 Author: Peng Ma Date: Tue Oct 30 10:36:01 2018 +0800 ARM: dts: ls1021a: add qdma device tree nodes add the qDMA device tree nodes for LS1021A devices. Signed-off-by: Wen He Signed-off-by: Peng Ma Signed-off-by: Shawn Guo commit f535d100985548e8458cf28027198b71709a1ebe Author: Fabio Estevam Date: Fri Nov 30 22:44:52 2018 -0200 ARM: dts: vf: Fix memory node duplication Boards based on vf500/vf600 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the vf500.dtsi/vf610m4.dtsi files. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Shawn Guo commit d7f3894f0e46802ea55af4b859b9606d3a6bb107 Author: Fabio Estevam Date: Mon Dec 3 15:40:20 2018 -0200 ARM: dts: imx7: Correct mask for GIC PPI interrupts The GIC_CPU_MASK_SIMPLE() macro should take as its argument the actual number of CPU cores the interrupt controller is wired to. i.MX7S contains a single Cortex-A7, hence the second interrupt specifier cell for Private Peripheral Interrupts should use "GIC_CPU_MASK_SIMPLE(1)". Likewise, i.MX7D contains two Cortex-A7 cores, so it should use "GIC_CPU_MASK_SIMPLE(2)" instead. Tested on a imx7s-warp. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 0c29339d53bf7cf3b96847081ad7f64e835de4d4 Author: Fabio Estevam Date: Mon Dec 3 15:40:19 2018 -0200 ARM: dts: imx6ul: Correct mask for GIC PPI interrupts The GIC_CPU_MASK_SIMPLE() macro should take as its argument the actual number of CPU cores the interrupt controller is wired to. i.MX6UL contains a single Cortex-A7, hence the second interrupt specifier cell for Private Peripheral Interrupts should use "GIC_CPU_MASK_SIMPLE(1)". Tested on a imx6ul-evk. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f46af111c6948a842708d68d16564666ea2d1c68 Author: Fabio Estevam Date: Thu Nov 29 09:18:14 2018 -0200 ARM: dts: imx53: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9a79142655a420d4ad567d459755c09a90aba003 Author: Fabio Estevam Date: Thu Nov 29 09:18:13 2018 -0200 ARM: dts: imx50: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 577f0104e3fc7fd6120432a85d7a4ed41f60e28d Author: Aisheng Dong Date: Wed Nov 28 11:03:56 2018 +0000 ARM: dts: imx6qdl-sabreauto: add flexcan support The flexcan1 is pin conflict with fec. User would make flexcan1 enabled with fec disabled to use CAN. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 57ab56fa0b94c6e08e029fdf508db79511c81da4 Author: Aisheng Dong Date: Wed Nov 28 11:03:52 2018 +0000 ARM: dts: imx6sx-sabreauto: add flexcan support The CAN transceiver on MX6SX Sabreauto board seems in sleep mode by default after power up the board. User has to press the wakeup key on ARD baseboard before using the transceiver, or it may not work properly when power up the board at the first time(warm reset does not have such issue). This patch operates the wake pin too besides stby/en pins by chaining them together in regulator mode. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 88dddae62eefb309391e2b442c3dd077a12aa35a Author: Aisheng Dong Date: Wed Nov 28 11:03:48 2018 +0000 ARM: dts: imx6sx-sdb: add flexcan support CAN transceiver is different on RevA and RevB board. It's active high on RevA while active low on Rev B. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit f820ca29bfde05be286c346fdea69bd2a7b592c3 Author: Patrick Havelange Date: Tue Nov 27 15:09:44 2018 +0100 ARM: dts: ls1021a: add nodes for PWMs The LS1021A has 8 possible PWMs, so adding them (disabled by default) Signed-off-by: Patrick Havelange Signed-off-by: Shawn Guo commit 7ccdc892104eb897abb5c5ce24f99e7d15ac069e Author: Alex Gonzalez Date: Thu Oct 25 17:09:33 2018 +0200 ARM: dts: ccimx6ulsbcpro: Add support for Goodix touch controller The ConnectCore 6UL SBC Pro has an AUO/Goodix LCD accessory kit that is connected on the LVDS interface through an on-board LVDS transceiver. This change adds support for the touch interface. Signed-off-by: Alex Gonzalez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 429c4580287c4a73c7a0065210a08871f7a928bd Author: Alex Gonzalez Date: Thu Oct 25 17:09:31 2018 +0200 ARM: dts: ccimx6ulsbcpro: Enable AUO G101EVN010 lcdif panel This change adds support for the AUO G101EVN010 lcdif panel for the mxsfb DRM driver. Signed-off-by: Alex Gonzalez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 59d8bb363f563e4a147a291037bf979cb8ff9a59 Author: Fabio Estevam Date: Mon Nov 26 10:40:54 2018 -0200 ARM: dts: imx25: Fix memory node duplication Boards based on imx25 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx25.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 38715dcd49b4430ac5b6bc1293278d91a4d32bd5 Author: Fabio Estevam Date: Mon Nov 26 10:40:53 2018 -0200 ARM: dts: imx27: Fix memory node duplication Boards based on imx27 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx27.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 62864d5665c4fc636d3021f829b3ac00fa058e30 Author: Fabio Estevam Date: Mon Nov 26 10:40:52 2018 -0200 ARM: dts: imx1: Fix memory node duplication Boards based on imx1 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx1.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 32018d1525c6b8bcdb0fd99bf61f4e56c3d25963 Author: Fabio Estevam Date: Mon Nov 26 10:08:56 2018 -0200 ARM: dts: imx28: Fix memory node duplication Boards based on imx28 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx28.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b629e83520fafe6f4c2f3e8c88c78a496fc4987c Author: Fabio Estevam Date: Mon Nov 26 10:08:55 2018 -0200 ARM: dts: imx23: Fix memory node duplication Boards based on imx23 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx23.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 07a4b4600974c5473131dc3a48a532128ee094d3 Author: Fabio Estevam Date: Sun Nov 25 18:02:45 2018 -0200 ARM: dts: imx6: Switch NXP board dts to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Most of the i.MX NXP reference board dts files have already been converted, so switch the remaining ones. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit d9359f5807971add9eb10063837b003b193b7b88 Author: Fabio Estevam Date: Sun Nov 25 18:02:44 2018 -0200 ARM: dts: imx6qdl-wandboard: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Most of the wandboard dts files have already been converted, so switch the remaining ones. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit aab5e3ea95b958cf22a24e756a84e635bdb081c1 Author: Fabio Estevam Date: Fri Nov 23 11:25:19 2018 -0200 ARM: dts: imx50: Fix memory node duplication imx50-evk has duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx50.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 88d22f13a66cd9a767ae83c0cf8859ade1dd621d Author: Anson Huang Date: Thu Nov 22 02:55:45 2018 +0000 ARM: dts: imx6sll-evk: use WDOG_B pin reset i.MX6SLL EVK board has WDOG_B pin connected to the PMIC; Add the WDOG_B pinctrl entry and 'fsl,ext-reset-output' property to wdog node to let watchdog trigger a system POR reset via the PMIC. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 366a209c928a80c68f4a608f2f172b06ba9f9f9e Author: Anson Huang Date: Wed Nov 21 07:03:44 2018 +0000 ARM: dts: imx6sll-evk: add debug LED support On i.MX6SLL EVK board, there is a debug LED controlled by MX6SLL_PAD_EPDC_VCOM1__GPIO2_IO04 pin, add support for it. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4f6de45f1eee524d0230e49ca1c1c26865b33a31 Author: Leonard Crestez Date: Tue Nov 20 18:57:06 2018 +0000 ARM: dts: imx6qdl-sabreauto: Enable pcie The imx6qdl-sabreauto boards have a pcie slot so let's enable it. Tested on imx6dl-sabreauto with an atk9k wifi card; scanning works. There are unhandled differences for imx6qp but imx6qp-sabreauto.dts already contains a snippet explicitly disabling the &pcie node so that can be dealt with later. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 7fa8ab65ee15e386558ac5e971004712da91e2dd Author: Fabio Estevam Date: Tue Nov 20 13:59:45 2018 -0200 ARM: dts: imx6sl: Fix memory node duplication Boards based on imx6sl have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx6sl.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 216f35fedd8688c8b654ebfbad18c6e64713fad7 Author: Fabio Estevam Date: Tue Nov 20 13:59:44 2018 -0200 ARM: dts: imx6sx: Fix memory node duplication Boards based on imx6sx have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx6sx.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 750d8df6e7b269b828f66631a1d39ea027afc92a Author: Fabio Estevam Date: Tue Nov 20 13:59:43 2018 -0200 ARM: dts: imx6ul: Fix memory node duplication Boards based on imx6ul have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx6ul.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 76368cca639e95b1c15d3a3abcc3b72e1afdbb5a Author: Fabio Estevam Date: Tue Nov 20 13:59:42 2018 -0200 ARM: dts: imx6ul-ccimx6ulsom: Add memory node to board dts Add memory node to board dts. This is done in preparation of removing the memory node from imx6ul.dtsi. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 3f343ec3eabcded338b62c04eadc8173955ec64e Author: Anson Huang Date: Tue Nov 20 01:35:34 2018 +0000 ARM: dts: imx7d-sdb: add rev-a board support Current imx7d-sdb.dts has some incorrect settings about Rev-A and Rev-B boards, some of the settings are based on Rev-A board but some are based on Rev-B board, clean up it by adding i.MX7D SDB Rev-A board support, make default imx7d-sdb.dts for Rev-B board as usual, and introduce imx7d-sdb-reva.dts for Rev-A board. Below are the affected differences of Rev-A and Rev-B board: Rev-A Rev-B USB_OTG2_PWR: UART3_CTS_B GPIO1_IO07 ENET_EN_B: None GPIO1_IO04 TP_INT_B: EPDC_DATA13 EPDC_BDR1 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4d8aa0097dcc5285c4cbc2d709188dc19e967599 Author: Viresh Kumar Date: Fri Nov 16 15:31:11 2018 +0530 ARM: dts: ls1021a: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Shawn Guo commit 63e71fedc07c4ece748cb0d35642df1e42ebba79 Author: Jan Tuerk Date: Tue Nov 27 16:04:03 2018 +0100 ARM: dts: Add support for emtrion emCON-MX6 series This patch adds support for the emtrion GmbH emCON-MX6 modules. They are available with imx.6 Solo, Dual-Lite, Dual and Quad equipped with Memory from 512MB to 2GB (configured by U-Boot). Our default developer-Kit ships with the Avari baseboard and the EDT ETM0700G0BDH6 Display (imx6[q|dl]-emcon-avari). The devicetree is split into the common part providing all module components and the basic support for all SoC versions (imx6qdl-emcon.dtsi) and parts which are i.mx6 S|DL and D|Q relevant. Finally the support for the avari baseboard in the developer-kit configuration is provided by the emcon-avari dts files. Signed-off-by: Jan Tuerk Signed-off-by: Shawn Guo commit d87cf8ce52820256dcff3a52871d67e3994e39e0 Author: Jan Tuerk Date: Tue Nov 27 16:04:02 2018 +0100 dt-bindings: arm: Document emtrion emCON-MX6 bindings Document the compatible strings for emtrion emCON-MX6 SoM's. Signed-off-by: Jan Tuerk Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit fd12087d4882e32f061cabf168b4dafd69d41773 Author: Jan Tuerk Date: Tue Nov 27 16:04:01 2018 +0100 ARM: dts: imx: Add an cpu0 label for imx6dl devices Adding the label cpu0 allows the adjustment of cpu-parameters by reference in overlaying dtsi files in the same way as it is possible for imx6q devices. Signed-off-by: Jan Tuerk Reviewed-by: Andreas Färber Signed-off-by: Shawn Guo commit 4ca7dbdb06c1eda3ba68846c78ebbaefd70c55c0 Author: Frieder Schrempf Date: Thu Oct 18 09:45:04 2018 +0200 ARM: dts: imx: Add dummy PHYs for HSIC-only USB controllers Some SOCs in the i.MX6 family have a USB host controller that is only capable of the HSIC interface and has no on-board PHY. To be able to use these controllers, we need to add "usb-nop-xceiv" dummy PHYs. Signed-off-by: Frieder Schrempf Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7cd1abb3ae6b84391d68edcb9acd342398ee29c2 Author: Anson Huang Date: Wed Nov 7 08:51:07 2018 +0000 ARM: dts: imx6sx: specify proper clock for nodes with dummy clock From i.MX6SX reference manual CCM chapter, KPP and WDOGn use IPG clock as their clock, specify IPG clock for KPP and WDOGn instead of DUMMY clock. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 4246bd46ee99248301297b6adf251a680059899f Author: Hou Zhiqiang Date: Wed Nov 7 05:35:27 2018 +0000 ARM: dts: ls1021a: removed compatible string "snps,dw-pcie" Removed the wrong compatible string "snps,dw-pcie", in case match incorrect driver. Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo commit ac8ed2824e8d7655bbf4eb6d22ee08ca3f1f63d4 Author: Hou Zhiqiang Date: Wed Nov 7 05:35:22 2018 +0000 dt-bindings: pci: layerscape-pci: removed compatible string "snps,dw-pcie" Removed the compatible string "snps,dw-pcie", it is for the reference platform driver for PCI RC IP Protoyping Kits based on the ARC SDP, so it is not suitable for all platform with designware PCIe controller, and platform vendors have themselves' drivers. The compatible string "snsp,dw-pcie" was added by mistake and it's not matched that time, but it is matched because PCIe drivers has been collected recently. Signed-off-by: Hou Zhiqiang Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 8ff7754ae1f57c50a977aab7565ab84376ed6af6 Author: Hou Zhiqiang Date: Wed Nov 7 05:35:17 2018 +0000 dt-bindings: pci: layerscape-pci: add compatible strings "fsl,ls1043a-pcie" The PCIe compatible string for LS1043A was lost, so add it. Signed-off-by: Hou Zhiqiang Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 29988e867cb17de7119e971f9acfad2c3fccdb47 Author: Fabio Estevam Date: Tue Nov 6 13:40:47 2018 -0200 ARM: dts: imx7: Fix memory node duplication Boards based on imx7 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx7s.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 8721610a6c2b8c42fc57819d8c3bfbb9166f95a3 Author: Fabio Estevam Date: Tue Nov 6 13:40:46 2018 -0200 ARM: dts: imx35: Fix memory node duplication Boards based on imx35 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx35.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 013d37e4707e24c7b9bc3fc55aeda55ce9c2b262 Author: Fabio Estevam Date: Tue Nov 6 13:40:45 2018 -0200 ARM: dts: imx31: Fix memory node duplication Boards based on imx31 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx31.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy Signed-off-by: Shawn Guo commit d2cf9fd301538267015fdb6a5494da0cc8979868 Author: Fabio Estevam Date: Tue Nov 6 10:03:42 2018 -0200 ARM: dts: imx6sx: Complete the PXP support According to Documentation/devicetree/bindings/media/fsl-pxp.txt, only one PXP clock needs to be described and it should be named "axi". Also pass the compatible string as suggested in the bindings doc. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 6ff9ec2fea5ff2054520029cc717bca8a93b53a7 Author: Anson Huang Date: Tue Nov 6 09:19:41 2018 +0000 ARM: dts: imx6sl: vddpu is NOT an always-on regulator Remove "regulator-always-on" property for vddpu regulator since it can be OFF when GPU power domain is OFF. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 48dd72f82acaa10dddb3cddc64e6c41ae57defa3 Author: Anson Huang Date: Tue Nov 6 09:19:36 2018 +0000 ARM: dts: imx6sll: remove unused property in gpc node The "fsl,mf-mix-wakeup-irq" is ONLY used as a temporary solution in NXP's internal tree for Mega/Fast Mix off feature after suspend, upstream kernel does NOT need it, remove it. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit e8fd17b900a4a1e3a8bef7b44727cbad35db05a7 Author: Fabio Estevam Date: Mon Nov 5 19:14:46 2018 -0200 ARM: dts: imx53: Fix memory node duplication Boards based on imx53 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx53.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 6a9681168b83c62abfa457c709f2f4b126bd6b92 Author: Fabio Estevam Date: Mon Nov 5 19:14:45 2018 -0200 ARM: dts: imx51: Fix memory node duplication Boards based on imx51 have duplicate memory nodes: - One coming from the board dts file: memory@ - One coming from the imx51.dtsi file. Fix the duplication by removing the memory node from the dtsi file and by adding 'device_type = "memory";' in the board dts. Reported-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit de70d0e9d43dd5fa899ce3a1560a4d2536b6b71e Author: A.s. Dong Date: Sat Nov 10 15:13:04 2018 +0000 ARM: imx: add initial support for imx7ulp The i.MX 7ULP family of processors features NXP's advanced implementation of the Arm Cortex-A7 core, the Arm Cortex-M4 core, as well as a 3D and 2D Graphics Processing Units (GPUs). This patch aims to add an initial support for imx7ulp. Note that we need configure power mode to Partial Stop mode 3 with system/bus clock enabled first as the default enabled STOP mode will gate off system/bus clock when execute WFI in MX7ULP SoC. And there's still no MXC_CPU_IMX7ULP IDs read from register as ULP has no anatop as before. So we encode one with 0xff in reverse order in case new ones will be in the future. Cc: Shawn Guo Signed-off-by: Dong Aisheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7c41ea57beb2aee96fa63091a457b1a2826f3c42 Author: Uwe Kleine-König Date: Wed Nov 28 10:04:16 2018 +0100 ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed If debugging on i.MX is enabled DEBUG_IMX_UART_PORT defines which UART is used for the debug output. If however debugging is off don't only hide the then unused config item but drop it completely by using a dependency instead of a conditional prompt. This fixes DEBUG_IMX_UART_PORT being present in the kernel config even if DEBUG_LL is disabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit b6444cf5fa607469d9a14edef2edad32773f4514 Author: Leonard Crestez Date: Mon Oct 8 18:06:19 2018 +0000 soc: imx: gpc: Increase GPC_CLK_MAX to 7 The DISPLAY power domain on imx6sx has 7 clocks. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 96f774106ed48808a5e314741e3414c617d14460 Merge: 58ab5e32e6fd8 40e020c129cfc Author: Jens Axboe Date: Sun Dec 9 17:45:40 2018 -0700 Merge tag 'v4.20-rc6' into for-4.21/block Pull in v4.20-rc6 to resolve the conflict in NVMe, but also to get the two corruption fixes. We're going to be overhauling the direct dispatch path, and we need to do that on top of the changes we made for that in mainline. Signed-off-by: Jens Axboe commit 58ab5e32e6fd83e33943614e7257f2ac5823824a Author: Jens Axboe Date: Sun Dec 9 17:43:20 2018 -0700 sbitmap: silence bogus lockdep IRQ warning Ming reports that lockdep spews the following trace. What this essentially says is that the sbitmap swap_lock was used inconsistently in IRQ enabled and disabled context, and that is usually indicative of a bug that will cause a deadlock. For this case, it's a false positive. The swap_lock is used from process context only, when we swap the bits in the word and cleared mask. We also end up doing that when we are getting a driver tag, from the blk_mq_mark_tag_wait(), and from there we hold the waitqueue lock with IRQs disabled. However, this isn't from an actual IRQ, it's still process context. In lieu of a better way to fix this, simply always disable interrupts when grabbing the swap_lock if lockdep is enabled. [ 100.967642] ================start test sanity/001================ [ 101.238280] null: module loaded [ 106.093735] [ 106.094012] ===================================================== [ 106.094854] WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected [ 106.095759] 4.20.0-rc3_5d2ee7122c73_for-next+ #1 Not tainted [ 106.096551] ----------------------------------------------------- [ 106.097386] fio/1043 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 106.098231] 000000004c43fa71 (&(&sb->map[i].swap_lock)->rlock){+.+.}, at: sbitmap_get+0xd5/0x22c [ 106.099431] [ 106.099431] and this task is already holding: [ 106.100229] 000000007eec8b2f (&(&hctx->dispatch_wait_lock)->rlock){....}, at: blk_mq_dispatch_rq_list+0x4c1/0xd7c [ 106.101630] which would create a new lock dependency: [ 106.102326] (&(&hctx->dispatch_wait_lock)->rlock){....} -> (&(&sb->map[i].swap_lock)->rlock){+.+.} [ 106.103553] [ 106.103553] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 106.104580] (&sbq->ws[i].wait){..-.} [ 106.104582] [ 106.104582] ... which became SOFTIRQ-irq-safe at: [ 106.105751] _raw_spin_lock_irqsave+0x4b/0x82 [ 106.106284] __wake_up_common_lock+0x119/0x1b9 [ 106.106825] sbitmap_queue_wake_up+0x33f/0x383 [ 106.107456] sbitmap_queue_clear+0x4c/0x9a [ 106.108046] __blk_mq_free_request+0x188/0x1d3 [ 106.108581] blk_mq_free_request+0x23b/0x26b [ 106.109102] scsi_end_request+0x345/0x5d7 [ 106.109587] scsi_io_completion+0x4b5/0x8f0 [ 106.110099] scsi_finish_command+0x412/0x456 [ 106.110615] scsi_softirq_done+0x23f/0x29b [ 106.111115] blk_done_softirq+0x2a7/0x2e6 [ 106.111608] __do_softirq+0x360/0x6ad [ 106.112062] run_ksoftirqd+0x2f/0x5b [ 106.112499] smpboot_thread_fn+0x3a5/0x3db [ 106.113000] kthread+0x1d4/0x1e4 [ 106.113457] ret_from_fork+0x3a/0x50 [ 106.113969] [ 106.113969] to a SOFTIRQ-irq-unsafe lock: [ 106.114672] (&(&sb->map[i].swap_lock)->rlock){+.+.} [ 106.114674] [ 106.114674] ... which became SOFTIRQ-irq-unsafe at: [ 106.116000] ... [ 106.116003] _raw_spin_lock+0x33/0x64 [ 106.116676] sbitmap_get+0xd5/0x22c [ 106.117134] __sbitmap_queue_get+0xe8/0x177 [ 106.117731] __blk_mq_get_tag+0x1e6/0x22d [ 106.118286] blk_mq_get_tag+0x1db/0x6e4 [ 106.118756] blk_mq_get_driver_tag+0x161/0x258 [ 106.119383] blk_mq_dispatch_rq_list+0x28e/0xd7c [ 106.120043] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.120607] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.121234] __blk_mq_run_hw_queue+0x137/0x17e [ 106.121781] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.122366] blk_mq_run_hw_queue+0x151/0x187 [ 106.122887] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.123492] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.124042] blk_flush_plug_list+0x392/0x3d7 [ 106.124557] blk_finish_plug+0x37/0x4f [ 106.125019] read_pages+0x3ef/0x430 [ 106.125446] __do_page_cache_readahead+0x18e/0x2fc [ 106.126027] force_page_cache_readahead+0x121/0x133 [ 106.126621] page_cache_sync_readahead+0x35f/0x3bb [ 106.127229] generic_file_buffered_read+0x410/0x1860 [ 106.127932] __vfs_read+0x319/0x38f [ 106.128415] vfs_read+0xd2/0x19a [ 106.128817] ksys_read+0xb9/0x135 [ 106.129225] do_syscall_64+0x140/0x385 [ 106.129684] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.130292] [ 106.130292] other info that might help us debug this: [ 106.130292] [ 106.131226] Chain exists of: [ 106.131226] &sbq->ws[i].wait --> &(&hctx->dispatch_wait_lock)->rlock --> &(&sb->map[i].swap_lock)->rlock [ 106.131226] [ 106.132865] Possible interrupt unsafe locking scenario: [ 106.132865] [ 106.133659] CPU0 CPU1 [ 106.134194] ---- ---- [ 106.134733] lock(&(&sb->map[i].swap_lock)->rlock); [ 106.135318] local_irq_disable(); [ 106.136014] lock(&sbq->ws[i].wait); [ 106.136747] lock(&(&hctx->dispatch_wait_lock)->rlock); [ 106.137742] [ 106.138110] lock(&sbq->ws[i].wait); [ 106.138625] [ 106.138625] *** DEADLOCK *** [ 106.138625] [ 106.139430] 3 locks held by fio/1043: [ 106.139947] #0: 0000000076ff0fd9 (rcu_read_lock){....}, at: hctx_lock+0x29/0xe8 [ 106.140813] #1: 000000002feb1016 (&sbq->ws[i].wait){..-.}, at: blk_mq_dispatch_rq_list+0x4ad/0xd7c [ 106.141877] #2: 000000007eec8b2f (&(&hctx->dispatch_wait_lock)->rlock){....}, at: blk_mq_dispatch_rq_list+0x4c1/0xd7c [ 106.143267] [ 106.143267] the dependencies between SOFTIRQ-irq-safe lock and the holding lock: [ 106.144351] -> (&sbq->ws[i].wait){..-.} ops: 82 { [ 106.144926] IN-SOFTIRQ-W at: [ 106.145314] _raw_spin_lock_irqsave+0x4b/0x82 [ 106.146042] __wake_up_common_lock+0x119/0x1b9 [ 106.146785] sbitmap_queue_wake_up+0x33f/0x383 [ 106.147567] sbitmap_queue_clear+0x4c/0x9a [ 106.148379] __blk_mq_free_request+0x188/0x1d3 [ 106.149148] blk_mq_free_request+0x23b/0x26b [ 106.149864] scsi_end_request+0x345/0x5d7 [ 106.150546] scsi_io_completion+0x4b5/0x8f0 [ 106.151367] scsi_finish_command+0x412/0x456 [ 106.152157] scsi_softirq_done+0x23f/0x29b [ 106.152855] blk_done_softirq+0x2a7/0x2e6 [ 106.153537] __do_softirq+0x360/0x6ad [ 106.154280] run_ksoftirqd+0x2f/0x5b [ 106.155020] smpboot_thread_fn+0x3a5/0x3db [ 106.155828] kthread+0x1d4/0x1e4 [ 106.156526] ret_from_fork+0x3a/0x50 [ 106.157267] INITIAL USE at: [ 106.157713] _raw_spin_lock_irqsave+0x4b/0x82 [ 106.158542] prepare_to_wait_exclusive+0xa8/0x215 [ 106.159421] blk_mq_get_tag+0x34f/0x6e4 [ 106.160186] blk_mq_get_request+0x48e/0xaef [ 106.160997] blk_mq_make_request+0x27e/0xbd2 [ 106.161828] generic_make_request+0x4d1/0x873 [ 106.162661] submit_bio+0x20c/0x253 [ 106.163379] mpage_bio_submit+0x44/0x4b [ 106.164142] mpage_readpages+0x3c2/0x407 [ 106.164919] read_pages+0x13a/0x430 [ 106.165633] __do_page_cache_readahead+0x18e/0x2fc [ 106.166530] force_page_cache_readahead+0x121/0x133 [ 106.167439] page_cache_sync_readahead+0x35f/0x3bb [ 106.168337] generic_file_buffered_read+0x410/0x1860 [ 106.169255] __vfs_read+0x319/0x38f [ 106.169977] vfs_read+0xd2/0x19a [ 106.170662] ksys_read+0xb9/0x135 [ 106.171356] do_syscall_64+0x140/0x385 [ 106.172120] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.173051] } [ 106.173308] ... key at: [] __key.26481+0x0/0x40 [ 106.174219] ... acquired at: [ 106.174646] _raw_spin_lock+0x33/0x64 [ 106.175183] blk_mq_dispatch_rq_list+0x4c1/0xd7c [ 106.175843] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.176518] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.177262] __blk_mq_run_hw_queue+0x137/0x17e [ 106.177900] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.178591] blk_mq_run_hw_queue+0x151/0x187 [ 106.179207] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.179926] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.180571] blk_flush_plug_list+0x392/0x3d7 [ 106.181187] blk_finish_plug+0x37/0x4f [ 106.181737] __se_sys_io_submit+0x171/0x304 [ 106.182346] do_syscall_64+0x140/0x385 [ 106.182895] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.183607] [ 106.183830] -> (&(&hctx->dispatch_wait_lock)->rlock){....} ops: 1 { [ 106.184691] INITIAL USE at: [ 106.185119] _raw_spin_lock+0x33/0x64 [ 106.185838] blk_mq_dispatch_rq_list+0x4c1/0xd7c [ 106.186697] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.187551] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.188481] __blk_mq_run_hw_queue+0x137/0x17e [ 106.189307] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.190189] blk_mq_run_hw_queue+0x151/0x187 [ 106.190989] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.191902] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.192739] blk_flush_plug_list+0x392/0x3d7 [ 106.193535] blk_finish_plug+0x37/0x4f [ 106.194269] __se_sys_io_submit+0x171/0x304 [ 106.195059] do_syscall_64+0x140/0x385 [ 106.195794] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.196705] } [ 106.196950] ... key at: [] __key.51231+0x0/0x40 [ 106.197853] ... acquired at: [ 106.198270] lock_acquire+0x280/0x2f3 [ 106.198806] _raw_spin_lock+0x33/0x64 [ 106.199337] sbitmap_get+0xd5/0x22c [ 106.199850] __sbitmap_queue_get+0xe8/0x177 [ 106.200450] __blk_mq_get_tag+0x1e6/0x22d [ 106.201035] blk_mq_get_tag+0x1db/0x6e4 [ 106.201589] blk_mq_get_driver_tag+0x161/0x258 [ 106.202237] blk_mq_dispatch_rq_list+0x5b9/0xd7c [ 106.202902] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.203572] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.204316] __blk_mq_run_hw_queue+0x137/0x17e [ 106.204956] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.205649] blk_mq_run_hw_queue+0x151/0x187 [ 106.206269] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.206997] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.207644] blk_flush_plug_list+0x392/0x3d7 [ 106.208264] blk_finish_plug+0x37/0x4f [ 106.208814] __se_sys_io_submit+0x171/0x304 [ 106.209415] do_syscall_64+0x140/0x385 [ 106.209965] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.210684] [ 106.210904] [ 106.210904] the dependencies between the lock to be acquired [ 106.210905] and SOFTIRQ-irq-unsafe lock: [ 106.212541] -> (&(&sb->map[i].swap_lock)->rlock){+.+.} ops: 1969 { [ 106.213393] HARDIRQ-ON-W at: [ 106.213840] _raw_spin_lock+0x33/0x64 [ 106.214570] sbitmap_get+0xd5/0x22c [ 106.215282] __sbitmap_queue_get+0xe8/0x177 [ 106.216086] __blk_mq_get_tag+0x1e6/0x22d [ 106.216876] blk_mq_get_tag+0x1db/0x6e4 [ 106.217627] blk_mq_get_driver_tag+0x161/0x258 [ 106.218465] blk_mq_dispatch_rq_list+0x28e/0xd7c [ 106.219326] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.220198] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.221138] __blk_mq_run_hw_queue+0x137/0x17e [ 106.221975] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.222874] blk_mq_run_hw_queue+0x151/0x187 [ 106.223686] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.224597] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.225444] blk_flush_plug_list+0x392/0x3d7 [ 106.226255] blk_finish_plug+0x37/0x4f [ 106.227006] read_pages+0x3ef/0x430 [ 106.227717] __do_page_cache_readahead+0x18e/0x2fc [ 106.228595] force_page_cache_readahead+0x121/0x133 [ 106.229491] page_cache_sync_readahead+0x35f/0x3bb [ 106.230373] generic_file_buffered_read+0x410/0x1860 [ 106.231277] __vfs_read+0x319/0x38f [ 106.231986] vfs_read+0xd2/0x19a [ 106.232666] ksys_read+0xb9/0x135 [ 106.233350] do_syscall_64+0x140/0x385 [ 106.234097] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.235012] SOFTIRQ-ON-W at: [ 106.235460] _raw_spin_lock+0x33/0x64 [ 106.236195] sbitmap_get+0xd5/0x22c [ 106.236913] __sbitmap_queue_get+0xe8/0x177 [ 106.237715] __blk_mq_get_tag+0x1e6/0x22d [ 106.238488] blk_mq_get_tag+0x1db/0x6e4 [ 106.239244] blk_mq_get_driver_tag+0x161/0x258 [ 106.240079] blk_mq_dispatch_rq_list+0x28e/0xd7c [ 106.240937] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.241806] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.242751] __blk_mq_run_hw_queue+0x137/0x17e [ 106.243579] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.244469] blk_mq_run_hw_queue+0x151/0x187 [ 106.245277] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.246191] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.247044] blk_flush_plug_list+0x392/0x3d7 [ 106.247859] blk_finish_plug+0x37/0x4f [ 106.248749] read_pages+0x3ef/0x430 [ 106.249463] __do_page_cache_readahead+0x18e/0x2fc [ 106.250357] force_page_cache_readahead+0x121/0x133 [ 106.251263] page_cache_sync_readahead+0x35f/0x3bb [ 106.252157] generic_file_buffered_read+0x410/0x1860 [ 106.253084] __vfs_read+0x319/0x38f [ 106.253808] vfs_read+0xd2/0x19a [ 106.254488] ksys_read+0xb9/0x135 [ 106.255186] do_syscall_64+0x140/0x385 [ 106.255943] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.256867] INITIAL USE at: [ 106.257300] _raw_spin_lock+0x33/0x64 [ 106.258033] sbitmap_get+0xd5/0x22c [ 106.258747] __sbitmap_queue_get+0xe8/0x177 [ 106.259542] __blk_mq_get_tag+0x1e6/0x22d [ 106.260320] blk_mq_get_tag+0x1db/0x6e4 [ 106.261072] blk_mq_get_driver_tag+0x161/0x258 [ 106.261902] blk_mq_dispatch_rq_list+0x28e/0xd7c [ 106.262762] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.263626] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.264571] __blk_mq_run_hw_queue+0x137/0x17e [ 106.265409] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.266302] blk_mq_run_hw_queue+0x151/0x187 [ 106.267111] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.268028] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.268878] blk_flush_plug_list+0x392/0x3d7 [ 106.269694] blk_finish_plug+0x37/0x4f [ 106.270432] read_pages+0x3ef/0x430 [ 106.271139] __do_page_cache_readahead+0x18e/0x2fc [ 106.272040] force_page_cache_readahead+0x121/0x133 [ 106.272932] page_cache_sync_readahead+0x35f/0x3bb [ 106.273811] generic_file_buffered_read+0x410/0x1860 [ 106.274709] __vfs_read+0x319/0x38f [ 106.275407] vfs_read+0xd2/0x19a [ 106.276074] ksys_read+0xb9/0x135 [ 106.276764] do_syscall_64+0x140/0x385 [ 106.277500] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 106.278417] } [ 106.278676] ... key at: [] __key.26212+0x0/0x40 [ 106.279586] ... acquired at: [ 106.280026] lock_acquire+0x280/0x2f3 [ 106.280559] _raw_spin_lock+0x33/0x64 [ 106.281101] sbitmap_get+0xd5/0x22c [ 106.281610] __sbitmap_queue_get+0xe8/0x177 [ 106.282221] __blk_mq_get_tag+0x1e6/0x22d [ 106.282809] blk_mq_get_tag+0x1db/0x6e4 [ 106.283368] blk_mq_get_driver_tag+0x161/0x258 [ 106.284018] blk_mq_dispatch_rq_list+0x5b9/0xd7c [ 106.284685] blk_mq_do_dispatch_sched+0x23a/0x287 [ 106.285371] blk_mq_sched_dispatch_requests+0x379/0x3fc [ 106.286135] __blk_mq_run_hw_queue+0x137/0x17e [ 106.286806] __blk_mq_delay_run_hw_queue+0x80/0x25f [ 106.287515] blk_mq_run_hw_queue+0x151/0x187 [ 106.288149] blk_mq_sched_insert_requests+0x13f/0x175 [ 106.289041] blk_mq_flush_plug_list+0x7d6/0x81b [ 106.289912] blk_flush_plug_list+0x392/0x3d7 [ 106.290590] blk_finish_plug+0x37/0x4f [ 106.291238] __se_sys_io_submit+0x171/0x304 [ 106.291864] do_syscall_64+0x140/0x385 [ 106.292534] entry_SYSCALL_64_after_hwframe+0x49/0xbe Reported-by: Ming Lei Tested-by: Guenter Roeck Signed-off-by: Jens Axboe commit 01d3240a04f4c09392e13c77b54d4423ebce2d72 Author: Sean Young Date: Thu Dec 6 13:01:03 2018 +0000 media: bpf: add bpf function to report mouse movement Some IR remotes have a directional pad or other pointer-like thing that can be used as a mouse. Make it possible to decode these types of IR protocols in BPF. Cc: netdev@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Alexei Starovoitov commit ca5d1a7fad0f8a95cbcc992fcfd687b4c5653619 Merge: 6baefa1aa46f0 b053b439b72ad Author: Alexei Starovoitov Date: Sun Dec 9 13:54:39 2018 -0800 Merge branch 'bpf_line_info' Martin Lau says: ==================== This patch series introduces the bpf_line_info. Please see individual patch for details. It will be useful for introspection purpose, like: [root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv [...] int test_long_fname_2(struct dummy_tracepoint_args * arg): bpf_prog_44a040bf25481309_test_long_fname_2: ; static int test_long_fname_2(struct dummy_tracepoint_args *arg) 0: push %rbp 1: mov %rsp,%rbp 4: sub $0x30,%rsp b: sub $0x28,%rbp f: mov %rbx,0x0(%rbp) 13: mov %r13,0x8(%rbp) 17: mov %r14,0x10(%rbp) 1b: mov %r15,0x18(%rbp) 1f: xor %eax,%eax 21: mov %rax,0x20(%rbp) 25: xor %esi,%esi ; int key = 0; 27: mov %esi,-0x4(%rbp) ; if (!arg->sock) 2a: mov 0x8(%rdi),%rdi ; if (!arg->sock) 2e: cmp $0x0,%rdi 32: je 0x0000000000000070 34: mov %rbp,%rsi ; counts = bpf_map_lookup_elem(&btf_map, &key); 37: add $0xfffffffffffffffc,%rsi 3b: movabs $0xffff8881139d7480,%rdi 45: add $0x110,%rdi 4c: mov 0x0(%rsi),%eax 4f: cmp $0x4,%rax 53: jae 0x000000000000005e 55: shl $0x3,%rax 59: add %rdi,%rax 5c: jmp 0x0000000000000060 5e: xor %eax,%eax ; if (!counts) 60: cmp $0x0,%rax 64: je 0x0000000000000070 ; counts->v6++; 66: mov 0x4(%rax),%edi 69: add $0x1,%rdi 6d: mov %edi,0x4(%rax) 70: mov 0x0(%rbp),%rbx 74: mov 0x8(%rbp),%r13 78: mov 0x10(%rbp),%r14 7c: mov 0x18(%rbp),%r15 80: add $0x28,%rbp 84: leaveq 85: retq [...] ==================== Signed-off-by: Alexei Starovoitov commit b053b439b72ad152257ecc3f71cfb4c619b0137e Author: Martin KaFai Lau Date: Fri Dec 7 16:42:32 2018 -0800 bpf: libbpf: bpftool: Print bpf_line_info during prog dump This patch adds print bpf_line_info function in 'prog dump jitted' and 'prog dump xlated': [root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv [...] int test_long_fname_2(struct dummy_tracepoint_args * arg): bpf_prog_44a040bf25481309_test_long_fname_2: ; static int test_long_fname_2(struct dummy_tracepoint_args *arg) 0: push %rbp 1: mov %rsp,%rbp 4: sub $0x30,%rsp b: sub $0x28,%rbp f: mov %rbx,0x0(%rbp) 13: mov %r13,0x8(%rbp) 17: mov %r14,0x10(%rbp) 1b: mov %r15,0x18(%rbp) 1f: xor %eax,%eax 21: mov %rax,0x20(%rbp) 25: xor %esi,%esi ; int key = 0; 27: mov %esi,-0x4(%rbp) ; if (!arg->sock) 2a: mov 0x8(%rdi),%rdi ; if (!arg->sock) 2e: cmp $0x0,%rdi 32: je 0x0000000000000070 34: mov %rbp,%rsi ; counts = bpf_map_lookup_elem(&btf_map, &key); 37: add $0xfffffffffffffffc,%rsi 3b: movabs $0xffff8881139d7480,%rdi 45: add $0x110,%rdi 4c: mov 0x0(%rsi),%eax 4f: cmp $0x4,%rax 53: jae 0x000000000000005e 55: shl $0x3,%rax 59: add %rdi,%rax 5c: jmp 0x0000000000000060 5e: xor %eax,%eax ; if (!counts) 60: cmp $0x0,%rax 64: je 0x0000000000000070 ; counts->v6++; 66: mov 0x4(%rax),%edi 69: add $0x1,%rdi 6d: mov %edi,0x4(%rax) 70: mov 0x0(%rbp),%rbx 74: mov 0x8(%rbp),%r13 78: mov 0x10(%rbp),%r14 7c: mov 0x18(%rbp),%r15 80: add $0x28,%rbp 84: leaveq 85: retq [...] With linum: [root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool prog dump jited pinned /sys/fs/bpf/test_btf_haskv linum int _dummy_tracepoint(struct dummy_tracepoint_args * arg): bpf_prog_b07ccb89267cf242__dummy_tracepoint: ; return test_long_fname_1(arg); [file:/data/users/kafai/fb-kernel/linux/tools/testing/selftests/bpf/test_btf_haskv.c line_num:54 line_col:9] 0: push %rbp 1: mov %rsp,%rbp 4: sub $0x28,%rsp b: sub $0x28,%rbp f: mov %rbx,0x0(%rbp) 13: mov %r13,0x8(%rbp) 17: mov %r14,0x10(%rbp) 1b: mov %r15,0x18(%rbp) 1f: xor %eax,%eax 21: mov %rax,0x20(%rbp) 25: callq 0x000000000000851e ; return test_long_fname_1(arg); [file:/data/users/kafai/fb-kernel/linux/tools/testing/selftests/bpf/test_btf_haskv.c line_num:54 line_col:2] 2a: xor %eax,%eax 2c: mov 0x0(%rbp),%rbx 30: mov 0x8(%rbp),%r13 34: mov 0x10(%rbp),%r14 38: mov 0x18(%rbp),%r15 3c: add $0x28,%rbp 40: leaveq 41: retq [...] Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 3d65014146c69bbc4d2947f60dbd722d352cdc46 Author: Martin KaFai Lau Date: Fri Dec 7 16:42:31 2018 -0800 bpf: libbpf: Add btf_line_info support to libbpf This patch adds bpf_line_info support to libbpf: 1) Parsing the line_info sec from ".BTF.ext" 2) Relocating the line_info. If the main prog *_info relocation fails, it will ignore the remaining subprog line_info and continue. If the subprog *_info relocation fails, it will bail out. 3) BPF_PROG_LOAD a prog with line_info Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit f0187f0b17fad7439f510eff4d65606c9ea1190f Author: Martin KaFai Lau Date: Fri Dec 7 16:42:29 2018 -0800 bpf: libbpf: Refactor and bug fix on the bpf_func_info loading logic This patch refactor and fix a bug in the libbpf's bpf_func_info loading logic. The bug fix and refactoring are targeting the same commit 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") which is in the bpf-next branch. 1) In bpf_load_program_xattr(), it should retry when errno == E2BIG regardless of log_buf and log_buf_sz. This patch fixes it. 2) btf_ext__reloc_init() and btf_ext__reloc() are essentially the same except btf_ext__reloc_init() always has insns_cnt == 0. Hence, btf_ext__reloc_init() is removed. btf_ext__reloc() is also renamed to btf_ext__reloc_func_info() to get ready for the line_info support in the next patch. 3) Consolidate func_info section logic from "btf_ext_parse_hdr()", "btf_ext_validate_func_info()" and "btf_ext__new()" to a new function "btf_ext_copy_func_info()" such that similar logic can be reused by the later libbpf's line_info patch. 4) The next line_info patch will store line_info_cnt instead of line_info_len in the bpf_program because the kernel is taking line_info_cnt also. It will save a few "len" to "cnt" conversions and will also save some function args. Hence, this patch also makes bpf_program to store func_info_cnt instead of func_info_len. 5) btf_ext depends on btf. e.g. the func_info's type_id in ".BTF.ext" is not useful when ".BTF" is absent. This patch only init the obj->btf_ext pointer after it has successfully init the obj->btf pointer. This can avoid always checking "obj->btf && obj->btf_ext" together for accessing ".BTF.ext". Checking "obj->btf_ext" alone will do. 6) Move "struct btf_sec_func_info" from btf.h to btf.c. There is no external usage outside btf.c. Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 4d6304c763551cdb420201b1b754cc625d56bdd6 Author: Martin KaFai Lau Date: Fri Dec 7 16:42:28 2018 -0800 bpf: Add unit tests for bpf_line_info Add unit tests for bpf_line_info for both BPF_PROG_LOAD and BPF_OBJ_GET_INFO_BY_FD. jit enabled: [root@arch-fb-vm1 bpf]# ./test_btf -k 0 BTF prog info raw test[5] (line_info (No subprog)): OK BTF prog info raw test[6] (line_info (No subprog. insn_off >= prog->len)): OK BTF prog info raw test[7] (line_info (No subprog. zero tailing line_info): OK BTF prog info raw test[8] (line_info (No subprog. nonzero tailing line_info)): OK BTF prog info raw test[9] (line_info (subprog)): OK BTF prog info raw test[10] (line_info (subprog + func_info)): OK BTF prog info raw test[11] (line_info (subprog. missing 1st func line info)): OK BTF prog info raw test[12] (line_info (subprog. missing 2nd func line info)): OK BTF prog info raw test[13] (line_info (subprog. unordered insn offset)): OK jit disabled: BTF prog info raw test[5] (line_info (No subprog)): not jited. skipping jited_line_info check. OK BTF prog info raw test[6] (line_info (No subprog. insn_off >= prog->len)): OK BTF prog info raw test[7] (line_info (No subprog. zero tailing line_info): not jited. skipping jited_line_info check. OK BTF prog info raw test[8] (line_info (No subprog. nonzero tailing line_info)): OK BTF prog info raw test[9] (line_info (subprog)): not jited. skipping jited_line_info check. OK BTF prog info raw test[10] (line_info (subprog + func_info)): not jited. skipping jited_line_info check. OK BTF prog info raw test[11] (line_info (subprog. missing 1st func line info)): OK BTF prog info raw test[12] (line_info (subprog. missing 2nd func line info)): OK BTF prog info raw test[13] (line_info (subprog. unordered insn offset)): OK Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 05687352c600930058ca4c68048302502e07a572 Author: Martin KaFai Lau Date: Fri Dec 7 16:42:27 2018 -0800 bpf: Refactor and bug fix in test_func_type in test_btf.c 1) bpf_load_program_xattr() is absorbing the EBIG error which makes testing this case impossible. It is replaced with a direct syscall(__NR_bpf, BPF_PROG_LOAD,...). 2) The test_func_type() is renamed to test_info_raw() to prepare for the new line_info test in the next patch. 3) The bpf_obj_get_info_by_fd() testing for func_info is refactored to test_get_finfo(). A new test_get_linfo() will be added in the next patch for testing line_info purpose. 4) The test->func_info_cnt is checked instead of a static value "2". 5) Remove unnecessary "\n" in error message. 6) Adding back info_raw_test_num to the cmd arg such that a specific test case can be tested, like all other existing tests. 7) Fix a bug in handling expected_prog_load_failure. A test could pass even if prog_fd != -1 while expected_prog_load_failure is true. 8) The min rec_size check should be < 8 instead of < 4. Fixes: 4798c4ba3ba9 ("tools/bpf: extends test_btf to test load/retrieve func_type info") Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit ee491d8dbe496c510fa06a786460638d78428147 Author: Martin KaFai Lau Date: Fri Dec 7 16:42:26 2018 -0800 bpf: tools: Sync uapi bpf.h Sync uapi bpf.h to tools/include/uapi/linux for the new bpf_line_info. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit c454a46b5efd8eff8880e88ece2976e60a26bf35 Author: Martin KaFai Lau Date: Fri Dec 7 16:42:25 2018 -0800 bpf: Add bpf_line_info support This patch adds bpf_line_info support. It accepts an array of bpf_line_info objects during BPF_PROG_LOAD. The "line_info", "line_info_cnt" and "line_info_rec_size" are added to the "union bpf_attr". The "line_info_rec_size" makes bpf_line_info extensible in the future. The new "check_btf_line()" ensures the userspace line_info is valid for the kernel to use. When the verifier is translating/patching the bpf_prog (through "bpf_patch_insn_single()"), the line_infos' insn_off is also adjusted by the newly added "bpf_adj_linfo()". If the bpf_prog is jited, this patch also provides the jited addrs (in aux->jited_linfo) for the corresponding line_info.insn_off. "bpf_prog_fill_jited_linfo()" is added to fill the aux->jited_linfo. It is currently called by the x86 jit. Other jits can also use "bpf_prog_fill_jited_linfo()" and it will be done in the followup patches. In the future, if it deemed necessary, a particular jit could also provide its own "bpf_prog_fill_jited_linfo()" implementation. A few "*line_info*" fields are added to the bpf_prog_info such that the user can get the xlated line_info back (i.e. the line_info with its insn_off reflecting the translated prog). The jited_line_info is available if the prog is jited. It is an array of __u64. If the prog is not jited, jited_line_info_cnt is 0. The verifier's verbose log with line_info will be done in a follow up patch. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 31eb42bd9353c807522697ddc2a6ab14b4924fa5 Author: Jean Delvare Date: Mon Nov 19 09:17:38 2018 +0100 watchdog: w83627hf_wdt: Add quirk for Inves system On some systems, the NCT6791D comes with a companion chip and the watchdog function is in this companion chip. We must use a different unlocking sequence to access the companion chip. Use DMI strings to identify such system and adjust the unlocking sequence automatically. Signed-off-by: Jean Delvare Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 06f8f2ca0585ea0c8df7e6c65659b1f679b4254b Author: Yangtao Li Date: Tue Nov 20 09:54:45 2018 -0500 watchdog: cpwd: add of_node_put() use of_node_put() to release the refcount. Signed-off-by: Yangtao Li Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e990e12741877e9bfac402ca468f4007a75f6e2a Author: Wolfram Sang Date: Wed Nov 7 20:46:02 2018 +0100 watchdog: renesas_wdt: don't set divider while watchdog is running The datasheet says we must stop the timer before changing the clock divider. This can happen when the restart handler is called while the watchdog is running. Signed-off-by: Wolfram Sang Reviewed-by: Fabrizio Castro Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 63fea0af43af5beb3779fd2cae078d5d77b4bb11 Author: Masahiro Yamada Date: Mon Nov 12 11:35:20 2018 +0900 x86, powerpc: Remove -funit-at-a-time compiler option entirely GCC 4.6 manual says: -funit-at-a-time This option is left for compatibility reasons. -funit-at-a-time has no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder and -fno-section-anchors. Enabled by default. Remove it. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Acked-by: Ingo Molnar Acked-by: Michael Ellerman Cc: "H. Peter Anvin" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Richard Weinberger Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Cc: x86-ml Link: https://lkml.kernel.org/r/1541990120-9643-3-git-send-email-yamada.masahiro@socionext.com commit 829889ac4a7d26858860c297e64051bd27ce8fbe Author: Masahiro Yamada Date: Mon Nov 12 11:35:19 2018 +0900 x86/um: Remove -fno-unit-at-a-time workaround for pre-4.0 GCC Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") bumped the minimum GCC version to 4.6 for all architectures. '$(call cc-option,-fno-unit-at-a-time)' is now dead code since '$(cc-version) -lt 0400' is always false. Remove it. Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov Acked-by: Richard Weinberger Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Cc: x86-ml Link: https://lkml.kernel.org/r/1541990120-9643-2-git-send-email-yamada.masahiro@socionext.com commit 3baffc4a84d759ba54c461e8e4583bd8890c749a Author: Takashi Iwai Date: Fri Dec 7 15:11:09 2018 +0100 ALSA: hda/intel: Refactoring PM code Make unified suspend / resume helpers and call them from both the runtime- and the system-PM callbacks for simplifying code. There are slight changes of call orders, but there shouldn't be any functional difference after refactoring. Signed-off-by: Takashi Iwai commit 0832e93632c61987d504e251b927a2be769dd21a Author: Uwe Kleine-König Date: Tue Dec 4 17:58:55 2018 -0800 Input: rotary-encoder - don't log EPROBE_DEFER to kernel log When a driver fails to bind because a resource it still missing it's not helpful to report this as (usually) probing is repeated later. Signed-off-by: Uwe Kleine-König Signed-off-by: Dmitry Torokhov commit a60956ed72f7b715e9918df93fcf2f63a30fdda1 Author: Andrew Lunn Date: Sat Dec 8 17:06:31 2018 +0100 net: dsa: Make dsa_master_set_mtu() static Add the missing static keyword. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 91ba479573792e1f375e6c2b587c6eab882baa20 Author: Andrew Lunn Date: Sat Dec 8 17:05:18 2018 +0100 net: dsa: Restore MTU on master device on unload A previous change tries to set the MTU on the master device to take into account the DSA overheads. This patch tries to reset the master device back to the default MTU. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 120d633f199b264e0ad4c98eedc0564a89171c1d Merge: 97ef7b4c5501b dc9d38cec71c5 Author: David S. Miller Date: Sat Dec 8 21:33:31 2018 -0800 Merge branch 'platform-data-controls-for-mdio-gpio' Andrew Lunn says: ==================== platform data controls for mdio-gpio Soon to be mainlined is an x86 platform with a Marvell switch, and a bit-banging MDIO bus. In order to make this work, the phy_mask of the MDIO bus needs to be set to prevent scanning for PHYs, and the phy_ignore_ta_mask needs to be set because the switch has broken turnaround. Add a platform_data structure with these parameters. ==================== Signed-off-by: David S. Miller commit dc9d38cec71c508963b8f41c9d6d9cfd7e4ee393 Author: Andrew Lunn Date: Sat Dec 8 16:12:13 2018 +0100 net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data The Marvell 6390 Ethernet switch family does not perform MDIO turnaround correctly. Many hardware MDIO bus masters don't care about this, but the bitbangging implementation in Linux does by default. Add phy_ignore_ta_mask to the platform data so that the bitbangging code can be told which devices are known to get TA wrong. v2 Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 04fa26bab06d9335f15a5d529c4bba25cd507a34 Author: Andrew Lunn Date: Sat Dec 8 16:12:12 2018 +0100 net: phy: mdio-gpio: Add platform_data support for phy_mask It is sometimes necessary to instantiate a bit-banging MDIO bus as a platform device, without the aid of device tree. When device tree is being used, the bus is not scanned for devices, only those devices which are in device tree are probed. Without device tree, by default, all addresses on the bus are scanned. This may then find a device which is not a PHY, e.g. a switch. And the switch may have registers containing values which look like a PHY. So during the scan, a PHY device is wrongly created. After the bus has been registered, a search is made for mdio_board_info structures which indicates devices on the bus, and the driver which should be used for them. This is typically used to instantiate Ethernet switches from platform drivers. However, if the scanning of the bus has created a PHY device at the same location as indicated into the board info for a switch, the switch device is not created, since the address is already busy. This can be avoided by setting the phy_mask of the mdio bus. This mask prevents addresses on the bus being scanned. v2 Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0e2b81f7b52a1c1a8c46986f9ca01eb7b3c421f8 Author: Masami Hiramatsu Date: Mon Nov 5 18:04:01 2018 +0900 tracing: Remove unneeded synth_event_mutex Rmove unneeded synth_event_mutex. This mutex protects the reference count in synth_event, however, those operational points are already protected by event_mutex. 1. In __create_synth_event() and create_or_delete_synth_event(), those synth_event_mutex clearly obtained right after event_mutex. 2. event_hist_trigger_func() is trigger_hist_cmd.func() which is called by trigger_process_regex(), which is a part of event_trigger_regex_write() and this function takes event_mutex. 3. hist_unreg_all() is trigger_hist_cmd.unreg_all() which is called by event_trigger_regex_open() and it takes event_mutex. 4. onmatch_destroy() and onmatch_create() have long call tree, but both are finally invoked from event_trigger_regex_write() and event_trace_del_tracer(), former takes event_mutex, and latter ensures called under event_mutex locked. Finally, I ensured there is no resource conflict. For safety, I added lockdep_assert_held(&event_mutex) for each function. Link: http://lkml.kernel.org/r/154140864134.17322.4796059721306031894.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7bbab38d07f3185fddf6fce126e2239010efdfce Author: Masami Hiramatsu Date: Mon Nov 5 18:03:33 2018 +0900 tracing: Use dyn_event framework for synthetic events Use dyn_event framework for synthetic events. This shows synthetic events on "tracing/dynamic_events" file in addition to tracing/synthetic_events interface. User can also define new events via tracing/dynamic_events with "s:" prefix. So, the new syntax is below; s:[synthetic/]EVENT_NAME TYPE ARG; [TYPE ARG;]... To remove events via tracing/dynamic_events, you can use "-:" prefix as same as other events. Link: http://lkml.kernel.org/r/154140861301.17322.15454611233735614508.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0597c49c69d53f00df99421d832453f4e92a5006 Author: Masami Hiramatsu Date: Mon Nov 5 18:03:04 2018 +0900 tracing/uprobes: Use dyn_event framework for uprobe events Use dyn_event framework for uprobe events. This shows uprobe events on "dynamic_events" file. User can also define new uprobe events via dynamic_events. Link: http://lkml.kernel.org/r/154140858481.17322.9091293846515154065.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 6212dd29683eec51d6d05374a66ac953e81250e9 Author: Masami Hiramatsu Date: Mon Nov 5 18:02:36 2018 +0900 tracing/kprobes: Use dyn_event framework for kprobe events Use dyn_event framework for kprobe events. This shows kprobe events on "tracing/dynamic_events" file. User can also define new events via tracing/dynamic_events. Link: http://lkml.kernel.org/r/154140855646.17322.6619219995865980392.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 5448d44c38557fc15d1c53b608a9c9f0e1ca8f86 Author: Masami Hiramatsu Date: Mon Nov 5 18:02:08 2018 +0900 tracing: Add unified dynamic event framework Add unified dynamic event framework for ftrace kprobes, uprobes and synthetic events. Those dynamic events can be co-exist on same file because those syntax doesn't overlap. This introduces a framework part which provides a unified tracefs interface and operations. Link: http://lkml.kernel.org/r/154140852824.17322.12250362185969352095.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d00bbea9456f35fb34310d454e561f05d68d07fe Author: Masami Hiramatsu Date: Mon Nov 5 18:01:40 2018 +0900 tracing: Integrate similar probe argument parsers Integrate similar argument parsers for kprobes and uprobes events into traceprobe_parse_probe_arg(). Link: http://lkml.kernel.org/r/154140850016.17322.9836787731210512176.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit faacb361f271be4baf2d807e2eeaba87e059225f Author: Masami Hiramatsu Date: Mon Nov 5 18:01:12 2018 +0900 tracing: Simplify creation and deletion of synthetic events Since the event_mutex and synth_event_mutex ordering issue is gone, we can skip existing event check when adding or deleting events, and some redundant code in error path. This changes release_all_synth_events() to abort the process when it hits any error and returns the error code. It succeeds only if it has no error. Link: http://lkml.kernel.org/r/154140847194.17322.17960275728005067803.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit fc800a10be26017f8f338bc8e500d48e3e6429d9 Author: Masami Hiramatsu Date: Mon Nov 5 18:00:43 2018 +0900 tracing: Lock event_mutex before synth_event_mutex synthetic event is using synth_event_mutex for protecting synth_event_list, and event_trigger_write() path acquires locks as below order. event_trigger_write(event_mutex) ->trigger_process_regex(trigger_cmd_mutex) ->event_hist_trigger_func(synth_event_mutex) On the other hand, synthetic event creation and deletion paths call trace_add_event_call() and trace_remove_event_call() which acquires event_mutex. In that case, if we keep the synth_event_mutex locked while registering/unregistering synthetic events, its dependency will be inversed. To avoid this issue, current synthetic event is using a 2 phase process to create/delete events. For example, it searches existing events under synth_event_mutex to check for event-name conflicts, and unlocks synth_event_mutex, then registers a new event under event_mutex locked. Finally, it locks synth_event_mutex and tries to add the new event to the list. But it can introduce complexity and a chance for name conflicts. To solve this simpler, this introduces trace_add_event_call_nolock() and trace_remove_event_call_nolock() which don't acquire event_mutex inside. synthetic event can lock event_mutex before synth_event_mutex to solve the lock dependency issue simpler. Link: http://lkml.kernel.org/r/154140844377.17322.13781091165954002713.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 547cd9eacd1c699c8d1fa77c95c6cdb33b2eba6a Author: Masami Hiramatsu Date: Mon Nov 5 18:00:15 2018 +0900 tracing/uprobes: Add busy check when cleanup all uprobes Add a busy check loop in cleanup_all_probes() before trying to remove all events in uprobe_events, the same way that kprobe_events does. Without this change, writing null to uprobe_events will try to remove events but if one of them is enabled, it will stop there leaving some events cleared and others not clceared. With this change, writing null to uprobe_events makes sure all events are not enabled before removing events. So, it clears all events, or returns an error (-EBUSY) with keeping all events. Link: http://lkml.kernel.org/r/154140841557.17322.12653952888762532401.stgit@devbox Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a7b1d74e872a4299e1aef66a648316c9c23e5ab4 Author: Steven Rostedt (VMware) Date: Thu Nov 29 22:36:47 2018 -0500 tracing: Change default buffer_percent to 50 After running several tests, it appears that having the reader wait till half the buffer is full before starting to read (and causing its own events to fill up the ring buffer constantly), works well. It keeps trace-cmd (the main user of this interface) from dominating the traces it records. Signed-off-by: Steven Rostedt (VMware) commit 03329f9939781041424edd29487b9603a704fcd9 Author: Steven Rostedt (VMware) Date: Thu Nov 29 21:38:42 2018 -0500 tracing: Add tracefs file buffer_percentage Add a "buffer_percentage" file, that allows users to specify how much of the buffer (percentage of pages) need to be filled before waking up a task blocked on a per cpu trace_pipe_raw file. Signed-off-by: Steven Rostedt (VMware) commit 2c2b0a78b373908926e4683ea5571332f63c0eb5 Author: Steven Rostedt (VMware) Date: Thu Nov 29 20:32:26 2018 -0500 ring-buffer: Add percentage of ring buffer full to wake up reader Instead of just waiting for a page to be full before waking up a pending reader, allow the reader to pass in a "percentage" of pages that have content before waking up a reader. This should help keep the process of reading the events not cause wake ups that constantly cause reading of the buffer. Signed-off-by: Steven Rostedt (VMware) commit 9c8e2f6d3d361439cc6744a094f1c15681b55269 Author: Joe Lawrence Date: Tue Nov 20 15:19:18 2018 -0500 scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names When building with -ffunction-sections, the compiler will place each function into its own ELF section, prefixed with ".text". For example, a simple test module with functions test_module_do_work() and test_module_wq_func(): % objdump --section-headers test_module.o | awk '/\.text/{print $2}' .text .text.test_module_do_work .text.test_module_wq_func .init.text .exit.text Adjust the recordmcount scripts to look for ".text" as a section name prefix. This will ensure that those functions will be included in the __mcount_loc relocations: % objdump --reloc --section __mcount_loc test_module.o OFFSET TYPE VALUE 0000000000000000 R_X86_64_64 .text.test_module_do_work 0000000000000008 R_X86_64_64 .text.test_module_wq_func 0000000000000010 R_X86_64_64 .init.text Link: http://lkml.kernel.org/r/1542745158-25392-2-git-send-email-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence Signed-off-by: Steven Rostedt (VMware) commit ca16b0fbb05242f18da9d810c07d3882ffed831c Author: Dan Carpenter Date: Wed Jun 20 14:08:00 2018 +0300 tracing: Have trace_stack nr_entries compare not be so subtle Dan Carpenter reviewed the trace_stack.c code and figured he found an off by one bug. "From reviewing the code, it seems possible for stack_trace_max.nr_entries to be set to .max_entries and in that case we would be reading one element beyond the end of the stack_dump_trace[] array. If it's not set to .max_entries then the bug doesn't affect runtime." Although it looks to be the case, it is not. Because we have: static unsigned long stack_dump_trace[STACK_TRACE_ENTRIES+1] = { [0 ... (STACK_TRACE_ENTRIES)] = ULONG_MAX }; struct stack_trace stack_trace_max = { .max_entries = STACK_TRACE_ENTRIES - 1, .entries = &stack_dump_trace[0], }; And: stack_trace_max.nr_entries = x; for (; x < i; x++) stack_dump_trace[x] = ULONG_MAX; Even if nr_entries equals max_entries, indexing with it into the stack_dump_trace[] array will not overflow the array. But if it is the case, the second part of the conditional that tests stack_dump_trace[nr_entries] to ULONG_MAX will always be true. By applying Dan's patch, it removes the subtle aspect of it and makes the if conditional slightly more efficient. Link: http://lkml.kernel.org/r/20180620110758.crunhd5bfep7zuiz@kili.mountain Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) commit b0e21a61d3196762b61f43ae994ffd255f646774 Author: Steven Rostedt (VMware) Date: Mon Nov 19 20:54:08 2018 -0500 function_graph: Have profiler use new helper ftrace_graph_get_ret_stack() The ret_stack processing is going to change, and that is going to break anything that is accessing the ret_stack directly. One user is the function graph profiler. By using the ftrace_graph_get_ret_stack() helper function, the profiler can access the ret_stack entry without relying on the implementation details of the stack itself. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 76b42b63ed0d004961097d3a3cd979129d4afd26 Author: Steven Rostedt (VMware) Date: Sun Nov 18 18:36:19 2018 -0500 function_graph: Move ftrace_graph_ret_addr() to fgraph.c Move the function function_graph_ret_addr() to fgraph.c, as the management of the curr_ret_stack is going to change, and all the accesses to ret_stack needs to be done in fgraph.c. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 688f7089d8851b1a81106f0c0b9b29181b2f2dc8 Author: Steven Rostedt (VMware) Date: Thu Nov 15 14:06:47 2018 -0500 fgraph: Add new fgraph_ops structure to enable function graph hooks Currently the registering of function graph is to pass in a entry and return function. We need to have a way to associate those functions together where the entry can determine to run the return hook. Having a structure that contains both functions will facilitate the process of converting the code to be able to do such. This is similar to the way function hooks are enabled (it passes in ftrace_ops). Instead of passing in the functions to use, a single structure is passed in to the registering function. The unregister function is now passed in the fgraph_ops handle. When we allow more than one callback to the function graph hooks, this will let the system know which one to remove. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 317e04ca905ac6c4b33cb879e9a107c412125f14 Author: Steven Rostedt (VMware) Date: Wed Nov 28 10:26:27 2018 -0500 tracing: Rearrange functions in trace_sched_wakeup.c Rearrange the functions in trace_sched_wakeup.c so that there are fewer #ifdef CONFIG_FUNCTION_TRACER and #ifdef CONFIG_FUNCTION_GRAPH_TRACER, instead of having the #ifdefs spread all over. No functional change is made. Signed-off-by: Steven Rostedt (VMware) commit e73e679f656e678b0e7f8961094201f3544f4541 Author: Steven Rostedt (VMware) Date: Thu Nov 15 12:35:13 2018 -0500 fgraph: Move function graph specific code into fgraph.c To make the function graph infrastructure more managable, the code needs to be in its own file (fgraph.c). Move the code that is specific for managing the function graph infrastructure out of ftrace.c and into fgraph.c Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit c8dd0f45874547e6e77bab03d71feb16c4cb98a8 Author: Steven Rostedt (VMware) Date: Fri Nov 23 13:06:07 2018 -0500 function_graph: Do not expose the graph_time option when profiler is not configured When the function profiler is not configured, the "graph_time" option is meaningless, as the function profiler is the only thing that makes use of it. Do not expose it if the profiler is not configured. Link: http://lkml.kernel.org/r/20181123061133.GA195223@google.com Reported-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) commit 3306fc4aff464f9c08c8899695a218f4b1125d4a Author: Steven Rostedt (VMware) Date: Thu Nov 15 12:32:38 2018 -0500 ftrace: Create new ftrace_internal.h header In order to move function graph infrastructure into its own file (fgraph.h) it needs to access various functions and variables in ftrace.c that are currently static. Create a new file called ftrace-internal.h that holds the function prototypes and the extern declarations of the variables needed by fgraph.c as well, and make them global in ftrace.c such that they can be used outside that file. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 761efe8a94cfcd0a3dd90f2008411550f3520b63 Author: Steven Rostedt (VMware) Date: Sun Nov 18 18:44:04 2018 -0500 function_graph: Remove the use of FTRACE_NOTRACE_DEPTH The curr_ret_stack is no longer set to a negative value when a function is not to be traced by the function graph tracer. Remove the usage of FTRACE_NOTRACE_DEPTH, as it is no longer needed. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 421d1069cd85f6fee9f36984a071a73b6a431f65 Author: Steven Rostedt (VMware) Date: Sun Nov 18 18:41:46 2018 -0500 arm64: function_graph: Remove use of FTRACE_NOTRACE_DEPTH Functions in the set_graph_notrace no longer subtract FTRACE_NOTRACE_DEPTH from curr_ret_stack, as that is now implemented via the trace_recursion flags. Access to curr_ret_stack no longer needs to worry about checking for this. curr_ret_stack is still initialized to -1, when there's not a shadow stack allocated. Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit f18fd0f560eb3b798f9835fbd09fad1a27235e13 Author: Linus Walleij Date: Sun Aug 26 12:45:05 2018 +0200 ARM: dts: Bump Gemini platforms to use 100ms debounce The 50ms debounce is too low and give ghost bounces on some platforms. Bump it to 100ms to make it stable. Signed-off-by: Linus Walleij commit d6d0cef55e5b6362bd7e4fe81ea3ac1e5a48b3f4 Author: Linus Walleij Date: Fri Apr 21 20:50:22 2017 +0200 ARM: dts: Add the FOTG210 USB host to Gemini boards This adds the FOTG210 USB host controller to the Gemini device trees. In the main SoC DTSI it is flagged as disabled and then it is selectively enabled on the devices that utilize it. Signed-off-by: Linus Walleij commit d88b11ef91b15d0af9c0676cbf4f441a0dff0c56 Author: Linus Walleij Date: Fri Oct 19 09:00:51 2018 +0200 ARM: dts: Fix up SQ201 flash access This sets the partition information on the SQ201 to be read out from the RedBoot partition table, removes the static partition table and sets our boot options to mount root from /dev/mtdblock2 where the squashfs+JFFS2 resides. Signed-off-by: Linus Walleij commit 137cd7100ec6fa36d610e106df00acb4d8af99df Author: Linus Walleij Date: Thu Oct 11 20:06:23 2018 +0200 ARM: dts: Enable Gemini flash access Some Gemini platforms have a parallel NOR flash which conflicts with use cases reusing some of the flash lines (such as CE1) for GPIO. Fix this on the D-Link DIR-685 and Itian SQ201 by creating "enabled" and "disabled" states for the flash pin control handle, and rely on the flash handling code to switch this in and out when accessed so these lines can be used for GPIO when flash is not accessed, and enable flash access. Signed-off-by: Linus Walleij commit 738a05e673435afb986b53da43befd83ad87ec3b Author: Linus Walleij Date: Thu May 17 17:00:10 2018 +0200 ARM: dts: Fix up the D-Link DIR-685 MTD partition info The vendor firmware was analyzed to get the right idea about this flash layout. /proc/mtd contains: dev: size erasesize name mtd0: 01e7ff40 00020000 "rootfs" mtd1: 01f40000 00020000 "upgrade" mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd4: 00040000 00020000 "RedBoot" mtd5: 00020000 00020000 "LangPack" mtd6: 02000000 00020000 "flash" Here "flash" is obviously the whole device and we know "rootfs" is a bogus hack to point to a squashfs rootfs inside of the main "upgrade partition". We know "RedBoot" is the first 0x40000 of the flash and the "upgrade" partition follows from 0x40000 to 0x1f8000. So we have mtd0, 1, 4 and 6 covered. Remains: mtd2: 00040000 00020000 "rgdb" mtd3: 00020000 00020000 "nvram" mtd5: 00020000 00020000 "LangPack" Inspecting the flash at 0x1f8000 and 0x1fa000 reveals each of these starting with "RGCFG1" so we assume 0x1f8000-1fbfff is "rgdb" of 0x40000. Signed-off-by: Linus Walleij commit 97ef7b4c5501b081c6144a08bba6d87baf69b6e5 Author: Willem de Bruijn Date: Sat Dec 8 06:22:46 2018 -0500 ip: silence udp zerocopy smatch false positive extra_uref is used in __ip(6)_append_data only if uarg is set. Smatch sees that the variable is passed to sock_zerocopy_put_abort. This function accesses it only when uarg is set, but smatch cannot infer this. Make this dependency explicit. Fixes: 52900d22288e ("udp: elide zerocopy operation in hot path") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit cb14e6d6d8f411b7a05f36d1f877450c036d8c56 Author: Krzysztof Kozlowski Date: Fri Dec 7 13:32:52 2018 +0100 leds: pwm: Use OF variant of LED registering function The PWM leds can be instantiated from Device Tree so pass the respective device node to LED core. This provides the LED system with proper device node and exposes it through uevent. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jacek Anaszewski commit e5a0436dd08a18834c134ffd08295e36c6f85219 Author: Krzysztof Kozlowski Date: Fri Dec 7 13:32:51 2018 +0100 leds: pwm: Simplify with resource-managed devm_led_classdev_register() Simplify the exit path with resource-managed version of registering LED class device. The code should be functionally the same, except that on device removal the led_pwm_priv->num_leds is not decremented to zero (which should not have any effect as device is going away). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jacek Anaszewski commit b086592e5dcd9cee360f44be801fbcadb24d5c46 Author: Krzysztof Kozlowski Date: Fri Dec 7 11:10:06 2018 +0100 leds: gpio: Drop unneeded manual of_node assignment This reverts the main change of commit bff23714bc36 ("leds: leds-gpio: Set of_node for created LED devices") because of_node assignment is handled by core since commit 7ea79ae86c28 ("leds: gpio: use OF variant of LED registering function"). Basically the code was overwriting the of_node with same value. No functional change expected. Signed-off-by: Krzysztof Kozlowski Tested-by: Rafał Miłecki Signed-off-by: Jacek Anaszewski commit 0e76df5c978338f3051e5126fc0c4245c57a307a Author: Mircea Caprioru Date: Thu Dec 6 15:53:15 2018 +0200 iio: dac: ad5686: fix bit shift read register This patch solves the register readback issue with the bit shift. When the dac resolution was lower than the register size (ex. 12 bits out of 16 bits) the readback value was not shifted with the difference in bits and the value was higher. Also a mask is applied on the read value in order to get the value relative to the actual bit size. Fixes: 0357e488b8 ("iio:dac:ad5686: Refactor the driver") Signed-off-by: Mircea Caprioru Cc: Signed-off-by: Jonathan Cameron commit 12d323cf6dd558b442fa3f03af3c7703617eed81 Author: Stefan Popa Date: Thu Dec 6 15:38:30 2018 +0200 iio:dac:ad5686: Add AD5310R support The AD5310R is a single channel DAC with 10-bit precision, which is part of the same family as AD5311R, except that it uses the spi interface instead of i2c. The device has a built-in 2.5V reference which is enabled by default. Another important difference is that the SPI write command operation is 16 bits long. The first four bits represent the command, while the remaining 12 bits are for data. In the control reg, DB9 and DB10 are used for power-down modes, while DB8 is the REF bit. In order to accommodate this change, a new regmap type was defined and checked accordingly. Because AD5310R does not have a readback register, the read_raw operation will return "Operation is not supported". Datasheet: Link: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5310R_5311R.pdf Signed-off-by: Stefan Popa Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron commit 4b1bacab61aa252d15dde99cd0440a965bd863e5 Author: Borislav Petkov Date: Fri Dec 7 20:38:09 2018 +0100 x86/kprobes: Remove trampoline_handler() prototype ... and make it static. It is called only by the kretprobe_trampoline() from asm. It was marked __visible so that it is visible outside of the current compilation unit but that is not needed as it is used only in this compilation unit. Signed-off-by: Borislav Petkov Cc: Masami Hiramatsu Link: https://lkml.kernel.org/r/20181205162526.GB109259@gmail.com commit ad3bc25a320742f42b3015115384f5aec69c7ce2 Author: Borislav Petkov Date: Wed Dec 5 00:34:56 2018 +0100 x86/kernel: Fix more -Wmissing-prototypes warnings ... with the goal of eventually enabling -Wmissing-prototypes by default. At least on x86. Make functions static where possible, otherwise add prototypes or make them visible through includes. asm/trace/ changes courtesy of Steven Rostedt . Signed-off-by: Borislav Petkov Reviewed-by: Masami Hiramatsu Reviewed-by: Ingo Molnar Acked-by: Rafael J. Wysocki # ACPI + cpufreq bits Cc: Andrew Banman Cc: Dimitri Sivanich Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Mike Travis Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: Yi Wang Cc: linux-acpi@vger.kernel.org commit 5c608d4dd49a4ffbedc85f8a89820173df12b111 Author: Jeremy Fertic Date: Tue Dec 4 18:49:00 2018 -0700 Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0" This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read from the device. This is a valid read so revert the check for 0. Signed-off-by: Jeremy Fertic Signed-off-by: Jonathan Cameron commit c3e566c8cb553026cf530f01c80b665a2a0926f9 Author: Lubomir Rintel Date: Mon Dec 3 12:47:40 2018 +0100 dt-bindings: iio: accel: use a generic node name for lis302 The example should follow the practice or using a generic node name instead of the precise programming model, as recommended by the DTSpec. Signed-off-by: Lubomir Rintel Signed-off-by: Jonathan Cameron commit d45ebf1f986db608e0c7d69e8792ee85c9b7f3f4 Author: Andi Shyti Date: Sun Dec 2 20:30:31 2018 +0200 iio: core: check 'info' value before registering the device When the 'info' structure inside indio_dev is left uninitialized, a segmentation fault occurs. Check the 'info' value before using it and if it is equal to NULL, return with -EINVAL. Signed-off-by: Andi Shyti Signed-off-by: Jonathan Cameron commit dfc1259a3f7a116b96e23e3467607c713c38a383 Author: Baruch Siach Date: Thu Dec 6 13:19:09 2018 +0200 arm64: dts: clearfog-gt-8k: describe mini-PCIe CON2 USB Enable the USB3 peripheral that is wired to CON2 on the Clearfog GT-8K board. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit b1f0bbe2700051886b954192b6c1751233fe0f52 Author: Russell King Date: Mon Nov 5 17:25:41 2018 +0000 arm64: dts: add support for Macchiatobin Single Shot board Add DT support for the Macchiatobin Single Shot board from SolidRun, which is similar to the Double Shot board, but does not have the 10G 3310 PHYs - the two ethernet ports are instead connected directly to the SFP+ cages. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit 43ebc7c1b3ed8198b9acf3019eca16e722f7331c Author: Ding Tao Date: Fri Oct 26 11:50:28 2018 +0000 arm64: dts: marvell: armada-37xx: Enable emmc on espressobin The ESPRESSObin board has a emmc interface available on U11: declare it and let the bootloader enable it if the emmc is present. [gregory.clement@bootlin.com: disable the emmc by default] Signed-off-by: Ding Tao Signed-off-by: Gregory CLEMENT commit 29cadd2bb6670405086b177120593c1291273fb9 Author: Dan Carpenter Date: Fri Dec 7 22:06:12 2018 -0700 scsi: Fix a harmless double shift bug Smatch generates a warning: drivers/scsi/scsi_lib.c:1656 scsi_mq_done() warn: test_bit() takes a bit number The problem is that SCMD_STATE_COMPLETE is supposed to be bit number 0 and not a mask like "(1 << 0)". It is used like this: if (test_and_set_bit(SCMD_STATE_COMPLETE, &scmd->state)) The test_and_set_bit() has a shift built in so it's a double left shift and uses bit number 1 instead of number 0. This bug is harmless because it's done consistently and it doesn't clash with any other flags. Fixes: f1342709d18a ("scsi: Do not rely on blk-mq for double completions") Reviewed-by: Keith Busch Acked-by: Martin K. Petersen Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit 3236b458c475524d0735f6dd0bd250478434c7b1 Author: Israel Rukshin Date: Mon Dec 3 15:50:05 2018 +0000 nvme: remove unused function nvme_ctrl_ready Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 49cd84b6f8b677ef45731ed56ddb802cdbb94c9e Author: Keith Busch Date: Tue Nov 27 09:40:57 2018 -0700 nvme: implement Enhanced Command Retry A controller may have an internal state that is not able to successfully process commands for a short duration. In such states, an immediate command requeue is expected to fail. The driver may exceed its max retry count, which permanently ends the command in failure when the same command would succeed after waiting for the controller to be ready. NVMe ratified TP 4033 provides a delay hint in the completion status code for failed commands. Implement the retry delay based on the command completion status and the controller's requested delay. Note that requeued commands are handled per request_queue, not per individual request. If multiple commands fail, the controller should consistently report the desired delay time for retryable commands in all CQEs, otherwise the requeue list may be kicked too soon. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5a3a6d6965865d0da5c743a0f9c58f84373f88e7 Author: Chaitanya Kulkarni Date: Mon Nov 19 15:16:39 2018 -0800 nvmet: fix the structure member indentation This is a cleanup patch which fixes the structure member indentation introduced by the p2p: commit c6925093d0b2 ("nvmet: Optionally use PCI P2P memory"). We don't change any functionality in this patch. This is needed so that any future members will also follow the uniform indentation. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Acked-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit cb019da3dabf60d792f76a913540815f06abb1d7 Author: Chaitanya Kulkarni Date: Mon Nov 19 13:35:30 2018 -0800 nvmet: use unlikely for req status check This patch adds unlikely in the nvmet request completion path for the status check in the low level function __nvmet_req_complete. This is helpful in the scenario where host and target connection is working smoothly. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ad1f824948e4ed886529219cf7cd717d078c630d Author: Israel Rukshin Date: Mon Nov 19 10:58:51 2018 +0000 nvmet-rdma: Add unlikely for response allocated check Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5c4072ad1c151c65c3d60f95536786042cd49e29 Author: Israel Rukshin Date: Mon Nov 19 10:58:52 2018 +0000 nvme: Remove unused forward declaration Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8154ed730bc64f68bc28feb20e641c2e8a0eeba5 Author: Sagi Grimberg Date: Mon Nov 19 14:11:15 2018 -0800 nvme: disable fabrics SQ flow control when asked by the user As for now, we don't care about sq_head pointer updates anyway, so at least allow the controller to micro-optimize by omiting this update. Note that we will probably need to support it when a controller that requires this comes along. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9b95d2fb857f242aacbf4e205656818b0ef067e1 Author: Sagi Grimberg Date: Tue Nov 20 10:34:19 2018 +0100 nvmet: expose support for fabrics SQ flow control disable in treq Technical Proposal introduces an indication for SQ flow control disable support. Expose it since we are able to operate in this mode. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0445e1b5a2fed4612b7f72d9a56889c026b60aa9 Author: Sagi Grimberg Date: Mon Nov 19 14:11:13 2018 -0800 nvmet: don't override treq upon modification. Only override the allowed parts of it. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg [hch: slight tweak to the NVME_TREQ_SECURE_CHANNEL_MASK definition] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e6a622fd6d66b83779357e3400f487fc159a7d83 Author: Sagi Grimberg Date: Mon Nov 19 14:11:12 2018 -0800 nvmet: support fabrics sq flow control Technical proposal 8005 "fabrics SQ flow control" introduces a mode where a host and controller agree to omit sq_head pointer updates when sending nvme completions. In case the host indicated desire to operate in this mode (connect attribute) the controller will return back a connect completion with sq_head value of 0xffff as indication that it will omit sq_head pointer updates. This mode saves us an atomic update in the I/O path. Reviewed-by: Hannes Reinecke [hch: suggested better implementation] Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6e2e312ea7ff73acfafaa5c9851e151e9483c761 Author: James Smart Date: Wed Nov 14 15:57:46 2018 -0800 nvmet-fc: remove the IN_ISR deferred scheduling options All target lldd's call the cmd receive and op completions in non-isr thread contexts. As such the IN_ISR options are not necessary. Remove the functionality and flags, which also removes cpu assignments to queues. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 03198c4d9fc8e72ba8a5ad74959b61de7f2780a6 Author: Christoph Hellwig Date: Wed Nov 14 16:46:23 2018 +0100 nvmet: mark nvmet_genctr static Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit b662a078576e7d6e235b4e1b94863f0474cd8555 Author: Jay Sternberg Date: Mon Nov 12 13:56:40 2018 -0800 nvmet: enable Discovery Controller AENs Add functions to find connections requesting Discovery Change events and send a notification to hosts that maintain an explicit persistent connection and have and active Asynchronous Event Request pending. Only Hosts that have access to the Subsystem effected by the change will receive notifications of Discovery Change event. Call these functions each time there is a configfs change that effects the Discover Log Pages. Set the OAES field in the Identify Controller response to advertise the support for Asynchronous Event Notifications. Signed-off-by: Jay Sternberg Reviewed-by: Phil Cayton Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 253928eec61a52935584777f0dfba6cdb63967b6 Author: Sagi Grimberg Date: Mon Nov 12 13:56:39 2018 -0800 nvmet: allow host connect even if no allowed subsystems are exported It is perfectly valid that a host connects to a discovery subsystem and gets an empty discovery log page since no subsystems are provisioned to it. No reason to disallow connecting to the discovery subsystem all together. Signed-off-by: Sagi Grimberg Reviewed-by: Jay Sternberg Reviewed-by: Phil Cayton Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6a8ec0ac5ede074232137e505d4b90e56c1e4511 Author: Jay Sternberg Date: Mon Nov 12 13:56:38 2018 -0800 nvmet: add support to Discovery controllers for commands Add custom get/set features to commands allowed by Discovery controllers. Signed-off-by: Jay Sternberg Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f301c2b1368905340133ff8ef4485befdd0b7e2d Author: Jay Sternberg Date: Mon Nov 12 13:56:37 2018 -0800 nvmet: add defines for discovery change async events Add AEN/AER values as defined by the specification Signed-off-by: Jay Sternberg Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 90107455cce753c05a5e1e80cb84b09da1c87eef Author: Jay Sternberg Date: Mon Nov 12 13:56:36 2018 -0800 nvmet: make kato and AEN processing for use by other controllers Make common process of get/set features available to other controllers by making simple functions static inline and others not static and prototypes in nvmet.h file Also remove static from nvmet_execute_async_event and add prototype to nvmet.h to allow used by other controllers Signed-off-by: Jay Sternberg Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f9362ac1738a41cc526fde82e76beb034d8c6053 Author: Jay Sternberg Date: Mon Nov 12 13:56:35 2018 -0800 nvmet: allow Keep Alive for Discovery controller Per change to specification allowing Discovery controllers to have explicit persistent connections, remove restriction on Discovery controllers allowing kato on connect. Signed-off-by: Jay Sternberg Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7114ddeb40c0ccc584d86df598da4054ca4cd79f Author: Jay Sternberg Date: Mon Nov 12 13:56:34 2018 -0800 nvmet: change aen mask functions to use bit numbers Functions nvmet_aen_disabled and nvmet_clear_aen were using values not bit numbers ie 1 << 9 not 9 for bit function clear_bit and test_and_set_bit. Signed-off-by: Jay Sternberg Reviewed-by: Phil Cayton Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6c8312ad509c3aaaa8720fee7abe45b813cd4d87 Author: Jay Sternberg Date: Mon Nov 12 13:56:33 2018 -0800 nvmet: provide aen bit functions for multiple controller types Move nvmet_aen_disabled and nvmet_clear_aen in preparation for other types of controllers to use, initially the discovery controller. Signed-off-by: Jay Sternberg Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 50a909db36f244bcfec6e02598d31c0b0a468175 Author: Chaitanya Kulkarni Date: Wed Nov 14 01:12:19 2018 -0500 nvmet: use IOCB_NOWAIT for file-ns buffered I/O This patch optimizes read command behavior when file-ns configured with buffered I/O. Instead of offloading the buffered I/O read operations to the worker threads, we first issue the read operation with IOCB_NOWAIT and try and access the data from the cache. Here we only offload the request to the worker thread and complete the request in the worker thread context when IOCB_NOWAIT request fails. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c09305ae49970e15cd18828c0f78b766e8cf224f Author: Sagi Grimberg Date: Fri Nov 2 10:28:13 2018 -0700 nvmet: support for traffic based keep-alive A controller that supports traffic based keep-alive can restart the keep alive timer even when no keep-alive was not received in the kato period as long as other admin or I/O commands were received. For each command set ctrl->cmd_seen to true, and when keep-alive timer expires, if any commands were seen, resched ka_work instead of escalating to a fatal error. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6e3ca03ee934572d5de4fb2224c01e12c4d422c8 Author: Sagi Grimberg Date: Fri Nov 2 10:28:15 2018 -0700 nvme: support traffic based keep-alive If the controller supports traffic based keep alive, we restart the keep alive timer if any admin or io commands was completed during the kato period. This prevents a possible starvation of keep alive commands in the presence of heavy traffic as in such case, we already have a health indication from the host perspective. Only set a comp_seen indicator in case the controller supports keep alive to minimize the overhead for pci controllers. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3e53ba38a9404434a8b57683825279f4305b5a76 Author: Sagi Grimberg Date: Fri Nov 2 10:28:14 2018 -0700 nvme: cache controller attributes We get the controller attributes in identify, cache them as we'll need them for traffic based keep alive support. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 12b2117161ddbdcdb69777404c5aa2a9fe6ad7d5 Author: Sagi Grimberg Date: Fri Nov 2 10:28:12 2018 -0700 nvme: introduce ctrl attributes enumeration We are growing more controller attributes, so use a proper enumeration for it. For now just add the 128-bit hostid which we support. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 103e515efa89be33d04e45aae82de136f0c49865 Author: Hannes Reinecke Date: Fri Nov 16 09:22:29 2018 +0100 nvme: add a numa_node field to struct nvme_ctrl Instead of directly poking into the struct device add a new numa_node field to struct nvme_ctrl. This allows fabrics drivers where ctrl->dev is a virtual device to support NUMA affinity as well. Also expose the field as a sysfs attribute, and populate it for the RDMA and FC transports. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1190203555ec58d768ea802e8fdbb5c42187d9d5 Author: Chaitanya Kulkarni Date: Mon Oct 29 16:44:18 2018 -0700 nvme: consolidate memset calls in the nvme_setup_cmd path In function nvme_setup_cmd() we call command specific setup function for flush, rw, and discard. Instead of calling memset in each function lets call it once in the parent function. This is purely code cleanup patch and it does not change any existing functionality. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5938870247be4453ef6602c7ce467bebb48113c8 Author: Ming Lei Date: Fri Dec 7 11:03:53 2018 +0800 blk-mq: re-build queue map in case of kdump kernel Now almost all .map_queues() implementation based on managed irq affinity doesn't update queue mapping and it just retrieves the old built mapping, so if nr_hw_queues is changed, the mapping talbe includes stale mapping. And only blk_mq_map_queues() may rebuild the mapping talbe. One case is that we limit .nr_hw_queues as 1 in case of kdump kernel. However, drivers often builds queue mapping before allocating tagset via pci_alloc_irq_vectors_affinity(), but set->nr_hw_queues can be set as 1 in case of kdump kernel, so wrong queue mapping is used, and kernel panic[1] is observed during booting. This patch fixes the kernel panic triggerd on nvme by rebulding the mapping table via blk_mq_map_queues(). [1] kernel panic log [ 4.438371] nvme nvme0: 16/0/0 default/read/poll queues [ 4.443277] BUG: unable to handle kernel NULL pointer dereference at 0000000000000098 [ 4.444681] PGD 0 P4D 0 [ 4.445367] Oops: 0000 [#1] SMP NOPTI [ 4.446342] CPU: 3 PID: 201 Comm: kworker/u33:10 Not tainted 4.20.0-rc5-00664-g5eb02f7ee1eb-dirty #459 [ 4.447630] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-2.fc27 04/01/2014 [ 4.448689] Workqueue: nvme-wq nvme_scan_work [nvme_core] [ 4.449368] RIP: 0010:blk_mq_map_swqueue+0xfb/0x222 [ 4.450596] Code: 04 f5 20 28 ef 81 48 89 c6 39 55 30 76 93 89 d0 48 c1 e0 04 48 03 83 f8 05 00 00 48 8b 00 42 8b 3c 28 48 8b 43 58 48 8b 04 f8 <48> 8b b8 98 00 00 00 4c 0f a3 37 72 42 f0 4c 0f ab 37 66 8b b8 f6 [ 4.453132] RSP: 0018:ffffc900023b3cd8 EFLAGS: 00010286 [ 4.454061] RAX: 0000000000000000 RBX: ffff888174448000 RCX: 0000000000000001 [ 4.456480] RDX: 0000000000000001 RSI: ffffe8feffc506c0 RDI: 0000000000000001 [ 4.458750] RBP: ffff88810722d008 R08: ffff88817647a880 R09: 0000000000000002 [ 4.464580] R10: ffffc900023b3c10 R11: 0000000000000004 R12: ffff888174448538 [ 4.467803] R13: 0000000000000004 R14: 0000000000000001 R15: 0000000000000001 [ 4.469220] FS: 0000000000000000(0000) GS:ffff88817bac0000(0000) knlGS:0000000000000000 [ 4.471554] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.472464] CR2: 0000000000000098 CR3: 0000000174e4e001 CR4: 0000000000760ee0 [ 4.474264] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4.476007] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4.477061] PKRU: 55555554 [ 4.477464] Call Trace: [ 4.478731] blk_mq_init_allocated_queue+0x36a/0x3ad [ 4.479595] blk_mq_init_queue+0x32/0x4e [ 4.480178] nvme_validate_ns+0x98/0x623 [nvme_core] [ 4.480963] ? nvme_submit_sync_cmd+0x1b/0x20 [nvme_core] [ 4.481685] ? nvme_identify_ctrl.isra.8+0x70/0xa0 [nvme_core] [ 4.482601] nvme_scan_work+0x23a/0x29b [nvme_core] [ 4.483269] ? _raw_spin_unlock_irqrestore+0x25/0x38 [ 4.483930] ? try_to_wake_up+0x38d/0x3b3 [ 4.484478] ? process_one_work+0x179/0x2fc [ 4.485118] process_one_work+0x1d3/0x2fc [ 4.485655] ? rescuer_thread+0x2ae/0x2ae [ 4.486196] worker_thread+0x1e9/0x2be [ 4.486841] kthread+0x115/0x11d [ 4.487294] ? kthread_park+0x76/0x76 [ 4.487784] ret_from_fork+0x3a/0x50 [ 4.488322] Modules linked in: nvme nvme_core qemu_fw_cfg virtio_scsi ip_tables [ 4.489428] Dumping ftrace buffer: [ 4.489939] (ftrace buffer empty) [ 4.490492] CR2: 0000000000000098 [ 4.491052] ---[ end trace 03cd268ad5a86ff7 ]--- Cc: Christoph Hellwig Cc: linux-nvme@lists.infradead.org Cc: David Milburn Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 4705de735b3383792c84a92e57508d6865caa85f Author: Dennis Zhou Date: Thu Dec 6 12:49:38 2018 -0500 blkcg: put back rcu lock in blkcg_bio_issue_check() I was a little overzealous in removing the rcu_read_lock() call from blkcg_bio_issue_check() and it broke blk-throttle. Put it back. Fixes: e35403a034bf ("blkcg: associate blkg when associating a device") Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit d3fcdff19054575a368dfdac7407cabffea36c43 Author: Josef Bacik Date: Tue Dec 4 12:59:04 2018 -0500 block: convert io-latency to use rq_qos_wait Now that we have this common helper, convert io-latency over to use it as well. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit b6c7b58f5fcc2386bddf9852011c42c1d2b83979 Author: Josef Bacik Date: Tue Dec 4 12:59:03 2018 -0500 block: convert wbt_wait() to use rq_qos_wait() Now that we have rq_qos_wait() in place, convert wbt_wait() over to using it with it's specific callbacks. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit 84f603246db9703aca05aad58b94a54dfbf44327 Author: Josef Bacik Date: Tue Dec 4 12:59:02 2018 -0500 block: add rq_qos_wait to rq_qos Originally when I split out the common code from blk-wbt into rq_qos I left the wbt_wait() where it was and simply copied and modified it slightly to work for io-latency. However they are both basically the same thing, and as time has gone on wbt_wait() has ended up much smarter and kinder than it was when I copied it into io-latency, which means io-latency has lost out on these improvements. Since they are the same thing essentially except for a few minor things, create rq_qos_wait() that replicates what wbt_wait() currently does with callbacks that can be passed in for the snowflakes to do their own thing as appropriate. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit 7754f669ffde3919e398a9e591cd7510d6cf4e73 Author: Dennis Zhou Date: Wed Dec 5 12:10:39 2018 -0500 blkcg: rename blkg_try_get() to blkg_tryget() blkg reference counting now uses percpu_ref rather than atomic_t. Let's make this consistent with css_tryget. This renames blkg_try_get to blkg_tryget and now returns a bool rather than the blkg or %NULL. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 7fcf2b033b84e261dca283bc2911aaea4b07b525 Author: Dennis Zhou Date: Wed Dec 5 12:10:38 2018 -0500 blkcg: change blkg reference counting to use percpu_ref Every bio is now associated with a blkg putting blkg_get, blkg_try_get, and blkg_put on the hot path. Switch over the refcnt in blkg to use percpu_ref. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 6f70fb66182b02e50deea65e9a3a86b7bf659a39 Author: Dennis Zhou Date: Wed Dec 5 12:10:37 2018 -0500 blkcg: remove bio_disassociate_task() Now that a bio only holds a blkg reference, so clean up is simply putting back that reference. Remove bio_disassociate_task() as it just calls bio_disassociate_blkg() and call the latter directly. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit fc5a828bfad628c1092194f2814604943561c52d Author: Dennis Zhou Date: Wed Dec 5 12:10:36 2018 -0500 blkcg: remove additional reference to the css The previous patch in this series removed carrying around a pointer to the css in blkg. However, the blkg association logic still relied on taking a reference on the css to ensure we wouldn't fail in getting a reference for the blkg. Here the implicit dependency on the css is removed. The association continues to rely on the tryget logic walking up the blkg tree. This streamlines the three ways that association can happen: normal, swap, and writeback. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit db6638d7d177a8bc74c9e539e2e0d7d061c767b1 Author: Dennis Zhou Date: Wed Dec 5 12:10:35 2018 -0500 blkcg: remove bio->bi_css and instead use bio->bi_blkg Prior patches ensured that any bio that interacts with a request_queue is properly associated with a blkg. This makes bio->bi_css unnecessary as blkg maintains a reference to blkcg already. This removes the bio field bi_css and transfers corresponding uses to access via bi_blkg. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit fd42df305f804ddc0d5ac028e944784283b2f92d Author: Dennis Zhou Date: Wed Dec 5 12:10:34 2018 -0500 blkcg: associate writeback bios with a blkg One of the goals of this series is to remove a separate reference to the css of the bio. This can and should be accessed via bio_blkcg(). In this patch, wbc_init_bio() now requires a bio to have a device associated with it. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 6a7f6d86a561473032287c8e4583eac5853c6efa Author: Dennis Zhou Date: Wed Dec 5 12:10:33 2018 -0500 blkcg: associate a blkg for pages being evicted by swap A prior patch in this series added blkg association to bios issued by cgroups. There are two other paths that we want to attribute work back to the appropriate cgroup: swap and writeback. Here we modify the way swap tags bios to include the blkg. Writeback will be tackle in the next patch. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit e439bedf6b24264f620cc05627e23a90054bde41 Author: Dennis Zhou Date: Wed Dec 5 12:10:32 2018 -0500 blkcg: consolidate bio_issue_init() to be a part of core bio_issue_init among other things initializes the timestamp for an IO. Rather than have this logic handled by policies, this consolidates it to be on the init paths (normal, clone, bounce clone). Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 5cdf2e3fea5ee37b66842d76a9b06e6dac0b933d Author: Dennis Zhou Date: Wed Dec 5 12:10:31 2018 -0500 blkcg: associate blkg when associating a device Previously, blkg association was handled by controller specific code in blk-throttle and blk-iolatency. However, because a blkg represents a relationship between a blkcg and a request_queue, it makes sense to keep the blkg->q and bio->bi_disk->queue consistent. This patch moves association into the bio_set_dev macro(). This should cover the majority of cases where the device is set/changed keeping the two pointers consistent. Fallback code is added to blkcg_bio_issue_check() to catch any missing paths. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 892ad71f622bbf39c6de321d5ca9b0fdec237c24 Author: Dennis Zhou Date: Wed Dec 5 12:10:30 2018 -0500 dm: set the static flush bio device on demand The next patch changes the macro bio_set_dev() to associate a bio with a blkg based on the device set. However, dm creates a static bio to be used as the basis for cloning empty flush bios on creation. The bio_set_dev() call in alloc_dev() will cause problems with the next patch adding association to bio_set_dev() because the call is before the bdev is associated with a gendisk (bd_disk is %NULL). To get around this, set the device on the static bio every time and use that to clone to the other bios. Signed-off-by: Dennis Zhou Acked-by: Mike Snitzer Cc: Alasdair Kergon Signed-off-by: Jens Axboe commit 2268c0feb0ffb1c1bb6e1d4d5505d30f485aa77b Author: Dennis Zhou Date: Wed Dec 5 12:10:29 2018 -0500 blkcg: introduce common blkg association logic There are 3 ways blkg association can happen: association with the current css, with the page css (swap), or from the wbc css (writeback). This patch handles how association is done for the first case where we are associating bsaed on the current css. If there is already a blkg associated, the css will be reused and association will be redone as the request_queue may have changed. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit beea9da07d8a6228a7e4a31a83f9478d513bf03f Author: Dennis Zhou Date: Wed Dec 5 12:10:28 2018 -0500 blkcg: convert blkg_lookup_create() to find closest blkg There are several scenarios where blkg_lookup_create() can fail such as the blkcg dying, request_queue is dying, or simply being OOM. Most handle this by simply falling back to the q->root_blkg and calling it a day. This patch implements the notion of closest blkg. During blkg_lookup_create(), if it fails to create, return the closest blkg found or the q->root_blkg. blkg_try_get_closest() is introduced and used during association so a bio is always attached to a blkg. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit b978962ad4f7f9c06e5aa07b2a9b22f6d600456c Author: Dennis Zhou Date: Wed Dec 5 12:10:27 2018 -0500 blkcg: update blkg_lookup_create() to do locking To know when to create a blkg, the general pattern is to do a blkg_lookup() and if that fails, lock and do the lookup again, and if that fails finally create. It doesn't make much sense for everyone who wants to do creation to write this themselves. This changes blkg_lookup_create() to do locking and implement this pattern. The old blkg_lookup_create() is renamed to __blkg_lookup_create(). If a call site wants to do its own error handling or already owns the queue lock, they can use __blkg_lookup_create(). This will be used in upcoming patches. Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Acked-by: Tejun Heo Reviewed-by: Liu Bo Signed-off-by: Jens Axboe commit 0fe061b9f03c27d0370888efc22d4b3ac7af90cf Author: Dennis Zhou Date: Wed Dec 5 12:10:26 2018 -0500 blkcg: fix ref count issue with bio_blkcg() using task_css The bio_blkcg() function turns out to be inconsistent and consequently dangerous to use. The first part returns a blkcg where a reference is owned by the bio meaning it does not need to be rcu protected. However, the third case, the last line, is problematic: return css_to_blkcg(task_css(current, io_cgrp_id)); This can race against task migration and the cgroup dying. It is also semantically different as it must be called rcu protected and is susceptible to failure when trying to get a reference to it. This patch adds association ahead of calling bio_blkcg() rather than after. This makes association a required and explicit step along the code paths for calling bio_blkcg(). In blk-iolatency, association is moved above the bio_blkcg() call to ensure it will not return %NULL. BFQ uses the old bio_blkcg() function, but I do not want to address it in this series due to the complexity. I have created a private version documenting the inconsistency and noting not to use it. Signed-off-by: Dennis Zhou Acked-by: Tejun Heo Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 6e0de61107f03c3222550d9b548cd331d31d82d1 Author: Jens Axboe Date: Wed Dec 5 06:50:40 2018 -0700 blk-mq: remove QUEUE_FLAG_POLL from default MQ flags We only support polling if we have poll queues now, but the flag is being set by default. Remove the default QUEUE_FLAG_POLL setting, we'll set it in blk_mq_init_allocated_queue() if we have poll queues available for this device. Fixes: 6544d229bf43 ("block: enable polling by default if a poll map is initalized") Reported-by: Kirill Tkhai Signed-off-by: Jens Axboe commit de55b786b8a673933f87d68c1b4a7337229d766b Author: James Smart Date: Thu Nov 29 16:09:41 2018 -0800 scsi: lpfc: update driver version to 12.0.0.9 Update the driver version to 12.0.0.9 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7c4042a4d0b7532cfbc90478fd3084b2dab5849e Author: James Smart Date: Thu Nov 29 16:09:40 2018 -0800 scsi: lpfc: Fix dif and first burst use in write commands When dif and first burst is used in a write command wqe, the driver was not properly setting fields in the io command request. This resulted in no dif bytes being sent and invalid xfer_rdy's, resulting in the io being aborted by the hardware. Correct the wqe initializaton when both dif and first burst are used. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1165a5c2206cf8e4811caab145d16a8d87c69111 Author: James Smart Date: Thu Nov 29 16:09:39 2018 -0800 scsi: lpfc: Fix driver release of fw-logging buffers On driver termination, after the driver stops fw logging by writing a register on the chip, the driver immediately unmaps and frees the logging buffer, without confirming in any way that the chip has received the write and terminated the logging. As termination on the chip is not immediate, the chip may issue a dma request to the now unmapped dma buffer, resulting in a iommu fault. Change the driver to receive a confirmation that logging ahs been terminated. As the driver always issues an SLI reset with the device as part of shutdown, and as part of that is receiving confirmation that the reset is complete - the driver was modified to perform the write to disable fw logging prior to the SLI reset and only free the fw log buffer after the SLI reset is complete. That guarantees use of the fw log buffer is fully terminated when it is unmapped. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 76558b25733140a0c6bd53ea8af04b2811c92ec3 Author: James Smart Date: Thu Nov 29 16:09:38 2018 -0800 scsi: lpfc: Correct topology type reporting on G7 adapters Driver missed classifying the chip type for G7 when reporting supported topologies. This resulted in loop being shown as supported on FC links that are not supported per the standard. Add the chip classifications to the topology checks in the driver. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1c36833d82ff24d0d54215fd956e7cc30fffce54 Author: James Smart Date: Thu Nov 29 16:09:37 2018 -0800 scsi: lpfc: Correct code setting non existent bits in sli4 ABORT WQE Driver is setting bits in word 10 of the SLI4 ABORT WQE (the wqid). The field was a carry over from a prior SLI revision. The field does not exist in SLI4, and the action may result in an overlap with future definition of the WQE. Remove the setting of WQID in the ABORT WQE. Also cleaned up WQE field settings - initialize to zero, don't bother to set fields to zero. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0a9e9687acaf6ac1198fd41f03d64f8b92e4515e Author: James Smart Date: Thu Nov 29 16:09:36 2018 -0800 scsi: lpfc: Defer LS_ACC to FLOGI on point to point logins The current discovery state machine the driver treated FLOGI oddly. When point to point, an FLOGI is to be exchanged by the two ports, with the port with the most significant WWN then proceeding with PLOGI. The implementation in the driver was keyed to closely with "what have I sent", not with what has happened between the two endpoints. Thus, it blatantly would ACC an FLOGI, but reject PLOGI's until it had its FLOGI ACC'd. The problem is - the sending of FLOGI may be delayed for some reason, or the response to FLOGI held off by the other side. In the failing situation the other side sent an FLOGI, which was ACC'd, then sent PLOGIs which were then rjt'd until the retry count for the PLOGIs were exceeded and the port gave up. The FLOGI may have been very late in transmit, or the response held off until the PLOGIs failed. Given the other port had the higher WWN, no PLOGIs would occur and communication stopped. Correct the situation by changing the FLOGI handling. Defer any response to an FLOGI until the driver has sent its FLOGI as well. Then, upon either completion of the sent FLOGI, or upon sending an ACC to a received FLOGI (which may be received before or just after FLOGI was sent). the driver will act on who has the higher WWN. if the other port does, the driver will noop any handling of an FLOGI response (if outstanding) and wait for PLOGI. If the local port does, the driver will transition to sending PLOGI and will noop any action on responding to an FLOGI (if not yet received). Fortunately, to implement this, it only took another state flag and deferring any FLOGI response if the FLOGI has yet to be transmit. All subsequent actions were already in place. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 287aba2592870fa5b76134b28173b77f1f7a4492 Author: James Smart Date: Thu Nov 29 16:09:35 2018 -0800 scsi: lpfc: ls_rjt erroneus FLOGIs In some link initialization sequences, the fw generates an erroneous FLOGI payload to the driver without an intervening link bounce. The driver, when it sees a 2nd FLOGI without an intervening link bounce, automatically performs a link bounce. In this, the link bounce causes the situate to repeat and in a nasty loop of link bounces. Resolve the issue by validating the FLOGI payload. The erroneous FLOGI will contain VVL signatures that are not normal. When the driver sees these, it will simply reject the flogi rather than bouncing the link. The reject is consumed within the firmware. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 92ea83a878c68f709a172dd0125582b311d4d0d0 Author: James Smart Date: Thu Nov 29 16:09:34 2018 -0800 scsi: lpfc: rport port swap discovery issue. Two initiator ports were cable swapped and after swap both went down. The driver internally swaps the nlp nodes based on matching node wwn's but not the same nport id as before. After detecting a change in the nodes RPI, the driver sends an UNREG_RPI command and clears the NLP_RPI_REGISTERED flag, then swaps the node information with the other node. But the other node's NLP_RPI_REGISTERED flag is also cleared, but it is done so without an UNREG_RPI being sent, which causes the later REG_RPI for that other node to fail as the hardware believes its still registered. Additionally, if the node swap occurred while the two nodes had PLOGI's in flight, the fc4_types weren't properly getting swapped such that when the PLOGIs commpleted and PRLI's were then sent, the PRLI's acted on bad protocol types so the PRLI was for the wrong protocol. NVME devices saw SCSI FCP PRLIs and vice versa. Clean up the node swap so that the NLP_RPI_REGISTERED flag is handled properly. Fix the handling of the fc4_types when the nodes are swapped as well Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8b47ae69e049ae0b3373859d901f0334322f9fe9 Author: James Smart Date: Thu Nov 29 16:09:33 2018 -0800 scsi: lpfc: Cap NPIV vports to 256 Depending on the chipset, the number of NPIV vports may vary and be in excess of what most switches support (256). To avoid confusion with the users, limit the reported NPIV vports to 256. Additionally correct the 16G adapter which is reporting a bogus NPIV vport number if the link is down. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5a9eeff57f340238c39c95d8e7e54c96fc722de7 Author: James Smart Date: Thu Nov 29 16:09:32 2018 -0800 scsi: lpfc: Fix kernel Oops due to null pring pointers Driver is hitting null pring pointers in lpfc_do_work(). Pointer assignment occurs based on SLI-revision. If recovering after an error, its possible the sli revision for the port was cleared, making the lpfc_phba_elsring() not return a ring pointer, thus the null pointer. Add SLI revision checking to lpfc_phba_elsring() and status checking to all callers. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2c4c91415a05677acc5c8131a5eb472d4aa96ae1 Author: James Smart Date: Thu Nov 29 16:09:31 2018 -0800 scsi: lpfc: Fix a duplicate 0711 log message number. Renumber one of the 0711 log messages so there isn't a duplication. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit dea16bdae2f1ab629702ca912dabe00f3dcdac25 Author: James Smart Date: Thu Nov 29 16:09:30 2018 -0800 scsi: lpfc: Fix discovery failures during port failovers with lots of vports The driver is getting hit with 100s of RSCNs during remote port address changes. Each of those RSCN's ends up generating UNREG_RPI and REG_PRI mailbox commands. The discovery engine within the driver doesn't wait for the mailbox command completions. Instead it sets state flags and moves forward. At some point, there's a massive backlog of mailbox commands which take time for the adapter to process. Additionally, it appears there were duplicate events from the switch so the driver generated duplicate mailbox commands for the same remote port. During this window, failures on PLOGI and PRLI ELS's are see as the adapter is rejecting them as they are for remote ports that still have pending mailbox commands. Streamline the discovery engine so that PLOGI log checks for outstanding UNREG_RPIs and defer the processing until the commands complete. This better synchronizes the ELS transmission vs the RPI registrations. Filter out multiple UNREG_RPIs being queued up for the same remote port. Beef up log messages in this area. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3e1f0718921cd13384ff29d7468c4b328d8980ad Author: James Smart Date: Thu Nov 29 16:09:29 2018 -0800 scsi: lpfc: refactor mailbox structure context fields The driver data structure for managing a mailbox command contained two context fields. Unfortunately, the context were considered "generic" to be used at the whim of the command code. Of course, one section of code used fields this way, while another did it that way, and eventually there were mixups. Refactored the structure so that the generic contexts become a node context and a buffer context and all code standardizes on their use. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0f31e9593a2fd90b1e7098b0eda03f5977350b20 Author: James Smart Date: Thu Nov 29 16:09:28 2018 -0800 scsi: lpfc: update manufacturer attribute to reflect Broadcom Update manufacturer attribute to reflect Broadcom Inc, not Emulex Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit cb34990b90f73b9a77a504c5129442c9aae0430a Author: James Smart Date: Thu Nov 29 16:09:27 2018 -0800 scsi: lpfc: Fix panic when FW-log buffsize is not initialized While trying to get adapter fw-log for a function whose buffsize was set to 0, kernel panic occurred. When buffsize is 0, the kernel buffer for the log won't be allocated. When fw log usage was enabled, it failed to check the buffer size, and log usage was started. Eventually the driver referenced the unallocated log buffer. Added checks of the buffer size before allowing fw logging to be enabled and added check for valid buffer if enabling fw log. Performed a couple other minor cleanups while fixing this: - clarified log messages - re-evaluated log message severity - treat any error as an error, not only a couple codes Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 492ca4da6f0798cf20ecaf330abc8d79e540a43a Author: James Bottomley Date: Tue Nov 27 21:41:24 2018 -0800 scsi: aha1542: Fix zeroday __udivdi3 warning dma_addr_t can be u64 on pae systems but isa_virt_to_bus only ever returns unsigned long (because an ISA physical address can only be 24 bits). Cast to unsigned long to avoid division. Fixes: 1794ef2b150d ("scsi: aha1542: convert to DMA mapping API") Signed-off-by: James Bottomley Reviewed-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 7171455354eb2ed494ddb6fe50988e98bb5cfa96 Author: Steffen Maier Date: Thu Dec 6 17:31:21 2018 +0100 scsi: zfcp: improve kdoc for return of zfcp_status_read_refill() Complements v2.6.35 commit 64deb6efdc55 ("[SCSI] zfcp: Use status_read_buf_num provided by FCP channel") which replaced the hardcoded 16 with a variable value Also complements already existing fixups for above commit v2.6.35 commit 8d88cf3f3b9a ("[SCSI] zfcp: Update status read mempool") v3.10 commit 9edf7d75ee5f ("[SCSI] zfcp: status read buffers on first adapter open with link down") Signed-off-by: Steffen Maier Reviewed-by: Jens Remus Signed-off-by: Martin K. Petersen commit 60a161b7e5b2a252ff0d4c622266a7d8da1120ce Author: Steffen Maier Date: Thu Dec 6 17:31:20 2018 +0100 scsi: zfcp: fix posting too many status read buffers leading to adapter shutdown Suppose adapter (open) recovery is between opened QDIO queues and before (the end of) initial posting of status read buffers (SRBs). This time window can be seconds long due to FSF_PROT_HOST_CONNECTION_INITIALIZING causing by design looping with exponential increase sleeps in the function performing exchange config data during recovery [zfcp_erp_adapter_strat_fsf_xconf()]. Recovery triggered by local link up. Suppose an event occurs for which the FCP channel would send an unsolicited notification to zfcp by means of a previously posted SRB. We saw it with local cable pull (link down) in multi-initiator zoning with multiple NPIV-enabled subchannels of the same shared FCP channel. As soon as zfcp_erp_adapter_strategy_open_fsf() starts posting the initial status read buffers from within the adapter's ERP thread, the channel does send an unsolicited notification. Since v2.6.27 commit d26ab06ede83 ("[SCSI] zfcp: receiving an unsolicted status can lead to I/O stall"), zfcp_fsf_status_read_handler() schedules adapter->stat_work to re-fill the just consumed SRB from a work item. Now the ERP thread and the work item post SRBs in parallel. Both contexts call the helper function zfcp_status_read_refill(). The tracking of missing (to be posted / re-filled) SRBs is not thread-safe due to separate atomic_read() and atomic_dec(), in order to depend on posting success. Hence, both contexts can see atomic_read(&adapter->stat_miss) == 1. One of the two contexts posts one too many SRB. Zfcp gets QDIO_ERROR_SLSB_STATE on the output queue (trace tag "qdireq1") leading to zfcp_erp_adapter_shutdown() in zfcp_qdio_handler_error(). An obvious and seemingly clean fix would be to schedule stat_work from the ERP thread and wait for it to finish. This would serialize all SRB re-fills. However, we already have another work item wait on the ERP thread: adapter->scan_work runs zfcp_fc_scan_ports() which calls zfcp_fc_eval_gpn_ft(). The latter calls zfcp_erp_wait() to wait for all the open port recoveries during zfcp auto port scan, but in fact it waits for any pending recovery including an adapter recovery. This approach leads to a deadlock. [see also v3.19 commit 18f87a67e6d6 ("zfcp: auto port scan resiliency"); v2.6.37 commit d3e1088d6873 ("[SCSI] zfcp: No ERP escalation on gpn_ft eval"); v2.6.28 commit fca55b6fb587 ("[SCSI] zfcp: fix deadlock between wq triggered port scan and ERP") fixing v2.6.27 commit c57a39a45a76 ("[SCSI] zfcp: wait until adapter is finished with ERP during auto-port"); v2.6.27 commit cc8c282963bd ("[SCSI] zfcp: Automatically attach remote ports")] Instead make the accounting of missing SRBs atomic for parallel execution in both the ERP thread and adapter->stat_work. Signed-off-by: Steffen Maier Fixes: d26ab06ede83 ("[SCSI] zfcp: receiving an unsolicted status can lead to I/O stall") Cc: #2.6.27+ Reviewed-by: Jens Remus Signed-off-by: Martin K. Petersen commit 4b66810303f507a56d07ba9b1b264cd51c41fed6 Author: Rob Herring Date: Wed Dec 5 13:50:39 2018 -0600 scsi: sun_esp: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Martin K. Petersen commit 3beeabd5f2d1fc7a48cb887a298bc412789a1f68 Author: David Disseldorp Date: Wed Dec 5 13:18:38 2018 +0100 scsi: target: perform t10_wwn ID initialisation in target_alloc_device() Initialise the t10_wwn vendor, model and revision defaults when a device is allocated instead of when it's enabled. This ensures that custom vendor or model strings set prior to enablement are not later overwritten with default values. The TRANSPORT_FLAG_PASSTHROUGH conditional can be dropped for the following reasons: - target_core_pscsi overwrites the defaults in the pscsi_configure_device() callback. + the contents is then only used for ConfigFS via $pscsi_dev/statistics/scsi_lu/vend, etc. - target_core_user doesn't touch the defaults, nor are they used for anything outside of ConfigFS. Signed-off-by: David Disseldorp Reviewed-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 2d882847280e3ae1ddc95175d0fc2006e11bb63f Author: David Disseldorp Date: Wed Dec 5 13:18:37 2018 +0100 scsi: target: remove hardcoded T10 Vendor ID in INQUIRY response Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke Reviewed-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 54a6f3f6a43cf5a5ad0421e4440a4c7095e7a223 Author: David Disseldorp Date: Wed Dec 5 13:18:36 2018 +0100 scsi: target: add device vendor_id configfs attribute The vendor_id attribute will allow for the modification of the T10 Vendor Identification string returned in inquiry responses. Its value can be viewed and modified via the ConfigFS path at: target/core/$backstore/$name/wwn/vendor_id "LIO-ORG" remains the default value, which is set when the backstore device is enabled. [mkp: corrected VPD page number] Signed-off-by: David Disseldorp Reviewed-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit b2da4abf26e859c6c17b49f6f728db0eaab9bc4a Author: David Disseldorp Date: Wed Dec 5 13:18:35 2018 +0100 scsi: target: consistently null-terminate t10_wwn strings In preparation for supporting user provided vendor strings, add an extra byte to the vendor, model and revision arrays in struct t10_wwn. This ensures that the full INQUIRY data can be carried in the arrays along with a null-terminator. Change a number of array readers and writers so that they account for explicit null-termination: - The pscsi_set_inquiry_info() and emulate_model_alias_store() codepaths don't currently explicitly null-terminate; fix this. - Existing t10_wwn field dumps use for-loops which step over null-terminators for right-padding. + Use printf with width specifiers instead. Signed-off-by: David Disseldorp Reviewed-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 0de263577de5d5e052be5f4f93334e63cc8a7f0b Author: David Disseldorp Date: Wed Dec 5 13:18:34 2018 +0100 scsi: target: use consistent left-aligned ASCII INQUIRY data spc5r17.pdf specifies: 4.3.1 ASCII data field requirements ASCII data fields shall contain only ASCII printable characters (i.e., code values 20h to 7Eh) and may be terminated with one or more ASCII null (00h) characters. ASCII data fields described as being left-aligned shall have any unused bytes at the end of the field (i.e., highest offset) and the unused bytes shall be filled with ASCII space characters (20h). LIO currently space-pads the T10 VENDOR IDENTIFICATION and PRODUCT IDENTIFICATION fields in the standard INQUIRY data. However, the PRODUCT REVISION LEVEL field in the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke Reviewed-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 75c1d48a338bdf3ce850166be527598017e0ebca Author: Thomas Meyer Date: Sun Dec 2 21:52:11 2018 +0100 scsi: qla2xxx: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f3e46ac47e42df29db99e331ad8f39f34789d4e4 Author: Thomas Meyer Date: Sun Dec 2 21:52:11 2018 +0100 scsi: qedf: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 19c0507252c977ba8b3d2e2fe99afd2c176a993b Author: Thomas Meyer Date: Sun Dec 2 21:52:11 2018 +0100 scsi: megaraid_sas: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit c4e521b654e15e372a6429e269e7e907b4698224 Author: Bart Van Assche Date: Thu Nov 29 10:25:11 2018 -0800 scsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function Nesting in __qla2x00_abort_all_cmds() is way too deep. Reduce the nesting level by introducing a helper function. This patch does not change any functionality. Reviewed-by: Laurence Oberman Acked-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 14e9a890ec9751f0b2aeeed385c836c773fb991a Author: Varun Prakash Date: Thu Nov 29 19:18:31 2018 +0530 scsi: csiostor: remove flush_scheduled_work() flush_scheduled_work() is not required as csio_hw_exit_workers() calls cancel_work_sync() for hw->evtq_work. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 636db60b8e910760c283b7aa928efcc580c1f574 Author: Fedor Loshakov Date: Thu Nov 29 13:09:56 2018 +0100 scsi: zfcp: make DIX experimental, disabled, and independent of DIF Introduce separate zfcp module parameters to individually select support for: DIF which should work (zfcp.dif, which used to be DIF+DIX, disabled) or DIX+DIF which can cause trouble (zfcp.dix, new, disabled). If DIX is enabled, we warn on zfcp driver initialization. As before, this also reduces the maximum I/O request size to half, to support the worst case of merged single sector requests with one protection data scatter gather element per sector. This can impact the maximum throughput. In DIF-only mode (zfcp.dif=1 zfcp.dix=0), we can use the full maximum I/O request size as there is no protection data for zfcp. Signed-off-by: Steffen Maier Signed-off-by: Fedor Loshakov Reviewed-by: Jens Remus Signed-off-by: Martin K. Petersen commit 1ff2d8c43bc2ac78470033eae2947aec0c2e8cb6 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:21:23 2018 -0600 scsi: BusLogic: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056537 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Khalid Aziz Signed-off-by: Martin K. Petersen commit 09a5a24ff36f906baaa51338829acca6bd8438f8 Author: Avri Altman Date: Thu Nov 22 20:04:56 2018 +0200 scsi: ufs: Remove redundant sense size definition By spec, the ufs sense data is 18 bytes long. Signed-off-by: Avri Altman Signed-off-by: Martin K. Petersen commit 7250d12d73195adbf9c3eb003b4331ce36eed038 Author: Sabyasachi Gupta Date: Thu Nov 15 22:04:04 2018 +0530 scsi: snic: Use vzalloc Replaced vmalloc + memset with vzalloc Signed-off-by: Sabyasachi Gupta Acked-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen commit 58f5fa68372505c8c6e57754a370f0e7e6004513 Author: Peng Ma Date: Thu Dec 6 19:18:23 2018 +0800 arm64: dts: ls1046a: add qdma device tree nodes add the qDMA device tree nodes for LS1046A devices. Signed-off-by: Wen He Signed-off-by: Peng Ma Signed-off-by: Shawn Guo commit 29813f669d89a1a9ae2e3e2d2cf55e12ed54853f Author: Peng Ma Date: Thu Dec 6 19:18:22 2018 +0800 arm64: dts: ls1043a: add qdma device tree nodes add the qDMA device tree nodes for LS1043A devices. Signed-off-by: Wen He Signed-off-by: Peng Ma Signed-off-by: Shawn Guo commit d9a71ef086e89e411ca508a69361b38beb0aafdf Author: Ioana Ciocoi Radulescu Date: Tue Dec 4 16:33:07 2018 +0000 arm64: dts: ls1088a: Add missing dma-ranges property LS1088A has a 48-bit address size so make sure that the dma-ranges property reflects this. Signed-off-by: Ioana Radulescu Signed-off-by: Shawn Guo commit a2468676cc826be36d8f2ab3d593eea80f639c44 Author: Ioana Ciocoi Radulescu Date: Tue Dec 4 16:33:06 2018 +0000 arm64: dts: ls1088a: Move fsl-mc node The fsl-mc node should sit under the soc node, so move it to its proper location. Fixes: ac7c9ff741fb ("arm64: dts: ls1088a: add fsl-mc hardware resource manager node") Signed-off-by: Ioana Radulescu Signed-off-by: Shawn Guo commit c9a1f24304cbf6d576a0e0c379ae85e7329cd0ba Author: Viresh Kumar Date: Fri Nov 16 15:34:26 2018 +0530 arm64: dts: fsl: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Shawn Guo commit 8897f3255c9c411b86482e09ccbc3e75a8a201e7 Author: Bhaskar Upadhaya Date: Wed Nov 14 05:30:52 2018 +0000 arm64: dts: Add support for NXP LS1028A SoC LS1028A contains two ARM v8 CortexA72 processor cores with 32 KB L1-D cache and 48 KB L1-I cache Features summary Two 32-bit / 64-bit ARM v8 Cortex-A72 CPUs - Arranged as single clusters of two cores sharing a 1 MB L2 cache - Speed Up to 1.3 GHz - Support for cluster power-gating. Cache coherent interconnect (CCI-400) - Hardware-managed data coherency - Up to 400 MHz 32-bit DDR4 SDRAM memory controller with ECC Two PCIe 3.0 controllers One serial ATA (SATA 3.0) controller Two high-speed USB 3.0 controllers with integrated PHY Following levels of DTSI/DTS files have been created for the LS1028A SoC family: - fsl-ls1028a.dtsi: DTS-Include file for NXP LS1028A SoC. - fsl-ls1028a-qds.dts: DTS file for NXP LS1028A QDS board. - fsl-ls1028a-rdb.dts: DTS file for NXP LS1028A RDB board Signed-off-by: Sudhanshu Gupta Signed-off-by: Rai Harninder Signed-off-by: Bhaskar Upadhaya Acked-by: Li Yang Signed-off-by: Shawn Guo commit 1fa35bc09d48de9dbbadf11e667adced9e461131 Author: Hou Zhiqiang Date: Wed Nov 7 05:35:32 2018 +0000 arm64: dts: layerscape: removed compatible string "snps,dw-pcie" Removed the wrong compatible string "snps,dw-pcie", in case match incorrect driver. Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo commit e3f230c066cd50010844871d62aed346dbe7c9d7 Author: Sabyasachi Gupta Date: Wed Nov 14 22:24:21 2018 +0530 scsi: fnic: Use vzalloc Replaced vmalloc + memset with vzalloc Signed-off-by: Sabyasachi Gupta Acked-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen commit aa2aa88847154010157aa5957951ae826118d28c Author: Bao Xiaowei Date: Mon Nov 5 16:46:48 2018 +0800 arm64: dts: fsl: Add the status property disable PCIe Add the status property disable the PCIe, the property will be enable by bootloader. Signed-off-by: Bao Xiaowei Signed-off-by: Shawn Guo commit 26a06c6e290e0a577d82f1dd3ecdee4a838aee80 Author: Pramod Kumar Date: Tue Oct 16 07:40:29 2018 +0000 arm64: dts: ls1012a: Add FRWY-LS1012A board support LS1012A-FRWY is an ls1012a based SoC board. Key features of this board are Micro SD, USB 3.0, upto 1GB DDR, UART Signed-off-by: Pramod Kumar Signed-off-by: Shawn Guo commit 3ad9800231d4f070c580e3e3894940892a4308d0 Author: Bart Van Assche Date: Tue Nov 27 15:52:04 2018 -0800 scsi: target/core: Reduce the amount of code executed with a spinlock held Due to the "make ABORT and LUN RESET handling synchronous" patch, cmd->work is only modified from the regular command execution path and no longer asynchronously by the code that executes task management functions. Since the regular command execution code is sequential per command, no locking is required to manipulate cmd->work. Hence stop protecting cmd->work manipulations with locking. Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2c9fa49e100f962af988f1c0529231bf14905cda Author: Bart Van Assche Date: Tue Nov 27 15:52:03 2018 -0800 scsi: target/core: Make ABORT and LUN RESET handling synchronous Instead of invoking target driver callback functions from the context that handles an abort or LUN RESET task management function, only set the abort flag from that context and perform the actual abort handling from the context of the regular command processing flow. This approach has the advantage that the task management code becomes much easier to read and to verify since the number of potential race conditions against the command processing flow is strongly reduced. This patch has been tested by running the following two shell commands concurrently for about ten minutes for both the iSCSI and the SRP target drivers ($dev is an initiator device node connected with storage provided by the target driver under test): * fio with data verification enabled on a filesystem mounted on top of $dev. * while true; do sg_reset -d $dev; echo -n .; sleep .1; done Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit aaa00cc93c1d0fd2693a76ea2ba375ea1ac1a7f3 Author: Bart Van Assche Date: Tue Nov 27 15:52:02 2018 -0800 scsi: target/core: Fix TAS handling for aborted commands The TASK ABORTED STATUS (TAS) bit is defined as follows in SAM: "TASK_ABORTED: this status shall be returned if a command is aborted by a command or task management function on another I_T nexus and the control mode page TAS bit is set to one". TAS handling is spread over the target core and the iSCSI target driver. If a LUN RESET is received, the target core will send the TASK_ABORTED response for all commands for which such a response has to be sent. If an ABORT TASK is received, only the iSCSI target driver will send the TASK_ABORTED response for the commands for which that response has to be sent. That is a bug since all target drivers have to honor the TAS bit. Fix this by moving the code that handles TAS from the iSCSI target driver into the target core. Additionally, if a command has been aborted, instead of sending the TASK_ABORTED status from the context that processes the SCSI command send it from the context of the ABORT TMF. The core_tmr_abort_task() change in this patch causes the CMD_T_TAS flag to be set if a TASK_ABORTED status has to be sent back to the initiator that submitted the command. If that flag has been set transport_cmd_finish_abort() will send the TASK_ABORTED response. Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit fbbd49235590ca759aada500b5a935e06b7f6708 Author: Bart Van Assche Date: Tue Nov 27 15:52:01 2018 -0800 scsi: target/core: Simplify the code for aborting SCSI commands Instead of allowing the code that aborts a SCSI command to finish before all iSCSI data frames have been received, make that code wait until all iSCSI data frames have been received. Introduce a new member variable in the target driver template to communicate that information from the iSCSI target driver to the target core. This change allows to leave out the check whether or not it is already safe to send the TASK_ABORTED reply from transport_send_task_abort(). Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a014c3647a15ccb946dc6ea387a40098aeab5dc8 Author: Bart Van Assche Date: Tue Nov 27 15:52:00 2018 -0800 scsi: target/core: Make it possible to wait from more than one context for command completion This patch does not change any functionality but makes the patch that makes TMF handling synchronous easier to read. Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit db5b21a24e01d35495014076700efa02d6dcbb68 Author: Bart Van Assche Date: Tue Nov 27 15:51:59 2018 -0800 scsi: target/core: Use system workqueues for TMF A quote from SAM-5: "The order in which task management requests are processed is not specified by the SCSI architecture model. The SCSI architecture model does not require in-order delivery of such task management requests or processing by the task manager in the order received. To guarantee the processing order of task management requests referencing sent to a specific logical unit, an application client should not have more than one such task management request pending to that logical unit." This means that it is safe to use the system workqueues instead of tmr_wq for processing TMFs. An intended side effect of this patch is that it enables concurrent processing of TMFs. Reviewed-by: Christoph Hellwig Cc: Nicholas Bellinger Cc: Mike Christie Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ad669505c4e9db9af9faeb5c51aa399326a80d91 Author: Bart Van Assche Date: Tue Nov 27 15:51:58 2018 -0800 scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough A session must only be released after all code that accesses the session structure has finished. Make sure that this is the case by introducing a new command counter per session that is only decremented after the .release_cmd() callback has finished. This patch fixes the following crash: BUG: KASAN: use-after-free in do_raw_spin_lock+0x1c/0x130 Read of size 4 at addr ffff8801534b16e4 by task rmdir/14805 CPU: 16 PID: 14805 Comm: rmdir Not tainted 4.18.0-rc2-dbg+ #5 Call Trace: dump_stack+0xa4/0xf5 print_address_description+0x6f/0x270 kasan_report+0x241/0x360 __asan_load4+0x78/0x80 do_raw_spin_lock+0x1c/0x130 _raw_spin_lock_irqsave+0x52/0x60 srpt_set_ch_state+0x27/0x70 [ib_srpt] srpt_disconnect_ch+0x1b/0xc0 [ib_srpt] srpt_close_session+0xa8/0x260 [ib_srpt] target_shutdown_sessions+0x170/0x180 [target_core_mod] core_tpg_del_initiator_node_acl+0xf3/0x200 [target_core_mod] target_fabric_nacl_base_release+0x25/0x30 [target_core_mod] config_item_release+0x9c/0x110 [configfs] config_item_put+0x26/0x30 [configfs] configfs_rmdir+0x3b8/0x510 [configfs] vfs_rmdir+0xb3/0x1e0 do_rmdir+0x262/0x2c0 do_syscall_64+0x77/0x230 entry_SYSCALL_64_after_hwframe+0x49/0xbe Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a95be3842c51c9ac32fe17faedf2c156ccf81bd7 Author: Bart Van Assche Date: Tue Nov 27 15:51:57 2018 -0800 scsi: target/core: Simplify transport_clear_lun_ref() Since transport_clear_lun_ref() already waits until the percpu-refcount .release() method is called, it is not necessary to wait first until percpu_ref_kill_and_confirm() has finished transitioning the refcount into atomic mode. Remove the code that waits for percpu_ref_kill_and_confirm() to complete and also the completion object that is used by that code. This patch does not change the behavior of the SCSI target code. Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: David Disseldorp Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5d6cd9fe318b4a6ed2ecee83306db3f543a4f9c4 Author: Bart Van Assche Date: Tue Nov 27 15:51:56 2018 -0800 scsi: target/core: Use kvcalloc() instead of open-coding it This patch does not change any functionality. Note: the code that frees sess_cmd_map already uses kvfree() so that code does not need to be modified. Reviewed-by: David Disseldorp Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e7f411049f5164ee6db6c3434c07302846f09990 Author: Bart Van Assche Date: Tue Nov 27 15:51:55 2018 -0800 scsi: target/tcmu: Fix queue_cmd_ring() declaration This patch does not change any functionality but avoids that sparse complains about the queue_cmd_ring() function and its callers. Fixes: 6fd0ce79724d ("tcmu: prep queue_cmd_ring to be used by unmap wq") Reviewed-by: David Disseldorp Cc: Nicholas Bellinger Cc: Mike Christie Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 257edce66d31a345dff8ca9f1fd30c46e0f14058 Author: Masahiro Yamada Date: Wed Dec 5 16:38:35 2018 +0900 kbuild: exploit parallel building for CONFIG_HEADERS_CHECK When CONFIG_HEADERS_CHECK is enabled, the headers_check is executed as a serialized task in the vmlinux recipe. Make it independent of vmlinux so that parallel building can process the headers_check and other build targets simultaneously. Signed-off-by: Masahiro Yamada commit 5e34bd1d548d440015d5bee3326e9d74cdebecd6 Author: Masahiro Yamada Date: Wed Dec 5 16:37:53 2018 +0900 kbuild: remove a special handling for *.agh in Makefile.headersinst scripts/Makefile.headersinst takes care of *.agh just for arch/cris/include/uapi/arch-v10/arch/sv_addr.agh because renaming exported headers is difficult (or impossible). This code is no longer necessary thanks to commit c690eddc2f3b ("CRIS: Drop support for the CRIS port"). Signed-off-by: Masahiro Yamada commit 0cbe3ac439bfe3e6d0f65b006044f84ce7f3e4d0 Author: Masahiro Yamada Date: Fri Nov 30 18:15:52 2018 +0900 kconfig: remove k_invalid from expr_parse_string() return type The only possibility of k_invalid being returned was when expr_parse_sting() parsed S_OTHER type symbol. This actually never happened, and this is even clearer since S_OTHER has gone. Clean up unreachable code. Signed-off-by: Masahiro Yamada commit 2aabbed6774f231c57f8ae6bc4f856fb2a75cd6a Author: Masahiro Yamada Date: Fri Nov 30 18:15:51 2018 +0900 kconfig: remove S_OTHER symbol type and correct dependency tracking The S_OTHER type could be set only when conf_read_simple() is reading include/config/auto.conf file. For example, CONFIG_FOO=y exists in include/config/auto.conf but it is missing from the currently parsed Kconfig files, sym_lookup() allocates a new symbol, and sets its type to S_OTHER. Strangely, it will be set to S_STRING by conf_set_sym_val() a few lines below while it is obviously bool or tristate type. On the other hand, when CONFIG_BAR="bar" is being dropped from include/config/auto.conf, its type remains S_OTHER. Because for_all_symbols() omits S_OTHER symbols, conf_touch_deps() misses to touch include/config/bar.h This behavior has been a pretty mystery for me, and digging the git histroy did not help. At least, touching depfiles is broken for string type symbols. I removed S_OTHER entirely, and reimplemented it more simply. If CONFIG_FOO was visible in the previous syncconfig, but is missing now, what we want to do is quite simple; just call conf_touch_dep() to touch include/config/foo.h instead of allocating a new symbol data. Signed-off-by: Masahiro Yamada commit 1508fec82e394149212aca836dd925d7e8fa3228 Author: Masahiro Yamada Date: Fri Nov 30 18:15:50 2018 +0900 kconfig: split out code touching a file to conf_touch_dep() conf_touch_deps() iterates over symbols, touching corresponding include/config/*.h files as needed. Split the part that touches a single file into a new helper so it can be reused. The new helper, conf_touch_dep(), takes a symbol name as a parameter, and touches the corresponding include/config/*.h file. Signed-off-by: Masahiro Yamada commit 0849d212e39523e2289c2a6d685b899f944746eb Author: Masahiro Yamada Date: Fri Nov 30 18:15:49 2018 +0900 kconfig: rename conf_split_config() to conf_touch_deps() According to commit 2e3646e51b2d ("kconfig: integrate split config into silentoldconfig"), this function was named after split-include tool, which used to exist in old versions of Linux. Setting aside the historical reason, rename it into a more intuitive name. This function touches timestamp files under include/config/ in order to interact with the fixdep tool. Signed-off-by: Masahiro Yamada commit 75889e9be78febab9991f9c07fdf09d128562bf5 Author: Masahiro Yamada Date: Fri Nov 30 18:15:48 2018 +0900 kconfig: remove unneeded setsym label in conf_read_simple() The two 'goto setsym' statements are reachable only when sym == NULL. The code below the 'setsym:' label does nothing when sym == NULL since there is just one if-block guarded by 'if (sym && ...)'. Hence, 'goto setsym' can be replaced with 'continue'. Signed-off-by: Masahiro Yamada commit 83af01ba1c2d38d3075b38af2a2116eb1ebe67e6 Merge: 0fbe82e628c81 8d189159ac1e8 Author: David S. Miller Date: Fri Dec 7 16:39:03 2018 -0800 Merge branch 'tc-testing-next' Lucas Bates says: ==================== tc-testing: implement command timeouts and better results tracking Patch 1 adds a timeout feature for any command tdc launches in a subshell. This prevents tdc from hanging indefinitely. Patches 2-4 introduce a new method for tracking and generating test case results, and implements it across the core script and all applicable plugins. ==================== Signed-off-by: David S. Miller commit 8d189159ac1e8dc6d491840b3b2a9ede762269bc Author: Lucas Bates Date: Thu Dec 6 17:42:27 2018 -0500 tc-testing: gitignore, ignore generated test results Ignore any .tap or .xml test result files generated by tdc. Additionally, ignore plugin symlinks. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit 915c158deaf97be49e71250f43e1539542217962 Author: Lucas Bates Date: Thu Dec 6 17:42:26 2018 -0500 tc-testing: Implement the TdcResults module in tdc In tdc and the valgrind plugin, begin using the TdcResults module to track executed test cases. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit dfe465d33e7fce145746d836ddb31f0e27f28e28 Author: Lucas Bates Date: Thu Dec 6 17:42:25 2018 -0500 tc-testing: Add new TdcResults module This module includes new classes for tdc to use in keeping track of test case results, instead of generating and tracking a lengthy string. The new module can be extended to support multiple formal test result formats to be friendlier to automation. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit d37e56df23f9e5916f95b60388c3f179c53c7102 Author: Lucas Bates Date: Thu Dec 6 17:42:24 2018 -0500 tc-testing: Add command timeout feature to tdc Using an attribute set in the tdc_config.py file, limit the amount of time tdc will wait for an executed command to complete and prevent the script from hanging entirely. This timeout will be applied to all executed commands. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller commit 0fbe82e628c817e292ff588cd5847fc935e025f2 Author: yupeng Date: Wed Dec 5 18:56:28 2018 -0800 net: call sk_dst_reset when set SO_DONTROUTE after set SO_DONTROUTE to 1, the IP layer should not route packets if the dest IP address is not in link scope. But if the socket has cached the dst_entry, such packets would be routed until the sk_dst_cache expires. So we should clean the sk_dst_cache when a user set SO_DONTROUTE option. Below are server/client python scripts which could reprodue this issue: server side code: ========================================================================== import socket import struct import time s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('0.0.0.0', 9000)) s.listen(1) sock, addr = s.accept() sock.setsockopt(socket.SOL_SOCKET, socket.SO_DONTROUTE, struct.pack('i', 1)) while True: sock.send(b'foo') time.sleep(1) ========================================================================== client side code: ========================================================================== import socket import time s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('server_address', 9000)) while True: data = s.recv(1024) print(data) ========================================================================== Signed-off-by: yupeng Signed-off-by: David S. Miller commit 58956317c8de52009d1a38a721474c24aef74fe7 Author: David Ahern Date: Fri Dec 7 12:24:57 2018 -0800 neighbor: Improve garbage collection The existing garbage collection algorithm has a number of problems: 1. The gc algorithm will not evict PERMANENT entries as those entries are managed by userspace, yet the existing algorithm walks the entire hash table which means it always considers PERMANENT entries when looking for entries to evict. In some use cases (e.g., EVPN) there can be tens of thousands of PERMANENT entries leading to wasted CPU cycles when gc kicks in. As an example, with 32k permanent entries, neigh_alloc has been observed taking more than 4 msec per invocation. 2. Currently, when the number of neighbor entries hits gc_thresh2 and the last flush for the table was more than 5 seconds ago gc kicks in walks the entire hash table evicting *all* entries not in PERMANENT or REACHABLE state and not marked as externally learned. There is no discriminator on when the neigh entry was created or if it just moved from REACHABLE to another NUD_VALID state (e.g., NUD_STALE). It is possible for entries to be created or for established neighbor entries to be moved to STALE (e.g., an external node sends an ARP request) right before the 5 second window lapses: -----|---------x|----------|----- t-5 t t+5 If that happens those entries are evicted during gc causing unnecessary thrashing on neighbor entries and userspace caches trying to track them. Further, this contradicts the description of gc_thresh2 which says "Entries older than 5 seconds will be cleared". One workaround is to make gc_thresh2 == gc_thresh3 but that negates the whole point of having separate thresholds. 3. Clearing *all* neigh non-PERMANENT/REACHABLE/externally learned entries when gc_thresh2 is exceeded is over kill and contributes to trashing especially during startup. This patch addresses these problems as follows: 1. Use of a separate list_head to track entries that can be garbage collected along with a separate counter. PERMANENT entries are not added to this list. The gc_thresh parameters are only compared to the new counter, not the total entries in the table. The forced_gc function is updated to only walk this new gc_list looking for entries to evict. 2. Entries are added to the list head at the tail and removed from the front. 3. Entries are only evicted if they were last updated more than 5 seconds ago, adhering to the original intent of gc_thresh2. 4. Forced gc is stopped once the number of gc_entries drops below gc_thresh2. 5. Since gc checks do not apply to PERMANENT entries, gc levels are skipped when allocating a new neighbor for a PERMANENT entry. By extension this means there are no explicit limits on the number of PERMANENT entries that can be created, but this is no different than FIB entries or FDB entries. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 12edfdfc79860f42fa493f81518e040376b6a5bc Merge: 9f4c2cffd08c1 630ba007f4750 Author: David S. Miller Date: Fri Dec 7 15:57:02 2018 -0800 Merge branch 'hns3-error-handling' Salil Mehta says: ==================== net: hns3: Additions/optimizations related to HNS3 H/W err handling This patch set primarily does following addtions and optimizations related to error handling in HNS3 Ethernet driver: 1. Name changes for enable and process functions and minor loop optimizations. [PATCH 1-6] 2. Modify query and clearing of RAS errors using new set of commands because modules specific commands for clearing RCB PPP PF, SSU are obselete. [PATCH 7] 3. Deletes logging 1-bit errors for RAS in HNS3 driver as these never get reported to the driver. [PATCH 8] 4. Add handling of NIC hw errors reported through MSIx rather than PCIe AER channel. [PATCH 9] 5. Add handling for the HW RAS and MSIx errors in the modules MAC, PPP PF, MSIx SRAM, RCB and SSU. [PATCH 10-13] 6. Add handling of RoCEE RAS errors. [PATCH 14] ==================== Signed-off-by: David S. Miller commit 630ba007f4750722bc56dfebfaf1c0316c2fcb69 Author: Shiju Jose Date: Fri Dec 7 21:08:11 2018 +0000 net: hns3: add handling of RDMA RAS errors This patch handles the RDMA RAS errors. 1. Enable RAS interrupt, print error detail info and clear error status. 2. Do CORE reset to recovery when these non-fatal errors happened. Signed-off-by: Xiaofei Tan Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit c3529177db471b964fbe327ffb801266f0482d64 Author: Shiju Jose Date: Fri Dec 7 21:08:10 2018 +0000 net: hns3: handle hw errors of SSU This patch enables and handles hw errors of the Storage Switch Unit(SSU). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit f69b10b317f9dd286b6f03f2d6d8d5980b8ca9bc Author: Shiju Jose Date: Fri Dec 7 21:08:09 2018 +0000 net: hns3: handle hw errors of PPU(RCB) This patch enables and handles hw RAS and MSIx errors of PPU(RCB). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 8fc9d3e3b46b1aa881d897c1405516ee8c7c6f43 Author: Shiju Jose Date: Fri Dec 7 21:08:08 2018 +0000 net: hns3: handle hw errors of PPP PF This patch handles PF hw errors of PPP(Programmable Packet Processor). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 7838f908e251497502092e625f2053398c23516b Author: Shiju Jose Date: Fri Dec 7 21:08:07 2018 +0000 net: hns3: add handling of hw errors of MAC This patch adds enable and handling of hw errors of the MAC block. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit f6162d44126ce0f601f92afc770648b73924eb6c Author: Salil Mehta Date: Fri Dec 7 21:08:06 2018 +0000 net: hns3: add handling of hw errors reported through MSIX This patch adds handling for HNS3 hardware errors(non-standard) which are reported through MSIX interrupts and not through PCIe AER channel. These MSIX reported hardware errors are handled using common misc. interrupt handler. Hardware error related registers cannot be cleared in context to the interrupt received as they require *heavy* access to hardware using IMP(Integrated Mangement Processor) commands. Hence, we defer the clearing of such error events till later time. Since, we have defered exact identification of errors we will have to defer the level of receovery/reset which might be required. Hence, a new reset type UNKNOWN reset has been introduced which effectively defers the assertion of the reset till we get hold of kind of errors at later time. Signed-off-by: Salil Mehta Signed-off-by: Shiju Jose Signed-off-by: David S. Miller commit 8bb147927c7c6caf8a26d9f5022f5744b12ea55a Author: Shiju Jose Date: Fri Dec 7 21:08:05 2018 +0000 net: hns3: deleted logging 1 bit errors This patch deletes logging 1 bit errors for the following reasons. 1. AER does not notify 1 bit errors to the device drivers. However AER reports 1 bit errors to the userspace through the trace_aer_event for logging in the rasdaemon. 2. Firmware clears the status of 1 bit errors in the hw registers. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 332fbf576579a78a769209a9e588dae0c8fc0bdb Author: Shiju Jose Date: Fri Dec 7 21:08:04 2018 +0000 net: hns3: add handling of hw ras errors using new set of commands 1. This patch adds handling of hw ras errors using new set of common commands. 2. Updated the error message tables to match the register's name and error status returned by the commands. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 481a626a603d5e234618a19abbaa889405755f46 Author: Shiju Jose Date: Fri Dec 7 21:08:03 2018 +0000 net: hns3: add optimization in the hclge_hw_error_set_state 1. This patch adds minor loop optimization in the hclge_hw_error_set_state function. 2. Adds logging module's name if it fails to configure the error interrupts. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 381c356e956627d387b7f0944d7616175057504f Author: Shiju Jose Date: Fri Dec 7 21:08:02 2018 +0000 net: hns3: rename process_hw_error function This patch renames process_hw_error function to handle_hw_ras_error function to match the purpose of the function. This is because hw errors reported through ras and msix interrupts will be handled separately. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 166b04c3ee31994a133fc27393c99aee7e7164d7 Author: Shiju Jose Date: Fri Dec 7 21:08:01 2018 +0000 net: hns3: deletes unnecessary settings of the descriptor data This patch deletes unnecessary setting of the descriptor data to 0 for disabling error interrupts because it is already done by the hclge_cmd_setup_basic_desc function. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit f3fa4a94dbc2f2b6ee05295bc92457e545c95131 Author: Shiju Jose Date: Fri Dec 7 21:08:00 2018 +0000 net: hns3: re-enable error interrupts on hw reset This patch adds calling hclge_hw_error_set_state function to re-enable the error interrupts those will be disabled on the hw reset. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 98da4027afa626221466adf43e627e8668802884 Author: Shiju Jose Date: Fri Dec 7 21:07:59 2018 +0000 net: hns3: rename enable error interrupt functions This patch - renames the enable error interrupt functions. The reason is that these functions are used for both enable and disable error interrupts. - removes redundant logs from the enable error interrupt functions. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit fe0f7d698d5dce6195b034e1c5f4ea1633d42387 Author: Shiju Jose Date: Fri Dec 7 21:07:58 2018 +0000 net: hns3: remove existing process error functions and reorder hw_blk table 1.The command interface for queryng and clearing hw errors is changed, which requires the new process error functions to be added. This patch removes all the current process error functions and associated definitions. The new functions to handle ras errors would be added in this patch set. 2. Fixed order issue of the hw_blk table. Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 22666cc1481ae3814d9c7718418cc4a3aa7d90c3 Author: Christian König Date: Wed Sep 26 11:50:09 2018 +0200 drm/amdgpu: move IV prescreening into the GMC code The GMC/VM subsystem is causing the faults, so move the handling here as well. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a655dad4b2f94e0d880f2e4ea45251092d836f36 Author: Christian König Date: Wed Sep 26 11:15:36 2018 +0200 drm/amdgpu: remove VM fault_credit handling printk_ratelimit() is much better suited to limit the number of reported VM faults. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2026057736e9134c524ad85b526005944034e00f Author: Christian König Date: Wed Sep 26 11:08:32 2018 +0200 drm/amdgpu: send IVs to the KFD only after processing them v3 This allows us to filter out VM faults in the GMC code. v2: don't filter out all faults v3: fix copy&paste typo, send all IV to the KFD, don't change message level Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b408a548846f2343716351d55a6c9af9e73ec32c Author: Felix Kuehling Date: Tue Nov 20 21:44:27 2018 -0500 drm/amdkfd: Add support for doorbell BOs This allows user mode to map doorbell pages into GPUVM address space. That way GPUs can submit to user mode queues (self-dispatch). Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1dde0ea95b782425b95455d487cb44991525a1d1 Author: Felix Kuehling Date: Tue Nov 20 21:00:29 2018 -0500 drm/amdkfd: Add DMABuf import functionality This is used for interoperability between ROCm compute and graphics APIs. It allows importing graphics driver BOs into the ROCm SVM address space for zero-copy GPU access. The API is split into two steps (query and import) to allow user mode to manage the virtual address space allocation for the imported buffer. Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3704d56e1a64bb0e951815f91149ae7bb726aa76 Author: Felix Kuehling Date: Tue Nov 20 20:52:37 2018 -0500 drm/amdkfd: Add NULL-pointer check top_dev->gpu is NULL for CPUs. Avoid dereferencing it if NULL. Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 611736d8447c0c48a172db0b968dddae60696a72 Author: Felix Kuehling Date: Mon Nov 19 20:05:54 2018 -0500 drm/amdgpu: Add KFD VRAM limit checking We don't want KFD processes evicting each other over VRAM usage. Therefore prevent overcommitting VRAM among KFD applications with a per-GPU limit. Also leave enough room for page tables on top of the application memory usage. Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Reviewed-by: Eric Huang Signed-off-by: Alex Deucher commit 5634e38cda7ba47f9e0f372cf1e1729a845d3348 Author: Kuehling, Felix Date: Fri Dec 7 22:07:20 2018 +0000 drm/amdgpu: Workaround build failure due to trace conflict Avoid including mmu_context.h in amdgpu_amdkfd.h since that may be included in other header files that define traces. This leads to conflicts due to traces defined in other headers included via mmu_context.h. Acked-by: Alex Deucher Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9ed9203c3ee7acd3f6e2acb3f1f691366847c8b5 Author: hersen wu Date: Wed Nov 28 16:55:47 2018 -0500 drm/amd/powerplay: rv dal-pplib interface refactor powerplay part [WHY] clarify dal input parameters to pplib interface, remove un-used parameters. dal knows exactly which parameters needed and their effects at pplib and smu sides. current dal sequence for dcn1_update_clock to pplib: 1.smu10_display_clock_voltage_request for dcefclk 2.smu10_display_clock_voltage_request for fclk 3.phm_store_dal_configuration_data { set_min_deep_sleep_dcfclk set_active_display_count store_cc6_data --- this data never be referenced new sequence will be: 1. set_display_count --- need add new pplib interface 2. set_min_deep_sleep_dcfclk -- new pplib interface 3. set_hard_min_dcfclk_by_freq 4. set_hard_min_fclk_by_freq after this code refactor, smu10_display_clock_voltage_request, phm_store_dal_configuration_data will not be needed for rv. [HOW] step 1: add new functions at pplib interface step 2: add new functions at amdgpu dm and dc Signed-off-by: hersen wu Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 49ebca798696a6a5da02a562cd1fd0e645264511 Author: wentalou Date: Thu Dec 6 10:29:52 2018 +0800 drm/amdgpu: Skip ring soft recovery when fence was NULL amdgpu_ring_soft_recovery would have Call-Trace, when s_fence->parent was NULL inside amdgpu_job_timedout. Check fence first, as drm_sched_hw_job_reset did. Signed-off-by: Wentao Lou Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 53450efd6eb9e3155e16c14ce2ece387fc2d65e7 Author: Xiangliang Yu Date: Wed Dec 5 14:36:33 2018 +0800 drm/amdgpu/psp: Destroy psp ring when doing gpu reset PSP ring need to be destroy before starting reinit for vf. This patche move it from hypervisor driver into guest. Signed-off-by: Xiangliang Yu Signed-off-by: Frank Min Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5ec996dfb6a19f3ea6d7ab9e74e9f32954af8466 Author: Xiangliang Yu Date: Wed Dec 5 11:23:43 2018 +0800 drm/amdgpu/psp: Add support VMR ring for VF PSP only support VMR ring for SRIOV vf since v45 and all commands will be send to VMR ring for executing. VMR ring use C2PMSG 101 ~ 103 instead of C2PMSG 64 ~ 71. Signed-off-by: Xiangliang Yu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d63cda5bfcd341b86c07beb5919107aae0d9ba99 Author: Xiangliang Yu Date: Tue Dec 4 15:13:28 2018 +0800 drm/amdgpu/psp: Get psp fw version through reading register If PSP FW is running already, driver will not load PSP FW again and skip it. So psp fw version is not correct if reading it from FW binary file, need to get right version from register. Signed-off-by: Xiangliang Yu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 07daa8a0784e3085c4c8e282a83dd8c92bf59b53 Author: Christian König Date: Mon Sep 24 13:35:08 2018 +0200 drm/amdgpu: always reserve one more shared slot for pipelined BO moves This allows us to drop the extra reserve in TTM. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 0aa7aa24cc11720a05b4492345f0adba8373c226 Author: Christian König Date: Fri Sep 21 18:09:59 2018 +0200 drm/amdgpu: always reserve two slots for the VM And drop the now superflous extra reservations. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 049aca4363d8af87cab8d53de5401602db3b9999 Author: Christian König Date: Wed Sep 19 16:54:35 2018 +0200 drm/amdgpu: fix using shared fence for exported BOs v2 It is perfectly possible that the BO list is created before the BO is exported. While at it clean up setting shared to one instead of true. v2: add comment and simplify logic Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Huang Rui Acked-by: Junwei Zhang Signed-off-by: Alex Deucher commit a9f34c70fd168b164aadffd46bb757ded52e25b9 Author: Christian König Date: Wed Sep 19 16:25:08 2018 +0200 drm/ttm: allow reserving more than one shared slot v3 Let's support simultaneous submissions to multiple engines. v2: rename the field to num_shared and fix up all users v3: rebased Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c50fe0c5b174153669fd437c1c5fde724b3bc7f4 Author: Aaron Liu Date: Wed Dec 5 11:07:55 2018 +0800 drm/amdgpu: both support PCO FP5/AM4 rlc fw For Picasso && AM4 SOCKET board, we use picasso_rlc_am4.bin For Picasso && FP5 SOCKET board, we use picasso_rlc.bin Judgment method: PCO AM4: revision >= 0xC8 && revision <= 0xCF or revision >= 0xD8 && revision <= 0xDF otherwise is PCO FP5 Signed-off-by: Aaron Liu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 34c08da2097abe99cdc4757194f10a0c51148ce3 Author: Alex Deucher Date: Thu Nov 29 19:35:14 2018 -0500 drm/amdgpu/powerplay: check MC firmware for FFC support Check if the MC firmware supports FFC and tell the SMC so mclk switching is handled properly. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c6296f5a658974169261ed8fe75887e7552174af Author: Alex Deucher Date: Thu Nov 29 19:34:27 2018 -0500 drm/amdgpu/powerplay: update smu7_ppsmc.h Add new messages for polaris. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8b3e6f8999f8d704fccce225b9455b3fa639d1c9 Author: Carlo Caione Date: Fri Dec 7 10:52:30 2018 +0000 arm64: dts: meson: Fix IRQ trigger type for macirq A long running stress test on a custom board shipping an AXG SoCs and a Realtek RTL8211F PHY revealed that after a few hours the connection speed would drop drastically, from ~1000Mbps to ~3Mbps. At the same time the 'macirq' (eth0) IRQ would stop being triggered at all and as consequence the GMAC IRQs never ACKed. After a painful investigation the problem seemed to be due to a wrong defined IRQ type for the GMAC IRQ that should be LEVEL_HIGH instead of EDGE_RISING. The change in the macirq IRQ type also solved another long standing issue affecting this SoC/PHY where EEE was causing the network connection to die after stressing it with iperf3 (even though much sooner). It's now possible to remove the 'eee-broken-1000t' quirk as well. Fixes: feb3cbea0946 ("ARM64: dts: meson-gxbb-odroidc2: fix GbE tx link breakage") Fixes: 6d28d577510f ("ARM64: dts: meson-axg: fix ethernet stability issue") Reviewed-by: Jerome Brunet Tested-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit cbddb02e37b8bad058e1c552d4db87aa4d7c9582 Author: Carlo Caione Date: Sat Dec 1 16:43:01 2018 +0000 arm64: dts: meson-axg: Enable GPIO interrupt controller Enable the GPIO interrupt controller for the AXG SoCs. Signed-off-by: Carlo Caione Reviewed-by: Jerome Brunet Tested-by: Jerome Brunet Signed-off-by: Kevin Hilman commit de7c2fa5fc9f74a2777b3bc6397a227be755f203 Author: Carlo Caione Date: Wed Dec 5 15:52:07 2018 +0000 arm64: dts: meson-axg: s400: Enable PHY interrupt Now that the GPIO controller has been enabled also on AXG we can hook up the GPIO interrupt for the PHY. Tested-by: Jerome Brunet Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit 9af3f5cf9d64a056eca53bc643f6288ad28bbbb5 Author: Yuval Shaia Date: Thu Dec 6 14:48:18 2018 +0200 RDMA/core: Validate port number in query_pkey verb Before calling the driver's function let's make sure port is valid. Signed-off-by: Yuval Shaia Signed-off-by: Jason Gunthorpe commit 6baefa1aa46f0e90aefbd13b8c926e89068fabba Merge: 17f6c83fb5ebf c099f3f413f35 Author: Alexei Starovoitov Date: Fri Dec 7 13:30:49 2018 -0800 Merge branch 'support-alu32_arsh' Jiong Wang says: ==================== BPF_ALU | BPF_ARSH | BPF_* were rejected by commit: 7891a87efc71 ("bpf: arsh is not supported in 32 bit alu thus reject it"). As explained in the commit message, this is due to there is no complete support for them on interpreter and various JIT compilation back-ends. This patch set is a follow-up which completes the missing bits. This also pave the way for running bpf program compiled with ALU32 instruction enabled by specifing -mattr=+alu32 to LLVM for which case there is likely to have more BPF_ALU | BPF_ARSH insns that will trigger the rejection code. test_verifier.c is updated accordingly. I have tested this patch set on x86-64 and NFP, I need help of review and test on the arch changes (mips/ppc/s390). Note, there might be merge confict on mips change which is better to be applied on top of: commit: 20b880a05f06 ("mips: bpf: fix encoding bug for mm_srlv32_op"), which is on mips-fixes branch at the moment. Thanks. v1->v2: - Fix ppc implementation bug. Should zero high bits explicitly. ==================== Signed-off-by: Alexei Starovoitov commit c099f3f413f354ecdd518e4be6a232592e91d5b9 Author: Jiong Wang Date: Wed Dec 5 13:52:36 2018 -0500 selftests: bpf: update testcases for BPF_ALU | BPF_ARSH "arsh32 on imm" and "arsh32 on reg" now are accepted. Also added two new testcases to make sure arsh32 won't be treated as arsh64 during interpretation or JIT code-gen for which case the high bits will be moved into low halve that the testcases could catch them. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit c49f7dbd4f9c2c49df7fc0f5b50c1350ee7e01ee Author: Jiong Wang Date: Wed Dec 5 13:52:35 2018 -0500 bpf: verifier remove the rejection on BPF_ALU | BPF_ARSH This patch remove the rejection on BPF_ALU | BPF_ARSH as we have supported them on interpreter and all JIT back-ends Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit 2dc6b100f928aac8d7532bf7112d3f8d3f952bad Author: Jiong Wang Date: Wed Dec 5 13:52:34 2018 -0500 bpf: interpreter support BPF_ALU | BPF_ARSH This patch implements interpreting BPF_ALU | BPF_ARSH. Do arithmetic right shift on low 32-bit sub-register, and zero the high 32 bits. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit 84708c1386770e957347d847522a4aac22ea04dc Author: Jiong Wang Date: Wed Dec 5 13:52:33 2018 -0500 nfp: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_* BPF_X support needs indirect shift mode, please see code comments for details. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit f860203b010ab11995b3073a96cc0d04e520129e Author: Jiong Wang Date: Wed Dec 5 13:52:32 2018 -0500 s390: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_* This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit 44cf43c04bb5f7c688608ff4136b13f2a8a7a129 Author: Jiong Wang Date: Wed Dec 5 13:52:31 2018 -0500 ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_* This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. Cc: Naveen N. Rao Cc: Sandipan Das Signed-off-by: Jiong Wang Reviewed-by: Sandipan Das Signed-off-by: Alexei Starovoitov commit ee94b90c8acaa593b627f5f3fe93e076e7779f5c Author: Jiong Wang Date: Wed Dec 5 13:52:30 2018 -0500 mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X Jitting of BPF_K is supported already, but not BPF_X. This patch complete the support for the latter on both MIPS and microMIPS. Cc: Paul Burton Cc: linux-mips@vger.kernel.org Acked-by: Paul Burton Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit 17f6c83fb5ebf7db4fcc94a5be4c22d5a7bfe428 Author: Jiong Wang Date: Mon Dec 3 17:27:54 2018 -0500 mips: bpf: fix encoding bug for mm_srlv32_op For micro-mips, srlv inside POOL32A encoding space should use 0x50 sub-opcode, NOT 0x90. Some early version ISA doc describes the encoding as 0x90 for both srlv and srav, this looks to me was a typo. I checked Binutils libopcode implementation which is using 0x50 for srlv and 0x90 for srav. v1->v2: - Keep mm_srlv32_op sorted by value. Fixes: f31318fdf324 ("MIPS: uasm: Add srlv uasm instruction") Cc: Markos Chandras Cc: Paul Burton Cc: linux-mips@vger.kernel.org Acked-by: Jakub Kicinski Acked-by: Song Liu Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov commit bec2f7cbb73eadf5e1cc7d54ecb0980ede244257 Author: Arnd Bergmann Date: Tue Apr 17 17:23:35 2018 +0200 y2038: futex: Add support for __kernel_timespec This prepares sys_futex for y2038 safe calling: the native syscall is changed to receive a __kernel_timespec argument, which will be switched to 64-bit time_t in the future. All the internal time handling gets changed to timespec64, and the compat_sys_futex entry point is moved under the CONFIG_COMPAT_32BIT_TIME check to provide compatibility for existing 32-bit architectures. Signed-off-by: Arnd Bergmann commit 04e7712f4460585e5eed5b853fd8b82a9943958f Author: Arnd Bergmann Date: Tue Apr 17 16:31:07 2018 +0200 y2038: futex: Move compat implementation into futex.c We are going to share the compat_sys_futex() handler between 64-bit architectures and 32-bit architectures that need to deal with both 32-bit and 64-bit time_t, and this is easier if both entry points are in the same file. In fact, most other system call handlers do the same thing these days, so let's follow the trend here and merge all of futex_compat.c into futex.c. In the process, a few minor changes have to be done to make sure everything still makes sense: handle_futex_death() and futex_cmpxchg_enabled() become local symbol, and the compat version of the fetch_robust_entry() function gets renamed to compat_fetch_robust_entry() to avoid a symbol clash. This is intended as a purely cosmetic patch, no behavior should change. Signed-off-by: Arnd Bergmann commit 9f4c2cffd08c102107992cd01c12c4a53475baf6 Merge: 6b241e411607a 55939b262a61d Author: David S. Miller Date: Fri Dec 7 12:59:09 2018 -0800 Merge branch 'mlxsw-Un-offload-FDB-on-NVE-detach-attach' Ido Schimmel says: ==================== mlxsw: Un/offload FDB on NVE detach/attach Petr says: When a VXLAN device is attached to a bridge of a driver capable of offloading such, or upped, the FDB entries already present at the device need to be offloaded. Similarly when an offloaded VXLAN device ceases being interesting (it is downed, or detached, or a front-panel port netdevice is detached from the bridge that the VXLAN device is attached to), any offloaded FDB entries need to be unoffloaded and unmarked. This attach / detach processing is implemented in this patchset. In patch #1, a code pattern is extracted into a named function for easier reuse. In patch #2, vxlan_fdb_replay() is added to send SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE for each FDB entry with a given VNI. The intention is that the offloading driver will interpret these events like any other and thus offload the FDB entries that existed prior to VXLAN attach. In patches #3 and #4, the functions vxlan_fdb_clear_offload() resp. br_fdb_clear_offload() are added. These clear the offloaded flag at matching FDB entries. In patches #5-#9, we introduce FID-type-specific and NVE-type-specific ops necessary to properly abstract invocations of the replay/clear functions. Finally patch #10 implements the FDB management. In patch #11, the mlxsw-specific test case is extended to check that the management of offload marks under the newly-supported situations is correct. Patch #12, from Ido, exercises the new code paths in actual functional test. v2: - Patch #1: - Modify vxlan_fdb_switchdev_notifier_info() to initialize the structure through a passed-in pointer argument, instead of returning it as a value. - Patch #2: - Adapt to API change in vxlan_fdb_switchdev_notifier_info() ==================== Signed-off-by: David S. Miller commit 55939b262a61d35d3ccde8a388976b946d654dcf Author: Ido Schimmel Date: Fri Dec 7 19:55:20 2018 +0000 selftests: forwarding: Add PVID test case for VXLAN with VLAN-aware bridges When using VLAN-aware bridges with VXLAN, the VLAN that is mapped to the VNI of the VXLAN device is that which is configured as "pvid untagged" on the corresponding bridge port. When these flags are toggled or when the VLAN is deleted entirely, remote hosts should not be able to receive packets from the VTEP. Add a test case for above mentioned scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0efe9ed98d15146becded107965b4e2f6b3aa805 Author: Petr Machata Date: Fri Dec 7 19:55:18 2018 +0000 selftests: mlxsw: vxlan: Test FDB un/marking on VXLAN join/leave When a VXLAN device is attached to an offloaded bridge, or when a front-panel port is attached to a bridge that already has a VXLAN device, mlxsw should offload the existing offloadable FDB entries. Similarly when VXLAN device is downed, the FDB entries are unoffloaded, and the marks thus need to be cleared. Similarly when a front-panel port device is attached to a bridge with a VXLAN device, or when VLAN flags are tweaked on a VXLAN port attached to a VLAN-aware bridge. Test that the replaying / clearing logic works by observing transitions in presence of offload marks under different scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8a5969d8a83d86f3542355eedcad67d47feafdab Author: Petr Machata Date: Fri Dec 7 19:55:17 2018 +0000 mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable Any existing NVE FDB entries need to be offloaded when NVE is enabled for a given FID. Recent patches have added fdb_replay op for this, so just invoke it from mlxsw_sp_nve_fid_enable(). When NVE is disabled on a FID, any existing FDB offloaded marks need to be cleared on NVE device as well as on its bridge master. An op to handle this, fdb_clear_offload, has been added to FID ops and NVE ops in previous patches. Add code to resolve the NVE device, NVE type, and dispatch to both fdb_clear_offload ops. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 83de78831b99582c0de13d7d2a5849b6bab962c8 Author: Petr Machata Date: Fri Dec 7 19:55:15 2018 +0000 mlxsw: spectrum: Add mlxsw_sp_fid_ops.fdb_clear_offload If there are any offloaded FDB entries at bridge master of an NVE device at the time that it's un-offloaded, their offloaded marks need to be cleared. How that is done depends on whether the bridge in question is vlan aware. Therefore add a per-FID-type operation. Implement the operation for the 802.1q and 802.1d bridges. Add and publish a function mlxsw_sp_fid_fdb_clear_offload() to dispatch to the new operation according to FID type. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b73ef0e0ee30e14104f1eb19471df462ccaae4b3 Author: Petr Machata Date: Fri Dec 7 19:55:14 2018 +0000 mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload If there are any offloaded FDB entries at an NVE device at the time that it's un-offloaded, their offloaded marks need to be cleared. How that is done depends on NVE device type, and therefore add a per-NVE-type operation. Implement the operation for the sole NVE device type currently supported by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a6ef5a48a32fe87af947e22973a409870bc63d0d Author: Petr Machata Date: Fri Dec 7 19:55:12 2018 +0000 mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_replay A replay of FDB needs to be performed so that the FDB entries existing at the NVE device are offloaded. How the replay is done depends on NVE device type, and therefore add a per-NVE-type operation. Implement the operation for the sole NVE device type currently supported by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 34139ede051ea8a10643c615076cb9dadc2a0942 Author: Petr Machata Date: Fri Dec 7 19:55:11 2018 +0000 mlxsw: spectrum_switchdev: Publish mlxsw_sp_switchdev_notifier The notifier block will need to be passed to vxlan_fdb_replay() in a follow-up patch. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2a36c12520683b17ce3fff674446313482e5ab5e Author: Petr Machata Date: Fri Dec 7 19:55:09 2018 +0000 mlxsw: spectrum: Track NVE type at FIDs A follow-up patch will add support for replay and for clearing of offload marks. These are NVE type-sensitive operations, and to be able to dispatch them properly, a FID needs to know what NVE type is attached to it. Therefore, track the NVE type at struct mlxsw_sp_fid. Extend mlxsw_sp_fid_vni_set() to take it as an argument, and add mlxsw_sp_fid_nve_type(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 43920edf3b24b0a3d136019c816e84ffcbef83ab Author: Petr Machata Date: Fri Dec 7 19:55:07 2018 +0000 bridge: Add br_fdb_clear_offload() When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that unsets the offload flag on FDB entries on a given bridge port and VLAN. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e5ff4b1952893fb75aa75067fce31c8567341ed7 Author: Petr Machata Date: Fri Dec 7 19:55:06 2018 +0000 vxlan: Add vxlan_fdb_clear_offload() When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that walks the FDB table, unsetting the offload flag on RDST with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4f89f5b5353cae2e056713e823819f24cad92bc3 Author: Petr Machata Date: Fri Dec 7 19:55:04 2018 +0000 vxlan: Add vxlan_fdb_replay() When a VXLAN device becomes relevant to a driver (such as when it is attached to an offloaded bridge), the driver will generally need to walk the existing FDB entries and offload them. Add a function vxlan_fdb_replay() to call a given notifier block for each FDB entry with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ff23b91ce1ae686e436e9926de1fda3342ef26f8 Author: Petr Machata Date: Fri Dec 7 19:55:03 2018 +0000 vxlan: Add a function to init switchdev_notifier_vxlan_fdb_info There are currently two places that need to initialize the notifier info structure, and one more is coming next when vxlan_fdb_replay() is introduced. These three instances have / will have very similar code that is easy to abstract away into a named function. Add such function, vxlan_fdb_switchdev_notifier_info(), and call it from vxlan_fdb_switchdev_call_notifiers() and vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6b241e411607a8f78bee74b96655e9d7835ea8ba Merge: ef2df7fc11f88 391637676fc9a Author: David S. Miller Date: Fri Dec 7 12:49:10 2018 -0800 Merge branch 'net-aquantia-add-RSS-configuration' Igor Russkikh says: ==================== net: aquantia: add RSS configuration In this patchset few bugs related to RSS are fixed and RSS table and hash key configuration is added. We also do increase max number of HW rings upto 8. v2: removed extra arg check ==================== Signed-off-by: David S. Miller commit 391637676fc9a2d545e51efbb11dd8dc3faf604f Author: Dmitry Bogdanov Date: Fri Dec 7 14:00:22 2018 +0000 net: aquantia: add support of RSS configuration Add support of configuration of RSS hash key and RSS indirection table. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a8c69ca79217c8f1d070e470066cc24d8f866d6e Author: Dmitry Bogdanov Date: Fri Dec 7 14:00:17 2018 +0000 net: aquantia: fix initialization of RSS table Now RSS indirection table is initialized before setting up the number of hw queues, consequently the table may be filled by non existing queues. This patch moves the initialization when the number of hw queues is known. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 71a963cfc50b0309ca3192c7258569e0d5477ab0 Author: Dmitry Bogdanov Date: Fri Dec 7 14:00:15 2018 +0000 net: aquantia: increase max number of hw queues Increase the upper limit of the hw queues up to 8. This makes RSS better on multiheaded cpus. This is a maximum AQC hardware supports in one traffic class. The actual value is still limited by a number of available cpu cores. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 474fb1150d40780e71f0b569aeac4f375df3af3d Author: Dmitry Bogdanov Date: Fri Dec 7 14:00:11 2018 +0000 net: aquantia: fix RSS table and key sizes Set RSS indirection table and RSS hash key sizes to their real size. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a41f85b6017ee20952a60e4330bcae2527fe2c2a Merge: 651022382c7f8 6e6da2039c822 Author: Stephen Boyd Date: Fri Dec 7 12:38:48 2018 -0800 Merge tag 'sunxi-clk-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clock changes from Maxime Ripard: - Sigma Delta modulation for the A33 audio clocks - Support for the F1c100s SoC - Rework of the oscillator tree - H6 display engine clocks * tag 'sunxi-clk-for-4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for all audio module clocks clk: sunxi-ng: a33: Use sigma-delta modulation for audio PLL clk: sunxi-ng: h3: Allow parent change for ve clock clk: sunxi-ng: add support for suniv F1C100s SoC dt-bindings: clock: Add Allwinner suniv F1C100s CCU clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output clk: sunxi-ng: sun50i: a64: Use sigma-delta modulation for audio PLL clk: sunxi-ng: a64: Fix gate bit of DSI DPHY clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I clk: sunxi-ng: Add support for H6 DE3 clocks dt-bindings: clock: sun8i-de2: Add H6 DE3 clock description clk: sunxi-ng: h6: Set video PLLs limits clk: sunxi-ng: Use u64 for calculation of NM rate clk: sunxi-ng: Adjust MP clock parent rate when allowed clk: sunxi-ng: sun50i: h6: Fix MMC clock mux width clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock commit 60baf75e3f5b76043c25328ac0c5320aaef5ea41 Merge: 1ef06003a50ca 36c4da4f552a1 Author: Stephen Boyd Date: Fri Dec 7 12:34:11 2018 -0800 Merge tag 'clk-renesas-for-v4.21-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for CPEX (timer) clocks on various R-Car Gen3 and RZ/G2 SoCs - Add support for SDHI HS400 clocks on early revisions of R-Car H3 and M3-W - Miscellaneous fixes based on the Hardware Manual Errata * tag 'clk-renesas-for-v4.21-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen3: Add HS400 quirk for SD clock clk: renesas: rcar-gen3: Add documentation for SD clocks clk: renesas: rcar-gen3: Set state when registering SD clocks clk: renesas: r8a77995: Simplify PLL3 multiplier/divider clk: renesas: r8a77995: Add missing CPEX clock clk: renesas: r8a77995: Remove non-existent SSP clocks clk: renesas: r8a77995: Remove non-existent VIN5-7 module clocks clk: renesas: r8a77995: Correct parent clock of DU clk: renesas: r8a77990: Correct parent clock of DU clk: renesas: r8a77970: Add CPEX clock clk: renesas: r8a77965: Add CPEX clock clk: renesas: r8a7796: Add CPEX clock clk: renesas: r8a7795: Add CPEX clock clk: renesas: r8a774a1: Add CPEX clock dt-bindings: clock: r8a7796: Remove CSIREF clock dt-bindings: clock: r8a7795: Remove CSIREF clock commit fe15bcc6e23f4d5273dfbc056bae8710723f03d0 Merge: e7521d82b3359 7e11b911b520d Author: Jason Gunthorpe Date: Fri Dec 7 13:25:12 2018 -0700 Merge branch 'mlx5-packet-credit-fc' into rdma.git Danit Goldberg says: Packet based credit mode Packet based credit mode is an alternative end-to-end credit mode for QPs set during their creation. Credits are transported from the responder to the requester to optimize the use of its receive resources. In packet-based credit mode, credits are issued on a per packet basis. The advantage of this feature comes while sending large RDMA messages through switches that are short in memory. The first commit exposes QP creation flag and the HCA capability. The second commit adds support for a new DV QP creation flag. The last commit report packet based credit mode capability via the MLX5DV device capabilities. * branch 'mlx5-packet-credit-fc': IB/mlx5: Report packet based credit mode device capability IB/mlx5: Add packet based credit mode support net/mlx5: Expose packet based credit mode Signed-off-by: Jason Gunthorpe commit 7e11b911b520de6a3189fafa94740f5fde2a2c98 Author: Danit Goldberg Date: Fri Nov 30 13:22:06 2018 +0200 IB/mlx5: Report packet based credit mode device capability Report packet based credit mode capability via the mlx5 DV interface. Signed-off-by: Danit Goldberg Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 569c665150156e44ecbd92af47a6d3fd4e2e4690 Author: Danit Goldberg Date: Fri Nov 30 13:22:05 2018 +0200 IB/mlx5: Add packet based credit mode support The device can support two credit modes, message based (default) and packet based. In order to enable packet based mode, the QP should be created with special flag that indicates this. This patch adds support for the new DV QP creation flag that can be used for RC QPs in order to change the credit mode. Signed-off-by: Danit Goldberg Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1504b91c819359b574b55c269c850352260b8d19 Author: Manu Gautam Date: Thu May 31 16:17:10 2018 +0530 arm64: dts: msm8996: Use dwc3-qcom glue driver for USB Move from dwc3-of-simple to dwc3-qcom glue driver to support peripheral mode which requires qscratch wrapper programming on VBUS event. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Manu Gautam Tested-by: Vivek Gautam Signed-off-by: Andy Gross commit 818046ebe2a7b9d5517588e08df7eaeb858decb7 Author: Andy Gross Date: Fri Dec 7 12:27:48 2018 -0600 arm64: dts: qcom: msm8998: Fixup clock to use xo_board This patch sets the msm8998 xo clock name back to xo_board. Recent clock tree changes fixed the clock tree and the change to the xo name is causing issues where msm8998 boards do not boot properly. Let's change it back and leave the xo label on it. Fixes: 634da3307b08 (arm64: dts: qcom: msm8998: correct xo clock name) Signed-off-by: Andy Gross Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Jeffrey Hugo commit 24c8e4b85399b00f4ae96e7957b0eeaa374e9380 Author: Marek Szyprowski Date: Fri Dec 7 11:09:52 2018 +0100 ARM: multi_v7_defconfig: Add TOSHIBA TC358764 bridge driver Add DRM bridge driver for TOSHIBA TC358764 chip used in LCD panel for Samsung Exynos5250-based Arndale board. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 47bf095d16df60eb3aad406607ccdbedac65a98c Author: Marek Szyprowski Date: Fri Dec 7 11:09:51 2018 +0100 ARM: multi_v7_defconfig: Add MAX8952 regulator driver Add regulator driver for MAX8952 PMIC chip used on Samsung UniversalC210 board. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit e49698328732907b16c21f40ef26b3f9b7580c8f Author: Marek Szyprowski Date: Fri Dec 7 11:09:50 2018 +0100 ARM: exynos_defconfig: Add TOSHIBA TC358764 bridge driver Add DRM bridge driver for TOSHIBA TC358764 chip used in LCD panel for Samsung Exynos5250-based Arndale board. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 6e82e64b7c5717f8051905b81936772782a6362e Author: Marek Szyprowski Date: Fri Dec 7 11:09:49 2018 +0100 ARM: exynos_defconfig: Add MAX8952 regulator driver Add regulator driver for MAX8952 PMIC chip used on Samsung UniversalC210 board. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit e159b6074c82fe31b79aad672e02fa204dbbc6d8 Author: Helen Fornazier Date: Fri Dec 7 12:56:41 2018 -0500 media: vimc: fix start stream when link is disabled If link is disabled, media_entity_remote_pad returns NULL, causing a NULL pointer deference. Ignore links that are not enabled instead. Signed-off-by: Helen Koike Signed-off-by: Mauro Carvalho Chehab commit f25b6302b294c220d5be010342f6399d89dcabf3 Author: Hans de Goede Date: Tue Dec 4 10:20:04 2018 +0100 platform/x86: touchscreen_dmi: Add info for the Mediacom Flexbook Edge 11 Add a DMI match for the Mediacom Flexbook Edge 11, this is the same hw as the Trekstor Primebook C11, so we use the same settings. Reported-by: rmbg Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 4230509978f2921182da4e9197964dccdbe463c3 Author: Will Deacon Date: Tue Sep 18 09:39:55 2018 +0100 arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint The "L" AArch64 machine constraint, which we use for the "old" value in an LL/SC cmpxchg(), generates an immediate that is suitable for a 64-bit logical instruction. However, for cmpxchg() operations on types smaller than 64 bits, this constraint can result in an invalid instruction which is correctly rejected by GAS, such as EOR W1, W1, #0xffffffff. Whilst we could special-case the constraint based on the cmpxchg size, it's far easier to change the constraint to "K" and put up with using a register for large 64-bit immediates. For out-of-line LL/SC atomics, this is all moot anyway. Reported-by: Robin Murphy Signed-off-by: Will Deacon commit 959bf2fd03b59fc107584c21425f3dc73c49f762 Author: Will Deacon Date: Thu Sep 13 15:56:16 2018 +0100 arm64: percpu: Rewrite per-cpu ops to allow use of LSE atomics Our percpu code is a bit of an inconsistent mess: * It rolls its own xchg(), but reuses cmpxchg_local() * It uses various different flavours of preempt_{enable,disable}() * It returns values even for the non-returning RmW operations * It makes no use of LSE atomics outside of the cmpxchg() ops * There are individual macros for different sizes of access, but these are all funneled through a switch statement rather than dispatched directly to the relevant case This patch rewrites the per-cpu operations to address these shortcomings. Whilst the new code is a lot cleaner, the big advantage is that we can use the non-returning ST- atomic instructions when we have LSE. Signed-off-by: Will Deacon commit b4f9209bfcd5964551de434342818334ab9c8c7e Author: Will Deacon Date: Thu Sep 13 14:28:33 2018 +0100 arm64: Avoid masking "old" for LSE cmpxchg() implementation The CAS instructions implicitly access only the relevant bits of the "old" argument, so there is no need for explicit masking via type-casting as there is in the LL/SC implementation. Move the casting into the LL/SC code and remove it altogether for the LSE implementation. Signed-off-by: Will Deacon commit 5ef3fe4cecdf82fdd71ce78988403963d01444d4 Author: Will Deacon Date: Thu Sep 13 13:30:45 2018 +0100 arm64: Avoid redundant type conversions in xchg() and cmpxchg() Our atomic instructions (either LSE atomics of LDXR/STXR sequences) natively support byte, half-word, word and double-word memory accesses so there is no need to mask the data register prior to being stored. Signed-off-by: Will Deacon commit f2fb18c7cc697c3d313e4d86ceb7d5c81c1c388d Author: Tony Lindgren Date: Wed Dec 5 14:08:37 2018 -0800 ARM: dts: Add am335x mcasp with l3 data port ranges Earlier attempt to move am335x mcasp to probe with ti-sysc interconnect target module caused audio to stop working and and the dts changes were reverted by commit 5d2632a577ba ("ARM: dts: Revert am335x mcasp ti-sysc changes"). Turns out we were missing the l3 data port ranges for mcasp. This caused mcasp dma to attempt to use wrong port address. So let's try again essentially reverting the earlier revert and adding the missing l3 data port ranges. Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 84fb6c7feb1494ebb7d1ec8b95cfb7ada0264465 Author: Russell King - ARM Linux Date: Fri Dec 7 09:17:07 2018 -0800 ARM: dts: Fix OMAP4430 SDP Ethernet startup It was noticed that unbinding and rebinding the KSZ8851 ethernet resulted in the driver reporting "failed to read device ID" at probe. Probing the reset line with a 'scope while repeatedly attempting to bind the driver in a shell loop revealed that the KSZ8851 RSTN pin is constantly held at zero, meaning the device is held in reset, and does not respond on the SPI bus. Experimentation with the startup delay on the regulator set to 50ms shows that the reset is positively released after 20ms. Schematics for this board are not available, and the traces are buried in the inner layers of the board which makes tracing where the RSTN pin extremely difficult. We can only guess that the RSTN pin is wired to a reset generator chip driven off the ethernet supply, which fits the observed behaviour. Include this delay in the regulator startup delay - effectively treating the reset as a "supply stable" indicator. This can not be modelled as a delay in the KSZ8851 driver since the reset generation is board specific - if the RSTN pin had been wired to a GPIO, reset could be released earlier via the already provided support in the KSZ8851 driver. This also got confirmed by Peter Ujfalusi based on Blaze schematics that should be very close to SDP4430: TPS22902YFPR is used as the regulator switch (gpio48 controlled): Convert arm boot_lock to raw The VOUT is routed to TPS3808G01DBV. (SCH Note: Threshold set at 90%. Vsense: 0.405V). According to the TPS3808 data sheet the RESET delay time when Ct is open (this is the case in the schema): MIN/TYP/MAX: 12/20/28 ms. Signed-off-by: Russell King Reviewed-by: Peter Ujfalusi [tony@atomide.com: updated with notes from schematics from Peter] Signed-off-by: Tony Lindgren commit 5760367298a37c459ef0b1364463d70fd9a1f972 Author: Felix Brack Date: Fri Nov 30 15:54:46 2018 +0100 ARM: dts: am335x-pdu001: Fix polarity of card detection input When a micro SD card is inserted in the PDU001 card cage, the card detection switch is opened and the corresponding GPIO input is driven by a pull-up. Hence change the active level of the card detection input from low to high. Signed-off-by: Felix Brack Signed-off-by: Tony Lindgren commit 2531b3bea791640d8c724c7a31e591ffb8083132 Merge: a763ecc15d0e3 2afdb4c41d787 Author: Tony Lindgren Date: Fri Dec 7 08:27:06 2018 -0800 Merge branch 'audio-fix' into omap-for-v4.20/fixes commit 2afdb4c41d7876e430b9bc6e2d7e2fe28609fd6a Author: Janusz Krzysztofik Date: Fri Nov 23 12:19:45 2018 +0100 ARM: OMAP1: ams-delta: Fix audio permanently muted Since commit 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs"), on-board audio has appeared muted. Believed to be unused GPIO pin "hookflash1", apparently set high regardless of the corresponding bit of "latch2" port attempted to be set low during .init_machine(), has been identified as the reason. According to Amstrad E3 wiki, the purpose of the pin hasn't been clearly identified. Original Amstrad software used to produce a high pulse on it when the phone was taken off hook or recall was pressed. With the current finding, we can assume the pin provides a kind of audio mute function. Proper resolution of the issue should be done in two steps: - resolution of an issue with the pin state not reflecting the value the corresponding bit of the port was attempted to be initialized with, - extension of on-board audio driver with a new control. For now, rename the pin to "audio_mute" to reflect its function and, as a quick fix, hogg it as output low so on-board audio can produce audible sound again. Fixes: 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs") Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren commit a763ecc15d0e37c3a15ff6825183061209832685 Author: Roger Quadros Date: Wed Dec 5 19:27:44 2018 +0200 ARM: dts: omap5: Fix dual-role mode on Super-Speed port OMAP5's Super-Speed USB port has a software mailbox register that needs to be fed with VBUS and ID events from an external VBUS/ID comparator. Without this, Host role will not work correctly. Fixes: 656c1a65ab55 ("ARM: dts: omap5: enable OTG role for DWC3 controller") Reported-by: H. Nikolaus Schaller Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren commit 7146a4f02635fe1b0791ce818176b1cf6b3d8a85 Author: Gao Xiang Date: Sat Dec 8 00:19:18 2018 +0800 staging: erofs: simplify `z_erofs_vle_submit_all' Previously, there are too many hacked stuffs such as `__FSIO_1', `lstgrp_noio', `lstgrp_io' out there in `z_erofs_vle_submit_all'. Revisit the whole process by properly introducing jobqueue to represent each type of queued workgroups, furthermore hide all of crazyness behind independent separated functions. After this patch, 2 independent jobqueues exist if managed cache is enabled, or 1 jobqueue if disabled. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 6afd227ca179b33ca4437502ac8847df9c43aef9 Author: Gao Xiang Date: Sat Dec 8 00:19:17 2018 +0800 staging: erofs: redefine where `owned_workgrp_t' points By design, workgroups are queued in the form of linked lists. Previously, it points to the next `z_erofs_vle_workgroup', which isn't flexible enough to simplify `z_erofs_vle_submit_all'. Let's fix it by pointing to the next `owned_workgrp_t' and use container_of to get its coresponding `z_erofs_vle_workgroup'. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 92e6efd566c4a15de9b0ad3e7954448b1ad66f42 Author: Gao Xiang Date: Sat Dec 8 00:19:16 2018 +0800 staging: erofs: refine compressed pages preload flow Currently, there are two kinds of compressed pages in erofs: 1) file pages for the in-place decompression and 2) managed pages for cached decompression. Both are all stored in grp->compressed_pages[]. For managed pages, they could already exist or could be preloaded in this round, including the following cases in detail: 1) Already valid (loaded in some previous round); 2) PAGE_UNALLOCATED, should be allocated at the time of submission; 3) Just found in the managed cache, and with an extra page ref. Currently, 1) and 3) can be distinguishable by lock_page and checking its PG_private, which is guaranteed by the reclaim path, but it's better to do a double check by using an extra tag. This patch reworks the preload flow by introducing such the tag by using tagged pointer, too many #ifdefs are removed as well. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 9248fce714d5317650b316cf418ea396562e767e Author: Gao Xiang Date: Sat Dec 8 00:19:15 2018 +0800 staging: erofs: revisit the page submission flow Previously, the submission flow works with cached compressed pages reclaim path in a tricky way, and it could be buggy if the reclaim path changes later without such tricky restrictions. For example, currently one PagePrivate(page) is evaluated without taking page lock (it only follows a wait_for_page_locked which closes such race) and no handling solves the potential page truncation case. In addition, it's also full of #ifdefs in the function, which is hard to understand and maintain. this patch fixes them all. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 672e54761025997b088d3b8e6c3bb20a71fb32f6 Author: Gao Xiang Date: Sat Dec 8 00:19:14 2018 +0800 staging: erofs: localize UNALLOCATED_CACHED_PAGE placeholder In practice, in order to do cached decompression rather than reuse them for in-place decompression and make full use of pages in page_pool instead of allocating as much as possible, an unallocated placeholder was introduce to mark all in compressed_pages[] and they will be replaced at the time of submission. Previously EROFS_UNALLOCATED_CACHED_PAGE was included in internal.h, which is unnecessary since it's only internally used in decompression subsystem, move it to unzip_vle.c and rename it to PAGE_UNALLOCATED. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit c1448fa88025872502c3f7bf2cf7365deb25bb1b Author: Gao Xiang Date: Sat Dec 8 00:19:13 2018 +0800 staging: erofs: introduce MNGD_MAPPING helper This patch introduces MNGD_MAPPING to wrap up sbi->managed_cache->i_mapping, which will be used to solve too many #ifdefs in a single function. No logic changes. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 848bd9acdcd00c164b42b14aacec242949ecd471 Author: Gao Xiang Date: Sat Dec 8 00:19:12 2018 +0800 staging: erofs: fix use-after-free of on-stack `z_erofs_vle_unzip_io' The root cause is the race as follows: Thread #0 Thread #1 z_erofs_vle_unzip_kickoff z_erofs_submit_and_unzip struct z_erofs_vle_unzip_io io[] atomic_add_return() wait_event() [end of function] wake_up() Fix it by taking the waitqueue lock between atomic_add_return and wake_up to close such the race. kernel message: Unable to handle kernel paging request at virtual address 97f7052caa1303dc ... Workqueue: kverityd verity_work task: ffffffe32bcb8000 task.stack: ffffffe3298a0000 PC is at __wake_up_common+0x48/0xa8 LR is at __wake_up+0x3c/0x58 ... Call trace: ... [] __wake_up_common+0x48/0xa8 [] __wake_up+0x3c/0x58 [] z_erofs_vle_unzip_kickoff+0x40/0x64 [] z_erofs_vle_read_endio+0x94/0x134 [] bio_endio+0xe4/0xf8 [] dec_pending+0x134/0x32c [] clone_endio+0x90/0xf4 [] bio_endio+0xe4/0xf8 [] verity_work+0x210/0x368 [] process_one_work+0x188/0x4b4 [] worker_thread+0x140/0x458 [] kthread+0xec/0x108 [] ret_from_fork+0x10/0x1c Code: d1006273 54000260 f9400804 b9400019 (b85fc081) ---[ end trace be9dde154f677cd1 ]--- Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit aaa21231698c0d326922a325647adf38e4f21db0 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: sodaville: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit cb0e9a7bda9b3989c2be0d37eb2053690a58c0a3 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: sch: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 9b8bf5bfb6cebc46761fdc213928432d50061546 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: pch: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 93374b76a92c1e88f3251d38a6ea36e07a2cdf86 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: merrifield: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 7fa07b6f4e13bec94370efde258cfc0d892d0c58 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: lynxpoint: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 917842f676961d72922332489deee8373284e624 Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: intel-mid: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 7ed0cf0afd603f565bb04538b21103b3dadd514c Author: Andy Shevchenko Date: Tue Nov 6 14:11:42 2018 +0200 gpio: ich: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko commit 8700998ff6b3ae23f9421eb936d7260a17a38f5d Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: sodaville: Sort headers alphabetically Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit 3e1884f8c32f845bd74fcfa347fe8936999f471d Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: pch: Sort headers alphabetically Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit 488f270cad27fdb87b00ee22b2c4d0616d8bb135 Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: ich: Sort headers alphabetically Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit 47091b0594d95359cac907c67051c97975b6f6c9 Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: sch: Remove linux/init.h and sort headers There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. While here, sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit 7629771f5eb8d24edeb28fda09a637d7b6fb8f03 Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: merrifield: Remove linux/init.h There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. Signed-off-by: Andy Shevchenko commit 92c286267d62c40a7bab85f303d467085954ee3b Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: lynxpoint: Remove linux/init.h and sort headers There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. While here, sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit ddc53c40cbe7b13d1086cf3b5fdc5c074a289d18 Author: Andy Shevchenko Date: Tue Sep 4 14:26:25 2018 +0300 gpio: intel-mid: Remove linux/module.h and sort headers There is no need to include linux/module.h when at the same time we include linux/init.h. Remove redundant inclusion. While here, remove no-op macro and sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko commit a3bb44bcb3a06b43940576f9749020a42d31a9c0 Author: Andy Shevchenko Date: Wed Nov 7 21:29:53 2018 +0200 gpio: pch: Remove duplicate assignments There is no need to assign the same values which core does for us anyway. Signed-off-by: Andy Shevchenko commit 0511e116b8327aa7bf621d9cee35b93ffa69c85a Author: Andy Shevchenko Date: Fri Dec 7 17:33:07 2018 +0200 gpio: pch: Remove redundant __func__ from debug print dev_dbg includes the function name & line number by default when dynamic debugging is enabled. Hence __func__ is redundant here and removed. Do the same for any messages in ->probe() since it doesn't make sense. Signed-off-by: Andy Shevchenko commit ee494cf377e142f65f202fadf0d859f8e12119fb Author: Tomasz Figa Date: Thu Dec 14 23:32:21 2017 -0500 media: v4l2-device: Link subdevices to their parent devices if available Currently v4l2_device_register_subdev_nodes() does not initialize the dev_parent field of the video_device structs it creates for subdevices being registered. This leads to __video_register_device() falling back to the parent device of associated v4l2_device struct, which often does not match the physical device the subdevice is registered for. Due to the problem above, the links between real devices and v4l-subdev nodes cannot be obtained from sysfs, which might be confusing for the userspace trying to identify the hardware. Fix this by initializing the dev_parent field of the video_device struct with the value of dev field of the v4l2_subdev struct. In case of subdevices without a parent struct device, the field will be NULL and the old behavior will be preserved by the semantics of __video_register_device(). Signed-off-by: Tomasz Figa Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 394135c1ff13ec9b5a38a36bbdb5811f2f595e94 Author: James Morse Date: Fri Dec 7 10:14:39 2018 +0000 arm64: kexec_file: forbid kdump via kexec_file_load() Now that kexec_walk_memblock() can do the crash-kernel placement itself architectures that don't support kdump via kexe_file_load() need to explicitly forbid it. We don't support this on arm64 until the kernel can add the elfcorehdr and usable-memory-range fields to the DT. Without these the crash-kernel overwrites the previous kernel's memory during startup. Add a check to refuse crash image loading. Reviewed-by: Bhupesh Sharma Signed-off-by: James Morse Signed-off-by: Will Deacon commit 16767229940fb18086430907d3cd46245c7398ac Author: Harry Cutts Date: Wed Dec 5 10:42:28 2018 +1000 HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice Signed-off-by: Harry Cutts Reviewed-by: Benjamin Tissoires Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 4435ff2f09a2fc43d1201d732e6e606b4d4b1ad5 Author: Harry Cutts Date: Wed Dec 5 10:42:27 2018 +1000 HID: logitech: Enable high-resolution scrolling on Logitech mice There are three features used by various Logitech mice for high-resolution scrolling: the scrolling acceleration bit in HID++ 1.0, and the x2120 and x2121 features in HID++ 2.0 and above. This patch supports all three, and uses the multiplier reported by the mouse for the HID++ 2.0+ features. The full list of product IDs of mice which support high-resolution scrolling was provided by Logitech, but the patch was tested using the following mice (using the Unifying receiver): * HID++ 1.0: Anywhere MX, Performance MX * x2120: M560 * x2121: MX Anywhere 2, MX Master 2S This patch is a combinations of the now-reverted commits 1ff2e1a44e0, d56ca9855bf9, 5fe2ccbef9d, 044ee89028 together with some extra bits for the directional and timeout-based reset. The previous patch series was in hid-input, it appears this remainder handling is logitech-specific and was moved to hid-logitech-hidpp.c and renamed accordingly. Signed-off-by: Harry Cutts Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 95c3d00282ce6a4911e3050a3b48a194ba16e9e5 Author: Harry Cutts Date: Wed Dec 5 10:42:26 2018 +1000 HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration" "Scrolling acceleration" is a bit of a misnomer: it doesn't deal with acceleration at all. However, that's the name used in Logitech's spec, so I used it here. Signed-off-by: Harry Cutts Reviewed-by: Benjamin Tissoires Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit fef33601a321d8b7edfdd4c318b9c6c7aec6ef06 Author: Peter Hutterer Date: Wed Dec 5 10:42:25 2018 +1000 HID: logitech-hidpp: fix typo, hiddpp to hidpp Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 2dc702c991e3774af9d7ce410eef410ca9e2357e Author: Peter Hutterer Date: Wed Dec 5 10:42:24 2018 +1000 HID: input: use the Resolution Multiplier for high-resolution scrolling Windows uses a magic number of 120 for a wheel click. High-resolution scroll wheels are supposed to use a fraction of 120 to signal smaller scroll steps. This is implemented by the Resolution Multiplier in the device itself. If the multiplier is present in the report descriptor, set it to the logical max and then use the resolution multiplier to calculate the high-resolution events. This is the recommendation by Microsoft, see http://msdn.microsoft.com/en-us/windows/hardware/gg487477.aspx Note that all mice encountered so far have a logical min/max of 0/1, so it's a binary "yes or no" to high-res scrolling anyway. To make userspace simpler, always enable the REL_WHEEL_HI_RES bit. Where the device doesn't support high-resolution scrolling, the value for the high-res data will simply be a multiple of 120 every time. For userspace, if REL_WHEEL_HI_RES is available that is the one to be used. Potential side-effect: a device with a Resolution Multiplier applying to other Input items will have those items set to the logical max as well. This cannot easily be worked around but it is doubtful such devices exist. Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc Author: Peter Hutterer Date: Wed Dec 5 10:42:23 2018 +1000 HID: core: process the Resolution Multiplier The Resolution Multiplier is a feature report that modifies the value of Usages within the same Logical Collection. If the multiplier is set to anything but 1, the hardware reports (value * multiplier) for the same amount of physical movement, i.e. the value we receive in the kernel is pre-multiplied. The hardware may either send a single (value * multiplier), or by sending multiplier as many reports with the same value, or a combination of these two options. For example, when the Microsoft Sculpt Ergonomic mouse Resolution Multiplier is set to 12, the Wheel sends out 12 for every detent but AC Pan sends out a value of 3 at 4 times the frequency. The effective multiplier is based on the physical min/max of the multiplier field, a logical min/max of [0,1] with a physical min/max of [1,8] means the multiplier is either 1 or 8. The Resolution Multiplier was introduced for high-resolution scrolling in Windows Vista and is commonly used on Microsoft mice. The recommendation for the Resolution Multiplier is to default to 1 for backwards compatibility. This patch adds an arbitrary upper limit at 255. The only known use case for the Resolution Multiplier is for scroll wheels where the multiplier has to be a fraction of 120 to work with Windows. Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit c53431eb696f3c64c12c00afb81048af54b61532 Author: Peter Hutterer Date: Wed Dec 5 10:42:22 2018 +1000 HID: core: store the collections as a basic tree For each collection parsed, store a pointer to the parent collection (if any). This makes it a lot easier to look up which collection(s) any given item is part of Signed-off-by: Peter Hutterer Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 52ea899637c746984d657b508da6e3f2686adfca Author: Peter Hutterer Date: Wed Dec 5 10:42:21 2018 +1000 Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES` This event code represents scroll reports from high-resolution wheels and is modelled after the approach Windows uses. The value 120 is one detent (wheel click) of movement. Mice with higher-resolution scrolling can send fractions of 120 which must be accumulated in userspace. Userspace can either wait for a full 120 to accumulate or scroll by fractions of one logical scroll movement as the events come in. 120 was picked as magic number because it has a high number of integer fractions that can be used by high-resolution wheels. For more information see https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn613912(v=vs.85) These new axes obsolete REL_WHEEL and REL_HWHEEL. The legacy axes are emulated by the kernel but the most accurate (and most granular) data is available through the new axes. Signed-off-by: Peter Hutterer Acked-by: Dmitry Torokhov Verified-by: Harry Cutts Signed-off-by: Benjamin Tissoires commit 5f6f2b9f6dbf7afb5ce4e2faaf25006e7d9d8880 Author: Andy Shevchenko Date: Tue Jul 3 03:39:03 2018 +0300 gpio: ich: Join string literals back For easy grepping on debug purposes join string literals back in the messages. While here, fix spelling typo. Signed-off-by: Andy Shevchenko commit c086bea543023329f3676492749f64914d0cf69f Author: Andy Shevchenko Date: Thu Nov 8 17:48:14 2018 +0200 gpio: ich: Convert pr_ to dev_ Instead of customized pr_ format use unified dev_ output. Signed-off-by: Andy Shevchenko commit ff4709b44cc0755ce7af4c7b3a18580f388b3bff Author: Andy Shevchenko Date: Thu Nov 8 17:37:07 2018 +0200 gpio: ich: Switch to use struct device instead of platform_device There is no need to have a pointer to struct platform_device. Instead, switch to use struct device one. Signed-off-by: Andy Shevchenko commit c5aaa316819428560dafe4429bff97459fe61fd3 Author: Andy Shevchenko Date: Wed Nov 7 23:29:41 2018 +0200 gpio: ich: Simplify error handling in ichx_write_bit() Simplify error handling in ichx_write_bit() and propagate its error code to the caller. Signed-off-by: Andy Shevchenko commit f3af44f052272b815a2803b8205acfce393ee352 Author: Andy Shevchenko Date: Tue Nov 6 14:38:55 2018 +0200 gpio: sodaville: Use for_each_set_bit() in IRQ handler This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko commit 0f4bb10857e22a657e6c8cca5d1d54b641e94628 Author: Wen Yang Date: Thu Dec 6 07:29:10 2018 -0500 media: siano: Use kmemdup instead of duplicating its function kmemdup has implemented the function that kmalloc() + memcpy(). We prefer to kmemdup rather than code opened implementation. This issue was detected with the help of coccinelle. Signed-off-by: Wen Yang CC: Tomoki Sekiyama CC: linux-kernel@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit e67ebf1b3815b2d1fc505dba182761c0be6c179d Author: Mathias Nyman Date: Fri Dec 7 16:19:36 2018 +0200 xhci: move usb2 get port status link resume handling to its own function Refactoring, no functional changes. But worth mentioning that checking for port link resume state is now behind a additional port power check. This is fine as ports can't be in resume state if port power bit is not set. xhci spec section 4.19.1.1.6 figure 34 shows that port power bit must be set for all 'Enable' substates, including U0,U1,U2,U3 (suspended), Resume, and RExit states. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit a231ec41e6f6433daf4c693f169f6c5cfda8cb9d Author: Mathias Nyman Date: Fri Dec 7 16:19:35 2018 +0200 xhci: refactor U0 link state handling in get_port_status Move U0 link state handing to USB3 and USB2 specific functions Note that bus_state->resuming_ports: bus_state->resume_done[]: are only used for USB2, and don't need to cleared for USB3 ports No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 3c2ddb449a91df849b65be7509a575930c7eb5eb Author: Mathias Nyman Date: Fri Dec 7 16:19:34 2018 +0200 xhci: cleanup code that sets portstatus and portchange bits Group the code where the wPortstatus and wPortChange bits are set into one place. No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 70e9b53dfedced674d054166aae6e0366489eb86 Author: Mathias Nyman Date: Fri Dec 7 16:19:33 2018 +0200 xhci: move usb2 speficic bits to own function in get_port_status call Mostly refactoring, with the exception that USB_PORT_STAT_L1 link state is reported if xhci port link is in U2 AND port is powered. Previously we did not check if the port was powered, but according to xhci spec 4.19.1.1.6 All the 'Enabled' states, including USB_PORT_STAT_L1 (U2), U1, U0 and U3 must have Port power bit set. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 5f78a54f8d31e86aedd50f5b4d148dfeabafe88a Author: Mathias Nyman Date: Fri Dec 7 16:19:32 2018 +0200 xhci: move usb3 speficic bits to own function in get_port_status call refactoring, no functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 1c2d81cc287c59161b19c5810f0091fe33448e07 Author: Mathias Nyman Date: Fri Dec 7 16:19:31 2018 +0200 xhci: remove unused hcd_index() Now that each root hub has their own bus_state strucure the hcd_undex() used to get the correct bus_state strucure is no longer needed. No functional changes Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit f6187f424c10210e8e9917d4b7035ddc935010f6 Author: Mathias Nyman Date: Fri Dec 7 16:19:30 2018 +0200 xhci: move bus_state structure under the xhci_hub structure. Move the bus_state structure under struct usb_hub. We need a bus_state strucure for each roothub to keep track of suspend related info for each port. Instead of keeping an array of two bus_state structures right under struct xhci, it makes more sense move them to the xhci_hub structure. No functional changes. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit f1fd62a6b6c62e10ceb97432e9616b575538b699 Author: Zeng Tao Date: Fri Dec 7 16:19:29 2018 +0200 xhci: remove the unused sw_lpm_support It is introduced for the pre-0.96 xHC controllers, and the driver only support HW LPM for 1.0 and later controllers.It's not actually used now and is thought not to be used in the future any more, so just remove it. Signed-off-by: Zeng Tao Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 9be93e1ab73f34953971cb1b92e79826aa274055 Author: Andy Shevchenko Date: Tue Nov 6 14:38:55 2018 +0200 gpio: pch: Use for_each_set_bit() in IRQ handler This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko commit 5719ac19fc32d892434939c1756c2f9a8322e6ef Author: Rob Herring Date: Thu Dec 6 13:11:42 2018 -0600 ARM: dts: sunxi: Fix PMU compatible strings "arm,cortex-a15-pmu" is not a valid fallback compatible string for an Cortex-A7 PMU, so drop it. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Rob Herring Acked-by: Will Deacon Signed-off-by: Maxime Ripard commit 00c30f42c7595fa0e8c6b71c5ed60c4b54895708 Author: Mauro Carvalho Chehab Date: Wed Dec 5 19:01:09 2018 -0500 media: rockchip vpu: remove some unused vars As complained by gcc: drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c: In function 'rk3288_vpu_jpeg_enc_set_qtable': drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c:70:10: warning: variable 'chroma_qtable_p' set but not used [-Wunused-but-set-variable] __be32 *chroma_qtable_p; ^~~~~~~~~~~~~~~ drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c:69:10: warning: variable 'luma_qtable_p' set but not used [-Wunused-but-set-variable] __be32 *luma_qtable_p; ^~~~~~~~~~~~~ drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c: In function 'rk3399_vpu_jpeg_enc_set_qtable': drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:101:10: warning: variable 'chroma_qtable_p' set but not used [-Wunused-but-set-variable] __be32 *chroma_qtable_p; ^~~~~~~~~~~~~~~ drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:100:10: warning: variable 'luma_qtable_p' set but not used [-Wunused-but-set-variable] __be32 *luma_qtable_p; ^~~~~~~~~~~~~ drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c: In function 'rockchip_vpu_queue_setup': drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c:522:33: warning: variable 'vpu_fmt' set but not used [-Wunused-but-set-variable] const struct rockchip_vpu_fmt *vpu_fmt; ^~~~~~~ drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c: In function 'rockchip_vpu_buf_prepare': drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c:560:33: warning: variable 'vpu_fmt' set but not used [-Wunused-but-set-variable] const struct rockchip_vpu_fmt *vpu_fmt; ^~~~~~~ Signed-off-by: Mauro Carvalho Chehab Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit e4d7b113fdccde1acf8638c5879f2a450d492303 Author: Mauro Carvalho Chehab Date: Fri Dec 7 08:03:16 2018 -0500 media: cedrus: don't initialize pointers with zero A common mistake is to assume that initializing a var with: struct foo f = { 0 }; Would initialize a zeroed struct. Actually, what this does is to initialize the first element of the struct to zero. According to C99 Standard 6.7.8.21: "If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration." So, in practice, it could zero the entire struct, but, if the first element is not an integer, it will produce warnings: drivers/staging/media/sunxi/cedrus/cedrus.c:drivers/staging/media/sunxi/cedrus/cedrus.c:78:49: warning: Using plain integer as NULL pointer drivers/staging/media/sunxi/cedrus/cedrus_dec.c:drivers/staging/media/sunxi/cedrus/cedrus_dec.c:29:35: warning: Using plain integer as NULL pointer As the right initialization would be, instead: struct foo f = { NULL }; Another way to initialize it with gcc is to use: struct foo f = {}; That seems to be a gcc extension, but clang also does the right thing, and that's a clean way for doing it. Anyway, I decided to check upstream what's the most commonly pattern. The "= {}" pattern has about 2000 entries: $ git grep -E "=\s*\{\s*\}"|wc -l 1951 The standard-C compliant pattern has about 2500 entries: $ git grep -E "=\s*\{\s*NULL\s*\}"|wc -l 137 $ git grep -E "=\s*\{\s*0\s*\}"|wc -l 2323 Meaning that developers have split options on that. So, let's opt to the simpler form. Signed-off-by: Mauro Carvalho Chehab Acked-by: Paul Kocialkowski Signed-off-by: Mauro Carvalho Chehab commit 9ed5d5fb8b432badc967decf97e4294cbb216eef Author: Mauro Carvalho Chehab Date: Fri Dec 7 06:13:48 2018 -0500 media: cetrus: return an error if alloc fails As warned by smatch: drivers/staging/media/sunxi/cedrus/cedrus.c: drivers/staging/media/sunxi/cedrus/cedrus.c:93 cedrus_init_ctrls() error: potential null dereference 'ctx->ctrls'. (kzalloc returns null) While here, remove the memset(), as kzalloc() already zeroes the struct. Signed-off-by: Mauro Carvalho Chehab Acked-by: Paul Kocialkowski Signed-off-by: Mauro Carvalho Chehab commit e82a34fa89f82509b5fe79b65fc351038c560a5b Author: Paul Kocialkowski Date: Wed Dec 5 04:24:42 2018 -0500 media: cedrus: Add device-tree compatible and variant for A64 support Add the necessary compatible for supporting the A64 SoC along with a description of the capabilities of this variant. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7fa2b6ae13f74cfa96463a9105b7a5bdf5408a0 Author: Paul Kocialkowski Date: Wed Dec 5 04:24:41 2018 -0500 media: cedrus: Add device-tree compatible and variant for H5 support Add the necessary compatible for supporting the H5 SoC along with a description of the capabilities of this variant. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 66ca86fe37db23cfdcf1170ec05db7ab0e658073 Author: Paul Kocialkowski Date: Wed Dec 5 04:24:40 2018 -0500 media: dt-bindings: media: cedrus: Add compatibles for the A64 and H5 This introduces two new compatibles for the cedrus driver, for the A64 and H5 platforms. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac11da47ff45f1f6f19c87cde6f36d9b17d42989 Author: Matt Ranostay Date: Sat Nov 24 17:03:23 2018 -0500 media: video-i2c: check if chip struct has set_power function Not all future supported video chips will always have power management support, and so it is important to check before calling set_power() is defined. Signed-off-by: Matt Ranostay Reviewed-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69d2a734c5dc7085365e752a7e8e35999c7a6c20 Author: Akinobu Mita Date: Thu Nov 22 11:13:56 2018 -0500 media: video-i2c: support runtime PM AMG88xx has a register for setting operating mode. This adds support runtime PM by changing the operating mode. The instruction for changing sleep mode to normal mode is from the reference specifications. https://docid81hrs3j1.cloudfront.net/medialibrary/2017/11/PANA-S-A0002141979-1.pdf Reviewed-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e0fe5c7b22a8d4629ed85b668a93ff2582b93203 Author: Rob Herring Date: Wed Dec 5 14:50:42 2018 -0500 media: staging: media: imx: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is. Cc: Steve Longerbeam Cc: Philipp Zabel Cc: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org Signed-off-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d138091ffca629a0914a37fde5d2253ef5f31ad2 Author: Luca Ceresoli Date: Wed Dec 5 11:55:37 2018 -0500 media: v4l2-subdev: document controls need _FL_HAS_DEVNODE Control events can be subscribed and received by the user. Therefore drivers that support controls must expose the V4L2_SUBDEV_FL_HAS_EVENTS flag. [As discussed in https://lkml.org/lkml/2018/11/27/637] Reported-by: Sakari Ailus Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be7e3c3684e0790a84d25b3a7b70b434342e1cc3 Author: Gabriel Francisco Mandaji Date: Sun Dec 2 08:45:38 2018 -0500 media: vivid: Improve timestamping Simulate a more precise timestamp by calculating it based on the current framerate. Signed-off-by: Gabriel Francisco Mandaji Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: replaced division by 2 with bit shift] Signed-off-by: Mauro Carvalho Chehab commit a383096c98b4b44151a9fde106b01500ccc2a060 Author: Sergei Shtylyov Date: Mon Aug 6 14:48:20 2018 -0400 media: rcar-vin: add R8A77980 support Add the R8A77980 SoC support to the R-Car VIN driver. Signed-off-by: Sergei Shtylyov Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ba37c2bcb0cb5dc9b278f730e520f61b2597fe3 Author: Sergei Shtylyov Date: Mon Aug 6 12:56:27 2018 -0400 media: rcar-csi2: add R8A77980 support Add the R-Car V3H (AKA R8A77980) SoC support to the R-Car CSI2 driver. Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2fc6e404117e5b921097c929ba572a00e4421b50 Author: Rob Herring Date: Thu Dec 6 14:35:19 2018 -0500 media: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Hyun Kwon Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Reviewed-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Rob Herring Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit de2563bce7a157f5296bab94f3843d7d64fb14b4 Author: Vivek Gautam Date: Wed Dec 5 03:31:51 2018 -0500 media: venus: core: Set dma maximum segment size Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 460.308650] ------------[ cut here ]------------ [ 460.313490] qcom-venus aa00000.video-codec: DMA-API: mapping sg segment longer than device claims to support [len=4194304] [max=65536] [ 460.326017] WARNING: CPU: 3 PID: 3555 at src/kernel/dma/debug.c:1301 debug_dma_map_sg+0x174/0x254 [ 460.338888] Modules linked in: venus_dec venus_enc videobuf2_dma_sg videobuf2_memops hci_uart btqca bluetooth venus_core v4l2_mem2mem videobuf2_v4l2 videobuf2_common ath10k_snoc ath10k_core ath lzo lzo_compress zramjoydev [ 460.375811] CPU: 3 PID: 3555 Comm: V4L2DecoderThre Tainted: G W 4.19.1 #82 [ 460.384223] Hardware name: Google Cheza (rev1) (DT) [ 460.389251] pstate: 60400009 (nZCv daif +PAN -UAO) [ 460.394191] pc : debug_dma_map_sg+0x174/0x254 [ 460.398680] lr : debug_dma_map_sg+0x174/0x254 [ 460.403162] sp : ffffff80200c37d0 [ 460.406583] x29: ffffff80200c3830 x28: 0000000000010000 [ 460.412056] x27: 00000000ffffffff x26: ffffffc0f785ea80 [ 460.417532] x25: 0000000000000000 x24: ffffffc0f4ea1290 [ 460.423001] x23: ffffffc09e700300 x22: ffffffc0f4ea1290 [ 460.428470] x21: ffffff8009037000 x20: 0000000000000001 [ 460.433936] x19: ffffff80091b0000 x18: 0000000000000000 [ 460.439411] x17: 0000000000000000 x16: 000000000000f251 [ 460.444885] x15: 0000000000000006 x14: 0720072007200720 [ 460.450354] x13: ffffff800af536e0 x12: 0000000000000000 [ 460.455822] x11: 0000000000000000 x10: 0000000000000000 [ 460.461288] x9 : 537944d9c6c48d00 x8 : 537944d9c6c48d00 [ 460.466758] x7 : 0000000000000000 x6 : ffffffc0f8d98f80 [ 460.472230] x5 : 0000000000000000 x4 : 0000000000000000 [ 460.477703] x3 : 000000000000008a x2 : ffffffc0fdb13948 [ 460.483170] x1 : ffffffc0fdb0b0b0 x0 : 000000000000007a [ 460.488640] Call trace: [ 460.491165] debug_dma_map_sg+0x174/0x254 [ 460.495307] vb2_dma_sg_alloc+0x260/0x2dc [videobuf2_dma_sg] [ 460.501150] __vb2_queue_alloc+0x164/0x374 [videobuf2_common] [ 460.507076] vb2_core_reqbufs+0xfc/0x23c [videobuf2_common] [ 460.512815] vb2_reqbufs+0x44/0x5c [videobuf2_v4l2] [ 460.517853] v4l2_m2m_reqbufs+0x44/0x78 [v4l2_mem2mem] [ 460.523144] v4l2_m2m_ioctl_reqbufs+0x1c/0x28 [v4l2_mem2mem] [ 460.528976] v4l_reqbufs+0x30/0x40 [ 460.532480] __video_do_ioctl+0x36c/0x454 [ 460.536610] video_usercopy+0x25c/0x51c [ 460.540572] video_ioctl2+0x38/0x48 [ 460.544176] v4l2_ioctl+0x60/0x74 [ 460.547602] do_video_ioctl+0x948/0x3520 [ 460.551648] v4l2_compat_ioctl32+0x60/0x98 [ 460.555872] __arm64_compat_sys_ioctl+0x134/0x20c [ 460.560718] el0_svc_common+0x9c/0xe4 [ 460.564498] el0_svc_compat_handler+0x2c/0x38 [ 460.568982] el0_svc_compat+0x8/0x18 [ 460.572672] ---[ end trace ce209b87b2f3af88 ]--- >From above warning one would deduce that the sg segment will overflow the device's capacity. In reality, the hardware can accommodate larger sg segments. So, initialize the max segment size properly to weed out this warning. Based on a similar patch sent by Sean Paul for mdss: https://patchwork.kernel.org/patch/10671457/ Signed-off-by: Vivek Gautam Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2123cbd687ca0c511faa97db9f18ca55767c5684 Author: Kelvin Lawson Date: Thu Nov 29 19:07:28 2018 -0500 media: venus: Support V4L2 QP parameters in Venus encoder Support V4L2 QP parameters in Venus encoder: * V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP * V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP * V4L2_CID_MPEG_VIDEO_H264_MIN_QP * V4L2_CID_MPEG_VIDEO_H264_MAX_QP Signed-off-by: Kelvin Lawson Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e1e0eb0e0744e02fdada653463cc8010523b2f3 Author: Ezequiel Garcia Date: Thu Dec 6 14:46:39 2018 -0500 media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields Make the core set the reserved fields to zero in vv4l2_pix_format_mplane.4l2_plane_pix_format, for _MPLANE queue types. Moving this to the core avoids having to do so in each and every driver. Suggested-by: Tomasz Figa Signed-off-by: Ezequiel Garcia Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f4c20cb6ab1fc5b86707875ec3437a5bfb5b3f5 Author: Lubomir Rintel Date: Mon Dec 3 06:47:42 2018 -0500 media: marvell-ccic: trivial fix to the datasheet URL Update URL. Signed-off-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad93f09b02eea3f56b2b23e075ecb0d7062240db Author: Todor Tomov Date: Fri Nov 30 07:01:39 2018 -0500 media: MAINTAINERS: Change Todor Tomov's email address My Linaro email address with be inactive very soon so switch it to my Gmail address. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 22f54602526ec9d199342da43dbb304f5726ba56 Author: Paul Kocialkowski Date: Fri Nov 30 03:16:17 2018 -0500 media: cedrus: Remove global IRQ spin lock from the driver We initially introduced a spin lock to ensure that the VPU registers are not accessed concurrently between our setup function and IRQ handler. The V4L2 M2M API ensures that only one decoding job runs at a time, so the interrupt signaling the end of decoding will not occur while the next picture is being configured. Spurious interrupts are taken care of in the handler, by checking that we have a valid M2M context and a decoding status available before marking the buffers as done. In addition, holding a spin lock could be problematic if non-atomic operations are required in the setup process for future codec support. As a result, remove the global IRQ spin lock. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe8fb032732f6310888d7f765f593d1c337f7e36 Author: Colin Ian King Date: Thu Nov 29 05:50:38 2018 -0500 media: sun6i: fix spelling mistake "droped" -> "dropped" There are spelling mistakes in dev_dbg messages, fix them. Signed-off-by: Colin Ian King Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87c9f19714921df17d13c24e5d20ab04942f1a91 Author: Colin Ian King Date: Thu Nov 29 05:19:45 2018 -0500 media: pvrusb2: fix spelling mistake "statuss" -> "status" There is a spelling mistake in a pvr2_trace trace message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 75fa6e4f83a0923fe753827d354998d448b4fd6a Author: Philipp Zabel Date: Wed Nov 28 08:01:22 2018 -0500 media: coda: fix H.264 deblocking filter controls Add support for the third loop filter mode V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY, and fix V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA and V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA controls. The filter offset controls are signed values in the -6 to 6 range and are stored into the slice header fields slice_alpha_c0_offset_div2 and slice_beta_offset_div2. The actual filter offsets FilterOffsetA/B are double their value, in range of -12 to 12. Rename variables to more closely match the nomenclature in the H.264 specification. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d338e17993f78155196af4cb780d8271996a02ac Author: Philipp Zabel Date: Wed Nov 28 08:01:21 2018 -0500 media: v4l2: clarify H.264 loop filter offset controls The venus and s5p-mfc drivers add the loop filter alpha/beta offset controls V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA/BETA with a range of -6 to +6, inclusive. This is exactly the range specified for the slice header fields slice_alpha_c0_offset_div2 and slice_beta_offset_div2, which store half the actual filter offsets FilterOffsetA/B. Clarify that this control contains the halved offsets. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 91dc5e91edf767e27db4ee1fae19b56cd21152c0 Author: Dmitry Osipenko Date: Mon Nov 19 06:17:18 2018 -0500 media: staging: tegra-vde: Replace debug messages with trace points Trace points are much more efficient than debug messages for intensive tracing and could be conveniently enabled / disabled dynamically, hence let's replace debug messages with the trace points. This also makes code a bit cleaner. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c35f0b16537c15a8fa3ff97e7c0488e683e306c8 Author: Malathi Gottam Date: Fri Nov 2 08:57:56 2018 -0400 media: venus: add support for key frame When client requests for a keyframe, set the property to hardware to generate the sync frame. Signed-off-by: Malathi Gottam Acked-by: Tomasz Figa Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6951f582cc50ba0ad22ef46b599740966599b14 Author: Russell King Date: Fri Dec 7 13:11:15 2018 +0000 ARM: fix the cockup in the previous patch The intention in the previous patch was to only place the processor tables in the .rodata section if big.Little was being built and we wanted the branch target hardening, but instead (due to the way it was tested) it ended up always placing the tables into the .rodata section. Although harmless, let's correct this anyway. Fixes: 3a4d0c2172bc ("ARM: ensure that processor vtables is not lost after boot") Signed-off-by: Russell King commit 8d31a499c60f2f276693662297ad1fe50d4959f1 Author: Malcolm Priestley Date: Wed Dec 5 14:14:31 2018 -0500 media: lmedm04: Move interrupt buffer to priv buffer. Interrupt is always present throughout life time of driver and there is no dma element move this buffer to private area of driver. Signed-off-by: Malcolm Priestley Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 87bd0e034e84bdfd8037efb337cb6ad006329793 Author: Malcolm Priestley Date: Wed Dec 5 14:11:57 2018 -0500 media: lmedm04: Add missing usb_free_urb to free interrupt urb. The interrupt urb is killed but never freed add the function Signed-off-by: Malcolm Priestley Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c12b08ebbe16f0d3a96a116d86709b04c1ee8e74 Author: Yu Zhao Date: Thu Dec 6 14:39:15 2018 -0700 iommu/amd: Fix amd_iommu=force_isolation The parameter is still there but it's ignored. We need to check its value before deciding to go into passthrough mode for AMD IOMMU v2 capable device. We occasionally use this parameter to force v2 capable device into translation mode to debug memory corruption that we suspect is caused by DMA writes. To address the following comment from Joerg Roedel on the first version, v2 capability of device is completely ignored. > This breaks the iommu_v2 use-case, as it needs a direct mapping for the > devices that support it. And from Documentation/admin-guide/kernel-parameters.txt: This option does not override iommu=pt Fixes: aafd8ba0ca74 ("iommu/amd: Implement add_device and remove_device") Signed-off-by: Yu Zhao Signed-off-by: Joerg Roedel commit 0cef02031e74e1ea689b18fb8f0b0e87e0051f03 Merge: 34812fe111192 3f3327dbc5596 Author: Linus Walleij Date: Fri Dec 7 13:42:35 2018 +0100 Merge tag 'sh-pfc-for-v4.21-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.21 (take two) - Two small fixes for RZ/N1. commit b00b7980af8a126976105ec68664a72bb72c6db2 Author: Masahiro Yamada Date: Wed Dec 5 21:54:09 2018 +0900 gpio: uniphier: convert to SPDX License Identifier checkpatch.pl suggests to use SPDX license tag. I am happy to follow it. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij commit 34812fe1111929be454afb9a63f2c69e834c2d9a Author: Masahiro Yamada Date: Wed Dec 5 21:53:39 2018 +0900 pinctrl: uniphier: convert to SPDX License Identifier checkpatch.pl suggests to use SPDX license tag. I am happy to follow it. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij commit 6169005ceb8c715582eca70df3912cd2b351ede2 Author: Brandon Maier Date: Wed Nov 28 11:14:17 2018 -0600 gpio: zynq: Report gpio direction at boot The Zynq's gpios can be configured by the bootloader. But Linux will erroneously report all gpios as inputs unless we implement get_direction(). Signed-off-by: Brandon Maier Tested-by: Michal Simek Signed-off-by: Linus Walleij commit 396244692232fcf0881cb6ba2404be2906f47681 Author: Will Deacon Date: Thu Sep 20 10:26:40 2018 +0100 arm64: preempt: Provide our own implementation of asm/preempt.h The asm-generic/preempt.h implementation doesn't make use of the PREEMPT_NEED_RESCHED flag, since this can interact badly with load/store architectures which rely on the preempt_count word being unchanged across an interrupt. However, since we're a 64-bit architecture and the preempt count is only 32 bits wide, we can simply pack it next to the resched flag and load the whole thing in one go, so that a dec-and-test operation doesn't need to load twice. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 08861d33d680838753f1f9d3ba9480d3651b764d Author: Will Deacon Date: Wed Sep 19 13:39:26 2018 +0100 preempt: Move PREEMPT_NEED_RESCHED definition into arch code PREEMPT_NEED_RESCHED is never used directly, so move it into the arch code where it can potentially be implemented using either a different bit in the preempt count or as an entirely separate entity. Cc: Robert Love Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Martin Schwidefsky Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon commit 4f45f45b081eb37b9f8b627cc14cff67838968ab Author: Chen-Yu Tsai Date: Mon Dec 3 23:41:00 2018 +0800 pinctrl: sunxi: a64: Rename function ts0 to ts The A64 only has one TS (transport stream) controller. The datasheet also lists the function as TS_XXX instead of TS0_XXX. Rename the function names now before any there are any users. Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit 3504caa17b596c8ec62d923b2ed7d4a19d56d816 Author: Chen-Yu Tsai Date: Mon Dec 3 23:40:59 2018 +0800 pinctrl: sunxi: a64: Rename function csi0 to csi The A64 only has one CSI (camera sensor interface) controller. The datasheet also lists the function as CSI_XXX instead of CSI0_XXX. Rename the function names now before any there are any users. Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit a9d9f6b83f1bb05da849b3540e6d1f70ef1c2343 Author: Nicholas Mc Guire Date: Sun Dec 2 11:04:17 2018 +0100 pinctrl: sx150x: handle failure case of devm_kstrdup devm_kstrdup() may return NULL if internal allocation failed. Thus using label, name is unsafe without checking. Therefor in the unlikely case of allocation failure, sx150x_probe() simply returns -ENOMEM. Signed-off-by: Nicholas Mc Guire Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver") Signed-off-by: Linus Walleij commit 8084945d3c934cf730cd5fdfb5cc11ebfc4cc386 Author: Ladislav Michl Date: Thu Dec 6 22:06:38 2018 +0100 ASoC: max9867: Add copyright and module author Driver rewritten, assign copyright notice and change module author as original one remains silent and I want to be notified about bugs. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit ce55698d32329b83ea695e0011b58d1bc11189b8 Author: Cheng-Yi Chiang Date: Wed Nov 28 17:00:36 2018 +0800 ASoC: sdm845: Add configuration for headset codec Set DAI format and sysclk for headset codec. Signed-off-by: Cheng-Yi Chiang Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 09b382007aa54dbe2cc142ef78d69b9a7645fcd6 Author: Cheng-Yi Chiang Date: Wed Nov 28 17:00:35 2018 +0800 ASoC: sdm845: Add TDM configuration for speaker Set TDM time slots and DAI format for speaker codec. Signed-off-by: Cheng-Yi Chiang Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit bc2610a6c4c92f0bf6bbf4c6641407536f30daaf Author: Ladislav Michl Date: Tue Dec 4 19:21:33 2018 +0100 ASoC: max9867: Fix signal paths Sound capture and line bypass currently do not work as well as some mixer controls. Fix that by building proper audio paths and adjusting volume controls to match datasheet. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit 715ee1916b95bfd0773487397a0354ad9a4660e6 Author: Ladislav Michl Date: Tue Dec 4 19:21:04 2018 +0100 ASoC: max9867: Calculate LRCLK divider Drop "Common NI Values Table" and calculate LRCLK divider, then add allowed rate constraints based on master clock frequency. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit 29f58ff06795a923407d011d4721eaf3e8d39acc Author: Ladislav Michl Date: Tue Dec 4 19:19:51 2018 +0100 ASoC: max9867: Fix power management Implement set_bias_level to drive shutdown bit, so device is put to sleep when unused. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit 8efc1afd7e0570d9bb37f5127f0742304a8ad2fc Author: Ladislav Michl Date: Tue Dec 4 19:18:17 2018 +0100 ASoC: max9867: Remove useless assignment ret is assigned later, no need to initialize it. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit 611a1c69f8ca85fc656f09d0cd56f5934e2af5fb Author: Thierry Reding Date: Thu Dec 6 19:00:17 2018 +0100 arm64: tegra: Set reg property for display-hub on Tegra194 Technically the display-hub driver could access registers via the specified region, though it practice it will do so via the display controllers' register regions. Signed-off-by: Thierry Reding commit ffa1ad89ddf2c17d777dc2abc4aa81832030df8e Author: Thierry Reding Date: Thu Dec 6 19:00:16 2018 +0100 arm64: tegra: Set reg property for display-hub on Tegra186 Technically the display-hub driver could access registers via the specified region, though it practice it will do so via the display controllers' register regions. Signed-off-by: Thierry Reding commit 1528e40fd7d382e9668d3a1876a83d30bb04d554 Author: Greg Kroah-Hartman Date: Fri Dec 7 12:56:04 2018 +0100 Revert "sysctl: clean up nr_pdflush_threads leftover" This reverts commit 77cab92a2cb15bcbdd7be0af773799e92d6a8546. Heiko reports that this breaks building of strace, which isn't ok. Reported-by: Heiko Carstens Cc: Rafael Aquini Cc: William Kucharski Signed-off-by: Greg Kroah-Hartman commit 7bbd1fc0e9f1281f9a7122dbfd6641b523c4e4ed Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: remove unnecessary white space. - spaces before tabs, - spaces at the end of lines, - multiple blank lines, - blank lines before EXPORT_SYMBOL, can all go. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit cb03f94ffb070b13bc0fa58b4ef4fdb558418d27 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: merge posix_unblock_lock() and locks_delete_block() posix_unblock_lock() is not specific to posix locks, and behaves nearly identically to locks_delete_block() - the former returning a status while the later doesn't. So discard posix_unblock_lock() and use locks_delete_block() instead, after giving that function an appropriate return value. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit fd7732e033e30b3a586923b57e338c859e17858a Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: create a tree of dependent requests. When we find an existing lock which conflicts with a request, and the request wants to wait, we currently add the request to a list. When the lock is removed, the whole list is woken. This can cause the thundering-herd problem. To reduce the problem, we make use of the (new) fact that a pending request can itself have a list of blocked requests. When we find a conflict, we look through the existing blocked requests. If any one of them blocks the new request, the new request is attached below that request, otherwise it is added to the list of blocked requests, which are now known to be mutually non-conflicting. This way, when the lock is released, only a set of non-conflicting locks will be woken, the rest can stay asleep. If the lock request cannot be granted and the request needs to be requeued, all the other requests it blocks will then be woken To make this more concrete: If you have a many-core machine, and have many threads all wanting to briefly lock a give file (udev is known to do this), you can get quite poor performance. When one thread releases a lock, it wakes up all other threads that are waiting (classic thundering-herd) - one will get the lock and the others go to sleep. When you have few cores, this is not very noticeable: by the time the 4th or 5th thread gets enough CPU time to try to claim the lock, the earlier threads have claimed it, done what was needed, and released. So with few cores, many of the threads don't end up contending. With 50+ cores, lost of threads can get the CPU at the same time, and the contention can easily be measured. This patchset creates a tree of pending lock requests in which siblings don't conflict and each lock request does conflict with its parent. When a lock is released, only requests which don't conflict with each other a woken. Testing shows that lock-acquisitions-per-second is now fairly stable even as the number of contending process goes to 1000. Without this patch, locks-per-second drops off steeply after a few 10s of processes. There is a small cost to this extra complexity. At 20 processes running a particular test on 72 cores, the lock acquisitions per second drops from 1.8 million to 1.4 million with this patch. For 100 processes, this patch still provides 1.4 million while without this patch there are about 700,000. Reported-and-tested-by: Martin Wilck Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit c0e15908979d269a8263b0c0a222b894b9f403e9 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: change all *_conflict() functions to return bool. posix_locks_conflict() and flock_locks_conflict() both return int. leases_conflict() returns bool. This inconsistency will cause problems for the next patch if not fixed. So change posix_locks_conflict() and flock_locks_conflict() to return bool. Also change the locks_conflict() helper. And convert some return (foo); to return foo; Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit 16306a61d3b7c433c7a127ec6224867b88ece687 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: always delete_block after waiting. Now that requests can block other requests, we need to be careful to always clean up those blocked requests. Any time that we wait for a request, we might have other requests attached, and when we stop waiting, we must clean them up. If the lock was granted, the requests might have been moved to the new lock, though when merged with a pre-exiting lock, this might not happen. In all cases we don't want blocked locks to remain attached, so we remove them to be safe. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Tested-by: syzbot+a4a3d526b4157113ec6a@syzkaller.appspotmail.com Tested-by: kernel test robot Signed-off-by: Jeff Layton commit 36c4da4f552a126bb29a95dc5c9608795491e32a Author: Niklas Söderlund Date: Thu Nov 29 01:39:49 2018 +0100 clk: renesas: rcar-gen3: Add HS400 quirk for SD clock On H3 (ES1.x, ES2.0) and M3-W (ES1.0, ES1.1) the clock setting for HS400 needs a quirk to function properly. The reason for the quirk is that there are two settings which produces same divider value for the SDn clock. On the effected boards the one currently selected results in HS400 not working. This change uses the same method as the Gen2 CPG driver and simply ignores the first clock setting as this is the offending one when selecting the settings. Which of the two possible settings is used have no effect for SDR104. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Acked-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven commit e2f4dd1f5b51b4dab813aa6e4db44e87aa750393 Author: Niklas Söderlund Date: Thu Nov 29 01:39:48 2018 +0100 clk: renesas: rcar-gen3: Add documentation for SD clocks Document the known use cases of the different clock settings. This is useful as different SoC and ES versions use different settings to do the same thing as there is more than one combination to achieve the same SDn clock speed. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven commit ecda0a09fa9933bcd67e33c952f778f0872392ed Author: Niklas Söderlund Date: Thu Nov 29 01:15:38 2018 +0100 clk: renesas: rcar-gen3: Set state when registering SD clocks The driver tries to figure out which state a SD clock is in when the clock is registered, instead of setting a known state. This can be problematic for two reasons. 1. If the clock driver can't figure out the state of the clock, registration of the clock fails, and setting of a known state by a clock user is not possible. 2. The state of the clock depends on if and how the bootloader configured it. The driver only checks that the rate is known, not if the clock is stopped or not for example. Fix this by setting a known state and making sure the clock is stopped. Signed-off-by: Niklas Söderlund Tested-by: Wolfram Sang Acked-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven commit e854747d7593c03c03ee785a04dce9b301ae3a9a Author: Kailang Yang Date: Wed Nov 28 15:32:45 2018 +0800 ALSA: hda/realtek - Enable headset button support for new codec This patch will enable headset button for new Chrome platform. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai commit 911761c2304327a39ec9372be812a9648bd35c09 Author: Takashi Iwai Date: Wed Nov 28 14:25:37 2018 +0100 ALSA: hda - Add jack button support Extend some structs to add the support for jack button changes. Now snd_hda_jack_add_kctl() receives two more arguments: the jack type and the jack keymaps. Both are optional, and when zero are passed, the function behaves just like before. For reporting button state changes, you'd need to update jack->button_state bits accordingly, typically in the jack callback. Then the value OR'ed with button_state and the jack plug state is passed to snd_jack_report(). Note that currently the code assumes only the one-shot button events, i.e. it tries to send the button release soon after sending the button event. If a driver really supports the button release handling by itself, we may need to introduce some flag to control this behavior in future. Signed-off-by: Takashi Iwai commit e6ce180fa6df519b1e24dab9d1fcbe32ce618a5e Author: Takashi Iwai Date: Wed Nov 28 14:17:58 2018 +0100 ALSA: hda - Add jack pointer and unsolicited event bits to callback For allowing the callee to evaluate the associated jack information and the unsolicited event data, add the new fields to hda_jack_callback. They can be used, for example, to retrieve the headset button state in the callback. Signed-off-by: Takashi Iwai commit 2bff7e97ebbb1119e9f22936706294f4e85d4db6 Merge: 157ab88ef64a2 bde1a7459623a Author: Takashi Iwai Date: Fri Dec 7 11:40:00 2018 +0100 Merge branch 'for-linus' into for-next Back-merge for applying the more HD-audio quirks on top of the latest code. Signed-off-by: Takashi Iwai commit 0819dc72ea70a90ad2a070e76708ee53bac47caa Author: Yangtao Li Date: Fri Nov 30 11:36:17 2018 -0500 pinctrl: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Linus Walleij commit 9904f0325ec3d57b823b4c9cd569eed9fc1ef1f7 Author: Yangtao Li Date: Fri Nov 30 11:22:46 2018 -0500 gpio: ks8695: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Linus Walleij commit 38842572df1c79213b99e0c3472ce95aa5d152cf Author: Mathieu Malaterre Date: Tue Dec 4 21:10:57 2018 +0100 mtd: rawnand: jz4780: annotate implicit fall throughs There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up. Signed-off-by: Mathieu Malaterre Signed-off-by: Miquel Raynal commit 25fbc9e8d3673d372ad6ae44a8d4f850879f50ad Author: Thierry Reding Date: Fri Nov 23 13:43:41 2018 +0100 dt-bindings: tegra186-gpio: Add Tegra186 specific prefix Subsequent generations of Tegra, such as Tegra194, contain a completely different set of GPIOs. In order to clarify that the Tegra186 defines are indeed specific to Tegra186, change the prefix from TEGRA_ to TEGRA186_. Note that for now we need to keep the old definitions in place to avoid breaking compilation in file that use this header. Once all users have been converted to use the new defines, the old ones can be removed. Also note that this is only a naming change and doesn't affect device tree ABI. Signed-off-by: Thierry Reding Acked-by: Jon Hunter commit c93c613214ac70c87beab5422a60077bf126b855 Author: Chuanhong Guo Date: Wed Nov 28 21:07:25 2018 +0800 mtd: spinand: add support for GigaDevice GD5FxGQ4xA Add support for GigaDevice GD5F1G/2G/4GQ4xA SPI NAND. Signed-off-by: Chuanhong Guo Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal commit 7b6a9b28ecf2fd2e2f5dcdb6d4fa8044b48bdb74 Author: Boris Brezillon Date: Tue Nov 20 10:02:39 2018 +0100 mtd: rawnand: Deprecate the dummy_controller field We try to force NAND controller drivers to properly separate the NAND controller object from the NAND chip one, so let's deprecate the dummy controller object embedded in nand_chip to encourage them to create their own instance. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 419e5b84a4be6c796e421b82e9673e2fa1ec1b07 Author: Boris Brezillon Date: Tue Nov 20 10:02:38 2018 +0100 mtd: rawnand: vf610: Add an SPDX tag to replace the license text Replace the license text by an SPDX tag. Signed-off-by: Boris Brezillon Reviewed-by: Stefan Agner Signed-off-by: Miquel Raynal commit da59b4538c4cddfcd77e1c3e45e087d6b757729b Author: Boris Brezillon Date: Tue Nov 20 10:02:37 2018 +0100 mtd: rawnand: vf610: Stop using the dummy controller obj The dummy controller is kept around to support old drivers. Let's patch this one and declare our own nand_controller instance. Signed-off-by: Boris Brezillon Reviewed-by: Stefan Agner Signed-off-by: Miquel Raynal commit 4440f781969dcc28d8af0e66a6d6d741845bb67b Author: Boris Brezillon Date: Tue Nov 20 10:02:36 2018 +0100 mtd: rawnand: vf610: Stop passing mtd_info to internal functions Mimic what has been done in the core and avoid passing mtd_info object internally. Signed-off-by: Boris Brezillon Reviewed-by: Stefan Agner Signed-off-by: Miquel Raynal commit e96fd5ce5ffab81ca1153eda28805dd3f073f03e Author: Vladimir Zapolskiy Date: Thu Nov 29 00:48:40 2018 +0200 dt-bindings: gpio: lpc18xx: describe interrupt controllers of GPIO controller From LPC18xx and LPC43xx User Manuals the GPIO controller consists of the following weakly connected blocks: * GPIO pin interrupt block at 0x40087000, * GPIO GROUP0 interrupt block at 0x40088000, * GPIO GROUP1 interrupt block at 0x40089000, * GPIO port block at 0x400F4000. While all 4 sub-controller blocks have their own I/O addresses, moreover all 3 interrupt blocks are APB0 peripherals and high-speed GPIO block is an AHB slave, according to the hardware manual interrupt controllers and GPIO controller block are seen as a single device, all 4 sub-controllers have the shared reset signal RGU #28 and the same shared clock to access registers CLK_Mx_GPIO on CCU1. The change adds descriptions of the currently missing interrupt controller blocks found on GPIO controller, new added properties are 'reg-names', 'resets', 'interrupt-controller' and '#interrupt-cells', also the example is updated to reflect the changes in device tree binding description. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit fc43f45ed563f517e9bd1ddc9d0a2fecf3cd2808 Author: Boris Brezillon Date: Tue Nov 20 10:02:35 2018 +0100 mtd: rawnand: fsmc: Fix all coding style issues reported by checkpatch checkpatch reports a bunch of coding style issues. Let's fix them all in one step. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit bb6963449f3d43e1162359895005ada3db02c9de Author: Boris Brezillon Date: Tue Nov 20 10:02:34 2018 +0100 mtd: rawnand: fsmc: Add an SPDX tag to replace the license text Add an SPDX GPL-2.0 tag and update MODULE_LICENSE() to match the license text. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit ad71148c1804c334544068514bc318bfd3490334 Author: Boris Brezillon Date: Tue Nov 20 10:02:33 2018 +0100 mtd: rawnand: fsmc: Stop using the dummy controller obj The dummy controller is kept around to support old drivers. Let's patch this one and declare our own nand_controller instance. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 1e809f7ef4d2402e31e4bc2f76753b9d3b1e0b6c Author: Boris Brezillon Date: Tue Nov 20 10:02:32 2018 +0100 mtd: rawnand: fsmc: Make conversion from chip to fsmc consistent nand_to_fsmc() is used almost everywhere except in fsmc_setup_data_interface() where nand_get_controller_data() is used instead. Make that consistent and drop the nand_set_controller_data() call in the probe path. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 5b47f407810369e21f2c3123c13e29ff8609a7e4 Author: Boris Brezillon Date: Tue Nov 20 10:02:31 2018 +0100 mtd: rawnand: fsmc: Fix the fsmc_nand_data kernel-doc The kernel-doc describing struct fsmc_nand_data is not in sync with the struct itself. Add missing entries and drop invalid ones. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit bfc535f44089d6574ee4fba1c7683980020c24fb Author: Boris Brezillon Date: Tue Nov 20 10:02:30 2018 +0100 mtd: rawnand: fsmc: Stop passing mtd_info objects to internal functions Mimic what has been done in the core and stop passing mtd_info objects to internal functions. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 5ddabfe8d3ded5dd5e760bf66ebb4241e5314e8d Author: Vladimir Zapolskiy Date: Thu Nov 29 00:48:41 2018 +0200 gpio: lpc18xx: add GPIO pin interrupt controller support The change adds support of LPC18xx/LPC43xx GPIO pin interrupt controller block within SoC GPIO controller. The new interrupt controller driver allows to configure and capture edge or level interrupts on 8 arbitrary selectedinput GPIO pins, and lift the signals to be reported as NVIC rising edge interrupts. Configuration of a particular GPIO pin to serve as interrupt and its mapping to an interrupt on NVIC is done by SCU pin controller, for more details see description of 'nxp,gpio-pin-interrupt' device tree property of a GPIO pin [1]. From LPC18xx and LPC43xx User Manuals the GPIO controller consists of the following blocks: * GPIO pin interrupt block at 0x40087000, this change adds its support, * GPIO GROUP0 interrupt block at 0x40088000, * GPIO GROUP1 interrupt block at 0x40089000, * GPIO port block at 0x400F4000, it is supported by the original driver. While all 4 sub-controller blocks have their own I/O addresses, moreover all 3 interrupt blocks are APB0 peripherals and high-speed GPIO block is an AHB slave, according to the hardware manual the GPIO controller is seen as a single block, and 4 sub-controllers have the shared reset signal RGU #28 and clock to register interface CLK_CPU_GPIO on CCU1. Likely support of two GPIO group interrupt blocks won't be added in short term, because the mechanism to mask several interrupt sources is not well defined. [1] Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit 985d8d5c76dcdc8f4c8ceea8fae71e4a45a0a200 Author: Vladimir Zapolskiy Date: Thu Nov 29 00:28:48 2018 +0200 gpio: lpc18xx: use resource managed interface to register GPIO controller Slightly simplify deregistration of the GPIO controller driver. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit 9dd1a30cb4881328ae568f6c060446b52539a2dd Author: Vladimir Zapolskiy Date: Thu Nov 29 00:28:47 2018 +0200 gpio: lpc18xx: add struct device local variable This is a non-functional change, it simplifies multiple access to 'struct device' pointer derived from a platform device pointer, the new local variable will also be used in the following changes. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit 9b34d05aa9c8cdd516762f2b06c22fcd05a14072 Author: Vladimir Zapolskiy Date: Thu Nov 29 00:28:46 2018 +0200 gpio: lpc18xx: use SPDX license identifier Replace GPLv2 header with the SPDX identifier. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit a109c2dbb571b10bb9969285b646f57309c98251 Author: Nicholas Mc Guire Date: Tue Nov 27 18:00:18 2018 +0100 gpio: mt7621: pass mediatek_gpio_bank_probe() failure up the stack The error cases of mediatek_gpio_bank_probe() would go unnoticed (except for the dev_err() messages). The probe function should return an error if one of the banks failed to initialize properly indicated by not returning non-0. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 59d646c775d6ae688ee90fda9f2a4270c47b7490 Author: Nicholas Mc Guire Date: Wed Nov 21 19:06:12 2018 +0100 gpio: mt7621: report failure of devm_kasprintf() kasprintf() may return NULL on failure of internal allocation thus the assigned label is not safe if not explicitly checked. On error mediatek_gpio_bank_probe() returns negative values so -ENOMEM in the (unlikely) failure case should be fine here. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire Reviewed-by: Bartosz Golaszewski Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 5fb3dc114706b557c3f6c385640f8fc1a03c2889 Author: Masahiro Yamada Date: Wed Nov 28 14:27:37 2018 +0900 mtd: rawnand: denali: remove denali_reset_banks() In nand_scan_ident(), the controller driver resets every NAND chip. This is done by sending NAND_CMD_RESET. The Denali IP provides another way to do the equivalent thing; if a bit is set in the DEVICE_RESET register, the controller sends the RESET command to the corresponding device. denali_reset_banks() uses it to reset all devices beforehand. This redundant reset sequence was needed to know the actual number of chips before calling nand_scan_ident(); if DEVICE_RESET fails, there is no chip in that chip select. Then, denali_reset_banks() sets denali->max_banks to the number of detected chips. As commit f486287d2372 ("mtd: nand: denali: fix bank reset function to detect the number of chips") explained, nand_scan_ident() issued Set Features (0xEF) command to all CS lines, some of which may not be connected with a chip. Then, the driver would wait for R/B# response, which never happens. This problem was solved by commit 107b7d6a7ad4 ("mtd: rawnand: avoid setting again the timings to mode 0 after a reset"). In the current code, nand_setup_data_interface() is called from nand_scan_tail(), which is invoked after the chip detection. Now, we can really remove the redundant denali_nand_banks() by simply passing the maximum number of chip selects supported by this IP (typically 4 or 8) to nand_scan(). Let's leave all the chip detection process to nand_scan_ident(). Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit a2a05c2f530c663f6f23cee1e57dc6d45a11a9e9 Author: Masahiro Yamada Date: Wed Nov 28 14:27:36 2018 +0900 mtd: rawnand: denali: remove ->dev_ready() hook The Denali NAND IP has no way to read out the current signal level of the R/B# pin. Instead, denali_dev_ready() checks if the R/B# transition has already happened. (The INTR__INT_ACT interrupt is asserted at the rising edge of the R/B# pin.) It is not a correct way to implement the ->dev_ready() hook. In fact, it has a drawback; in the nand_scan_ident phase, the chip detection iterates over maxchips until it fails to find a homogeneous chip. For the last loop, nand_reset() fails if no chip is there. If ->dev_ready hook exists, nand_command(_lp) calls nand_wait_ready() after NAND_CMD_RESET. However, we know denali_dev_ready() never returns 1 unless there exists a chip that toggles R/B# in that chip select. Then, nand_wait_ready() just ends up with wasting 400 msec, in the end, shows the "timeout while waiting for chip to become ready" warning. Let's remove the mis-implemented dev_ready hook, and fallback to sending the NAND_CMD_STATUS and nand_wait_status_ready(), which bails out more quickly. Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit 1b489effdb6dc16f63f254ee4c0d579929089e1d Author: Miquel Raynal Date: Thu Nov 22 16:58:59 2018 +0100 mtd: rawnand: marvell: fix spelling mistake in kernel doc Correct the spelling mistake 'Regiters' -> 'Registers'. Fixes: 961ba15c48dd ("mtd: rawnand: marvell: Fix clock resource by adding a register clock") Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon commit 48fa2f58a5d6449dc0231a994ff4f62eed86380b Author: Janusz Krzysztofik Date: Wed Nov 21 12:08:06 2018 +0100 ARM: OMAP1: ams-delta: Drop obsolete NAND resources Amstrad Delta NAND driver now uses GPIO API for data I/O so there is no need to assign memory I/O resource to the device any longer. Drop it. Signed-off-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Miquel Raynal commit 7416bd35008c0fbd4aff9fdb267ff67b7bc4ea77 Author: Janusz Krzysztofik Date: Wed Nov 21 12:08:05 2018 +0100 mtd: rawnand: ams-delta: Use GPIO API for data I/O Don't readw()/writew() data directly from/to GPIO port which is under control of gpio-omap driver, use GPIO consumer API instead. The driver should now work with any 8-bit bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 9773861304f15bec54b55ff1b6e6e6a7f99ebe5b Author: Janusz Krzysztofik Date: Wed Nov 21 12:08:04 2018 +0100 mtd: rawnand: ams-delta: Request data port GPIO resource Data port used by the driver is actually an OMAP MPUIO device, already under control of gpio-omap driver. For that reason we used to not request the memory region of the port as that would fail because the region is already busy. Despite that, we are still accessing the port by just ioremapping it and performing read/write operations. Moreover, we are doing that without any proteciton from other users legally manipulating the port pins over GPIO API. The plan is to convert the driver to access the port over GPIO consumer API. Before that happens, already prevent from other users accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal commit 02e1ca60f4c36c0f9635f79e172b72d811b8a627 Author: Janusz Krzysztofik Date: Wed Nov 21 12:08:03 2018 +0100 ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port Data port used by Amstrad Delta NAND driver is actually an OMAP MPUIO device, already under control of gpio-omap driver. The NAND driver gets access to the port by ioremapping it and performs read/write operations. That is done without any proteciton from other users legally manipulating the port pins over GPIO API. The plan is to convert the driver to access the port over GPIO consumer API. Before that is implemented, the driver can already obtain exclusive access to the port by requesting an array of its GPIO descriptors. Add respective entries to the NAND GPIO lookup table. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij Acked-by: Tony Lindgren Signed-off-by: Miquel Raynal commit 7a08dbaedd365fa4eb7c9cd504c075e3336eb0c6 Author: Boris Brezillon Date: Sun Nov 11 08:55:24 2018 +0100 mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops ->setup_data_interface() is a controller specific method and should thus be placed in nand_controller_ops. In order to make that work with controllers that support keeping pre-configured timings we need to add a new NAND_KEEP_TIMINGS flag to inform the core it should skip the timings selection step. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit f2abfeb2078b9682bfeb77f91816fcf2177b3051 Author: Boris Brezillon Date: Sun Nov 11 08:55:23 2018 +0100 mtd: rawnand: Move the ->exec_op() method to nand_controller_ops ->exec_op() is a controller method and has nothing to do in the nand_chip struct. Let's move it to the nand_controller_ops struct and adjust the core and drivers accordingly. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 7d6c37e90cf9013bd18240cd861b9ae7b006f91f Author: Boris Brezillon Date: Sun Nov 11 08:55:22 2018 +0100 mtd: rawnand: Deprecate the ->select_chip() hook Now that the CS line to be selected is passed to ->exec_op() and stored in chip->cur_cs and after patching all drivers implementing ->exec_op() to stop implementing this method, we can deprecate it by moving it to the nand_legacy structure. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 1770022ffa85e1cdba88e311493cc16d52340a59 Author: Boris Brezillon Date: Sun Nov 11 08:55:21 2018 +0100 mtd: rawnand: ams-delta: Stop implementing ->select_chip() Now that the CS to be selected is passed in nand_operation->cs, we can get rid of the ->select_chip() implementation and replace it by an internal function which is called from the chip->exec_op() hook. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 653c57c7da087be6448f63430e077dd9eae06188 Author: Boris Brezillon Date: Sun Nov 11 08:55:20 2018 +0100 mtd: rawnand: vf610: Stop implementing ->select_chip() Now that the CS to be selected is kept in chip->cur_cs and passed in nand_operation->cs, we can get rid of the ->select_chip() implementation and replace it by an internal function which is called from the chip->exec_op() and chip->ecc.read/write_xxx() hooks. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 2ace451cae226da8cbf9b2af28f1458e4edaa31a Author: Boris Brezillon Date: Sun Nov 11 08:55:19 2018 +0100 mtd: rawnand: tegra: Stop implementing ->select_chip() Now that the CS to be selected is kept in chip->cur_cs and passed in nand_operation->cs, we can get rid of the ->select_chip() implementation and replace it by an internal function which is called from the chip->exec_op() and chip->ecc.read/write_xxx() hooks. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit b25251414f6e007c6ce7a0f6b96542bce728ffd9 Author: Boris Brezillon Date: Sun Nov 11 08:55:18 2018 +0100 mtd: rawnand: marvell: Stop implementing ->select_chip() Now that the CS to be selected is kept in chip->cur_cs and passed in nand_operation->cs, we can get rid of the ->select_chip() implementation and replace it by an internal function which is called from the chip->exec_op() and chip->ecc.read/write_xxx() hooks. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 550b9fc4e3af5f0af687d9e7bf168c8b48cf5495 Author: Boris Brezillon Date: Sun Nov 11 08:55:17 2018 +0100 mtd: rawnand: fsmc: Stop implementing ->select_chip() Now that the CS line to assert is directly passed through the nand_operation struct we can replace the fsmc_select_chip() implementation by an internal fsmc_ce_ctrl() function which is directly called from fsmc_exec_op() Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 02b4a52604a4d1734a666ed11f9fb43afff10656 Author: Boris Brezillon Date: Sun Nov 11 08:55:16 2018 +0100 mtd: rawnand: Make ->select_chip() optional when ->exec_op() is implemented Now that the CS to be selected on a nand_operation is passed in nand_operation->cs we can make the ->select_chip() hook optional for drivers implementing ->exec_op(). When not implemented, the core is assuming the CS line is automatically asserted/deasserted by the driver ->exec_op() implementation. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit ae2294b10b0f066ef500954b36c94ee11c4ef20f Author: Boris Brezillon Date: Sun Nov 11 08:55:15 2018 +0100 mtd: rawnand: Pass the CS line to be selected in struct nand_operation In order to deprecate the ->select_chip hook we need to pass the CS line a NAND operations are targeting. This is done through the addition of a cs field to the nand_operation struct. We also need to keep track of the currently selected target to properly initialize op->cs, hence the ->cur_cs field addition to the nand_chip struct. Note that op->cs is not assigned in nand_exec_op() because we might rework the way we execute NAND operations in the future (adopt a queuing mechanism instead of the serialization we have right now). Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 1d0178593d148e88d2ac1e3f09c7f7eb1c20796b Author: Boris Brezillon Date: Sun Nov 11 08:55:14 2018 +0100 mtd: rawnand: Add nand_[de]select_target() helpers Add a wrapper to prevent drivers and core code from directly calling the ->select_chip hook which we are about to deprecate. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 9fd6bcffe741cfd237bb4a310e8cc82457a6c541 Author: Boris Brezillon Date: Sun Nov 11 08:55:13 2018 +0100 mtd: rawnand: ams-delta: Explicitly inherit from nand_controller All NAND objects are supposed to inherit from nand_controller. The framework is providing a dummy controller object, but we're moving away from this approach in favor of explicit inheritance. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 876ba603c9e0fa7885f89a35ed221792caea8034 Author: Boris Brezillon Date: Sun Nov 11 08:55:12 2018 +0100 mtd: rawnand: ams-delta: Check mtd_device_register() return code mtd_device_register() can fail, and when it does we should propagate the error and cleanup what has been done before. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 8bbc3c0850d0668ac7cf0f5b129ffae8c810247f Author: Boris Brezillon Date: Sun Nov 11 08:55:11 2018 +0100 mtd: rawnand: ams-delta: cleanup ams_delta_init() error path Remove unused labels, rename out_mtd into err_unmap to make it clearer and return 0 instead of using a goto out at the end of the registration procedure. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit d54445d664a1324785f40f6fd4240b7a024f4b19 Author: Boris Brezillon Date: Sun Nov 11 08:55:10 2018 +0100 mtd: rawnand: ams-delta: Fix various coding style issues Most of them were reported by checkpatch: * s/u_char/u8/ * remove unneeded blank lines * don't print warning messages when devm_kzalloc() fails * Use ! instead of == NULL * Remove invalid comment Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 4857393d5655b93e0e7368c12bbcf1d79883155c Author: Boris Brezillon Date: Sun Nov 11 08:55:09 2018 +0100 mtd: rawnand: ams-delta: Add an SPDX tag to replace the license text Add an SPDX GPL-2.0 tag and update MODULE_LICENSE() to match the license text. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit fbb080a1fcad340a6337d850ce4ff21f84635b03 Author: Boris Brezillon Date: Sun Nov 11 08:55:08 2018 +0100 mtd: rawnand: ams-delta: Allow this driver to be compiled when COMPILE_TEST=y Drop the asm and mach headers inclusion and allow this driver to be compiled when COMPILE_TEST=y in order to increase compile-test coverage. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 336058c8f4c2c7991427304c8bde05acef156054 Author: Boris Brezillon Date: Sun Nov 11 08:55:07 2018 +0100 mtd: rawnand: Remove unused NAND_CONTROLLER_ALLOC flag Looks like NAND_CONTROLLER_ALLOC has been introduced a long time ago back when the dummy nand_hw_ctrl object was dynamically allocated instead of being embedded in nand_chip. We can safely get rid of this unused flag. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 1f2d29e634b3e7abc7b62adf6bb4a676615c02ef Author: Boris Brezillon Date: Sun Nov 11 08:55:06 2018 +0100 mtd: rawnand: Move nand_exec_op() to internal.h nand_exec_op() is only used by core code (nand_xxx.c files). Let's move this inline function in drivers/mtd/nand/raw/internals.h. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 996852a97bc684d7771c692364705f0aaf423ba9 Author: Boris Brezillon Date: Sun Nov 11 08:55:05 2018 +0100 mtd: rawnand: legacy: Drop useless test in nand_legacy_set_defaults() nand_legacy_set_defaults() returns directly if chip->exec_op != NULL, no need to test !chip->exec_op after that. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 99f3351a6d6e03a9d307bba6797150a30e2e9d2e Author: Boris Brezillon Date: Sun Nov 11 08:55:04 2018 +0100 mtd: rawnand: Reorganize code to avoid forward declarations Avoid forward declaration of nand_get_device(), nand_do_write_oob() and nand_update_bbt() by moving functions around. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 0813621ba898aa91984d2713251970feeca93777 Author: Boris Brezillon Date: Sun Nov 11 08:55:03 2018 +0100 mtd: rawnand: Stop passing mtd_info objects to internal functions After having reworked the rawnand API to avoid passing mtd_info objects around, let's do the same for internal functions. Signed-off-by: Boris Brezillon Tested-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal commit 10949af1681d5bb5cdbcc012815c6e40eec17d02 Author: Schrempf Frieder Date: Thu Nov 8 08:32:11 2018 +0000 mtd: spinand: Add initial support for Toshiba TC58CVG2S0H Add minimal support for the Toshiba TC58CVG2S0H SPI NAND chip. Signed-off-by: Frieder Schrempf Acked-by: Clément Péron Signed-off-by: Miquel Raynal commit 46a14b1aa4a161ad5e2abf03e1035d882437252b Author: Bartosz Golaszewski Date: Mon Nov 26 09:15:58 2018 +0100 MAINTAINERS: remove a duplicate entry for gpio-mockup I'll be getting all GPIO e-mail now, so remove my name from reviewers of gpio-mockup. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 8c4cf161a8b42749e986a3503f6cd4f3b5682fe3 Author: Chen-Yu Tsai Date: Fri Dec 7 16:47:19 2018 +0800 dt-bindings: rtc: sun6i-rtc: Fix register range in example The register range for the RTC extends beyond 0x54. Use the size from the user manual's memory map instead. Fixes: 9765d2d94309 ("rtc: sun6i: Add sun6i RTC driver") Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit eaaa598c0a285ef3b0efa54e711a385269fe50ce Merge: 68000a0d983f5 72e9baf997286 Author: Zhang Rui Date: Fri Dec 7 16:49:50 2018 +0800 Merge branches 'for-rc' and 'thermal-core' into next commit 72e9baf997286610a2a3109e79fdb528590c5523 Author: Amit Kucheria Date: Fri Dec 7 12:25:27 2018 +0530 drivers: thermal: Move QCOM_SPMI_TEMP_ALARM into the qcom subdir This cleans up the directory a bit allowing just one place to look for thermal related drivers for QCOM platforms instead of being scattered in the root directory and the qcom/ subdirectory. Compile-tested with ARCH=arm64 defconfig and the driver explicitly enabled with menuconfig. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 3e8c4d31f8eddc957ee293b3556586ee698d9a21 Author: Amit Kucheria Date: Fri Dec 7 12:25:26 2018 +0530 drivers: thermal: Move various drivers for intel platforms into a subdir This cleans up the directory a bit, now that we have several other platforms using platform-specific sub-directories. Compile-tested with ARCH=x86 defconfig and the drivers explicitly enabled with menuconfig. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 48d365de7746a000afd7f9f7cc1821cbb6fe9b45 Merge: 754cac3f1c270 b1635596860dd Author: Greg Kroah-Hartman Date: Fri Dec 7 08:10:22 2018 +0100 Merge tag 'soundwire-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 4.21-rc1 A single change: - constify snd_soc_dai_ops struct by Julia * tag 'soundwire-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: constify snd_soc_dai_ops structures commit 88d905e20b11f7ad841e3afddaf1d59b6693c4a1 Author: Yangtao Li Date: Sat Dec 1 04:56:30 2018 -0500 crypto: cavium/nitrox - convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Herbert Xu commit 8362ea16f69fe59c4d012f0748e586ad09391f41 Author: Atul Gupta Date: Fri Nov 30 14:32:09 2018 +0530 crypto: chcr - ESN for Inline IPSec Tx Send SPI, 64b seq nos and 64b IV with aadiv drop for inline crypto. This information is added in outgoing packet after the CPL TX PKT XT and removed by hardware. The aad, auth and cipher offsets are then adjusted for ESN enabled tunnel. Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu commit c35828ea906a7c76632a0211e59c392903cd4615 Author: Atul Gupta Date: Fri Nov 30 14:31:48 2018 +0530 crypto: chcr - small packet Tx stalls the queue Immediate packets sent to hardware should include the work request length in calculating the flits. WR occupy one flit and if not accounted result in invalid request which stalls the HW queue. Cc: stable@vger.kernel.org Signed-off-by: Atul Gupta Signed-off-by: Herbert Xu commit 1f6669b9716c6c98391b0f756e060892b32b8ca7 Author: Corentin Labbe Date: Thu Nov 29 14:42:26 2018 +0000 crypto: user - Add crypto_stats_init This patch add the crypto_stats_init() function. This will permit to remove some ifdef from __crypto_register_alg(). Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 44f13133cb03ec32fc88a533673248ef5c0617e3 Author: Corentin Labbe Date: Thu Nov 29 14:42:25 2018 +0000 crypto: user - rename err_cnt parameter Since now all crypto stats are on their own structures, it is now useless to have the algorithm name in the err_cnt member. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 17c18f9e33282a170458cb5ea20759bfcb0da7d8 Author: Corentin Labbe Date: Thu Nov 29 14:42:24 2018 +0000 crypto: user - Split stats in multiple structures Like for userspace, this patch splits stats into multiple structures, one for each algorithm class. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 5fff81729f09f3d7d9be0ace50be112bd34f0bb9 Author: Corentin Labbe Date: Thu Nov 29 14:42:23 2018 +0000 crypto: user - remove intermediate variable The use of the v64 intermediate variable is useless, and removing it bring to much readable code. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit b0af91c14109d6c9c0d73428dc0512b780f41d94 Author: Corentin Labbe Date: Thu Nov 29 14:42:22 2018 +0000 crypto: user - Fix invalid stat reporting Some error count use the wrong name for getting this data. But this had not caused any reporting problem, since all error count are shared in the same union. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit f7d76e05d058b832b373237566cc1af8251371b5 Author: Corentin Labbe Date: Thu Nov 29 14:42:21 2018 +0000 crypto: user - fix use_after_free of struct xxx_request All crypto_stats functions use the struct xxx_request for feeding stats, but in some case this structure could already be freed. For fixing this, the needed parameters (len and alg) will be stored before the request being executed. Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") Reported-by: syzbot Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 76d09ea7c22f2cabf1f66ffc287c23b19b120be9 Author: Corentin Labbe Date: Thu Nov 29 14:42:20 2018 +0000 crypto: tool: getstat: convert user space example to the new crypto_user_stat uapi This patch converts the getstat example tool to the recent changes done in crypto_user_stat - changed all stats to u64 - separated struct stats for each crypto alg Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 7f0a9d5c9d1ba8ab3e5b144e52553744dc0d7471 Author: Corentin Labbe Date: Thu Nov 29 14:42:19 2018 +0000 crypto: user - split user space crypto stat structures It is cleaner to have each stat in their own structures. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 6e8e72cd206e2ba68801e4f2490f639d41808c8d Author: Corentin Labbe Date: Thu Nov 29 14:42:18 2018 +0000 crypto: user - convert all stats from u32 to u64 All the 32-bit fields need to be 64-bit. In some cases, UINT32_MAX crypto operations can be done in seconds. Reported-by: Eric Biggers Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a6a31385364ca0f7b98ace0bad93d793f07f97f3 Author: Corentin Labbe Date: Thu Nov 29 14:42:17 2018 +0000 crypto: user - CRYPTO_STATS should depend on CRYPTO_USER CRYPTO_STATS is using CRYPTO_USER stuff, so it should depends on it. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 2ced26078fcff26db532d6300a1b5f8ffd11a5e1 Author: Corentin Labbe Date: Thu Nov 29 14:42:16 2018 +0000 crypto: user - made crypto_user_stat optional Even if CRYPTO_STATS is set to n, some part of CRYPTO_STATS are compiled. This patch made all part of crypto_user_stat uncompiled in that case. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit c97e4df573f2434b07f08d3b93673f61158d267f Author: Paulo Flabiano Smorigo Date: Tue Nov 27 15:27:21 2018 -0200 MAINTAINERS: change NX/VMX maintainers Add Breno and Nayna as NX/VMX crypto driver maintainers. Also change my email address to my personal account and remove Leonidas since he's not working with the driver anymore. Signed-off-by: Paulo Flabiano Smorigo Signed-off-by: Herbert Xu commit 18596781e0beb6b4633cb5582308ba14c37eaaed Author: Gilad Ben-Yossef Date: Tue Nov 13 09:40:37 2018 +0000 MAINTAINERS: ccree: add co-maintainer Add Yael Chemla as co-maintainer of Arm TrustZone CryptoCell REE driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit fefbc0b4bcb3c0cc45bed906af46e7cd627ac4bc Author: Gilad Ben-Yossef Date: Tue Nov 13 09:40:36 2018 +0000 dt-bindings: crypto: ccree: add dt bindings for ccree 703 Add device tree bindings associating Arm TrustZone CryptoCell 703 with the ccree driver. Signed-off-by: Gilad Ben-Yossef Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 1c876a90e25398a7396ff4de9074ab530e7892b4 Author: Gilad Ben-Yossef Date: Tue Nov 13 09:40:35 2018 +0000 crypto: ccree - add support for CryptoCell 703 Add support for Arm TrustZone CryptoCell 703. The 703 is a variant of the CryptoCell 713 that supports only algorithms certified by the Chinesse Office of the State Commercial Cryptography Administration (OSCCA). Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 3004cfd6204927c1294060b849029cf0c2651074 Author: Stephan Gerhold Date: Thu Dec 6 19:42:28 2018 +0100 Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs" Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get the phy GPIOs") changed the code to claim the PHY GPIOs permanently for Intel Baytrail devices. This causes issues when the actual PHY driver attempts to claim the same GPIO descriptors. For example, tusb1210 now fails to probe with: tusb1210: probe of dwc3.0.auto.ulpi failed with error -16 (EBUSY) dwc3-pci needs to turn on the PHY once before dwc3 is loaded, but usually the PHY driver will then hold the GPIOs to turn off the PHY when requested (e.g. during suspend). To fix the problem, this reverts the commit to restore the old behavior to put the GPIOs immediately after usage. Link: https://www.spinics.net/lists/linux-usb/msg174681.html Cc: stable@vger.kernel.org Signed-off-by: Stephan Gerhold Signed-off-by: Felipe Balbi commit d9d1dc817020773c010498f5f81bb49439f7c962 Author: Yangtao Li Date: Wed Dec 5 11:26:39 2018 -0500 USB: gadget: udc: s3c2410_udc: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Felipe Balbi commit 3fd3c80acc172fcaab2356c15e5e3c05758a9d51 Author: Danit Goldberg Date: Fri Nov 30 13:22:04 2018 +0200 net/mlx5: Expose packet based credit mode Packet based credit mode bit determines whether the credit mode is done per message or packet. Expose the QP creation flag and the HCA capability. Signed-off-by: Danit Goldberg Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky commit 946dca8fe456564373e0ff1f40c232b534e2aaef Merge: 7a027b57f9596 e61efff4ae94f Author: Herbert Xu Date: Fri Dec 7 13:59:10 2018 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up crypto stats API revert. commit f770e3bc236ee954a3b4052bdf55739e26ee25db Author: YueHaibing Date: Fri Dec 7 03:52:43 2018 +0000 usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/mtu3/mtu3_qmu.c: In function 'qmu_tx_zlp_error_handler': drivers/usb/mtu3/mtu3_qmu.c:385:22: warning: variable 'req' set but not used [-Wunused-but-set-variable] It seems dbginfo original intention is print 'req' other than 'mreq' Acked-by: Chunfeng Yun Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit 54d48183d21e03f780053d7129312049cb5dd591 Author: Andy Shevchenko Date: Mon Dec 3 11:28:47 2018 +0200 usb: dwc3: trace: add missing break statement to make compiler happy The missed break statement in the outer switch makes the code fall through always and thus always same value will be printed. Besides that, compiler warns about missed fall through marker: drivers/usb/dwc3/./trace.h: In function ‘trace_raw_output_dwc3_log_trb’: drivers/usb/dwc3/./trace.h:246:4: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (pcm) { ^~~~~~ Add the missing break statement to work correctly without compilation warnings. Fixes: fa8d965d736b ("usb: dwc3: trace: pretty print high-bandwidth transfers too") Cc: Felipe Balbi Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi commit e7521d82b33593c9b3ffd1e49a7ea2999ddc2285 Author: Yuval Shaia Date: Thu Dec 6 16:02:34 2018 +0200 IB/rxe: Utilize generic function to validate port number Utilize rdma_is_port_valid to validate the given port. Signed-off-by: Yuval Shaia Signed-off-by: Jason Gunthorpe commit 1ceb25c885a291b57f2b069081599834204025a3 Author: Yuval Shaia Date: Thu Dec 6 13:04:38 2018 +0200 IB/rxe: Make function rxe_pool_cleanup return void Since the function always returns 0 make it void. Signed-off-by: Yuval Shaia Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit c471de14eeacff6c095f81eb8901d55de7f7fb69 Author: Leon Romanovsky Date: Thu Dec 6 12:19:05 2018 +0200 RDMA/uverbs: Fix typo in string concatenation macro Update UVERBS_OBJECT() macro to properly concatenate the object name. Fixes: e502a864c352 ("IB/core: Introduce DECLARE_UVERBS_GLOBAL_METHODS") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d1810909d841314ba94b14dc3de9e9fbc13b046a Author: Colin Ian King Date: Sun Nov 25 23:25:24 2018 +0000 drm/i915/gvt: fix spelling mistake "Interupts" -> "Interrupts" There is a spelling mistake in an error message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Zhenyu Wang commit f39a89b8f738b683e720185cdbbd1e6d626fada9 Author: Xiong Zhang Date: Thu Nov 29 16:25:54 2018 +0800 drm/i915/gvt: Fix shadow ctx ppgtt destroy function Recently gvt shadow ctx create ppgtt table and this ppgtt's root pointer is modified at workload dispatch, then we lose the original ppgtt's root pointer, this causes the ppgtt destroy function abnormal as it will release the wrong root table. This patch save i915 context ppgtt root pointer at shadow ctx creation and restore it at shadow ctx destruction. v2: Split save and restore function (Zhenyu) Fixes:4f15665ccbba("drm/i915: Add ppgtt to GVT GEM context") Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang commit 77453c9f2b67956911d0074e07e30a5e59e51a6e Author: Peng Hao Date: Thu Oct 4 12:04:34 2018 -0400 drm/i915/gvt: fix a typo: "registeration" -> "registration". Fix a typo in the error message reporting. Signed-off-by: Peng Hao Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang commit d58b33638c99ae63c57ad86d8f9f34abac163c1e Author: Xinyun Liu Date: Wed Sep 19 15:28:30 2018 +0800 drm/i915/gvt: fix typo in two MI cmd annotation s/ME_SEMAPHORE_/MI_SEMAPHORE_ Signed-off-by: Xinyun Liu Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang commit cba5ad62df9cf85218c0cd811cf68f9fd21f0d9a Author: Zhao Yan Date: Mon Sep 17 01:56:51 2018 -0400 drm/i915/gvt: update force-to-nonpriv register whitelist Host print below warning message when creating guest: "gvt: vgpu(2) Invalid FORCE_NONPRIV write 83a8". Register 0x83a8 should be in force-to-nonpriv whitelist as required by guest v2: update commit message to describe purpose of this patch in detail (zhenyu wang) Signed-off-by: Zhao Yan Signed-off-by: Zhenyu Wang commit 419822c8b83f37ea4934d5583b5c5fbe9493cfcf Author: Alex Vesker Date: Tue Dec 4 15:34:05 2018 +0200 IB/mlx5: Enable TX on a DEVX flow table Flow table can be passed as a DEVX object which is a valid destination in an EGRESS flow. Fix the original code to allow that. Fixes: a7ee18bdee83 ("RDMA/mlx5: Allow creating a matcher for a NIC TX flow table") Signed-off-by: Alex Vesker Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0fbc9b8b4ea3f688a5da141a64f97aa33ad02ae9 Author: Qian Cai Date: Thu Nov 29 21:18:07 2018 -0500 mlx4: Use snprintf instead of complicated strcpy This fixes a compilation warning in sysfs.c drivers/infiniband/hw/mlx4/sysfs.c:360:2: warning: 'strncpy' output may be truncated copying 8 bytes from a string of length 31 [-Wstringop-truncation] By eliminating the temporary stack buffer. Signed-off-by: Qian Cai Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9aefcabe579bca06325ad9e577a36816f57386ff Author: Mike Marciniszyn Date: Wed Nov 28 10:33:00 2018 -0800 IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio Commit 4e045572e2c2 ("IB/hfi1: Add unique txwait_lock for txreq events") laid the ground work to support per resource waiting locking. This patch adds that with a lock unique to each sdma engine and pio sendcontext and makes necessary changes for verbs, PSM, and vnic to use the new locks. This is particularly beneficial for smaller messages that will exhaust resources at a faster rate. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Reviewed-by: Gary Leshner Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 18912c4524385dd6532c682cb9d4f6aa39ba8d47 Author: Mike Marciniszyn Date: Wed Nov 28 10:32:48 2018 -0800 IB/hfi1: Close VNIC sdma_progress sleep window The call to sdma_progress() is called outside the wait lock. In this case, there is a race condition where sdma_progress() can return false and the sdma_engine can idle. If that happens, there will be no more sdma interrupts to cause the wakeup and the vnic_sdma xmit will hang. Fix by moving the lock to enclose the sdma_progress() call. Also, delete the tx_retry. The need for this was removed by: commit bcad29137a97 ("IB/hfi1: Serve the most starved iowait entry first") Fixes: 64551ede6cd1 ("IB/hfi1: VNIC SDMA support") Reviewed-by: Gary Leshner Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 5190f052a3654aa1120ea4f9ff3bfac430459893 Author: Mike Marciniszyn Date: Wed Nov 28 10:22:31 2018 -0800 IB/hfi1: Allow the driver to initialize QP priv struct This patch adds an interface to allow the driver to initialize the QP priv struct when the QP is created and after the qpn has been assigned. A field is added to the QP priv struct to reference the rcd and two new files are added to contain the function to initialize the rcd field so that more TID RDMA related code can be added here later. Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d2e9ace47aac92a465c4ad8e0cd1f5f8422a117e Author: Kaike Wan Date: Wed Nov 28 10:22:20 2018 -0800 IB/hfi1: Add OPFN and TID RDMA capability bits The OPFN and TID RDMA capability bits are added to allow users to control which feature is enabled and disabled. Reviewed-by: Mike Marciniszyn Signed-off-by: Mitko Haralanov Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit ca95f802ef5139722acc8d30aeaab6fe5bbe939e Author: Kaike Wan Date: Wed Nov 28 10:22:09 2018 -0800 IB/hfi1: Unreserve a reserved request when it is completed Currently, When a reserved operation is completed, its entry in the send queue will not be unreserved, which leads to the miscalculation of qp->s_avail and thus the triggering of a WARN_ON call trace. This patch fixes the problem by unreserving the reserved operation when it is completed. Fixes: 856cc4c237ad ("IB/hfi1: Add the capability for reserved operations") Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit ff8b67fccdb65402df78a1695c38be805252cf8e Author: Ashutosh Dixit Date: Wed Nov 28 10:19:47 2018 -0800 IB/hfi1: Consider LMC in 16B/bypass ingress packet check Ingress packet check for 16B/bypass packets should consider the port LMC. Not doing this will result in packets sent to the LMC LIDs getting dropped. The check is implemented in HW for 9B packets. Reviewed-by: Mike Ruhl Signed-off-by: Ashutosh Dixit Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit dbc2970caef74e8ff41923d302aa6fb5a4812d0e Author: Michael J. Ruhl Date: Wed Nov 28 10:19:36 2018 -0800 IB/hfi1: Incorrect sizing of sge for PIO will OOPs An incorrect sge sizing in the HFI PIO path will cause an OOPs similar to this: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] hfi1_verbs_send_pio+0x3d8/0x530 [hfi1] PGD 0 Oops: 0000 1 SMP Call Trace: ? hfi1_verbs_send_dma+0xad0/0xad0 [hfi1] hfi1_verbs_send+0xdf/0x250 [hfi1] ? make_rc_ack+0xa80/0xa80 [hfi1] hfi1_do_send+0x192/0x430 [hfi1] hfi1_do_send_from_rvt+0x10/0x20 [hfi1] rvt_post_send+0x369/0x820 [rdmavt] ib_uverbs_post_send+0x317/0x570 [ib_uverbs] ib_uverbs_write+0x26f/0x420 [ib_uverbs] ? security_file_permission+0x21/0xa0 vfs_write+0xbd/0x1e0 ? mntput+0x24/0x40 SyS_write+0x7f/0xe0 system_call_fastpath+0x16/0x1b Fix by adding the missing sizing check to correctly determine the sge length. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit dd6c6a5a2e1e7be615c81ca6d44c2e89e22cb463 Author: Michael J. Ruhl Date: Wed Nov 28 10:19:25 2018 -0800 IB/hfi1: Limit VNIC use of SDMA engines to the available count VNIC assumes that all SDMA engines have been configured for use. This is not necessarily true (i.e. if the count was constrained by the module parameter). Update VNICs usage to use the configured count, rather than the hardware count. Reviewed-by: Mike Marciniszyn Reviewed-by: Gary Leshner Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit fe4dd4239277486ca3a468e7bbeafd7ef3a5634e Author: Mitko Haralanov Date: Wed Nov 28 10:19:15 2018 -0800 IB/hfi1: Correctly process FECN and BECN in packets A CA is supposed to ignore FECN bits in multicast, ACK, and CNP packets. This patch corrects the behavior of the HFI1 driver in this regard by ignoring FECNs in those packet types. While fixing the above behavior, fix the extraction of the FECN and BECN bits from the packet headers for both 9B and 16B packets. Furthermore, this patch corrects the driver's response to a FECN in RDMA READ RESPONSE packets. Instead of sending an "empty" ACK, the driver now sends a CNP packet. While editing that code path, add the missing trace for CNP packets. Fixes: 88733e3b8450 ("IB/hfi1: Add 16B UD support") Fixes: f59fb9e05109 ("IB/hfi1: Fix handling of FECN marked multicast packet") Reviewed-by: Kaike Wan Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Mitko Haralanov Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit c1a797c0818e0122c7ec8422edd971cfec9b15ea Author: Kaike Wan Date: Wed Nov 28 10:19:04 2018 -0800 IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state When it is requested to change its physical state back to Offline while in the process to go up, DC8051 will set the ERROR field in the DC8051_DBG_ERR_INFO_SET_BY_8051 register. This ERROR field will remain until the next time when DC8051 transitions from Offline to Polling. Subsequently, when the host requests DC8051 to change its physical state to Polling again, it may receive a DC8051 interrupt with the stale ERROR field still in DC8051_DBG_ERR_INFO_SET_BY_8051. If the host link state has been changed to Polling, this stale ERROR will force the host to transition to Offline state, resulting in a vicious cycle of Polling ->Offline->Polling->Offline. On the other hand, if the host link state is still Offline when the stale ERROR is received, the stale ERROR will be ignored, and the link will come up correctly. This patch implements the correct behavior by changing host link state to Polling only after DC8051 changes its physical state to Polling. Reviewed-by: Mike Marciniszyn Signed-off-by: Krzysztof Goreczny Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 937488a85986faa743d12456970a0cbe83e3b04e Author: Kaike Wan Date: Wed Nov 28 10:14:32 2018 -0800 IB/hfi1: Dump pio info for non-user send contexts This patch dumps the pio info for non-user send contexts to assist debugging in the field. Reviewed-by: Mike Marciniczyn Reviewed-by: Mike Ruhl Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 44ff3cafcd7f413e7710a58ac40cfdc3a9380097 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:25 2018 +0800 arm64: dts: allwinner: a64: Fix up RTC device node and clock references The RTC module on the A64 was claimed to be the same as on the A31, when in fact it is not. It is actually compatible to the H3's RTC. The A64's RTC has some extra crypto-related registers which the H3's does not, but the exact function of these is not clear. This patch fixes the compatible string and clock properties to conform to the updated bindings. The device node for the internal oscillator is removed, as it is internalized into the RTC device. Clock references to the IOSC and LOSC are also fixed. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit 5f9e882825467105acafd208520b69bf95adb963 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:24 2018 +0800 ARM: dts: sun8i: r40: Add RTC device node The R40 has an RTC hardware block, which has additional registers that are not related to RTC or clock functions, and is otherwise compatible with the H3's RTC. Add a device node for it, and fix up any references to the LOSC. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai commit 507c6e89d6c4b2cd68a8e7ff69d1a00cf74b15dd Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:22 2018 +0800 ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock references The RTC module on the H3 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The H5's RTC has some extra crypto-related registers compared to the H3. Their exact functions are not clear. Also the RTC-VIO regulator has different settings. This patch fixes the compatible string and clock properties to conform to the updated bindings. The device node for the internal oscillator is removed, as it is internalized into the RTC device. Clock references to the IOSC and LOSC are also fixed. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai commit f6f4422532ad9ec9380a9936ed16b30922066a50 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:20 2018 +0800 ARM: dts: sun8i: a23/a33: Fix up RTC device node The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23. This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai commit e69aa5f9b97f7f871643336deb281db5cb14878b Merge: 1f9a5dce3548d 0b258ed1a219a Author: Dave Airlie Date: Fri Dec 7 10:46:29 2018 +1000 Merge tag 'drm-misc-next-2018-12-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Final changes to drm-misc-next for v4.21: UAPI Changes: Core Changes: - Add dma_fence_get_stub to dma-buf, and use it in drm/syncobj. - Add and use DRM_MODESET_LOCK_BEGIN/END helpers. - Small fixes to drm_atomic_helper_resume(), drm_mode_setcrtc() and drm_atomic_helper_commit_duplicated_state() - Fix drm_atomic_state_helper.[c] extraction. Driver Changes: - Small fixes to tinydrm, vkms, meson, rcar-du, virtio, vkms, v3d, and pl111. - vc4: Allow scaling and YUV formats on cursor planes. - v3d: Enable use of the Texture Formatting Unit, and fix prime imports of buffers from other drivers. - Add support for the AUO G101EVN010 panel. - sun4i: Enable support for the H6 display engine. Signed-off-by: Dave Airlie [airlied: added drm/v3d: fix broken build to the merge commit] From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/321be9d3-ab75-5f92-8193-e5113662edef@linux.intel.com commit ef2df7fc11f8847e9e1912c06fd9cfef1cca438c Merge: fdb8b298676a3 1ba1daed90e23 Author: David S. Miller Date: Thu Dec 6 13:26:07 2018 -0800 Merge branch 'Pass-extack-to-NETDEV_PRE_UP' Petr Machata says: ==================== Pass extack to NETDEV_PRE_UP Drivers may need to validate configuration of a device that's about to be upped. An example is mlxsw, which needs to check the configuration of a VXLAN device attached to an offloaded bridge. Should the validation fail, there's currently no way to communicate details of the failure to the user, beyond an error number. Therefore this patch set extends the NETDEV_PRE_UP event to include extack, if available. There are three vectors through which NETDEV_PRE_UP invocation can be reached. The two major ones are dev_open() and dev_change_flags(), the last is then __dev_change_flags(). In patch #1, the first access vector, dev_open() is addressed. An extack parameter is added and all users converted to use it. Before addressing the second vector, two preparatory patches propagate extack argument to the proximity of the dev_change_flags() call in VRF and IPVLAN drivers. That happens in patches #2 and #3. Then in patch #4, dev_change_flags() is treated similarly to dev_open(). Likewise in patch #5, __dev_change_flags() is extended. Then in patches #6 and #7, the extack is finally propagated all the way to the point where the notification is emitted. This change allows particularly mlxsw (which already has code to leverage extack if available) to communicate to the user error messages regarding VXLAN configuration. In patch #8, add a test case that exercises this code and checks that an error message is propagated. For example: local 192.0.2.17 remote 192.0.2.18 \ dstport 4789 nolearning noudpcsum tos inherit ttl 100 local 192.0.2.17 remote 192.0.2.18 \ dstport 4789 nolearning noudpcsum tos inherit ttl 100 Error: mlxsw_spectrum: Conflicting NVE tunnels configuration. v2: - Add David Ahern's tags. ==================== Signed-off-by: David S. Miller commit 1ba1daed90e235f297f60443128a3acfc05aac7b Author: Petr Machata Date: Thu Dec 6 17:05:48 2018 +0000 selftests: mlxsw: Add a new test extack.sh Add a testsuite dedicated to testing extack propagation and related functionality. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 40c900aa1ff580afe941ff77f327f004546f0ce7 Author: Petr Machata Date: Thu Dec 6 17:05:47 2018 +0000 net: core: dev: Attach extack to NETDEV_PRE_UP Drivers may need to validate configuration of a device that's about to be upped. Should the validation fail, there's currently no way to communicate details of the failure to the user, beyond an error number. To mend that, change __dev_open() to take an extack argument and pass it from __dev_change_flags() and dev_open(), where it was propagated in the previous patches. Change __dev_open() to call call_netdevice_notifiers_extack() so that the passed-in extack is attached to the NETDEV_PRE_UP notifier. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 263726053400b9c6671df8e87d3db9728199da13 Author: Petr Machata Date: Thu Dec 6 17:05:45 2018 +0000 net: core: dev: Add call_netdevice_notifiers_extack() In order to propagate extack through NETDEV_PRE_UP, add a new function call_netdevice_notifiers_extack() that primes the extack field of the notifier info. Convert call_netdevice_notifiers() to a simple wrapper around the new function that passes NULL for extack. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 6d0403216d030e5623de3911168fceeaac2e14d6 Author: Petr Machata Date: Thu Dec 6 17:05:43 2018 +0000 net: core: dev: Add extack argument to __dev_change_flags() In order to pass extack together with NETDEV_PRE_UP notifications, it's necessary to route the extack to __dev_open() from diverse (possibly indirect) callers. The last missing API is __dev_change_flags(). Therefore extend __dev_change_flags() with and extra extack argument and update the two existing users. Since the function declaration line is changed anyway, name the struct net_device argument to placate checkpatch. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 567c5e13be5cc74d24f5eb54cf353c2e2277189b Author: Petr Machata Date: Thu Dec 6 17:05:42 2018 +0000 net: core: dev: Add extack argument to dev_change_flags() In order to pass extack together with NETDEV_PRE_UP notifications, it's necessary to route the extack to __dev_open() from diverse (possibly indirect) callers. One prominent API through which the notification is invoked is dev_change_flags(). Therefore extend dev_change_flags() with and extra extack argument and update all users. Most of the calls end up just encoding NULL, but several sites (VLAN, ipvlan, VRF, rtnetlink) do have extack available. Since the function declaration line is changed anyway, name the other function arguments to placate checkpatch. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit cf7686a01266de84b3b825acc05026d4e55454e1 Author: Petr Machata Date: Thu Dec 6 17:05:40 2018 +0000 net: ipvlan: ipvlan_set_port_mode(): Add an extack argument A follow-up patch will extend dev_change_flags() with an extack argument. Extend ipvlan_set_port_mode() to have that argument available for the conversion. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit dc1aea1e08de3fb02c52df6e0e27095a49fb5a41 Author: Petr Machata Date: Thu Dec 6 17:05:38 2018 +0000 net: vrf: cycle_netdev(): Add an extack argument A follow-up patch will extend dev_change_flags() with an extack argument. Extend cycle_netdev() to have that argument available for the conversion. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 00f54e68924eaf075f3f24be18557899d347bc4a Author: Petr Machata Date: Thu Dec 6 17:05:36 2018 +0000 net: core: dev: Add extack argument to dev_open() In order to pass extack together with NETDEV_PRE_UP notifications, it's necessary to route the extack to __dev_open() from diverse (possibly indirect) callers. One prominent API through which the notification is invoked is dev_open(). Therefore extend dev_open() with and extra extack argument and update all users. Most of the calls end up just encoding NULL, but bond and team drivers have the extack readily available. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4a040e7c72e6bd2ffc023ecca31e336aec9dbb87 Author: Yuanjiang Yu Date: Thu Dec 6 11:20:39 2018 +0800 power: supply: sc27xx: Save last battery capacity Our charger manager can optimize the battery capacity periodically, so we can save last battery capacity into registers. Then next system power-on, we can read the last saved battery capacity as the initial battery capacity, which can make the battery capacity more accurate. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit caa6e150f8fbcf4011cb7f3b30448f1b1de63b4f Author: Claudiu Beznea Date: Thu Dec 6 17:29:46 2018 +0000 power: reset: at91-poweroff: move shdwc related data to one structure Move SHDWC realted data to only one structure to have them grouped. Inspired from commit 9be74f0d39c1 ("power: reset: at91-poweroff: make mpddrc_base part of struct shdwc"). Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel commit 2209e06f8a85c14a0670d7658f43a0e90151f197 Author: Alexandru Gagniuc Date: Wed Nov 28 16:28:04 2018 -0600 PCI: Add missing include to drivers/pci.h This file makes use of definitions provided in . This only compiles when is included beforehand, and creates a nasty include dependency. Instead, just include the correct file. Signed-off-by: Alexandru Gagniuc Signed-off-by: Bjorn Helgaas commit 7cb3026411cf2b64797eb6b1caacfba6ca4258d9 Author: Benjamin Young Date: Sat Dec 1 08:07:11 2018 -0800 PCI: Remove unnecessary space before function pointer arguments Make spacing more consistent in the code for function pointer declarations based on checkpatch.pl. Signed-off-by: Benjamin Young [bhelgaas: make similar changes in include/linux/pci.h] Signed-off-by: Bjorn Helgaas commit 555fc5ba57908d7c0e4593bc58b2766f5ed5adf5 Author: Rob Herring Date: Wed Dec 5 13:50:27 2018 -0600 leds: 88pm860x: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is. Cc: linux-leds@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski commit 6ab4a3502923c20c5a6921868e787e5fd033409b Author: Tomer Maimon Date: Tue Dec 4 15:54:42 2018 +0200 spi: Update NPCM PSPI controller documentation Update the PSPI NPCM binding document of the spi aliases use to define the spi ID number. Signed-off-by: Tomer Maimon Signed-off-by: Mark Brown commit 1fa33be36cfc8908be951ed56113906f422add50 Author: Tomer Maimon Date: Tue Dec 4 15:40:35 2018 +0200 spi: npcm: Modify pspi send function Align pspi send function code with the recieve function code, Also simplify the code a bit with early return. Signed-off-by: Tomer Maimon Signed-off-by: Mark Brown commit fdb8b298676a39b660d10c6dcaaf5b702f811009 Author: Pedro Tammela Date: Thu Dec 6 10:45:28 2018 -0200 tcp: fix code style in tcp_recvmsg() 2 goto labels are indented with a tab. remove the tabs and keep the code style consistent. Signed-off-by: Pedro Tammela Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit d6a4b570d346c335bda4041c7e59d9a413083bc7 Merge: 5c327f673d2f1 dc0fe7d47f9f2 Author: David S. Miller Date: Thu Dec 6 12:18:17 2018 -0800 Merge branch 'dsa-mtu' Andrew Lunn says: ==================== Adjust MTU of DSA master interface DSA makes use of additional headers to direct a frame in/out of a specific port of the switch. When the slave interfaces uses an MTU of 1500, the master interface can be asked to handle frames with an MTU of 1504, or 1508 bytes. Some Ethernet interfaces won't transmit/receive frames which are bigger than their MTU. Automate the increasing of the MTU on the master interface, by adding to each tagging driver how much overhead they need, and then calling dev_set_mtu() of the master interface to increase its MTU as needed. ==================== Signed-off-by: David S. Miller commit dc0fe7d47f9f2256e3aa695bb754625f37291e17 Author: Andrew Lunn Date: Thu Dec 6 11:36:05 2018 +0100 net: dsa: Set the master device's MTU to account for DSA overheads DSA tagging of frames sent over the master interface to the switch increases the size of the frame. Such frames can then be bigger than the normal MTU of the master interface, and it may drop them. Use the overhead information from the tagger to set the MTU of the master device to include this overhead. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit a5dd308778a4e05e7b0b927cf18b89d1ebbff59c Author: Andrew Lunn Date: Thu Dec 6 11:36:04 2018 +0100 net: dsa: Add overhead to tag protocol ops. Each DSA tag protocol needs to add additional headers to the Ethernet frame in order to direct it towards a specific switch egress port. It must also remove the head from a frame received from a switch. Indicate the maximum size of these headers in the tag protocol ops structure, so the core can take these overheads into account. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5c327f673d2f134ac01c068b511c6ab816b4b41c Author: Li RongQing Date: Thu Dec 6 16:28:11 2018 +0800 tun: remove unnecessary check in tun_flow_update caller has guaranted that rxhash is not zero Signed-off-by: Li RongQing Acked-by: Jason Wang Signed-off-by: David S. Miller commit 194276b073a10f04b420484bd81fa4dbb3ae0e1e Author: Rob Herring Date: Wed Dec 5 13:50:41 2018 -0600 spi: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Signed-off-by: Rob Herring Signed-off-by: Mark Brown commit 83b1bc122cab87547731a154db5feec5b9d4807c Author: Li RongQing Date: Thu Dec 6 16:08:17 2018 +0800 tun: align write-heavy flow entry members to a cache line tun flow entry 'updated' fields are written when receive every packet. Thus if a flow is receiving packets from a particular flow entry, it'll cause false-sharing with all the other who has looked it up, so move it in its own cache line and update 'queue_index' and 'update' field only when they are changed to reduce the cache false-sharing. Signed-off-by: Zhang Yu Signed-off-by: Wang Li Signed-off-by: Li RongQing Acked-by: Jason Wang Signed-off-by: David S. Miller commit a01b8d1d24451bfc00d3a975d107f9b1590bf826 Author: Hui Wang Date: Thu Dec 6 22:52:05 2018 +0800 ASoC: rt5660: Add a new ACPI match ID The Realtek codec ALC3277 is 100% compatible with the codec RT5660 in I2S mode. And on the Dell IoT platform, the codec is ALC3277, and the HID of the codec in the BIOS is 10EC3277, so adding this ID to the ACPI match table. Signed-off-by: Hui Wang Signed-off-by: Mark Brown commit 7fc4650cc2417d7a2907a000f6f88240baa42018 Author: Geert Uytterhoeven Date: Wed Dec 5 16:39:45 2018 +0100 soc: renesas: rcar-sysc: Fix power domain control after system resume To control power to a power domain, the System Controller (SYSC) needs the corresponding interrupt source to be enabled, but masked, to prevent the CPU from receiving it. Currently this is handled in the driver's probe() routine, and set up for every domain present, even if it will not be controlled directly by SYSC (CPU domains are powered through the APMU on R-Car Gen2 and later). On R-Car Gen3, PSCI powers down the SoC during system suspend, thus losing any configured interrupt state. Hence after system resume, power domains not controlled through the APMU (e.g. A3IR, A3VC, A3VP) fail to power up. Fix this by replacing the global interrupt setup in the probe() routine by a domain-specific interrupt setup in rcar_sysc_power(), where the domain's power is actually controlled. This brings the code more in line with the flowchart in the Hardware User's Manual. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 1585124d9563da64f481dc0e7c568c344002bc13 Author: Geert Uytterhoeven Date: Wed Dec 5 16:39:44 2018 +0100 soc: renesas: rcar-sysc: Merge PM Domain registration and linking Commit 977d5ba4507dfe5b ("soc: renesas: rcar-sysc: Make PM domain initialization more robust") split PM Domain registration and the linking of children to their parents, to accommodate PM Domain tables that list child domains before their parents. However, this failed to realize that parent power domains must be powered up before their children anyway, and that this thus must be reflected by the order in the PM Domain tables. Revert the split, as it did not help anyway. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 319c84090696517f377a80225534677adf192e92 Author: Geert Uytterhoeven Date: Wed Dec 5 16:39:43 2018 +0100 soc: renesas: rcar-sysc: Remove rcar_sysc_power_{down,up}() helpers Until commit 7e8a50df26f4e700 ("soc: renesas: rcar-sysc: Drop legacy handling"), the rcar_sysc_power_{down,up}() helpers were public, as they were called by the legacy (pre-DT) CPU power management code on R-Car H1 and R-Car Gen2 before. As they are just one-line wrappers around rcar_sysc_power(), it makes sense to just remove them. This also avoids a bool/helper/bool conversion in rcar_sysc_power_cpu(), where a bool is checked to call one of two helper functions, which just call rcar_sysc_power() with hardcoded boolean values again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b0d7fbf8b174168c580bb310964c3c809e5569a9 Author: Geert Uytterhoeven Date: Wed Dec 5 16:39:42 2018 +0100 soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} The workaround for the wrong hierarchy of the 3DG-{A,B} power domains on R-Car E3 ES1.0 corrected the parent domains. However, the 3DG-{A,B} power domains were still initialized and powered in the wrong order, causing 3DG operation to fail. Fix this by changing the order in the table at runtime, when running on an affected SoC. Fixes: 086b399965a7ee7e ("soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B}") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d8f2c8592b95fd1fb06f0fea19738bf447bbc5f2 Author: Daniel Mack Date: Thu Dec 6 13:24:57 2018 +0100 ASoC: codecs: ak4104: move to GPIO consumer API Get the reset GPIO through the GPIO consumer API. This allows specifying the DT property as "reset-gpios" without breaking existing DT users. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit db097f95b4b81c5371928449706fabfa576cd65c Author: Daniel Mack Date: Thu Dec 6 13:24:56 2018 +0100 ASoC: dt-bindings: ak4104: use 'reset-gpios' rather than 'reset-gpio' Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to switch to the gpiod consume API to handle this correctly. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit f98acd8a3115e1de780083ced42039522075d155 Author: Daniel Mack Date: Thu Dec 6 13:24:26 2018 +0100 ASoC: codecs: cs4270: move to GPIO consumer API Get the reset GPIO through the GPIO consumer API. This allows specifying the DT property as "reset-gpios" without breaking existing DT users. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit eab8e354a8c7b4496cb68a6f5adc5ec3a1f59151 Author: Daniel Mack Date: Thu Dec 6 13:24:25 2018 +0100 ASoC: dt-bindings: cs4270: use 'reset-gpios' rather than 'reset-gpio' Bindings should use 'reset-gpios', not 'reset-gpio'. The driver needs to switch to the gpiod consume API to handle this correctly. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit c32569e358adea225f053ef9d97a4c8c18be8743 Author: Rob Herring Date: Wed Dec 5 13:50:37 2018 -0600 regulator: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Liam Girdwood Cc: Mark Brown Cc: Support Opensource Cc: Sangbeom Kim Cc: Krzysztof Kozlowski Cc: Bartlomiej Zolnierkiewicz Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Adam Thomson Signed-off-by: Mark Brown commit 74791d15fd7c405511e3cc097c2f043171ecbdb0 Author: Rob Herring Date: Mon Dec 3 15:32:14 2018 -0600 dt-bindings: arm: renesas: Move 'renesas,prr' binding to its own doc In preparation to convert board-level bindings to json-schema, move various misc SoC bindings out to their own file. Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit ea456bf918e31a0f755c5c02963b4e10513fa82c Author: Biju Das Date: Wed Sep 26 11:44:46 2018 +0100 dt-bindings: arm: renesas: Document iW-RainboW-G20D-Qseven-RZG1N board Document the iW-RainboW-G20D-Qseven-RZG1N device tree bindings, listing it as a supported board. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Signed-off-by: Simon Horman commit 1deb430d291270f9d0067061a5dc7409819dfcfb Author: Biju Das Date: Wed Sep 26 09:21:44 2018 +0100 dt-bindings: arm: renesas: Document iWave RZ/G1N SOM Document the iW-RainboW-G20M-RZ/G1N Qseven device tree bindings, listing it as a supported system on module. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 57b13b8b34002ce8f1d822ea05f0a84e5bc3a64a Author: Andrzej Hajda Date: Thu Dec 6 15:16:35 2018 +0100 ARM: dts: exynos: remove display-port node from Arndale Arndale boards have wires for DSI and eDP panels, but in-kernel support for eDP panels is broken for long time and breaks display support even on boards with DSI panels. Signed-off-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski commit 193b4d45c29c9bac43ac888702924bea8d127763 Author: Marek Szyprowski Date: Tue Dec 4 10:22:58 2018 +0100 ARM: exynos_defconfig: Add MAX8998 RTC and charger drivers Add RTC and charger drivers for MAX8998 chip used on Samsung UniversalC210 board. Signed-off-by: Marek Szyprowski Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski commit 8589a649d5f9495a5ae8375c1a96c7281cfd1206 Author: Krishna Reddy Date: Tue Oct 16 19:06:48 2018 -0700 arm64: dts: tegra186: Enable IOMMU for SDHCI Enable IOMMU for all SDHCI controllers in Tegra186. Signed-off-by: Krishna Reddy Signed-off-by: Thierry Reding commit caa7a8e3c312b20eb66fe4924900a951c45df52e Author: Thierry Reding Date: Thu Dec 6 17:50:22 2018 +0100 arm64: tegra: Enable HDA controller on Jetson TX1 The HDA controller can be used for audio playback over HDMI. Signed-off-by: Thierry Reding commit badb80bed041362f8977fe2990f65a96c2c9b381 Author: Thierry Reding Date: Thu Dec 6 17:50:21 2018 +0100 arm64: tegra: Add CEC controller on Tegra194 The CEC controller found on Tegra194 can be used to control consumer devices using the HDMI CEC pin. Signed-off-by: Thierry Reding commit 01e13ae3b5f5fce8a35e492535d1a77fe1e010ba Author: Thierry Reding Date: Thu Dec 6 17:50:20 2018 +0100 arm64: tegra: Enable HDA on Jetson Xavier Enable the HDA controller on Jetson Xavier so that it can be used for audio playback over HDMI. Signed-off-by: Thierry Reding commit 4878cc0c9fab0c8bcf3501252139fd32689302bf Author: Sameer Pujar Date: Tue Dec 4 17:44:22 2018 +0530 arm64: tegra: Add HDA controller on Tegra194 The HDA controller found on Tegra194 can be used for audio playback over HDMI. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding commit 97cf683c123d49cfdb2d19ea5dca99b590f5650f Author: Thierry Reding Date: Thu Dec 6 17:50:18 2018 +0100 arm64: tegra: Add CEC controller on Tegra186 The CEC controller found on Tegra186 can be used to control consumer devices using the HDMI CEC pin. Signed-off-by: Thierry Reding commit 7c3adf1243cc31327713c20bc162ee99cf0ed237 Author: Thierry Reding Date: Thu Dec 6 17:50:17 2018 +0100 arm64: tegra: Enable HDA on Jetson TX2 Enable the HDA controller on Jetson TX2 so that it can be used for audio playback over HDMI. Signed-off-by: Thierry Reding commit b066a31040b74ea71704211b52307c7e113992f4 Author: Thierry Reding Date: Thu Dec 6 17:50:16 2018 +0100 arm64: tegra: Add HDA controller on Tegra186 The HDA controller found on Tegra186 can be used for audio playback over HDMI. Signed-off-by: Thierry Reding commit 180b46ecdc9f7762aba65c0b029f59c7a6b314fd Author: Thierry Reding Date: Thu Dec 6 18:56:47 2018 +0100 drm/tegra: sor: Reset the SOR if possible If the SOR is already up and running when the kernel driver is probed, setting a mode will typically fail. This can be seen for example on Jetson TX2. Under certain circumstances the generic power domain code will cause the SOR to be reset. However, if the power domain is never powered off (this can happen if the HDA controller is enabled, which is part of the same power domain as the SOR), then the SOR will end up not getting reset and fail to properly set a mode. To work around this, try to get the reset control and assert/deassert it, irrespective of whether or not a generic power domain is attached to the SOR. On platforms where the kernel implements generic power domains (up to Tegra210) this will fail, because the power domain will already have acquired an exclusive reference to the reset control. But on recent platforms there the BPMP provides an ABI to control power domains, it's possible to acquire the reset control from SOR and use it to put the SOR into a known good state at probe time. The proper solution for this is to make the SOR driver capable of dealing with hardware that's already up and running (by first grace- fully shutting it down, or perhaps by seamlessly transitioning to the kernel driver and taking over the running display configuration). That is fairly involved, though, so we'll go with this quickfix for now. Signed-off-by: Thierry Reding commit 016a48b3d66e94c99253b79ca16ac656a9de5740 Author: Thierry Reding Date: Thu Dec 6 18:57:41 2018 +0100 drm/tegra: sor: Remove temporary workaround Remove the temporary workaround of storing the Tegra186 HDMI/DP I/O pad ID in the SOR driver. The definition has long been available in the soc/tegra/pmc.h header file. Signed-off-by: Thierry Reding commit f77af637f29da49193283e883a9b18406fb45d3d Author: Federico Vaga Date: Wed Nov 21 01:35:19 2018 +0100 doc:process: add links where missing Some documents are refering to others without links. With this patch I add those missing links. This patch affects only documents under process/ and labels where necessary. Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet commit 2f7e6f6bf0d5fda265e403423921588cda7ce16e Author: Mike Rapoport Date: Wed Nov 28 16:45:44 2018 +0200 docs/core-api: make mm-api.rst more structured The mm-api.rst covers variety of memory management APIs under "More Memory Management Functions" section. The descriptions included there are in a random order there are quite a few of them which makes the section too long. Regrouping the documentation by subject and splitting the long "More Memory Management Functions" section into several smaller sections makes the generated html more usable. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit c5ed311b4e31a5287e068edc7b6d4c18b8acb3c4 Author: Michael S. Tsirkin Date: Fri Nov 30 09:22:17 2018 -0500 x86, boot: documentation whitespace fixup Fix an extra space that sneaked in with commit 09c205afd "(x86, boot: Define the 2.12 bzImage boot protocol"). Signed-off-by: Michael S. Tsirkin Signed-off-by: Jonathan Corbet commit 41c31f6a5945a4b005302e01d47c97bcf5d604ac Author: Nicholas Mc Guire Date: Sat Dec 1 13:44:29 2018 +0100 Documentation: devres: note checking needs when converting There are a number of cases where conversions to devm_* API have been done but developers forgot that this conversion may imply that return values need to be checked for failure of internal resource handling like allocation. While this should be clear, it does seem to be a relatively common issue with API conversions or maybe "managed" is being misunderstood ? So add a note to make the scope of "managed" clear. Signed-off-by: Nicholas Mc Guire Signed-off-by: Jonathan Corbet commit c56afc1844d6a8a050d73eda1a59d286e1d5bc04 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:19 2018 +0800 rtc: sun6i: Expose internal oscillator through device tree The bindings have been updated to expose the RTC's internal oscillator, for some SoCs that have it directly feeding the PRCM block. The changes include the index 2 for the clock outputs, as well as the clock output names. This patch adds the internal oscillator to the list of clocks exposed through of_clk_add_hw_provider(), and also have the driver optionally fetch the name of the clock from the device tree if it's available. Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Alexandre Belloni commit 7cd1acaeea4e72e2926c23ac8db5ab376b2819a4 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:18 2018 +0800 rtc: sun6i: Add support for all known pre-H6 variants There are different variants to the RTC hardware first seen on sun6i (A31). The differences we care about in this driver are the clock rate for the internal oscillator, prescalers, and the presence of an external clock output. This patch adds support for all the known pre-H6 base compatibles using the variants data structure previously introduced. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit 403a3c3dd0ec93c2504b94667d16485729fc0393 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:17 2018 +0800 rtc: sun6i: Add support for different variants Amongst the Allwinner SoCs that have seen some kind of coverage by the linux-sunxi community, whether it be mainline Linux or U-boot support, or just available datasheets, most newer chips use the RTC design first seen in the A31 (sun6i). Overall there have been some minor differences. This patch covers the following: - average clock rate of the internal RC oscillator + presence of fixed and adjustable prescaler for this clock - availability of an external (to the SoC) clock output One major difference regarding the H6 is the 24 MHz crystal is now routed through the RTC, as a digitally compensated oscillator (DCXO). This is not covered in this patch and will be supported later. Other differences are either unrelated to RTC or clock functionality, such as boot or crypto related registers, or the driver simply doesn't use the feature in question. One example of the latter is the calibration function for the RC oscillator. We consider this clock to be very bad and avoid using it. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit 459b6ea00acccaac9cd25ba12d55b5fe7d8583df Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:16 2018 +0800 rtc: sun6i: Add default clock name for LOSC The RTC's main clock, used internally and exported to the rest of the SoC, is called "LOSC" (low speed oscillator) through the hardware documentation. This patch adds a default name for this clock, in case the device tree does not provide one. This shouldn't happen, but lets play it safe. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit 9cd3558678385329709b6d52f639d1f918e04aae Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:15 2018 +0800 dt-bindings: rtc: sun6i-rtc: Export internal RC oscillator Experiments showed that on at least the H3/H5/A64 the RTC's internal oscillator also feeds the CPUS mux in the PRCM. Export this clock through the device tree, instead of having to use a dummy fixed-clock device node, for the PRCM to consume. This will properly describe the relationship between the clocks. Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Alexandre Belloni commit 5a0923aad7d466b683e52b766290dcdc02453e1b Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:14 2018 +0800 dt-bindings: rtc: sun6i-rtc: Deprecate external clock output for A31 The A31 does not have an external clock output directly from the RTC. Instead, it has four muxable clock outputs: three (A, B, C) are controlled from the CCU, and the last (D) is controlled from the PRCM. Deprecate the usage of the external clock output for the A31 compatible. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit 347d3570300ee961a5b51a02473761262b06980f Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:13 2018 +0800 dt-bindings: rtc: sun6i-rtc: Add compatible strings for pre-H6 variants While doing Bluetooth enablement for various boards based on various Allwinner SoCs, minor differences in the RTC modules were found. These include a lack of an external clock output (A31), different internal oscillator frequencies (H3/H5/A64/V3/V3s), different regulator voltage settings (H5/H6), and the presence of miscellaneous registers unrelated to the RTC (A64/R40/H5/H6). The datasheet also describes different number of registers for non-volatile storage, though based on actual experiments the actual number is the same across the board. This patch adds a list of all pre-H6 variants, grouped by the internal oscillator's clock rate, regulator settings, and the presence of the external clock output. Combinations are introduced for the variants that have miscellaneous registers. The RTC block in the H6 also handles the 24 MHz DCXO. This will require more device tree binding changes and will be done later. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit 9ca22651e134c5d33b8776b63bf7384f8686b5f6 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:12 2018 +0800 dt-bindings: rtc: sun6i-rtc: Rewrite clock outputs as a list The clock output section for this binding describes the two outputs in the descriptions for both the #clock-cells and clock-output-names properties. Instead of overlapping information that is hard to read, rewrite the clock outputs as a list of indices and descriptions. The properies can reference this list instead. This will also make it easier to add notes or conditions to the clocks, and also for adding new outputs. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni commit fdf0345e59f9c0fe02ceae580f04c4f22e10eb0d Author: Federico Vaga Date: Sun Dec 2 18:40:10 2018 +0100 doc:it: add some process/* translations Translated documents: - 2.Process - 3.Early-stage - 4.Coding - 5.Posting - 6.Followthrough - 7.AdvancedTopics - 8.Conclusion - adding-syscalls Signed-off-by: Federico Vaga Signed-off-by: Alessia Mantegazza Signed-off-by: Jonathan Corbet commit a4a2bf0e246efbac9691834adac75b89e181607e Author: Federico Vaga Date: Sun Dec 2 18:40:09 2018 +0100 doc:it: fixes in process/1.Intro - fix broken links and some - fix some grammar errors Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet commit 7bbfd9ad8eb24e6683f7a0467edfcff6c189d492 Author: NeilBrown Date: Wed Dec 5 10:02:51 2018 +1100 Documentation: convert path-lookup from markdown to resturctured text This allows the document to be integrated with the main documentation tree. Changes include: - rename from .md to .rst - use `` for code, not single ` - use correct sub-section marking - fix indented blocks, both code and non-code - fix external-link markup Signed-off-by: NeilBrown [jc: changed the toctree organization a bit] Signed-off-by: Jonathan Corbet commit a21b0b78eaf770c6c3814dd59d213cd6aa47eecd Author: Allen Pais Date: Tue Oct 23 06:36:57 2018 +0530 arm64: hugetlb: Register hugepages during arch init Add hstate for each supported hugepage size using arch initcall. * no hugepage parameters Without hugepage parameters, only a default hugepage size is available for dynamic allocation. It's different, for example, from x86_64 and sparc64 where all supported hugepage sizes are available. * only default_hugepagesz= is specified and set not to HPAGE_SIZE In spite of the fact that default_hugepagesz= is set to a valid hugepage size, it's treated as unsupported and reverted to HPAGE_SIZE. Such behaviour is also different from x86_64 and sparc64. Acked-by: Steve Capper Reviewed-by: Tom Saeger Signed-off-by: Dmitry Klochkov Signed-off-by: Allen Pais Signed-off-by: Will Deacon commit 036c20c06e43679a006e1cf932ce8284f4b39b42 Author: Alexey Budankov Date: Tue Nov 27 11:16:29 2018 +0300 Documentation/admin-guide: update admin-guide index.rst Extend index.rst index file at admin-guide root directory with the reference to perf-security.rst file being introduced. Signed-off-by: Alexey Budankov Signed-off-by: Jonathan Corbet commit 76e7fd843ebb4bc36cf56424e8a5db6631cd3a61 Author: Alexey Budankov Date: Tue Nov 27 11:15:37 2018 +0300 Documentation/admin-guide: introduce perf-security.rst file Implement initial version of perf-security.rst documentation file covering security concerns of perf_event_paranoid settings. Suggested-by: Thomas Gleixner Signed-off-by: Alexey Budankov Reviewed-by: Kees Cook Signed-off-by: Jonathan Corbet commit cc9f8349cb33965120a96c12e05d00676162eb7f Author: Jackie Liu Date: Tue Dec 4 09:43:23 2018 +0800 arm64: crypto: add NEON accelerated XOR implementation This is a NEON acceleration method that can improve performance by approximately 20%. I got the following data from the centos 7.5 on Huawei's HISI1616 chip: [ 93.837726] xor: measuring software checksum speed [ 93.874039] 8regs : 7123.200 MB/sec [ 93.914038] 32regs : 7180.300 MB/sec [ 93.954043] arm64_neon: 9856.000 MB/sec [ 93.954047] xor: using function: arm64_neon (9856.000 MB/sec) I believe this code can bring some optimization for all arm64 platform. thanks for Ard Biesheuvel's suggestions. Signed-off-by: Jackie Liu Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 21e28547f613e7ba4f4cb6831a3ead2d723fdf7b Author: Jackie Liu Date: Tue Dec 4 09:43:22 2018 +0800 arm64/neon: add workaround for ambiguous C99 stdint.h types In a way similar to ARM commit 09096f6a0ee2 ("ARM: 7822/1: add workaround for ambiguous C99 stdint.h types"), this patch redefines the macros that are used in stdint.h so its definitions of uint64_t and int64_t are compatible with those of the kernel. This patch comes from: https://patchwork.kernel.org/patch/3540001/ Wrote by: Ard Biesheuvel We mark this file as a private file and don't have to override asm/types.h Signed-off-by: Jackie Liu Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 8cb3451b1f240ec4d36a9bfcd39cb6d59769a5b3 Author: Will Deacon Date: Tue Jun 19 14:08:24 2018 +0100 arm64: entry: Remove confusing comment The comment about SYS_MEMBARRIER_SYNC_CORE relying on ERET being context-synchronizing is confusing and misplaced with kpti. Given that this is already documented under Documentation/ (see arch-support.txt for membarrier), remove the comment altogether. Signed-off-by: Will Deacon commit 679db70801da9fda91d26caf13bf5b5ccc74e8e8 Author: Will Deacon Date: Thu Jun 14 11:23:38 2018 +0100 arm64: entry: Place an SB sequence following an ERET instruction Some CPUs can speculate past an ERET instruction and potentially perform speculative accesses to memory before processing the exception return. Since the register state is often controlled by a lower privilege level at the point of an ERET, this could potentially be used as part of a side-channel attack. This patch emits an SB sequence after each ERET so that speculation is held up on exception return. Signed-off-by: Will Deacon commit bd4fb6d270bc423a9a4098108784f7f9254c4e6d Author: Will Deacon Date: Thu Jun 14 11:21:34 2018 +0100 arm64: Add support for SB barrier and patch in over DSB; ISB sequences We currently use a DSB; ISB sequence to inhibit speculation in set_fs(). Whilst this works for current CPUs, future CPUs may implement a new SB barrier instruction which acts as an architected speculation barrier. On CPUs that support it, patch in an SB; NOP sequence over the DSB; ISB sequence and advertise the presence of the new instruction to userspace. Signed-off-by: Will Deacon commit 7a35397f8c06bffd4c747537095321ff971045a5 Author: Deepa Dinamani Date: Wed Sep 19 21:41:08 2018 -0700 io_pgetevents: use __kernel_timespec struct timespec is not y2038 safe. struct __kernel_timespec is the new y2038 safe structure for all syscalls that are using struct timespec. Update io_pgetevents interfaces to use struct __kernel_timespec. sigset_t also has different representations on 32 bit and 64 bit architectures. Hence, we need to support the following different syscalls: New y2038 safe syscalls: (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs) Native 64 bit(unchanged) and native 32 bit : sys_io_pgetevents Compat : compat_sys_io_pgetevents_time64 Older y2038 unsafe syscalls: (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs) Native 32 bit : sys_io_pgetevents_time32 Compat : compat_sys_io_pgetevents Note that io_getevents syscalls do not have a y2038 safe solution. Signed-off-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit e024707bccae15abd493265ea0b72f46a4920727 Author: Deepa Dinamani Date: Wed Sep 19 21:41:07 2018 -0700 pselect6: use __kernel_timespec struct timespec is not y2038 safe. struct __kernel_timespec is the new y2038 safe structure for all syscalls that are using struct timespec. Update pselect interfaces to use struct __kernel_timespec. sigset_t also has different representations on 32 bit and 64 bit architectures. Hence, we need to support the following different syscalls: New y2038 safe syscalls: (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs) Native 64 bit(unchanged) and native 32 bit : sys_pselect6 Compat : compat_sys_pselect6_time64 Older y2038 unsafe syscalls: (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs) Native 32 bit : pselect6_time32 Compat : compat_sys_pselect6 Note that all other versions of select syscalls will not have y2038 safe versions. Signed-off-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 8bd27a3004e80d3d0962534c97e5a841262d5093 Author: Deepa Dinamani Date: Wed Sep 19 21:41:06 2018 -0700 ppoll: use __kernel_timespec struct timespec is not y2038 safe. struct __kernel_timespec is the new y2038 safe structure for all syscalls that are using struct timespec. Update ppoll interfaces to use struct __kernel_timespec. sigset_t also has different representations on 32 bit and 64 bit architectures. Hence, we need to support the following different syscalls: New y2038 safe syscalls: (Controlled by CONFIG_64BIT_TIME for 32 bit ABIs) Native 64 bit(unchanged) and native 32 bit : sys_ppoll Compat : compat_sys_ppoll_time64 Older y2038 unsafe syscalls: (Controlled by CONFIG_32BIT_COMPAT_TIME for 32 bit ABIs) Native 32 bit : ppoll_time32 Compat : compat_sys_ppoll Signed-off-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 854a6ed56839a40f6b5d02a2962f48841482eec4 Author: Deepa Dinamani Date: Wed Sep 19 21:41:05 2018 -0700 signal: Add restore_user_sigmask() Refactor the logic to restore the sigmask before the syscall returns into an api. This is useful for versions of syscalls that pass in the sigmask and expect the current->sigmask to be changed during the execution and restored after the execution of the syscall. With the advent of new y2038 syscalls in the subsequent patches, we add two more new versions of the syscalls (for pselect, ppoll and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Signed-off-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit ded653ccbec0335a78fa7a7aff3ec9870349fafb Author: Deepa Dinamani Date: Wed Sep 19 21:41:04 2018 -0700 signal: Add set_user_sigmask() Refactor reading sigset from userspace and updating sigmask into an api. This is useful for versions of syscalls that pass in the sigmask and expect the current->sigmask to be changed during, and restored after, the execution of the syscall. With the advent of new y2038 syscalls in the subsequent patches, we add two more new versions of the syscalls (for pselect, ppoll, and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Note that the calls to sigprocmask() ignored the return value from the api as the function only returns an error on an invalid first argument that is hardcoded at these call sites. The updated logic uses set_current_blocked() instead. Signed-off-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 9d3b5086f6d42e358f491e5d841750587f3d8cf3 Author: Linus Walleij Date: Tue Nov 27 21:53:58 2018 +0100 mtd: physmap_of_gemini: Handle pin control This enables the complex mapping for the Gemini and kicks in custom read/write functions that will wrap the existing simple functions in calls to enable/disable the parallel flash pins using pin controls. This is necessary on some hardware such as the D-Link DIR-685 where all flash pins are patched in/out at the same time, but some of the flash pins are in practice unused by the flash and have anyway been reused as GPIO. This concerns specifically CE1 on the Gemini. There is only one flash chip, so only CE0 is used, and the line for CE1 has been reused as chip select for the emulated SPI port connected to the display. If we try to use the same lines for flash and GPIO at the same time, one of them will loose: the GPIO line will disappear because it gets disconnected from the pin when the flash group is muxed out. Fix this by introducing two pin control states named simply "enabled" and "disabled" and only enable the flash lines when absolutely necessary (during read/write/copy). This way, they are available for GPIO at all other times and the display works. Collect all the state variables in a struct named struct gemini_flash and allocate this struct at probe time. Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon commit b3dd93030c3cdd3f191aa170ccafc2b4d316f4cc Author: Linus Walleij Date: Tue Nov 27 21:53:57 2018 +0100 mtd: maps: physmap: Leave assigned complex mappings SoC-specific drivers might provide their own map->xxx() implementations, and calling simple_map_init() unconditionally will override those implementations. Make sure map->read is NULL before calling simple_map_init(). Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon commit 121ca8e56551e4c52fdb37e8771eddc9ef44c880 Author: Will Deacon Date: Thu Dec 6 15:02:45 2018 +0000 arm64: kexec_file: Refactor setup_dtb() to consolidate error checking setup_dtb() is a little difficult to read. This is largely because it duplicates the FDT -> Linux errno conversion for every intermediate return value, but also because of silly cosmetic things like naming and formatting. Given that this is all brand new, refactor the function to get us off on the right foot. Signed-off-by: Will Deacon commit 884143f60c89acf8f2d06de4113d5e3057791701 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:55 2018 +0900 arm64: kexec_file: add kaslr support Adding "kaslr-seed" to dtb enables triggering kaslr, or kernel virtual address randomization, at secondary kernel boot. We always do this as it will have no harm on kaslr-incapable kernel. We don't have any "switch" to turn off this feature directly, but still can suppress it by passing "nokaslr" as a kernel boot argument. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon [will: Use rng_is_initialized()] Signed-off-by: Will Deacon commit 732b7b93d849f8a44886ead563dfb6adec7f4419 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:54 2018 +0900 arm64: kexec_file: add kernel signature verification support With this patch, kernel verification can be done without IMA security subsystem enabled. Turn on CONFIG_KEXEC_VERIFY_SIG instead. On x86, a signature is embedded into a PE file (Microsoft's format) header of binary. Since arm64's "Image" can also be seen as a PE file as far as CONFIG_EFI is enabled, we adopt this format for kernel signing. You can create a signed kernel image with: $ sbsign --key ${KEY} --cert ${CERT} Image Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse [will: removed useless pr_debug()] Signed-off-by: Will Deacon commit 7eb2a0438262ece07e57a371de0c88dc50bf8556 Author: Aaro Koskinen Date: Thu Dec 6 00:31:39 2018 +0200 staging: octeon-ethernet: delete redundant include cvmx-smix-defs.h is not needed by this driver. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman commit 0b587c84e42151fc5a636c7cebf7b03b281dc672 Author: Suzuki K Poulose Date: Fri Nov 30 17:18:06 2018 +0000 arm64: capabilities: Batch cpu_enable callbacks We use a stop_machine call for each available capability to enable it on all the CPUs available at boot time. Instead we could batch the cpu_enable callbacks to a single stop_machine() call to save us some time. Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 606f8e7b27bfe30376348f8bc09cba17626dc24c Author: Suzuki K Poulose Date: Fri Nov 30 17:18:05 2018 +0000 arm64: capabilities: Use linear array for detection and verification Use the sorted list of capability entries for the detection and verification. Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit f7bfc14a0819962bc0767f33ce17d4b366b46dd6 Author: Suzuki K Poulose Date: Fri Nov 30 17:18:04 2018 +0000 arm64: capabilities: Optimize this_cpu_has_cap Make use of the sorted capability list to access the capability entry in this_cpu_has_cap() to avoid iterating over the two tables. Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 82a3a21b236f96f84b715c46ac1b2a669da8916f Author: Suzuki K Poulose Date: Fri Nov 30 17:18:03 2018 +0000 arm64: capabilities: Speed up capability lookup We maintain two separate tables of capabilities, errata and features, which decide the system capabilities. We iterate over each of these tables for various operations (e.g, detection, verification etc.). We do not have a way to map a system "capability" to its entry, (i.e, cap -> struct arm64_cpu_capabilities) which is needed for this_cpu_has_cap(). So we iterate over the table one by one to find the entry and then do the operation. Also, this prevents us from optimizing the way we "enable" the capabilities on the CPUs, where we now issue a stop_machine() for each available capability. One solution is to merge the two tables into a single table, sorted by the capability. But this is has the following disadvantages: - We loose the "classification" of an errata vs. feature - It is quite easy to make a mistake when adding an entry, unless we sort the table at runtime. So we maintain a list of pointers to the capability entry, sorted by the "cap number" in a separate array, initialized at boot time. The only restriction is that we can have one "entry" per capability. While at it, remove the duplicate declaration of arm64_errata table. Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 83cbfb6bbafdee2e92e280cada91c044ab6d1359 Author: Michael Straube Date: Wed Dec 5 19:31:00 2018 +0100 staging: rtl8188eu: remove unused code in rtw_cmd.c Remove unused/commented code in rtw_cmd.c. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 747c615edd77b9b8b920c51a4969ac830314088a Author: Michael Straube Date: Wed Dec 5 19:30:59 2018 +0100 staging: rtl8188eu: rename struct field Wifi_Error_Status Rename struct field Wifi_Error_Status to avoid CamelCase. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 4fea3f99b54aef2814e48ea0ff6bff37ea156727 Author: Michael Straube Date: Wed Dec 5 19:30:58 2018 +0100 staging: rtl8188eu: replace if else with ternary operator Replace if else with a single call and ternary operator to slightly reduce object file size. Also clears a checkpatch warning: WARNING: Statements should start on a tabstop Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d5fa6721f671a03d9d649e82395771229f20a9e6 Author: Michael Straube Date: Wed Dec 5 19:30:57 2018 +0100 staging: rtl8188eu: write out multiplying in wifirate2_ratetbl_inx() Write out multiplying in wifirate2_ratetbl_inx() to improve readabilitiy and clear checkpatch issues with missing spaces around '*' operator. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 497d6a74413db0341901ab3ba02a31a8446d4819 Author: Michael Straube Date: Wed Dec 5 19:30:56 2018 +0100 staging: rtl8188eu: add spaces around operators in rtw_wlan_util.c Add spaces around '+', '-', '&' and '>>' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3a3b5defd3f9211dd52bbc980b03bf86351741c5 Author: Michael Straube Date: Wed Dec 5 19:30:55 2018 +0100 staging: rtl8188eu: cleanup long lines in rtw_wlan_util.c Cleanup some lines over 80 characters by adding appropriate line breaks and removing commented code. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 54b48fda9cb8c25bd8d02da68b036fc7bff8ee3c Author: Michael Straube Date: Wed Dec 5 19:30:54 2018 +0100 staging: rtl8188eu: cleanup block comment in rtw_wlan_util.c Cleanup a block comment to clear a checkpatch warning. WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e2307b086ce323670929a8cf6d17edb141cabc5f Author: Michael Straube Date: Wed Dec 5 19:30:53 2018 +0100 staging: rtl8188eu: cleanup declarations in rtw_wlan_util.c Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Remove unused/commented declarations. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a2871106b5972f0021d3276d474a8c7ef2ff7a28 Author: Michael Straube Date: Wed Dec 5 19:30:52 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtw_wlan_util.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3499477cd9bf14eaa83e6601092f01d3e32d880f Author: Michael Straube Date: Wed Dec 5 19:30:51 2018 +0100 staging: rtl8188eu: simplify array initializations Simplfy initialization of arrays with zero only values to improve readability and save a line. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c61583b16298b8dcc83c7e30774bac6bd7623ecb Author: Michael Straube Date: Wed Dec 5 19:30:50 2018 +0100 staging: rtl8188eu: refactor cckratesonly_included() Refactor cckratesonly_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3101957f4a108a4abdce99c3ccb4f54b84605f49 Author: Michael Straube Date: Wed Dec 5 19:30:49 2018 +0100 staging: rtl8188eu: refactor cckrates_included() Refactor cckrates_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3c49898715357d66237301abf80d77b7f2612c28 Author: Gao Xiang Date: Wed Dec 5 21:23:14 2018 +0800 staging: erofs: update erofs-utils information in TODO erofs-utils was released by the original author Li Guifu weeks ago in the linux-erofs mailing list [1], update information in TODO and let's wait the original author finish all open source works. [1] https://lists.ozlabs.org/pipermail/linux-erofs/2018-November/001004.html Cc: Li Guifu Cc: Fang Wei Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 8b987bca2d09649683cbe496419a011df8c08493 Author: Gao Xiang Date: Wed Dec 5 21:23:13 2018 +0800 staging: erofs: {dir,inode,super}.c: rectify BUG_ONs remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs. Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit df44b479654f62b478c18ee4d8bc4e9f897a9844 Author: Peter Rajnoha Date: Wed Dec 5 12:27:44 2018 +0100 kobject: return error code if writing /sys/.../uevent fails Propagate error code back to userspace if writing the /sys/.../uevent file fails. Before, the write operation always returned with success, even if we failed to recognize the input string or if we failed to generate the uevent itself. With the error codes properly propagated back to userspace, we are able to react in userspace accordingly by not assuming and awaiting a uevent that is not delivered. Signed-off-by: Peter Rajnoha Signed-off-by: Greg Kroah-Hartman commit 7c703e54cc71df5baa962e24a5663d88173bba5c Author: Christoph Hellwig Date: Fri Nov 9 09:51:00 2018 +0100 arch: switch the default on ARCH_HAS_SG_CHAIN These days architectures are mostly out of the business of dealing with struct scatterlist at all, unless they have architecture specific iommu drivers. Replace the ARCH_HAS_SG_CHAIN symbol with a ARCH_NO_SG_CHAIN one only enabled for architectures with horrible legacy iommu drivers like alpha and parisc, and conditionally for arm which wants to keep it disable for legacy platforms. Signed-off-by: Christoph Hellwig Reviewed-by: Palmer Dabbelt commit c37d721c68ad88925ba0e72f6e14acb829a8c6bb Author: Alexander Duyck Date: Wed Nov 28 16:32:11 2018 -0800 driver core: Move async_synchronize_full call Move the async_synchronize_full call out of __device_release_driver and into driver_detach. The idea behind this is that the async_synchronize_full call will only guarantee that any existing async operations are flushed. This doesn't do anything to guarantee that a hotplug event that may occur while we are doing the release of the driver will not be asynchronously scheduled. By moving this into the driver_detach path we can avoid potential deadlocks as we aren't holding the device lock at this point and we should not have the driver we want to flush loaded so the flush will take care of any asynchronous events the driver we are detaching might have scheduled. Fixes: 765230b5f084 ("driver-core: add asynchronous probing support for drivers") Reviewed-by: Bart Van Assche Reviewed-by: Dan Williams Signed-off-by: Alexander Duyck Reviewed-by: Luis Chamberlain Signed-off-by: Greg Kroah-Hartman commit b14b9d25a3c707c85e7e31e15766a71365b52ab7 Author: Christoph Hellwig Date: Fri Nov 30 10:59:37 2018 +0100 dma-mapping: return an error code from dma_mapping_error Currently dma_mapping_error returns a boolean as int, with 1 meaning error. This is rather unusual and many callers have to convert it to errno value. The callers are highly inconsistent with error codes ranging from -ENOMEM over -EIO, -EINVAL and -EFAULT ranging to -EAGAIN. Return -ENOMEM which seems to be what the largest number of callers convert it to, and which also matches the typical error case where we are out of resources. Signed-off-by: Christoph Hellwig Acked-by: Russell King Acked-by: Linus Torvalds commit 68c9ac1d1fd51233cfac15484c6153b90aaa4ca4 Author: Christoph Hellwig Date: Tue Dec 4 14:33:24 2018 -0800 dma-mapping: remove the mapping_error dma_map_ops method No users left except for vmd which just forwards it. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit a4abe0ad10654b122caed873d8a7a58989d7cf9b Author: Christoph Hellwig Date: Wed Nov 21 19:38:19 2018 +0100 xen-swiotlb: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit cad34be747b8a92146e71c8267f2c1d6794e34c0 Author: Christoph Hellwig Date: Wed Nov 21 19:35:19 2018 +0100 iommu/dma-iommu: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 524a669bdd5ff45cb927f0c524ed4e7a4fb3650b Author: Christoph Hellwig Date: Wed Nov 21 19:34:10 2018 +0100 iommu/vt-d: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 964f2311a6862f1fbcc044d0828ad90030928b7f Author: Christoph Hellwig Date: Wed Nov 21 19:32:03 2018 +0100 iommu/intel: small map_page cleanup Pass the page + offset to the low-level __iommu_map_single helper (which gets renamed to fit the new calling conventions) as both callers have the page at hand. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit b3aa14f022543ed86823c97c145495b747102fa9 Author: Christoph Hellwig Date: Wed Nov 21 19:28:34 2018 +0100 iommu: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Note that the existing code used AMD_IOMMU_MAPPING_ERROR to check from a 0 return from the IOVA allocator, which is replaced with an explicit 0 as in the implementation and other users of that interface. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 887712a0a5b31e0cf28087f6445de431b4722e52 Author: Christoph Hellwig Date: Wed Nov 21 19:24:00 2018 +0100 x86/calgary: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of the magic bad_dma_addr on a dma mapping failure and let the core dma-mapping code handle the rest. Remove the magic EMERGENCY_PAGES that the bad_dma_addr gets redirected to. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 9e8aa6b5461be50197e0bebc040e9fb6029a3d6b Author: Christoph Hellwig Date: Wed Nov 21 19:20:44 2018 +0100 x86/amd_gart: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of the magic bad_dma_addr on a dma mapping failure and let the core dma-mapping code handle the rest. Remove the magic EMERGENCY_PAGES that the bad_dma_addr gets redirected to. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 608b9761a06089ac22bb157bc70d16e9df12ca7c Author: Christoph Hellwig Date: Wed Nov 21 19:18:10 2018 +0100 ia64/sn: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 07256950cd69a31d79bfd605a7023c61cf09b161 Author: Christoph Hellwig Date: Wed Nov 21 19:16:38 2018 +0100 ia64/sba_iommu: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 52aee3e83d44bcf586bc466c07feeb5a6cf91be0 Author: Christoph Hellwig Date: Wed Nov 21 19:06:58 2018 +0100 ia64/sba_iommu: improve internal map_page users Remove the odd sba_{un,}map_single_attrs wrappers, check errors everywhere. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit a20388be321469afb8b726b455c3e7c77a7304dd Author: Christoph Hellwig Date: Wed Nov 21 19:04:03 2018 +0100 alpha: remove the mapping_error dma_map_ops method Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 52f0b3ee0b2caab04e7a1db1cb4009a277a802af Author: Christoph Hellwig Date: Wed Nov 21 19:04:31 2018 +0100 arm64: remove the dummy_dma_ops mapping_error method Just return DMA_MAPPING_ERROR from __dummy_map_page and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit fb1b53f16c5e457eac8837407da37f29bf0a509a Author: Christoph Hellwig Date: Wed Nov 21 19:00:17 2018 +0100 parisc/sba_iommu: remove the mapping_error dma_map_ops method The SBA iommu code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 748c3c4d13232c96a9b173a4cc46406e12b1c8e5 Author: Christoph Hellwig Date: Wed Nov 21 18:59:50 2018 +0100 parisc/ccio: remove the mapping_error dma_map_ops method The CCIO iommu code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 06301c5e0a16fc4de00582986071aae2b62d6f0a Author: Christoph Hellwig Date: Wed Nov 21 18:59:05 2018 +0100 sparc: remove the mapping_error dma_map_ops method Sparc already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 44899aa31ff64fac370667cb71400ddb434b8951 Author: Christoph Hellwig Date: Wed Nov 21 18:58:15 2018 +0100 s390: remove the mapping_error dma_map_ops method S390 already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 122da4e081be6e854625de21278f5ab6ce103ba9 Author: Christoph Hellwig Date: Wed Nov 21 19:18:58 2018 +0100 mips/jazz: remove the mapping_error dma_map_ops method The Jazz iommu code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit d11e3d3d03360cd49497c837490576f793baf746 Author: Christoph Hellwig Date: Wed Nov 21 18:56:25 2018 +0100 powerpc/iommu: remove the mapping_error dma_map_ops method The powerpc iommu code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 72fd97bf4e75e37552640614a0ea98897fc1dd77 Author: Christoph Hellwig Date: Wed Nov 21 18:57:36 2018 +0100 arm: remove the mapping_error dma_map_ops method Arm already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Russell King Acked-by: Linus Torvalds commit b0cbeae4944924640bf550b75487729a20204c14 Author: Christoph Hellwig Date: Wed Nov 21 18:52:35 2018 +0100 dma-direct: remove the mapping_error dma_map_ops method The dma-direct code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 42ee3cae0ed38b6c04038bf851ea2496da2135bb Author: Christoph Hellwig Date: Wed Nov 21 18:52:35 2018 +0100 dma-mapping: provide a generic DMA_MAPPING_ERROR Error handling of the dma_map_single and dma_map_page APIs is a little problematic at the moment, in that we use different encodings in the returned dma_addr_t to indicate an error. That means we require an additional indirect call to figure out if a dma mapping call returned an error, and a lot of boilerplate code to implement these semantics. Instead return the maximum addressable value as the error. As long as we don't allow mapping single-byte ranges with single-byte alignment this value can never be a valid return. Additionaly if drivers do not check the return value from the dma_map* routines this values means they will generally not be pointed to actual memory. Once the default value is added here we can start removing the various mapping_error methods and just rely on this generic check. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Acked-by: Russell King Acked-by: Linus Torvalds commit bb9c90ab4eddf83e1aa041498f65b8bf8be6802f Author: A.s. Dong Date: Sat Nov 10 15:13:16 2018 +0000 ARM: imx_v6_v7_defconfig: add imx7ulp support Select CONFIG_SOC_IMX7ULP by default. Patch generated via make ARCH=arm savedefconfig Cc: Shawn Guo Cc: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 754cac3f1c270794bb55513680b52a6193afda55 Author: YueHaibing Date: Fri Nov 30 19:08:38 2018 +0800 bus: fsl-mc: remove duplicated include files Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman commit d693eb39f5f8500ac950378b010fba78452fcf14 Author: Ioana Ciornei Date: Thu Nov 15 12:12:12 2018 +0000 bus: fsl-mc: explicitly define the fsl_mc_command endianness Both the header and the command parameters of the fsl_mc_command are 64-bit little-endian words. Use the appropriate type to explicitly specify their endianness. Signed-off-by: Ioana Ciornei Reviewed-by: Laurentiu Tudor Signed-off-by: Greg Kroah-Hartman commit 4b4bdfe7d4a02a5c88ec242e3469cb81e00f1f34 Author: Colin Ian King Date: Thu Nov 29 23:15:56 2018 +0000 misc: ti-st: make array read_ver_cmd static, shrinks object size Don't populate the const array read_ver_cmd on the stack but instead make it static. Makes the object code smaller by 42 bytes: Before: text data bss dec hex filename 17262 6928 192 24382 5f3e drivers/misc/ti-st/st_kim.o After: text data bss dec hex filename 17156 6992 192 24340 5f14 drivers/misc/ti-st/st_kim.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 649ad1165ac17521c062022a0caf8f0eea71f881 Author: Colin Ian King Date: Fri Nov 30 11:57:42 2018 +0000 slimbus: ngd: fix spelling mistake "exeeds" -> "exceeds" There is a spelling mistake in a dev_err message, fix this. Signed-off-by: Colin Ian King Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit d003c346bf75f01d240c80000baf2fbf28e53782 Author: Wolfram Sang Date: Fri Nov 30 11:57:41 2018 +0000 slimbus: qcom-ctrl: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit c4dfa25ab307a277eafa7067cd927fbe4d9be4ba Author: Alban Bedel Date: Tue Nov 13 15:01:10 2018 +0100 mtd: add support for reading MTD devices via the nvmem API Allow drivers that use the nvmem API to read data stored on MTD devices. For this the mtd devices are registered as read-only NVMEM providers. We don't support device tree systems for now. Signed-off-by: Alban Bedel [Bartosz: - include linux/nvmem-provider.h - set the name of the nvmem provider - set no_of_node to true in nvmem_config - don't check the return value of nvmem_unregister() - it cannot fail - tweaked the commit message] Signed-off-by: Bartosz Golaszewski Acked-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman commit 517f14d9cf3533d5ab4fded195ab6f80a92e378f Author: Bartosz Golaszewski Date: Fri Nov 30 11:53:25 2018 +0000 nvmem: add new config option We want to add nvmem support for MTD. TI DaVinci is the first platform that will be using it, but only in non-DT mode. In order not to introduce any new interface to supporting of which we would have to commit - add a new config option that tells nvmem not to use the DT node of the parent device. This way we won't be creating nvmem devices corresponding with MTD partitions defined in device tree. By default MTD will set this new field to true. Once a set of bindings for MTD nvmem cells is agreed upon, we'll be able to remove this option. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit a8b44d5d2e38e94e4c20a3fba294c3375753b469 Author: Andy Shevchenko Date: Fri Nov 30 11:53:24 2018 +0000 nvmem: Move nvmem_type_str array to its only user Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually using it. Move nvmem_type_str array to its only user to make a compiler happy: In file included from include/linux/rtc.h:18, from drivers/rtc/rtc-proc.c:15: include/linux/nvmem-provider.h:29:27: warning: 'nvmem_type_str' defined but not used [-Wunused-const-variable=] static const char * const nvmem_type_str[] = { ^~~~~~~~~~~~~~ Suggested-by: Alexandre Belloni Suggested-by: Joe Perches Cc: Srinivas Kandagatla Signed-off-by: Andy Shevchenko Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 611fbca1c861976e95a5244acf9f40bb0981977c Author: Jerome Brunet Date: Fri Nov 30 11:53:23 2018 +0000 nvmem: meson-efuse: add peripheral clock Get and enable the peripheral clock required by the efuse device. The driver has been handle to work without it so far because the clock was left enabled by default but it won't be the case soon. Signed-off-by: Jerome Brunet Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit a91ae340ad05c24b921f433357ca82a83480ce95 Author: Jerome Brunet Date: Fri Nov 30 11:53:22 2018 +0000 nvmem: meson-efuse: bindings: add peripheral clock The efuse found in gx SoC requires a peripheral clock to properly operate. We have been able to work without it until now because the clock was on by default, and left on by the CCF. Soon, it will not be the case anymore, so the device needs to claim the clock it needs Signed-off-by: Jerome Brunet Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 8649dbe58d359c46c8779ac43c4651ad5157ac47 Author: Jerome Brunet Date: Fri Nov 30 11:53:21 2018 +0000 nvmem: meson-efuse: add error message on user_max failure. Add an explicit error message when SM_EFUSE_USER_MAX command fails Signed-off-by: Jerome Brunet Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 16688453661b6d5159be558a1f8c1f54463a420f Author: Alexandre Belloni Date: Fri Nov 30 11:53:20 2018 +0000 nvmem: add type attribute Add a type attribute so userspace is able to know how the data is stored as this can help taking the correct decision when selecting which device to use. This will also help program display the proper warnings when burning fuses for example. Signed-off-by: Alexandre Belloni Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit ecd589d8f5661dd3a9545079a29b678cd9e3ecf3 Author: Todd Kjos Date: Wed Dec 5 15:19:26 2018 -0800 binder: filter out nodes when showing binder procs When dumping out binder transactions via a debug node, the output is too verbose if a process has many nodes. Change the output for transaction dumps to only display nodes with pending async transactions. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 7a2670a5bc917e4e7c9be5274efc004f9bd1216a Author: Todd Kjos Date: Wed Dec 5 15:19:25 2018 -0800 binder: fix kerneldoc header for struct binder_buffer Fix the incomplete kerneldoc header for struct binder_buffer. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 2796b43feeeaf2d74998e42d1fddcefed6955f54 Author: Yangtao Li Date: Sat Dec 1 12:05:30 2018 -0500 misc: remove GENWQE_DEBUGFS_RO() We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define such a macro,so remove GENWQE_DEBUGFS_RO.Also use DEFINE_SHOW_ATTRIBUTE to simplify some code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit ddfa728ad1b1dbb4172ba65f3043d2d50c694f3d Author: Yangtao Li Date: Fri Nov 30 21:41:28 2018 -0500 char: virtio: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit c13e0a5288195aadec1e53af7a48ea8dae971416 Author: Yangtao Li Date: Fri Nov 30 20:26:30 2018 -0500 binder: remove BINDER_DEBUG_ENTRY() We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define such a macro,so remove BINDER_DEBUG_ENTRY. Signed-off-by: Yangtao Li Acked-by: Todd Kjos Reviewed-by: Joey Pabalinas Signed-off-by: Greg Kroah-Hartman commit f8a70d8b889f180e6860cb1f85fed43d37844c5a Author: Dan Carpenter Date: Mon Dec 3 17:52:19 2018 +0300 misc: vexpress: Off by one in vexpress_syscfg_exec() The > comparison should be >= to prevent reading beyond the end of the func->template[] array. (The func->template array is allocated in vexpress_syscfg_regmap_init() and it has func->num_templates elements.) Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") Signed-off-by: Dan Carpenter Acked-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman commit b50584832b4c8b774ec2596ae58fba9d9c4a668d Author: Nicolas Saenz Julienne Date: Mon Dec 3 18:27:21 2018 +0100 firmware: stratix10-svc: fix wrong of_node_put() in init function After finding a "firmware" dt node stratix10 tries to match it's compatible string with it. To do so it's calling of_find_matching_node() which already takes care of decreasing the refcount on the "firmware" node. We are then incorrectly decreasing the refcount on that node again. This patch removes the unwarranted call to of_node_put(). Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Greg Kroah-Hartman commit 8554e592bde88780bf8bcf4c7d3f8b9c51d27eb4 Author: Colin Ian King Date: Fri Nov 30 11:43:07 2018 -0700 coresight: fix spelling mistake "deffered" -> "deferred" There is a spelling mistake in the dev_info error message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 34e6c35638b95f6efa3f065a04950416ce4bec7f Author: Mathieu Poirier Date: Fri Nov 30 11:43:06 2018 -0700 coresight: etm3x: Release CLAIM tag when operated from perf This patch deals with the release of the CLAIM tag when the ETM is operated from perf. Otherwise the tag is left asserted and subsequent requests to use the device fail. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit 6dd4402f24a39a9903faf00c03bdd0eedefc3bd7 Author: Mathieu Poirier Date: Fri Nov 30 11:43:05 2018 -0700 coresight: etm3x: Deal with CLAIM tag before and after accessing HW This patch moves access to the CLAIM tag so that no modification to the HW happens before and after the CLAIM operation has been carried. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit 32c58c4d3bd0046bef8e2b5fcadff963f3ef7274 Author: Mathieu Poirier Date: Fri Nov 30 11:43:04 2018 -0700 coresight: etf: Release CLAIM tag after disabling the HW This patch rectifies the sequence of events in function tmc_etb_disable_hw() by disabling the HW first and then releasing the CLAIM tag. Otherwise we could be corrupting the configuration done by an external agent that would have claimed the device after we have released it. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit acaf5a06b9718ca3499ccd0b6fd9ec461cd53554 Author: Mathieu Poirier Date: Fri Nov 30 11:43:03 2018 -0700 coresight: etb10: Add support for CLAIM tag Following in the footstep of what was done for other CoreSight devices, add CLAIM tag support to ETB10 in order to synchronise access to the HW between the kernel and an external agent. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit 323ed1e0f60b35df55763356d4973a18d5eaea15 Author: Leo Yan Date: Fri Nov 30 11:43:02 2018 -0700 coresight: tmc: Fix bad register address for CLAIM Commit 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") uses CLAIM tag to validate if the device is available, it needs to pass the device base address to access related registers. In the function tmc_etb_disable_hw() it wrongly passes the driver data pointer as register base address, thus it's easily to produce the kernel warning info like below: [ 83.579898] WARNING: CPU: 4 PID: 2970 at drivers/hwtracing/coresight/coresight.c:207 coresight_disclaim_device_unlocked+0x44/0x80 [ 83.591448] Modules linked in: [ 83.594485] CPU: 4 PID: 2970 Comm: uname Not tainted 4.19.0-rc6-00417-g721b509 #110 [ 83.602067] Hardware name: ARM Juno development board (r2) (DT) [ 83.607932] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 83.612681] pc : coresight_disclaim_device_unlocked+0x44/0x80 [ 83.618375] lr : coresight_disclaim_device_unlocked+0x44/0x80 [ 83.624064] sp : ffff00000fe3ba20 [ 83.627347] x29: ffff00000fe3ba20 x28: ffff80002d430dc0 [ 83.632618] x27: ffff800033177c00 x26: ffff80002eb44480 [ 83.637889] x25: 0000000000000001 x24: ffff800033c72600 [ 83.643160] x23: ffff0000099b11f8 x22: ffff0000099b11c8 [ 83.648430] x21: 0000000000000002 x20: ffff800033a90418 [ 83.653701] x19: ffff0000099b11c8 x18: 0000000000000000 [ 83.658971] x17: 0000000000000000 x16: 0000000000000000 [ 83.664241] x15: 0000000000000000 x14: 0000000000000000 [ 83.669511] x13: 0000000000000000 x12: 0000000000000000 [ 83.674782] x11: 0000000000000000 x10: 0000000000000000 [ 83.680052] x9 : 0000000000000000 x8 : 0000000000000001 [ 83.685322] x7 : 0000000000010000 x6 : ffff800033ebab18 [ 83.690593] x5 : ffff800033ebab18 x4 : ffff800033e6c698 [ 83.695862] x3 : 0000000000000001 x2 : 0000000000000000 [ 83.701133] x1 : 0000000000000000 x0 : 0000000000000001 [ 83.706404] Call trace: [ 83.708830] coresight_disclaim_device_unlocked+0x44/0x80 [ 83.714180] coresight_disclaim_device+0x34/0x48 [ 83.718756] tmc_disable_etf_sink+0xc4/0xf0 [ 83.722902] coresight_disable_path_from+0xc8/0x240 [ 83.727735] coresight_disable_path+0x24/0x30 [ 83.732053] etm_event_stop+0x130/0x170 [ 83.735854] etm_event_del+0x24/0x30 [ 83.739399] event_sched_out.isra.51+0xcc/0x1e8 [ 83.743887] group_sched_out.part.53+0x44/0xb0 [ 83.748291] ctx_sched_out+0x298/0x2b8 [ 83.752005] task_ctx_sched_out+0x74/0xa8 [ 83.755980] perf_event_exit_task+0x140/0x418 [ 83.760298] do_exit+0x3f4/0xcf0 [ 83.763497] do_group_exit+0x5c/0xc0 [ 83.767041] __arm64_sys_exit_group+0x24/0x28 [ 83.771359] el0_svc_common+0x110/0x178 [ 83.775160] el0_svc_handler+0x94/0xe8 [ 83.778875] el0_svc+0x8/0xc [ 83.781728] ---[ end trace 02d8d8eac46db9e5 ]--- This patch is to fix this bug by using 'drvdata->base' as the register base address for CLAIM related operation. Fixes: 4d3ebd3658d8 ("coreisght: tmc: Claim device before use") Cc: Suzuki Poulose Cc: Mathieu Poirier Cc: Mike Leach Cc: Robert Walker Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman commit 702ed5bb75306c030ab6598b24b56ba8d21a48dd Author: AKASHI Takahiro Date: Thu Nov 15 14:52:53 2018 +0900 include: pe.h: remove message[] from mz header definition message[] field won't be part of the definition of mz header. This change is crucial for enabling kexec_file_load on arm64 because arm64's "Image" binary, as in PE format, doesn't have any data for it and accordingly the following check in pefile_parse_binary() will fail: chkaddr(cursor, mz->peaddr, sizeof(*pe)); Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Cc: David Howells Cc: Vivek Goyal Cc: Herbert Xu Cc: David S. Miller Signed-off-by: Will Deacon commit 4c9e7e649a3f291e1b939299458e6844c16afe70 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:52 2018 +0900 arm64: kexec_file: invoke the kernel without purgatory On arm64, purgatory would do almost nothing. So just invoke secondary kernel directly by jumping into its entry code. While, in this case, cpu_soft_restart() must be called with dtb address in the fifth argument, the behavior still stays compatible with kexec_load case as long as the argument is null. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit f3b70e50942960ecc691367bb937e35cdc5e28d3 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:50 2018 +0900 arm64: kexec_file: allow for loading Image-format kernel This patch provides kexec_file_ops for "Image"-format kernel. In this implementation, a binary is always loaded with a fixed offset identified in text_offset field of its header. Regarding signature verification for trusted boot, this patch doesn't contains CONFIG_KEXEC_VERIFY_SIG support, which is to be added later in this series, but file-attribute-based verification is still a viable option by enabling IMA security subsystem. You can sign(label) a to-be-kexec'ed kernel image on target file system with: $ evmctl ima_sign --key /path/to/private_key.pem Image On live system, you must have IMA enforced with, at least, the following security policy: "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig" See more details about IMA here: https://sourceforge.net/p/linux-ima/wiki/Home/ Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Signed-off-by: Will Deacon commit 52b2a8af7436044cfcb27e4b0f72c2ce1f3890da Author: AKASHI Takahiro Date: Thu Nov 15 14:52:49 2018 +0900 arm64: kexec_file: load initrd and device-tree load_other_segments() is expected to allocate and place all the necessary memory segments other than kernel, including initrd and device-tree blob (and elf core header for crash). While most of the code was borrowed from kexec-tools' counterpart, users may not be allowed to specify dtb explicitly, instead, the dtb presented by the original boot loader is reused. arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64- specific data allocated in load_other_segments(). Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Signed-off-by: Will Deacon commit 3ddd9992a590c7462ff22f7cb17d386b83ed0a07 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:48 2018 +0900 arm64: enable KEXEC_FILE config Modify arm64/Kconfig to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse Signed-off-by: Will Deacon commit bdd2c9d1c33357462d1d38eb04bbb5dc452eed40 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:47 2018 +0900 arm64: cpufeature: add MMFR0 helper functions Those helper functions for MMFR0 register will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Signed-off-by: Will Deacon commit f56063c51f9fb3d9af4e7c707926964cf924b814 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:46 2018 +0900 arm64: add image head flag definitions Those image head's flags will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse Signed-off-by: Will Deacon commit 497e1858647a0b859076dc96300527375977d76a Author: AKASHI Takahiro Date: Thu Nov 15 14:52:44 2018 +0900 kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump In kdump case, there exists only one dedicated memblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*() Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Will Deacon commit 735c2f90e333b3d0adee52a8e7e855a0c0eca284 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:43 2018 +0900 powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem() Memblock list is another source for usable system memory layout. So move powerpc's arch_kexec_walk_mem() to common code so that other memblock-based architectures, particularly arm64, can also utilise it. A moved function is now renamed to kexec_walk_memblock() and integrated into kexec_locate_mem_hole(), which will now be usable for all architectures with no need for overriding arch_kexec_walk_mem(). With this change, arch_kexec_walk_mem() need no longer be a weak function, and was now renamed to kexec_walk_resources(). Since powerpc doesn't support kdump in its kexec_file_load(), the current kexec_walk_memblock() won't work for kdump either in this form, this will be fixed in the next patch. Signed-off-by: AKASHI Takahiro Cc: "Eric W. Biederman" Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Acked-by: James Morse Signed-off-by: Will Deacon commit b6664ba42f1424d2768b605dd60cecc4428d9364 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:42 2018 +0900 s390, kexec_file: drop arch_kexec_mem_walk() Since s390 already knows where to locate buffers, calling arch_kexec_mem_walk() has no sense. So we can just drop it as kbuf->mem indicates this while all other architectures sets it to 0 initially. This change is a preparatory work for the next patch, where all the variant memory walks, either on system resource or memblock, will be put in one common place so that it will satisfy all the architectures' need. Signed-off-by: AKASHI Takahiro Reviewed-by: Philipp Rudo Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Will Deacon commit 92a98a2b9f64a8b3c200a7709ceae04d09c39451 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:41 2018 +0900 kexec_file: make kexec_image_post_load_cleanup_default() global Change this function from static to global so that arm64 can implement its own arch_kimage_file_post_load_cleanup() later using kexec_image_post_load_cleanup_default(). Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Signed-off-by: Will Deacon commit 4e21565b7fd4d9045765f697887e74a704135fe2 Author: AKASHI Takahiro Date: Thu Nov 15 14:52:40 2018 +0900 asm-generic: add kexec_file_load system call to unistd.h The initial user of this system call number is arm64. Signed-off-by: AKASHI Takahiro Acked-by: Arnd Bergmann Signed-off-by: Will Deacon commit 36ead91499160b459d66cd70949511cde829204f Author: Heiko Stuebner Date: Tue Aug 28 08:45:54 2018 +0200 ARM: dts: rockchip: add BQ Edison 2 QC devicetree The Edison 2 Quad-Core was a Tablet device released in 2013 by MundoReader using a rk3188 soc. Add a devicetree for it. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring commit 69c32972d59388c041268e8206e8eb1acff29b9a Author: Kulkarni, Ganapatrao Date: Thu Dec 6 11:51:31 2018 +0000 drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver This patch adds a perf driver for the PMU UNCORE devices DDR4 Memory Controller(DMC) and Level 3 Cache(L3C). Each PMU supports up to 4 counters. All counters lack overflow interrupt and are sampled periodically. Reviewed-by: Suzuki K Poulose Signed-off-by: Ganapatrao Kulkarni [will: consistent enum cpuhp_state naming] Signed-off-by: Will Deacon commit 99fef587ff98894426d9bf1f5b7336345052d4b3 Author: Andy Shevchenko Date: Mon Dec 3 20:21:41 2018 +0200 driver core: platform: Respect return code of platform_device_register_full() The platform_device_register_full() might return an error pointer. If we instantiate platform device which is optional we may simplify the routine at removal stage by simply calling platform_device_unregister(). For now it requires to check parameter for being an error pointer in each caller. To make users' life easier, check for an error pointer inside driver core. Reported-by: Pierre-Louis Bossart Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 186bddb28ff9f61250d1b33554321d0bf5d085f6 Author: Ezequiel Garcia Date: Mon Dec 3 13:44:35 2018 -0300 kref/kobject: Improve documentation The current kref and kobject documentation may be insufficient to understand these common pitfalls regarding object lifetime and object releasing. Add a bit more documentation and improve the warnings seen by the user, pointing to the right piece of documentation. Also, it's important to understand that making fun of people publicly is not at all helpful, doesn't provide any value, and it's not a healthy way of encouraging developers to do better. "Mocking mercilessly" will, if anything, make developers feel bad and go away. This kind of behavior should not be encouraged or justified. Signed-off-by: Ezequiel Garcia Signed-off-by: Enric Balletbo i Serra Signed-off-by: Gustavo Padovan Signed-off-by: Matthias Brugger Acked-by: Daniel Vetter Acked-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 1d52a74ea2300158f87196fa381cde52d98cf4e4 Author: Rob Herring Date: Wed Dec 5 13:50:49 2018 -0600 ASoC: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For the FSL ASoC card, the full node names appear to be "ssi", "esai", and "sai", so there's not any reason to use strstr and of_node_name_eq can be used instead. Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Mark Brown commit 23aa128bb28d9da69bb1bdb2b70e50128857884a Author: Yu Zhao Date: Tue Dec 4 15:42:53 2018 -0700 ASoC: use dma_ops of parent device for acp_audio_dma AMD platform device acp_audio_dma can only be created by parent PCI device driver (drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c). Pass struct device of the parent to snd_pcm_lib_preallocate_pages() so dma_alloc_coherent() can use correct dma_ops. Otherwise, it will use default dma_ops which is nommu_dma_ops on x86_64 even when IOMMU is enabled and set to non passthrough mode. Though platform device inherits some dma related fields during its creation in mfd_add_device(), we can't simply pass its struct device to snd_pcm_lib_preallocate_pages() because dma_ops is not among the inherited fields. Even it were, drivers/iommu/amd_iommu.c would ignore it because get_device_id() doesn't handle platform device. This change shouldn't give us any trouble even struct device of the parent becomes null or represents some non PCI device in the future, because get_dma_ops() correctly handles null struct device or uses the default dma_ops if struct device doesn't have it set. Signed-off-by: Yu Zhao Signed-off-by: Mark Brown commit 3f8e9178538189215b59f726f2449a08362e7074 Author: David Hildenbrand Date: Mon Dec 3 12:16:11 2018 +0100 drivers/base/memory.c: Use DEVICE_ATTR_RO and friends Let's use the easier to read (and not mess up) variants: - Use DEVICE_ATTR_RO - Use DEVICE_ATTR_WO - Use DEVICE_ATTR_RW instead of the more generic DEVICE_ATTR() we're using right now. We have to rename most callback functions. By fixing the intendations we can even save some LOCs. Cc: "Rafael J. Wysocki" Cc: Andrew Morton Cc: Ingo Molnar Cc: Pavel Tatashin Cc: Oscar Salvador Cc: Michal Hocko Cc: Wei Yang Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Reviewed-by: Oscar Salvador Signed-off-by: Greg Kroah-Hartman commit d6d08273996b3363178b920ccfa74acabaf67963 Author: Yu Zhao Date: Tue Dec 4 15:42:52 2018 -0700 ASoC: use DMA addr rather than CPU pa for acp_audio_dma We shouldn't assume CPU physical address we get from page_to_phys() is same as DMA address we get from dma_alloc_coherent(). On x86_64, we won't run into any problem with the assumption when dma_ops is nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled. And it's most likely different from CPU physical address when AMD IOMMU is not in passthrough mode. Signed-off-by: Yu Zhao Signed-off-by: Mark Brown commit f7cb866a96868771504bbb0d5e5ff79ab90b4abb Author: Oskari Lemmela Date: Sat Dec 1 12:08:17 2018 +0200 arm64: dts: rockchip: enable hdmi output on rk3399-rockpro64 The rockpro64 does have hdmi support, so add the necessary devicetree node to enable it. Signed-off-by: Oskari Lemmela Signed-off-by: Heiko Stuebner commit 94ea56cff506c769a509c5dd87904c7fe3806a81 Author: Hans de Goede Date: Mon Dec 3 21:45:14 2018 +0100 ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Gnawty The Gnawty model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3 for the mclk, just like the Clapper and Swanky models. This commit adds a DMI based quirk for this. This fixing audio no longer working on these devices after commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") that commit fixes us unnecessary keeping unused clocks on, but in case of the Gnawty that was breaking audio support since we were not using the right clock in the cht_bsw_max98090_ti machine driver. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201787 Cc: stable@vger.kernel.org Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Reported-and-tested-by: Jaime Pérez <19.jaime.91@gmail.com> Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 690e16bada6029694740d5501025faf483d14339 Author: Oskari Lemmela Date: Sat Dec 1 12:08:16 2018 +0200 arm64: dts: rockchip: fix rk3399-rockpro64 regulator gpios Rockpro64 is not able boot if GPIO1_C1 pin is pulled high before loading linux kernel. In rockpro64 GPIO1_C1 pin is connected vdd_cpu_b regulator VSEL pin. Pin should be pulled down in normal operation and pulled high in suspend. PMIC LDO_REG2 is connected to touch panel connector. Rename regulator and set it to correct voltage. PCIe power is controller by GPIO1_D0. Schematics can be downloaded from: http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf Signed-off-by: Oskari Lemmela Acked-by: Akash Gajjar Signed-off-by: Heiko Stuebner commit d6310a3f3396e004bdb7a76787a2a3bbc643d0b7 Author: Kulkarni, Ganapatrao Date: Thu Dec 6 11:51:27 2018 +0000 Documentation: perf: Add documentation for ThunderX2 PMU uncore driver The SoC has PMU support in its L3 cache controller (L3C) and in the DDR4 Memory Controller (DMC). Signed-off-by: Ganapatrao Kulkarni [will: minor spelling and format fixes, dropped events list] Signed-off-by: Will Deacon commit a3dcea2c85129716f323d504b087a04200687242 Author: Suzuki K Poulose Date: Fri Nov 30 17:18:02 2018 +0000 arm64: capabilities: Merge duplicate entries for Qualcomm erratum 1003 Remove duplicate entries for Qualcomm erratum 1003. Since the entries are not purely based on generic MIDR checks, use the multi_cap_entry type to merge the entries. Cc: Christopher Covington Cc: Will Deacon Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit f58cdf7e3cab33306efd999c23b4fb606184abf3 Author: Suzuki K Poulose Date: Fri Nov 30 17:18:01 2018 +0000 arm64: capabilities: Merge duplicate Cavium erratum entries Merge duplicate entries for a single capability using the midr range list for Cavium errata 30115 and 27456. Cc: Andrew Pinski Cc: David Daney Cc: Will Deacon Cc: Catalin Marinas Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit c9460dcb06ee68af1c75f9232603ece071901abe Author: Suzuki K Poulose Date: Fri Nov 30 17:18:00 2018 +0000 arm64: capabilities: Merge entries for ARM64_WORKAROUND_CLEAN_CACHE We have two entries for ARM64_WORKAROUND_CLEAN_CACHE capability : 1) ARM Errata 826319, 827319, 824069, 819472 on A53 r0p[012] 2) ARM Errata 819472 on A53 r0p[01] Both have the same work around. Merge these entries to avoid duplicate entries for a single capability. Add a new Kconfig entry to control the "capability" entry to make it easier to handle combinations of the CONFIGs. Cc: Will Deacon Cc: Andre Przywara Cc: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 82ca0d5487d4e1444b05d9f73757b395c1228bba Author: Greg Kroah-Hartman Date: Thu Dec 6 12:47:22 2018 +0100 Revert "tty: xilinx_uartps: Correct return value in probe" This reverts commit eca42d4cf3c591c36312c52707e0a712e0c7256a. During review it was rejected, so drop it from the tree. Cc: Rajan Vaja Signed-off-by: Greg Kroah-Hartman commit 3bfaf95cb1fe81872df884956c704469e68a5bee Author: Borislav Petkov Date: Wed Dec 5 21:05:13 2018 +0100 x86/mce: Unify pr_* prefix Move the pr_fmt prefix to internal.h and include it everywhere. This way, all pr_* printed strings will be prepended with "mce: ". No functional changes. Signed-off-by: Borislav Petkov Cc: Tony Luck Link: https://lkml.kernel.org/r/20181205200913.GR29510@zn.tnic commit a2ce9a67051bbbcc961aca2e06dcadd9b72d72fa Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:17 2018 +0100 ARM: davinci: da850-evm: remove unnecessary include The include file for at24_platform_data is not needed in this file. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit fadfc184efebb79b77d9c5fa24db0f1b89957277 Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:16 2018 +0100 ARM: davinci: dm850-evm: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 32feb9481ffd71c09b642a2f99c1cc899643a4c6 Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:15 2018 +0100 ARM: davinci: mityomapl138: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit c85efcc60a892210aa10688d5de1f997d5cad799 Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:14 2018 +0100 ARM: davinci: da830-evm: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 628c75ddad782cea62059f04d017880b7bcf8daa Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:13 2018 +0100 ARM: davinci: dm646x-evm: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 89c817c417f468907bc15fec6384120e6deb57c6 Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:12 2018 +0100 ARM: davinci: dm644x-evm: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit d3f12777e6d8e13aa4c147bec146663bc1024ab2 Author: Bartosz Golaszewski Date: Tue Nov 13 15:01:11 2018 +0100 ARM: davinci: dm365-evm: use cell nvmem lookup for mac address We now support nvmem lookups and cell definitions for machine code. Add relevant data structures for the mac-address stored in at24 EEPROM. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit aa77bfb354c495fc4361199e63fc5765b9e1e783 Author: Waiman Long Date: Wed Dec 5 14:49:27 2018 -0500 x86/speculation: Change misspelled STIPB to STIBP STIBP stands for Single Thread Indirect Branch Predictors. The acronym, however, can be easily mis-spelled as STIPB. It is perhaps due to the presence of another related term - IBPB (Indirect Branch Predictor Barrier). Fix the mis-spelling in the code. Signed-off-by: Waiman Long Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: David Woodhouse Cc: Ingo Molnar Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: KarimAllah Ahmed Cc: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: x86-ml Link: https://lkml.kernel.org/r/1544039368-9009-1-git-send-email-longman@redhat.com commit ad5399d12ca4f68fdb9e58e4b9a556eb997a9639 Author: Ezequiel Garcia Date: Fri Nov 30 14:34:31 2018 -0300 ARM: dts: rockchip: add VPU device node for RK3288 Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Reviewed-by: Tomasz Figa Signed-off-by: Ezequiel Garcia Signed-off-by: Heiko Stuebner commit 5cd4c31a1252ca63999f771796dcc09320e8e410 Author: Ezequiel Garcia Date: Fri Nov 30 14:34:32 2018 -0300 arm64: dts: rockchip: add VPU device node for RK3399 Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Reviewed-by: Tomasz Figa Signed-off-by: Ezequiel Garcia Signed-off-by: Heiko Stuebner commit 157ab88ef64a2edccd722f120464109ceba9bac1 Author: Rob Herring Date: Wed Dec 5 13:50:46 2018 -0600 ALSA: aoa: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. A couple of open coded iterating thru the child node names are converted to use for_each_child_of_node() instead. Signed-off-by: Rob Herring Signed-off-by: Takashi Iwai commit 192a7122954001af2504a9abecfc0ad28532a6ee Author: Rob Herring Date: Wed Dec 5 13:50:48 2018 -0600 ALSA: aoa: Remove direct OF name and type accesses Convert soundbus uevent and sysfs OF node name and device type usage to use printf specifier and helper functions instead of directly accessing the name and type pointers. This will allow the eventual removal of the pointers. Signed-off-by: Rob Herring Signed-off-by: Takashi Iwai commit c23b8e7acea3dc034edeb902f0c843856e215938 Author: Rob Herring Date: Wed Dec 5 13:50:47 2018 -0600 ALSA: sparc: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 91abe6b2237f4ff92aec250c7e79765376f17b0b Author: Rob Herring Date: Wed Dec 5 13:50:38 2018 -0600 sbus: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 7a35a50df5a34e6eaee1b1f4f913b84879068fee Author: David Ahern Date: Wed Dec 5 20:02:29 2018 -0800 neighbor: Add extack messages for add and delete commands Add extack messages for failures in neigh_add and neigh_delete. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit f5d6c3e5a359c0507800e7ac68d565c21de9b5a1 Author: Hoang Le Date: Thu Dec 6 09:00:09 2018 +0700 tipc: fix node keep alive interval calculation When setting LINK tolerance, node timer interval will be calculated base on the LINK with lowest tolerance. But when calculated, the old node timer interval only updated if current setting value (tolerance/4) less than old ones regardless of number of links as well as links' lowest tolerance value. This caused to two cases missing if tolerance changed as following: Case 1: 1.1/ There is one link (L1) available in the system 1.2/ Set L1's tolerance from 1500ms => lower (i.e 500ms) 1.3/ Then, fallback to default (1500ms) or higher (i.e 2000ms) Expected: node timer interval is 1500/4=375ms after 1.3 Result: node timer interval will not being updated after changing tolerance at 1.3 since its value 1500/4=375ms is not less than 500/4=125ms at 1.2. Case 2: 2.1/ There are two links (L1, L2) available in the system 2.2/ L1 and L2 tolerance value are 2000ms as initial 2.3/ Set L2's tolerance from 2000ms => lower 1500ms 2.4/ Disable link L2 (bring down its bearer) Expected: node timer interval is 2000ms/4=500ms after 2.4 Result: node timer interval will not being updated after disabling L2 since its value 2000ms/4=500ms is still not less than 1500/4=375ms at 2.3 although L2 is already not available in the system. To fix this, we start the node interval calculation by initializing it to a value larger than any conceivable calculated value. This way, the link with the lowest tolerance will always determine the calculated value. Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit bf5849f15a30358e0af55576d93aedefe41e781d Author: Rob Herring Date: Wed Dec 5 13:50:32 2018 -0600 net: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: "David S. Miller" Cc: Claudiu Manoil Cc: Grygorii Strashko Cc: Wingman Kwok Cc: Murali Karicheri Cc: netdev@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit d66280b12bd7ad6345df4dee2ee1c20f5902242d Author: Peter Oskolkov Date: Tue Dec 4 11:55:56 2018 -0800 net: netem: use a list in addition to rbtree When testing high-bandwidth TCP streams with large windows, high latency, and low jitter, netem consumes a lot of CPU cycles doing rbtree rebalancing. This patch uses a linear list/queue in addition to the rbtree: if an incoming packet is past the tail of the linear queue, it is added there, otherwise it is inserted into the rbtree. Without this patch, perf shows netem_enqueue, netem_dequeue, and rb_* functions among the top offenders. With this patch, only netem_enqueue is noticeable if jitter is low/absent. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 1f9a5dce3548d54d810b23e4e0b1d8c6d73a52d4 Merge: fb878d106b773 9a01135b98b9d Author: Dave Airlie Date: Thu Dec 6 13:43:22 2018 +1000 Merge tag 'vmwgfx-next-2018-12-05' of git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2018-12-05 Page flip with damage by Deepak and others, Various vmwgfx minor fixes anc cleanups. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20181205103554.3675-1-thellstrom@vmware.com commit fb878d106b7738ae7cdb513f98876b22bd6a485f Merge: 513126ae00ba8 13e810f199b48 Author: Dave Airlie Date: Thu Dec 6 13:29:34 2018 +1000 Merge tag 'exynos-drm-next-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next - Refactoring of DMA and IOMMU code . This patch series simplifies DMA mapping creation by avoiding looping all components to get dma device object, reduces code size by merging IOMMU and DMA code. - Enhance plane alpha and blend mode support . This patch series adds configurable plane and pixel blend mode support for Exynos5433 DECON device. - Fix color format setting of Mixer driver . This patch series fixes color format and range setting by splitting range and format. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1544002853-11661-1-git-send-email-inki.dae@samsung.com commit 513126ae00ba897cac1ab07f61edf062093d4dcb Merge: 467e8a516dcf9 2c486cc4c2774 Author: Dave Airlie Date: Thu Dec 6 13:28:19 2018 +1000 Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next amdgpu and amdkfd: - Freesync support - ABM support in DC - KFD support for vega12 and polaris12 - Add sdma paging queue support for vega - Use ACPI to query backlight range on supported platforms - Clean up doorbell handling - KFD fix for pasid handling under non-HWS - Misc cleanups and fixes scheduler: - Revert "fix timeout handling v2" radeon: - Fix possible overflow on 32 bit ttm: - Fix for LRU handling for ghost objects Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181130192505.2946-1-alexander.deucher@amd.com commit 75d64e8bf5c1582853515adc7e6f734852d5d5c7 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:23 2018 +0800 ARM: dts: sun8i: r40: Add clock accuracy for external oscillators The R40 datasheet specifies a tolerance range for the external oscillators used. Add them to the device tree as the clock accuracy. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai commit 772c3a452a1381c270d45f855bcee3a6f7953880 Author: Chen-Yu Tsai Date: Mon Dec 3 22:58:21 2018 +0800 ARM: dts: sunxi: h3/h5: Add clock accuracy for external oscillators The H3 datasheet specifies a tolerance range for the external oscillators used. Add them to the device tree as the clock accuracy. The internal oscillator is left unchanged, as it will be removed later. Acked-by: Maxime Ripard Tested-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai commit a06aef4ed5b6f1daa20babb4ad4458392bce5edd Merge: 30da46b5dc3a9 84ecc1f98ca7c Author: Alexei Starovoitov Date: Wed Dec 5 18:48:41 2018 -0800 Merge branch 'bpf_func_info-improvements' Martin KaFai Lau says: ==================== The patchset has a few improvements on bpf_func_info: 1. Improvements on the behaviors of info.func_info, info.func_info_cnt and info.func_info_rec_size. 2. Name change: s/insn_offset/insn_off/ Please see individual patch for details. ==================== Signed-off-by: Alexei Starovoitov commit 84ecc1f98ca7ce28ede9bc5cc70a557fdfa09caa Author: Martin KaFai Lau Date: Wed Dec 5 17:35:47 2018 -0800 bpf: Expect !info.func_info and insn_off name changes in test_btf/libbpf/bpftool Similar to info.jited_*, info.func_info could be 0 if bpf_dump_raw_ok() == false. This patch makes changes to test_btf and bpftool to expect info.func_info could be 0. This patch also makes the needed changes for s/insn_offset/insn_off/. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 555249df711b146a2898949ac80503be29fe7340 Author: Martin KaFai Lau Date: Wed Dec 5 17:35:45 2018 -0800 bpf: tools: Sync uapi bpf.h for the name changes in bpf_func_info This patch sync the name changes in bpf_func_info to the tools/. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit d30d42e08c76cb9323ec6121190eb026b07f773b Author: Martin KaFai Lau Date: Wed Dec 5 17:35:44 2018 -0800 bpf: Change insn_offset to insn_off in bpf_func_info The later patch will introduce "struct bpf_line_info" which has member "line_off" and "file_off" referring back to the string section in btf. The line_"off" and file_"off" are more consistent to the naming convention in btf.h that means "offset" (e.g. name_off in "struct btf_type"). The to-be-added "struct bpf_line_info" also has another member, "insn_off" which is the same as the "insn_offset" in "struct bpf_func_info". Hence, this patch renames "insn_offset" to "insn_off" for "struct bpf_func_info". Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 7337224fc150b3b762190425399ac0e8dee380d1 Author: Martin KaFai Lau Date: Wed Dec 5 17:35:43 2018 -0800 bpf: Improve the info.func_info and info.func_info_rec_size behavior 1) When bpf_dump_raw_ok() == false and the kernel can provide >=1 func_info to the userspace, the current behavior is setting the info.func_info_cnt to 0 instead of setting info.func_info to 0. It is different from the behavior in jited_func_lens/nr_jited_func_lens, jited_ksyms/nr_jited_ksyms...etc. This patch fixes it. (i.e. set func_info to 0 instead of func_info_cnt to 0 when bpf_dump_raw_ok() == false). 2) When the userspace passed in info.func_info_cnt == 0, the kernel will set the expected func_info size back to the info.func_info_rec_size. It is a way for the userspace to learn the kernel expected func_info_rec_size introduced in commit 838e96904ff3 ("bpf: Introduce bpf_func_info"). An exception is the kernel expected size is not set when func_info is not available for a bpf_prog. This makes the returned info.func_info_rec_size has different values depending on the returned value of info.func_info_cnt. This patch sets the kernel expected size to info.func_info_rec_size independent of the info.func_info_cnt. 3) The current logic only rejects invalid func_info_rec_size if func_info_cnt is non zero. This patch also rejects invalid nonzero info.func_info_rec_size and not equal to the kernel expected size. 4) Set info.btf_id as long as prog->aux->btf != NULL. That will setup the later copy_to_user() codes look the same as others which then easier to understand and maintain. prog->aux->btf is not NULL only if prog->aux->func_info_cnt > 0. Breaking up info.btf_id from prog->aux->func_info_cnt is needed for the later line info patch anyway. A similar change is made to bpf_get_prog_name(). Fixes: 838e96904ff3 ("bpf: Introduce bpf_func_info") Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 932c4417077958fe486e6d8a64a06e65d664cb85 Merge: ba5dfaff19555 d08c6bc08f72f Author: David S. Miller Date: Wed Dec 5 17:01:51 2018 -0800 Merge branch 'net-bridge-convert-multicast-to-generic-rhashtable' Nikolay Aleksandrov says: ==================== net: bridge: convert multicast to generic rhashtable The current bridge multicast code uses a custom rhashtable implementation which predates the generic rhashtable API. Patch 01 converts it to use the generic kernel rhashtable which simplifies the code a lot and removes duplicated functionality. The convert also makes hash_elasticity obsolete as the generic rhashtable already has such checks and has a fixed elasticity of RHT_ELASTICITY (16 currently) so we emit a warning whenever elasticity is set and return RHT_ELASTICITY when read (patch 03). Patch 02 converts the multicast code to use non-bh RCU flavor as it was mixing bh and non-bh. Since now we have the generic rhashtable which autoshrinks we can be more liberal with the default hash maximum so patch 04 increases it to 4096 and moves it to a define in br_private.h. v3: add non-rcu br_mdb_get variant and use it where we have multicast_lock, drop special hash_max handling and just set it where needed and use non-bh RCU consistently (patch 02, new) v2: send the latest version of the set which handles when IGMP snooping is not defined, changes are in patch 01 ==================== Signed-off-by: David S. Miller commit d08c6bc08f72f74cd37f6b7954e3f708005518f9 Author: Nikolay Aleksandrov Date: Wed Dec 5 15:14:27 2018 +0200 net: bridge: increase multicast's default maximum number of entries bridge's default hash_max was 512 which is rather conservative, now that we're using the generic rhashtable API which autoshrinks let's increase it to 4096 and move it to a define in br_private.h. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit cf332bca56f4981cad19027f037fb4d661dcb172 Author: Nikolay Aleksandrov Date: Wed Dec 5 15:14:26 2018 +0200 net: bridge: mark hash_elasticity as obsolete Now that the bridge multicast uses the generic rhashtable interface we can drop the hash_elasticity option as that is already done for us and it's hardcoded to a maximum of RHT_ELASTICITY (16 currently). Add a warning about the obsolete option when the hash_elasticity is set. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4329596cb10d23c9e22c78e676a3667ef28ed62f Author: Nikolay Aleksandrov Date: Wed Dec 5 15:14:25 2018 +0200 net: bridge: multicast: use non-bh rcu flavor The bridge multicast code has been using a mix of RCU and RCU-bh flavors sometimes in questionable way. Since we've moved to rhashtable just use non-bh RCU everywhere. In addition this simplifies freeing of objects and allows us to remove some unnecessary callback functions. v3: new patch Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 19e3a9c90c53479fecaa02307bf2db5ab8b3ffe3 Author: Nikolay Aleksandrov Date: Wed Dec 5 15:14:24 2018 +0200 net: bridge: convert multicast to generic rhashtable The bridge multicast code currently uses a custom resizable hashtable which predates the generic rhashtable interface. It has many shortcomings compared and duplicates functionality that is presently available via the generic rhashtable, so this patch removes the custom rhashtable implementation in favor of the kernel's generic rhashtable. The hash maximum is kept and the rhashtable's size is used to do a loose check if it's reached in which case we revert to the old behaviour and disable further bridge multicast processing. Also now we can support any hash maximum, doesn't need to be a power of 2. v3: add non-rcu br_mdb_get variant and use it where multicast_lock is held to avoid RCU splat, drop hash_max function and just set it directly v2: handle when IGMP snooping is undefined, add br_mdb_init/uninit placeholders Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ba5dfaff195557209015add52e57191899ccfca0 Merge: 7127f2fece7b4 8ff57c18e9f6b Author: David S. Miller Date: Wed Dec 5 16:48:44 2018 -0800 Merge tag 'mlx5e-updates-2018-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2018-12-04 This series includes updates to mlx5e netdevice driver From Saeed, Remove trailing space of tx_pause ethtool stat From Gal, Cleanup unused defines From Aya, ethtool Support for configuring of RX hash fields From Tariq, Improve ethtool private-flags code structure ==================== Signed-off-by: David S. Miller commit 7127f2fece7b431f0d9a6262f92073b564f8cf03 Merge: b255e500c8dc1 9db299c736eea Author: David S. Miller Date: Wed Dec 5 16:26:16 2018 -0800 Merge branch 'u32-to-linkmode-fixes' Andrew Lunn says: ==================== u32 to linkmode fixes This patchset fixes issues found in the last patchset which converted the phydev advertise etc, from a u32 to a linux bitmap. Most of the issues are the result of clearing bits which should not of been cleared. To make the API clearer, the idea from Heiner Kallweit was used, with _mod_ to indicate the function modifies just the bits it needs to, or _to_ to clear all bits and just set bit that need to be set. ==================== Signed-off-by: David S. Miller commit 9db299c736eea35ea97dbc9d80a58befc067bcd8 Author: Andrew Lunn Date: Wed Dec 5 21:49:45 2018 +0100 net: phy: Fix ioctl handler when modifing MII_ADVERTISE When the MII_ADVERTISE register is modified by the IOCTL handler, phydev->advertising needs recalculating. Use the _mod_ variant of mii_adv_to_linkmode_adv_t so that bits outside of the advertise registers are not cleared. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 6dbd0090f999c443763c0742b574da1ce189404c Author: Andrew Lunn Date: Wed Dec 5 21:49:44 2018 +0100 net: mii: mii_lpa_mod_linkmode_lpa_t: Make use of linkmode_mod_bit helper Replace the if else code structure with a call to the helper linkmode_mod_bit. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d3351931a37bdb329b5ea761424579fa91c866ee Author: Andrew Lunn Date: Wed Dec 5 21:49:43 2018 +0100 net: mii: Add mii_lpa_mod_linkmode_lpa_t Add a _mod_ variant of mii_lpa_to_linkmode_lpa_t. Use this to fix the genphy_read_status() where the 1G link partner features are getting lost. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ab9cb729ab0d4151f7ba76dd3ff592242a694754 Author: Andrew Lunn Date: Wed Dec 5 21:49:42 2018 +0100 phy: marvell: Rename mii_lpa_to_linkmode_lpa_t Rename mii_lpa_to_linkmode_lpa_t to mii_lpa_mod_linkmode_lpa_t to indicate it modifies the passed linkmode bitmap, without clearing any other bits. Also, ensure bit are clear which the lpa indicates should not be set. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Suggested-by: Heiner Kallweit Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 78a24df370072ea3b7c0a466efd776fc8f87c73a Author: Andrew Lunn Date: Wed Dec 5 21:49:41 2018 +0100 net: mii: Rename mii_stat1000_to_linkmode_lpa_t Rename mii_stat1000_to_linkmode_lpa_t to mii_stat1000_mod_linkmode_lpa_t to indicate it modifies the passed linkmode bitmap, without clearing any other bits. Add a helper to set/clear bits in a linkmode. Use this helper to ensure bit are clear which the stat1000 indicates should not be set. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Suggested-by: Heiner Kallweit Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5f15eed245bc6d7c82d44f0ebcaf62071a9d55bd Author: Andrew Lunn Date: Wed Dec 5 21:49:40 2018 +0100 net: mii: Fix autoneg in mii_lpa_to_linkmode_lpa_t() mii_adv_to_linkmode_adv_t() clears all bits before setting it needs to set. This means the freshly set Autoneg gets cleared. Change the order, and add comments about it clearing the old content of the bitmap. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit e2fb615b69e0e612078363fd0ecc63738a54e1cd Author: Yuanjiang Yu Date: Wed Nov 14 17:07:07 2018 +0800 power: supply: sc27xx: Add suspend/resume interfaces Add fuel gauge platform suspend and resume interfaces. In suspend state, we should enable the low voltage and coulomb counter threshold interrupts to wake up system to calibrate the battery capacity in lower voltage stage. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit edcb1c0a3f6377d565a90795376ad6d4cb631d66 Author: Yuanjiang Yu Date: Wed Nov 14 17:07:06 2018 +0800 power: supply: sc27xx: Add fuel gauge low voltage alarm Add low voltage alarm support to make sure the battery capacity more accurate in lower voltage stage. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 8ff57c18e9f6b03722070a372cdcc850b13bcbc8 Author: Tariq Toukan Date: Mon Nov 19 15:07:07 2018 +0200 net/mlx5e: Improve ethtool private-flags code structure Refactor the code of private-flags setter. Replace consecutive calls to mlx5e_handle_pflag with a loop that uses a preset set of parameters. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 756c41603a189e4ae9dca77c3c3d80a926d8bedf Author: Aya Levin Date: Tue Oct 23 16:03:33 2018 +0300 net/mlx5e: ethtool, Support user configuration for RX hash fields Enable user configuration of RX hash fields that are used for traffic spreading into RX queues. User can change built-in RSS (Receive Side Scaling) profiles on the following traffic types: UDP4, UDP6, TCP4 and TCP6. This configuration effects both outer and inner headers. Added support for ethtool commands: ETHTOOL_SRXFH and ETHTOOL_GRXFH. Command example respectively: $ethtool -N eth1 rx-flow-hash tcp4 sdfn $ethtool -n eth1 rx-flow-hash tcpp4 IP SA IP DA L4 bytes 0 & 1 [TCP/UDP src port] L4 bytes 2 & 3 [TCP/UDP dst port] Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit bbeb53b8b2c92fd4e5b51e8fd9ab1c4000e4d350 Author: Aya Levin Date: Tue Nov 6 21:05:29 2018 +0200 net/mlx5e: Move RSS params to a dedicated struct Remove RSS params from params struct under channels, and introduce a new struct with RSS configuration params under priv struct. There is no functional change here. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d930ac796fdb3eed62b0053297a728ced8fd58b1 Author: Aya Levin Date: Sun Oct 28 16:22:57 2018 +0200 net/mlx5e: Refactor TIR configuration function Refactor mlx5e_build_indir_tir_ctx_hash for better code re-use. TIR stands for Transport Interface Receive, which is responsible for all transport related operations on the receive side. Added a static array with TIR default configuration values. This separates configuration values from command setting, which is needed for downstream patch. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 30bc0b9881f3a3bbe4e20c2176c53c34fcc287a5 Author: Bjorn Andersson Date: Mon Dec 3 10:33:30 2018 -0800 clk: qcom: gcc-msm8998: Add clkref clocks Add clkref clocks for usb3, hdmi, ufs, pcie, and usb2. They are all sourced off CXO_IN, so parent them off "xo" until a proper link to the rpmcc can be described in DT. Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 2abf856202fd3e4883e4c518acaa9a023b0dbe54 Author: Bjorn Andersson Date: Mon Dec 3 10:33:29 2018 -0800 clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Drop the halt check of the UFS symbol clocks, in accordance with other platforms. This makes clk_disable_unused() happy and makes it possible to turn the clocks on again without an error. Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit b0d2e8a0cde9dc6cd0154b15f4a58462878e87e8 Author: Bjorn Andersson Date: Mon Dec 3 10:33:28 2018 -0800 clk: qcom: gcc-msm8998: Drop hmss_dvm and lpass_at Disabling gcc_hmss_dvm_bus_clk and gcc_lpass_at_clk causes the board to lock up, and by that preventing the kernel to boot without clk_ignore_unused. gcc_hmss_dvm_bus_clk is marked always-on downstream, but not referenced, and gcc_lpass_at_clk isn't mentioned. So let's remove them until they are needed by some client. Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit c0cb7c7e716471136b43760778c95eacaa54449a Author: Jeffrey Hugo Date: Tue Dec 4 08:13:22 2018 -0700 clk: qcom: Enumerate remaining msm8998 resets The current list of defined resets is incomplete compared to what the hardware implements. Enumerate the remaining resets according to the hardware documentation. Signed-off-by: Jeffrey Hugo Acked-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 65c9fab7bc4b3a103bcac248e148af4a2efc17fe Author: Baolin Wang Date: Wed Nov 14 17:07:05 2018 +0800 power: supply: sc27xx: Add fuel gauge calibration This patch adds support to read calibration values from the eFuse controller to calibrate the ADC values corresponding to current and voltage, which can make the current and voltage data more accurate. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 6be57bd2badfc05892f266076c6321c4a9c2431d Author: Baolin Wang Date: Wed Nov 14 17:07:04 2018 +0800 dt-bindings: power: supply: Add nvmem properties to calibrate FGU Add nvmem properties to calibrate FGU from eFuse controller. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 11832328c5640d2dd25e8f909b3142252379737f Author: Stephen Boyd Date: Wed Dec 5 15:48:45 2018 -0800 clk: qcom: Add xo dummy clk on msm8998 We have this dummy factor clk in place to workaround a missing rpm clk driver that can manage the XO clk state. Add it in to match what we do on msm8996. Cc: Jeffrey Hugo Cc: Marc Gonzalez Tested-by: Jeffrey Hugo Signed-off-by: Stephen Boyd commit 467e8a516dcf922d1ea343cebb0e751f81f0dca3 Merge: 818182dd1097f 4377d4e0d3d51 Author: Dave Airlie Date: Thu Dec 6 08:09:33 2018 +1000 Merge tag 'drm-intel-next-2018-12-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Final drm/i915 changes for v4.21: - ICL DSI video mode enabling (Madhav, Vandita, Jani, Imre) - eDP sink count fix (José) - PSR fixes (José) - DRM DP helper and i915 DSC enabling (Manasi, Gaurav, Anusha) - DP FEC enabling (Anusha) - SKL+ watermark/ddb programming improvements (Ville) - Pixel format fixes (Ville) - Selftest updates (Chris, Tvrtko) - GT and engine workaround improvements (Tvrtko) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87va496uoe.fsf@intel.com commit 1db8c142b6c557a951e8f9866b98953fe91cbdd6 Author: Sharat Masetty Date: Thu Nov 29 15:35:20 2018 +0530 drm/scheduler: Add drm_sched_suspend/resume_timeout() This patch adds two new functions to help client drivers suspend and resume the scheduler job timeout. This can be useful in cases where the hardware has preemption support enabled. Using this, it is possible to have the timeout active only for the ring which is active on the ringbuffer. This patch also makes the job_list_lock IRQ safe. Suggested-by: Christian Koenig Signed-off-by: Sharat Masetty Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9afd07566b6c908324cb4072102e2ce96bce986a Author: Sharat Masetty Date: Thu Nov 29 15:35:19 2018 +0530 drm/scheduler: Set sched->thread to NULL on failure In cases where the scheduler instance is used as a base object of another driver object, it's not clear if the driver can call scheduler cleanup on the fail path. So, Set the sched->thread to NULL, so that the driver can safely call drm_sched_fini() during cleanup. Signed-off-by: Sharat Masetty Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 872bcf83ec0ae266ebf3359061fc77a53b2ac5d7 Author: Baolin Wang Date: Mon Nov 12 18:52:38 2018 +0800 power: supply: sc2731_charger: Free battery information Free battery information in case of adding battery OCV tables. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit a8aaff6be08921f1d200170ce02d36cec0e2300d Author: Baolin Wang Date: Mon Nov 12 18:52:37 2018 +0800 power: supply: sc2731_charger: Avoid repeated charge/discharge Add info->charging validation to avoid repeated charge or discharge operation. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 18c807dbf9d6dabd624b2f4dcf5c668a42567c15 Author: Baolin Wang Date: Mon Nov 12 18:52:36 2018 +0800 power: supply: sc2731_charger: Add charger status detection The USB charger status can be notified before the charger driver registers the USB phy notifier, so we should check the charger status in probe() in case we missed the USB charger notification. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 8288b2e5ae01cabd078836618fd651574343cbfc Author: Wen Yang Date: Wed Dec 5 15:43:19 2018 +0800 drm/amdgpu/acpi: NULL check before some freeing functions is not needed kfree(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix the ifnullfree.cocci warnings. Reviewed-by: Lyude Paul Signed-off-by: Wen Yang CC: Alex Deucher CC: christian.koenig@amd.com CC: "David (ChunMing) Zhou" CC: David Airlie (maintainer:DRM DRIVERS) CC: Lyude Paul CC: Rex Zhu CC: Jim Qu CC: amd-gfx@lists.freedesktop.org CC: dri-devel@lists.freedesktop.org Signed-off-by: Alex Deucher commit d4295e12796e747f9a624a56cd54de51fb2b3bdd Author: Leo Li Date: Thu Nov 22 09:39:17 2018 -0500 drm/amd/include: Add mmhub 9.4 reg offsets and shift-mask In particular, we need the mmMC_VM_XGMI_LFB_CNTL register, for determining if xGMI is enabled on VG20. This will be used by DC to determine the correct spread spectrum adjustment for display and audio clocks. Reviewed-by: Alex Deucher Signed-off-by: Leo Li Signed-off-by: Alex Deucher commit 223577753b54acf0033de9585340909a0ef05e68 Author: Alex Deucher Date: Sun Dec 2 21:47:42 2018 -0500 drm/amdgpu/si: fix SI after doorbell rework SI does not use doorbells, move asic doorbell init later asic check. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=108920 Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit de4aaab5cc9770a8c4dc13d9bfb6a83b06bba57e Author: Alex Deucher Date: Thu Nov 29 19:22:07 2018 -0500 drm/amdgpu/powerplay: fix clock stretcher limits on polaris (v2) Adjust limits for newer polaris variants. v2: fix polaris11 kicker (Jerry) Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 7d98e1e7ee9c8a083936547eadc2b0e46d43cb96 Author: Alex Deucher Date: Thu Nov 29 19:20:28 2018 -0500 drm/amdgpu/powerplay: fix mclk switch limit on polaris Update switch limit on newer polaris variants. This may fix flickering with high refresh rates with mclk switching enabled. Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 0cf5eb76e2b453b3d159082eb4707c03a1686cf7 Author: David Francis Date: Fri Nov 30 09:57:06 2018 -0500 drm/amd/display: Add tracing to dc [Why] Tracing is a useful and cheap debug functionality [How] This creates a new trace system amdgpu_dm, currently with three trace events amdgpu_dc_rreg and amdgpu_dc_wreg report the address and value of any dc register reads and writes amdgpu_dc_performance requires at least one of those two to be enabled. It counts the register reads and writes since the last entry v2: Don't check for NULL before kfree Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8ac1091ed18b4a6cb0dc2cd5653f080736f89392 Author: Baolin Wang Date: Mon Nov 12 18:52:35 2018 +0800 power: supply: sc2731_charger: Add one work to charge/discharge Since the USB notifier context is atomic, we can not start or stop charging in atomic context. Thus this patch adds one work to help to charge or discharge. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit ff4dd232ec45a0e45ea69f28f069f2ab22b4908a Author: Paul Burton Date: Tue Dec 4 23:44:12 2018 +0000 MIPS: Expand MIPS32 ASIDs to 64 bits ASIDs have always been stored as unsigned longs, ie. 32 bits on MIPS32 kernels. This is problematic because it is feasible for the ASID version to overflow & wrap around to zero. We currently attempt to handle this overflow by simply setting the ASID version to 1, using asid_first_version(), but we make no attempt to account for the fact that there may be mm_structs with stale ASIDs that have versions which we now reuse due to the overflow & wrap around. Encountering this requires that: 1) A struct mm_struct X is active on CPU A using ASID (V,n). 2) That mm is not used on CPU A for the length of time that it takes for CPU A's asid_cache to overflow & wrap around to the same version V that the mm had in step 1. During this time tasks using the mm could either be sleeping or only scheduled on other CPUs. 3) Some other mm Y becomes active on CPU A and is allocated the same ASID (V,n). 4) mm X now becomes active on CPU A again, and now incorrectly has the same ASID as mm Y. Where struct mm_struct ASIDs are represented above in the format (version, EntryHi.ASID), and on a typical MIPS32 system version will be 24 bits wide & EntryHi.ASID will be 8 bits wide. The length of time required in step 2 is highly dependent upon the CPU & workload, but for a hypothetical 2GHz CPU running a workload which generates a new ASID every 10000 cycles this period is around 248 days. Due to this long period of time & the fact that tasks need to be scheduled in just the right (or wrong, depending upon your inclination) way, this is obviously a difficult bug to encounter but it's entirely possible as evidenced by reports. In order to fix this, simply extend ASIDs to 64 bits even on MIPS32 builds. This will extend the period of time required for the hypothetical system above to encounter the problem from 28 days to around 3 trillion years, which feels safely outside of the realms of possibility. The cost of this is slightly more generated code in some commonly executed paths, but this is pretty minimal: | Code Size Gain | Percentage -----------------------|----------------|------------- decstation_defconfig | +270 | +0.00% 32r2el_defconfig | +652 | +0.01% 32r6el_defconfig | +1000 | +0.01% I have been unable to measure any change in performance of the LMbench lat_ctx or lat_proc tests resulting from the 64b ASIDs on either 32r2el_defconfig+interAptiv or 32r6el_defconfig+I6500 systems. Signed-off-by: Paul Burton Suggested-by: James Hogan References: https://lore.kernel.org/linux-mips/80B78A8B8FEE6145A87579E8435D78C30205D5F3@fzex.ruijie.com.cn/ References: https://lore.kernel.org/linux-mips/1488684260-18867-1-git-send-email-jiwei.sun@windriver.com/ Cc: Jiwei Sun Cc: Yu Huabing Cc: stable@vger.kernel.org # 2.6.12+ Cc: linux-mips@vger.kernel.org commit 16ad9501b1f2edebe24f8cf3c09da0695871986b Author: Jonathan Marek Date: Wed Nov 21 21:32:25 2018 -0500 firmware: qcom: scm: fix compilation error when disabled This fixes the case when CONFIG_QCOM_SCM is not enabled, and linux/errno.h has not been included previously. Signed-off-by: Jonathan Marek Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit e6ae9a05a41abdb80b4d93574e84609a35cfb98c Author: Claudiu.Beznea@microchip.com Date: Mon Nov 5 11:14:31 2018 +0000 power: reset: at91-poweroff: remove at91_ramc_of_match Remove at91_ramc_of_match[] since it is not used anywhere in this code. Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel commit 996463fdb8cdec453a8b56ab6956da40a5af1360 Author: Claudiu.Beznea@microchip.com Date: Mon Nov 5 11:14:23 2018 +0000 power: reset: at91-poweroff: use one poweroff function for at91-poweroff Use only one poweroff function and adapt it to work for both scenarios (with LPDDR or not). The assignement of pm_power_off was moved at the end of probe after all initializations are OK. This patch adapt the idea from commit 4e018c1e9b05 ("power: reset: at91-poweroff: use only one poweroff function"). Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel commit 1d596472429cdb223f074c1dd02e3f777d3c8936 Author: Tony Lindgren Date: Wed Dec 5 14:08:21 2018 -0800 ARM: dts: Add missing ranges for am437x mcasp l3 ports We need to add mcasp l3 port ranges for mcasp to use a correct l3 data port address for dma. Fixes: d95adfd45853 ("ARM: dts: am437x: Move l4 child devices to probe them with ti-sysc") Reported-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit d0717d73be810f8c814048502f36cf4e10fe5fce Author: Heiko Stuebner Date: Tue Nov 13 13:47:53 2018 +0100 power: supply: bq24190_charger: add support for bq24196 variant The bq24196 is another variant of the bq24190 charger ic. Its register set is identical to the bq24192 and it even reuses the same part number (0x5). Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 4be1eaf322f07bb9694618fd2763a3a1f0a3dd25 Author: Nicholas Mc Guire Date: Fri Nov 23 17:12:58 2018 +0100 pinctrl: nuvoton: check for devm_kasprintf() failure devm_kasprintf() may return NULL on failure of internal allocation thus the assignment to .label is not safe if not checked. On error npcm7xx_gpio_of() returns negative values so -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here. Signed-off-by: Nicholas Mc Guire Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver") Signed-off-by: Linus Walleij commit 161a2135e08274a6fa9742e1c020d8138d0032a1 Author: Brian Masney Date: Wed Oct 31 20:11:46 2018 -0400 power: supply: bq24190_charger: add extcon support for USB OTG Add extcon support so that we can notify USB drivers of cable state changes. Based on work from Jonathan Marek. USB OTG was tested on a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Signed-off-by: Sebastian Reichel commit a53f79534f4ef418640b0f5c61500069de442e16 Author: Vladimir Zapolskiy Date: Thu Nov 22 22:19:41 2018 +0200 gpio: rcar: reference device instead of platform device The change simplifies dereferences to the mediated struct device, also it allows to limit the scope of the platform device usage to probe and remove functions only. Non-functional change. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij commit 74d09c927cb69bd10c63e0c6dd3d1c71709ee7ea Author: Jonathan Marek Date: Wed Oct 31 20:11:45 2018 -0400 power: supply: bq24190_charger: add of_match for usb-otg-vbus regulator This patch adds an of_match for the usb-otg-vbus regulator to bq24190_charger. Signed-off-by: Jonathan Marek Signed-off-by: Brian Masney Signed-off-by: Sebastian Reichel commit 5ea67bb0b090033750a91325448dbee1d5b58b01 Author: Jonathan Marek Date: Wed Oct 31 20:11:44 2018 -0400 power: supply: bq24190_charger: add support for bq24192 variant This patch adds support for the bq24192 variant to bq24190_charger. Signed-off-by: Jonathan Marek [masneyb@onstation.org: Changed if statement to a switch based on feedback from Sebastian Reichel.] Signed-off-by: Brian Masney Signed-off-by: Sebastian Reichel commit 8e49c0b4bbe9482a26e8ad26a99ee99b806f6ac4 Author: Brian Masney Date: Wed Oct 31 20:11:43 2018 -0400 dt-bindings: power: supply: bq24190_charger: add bq24192 and usb-otg-vbus Add support for the ti,bq24192 variant and a child node for the usb-otg-vbus regulator. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 9afe62509b329dbd973b8fdcdf168ddc5b5098cb Author: Alexandre Belloni Date: Fri Nov 9 20:57:00 2018 +0100 power: reset: ocelot: switch the SI to boot mode Switch the SI to boot mode so on a warm reboot, the SI is able to access the flash. Signed-off-by: Alexandre Belloni Signed-off-by: Sebastian Reichel commit 76ee875c2f48c57cbafa35d9c3b34e7202a45a83 Author: Heiko Stuebner Date: Sun Nov 11 22:45:38 2018 +0100 power: reset: gpio-poweroff: add ability to specific active and inactive delays Similar to gpio-reset allow to specify active and inactive delays while keeping the 100ms defaults that were used previously all the time. The dt-properties are named the same as in gpio-reset but get an "-ms" suffix as properties should contain such a suffix specifying its unit. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Reviewed-by: Moritz Fischer Signed-off-by: Sebastian Reichel commit ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d Author: Ondrej Mosnacek Date: Fri Nov 30 16:24:08 2018 +0100 selinux: overhaul sidtab to fix bug and improve performance Before this patch, during a policy reload the sidtab would become frozen and trying to map a new context to SID would be unable to add a new entry to sidtab and fail with -ENOMEM. Such failures are usually propagated into userspace, which has no way of distignuishing them from actual allocation failures and thus doesn't handle them gracefully. Such situation can be triggered e.g. by the following reproducer: while true; do load_policy; echo -n .; sleep 0.1; done & for (( i = 0; i < 1024; i++ )); do runcon -l s0:c$i echo -n x || break # or: # chcon -l s0:c$i || break done This patch overhauls the sidtab so it doesn't need to be frozen during policy reload, thus solving the above problem. The new SID table leverages the fact that SIDs are allocated sequentially and are never invalidated and stores them in linear buckets indexed by a tree structure. This brings several advantages: 1. Fast SID -> context lookup - this lookup can now be done in logarithmic time complexity (usually in less than 4 array lookups) and can still be done safely without locking. 2. No need to re-search the whole table on reverse lookup miss - after acquiring the spinlock only the newly added entries need to be searched, which means that reverse lookups that end up inserting a new entry are now about twice as fast. 3. No need to freeze sidtab during policy reload - it is now possible to handle insertion of new entries even during sidtab conversion. The tree structure of the new sidtab is able to grow automatically to up to about 2^31 entries (at which point it should not have more than about 4 tree levels). The old sidtab had a theoretical capacity of almost 2^32 entries, but half of that is still more than enough since by that point the reverse table lookups would become unusably slow anyway... The number of entries per tree node is selected automatically so that each node fits into a single page, which should be the easiest size for kmalloc() to handle. Note that the cache for reverse lookup is preserved with equivalent logic. The only difference is that instead of storing pointers to the hash table nodes it stores just the indices of the cached entries. The new cache ensures that the indices are loaded/stored atomically, but it still has the drawback that concurrent cache updates may mess up the contents of the cache. Such situation however only reduces its effectivity, not the correctness of lookups. Tested by selinux-testsuite and thoroughly tortured by this simple stress test: ``` function rand_cat() { echo $(( $RANDOM % 1024 )) } function do_work() { while true; do echo -n "system_u:system_r:kernel_t:s0:c$(rand_cat),c$(rand_cat)" \ >/sys/fs/selinux/context 2>/dev/null || true done } do_work >/dev/null & do_work >/dev/null & do_work >/dev/null & while load_policy; do echo -n .; sleep 0.1; done kill %1 kill %2 kill %3 ``` Link: https://github.com/SELinuxProject/selinux-kernel/issues/38 Reported-by: Orion Poplawski Reported-by: Li Kun Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley [PM: most of sidtab.c merged by hand due to conflicts] [PM: checkpatch fixes in mls.c, services.c, sidtab.c] Signed-off-by: Paul Moore commit 037602705109ec2ab96340bea93ad87daa3ac046 Author: Max Filippov Date: Wed Dec 5 12:48:19 2018 -0800 xtensa: don't use l32r opcode directly xtensa assembler is capable of representing register loads with either movi + addmi, l32r or const16, depending on the core configuration. Don't use '.literal' and 'l32r' directly in the code, use 'movi' and let the assembler relax them. Signed-off-by: Max Filippov commit f24fcff1d267da08c4bbb3869e7f4b36ce916b76 Author: Benjamin Gaignard Date: Wed Nov 14 10:00:25 2018 +0100 hwspinlock: add STM32 hwspinlock device This patch adds support of hardware semaphores for stm32mp1 SoC. The hardware block provides 32 semaphores. Signed-off-by: Benjamin Gaignard Signed-off-by: Benjamin Gaignard Signed-off-by: Bjorn Andersson commit b3e46d1a0590500335f0b95e669ad6d84b12b03a Author: Rob Herring Date: Mon Aug 27 08:37:06 2018 -0500 of: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Frank Rowand Cc: Pantelis Antoniou Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit 6c9e3e80c526155b14c6af6f55653677707c822b Author: Benjamin Gaignard Date: Wed Nov 14 10:00:24 2018 +0100 dt-bindings: hwlock: Document STM32 hwspinlock bindings Add bindings for STM32 hardware spinlock device Reviewed-by: Rob Herring Signed-off-by: Benjamin Gaignard Signed-off-by: Benjamin Gaignard Signed-off-by: Bjorn Andersson commit 24ed7fdae669feda4c5e0dadba2467c4c0d297d3 Author: Ondrej Mosnacek Date: Fri Nov 30 16:24:07 2018 +0100 selinux: use separate table for initial SID lookup This moves handling of initial SIDs into a separate table. Note that the SIDs stored in the main table are now shifted by SECINITSID_NUM and converted to/from the actual SIDs transparently by helper functions. This change doesn't make much sense on its own, but it simplifies further sidtab overhaul in a succeeding patch. Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley [PM: fixed some checkpatch warnings on line length, whitespace] Signed-off-by: Paul Moore commit d42925189b416b1559f3d74d663fa16c29942d96 Author: Ryder Lee Date: Wed Dec 5 14:41:10 2018 +0800 clk: mediatek: fix the PCIe MAC clock parent The PCIe function doesn't work as the clock tree of MAC layer is wrong. Hence fix the clock table. Fixes: 3b5e748615e7 ("clk: mediatek: add clock support for MT7629 SoC") Signed-off-by: Ryder Lee Signed-off-by: Stephen Boyd commit a53a68cee88a4d892bdfcc793a661ced81cd1f56 Author: Baolin Wang Date: Fri Nov 16 19:01:11 2018 +0800 power: supply: charger-manager: Make code more readable Make code more readable. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit f25a646fbe2051527ad9721853e892d13a99199e Author: Baolin Wang Date: Fri Nov 16 19:01:10 2018 +0800 power: supply: charger-manager: Fix incorrect return value Fix incorrect return value. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 8c13b6f18a6fee9a3128b4db3f68e5fc86a6883e Author: Baolin Wang Date: Fri Nov 16 19:01:09 2018 +0800 power: supply: charger-manager: Fix some misspelled words Fix some misspelled words. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 1dd3509929dca131702ce46e3176c6641a8a93c5 Author: Baolin Wang Date: Fri Nov 16 19:01:08 2018 +0800 power: supply: charger-manager: Remove unused index counting Remove unused index counting. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit e259e04748e2798a747d9c363ded50514b15a7b9 Author: Biju Das Date: Wed Dec 5 09:06:52 2018 +0000 ARM: dts: r8a7744-iwg20m: Add SPI NOR support Add support for the SPI NOR device used to boot up the system to the iWave RZ/G1N Qseven System On Module DT. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 4fbd4158fe8967e9296516ebae2cfaf7a1c7a214 Author: Laurent Pinchart Date: Sun Nov 25 16:40:30 2018 +0200 arm64: dts: renesas: r8a77995: draak: Add backlight Add the backlight device for the LVDS1 output, in preparation for panel support. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b255e500c8dc111dd9efac1442a85a0dac913feb Author: Jakub Kicinski Date: Mon Dec 3 17:43:28 2018 -0800 net: documentation: build a directory structure for drivers Documentation/networking/ is full of cryptically named files with driver documentation. This makes finding interesting information at a glance really hard. Move all those files into a directory called device_drivers (since not all drivers are for device) and fix up references. RFC v0.1 -> RFC v1: - also add .txt suffix to the files which are missing it (Quentin) Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: David Ahern Acked-by: Henrik Austad Signed-off-by: David S. Miller commit b72ce26cb73afd042d65f737971f560a491e1275 Author: Biju Das Date: Wed Dec 5 09:06:51 2018 +0000 ARM: dts: iwg20d-q7-common: Move cmt/rwdt node out of RZ/G1M SOM The iWave RZ/G1N board is almost identical to RZ/G1M. cmt and rwdt modules are SoC specific and should be part of board dts rather than SoM dtsi. By moving these nodes to the common dtsi it allows cmt and rwdt to be enabled on both of these boards with less lines of code. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 3c28b91380dd1183347d32d87d820818031ebecf Author: Andreas Pape Date: Fri Nov 23 11:14:54 2018 -0500 media: stkwebcam: Bugfix for wrong return values usb_control_msg returns in case of a successfully sent message the number of sent bytes as a positive number. Don't use this value as a return value for stk_camera_read_reg, as a non-zero return value is used as an error condition in some cases when stk_camera_read_reg is called. Signed-off-by: Andreas Pape Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit 2bf47eefca6de0547e866c05935c592ed7ea06f6 Author: Andreas Pape Date: Fri Nov 23 11:14:52 2018 -0500 media: stkwebcam: Support for ASUS A6VM notebook added. The ASUS A6VM notebook has a built in stk11xx webcam which is mounted in a way that the video is vertically and horizontally flipped. Therefore this notebook is added to the special handling in the driver to automatically flip the video into the correct orientation. Signed-off-by: Andreas Pape Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit bcebf81255a71b34541bc00bcb505e815193f0be Author: Mauro Carvalho Chehab Date: Wed Dec 5 13:42:30 2018 -0500 media: rockchip/vpu: fix a few alignments As reported by checkpatch.pl, some function calls have a wrong alignment. Signed-off-by: Mauro Carvalho Chehab commit 775fec69008d30ed5e4ce9fa7701c5591e424c87 Author: Ezequiel Garcia Date: Wed Dec 5 11:09:52 2018 -0500 media: add Rockchip VPU JPEG encoder driver Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fix checkpatch.pl alignment warning] Signed-off-by: Mauro Carvalho Chehab commit 7f22507b1397acd90481d79085c902789b62157f Author: Ezequiel Garcia Date: Fri Nov 30 12:34:30 2018 -0500 media: dt-bindings: Document the Rockchip VPU bindings Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bb2203d5f10bb8b2da16db1a1f357ff1178a5b9f Author: Matthias Kaehlcke Date: Wed Oct 3 17:24:09 2018 -0700 arm64: dts: qcom: sdm845: Add UART nodes This adds nodes for all possible UARTs to sdm845.dtsi. By default only configure the RX/TX lines with pinctrl. Boards that use UARTs with flow control can overwrite the configuration in the .dtsi. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 14a4467a0a5eacb2ebbe3aab1b4e25af3519c76a Merge: 14c9dfec34098 0072a0c14d5b7 Author: Mauro Carvalho Chehab Date: Wed Dec 5 13:16:24 2018 -0500 Merge commit '0072a0c14d5b7cb72c611d396f143f5dcd73ebe2' into patchwork Merge from Upstream after the latest media fixes branch, because we need one patch that it is there. * commit '0072a0c14d5b7cb72c611d396f143f5dcd73ebe2': (1108 commits) ide: Change to use DEFINE_SHOW_ATTRIBUTE macro ide: pmac: add of_node_put() drivers/tty: add missing of_node_put() drivers/sbus/char: add of_node_put() sbus: char: add of_node_put() Linux 4.20-rc5 PCI: Fix incorrect value returned from pcie_get_speed_cap() MAINTAINERS: Update linux-mips mailing list address ocfs2: fix potential use after free mm/khugepaged: fix the xas_create_range() error path mm/khugepaged: collapse_shmem() do not crash on Compound mm/khugepaged: collapse_shmem() without freezing new_page mm/khugepaged: minor reorderings in collapse_shmem() mm/khugepaged: collapse_shmem() remember to clear holes mm/khugepaged: fix crashes due to misaccounted holes mm/khugepaged: collapse_shmem() stop if punched or truncated mm/huge_memory: fix lockdep complaint on 32-bit i_size_read() mm/huge_memory: splitting set mapping+index before unfreeze mm/huge_memory: rename freeze_page() to unmap_page() initramfs: clean old path before creating a hardlink ... commit 80fca773bf810bdc89c6876e9138e18a5d58b6ad Author: Colin Ian King Date: Wed Oct 31 18:48:41 2018 +0000 power: supply: cpcap-charger: clean an indentation issue, remove tab Trivial fix to clean up indentation issue, remove an extraneous tab Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit 8f01c45a0fb7e6b96eb210d9d28772e8ef04b0a7 Merge: a95761d6d2618 7693b5643fd2d Author: Sebastian Reichel Date: Wed Dec 5 18:52:09 2018 +0100 Merge tag 'psy-mfd-axp813-immutable-for-v4.21-signed' into psy-next Immutable branch between mfd and power-supply for driver changes related to axp813. Signed-off-by: Sebastian Reichel commit 7693b5643fd2d682de90733b67fc8032b9646911 Author: Oskari Lemmela Date: Tue Nov 20 19:52:09 2018 +0200 power: supply: add AC power supply driver for AXP813 AXP813 and AXP803 PMICs can control input current and minimum voltage. Both of these values are configurable. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Acked-by: Lee Jones Signed-off-by: Sebastian Reichel commit 89d21972da2b16c6acd1d07baed220ed843bd096 Author: Oskari Lemmela Date: Tue Nov 20 19:52:04 2018 +0200 dt-bindings: power: supply: axp20x: add AXP813 AC power DT binding The AXP803/AXP813 AC power supply can limit input current and voltage. Signed-off-by: Oskari Lemmela Reviewed-by: Rob Herring Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Reviewed-by: Sebastian Reichel Tested-by: Vasily Khoruzhick Signed-off-by: Sebastian Reichel commit a95761d6d2618d0d3d70b0776c624f6ca7157a22 Author: Olliver Schinagl Date: Mon Nov 26 17:27:55 2018 +0200 power: supply: axp288: use the BIT() macro Make use of the recommended BIT() macro for bit defines. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Sebastian Reichel commit 57428f6f8ace92ed6eb64591bcff453b161e06e3 Author: Olliver Schinagl Date: Mon Nov 26 17:27:54 2018 +0200 power: supply: axp20x: add missing include bitops.h The axp20x_usb_power driver uses BIT() operations but lacks the include for it. Include the bitops.h header file. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Sebastian Reichel commit 7265c3cbbf9f038016b358b8e529a6a367f1af53 Author: Matti Vaittinen Date: Tue Dec 4 13:39:06 2018 +0200 clk: apcs-msm8916: simplify probe cleanup by using devm use devm variant for of_provider registration. Signed-off-by: Matti Vaittinen [sboyd@kernel.org: Drop unused parent pointer] Signed-off-by: Stephen Boyd commit 654dea6ec4f1a590fb6775b91b562f0ebdaff336 Author: Matti Vaittinen Date: Tue Dec 4 13:38:32 2018 +0200 clk: clk-twl6040: Free of_provider at remove use devm variant for of_provider registration so provider is freed at exit. Signed-off-by: Matti Vaittinen Acked-by: Peter Ujfalusi Signed-off-by: Stephen Boyd commit 252246674f55acad58312cfa036e7e65068dfb31 Author: Matti Vaittinen Date: Tue Dec 4 13:38:03 2018 +0200 clk: rk808: use managed version of of_provider registration Simplify clean-up for rk808 by using managed version of of_provider registration. Signed-off-by: Matti Vaittinen Signed-off-by: Stephen Boyd commit 1efadbf2fd37d22e1368b8ff35ad9d1f6af146bc Author: Matti Vaittinen Date: Tue Dec 4 13:37:29 2018 +0200 clk: clk-hi655x: Free of_provider at remove use devm variant for of_provider registration so provider is freed at exit. Signed-off-by: Matti Vaittinen Signed-off-by: Stephen Boyd commit 05502bf9eb7a7297f5fa6f1d17b169b3d5b53570 Author: Matti Vaittinen Date: Tue Dec 4 13:34:53 2018 +0200 clk: of-provider: look at parent if registered device has no provider info It seems to be usual for MFD devices that the created 'clock sub-device' do not have own DT node. The clock provider information is usually in the main device node which is owned by the MFD device. Change the devm variant of clk of-provider registration to check the parent device node if given device has no own node or if the node does not contain the #clock-cells property. In such case use the parent node if it contains the #clock-cells. Signed-off-by: Matti Vaittinen [sboyd@kernel.org: Add some comment in the code and pull out logic into a single function to return the provider device_node pointer] Signed-off-by: Stephen Boyd commit 21afaf181362b4aeb5be72705d2914673b336149 Author: Borislav Petkov Date: Sun Nov 18 15:15:05 2018 +0100 x86/mce: Streamline MCE subsystem's naming Rename the containing folder to "mce" which is the most widespread name. Drop the "mce[-_]" filename prefix of some compilation units (while others don't have it). This unifies the file naming in the MCE subsystem: mce/ |-- amd.c |-- apei.c |-- core.c |-- dev-mcelog.c |-- genpool.c |-- inject.c |-- intel.c |-- internal.h |-- Makefile |-- p5.c |-- severity.c |-- therm_throt.c |-- threshold.c `-- winchip.c No functional changes. Signed-off-by: Borislav Petkov Reviewed-by: Ingo Molnar Acked-by: Tony Luck Link: https://lkml.kernel.org/r/20181205141323.14995-1-bp@alien8.de commit afe120c777b7a6aa23b8c8a5fedae9201a7ced0c Author: Dan Carpenter Date: Fri Nov 23 10:15:05 2018 +0300 ic3: off by one in mode_show() This should be >= ARRAY_SIZE() to avoid reading one element beyond the end of the array. Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Dan Carpenter Signed-off-by: Boris Brezillon commit 840414ae59d8858bca0a704e7f9c910d661348d7 Author: Dan Carpenter Date: Fri Nov 23 10:14:42 2018 +0300 i3c: fix an error code in i3c_master_add_i3c_dev_locked() We should return "ret" as-is. The "newdev" variable is a valid pointer. Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Dan Carpenter Signed-off-by: Boris Brezillon commit 2b2b283c059617e1be6b49872fd004b59c66594a Author: Colin Ian King Date: Fri Nov 16 18:42:23 2018 +0000 i3c: master: dw: fix mask operation by using the correct operator The masking operation on status is using a bitwise 'or' rather than a bitwise 'and' operator, and hence the result is always non-zero which is probably not what is intended. Fix this by using the correct operator. Detected by CoverityScan, CID#1475523 ("Wrong operator used") Fixes: 88acc98a712a ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Colin Ian King Acked-by: Vitor Soares Signed-off-by: Boris Brezillon commit 16da99cf0e4d7ccaebe6c095ee31abfeb4025ee5 Author: Vitor Soares Date: Tue Nov 13 14:09:53 2018 +0000 MAINTAINERS: Add myself as the dw-i3c-master module maintainer Create for the DesignWare I3C master driver and add myself as the maintainer of this driver. Signed-off-by: Vitor Soares Signed-off-by: Boris Brezillon commit 116e246a8bcd5ace5cac887228afe60152b30d10 Author: Vitor Soares Date: Tue Nov 13 14:09:52 2018 +0000 dt-binding: i3c: Document Synopsys DesignWare I3C Document Synopsys DesignWare I3C master module Signed-off-by: Vitor Soares Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon commit 1dd728f5d4d4b8b53196c1e0fcf86bbaaee39cef Author: Vitor Soares Date: Tue Nov 13 14:09:51 2018 +0000 i3c: master: Add driver for Synopsys DesignWare IP Add driver for Synopsys DesignWare I3C master IP Signed-off-by: Vitor Soares Signed-off-by: Boris Brezillon commit ad15e8c0fafa4f9acdc756df6b0c5f2b3a70d2c9 Author: YueHaibing Date: Wed Nov 14 06:10:47 2018 +0000 i3c: master: Remove set but not used variable 'old_i3c_scl_lim' Fixes gcc '-Wunused-but-set-variable' warning: drivers/i3c/master/i3c-master-cdns.c: In function 'cdns_i3c_master_do_daa': drivers/i3c/master/i3c-master-cdns.c:1137:16: warning: variable 'old_i3c_scl_lim' set but not used [-Wunused-but-set-variable] It never used since introdution in commit acfab7d324b2 ("i3c: master: Add driver for Cadence IP") Signed-off-by: YueHaibing Signed-off-by: Boris Brezillon commit e29d0d9c90c9592dea18d0a838fffc85d6e3d028 Author: Boris Brezillon Date: Fri Jul 21 12:22:23 2017 +0200 dt-bindings: i3c: Document Cadence I3C master bindings Document Cadence I3C master DT bindings. Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring Reviewed-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman commit 603f2bee2c5419f6bcccc53be7f1f643122c97b7 Author: Boris Brezillon Date: Wed Jul 19 11:53:04 2017 +0200 i3c: master: Add driver for Cadence IP Add a driver for Cadence I3C master IP. Signed-off-by: Boris Brezillon Reviewed-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman commit 4f26d06669619b960aa7246378dcdf1690c97384 Author: Boris Brezillon Date: Fri Mar 23 11:38:16 2018 +0100 MAINTAINERS: Add myself as the I3C subsystem maintainer Create an entry for the I3C subsystem and mark it as maintained by me. There's no official git repository, patchwork instance, mailing list or website yet, but this will be added after the subsystem has been accepted. Signed-off-by: Boris Brezillon Acked-by: Greg Kroah-Hartman commit 51eb78098ab79bba8b1df24da2304e61deb74629 Author: tom Date: Tue Dec 4 18:27:34 2018 +0000 iommu: Change tlb_range_add to iotlb_range_add and tlb_sync to iotlb_sync Someone forgot to update this comment. Signed-off-by: Tom Murphy Signed-off-by: Joerg Roedel commit 30da46b5dc3a9a14db11706d841440e28b12bb53 Author: Quentin Monnet Date: Wed Dec 5 10:28:24 2018 +0000 tools: bpftool: add a command to dump the trace pipe BPF programs can use the bpf_trace_printk() helper to print debug information into the trace pipe. Add a subcommand "bpftool prog tracelog" to simply dump this pipe to the console. This is for a good part copied from iproute2, where the feature is available with "tc exec bpf dbg". Changes include dumping pipe content to stdout instead of stderr and adding JSON support (content is dumped as an array of strings, one per line read from the pipe). This version is dual-licensed, with Daniel's permission. Cc: Daniel Borkmann Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 14c9dfec340988457ef0071208adf74774ae1614 Author: Mauro Carvalho Chehab Date: Fri Nov 23 13:21:10 2018 -0500 media: pixfmt-meta-d4xx.rst: Add a license to it This file is a recent addition to media docs, and it is now the only one without any license. While the best is to dual-license with GFDL and GPL, it is, at least, compatible with GFDL, as this is a requirement to be part of the media uAPI docs. So, add such license to it. Signed-off-by: Mauro Carvalho Chehab commit f2ac8ce823dbaff1db7229cbf446a5516988870f Author: Mauro Carvalho Chehab Date: Thu Aug 30 10:20:04 2018 -0400 media: docs: brainless mass add SPDX headers to all media files All Documentation files outside the uAPI are all licensed with, at least, GPL 2.0. So, mark them as such. The ondes at media/uapi are at least GFDL 1.1+. Signed-off-by: Mauro Carvalho Chehab commit 70100e055cc0df392a155d5d95400fdc430a5f88 Author: Mauro Carvalho Chehab Date: Thu Aug 30 11:07:49 2018 -0400 media: svg files: dual-licence some files with GPL and GFDL Along the time, several image files got replaced by me by new ones with similar contents. As those were not simple conversions, dual-license them. Signed-off-by: Mauro Carvalho Chehab commit 82559ac0273a68addb15535899cb1662de50a586 Author: Mauro Carvalho Chehab Date: Thu Aug 30 10:15:26 2018 -0400 media: add SPDX header to media uAPI files All those files are under GFDL 1.1 or later, with no invariant sections. Tag them as such. Signed-off-by: Mauro Carvalho Chehab commit 18e6830a636cb61072c3ed970e1e4106df48ca29 Author: Mauro Carvalho Chehab Date: Thu Aug 30 10:09:48 2018 -0400 media: remove text encoding from rst files This is not needed there. Also, the same UTF-8 encoding should be used on all documents. Signed-off-by: Mauro Carvalho Chehab commit 41888179b1b7d0524314758ce1ad7c2e3b602235 Merge: 2a95471c33977 91fc957c9b1d6 Author: Daniel Borkmann Date: Wed Dec 5 16:36:29 2018 +0100 Merge branch 'bpf-jit-overridable-alloc' Ard Biesheuvel says: ==================== On arm64, modules are allocated from a 128 MB window which is close to the core kernel, so that relative direct branches are guaranteed to be in range (except in some KASLR configurations). Also, module_alloc() is in charge of allocating KASAN shadow memory when running with KASAN enabled. This means that the way BPF reuses module_alloc()/module_memfree() is undesirable on arm64 (and potentially other architectures as well), and so this series refactors BPF's use of those functions to permit architectures to change this behavior. Patch #1 breaks out the module_alloc() and module_memfree() calls into __weak functions so they can be overridden. Patch #2 implements the new alloc/free overrides for arm64 Changes since v3: - drop 'const' modifier for free() hook void* argument - move the dedicated BPF region to before the module region, putting it within 4GB of the module and kernel regions on non-KASLR kernels Changes since v2: - properly build time and runtime tested this time (log after the diffstat) - create a dedicated 128 MB region at the top of the vmalloc space for BPF programs, ensuring that the programs will be in branching range of each other (which we currently rely upon) but at an arbitrary distance from the kernel and modules (which we don't care about) Changes since v1: - Drop misguided attempt to 'fix' and refactor the free path. Instead, just add another __weak wrapper for the invocation of module_memfree() ==================== Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Rick Edgecombe Cc: Eric Dumazet Cc: Jann Horn Cc: Kees Cook Cc: Jessica Yu Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: "David S. Miller" Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Daniel Borkmann commit 91fc957c9b1d6c55168df15a397cbd1af16bc00f Author: Ard Biesheuvel Date: Fri Nov 23 23:18:04 2018 +0100 arm64/bpf: don't allocate BPF JIT programs in module memory The arm64 module region is a 128 MB region that is kept close to the core kernel, in order to ensure that relative branches are always in range. So using the same region for programs that do not have this restriction is wasteful, and preferably avoided. Now that the core BPF JIT code permits the alloc/free routines to be overridden, implement them by vmalloc()/vfree() calls from a dedicated 128 MB region set aside for BPF programs. This ensures that BPF programs are still in branching range of each other, which is something the JIT currently depends upon (and is not guaranteed when using module_alloc() on KASLR kernels like we do currently). It also ensures that placement of BPF programs does not correlate with the placement of the core kernel or modules, making it less likely that leaking the former will reveal the latter. This also solves an issue under KASAN, where shadow memory is needlessly allocated for all BPF programs (which don't require KASAN shadow pages since they are not KASAN instrumented) Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Daniel Borkmann commit dc002bb62f10c5905420f8b8a7d5ec0da567fc82 Author: Ard Biesheuvel Date: Fri Nov 23 23:18:03 2018 +0100 bpf: add __weak hook for allocating executable memory By default, BPF uses module_alloc() to allocate executable memory, but this is not necessary on all arches and potentially undesirable on some of them. So break out the module_alloc() and module_memfree() calls into __weak functions to allow them to be overridden in arch code. Signed-off-by: Ard Biesheuvel Signed-off-by: Daniel Borkmann commit 861c56c13d817b76e802d664e6ce7edb09cb9417 Author: Ben Hutchings Date: Fri Nov 23 13:38:34 2018 -0500 media: Documentation/media: uapi: Explicitly say there are no Invariant Sections The GNU Free Documentation License allows for a work to specify Invariant Sections that are not allowed to be modified. (Debian considers that this makes such works non-free.) The Linux Media Infrastructure userspace API documentation does not specify any such sections, but it also doesn't say there are none (as is recommended by the license text). Make it explicit that there are none. Signed-off-by: Aaro Koskinen Signed-off-by: Ben Hutchings Signed-off-by: Gerd Hoffmann Signed-off-by: Hans Verkuil Signed-off-by: Johannes Stezenbach Signed-off-by: Laurent Pinchart Signed-off-by: Marcus Metzler Signed-off-by: Michael Ira Krufky Signed-off-by: Ralph Metzler Signed-off-by: Sakari Ailus Signed-off-by: Sean Young Signed-off-by: Sylwester Nawrocki Cc: Thomas Gleixner Cc: Kate Stewart Signed-off-by: Mauro Carvalho Chehab commit 81fce6291d9999cee692e4118134a8c850b60857 Author: Lijun Ou Date: Sat Nov 24 16:49:22 2018 +0800 RDMA/hns: Add SRQ asynchronous event support This patch implements the process flow of SRQ asynchronous event. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit c7bcb13442e1bd8a4cc41c74540dd2e2f7058d16 Author: Lijun Ou Date: Sat Nov 24 16:49:21 2018 +0800 RDMA/hns: Add SRQ support for hip08 kernel mode This patch implements the SRQ(Share Receive Queue) verbs and update the poll cq verbs to deal with SRQ complentions. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 5c1f167af112746eb97621f12b4053d4f66c0357 Author: Lijun Ou Date: Sat Nov 24 16:49:20 2018 +0800 RDMA/hns: Init SRQ table for hip08 This patch inits hem resource for SRQ table, includes SRQWQE and SRQWQE index resource. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit d16da11992d44fb54d99b71408b201311d81e0af Author: Lijun Ou Date: Sat Nov 24 16:49:19 2018 +0800 RDMA/hns: Eanble SRQ capacity for hip08 This patch configures the flags for enabling the SRQ(Share Receive Queue) capacity as well as update the verb of querying device for setting srq specifications. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 901d32bc69f3423ad53947b992f973123faf2622 Author: Abhishek Goel Date: Wed Dec 5 17:01:04 2018 +0530 cpupower : Auto-completion for cpupower tool This script adds support for auto-completion for cpupower tool. Added support for auto-completion of all the eight commands for cpupower tool and their all subsequent sub-commands, wherever possible. A sample output after applying this script - root@ubuntu:~# cpupower f root@ubuntu:~# cpupower frequency- frequency-info frequency-set root@ubuntu:~# cpupower frequency-set - -d --freq --governor --min --related -f -g --max -r -u root@ubuntu:~# cpupower frequency-set -g conservative ondemand performance powersave schedutil userspace root@ubuntu:~# cpupower frequency-set -f 2061000 2194000 2327000 2460000 2593000 2726000 2859000 2094000 2227000 2360000 2493000 2626000 2759000 2892000 2128000 2261000 2394000 2527000 2660000 2793000 2926000 2161000 2294000 2427000 2560000 2693000 2826000 2959000 root@ubuntu:~# cpupower frequency-set -f 206 root@ubuntu:~# cpupower frequency-set -f 2061000 Signed-off-by: Abhishek Goel Signed-off-by: Bharath Thodla Tested-by: Thomas Renninger Signed-off-by: Shuah Khan commit 7f5592742a429b4de770fc5b796d18de43a15fdc Author: Chris Chiu Date: Mon Dec 3 14:46:21 2018 +0800 HID: input: support Microsoft wireless radio control hotkey The ASUS laptops start to support the airplane mode radio management to replace the original mechanism of airplane mode toggle hotkey. On the ASUS P5440FF, it presents as a HID device connecting via I2C, named i2c-AMPD0001. When pressing it, the Embedded Controller send hid report via I2C and switch the airplane mode indicator LED based on the status. However, it's not working because it fails to be identified as a hidinput device. It fails in hidinput_connect() due to the macro IS_INPUT_APPLICATION doesn't have HID_GD_WIRELESS_RADIO_CTLS as a legit application code. It's easy to add the HID I2C vendor and product id to the quirk list and apply HID_QUIRK_HIDINPUT_FORCE to make it work. But it makes more sense to support it as a generic input application. Signed-off-by: Chris Chiu Signed-off-by: Benjamin Tissoires commit 2fc00c1e0f9d2abe0df74c33cf9f40d12b9b892f Author: Chris Chiu Date: Mon Dec 3 14:46:20 2018 +0800 HID: use macros in IS_INPUT_APPLICATION Add missing definition for HID_DG_WHITEBOARD then replace the hid usage hex with macros for better readibility. Signed-off-by: Chris Chiu Signed-off-by: Benjamin Tissoires commit f6c7f03f69f7422bc237bc79599e152d390b74e0 Author: Emmanuel Grumbach Date: Mon Dec 3 21:15:49 2018 +0200 mac80211: fix deauth TX when we disconnect The iTXQs stop/wake queue mechanism involves a whole bunch of locks and this is probably why the call to ieee80211_wake_txqs is deferred to a tasklet when called from __ieee80211_wake_queue. Another advantage of that is that ieee80211_wake_txqs might call the wake_tx_queue() callback and then the driver may call mac80211 which will call it back in the same context. The bug I saw is that when we send a deauth frame as a station we do: flush(drop=1) tx deauth flush(drop=0) While we flush we stop the queues and wake them up immediately after we finished flushing. The problem here is that the tasklet that de-facto enables the queue may not have run until we send the deauth. Then the deauth frame is sent to the driver (which is surprising by itself), but the driver won't get anything useful from ieee80211_tx_dequeue because the queue is stopped (or more precisely because vif->txqs_stopped[0] is true). Then the deauth is not sent. Later on, the tasklet will run, but that'll be too late. We'll already have removed all the vif etc... Fix this by calling ieee80211_wake_txqs synchronously if we are not waking up the queues from the driver (we check the reason to determine that). This makes the code really convoluted because we may call ieee80211_wake_txqs from __ieee80211_wake_queue. The latter assumes that queue_stop_reason_lock has been taken by the caller and ieee80211_wake_txqs may release the lock to send the frames. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg commit c8d10cbda12f14c312dcf7c5a1748625f2c308c1 Author: Bob Copeland Date: Tue Dec 4 10:22:00 2018 -0500 mac80211: rewrite Kconfig text for mesh Lubomir Rintel recently pointed out a dead link for o11s.org, and repointed it to a still live, but also stale website. As far as I know, no one is updating the content at open80211s.org. Since this Kconfig text was originally written, though, the 802.11s mesh drafts were approved and ultimately rolled into 802.11 proper. Meanwhile, the implementation has converged on the final standard, so we can lose all of the text here and provide something that's a little more helpful and accurate. Signed-off-by: Bob Copeland Reviewed-by: Lubomir Rintel Reviewed-by: Steve deRosier Signed-off-by: Johannes Berg commit c7cdba31ed8b87526db978976392802d3f93110c Author: Cody Schuffelen Date: Tue Nov 20 19:14:49 2018 -0800 mac80211-next: rtnetlink wifi simulation device This device takes over an existing network device and produces a new one that appears like a wireless connection, returning enough canned responses to nl80211 to satisfy a standard connection manager. If necessary, it can also be set up one step removed from an existing network device, such as through a vlan/80211Q or macvlan connection to not disrupt the existing network interface. To use it to wrap a bare ethernet connection: ip link add link eth0 name wlan0 type virt_wifi You may have to rename or otherwise hide the eth0 from your connection manager, as the original network link will become unusuable and only the wireless wrapper will be functional. This can also be combined with vlan or macvlan links on top of eth0 to share the network between distinct links, but that requires support outside the machine for accepting vlan-tagged packets or packets from multiple MAC addresses. This is being used for Google's Remote Android Virtual Device project, which runs Android devices in virtual machines. The standard network interfaces provided inside the virtual machines are all ethernet. However, Android is not interested in ethernet devices and would rather connect to a wireless interface. This patch allows the virtual machine guest to treat one of its network connections as wireless rather than ethernet, satisfying Android's network connection requirements. We believe this is a generally useful driver for simulating wireless network connections in other environments where a wireless connection is desired by some userspace process but is not available. This is distinct from other testing efforts such as mac80211_hwsim by being a cfg80211 device instead of mac80211 device, allowing straight pass-through on the data plane instead of forcing packaging of ethernet data into mac80211 frames. Signed-off-by: A. Cody Schuffelen Acked-by: Alistair Strachan Acked-by: Greg Hartman Acked-by: Tristan Muntsinger [make it a tristate] Signed-off-by: Johannes Berg commit cc1068eb6ad21a6cf54aa5f9ae25bf50fd5c9d4b Author: Stephen Hemminger Date: Thu Nov 15 15:25:04 2018 -0800 uapi/nl80211: fix spelling errors Spelling errors found by codespell Signed-off-by: Stephen Hemminger Signed-off-by: Johannes Berg commit 082b12d4e541b260e5527aeac48b5ab2ce3a7f94 Author: James Prestwood Date: Tue Nov 13 11:26:42 2018 -0800 mac80211_hwsim: fixes kernel crash during mac80211_hwsim init Creating radios during startup follows a different code path than HWSIM_CMD_NEW_RADIO. The problem was that param.iftypes was not being set to the deafult before calling mac80211_hwsim_new_radio Signed-off-by: James Prestwood Signed-off-by: Johannes Berg commit a1da439cc0d929891f0f7372c9e03530c809068c Author: Marek Szyprowski Date: Wed Dec 5 11:14:01 2018 +0100 dma-mapping: fix lack of DMA address assignment in generic remap allocator Commit bfd56cd60521 ("dma-mapping: support highmem in the generic remap allocator") replaced dma_direct_alloc_pages() with __dma_direct_alloc_pages(), which doesn't set dma_handle and zero allocated memory. Fix it by doing this directly in the caller function. Fixes: bfd56cd60521 ("dma-mapping: support highmem in the generic remap allocator") Signed-off-by: Marek Szyprowski Tested-by: Thierry Reding Signed-off-by: Christoph Hellwig commit 614c61a6514e05a4bb0cd8989159f986da132215 Author: Linus Walleij Date: Wed Dec 5 09:49:11 2018 +0100 ata: palmld: Introduce state container This creates a state container struct for the Palm LifeDrive ATA controller, and puts the ATA host and the two GPIO descriptors into this container. This avoids using a singleton so potentially multiple PATA interfaces can be instantiated. Suggested-by: Marek Vasut Reviewed-by: Marek Vasut Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit 1adde32a2ede44cc1973e1db93e2d30dbb14abe3 Author: Hans de Goede Date: Tue Dec 4 20:42:47 2018 +0100 pinctrl: cherryview: Stop clearing the GPIO_EN bit from chv_gpio_disable_free Clearing the GPIO_EN bit from chv_gpio_disable_free is a bad idea and pinctrl-cherryview.c is the only Intel pinctrl driver doing something like this. Clearing the GPIO_EN bit means that if the pin was an output it is now effectively floating. The datasheet is not clear what happens to pull ups / downs in this case, but from testing it looks like these are disabled too, also floating input pins. One example where this is causing issues is the soc_button_array input driver, this parses ACPI tables to create 2 platform devices for the gpio_keys input driver. The list of GPIOs is passed through struct gpio_keys_platform_data which uses gpio numbers rather then gpio_desc pointers. The buttons handled by this drivers short the pin to ground when pressed and the volume buttons rely on the SoC's internal pull-up to pull the pin high when the button is not pressed. To get the gpio number, the soc_button_array code calls gpiod_get_index followed by a desc_to_gpio call and then gpiod_put on the gpio_desc. This last call causes chv_gpio_disable_free to clear the GPIO_EN bit. When the gpio_keys driver then loads next it gets the gpio_desc again causing the GPIO_EN bit to be set again and immediately reads the GPIO value which for the volume buttons reads 0 at this time, causing a spurious press of the volume buttons to get reported. Putting a small delay between the gpio_desc request and the read fixes this, I assume that this is caused by the pull-up being temporarily disabled while the GPIO_EN bit is cleared as the powerbutton which also has its GPIO_EN bit cleared does not have this problem. The soc_button_array code is not the only code temporarily requesting GPIOs the DWC3 PCI code also does this, to set the enable and reset GPIOs for the external phy, so that the code instantiating the ULPI phy can read the vendor and product ID registers from the phy. These GPIOs are released after this so that the PHY driver can claim and use them when it loads. Another example of temporary GPIO usage would be a user-space set_gpio utility using the userspace ioctls to set a GPIO as output value 0 or 1, having the GPIO revert to floating as soon as this utility exits would certainly be unexpected behavior. One argument in favor of clearing the GPIO_EN bit is if the GPIO is going to be muxed to another function after being released, but in that case chv_pinmux_set_mux() already clears it. TL;DR: Clearing the GPIO_EN bit from is a bad idea, this commit therefor removes the clearing from chv_gpio_disable_free(), replacing it with code to clear the interrupt-trigger condition so that the GPIO stops generating interrupts when released, as pinctrl-baytrail.c does. Note this commit adds a !chv_pad_locked() condition to the trigger clearing call, which the original GPIO_EN clearing code was missing. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit b6fb6e11b4046281a70ac8cb953bd8d7b6998a56 Author: Hans de Goede Date: Tue Dec 4 20:42:46 2018 +0100 pinctrl: cherryview: Add chv_gpio_clear_triggering() helper function This is a preparation patch for clearing the interrupt trigger from chv_gpio_disable_free(). Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit b9bbbbfef991d2089d710b6b6cade40819c882ab Author: Dafna Hirschfeld Date: Tue Dec 4 15:54:37 2018 -0500 media: vicodec: Change variable names Change variables names in vicodec-core.c to *_src *_dst to improve readability Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da2c94c8f9739e4099ea3cfefc208fc721b22a9c Author: Niklas Söderlund Date: Thu Nov 29 21:11:07 2018 -0500 media: v4l2: async: remove locking when initializing async notifier There is no need to hold the list_lock when initializing the local asd_list of a notifier. Remove the lock handling to simplify the code and remove a potential LOCKDEP warning. Signed-off-by: Niklas Söderlund Reported-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1da3afb58cd15764da92da68e2d999abc303f6fd Author: Maxime Ripard Date: Mon Dec 3 03:44:27 2018 -0500 media: ov5640: Remove duplicate auto-exposure setup The autoexposure setup in the 1080p init array is redundant with the default value of the sensor. Remove it. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e823fb165b763bf0e42bceb9ab45cb9f7589d871 Author: Maxime Ripard Date: Mon Dec 3 03:44:26 2018 -0500 media: ov5640: Add 60 fps support Now that we have everything in place to compute the clock rate at runtime, we can enable the 60fps framerate for the mode we tested it with. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f6cc192fbf0892047f28626f2a989400453fd699 Author: Maxime Ripard Date: Mon Dec 3 03:44:25 2018 -0500 media: ov5640: Make the FPS clamping / rounding more extendable The current code uses an algorithm to clamp the FPS values and round them to the closest supported one that isn't really allows to be extended to more than two values. Rework it a bit to make it much easier to extend the amount of FPS options we support. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5a3ad937bc784d44259860196ec987949348b83d Author: Maxime Ripard Date: Mon Dec 3 03:44:24 2018 -0500 media: ov5640: Make the return rate type more explicit In the ov5640_try_frame_interval function, the ret variable actually holds the frame rate index to use, which is represented by the enum ov5640_frame_rate in the driver. Make it more obvious. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 086c25f8fef9ce659fd898670ab7ba3c39552224 Author: Maxime Ripard Date: Mon Dec 3 03:44:23 2018 -0500 media: ov5640: Enhance FPS handling Now that we have moved the clock generation logic out of the bytes array, these arrays are identical between the 15fps and 30fps variants. Remove the duplicate entries, and convert the code accordingly. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 86d81ad9dd1b9eccad99d011439df84156abe34e Author: Maxime Ripard Date: Mon Dec 3 03:44:22 2018 -0500 media: ov5640: Remove pixel clock rates The pixel clock rates were introduced to report the initially static clock rate. Since this is now handled dynamically, we can remove them entirely. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dfbfb7aa832cdbce54dc4c7694522dca011bfe7a Author: Maxime Ripard Date: Mon Dec 3 03:44:21 2018 -0500 media: ov5640: Compute the clock rate at runtime The clock rate, while hardcoded until now, is actually a function of the resolution, framerate and bytes per pixel. Now that we have an algorithm to adjust our clock rate, we can select it dynamically when we change the mode. This changes a bit the clock rate being used, with the following effect: +------+------+------+------+-----+-----------------+----------------+-----------+ | Hact | Vact | Htot | Vtot | FPS | Hardcoded clock | Computed clock | Deviation | +------+------+------+------+-----+-----------------+----------------+-----------+ | 640 | 480 | 1896 | 1080 | 15 | 56000000 | 61430400 | 8.84 % | | 640 | 480 | 1896 | 1080 | 30 | 112000000 | 122860800 | 8.84 % | | 1024 | 768 | 1896 | 1080 | 15 | 56000000 | 61430400 | 8.84 % | | 1024 | 768 | 1896 | 1080 | 30 | 112000000 | 122860800 | 8.84 % | | 320 | 240 | 1896 | 984 | 15 | 56000000 | 55969920 | 0.05 % | | 320 | 240 | 1896 | 984 | 30 | 112000000 | 111939840 | 0.05 % | | 176 | 144 | 1896 | 984 | 15 | 56000000 | 55969920 | 0.05 % | | 176 | 144 | 1896 | 984 | 30 | 112000000 | 111939840 | 0.05 % | | 720 | 480 | 1896 | 984 | 15 | 56000000 | 55969920 | 0.05 % | | 720 | 480 | 1896 | 984 | 30 | 112000000 | 111939840 | 0.05 % | | 720 | 576 | 1896 | 984 | 15 | 56000000 | 55969920 | 0.05 % | | 720 | 576 | 1896 | 984 | 30 | 112000000 | 111939840 | 0.05 % | | 1280 | 720 | 1892 | 740 | 15 | 42000000 | 42002400 | 0.01 % | | 1280 | 720 | 1892 | 740 | 30 | 84000000 | 84004800 | 0.01 % | | 1920 | 1080 | 2500 | 1120 | 15 | 84000000 | 84000000 | 0.00 % | | 1920 | 1080 | 2500 | 1120 | 30 | 168000000 | 168000000 | 0.00 % | | 2592 | 1944 | 2844 | 1944 | 15 | 84000000 | 165862080 | 49.36 % | +------+------+------+------+-----+-----------------+----------------+-----------+ Only the 640x480, 1024x768 and 2592x1944 modes are significantly affected by the new formula. In this case, 640x480 and 1024x768 are actually fixed by this change. Indeed, the sensor was sending data at, for example, 27.33fps instead of 30fps. This is -9%, which is roughly what we're seeing in the array. Testing these modes with the new clock setup actually fix that error, and data are now sent at around 30fps. 2592x1944, on the other hand, is probably due to the fact that this mode can only be used using MIPI-CSI2, in a two lane mode, and never really tested with a DVP bus. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5b03a472b4e39c4e107d29543fd968c8abc3c873 Author: Kees Cook Date: Tue Dec 4 15:44:46 2018 -0800 fanotify: Make sure to check event_len when copying As a precaution, make sure we check event_len when copying to userspace. Based on old feedback: https://lkml.kernel.org/r/542D9FE5.3010009@gmx.de Signed-off-by: Kees Cook Signed-off-by: Jan Kara commit a9e17125a568f47934534b0d725d5234c686b8b8 Author: Maxime Ripard Date: Mon Dec 3 03:44:20 2018 -0500 media: ov5640: Remove redundant register setup The MIPI divider is also cleared as part of the clock setup sequence, so we can remove that code. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7851fe7ad4d950dbb295b35e675820eaaf087b1c Author: Maxime Ripard Date: Mon Dec 3 03:44:19 2018 -0500 media: ov5640: Remove redundant defines The OV5640_SCLK2X_ROOT_DIVIDER_DEFAULT and OV5640_SCLK_ROOT_DIVIDER_DEFAULT defines represent exactly the same setup, and are at the same value, than the more consistent with the rest of the driver OV5640_SCLK2X_ROOT_DIV and OV5640_SCLK_ROOT_DIV. Remove them. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c14d107e74178e5e4c4b4fd0302ce0f8851abe8b Author: Maxime Ripard Date: Mon Dec 3 03:44:18 2018 -0500 media: ov5640: Remove the clocks registers initialization Part of the hardcoded initialization sequence is to set up the proper clock dividers. However, this is now done dynamically through proper code and as such, the static one is now redundant. Let's remove it. Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6dq Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit aa2882481cadaaf1e91236e43d700717cbe68712 Author: Maxime Ripard Date: Mon Dec 3 03:44:17 2018 -0500 media: ov5640: Adjust the clock based on the expected rate The clock structure for the PCLK is quite obscure in the documentation, and was hardcoded through the bytes array of each and every mode. This is troublesome, since we cannot adjust it at runtime based on other parameters (such as the number of bytes per pixel), and we can't support either framerates that have not been used by the various vendors, since we don't have the needed initialization sequence. We can however understand how the clock tree works, and then implement some functions to derive the various parameters from a given rate. And now that those parameters are calculated at runtime, we can remove them from the initialization sequence. The modes also gained a new parameter which is the clock that they are running at, from the register writes they were doing, so for now the switch to the new algorithm should be transparent. Co-Developed-by: Jacopo Mondi Tested-by: Adam Ford #imx6dq Signed-off-by: Jacopo Mondi Signed-off-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 07115449919383548d094ff83cc27bd08639a8a1 Author: Jacopo Mondi Date: Mon Dec 3 03:44:16 2018 -0500 media: ov5640: Fix set format regression The set_fmt operations updates the sensor format only when the image format is changed. When only the image sizes gets changed, the format do not get updated causing the sensor to always report the one that was previously in use. Without this patch, updating frame size only fails: [fmt:UYVY8_2X8/640x480@1/30 field:none colorspace:srgb xfer:srgb ...] With this patch applied: [fmt:UYVY8_2X8/1024x768@1/30 field:none colorspace:srgb xfer:srgb ...] Fixes: 6949d864776e ("media: ov5640: do not change mode if format or frame interval is unchanged") Signed-off-by: Jacopo Mondi Signed-off-by: Maxime Ripard Tested-by: Adam Ford #imx6 w/ CSI2 interface on 4.19.6 and 4.20-RC5 Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 98480d65c48c1def22a23be7db1d91bda25461c4 Author: Enrico Scholz Date: Tue Nov 27 05:02:53 2018 -0500 media: mt9m111: allow to setup pixclk polarity The chip can be configured to output data transitions on the rising or falling edge of PIXCLK (Datasheet R58:1[9]), default is on the falling edge. Parsing the fw-node is made in a subfunction to bundle all (future) dt-parsing / fw-parsing stuff. [m.grzeschik@pengutronix.de: Fix inverting clock. INV_PIX_CLOCK bit is set per default. Set bit to 0 (enable mask bit without value) to enable falling edge sampling.] [m.felsch@pengutronix.de: use fwnode helpers] [m.felsch@pengutronix.de: mv fw parsing into own function] [m.felsch@pengutronix.de: adapt commit msg] [sakari.ailus@linux.intel.com: V4L2 API usage changes to compile on media tree master] Signed-off-by: Enrico Scholz Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 48856d91321f07e001f53f9726843b1e4144aeca Author: Marco Felsch Date: Tue Nov 27 05:02:52 2018 -0500 media: dt-bindings: media: mt9m111: add pclk-sample property Add the pclk-sample property to the list of optional properties for the mt9m111 camera sensor. Signed-off-by: Marco Felsch Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 302d29700d0e25beb3c72474f90342f840945894 Author: Marco Felsch Date: Tue Nov 27 05:02:51 2018 -0500 media: dt-bindings: media: mt9m111: adapt documentation to be more clear Replace the vague binding by a more verbose. Remove the remote property from the example since the driver don't support such a property. Also remove the bus-width property from the endpoint since the driver don't take care of it. Signed-off-by: Marco Felsch Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 937bb42578c1a365f87557b6248264684b650f31 Author: Michael Grzeschik Date: Tue Nov 27 05:02:50 2018 -0500 media: mt9m111: add support to select formats and fps for {Q,SXGA} This patch implements the framerate selection using the skipping and readout power-modi features. The power-modi cut the framerate by half and each context has an independent selection bit. The same applies to the 2x skipping feature. Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3c437901bd83d236e4349d93bf5d3d814b8f6357 Author: Michael Grzeschik Date: Tue Nov 27 05:02:49 2018 -0500 media: mt9m111: add streaming check to set_fmt Currently set_fmt don't care about the streaming status, so the format can be changed during streaming. This can lead into wrong behaviours. Check if the device is already streaming and return -EBUSY to avoid wrong behaviours. Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7784b1d2789816d3e5cef7243b6b6b4d7185ca3d Author: Marco Felsch Date: Tue Nov 27 05:02:48 2018 -0500 media: mt9m111: add s_stream callback Add callback to check if we are already streaming. Now other callbacks can check the state and return -EBUSY if we already streaming. Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4f9d7225c70dd9d3f406b79e60f8dbd2cd5ae743 Author: Luca Ceresoli Date: Tue Nov 27 03:34:45 2018 -0500 media: imx274: select REGMAP_I2C The imx274 driver uses regmap and the build will fail without it. Fixes: drivers/media/i2c/imx274.c:142:21: error: variable ‘imx274_regmap_config’ has initializer but incomplete type static const struct regmap_config imx274_regmap_config = { ^~~~~~~~~~~~~ drivers/media/i2c/imx274.c:1869:19: error: implicit declaration of function ‘devm_regmap_init_i2c’ [-Werror=implicit-function-declaration] imx274->regmap = devm_regmap_init_i2c(client, &imx274_regmap_config); ^~~~~~~~~~~~~~~~~~~~ and others. Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 82f5b507c0cf35e46f4bad852090a408aa35eb2f Author: Luca Ceresoli Date: Tue Nov 27 03:34:44 2018 -0500 media: imx274: declare the correct number of controls v4l2_ctrl_handler_init() expects a hint of how many controls this handler is expected to refer to. Since this number here is always 4, let's pass exactly 4. Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cea8c0077d6cf3a0cea2f18a8e914af78d46b2ff Author: Luca Ceresoli Date: Mon Nov 26 11:35:07 2018 -0500 media: imx274: fix stack corruption in imx274_read_reg imx274_read_reg() takes a u8 pointer ("reg") and casts it to pass it to regmap_read(), which takes an unsigned int pointer. This results in a corrupted stack and random crashes. Fixes: 0985dd306f72 ("media: imx274: V4l2 driver for Sony imx274 CMOS sensor") Cc: stable@vger.kernel.org # for 4.15 and up Signed-off-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ce6ebeacbef3b1f3567ccee2721731129af35399 Author: Bingbu Cao Date: Mon Nov 26 23:01:01 2018 -0500 media: unify some sony camera sensors pattern naming Some Sony camera sensors have same test pattern definitions, this patch unify the pattern naming to make it more clear to the userspace. Suggested-by: Sakari Ailus Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4cf9f8feb90b9acf621c6cfe28206f9442ef154c Author: Bingbu Cao Date: Mon Nov 26 02:43:34 2018 -0500 media: imx355: fix wrong order in test pattern menus current imx355 test pattern order in ctrl menu is not correct, this patch fixes it. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6cfe94782da622ef39a715c7cee878964e7139a7 Author: Bingbu Cao Date: Mon Nov 26 02:43:33 2018 -0500 media: imx319: fix wrong order in test pattern menus current imx319 test pattern order in ctrl menu is not correct, this patch fixes it. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dceccec169b30a613b7e7e676f3a3a4302087917 Author: Fabio Estevam Date: Fri Nov 23 07:50:59 2018 -0500 media: v4l2-fwnode: Demote warning to debug level On a imx6q-wandboard the following warnings are observed: [ 4.327794] video-mux 20e0000.iomuxc-gpr:ipu1_csi0_mux: bad remote port parent [ 4.336118] video-mux 20e0000.iomuxc-gpr:ipu2_csi1_mux: bad remote port parent As explained by Philipp Zabel: "There are empty endpoint nodes (without remote-endpoint property) labeled ipu1_csi[01]_mux_from_parallel_sensor in the i.MX6 device trees for board DT implementers' convenience. See commit 2539f517acbdc ("ARM: dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections")." So demote the warning to debug level and make the wording a bit less misleading. Suggested-by: Philipp Zabel Signed-off-by: Fabio Estevam Reviewed-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c2e66b8f7c37567e63859e04b3e69fa7027ebb86 Author: Houlong Wei Date: Thu Nov 29 11:37:08 2018 +0800 arm64: dts: mt8173: Add GCE node This patch adds the device node of the GCE hardware for CMDQ module. Signed-off-by: Houlong Wei Signed-off-by: HS Liao Signed-off-by: Matthias Brugger commit 2f588cee24caf01c1ac08fff90d67c6af555e7c7 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:52 2018 +0000 tty/ldsem: Decrement wait_readers on timeouted down_read() It seems like when ldsem_down_read() fails with timeout, it misses update for sem->wait_readers. By that reason, when writer finally releases write end of the semaphore __ldsem_wake_readers() does adjust sem->count with wrong value: sem->wait_readers * (LDSEM_ACTIVE_BIAS - LDSEM_WAIT_BIAS) I.e, if update comes with 1 missed wait_readers decrement, sem->count will be 0x100000001 which means that there is active reader and it'll make any further writer to fail in acquiring the semaphore. It looks like, this is a dead-code, because ldsem_down_read() is never called with timeout different than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Jiri Slaby Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit 110b89282f658593a5a4a96a300d5aa51f1bf88f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:51 2018 +0000 tty/ldsem: Add lockdep asserts for ldisc_sem Make sure under CONFIG_LOCKDEP that each change to line discipline is done with held write semaphor. Otherwise potential reader will have a good time dereferencing incomplete/uninitialized ldisc. An exception here is tty_ldisc_open(), as it's called without ldisc_sem locked by tty_init_dev() => tty_ldisc_setup() for the tty->link. It seem valid as tty_init_dev() will call tty_driver_install_tty() which will find ops->install(). Install will establish tty->link in pty_common_install(), just after allocation of slave tty with alloc_tty_struct(). So, no one should have a reference to slave pty yet. Cc: Jiri Slaby Cc: Peter Zijlstra Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit c18ad0cf9cb0792f448b911eb3b268a35cc6934c Author: Peter Zijlstra Date: Thu Nov 1 00:24:50 2018 +0000 tty/ldsem: Convert to regular lockdep annotations For some reason ldsem has its own lockdep wrappers, make them go away. Cc: Jiri Slaby Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit cf62a1a13749db0d32b5cdd800ea91a4087319de Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:49 2018 +0000 tty: Simplify tty->count math in tty_reopen() As notted by Jiri, tty_ldisc_reinit() shouldn't rely on tty counter. Simplify math by increasing the counter after reinit success. Cc: Jiri Slaby Link: lkml.kernel.org/r/<20180829022353.23568-2-dima@arista.com> Suggested-by: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Mark Rutland Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit c96cf923a98d1b094df9f0cf97a83e118817e31b Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:48 2018 +0000 tty: Don't block on IO when ldisc change is pending There might be situations where tty_ldisc_lock() has blocked, but there is already IO on tty and it prevents line discipline changes. It might theoretically turn into dead-lock. Basically, provide more priority to pending tty_ldisc_lock() than to servicing reads/writes over tty. User-visible issue was reported by Mikulas where on pa-risc with Debian 5 reboot took either 80 seconds, 3 minutes or 3:25 after proper locking in tty_reopen(). Cc: Jiri Slaby Reported-by: Mikulas Patocka Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit 83d817f41070c48bc3eb7ec18e43000a548fca5c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:47 2018 +0000 tty: Hold tty_ldisc_lock() during tty_reopen() tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() nor set_ldisc() nor tty_ldisc_release() as they use tty lock. But it races with anyone who expects line discipline to be the same after hoding read semaphore in tty_ldisc_ref(). We've seen the following crash on v4.9.108 stable: BUG: unable to handle kernel paging request at 0000000000002260 IP: [..] n_tty_receive_buf_common+0x5f/0x86d Workqueue: events_unbound flush_to_ldisc Call Trace: [..] n_tty_receive_buf2 [..] tty_ldisc_receive_buf [..] flush_to_ldisc [..] process_one_work [..] worker_thread [..] kthread [..] ret_from_fork tty_ldisc_reinit() should be called with ldisc_sem hold for writing, which will protect any reader against line discipline changes. Cc: Jiri Slaby Cc: stable@vger.kernel.org # b027e2298bd5 ("tty: fix data race between tty_init_dev and flush of buf") Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e984d@syzkaller.appspotmail.com Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov Tested-by: Tycho Andersen Signed-off-by: Greg Kroah-Hartman commit 231f8fd0cca078bd4396dd7e380db813ac5736e2 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Nov 1 00:24:46 2018 +0000 tty/ldsem: Wake up readers after timed out down_write() ldsem_down_read() will sleep if there is pending writer in the queue. If the writer times out, readers in the queue should be woken up, otherwise they may miss a chance to acquire the semaphore until the last active reader will do ldsem_up_read(). There was a couple of reports where there was one active reader and other readers soft locked up: Showing all locks held in the system: 2 locks held by khungtaskd/17: #0: (rcu_read_lock){......}, at: watchdog+0x124/0x6d1 #1: (tasklist_lock){.+.+..}, at: debug_show_all_locks+0x72/0x2d3 2 locks held by askfirst/123: #0: (&tty->ldisc_sem){.+.+.+}, at: ldsem_down_read+0x46/0x58 #1: (&ldata->atomic_read_lock){+.+...}, at: n_tty_read+0x115/0xbe4 Prevent readers wait for active readers to release ldisc semaphore. Link: lkml.kernel.org/r/20171121132855.ajdv4k6swzhvktl6@wfg-t540p.sh.intel.com Link: lkml.kernel.org/r/20180907045041.GF1110@shao2-debian Cc: Jiri Slaby Cc: Peter Zijlstra Cc: stable@vger.kernel.org Reported-by: kernel test robot Signed-off-by: Dmitry Safonov Signed-off-by: Greg Kroah-Hartman commit 7ff33bd321b1a1092ccf4b80a1742528754ecc30 Author: Chen-Yu Tsai Date: Wed Dec 5 18:11:52 2018 +0800 ARM: dts: sun8i: a33: Drop audio codec oversampling rate to 128 fs The current oversampling rate of 512 means that for 48 kHz 16 bit stereo, the MCLK is running at the same rate as the module clock, so there is no head room to support higher sampling rates. The codec however supports up to 192 kHz for playback. This patch drops the oversampling rate from 512 to 128, so that 192 kHz audio can be played back directly without downsampling. Ideally we should be using different oversampling rates for different sampling rates, but that's not possible without a platform-specific machine driver. Fixes: 870f1bd1f5e9 ("ARM: dts: sun8i: Add audio codec, dai and card for A33") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 6e6da2039c82271dd873b9ad2b902a692a7dd554 Author: Chen-Yu Tsai Date: Wed Dec 5 18:11:51 2018 +0800 clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for all audio module clocks All the audio interfaces on Allwinner SoCs need to change their module clocks during operation, to switch between support for 44.1 kHz and 48 kHz family sample rates. The clock rate for the module clocks is governed by their upstream audio PLL. The module clocks themselves only have a gate, and sometimes a divider or mux. Thus any rate changes need to be propagated upstream. Set the CLK_SET_RATE_PARENT flag for all audio module clocks to achieve this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 37bb18398aa190c281228e8ac76d892744dc1677 Author: Chen-Yu Tsai Date: Wed Dec 5 18:11:50 2018 +0800 clk: sunxi-ng: a33: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can back port the settings from the newer SoC, in this case the H3, onto the A33. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit d60ce24740d2a416f6772f2c39e289d745688fa4 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:44 2018 +0100 arm64: dts: allwinner: a64: Add Video Engine node This adds the Video Engine node for the A64. Since it can map the whole DRAM range, there is no particular need for a reserved memory node (unlike platforms preceding the A33). Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 106deea8ba53b09005613d9a47072bc3a1e01637 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:39 2018 +0100 arm64: dts: allwinner: a64: Add support for the SRAM C1 section Add the description for the SRAM C1 section to the A64 device-tree. Since there is no entry for this section in the A64 manual, the base address and size were only verified to be consistent empirically. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 82992cdf4af7553319e3551a07e6dc1f4c32ab41 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:32 2018 +0100 ARM: dts: sun8i: h3: Remove unnecessary reserved memory node Just like on the A33, the video engine on the H3 can map any address in memory, so there is no particular need to have reserved memory at a fixed address. As a result, remove the reserved memory node and let the kernel allocate the CMA pool wherever it sees fit. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 7aed1e3a963877efc02a25f5dc6fb605e52ff441 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:31 2018 +0100 ARM: dts: sun8i: a33: Remove unnecessary reserved memory node While we believed that the memory for the video engine had to be kept in the first 256 MiBs of DRAM, this is no longer true starting with the A33 and any address can be mapped. As a result, remove the reserved memory node and let the kernel allocate the CMA pool wherever it sees fit. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit d44d37cb27df5501de0693fb03803e244653713c Author: Paul Kocialkowski Date: Wed Dec 5 10:24:38 2018 +0100 dt-bindings: sram: sunxi: Add compatible for the A64 SRAM C1 This introduces a new compatible for the A64 SRAM C1 section, that is compatible with the SRAM C1 section as found on the A10. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard commit ebc0a24d11b3618e7680e117ee3be421c09ad43a Author: Paul Kocialkowski Date: Wed Dec 5 10:24:34 2018 +0100 dt-bindings: sram: sunxi: Add bindings for the H5 with SRAM C1 This introduces new bindings for the H5 SoC in the SRAM controller. Because the SRAM layout is different from other SoCs, no backward compatibility is assumed with any of them. However, the C1 SRAM section alone looks similar to previous SoCs, so it is compatible with the initial A10 binding. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard commit 77cab92a2cb15bcbdd7be0af773799e92d6a8546 Author: Rafael Aquini Date: Thu Nov 29 10:08:17 2018 -0500 sysctl: clean up nr_pdflush_threads leftover nr_pdflush_threads has been long deprecated and removed, but a remnant of its glorious past is still around in CTL_VM names enum. This patch is a minor clean-up to that case. Reviewed-by: William Kucharski Signed-off-by: Rafael Aquini Signed-off-by: Greg Kroah-Hartman commit 8be5b161bb3d07bc5a119dfe0285ec05d28202c9 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:43 2018 +0100 arm64: dts: allwinner: h5: Add Video Engine node This adds the Video Engine node for the H5. Since it can map the whole DRAM range, there is no particular need for a reserved memory node (unlike platforms preceding the A33). Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 24a1be4e7e80fc7a19290be4715191b77fe80b41 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:37 2018 +0100 ARM/arm64: dts: allwinner: Move H3/H5 syscon label over to soc-specific nodes The EMAC driver requires a syscon node to access the EMAC clock configuration register (that is part of the system-control register range and controlled). For this purpose, a dummy syscon node was introduced to let the driver access the register freely. Recently, the EMAC driver was tuned to get access to the register when the SRAM driver is registered (as used on the A64). As a result, it is no longer necessary to have a dummy syscon node for that purpose. Now that we have a proper system-control node for both the H3 and H5, we can get rid of that dummy syscon node and have the EMAC driver use the node corresponding to the proper SRAM driver (by switching the syscon label over to each dtsi). This way, we no longer have two separate nodes for the same register space. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 8fefbc6d4b26604be3ce627910a22aaeb7c382fd Author: Mark Tomlinson Date: Tue Nov 27 09:57:23 2018 +1300 tty/sysrq: Do not call sync directly from sysrq_do_reset() sysrq_do_reset() is called in softirq context, so it cannot call sync() directly. Instead, call orderly_reboot(), which creates a work item to run /sbin/reboot, or do emergency_sync and restart if the command fails. Signed-off-by: Mark Tomlinson Signed-off-by: Greg Kroah-Hartman commit 973efbc6a061488f280ac1792200e48eb0b1ff5e Author: Paul Kocialkowski Date: Wed Dec 5 10:24:36 2018 +0100 arm64: dts: allwinner: h5: Add system-control node with SRAM C1 Add the H5-specific system control node description to its device-tree with support for the SRAM C1 section, that will be used by the video codec node later on. The CPU-side SRAM address was obtained empirically while the size was taken from the documentation. They may not be entirely accurate. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit dabfc8364ca76c8f8a24e8b5efc348869ac35d79 Author: Mesih Kilinc Date: Sun Dec 2 23:23:49 2018 +0300 dt-bindings: watchdog: Add Allwinner ARMv5 F1C100s wdt Allwinner ARMv5 F1C100s has similar watchdog timer to sun6i A31. Add definition for it. Signed-off-by: Mesih Kilinc Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard commit 46d1ec73c19067dad22523632306e3fffedb5f11 Author: Mesih Kilinc Date: Sun Dec 2 23:23:48 2018 +0300 dt-bindings: sram: Add Allwinner suniv F1C100s The suniv ARMv5 F1C100s chip has similar sram controller to sun4i A10. Add compatible string for it. Signed-off-by: Mesih Kilinc Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard commit c7739268222ed819f85ec9b8c909aa5fc402cc23 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:35 2018 +0100 soc: sunxi: sram: Add support for the H5 SoC system control This adds the H5 SoC compatible to the list of device-tree matches for the SRAM driver. Since the variant is the same as the A64 (that precedes the H5), the same variant description is used. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard commit 15e53723ce2bcbe225be9c4bd9566ebb13f2298d Author: Paul Kocialkowski Date: Wed Dec 5 10:24:33 2018 +0100 soc: sunxi: sram: Enable EMAC clock access for H3 variant Just like the A64 and H5, the H3 SoC uses the system control block to enable the EMAC clock. Add a variant structure definition for the H3 and use it over the A10 one. This will allow using the H3-specific binding for the syscon node attached to the EMAC instead of the generic syscon binding. Signed-off-by: Paul Kocialkowski Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 925c5afd78c40169c7e0e6adec52d5119ff43751 Author: Paul Kocialkowski Date: Wed Dec 5 10:24:30 2018 +0100 ARM: dts: sun8i: h3: Fix the system-control register range Unlike in previous generations, the system-control register range is not limited to a size of 0x30 on the H3. In particular, the EMAC clock configuration register (accessed through syscon) is at offset 0x30 in that range. Extend the register size to its full range (0x1000) as a result. Signed-off-by: Paul Kocialkowski Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit b2e9a4eda11fd2cb1e6714e9ad3f455c402568ff Author: Nathan Chancellor Date: Thu Oct 18 16:03:06 2018 -0400 media: firewire: Fix app_info parameter type in avc_ca{,_app}_info Clang warns: drivers/media/firewire/firedtv-avc.c:999:45: warning: implicit conversion from 'int' to 'char' changes value from 159 to -97 [-Wconstant-conversion] app_info[0] = (EN50221_TAG_APP_INFO >> 16) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1000:45: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion] app_info[1] = (EN50221_TAG_APP_INFO >> 8) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1040:44: warning: implicit conversion from 'int' to 'char' changes value from 159 to -97 [-Wconstant-conversion] app_info[0] = (EN50221_TAG_CA_INFO >> 16) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/media/firewire/firedtv-avc.c:1041:44: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion] app_info[1] = (EN50221_TAG_CA_INFO >> 8) & 0xff; ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ 4 warnings generated. Change app_info's type to unsigned char to match the type of the member msg in struct ca_msg, which is the only thing passed into the app_info parameter in this function. Link: https://github.com/ClangBuiltLinux/linux/issues/105 Signed-off-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab commit 3cd6954c9b0d5e40fac29c8bbe809a27b7cdc475 Author: Christoph Hellwig Date: Sat Oct 13 11:17:06 2018 -0400 media: sti/bdisp: don't pass GFP_DMA32 to dma_alloc_attrs The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig Reviewed-by: Benjamin Gaignard Signed-off-by: Mauro Carvalho Chehab commit e456e6a12b7ad49b6e8ce2edfd30782ed6985cfb Author: Jerome Brunet Date: Tue Dec 4 17:58:18 2018 +0100 clk: meson: add clk-input helper function Add the clock input helper function. Several amlogic clock controllers will now be registering bypass clock input. Instead of copying this code in every of them, let's make an helper function for it Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong [narmstrong: fixed up to apply on Makefile and clkc.h] Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181204165819.21541-2-jbrunet@baylibre.com commit dee0808d77ae857c74ee5b9a86e44fb366c33441 Author: YueHaibing Date: Sat Oct 6 03:36:02 2018 -0400 media: imx-pxp: remove duplicated include from imx-pxp.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit b1b71c877a16b35f43c1f9de74ffc58c9188c569 Author: Andrey Abramov Date: Mon Oct 1 06:15:31 2018 -0400 media: Staging: media: replace deprecated probe method Replaced i2c_driver::probe with i2c_driver::probe_new, because documentation says that probe method is "soon to be deprecated". Signed-off-by: Andrey Abramov Signed-off-by: Mauro Carvalho Chehab commit b6973637c4cc842c1aa7d6c848781b4bdeb4415b Author: Mauro Carvalho Chehab Date: Wed Dec 5 05:02:33 2018 -0500 media: ddbridge: remove another duplicate of io.h and sort includes The io.h was still included twice. Having a large number of includes like that unsorted is likely the reason why we ended by having 3 includes of io.h and two includes of interrupt.h at the first place. So, let's reorder the includes on alphabetic order. That would make easier to maintain it. Fixes: 12645e0655e4 ("media: ddbridge: remove some duplicated include file") Signed-off-by: Mauro Carvalho Chehab commit 85b5c1dd04560f95d10c9eee71ba45adaa87deec Author: Long Cheng Date: Wed Dec 5 16:42:59 2018 +0800 serial: 8250-mtk: add uart DMA support Modify uart register to support DMA function. Signed-off-by: Long Cheng Signed-off-by: Greg Kroah-Hartman commit 89212465c194853becaa17f82dfc1d7d30b56d5e Author: Long Cheng Date: Wed Dec 5 16:42:57 2018 +0800 dt-bindings: dma: uart: add uart dma bindings add uart dma bindings Signed-off-by: Long Cheng Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit eca42d4cf3c591c36312c52707e0a712e0c7256a Author: Rajan Vaja Date: Tue Dec 4 04:51:22 2018 -0800 tty: xilinx_uartps: Correct return value in probe Existing driver checks for alternate clock if devm_clk_get() fails and returns error code for last clock failure. If xilinx_uartps is called before clock driver, devm_clk_get() returns -EPROBE_DEFER. In this case, probe should not check for alternate clock as main clock is already present in DTS and return -EPROBE_DEFER only. This patch fixes it by not checking for alternate clock when main clock get returns -EPROBE_DEFER. Signed-off-by: Rajan Vaja Signed-off-by: Greg Kroah-Hartman commit a1fee899e5bed457afc20a6a2ff3915a95cc5942 Author: Ryan Case Date: Thu Nov 29 18:18:40 2018 -0800 tty: serial: qcom_geni_serial: Fix softlock Transfers were being divided into device FIFO sized (64 byte max) operations which would poll for completion within a spin_lock_irqsave / spin_unlock_irqrestore block. This both made things slow by waiting for the FIFO to completely drain before adding further data and would also result in softlocks on large transmissions. This patch allows larger transfers with continuous FIFO additions as space becomes available and removes polling from the interrupt handler. Signed-off-by: Ryan Case Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 0b258ed1a219a9776e8f6967eb34837ae0332e64 Author: Christian König Date: Wed Nov 14 14:24:27 2018 +0100 drm: revert "expand replace_fence to support timeline point v2" This reverts commit 9a09a42369a4a37a959c051d8e1a1f948c1529a4. The whole interface isn't thought through. Since this function can't fail we actually can't allocate an object to store the sync point. Sorry, I should have taken the lead on this from the very beginning and reviewed it more thoughtfully. Going to propose a new interface as a follow up change. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Link: https://patchwork.freedesktop.org/patch/265580/ commit 12645e0655e457ae6727da4fae100e88ee78f42f Author: zhong jiang Date: Thu Sep 20 00:56:36 2018 -0400 media: ddbridge: remove some duplicated include file interrupt.h and io.h have duplicated include. hence just remove redundant file. Signed-off-by: zhong jiang Signed-off-by: Mauro Carvalho Chehab commit ce10a5b3954f2514af726beb78ed8d7350c5e41c Author: Bart Van Assche Date: Wed Nov 28 15:43:09 2018 -0800 timekeeping: Use proper seqcount initializer tk_core.seq is initialized open coded, but that misses to initialize the lockdep map when lockdep is enabled. Lockdep splats involving tk_core seq consequently lack a name and are hard to read. Use the proper initializer which takes care of the lockdep map initialization. [ tglx: Massaged changelog ] Signed-off-by: Bart Van Assche Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: tj@kernel.org Cc: johannes.berg@intel.com Link: https://lkml.kernel.org/r/20181128234325.110011-12-bvanassche@acm.org commit d02337d29d33da6f1f83bebd7d3997e78df1df9e Author: Greg Kroah-Hartman Date: Wed Dec 5 10:53:42 2018 +0100 Revert "serial/sunsu: add missing of_node_put()" This reverts commit 20d8e8611eb0596047fd4389be7a7203a883b9bf. As David Miller points out, it's wrong. Reported-by: David Miller Cc: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 3ea5eb139f43360ae2d471e975b82d3fa38929c8 Author: Alexander Theissen Date: Tue Dec 4 23:43:37 2018 +0100 usb: appledisplay: Remove unnecessary spinlock The spinlock was inside the urb completion function which is only called once per display and is then resubmitted from this function. There was no other place where this lock was used. Signed-off-by: Alexander Theissen Signed-off-by: Greg Kroah-Hartman commit 67f3a0d0ad7220b9c37b5e6722a821cd7f389b39 Author: Alexander Theissen Date: Tue Dec 4 23:43:36 2018 +0100 usb: appledisplay: Set urb transfer_flags to URB_NO_TRANSFER_DMA_MAP The driver does allocate a DMA address with usb_alloc_coherent but did not set the appropriate flag to signal that transfer_dma is set to a valid value. Signed-off-by: Alexander Theissen Signed-off-by: Greg Kroah-Hartman commit 81fd5fd46ec9723935764d9c4654d42549a3f655 Author: Marco Felsch Date: Tue Sep 18 09:14:46 2018 -0400 media: tvp5150: fix irq_request error path during probe Commit 37c65802e76a ("media: tvp5150: Add sync lock interrupt handling") introduced the interrupt handling. But we have to free the v4l2_ctrl_handler before we can return the error code. Fixes: 37c65802e76a ("media: tvp5150: Add sync lock interrupt handling") Signed-off-by: Marco Felsch Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 330abed79aade860296cd4100a8573d21b067d9b Author: zhong jiang Date: Tue Sep 18 04:24:03 2018 -0400 media: remove redundant include moduleparam.h module.h already contained moduleparam.h, so it is safe to remove the redundant include. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang Signed-off-by: Mauro Carvalho Chehab commit 440da5a30e54deda4ded2a1dc61baf3ee3891f5d Author: Andy Shevchenko Date: Thu Nov 15 15:16:19 2018 +0200 staging: typec: fusb302: Rename fcs,extcon-name to linux,extcon-name Since we are going to use the same in Designware USB 3 driver, rename the property to be consistent across the drivers. No functional change intended. Signed-off-by: Andy Shevchenko Cc: Hans de Goede Cc: Guenter Roeck Acked-by: Hans de Goede Acked-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit e4cf679c9a0ff0a9dfdb1392d9ed86bb6a00a24b Author: Iliya Iliev Date: Sun Aug 12 03:23:11 2018 -0400 media: drivers: media: pci: b2c2: Fix errors due to unappropriate coding style. Fix error due to assignment in conditional expression. Fix errors due to absence of empty spaces separators after commas in function calls. Fix errors due to lines longer than 80 characters. Signed-off-by: Iliya Iliev Signed-off-by: Mauro Carvalho Chehab commit 6abfa0f5bb7cce98c89e2c28fcea31c17200890e Author: Thinh Nguyen Date: Thu Nov 15 19:03:27 2018 -0800 usb: dwc3: gadget: Report isoc transfer frame number Implement the new frame_number API to report the isochronous interval frame number. This patch checks and reports the interval in which the isoc transfer was transmitted or received via the Isoc-First TRB SOF number field. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 6b69753fa0078c5222d6b4aeb5017c5503e0dc8e Author: Thinh Nguyen Date: Thu Nov 15 19:03:21 2018 -0800 usb: gadget: Introduce frame_number to usb_request Add a field frame_number to the usb_request to report the interval number in (micro)frames in which the isochronous transfer was transmitted or received. The gadget driver can use this knowledge to synchronize with the host. Also, this option is useful for debugging purposes. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 1fab219e65c45cf6e294c757b10e514a15f55f8d Author: Chunfeng Yun Date: Thu Nov 29 10:34:36 2018 +0800 usb: mtu3: clear SOFTCONN when clear USB3_EN if work as HS mode When the controller supports SS mode, but works as HS mode, the SOFTCONN will not be cleared automatically when clear USB3_EN by default, this cause an issue that can't disconnect from host, so clear SOFTCONN when clear USB3_EN when the class driver want to disable the D+ pullup. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit 94552090cd188751afdc58a311aa2f3456f5fac0 Author: Chunfeng Yun Date: Thu Nov 29 10:34:35 2018 +0800 usb: mtu3: enable SETUPENDISR interrupt If the controller receives a new SETUP during SETUP data stage, and will generate SETUPENDISR interrupt, the driver should abort the current SETUP command and process the new one. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit e802972433f7cee173ec3ffe470d51b39029de9b Author: Chunfeng Yun Date: Thu Nov 29 10:34:34 2018 +0800 usb: mtu3: fix the issue about SetFeature(U1/U2_Enable) Fix the issue: device doesn't accept LGO_U1/U2: 1. set SW_U1/U2_ACCEPT_ENABLE to eanble controller to accept LGO_U1/U2 by default; 2. enable/disable controller to initiate requests for transition into U1/U2 by SW_U1/U2_REQUEST_ENABLE instead of SW_U1/U2_ACCEPT_ENABLE; Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit 29ae096ef93a9df78a4b86e49ef916afa8e7c34b Author: Chunfeng Yun Date: Thu Nov 29 10:34:33 2018 +0800 usb: mtu3: enable hardware remote wakeup from L1 automatically Enable hardware remote wakeup from L1 automatically based on the FIFO status, instead of manual way. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit aef34b48d084c42d765c912583c51811e853fbce Author: Chunfeng Yun Date: Thu Nov 29 10:34:32 2018 +0800 usb: mtu3: remove QMU checksum The QMU checksum calculation is redundant, mostly used by debug, so remove it here. Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit d54d334e75b93f3a372d1cbb7e805380b3281482 Author: Yoshihiro Shimoda Date: Wed Nov 21 06:31:23 2018 +0000 usb: renesas_usbhs: Use SIMPLE_DEV_PM_OPS macro This patch uses SIMPLE_DEV_PM_OPS macro instead of struct dev_pm_ops directly. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit b01828e26048f43dc4cea5759f200ec9e8332039 Author: Jarkko Nikula Date: Wed Nov 21 06:31:23 2018 +0000 usb: renesas_usbhs: Remove dummy runtime PM callbacks Platform drivers don't need dummy runtime PM callbacks that just return success in order to have runtime PM happening. This has changed since following commits: commit 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks") commit 543f2503a956 ("PM / platform_bus: Allow runtime PM by default") commit 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly") Signed-off-by: Jarkko Nikula Reviewed-by: Yoshihiro Shimoda Acked-by: Wolfram Sang [shimoda: revise git commit description style] Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 1e3af5dfd05c53b3dfd367af4c78ebbf60f6fb41 Author: Hsin-Yi, Wang Date: Thu Nov 29 11:16:27 2018 +0800 usb/mtu3: power down device ip at setup Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, so host ip sleep will fail at ssusb_host_disable. Power down device ip at ssusb_host_setup. Signed-off-by: Hsin-Yi, Wang Acked-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman commit 6ed30a7d8ec29d3aba46e47aa8b4a44f077dda4e Author: Terin Stock Date: Sun Sep 9 21:24:31 2018 -0700 usb: dwc2: host: use hrtimer for NAK retries Modify the wait delay utilize the high resolution timer API to allow for more precisely scheduled callbacks. A previous commit added a 1ms retry delay after multiple consecutive NAKed transactions using jiffies. On systems with a low timer interrupt frequency, this delay may be significantly longer than specified, resulting in misbehavior with some USB devices. This scenario was reached on a Raspberry Pi 3B with a Macally FDD-USB floppy drive (identified as 0424:0fdc Standard Microsystems Corp. Floppy, based on the USB97CFDC USB FDC). With the relay delay, the drive would be unable to mount a disk, replying with NAKs until the device was reset. Using ktime, the delta between starting the timer (in dwc2_hcd_qh_add) and the callback function can be determined. With the original delay implementation, this value was consistently approximately 12ms. (output in us). -0 [000] ..s. 1600.559974: dwc2_wait_timer_fn: wait_timer delta: 11976 -0 [000] ..s. 1600.571974: dwc2_wait_timer_fn: wait_timer delta: 11977 -0 [000] ..s. 1600.583974: dwc2_wait_timer_fn: wait_timer delta: 11976 -0 [000] ..s. 1600.595974: dwc2_wait_timer_fn: wait_timer delta: 11977 After converting the relay delay to using a higher resolution timer, the delay was much closer to 1ms. -0 [000] d.h. 1956.553017: dwc2_wait_timer_fn: wait_timer delta: 1002 -0 [000] d.h. 1956.554114: dwc2_wait_timer_fn: wait_timer delta: 1002 -0 [000] d.h. 1957.542660: dwc2_wait_timer_fn: wait_timer delta: 1004 -0 [000] d.h. 1957.543701: dwc2_wait_timer_fn: wait_timer delta: 1002 The floppy drive operates properly with delays up to approximately 5ms, and sends NAKs for any delays that are longer. Fixes: 38d2b5fb75c1 ("usb: dwc2: host: Don't retry NAKed transactions right away") Cc: Reviewed-by: Douglas Anderson Acked-by: Minas Harutyunyan Signed-off-by: Terin Stock Signed-off-by: Felipe Balbi commit e86108940e541febf35813402ff29fa6f4a9ac0b Author: Mathias Nyman Date: Wed Nov 28 15:55:21 2018 +0200 usb: hub: delay hub autosuspend if USB3 port is still link training When initializing a hub we want to give a USB3 port in link training the same debounce delay time before autosuspening the hub as already trained, connected enabled ports. USB3 ports won't reach the enabled state with "current connect status" and "connect status change" bits set until the USB3 link training finishes. Catching the port in link training (polling) and adding the debounce delay prevents unnecessary failed attempts to autosuspend the hub. Signed-off-by: Mathias Nyman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 47b6f8bf870035d420614844de5e308abe505e8a Author: Chunfeng Yun Date: Thu Nov 29 10:34:36 2018 +0800 usb: mtu3: clear SOFTCONN when clear USB3_EN if work as HS mode When the controller supports SS mode, but works as HS mode, the SOFTCONN will not be cleared automatically when clear USB3_EN by default, this cause an issue that can't disconnect from host, so clear SOFTCONN when clear USB3_EN when the class driver want to disable the D+ pullup. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 49187dd14cc84f0ff7db2876c43ad510eeec04b0 Author: Chunfeng Yun Date: Thu Nov 29 10:34:35 2018 +0800 usb: mtu3: enable SETUPENDISR interrupt If the controller receives a new SETUP during SETUP data stage, and will generate SETUPENDISR interrupt, the driver should abort the current SETUP command and process the new one. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit a0678e2eed41e81004308693ac84ea95614b0920 Author: Chunfeng Yun Date: Thu Nov 29 10:34:34 2018 +0800 usb: mtu3: fix the issue about SetFeature(U1/U2_Enable) Fix the issue: device doesn't accept LGO_U1/U2: 1. set SW_U1/U2_ACCEPT_ENABLE to eanble controller to accept LGO_U1/U2 by default; 2. enable/disable controller to initiate requests for transition into U1/U2 by SW_U1/U2_REQUEST_ENABLE instead of SW_U1/U2_ACCEPT_ENABLE; Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 68c750cf4504f8179188db36057834ba00afb183 Author: Chunfeng Yun Date: Thu Nov 29 10:34:33 2018 +0800 usb: mtu3: enable hardware remote wakeup from L1 automatically Enable hardware remote wakeup from L1 automatically based on the FIFO status, instead of manual way. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 4f7371314e57b21725ef208e9a37dd58d3f5d974 Author: Chunfeng Yun Date: Thu Nov 29 10:34:32 2018 +0800 usb: mtu3: remove QMU checksum The QMU checksum calculation is redundant, mostly used by debug, so remove it here. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit 36b25b69c2c13ebe3d6f80c11de537cb7d1c43f0 Author: Hsin-Yi, Wang Date: Thu Nov 29 11:16:27 2018 +0800 usb/mtu3: power down device ip at setup Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip, so host ip sleep will fail at ssusb_host_disable. Power down device ip at ssusb_host_setup. Acked-by: Chunfeng Yun Signed-off-by: Hsin-Yi, Wang Signed-off-by: Felipe Balbi commit 9a01135b98b9d5a7033c544245da7aad0d886758 Author: Thomas Hellstrom Date: Wed Nov 14 08:11:05 2018 +0100 drm/vmwgfx: Use the standard atomic helpers for page-flip Our wrappers don't do anything useful anymore except calling the atomic helpers. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh commit e5bd6a3dddda58b0b5a246b35faadd844b0ff574 Author: YueHaibing Date: Fri Oct 5 11:36:58 2018 +0000 drm/vmwgfx: Remove set but not used variable 'file_priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/vmwgfx/vmwgfx_fence.c: In function 'vmw_event_fence_action_seq_passed': drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:909:19: warning: variable 'file_priv' set but not used [-Wunused-but-set-variable] struct drm_file *file_priv; It not used any more since commit fb740cf2492c ("drm: Create drm_send_event helpers") Signed-off-by: YueHaibing Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom commit ec9a5b611e2fde765372885220555a5b38e13c09 Author: Colin Ian King Date: Thu Oct 4 18:49:53 2018 +0100 drm/vmwgfx: remove redundant return ret statement The return statement is redundant as there is a return statement immediately before it so we have dead code that can be removed. Also remove the unused declaration of ret. Detected by CoverityScan, CID#1473793 ("Structurally dead code") Signed-off-by: Colin Ian King Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom commit 35a6054132286a4ab92b536595093b82e6bdfcbc Author: Marek Szyprowski Date: Tue Nov 20 16:38:15 2018 +0100 usb: dwc2: Disable power down feature on Samsung SoCs Power down feature of DWC2 module integrated in Samsung SoCs doesn't work properly or needs some additional handling in PHY or SoC glue layer, so disable it for now. Without disabling power down, DWC2 causes random memory trashes and fails enumeration if there is no USB link to host on driver probe. Fixes: 03ea6d6e9e1ff1 ("usb: dwc2: Enable power down") Acked-by: Minas Harutyunyan Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit 9da6e26c0aae3fda6017c1ecf5c8881f8dbc37df Author: Thomas Hellstrom Date: Mon Nov 12 15:46:39 2018 +0100 drm/vmwgfx: Fix a layout race condition This fixes a layout update race condition. We make sure the crtc mutex is locked before we dereference crtc->state. Otherwise the state might change under us. Since now we're already holding the crtc mutexes when reading the gui coordinates, protect them with the crtc mutexes rather than with the requested_layout mutex. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh commit 9d9486e43728cd513e10ed3dd54e156c8ab7bd2a Author: Thomas Hellstrom Date: Thu Oct 4 22:38:17 2018 +0000 drm/vmwgfx: Fix up the implicit display unit handling Make the connector is_implicit property immutable. As far as we know, no user-space application is writing to it. Also move the verification that all implicit display units scan out from the same framebuffer to atomic_check(). Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat commit 66502d494bfe894f30b6f0948de12adc6a325e8f Author: Sinclair Yeh Date: Mon Nov 19 09:56:07 2018 -0800 MAINTAINERS: Update vmwgfx maintainers It's been fun! To be continued..... Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom commit a5b21a8ba2a0d6ab114b8ca9c8423e84f47844b1 Author: Michael Tretter Date: Mon Nov 26 16:14:25 2018 +0100 dmaengine: zynqmp_dma: replace spin_lock_bh with spin_lock_irqsave All device_prep_dma_* functions and device_issue_pending can be called from an interrupt context. As this includes hard IRQs, we must use spin_lock_irqsave() instead of spin_lock_bh() to access chan->lock. Signed-off-by: Michael Tretter Signed-off-by: Vinod Koul commit dcc3c9e37fbd70e728d08cce0e50121605390fa0 Author: Mika Westerberg Date: Wed Oct 31 14:06:52 2018 +0300 thunderbolt: Export IOMMU based DMA protection support to userspace Recent systems with Thunderbolt ports may support IOMMU natively. In practice this means that Thunderbolt connected devices are placed behind an IOMMU during the whole time it is connected (including during boot) making Thunderbolt security levels redundant. This is called Kernel DMA protection [1] by Microsoft. Some of these systems still have Thunderbolt security level set to "user" in order to support OS downgrade (the older version of the OS might not support IOMMU based DMA protection so connecting a device still relies on user approval). Export this information to userspace by introducing a new sysfs attribute (iommu_dma_protection). Based on it userspace tools can make more accurate decision whether or not authorize the connected device. In addition update Thunderbolt documentation regarding IOMMU based DMA protection. [1] https://docs.microsoft.com/en-us/windows/security/information-protection/kernel-dma-protection-for-thunderbolt Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat commit fb58fdcd295b914ece1d829b24df00a17a9624bc Author: Mika Westerberg Date: Mon Oct 29 13:47:08 2018 +0300 iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU side. However, as pointed out in [1] ATS can be used to bypass IOMMU based security completely by simply sending PCIe read/write transaction with AT (Address Translation) field set to "translated". To mitigate this modify the Intel IOMMU code so that it does not enable ATS for any device that is marked as being untrusted. In case this turns out to cause performance issues we may selectively allow ATS based on user decision but currently use big hammer and disable it completely to be on the safe side. [1] https://www.repository.cam.ac.uk/handle/1810/274352 Signed-off-by: Mika Westerberg Reviewed-by: Ashok Raj Reviewed-by: Joerg Roedel Acked-by: Joerg Roedel commit 89a6079df791aeace2044ea93be1b397195824ec Author: Lu Baolu Date: Tue Oct 23 15:45:01 2018 +0800 iommu/vt-d: Force IOMMU on for platform opt in hint Intel VT-d spec added a new DMA_CTRL_PLATFORM_OPT_IN_FLAG flag in DMAR ACPI table [1] for BIOS to report compliance about platform initiated DMA restricted to RMRR ranges when transferring control to the OS. This means that during OS boot, before it enables IOMMU none of the connected devices can bypass DMA protection for instance by overwriting the data structures used by the IOMMU. The OS also treats this as a hint that the IOMMU should be enabled to prevent DMA attacks from possible malicious devices. A use of this flag is Kernel DMA protection for Thunderbolt [2] which in practice means that IOMMU should be enabled for PCIe devices connected to the Thunderbolt ports. With IOMMU enabled for these devices, all DMA operations are limited in the range reserved for it, thus the DMA attacks are prevented. All these devices are enumerated in the PCI/PCIe module and marked with an untrusted flag. This forces IOMMU to be enabled if DMA_CTRL_PLATFORM_OPT_IN_FLAG is set in DMAR ACPI table and there are PCIe devices marked as untrusted in the system. This can be turned off by adding "intel_iommu=off" in the kernel command line, if any problems are found. [1] https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf [2] https://docs.microsoft.com/en-us/windows/security/information-protection/kernel-dma-protection-for-thunderbolt Cc: Jacob Pan Cc: Sohil Mehta Signed-off-by: Lu Baolu Signed-off-by: Mika Westerberg Reviewed-by: Ashok Raj Reviewed-by: Joerg Roedel Acked-by: Joerg Roedel commit 617654aae50eb59dd98aa53fb562e850937f4cde Author: Mika Westerberg Date: Thu Aug 16 12:28:48 2018 +0300 PCI / ACPI: Identify untrusted PCI devices A malicious PCI device may use DMA to attack the system. An external Thunderbolt port is a convenient point to attach such a device. The OS may use IOMMU to defend against DMA attacks. Some BIOSes mark these externally facing root ports with this ACPI _DSD [1]: Name (_DSD, Package () { ToUUID ("efcc06cc-73ac-4bc3-bff0-76143807c389"), Package () { Package () {"ExternalFacingPort", 1}, Package () {"UID", 0 } } }) If we find such a root port, mark it and all its children as untrusted. The rest of the OS may use this information to enable DMA protection against malicious devices. For instance the device may be put behind an IOMMU to keep it from accessing memory outside of what the driver has allocated for it. While at it, add a comment on top of prp_guids array explaining the possible caveat resulting when these GUIDs are treated equivalent. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas commit b4fa61ba05f2afa17558914fdd2b819e9e7e466f Author: Deepak Rawat Date: Wed Sep 26 17:17:33 2018 -0700 drm/vmwgfx: Don't clear mode::type anymore With kernel commit "drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C vs. DRM_MODE_TYPE_BUILTIN handling", no need to clear mode::type for user-space bug. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 2f5544ff030040a1016277cb91c347a64568b597 Author: Deepak Rawat Date: Fri Sep 21 14:34:02 2018 -0700 drm/vmwgfx: Use atomic helper function for dirty fb IOCTL USe new atomic helper for dirty fb IOCTL which make use of damage interface. Note that this is only done for STDU and SOU, for legacy display unit still using old interface. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 61c21387c8b3191b1e74d01cab902c9b3493beb0 Author: Deepak Rawat Date: Wed Aug 8 15:41:56 2018 -0700 drm/vmwgfx: Enable FB_DAMAGE_CLIPS property for SOU primary plane SOU primary plane now support damage clips, enable it for user-space. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 31da2df8ce18556a9ebe78f6626661da962940ad Author: Deepak Rawat Date: Fri Sep 21 14:10:35 2018 -0700 drm/vmwgfx: Update comments for sou plane update function Update comments to sync with code. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 67a51b3d9889978d3086f9e63bdabe157af428ff Author: Deepak Rawat Date: Fri Sep 21 14:07:33 2018 -0700 drm/vmwgfx: Use the new interface for SOU plane update With new interface to do plane update on SOU available, use that instead of old kms_dirty. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 5d35abade40d34368838a7b389c3613073b8273c Author: Deepak Rawat Date: Wed Aug 8 15:02:48 2018 -0700 drm/vmwgfx: Implement SOU plane update for BO backed fb Using the new interface implement SOU plane update for BO backed fb. v2: Rebase to new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 43d1e627144ae1bf8de778a583bdf77c2e521cb3 Author: Deepak Rawat Date: Wed Aug 8 12:39:31 2018 -0700 drm/vmwgfx: Implement SOU plane update for surface backed fb Using the new interface implement SOU plane update for surface backed fb. v2: Rebase to new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 8bb6af5b0cbec157e1481d66d562f4752d28d361 Author: Deepak Rawat Date: Fri Jul 27 17:28:17 2018 -0700 drm/vmwgfx: Enable FB_DAMAGE_CLIPS property for STDU primary plane STDU primary plane now support damage clips, enable it for user-space. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 88b37c3ae769beb9f0b2a15604788a497211ad45 Author: Deepak Rawat Date: Fri Sep 21 13:46:42 2018 -0700 drm/vmwgfx: Update comments for stdu plane update Update the comments to sync with code. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 4606eeaf679b796c98a9fe69f324c7ddfab35409 Author: Deepak Rawat Date: Fri Sep 21 13:42:35 2018 -0700 drm/vmwgfx: Use the new interface for STDU plane update With new interface to do plane update on STDU available, use that instead of old kms_dirty. v2: Use fence from new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit bc7be607a0edc1bf1ea403efbdd0fe81a71dc369 Author: Deepak Rawat Date: Mon Jul 9 16:17:17 2018 -0700 drm/vmwgfx: Implement STDU plane update for BO backed fb Using the new interface implement STDU plane update for BO backed fb. v2: Rebase to new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit ad377b433b8072861be86ba435944c8a42a20228 Author: Deepak Rawat Date: Wed Jul 11 16:25:19 2018 -0700 drm/vmwgfx: Implement STDU plane update for surface backed fb Using the new interface implement STDU plane update for surface backed fb. v2: Rebase to new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit e41774c08ede53d96501f28f68645107f232960d Author: Deepak Rawat Date: Wed Jul 11 15:42:45 2018 -0700 drm/vmwgfx: Add a new interface for plane update on a display unit Add a new struct vmw_du_update_plane similar to vmw_kms_dirty which represent the flow of operations needed to update a display unit from surface or bo (blit a new framebuffer). v2: - Kernel doc correction. - Rebase. v3: Rebase to new resource validation. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit b9fc5e01d1ce78eb53fd4dedd51a1563e636eea2 Author: Rob Clark Date: Wed May 30 17:46:20 2018 -0700 drm: Add helper to implement legacy dirtyfb Add an atomic helper to implement dirtyfb support. This is needed to support DSI command-mode panels with x11 userspace (ie. when we can't rely on pageflips to trigger a flush to the panel). v2: Modified the helper to use plane fb_damage_clips property and removed plane_state::dirty flag. v3: - Use uapi drm_mode_rect. - Support annotate flags. v4: Correct kernel doc. Signed-off-by: Rob Clark Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit f13ba9c21dc8275207f3705dba37fff947347dca Author: Deepak Rawat Date: Mon Oct 15 11:07:08 2018 -0700 drm/selftest: Add drm damage helper selftest Selftest for drm damage helper iterator functions. v2: Rebase to new test-drm_modeset. Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit d2780b1f021bfe1674d21542e7274df6a5016a52 Author: Deepak Rawat Date: Wed May 30 14:42:52 2018 -0700 drm: Add helper iterator functions for plane fb_damage_clips blob With fb_damage_clips blob property in drm_plane_state, this patch adds helper iterator to traverse the damage clips that lie inside plane src. Iterator will return full plane src as damage in case need full plane update or damage is not specified. v2: - Plane src clipping correction - Handle no plane update case in iter_next Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit d9778b40260950a01a00852be43ca6c5c2d97f69 Author: Deepak Rawat Date: Wed Aug 8 17:36:26 2018 -0700 drm: Add a new helper to validate damage during atomic_check This helper function makes sure that damage from plane state is discarded for full modeset. Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit d3b21767821ed322a4024c99bc360cd0892f3d82 Author: Lukasz Spintzyk Date: Wed May 23 19:04:08 2018 -0700 drm: Add a new plane property to send damage during plane update FB_DAMAGE_CLIPS is an optional plane property to mark damaged regions on the plane in framebuffer coordinates of the framebuffer attached to the plane. The layout of blob data is simply an array of "struct drm_mode_rect". Unlike plane src coordinates, damage clips are not in 16.16 fixed point. As plane src in framebuffer cannot be negative so are damage clips. In damage clip, x1/y1 are inclusive and x2/y2 are exclusive. This patch also exports the kernel internal drm_rect to userspace as drm_mode_rect. This is because "struct drm_clip_rect" is not sufficient to represent damage for current plane size. Driver which are interested in enabling FB_DAMAGE_CLIPS property for a plane should enable this property using drm_plane_enable_damage_clips. v2: - Input validation on damage clips against framebuffer size. - Doc update, other minor changes. Signed-off-by: Lukasz Spintzyk Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 531971231dac0edf17af32b06f09681f6506c0a1 Author: Eric Long Date: Tue Nov 6 13:01:37 2018 +0800 dmaengine: sprd: Add me as one of the module authors Add me as one of the module authors. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 770399df90b6e43bd086653f0a35888dca056576 Author: Eric Long Date: Tue Nov 6 13:01:36 2018 +0800 dmaengine: sprd: Support DMA 2-stage transfer mode The Spreadtrum DMA controller supports channel 2-stage tansfer mode, that means we can request 2 dma channels, one for source channel, and another one for destination channel. Once the source channel's transaction is done, it will trigger the destination channel's transaction automatically by hardware signal. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 97dbd6ea02beb3a7027c158e0a110b5095268d59 Author: Eric Long Date: Tue Nov 6 13:01:35 2018 +0800 dmaengine: sprd: Support DMA link-list cyclic callback The Spreadtrum DMA link-list mode is always one cyclic transfer, so we should clear the SPRD_DMA_LLIST_END flag for the link-list configuration. Moreover add cyclic callback support for the cyclic transfer. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 0e5d7b1eb6fc06d2f9287519e238fa13efb69cee Author: Eric Long Date: Tue Nov 6 13:01:34 2018 +0800 dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel It will be failed to start one new transfer if the channel started one none interrupt transfer before, since we will only set the schan->cur_desc as NULL depending on the transfer interrupt now. Thus we should set schan->cur_desc as NULL when free or terminate one dma channel to avoid this issue. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 13e8997924a0df7f0136d742aa829b791889d3ce Author: Eric Long Date: Tue Nov 6 13:01:33 2018 +0800 dmaengine: sprd: Fix the last link-list configuration We will pass sglen as 0 configure the last link-list configuration when filling the descriptor, which will cause the incorrect link-list configuration. Thus we should check if the sglen is 0 to configure the correct link-list configuration. Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit d762ab33ccd03e8c1ad50b814d2deccec15b8c28 Author: Eric Long Date: Tue Nov 6 13:01:32 2018 +0800 dmaengine: sprd: Get transfer residue depending on the transfer direction Add one field to save the transfer direction for struct sprd_dma_desc, which is used to get correct transfer residue depending on the transfer direction. [Baolin Wang adds one field to present the transfer direction] Signed-off-by: Eric Long Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit a0ecabf503413446f08deb8f7226b6135cf922b0 Author: Baolin Wang Date: Tue Nov 6 13:01:31 2018 +0800 dmaengine: sprd: Remove direction usage from struct dma_slave_config The direction field of struct dma_slave_config was marked deprecated, thus remove the usage. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul commit 6bbb77a811085b62056bf3583dbc5d28a319c0cb Author: Michael Straube Date: Thu Nov 29 15:08:38 2018 +0100 staging: wilc1000: correct inconsistent indenting Correct inconsistent indenting reported by smatch. Instead of simply remove indentation, refactor the loop to also improve readabilitiy. Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8f1a0ac1eba70b811dfcf9034f6d9c977e21cb83 Author: Ajay Singh Date: Sun Dec 2 18:03:38 2018 +0000 staging: wilc1000: handle scan operation callback from cfg80211 context Refactor code to handle scan operation callback from cfg80211 context. No need to maintain 'scan_attr' struct as the wid command is directly sent to firmware from cfg80211 context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit a343cf5d329e54c6b76a83ec6e98c67ec6eb34bf Author: Ajay Singh Date: Sun Dec 2 18:03:34 2018 +0000 staging: wilc1000: avoid extra buffer copy while connect cfg ops Refactor the code to avoid the use of an extra buffer to store the connection related parameter. No need to call cfg80211_disconnected in case of failure to send the wid command to firmware, an error status is directly returned in cfg80211 connect callback. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit e559681279828000d7e3eb69ec7f463e54820c30 Author: Ajay Singh Date: Sun Dec 2 18:03:31 2018 +0000 staging: wilc1000: handle connect ops callback from cfg80211 context Refactor the connect related cfg callback to be called from cfg80211 context. No need to post connect command internally in case scan is in progress instead simply return the error status in connect ops callback. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8e6d6cf0f2c980533f4c54550c81f627543508be Author: Ajay Singh Date: Sun Dec 2 18:03:28 2018 +0000 staging: wilc1000: avoid deferred handling of cfg80211 disconnect callback Refactor disconnect operation callback to handle from the cfg80211 context. The reason code is not required to pass as parameter to the function, so remove it. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 19cb25e1e6a9061e9614e04d477419fc70b81290 Author: Ajay Singh Date: Sun Dec 2 18:03:25 2018 +0000 staging: wilc1000: handle get_station() ops callback in cfg80211 context Refactor code to handle the get_station() callback from cfg80211 context. Provided different API's to fetch the station statistics information in sync or async call. From cfg80211 get_station() ops callback calls the sync version of API. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 05d3bcb0f447a490f63220425fea4f9b23e19122 Author: Ajay Singh Date: Sun Dec 2 18:03:22 2018 +0000 staging: wilc1000: handle remain on channel cfg ops from cfg80211 context Refactor wilc_remain_on_channel() to handle remain_on_channel callback from cfg80211 context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 530975f3175fc09944a00f55611c5e737c7efbed Author: Ajay Singh Date: Sun Dec 2 18:03:20 2018 +0000 staging: wilc1000: use correct 'struct remain_ch' variable in scan complete Use the correct reference to remain_ch variable in scan complete. Passing 'msg->body.remain_on_ch' to handle_remain_on_chan is not correct. So used the correct reference used to store roc related information during the scan. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 153068b9d1ddd9c9e73f331114e8d574f4f8726f Author: Ajay Singh Date: Sun Dec 2 18:03:17 2018 +0000 staging: wilc1000: refactor wilc_get_mac_address() to avoid deferred handling Avoid handling of WID_MAC_ADDR wid command in deferred approach. Instead of posting the wid to workqueue now handle directly from the caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b7afe350320bde88f6d0b712205feb71b2437a31 Author: Ajay Singh Date: Sun Dec 2 18:03:14 2018 +0000 staging: wilc1000: delete the unused code after code refactor After code refactor some of the macro and variables are not required any more, so deleted the unused code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b61c8064f5bfd501c0d542fa93369ebc28368638 Author: Ajay Singh Date: Sun Dec 2 18:03:11 2018 +0000 staging: wilc1000: handle key related cfg operation from cfg80211 context Refactor add/delete key operation to handle directly from cfg80211 context. Also, avoid an extra copy of the information in hif layer and directly fill the buffer in firmware format. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 98651ca0a1ed4c3fccc7ecc30c76aba5978c822e Author: Ajay Singh Date: Sun Dec 2 18:03:08 2018 +0000 staging: wilc1000: refactor wilc_get_inactive_time() to avoid deferred handling Avoid handling of inactive time related wid command in deferred manner. Instead of posting the wid to workqueue now handle directly from the caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 04a61fbc409cd7d1dfd339162e05f5b3b2cb087a Author: Ajay Singh Date: Sun Dec 2 18:03:05 2018 +0000 staging: wilc1000: refactor wilc_set_wfi_drv_handler() to avoid deferred handling Avoid handling of WID_SET_DRV_HANDLER wid command in deferred approach. Instead of posting the wid to work queue now handle directly from the caller context. Remove 'is_sync' parameter from the API as it's not required anymore. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 5dea026441e5d0aabbb562dd68cb796190052aae Author: Ajay Singh Date: Sun Dec 2 18:03:03 2018 +0000 staging: wilc1000: refactor wilc_set_operation_mode() to avoid deferred handling Avoid handling of WID_CURRENT_CHANNEL wid command in deferred approach. Instead of posting the wid to work queue now handle directly from the caller context. Use structure to fill in the firmware specific format. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit daf0483e1ca3ffc27b0024a815557bfa70120cb6 Author: Ajay Singh Date: Sun Dec 2 18:02:59 2018 +0000 staging: wilc1000: handle station dump cfg ops from cfg80211 context Refactor code to handle dump_station() callback from cfg80211 context. Instead of deferring issue of wid command now send it directly from cfg context. Also making use of wilc_get_rssi() error status in case there is a failure to post the wid command to the firmware. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 532391714d5a8b2689ec4fffc7ee391ffba672c8 Author: Ajay Singh Date: Sun Dec 2 18:02:57 2018 +0000 staging: wilc1000: refactor wilc_hif_set_cfg() to avoid deferred handling Avoid handling configuration params wid command in deferred approach. Instead of posting to workqueue now handle directly from the caller context. Reduce the size of wid array from 32 to 4 as maximum only 4 wid used at a time. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 77506d42febd8fffbf460ae6e649469a6437e6fd Author: Ajay Singh Date: Sun Dec 2 18:02:54 2018 +0000 staging: wilc1000: refactor wilc_set_mac_chnl_num() to avoid deferred handling Avoid handling of WID_CURRENT_CHANNEL wid command in deferred approach. Instead of posting the wid to workqueue now handle directly from the caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 147ccfd451024de2785d678863a6a6889cb2db60 Author: Ajay Singh Date: Sun Dec 2 18:02:51 2018 +0000 staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context Avoid handling of mgmt_frame_register operation callback in a deferred manner. Now set the wid command to firmware directly from caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 976c89b5625d12d5a58bc375a18f66472e1c9867 Author: Ajay Singh Date: Sun Dec 2 18:02:48 2018 +0000 staging: wilc1000: handle add beacon operation callback from cfg80211 context Refactor add/change beacon cfg80211 operation callback to handle from cfg context. Also avoided extra copy of information by packing directly in firmware expected format. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 38b3ffa0ae8334cd721c12a06c8ae51c37fa2691 Author: Ajay Singh Date: Sun Dec 2 18:02:45 2018 +0000 staging: wilc1000: handle delete beacon cfg ops from cfg80211 context() Refactor the code to handle delete beacon cfg operation from cfg80211 context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 4c00f7052fb86130a100d248da904ac940d501c2 Author: Ajay Singh Date: Sun Dec 2 18:02:43 2018 +0000 staging: wilc1000: use is_zero_ether_addr() API to check mac address Use is_zero_ether_addr() API to check if mac address value is zero. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 9f1bdb71388efdc9963ad96ab1145c23c4b35f5b Author: Ajay Singh Date: Sun Dec 2 18:02:40 2018 +0000 staging: wilc1000: handle delete station related callback ops from cfg80211 context Refactor the code to handle delete/delete_all station operation callback from cfg80211 context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 6133ed9f639607b9d95901ddc91dcf4f097066db Author: Ajay Singh Date: Sun Dec 2 18:02:36 2018 +0000 staging: wilc1000: use void return for wilc_hif_pack_sta_param() Change the return type from u32 to void for wilc_hif_pack_sta_param() as its value is not used. Also remove the use of extra pointer as it's not required now. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 78c0c4e845bdc50a4b4d52284d57dd26d442308a Author: Ajay Singh Date: Sun Dec 2 18:02:34 2018 +0000 staging: wilc1000: handle add and edit station from the cfg80211 context Refactor the code to avoid handling of add/edit stations using work queue and now set the wid value from caller context. Avoid making an extra copy of buffer and directly copy the data in firmware expected format. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit cf6d06002dadbafe3d3c83faaf698622247312d1 Author: Ajay Singh Date: Sun Dec 2 18:02:31 2018 +0000 staging: wilc1000: handle setting power management from cfg80211 context Refactor the code to handle the power management cfg operation from the caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 430d0ec49db657801a36a3559a3e90124599acc5 Author: Ajay Singh Date: Sun Dec 2 18:02:28 2018 +0000 staging: wilc1000: handle tx power related callback from cfg80211 context Avoid the use of internal work queue to defer the handling of tx power related cfg operations callback. Now issuing the wid command to firmware directly from the caller context. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 6dea33021f0b9a13ec0d634930e712eec40030c8 Author: Ajay Singh Date: Sun Dec 2 18:02:25 2018 +0000 staging: wilc1000: use mutex lock to synchronized sending 'wid' cmd to firmware Use mutex lock to protect the issuing of wid cmd to the firmware. Currently the wid commands are synchronized by use of hif_workqueue work queue. Now, these changes are required to synchronize the access to wid command, so the commands can be issued directly from cfg80211 context and 'WILC_wq' thread. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit f78d5db98b653e4d717c8b78aa15f76489cd3ab3 Author: Ajay Singh Date: Sun Dec 2 18:02:22 2018 +0000 staging: wilc1000: avoid the use of the static variable to configure wiphy struct Refactor code to avoid the use of static variables to configure the 'wiphy' structure. Now move static variables as part of 'priv' data so it helped to maintain this information per interface. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 21728f2e7226aa1cb8aa04bb670df94afe625196 Author: Ajay Singh Date: Sun Dec 2 18:02:19 2018 +0000 staging: wilc1000: make use of put_unaligned_le32 in handle_set_wfi_drv_handler() Make use of put_unaligned_le32() function to pack the wid command buffer for firmware. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 440592df865f0ef6859882431f65a06c124080db Author: Ajay Singh Date: Sun Dec 2 18:02:16 2018 +0000 staging: wilc1000: remove unnecessary checks in wilc_mac_close() Remove unnecessary 'if' check in wilc_mac_close() as those conditions will not happen. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 0668d5b5921c82e82bc6f5fa97baec5a50e92ab4 Author: Cristian Sicilia Date: Tue Dec 4 21:58:20 2018 +0100 staging: greybus: Added space between string concatenated Some concatenated strings are now spaced. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit b5630e3019b6ddad12aafdbb7b44114690f0a679 Author: Aaro Koskinen Date: Wed Dec 5 00:19:26 2018 +0200 staging: octeon-usb: use a helper function to set the DMA mask Use a helper function to set the DMA mask. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman commit b7a4fbe2300a8965ea760c7e871507b84aea17f6 Author: Anurag Kumar Vulisha Date: Sat Dec 1 16:43:29 2018 +0530 usb: dwc3: Correct the logic for checking TRB full in __dwc3_prepare_one_trb() Availability of TRB's is calculated using dwc3_calc_trbs_left(), which determines total available TRB's based on the HWO bit set in a TRB. In the present code, __dwc3_prepare_one_trb() is called with a TRB which needs to be prepared for transfer. This __dwc3_prepare_one_trb() calls dwc3_calc_trbs_left() to determine total available TRBs and set IOC bit if the total available TRBs are zero. Since the present working TRB (which is passed as an argument to __dwc3_prepare_one_trb() ) doesn't yet have the HWO bit set before calling dwc3_calc_trbs_left(), there are chances that dwc3_calc_trbs_left() wrongly calculates this present working TRB as free(since the HWO bit is not yet set) and returns the total available TRBs as greater than zero (including the present working TRB). This could be a problem. This patch corrects the above mentioned problem in __dwc3_prepare_one_trb() by increementing the dep->trb_enqueue at the last (after preparing the TRB) instead of increementing at the start and setting the IOC bit only if the total available TRBs returned by dwc3_calc_trbs_left() is 1 . Since we are increementing the dep->trb_enqueue at the last, the present working TRB is also considered as available by dwc3_calc_trbs_left() and non zero value is returned . So, according to the modified logic, when the total available TRBs is equal to 1 that means the total available TRBs in the pool are 0. Signed-off-by: Anurag Kumar Vulisha Reviewed-by: Thinh Nguyen Tested-by: Tejas Joglekar Signed-off-by: Felipe Balbi commit 26d62b4d10ad54622cd16b4871ee635f0ee287b6 Author: Anurag Kumar Vulisha Date: Sat Dec 1 16:43:27 2018 +0530 usb: dwc3: don't issue no-op trb for stream capable endpoints The stream capable endpoints require stream id to be given when issuing START TRANSFER. While issuing no-op trb the stream id is not yet known, so don't issue no-op trb's on stream capable endpoints. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Felipe Balbi commit c38465d07972a3bc6d83a5bdb460ed69fee028b2 Author: Cristian Sicilia Date: Tue Nov 27 21:57:17 2018 +0100 staging: emxx_udc: Remove cast and move all in one line. Remove the cast from IO_ADDRESS and use a single line. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit 0ff8c980c7a78e4c48eecb6d730012351f226b61 Author: Szilveszter Székely Date: Wed Nov 28 23:40:32 2018 +0000 staging: vchiq_arm: add __user pointer annotations Add __user to pointers based on context and suggestions by sparse. Other sparse warnings still remain, in cases where more change would be required apart from adding __user. Signed-off-by: Szilveszter Székely Signed-off-by: Greg Kroah-Hartman commit 0bc5b2ba455f1b35c7292b393134f249afb03154 Author: Stephen Davies Date: Thu Nov 29 12:49:18 2018 +1100 staging: comedi: drivers: Cleanup malformed licence identifier This patch fixes multiple occurences of the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 NB. This is an additional patch and does not overlap the patch sent yesterday for 8255.h. Should have sent them all together. Newb mistake. Cc: Ian Abbott Cc: H Hartley Sweeten Signed-off-by: Stephen Davies Signed-off-by: Greg Kroah-Hartman commit a7351807bd8b5db0306ccd6977f8c13722731dd5 Author: Anurag Kumar Vulisha Date: Sat Dec 1 16:43:25 2018 +0530 usb: dwc3: update stream id in depcmd For stream capable endpoints, stream id related information needs to be updated into DEPCMD while issuing START TRANSFER. This patch does the same. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Felipe Balbi commit 2166e0f55250088bd9f90c6e0a75cbe630a88f80 Author: Michael Straube Date: Wed Nov 28 18:29:06 2018 +0100 staging: rtl8188eu: cleanup comment in hal8188e_rate_adaptive.c Cleanup comment in hal8188e_rate_adaptive.c. Clears checkpatch warnings. WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a9236c0867428988a62daf2244ff5d70cbf58555 Author: Michael Straube Date: Wed Nov 28 18:29:05 2018 +0100 staging: rtl8188eu: cleanup alignment issues in hal8188e_rate_adaptive.c Cleanup alignment issues reported by checkpatch. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 4b1ea01b507246137ce82ef2f005ebf9d0662200 Author: Michael Straube Date: Wed Nov 28 18:29:04 2018 +0100 staging: rtl8188eu: cleanup lines ending with '(' Cleanup lines ending with '(' in hal8188e_rate_adaptive.c. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 256b95bf09e1e487bc27296b9caa80682276831a Author: Michael Straube Date: Wed Nov 28 18:29:03 2018 +0100 staging: rtl8188eu: add spaces around operators in hal8188e_rate_adaptive.c Add spaces around operators to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit ae4224fc83a20e2027c24e5567f4bdfc9df254fe Author: Michael Straube Date: Wed Nov 28 18:29:02 2018 +0100 staging: rtl8188eu: remove parentheses in hal8188e_rate_adaptive.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8195b3e8d3fe12a328b22f34f3ae9c21e2e05797 Author: Michael Straube Date: Wed Nov 28 18:29:01 2018 +0100 staging: rtl8188eu: use __func__ in hal8188e_rate_adaptive.c Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e086f61479d1ae4dd78fd882228311ce31e73e91 Author: Michael Straube Date: Mon Nov 26 19:18:20 2018 +0100 staging: pi433: add missing call to cdev_del() If cdev_add() fails, cdev_del() should be called. Add the missing cdev_del() call as pointed out by Dan Carpenter. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d4d6b086df62b37e5712d006bc87bc56efbbae67 Author: Colin Ian King Date: Tue Nov 27 14:23:28 2018 +0000 staging: comedi: fix spelling mistake "desination" -> "destination" There is a spelling mistake in message text in the call to unittest, fix this. Signed-off-by: Colin Ian King Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 44b44c98caff2f1188c08ca7f539f24059ec76b0 Author: Colin Ian King Date: Tue Nov 27 14:27:15 2018 +0000 staging: rtlwifi: fix spelling mistake "disnabled" -> "disabled" There is a spelling mistake in an ODM_RT_TRACE message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 5bf9ea4ea0353fbf518bc19cd7e02a526bb3345f Author: Stephen Davies Date: Wed Nov 28 16:40:26 2018 +1100 staging: comedi: drivers: Cleanup malformed license identifier This patch fixes the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 Cc: Ian Abbott Cc: H Hartley Sweeten Signed-off-by: Stephen Davies Signed-off-by: Greg Kroah-Hartman commit c48f12e28d94a81d94eb27231adf027a677c0e19 Author: Colin Ian King Date: Wed Nov 28 15:08:09 2018 +0000 staging: rtl8188eu: fix spelling mistake "inferface" -> "interface" Fix spelling mistake in module description text. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 979e0419329c025bfbc4c072b1bacf05a6c7cd50 Author: Colin Ian King Date: Wed Nov 28 16:12:32 2018 +0000 staging: speakup: i18n: fix spelling mistake "phoneticly" -> "phonetically" There is a spelling mistake in array speakup_default_msgs at index MSG_FUNCNAME_SPELL_WORD_PHONETICALLY, fix this. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 8cfb722bd55ab3879486001797741e879fbc7095 Author: Sergio Paracuellos Date: Thu Nov 29 19:39:55 2018 +0100 staging: mt7621-pci: add comment clarifying inverted reset lines To avoid people reading this code being very confused, add a comment clarifying the need for invert resets on some chip revisions. Suggested-by: Dan Carpenter Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit f9bb84090777dfee2586aef55d61e2c976ef31bc Author: Yangtao Li Date: Fri Nov 30 09:43:48 2018 -0500 staging: android: ion: Remove unused header files seq_file.h does not need to be included,so remove it. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 13e810f199b48383523707aa69fb9673d688055a Author: Christoph Manszewski Date: Wed Nov 28 16:32:12 2018 +0100 drm/exynos: mixer: Fix color range setting Color format and color range was set based on resolution. Change that, by splitting range and format. Leave color format setting as it is, set color range based on drm_display_mode using drm_default_quant_range helper function. Tested on Odroid-U3 with Exynos 4412 CPU, kernel next-20181128 using modetest. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit e9e5ba93cb1f61c16298aade49ec2537d497f0d6 Author: Christoph Manszewski Date: Wed Nov 28 16:32:11 2018 +0100 drm/exynos: mixer: Fix color format setting Fix color format decision based on height(pixels). According to CEA-861-E: "High Definition (HD) - A CE video format that, inclusively, has between 720 to 1080 active vertical lines (Vactive) lines per video frame." Tested on Odroid-U3 with Exynos 4412 CPU, kernel next-20181128 using modetest. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit af130280c613218a37675c6442650ca809f274c2 Author: Christoph Manszewski Date: Thu Oct 25 18:21:53 2018 +0200 drm/exynos: decon: Make pixel blend mode configurable The decon hardware supports different blend modes. Add pixel blend mode property and make it configurable, by modifying the blend equation. Tested on TM2 with Exynos 5433 CPU, on top of linux-next-20181019. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit 54947290ef62880936ce5bd91489d41e8b1cbc2a Author: Christoph Manszewski Date: Thu Oct 25 18:21:52 2018 +0200 drm/exynos: decon: Make plane alpha configurable The decon hardware supports variable plane alpha. Currently planes are opaque, make this configurable. Tested on TM2 with Exynos 5433 CPU, on top of linux-next-20181019. Signed-off-by: Christoph Manszewski Signed-off-by: Inki Dae commit aaef6a9dd0ea7f824a53cfc556bb621e207cefe7 Author: Corentin Labbe Date: Wed Sep 26 07:44:20 2018 -0400 media: usb: dvb-usb: remove old friio driver friio drivers is unused and un-compilable since commit b30cc07de8a9 ("media: dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861"). Let's remove it. Signed-off-by: Corentin Labbe Cc: Akihiro Tsukada Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d3411f656cbba9c3cfb85644189f83ce159c6e29 Author: Malcolm Priestley Date: Thu Nov 29 17:30:25 2018 -0500 media: lmedm04: use dvb_usbv2_generic_rw_locked Use dvb-usb-v2 generic usb function for bulk transfers and simplify logic. Signed-off-by: Malcolm Priestley Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 8824e5018c1944ef68d1a4a566ac245290c99da8 Author: Malcolm Priestley Date: Thu Nov 29 17:29:51 2018 -0500 media: lmedm04: Move usb buffer to lme2510_state. lme2510_state exists for the entire duration of driver. Move usb_buffer to lme2510_state removing the need for lme2510_exit_int for removing the buffer. Signed-off-by: Malcolm Priestley Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d95947c05eaf4696c7cbb5449738e1a3e180ad22 Author: Sean Young Date: Tue Dec 4 04:59:10 2018 -0500 media: dib7000p: Remove dead code Clang warns that 'interleaving' is assigned to itself in this function. drivers/media/dvb-frontends/dib7000p.c:1874:15: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] interleaving = interleaving; ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ 1 warning generated. Just remove the self-assign and leave existing code in place for now. Reported-by: Nick Desaulniers Suggested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d695eb5b3b963230652db29eae341a9706c593f4 Author: Nikita Gerasimov Date: Wed Sep 26 17:44:45 2018 -0400 media: rtl28xxu: add support for Sony CXD2837ER slave demod Since 2018 some new revisions of RTL2832P based devices having Sony CXD2837ER as a slave demodulator instead of Panasonic MN88473. CXD2837ER handled in DVB_CXD2841ER module but it's has a lack of control. So slave demod has to be reseted by GPIO0 before detecting to woke up CXD2837ER. Signed-off-by: Nikita Gerasimov Cc: Antti Palosaari Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 30eb909d1146454345c204393ea18a4d57bcfa39 Author: Kieran Bingham Date: Sat Jan 27 18:43:01 2018 -0500 media: uvcvideo: Utilise for_each_uvc_urb iterator A new iterator is available for processing UVC URB structures. This simplifies the processing of the internal stream data. Convert the manual loop iterators to the new helper, adding an index helper to keep the existing debug print. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fb58e16bb7838338b76b6fd03fdc3032c1841a9d Author: Kieran Bingham Date: Mon Nov 5 10:41:09 2018 -0500 media: uvcvideo: Rename uvc_{un,}init_video() We have both uvc_init_video() and uvc_video_init() calls which can be quite confusing to determine the process for each. Now that video uvc_video_enable() has been renamed to uvc_video_start_streaming(), adapt these calls to suit the new flow. Rename uvc_init_video() to uvc_video_start_transfer() and uvc_uninit_video() to uvc_video_stop_transfer(). Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 571e70dbd42105611419ccc38266d58f8e0a22ee Author: Kieran Bingham Date: Mon Nov 5 10:28:24 2018 -0500 media: uvcvideo: Split uvc_video_enable into two uvc_video_enable() is used both to start and stop the video stream object, however the single function entry point shares no code between the two operations. Split the function into two distinct calls, and rename to uvc_video_start_streaming() and uvc_video_stop_streaming() as appropriate. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit b012186acef57b683e3c22ba758d60c3780db16a Author: Kieran Bingham Date: Wed Mar 22 05:42:52 2017 -0400 media: uvcvideo: Move decode processing to process context Newer high definition cameras, and cameras with multiple lenses such as the range of stereo-vision cameras now available have ever increasing data rates. The inclusion of a variable length packet header in URB packets mean that we must memcpy the frame data out to our destination 'manually'. This can result in data rates of up to 2 gigabits per second being processed. To improve efficiency, and maximise throughput, handle the URB decode processing through a work queue to move it from interrupt context, and allow multiple processors to work on URBs in parallel. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ece41454c6a5ed8f301ef1c37710ab222e577823 Author: Kieran Bingham Date: Fri Nov 9 09:26:10 2018 -0500 media: uvcvideo: Abstract streaming object lifetime The streaming object is a key part of handling the UVC device. Although not critical, we are currently missing a call to destroy the mutex on clean up paths, and we are due to extend the objects complexity in the near future. Facilitate easy management of a stream object by creating a pair of functions to handle creating and destroying the allocation. The new uvc_stream_delete() function also performs the missing mutex_destroy() operation. Previously a failed streaming object allocation would cause uvc_parse_streaming() to return -EINVAL, which is inappropriate. If the constructor failes, we will instead return -ENOMEM. While we're here, fix the trivial spelling error in the function banner of uvc_delete(). Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 01e90464e42e51b118a95ebb0fb002af1e2e79af Author: Kieran Bingham Date: Thu Mar 16 09:33:05 2017 -0400 media: uvcvideo: queue: Support asynchronous buffer handling The buffer queue interface currently operates sequentially, processing buffers after they have fully completed. In preparation for supporting parallel tasks operating on the buffers, we will need to support buffers being processed on multiple CPUs. Adapt the uvc_queue_next_buffer() such that a reference count tracks the active use of the buffer, returning the buffer to the VB2 stack at completion. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit c50c9c1e659d8de9c13441f243e7938413be6e71 Author: Kieran Bingham Date: Wed Jan 3 12:33:49 2018 -0500 media: uvcvideo: queue: Simplify spin-lock usage Both uvc_start_streaming(), and uvc_stop_streaming() are called from userspace context, with interrupts enabled. As such, they do not need to save the IRQ state, and can use spin_lock_irq() and spin_unlock_irq() respectively. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit e829b262a6782ee36ee04e32a2fc7341385ac7fe Author: Kieran Bingham Date: Thu Mar 23 08:25:14 2017 -0400 media: uvcvideo: Protect queue internals with helper The URB completion operation obtains the current buffer by reading directly into the queue internal interface. Protect this queue abstraction by providing a helper uvc_queue_get_current_buffer() which can be used by both the decode task, and the uvc_queue_next_buffer() functions. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 3f3c75541ffe082194e48ea9aa5edf2341f77753 Author: Dan Carpenter Date: Mon Dec 3 17:49:33 2018 +0300 dmaengine: dmatest: fix a small memory leak in dmatest_func() We recently moved the test size tests around but it means we need to adjust the error handling as well or we leak the "pq_coefs" memory. I updated the label name to reflect that we're freeing coefs. Fixes: 787d3083caf8 ("dmaengine: dmatest: move size checks earlier in function") Signed-off-by: Dan Carpenter Signed-off-by: Vinod Koul commit c6d664fe8a7a47af1c63c037e20570d4abbda3c6 Author: Kieran Bingham Date: Wed Mar 15 05:39:14 2017 -0400 media: uvcvideo: Convert decode functions to use new context structure The URB completion handlers currently reference the stream context. Now that each URB has its own context structure, convert the decode (and one encode) functions to utilise this context for URB management. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 811496c9679a7bf58a4e8af739fc2ee927345469 Author: Kieran Bingham Date: Tue Mar 14 18:03:23 2017 -0400 media: uvcvideo: Refactor URB descriptors We currently store three separate arrays for each URB reference we hold. Objectify the data needed to track URBs into a single uvc_urb structure, allowing better object management and tracking of the URB. All accesses to the data pointers through stream, are converted to use a uvc_urb pointer for consistency. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ba6f508d0ec4adb09f0a939af6d5e19cdfa8667d Author: Dan Williams Date: Tue Dec 4 13:37:27 2018 -0800 x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Commit: f77084d96355 "x86/mm/pat: Disable preemption around __flush_tlb_all()" addressed a case where __flush_tlb_all() is called without preemption being disabled. It also left a warning to catch other cases where preemption is not disabled. That warning triggers for the memory hotplug path which is also used for persistent memory enabling: WARNING: CPU: 35 PID: 911 at ./arch/x86/include/asm/tlbflush.h:460 RIP: 0010:__flush_tlb_all+0x1b/0x3a [..] Call Trace: phys_pud_init+0x29c/0x2bb kernel_physical_mapping_init+0xfc/0x219 init_memory_mapping+0x1a5/0x3b0 arch_add_memory+0x2c/0x50 devm_memremap_pages+0x3aa/0x610 pmem_attach_disk+0x585/0x700 [nd_pmem] Andy wondered why a path that can sleep was using __flush_tlb_all() [1] and Dave confirmed the expectation for TLB flush is for modifying / invalidating existing PTE entries, but not initial population [2]. Drop the usage of __flush_tlb_all() in phys_{p4d,pud,pmd}_init() on the expectation that this path is only ever populating empty entries for the linear map. Note, at linear map teardown time there is a call to the all-cpu flush_tlb_all() to invalidate the removed mappings. [1]: https://lkml.kernel.org/r/9DFD717D-857D-493D-A606-B635D72BAC21@amacapital.net [2]: https://lkml.kernel.org/r/749919a4-cdb1-48a3-adb4-adb81a5fa0b5@intel.com [ mingo: Minor readability edits. ] Suggested-by: Dave Hansen Reported-by: Andy Lutomirski Signed-off-by: Dan Williams Acked-by: Peter Zijlstra (Intel) Acked-by: Kirill A. Shutemov Cc: Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: dave.hansen@intel.com Fixes: f77084d96355 ("x86/mm/pat: Disable preemption around __flush_tlb_all()") Link: http://lkml.kernel.org/r/154395944713.32119.15611079023837132638.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar commit 0a9fe8ca844d43f3f547f0e166122b6048121c8f Author: Dan Williams Date: Tue Dec 4 13:37:21 2018 -0800 x86/mm: Validate kernel_physical_mapping_init() PTE population The usage of __flush_tlb_all() in the kernel_physical_mapping_init() path is not necessary. In general flushing the TLB is not required when updating an entry from the !present state. However, to give confidence in the future removal of TLB flushing in this path, use the new set_pte_safe() family of helpers to assert that the !present assumption is true in this path. [ mingo: Minor readability edits. ] Suggested-by: Peter Zijlstra Suggested-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Kirill A. Shutemov Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/154395944177.32119.8524957429632012270.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar commit 4369deaa2f022ef92da45a0e7eec8a4a52e8e8a4 Author: Dan Williams Date: Tue Dec 4 13:37:16 2018 -0800 generic/pgtable: Introduce set_pte_safe() Commit: f77084d96355 "x86/mm/pat: Disable preemption around __flush_tlb_all()" introduced a warning to capture cases __flush_tlb_all() is called without pre-emption disabled. It triggers a false positive warning in the memory hotplug path. On investigation it was found that the __flush_tlb_all() calls are not necessary. However, they are only "not necessary" in practice provided the ptes are being initially populated from the !present state. Introduce set_pte_safe() as a sanity check that the pte is being updated in a way that does not require a TLB flush. Forgive the macro, the availability of the various of set_pte() levels is hit and miss across architectures. [ mingo: Minor readability edits. ] Suggested-by: Peter Zijlstra Suggested-by: Dave Hansen Signed-off-by: Dan Williams Acked-by: Peter Zijlstra (Intel) Acked-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/279dadae-9148-465c-7ec6-3f37e026c6c9@intel.com Signed-off-by: Ingo Molnar commit 0cebbb60f759a709dabb3c87b9704f9844878850 Author: Dan Williams Date: Tue Dec 4 13:37:11 2018 -0800 generic/pgtable: Introduce {p4d,pgd}_same() In preparation for introducing '_safe' versions of page table entry 'set' helpers, introduce generic versions of p4d_same() and pgd_same(). Signed-off-by: Dan Williams Acked-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/154395943153.32119.1733586547359626311.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar commit c683c37cd13246941924c48f6c6a9863425e0cec Author: Dan Williams Date: Tue Dec 4 13:37:06 2018 -0800 generic/pgtable: Make {pmd, pud}_same() unconditionally available In preparation for {pmd,pud}_same() to be used outside of transparent huge page code paths, make them unconditionally available. This enables them to be used in the definition of a new family of set_{pte,pmd,pud,p4d,pgd}_safe() helpers. Signed-off-by: Dan Williams Acked-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/154395942644.32119.10238934183949418128.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar commit 29434801e7e9c6d05fbea4533b3c0bd6be612f62 Author: Sean Christopherson Date: Tue Dec 4 13:25:58 2018 -0800 x86/vdso: Remove a stale/misleading comment from the linker script Once upon a time, vdso2c aggressively stripped data from the vDSO image when generating the final userspace image. This included stripping the .altinstructions and .altinstr_replacement sections. Eventually, the stripping process reverted to "objdump -S" and no longer removed the aforementioned sections, but the comment remained. Keeping the .alt* sections at the end of the PT_LOAD segment is no longer necessary, but there's no harm in doing so and it's a helpful reminder that they don't need to be included in the final vDSO image, i.e. someone may want to take another stab at zapping/stripping the unneeded sections. Signed-off-by: Sean Christopherson Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Fixes: da861e18eccc ("x86, vdso: Get rid of the fake section mechanism") Link: http://lkml.kernel.org/r/20181204212600.28090-3-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 24b7c77bbb24f129beead93574ff248c3db1288e Author: Sean Christopherson Date: Tue Dec 4 13:25:57 2018 -0800 x86/vdso: Remove obsolete "fake section table" reservation At one point the vDSO image was manually stripped down by vdso2c in an attempt to minimize the size of the image mapped into userspace. Part of that stripping process involved building a fake section table so as not to break userspace processes that parse the section table. Memory for the fake section table was reserved in the .rodata section so that vdso2c could simply copy the entire PT_LOAD segment into the userspace image after building the fake table. Eventually, the entire fake section table approach was dropped in favor of stripping the vdso "the old fashioned way", i.e. via objdump -S. But, the reservation in .rodata for the fake table was left behind. Remove the reserveration along with a few other related defines and section entries. Removing the fake section table placeholder zaps a whopping 0x340 bytes from the 64-bit vDSO image, which drops the current image's size to under 4k, i.e. reduces the effective size of the userspace vDSO mapping by a full page. Signed-off-by: Sean Christopherson Acked-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Fixes: da861e18eccc ("x86, vdso: Get rid of the fake section mechanism") Link: http://lkml.kernel.org/r/20181204212600.28090-2-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 438cbf8871246606f2fc1964d301fa02af39e4e4 Author: Lendacky, Thomas Date: Tue Dec 4 22:27:20 2018 +0000 x86/umip: Make the UMIP activated message generic The User Mode Instruction Prevention (UMIP) feature is part of the x86_64 instruction set architecture and not specific to Intel. Make the message generic. Signed-off-by: Tom Lendacky Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit a19788612f51b7874e0cedce4dfff535e502015a Author: Geert Uytterhoeven Date: Mon Dec 3 15:18:06 2018 +0100 dmaengine: sh: Remove R-Mobile APE6 support Renesas R-Mobile APE6 support is currently unused: - DMA slaves were never enabled in r8a73a4.dtsi, - The driver relies on legacy filter matching and describing all slaves and MID/RIDs in a table, unlike modern DMA engine drivers for similar hardware like rcar-dmac, - The driver doesn't seem to work well. Remove the driver, it can be resurrected from git history when needed. As this was the last user of SH_DMAE_BASE on Renesas ARM SoCs, the sh-dma-engine driver core is now used on SuperH only. Note that the DT bindings are still present, as r8a73a4.dtsi uses them. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit 32899682cf457de5c091ee7dbbee34ad9bf2f992 Author: JackyChou Date: Fri Nov 30 14:31:22 2018 +0800 USB: serial: mos7840: add a product ID for the new product Add a new PID 0x7843 to the driver. Let the new products be able to set up 3 serial ports with the driver. Note that this depends on e8603076f540 ("USB: serial: mos7840: clean up register handling"). Signed-off-by: JackyChou [ johan: mention dependency in case anyone wants to backport this ] Signed-off-by: Johan Hovold commit e8603076f5404cc103869a62f319bc8a4797cc50 Author: JackyChou Date: Fri Nov 30 14:31:21 2018 +0800 USB: serial: mos7840: clean up register handling In the read/write function, set port 2 independently in the 2-port case. When setting the offset of port registers, the offset between port 1 and other ports is different, so port 1 is set independently. Then in the rest of ports, the port 2 between 2-ports case and 4-ports case is different, so port 2 in 2-ports case is set independently. Specifically, port 2 in the 2-port case maps to the registers used by port 3 in the 4-port case. Signed-off-by: JackyChou [ johan: simplify register-offset handling at port probe, add a comment and amend commit message ] Signed-off-by: Johan Hovold commit a74f0fa082b76c6a76cba5672f36218518bfdc09 Author: Eric Dumazet Date: Tue Dec 4 07:58:17 2018 -0800 tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT TCP_NOTSENT_LOWAT socket option or sysctl was added in linux-3.12 as a step to enable bigger tcp sndbuf limits. It works reasonably well, but the following happens : Once the limit is reached, TCP stack generates an [E]POLLOUT event for every incoming ACK packet. This causes a high number of context switches. This patch implements the strategy David Miller added in sock_def_write_space() : - If TCP socket has a notsent_lowat constraint of X bytes, allow sendmsg() to fill up to X bytes, but send [E]POLLOUT only if number of notsent bytes is below X/2 This considerably reduces TCP_NOTSENT_LOWAT overhead, while allowing to keep the pipe full. Tested: 100 ms RTT netem testbed between A and B, 100 concurrent TCP_STREAM A:/# cat /proc/sys/net/ipv4/tcp_wmem 4096 262144 64000000 A:/# super_netperf 100 -H B -l 1000 -- -K bbr & A:/# grep TCP /proc/net/sockstat TCP: inuse 203 orphan 0 tw 19 alloc 414 mem 1364904 # This is about 54 MB of memory per flow :/ A:/# vmstat 5 5 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 256220672 13532 694976 0 0 10 0 28 14 0 1 99 0 0 2 0 0 256320016 13532 698480 0 0 512 0 715901 5927 0 10 90 0 0 0 0 0 256197232 13532 700992 0 0 735 13 771161 5849 0 11 89 0 0 1 0 0 256233824 13532 703320 0 0 512 23 719650 6635 0 11 89 0 0 2 0 0 256226880 13532 705780 0 0 642 4 775650 6009 0 12 88 0 0 A:/# echo 2097152 >/proc/sys/net/ipv4/tcp_notsent_lowat A:/# grep TCP /proc/net/sockstat TCP: inuse 203 orphan 0 tw 19 alloc 414 mem 86411 # 3.5 MB per flow A:/# vmstat 5 5 # check that context switches have not inflated too much. procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 2 0 0 260386512 13592 662148 0 0 10 0 17 14 0 1 99 0 0 0 0 0 260519680 13592 604184 0 0 512 13 726843 12424 0 10 90 0 0 1 1 0 260435424 13592 598360 0 0 512 25 764645 12925 0 10 90 0 0 1 0 0 260855392 13592 578380 0 0 512 7 722943 13624 0 11 88 0 0 1 0 0 260445008 13592 601176 0 0 614 34 772288 14317 0 10 90 0 0 Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 818182dd1097fdc492aaef9b08755ea13274352d Merge: 167bfe534dc2d 97c78f4d07e50 Author: Dave Airlie Date: Wed Dec 5 15:00:09 2018 +1000 Merge tag 'imx-drm-next-2018-12-03' of git://git.pengutronix.de/git/pza/linux into drm-next drm/imx: update image-convert with fixes for multi-tiled scaling Update the ipu-v3 mem2mem image-convert code, with some fixes for race conditions, alignment issues, and visual artifacts due to tile alignment and scaling factor issues when scaling images larger than hardware limitations in multiple tiles. This will allow the V4L2 mem2mem scaler driver to write output images larger than 1024x1024 pixels. Also switch drm/imx source files to SPDX license identifiers, constify struct clk_ops in imx-tve, and add a timeout warning to the busy wait in ipu_plane_disable(). Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/1543835266.5647.1.camel@pengutronix.de commit 4dc88ce6725a812649188f628fd788417c3312c4 Merge: d1ecf8a660faf 1c25324caf829 Author: David S. Miller Date: Tue Dec 4 20:53:38 2018 -0800 Merge branch 'act_tunnel_key-support-key-less-tunnels' Or Gerlitz says: ==================== net/sched: act_tunnel_key: support key-less tunnels This short series from Adi Nissim allows to support key-less tunnels by the tc tunnel key actions, which is needed for some GRE use-cases. changes from V0: - addresses build warning spotted by kbuild, make sure to always init to zero the tunnel key ==================== Signed-off-by: David S. Miller commit 1c25324caf8292573b2b519fa4957baefd0c9657 Author: Adi Nissim Date: Sun Dec 2 14:55:21 2018 +0200 net/sched: act_tunnel_key: Don't dump dst port if it wasn't set It's possible to set a tunnel without a destination port. However, on dump(), a zero dst port is returned to user space even if it was not set, fix that. Note that so far it wasn't required, b/c key less tunnels were not supported and the UDP tunnels do require destination port. Signed-off-by: Adi Nissim Reviewed-by: Oz Shlomo Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 80ef0f22ceda1804cc572836722df7a33dec71c9 Author: Adi Nissim Date: Sun Dec 2 14:55:20 2018 +0200 net/sched: act_tunnel_key: Allow key-less tunnels Allow setting a tunnel without a tunnel key. This is required for tunneling protocols, such as GRE, that define the key as an optional field. Signed-off-by: Adi Nissim Acked-by: Or Gerlitz Reviewed-by: Oz Shlomo Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit d1ecf8a660fafd023f2e5792107381de6fb34357 Author: Colin Ian King Date: Mon Dec 3 17:13:31 2018 +0000 qed: fix spelling mistake "Dispalying" -> "Displaying" There is a spelling mistake in a DP_NOTICE message, fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 080d1b17fbc51789287cd8b2044a8cc9ec600e81 Author: Aya Levin Date: Tue Oct 23 10:02:08 2018 +0300 net/mlx5e: Move modify tirs hash functionality Move modify tirs hash functionality (mlx5e_modify_tirs_hash) from en_ethtool.c to en_main.c. This allows future use of this fuctionality from en_fs_ethtool.c, while keeping current convention: en_ethtool.c doesn't have an API. There is no functional change here. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 305438310938e9163f9366aa261336f93d2622f6 Author: Gal Pressman Date: Wed Nov 7 20:31:36 2018 +0200 net/mlx5e: Cleanup unused defines Remove couple of defines that are no longer used. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 8742c7eb3d134cced700f4ec6d7fc0c663de1e28 Author: Saeed Mahameed Date: Mon Nov 5 11:26:32 2018 -0800 net/mlx5e: Remove trailing space of tx_pause ethtool counter name tx_pause_storm_warning_events ethtool counter name has a trailing space, remove it. Signed-off-by: Saeed Mahameed Reviewed-by: Eran Ben Elisha commit 255fbca65137e25b12bced18ec9a014dc77ecda0 Author: zhengbin Date: Fri Nov 30 16:04:25 2018 +0800 nfsd: Return EPERM, not EACCES, in some SETATTR cases As the man(2) page for utime/utimes states, EPERM is returned when the second parameter of utime or utimes is not NULL, the caller's effective UID does not match the owner of the file, and the caller is not privileged. However, in a NFS directory mounted from knfsd, it will return EACCES (from nfsd_setattr-> fh_verify->nfsd_permission). This patch fixes that. Signed-off-by: zhengbin Signed-off-by: J. Bruce Fields commit 16361ff23e20d2f967456fab9971152331b65117 Author: Jerome Brunet Date: Mon Dec 3 18:16:40 2018 +0100 arm64: dts: meson: add clock controller clock inputs Add the clock inputs of the clock controllers Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit b1d02a84b552fde1232dc11b3c8465433fa1339d Author: Jerome Brunet Date: Mon Dec 3 18:16:39 2018 +0100 dt-bindings: clk: meson: add main controller clock input Add the clock input of the main clock controller Signed-off-by: Jerome Brunet Reviewed-by: Stephen Boyd Signed-off-by: Kevin Hilman commit fa3abfb6943ef2976deda78d83788a1352963f47 Author: Jerome Brunet Date: Mon Dec 3 18:16:38 2018 +0100 dt-bindings: clk: meson: add ao controller clock inputs Add the clock inputs of amlogic AO clock controller Signed-off-by: Jerome Brunet Reviewed-by: Stephen Boyd Signed-off-by: Kevin Hilman commit 685efffe37c921cf1d56dd3c8617dc67bc343a99 Author: Lucas Stach Date: Fri Nov 16 16:49:27 2018 +0100 soc: imx: gpcv2: add support for i.MX8MQ SoC The GPCv2 on the Freescale i.MX8MQ SoC works in the same way as the GPCv2 on the i.MX7, but only controls more power domains with a different mapping. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Shawn Guo commit e125dcba83f59b87b1db30f5b7075705d95cfcf7 Author: Lucas Stach Date: Fri Nov 16 16:49:26 2018 +0100 soc: imx: gpcv2: move register access table to domain data The valid register ranges are defined by the implemented power domains, which are different between the individual SoCs where the GPCv2 is used. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit a800f418420d37f60fa471665a156c45d2702437 Author: Lucas Stach Date: Fri Nov 16 16:49:25 2018 +0100 soc: imx: gpcv2: prefix i.MX7 specific defines So we can add i.MX8M support without introducing name clashes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit c311552a8eadf1f9960e6126d23c4bf683ca9ae0 Author: Martin Blumenstingl Date: Fri Nov 30 00:00:44 2018 +0100 ARM: dts: meson: meson8b: add the CPU OPP tables The values are taken from Amlogic's 3.10 kernel sources. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 622b9827b24df2269581716b9795ebb181b11fd3 Author: Martin Blumenstingl Date: Fri Nov 30 00:00:43 2018 +0100 ARM: dts: meson: meson8: add the CPU OPP table The values are taken from Amlogic's 3.10 kernel sources. Their sources have a "meson8m2_n200_2G.dtd" which defines a different voltage table: - 0.86V for 96MHz - (values in between omitted) - 1.14V for 1.992GHz The reason for this is simply the hardware design because the voltage regulator on this board is has a minimum output of 0.86V and a maximum output of 1.14V. The recommended settings are added with this patch instead of using the values that are only valid for one board. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit da38636393cea70d39237eeda2f63ec21f93aa00 Author: Martin Blumenstingl Date: Fri Nov 23 20:53:11 2018 +0100 ARM: dts: meson8b: add the Cortex-A5 global timer The Meson8b SoC is using four Cortex-A5 cores. These come with an ARM global timer. This adds the Cortex-A5 global timer but keeps it disabled for now. The timer is clocked by the "PERIPH" clock whose rate can change during runtime (when changing the frequency of the CPU clock). Unfortunately the arm_global_timer driver does not handle changes to the clock rate yet. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit f5506e82f78873dcc502d96cb08d0ed05fb5c289 Author: Martin Blumenstingl Date: Fri Nov 23 20:53:10 2018 +0100 ARM: dts: meson8b: add the ARM TWD timer The Meson8B SoC is using four ARM Cortex-A5 cores which come with a "TWD" (Timer-Watchdog) based timer. This adds support for the ARM TWD Timer on this SoC. Suggested-by: Carlo Caione [ rebased patch from Carlo, use IRQ_TYPE_EDGE_RISING instead of IRQ_TYPE_LEVEL_LOW to prevent "GIC: PPI13 is secure or misconfigured" message during boot, use pre-processor macros to specify the IRQ, added the correct clock, dropped TWD watchdog node since there's no driver for it anymore ] Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 2710e8d2131047c042b390c26d9a1ad9fe5765a1 Author: Martin Blumenstingl Date: Fri Nov 23 20:53:09 2018 +0100 ARM: dts: meson8: add the Cortex-A9 global timer The Meson8 and Meson8m2 SoCs are using four Cortex-A9 cores. These come with an ARM global timer. This adds the Cortex-A9 global timer but keeps it disabled for now. The timer is clocked by the "PERIPH" clock whose rate can change during runtime (when changing the frequency of the CPU clock). Unfortunately the arm_global_timer driver does not handle changes to the clock rate yet. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 1124d790b431a97dc3c6f4333718bad0f6f3093b Author: Martin Blumenstingl Date: Fri Nov 23 20:53:08 2018 +0100 ARM: dts: meson8: add the ARM TWD timer The Meson8 and Meson8m2 SoC are using four ARM Cortex-A9 cores which come with a "TWD" (Timer-Watchdog) based timer. This adds support for the ARM TWD Timer on these two SoCs. Suggested-by: Carlo Caione [ rebased patch from Carlo, use IRQ_TYPE_EDGE_RISING instead of IRQ_TYPE_LEVEL_LOW to prevent "GIC: PPI13 is secure or misconfigured" message during boot, use pre-processor macros to specify the IRQ, added the correct clock, dropped TWD watchdog node since there's no driver for it anymore ] Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit e8c276d953d800adced2c6174310320f90c5d432 Author: Martin Blumenstingl Date: Fri Nov 23 20:53:07 2018 +0100 ARM: dts: meson: group the Cortex-A5 / Cortex-A9 peripherals The public Meson8b (S805) datasheet describes a memory region called "A9 Periph base" which starts at 0xC4300000 and ends at 0xC430FFFF. Add a simple-bus node and move all peripherals that are part of this memory region. This makes the .dts a bit easier to read. No functional changes. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit a128a379454c4f7d57bbba4ef65d959cf7867139 Author: Alex Gonzalez Date: Thu Oct 25 17:09:32 2018 +0200 ARM: imx_v6_v7_defconfig: Select TOUCHSCREEN_GOODIX Select CONFIG_TOUCHSCREEN_GOODIX so that we can have functional touch screen by default on Digi International's AUO/Goodix LCD accessory kit used with the ConnectCore 6UL SBC Pro (ccimx6ulsbcpro) board. Signed-off-by: Alex Gonzalez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2ad4cff71e31ee5ade26da31c1b8375e9d01e67c Merge: 7b141abe4aa13 8e1dd17c8b0e3 Author: Kevin Hilman Date: Tue Dec 4 16:35:46 2018 -0800 Merge tag 'meson-clk-headers-4.21-1' of git://github.com/BayLibre/clk-meson into v4.21/dt Update for meson clocks bindings targeted at v4.21: - Export Meson8b CPU post dividers * tag 'meson-clk-headers-4.21-1' of git://github.com/BayLibre/clk-meson: dt-bindings: clock: meson8b: export the CPU post dividers commit a768297701c8ebf185b054234ce2bf3a01b86233 Author: Carlo Caione Date: Sat Dec 1 15:17:49 2018 +0000 MAINTAINERS: Remove myself from the list Kevin is basically doing all the work. Remove my name as co-maintainer. Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman commit ed85b3435e45a983dc24e388bfe0b1b337c6377f Author: Jerome Brunet Date: Thu Nov 29 17:54:51 2018 +0100 arm64: dts: meson-axg: remove alternate xtal There is actually no alternate xtal on any of the axg board I have seen so far. The 32k is actually generated internally, deriving from the 24MHz main xtal. Amlogic SoC also have the option to provide the 32k reference externally, through one of the AO pads, but no platform is using this ATM. Fixes: 5e395e146667 ("ARM64: dts: meson-axg: add an 32K alt aoclk") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 6f31ba17c83c184de658a78a8f84b8c843eb8e74 Author: Carlo Caione Date: Fri Nov 23 14:45:41 2018 +0000 arm64: dts: meson-axg: Enable watchdog on Meson AXG SoCs Add the watchdog node also on the AXG platforms. Signed-off-by: Carlo Caione Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit f43e4b007a943b00a7562025ed036a9c1ee2950f Author: Linus Walleij Date: Tue Nov 13 14:01:02 2018 +0100 ata: palmld: Convert to GPIO descriptors Instead of passing GPIO numbers directly to the PalmLD ATA driver, pass GPIO descriptors from the board file and handle these in the driver. Cc: Marek Vasut Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit cd56f35e52d9496cbf5c85d27af9bdb064bec8df Author: Linus Walleij Date: Tue Nov 20 08:47:32 2018 +0100 ata: rb532_cf: Convert to use GPIO descriptors Pass a GPIO descriptor for the device instead of a hardcoded GPIO number from the global GPIO numberspace. Use gpio descriptors throughout. Cut the now completely unused platform data for the CF slot. Cc: Ralf Baechle Cc: Waldemar Brodkorb Cc: Matt Redfearn Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit 83a7faace12e1bca6f659e117cde85769385fe08 Author: Linus Walleij Date: Wed Nov 14 01:02:41 2018 +0100 ata: sata_highbank: Convert to use GPIO descriptors This pure device tree driver is simple to convert to use just GPIO descriptors instead of GPIO numbers. So let's just do it. Cc: Mark Langsdorf Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit 3e216263ce7707b243dec2dc23b55f660631e856 Author: Linus Walleij Date: Tue Nov 13 14:17:41 2018 +0100 ata: pxa: Drop include This driver does not use GPIO or anything from the GPIO header. Drop the include. Signed-off-by: Linus Walleij Signed-off-by: Jens Axboe commit f37598be4e3896359e87c824be57ddddc280cc3f Author: Max Filippov Date: Tue Dec 4 16:08:20 2018 -0800 xtensa: xtfpga.dtsi: fix dtc warnings about SPI Rename SPI controller node in the XTFPGA DTS to spi@... This fixes the following build warnings: arch/xtensa/boot/dts/kc705_nommu.dtb: Warning (spi_bus_bridge): /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi' arch/xtensa/boot/dts/kc705_nommu.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' arch/xtensa/boot/dts/lx200mx.dtb: Warning (spi_bus_bridge): /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi' arch/xtensa/boot/dts/lx200mx.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' arch/xtensa/boot/dts/kc705.dtb: Warning (spi_bus_bridge): /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi' arch/xtensa/boot/dts/kc705.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' arch/xtensa/boot/dts/ml605.dtb: Warning (spi_bus_bridge): /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi' arch/xtensa/boot/dts/ml605.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' arch/xtensa/boot/dts/lx60.dtb: Warning (spi_bus_bridge): /soc/spi-master@0d0a0000: node name for SPI buses should be 'spi' arch/xtensa/boot/dts/lx60.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' Signed-off-by: Max Filippov commit 4089caa7d0fd95ef01436089a4122c40984456dc Author: Aaro Koskinen Date: Tue Dec 4 22:12:20 2018 +0200 MIPS: OCTEON: delete redundant register definitions For most OCTEON SoCs there is a repeated and redundant register definition for almost every hardware register, although the register bit fields would not differ from other SoCs. Since the driver code should use only one definition for simplicity, these other fields are just redundant and can be deleted. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 036d0823ce33260fbf5b0edc5ce95542d8907a38 Author: Aaro Koskinen Date: Tue Dec 4 22:12:19 2018 +0200 MIPS: OCTEON: cvmx_gmxx_inf_mode: use oldest forward compatible definition Use oldest forward compatible definition. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 2bb177137074a4a2285d9c66de19abc7b6dec41b Author: Aaro Koskinen Date: Tue Dec 4 22:12:18 2018 +0200 MIPS: OCTEON: cvmx_mio_fus_dat3: use oldest forward compatible definition Chips up to cn5xxx are compatible with cn38xx. All cn6xxx chips, and also cnf71xx, are compatible with cn61xx. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 1c6121c39677175bd372076020948e184bad4b6b Author: Aaro Koskinen Date: Tue Dec 4 22:12:17 2018 +0200 MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition cn58xx is compatible with cn50xx, so use the latter. Signed-off-by: Aaro Koskinen [paul.burton@mips.com: s/cn52xx/cn50xx/ in commit message.] Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 8b5c4eb17192d1dc8d2bb97432ca70aeeb7f634b Author: Aaro Koskinen Date: Tue Dec 4 22:12:16 2018 +0200 MIPS: OCTEON: octeon-usb: use common gpio_bit definition cvmx_gpio_bit_cfgx bitfields are indentical on cn70xx and cn73xx, and also match the default definition. So use that instead. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit 99cffb4e43a436dcb1a36c1c874633b076b93fe7 Author: Aaro Koskinen Date: Tue Dec 4 22:12:15 2018 +0200 MIPS: OCTEON: enable all OCTEON drivers in defconfig Enable all OCTEON drivers in defconfig. Currently oct_ilm and octeon-rng are still missing; enable those to get them included in kernel builds. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org commit bd82ef08382f8b4b8ff476ece065f14b1e8f47e5 Author: Colin Ian King Date: Thu Nov 29 23:03:42 2018 +0000 power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object size Don't populate the array cpcap_battery_irqs on the stack but instead make it static. Makes the object code smaller by 99 bytes: Before: text data bss dec hex filename 13673 2448 0 16121 3ef9 cpcap-battery.o After: text data bss dec hex filename 13510 2512 0 16022 3e96 cpcap-battery.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit 3a658e09a215586918044d8f8b8358eb14fa3f7d Author: Yangtao Li Date: Fri Nov 30 21:33:55 2018 -0500 HSI: omap_ssi: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Sebastian Reichel commit 039bc3b7f29f79a27155182865be538ce367aae0 Author: Russell King Date: Wed Aug 31 08:49:50 2016 +0100 ARM: sa1100/cerf: switch to using gpio_led_register_device() Rather than statically declaring the leds-gpio device, use the helper function provided. Signed-off-by: Russell King commit 59b23ead135c8251e1579403b99b100c45fd6869 Author: Russell King Date: Wed Aug 31 08:49:50 2016 +0100 ARM: sa1100/assabet: switch to using gpio leds Switch over to using gpio leds now that we have the gpio driver for the assabet board register in place. Signed-off-by: Russell King commit 17c7f4f7b4c6c3cc086d0ca0ce781bda95d4b402 Author: Russell King Date: Wed Aug 31 08:49:50 2016 +0100 ARM: sa1100/assabet: add gpio keys support for right-hand two buttons Add gpio keys support for the right-hand two buttons on the Assabet, which can be used to wake up the CPU after PM. Signed-off-by: Russell King commit e1b0d978459f17e21367fe4d3290b863919e5e73 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: sa1111: remove legacy GPIO interfaces Now that we have migrated all users of the legacy private SA1111 gpio interfaces, we can remove these redundant GPIO interfaces. Signed-off-by: Russell King commit 57c1cdce7121946800c0e30fa44904a88e8cc542 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 pcmcia: sa1100*: remove redundant bvd1/bvd2 setting bvd1 and bvd2 both default to 1 in the generic soc_common code, so having a driver repeat this is redundant. Remove it. Acked-by: Dominik Brodowski Signed-off-by: Russell King commit f1f05ee1b3ba70e199d7c86a3877206f0086a342 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: pxa/lubbock: switch PCMCIA to MAX1600 library As Lubbock now provides GPIOs via gpiolib for controlling the socket power, we can use the MAX1600 driver. Switch Lubbock to use this driver, which simplifies the code. Acked-by: Dominik Brodowski Acked-by: Robert Jarzmik Tested-by: Robert Jarzmik Signed-off-by: Russell King commit 34fdbe6456195f9f11e839cc4cdb9928d1ea8193 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: pxa/mainstone: switch PCMCIA to MAX1600 library and gpiod APIs Convert mainstone to use the MAX1600 library and gpiod APIs for socket status and control signals. Acked-by: Dominik Brodowski Signed-off-by: Russell King commit e2125d0517c0be28c39890916048ea9cfe00b9bf Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: sa1100/neponset: switch PCMCIA to MAX1600 library and gpiod APIs Convert Neponset to use the gpiod API to specify which GPIOs are used for PCMCIA, and use the MAX1600 power switch library for Neponset, simplifying the neponset pcmcia driver as a result. Acked-by: Dominik Brodowski Signed-off-by: Russell King commit b96e6c01bafbb25bf49ac74e339ef81dddbce194 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: sa1100/jornada720: switch PCMCIA to gpiod APIs Convert the low level PCMCIA driver to gpiod APIs for controlling the socket power. Acked-by: Dominik Brodowski Signed-off-by: Russell King commit bebdf98a786292501e4f7d596ffe61faaf3a3aca Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 pcmcia: add MAX1600 library Add a library for the MAX1600 PCMCIA power switch device. This is a dual-channel device, controlled via four GPIO signals per channel. Two signals control the Vcc output, and two control the Vpp output. Acked-by: Dominik Brodowski Signed-off-by: Russell King commit d66a2fb8d7b0a103f5d6884ff9db895959bf0924 Author: Russell King Date: Wed Nov 28 13:57:23 2018 +0000 ARM: sa1100: explicitly register sa11x0-pcmcia devices Simplify the code by getting rid of the conditional automatic registration of the sa11x0 PCMCIA interfaces in sa1100_init(), and require all platforms to explicitly call sa11x0_register_pcmcia(). Only one platform (iPAQ) is affected by this change. Signed-off-by: Russell King commit be38e4f2cc08d91515b86a4a8ea75ba902795873 Author: Max Filippov Date: Mon Nov 26 16:30:51 2018 -0800 xtensa: don't clear cpenable unconditionally on release Clearing cpenable special register for a task without changing coprocessor owner for the coprocessors that were enabled will result in coprocessor context flush and immediate reload at the next attempt to access this coprocessor if it happens before the context switch. Avoid it by only clearing cpenable special register if coprocessor_release_all is called for the current task. Signed-off-by: Max Filippov commit 5dacbbef3d29598dcb6ecf747a7dae4fbb4ce039 Author: Max Filippov Date: Sun Nov 25 23:32:28 2018 -0800 xtensa: simplify coprocessor.S Use addresses instead of offsets and drop unneeded offset -> address calculations. Don't generate any code for undefined coprocessors. Signed-off-by: Max Filippov commit cad6fade6e78030e60188da3f18090577daa9243 Author: Max Filippov Date: Tue Nov 27 16:27:47 2018 -0800 xtensa: clean up WSR*/RSR*/get_sr/set_sr WSR and RSR are too generic and collide with other macro definitions in the kernel causing warnings in allmodconfig builds. Drop WSR and RSR macros and WSR_* and RSR_* variants. Change get_sr and set_sr to xtensa_get_sr and xtensa_set_sr. Fix up users. Signed-off-by: Max Filippov commit 4ecd55ea074217473f94cfee21bb72864d39f8d7 Author: Vasily Averin Date: Wed Nov 28 11:45:57 2018 +0300 sunrpc: fix cache_head leak due to queued request After commit d202cce8963d, an expired cache_head can be removed from the cache_detail's hash. However, the expired cache_head may be waiting for a reply from a previously submitted request. Such a cache_head has an increased refcounter and therefore it won't be freed after cache_put(freeme). Because the cache_head was removed from the hash it cannot be found during cache_clean() and can be leaked forever, together with stalled cache_request and other taken resources. In our case we noticed it because an entry in the export cache was holding a reference on a filesystem. Fixes d202cce8963d ("sunrpc: never return expired entries in sunrpc_cache_lookup") Cc: Pavel Tikhomirov Cc: stable@kernel.org # 2.6.35 Signed-off-by: Vasily Averin Reviewed-by: NeilBrown Signed-off-by: J. Bruce Fields commit e45838b52cb3bb0de0c217c903ce81ba2e48cd5d Author: Matti Vaittinen Date: Tue Dec 4 13:33:48 2018 +0200 clk: Add kerneldoc to managed of-provider interfaces Document the devm_of_clk_del_provider and the devm_of_clk_add_hw_provider functions. Signed-off-by: Matti Vaittinen [sboyd@kernel.org: Comply with kernel-doc formatting] Signed-off-by: Stephen Boyd commit b2d8754f9ac603c7ce27c12a5249c746afd2d0ef Merge: ffd321e4b7e46 5aa3771ded548 Author: Doug Ledford Date: Tue Dec 4 14:39:23 2018 -0500 Merge branch 'mlx5-devx' into wip/dl-for-next From Yishai, ----------------------------------- This series enriches DEVX support in few aspects: it enables interoperability between DEVX and verbs and improves mechanism for controlling privileged DEVX commands. The first patch updates mlx5 ifc file. Next 3 patches enable modifying and querying verbs objects via the DEVX interface. To achieve that the core layer introduced the 'UVERBS_IDR_ANY_OBJECT' type to match any IDR object. Once it's used by some driver's method, the infrastructure skips checking for the IDR type and it becomes the driver handler responsibility. The DEVX methods of modify and query were changed to get any object type via the 'UVERBS_IDR_ANY_OBJECT' mechanism. The type checking is done per object as part of the driver code. The next 3 patches introduce more robust mechanism for controlling privileged DEVX commands. The responsibility to block/allow per command was moved to be done in the firmware based on the UID credentials that the driver reports upon user context creation. This enables more granularity per command based on the device security model and the user credentials. In addition, by introducing a valid range for 'general commands' we prevent the need to touch the driver's code any time that a new future command will be added. The last patch fixes the XRC verbs flow once a DEVX context is used. This is needed as XRCD is some shared kernel resource and as such a kernel UID (=0) should be used in its related resources. Thanks Yishai Hadas ----------------------------------- The top 6 patches are the mlx5-devx series, the remainder are from the mlx5-next tree as the mlx5-devx series depended on the mlx5-next mlx5_ifc file update. * mlx5-devx: (42 commits) IB/mlx5: Allow XRC usage via verbs in DEVX context IB/mlx5: Update the supported DEVX commands IB/mlx5: Enforce DEVX privilege by firmware IB/mlx5: Enable modify and query verbs objects via DEVX IB/core: Enable getting an object type from a given uobject IB/core: Introduce UVERBS_IDR_ANY_OBJECT net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bits RDMA/mlx5: Unfold modify RMP function RDMA/mlx5: Unfold create RMP function RDMA/mlx5: Initialize SRQ tables on mlx5_ib RDMA/mlx5: Update SRQ functions signatures to mlx5_ib format RDMA/mlx5: Use stages for callback to setup and release DEVX RDMA/mlx5: Remove SRQ signature global flag net/mlx5: Move SRQ functions to RDMA part net/mlx5: Remove references to local mlx5_core functions net/mlx5: Remove not-used lib/eq.h header file net/mlx5: Remove dead transobj code net/mlx5: Align SRQ licenses and copyright information net/mlx5: Debug print for forwarded async events net/mlx5: Forward SRQ resource events ... Signed-off-by: Doug Ledford commit 5d66ef38bc9df8964ec7b6eb5091dae5e8fe67b4 Author: Andrey Grodzovsky Date: Mon Dec 3 15:00:39 2018 -0500 drm/amdgpu: Update XGMI node print amdgpu_xgmi_update_topology is called both on device registration and reset. Fix misleading print since the device is added only once to the hive on registration and not on reset. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ae517053f003bc3739640acd8d77617b14bf45d2 Author: Alexandre Belloni Date: Sun Nov 11 20:31:14 2018 +0100 dt-bindings: rtc: Move trivial RTCs to rtc.txt Move trivial RTCs to the rtc generic binding documentation as they all also support at least 'start-year'. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring commit 6331d184e65e270b4768679b94e73eef1ab2ccde Author: Alexandre Belloni Date: Sun Nov 11 20:31:13 2018 +0100 dt-bindings: rtc: add generic bindings Add generic binding documentation for the RTC subsystem. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring commit 5aa3771ded54894ce34f4ec6bc2bb403e6771eb2 Author: Yishai Hadas Date: Mon Nov 26 08:28:38 2018 +0200 IB/mlx5: Allow XRC usage via verbs in DEVX context Allows XRC usage from the verbs flow in a DEVX context. As XRCD is some shared kernel resource between processes it should be created with UID=0 to point on that. As a result once XRC QP/SRQ are created they must be used as well with UID=0 so that firmware will allow the XRCD usage. Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 719598c98d1961e78e2ad514a2cc15deb5e41db5 Author: Yishai Hadas Date: Mon Nov 26 08:28:37 2018 +0200 IB/mlx5: Update the supported DEVX commands Update the supported DEVX commands, it includes adding to the query/modify command's list and to the encoding handling. In addition, a valid range for general commands was added to be used for future commands. Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit fb98153bbf28b627fe52f41e658ae39fa67d2684 Author: Yishai Hadas Date: Mon Nov 26 08:28:36 2018 +0200 IB/mlx5: Enforce DEVX privilege by firmware Enforce DEVX privilege by firmware, this enables future device functionality without the need to make driver changes unless a new privilege type will be introduced. Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 34613eb1d2ad051cb02cbcf5675482340cbb9bf0 Author: Yishai Hadas Date: Mon Nov 26 08:28:35 2018 +0200 IB/mlx5: Enable modify and query verbs objects via DEVX Enables modify and query verbs objects via the DEVX interface. To support this the above DEVX handlers were changed to get any object type via the UVERBS_IDR_ANY_OBJECT mechanism. The type checking and handling is done per object as part of the driver code. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 04ca16cc198c2bd2fc51749123c118a284d1605e Author: Yishai Hadas Date: Mon Nov 26 08:28:34 2018 +0200 IB/core: Enable getting an object type from a given uobject Enable getting an object type from a given uobject, the type is saved upon tree merging and is returned as part of some helper function. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 4d7e8cc57429e1874658acbff98d3877c81cd0a4 Author: Yishai Hadas Date: Mon Nov 26 08:28:33 2018 +0200 IB/core: Introduce UVERBS_IDR_ANY_OBJECT Introduce the UVERBS_IDR_ANY_OBJECT type to match any IDR object. Once used, the infrastructure skips checking for the IDR type, it becomes the driver handler responsibility. This enables drivers to get in a given method an object from various of types. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 6544d229bf433b755e77800002e078e54cd9b42b Author: Christoph Hellwig Date: Sun Dec 2 17:46:28 2018 +0100 block: enable polling by default if a poll map is initalized If the user did setup polling in the driver we should not require another know in the block layer to enable it. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 376f7ef8bfeaee3993c2e85df1bbaa06725b9342 Author: Christoph Hellwig Date: Sun Dec 2 17:46:27 2018 +0100 block: only allow polling if a poll queue_map exists This avoids having to have differnet mq_ops for different setups with or without poll queues. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 529262d56dbebe6a26df5d2fd24cc0e1bc8579e5 Author: Christoph Hellwig Date: Sun Dec 2 17:46:26 2018 +0100 block: remove ->poll_fn This was intended to support users like nvme multipath, but is just getting in the way and adding another indirect call. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9d6610b76fa374eae3deb93bcbace4a06c2e3b95 Author: Christoph Hellwig Date: Sun Dec 2 17:46:25 2018 +0100 nvme-mpath: remove I/O polling support The ->poll_fn has been stale for a while, as a lot of places check for mq ops. But there is no real point in it anyway, as we don't even use the multipath code for subsystems without multiple ports, which is usually what we do high performance I/O to. If it really becomes an issue we should rework the nvme code to also skip the multipath code for any private namespace, even if that could mean some trouble when rescanning. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f9801a484ad6dcc33b10c61b143efc3352541802 Author: Christoph Hellwig Date: Sun Dec 2 17:46:24 2018 +0100 nvme-rdma: remove I/O polling support The code was always a bit of a hack that digs far too much into RDMA core internals. Lets kick it out and reimplement proper dedicated poll queues as needed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3a7afd8ee42a68d4f24ab9c947a4ef82d4d52375 Author: Christoph Hellwig Date: Sun Dec 2 17:46:23 2018 +0100 nvme-pci: remove the CQ lock for interrupt driven queues Now that we can't poll regular, interrupt driven I/O queues there is almost nothing that can race with an interrupt. The only possible other contexts polling a CQ are the error handler and queue shutdown, and both are so far off in the slow path that we can simply use the big hammer of disabling interrupts. With that we can stop taking the cq_lock for normal queues. Reviewed-by: Sagi Grimberg Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d1ed6aa14bc418531220478604c7b12c5e98fdca Author: Christoph Hellwig Date: Sun Dec 2 17:46:22 2018 +0100 nvme-pci: don't poll from irq context when deleting queues This is the last place outside of nvme_irq that handles CQEs from interrupt context, and thus is in the way of removing the cq_lock for normal queues, and avoiding lockdep warnings on the poll queues, for which we already take it without IRQ disabling. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5271edd41dd895773d3105f5065bbf5ded0dee7c Author: Christoph Hellwig Date: Sun Dec 2 17:46:21 2018 +0100 nvme-pci: refactor nvme_disable_io_queues Pass the opcode for the delete SQ/CQ command as an argument instead of the somewhat confusing pass loop. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit 0b2a8a9f4b564c7d923597828d93cd1f69ce40e0 Author: Christoph Hellwig Date: Sun Dec 2 17:46:20 2018 +0100 nvme-pci: consolidate code for polling non-dedicated queues We have three places that can poll for I/O completions on a normal interrupt-enabled queue. All of them are in slow path code, so consolidate them to a single helper that uses spin_lock_irqsave and removes the fast path cqe_pending check. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c6d962aebaf8ec5d867aac09ee33e3f528c2539d Author: Christoph Hellwig Date: Sun Dec 2 17:46:19 2018 +0100 nvme-pci: only allow polling with separate poll queues This will allow us to simplify both the regular NVMe interrupt handler and the upcoming aio poll code. In addition to that the separate queues are generally a good idea for performance reasons. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6322307809649cba6f545640563f95d686ecf404 Author: Christoph Hellwig Date: Sun Dec 2 17:46:18 2018 +0100 nvme-pci: cleanup SQ allocation a bit Use a bit flag to mark if the SQ was allocated from the CMB, and clean up the surrounding code a bit. Reviewed-by: Sagi Grimberg Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4e224106673f1e8679249a9cac75712b896861b0 Author: Christoph Hellwig Date: Sun Dec 2 17:46:17 2018 +0100 nvme-pci: use atomic bitops to mark a queue enabled This gets rid of all the messing with cq_vector and the ->polled field by using an atomic bitop to mark the queue enabled or not. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit e20ba6e1da029136ded295f33076483d65ddf50a Author: Christoph Hellwig Date: Sun Dec 2 17:46:16 2018 +0100 block: move queues types to the block layer Having another indirect all in the fast path doesn't really help in our post-spectre world. Also having too many queue type is just going to create confusion, so I'd rather manage them centrally. Note that the queue type naming and ordering changes a bit - the first index now is the default queue for everything not explicitly marked, the optional ones are read and poll queues. Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f33cb7e760dee94dd2b2d7a7f6225578a66a17d5 Merge: ffd321e4b7e46 9d43faac02e3a Author: Doug Ledford Date: Tue Dec 4 13:36:57 2018 -0500 Merge 'mlx5-next' into mlx5-devx The enhanced devx support series needs commit: 9d43faac02e3 ("net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bits") Signed-off-by: Doug Ledford commit b3ed2ce024c36054e51cca2eb31a1cdbe4a5f11e Author: Dave Jiang Date: Tue Dec 4 10:31:11 2018 -0800 acpi/nfit: Add support for Intel DSM 1.8 commands Add command definition for security commands defined in Intel DSM specification v1.8 [1]. This includes "get security state", "set passphrase", "unlock unit", "freeze lock", "secure erase", "overwrite", "overwrite query", "master passphrase enable/disable", and "master erase", . Since this adds several Intel definitions, move the relevant bits to their own header. These commands mutate physical data, but that manipulation is not cache coherent. The requirement to flush and invalidate caches makes these commands unsuitable to be called from userspace, so extra logic is added to detect and block these commands from being submitted via the ioctl command submission path. Lastly, the commands may contain sensitive key material that should not be dumped in a standard debug session. Update the nvdimm-command payload-dump facility to move security command payloads behind a default-off compile time switch. [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.8.pdf Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit ae218f7847fcf32e75ba82b1f3ab01fe53731d7a Merge: 32215a6c6beb8 5132b3d283710 Author: Mark Brown Date: Tue Dec 4 17:31:49 2018 +0000 Merge branch 'topic/3wire-gpio' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-4.21 mode conflict commit 4377d4e0d3d511986033ba7b4182d5a80b7f9ea2 Author: Jani Nikula Date: Tue Dec 4 19:26:17 2018 +0200 drm/i915: Update DRIVER_DATE to 20181204 Signed-off-by: Jani Nikula commit 32215a6c6beb8dcda4bb0759b04ce3c30927963b Author: Jay Fang Date: Mon Dec 3 11:15:50 2018 +0800 spi: dw-mmio: add ACPI support The Hisilicon Hip08 platform, that uses ACPI, has this controller. Let's add ACPI support for DW SPI MMIO-based host. The ACPI ID used is "HISI0173" for the Designware SPI controller of Hisilicon Hip08 platform. Signed-off-by: Jay Fang Signed-off-by: Mark Brown commit 0716931a82b4d0e211d2ef66616ad7130107e455 Author: Jani Nikula Date: Tue Dec 4 12:19:26 2018 +0200 drm/i915/icl: fix transcoder state readout Commit 2ca711caeca2 ("drm/i915/icl: Consider DSI for getting transcoder state") clobbers the previously read TRANS_DDI_FUNC_CTL_EDP register contents with TRANS_DDI_FUNC_CTL_DSI0 contents. Fix the state readout, and handle DSI 1 while at it. Use a bitmask for iterating and logging transcoders, because the allowed combinations are a bit funky. Fixes: 2ca711caeca2 ("drm/i915/icl: Consider DSI for getting transcoder state") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108928 Cc: Ville Syrjala Cc: Madhav Chauhan Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181204101926.17174-1-jani.nikula@intel.com commit 2527704d8411e2b4241916e8b22505cb4519ce08 Author: Lukas Wunner Date: Thu Nov 29 16:45:24 2018 +0100 spi: bcm2835: Synchronize with callback on DMA termination Commit b36f09c3c441 ("dmaengine: Add transfer termination synchronization support") deprecated dmaengine_terminate_all() in favor of dmaengine_terminate_sync() and dmaengine_terminate_async() to avoid freeing resources used by the DMA callback before its execution has concluded. Commit de92436ac40f ("dmaengine: bcm2835-dma: Use vchan_terminate_vdesc() instead of desc_free") amended the BCM2835 DMA driver with an implementation of ->device_synchronize(), which is a prerequisite for dmaengine_terminate_sync(). Thus, clients of the DMA driver (such as the BCM2835 SPI driver) may now be converted to the new API. It is generally desirable to use the _sync() variant except in atomic context. There is only a single occurrence where the BCM2835 SPI driver calls dmaengine_terminate_all() in atomic context and that is in bcm2835_spi_dma_done() (the RX DMA channel's callback) to terminate the TX DMA channel. The TX DMA channel doesn't have a callback (yet), hence it is safe to use the _async() variant there. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Cc: Vinod Koul Signed-off-by: Mark Brown commit 2e0733bc5a15a33f72ec2c323915f72cc65d8960 Author: Lukas Wunner Date: Thu Nov 29 16:45:24 2018 +0100 spi: bcm2835: Speed up FIFO access if fill level is known The RX and TX FIFO of the BCM2835 SPI master each accommodate 64 bytes (16 32-bit dwords). The CS register provides hints on their fill level: "Bit 19 RXR - RX FIFO needs Reading ([¾] full) 0 = RX FIFO is less than [¾] full (or not active TA = 0). 1 = RX FIFO is [¾] or more full. Cleared by reading sufficient data from the RX FIFO or setting TA to 0." "Bit 16 DONE - Transfer Done 0 = Transfer is in progress (or not active TA = 0). 1 = Transfer is complete. Cleared by writing more data to the TX FIFO or setting TA to 0." "If DONE is set [...], write up to 16 [dwords] to SPI_FIFO. [...] If RXR is set read 12 [dwords] data from SPI_FIFO." [Source: Pages 153, 154 and 158 of https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf Note: The spec is missing the "¾" character, presumably due to copy-pasting from a different charset. It also incorrectly refers to 16 and 12 "bytes" instead of 32-bit dwords.] In short, the RXR bit indicates that 48 bytes can be read and the DONE bit indicates 64 bytes can be written. Leverage this knowledge to read or write bytes blindly to the FIFO, without polling whether data can be read or free space is available to write. Moreover, when a transfer is starting, the TX FIFO is known to be empty, likewise allowing a blind write of 64 bytes. This cuts the number of bus accesses in half if the fill level is known. Also, the (posted) write accesses can be pipelined on the AXI bus since they are no longer interleaved with (non-posted) reads. bcm2835_spi_transfer_one_poll() switches to interrupt mode when a time limit is exceeded by calling bcm2835_spi_transfer_one_irq(). The TX FIFO may contain data in this case, but is known to be empty when the function is called from bcm2835_spi_transfer_one(). Hence only blindly fill the TX FIFO in the latter case but not the former. Signed-off-by: Lukas Wunner Tested-by: Eric Anholt Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit b31a9299bca66c42583ef2e2f685369780cdf350 Author: Lukas Wunner Date: Thu Nov 29 16:45:24 2018 +0100 spi: bcm2835: Polish transfer of DMA prologue Commit 3bd7f6589f67 ("spi: bcm2835: Overcome sglist entry length limitation") was unfortunately merged even though submission of a refined version was imminent. Apply those refinements as an amendment: * Drop no longer needed #include . The lines requiring its inclusion were removed by the commit. * Change type of tx_spillover flag from bool to unsigned int for consistency with dma_pending flag and pursuant to Linus' dictum: https://lkml.org/lkml/2017/11/21/384 * In bcm2835_rd_fifo_count() do not check for bs->rx_buf != NULL. The function will never be called if that's the case. * Amend kerneldoc of bcm2835_wait_tx_fifo_empty() to prevent its use in situations where the function might spin forever. (In response to a review comment by Stefan Wahren.) * Sync only the cacheline containing the RX prologue back to memory, not the full first sglist entry. * Use sg_dma_address() and sg_dma_len() instead of referencing the sglist entry members directly. Seems to be the more common syntax in the tree, even for lvalues. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit eba9473f6761d8df6cabf278b272cc5466733737 Author: Charles Keepax Date: Thu Nov 29 10:28:21 2018 +0000 regulator: Allow regulator nodes to contain their own init data Currently it is expected that regulator init data will be defined as a series of sub-nodes from the node that bound in the driver. Add support for a node to both bind in a driver and contain init data for that regulator. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 925c85e21ed8773c8b0ab01d60618b862847a10f Author: Charles Keepax Date: Thu Nov 29 10:28:20 2018 +0000 regulator: Factor out location of init data OF node To support future additions factor out the location of the OF node containing the init data for the regulator from the code that parses the init data. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 154989e45fd8de9bfb52bbd6e5ea763e437e54c5 Author: Christoph Hellwig Date: Thu Nov 22 16:44:07 2018 +0100 aio: clear IOCB_HIPRI No one is going to poll for aio (yet), so we must clear the HIPRI flag, as we would otherwise send it down the poll queues, where no one will be polling for completions. Signed-off-by: Christoph Hellwig IOCB_HIPRI, not RWF_HIPRI. Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 89d04ec3491bea6d69943b5aed62fdebfad49638 Merge: 8c2def893afc6 2595646791c31 Author: Jens Axboe Date: Tue Dec 4 09:38:05 2018 -0700 Merge tag 'v4.20-rc5' into for-4.21/block Pull in v4.20-rc5, solving a conflict we'll otherwise get in aio.c and also getting the merge fix that went into mainline that users are hitting testing for-4.21/block and/or for-next. * tag 'v4.20-rc5': (664 commits) Linux 4.20-rc5 PCI: Fix incorrect value returned from pcie_get_speed_cap() MAINTAINERS: Update linux-mips mailing list address ocfs2: fix potential use after free mm/khugepaged: fix the xas_create_range() error path mm/khugepaged: collapse_shmem() do not crash on Compound mm/khugepaged: collapse_shmem() without freezing new_page mm/khugepaged: minor reorderings in collapse_shmem() mm/khugepaged: collapse_shmem() remember to clear holes mm/khugepaged: fix crashes due to misaccounted holes mm/khugepaged: collapse_shmem() stop if punched or truncated mm/huge_memory: fix lockdep complaint on 32-bit i_size_read() mm/huge_memory: splitting set mapping+index before unfreeze mm/huge_memory: rename freeze_page() to unmap_page() initramfs: clean old path before creating a hardlink kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace psi: make disabling/enabling easier for vendor kernels proc: fixup map_files test on arm debugobjects: avoid recursive calls with kmemleak userfaultfd: shmem: UFFDIO_COPY: set the page dirty if VM_WRITE is not set ... commit 55827458e0586b1d4e84541bc015e37f507820ee Merge: d9bbd6a1a56ec b6f153d3e5a5b Author: David S. Miller Date: Tue Dec 4 08:36:37 2018 -0800 Merge branch 'mlxsw-Add-one-armed-router-support' Ido Schimmel says: ==================== mlxsw: Add one-armed router support Up until now, when a packet was routed by the ASIC through the same router interface (RIF) from which it ingressed from, the ASIC passed the sole copy of the packet to the kernel. This allowed the kernel to route the packet and also potentially generate an ICMP redirect. There are scenarios (e.g., "one-armed router") where packets are intentionally routed this way and are therefore not deemed as exceptions. In such scenarios the current method of trapping packets to the CPU is problematic, as it results in major packet loss. This patchset solves the problem by having the ASIC forward the packet, but also send a copy to the CPU, which gives the kernel the opportunity to generate required exceptions. To prevent the kernel from forwarding such packets again, the driver marks them with 'offload_l3_fwd_mark', which causes the kernel to consume them in ip{,6}_forward_finish(). Patch #1 renames 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark'. When set, the field indicates that a packet was already forwarded in L3 (unicast / multicast) by a capable device. Patch #2 teaches the kernel to consume unicast packets that have 'offload_l3_fwd_mark' set. Patch #3 changes mlxsw to mirror loopbacked (iRIF == eRIF) packets, instead of trapping them. Patch #4 adds a test case for above mentioned scenario. ==================== Signed-off-by: David S. Miller commit b6f153d3e5a5bfbda17b997bd9e258143aa11809 Author: Ido Schimmel Date: Tue Dec 4 08:15:14 2018 +0000 selftests: mlxsw: Add one-armed router test Construct a "one-armed router" topology and test that packets are forwarded by the ASIC and that a copy of the packet is sent to the kernel, which does not forward the packet again. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2f4f44946b748918de6345dd12d0c418c0206002 Author: Ido Schimmel Date: Tue Dec 4 08:15:12 2018 +0000 mlxsw: spectrum: Mirror loopbacked packets instead of trapping them When the ASIC detects that a unicast packet is routed through the same router interface (RIF) from which it ingressed (iRIF == eRIF), it raises a trap called loopback error (LBERROR). Thus far, this trap was configured to send a sole copy of the packet to the CPU so that ICMP redirect packets could be potentially generated by the kernel. This is problematic as the CPU cannot forward packets at 3.2Tb/s and there are scenarios (e.g., "one-armed router") where iRIF == eRIF is not an exception. Solve this by changing the trap to send a copy of the packet to the CPU. To prevent the kernel from forwarding the packet again, it is marked with 'offload_l3_fwd_mark'. The trap is configured in a trap group of its own with a dedicated policer in order not to prevent packets trapped by other traps from reaching the CPU. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f839a6c92504cff92a10f522cf686b51ff18dd35 Author: Ido Schimmel Date: Tue Dec 4 08:15:11 2018 +0000 net: Do not route unicast IP packets twice Packets marked with 'offload_l3_fwd_mark' were already forwarded by a capable device and should not be forwarded again by the kernel. Therefore, have the kernel consume them. The check is performed in ip{,6}_forward_finish() in order to allow the kernel to process such packets in ip{,6}_forward() and generate required exceptions. For example, ICMP redirects. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 875e8939953483d856de226b72d14c6a000f9457 Author: Ido Schimmel Date: Tue Dec 4 08:15:10 2018 +0000 skbuff: Rename 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark' Commit abf4bb6b63d0 ("skbuff: Add the offload_mr_fwd_mark field") added the 'offload_mr_fwd_mark' field to indicate that a packet has already undergone L3 multicast routing by a capable device. The field is used to prevent the kernel from forwarding a packet through a netdev through which the device has already forwarded the packet. Currently, no unicast packet is routed by both the device and the kernel, but this is about to change by subsequent patches and we need to be able to mark such packets, so that they will no be forwarded twice. Instead of adding yet another field to 'struct sk_buff', we can just rename 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark', as a packet either has a multicast or a unicast destination IP. While at it, add a comment about both 'offload_fwd_mark' and 'offload_l3_fwd_mark'. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 20f2ab247d3b787af91c1aa5eb27c5061744c154 Author: Ryan Lee Date: Fri Nov 30 03:21:09 2018 +0000 ASoC: max98373: Added max98373_reset for stable amp reset This patch added max98373_reset function to avoid amp software reset failure and code duplication. Reset verification step has been added for stable amp reset and it repeats verification maximum 3 times when it is failed. Chip revision ID is available when the amp is in the idle state which means software reset is completed well. Additional 10ms delay was added for every retrial and maximum 30ms delay can be applied. Signed-off-by: Ryan Lee Signed-off-by: Mark Brown commit 0e3460bceedc98176684602a34659d51cd8bd4ce Author: Kuninori Morimoto Date: Fri Nov 30 02:07:48 2018 +0000 ASoC: audio-graph-card: use cpu/codec pointer on graph_dai_props In DPCM case, it uses CPU-dummy / dummy-Codec dai links, and non DPCM case, it uses CPU-Codec dai links. Now, we want to merge audio-graph-card and audio-graph-scu-card. These sound cards are using silimar but not same logic on each functions. Then, of course we want to share same logic. To compromise, this patch uses cpu/codec pointer on audio-graph-card. It is same logic with audio-graph-scu-card, thus easy merging. This is prepare for merging audio card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7c2ae7981d73f9e4f10ed9d1dcb5bc6056189b30 Author: Kuninori Morimoto Date: Fri Nov 30 02:07:32 2018 +0000 ASoC: audio-graph-scu-card: care multi DPCM codec_conf Current audio-graph-scu-card didn't care about codec_conf for multi DPCM case. This patch cares it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit a1af9858edae12eca8f77b152d17ee049835e57d Author: Kuninori Morimoto Date: Fri Nov 30 02:07:15 2018 +0000 ASoC: audio-graph-scu-card: use cpu/codec pointer on graph_dai_props In DPCM case, it uses CPU-dummy / dummy-Codec dai links, and non DPCM case, it uses CPU-Codec dai links. Now, we want to merge audio-graph-card and audio-graph-scu-card. These sound cards are using silimar but not same logic on each functions. Then, of course we want to share same logic. To compromise, this patch uses cpu/codec pointer on audio-graph-scu-card. It is same logic with audio-graph-card, thus easy merging. This is prepare for merging audio card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c89ff03ac8c67773d43e78f6dd452a4832492722 Author: Kuninori Morimoto Date: Fri Nov 30 02:06:51 2018 +0000 ASoC: audio-graph-scu-card: care link / dai count In DPCM case, it uses CPU-dummy / dummy-Codec dai links. If sound card is caring only DPCM, link count = dai count, but, if non DPCM case, link count != dai count. Now, we want to merge audio-graph-card and audio-graph-scu-card, then, we need to care both link / dai count more carefly This patch cares it, and prepare for merging audio card Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit b6f3fc005a2c8b425d7a0973b43bef05890bf479 Author: Kuninori Morimoto Date: Fri Nov 30 02:04:13 2018 +0000 ASoC: simple-card-utils: fixup asoc_simple_card_get_dai_id() counting asoc_simple_card_get_dai_id() returns DAI ID, but it is based on DT node's "endpoint" position. Almost all cases 1 port has 1 endpoint, thus, it was no problem. But in reality, port : endpoint = 1 : N, thus, counting endpoint is BUG, it should based on "port" ID. This patch fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2a95471c3397734ba6869ca3fa084490fb35b40b Merge: d59dd69d5576d df47fc376df83 Author: Alexei Starovoitov Date: Tue Dec 4 08:18:14 2018 -0800 Merge branch 'prog_test_run-improvement' Lorenz Bauer says: ==================== Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. This is because bpf_test_finish copies the output buffer to user space without checking its size. This can lead to the kernel overwriting data in user space after the buffer if xdp_adjust_head and friends are in play. Thanks to everyone for their advice and patience with this patch set! Changes in v5: * Fix up libbpf.map Changes in v4: * Document bpf_prog_test_run and bpf_prog_test_run_xattr * Use struct bpf_prog_test_run_attr for return values Changes in v3: * Introduce bpf_prog_test_run_xattr instead of modifying the existing function Changes in v2: * Make the syscall return ENOSPC if data_size_out is too small * Make bpf_prog_test_run return EINVAL if size_out is missing * Document the new behaviour of data_size_out ==================== Signed-off-by: Alexei Starovoitov commit df47fc376df8338fdc9b27a5c9162a08f6e6157c Author: Lorenz Bauer Date: Mon Dec 3 11:31:26 2018 +0000 selftests: add a test for bpf_prog_test_run_xattr Make sure that bpf_prog_test_run_xattr returns the correct length and that the kernel respects the output size hint. Also check that errno indicates ENOSPC if there is a short output buffer given. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov commit 64a975913b311e5192a76cd10721d4565c9addd1 Author: Lorenz Bauer Date: Mon Dec 3 11:31:25 2018 +0000 libbpf: add bpf_prog_test_run_xattr Add a new function, which encourages safe usage of the test interface. bpf_prog_test_run continues to work as before, but should be considered unsafe. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov commit 2587a974f184ff1cd8103de25b6354a3a4da7132 Author: Lorenz Bauer Date: Mon Dec 3 11:31:24 2018 +0000 tools: sync uapi/linux/bpf.h Pull changes from "bpf: respect size hint to BPF_PROG_TEST_RUN if present". Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov commit b5a36b1e1b138285ea0df34bf96c759e1e30fafd Author: Lorenz Bauer Date: Mon Dec 3 11:31:23 2018 +0000 bpf: respect size hint to BPF_PROG_TEST_RUN if present Use data_size_out as a size hint when copying test output to user space. ENOSPC is returned if the output buffer is too small. Callers which so far did not set data_size_out are not affected. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov commit 5179749925933575a67f9d8f16d0cc204f98a29f Author: Chris Wilson Date: Tue Dec 4 14:15:16 2018 +0000 drm/i915: Allocate a common scratch page Currently we allocate a scratch page for each engine, but since we only ever write into it for post-sync operations, it is not exposed to userspace nor do we care for coherency. As we then do not care about its contents, we can use one page for all, reducing our allocations and avoid complications by not assuming per-engine isolation. For later use, it simplifies engine initialisation (by removing the allocation that required struct_mutex!) and means that we can always rely on there being a scratch page. v2: Check that we allocated a large enough scratch for I830 w/a Fixes: 06e562e7f515 ("drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5") # v4.18.20 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108850 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181204141522.13640-1-chris@chris-wilson.co.uk Cc: Joonas Lahtinen Cc: # v4.18.20+ commit 538a4ffea3f719ed8f853f78826e360aee5fe9d7 Author: Kuninori Morimoto Date: Tue Dec 4 08:02:43 2018 +0000 ASoC: rsnd: add missing TDM Split mode support for simple-card commit f69f452243e4e1 ("ASoC: rsnd: add TDM Split mode support") added TDM Split mode support for rsnd driver. But, it cares audio-graph-card style only. We can't use TDM Split mode on simple-card style now. This patch fixup this issue. Fixes: f69f452243e4e1 ("ASoC: rsnd: add TDM Split mode support") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 665c1ade11e8aee0db691c7a928de1586b712344 Author: Kuninori Morimoto Date: Tue Dec 4 08:00:47 2018 +0000 ASoC: rsnd: fixup mod ID for CTU regmap read/write commit c16015f36cc12824 ("ASoC: rsnd: add .get_id/.get_id_sub") add new .get_id/.get_id_sub to indicate module ID/subID. It is used for SSIU and CTU. In SSIU case, subID indicates BUSIF, but register settings is based on SSIU ID. OTOH, in CTU case, subID indicates CTU channel, and register settings is based on it. This means regmap read/write function needs to care it. This patch fixup this issue. It can't play MIXed sound without this patch. Fixes: c16015f36cc12824 ("ASoC: rsnd: add .get_id/.get_id_sub") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 5d9bb5554c1dadb141eda9afc06dea350e277b18 Author: Kuninori Morimoto Date: Tue Dec 4 07:59:05 2018 +0000 ASoC: rsnd: indicates Channel and Mode for debug For TDM debug purpose, indicating Channel and Mode is very useful. This patch indicate it if it has #define DEBUG Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 5ff75c489ce0466744684f5a549dd79f4ba697ca Author: YueHaibing Date: Thu Nov 29 06:00:33 2018 +0000 drm/tinydrm: Use kmemdup rather than duplicating its implementation in repaper_spi_transfer() use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/1543471233-159568-1-git-send-email-yuehaibing@huawei.com commit 24035072999c5c175ac03ed2db2ef98cb339b319 Author: Biju Das Date: Tue Nov 27 11:56:35 2018 +0000 ARM: dts: r8a7744: Add PCIe Controller device node Add a device node for the PCIe controller on the Renesas RZ/G1N (r8a7744) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 54234e80858cf3730917d71af80a13ac4b8f26dc Author: Biju Das Date: Tue Nov 27 11:56:34 2018 +0000 ARM: dts: r8a7744: Add xhci support Add a device node for the xhci controller on the Renesas RZ/G1N (r8a7744) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 491e70588805a8895bff6ac5a626c8bb481fea1c Author: Biju Das Date: Tue Nov 27 11:56:33 2018 +0000 ARM: dts: r8a7744: Add MSIOF[012] support Add the DT nodes needed by MSIOF[012] interfaces to the SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0faadd5a410533d3a75601b607ee5a4110b754f4 Author: Biju Das Date: Tue Nov 27 11:56:31 2018 +0000 ARM: dts: r8a7744: Add QSPI support Add the DT node for the QSPI interface to the SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 7fbbfe07b588cd81c1046a1846345a5cf614589a Author: Biju Das Date: Tue Nov 27 11:56:25 2018 +0000 ARM: dts: r8a7744-iwg20d-q7-dbcm-ca: Add device tree for camera DB This patch adds support for the camera daughter board which is connected to iWave's RZ/G1N Qseven carrier board. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit eb83d144978e9f21aaa1372d75b50f3eec22ed48 Author: Biju Das Date: Wed Nov 28 16:38:31 2018 +0000 ARM: dts: r8a7744: Add TPU support Add TPU support to SoC DT. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit cebc31e8b59445aaf84b8810ff76b2fcc246fea2 Author: Biju Das Date: Wed Nov 28 16:38:30 2018 +0000 ARM: dts: r8a7744: Add PWM SoC support Add the definitions for pwm[0123456] to the SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 350ae49b97c4612002e253a311f5070680509373 Author: Biju Das Date: Wed Nov 28 16:38:29 2018 +0000 ARM: dts: r8a7744: Add IPMMU DT nodes Add the six IPMMU instances found in the r8a7744 to DT with a disabled status. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit eddcbe813dd3c8247840859bf4d04b3423d35f8f Author: Biju Das Date: Wed Nov 28 16:38:28 2018 +0000 ARM: dts: r8a7744: Add VSP support Add VSP support to SoC DT. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 10fabcb817c5e37aeb8a1b79a95468c8df45898c Author: Biju Das Date: Wed Nov 28 16:38:27 2018 +0000 ARM: dts: r8a7744: add VIN dt support Add VIN[012] support to SoC dt. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 90bcf80c37df5d76d953673717cdd5082776d98e Author: Biju Das Date: Fri Nov 30 15:26:35 2018 +0000 ARM: dts: r8a7744: Add CMT SoC specific support Add CMT[01] support to SoC DT. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit ef9d757c06e9b0258b10fcb19c3be2d8cbbc0a30 Author: Biju Das Date: Fri Nov 30 15:26:34 2018 +0000 ARM: dts: r8a7744: Add thermal device to DT This patch instantiates the thermal sensor module with thermal-zone support. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 154a05f0c870e6c49753cda689d2209c0915996e Author: Biju Das Date: Fri Nov 30 15:26:33 2018 +0000 ARM: dts: r8a7744: Add IRQC support Describe the IRQC interrupt controller in the r8a7744 device tree. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 56f1896093043c63c6ecd8a53080aa89d6b41070 Author: Biju Das Date: Fri Nov 30 15:26:32 2018 +0000 ARM: dts: r8a7744: Add CAN support Add the definitions for can0 and can1 to the r8a7744 SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 5133bfed5e585cec75550cdc795d848fe70097a9 Author: Biju Das Date: Fri Nov 30 15:26:31 2018 +0000 ARM: dts: r8a7744: Add audio support Add sound support for the RZ/G1N SoC (a.k.a. R8A7744). This work is based on similar work done on the R8A7743 SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 336a425ce67d151fe1e275389aeccd08d66d9833 Author: Biju Das Date: Fri Nov 30 15:26:30 2018 +0000 ARM: dts: r8a7744: Add RWDT node Add a device node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G1N (r8a7744) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit a5d56930c703ddbdd8712553247c38ec6f406b74 Author: Biju Das Date: Fri Nov 30 15:26:29 2018 +0000 ARM: dts: r8a7744: Add USB-DMAC and HSUSB device nodes Add usb dmac and hsusb device nodes on RZ/G1N SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit ce28396b7a8621e048cfb8d002bc869b428a905e Author: Biju Das Date: Fri Nov 30 15:26:28 2018 +0000 ARM: dts: r8a7744: USB 2.0 host support Describe internal PCI bridge devices, USB phy device and link PCI USB devices to USB phy. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f9a3d5f23b6c8e4029a3474945971477d1f9365a Author: Biju Das Date: Fri Nov 30 15:26:27 2018 +0000 ARM: dts: r8a7744-iwg20m: Enable SDHI0 controller Enable the SDHI0 controller on iWave RZ/G1N Qseven System On Module. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 266d863eece3f0b1e333203f9efe8fa89e042b3b Author: Biju Das Date: Fri Nov 30 15:26:26 2018 +0000 ARM: dts: r8a7744-iwg20m: Add eMMC support Add eMMC support for iWave RZ/G1N Qseven System On Module. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d9e792206d2101de871ea99220b59fe2930ebbcc Author: Biju Das Date: Fri Nov 30 15:26:25 2018 +0000 ARM: dts: r8a7744: Add MMC node Add MMC node to the DT of the r8a7744 SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b591e323b271fdc2ffdc40eaf06e926a1e272994 Author: Biju Das Date: Fri Nov 30 15:26:24 2018 +0000 ARM: dts: r8a7744: Add SDHI nodes Add SDHI nodes to the DT of the r8a7744 SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit fb64de56dfd9e8efe05d12adca7e2885ce1b9e17 Author: Biju Das Date: Fri Nov 30 15:26:23 2018 +0000 ARM: dts: r8a7744: Add I2C and IIC support Add the I2C[0-5] and IIC[0,1,3] devices nodes to the R8A7744 device tree. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 28c0cf739819124573cb24d3ab23b213f3b0d011 Author: Biju Das Date: Fri Nov 30 15:26:22 2018 +0000 ARM: dts: r8a7744: Add [H]SCIF{A|B} support Describe [H]SCIF{|A|B} ports in the R8A7744 device tree. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f1546da8a5c8862d1e66835affcfaf9a0c123abc Author: Biju Das Date: Fri Nov 30 15:26:21 2018 +0000 ARM: dts: r8a7744: Add SMP support Add DT node for the Advanced Power Management Unit (APMU), add the second CPU core, and use "renesas,apmu" as "enable-method". Also add cpu1 phandle node to the PMU interrupt-affinity property. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d94369fe69fd235e2109331c41f28dcfcfac28eb Author: Biju Das Date: Fri Nov 30 15:26:20 2018 +0000 ARM: dts: r8a7744: Add Ethernet AVB support Add Ethernet AVB support for R8A7744 SoC. Signed-off-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Simon Horman commit 78ce1559b2f1c741ceda6f511c80beee57b1b71e Author: Biju Das Date: Fri Nov 30 15:26:19 2018 +0000 ARM: dts: r8a7744: Add GPIO support Describe GPIO blocks in the R8A7744 device tree. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 484775a5a9d9875ee3b3dde22b913286d91a0c44 Author: Biju Das Date: Fri Nov 30 15:26:18 2018 +0000 ARM: dts: r8a7744: Add SYS-DMAC support Describe SYS-DMAC0/1 in the R8A7744 device tree. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 45c660ecdfd598eb93c46f5a95da6eb75008abb9 Author: Biju Das Date: Fri Nov 30 15:26:17 2018 +0000 ARM: dts: r8a7744-iwg20d-q7: Add support for iWave G20D-Q7 board based on RZ/G1N Add support for iWave RainboW-G20D-Qseven board based on RZ/G1N. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d83010f87ab31861eacac1ffe1278f655a376268 Author: Biju Das Date: Fri Nov 30 15:26:16 2018 +0000 ARM: dts: r8a7744: Initial SoC device tree Basic support for the RZ/G1N (R8A7744) SoC. Added placeholders to avoid compilation error with the common platform code. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 3c248aefe73b5586347dae74b0a8d40aea1018b3 Author: Biju Das Date: Fri Nov 30 15:26:15 2018 +0000 ARM: dts: r8a7744-iwg20m: Add iWave RZ/G1N Qseven SOM Add support for iWave RZ/G1N Qseven System On Module. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 6d2372fc77e45f23b1d20d9fe2844d2978ad9c93 Author: Geert Uytterhoeven Date: Mon Dec 3 16:04:47 2018 +0100 ARM: dts: r8a7743: Remove legacy "renesas,rcar-thermal" compatibility The thermal hardware description for the RZ/G1M SoC was added to its DTS after the introduction of support for thermal zones, and included a thermal-zones node from the beginning. Hence there is no need to claim compatibility with "renesas,rcar-thermal", which would be needed only for backwards compatibility with kernels predating thermal zone support. Fixes: 6c76b4f7d89e89f0 ("ARM: dts: r8a7743: Add thermal device to DT") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 3bbd3db86470c701091fb1d67f1fab6621debf50 Author: Ard Biesheuvel Date: Mon Dec 3 20:58:05 2018 +0100 arm64: relocatable: fix inconsistencies in linker script and options readelf complains about the section layout of vmlinux when building with CONFIG_RELOCATABLE=y (for KASLR): readelf: Warning: [21]: Link field (0) should index a symtab section. readelf: Warning: [21]: Info field (0) should index a relocatable section. Also, it seems that our use of '-pie -shared' is contradictory, and thus ambiguous. In general, the way KASLR is wired up at the moment is highly tailored to how ld.bfd happens to implement (and conflate) PIE executables and shared libraries, so given the current effort to support other toolchains, let's fix some of these issues as well. - Drop the -pie linker argument and just leave -shared. In ld.bfd, the differences between them are unclear (except for the ELF type of the produced image [0]) but lld chokes on seeing both at the same time. - Rename the .rela output section to .rela.dyn, as is customary for shared libraries and PIE executables, so that it is not misidentified by readelf as a static relocation section (producing the warnings above). - Pass the -z notext and -z norelro options to explicitly instruct the linker to permit text relocations, and to omit the RELRO program header (which requires a certain section layout that we don't adhere to in the kernel). These are the defaults for current versions of ld.bfd. - Discard .eh_frame and .gnu.hash sections to avoid them from being emitted between .head.text and .text, screwing up the section layout. These changes only affect the ELF image, and produce the same binary image. [0] b9dce7f1ba01 ("arm64: kernel: force ET_DYN ELF type for ...") Cc: Nick Desaulniers Cc: Peter Smith Tested-by: Nick Desaulniers Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 4d8d9fc7050106cbac8141bd5ed5db3e4abbd5fa Author: Tvrtko Ursulin Date: Mon Dec 3 12:50:14 2018 +0000 drm/i915: Trim unused workaround list entries The new workaround list allocator grows the list in chunks so will end up with some unused space. Trim it when the initialization phase is done to free up a tiny bit of slab. v2: * Simplify with kmemdup. (Chris Wilson) v3: * Refactor for __size removal. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203125014.3219-8-tvrtko.ursulin@linux.intel.com commit 452420d22d5b41256a0bb82402a797295e525da9 Author: Tvrtko Ursulin Date: Mon Dec 3 13:33:57 2018 +0000 drm/i915: Fuse per-context workaround handling with the common framework Convert the per context workaround handling code to run against the newly introduced common workaround framework and fuse the two to use the existing smarter list add helper, the one which does the sorted insert and merges registers where possible. This completes migration of all four classes of workarounds onto the common framework. Existing macros are kept untouched for smaller code churn. v2: * Rename to list name ctx_wa_list and move from dev_priv to engine. v3: * API rename and parameters tweaking. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203133357.10341-1-tvrtko.ursulin@linux.intel.com commit 69bcdecf1af5600dabbab890e3d8d9714638f91d Author: Tvrtko Ursulin Date: Mon Dec 3 12:50:12 2018 +0000 drm/i915: Move register white-listing to the common workaround framework Instead of having a separate list of white-listed registers we can trivially move this to the common workarounds framework. This brings us one step closer to the goal of driving all workaround classes using the same code. v2: * Use GEM_DEBUG_WARN_ON for the sanity check. (Chris Wilson) v3: * API rename. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203125014.3219-6-tvrtko.ursulin@linux.intel.com commit 28d6ccce73bec983d5038f5cee1064957816cf44 Author: Tvrtko Ursulin Date: Mon Dec 3 12:50:11 2018 +0000 drm/i915/selftests: Add tests for GT and engine workaround verification Two simple selftests which test that both GT and engine workarounds are not lost after either a full GPU reset, or after the per-engine ones. (Including checks that one engine reset is not affecting workarounds not belonging to itself.) v2: * Rebase for series refactoring. * Add spinner for actual engine reset! * Add idle reset test as well. (Chris Wilson) * Share existing global_reset_lock. (Chris Wilson) v3: * intel_engine_verify_workarounds can be static. * API rename. (Chris Wilson) * Move global reset lock out of the loop. (Chris Wilson) v4: * Add missing rpm puts. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203125014.3219-5-tvrtko.ursulin@linux.intel.com commit 094304beb4e1f4bfb2b59385a12d7074f4485e98 Author: Tvrtko Ursulin Date: Mon Dec 3 12:50:10 2018 +0000 drm/i915: Verify GT workaround state after GPU init Since we now have all the GT workarounds in a table, by adding a simple shared helper function we can now verify that their values are still applied after some interesting events in the lifetime of the driver. Initially we only do this after GPU initialization. v2: Chris Wilson: * Simplify verification by realizing it's a simple xor and and. * Remove verification from engine reset path. * Return bool straight away from the verify API. v3: * API rename. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203125014.3219-4-tvrtko.ursulin@linux.intel.com commit 4a15c75c42460252a63d30f03b4766a52945fb47 Author: Tvrtko Ursulin Date: Mon Dec 3 13:33:41 2018 +0000 drm/i915: Introduce per-engine workarounds We stopped re-applying the GT workarounds after engine reset since commit 59b449d5c82a ("drm/i915: Split out functions for different kinds of workarounds"). Issue with this is that some of the GT workarounds live in the MMIO space which gets lost during engine resets. So far the registers in 0x2xxx and 0xbxxx address range have been identified to be affected. This losing of applied workarounds has obvious negative effects and can even lead to hard system hangs (see the linked Bugzilla). Rather than just restoring this re-application, because we have also observed that it is not safe to just re-write all GT workarounds after engine resets (GPU might be live and weird hardware states can happen), we introduce a new class of per-engine workarounds and move only the affected GT workarounds over. Using the framework introduced in the previous patch, we therefore after engine reset, re-apply only the workarounds living in the affected MMIO address ranges. v2: * Move Wa_1406609255:icl to engine workarounds as well. * Rename API. (Chris Wilson) * Drop redundant IS_KABYLAKE. (Chris Wilson) * Re-order engine wa/ init so latest platforms are first. (Rodrigo Vivi) Signed-off-by: Tvrtko Ursulin Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=107945 Fixes: 59b449d5c82a ("drm/i915: Split out functions for different kinds of workarounds") Cc: Mika Kuoppala Cc: Ville Syrjälä Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Acked-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203133341.10258-1-tvrtko.ursulin@linux.intel.com commit 25d140faaa25f728159eb8c304eae53d88a7f14e Author: Tvrtko Ursulin Date: Mon Dec 3 13:33:19 2018 +0000 drm/i915: Record GT workarounds in a list To enable later verification of GT workaround state at various stages of driver lifetime, we record the list of applicable ones per platforms to a list, from which they are also applied. The added data structure is a simple array of register, mask and value items, which is allocated on demand as workarounds are added to the list. This is a temporary implementation which later in the series gets fused with the existing per context workaround list handling. It is separated at this stage since the following patch fixes a bug which needs to be as easy to backport as possible. Also, since in the following patch we will be adding a new class of workarounds (per engine) which can be applied from interrupt context, we straight away make the provision for safe read-modify-write cycle. v2: * Change dev_priv to i915 along the init path. (Chris Wilson) * API rename. (Chris Wilson) v3: * Remove explicit list size tracking in favour of growing the allocation in power of two chunks. (Chris Wilson) v4: Chris Wilson: * Change wa_list_finish to early return. * Copy workarounds using the compiler for static checking. * Do not bother zeroing unused entries. * Re-order struct i915_wa_list. v5: * kmalloc_array. * Whitespace cleanup. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181203133319.10174-1-tvrtko.ursulin@linux.intel.com commit 635b3bc6f514f7fd927309a51ecf12b6f9afcac1 Author: Jonathan Gray Date: Thu Nov 29 12:30:51 2018 +1100 drm/i915: change i915_sw_fence license to MIT Change the license of the i915_sw_fence files to MIT matching most of the other i915 files. This makes it possible to use them in a new port of i915 to OpenBSD. Besides some mechanical tree wide changes Chris Wilson is the sole author of these files with Intel holding the copyright. Intel's legal team have given permission to change the license according to Joonas Lahtinen. v2: expand commit message and note permission from Intel legal Signed-off-by: Jonathan Gray Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181129013051.17525-1-jsg@jsg.id.au commit 12209993e98c5fa1855c467f22a24e3d5b8be205 Author: Sebastian Andrzej Siewior Date: Thu Nov 29 16:02:10 2018 +0100 x86/fpu: Don't export __kernel_fpu_{begin,end}() There is one user of __kernel_fpu_begin() and before invoking it, it invokes preempt_disable(). So it could invoke kernel_fpu_begin() right away. The 32bit version of arch_efi_call_virt_setup() and arch_efi_call_virt_teardown() does this already. The comment above *kernel_fpu*() claims that before invoking __kernel_fpu_begin() preemption should be disabled and that KVM is a good example of doing it. Well, KVM doesn't do that since commit f775b13eedee2 ("x86,kvm: move qemu/guest FPU switching out to vcpu_run") so it is not an example anymore. With EFI gone as the last user of __kernel_fpu_{begin|end}(), both can be made static and not exported anymore. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Dave Hansen Cc: Ingo Molnar Cc: Nicolai Stange Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm ML Cc: linux-efi Cc: x86-ml Link: https://lkml.kernel.org/r/20181129150210.2k4mawt37ow6c2vq@linutronix.de commit 3800960afe158fa3d4c622774eaf59a9b3960a82 Author: Chris Wilson Date: Mon Dec 3 11:36:55 2018 +0000 drm/i915: Complete the fences as they are cancelled due to wedging We inspect the requests under the assumption that they will be marked as completed when they are removed from the queue. Currently however, in the process of wedging the requests will be removed from the queue before they are completed, so rearrange the code to complete the fences before the locks are dropped. <1>[ 354.473346] BUG: unable to handle kernel NULL pointer dereference at 0000000000000250 <6>[ 354.473363] PGD 0 P4D 0 <4>[ 354.473370] Oops: 0000 [#1] PREEMPT SMP PTI <4>[ 354.473380] CPU: 0 PID: 4470 Comm: gem_eio Tainted: G U 4.20.0-rc4-CI-CI_DRM_5216+ #1 <4>[ 354.473393] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018 <4>[ 354.473480] RIP: 0010:__i915_schedule+0x311/0x5e0 [i915] <4>[ 354.473490] Code: 49 89 44 24 20 4d 89 4c 24 28 4d 89 29 44 39 b3 a0 04 00 00 7d 3a 41 8b 44 24 78 85 c0 74 13 48 8b 93 78 04 00 00 48 83 e2 fc <39> 82 50 02 00 00 79 1e 44 89 b3 a0 04 00 00 48 8d bb d0 03 00 00 <4>[ 354.473515] RSP: 0018:ffffc900001bba90 EFLAGS: 00010046 <4>[ 354.473524] RAX: 0000000000000003 RBX: ffff8882624c8008 RCX: f34a737800000000 <4>[ 354.473535] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8882624c8048 <4>[ 354.473545] RBP: ffffc900001bbab0 R08: 000000005963f1f1 R09: 0000000000000000 <4>[ 354.473556] R10: ffffc900001bba10 R11: ffff8882624c8060 R12: ffff88824fdd7b98 <4>[ 354.473567] R13: ffff88824fdd7bb8 R14: 0000000000000001 R15: ffff88824fdd7750 <4>[ 354.473578] FS: 00007f44b4b5b980(0000) GS:ffff888277e00000(0000) knlGS:0000000000000000 <4>[ 354.473590] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 354.473599] CR2: 0000000000000250 CR3: 000000026976e000 CR4: 0000000000340ef0 <4>[ 354.473611] Call Trace: <4>[ 354.473622] ? lock_acquire+0xa6/0x1c0 <4>[ 354.473677] ? i915_schedule_bump_priority+0x57/0xd0 [i915] <4>[ 354.473736] i915_schedule_bump_priority+0x72/0xd0 [i915] <4>[ 354.473792] i915_request_wait+0x4db/0x840 [i915] <4>[ 354.473804] ? get_pwq.isra.4+0x2c/0x50 <4>[ 354.473813] ? ___preempt_schedule+0x16/0x18 <4>[ 354.473824] ? wake_up_q+0x70/0x70 <4>[ 354.473831] ? wake_up_q+0x70/0x70 <4>[ 354.473882] ? gen6_rps_boost+0x118/0x120 [i915] <4>[ 354.473936] i915_gem_object_wait_fence+0x8a/0x110 [i915] <4>[ 354.473991] i915_gem_object_wait+0x113/0x500 [i915] <4>[ 354.474047] i915_gem_wait_ioctl+0x11c/0x2f0 [i915] <4>[ 354.474101] ? i915_gem_unset_wedged+0x210/0x210 [i915] <4>[ 354.474113] drm_ioctl_kernel+0x81/0xf0 <4>[ 354.474123] drm_ioctl+0x2de/0x390 <4>[ 354.474175] ? i915_gem_unset_wedged+0x210/0x210 [i915] <4>[ 354.474187] ? finish_task_switch+0x95/0x260 <4>[ 354.474197] ? lock_acquire+0xa6/0x1c0 <4>[ 354.474207] do_vfs_ioctl+0xa0/0x6e0 <4>[ 354.474217] ? __fget+0xfc/0x1e0 <4>[ 354.474225] ksys_ioctl+0x35/0x60 <4>[ 354.474233] __x64_sys_ioctl+0x11/0x20 <4>[ 354.474241] do_syscall_64+0x55/0x190 <4>[ 354.474251] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 354.474260] RIP: 0033:0x7f44b3de65d7 <4>[ 354.474267] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48 <4>[ 354.474293] RSP: 002b:00007fff974948e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 <4>[ 354.474305] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f44b3de65d7 <4>[ 354.474316] RDX: 00007fff97494940 RSI: 00000000c010646c RDI: 0000000000000007 <4>[ 354.474327] RBP: 00007fff97494940 R08: 0000000000000000 R09: 00007f44b40bbc40 <4>[ 354.474337] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c010646c <4>[ 354.474348] R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000 v2: Avoid floating requests. v3: Can't call dma_fence_signal() under the timeline lock! v4: Can't call dma_fence_signal() from inside another fence either. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-2-chris@chris-wilson.co.uk commit 77e9c35acd5f9ebc5ab211785e25da880ccdd5fc Author: YueHaibing Date: Sat Dec 1 03:20:44 2018 +0000 drm/vkms: Remove set but not used variable 'vkms_obj' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/vkms/vkms_plane.c: In function 'vkms_prepare_fb': drivers/gpu/drm/vkms/vkms_plane.c:144:26: warning: variable 'vkms_obj' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 8ce1bb0b5337 ("drm/vkms: map/unmap buffers in [prepare/cleanup]_fb hooks") Signed-off-by: YueHaibing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1543634444-186448-1-git-send-email-yuehaibing@huawei.com commit 3f3327dbc5596076f94695d8d4cc66da3d5027fb Author: Phil Edworthy Date: Fri Nov 23 10:54:28 2018 +0000 pinctrl: rzn1: Fix of_get_child_count() error check If we assign the result of of_get_child_count() to an unsigned int, the code will not detect any errors. Therefore assign it to an int instead. Signed-off-by: Phil Edworthy Signed-off-by: Geert Uytterhoeven commit 8deaaa46d2de91e399076eb962b171734ca3092d Author: Phil Edworthy Date: Fri Nov 23 10:54:27 2018 +0000 pinctrl: rzn1: Fix check for used MDIO bus This fixes the check for unused mdio bus setting and the following static checker warning: drivers/pinctrl/pinctrl-rzn1.c:198 rzn1_pinctrl_mdio_select() warn: always true condition '(ipctl->mdio_func[mdio] >= 0) => (0-u32max >= 0)' Reported-by: Dan Carpenter Signed-off-by: Phil Edworthy Signed-off-by: Geert Uytterhoeven commit 0ce611c906bff3d6c3d72f3d5d8de79ea0490fa0 Author: Chris Wilson Date: Tue Nov 20 20:24:39 2018 +0000 drm/i915/dp: Fix inconsistent indenting Always show the FEC capability as it is initialised to 0 before error. Fixing, drivers/gpu/drm/i915/intel_dp.c:3846 intel_dp_get_dsc_sink_cap() warn: inconsistent indenting Fixes: 08cadae8e157 ("i915/dp/fec: Cache the FEC_CAPABLE DPCD register") Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Ville Syrjala Cc: Manasi Navare Cc: Anusha Srivatsa Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181120202439.13017-2-chris@chris-wilson.co.uk commit c0f8584f0553f3e7b37270d203b3ad8fc7bd1262 Author: Geert Uytterhoeven Date: Wed Oct 17 12:00:33 2018 +0200 clk: renesas: r8a77995: Simplify PLL3 multiplier/divider 116/6 can be simplified to 58/3. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 6155bfa32caf1fe7528f24030cfbe5c744d7355e Author: Geert Uytterhoeven Date: Wed Nov 21 10:32:23 2018 +0100 clk: renesas: r8a77995: Add missing CPEX clock The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) added the CPEX clock on R-Car D3. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Add the missing clock to the DT bindings header, and implement support for it in the clock driver. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 846dbb405b8cf4b11b8dd5a414d3b01dc20971d8 Author: Geert Uytterhoeven Date: Tue Nov 20 16:46:38 2018 +0100 clk: renesas: r8a77995: Remove non-existent SSP clocks The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Dec 22, 2017, and Feb 28, 2018) removed the SSPSRC, SSP1, and SSP2 clocks on R-Car D3, as this SoC does not have a Stream and Security Processor. As these definitions were never used, they can just be removed. The freed slots in the DT bindings header must not be reused, though. Fixes: 714c53aa2e2d6d60 ("clk: renesas: Add r8a77995 CPG Core Clock Definitions") Fixes: d71e851d82c6cfe5 ("clk: renesas: cpg-mssr: Add R8A77995 support") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit a5883a387fc1430d7acff043626570889d9a1a41 Author: Geert Uytterhoeven Date: Wed Oct 17 11:48:32 2018 +0200 clk: renesas: r8a77995: Remove non-existent VIN5-7 module clocks R-Car Gen3 Hardware Manual Errata for Rev 0.80 of February 28, 2018, removed the module clocks for the Video Input Module (VIN) channels 5-7 on R-Car D3, as they do not exist on this SoC. Fixes: d71e851d82c6cfe5 ("clk: renesas: cpg-mssr: Add R8A77995 support") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 515b2915ee08060ad4f6a3b3de38c5c2c5258e8b Author: Geert Uytterhoeven Date: Thu Nov 29 11:06:37 2018 +0100 clk: renesas: r8a77995: Correct parent clock of DU According to the R-Car Gen3 Hardware Manual Rev 1.00, the parent clock of the DU module clocks on R-Car D3 is S1D1. Fixes: d71e851d82c6cfe5 ("clk: renesas: cpg-mssr: Add R8A77995 support") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart commit 7cf3a216a2b3a672cad3e498c186c9333bdff90a Author: Takeshi Kihara Date: Fri Oct 12 16:48:34 2018 +0900 clk: renesas: r8a77990: Correct parent clock of DU According to the R-Car Gen3 Hardware Manual Rev 1.00, the parent clock of the DU module clocks on R-Car E3 is S1D1. Signed-off-by: Takeshi Kihara Fixes: 3570a2af473789c5 ("clk: renesas: cpg-mssr: Add support for R-Car E3") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Laurent Pinchart commit 396bc9d40d694befa1c2c88f9873afc62a189b5f Author: Geert Uytterhoeven Date: Wed Nov 21 10:44:32 2018 +0100 clk: renesas: r8a77970: Add CPEX clock Implement support for the CPEX clock on R-Car V3M. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit f70f4be7339dfca0ef684046c1583cce61b039fc Author: Geert Uytterhoeven Date: Wed Nov 21 10:44:16 2018 +0100 clk: renesas: r8a77965: Add CPEX clock Implement support for the CPEX clock on R-Car M3-N. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit f51389cb6a976e1a6edd0289ea5406c462021bc5 Author: Geert Uytterhoeven Date: Wed Nov 21 10:43:42 2018 +0100 clk: renesas: r8a7796: Add CPEX clock Implement support for the CPEX clock on R-Car M3-W. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit b9c0ba6614bc19844c2ab345c10e8116c78de772 Author: Geert Uytterhoeven Date: Wed Nov 21 10:43:16 2018 +0100 clk: renesas: r8a7795: Add CPEX clock Implement support for the CPEX clock on R-Car H3. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit f845b01d478a4d139fe3493f1e6ec8d9110ce56c Author: Geert Uytterhoeven Date: Wed Nov 21 10:42:24 2018 +0100 clk: renesas: r8a774a1: Add CPEX clock Implement support for the CPEX clock on RZ/G2M. This clock can be selected as a clock source for CMT1 (Compare Match Timer Type 1). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 4584738e139ce51c3c89ff5491bf6bc65fb0db69 Author: Geert Uytterhoeven Date: Tue Nov 20 16:34:47 2018 +0100 dt-bindings: clock: r8a7796: Remove CSIREF clock The R-Car Gen3 HardWare Manual Errata for Rev. 0.52 (Nov 30, 2016) removed the CSI reference clock on R-Car M3-W. As this definition was never used, it can just be removed. The freed slot in the DT bindings header must not be reused, though. Fixes: 972610fb23b08dd5 ("clk: renesas: Add r8a7796 CPG Core Clock Definitions") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 4102a9edf90112cefec1ab208ea8a75871d63d41 Author: Geert Uytterhoeven Date: Tue Nov 20 16:34:47 2018 +0100 dt-bindings: clock: r8a7795: Remove CSIREF clock The R-Car Gen3 HardWare Manual Errata for Rev. 0.52 (Nov 30, 2016) removed the CSI reference clock on R-Car H3. As this definition was never used, it can just be removed. The freed slot in the DT bindings header must not be reused, though. Fixes: 9d0c3c682033d3f1 ("clk: shmobile: Add r8a7795 CPG Core Clock Definitions") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd commit 005e13a96c0ed1437cb7f113d5d0f07ad9590962 Author: Firoz Khan Date: Tue Nov 13 11:30:29 2018 +0530 m68k: Generate uapi header and syscall table header files System call table generation script must be run to gener- ate unistd_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by m68k/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/syscalltable.S file. Signed-off-by: Firoz Khan Signed-off-by: Geert Uytterhoeven commit fd81414666cf6721cb29562094d4a874e8c096b2 Author: Firoz Khan Date: Tue Nov 13 11:30:28 2018 +0530 m68k: Add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/syscall_table.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Geert Uytterhoeven commit d2cc708775f89e5ae12e00c026136828c20298f5 Author: Firoz Khan Date: Tue Nov 13 11:30:27 2018 +0530 m68k: Add __NR_syscalls along with NR_syscalls NR_syscalls macro holds the number of system call exist in m68k architecture. We have to change the value of NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall- .tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_syscalls value. 1. Update NR_syscalls in asm/unistd.h manually by counting the no.of system calls. No need to up- date NR_syscalls until we either add a new sys- tem call or delete existing system call. 2. We can keep this feature it above mentioned sc- ript, that will count the number of syscalls and keep it in a generated file. In this case we don't need to explicitly update NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_syscalls asm/unistd.h. The macro __NR- _syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implement- ation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Geert Uytterhoeven commit 7c91efce1608325634494b25ff6491320208e457 Author: Christophe Leroy Date: Mon Dec 3 17:40:25 2018 +0000 powerpc/mm: dump block address translation on book3s/32 This patch adds a debugfs file to dump block address translation: ~# cat /sys/kernel/debug/powerpc/block_address_translation ---[ Instruction Block Address Translations ]--- 0: - 1: - 2: 0xc0000000-0xcfffffff 0x00000000 Kernel EXEC coherent 3: 0xd0000000-0xdfffffff 0x10000000 Kernel EXEC coherent 4: - 5: - 6: - 7: - ---[ Data Block Address Translations ]--- 0: - 1: - 2: 0xc0000000-0xcfffffff 0x00000000 Kernel RW coherent 3: 0xd0000000-0xdfffffff 0x10000000 Kernel RW coherent 4: - 5: - 6: - 7: - Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 0261a508c9fcb33e60f09cac42032f85c31e2039 Author: Christophe Leroy Date: Fri Nov 16 17:06:43 2018 +0000 powerpc/mm: dump segment registers on book3s/32 This patch creates a debugfs file to see content of segment registers # cat /sys/kernel/debug/segment_registers ---[ User Segments ]--- 0x00000000-0x0fffffff Kern key 1 User key 1 VSID 0xade2b0 0x10000000-0x1fffffff Kern key 1 User key 1 VSID 0xade3c1 0x20000000-0x2fffffff Kern key 1 User key 1 VSID 0xade4d2 0x30000000-0x3fffffff Kern key 1 User key 1 VSID 0xade5e3 0x40000000-0x4fffffff Kern key 1 User key 1 VSID 0xade6f4 0x50000000-0x5fffffff Kern key 1 User key 1 VSID 0xade805 0x60000000-0x6fffffff Kern key 1 User key 1 VSID 0xade916 0x70000000-0x7fffffff Kern key 1 User key 1 VSID 0xadea27 0x80000000-0x8fffffff Kern key 1 User key 1 VSID 0xadeb38 0x90000000-0x9fffffff Kern key 1 User key 1 VSID 0xadec49 0xa0000000-0xafffffff Kern key 1 User key 1 VSID 0xaded5a 0xb0000000-0xbfffffff Kern key 1 User key 1 VSID 0xadee6b ---[ Kernel Segments ]--- 0xc0000000-0xcfffffff Kern key 0 User key 1 VSID 0x000ccc 0xd0000000-0xdfffffff Kern key 0 User key 1 VSID 0x000ddd 0xe0000000-0xefffffff Kern key 0 User key 1 VSID 0x000eee 0xf0000000-0xffffffff Kern key 0 User key 1 VSID 0x000fff Signed-off-by: Christophe Leroy [mpe: Move it under /sys/kernel/debug/powerpc, make sr_init() __init] Signed-off-by: Michael Ellerman commit b682c8692442711684befe413cf93cf01c5324ea Author: Joel Stanley Date: Tue Dec 4 09:37:46 2018 +1030 powerpc/math-emu: Update macros from GCC The add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros originate from GCC's longlong.h which in turn was copied from GMP's longlong.h a few decades ago. This was found when compiling with clang: arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions FP_ADD_D(R, T, B); ^~~~~~~~~~~~~~~~~ ... ./arch/powerpc/include/asm/sfp-machine.h:283:27: note: expanded from macro 'sub_ddmmss' : "=r" ((USItype)(sh)), \ ~~~~~~~~~~^~~ Segher points out: this was fixed in GCC over 16 years ago ( https://gcc.gnu.org/r56600 ), and in GMP (where it comes from) presumably before that. Update the add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros to the latest GCC version in order to git rid of the invalid casts. These were taken as-is from GCC's longlong in order to make future syncs obvious. Other parts of sfp-machine.h were left as-is as the file contains more features than present in longlong.h. Link: https://github.com/ClangBuiltLinux/linux/issues/260 Signed-off-by: Joel Stanley Reviewed-by: Nick Desaulniers Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman commit afa202b6bd307f6a2e682c59e392f8dcc754e969 Author: Russell Currey Date: Tue Dec 4 16:11:54 2018 +1100 powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH From what I've seen, every time this warning comes up it's bogus, so let's ignore it. Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit b14fc502663d4a21550f59f8242f37f13da1d7f6 Author: Christophe Leroy Date: Thu Nov 29 14:07:26 2018 +0000 powerpc/8xx: regroup TLB handler routines As this is running with MMU off, the CPU only does speculative fetch for code in the same page. Following the significant size reduction of TLB handler routines, the side handlers can be brought back close to the main part, ie in the same page. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 74fabcadfd434065d0088f424905599298c5b2d2 Author: Christophe Leroy Date: Thu Nov 29 14:07:24 2018 +0000 powerpc/8xx: don't use r12/SPRN_SPRG_SCRATCH2 in TLB Miss handlers This patch reworks the TLB Miss handler in order to not use r12 register, hence avoiding having to save it into SPRN_SPRG_SCRATCH2. In the DAR Fixup code we can now use SPRN_M_TW, freeing SPRN_SPRG_SCRATCH2. Then SPRN_SPRG_SCRATCH2 may be used for something else in the future. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 55c8fc3f4930286580af98711a481f35fa564e42 Author: Christophe Leroy Date: Thu Nov 29 14:07:21 2018 +0000 powerpc/8xx: reintroduce 16K pages with HW assistance Using this HW assistance implies some constraints on the page table structure: - Regardless of the main page size used (4k or 16k), the level 1 table (PGD) contains 1024 entries and each PGD entry covers a 4Mbytes area which is managed by a level 2 table (PTE) containing also 1024 entries each describing a 4k page. - 16k pages require 4 identifical entries in the L2 table - 512k pages PTE have to be spread every 128 bytes in the L2 table - 8M pages PTE are at the address pointed by the L1 entry and each 8M page require 2 identical entries in the PGD. In order to use hardware assistance with 16K pages, this patch does the following modifications: - Make PGD size independent of the main page size - In 16k pages mode, redefine pte_t as a struct with 4 elements, and populate those 4 elements in __set_pte_at() and pte_update() - Adapt the size of the hugepage tables. - Define a PTE_FRAGMENT_NB so that a 16k page contains 4 page tables. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 3fb69c6a1a13afc5f64ef84e96d69a4be199d485 Author: Christophe Leroy Date: Thu Nov 29 14:07:19 2018 +0000 powerpc/8xx: Enable 512k hugepage support with HW assistance For using 512k pages with hardware assistance, the PTEs have to be spread every 128 bytes in the L2 table. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 22569b881d373153ce0a214f89920851918dd77d Author: Christophe Leroy Date: Thu Nov 29 14:07:17 2018 +0000 powerpc/8xx: Enable 8M hugepage support with HW assistance HW assistance naturally supports 8M huge pages without further modifications. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 6a8f911b50d758f2b238d694e19bea02671d1601 Author: Christophe Leroy Date: Thu Nov 29 14:07:15 2018 +0000 powerpc/8xx: Use hardware assistance in TLB handlers Today, on the 8xx the TLB handlers do SW tablewalk by doing all the calculation in ASM, in order to match with the Linux page table structure. The 8xx offers hardware assistance which allows significant size reduction of the TLB handlers, hence also reduces the time spent in the handlers. However, using this HW assistance implies some constraints on the page table structure: - Regardless of the main page size used (4k or 16k), the level 1 table (PGD) contains 1024 entries and each PGD entry covers a 4Mbytes area which is managed by a level 2 table (PTE) containing also 1024 entries each describing a 4k page. - 16k pages require 4 identifical entries in the L2 table - 512k pages PTE have to be spread every 128 bytes in the L2 table - 8M pages PTE are at the address pointed by the L1 entry and each 8M page require 2 identical entries in the PGD. This patch modifies the TLB handlers to use HW assistance for 4K PAGES. Before that patch, the mean time spent in TLB miss handlers is: - ITLB miss: 80 ticks - DTLB miss: 62 ticks After that patch, the mean time spent in TLB miss handlers is: - ITLB miss: 72 ticks - DTLB miss: 54 ticks So the improvement is 10% for ITLB and 13% for DTLB misses Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 5af543be14cdad5d515631c5fe6984813fe0db70 Author: Christophe Leroy Date: Thu Nov 29 14:07:13 2018 +0000 powerpc/8xx: Temporarily disable 16k pages and hugepages In preparation of making use of hardware assistance in TLB handlers, this patch temporarily disables 16K pages and hugepages. The reason is that when using HW assistance in 4K pages mode, the linux model fit with the HW model for 4K pages and 8M pages. However for 16K pages and 512K mode some additional work is needed to get linux model fit with HW model. For the 8M pages, they will naturaly come back when we switch to HW assistance, without any additional handling. In order to keep the following patch smaller, the removal of the current special handling for 8M pages gets removed here as well. Therefore the 4K pages mode will be implemented first and without support for 512k hugepages. Then the 512k hugepages will be brought back. And the 16K pages will be implemented in the following step. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 8cfe4f5242ec3b1cc42c43f882c790900b093c8f Author: Christophe Leroy Date: Thu Nov 29 14:07:11 2018 +0000 powerpc/8xx: Move SW perf counters in first 32kb of memory In order to simplify time critical exceptions handling 8xx specific SW perf counters, this patch moves the counters into the beginning of memory. This is possible because .text is readable and the counters are never modified outside of the handlers. By doing this, we avoid having to set a second register with the upper part of the address of the counters. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 32bff4b9053193303b4dd4c5498a1ffc6b23bb2f Author: Christophe Leroy Date: Thu Nov 29 14:07:09 2018 +0000 powerpc/mm: remove unnecessary test in pgtable_cache_init() pgtable_cache_add() gracefully handles the case when a cache that size already exists by returning early with the following test: if (PGT_CACHE(shift)) return; /* Already have a cache of this size */ It is then not needed to test the existence of the cache before. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 1e03c7e2ea83b0acac7934e55943d1d4354baa43 Author: Christophe Leroy Date: Thu Nov 29 14:07:07 2018 +0000 powerpc/mm: fix a warning when a cache is common to PGD and hugepages While implementing TLB miss HW assistance on the 8xx, the following warning was encountered: [ 423.732965] WARNING: CPU: 0 PID: 345 at mm/slub.c:2412 ___slab_alloc.constprop.30+0x26c/0x46c [ 423.733033] CPU: 0 PID: 345 Comm: mmap Not tainted 4.18.0-rc8-00664-g2dfff9121c55 #671 [ 423.733075] NIP: c0108f90 LR: c0109ad0 CTR: 00000004 [ 423.733121] REGS: c455bba0 TRAP: 0700 Not tainted (4.18.0-rc8-00664-g2dfff9121c55) [ 423.733147] MSR: 00021032 CR: 24224848 XER: 20000000 [ 423.733319] [ 423.733319] GPR00: c0109ad0 c455bc50 c4521910 c60053c0 007080c0 c0011b34 c7fa41e0 c455be30 [ 423.733319] GPR08: 00000001 c00103a0 c7fa41e0 c49afcc4 24282842 10018840 c079b37c 00000040 [ 423.733319] GPR16: 73f00000 00210d00 00000000 00000001 c455a000 00000100 00000200 c455a000 [ 423.733319] GPR24: c60053c0 c0011b34 007080c0 c455a000 c455a000 c7fa41e0 00000000 00009032 [ 423.734190] NIP [c0108f90] ___slab_alloc.constprop.30+0x26c/0x46c [ 423.734257] LR [c0109ad0] kmem_cache_alloc+0x210/0x23c [ 423.734283] Call Trace: [ 423.734326] [c455bc50] [00000100] 0x100 (unreliable) [ 423.734430] [c455bcc0] [c0109ad0] kmem_cache_alloc+0x210/0x23c [ 423.734543] [c455bcf0] [c0011b34] huge_pte_alloc+0xc0/0x1dc [ 423.734633] [c455bd20] [c01044dc] hugetlb_fault+0x408/0x48c [ 423.734720] [c455bdb0] [c0104b20] follow_hugetlb_page+0x14c/0x44c [ 423.734826] [c455be10] [c00e8e54] __get_user_pages+0x1c4/0x3dc [ 423.734919] [c455be80] [c00e9924] __mm_populate+0xac/0x140 [ 423.735020] [c455bec0] [c00db14c] vm_mmap_pgoff+0xb4/0xb8 [ 423.735127] [c455bf00] [c00f27c0] ksys_mmap_pgoff+0xcc/0x1fc [ 423.735222] [c455bf40] [c000e0f8] ret_from_syscall+0x0/0x38 [ 423.735271] Instruction dump: [ 423.735321] 7cbf482e 38fd0008 7fa6eb78 7fc4f378 4bfff5dd 7fe3fb78 4bfffe24 81370010 [ 423.735536] 71280004 41a2ff88 4840c571 4bffff80 <0fe00000> 4bfffeb8 81340010 712a0004 [ 423.735757] ---[ end trace e9b222919a470790 ]--- This warning occurs when calling kmem_cache_zalloc() on a cache having a constructor. In this case it happens because PGD cache and 512k hugepte cache are the same size (4k). While a cache with constructor is created for the PGD, hugepages create cache without constructor and uses kmem_cache_zalloc(). As both expect a cache with the same size, the hugepages reuse the cache created for PGD, hence the conflict. In order to avoid this conflict, this patch: - modifies pgtable_cache_add() so that a zeroising constructor is added for any cache size. - replaces calls to kmem_cache_zalloc() by kmem_cache_alloc() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 0356656284ca750f882b7eb81b9612bdbc90b2c4 Author: Christophe Leroy Date: Thu Nov 29 14:07:05 2018 +0000 powerpc/mm: replace hugetlb_cache by PGT_CACHE(PTE_T_ORDER) Instead of opencoding cache handling for the special case of hugepage tables having a single pte_t element, this patch makes use of the common pgtable_cache helpers Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 129dd323ddb808ee2fbd9f2a89d97d2cc7959790 Author: Christophe Leroy Date: Thu Nov 29 14:07:03 2018 +0000 powerpc/mm: enable the use of page table cache of order 0 hugepages uses a cache of order 0. Lets allow page tables of order 0 in the common part in order to avoid open coding in hugetlb Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 32ea4c14999006fea541b5f78d008fffc1656849 Author: Christophe Leroy Date: Thu Nov 29 14:07:01 2018 +0000 powerpc/mm: Extend pte_fragment functionality to PPC32 In order to allow the 8xx to handle pte_fragments, this patch extends the use of pte_fragments to PPC32 platforms. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit a74791dd98332435550bdc57761969ba72b74769 Author: Christophe Leroy Date: Thu Nov 29 14:06:59 2018 +0000 powerpc/mm: add helpers to get/set mm.context->pte_frag In order to handle pte_fragment functions with single fragment without adding pte_frag in all mm_context_t, this patch creates two helpers which do nothing on platforms using a single fragment. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d09780f3a8d48fd49136d7bae8f0ae30de7f261a Author: Christophe Leroy Date: Thu Nov 29 14:06:57 2018 +0000 powerpc/mm: Move pgtable_t into platform headers This patch move pgtable_t into platform headers. It gets rid of the CONFIG_PPC_64K_PAGES case for PPC64 as nohash/64 doesn't support CONFIG_PPC_64K_PAGES. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 994da93d196866f914c9d64aafb86e95e3decbb2 Author: Christophe Leroy Date: Thu Nov 29 14:06:55 2018 +0000 powerpc/mm: move platform specific mmu-xxx.h in platform directories The purpose of this patch is to move platform specific mmu-xxx.h files in platform directories like pte-xxx.h files. In the meantime this patch creates common nohash and nohash/32 + nohash/64 mmu.h files for future common parts. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 2a146533bf96af3fba97b1c91efe0416b1b24b95 Author: Christophe Leroy Date: Thu Nov 29 14:06:53 2018 +0000 powerpc/mm: Avoid useless lock with single page fragments There is no point in taking the page table lock as pte_frag or pmd_frag are always NULL when we have only one fragment. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit a95d133c8643cae40a35f82184640d312ba9f11f Author: Christophe Leroy Date: Thu Nov 29 14:06:51 2018 +0000 powerpc/mm: Move pte_fragment_alloc() to a common location In preparation of next patch which generalises the use of pte_fragment_alloc() for all, this patch moves the related functions in a place that is common to all subarches. The 8xx will need that for supporting 16k pages, as in that mode page tables still have a size of 4k. Since pte_fragment with only once fragment is not different from what is done in the general case, we can easily migrate all subarchs to pte fragments. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit ddfc20a3b9ae23b09498a0a7c06a7049b251c158 Author: Christophe Leroy Date: Thu Nov 29 14:06:49 2018 +0000 powerpc/8xx: Remove PTE_ATOMIC_UPDATES commit 1bc54c03117b9 ("powerpc: rework 4xx PTE access and TLB miss") introduced non atomic PTE updates and started the work of removing PTE updates in TLB miss handlers, but kept PTE_ATOMIC_UPDATES for the 8xx with the following comment: /* Until my rework is finished, 8xx still needs atomic PTE updates */ commit fe11dc3f9628e ("powerpc/8xx: Update TLB asm so it behaves as linux mm expects") removed all PTE updates done in TLB miss handlers Therefore, atomic PTE updates are not needed anymore for the 8xx Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit a43ccc4bc499cb592e2cb3b4ada8d396a37e1c8e Author: Christophe Leroy Date: Thu Nov 29 14:06:47 2018 +0000 powerpc/book3s32: Remove CONFIG_BOOKE dependent code BOOK3S/32 cannot be BOOKE, so remove useless code Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 8ad940217cce2b6ccc8d8cc7156e9aea34ae5573 Author: Stephen Rothwell Date: Thu Nov 29 09:28:30 2018 +1100 powerpc: annotate implicit fall throughs There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings, but because we build arch/powerpc with -Werror, they became errors. Fix them up. This patch produces no change in behaviour, but should be reviewed in case these are actually bugs not intentional fallthoughs. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman commit f91203e71c64202b4b20fd0c2d5e9471b4c5cd6c Author: Breno Leitao Date: Thu Nov 1 18:54:01 2018 -0300 powerpc/mm: remove unused function prototype Commit f384796c40dc ("powerpc/mm: Add support for handling > 512TB address in SLB miss") removed function slb_miss_bad_addr(struct pt_regs *regs), but kept its declaration in the prototype file. This patch simply removes the function definition. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 2b038cbc5fcf12a7ee1cc9bfd5da1e46dacdee87 Author: Breno Leitao Date: Fri Nov 23 14:30:11 2018 -0200 powerpc/pseries/cpuidle: Fix preempt warning When booting a pseries kernel with PREEMPT enabled, it dumps the following warning: BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is pseries_processor_idle_init+0x5c/0x22c CPU: 13 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc3-00090-g12201a0128bc-dirty #828 Call Trace: [c000000429437ab0] [c0000000009c8878] dump_stack+0xec/0x164 (unreliable) [c000000429437b00] [c0000000005f2f24] check_preemption_disabled+0x154/0x160 [c000000429437b90] [c000000000cab8e8] pseries_processor_idle_init+0x5c/0x22c [c000000429437c10] [c000000000010ed4] do_one_initcall+0x64/0x300 [c000000429437ce0] [c000000000c54500] kernel_init_freeable+0x3f0/0x500 [c000000429437db0] [c0000000000112dc] kernel_init+0x2c/0x160 [c000000429437e20] [c00000000000c1d0] ret_from_kernel_thread+0x5c/0x6c This happens because the code calls get_lppaca() which calls get_paca() and it checks if preemption is disabled through check_preemption_disabled(). Preemption should be disabled because the per CPU variable may make no sense if there is a preemption (and a CPU switch) after it reads the per CPU data and when it is used. In this device driver specifically, it is not a problem, because this code just needs to have access to one lppaca struct, and it does not matter if it is the current per CPU lppaca struct or not (i.e. when there is a preemption and a CPU migration). That said, the most appropriate fix seems to be related to avoiding the debug_smp_processor_id() call at get_paca(), instead of calling preempt_disable() before get_paca(). Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 8d4a862276a9c30a269d368d324fb56529e6d5fd Author: Breno Leitao Date: Thu Nov 8 15:12:42 2018 -0200 powerpc/xmon: Fix invocation inside lock region Currently xmon needs to get devtree_lock (through rtas_token()) during its invocation (at crash time). If there is a crash while devtree_lock is being held, then xmon tries to get the lock but spins forever and never get into the interactive debugger, as in the following case: int *ptr = NULL; raw_spin_lock_irqsave(&devtree_lock, flags); *ptr = 0xdeadbeef; This patch avoids calling rtas_token(), thus trying to get the same lock, at crash time. This new mechanism proposes getting the token at initialization time (xmon_init()) and just consuming it at crash time. This would allow xmon to be possible invoked independent of devtree_lock being held or not. Signed-off-by: Breno Leitao Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman commit 9d43faac02e3a4a26171f96f4de69fa650d3b6f6 Author: Yishai Hadas Date: Mon Nov 26 08:28:32 2018 +0200 net/mlx5: Update mlx5_ifc with DEVX UCTX capabilities bits Expose device capabilities for DEVX user context, it includes which caps the device is supported and a matching bit to set as part of user context creation. Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky commit 97f2930f5b13585c9f151cedca021be110804cc3 Author: Jernej Skrabec Date: Sun Nov 4 19:26:45 2018 +0100 drm/sun4i: Add compatible for H6 display engine H6 is first Allwinner SoC which supports 10 bit colors, HDR and AFBC. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-9-jernej.skrabec@siol.net commit 64f28430cf152e7e2836df37e51c56e31e3647c2 Author: Jernej Skrabec Date: Mon Dec 3 20:58:56 2018 +0100 clk: sunxi-ng: h3: Allow parent change for ve clock Cedrus driver wants to set VE clock higher than it's possible without changing parent rate. In order to correct that, allow changing parent rate for VE clock. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 324f4071a08046676a637521f211a34848f0cc0d Author: Mesih Kilinc Date: Sun Dec 2 23:23:51 2018 +0300 ARM: dts: suniv: Add device tree for Lichee Pi Nano Lichee Pi Nano is a F1C100s board by Lichee Pi. Add initial device tree for it. Signed-off-by: Mesih Kilinc Signed-off-by: Maxime Ripard commit 4ba16d17efdd3bae25863a3e95a4d9b5f52dc686 Author: Mesih Kilinc Date: Sun Dec 2 23:23:50 2018 +0300 ARM: dts: suniv: add initial DTSI file for F1C100s F1C100s is one product with the suniv die, which has a 32MiB co-packaged DDR1 DRAM chip. As we have the support for suniv pin controller and CCU now, add a initial DTSI for it. Signed-off-by: Mesih Kilinc Signed-off-by: Maxime Ripard commit 0380126eb9afc48d40581301bcd709f283a8148a Author: Mesih Kilinc Date: Sun Dec 2 23:23:47 2018 +0300 clk: sunxi-ng: add support for suniv F1C100s SoC The suniv F1C100s SoC (the chip in some new F-series products of Allwinner) has a CCU which seems to be a stripped version of the CCU in SoCs after sun6i. Add support for the CCU. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit 3d737ddbe74c421ab5da563908484a06748e0211 Author: Mesih Kilinc Date: Sun Dec 2 23:23:46 2018 +0300 dt-bindings: clock: Add Allwinner suniv F1C100s CCU Add compatiple string for Allwinner suniv F1C100s CCU. Add clock and reset definitions. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard commit 36ff48805ae457d79886147913ad07056780dca0 Author: Leon Romanovsky Date: Wed Nov 28 20:53:43 2018 +0200 RDMA/mlx5: Unfold modify RMP function There is no need to perform modify_rmp in two separate function, while one of them uses stack as a placeholder for data while other allocates it dynamically. Combine those two functions to one call instead of two. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit a1eb180238a71797d84bd91acfb1de1d632623c5 Author: Leon Romanovsky Date: Wed Nov 28 20:53:42 2018 +0200 RDMA/mlx5: Unfold create RMP function There is no need to perform create_rmp in two separate function, while one of them uses stack as a placeholder for data while other allocates it dynamically. Combine those two functions to one instead of two. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit f3da6577da67a3cd44610ca54e308c6838c92157 Author: Leon Romanovsky Date: Wed Nov 28 20:53:41 2018 +0200 RDMA/mlx5: Initialize SRQ tables on mlx5_ib Transfer initialization and cleanup from mlx5_priv struct of mlx5_core_dev to be part of mlx5_ib_dev. This completes removal of SRQ from mlx5_core. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit b4990804e1a46321806df6b56e3f04f1803a03d9 Author: Leon Romanovsky Date: Wed Nov 28 20:53:40 2018 +0200 RDMA/mlx5: Update SRQ functions signatures to mlx5_ib format Reflect the change of moving SRQ code from mlx5_core to mlx5_ib by updating function signatures do not require mlx5_core_dev as an input, because all operations in mlx5_ib are supposed to use mlx5_ib_dev. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 81773ce5f07fd4c3acd4bb7e918ce03a4e652a5f Author: Leon Romanovsky Date: Wed Nov 28 20:53:39 2018 +0200 RDMA/mlx5: Use stages for callback to setup and release DEVX Reuse existing infrastructure to initialize and release DEVX uid. The DevX interface is intended for user space access, so it is supposed to be initialized before ib_register_device(). Also it isn't supported in switchdev mode and don't need to initialize it in that mode. Fixes: 76dc5a8406bf ("IB/mlx5: Manage device uid for DEVX white list commands") Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit c48d386b2bbb5b7546a409afb611346ba9520f73 Author: Leon Romanovsky Date: Wed Nov 28 20:53:38 2018 +0200 RDMA/mlx5: Remove SRQ signature global flag SRQ signature is not supported, hence no need for special static global variable to announce it. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit f02d0d6e53ac2c8a75b6cc87dc86675a9351d84d Author: Leon Romanovsky Date: Wed Nov 28 20:53:37 2018 +0200 net/mlx5: Move SRQ functions to RDMA part There is no need to keep SRQ which is RDMA object in mlx5_core. In this patch, we partially move the execution code, while next patches will move table initialization/release logic too. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit c23f88cb575fe4a0b49603d7f9e5c3782886269f Author: Leon Romanovsky Date: Wed Nov 28 20:53:36 2018 +0200 net/mlx5: Remove references to local mlx5_core functions As a preparation to move SRQ functionality to RDMA, drop all references to mlx5_core logic and make SRQ be dependent on shared code only. Most of the time, we are interested to know if events are working/not working and it is possible with previous commit ("net/mlx5: Debug print for forwarded async events"). Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 26d1164dff81096c38d955f00b84a0075563d8c7 Author: Leon Romanovsky Date: Wed Nov 28 20:53:35 2018 +0200 net/mlx5: Remove not-used lib/eq.h header file lib/eq.h is needed for EQ manipulation which are not performed in SRQ. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 5b5f0f16276021794038f12adc56df70cec42b4f Author: Leon Romanovsky Date: Wed Nov 28 20:53:34 2018 +0200 net/mlx5: Remove dead transobj code Delete functions which are not called and not needed. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 6cd0014ab90f6959fa1f8cc8b3f38d302457c919 Author: Leon Romanovsky Date: Wed Nov 28 20:53:33 2018 +0200 net/mlx5: Align SRQ licenses and copyright information Ensure that both RDMA and netdev parts of SRQ implementation has same copyright and license information annotated by SPDX tags. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 4bbfd7467cfc7d42e18d3008fa6a28ffd56e901a Merge: 2595646791c31 5ac7cdc29897e Author: Ingo Molnar Date: Tue Dec 4 07:52:30 2018 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU changes from Paul E. McKenney: - Convert RCU's BUG_ON() and similar calls to WARN_ON() and similar. - Replace calls of RCU-bh and RCU-sched update-side functions to their vanilla RCU counterparts. This series is a step towards complete removal of the RCU-bh and RCU-sched update-side functions. ( Note that some of these conversions are going upstream via their respective maintainers. ) - Documentation updates, including a number of flavor-consolidation updates from Joel Fernandes. - Miscellaneous fixes. - Automate generation of the initrd filesystem used for rcutorture testing. - Convert spin_is_locked() assertions to instead use lockdep. ( Note that some of these conversions are going upstream via their respective maintainers. ) - SRCU updates, especially including a fix from Dennis Krein for a bag-on-head-class bug. - RCU torture-test updates. Signed-off-by: Ingo Molnar commit e647e29196b7f802f8242c39ecb7cc937f5ef217 Author: ruippan (潘睿) Date: Tue Dec 4 01:04:12 2018 -0500 ext4: fix EXT4_IOC_GROUP_ADD ioctl Commit e2b911c53584 ("ext4: clean up feature test macros with predicate functions") broke the EXT4_IOC_GROUP_ADD ioctl. This was not noticed since only very old versions of resize2fs (before e2fsprogs 1.42) use this ioctl. However, using a new kernel with an enterprise Linux userspace will cause attempts to use online resize to fail with "No reserved GDT blocks". Fixes: e2b911c53584 ("ext4: clean up feature test macros with predicate...") Cc: stable@kernel.org # v4.4 Signed-off-by: Theodore Ts'o Signed-off-by: ruippan (潘睿) commit 361d24d40657d27bf9ba99a961e04171181b9719 Author: Eric Sandeen Date: Tue Dec 4 00:46:39 2018 -0500 ext4: hard fail dax mount on unsupported devices As dax inches closer to production use, an administrator should not be surprised by silently disabling the feature they asked for. Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o commit 32ea275008d8c76fa3f40d10d0ffc694a214dfef Author: Alexander Lochmann Date: Tue Dec 4 00:30:22 2018 -0500 jbd2: update locking documentation for transaction_t The following members of struct transaction_s aka transaction_t were turned into lock-free variables in the past: - t_updates - t_outstanding_credits - t_handle_count However, the documentation has not been updated yet. This commit replaced the annotated lock by [none]. Found by LockDoc (Alexander Lochmann, Horst Schirmeier and Olaf Spinczyk) Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier Signed-off-by: Theodore Ts'o commit 50c15df69e062bf056b44d5bb51fac5ed957fa37 Author: Chengguang Xu Date: Tue Dec 4 00:24:42 2018 -0500 ext4: remove redundant condition check ext4_xattr_destroy_cache() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling ext4_xattr_destroy_cache(). Reviewed-by: Jan Kara Signed-off-by: Chengguang Xu Signed-off-by: Theodore Ts'o commit 561405f031fec0a124a19c8f16275730f63fb3d9 Author: Colin Ian King Date: Tue Dec 4 00:20:10 2018 -0500 jbd2: clean up indentation issue, replace spaces with tab There is a statement that is indented with spaces, replace it with a tab. Reviewed-by: Jan Kara Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o commit a92abd738d243a3bcd864a9aa9cb9345e41be83d Author: Colin Ian King Date: Tue Dec 4 00:16:44 2018 -0500 ext4: clean up indentation issues, remove extraneous tabs There are several lines that are indented too far, clean these up by removing the tabs. Reviewed-by: Jan Kara Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o commit 132d00becb31e88469334e1e62751c81345280e0 Author: Maurizio Lombardi Date: Tue Dec 4 00:06:53 2018 -0500 ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() In case of error, ext4_try_to_write_inline_data() should unlock and release the page it holds. Fixes: f19d5870cbf7 ("ext4: add normal write support for inline data") Cc: stable@kernel.org # 3.8 Signed-off-by: Maurizio Lombardi Signed-off-by: Theodore Ts'o commit 61157b24e60fb3cd1f85f2c76a7b1d628f970144 Author: Pan Bian Date: Mon Dec 3 23:28:02 2018 -0500 ext4: fix possible use after free in ext4_quota_enable The function frees qf_inode via iput but then pass qf_inode to lockdep_set_quota_inode on the failure path. This may result in a use-after-free bug. The patch frees df_inode only when it is never used. Fixes: daf647d2dd5 ("ext4: add lockdep annotations for i_data_sem") Cc: stable@kernel.org # 4.6 Reviewed-by: Jan Kara Signed-off-by: Pan Bian Signed-off-by: Theodore Ts'o commit 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 Author: Andrzej Hajda Date: Fri Oct 12 12:53:46 2018 +0200 drm/exynos/iommu: merge IOMMU and DMA code As DMA code is the only user of IOMMU code both files can be merged. It allows to remove stub functions, after slight adjustment of exynos_drm_register_dma. Since IOMMU functions are used locally they can be marked static. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 39f69368434ff4348e475a909d82617ea025baa9 Author: Andrzej Hajda Date: Fri Oct 12 12:53:45 2018 +0200 drm/exynos/iommu: replace preprocessor conditionals with C conditionals Using C conditionals is preferred solution - it provides better code coverage, makes code more clear. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit a0b68a710b9dfc6d0f30c2212afcb57074905df5 Author: Andrzej Hajda Date: Fri Oct 12 12:53:44 2018 +0200 drm/exynos/iommu: move IOMMU specific stuff into exynos_drm_iommu.c Since __exynos_iommu* functions are used only in exynos_drm_iommu.c we can move them there. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 237556962e51150f89bdc8d04171a3619bfeaf8d Author: Andrzej Hajda Date: Fri Oct 12 12:53:43 2018 +0200 drm/exynos/iommu: integrate IOMMU/DMA internal API Exynos DRM drivers should work with and without IOMMU. Providing common API generic to both scenarios should make code cleaner and allow further code improvements. The patch removes including of exynos_drm_iommu.h as the file contains mostly IOMMU specific stuff, instead it exposes exynos_drm_*_dma functions and puts them into exynos_drm_dma.c. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 69908ed258fce73c75f461339d865a7b4eb6e720 Author: Andrzej Hajda Date: Fri Oct 12 12:53:42 2018 +0200 drm/exynos/iommu: remove DRM_EXYNOS_IOMMU Kconfig symbol DRM_EXYNOS_IOMMU symbol is not configurable, it is always equal to EXYNOS_IOMMU. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 29cbf24a4df5c2fa6c6e719598953b5392c00ec0 Author: Andrzej Hajda Date: Fri Oct 12 12:53:41 2018 +0200 drm/exynos: simplify DMA mapping Moving DMA mapping creation to drm_iommu_attach_device allows to avoid looping through all components and maintaining DMA device flags. v2: take care of configurations without IOMMU Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae commit 96f1e097457506f215adfe3c47aacc15a88f6dd7 Author: Jan Kara Date: Mon Dec 3 23:16:07 2018 -0500 jbd2: avoid long hold times of j_state_lock while committing a transaction We can hold j_state_lock for writing at the beginning of jbd2_journal_commit_transaction() for a rather long time (reportedly for 30 ms) due cleaning revoke bits of all revoked buffers under it. The handling of revoke tables as well as cleaning of t_reserved_list, and checkpoint lists does not need j_state_lock for anything. It is only needed to prevent new handles from joining the transaction. Generally T_LOCKED transaction state prevents new handles from joining the transaction - except for reserved handles which have to allowed to join while we wait for other handles to complete. To prevent reserved handles from joining the transaction while cleaning up lists, add new transaction state T_SWITCH and watch for it when starting reserved handles. With this we can just drop the lock for operations that don't need it. Reported-and-tested-by: Adrian Hunter Suggested-by: "Theodore Y. Ts'o" Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o commit d9bbd6a1a56eccb2b1198b8f2008d622982df0a1 Author: Yangtao Li Date: Mon Dec 3 09:34:11 2018 -0500 net: marvell: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 25079154f71170f615f67c33d47af1188117668b Author: Yangtao Li Date: Mon Dec 3 09:26:38 2018 -0500 net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Stefan Wahren Signed-off-by: David S. Miller commit fb0d9c6339e0d8d1eb09414a09df8513499bbf79 Author: Yangtao Li Date: Mon Dec 3 09:22:09 2018 -0500 net: stmmac: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit 6f6c74fad8655b1227f659de2e10d6b812acc276 Author: Yangtao Li Date: Mon Dec 3 09:13:35 2018 -0500 nfp: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8665569e97dd52920713b95675409648986b5b0d Author: Kees Cook Date: Mon Dec 3 16:39:01 2018 -0800 pstore/ram: Avoid NULL deref in ftrace merging failure path Given corruption in the ftrace records, it might be possible to allocate tmp_prz without assigning prz to it, but still marking it as needing to be freed, which would cause at least a NULL dereference. smatch warnings: fs/pstore/ram.c:340 ramoops_pstore_read() error: we previously assumed 'prz' could be null (see line 255) https://lists.01.org/pipermail/kbuild-all/2018-December/055528.html Reported-by: Dan Carpenter Fixes: 2fbea82bbb89 ("pstore: Merge per-CPU ftrace records into one") Cc: "Joel Fernandes (Google)" Signed-off-by: Kees Cook commit ea84b580b95521644429cc6748b6c2bf27c8b0f3 Author: Kees Cook Date: Fri Nov 30 14:36:58 2018 -0800 pstore: Convert buf_lock to semaphore Instead of running with interrupts disabled, use a semaphore. This should make it easier for backends that may need to sleep (e.g. EFI) when performing a write: |BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 |in_atomic(): 1, irqs_disabled(): 1, pid: 2236, name: sig-xstate-bum |Preemption disabled at: |[] pstore_dump+0x72/0x330 |CPU: 26 PID: 2236 Comm: sig-xstate-bum Tainted: G D 4.20.0-rc3 #45 |Call Trace: | dump_stack+0x4f/0x6a | ___might_sleep.cold.91+0xd3/0xe4 | __might_sleep+0x50/0x90 | wait_for_completion+0x32/0x130 | virt_efi_query_variable_info+0x14e/0x160 | efi_query_variable_store+0x51/0x1a0 | efivar_entry_set_safe+0xa3/0x1b0 | efi_pstore_write+0x109/0x140 | pstore_dump+0x11c/0x330 | kmsg_dump+0xa4/0xd0 | oops_exit+0x22/0x30 ... Reported-by: Sebastian Andrzej Siewior Fixes: 21b3ddd39fee ("efi: Don't use spinlocks for efi vars") Signed-off-by: Kees Cook commit 69596433bc28a4642bdc84676f44cfa3b16d0588 Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 pstore: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Kees Cook commit 30696378f68a9e3dad6bfe55938b112e72af00c2 Author: Joel Fernandes (Google) Date: Sat Nov 3 16:38:18 2018 -0700 pstore/ram: Do not treat empty buffers as valid The ramoops backend currently calls persistent_ram_save_old() even if a buffer is empty. While this appears to work, it is does not seem like the right thing to do and could lead to future bugs so lets avoid that. It also prevents misleading prints in the logs which claim the buffer is valid. I got something like: found existing buffer, size 0, start 0 When I was expecting: no valid data in buffer (sig = ...) This bails out early (and reports with pr_debug()), since it's an acceptable state. Signed-off-by: Joel Fernandes (Google) Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit b05c950698fe1edb1d67a00ecd034754e7dad8bb Author: Joel Fernandes (Google) Date: Sat Nov 3 16:38:17 2018 -0700 pstore/ram: Simplify ramoops_get_next_prz() arguments (1) remove type argument from ramoops_get_next_prz() Since we store the type of the prz when we initialize it, we no longer need to pass it again in ramoops_get_next_prz() since we can just use that to setup the pstore record. So lets remove it from the argument list. (2) remove max argument from ramoops_get_next_prz() Looking at the code flow, the 'max' checks are already being done on the prz passed to ramoops_get_next_prz(). Lets remove it to simplify this function and reduce its arguments. (3) further reduce ramoops_get_next_prz() arguments by passing record Both the id and type fields of a pstore_record are set by ramoops_get_next_prz(). So we can just pass a pointer to the pstore_record instead of passing individual elements. This results in cleaner more readable code and fewer lines. In addition lets also remove the 'update' argument since we can detect that. Changes are squashed into a single patch to reduce fixup conflicts. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Kees Cook commit f0f23e5469dc80b482d985898a930be0e249a162 Author: Joel Fernandes (Google) Date: Sat Nov 3 16:38:16 2018 -0700 pstore: Map PSTORE_TYPE_* to strings In later patches we will need to map types to names, so create a constant table for that which can also be used in different parts of old and new code. This saves the type in the PRZ which will be useful in later patches. Instead of having an explicit PSTORE_TYPE_UNKNOWN, just use ..._MAX. This includes removing the now redundant filename templates which can use a single format string. Also, there's no reason to limit the "is it still compressed?" test to only PSTORE_TYPE_DMESG when building the pstorefs filename. Records are zero-initialized, so a backend would need to have explicitly set compressed=1. Signed-off-by: Joel Fernandes (Google) Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit 4af62a6423d0ad98e3eee2bec4305dde8deefefe Author: Kees Cook Date: Thu Nov 1 15:30:05 2018 -0700 pstore: Replace open-coded << with BIT() Minor clean-up to use BIT() (as already done in pstore_ram.h). Signed-off-by: Kees Cook commit 0eed84ffb094bbddfb4b9378ef0a2eccf4dda99c Author: Kees Cook Date: Thu Nov 1 14:03:07 2018 -0700 pstore: Improve and update some comments and status output This improves and updates some comments: - dump handler comment out of sync from calling convention - fix kern-doc typo and improves status output: - reminder that only kernel crash dumps are compressed - do not be silent about ECC infrastructure failures Signed-off-by: Kees Cook commit c208f7d4b037e1c71e5c839bb5dfcc3e0df19890 Author: Kees Cook Date: Thu Nov 1 15:11:47 2018 -0700 pstore/ram: Add kern-doc for struct persistent_ram_zone The struct persistent_ram_zone wasn't well documented. This adds kern-doc for it. Signed-off-by: Kees Cook commit dc80b1ea4cbff1d72ce3d5edaaf1b6602fd7c780 Author: Kees Cook Date: Thu Nov 1 14:14:47 2018 -0700 pstore/ram: Report backend assignments with finer granularity In order to more easily perform automated regression testing, this adds pr_debug() calls to report each prz allocation which can then be verified against persistent storage. Specifically, seeing the dividing line between header, data, any ECC bytes. (And the general assignment output is updated to remove the bogus ECC blocksize which isn't actually recorded outside the prz instance.) Signed-off-by: Kees Cook commit 9ee85b8bd3cab1a151850b6648cab7ed2e0d8192 Author: Kees Cook Date: Fri Oct 26 01:14:01 2018 -0700 pstore/ram: Standardize module name in ramoops With both ram.c and ram_core.c built into ramoops.ko, it doesn't make sense to have differing pr_fmt prefixes. This fixes ram_core.c to use the module name (as ram.c already does). Additionally improves region reservation error to include the region name. Signed-off-by: Kees Cook commit 7684bd334d9d4ca4f09873e88d9c0131a2cf6c3b Author: Peng Wang Date: Tue Oct 30 15:52:34 2018 +0800 pstore: Avoid duplicate call of persistent_ram_zap() When initialing a prz, if invalid data is found (no PERSISTENT_RAM_SIG), the function call path looks like this: ramoops_init_prz -> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap persistent_ram_zap As we can see, persistent_ram_zap() is called twice. We can avoid this by adding an option to persistent_ram_new(), and only call persistent_ram_zap() when it is needed. Signed-off-by: Peng Wang [kees: minor tweak to exit path and commit log] Signed-off-by: Kees Cook commit b77fa617a2ff4d6beccad3d3d4b3a1f2d10368aa Author: Kees Cook Date: Thu Nov 1 14:08:07 2018 -0700 pstore: Remove needless lock during console writes Since the console writer does not use the preallocated crash dump buffer any more, there is no reason to perform locking around it. Fixes: 70ad35db3321 ("pstore: Convert console write to use ->write_buf") Signed-off-by: Kees Cook Reviewed-by: Joel Fernandes (Google) commit bdabc8e71c8582cd61314f004b9a0283269585bb Author: Kees Cook Date: Fri Oct 26 01:17:07 2018 -0700 pstore: Do not use crash buffer for decompression The pre-allocated compression buffer used for crash dumping was also being used for decompression. This isn't technically safe, since it's possible the kernel may attempt a crashdump while pstore is populating the pstore filesystem (and performing decompression). Instead, just allocate a separate buffer for decompression. Correctness is preferred over performance here. Signed-off-by: Kees Cook commit 971f66d8a75a4f86a254652cc1e70a7be841cc43 Merge: ccda4af0f4b92 89d328f637b99 Author: Kees Cook Date: Mon Dec 3 16:52:02 2018 -0800 Merge branch 'for-linus/pstore' into for-next/pstore commit 76eb6ea4d383644adc5b4f8ef356bec67aa12a16 Merge: 30fcd6a9edf1a 92a59ad040e33 Author: David S. Miller Date: Mon Dec 3 16:34:32 2018 -0800 Merge branch 'mlx4_core-cleanups' Tariq Toukan says: ==================== mlx4_core cleanups This patchset by Erez contains cleanups to the mlx4_core driver. Patch 1 replaces -EINVAL with -EOPNOTSUPP for unsupported operations. Patch 2 fixes some coding style issues. Series generated against net-next commit: 97e6c858a26e net: usb: aqc111: Initialize wol_cfg with memset in aqc111_suspend ==================== Signed-off-by: David S. Miller commit 92a59ad040e339da838c0a9fc681bbae619a39e3 Author: Erez Alfasi Date: Sun Dec 2 17:40:26 2018 +0200 net/mlx4_core: Fix several coding style errors Fix 3 checkpatch errors within mlx4/main.c: - Unnecessary mlx4_debug_level global variable initialization to 0. - Prohibited space before comma. - Whitespaces instead of tab. Signed-off-by: Erez Alfasi Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 95aac2cdafd8c8298c9b2589c52f44db0d824e0e Author: Erez Alfasi Date: Sun Dec 2 17:40:25 2018 +0200 net/mlx4_core: Fix return codes of unsupported operations Functions __set_port_type and mlx4_check_port_params returned -EINVAL while the proper return code is -EOPNOTSUPP as a result of an unsupported operation. All drivers should generate this and all users should check for it when detecting an unsupported functionality. Signed-off-by: Erez Alfasi Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 30fcd6a9edf1a169a07c3558f3a6e6a0007760fb Author: Jose Abreu Date: Sun Dec 2 16:33:14 2018 +0100 net: phy: Also request modules for C45 IDs Logic of phy_device_create() requests PHY modules according to PHY ID but for C45 PHYs we use different field for the IDs. Let's also request the modules for these IDs. Changes from v1: - Only request C22 modules if C45 are not present (Andrew) Signed-off-by: Jose Abreu Cc: Andrew Lunn Cc: Florian Fainelli Cc: "David S. Miller" Cc: Joao Pinto Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9a547c7e575fc2501c12081558fda3027d0f2a5e Author: Richard Guy Briggs Date: Fri Nov 30 16:13:16 2018 -0500 audit: shorten PATH cap values when zero Since the vast majority of files (99.993% on a typical system) have no fcaps, display "0" instead of the full zero-padded 16 hex digits in the two PATH record cap_f* fields to save netlink bandwidth and disk space. Simply changing the format to %x won't work since the value is two (or possibly more in the future) 32-bit hexadecimal values concatenated and bits in higher order values will be misrepresented. Passes audit-testsuite and userspace tools already work fine. Please see the github issue tracker for more details https://github.com/linux-audit/audit-kernel/issues/101 Signed-off-by: Richard Guy Briggs Acked-by: Steve Grubb Signed-off-by: Paul Moore commit 3eaf3ca6a183a45993ff04a8a824b25d4093b262 Merge: 6e360f7331132 23705adb2c631 Author: David S. Miller Date: Mon Dec 3 16:23:09 2018 -0800 Merge branch 'octeontx2-next' Jerin Jacob says: ==================== octeontx2-af: NIX and NPC enhancements This patchset is a continuation to earlier submitted four patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver https://www.spinics.net/lists/netdev/msg528272.html 2. octeontx2-af: NPA and NIX blocks initialization https://www.spinics.net/lists/netdev/msg529163.html 3. octeontx2-af: NPC parser and NIX blocks initialization https://www.spinics.net/lists/netdev/msg530252.html 4. octeontx2-af: NPC MCAM support and FLR handling https://www.spinics.net/lists/netdev/msg534392.html This patch series adds support for below NPC block: - Add NPC(mkex) profile support for various Key extraction configurations NIX block: - Enable dynamic RSS flow key algorithm configuration - Enhancements on Rx checksum and error checks - Add support for Tx packet marking support - TL1 schedule queue allocation enhancements - Add LSO format configuration mbox - VLAN TPID configuration - Skip multicast entry init for broadcast tables v2: - Rename FLOW_* to NIX_FLOW_* to avoid serious global namespace collisions, as we have various FLOW_* definitions coming from include/uapi/linux/pkt_cls.h for example.(David Miller) - Pack the arguments of rvu_get_tl1_schqs() function as 80 columns allows.(David Miller) ==================== Signed-off-by: David S. Miller commit 23705adb2c6319c8ea3cf21b99c8b3eb85fa9734 Author: Vamsi Attunuru Date: Sun Dec 2 18:17:49 2018 +0530 octeontx2-af: Enable mkex profile The following set of NPC registers allow the driver to configure NPC to generate different key value schemes to compare against packet payload in MCAM search. NPC_AF_INTF(0..1)_KEX_CFG NPC_AF_KEX_LDATA(0..1)_FLAGS_CFG NPC_AF_INTF(0..1)_LID(0..7)_LT(0..15)_LD(0..1)_CFG NPC_AF_INTF(0..1)_LDATA(0..1)_FLAGS(0..15)_CFG Currently, the AF driver populates these registers to configure the default values to address the most common use cases such as key generation for channel number + DMAC. The secure firmware stores different configuration value of these registers to enable different NPC use case along with the name for the lookup. Patch loads profile binary from secure firmware over the exiting CGX mailbox interface and apply the profile. AF driver shall fall back to the default configuration in case of any errors. The AF consumer driver can know the selected profile on response to NPC_GET_KEX_CFG mailbox by introducing mkex_pfl_name in the struct npc_get_kex_cfg_rsp. Signed-off-by: Vamsi Attunuru Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit da5d32e1ab855f8d70f8c28d18b22d43f06f6d20 Author: Nithin Dabilpuram Date: Sun Dec 2 18:17:48 2018 +0530 octeontx2-af: Add LSO format configuration mailbox NIX_AF_LSO_FORMAT(0..31)_FIELD(0..7) register enables an SW defined means to define LSO packet modification formats. 0..31 works as an index to choose the algorithm, On success, the mailbox returns the index to the client of chosen LSO algorithm selection. This index will be used in configuring the transmit descriptors. Add mailbox interface to dynamically reserve and configure LSO format. This commit also fixes 'sizem1' for NIX_LSOALG_TCP_FLAGS to '1' i.e 2 Bytes. Signed-off-by: Nithin Dabilpuram Signed-off-by: Sunil Goutham Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 159a8a6734da0462314d54c7701518a6fbe2bef6 Author: Vidhya Raman Date: Sun Dec 2 18:17:47 2018 +0530 octeontx2-af: Add L3 and L4 packet verification mailbox Adds mailbox support for L4 checksum verification and L3 and L4 length verification configuration. Signed-off-by: Vidhya Raman Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit a253933e6a8609ef40bf296b8ad60892133636c8 Author: Nithin Dabilpuram Date: Sun Dec 2 18:17:46 2018 +0530 octeontx2-af: Configure VLAN TPIDs Setup TPID's for vlan0 and vlan1 for Tx VLAN insertion offloads. Signed-off-by: Nithin Dabilpuram Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit a27d765916bd97d879887337fff26759e5d3279b Author: Krzysztof Kanas Date: Sun Dec 2 18:17:45 2018 +0530 octeontx2-af: Add support for Tx packet marking NIX_AF_MARK_FORMAT(0..127)_CTL register enables an SW defined means to mark/insert various data in the packet based on final packet color from traffic shaping HW. 0..127 works as an index to choose the algorithm. On success, the mailbox returns the index to the client. Add NIX_MARK_FORMAT_CFG mailbox which reserves mark format based on tuple (offset, y_mask, y_val, r_mask, r_val) If the tuple is requested again for mark format that was already reserved, then it will be reused. If not it will reserve a new entry if space is available. Also on AF init commonly used marker format such as VLAN DEI, IPv4 ECN, IPv4 DSCP are reserved for AF consumers. Signed-off-by: Krzysztof Kanas Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit f9f2da46c03d5e998f92134126e9be9822a473ec Author: Vamsi Attunuru Date: Sun Dec 2 18:17:44 2018 +0530 octeontx2-af: Enable RSS with promiscuous mode This patch adds support for enabling RSS in promiscuous mode if RSS is already requested by the AF client. Signed-off-by: Vamsi Attunuru Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 7c91a92efc3db6dc721fae1cfbe1630f3d940fff Author: Jerin Jacob Date: Sun Dec 2 18:17:43 2018 +0530 octeontx2-af: Define all NIX_AF_RX_DEF_* registers In order to support all NIX specific valid length errors and checksum errors on Rx, Update all NIX_AF_RX_DEF_* registers. Also sorted all registers in HRM definition order. Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 962e1bd6b74d6c1725761d1974698e1437565fb6 Author: Jerin Jacob Date: Sun Dec 2 18:17:42 2018 +0530 octeontx2-af: Enable inner IPv4 checksum and its error code This patch enables the inner IPv4 checksum and defines the error code for Rx inner and outer checksum errors. Setting ERRCODE as 1 so that CQE descriptor can be embedded valid checksum error code and the driver can interpret checksum error as ERRLEV = LID + 1 and ERRCODE = 1. Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit e2703c5f581a8d970c46251914e837db192b80d4 Author: Nithin Dabilpuram Date: Sun Dec 2 18:17:41 2018 +0530 octeontx2-af: Allow freeing single TLx Tx schedule queue The default behavior was to free all the TLx Tx schedule queues. This patch adds support for freeing a single Tx schedule queue if TXSCHQ_FREE_ALL flag is not set. Signed-off-by: Krzysztof Kanas Signed-off-by: Nithin Dabilpuram Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 26dda7da8ed33b8541053daaf1a2a08389bc0fe0 Author: Nithin Dabilpuram Date: Sun Dec 2 18:17:40 2018 +0530 octeontx2-af: Restrict TL1 allocation and configuration TL1 is the root node in the scheduling hierarchy and it is a global resource with a limited number. This patch introduces restriction and validation on the allocation of the TL1 nodes for the effective resource sharing across the AF consumers. - Limit TL1 allocation to 2 per lmac. One could be for the normal link and one for IEEE802.3br express link (Express Send DMA). Effectively all the VF's of an RVU PF(lmac) share the two TL1 schqs. - TL1 cannot be freed once allocated. - Allow VF's to only apply default config to TL1 if not already applied. PF's can always overwrite the TL1 config. - Consider NIX_AQ_INSTOP_WRITE while validating txschq when sq.ena is set. Signed-off-by: Krzysztof Kanas Signed-off-by: Nithin Dabilpuram Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 7ee74697e557ab9638d7fdcc091c5d25fc78af3d Author: Jerin Jacob Date: Sun Dec 2 18:17:39 2018 +0530 octeontx2-af: Add support for runtime RSS algo index reservation Introduced reserve_flowkey_alg_idx()to reserve RSS algorithm index, it would internally use set_flowkey_fields() to generate fields based on the flow key dynamically. On AF driver init, it would reserve a predefined set RSS algo indexes, which will be available all the time for all the AF driver consumers. The leftover algo indexes can be reserved at runtime through exiting nix_rss_flowkey_cfg mailbox message. The NIX_FLOW_KEY_TYPE_PORT is removed from predefined a set of RSS flow type as it is not used by any consumer. Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit b648366c2c256645a4cd1da6efd7b91e7c253ecb Author: Jerin Jacob Date: Sun Dec 2 18:17:38 2018 +0530 octeontx2-af: Add support for dynamic flow cfg to RSS field generation Introduce state-based algorithm to convert the flow_key value to RSS algo field used by NIX_AF_RX_FLOW_KEY_ALGX_FIELDX register. The outer `for loop` goes over _all_ protocol field and the following variables depict the state machine forward progress logic. a) keyoff_marker - Enabled when hash byte length needs to be accounted in field->key_offset update. b) field_marker - Enabled when a new field needs to be selected. c) group_member - Enabled when a protocol is part of a group. This would remove the existing hard coding and enable to add new protocol support seamlessly. Signed-off-by: Jerin Jacob Signed-off-by: Nithin Dabilpuram Signed-off-by: David S. Miller commit bd522d68704deda0f10e02ded55935469485f77a Author: Jerin Jacob Date: Sun Dec 2 18:17:37 2018 +0530 octeontx2-af: Add response for RSS flow key cfg message Added response for nix_rss_flowkey_cfg message to return selected RSS algorithm index. The FLOW_KEY_TYPE* definition is part of the mbox message and it will be used by the other consumers of AF driver hence moving to mbox.h. Also renamed FLOW_* definitions to NIX_FLOW_* to avoid global name space collisions, as we have various coming from include/uapi/linux/pkt_cls.h for example. Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit c5e4e4d1060b9b6937db54829c66f5f2429ad2fc Author: Sunil Goutham Date: Sun Dec 2 18:17:36 2018 +0530 octeontx2-af: Skip NIXLF check for bcast MCE entry At the time of initial broadcast packet replication table init, NIXLFs are not yet attached to PF_FUNCs. Hence skipped checking NIXLF while submitting MCE entry init instruction to NIX admin queue. Also did a minor cleanup while installing bcast match entry in packet parser unit i.e NPC. Signed-off-by: Sunil Goutham Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 8c2def893afc60d88160d524acf345765cf0c447 Author: Omar Sandoval Date: Mon Dec 3 14:45:43 2018 -0800 sbitmap: fix sbitmap_for_each_set() We need to ignore bits in the cleared mask when iterating over all set bits. Fixes: ea86ea2cdced ("sbitmap: ammortize cost of clearing bits") Reported-by: Jens Axboe@kernel.dk> Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit 6e360f7331132822f096399a54f40bc61887aa3c Merge: ce01a56ba3d9a db63e489c7aa0 Author: David S. Miller Date: Mon Dec 3 15:58:33 2018 -0800 Merge branch 'udp-msg_zerocopy' Willem de Bruijn says: ==================== udp msg_zerocopy Enable MSG_ZEROCOPY for udp sockets Patch 1/3 is the main patch, a rework of RFC patch http://patchwork.ozlabs.org/patch/899630/ more details in the patch commit message Patch 2/3 is an optimization to remove a branch from the UDP hot path and refcount_inc/refcount_dec_and_test pair when zerocopy is used. This used to be included in the first patch in v2. Patch 3/3 runs the already existing udp zerocopy tests as part of kselftest See also recent Linux Plumbers presentation https://linuxplumbersconf.org/event/2/contributions/106/attachments/104/128/willemdebruijn-lpc2018-udpgso-presentation-20181113.pdf Changes: v1 -> v2 - Fixup reverse christmas tree violation v2 -> v3 - Split refcount avoidance optimization into separate patch - Fix refcount leak on error in fragmented case (thanks to Paolo Abeni for pointing this one out!) - Fix refcount inc on zero v3 -> v4 - Move skb_zcopy_set below the only kfree_skb that might cause a premature uarg destroy before skb_zerocopy_put_abort - Move the entire skb_shinfo assignment block, to keep that cacheline access in one place ==================== Signed-off-by: David S. Miller commit db63e489c7aa03bab86960d6bcb6bf1fad8eea4e Author: Willem de Bruijn Date: Fri Nov 30 15:32:41 2018 -0500 selftests: extend zerocopy tests to udp Both msg_zerocopy and udpgso_bench have udp zerocopy variants. Exercise these as part of the standard kselftest run. With udp, msg_zerocopy has no control channel. Ensure that the receiver exits after the sender by accounting for the initial delay in starting them (in msg_zerocopy.sh). Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 52900d22288e7d45846037e1db277c665bbc40db Author: Willem de Bruijn Date: Fri Nov 30 15:32:40 2018 -0500 udp: elide zerocopy operation in hot path With MSG_ZEROCOPY, each skb holds a reference to a struct ubuf_info. Release of its last reference triggers a completion notification. The TCP stack in tcp_sendmsg_locked holds an extra ref independent of the skbs, because it can build, send and free skbs within its loop, possibly reaching refcount zero and freeing the ubuf_info too soon. The UDP stack currently also takes this extra ref, but does not need it as all skbs are sent after return from __ip(6)_append_data. Avoid the extra refcount_inc and refcount_dec_and_test, and generally the sock_zerocopy_put in the common path, by passing the initial reference to the first skb. This approach is taken instead of initializing the refcount to 0, as that would generate error "refcount_t: increment on 0" on the next skb_zcopy_set. Changes v3 -> v4 - Move skb_zcopy_set below the only kfree_skb that might cause a premature uarg destroy before skb_zerocopy_put_abort - Move the entire skb_shinfo assignment block, to keep that cacheline access in one place Signed-off-by: Willem de Bruijn Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit b5947e5d1e710c35ea281247bd27e6975250285c Author: Willem de Bruijn Date: Fri Nov 30 15:32:39 2018 -0500 udp: msg_zerocopy Extend zerocopy to udp sockets. Allow setting sockopt SO_ZEROCOPY and interpret flag MSG_ZEROCOPY. This patch was previously part of the zerocopy RFC patchsets. Zerocopy is not effective at small MTU. With segmentation offload building larger datagrams, the benefit of page flipping outweights the cost of generating a completion notification. tools/testing/selftests/net/msg_zerocopy.sh after applying follow-on test patch and making skb_orphan_frags_rx same as skb_orphan_frags: ipv4 udp -t 1 tx=191312 (11938 MB) txc=0 zc=n rx=191312 (11938 MB) ipv4 udp -z -t 1 tx=304507 (19002 MB) txc=304507 zc=y rx=304507 (19002 MB) ok ipv6 udp -t 1 tx=174485 (10888 MB) txc=0 zc=n rx=174485 (10888 MB) ipv6 udp -z -t 1 tx=294801 (18396 MB) txc=294801 zc=y rx=294801 (18396 MB) ok Changes v1 -> v2 - Fixup reverse christmas tree violation v2 -> v3 - Split refcount avoidance optimization into separate patch - Fix refcount leak on error in fragmented case (thanks to Paolo Abeni for pointing this one out!) - Fix refcount inc on zero - Test sock_flag SOCK_ZEROCOPY directly in __ip_append_data. This is needed since commit 5cf4a8532c99 ("tcp: really ignore MSG_ZEROCOPY if no SO_ZEROCOPY") did the same for tcp. Signed-off-by: Willem de Bruijn Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit ce01a56ba3d9a56e9c7dd4662e2753b102a17d62 Merge: 37a0bc39d726a b72c51a58e6d6 Author: David S. Miller Date: Mon Dec 3 15:44:27 2018 -0800 Merge tag 'wireless-drivers-next-for-davem-2018-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.21 First set of patches for 4.21. Most notable here is support for Quantenna's QSR1000/QSR2000 chipsets and more flexible ways to provide nvram files for brcmfmac. Major changes: brcmfmac * add support for first trying to get a board specific nvram file * add support for getting nvram contents from EFI variables qtnfmac * use single PCIe driver for all platforms and rename Kconfig option CONFIG_QTNFMAC_PEARL_PCIE to CONFIG_QTNFMAC_PCIE * add support for QSR1000/QSR2000 (Topaz) family of chipsets ath10k * add support for WCN3990 firmware crash recovery * add firmware memory dump support for QCA4019 wil6210 * add firmware error recovery while in AP mode ath9k * remove experimental notice from dynack feature iwlwifi * PCI IDs for some new 9000-series cards * improve antenna usage on connection problems * new firmware debugging infrastructure * some more work on 802.11ax * improve support for multiple RF modules with 22000 devices cordic * move cordic macros and defines to a public header file * convert brcmsmac and b43 to fully use cordic library ==================== Signed-off-by: David S. Miller commit e1e5254427525d59a184771b122469c998e53b58 Author: Nick Kossifidis Date: Sat Nov 10 02:53:17 2018 +0200 OF: Add a warning in case chosen node is not present On architectures that only get their bootargs through devicetree's chosen node (such as RISC-V), that node is mandatory. After a discussion with Rob [1] I'm adding a warning in case chosen node is not present, to let users know about it. [1]: https://patchwork.ozlabs.org/patch/984224/#2016136 Signed-off-by: Nick Kossifidis Reviewed-by: Palmer Dabbelt Signed-off-by: Rob Herring commit 37a0bc39d726a15073cca64887f01e3a12b24a18 Merge: 82208d0d54ab8 18dbfc81de708 Author: David S. Miller Date: Mon Dec 3 15:40:30 2018 -0800 Merge branch 'davinci_emac-read-the-MAC-address-from-nvmem' Bartosz Golaszewski says: ==================== davinci_emac: read the MAC address from nvmem This series is part of a bigger series that aims at removing the platform data structure from the at24 EEPROM driver[1]. We provide a generalized version of of_get_nvmem_mac_address(), switch the only user of the of_ variant to using it, remove the previous implementation and use the new routine in the davinci_emac driver. [1] https://lkml.org/lkml/2018/11/13/884 ==================== Signed-off-by: David S. Miller commit 18dbfc81de708409ed82e95b418ef7092e91c2fb Author: Bartosz Golaszewski Date: Fri Nov 30 09:21:00 2018 +0100 net: davinci_emac: use nvmem_get_mac_address() All DaVinci boards still supported in board files now define nvmem cells containing the MAC address. We want to stop using the setup callback from at24 so the MAC address for those users will no longer be provided over platform data. If we didn't get a valid MAC in pdata, try nvmem before resorting to a random MAC. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit afa64a72b862a7a9d04f8d07fba632eaf06b23f8 Author: Bartosz Golaszewski Date: Fri Nov 30 09:20:59 2018 +0100 of: net: kill of_get_nvmem_mac_address() We've switched all users to nvmem_get_mac_address(). Remove the now dead code. Signed-off-by: Bartosz Golaszewski Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit cce41b8ffa4b3978dfbcbf3fd2e7397253346245 Author: Bartosz Golaszewski Date: Fri Nov 30 09:20:58 2018 +0100 net: cadence: switch to using nvmem_get_mac_address() We now have a generalized helper routine to read the MAC address from nvmem which takes struct device as argument. The nvmem subsystem will then try device tree first before all other potential providers. Signed-off-by: Bartosz Golaszewski Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 0e839df92cf37be4adef7e661813206cd2b32d66 Author: Bartosz Golaszewski Date: Fri Nov 30 09:20:57 2018 +0100 net: ethernet: provide nvmem_get_mac_address() We already have of_get_nvmem_mac_address() but some non-DT systems want to read the MAC address from NVMEM too. Implement a generalized routine that takes struct device as argument. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 82208d0d54ab85d8fedbb1c9a1960bd401a4ca1a Author: NeilBrown Date: Fri Nov 30 10:26:50 2018 +1100 rhashtable: detect when object movement between tables might have invalidated a lookup Some users of rhashtables might need to move an object from one table to another - this appears to be the reason for the incomplete usage of NULLS markers. To support these, we store a unique NULLS_MARKER at the end of each chain, and when a search fails to find a match, we check if the NULLS marker found was the expected one. If not, the search may not have examined all objects in the target bucket, so it is repeated. The unique NULLS_MARKER is derived from the address of the head of the chain. As this cannot be derived at load-time the static rhnull in rht_bucket_nested() needs to be initialised at run time. Any caller of a lookup function must still be prepared for the possibility that the object returned is in a different table - it might have been there for some time. Note that this does NOT provide support for other uses of NULLS_MARKERs such as allocating with SLAB_TYPESAFE_BY_RCU or changing the key of an object and re-inserting it in the same table. These could only be done safely if new objects were inserted at the *start* of a hash chain, and that is not currently the case. Signed-off-by: NeilBrown Acked-by: Herbert Xu Signed-off-by: David S. Miller commit 77ac327c54692306e71063131cd4721769badc65 Merge: d1420bb995159 ea4750caa0567 Author: David S. Miller Date: Mon Dec 3 15:26:34 2018 -0800 Merge branch 'hns3-ethtool-dump' Salil Mehta says: ==================== Adds VF/PF PCIe reg dump(ethtool -d) support to HNS3 driver This patchset adds VF/PF PCIe register dump support to HNS3 VF and PF driver using "ethtool -d" command. ==================== Signed-off-by: David S. Miller commit ea4750caa0567879ec622a0999eb58479989ad2f Author: Jian Shen Date: Thu Nov 29 16:40:59 2018 +0000 net: hns3: Adds support to dump(using ethool-d) PCIe regs in HNS3 PF driver This patch adds support to dump PF PCIe registers using ethtool -d for HNS3 PF Driver. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 1600c3e5f23e39c0ecdad237838e6366713656b7 Author: Jian Shen Date: Thu Nov 29 16:40:58 2018 +0000 net: hns3: Support "ethtool -d" for HNS3 VF driver This patch adds "ethtool -d" support for HNS3 VF Driver. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d1420bb9951592c6de4148de7441bfa93ce4eed5 Author: Heiner Kallweit Date: Tue Nov 27 22:30:14 2018 +0100 net: phy: improve generic EEE ethtool functions So far the two functions consider neither member eee_enabled nor eee_active. Therefore network drivers have to do this in some kind of glue code. I think this can be avoided. Getting EEE parameters: When not advertising any EEE mode, we can't consider EEE to be enabled. Therefore interpret "EEE enabled" as "we advertise at least one EEE mode". It's similar with "EEE active": interpret it as "EEE modes advertised by both link partner have at least one mode in common". Setting EEE parameters: If eee_enabled isn't set, don't advertise any EEE mode and restart aneg if needed to switch off EEE. If eee_enabled is set and data->advertised is empty (e.g. because EEE was disabled), advertise everything we support as default. This way EEE can easily switched on/off by doing ethtool --set-eee eee on/off, w/o any additional parameters. The changes to both functions shouldn't break any existing user. Once the changes have been applied, at least some users can be simplified. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit d59dd69d5576d699d7d3f5da0b4738c3a36d0133 Author: Daniel T. Lee Date: Mon Dec 3 19:39:30 2018 +0900 samples: bpf: fix: seg fault with NULL pointer arg When NULL pointer accidentally passed to write_kprobe_events, due to strlen(NULL), segmentation fault happens. Changed code returns -1 to deal with this situation. Bug issued with Smatch, static analysis. Signed-off-by: Daniel T. Lee Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit d53db442db36fdba1a6584bd5cf49124ba17d6e9 Author: José Roberto de Souza Date: Fri Nov 30 15:20:48 2018 -0800 drm/i915: Move display device info capabilities to its own struct This helps separate what capabilities are display capabilities. v3: Moving display struct right after flags (Lucas) Cc: Jani Nikula Suggested-by: Jani Nikula Suggested-by: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181130232048.14216-2-jose.souza@intel.com commit e1bf094b3c7514934168dcb69f18b65aacb5a953 Author: José Roberto de Souza Date: Fri Nov 30 15:20:47 2018 -0800 drm/i915: Add HAS_DISPLAY() and use it Right now it is decided if GEN has display by checking the num_pipes, so lets make it explicit and use a macro. Cc: Jani Nikula Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181130232048.14216-1-jose.souza@intel.com commit 2a70a4cda0dadb7412bc04a0611cfc129d2804cb Author: Benson Leung Date: Mon Dec 3 14:48:23 2018 -0800 MAINTAINERS: platform/chrome: Add Enric as a maintainer Enric has volunteered to help me with maintaining chrome-platform as we change the development model toward strictly upstream-first for any chrome-platform and cros_ec driver. Signed-off-by: Benson Leung Signed-off-by: Enric Balletbo i Serra commit 0b216f7cc6ddd3ac667a54cfbeb40b5ef087b8fe Author: Olof Johansson Date: Mon Nov 26 11:42:59 2018 -0800 MAINTAINERS: platform/chrome: remove myself as maintainer Benson has been maintaining this together with the rest of the kernel team for a while now, so remove myself from the entry. Signed-off-by: Olof Johansson Signed-off-by: Benson Leung commit 79dfab43a976b76713c40222987c48e32510ebc1 Merge: e3dd7627721fc 03f1c26b1c569 Author: David S. Miller Date: Mon Dec 3 14:16:14 2018 -0800 Merge branch 'VXLAN-underlay-VRF' Alexis Bauvin says: ==================== net: Add VRF support for VXLAN underlay v6 -> v7: - proper locking for device in udp_tunnel following Sabrina Dubroca's advice v5 -> v6: - remove automatic rebinding patch following Roopa Prabhu's advice v4 -> v5: - move test script to its own patch (6/6) - add schematic for test script - apply David Ahern comments to the test script v3 -> v4: - rename vxlan_is_in_l3mdev_chain to netdev_is_upper master - move it to net/core/dev.c - make it return bool instead of int - check if remote_ifindex is zero before resolving the l3mdev - add testing script v2 -> v3: - fix build when CONFIG_NET_IPV6 is off - fix build "unused l3mdev_master_upper_ifindex_by_index" build error with some configs v1 -> v2: - move vxlan_get_l3mdev from vxlan driver to l3mdev driver as l3mdev_master_upper_ifindex_by_index - vxlan: rename variables named l3mdev_ifindex to ifindex v0 -> v1: - fix typos We are trying to isolate the VXLAN traffic from different VMs with VRF as shown in the schemas below: +-------------------------+ +----------------------------+ | +----------+ | | +------------+ | | | | | | | | | | | tap-red | | | | tap-blue | | | | | | | | | | | +----+-----+ | | +-----+------+ | | | | | | | | | | | | | | +----+---+ | | +----+----+ | | | | | | | | | | | br-red | | | | br-blue | | | | | | | | | | | +----+---+ | | +----+----+ | | | | | | | | | | | | | | | | | | | | +----+--------+ | | +--------------+ | | | | | | | | | | | vxlan-red | | | | vxlan-blue | | | | | | | | | | | +------+------+ | | +-------+------+ | | | | | | | | | VRF | | | VRF | | | red | | | blue | +-------------------------+ +----------------------------+ | | | | +---------------------------------------------------------+ | | | | | | | | | | +--------------+ | | | | | | | | | +---------+ eth0.2030 +---------+ | | | 10.0.0.1/24 | | | +-----+--------+ VRF | | | green| +---------------------------------------------------------+ | | +----+---+ | | | eth0 | | | +--------+ iproute2 commands to reproduce the setup: ip link add green type vrf table 1 ip link set green up ip link add eth0.2030 link eth0 type vlan id 2030 ip link set eth0.2030 master green ip addr add 10.0.0.1/24 dev eth0.2030 ip link set eth0.2030 up ip link add blue type vrf table 2 ip link set blue up ip link add br-blue type bridge ip link set br-blue master blue ip link set br-blue up ip link add vxlan-blue type vxlan id 2 local 10.0.0.1 dev eth0.2030 \ port 4789 ip link set vxlan-blue master br-blue ip link set vxlan-blue up ip link set tap-blue master br-blue ip link set tap-blue up ip link add red type vrf table 3 ip link set red up ip link add br-red type bridge ip link set br-red master red ip link set br-red up ip link add vxlan-red type vxlan id 3 local 10.0.0.1 dev eth0.2030 \ port 4789 ip link set vxlan-red master br-red ip link set vxlan-red up ip link set tap-red master br-red ip link set tap-red up We faced some issue in the datapath, here are the details: * Egress traffic: The vxlan packets are sent directly to the default VRF because it's where the socket is bound, therefore the traffic has a default route via eth0. the workaround is to force this traffic to VRF green with ip rules. * Ingress traffic: When receiving the traffic on eth0.2030 the vxlan socket is unreachable from VRF green. The workaround is to enable *udp_l3mdev_accept* sysctl, but this breaks isolation between overlay and underlay: packets sent from blue or red by e.g. a guest VM will be accepted by the socket, allowing injection of VXLAN packets from the overlay. This patch series fixes the issues describe above by allowing VXLAN socket to be bound to a specific VRF device therefore looking up in the correct table. ==================== Signed-off-by: David S. Miller commit 03f1c26b1c56936fa29675b5556c3bb08185585a Author: Alexis Bauvin Date: Mon Dec 3 10:54:41 2018 +0100 test/net: Add script for VXLAN underlay in a VRF This script tests the support of a VXLAN underlay in a non-default VRF. It does so by simulating two hypervisors and two VMs, an extended L2 between the VMs with the hypervisors as VTEPs with the underlay in a VRF, and finally by pinging the two VMs. It also tests that moving the underlay from a VRF to another works when down/up the VXLAN interface. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche Signed-off-by: David S. Miller commit e0531312e78f06c43e0526209b3de530abc564b4 Author: Todor Tomov Date: Mon Nov 19 11:25:37 2018 +0200 arm64: dts: qcom: msm8996: Add CAMSS support Add a node for the Camera Subsystem present on the Qualcomm MSM8996 SoC. Signed-off-by: Todor Tomov Signed-off-by: Andy Gross commit f3442ab972573b42d765491450c0394254deded7 Author: Todor Tomov Date: Mon Nov 19 11:25:36 2018 +0200 arm64: dts: qcom: msm8996: Add VFE SMMU node Add VFE SMMU node. Signed-off-by: Todor Tomov Reviewed-by: Vivek Gautam Signed-off-by: Andy Gross commit aab8cc3630e325065a70740438dc0a47035fcdc8 Author: Alexis Bauvin Date: Mon Dec 3 10:54:40 2018 +0100 vxlan: add support for underlay in non-default VRF Creating a VXLAN device with is underlay in the non-default VRF makes egress route lookup fail or incorrect since it will resolve in the default VRF, and ingress fail because the socket listens in the default VRF. This patch binds the underlying UDP tunnel socket to the l3mdev of the lower device of the VXLAN device. This will listen in the proper VRF and output traffic from said l3mdev, matching l3mdev routing rules and looking up the correct routing table. When the VXLAN device does not have a lower device, or the lower device is in the default VRF, the socket will not be bound to any interface, keeping the previous behaviour. The underlay l3mdev is deduced from the VXLAN lower device (IFLA_VXLAN_LINK). +----------+ +---------+ | | | | | vrf-blue | | vrf-red | | | | | +----+-----+ +----+----+ | | | | +----+-----+ +----+----+ | | | | | br-blue | | br-red | | | | | +----+-----+ +---+-+---+ | | | | +-----+ +-----+ | | | +----+-----+ +------+----+ +----+----+ | | lower device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | | | | | | +----------+ +-----------+ +---------+ Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche Signed-off-by: David S. Miller commit 6a6d6681ac1add9655b7ab5dd0b46b54aeb1b44f Author: Alexis Bauvin Date: Mon Dec 3 10:54:39 2018 +0100 l3mdev: add function to retreive upper master Existing functions to retreive the l3mdev of a device did not walk the master chain to find the upper master. This patch adds a function to find the l3mdev, even indirect through e.g. a bridge: +----------+ | | | vrf-blue | | | +----+-----+ | | +----+-----+ | | | br-blue | | | +----+-----+ | | +----+-----+ | | | eth0 | | | +----------+ This will properly resolve the l3mdev of eth0 to vrf-blue. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche Signed-off-by: David S. Miller commit da5095d052860baa7fe2932fb1209628dd3e3813 Author: Alexis Bauvin Date: Mon Dec 3 10:54:38 2018 +0100 udp_tunnel: add config option to bind to a device UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche Signed-off-by: David S. Miller commit acd48330e96fa2aa9ae4caecdee49d180a818f0f Author: Todor Tomov Date: Tue Nov 13 11:19:13 2018 +0200 arm64: dts: qcom: Add pinctrls for camera sensors Add pinctrls required for camera sensors: - power down signal; - reset signal; - camera external clock. Signed-off-by: Todor Tomov Signed-off-by: Andy Gross commit 1ab0fb75812628ada8001f76ba650277cd0534f3 Author: Todor Tomov Date: Tue Nov 13 11:19:12 2018 +0200 arm64: dts: qcom: Add Camera Control Interface pinctrls Add pinctrls required for Camera Control Interface. Signed-off-by: Todor Tomov Signed-off-by: Andy Gross commit 58f479f90a7ca8675b5e3f60d8a9ea672484efc3 Author: Todor Tomov Date: Fri Oct 26 18:37:16 2018 +0300 arm64: dts: qcom: msm8916: Add CAMSS support Add a node for the Camera Subsystem present on the Qualcomm MSM8916 SoC. Signed-off-by: Todor Tomov Signed-off-by: Andy Gross commit e7b6e5ccae5c7713eb63671914678e991d888130 Author: Todor Tomov Date: Fri Oct 26 18:37:15 2018 +0300 arm64: dts: qcom: msm8916: Add IOMMU sub-node for VFE context bank Add IOMMU sub-node for VFE secure context bank. Signed-off-by: Todor Tomov Signed-off-by: Andy Gross commit 40d9d791c97a9be2fa5b0a21b139c70980725e86 Author: Viresh Kumar Date: Fri Nov 16 15:34:30 2018 +0530 arm64: dts: msm8916: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Andy Gross commit fe1f452640d888c4311ef35c8ee497f47c3ea17c Author: Jens Axboe Date: Wed Nov 28 10:50:07 2018 -0700 blk-mq: don't call ktime_get_ns() if we don't need it We only need the request fields and the end_io time if we have stats enabled, or if we have a scheduler attached as those may use it for completion time stats. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit e3dd7627721fce191fd696d8654aa55cc20c1d6f Merge: 6915bf3b002bb 064501c5b6fd3 Author: David S. Miller Date: Mon Dec 3 13:55:44 2018 -0800 Merge branch 'mlxsw-fw_load_policy' Ido Schimmel says: ==================== mlxsw: Add 'fw_load_policy' devlink parameter Shalom says: Currently, drivers do not have the ability to control the firmware loading policy and they always use their own fixed policy. This prevents drivers from running the device with a different firmware version for testing and/or debugging purposes. For example, testing a firmware bug fix. For these situations, the new devlink generic parameter, 'fw_load_policy', gives the ability to control this option and allows drivers to run with a different firmware version than required by the driver. Patch #1 adds the new parameter to devlink. The other two patches, #2 and #3, add support for this parameter in the mlxsw driver. Example: # Query the devlink parameters supported by the device $ devlink dev param show pci/0000:03:00.0: name fw_load_policy type generic values: cmode driverinit value driver # Flash new firmware using ethtool $ ethtool -f swp1 mellanox/mlxsw_spectrum-13.1703.4.mfa2 # Toggle parameter $ devlink dev param set pci/0000:03:00.0 name fw_load_policy value flash cmode driverinit # devlink reset $ devlink dev reload pci/0000:03:00.0 # Query firmware version to show changes took affect $ ethtool -i swp1 driver: mlxsw_spectrum version: 1.0 firmware-version: 13.1703.4 expansion-rom-version: bus-info: 0000:03:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: no supports-priv-flags: no iproute2 patches available here: https://github.com/tshalom/iproute2-next v2: * Change 'fw_version_check' to 'fw_load_policy' with values 'driver' and 'flash' (Jakub) ==================== Signed-off-by: David S. Miller commit 064501c5b6fd344cc2770194f23d620c65f2bd2c Author: Shalom Toledo Date: Mon Dec 3 07:59:02 2018 +0000 mlxsw: spectrum: Load firmware version based on devlink parameter Load firmware version based on 'fw_load_policy' devlink parameter. The driver supports these two options: * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER (0) Default, load firmware version preferred by the driver * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH (1) Load firmware currently stored in flash The second option, 'flash', allow the device to run with different firmware version than preferred by the driver for testing and/or debugging purposes. For example, testing a firmware bug fix. Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 03bffcad491fa824eba21b68e4ed710f9eca49d8 Author: Shalom Toledo Date: Mon Dec 3 07:59:01 2018 +0000 mlxsw: core: Reset firmware after flash during driver initialization After flashing new firmware during the driver initialization flow (reload or not), the driver should do a firmware reset when it gets -EAGAIN in order to load the new one. Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 846e980a87fc30075517d6d979548294d5461bdb Author: Shalom Toledo Date: Mon Dec 3 07:58:59 2018 +0000 devlink: Add 'fw_load_policy' generic parameter Many drivers load the device's firmware image during the initialization flow either from the flash or from the disk. Currently this option is not controlled by the user and the driver decides from where to load the firmware image. 'fw_load_policy' gives the ability to control this option which allows the user to choose between different loading policies supported by the driver. This parameter can be useful while testing and/or debugging the device. For example, testing a firmware bug fix. Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8913e8a73d03470b7aeaeab9c4f4fd3b50a0e2ec Author: Stephen Boyd Date: Mon Dec 3 13:52:56 2018 -0800 clk: meson: Mark some things static These are missing 'static' so sparse complains: drivers/clk/meson/vid-pll-div.c:58:26: warning: symbol '_get_table_val' was not declared. Should it be static? drivers/clk/meson/gxbb.c:1585:12: warning: symbol 'gxbb_vid_pll_parent_names' was not declared. Should it be static? drivers/clk/meson/gxbb.c:1620:12: warning: symbol 'gxbb_vclk_parent_names' was not declared. Should it be static? drivers/clk/meson/gxbb.c:1980:12: warning: symbol 'gxbb_cts_parent_names' was not declared. Should it be static? drivers/clk/meson/gxbb.c:2036:12: warning: symbol 'gxbb_cts_hdmi_tx_parent_names' was not declared. Should it be static? Signed-off-by: Stephen Boyd commit ad8044f87c0b53ee45f5d367584eefb222a06883 Author: Daniel Mack Date: Fri Nov 30 18:55:43 2018 +0100 ARM: dts: pxa3xx: Add Raumfeld DTS files This patch adds a set of DTS files that support all PXA3xx based Raumfeld audio hardware devices. Common nodes are factored out into 'common' and 'tuneable-clock' include files to keep the top-level DTS files smaller. Signed-off-by: Daniel Mack [Robert: Reordered Makefile in alphabetical order] Signed-off-by: Robert Jarzmik commit 6915bf3b002bba76cbbb928a983795fdd93af49b Author: Heiner Kallweit Date: Mon Dec 3 08:04:57 2018 +0100 net: phy: don't allow __set_phy_supported to add unsupported modes Currently __set_phy_supported allows to add modes w/o checking whether the PHY supports them. This is wrong, it should never add modes but only remove modes we don't want to support. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 69095e3900b22bc289ade04ac548ae6b9e8f45ec Author: Mathieu Malaterre Date: Mon Dec 3 22:23:43 2018 +0100 mips: annotate implicit fall throughs There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up. This patch produces no change in behaviour, but should be reviewed in case these are actually bugs not intentional fallthoughs. Signed-off-by: Mathieu Malaterre Signed-off-by: Paul Burton Cc: Kees Cook Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit c2a70a319afb9e3dee16567cec4d9bf8dd358b59 Author: Robert Jarzmik Date: Sun Jun 17 19:02:15 2018 +0200 dmaengine: pxa: make the filter function internal As the pxa architecture and all its related drivers do not rely anymore on the filter function, thanks to the slave map conversion, make pxad_filter_fn() static, and remove it from the global namespace. Signed-off-by: Robert Jarzmik Acked-by: Vinod Koul commit 3595c559326d0b660bb088a88e22e0ca630a0e35 Author: David Teigland Date: Mon Dec 3 15:27:37 2018 -0600 dlm: fix invalid cluster name warning The warning added in commit 3b0e761ba83 "dlm: print log message when cluster name is not set" did not account for the fact that lockspaces created from userland do not supply a cluster name, so bogus warnings are printed every time a userland lockspace is created. Signed-off-by: David Teigland commit 202f9977b012d844d08e6d01d12bad891e95b3ae Merge: e5734bebed406 b601f73130a37 Author: Olof Johansson Date: Mon Dec 3 13:10:10 2018 -0800 Merge tag 'qcom-drivers-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Qualcomm ARM Based Driver Updates for v4.21 * Fix llcc license, includes, and error checks * Remove use of memcpy in cmd-db and fix API breakage * Add QCS404 compatible to SMD-RPM * Minor fixes for QMI * Add irq clear handling in QCOM Geni SE during init * tag 'qcom-drivers-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: drm: msm: Check cmd_db_read_aux_data() for failure soc: qcom: smd-rpm: Add QCS404 compatible soc: qcom: llcc-slice: Remove duplicated include from llcc-slice.c soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data() soc: qcom: cmd-db: Remove memcpy()ing from cmd_db_get_header() soc: qcom: Drop help text for QCOM_QMI_HELPERS soc: qcom: qmi_interface: Limit txn ids to U16_MAX soc: qcom: llcc-slice: Add error checks for API functions soc: qcom/llcc: add MODULE_LICENSE tag soc: qcom: Add irq clear handling during SE init Signed-off-by: Olof Johansson commit ac21e9af5a5cc7fe4c843ddf5bfefc9f71aa049b Merge: 3773b5c94e8a3 12e0888de8d3b Author: Olof Johansson Date: Mon Dec 3 13:09:38 2018 -0800 Merge tag 'arm-soc/for-4.21/soc' of https://github.com/Broadcom/stblinux into next/soc This pull request contains Broadcom ARM-based SoCs machine files updates for 4.21, please pull the following: - Stefan switches relevant BCM283x files under arch/arm/mach-bcm to the SPDX license identifiers - Justin adds an entry in the Broadcom STB debug LL stub for 7255 - Florian enables reset controller support for BCM63xx SoCs * tag 'arm-soc/for-4.21/soc' of https://github.com/Broadcom/stblinux: ARM: mach-bcm: Switch bcm2835 and platsmp to SPDX identifier ARM: BCM63XX: Enable reset controller support ARM: brcmstb: Add entry for 7255 Signed-off-by: Olof Johansson commit e5734bebed406cc35875044b6af9bd67c6160680 Merge: 0277a623dd786 1861a7f07e022 Author: Olof Johansson Date: Mon Dec 3 13:06:27 2018 -0800 Merge tag 'arm-soc/for-4.21/drivers' of https://github.com/Broadcom/stblinux into next/drivers This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes for 4.21, please pull the following changes: - James fixes the firmware interface after a commit changed the use of VLA and broke large transfers - Stefan adds a timeout check for Raspberry Pi firmware transactions and updates a bunch of SoC/firmware files to use SPDX tags - Wolfram switches the GISB bus arbiter to use dev_get_drvdata() - Yangtao provides a fix for a reference leak due to a call to of_find_node_by_path() - Florian fixes the CPU re-entry point out of S3 suspend with kernels built in Thumb2 mode * tag 'arm-soc/for-4.21/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: Don't leak device tree node reference firmware: raspberrypi: Switch to SPDX identifier firmware: raspberrypi: Fix firmware calls with large buffers soc: bcm: Switch raspberrypi-power to SPDX identifier firmware: raspberrypi: Define timeout for transactions bus: brcmstb_gisb: simplify getting .driver_data soc: bcm: brcmstb: Fix re-entry point with a THUMB2_KERNEL Signed-off-by: Olof Johansson commit 332da8486b58ebe5c1901b445e01ca45c20b6c72 Merge: acfbaa5d3bd6e 972910948fb6f Author: Olof Johansson Date: Mon Dec 3 13:04:49 2018 -0800 Merge tag 'qcom-dts-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm Device Tree Changes for v4.21 * Add entry for Qualcomm TSENS thermal drivers * Update msm8974 thermal entries * Fix msm8974 Hammerhead magnetometer gpios * Add SoC specific compatibles for SDHC nodes * Remove Arrow SD600 eval board * tag 'qcom-dts-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: qcom: Remove Arrow SD600 eval board ARM: dts: qcom: Add SoC-specific string for sdhci-msm-v4 nodes ARM: dts: qcom: msm8974-hammerhead: correct gpios property on magnetometer ARM: dts: msm8974: thermal: Add "qcom,sensors" property ARM: dts: msm8974: thermal: split address space into two MAINTAINERS: Add entry for Qualcomm TSENS thermal drivers Signed-off-by: Olof Johansson commit acfbaa5d3bd6e8f7d3b40f2f6e87399037c78333 Merge: f491ac32c6180 70827d9f6bc4f Author: Olof Johansson Date: Mon Dec 3 13:04:14 2018 -0800 Merge tag 'qcom-arm64-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm ARM64 Updates for v4.21 * Add QCS404 base platform and nodes * Add QCS404 EVB boards * Add external SD and dependencies for MSM8998-mtp * Add default scm compatible for MSM8998 * Fix XO clk name on MSM8998 * Add prng-ee nodes for SDM845 and MSM8996 * Add ADC die temp node for pm8998 * Fix documentation on QCOM ADC sample * tag 'qcom-arm64-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (34 commits) arm64: dts: qcom: msm8998: Fix compatible of scm node arm64: dts: qcom: msm8998: Add SDC2 control pins arm64: dts: qcom: msm8998-mtp: Add external SD arm64: dts: qcom: msm8998: Add SDCC2 arm64: dts: qcom: msm8998: correct xo clock name arm64: dts: qcom: pms405: Add pon and pwrkey nodes arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2 arm64: dts: qcom: qcs404: Add BAM DMA node arm64: dts: qcom: qcs404: add prng-ee node arm64: dts: qcom: qcs404: Add remoteproc nodes arm64: dts: qcom: qcs404: Add scm firmware node arm64: dts: qcom: pms405: add gpios arm64: dts: qcom: pms405: add rtc node arm64: dts: qcom: qcs404: add spmi node arm64: dts: qcom: pms405: add spmi node arm64: dts: qcom: qcs404: Add sdcc1 node arm64: dts: qcom: qcs404: Add TLMM pinctrl node arm64: dts: qcom: qcs404: add smp2p nodes arm64: dts: qcom: qcs404: Add PMS405 RPM regulators arm64: dts: qcom: qcs404: Add RPM GLINK related nodes ... Signed-off-by: Olof Johansson commit d4907292ab19ebb86778502fe89045c6f4541935 Merge: ef098b9eee487 b0bd6f1c03b46 Author: Olof Johansson Date: Mon Dec 3 12:59:31 2018 -0800 Merge tag 'qcom-arm64-defconfig-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM64 Based defconfig Updates for v4.21 * Enable Qualcomm QCS404 platform options * Enable Qualcomm MSM8998 clock and pinctrl * Enable Qualcomm SDM845 options * Add remoteproc related configs * tag 'qcom-arm64-defconfig-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: Enable GCC and PINCTRL for MSM8998 arm64: defconfig: Enable core Qualcomm SDM845 options arm64: defconfig: Enable some qcom remoteproc configs arm64: defconfig: Enable QCS404 configs Signed-off-by: Olof Johansson commit ef098b9eee487e6b9730660e8e3f93c1373dc761 Author: Fabrice Gasnier Date: Mon Dec 3 12:22:01 2018 +0100 ARM: multi_v7_defconfig: enable STM32 analog & timer drivers This enables drivers for STM32 timer, low power timer and analog hardware that can be used on STM32MP1 SoC: - Timer & LP Timer MFD core, PWM, trigger & encoder drivers - IIO ADC/DAC/DFSDM - vrefbuf regu driver (voltage reference buffer). Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit f491ac32c618057acc721de0db50df1aef552f33 Author: Lubomir Rintel Date: Sun Dec 2 12:38:48 2018 +0100 ARM: mmp2: DT: be compatible with mrvl,mmp2 There are more boards that can work with mmp2-dt than just Brownstone. The OLPC XO-1.75 device tree root is compatible with "mrvl,mmp2" only. The "mrvl,mmp2-brownstone" string is safe to remove: the Brownstone device tree contains the "mrvl,mmp2" compatible string too. Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit af43c3f0323d127d08e38ec830588e9d9b230f76 Merge: b71a29d57dda8 9994241ac97cb Author: Olof Johansson Date: Mon Dec 3 12:50:41 2018 -0800 Merge tag 'arm-soc/for-4.21/devicetree' of https://github.com/Broadcom/stblinux into next/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 4.21, please pull the following: - Rafal relicenses a bunch of DTS files he wrote under the GPL 2.0+/MIT license and adds proper SPDX license tags in the process - Rene adds support for the Linksys EA6500 v2 Wi-Fi router based on BCM4708 plus two BCM4360 and BCM4331 radios - Phil documents and updates the vchiq mailbox compatible string in order to establish a correct agreement between the Raspberry Pi firmware and the ARM CPU's view of what an ARM CPU cache line size is, he also fixes the mailbox "reg" property to be correctly expressed in bytes - Stefan updates the Raspberry Pi Zero DTS files to use SPDX tags - Florian enables the SATA PHY and AHCI controller on the BCM63138 SoCs, he also does a bit of refactoring of aliases for the Northstar Plus DTS files * tag 'arm-soc/for-4.21/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: BCM5301X: Describe Northstar pins mux controller ARM: dts: BCM5301X: Add basic DT for Linksys EA6500 V2 ARM: dts: bcm2835-rpi-zero: Switch to SPDX identifier ARM: dts: bcm283x: Correct mailbox register sizes ARM: dts: bcm283x: Correct vchiq compatible string dt-bindings: soc: Document "brcm,bcm2836-vchiq" ARM: dts: NSP: Move aliases to bcm-nsp.dtsi ARM: dts: BCM53573: Relicense SoC file to the GPL 2.0+ / MIT ARM: dts: BCM63xx: Enable SATA AHCI and PHY for BCM963138DVT ARM: dts: BCM63xx: enable SATA PHY and AHCI controller ARM: dts: BCM53573: Relicense Tenda AC9 file to the GPL 2.0+ / MIT ARM: dts: BCM5301X: Relicense BCM47094 file to the GPL 2.0+ / MIT ARM: dts: BCM5301X: Relicense BCM47081/BCM4709 files to the GPL 2.0+ / MIT Signed-off-by: Olof Johansson commit 90b1023f68c78b9b85e364250155776c8e421176 Author: Quentin Monnet Date: Mon Dec 3 12:13:35 2018 +0000 bpf: fix documentation for eBPF helpers The missing indentation on the "Return" sections for bpf_map_pop_elem() and bpf_map_peek_elem() helpers break RST and man pages generation. This patch fixes them, and moves the description of those two helpers towards the end of the list (even though they are somehow related to the three first helpers for maps, the man page explicitly states that the helpers are sorted in chronological order). While at it, bring other minor formatting edits for eBPF helpers documentation: mostly blank lines removal, RST formatting, or other small nits for consistency. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit e3da08d057002f9d0831949d51666c3e15dc6b29 Author: Petar Penkov Date: Sun Dec 2 20:18:19 2018 -0500 bpf: allow BPF read access to qdisc pkt_len The pkt_len field in qdisc_skb_cb stores the skb length as it will appear on the wire after segmentation. For byte accounting, this value is more accurate than skb->len. It is computed on entry to the TC layer, so only valid there. Allow read access to this field from BPF tc classifier and action programs. The implementation is analogous to tc_classid, aside from restricting to read access. To distinguish it from skb->len and self-describe export as wire_len. Changes v1->v2 - Rename pkt_len to wire_len Signed-off-by: Petar Penkov Signed-off-by: Vlad Dumitrescu Signed-off-by: Willem de Bruijn Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit de94b651eef38b44adc20057ab5eb6d4ca672169 Author: Andrey Ignatov Date: Sun Dec 2 13:02:15 2018 -0800 libbpf: Fix license in README.rst The whole libbpf is licensed as (LGPL-2.1 OR BSD-2-Clause). I missed it while adding README.rst. Fix it and use same license as all other files in libbpf do. Since I'm the only author of README.rst so far, no others' permissions should be needed. Fixes: 76d1b894c515 ("libbpf: Document API and ABI conventions") Signed-off-by: Andrey Ignatov Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 9b90dc85c718443a3e573a0ccf55900ff4fa73ae Author: Randy Dunlap Date: Fri Nov 30 11:30:20 2018 -0500 media: seco-cec: add missing header file to fix build Fix build errors due to missing header file. The header file is inserted first because module-related errors begin showing up in (when CONFIG_ACPI is not set). Sample of build errors: In file included from ../include/linux/acpi.h:27:0, from ../drivers/media/platform/seco-cec/seco-cec.c:10: ../include/linux/device.h:1620:1: warning: data definition has no type or storage class [enabled by default] module_exit(__driver##_exit); ^ ../include/linux/platform_device.h:229:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^ ../drivers/media/platform/seco-cec/seco-cec.c:791:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(secocec_driver); ^ ../include/linux/device.h:1620:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int] module_exit(__driver##_exit); ^ ../include/linux/platform_device.h:229:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^ ../drivers/media/platform/seco-cec/seco-cec.c:791:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(secocec_driver); ^ In file included from ../include/linux/linkage.h:7:0, from ../include/linux/kernel.h:7, from ../include/linux/list.h:9, from ../include/linux/resource_ext.h:17, from ../include/linux/acpi.h:26, from ../drivers/media/platform/seco-cec/seco-cec.c:10: ../include/linux/export.h:18:30: warning: parameter names (without types) in function declaration [enabled by default] #define THIS_MODULE ((struct module *)0) ^ ../include/linux/platform_device.h:199:34: note: in expansion of macro 'THIS_MODULE' __platform_driver_register(drv, THIS_MODULE) ^ ../include/linux/device.h:1613:9: note: in expansion of macro 'platform_driver_register' return __register(&(__driver) , ##__VA_ARGS__); \ ^ ../include/linux/platform_device.h:229:2: note: in expansion of macro 'module_driver' module_driver(__platform_driver, platform_driver_register, \ ^ ../drivers/media/platform/seco-cec/seco-cec.c:791:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(secocec_driver); ^ ../drivers/media/platform/seco-cec/seco-cec.c:793:20: error: expected declaration specifiers or '...' before string constant MODULE_DESCRIPTION("SECO CEC X86 Driver"); ^ ../drivers/media/platform/seco-cec/seco-cec.c:794:15: error: expected declaration specifiers or '...' before string constant MODULE_AUTHOR("Ettore Chimenti "); ^ ../drivers/media/platform/seco-cec/seco-cec.c:795:16: error: expected declaration specifiers or '...' before string constant MODULE_LICENSE("Dual BSD/GPL"); ^ In file included from ../include/linux/acpi.h:27:0, from ../drivers/media/platform/seco-cec/seco-cec.c:10: ../drivers/media/platform/seco-cec/seco-cec.c:791:24: warning: 'secocec_driver_init' defined but not used [-Wunused-function] module_platform_driver(secocec_driver); ^ ../include/linux/device.h:1611:19: note: in definition of macro 'module_driver' static int __init __driver##_init(void) \ ^ ../drivers/media/platform/seco-cec/seco-cec.c:791:1: note: in expansion of macro 'module_platform_driver' module_platform_driver(secocec_driver); Signed-off-by: Randy Dunlap Cc: Ettore Chimenti Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ffd321e4b7e4617e7fad663af0f59bb4e0c20c34 Author: Leon Romanovsky Date: Wed Nov 28 13:16:45 2018 +0200 RDMA/nldev: Export to user space number of contexts [leonro@server ~]$ rdma res show 1: mlx5_0: pd 3 cq 5 qp 4 cm_id 0 mr 0 ctx 0 Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 12d23a91983348bafcf646d5520de320a6a6f8e3 Author: Leon Romanovsky Date: Wed Nov 28 13:16:44 2018 +0200 RDMA/uverbs: Annotate alloc/deallloc paths with context tracking Add restrack annotations to track allocations of ucontexts. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 606152107bbdbc0e21f25e0d15ef2787a4ab90fd Author: Leon Romanovsky Date: Wed Nov 28 13:16:43 2018 +0200 RDMA/restrack: Track ucontext Add ability to track allocated ib_ucontext, which are limited resource and worth to be visible by users. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 5b841bfab695e3b8ae793172a9ff7990f99cc3e2 Author: Zoran Markovic Date: Wed Oct 17 16:25:44 2018 -0700 smack: fix access permissions for keyring Function smack_key_permission() only issues smack requests for the following operations: - KEY_NEED_READ (issues MAY_READ) - KEY_NEED_WRITE (issues MAY_WRITE) - KEY_NEED_LINK (issues MAY_WRITE) - KEY_NEED_SETATTR (issues MAY_WRITE) A blank smack request is issued in all other cases, resulting in smack access being granted if there is any rule defined between subject and object, or denied with -EACCES otherwise. Request MAY_READ access for KEY_NEED_SEARCH and KEY_NEED_VIEW. Fix the logic in the unlikely case when both MAY_READ and MAY_WRITE are needed. Validate access permission field for valid contents. Signed-off-by: Zoran Markovic Signed-off-by: Casey Schaufler Cc: Casey Schaufler Cc: James Morris Cc: "Serge E. Hallyn" commit ae9e7ced4f7b0e9d1646844b4713d6b60e9b3f65 Author: Manasi Navare Date: Fri Nov 30 17:04:12 2018 -0800 drm/i915/dp: Fix link compute m_n calc for DSC Fix the intel_link_compute_m_n in case of display stream compression. This patch passes the compressed_bpp to intel_link_compute_m_n if compression is enabled. Fixes: a4a157777c80 ("drm/i915/dp: Compute DSC pipe config in atomic check") Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181201010412.32372-1-manasi.d.navare@intel.com commit 4946166e46d205bff6749887b62c646693615e9e Merge: 651022382c7f8 a7d19b05ce817 Author: Stephen Boyd Date: Mon Dec 3 11:47:04 2018 -0800 Merge tag 'meson-clk-4.21-1' of https://github.com/BayLibre/clk-meson into clk-meson Pull amlogic meson clk driver updates from Neil Armstrong: - Add GX video clocks - Switch to HHI syscon for meson8b - Fix meson8b cpu clock - Add support for meson8b CPU scaling - Add Meson8b CPU post-dividers clocks * tag 'meson-clk-4.21-1' of https://github.com/BayLibre/clk-meson: clk: meson: meson8b: add the CPU clock post divider clocks clk: meson: meson8b: rename cpu_div2/cpu_div3 to cpu_in_div2/cpu_in_div3 clk: meson: clk-regmap: add read-only gate ops clk: meson: meson8b: allow changing the CPU clock tree clk: meson: meson8b: run from the XTAL when changing the CPU frequency clk: meson: meson8b: add support for more M/N values in sys_pll clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL clk: meson: meson8b: do not use cpu_div3 for cpu_scale_out_sel clk: meson: clk-pll: check if the clock is already enabled clk: meson: meson8b: fix the width of the cpu_scale_div clock clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table clk: meson: meson8b: use the HHI syscon if available dt-bindings: clock: meson8b: use the registers from the HHI syscon clk: meson-gxbb: Add video clocks dt-bindings: clk: meson-gxbb: Add Video clock bindings clk: meson-gxbb: Fix HDMI PLL for GXL SoCs clk: meson: Add vid_pll divider driver dt-bindings: clock: meson8b: export the CPU post dividers commit 98b5368ff94102def02e5f1dc2caa313f7d1344f Author: Hans Verkuil Date: Wed Nov 28 11:34:51 2018 -0500 media: vicodec: move the GREY format to the end of the list With the GREY format at the beginning, the default format selected by vicodec would be GREY instead of YUV420. That didn't make sense, so move it to the end of the list. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fbdefb67f40ea1c780afa7479e7b78565d874202 Author: Colin Ian King Date: Wed Nov 28 10:34:09 2018 -0500 media: tda7432: fix spelling mistake "maximium" -> "maximum" There is a spelling mistake in the module description as well as a comment. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a4b3675f9b838c0dc6ef680010233ba5dbebb26d Author: Hans Verkuil Date: Wed Nov 28 04:11:52 2018 -0500 media: vivid: add req_validate error injection Add a new vivid button control to inject an error into the req_validate request callback. This will help testing with v4l2-compliance. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 191cf8b0746a5b0d5b3918fe83fa94ec3232b53f Author: Jasmin Jessich Date: Mon Nov 26 17:01:09 2018 -0500 media: adv7604 added include of linux/interrupt.h On older Kernels (prior to 4.15) irqreturn_t and devm_request_threaded_irq is not defined when compiling adv7604.c. It seems more recent Kernels include it via another header which is included by adv7604.c. Now we include linux/interrupt.h explicitly to get the type also defined for Kernels prior to 4.15. Signed-off-by: Jasmin Jessich Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba08e61a7990976a35fe38b2d7790090150186e9 Author: Michael Tretter Date: Mon Nov 26 13:01:23 2018 -0500 media: v4l2-pci-skeleton: depend on CONFIG_SAMPLES Commit 0185f8501762 ("[media] samples: v4l: from Documentation to samples directory") moved the v4l2-pci-skeleton driver to the samples directory. The samples are only be built, if CONFIG_SAMPLES is enabled. Therefore, VIDEO_PCI_SKELETON is not enough to build the v4l2-pci-skeleton driver, but SAMPLES needs to be enabled, too. Let VIDEO_PCI_SKELETON depend on SAMPLES. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b52b88ce5bd68e9f6ce4f01d2306e61ce34fc5a0 Author: Michael Tretter Date: Mon Nov 26 13:01:24 2018 -0500 media: v4l2-pci-skeleton: replace vb2_buffer with vb2_v4l2_buffer Commit 2d7007153f0c ("[media] media: videobuf2: Restructure vb2_buffer") replaced vb2_buffer with vb2_v4l2_buffer in all v4l2 drivers. The restructuring skipped the v4l2-pci-skeleton, probably because it resides outside the drivers directory. The v4l2_buf_ops assume that the passed buffer is a vb2_v4l2_buffer. This is not the case if the skel_buffer is based on vb2_buffer instead of vb2_v4l2_buffer. Replace vb2_buffer with vb2_v4l2_buffer in the skeleton to make sure that future drivers that are based on the skeleton use vb2_v4l2_buffer. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2286cc02e32a2f40735e42c27acecd60a91f060 Author: Sakari Ailus Date: Mon Nov 26 06:07:29 2018 -0500 media: v4l: ioctl: Allow drivers to fill in the format description The v4l_fill_fmtdesc() function does a good job in filling in pixelformat description. While generally all drivers should depend on this function doing the job, staging drivers that use their own formats may not. Allow staging drivers to fill in their own formats by checking whether the description begins with a non-nil character before issuing the warning. Signed-off-by: Sakari Ailus Suggested-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b04240a6d5ed5b219c1c7626d0e1f4f1acc0e2f5 Author: Jonas Karlman Date: Sun Nov 25 10:21:42 2018 -0500 media: v4l: Fix MPEG-2 slice Intra DC Precision validation intra_dc_precision is a 2-bit integer [1] allow use of all valid options, 8 - 11 bits precision [1] ISO/IEC 13818-2 Table 6-13 Fixes: c27bb30e7b6d ("media: v4l: Add definitions for MPEG-2 slice format and metadata") Signed-off-by: Jonas Karlman Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a31061833a52a79c99221b6251db08cf377470e Author: Ville Syrjälä Date: Thu Nov 29 19:44:45 2018 +0200 platform/x86: Fix config space access for intel_atomisp2_pm We lose even config space access when we power gate the ISP via the PUNIT. That makes lspci & co. produce gibberish. To fix that let's try to implement actual runtime pm hooks and inform the pci core that the device always goes to D3cold. That will cause the pci core to resume the device before attempting config space access. This introduces another annoyance though. We get the following error every time we try to resume the device: intel_atomisp2_pm 0000:00:03.0: Refused to change power state, currently in D3 The reason being that the pci core tries to put the device back into D0 via the standard PCI PM mechanism before calling the driver resume hook. To fix this properly we'd need to infiltrate the platform pm hooks (could turn ugly real fast), or use pm domains (which don't seem to exist on x86), or some extra early resume hook for the driver (which doesn't exist either). So maybe we just choose to live with the error? Cc: Hans de Goede Cc: Alan Cox Cc: Andy Shevchenko Cc: Darren Hart Signed-off-by: Ville Syrjälä Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede commit 8a7d7141528ad67e465bc6afacc6a3144d1fe320 Author: Ville Syrjälä Date: Thu Nov 29 19:44:44 2018 +0200 platform/x86: Add the VLV ISP PCI ID to atomisp2_pm If the ISP is exposed as a PCI device VLV machines need the same treatment as CHV machines to power gate the ISP. Otherwise s0ix will not work. Cc: Hans de Goede Cc: Alan Cox Cc: Andy Shevchenko Cc: Darren Hart Signed-off-by: Ville Syrjälä Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko commit e6f5e6c2fbbc3c6910803819e71832fad278cd61 Author: Andy Shevchenko Date: Mon Dec 3 21:07:03 2018 +0200 platform/x86: intel_ips: Convert to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Andy Shevchenko commit 1d5caaa853ea8315950a6dd952d7ec34394f4d60 Author: Andy Shevchenko Date: Mon Dec 3 20:17:40 2018 +0200 platform/x86: intel_ips: Remove never happen condition At ->remove() stage we know that device had been instantiated properly, so, it can't be an invalid pointer to the driver data. Signed-off-by: Andy Shevchenko commit 0b8a6aeab9255a43b2a34b386d95004665e0fe9a Author: Thomas Meyer Date: Sun Dec 2 21:52:11 2018 +0100 platform/x86: intel_ips: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Signed-off-by: Andy Shevchenko commit 9a92ed29ca961f118b45a2893416df753c287845 Author: YueHaibing Date: Tue Nov 27 11:09:38 2018 +0800 platform/x86: intel_ips: remove unnecessary checks in ips_debugfs_init As Greg KH explained in: https://lkml.org/lkml/2015/8/15/114 There no need to check the return value of debugfs_create_file() and debugfs_create_dir(). This also fix static code checker warnings: drivers/platform/x86/intel_ips.c:1314 ips_debugfs_init() warn: passing zero to 'PTR_ERR' drivers/platform/x86/intel_ips.c:1328 ips_debugfs_init() warn: passing zero to 'PTR_ERR' Signed-off-by: YueHaibing Signed-off-by: Andy Shevchenko commit e278558a1f4b91ed381d5b0168e2f6743a03ae20 Author: Andy Shevchenko Date: Wed Nov 28 13:45:35 2018 +0200 iio: inv_mpu6050: Use i2c_acpi_get_i2c_resource() helper ACPI provides a generic helper to get I2C Serial Bus resources. Use it instead of open coded variant. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede Acked-by: Jonathan Cameron commit a3dd034a1707490119f32bd0c50e6047e42d2517 Author: Andy Shevchenko Date: Wed Nov 28 13:45:34 2018 +0200 ACPI / scan: Create platform device for INT3515 ACPI nodes The ACPI device with INT3515 _HID is representing a complex USB PD hardware infrastructure which includes several I2C slave ICs. We add an ID to the I2C multi instantiate list to enumerate all I2C slaves correctly. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede Acked-by: Heikki Krogerus Acked-by: Rafael J. Wysocki commit 2336dfadfb1e3a484f0daf4014305626a3d9df62 Author: Andy Shevchenko Date: Wed Nov 28 13:45:33 2018 +0200 platform/x86: i2c-multi-instantiate: Allow to have same slaves Currently the driver will not enumerate the devices where I2C slaves are of the same type. Add an instance number to make them unique. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 799d3379a6728794de5ed2be8acc5b4a65d776b6 Author: Andy Shevchenko Date: Wed Nov 28 13:45:32 2018 +0200 platform/x86: i2c-multi-instantiate: Introduce IOAPIC IRQ support If ACPI table provides an Interrupt() resource we may consider to use it instead of GpioInt() one. Here we leave an error condition, when getting IRQ resource, to the driver to decide how to proceed, because some drivers may consider IRQ resource optional. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 870ab9a379b6753ed45736152b0237ccc726172c Author: Andy Shevchenko Date: Wed Nov 28 13:45:31 2018 +0200 platform/x86: i2c-multi-instantiate: Distinguish IRQ resource type As a preparatory patch switch the driver to distinguish IRQ resource type. For now, only GpioInt() is supported. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit a729656697e306595f5349b9176cebea459d7519 Author: Andy Shevchenko Date: Wed Nov 28 13:45:30 2018 +0200 platform/x86: i2c-multi-instantiate: Count I2cSerialBus() resources Instead of relying on hard coded and thus expected number of I2C clients, count the real amount provided by firmware. This allows to support non-fixed amount of the slaves. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 0d5102fe85302aa06a3e5fd8e63b09294aed4c48 Author: Andy Shevchenko Date: Wed Nov 28 13:45:29 2018 +0200 i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helper Besides current two users one more is coming. Definitely makes sense to introduce a helper. No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Acked-by: Wolfram Sang commit 5f59d6a1109ce6ade2ad0ba2eb09d8011155daaf Author: Andy Shevchenko Date: Wed Nov 28 13:45:28 2018 +0200 i2c: acpi: Use ACPI_FAILURE instead of !ACPI_SUCCESS Convert to use ACPI_FAILURE instead of !ACPI_SUCCESS. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Acked-by: Wolfram Sang commit 79dd67306fd5f2e0a9e5697bbbfc9bfa6d8d7673 Author: Andy Shevchenko Date: Wed Nov 28 13:45:27 2018 +0200 platform/x86: i2c-multi-instantiate: Get rid of obsolete conditional Now, when i2c_acpi_new_device() never returns NULL, there is no point to check for it. Besides that, i2c_acpi_new_device() returns -EPROBE_DEFER directly and caller doesn't need to guess is better. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 09e568f783efbd40c60d2118be0a1b0aa6e35177 Author: Andy Shevchenko Date: Wed Nov 28 13:45:26 2018 +0200 platform/x86: intel_cht_int33fe: Get rid of obsolete conditional Now, when i2c_acpi_new_device() never returns NULL, there is no point to check for it. Besides that, i2c_acpi_new_device() returns -EPROBE_DEFER directly and caller doesn't need to guess is better. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 2dea645ffc21f927067e8e35147985887b1a843d Author: Andy Shevchenko Date: Wed Nov 28 13:45:25 2018 +0200 i2c: acpi: Return error pointers from i2c_acpi_new_device() The caller would like to know the reason why the i2c_acpi_new_device() fails. For example, if adapter is not available, it might be in the future and we would like to re-probe the clients again. But at the same time we would like to bail out if the error seems unrecoverable, such as invalid argument supplied. To achieve this, return error pointer in some cases. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede Acked-by: Mika Westerberg Acked-by: Wolfram Sang commit 1aaeae493aad4d71f75f4129e676fbfcdf8b1422 Author: Andy Shevchenko Date: Wed Nov 28 13:45:24 2018 +0200 platform/x86: i2c-multi-instantiate: Defer probe when no adapter found Likewise the rest of the i2c_acpi_new_device() users, defer the probe of the i2c-multi-intantiate driver in case adapter is not yet found. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 41daf985820c72b6768512943dab23f5f41ef865 Author: Andy Shevchenko Date: Wed Nov 28 13:45:23 2018 +0200 platform/x86: i2c-multi-instantiate: Accept errors of i2c_acpi_new_device() In the future i2c_acpi_new_device() will return error pointer in some cases. Prepare i2c-multi-instantiate driver to support that. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 5ae9ce13261490e0c65d7012c366bdd3cc9e2d77 Author: Andy Shevchenko Date: Wed Nov 28 13:45:22 2018 +0200 platform/x86: intel_cht_int33fe: Accept errors of i2c_acpi_new_device() In the future i2c_acpi_new_device() will return error pointer in some cases. Prepare intel_cht_int33fe driver to support that. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit 6734489667e240b14170a70dc7e72d333e93d5ad Author: Andy Shevchenko Date: Wed Nov 28 13:45:21 2018 +0200 platform/x86: intel_cht_int33fe: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede commit aa35dc3c71950e3fec3e230c06c27c0fbd0067f8 Author: Alexey Khoroshilov Date: Fri Nov 23 16:56:26 2018 -0500 media: DaVinci-VPBE: fix error handling in vpbe_initialize() If vpbe_set_default_output() or vpbe_set_default_mode() fails, vpbe_initialize() returns error code without releasing resources. The patch adds error handling for that case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2a58dd767bf912f216b5337b3e22c2a203160a7e Author: YueHaibing Date: Mon Dec 3 11:29:30 2018 -0800 Input: olpc_apsp - remove set but not used variable 'np' Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/serio/olpc_apsp.c: In function 'olpc_apsp_probe': drivers/input/serio/olpc_apsp.c:192:22: warning: variable 'np' set but not used [-Wunused-but-set-variable] It never used since introduction in commit b56ece9a3ac3 ("Input: add OLPC AP-SP driver") Signed-off-by: YueHaibing Acked-by: Lubomir Rintel Signed-off-by: Dmitry Torokhov commit b1260067ac3dd5dcd40bcbcb2cc116a9f8b5016b Author: A.s. Dong Date: Wed Nov 14 13:02:08 2018 +0000 clk: imx: add imx7ulp clk driver i.MX7ULP Clock functions are under joint control of the System Clock Generation (SCG) modules, Peripheral Clock Control (PCC) modules, and Core Mode Controller (CMC)1 blocks The clocking scheme provides clear separation between M4 domain and A7 domain. Except for a few clock sources shared between two domains, such as the System Oscillator clock, the Slow IRC (SIRC), and and the Fast IRC clock (FIRCLK), clock sources and clock management are separated and contained within each domain. M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules. A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules. This driver only adds clock support in A7 domain. Note that most clocks required to be operated when gated, e.g. pll, pfd, pcc. And more special cases that scs/ddr/nic mux selecting different clock source requires that clock to be enabled first, then we need set CLK_OPS_PARENT_ENABLE flag for them properly. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 3b315214e09167c2dbcc5d9d5c999237e47ed182 Author: A.s. Dong Date: Wed Nov 14 13:02:04 2018 +0000 clk: imx: implement new clk_hw based APIs Clock providers are recommended to use the new struct clk_hw based API, so implement IMX clk_hw based provider helpers functions to the new approach. Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 9e5ef7a57ca75a1b9411c46caeeb6881124284a3 Author: A.s. Dong Date: Wed Nov 14 13:02:00 2018 +0000 clk: imx: make mux parent strings const As the commit 2893c379461a ("clk: make strings in parent name arrays const"), let's make the parent strings const, otherwise we may meet the following warning when compiling: drivers/clk/imx/clk-imx7ulp.c: In function 'imx7ulp_clocks_init': drivers/clk/imx/clk-imx7ulp.c:73:35: warning: passing argument 5 of 'imx_clk_mux_flags' discards 'const' qualifier from pointer target type clks[IMX7ULP_CLK_APLL_PRE_SEL] = imx_clk_mux_flags("apll_pre_sel", base + 0x508, 0, 1, pll_pre_sels, ARRAY_SIZE(pll_pre_sels), CLK_SET_PARENT_GATE); ^ In file included from drivers/clk/imx/clk-imx7ulp.c:23:0: drivers/clk/imx/clk.h:200:27: note: expected 'const char **' but argument is of type 'const char * const*' ... Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit eb299e4d5708c1d95779997b3268aac1a1854bbf Author: A.s. Dong Date: Wed Nov 14 13:01:56 2018 +0000 dt-bindings: clock: add imx7ulp clock binding doc i.MX7ULP Clock functions are under joint control of the System Clock Generation (SCG) modules, Peripheral Clock Control (PCC) modules, and Core Mode Controller (CMC)1 blocks Note IMX7ULP has two clock domains: M4 and A7. This binding doc is only for A7 clock domain. Cc: Rob Herring Cc: Mark Rutland Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 76a323c19a1626b64ac69dbe5e187304ec58a6ca Author: A.s. Dong Date: Wed Nov 14 13:01:51 2018 +0000 clk: imx: add imx7ulp composite clk support The imx composite clk is designed for Peripheral Clock Control (PCC) module observed in IMX ULP SoC series. NOTE pcc can only be operated when clk is gated. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng [sboyd@kernel.org: Include clk.h for sparse warnings] Signed-off-by: Stephen Boyd commit 9fcb6be3b6c994f275761b22800e4244f610bdc5 Author: A.s. Dong Date: Wed Nov 14 13:01:47 2018 +0000 clk: imx: add pfdv2 support The pfdv2 is designed for PLL Fractional Divide (PFD) observed in System Clock Generation (SCG) module in IMX ULP SoC series. e.g. i.MX7ULP. NOTE pfdv2 can only be operated when clk is gated. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng [sboyd@kernel.org: Include clk.h for sparse warnings] Signed-off-by: Stephen Boyd commit d9a8f950b296729b88d7139904cac5fd6d0a5261 Author: A.s. Dong Date: Wed Nov 14 13:01:43 2018 +0000 clk: imx: add pllv4 support pllv4 is designed for System Clock Generation (SCG) module observed in IMX ULP SoC series. e.g. i.MX7ULP. The SCG modules generates clock used to derive processor, system, peripheral bus and external memory interface clocks while this patch intends to support the PLL part. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng [sboyd@kernel.org: Include clk.h for sparse warnings] Signed-off-by: Stephen Boyd commit e983da27f70e8d29f4ae7262d52e4d07129498f3 Author: A.s. Dong Date: Wed Nov 14 13:01:39 2018 +0000 clk: fractional-divider: add CLK_FRAC_DIVIDER_ZERO_BASED flag support Adding CLK_FRAC_DIVIDER_ZERO_BASED flag to indicate the numerator and denominator value in register are start from 0. This can be used to support frac dividers like below: Divider output clock = Divider input clock x [(frac +1) / (div +1)] where frac/div in register is: 000b - Divide by 1. 001b - Divide by 2. 010b - Divide by 3. Cc: Stephen Boyd Cc: Michael Turquette Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd commit 404680794224334bcbea498d571c645e1838c879 Author: A.s. Dong Date: Wed Nov 14 13:01:35 2018 +0000 clk: imx: add gatable clock divider support For dividers with zero indicating clock is disabled, instead of giving a warning each time like "clkx: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set" in exist code, we'd like to introduce enable/disable function for it. e.g. 000b - Clock disabled 001b - Divide by 1 010b - Divide by 2 ... Set rate when the clk is disabled will cache the rate request and only when the clk is enabled will the driver actually program the hardware to have the requested divider value. Similarly, when the clk is disabled we'll write a 0 there, but when the clk is enabled we'll restore whatever rate (divider) was chosen last. It does mean that recalc rate will be sort of odd, because when the clk is off it will return 0, and when the clk is on it will return the right rate. So to make things work, we'll need to return the cached rate in recalc rate when the clk is off and read the hardware when the clk is on. NOTE for the default off divider, the recalc rate will still return 0 as there's still no proper preset rate. Enable such divider will give user a reminder error message. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Signed-off-by: Dong Aisheng [sboyd@kernel.org: Include clk.h for sparse warnings] Signed-off-by: Stephen Boyd commit adcfdbde20dc149084978d4c9efa0a106e73f17e Author: Hans Verkuil Date: Fri Nov 23 07:07:33 2018 -0500 media: vivid: fix smatch warnings Reorganize code to fix two smatch warnings: drivers/media/platform/vivid/vivid-core.c: drivers/media/platform/vivid/vivid-core.c:889 vivid_create_instance() warn: potentially one past the end of array 'dev->query_dv_timings_qmenu[dev->query_dv_timings_size]' drivers/media/platform/vivid/vivid-core.c: drivers/media/platform/vivid/vivid-core.c:889 vivid_create_instance() warn: potentially one past the end of array 'dev->query_dv_timings_qmenu[dev->query_dv_timings_size]' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8b8130f0c76abb422b5fd98aba401cd97e0b88b9 Author: Tomasz Figa Date: Wed Nov 21 01:37:59 2018 -0500 media: mtk-vcodec: Remove VA from encoder frame buffers The encoder driver has no need to do any CPU access to the source frame buffers. Use a separate structure for holding DMA addresses and sizes for those and remove, so we do not end up introducing any erroneous dereferences of those VAs. This fixes DMA-buf import from exporters that do not provide contiguous kernel mappings, which includes the MTK DRM driver. Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25f5c34bc8bfabc7406d7c88b73cdf05023d31f7 Author: Todor Tomov Date: Tue Nov 13 09:03:07 2018 -0500 media: camss: Take in account sensor skip frames When streaming is starting ask the sensor for its skip frames value. Max supported frame skip is 29 frames, so clip it if it is higher. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9483a3f8e1b58ba1d7cd21687d8d0a63a015c36b Author: Tim Harvey Date: Wed Oct 24 16:25:51 2018 -0400 media: adv7180: add g_skip_frames support The adv7180 produces 1 to 2 frames of garbage before proper sync is established. This allows V4L2 drivers and apps to skip those. Signed-off-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55a9b74846ed5e6219c7d81a8e1bf96f25d8ad5e Author: Eric Anholt Date: Fri Nov 30 16:57:58 2018 -0800 drm/v3d: Add more tracepoints for V3D GPU rendering. The core scheduler tells us when the job is pushed to the scheduler's queue, and I had the job_run functions saying when they actually queue the job to the hardware. By adding tracepoints for the very top of the ioctls and the IRQs signaling job completion, "perf record -a -e v3d:.\* -e gpu_scheduler:.\* ; perf script" gets you a pretty decent timeline. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-5-eric@anholt.net Reviewed-by: Dave Emett commit 32211e47999d82f862b7c93b6e28d01cd2bbd69d Author: Colin Ian King Date: Fri Oct 12 11:37:17 2018 -0400 media: em28xx: fix spelling mistake, "Cinnergy" -> "Cinergy" Fix name of the Hybrid T USB XS em28xx card, should be Cinergy. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db176f6ba1da39ad0016c77b9775a6bb3d0ce88a Author: Eric Anholt Date: Fri Nov 30 16:57:59 2018 -0800 drm/v3d: Add missing fence timeline name for TFU. We shouldn't be returning v3d-render for our new queue. Signed-off-by: Eric Anholt Fixes: 83d5139982db ("drm/v3d: Add support for submitting jobs to the TFU.") Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-6-eric@anholt.net Reviewed-by: Dave Emett commit 34c7dc8b323912f33868837a8636e6c0fdfd4826 Author: Colin Ian King Date: Fri Oct 12 10:48:32 2018 -0400 media: exynos4-is: fix spelling mistake ACTURATOR -> ACTUATOR Trivial fix to spelling mistake in macro name and text string ERROR_SENSOR_ACTURATOR_INIT_FAIL -> ERROR_SENSOR_ACTUATOR_INIT_FAIL Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79e89e36dc8a47ef965a35b484d737a5227feed1 Author: Arnd Bergmann Date: Tue Oct 2 17:12:43 2018 -0400 media: i2c: TDA1997x: select CONFIG_HDMI Without CONFIG_HDMI, we get a link error for this driver: drivers/media/i2c/tda1997x.o: In function `tda1997x_parse_infoframe': tda1997x.c:(.text+0x2195): undefined reference to `hdmi_infoframe_unpack' tda1997x.c:(.text+0x21b6): undefined reference to `hdmi_infoframe_log' drivers/media/i2c/tda1997x.o: In function `tda1997x_log_infoframe': tda1997x.c:(.text.unlikely+0x13d3): undefined reference to `hdmi_infoframe_unpack' tda1997x.c:(.text.unlikely+0x1426): undefined reference to `hdmi_infoframe_log' All other drivers in this directory that use HDMI select CONFIG_HDMI, so do the same here: Fixes: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 10e1fdb95809ed21406f53b5b4f064673a1b9ceb Author: Daniel Axtens Date: Sun Apr 23 00:53:49 2017 -0400 media: uvcvideo: Refactor teardown of uvc on USB disconnect Currently, disconnecting a USB webcam while it is in use prints out a number of warnings, such as: WARNING: CPU: 2 PID: 3118 at /build/linux-ezBi1T/linux-4.8.0/fs/sysfs/group.c:237 sysfs_remove_group+0x8b/0x90 sysfs group ffffffffa7cd0780 not found for kobject 'event13' This has been noticed before. [0] This is because of the order in which things are torn down. If there are no streams active during a USB disconnect: - uvc_disconnect() is invoked via device_del() through the bus notifier mechanism. - this calls uvc_unregister_video(). - uvc_unregister_video() unregisters the video device for each stream, - because there are no streams open, it calls uvc_delete() - uvc_delete() calls uvc_status_cleanup(), which cleans up the status input device. - uvc_delete() calls media_device_unregister(), which cleans up the media device - uvc_delete(), uvc_unregister_video() and uvc_disconnect() all return, and we end up back in device_del(). - device_del() then cleans up the sysfs folder for the camera with dpm_sysfs_remove(). Because uvc_status_cleanup() and media_device_unregister() have already been called, this all works nicely. If, on the other hand, there *are* streams active during a USB disconnect: - uvc_disconnect() is invoked - this calls uvc_unregister_video() - uvc_unregister_video() unregisters the video device for each stream, - uvc_unregister_video() and uvc_disconnect() return, and we end up back in device_del(). - device_del() then cleans up the sysfs folder for the camera with dpm_sysfs_remove(). Because the status input device and the media device are children of the USB device, this also deletes their sysfs folders. - Sometime later, the final stream is closed, invoking uvc_release(). - uvc_release() calls uvc_delete() - uvc_delete() calls uvc_status_cleanup(), which cleans up the status input device. Because the sysfs directory has already been removed, this causes a WARNing. - uvc_delete() calls media_device_unregister(), which cleans up the media device. Because the sysfs directory has already been removed, this causes another WARNing. To fix this, we need to make sure the devices are always unregistered before the end of uvc_disconnect(). To this, move the unregistration into the disconnect path: - split uvc_status_cleanup() into two parts, one on disconnect that unregisters and one on delete that frees. - move v4l2_device_unregister() and media_device_unregister() into the disconnect path. [0]: https://lkml.org/lkml/2016/12/8/657 [Renamed uvc_input_cleanup() to uvc_input_unregister()] Signed-off-by: Daniel Axtens Acked-by: Greg Kroah-Hartman Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 38e9b928060a41583f273c8473524bfc71402e11 Author: Sergey Dorodnicov Date: Wed Sep 12 02:42:07 2018 -0400 media: uvcvideo: Add support for the CNF4 format Register the GUID used by Intel RealSense cameras with fourcc CNF4, encoding depth sensor confidence information for every pixel. Signed-off-by: Sergey Dorodnicov Signed-off-by: Evgeni Raikhel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 92799ef7209bfd4c8eadb88c2c8f6fcba544b367 Author: Sergey Dorodnicov Date: Wed Sep 12 02:42:06 2018 -0400 media: v4l: Add 4bpp packed depth confidence format CNF4 Adding new fourcc CNF4 for 4 bit-per-pixel packed depth confidence information provided by Intel RealSense cameras. Every two consecutive pixels are packed into a single byte. Signed-off-by: Sergey Dorodnicov Signed-off-by: Evgeni Raikhel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d55c6f51fe3f82e4565e831fcacb85d068b7a3a1 Author: Andrea Merello Date: Fri Sep 28 03:32:13 2018 -0400 media: xilinx: fix typo in formats table In formats table the entry for CFA pattern "rggb" has GRBG fourcc. This patch fixes it. Signed-off-by: Mirco Di Salvo Signed-off-by: Andrea Merello Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 83268fa6b43cefb60ee188fd53ed49120d3ae4f4 Author: Dhaval Shah Date: Fri Dec 8 07:35:37 2017 -0500 media: xilinx: Use SPDX-License-Identifier SPDX-License-Identifier is used for the Xilinx Video IP and related drivers. [Added drivers/media/platform/xilinx/Kconfig] [Added drivers/media/platform/xilinx/Makefile] [Added include/dt-bindings/media/xilinx-vip.h] Signed-off-by: Dhaval Shah Signed-off-by: Laurent Pinchart Acked-by: Michal Simek Signed-off-by: Mauro Carvalho Chehab commit 5d331b7f4c4c9042298028f73f9f782b11fadaa2 Author: Neil Armstrong Date: Thu Nov 8 07:50:10 2018 -0500 media: sony-cxd2880: add optional vcc regulator to bindings This patchset adds an optional VCC regulator to the bindings of the Sony CXD2880 DVB-T2/T tuner + demodulator adapter. Signed-off-by: Neil Armstrong Acked-by: Yasunari Takiguchi Reviewed-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cb496cd472af3ec922063c14fd71a72db4467f6f Author: Neil Armstrong Date: Thu Nov 8 07:50:09 2018 -0500 media: cxd2880-spi: Add optional vcc regulator This patchset adds an optional VCC regulator to the driver probe function to make sure power is enabled to the module before starting attaching to the device. Signed-off-by: Neil Armstrong Acked-by: Yasunari Takiguchi Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6c0943cdb54d77989126339e8ea44d91b33dda15 Author: Hans Verkuil Date: Thu Nov 22 05:03:01 2018 -0500 media: dib0900: fix smatch warnings drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1075 dib0090_pwm_gain_reset() warn: '*&bb_ramp_pwm_normal' 2590696709486571520 can't fit into 65535 '*bb_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1083 dib0090_pwm_gain_reset() warn: '*&bb_ramp_pwm_normal_socs' 2590696709486571520 can't fit into 65535 '*bb_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1085 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_cband_8090' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1089 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_cband_7090e_sensitivity' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1093 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_cband_7090p' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1096 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_cband' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1101 dib0090_pwm_gain_reset() warn: '*&bb_ramp_pwm_normal_socs' 2590696709486571520 can't fit into 65535 '*bb_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1104 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_vhf' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1107 dib0090_pwm_gain_reset() warn: '*&bb_ramp_pwm_normal_socs' 2590696709486571520 can't fit into 65535 '*bb_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1109 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_uhf_8090' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1111 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_uhf_7090' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1113 dib0090_pwm_gain_reset() warn: '*&rf_ramp_pwm_uhf' 2590696709486571520 can't fit into 65535 '*rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1419 dib0090_update_rframp_7090() warn: '*&rf_ramp_pwm_cband_7090e_sensitivity' 2590696709486571520 can't fit into 65535 '*state->rf_ramp' drivers/media/dvb-frontends/dib0090.c: drivers/media/dvb-frontends/dib0090.c:1421 dib0090_update_rframp_7090() warn: '*&rf_ramp_pwm_cband_7090e_aci' 2590696709486571520 can't fit into 65535 '*state->rf_ramp' For no apparent reason this code casts away the const of the const u16 arrays, and it also takes the address of an array. While that's ignored in C I think smatch gets confused by it. Signed-off-by: Hans Verkuil Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 28fc5a367ef0d856a5f3f49a73a391a51b035fdb Author: Julia Lawall Date: Sat Oct 27 07:46:11 2018 -0400 media: mxl5xx: constify dvb_frontend_ops structure The dvb_frontend_ops structure is only copied into the ops field of a dvb_frontend structure, so it can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2c4746cf45b957962c03f1c10a3d068d7db68924 Author: zhong jiang Date: Wed Sep 19 04:16:09 2018 -0400 media: dvb-frontends: Use kmemdup instead of duplicating its function kmemdup has implemented the function that kmalloc() + memcpy(). We prefer to kmemdup rather than code opened implementation. Signed-off-by: zhong jiang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 73f847af391ad51b712b736de8a04bed77213fd9 Author: zhong jiang Date: Tue Sep 18 11:25:25 2018 -0400 media: usb: Use kmemdup instead of duplicating its function. kmemdup has implemented the function that kmalloc() + memcpy(). We prefer to kmemdup rather than code opened implementation. Signed-off-by: zhong jiang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2f2fcc40a961ed04f0e130803fbaa868c2899310 Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:12 2018 +0100 x86/fpu: Update comment for __raw_xsave_addr() The comment above __raw_xsave_addr() claims that the function does not work for compacted buffers and was introduced in: b8b9b6ba9dec3 ("x86/fpu: Allow setting of XSAVE state") In this commit, the function was factored out of get_xsave_addr() and this function claims that it works with "standard format or compacted format of xsave area". It accesses the "xstate_comp_offsets" variable for the actual offset and it was introduced in commit 7496d6458fe32 ("Define kernel API to get address of each state in xsave area") Based on the code (back then and now): - xstate_offsets holds the standard offset. - if compacted mode is not supported then xstate_comp_offsets gets the xstate_offsets copied. - if compacted mode is supported then xstate_comp_offsets will hold the offset for the compacted buffer. Based on that the function works for compacted buffers as long as the CPU supports it and this what we care about. Remove the "Note:" which is not accurate. Suggested-by: Paolo Bonzini Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Dave Hansen Cc: Ingo Molnar Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-7-bigeasy@linutronix.de commit 458ffce1cb46e46e3cec48b625ed142250475708 Author: Neil Armstrong Date: Thu Nov 8 07:44:48 2018 -0500 media: cxd2880-spi: fix probe when dvb_attach fails When dvb_attach fails, probe returns 0, and remove crashes afterwards. This patch sets the return value to -ENODEV when attach fails. Fixes: bd24fcddf6b8 ("media: cxd2880-spi: Add support for CXD2880 SPI interface") Signed-off-by: Neil Armstrong Acked-by: Yasunari Takiguchi Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit bac26a63f9bff338534610232c2827b877e0b312 Author: Victor Toso Date: Tue Oct 30 12:14:49 2018 -0400 media: dvb: Use WARM definition from identify_state() Device should be either COLD or WARM. This change only make usage of the existing definition. Signed-off-by: Victor Toso Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 09a446d27843e4de43af5b0f3ed7fb7c013fc7b6 Author: Victor Toso Date: Tue Oct 30 12:14:48 2018 -0400 media: af9033: Remove duplicated switch statement The switch before set is_af9035 or is_it9135 which makes the second switch redundant. Keeping the comment as to avoid sleep on IT9135. Signed-off-by: Victor Toso Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6bca5de961cc443f2dc1c0b3d7804adbf9c4cfc8 Author: Colin Ian King Date: Sun Nov 25 17:51:14 2018 -0500 media: dib0700: fix spelling mistake "Amplifyer" -> "Amplifier" There is a spelling mistake in the MODULE_PARM_DESC text, fix it. Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 255095fa7f62ff09b6f61393414535c59c6b4cb0 Author: Malcolm Priestley Date: Mon Nov 26 15:18:25 2018 -0500 media: dvb-usb-v2: Fix incorrect use of transfer_flags URB_FREE_BUFFER commit 1a0c10ed7bb1 ("media: dvb-usb-v2: stop using coherent memory for URBs") incorrectly adds URB_FREE_BUFFER after every urb transfer. It cannot use this flag because it reconfigures the URBs accordingly to suit connected devices. In doing a call to usb_free_urb is made and invertedly frees the buffers. The stream buffer should remain constant while driver is up. Signed-off-by: Malcolm Priestley CC: stable@vger.kernel.org # v4.18+ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2ad18d1d785fdc46b9b778c20c64a48c33b7c0ba Author: Sean Young Date: Sun Nov 25 12:59:48 2018 -0500 media: saa7134: rc-core maintains users count, no need to duplicate This simplifies the code a little. Tested with suspend and resume. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 87e25f4b2c3c85804502c7f2364f396e59f0ff2d Author: Alexandre Courbot Date: Tue Nov 13 04:30:48 2018 -0500 media: venus: fix reported size of 0-length buffers The last buffer is often signaled by an empty buffer with the V4L2_BUF_FLAG_LAST flag set. Such buffers were returned with the bytesused field set to the full size of the OPB, which leads user-space to believe that the buffer actually contains useful data. Fix this by passing the number of bytes reported used by the firmware. Signed-off-by: Alexandre Courbot Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61df5aa325fec4f54ee5d27c086ed6e729213ce7 Author: Malathi Gottam Date: Fri Nov 2 08:41:16 2018 -0400 media: venus: dynamic handling of bitrate Any request for a change in bitrate after both planes are streamed on is handled by setting the target bitrate property to hardware. Signed-off-by: Malathi Gottam Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6637401c35b2f327a35d27f44bda05e327f2f017 Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:11 2018 +0100 x86/fpu: Add might_fault() to user_insn() Every user of user_insn() passes an user memory pointer to this macro. Add might_fault() to user_insn() so we can spot users which are using this macro in sections where page faulting is not allowed. [ bp: Space it out to make it more visible. ] Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Dave Hansen Cc: Ingo Molnar Cc: Jann Horn Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-6-bigeasy@linutronix.de commit ff70fbd0e81018b45daad5f64ee03ce32d20c917 Author: Lucas Stach Date: Sat Dec 1 10:52:13 2018 +0000 clk: imx: Add SCCG PLL type The SCCG is a new PLL type introduced on i.MX8. The description of this SCCG clock can be found here: https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf#page=834 Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Stephen Boyd commit 6209624b9a5c1e417b142e9688f5fc96c1e0cd58 Author: Lucas Stach Date: Sat Dec 1 10:52:11 2018 +0000 clk: imx: Add fractional PLL output clock This is a new fractional clock type introduced on i.MX8. The description of this fractional clock can be found here: https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf#page=834 Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Stephen Boyd commit 1cf3817bf1f52e57b3f5eb0413ee0d7f0c2e9829 Author: Lucas Stach Date: Sat Dec 1 10:52:10 2018 +0000 dt-bindings: Add binding for i.MX8MQ CCM This adds the binding for the i.MX8MQ Clock Controller Module. Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit b80522040cd3f0944410a6635ceda111a6d651be Author: Abel Vesa Date: Sat Dec 1 10:52:15 2018 +0000 clk: imx: Add clock driver for i.MX8MQ CCM Add driver for the Clock Control Module found on i.MX8MQ. Signed-off-by: Anson Huang Signed-off-by: Bai Ping Signed-off-by: Lucas Stach Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Stephen Boyd commit d3ff9728134eeaa13d5bbb23c3f2e188f99cfdf9 Author: Abel Vesa Date: Sat Dec 1 10:52:14 2018 +0000 clk: imx: Add imx composite clock Since a lot of clocks on imx8m are formed by a mux, gate, predivider and divider, the idea here is to combine all of those into one composite clock, but we need to deal with both predivider and divider at the same time and therefore we add the imx8m_clk_composite_divider_ops and register the composite clock with those. Signed-off-by: Abel Vesa Suggested-by: Sascha Hauer Reviewed-by: Sascha Hauer Signed-off-by: Stephen Boyd commit 1a4226efaf808fe9079ea3b29919883008918297 Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:10 2018 +0100 x86/pkeys: Make init_pkru_value static The variable init_pkru_value isn't used outside of this file. Make it static. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Acked-by: Dave Hansen Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-5-bigeasy@linutronix.de commit d23650e06299e9b2d04e090ab8c625cdf24465bf Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:09 2018 +0100 x86/thread_info: Remove _TIF_ALLWORK_MASK There is no user of _TIF_ALLWORK_MASK since commit 21d375b6b34ff ("x86/entry/64: Remove the SYSCALL64 fast path"). Remove the unused define _TIF_ALLWORK_MASK. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Dave Hansen Cc: David Howells Cc: Ingo Molnar Cc: Konrad Rzeszutek Wilk Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Tim Chen Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-4-bigeasy@linutronix.de commit 4f89f7b59a6ea17e81cff212c18a0b580ff5ff27 Author: Jeffrey Hugo Date: Mon Dec 3 09:13:43 2018 -0700 clk: qcom: Fix MSM8998 resets The offsets for the defined BCR reset registers does not match the hardware documentation. Update the values to match the hardware documentation. Fixes: b5f5f525c547 (clk: qcom: Add MSM8998 Global Clock Control (GCC) driver) Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit e08e32119b944f519664451bfb342a25b4045ead Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:08 2018 +0100 x86/process/32: Remove asm/math_emu.h include The math_emu.h header files contains the definition of struct math_emu_info which is not used in this file. Remove the asm/math_emu.h include. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Dave Hansen Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Rik van Riel Cc: Thomas Gleixner Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-3-bigeasy@linutronix.de commit c820518f6ca150d099aaeb7b71ad9e96c61113c0 Author: Geert Uytterhoeven Date: Fri Jun 22 13:04:19 2018 +0200 firewire: Remove depends on HAS_DMA in case of platform dependency Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mark Brown Acked-by: Robin Murphy Signed-off-by: Stefan Richter commit d08452390179710dc7989242605e3c1faa62b64f Author: Sebastian Andrzej Siewior Date: Wed Nov 28 23:20:07 2018 +0100 x86/fpu: Use unsigned long long shift in xfeature_uncompacted_offset() The xfeature mask is 64-bit so a shift from a number to its mask should have ULL suffix or else bits above position 31 will be lost. This is not a problem now but should XFEATURE_MASK_SUPERVISOR gain a bit >31 then this check won't catch it. Use BIT_ULL() to compute a mask from a number. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Reviewed-by: Rik van Riel Cc: "H. Peter Anvin" Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Dave Hansen Cc: Ingo Molnar Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm ML Cc: x86-ml Link: https://lkml.kernel.org/r/20181128222035.2996-2-bigeasy@linutronix.de commit 8d3e5b9c1f2cdb9c81073e1f51643617078076ed Author: Taniya Das Date: Fri Nov 30 23:51:29 2018 +0530 clk: qcom: Add lpass clock controller driver for SDM845 Add support for the lpass clock controller found on SDM845 based devices. This would allow lpass peripheral loader drivers to control the clocks to bring the subsystem out of reset. LPASS clocks present on the global clock controller would be registered with the clock framework based on the protected-clock flag. Also do not gate these clocks if they are left unused, as the lpass clocks require the global clock controller lpass clocks to be enabled before they are accessed. Mark the GCC lpass clocks as CRITICAL, for the LPASS clock access. Signed-off-by: Taniya Das Signed-off-by: Stephen Boyd commit 8ff1a156cb0b40a267fe7a2c69c06a6d566a7524 Author: Taniya Das Date: Fri Nov 30 23:51:28 2018 +0530 dt-bindings: clock: Introduce QCOM LPASS clock bindings Add device tree bindings for Low Power Audio subsystem clock controller for Qualcomm Technology Inc's SDM845 SoCs. Reviewed-by: Rob Herring Signed-off-by: Taniya Das Signed-off-by: Stephen Boyd commit 7898e4fef8352ef8a0d2bbd13c10fcc77c38e80e Author: Taniya Das Date: Fri Nov 30 23:51:27 2018 +0530 dt-bindings: clock: Update GCC bindings for protected-clocks Add protected-clocks list which could used to specify the clocks to be bypassed on certain devices. Reviewed-by: Rob Herring Signed-off-by: Taniya Das Signed-off-by: Stephen Boyd commit 61d69528689b96984970388b319b0c92f5679274 Merge: 34f4c9554d8b2 974d6b4b2bc33 Author: Doug Ledford Date: Mon Dec 3 12:20:53 2018 -0500 Merge branch 'write-handler-consistent-flow' into for-next Make all of the write() handlers use a consistent flow From Jason, This series unifies all the write handlers to use a flow that is very similar to the ioctl handler flow, including having the same basic assumptions about extensible buffer handling and the same handler function call signature. Along the way this consolidates all the copy_to/from_user into a small set of safe buffer accessor functions tailored to the usage here. These accessors use the new dispatcher-controlled calling convention for ucore data, and support a placement of the response that does not rely on the cmd.response value. Overall this brings in in strong bounds checking to all the write() handlers and consistent enforcement of the zero-fill/zero-check methodology for buffer extension. The end result is a significant complexity reduction for all of the handlers and creates a high degree of uniformity between the write, write_ex, and ioctl handlers and dispatch flow. Thanks Jason Gunthorpe (12): RDMA/uverbs: Remove out_len checks that are now done by the core RDMA/uverbs: Use uverbs_attr_bundle to pass ucore for write/write_ex RDMA/uverbs: Get rid of the 'callback' scheme in the compat path RDMA/uverbs: Use uverbs_response() for remaining response copying RDMA/uverbs: Use uverbs_request() for request copying RDMA/uverbs: Use uverbs_request() and core for write_ex handlers RDMA/uverbs: Fill in the response for IB_USER_VERBS_EX_CMD_MODIFY_QP RDMA/uverbs: Simplify ib_uverbs_ex_query_device RDMA/uverbs: Add a simple iterator interface for reading the command RDMA/uverbs: Use the iterator for ib_uverbs_unmarshall_recv() RDMA/uverbs: Do not check the input length on create_cq/qp paths RDMA/uverbs: Use only attrs for the write() handler signature drivers/infiniband/core/rdma_core.h | 5 +- drivers/infiniband/core/uverbs_cmd.c | 1165 ++++++++++--------------- drivers/infiniband/core/uverbs_main.c | 23 +- drivers/infiniband/core/uverbs_uapi.c | 23 +- include/rdma/uverbs_ioctl.h | 9 +- 5 files changed, 479 insertions(+), 746 deletions(-) Signed-off-by: Doug Ledford commit b12a084c8729ef423089bb9a5a143eed39cd94e7 Author: Yogesh Narayan Gaur Date: Mon Dec 3 08:39:12 2018 +0000 spi: spi-mem: add support for octal mode I/O data transfer Add support for octal mode I/O data transfer in spi-mem framework. Signed-off-by: Yogesh Gaur Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit 6b03061f882de49b83ccf44beb3a12c920a2da1b Author: Yogesh Narayan Gaur Date: Mon Dec 3 08:39:06 2018 +0000 spi: add support for octal mode I/O data transfer Add flags for Octal mode I/O data transfer Required for the SPI controller which can do the data transfer (TX/RX) on 8 data lines e.g. NXP FlexSPI controller. SPI_TX_OCTAL: transmit with 8 wires SPI_RX_OCTAL: receive with 8 wires Signed-off-by: Yogesh Gaur Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit c9cbfd623d8bcfbbe9a37be13b247fa0ce8e92e7 Author: Lukasz Luba Date: Mon Dec 3 15:31:15 2018 +0100 ARM: dts: exynos: Add opp-suspend to DMC and leftbus devfreq OPPs on Exynos4 Mark as opp-suspend required devfreq Operating Performance Points to fix resuming issues on Exynos 4 boards. The patch is based on earlier work by Tobias Jakobi. Suggested-by: Tobias Jakobi Suggested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit 974d6b4b2bc33c53334e086a40715b384f48f2e2 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:45 2018 +0200 RDMA/uverbs: Use only attrs for the write() handler signature All of the old arguments can be derived from the uverbs_attr_bundle structure, so get rid of the redundant arguments. Most of the prior work has been removing users of the arguments to allow this to be a simple patch. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit ece9ca97ccdc845c0c48e204e5a6d9149b7a24b3 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:44 2018 +0200 RDMA/uverbs: Do not check the input length on create_cq/qp paths If the user did not provide a long enough command buffer then the missing bytes are forced to zero. There is no reason to check the length if a zero value is OK. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit c3bea3d2dc5358e05541527283279102383b0231 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:43 2018 +0200 RDMA/uverbs: Use the iterator for ib_uverbs_unmarshall_recv() This has a very complicated memory layout, with two flex arrays. Use the iterator API to make reading it clearer. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 335708c751c1462b674892212e965fdde4c9b0d9 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:42 2018 +0200 RDMA/uverbs: Add a simple iterator interface for reading the command Several methods have a command with a trailing flex array, and they all open code some extraction scheme. Centralize this into a simple iterator API. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 7eebced1bae034e11a86c454383b24715eb087b6 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:41 2018 +0200 RDMA/uverbs: Simplify ib_uverbs_ex_query_device We truncate the response structure if there is not enough room in the user buffer so there is no reason to have all the mess with finely managing response_length. Just fully fill the attrs and truncate on copy. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 40efca7a46a04223e6792fbe23ba337f54cff794 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:40 2018 +0200 RDMA/uverbs: Fill in the response for IB_USER_VERBS_EX_CMD_MODIFY_QP A response struct was defined, and userspace is providing it (but not checking it). Fill it in and write it out. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 29a29d18523235e749916a0154435f26f3238639 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:39 2018 +0200 RDMA/uverbs: Use uverbs_request() and core for write_ex handlers The write_ex handlers have this horrible boilerplate in every function to do the zero extend/zero check and min size checks. This is now handled in the core code via the meta-data, and the zero checks are handled by uverbs_request(). Replace all the occurrences. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 3c2c20947ddbb897a1459f149509ac03e35043e1 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:38 2018 +0200 RDMA/uverbs: Use uverbs_request() for request copying This function properly zero-extends, and zero-checks if the user buffer is not the same size as the kernel command struct. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 9a0738575f2691d3a417fb5f83b6dcdaf0dcc36e Author: Jason Gunthorpe Date: Sun Nov 25 20:58:37 2018 +0200 RDMA/uverbs: Use uverbs_response() for remaining response copying This function properly truncates and zero-fills the response which is the standard used by the ioctl uAPI when working with user data. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 931373a118acce816561f04dc9832b85172e65b8 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:36 2018 +0200 RDMA/uverbs: Get rid of the 'callback' scheme in the compat path There is no reason for this. For response processing we simply need to copy, truncate, and zero fill the response into whatever output buffer was provided. Add a function uverbs_response() that does this consistently. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit c2a939fda468bb5c4144a64fd2b9cbdad323bf68 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:35 2018 +0200 RDMA/uverbs: Use uverbs_attr_bundle to pass ucore for write/write_ex This creates a consistent way to access the two core buffers across write and write_ex handlers. Remove the open coded ucore conversion in the write/ex compatibility handlers. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit bbb28ad9035f8efa9c5581b3809ff8055cc1f4b2 Author: Jason Gunthorpe Date: Sun Nov 25 20:58:34 2018 +0200 RDMA/uverbs: Remove out_len checks that are now done by the core write() methods must work with fixed sized structures as that is the only way to know where the udata segment starts. The common udata code now rejects any write() that has a response buffer shorter than the core's response. Thus all the checks of out_len for write methods are redundant and can be removed. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford commit 86bbd89d5da66fe760049ad3f04adc407ec0c4d6 Author: Christian König Date: Tue Nov 13 14:14:00 2018 +0100 drm/syncobj: use dma_fence_get_stub Extract of useful code from the timeline work. Let's use just a single stub fence instance instead of allocating a new one all the time. Signed-off-by: Christian König Reviewed-by: Chris Wilson Reviewed-by: Chunming Zhou Link: https://patchwork.freedesktop.org/patch/265248/ commit 078dec3326e2244c62e8a8d970ba24359e3464be Author: Christian König Date: Mon Dec 3 13:36:14 2018 +0100 dma-buf: add dma_fence_get_stub Extract of useful code from the timeline work. This provides a function to return a stub or dummy fence which is always signaled. Signed-off-by: Christian König Reviewed-by: Chris Wilson Reviewed-by: Chunming Zhou Link: https://patchwork.freedesktop.org/patch/265248/ commit 1e7eacaf1db2f0f5f62fceda4e6c5a8869f00c13 Author: YueHaibing Date: Sat Dec 1 03:12:56 2018 +0000 cpuset: Remove set but not used variable 'cs' Fixes gcc '-Wunused-but-set-variable' warning: kernel/cgroup/cpuset.c: In function 'cpuset_cancel_attach': kernel/cgroup/cpuset.c:2167:17: warning: variable 'cs' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from subtree_control enabling") Signed-off-by: YueHaibing Signed-off-by: Tejun Heo commit e1215de823ca50ba1ca313c35ec75abad0362593 Author: Jani Nikula Date: Thu Oct 4 17:37:50 2018 +0300 drm/i915/sysfs: make attrs arrays const They don't need to be modified. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Reviewed-by: Rafael J. Wysocki Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181004143750.30880-2-jani.nikula@intel.com commit 9ee4685c9ac591b71af755657c3f6ce428ebcca4 Author: Jani Nikula Date: Thu Oct 4 17:37:49 2018 +0300 sysfs: constify sysfs create/remove files harder Let the passed in array be const (and thus placed in rodata) instead of a mutable array of const pointers. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Reviewed-by: Rafael J. Wysocki Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181004143750.30880-1-jani.nikula@intel.com commit d4535e2c018bba71b49edeb5e396183920f5d341 Author: Andrey Grodzovsky Date: Thu Nov 29 15:14:27 2018 -0500 drm/amdgpu: Implement concurrent asic reset for XGMI. Use per hive wq to concurrently send reset commands to all nodes in the hive. v2: Switch to system_highpri_wq after dropping dedicated queue. Fix non XGMI code path KASAN error. Stop the hive reset for each node loop if there is a reset failure on any of the nodes. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a82400b57abb6aff068bb3b21d1cccd63acbb863 Author: Andrey Grodzovsky Date: Thu Nov 29 12:21:53 2018 -0500 drm/amdgpu: Handle xgmi device removal. XGMI hive has some resources allocted on device init which needs to be deallocated when the device is unregistered. v2: Remove creation of dedicated wq for XGMI hive reset. v3: Use the gmc.xgmi.supported flag Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 38cd8a280d725cd4e0be14b0fbc2797c26cd9de5 Author: Andrey Grodzovsky Date: Fri Nov 30 12:24:33 2018 -0500 drm/amdgpu/psp: Update waiting in psp mode1 reset. No point in use mdelay unless running from interrupt context (which we are not) This is busy wait which will block the CPU for the entirety of the wait time. Also, reduce wait time to 500ms as it is done in refernce code because 1s might cause PSP FW TO issues during XGMI hive reset. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 30da7bb18471327fbeddb976de2b21fd9e34c36a Author: Christian König Date: Wed Sep 26 14:17:03 2018 +0200 drm/amdgpu: add missing error handling We ignored the return code here. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1245adf31569e117d11b4ac5839e7b6c53d21186 Author: Christian König Date: Wed Nov 7 09:23:26 2018 +0100 drm/amdgpu: remove amdgpu_bo_backup_to_shadow It is unused. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 47622ba033d6da529ff37d7e5238359a699496ab Author: Alex Deucher Date: Fri Nov 30 15:29:43 2018 -0500 drm/amdgpu: add a xgmi supported flag Use this to track whether an asic supports xgmi rather than checking the asic type everywhere. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 46592892e1a60f9e9de3287719143a148fce93cf Author: Chris Wilson Date: Fri Nov 30 12:59:54 2018 +0000 drm/i915/vgpu: Disallow loading on old vGPU hosts Since commit fd8526e50902 ("drm/i915/execlists: Trust the CSB") we actually broke the force-mmio mode for our execlists implementation. No one noticed, so ergo no one is actually using an old vGPU host (where we required the older method) and so can simply remove the broken support. v2: csb_read can go as well (Mika) Reported-by: Mika Kuoppala Fixes: fd8526e50902 ("drm/i915/execlists: Trust the CSB") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181130125954.11924-1-chris@chris-wilson.co.uk commit 4fb86404a977b932eed56c0dd0954f6225eee3eb Author: Alex Gonzalez Date: Thu Oct 25 17:09:30 2018 +0200 drm/panel: simple: Add AUO G101EVN010 panel support The change adds support for the AU Optronics G101EVN010 10.1" TFT LCD panel. Signed-off-by: Alex Gonzalez Reviewed-by: Rob Herring [treding@nvidia.com: sort new entry alphabetically] Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1540480173-12009-2-git-send-email-alex.gonzalez@digi.com commit 3456880ff39f7606866b5852fd71ef6663200c0d Author: Thomas Meyer Date: Mon Dec 3 10:02:01 2018 -0600 dlm: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Signed-off-by: David Teigland commit 0abbbc63d0251a25d3df6c8a56ab3d3c20af082c Author: Borislav Petkov Date: Tue Nov 27 21:54:18 2018 +0100 x86/umip: Print UMIP line only once ... instead of issuing it per CPU and flooding dmesg unnecessarily. Streamline the formulation, while at it. Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ricardo Neri Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20181127205936.30331-1-bp@alien8.de commit 917bb90c65da91719d9f2b8b6d8683c49c988553 Author: Thierry Reding Date: Mon Dec 3 16:53:17 2018 +0100 ALSA: hda/hdmi - Add Tegra186 and Tegra194 support Tegra186 and Tegra194 contain the same codecs as earlier chips and can be supported using the same patch function. Signed-off-by: Thierry Reding Signed-off-by: Takashi Iwai commit 350355e339312d6ac048086a4c5f6d0ea0bf915f Author: Thierry Reding Date: Mon Dec 3 16:53:16 2018 +0100 ALSA: hda/tegra - Probe up to 8 codecs Recent devices support more than the 4 codecs that the AZX core will probe by default. Probe up to 8 codecs to make sure all of them are enumerated. Suggested-by: Sameer Pujar Signed-off-by: Thierry Reding Signed-off-by: Takashi Iwai commit 7bb7d29cffdd24bf419516d14b6768591e74069e Author: Chen-Yu Tsai Date: Fri Nov 30 13:33:28 2018 +0800 clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent The third parent of CSI_MCLK is PLL_PERIPH1, not PLL_PERIPH0. Fix it. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Acked-by: Stephen Boyd Signed-off-by: Chen-Yu Tsai commit 8e2988a76c26f25178b1aa3f345c92dbef40cac4 Author: Thierry Reding Date: Mon Dec 3 15:46:03 2018 +0100 drm/tegra: sor: Support for audio over HDMI This code is very similar to the audio over HDMI support on older chips. Interoperation with the audio codec is done via a pair of codec scratch registers and an interrupt that is raised at the SOR when the codec has written those registers. Signed-off-by: Thierry Reding commit 984bfb398a3af6fa9b7e80165e524933b0616686 Author: Hans de Goede Date: Sun Dec 2 13:21:22 2018 +0100 ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Clapper The Clapper model Chromebook uses pmc_plt_clk_0 instead of pmc_plt_clk_3 for the mclk, just like the Swanky model. This commit adds a DMI based quirk for this. This fixing audio no longer working on these devices after commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") that commit fixes us unnecessary keeping unused clocks on, but in case of the Clapper that was breaking audio support since we were not using the right clock in the cht_bsw_max98090_ti machine driver. Cc: stable@vger.kernel.org Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8b457812f54b2baa70c15b8e7c8902c4c07b6589 Author: Thierry Reding Date: Wed Nov 28 18:26:34 2018 +0100 arm64: tegra: Add temperature sensor on P2888 The P2888 processor module contains a TI TMP451 temperature sensor with two channels. These are used to measure the temperatures at different locations on the module. Signed-off-by: Thierry Reding commit e47ac50885f530717946a41dd3aa0d9c26c6f154 Author: Thierry Reding Date: Wed Nov 28 18:19:57 2018 +0100 arm64: tegra: Add gpio-keys on Jetson Xavier The power and force recovery buttons found on Jetson Xavier are hooked up to two Tegra GPIOs. The power button can also function as a wake-up source. Signed-off-by: Thierry Reding commit 4d286331bdee4bb08b66531989d7c86d8eb7f891 Author: Thierry Reding Date: Wed Nov 28 18:19:56 2018 +0100 arm64: tegra: Add AON GPIO controller on Tegra194 The AON GPIO controller is in an always-on power partition and typically provides pins for functions that need to always work, such as the power key for example. Signed-off-by: Thierry Reding commit 3ae50e8331dae745e5c91bc73df0aa63488f0d07 Author: Thierry Reding Date: Wed Nov 28 17:50:50 2018 +0100 arm64: tegra: p2888: Enable on-die RTC The on-die RTC isn't hooked up to a backup battery, so it isn't useful to track time across reboots, but as long as power remains enabled, it keeps track of time accurately and can be used to wake the system from sleep, for example. Signed-off-by: Thierry Reding commit 37e5a31df5431cff64264f702c191e47a2ea419e Author: Thierry Reding Date: Wed Nov 28 17:50:49 2018 +0100 arm64: tegra: Add RTC support on Tegra194 The RTC on Tegra194 is very similar to the RTC on earlier generations. One notable exception is that the source clock is now the 32 kHz clock instead of a dedicated RTC clock and the RTC alarm is a wake event and can be used to wake the system from sleep. Signed-off-by: Thierry Reding commit 38ecf1e5f47167ae48ef31a1fd1fbbe9562eff2b Author: Thierry Reding Date: Wed Nov 28 18:19:55 2018 +0100 arm64: tegra: Enable PMC wake events on Tegra194 Wake events are a feature that allows the interrupt and GPIO controllers to be powered off as part of system sleep. The PMC which is always on is monitoring these wake events and can power up subsequent controllers as necessary to process them. Signed-off-by: Thierry Reding commit 127d82670174f44644ede9dd940bc53ca50c7c65 Author: Thierry Reding Date: Wed Nov 28 17:49:41 2018 +0100 arm64: tegra: p3310: Enable on-die RTC The on-die RTC isn't hooked up to a backup battery, so it isn't useful to track time across reboots, but as long as power remains enabled, it keeps track of time accurately and can be used to wake the system from sleep, for example. Signed-off-by: Thierry Reding commit 9733a251728ee5cf290840d99fba84990b5aae4e Author: Thierry Reding Date: Wed Nov 28 17:49:40 2018 +0100 arm64: tegra: Add RTC support on Tegra186 The RTC on Tegra186 is very similar to the RTC on earlier generations. One notable exception is that the source clock is now the 32 kHz clock instead of a dedicated RTC clock and the RTC alarm is a wake event and can be used to wake the system from sleep. Signed-off-by: Thierry Reding commit 32e66e46af0b343d892cb74020a7671508d90a61 Author: Thierry Reding Date: Wed Nov 28 18:19:54 2018 +0100 arm64: tegra: Enable PMC wake events on Tegra186 Wake events are a feature that allows the interrupt and GPIO controllers to be powered off as part of system sleep. The PMC which is always on is monitoring these wake events and can power up subsequent controllers as necessary to process them. Signed-off-by: Thierry Reding commit 6f13f10b3bbfed3b29c812f0f65bef802ce05e3c Author: Thierry Reding Date: Wed Nov 28 17:47:25 2018 +0100 arm64: tegra: Fix power key interrupt type on Jetson TX2 In order for the correct interrupt type to be configured, the event action for the power key needs to be "asserted". Signed-off-by: Thierry Reding commit cfe3af19d95821e53fecc752ae26e057642b06b4 Author: Thierry Reding Date: Fri Nov 23 13:18:39 2018 +0100 arm64: tegra: p2972: Enable the CPU, GPU and AUX thermal zones Enable these thermal zones to be able to monitor their temperatures and control the fan to cool down the system if necessary. Signed-off-by: Thierry Reding commit 686ba00900bb2bd1137bd19c8d22a6b0f95f0aba Author: Thierry Reding Date: Fri Nov 23 13:18:38 2018 +0100 arm64: tegra: Add thermal zones on Tegra194 The NVIDIA Tegra194 SoC defines six thermal zones. Define all of them in device tree. Signed-off-by: Thierry Reding commit 33c038e4b5adf0c66877e757bdc081fc3f54d2ac Author: Thierry Reding Date: Fri Nov 23 13:31:38 2018 +0100 arm64: tegra: Enable HDMI on P2972-0000 Add the 5V HDMI regulator and hook up the VDD_1V0 and VDD_1V8HS supplies from the PMIC to the display block. Also enable the display hub which is responsible for instantiating the display controllers. Finally, enable the third SOR that drives the TMDS signals to the HDMI connector. Signed-off-by: Thierry Reding commit 8d424ec221d0b72f316be04d10beb59fda6868bd Author: Thierry Reding Date: Fri Nov 23 13:31:37 2018 +0100 arm64: tegra: Add VIC support on Tegra194 Tegra194 has a version of VIC that is very similar to that on Tegra186. Add the device tree node for it that is enabled by default. Signed-off-by: Thierry Reding commit 3db6d3ba0863f46350969e76c1fa0fdb06b10f9f Author: Thierry Reding Date: Fri Nov 23 13:31:36 2018 +0100 arm64: tegra: Add display support on Tegra194 Tegra194 contains a display architecture very similar to that found on the Tegra186. One notable exception is that DSI is no longer a supported output. Instead there are four display controllers and four SORs (with a DPAUX associated to each of them) that can drive HDMI or DP. Signed-off-by: Thierry Reding commit f84a6273dd9107cbf61d46ee8e11eb8bdb4de506 Author: Daniel Mack Date: Sat Dec 1 15:08:46 2018 +0100 ASoC: pxa: remove raumfeld machine driver These boards are now fully ported to devicetree and make use of the simple-card driver, so the platform specific machine driver can be removed. Signed-off-by: Daniel Mack Signed-off-by: Mark Brown commit 26af893184e58fb4898c09afbb548e0d893972bc Author: Chris Wilson Date: Mon Dec 3 11:36:54 2018 +0000 drm/i915/breadcrumbs: Reduce missed-breadcrumb false positive rate Change the on-cpu check to on-runqueue to catch if the waiter has been woken (and reset its current_state back to TASK_UNINTERRUPTIBLE to perform the seqno check) but is sleeping due to being preempted off the cpu. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-1-chris@chris-wilson.co.uk commit 949fc52af19e5000073ee014b4f69ded137851ec Author: Jani Nikula Date: Mon Dec 3 11:43:26 2018 +0200 drm/i915/icl: add pll mapping for DSI Add encoder specific pll mapping for DSI. The differences with the DDI version are big enough to warrant a separate function. v2: add posting read (Madhav) Cc: Madhav Chauhan Cc: Vandita Kulkarni Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181203094326.28294-1-jani.nikula@intel.com commit 1026bea00381fe01326d220c55731ee150b89e10 Author: Madhav Chauhan Date: Thu Nov 29 16:12:34 2018 +0200 drm/i915/icl: Ungate DSI clocks Ungate the clocks on the selected port. Signed-off-by: Madhav Chauhan Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2a01b3158feda624f98581b780854fe3df8c328d.1543500286.git.jani.nikula@intel.com commit 32250c8e0ef909884b7d5fa4f6c7ea73a6125565 Author: Madhav Chauhan Date: Thu Nov 29 16:12:33 2018 +0200 drm/i915/icl: Gate clocks for DSI As per BSPEC, depending on the DSI transcoder being used, DDI clock for the associated port should be gated. This patch does the same. Signed-off-by: Madhav Chauhan Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e032bc3d8fff91b8c2631c73121268214615a7e8.1543500286.git.jani.nikula@intel.com commit 690c318ed8e06c2927c11fae366e55277f0cb42a Author: Jani Nikula Date: Thu Nov 29 16:12:32 2018 +0200 drm/i915/icl: add dummy DSI GPIO element execution function Add dummy debug logging GPIO element execution function for ICL. Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f59009ea0a0ebc489a5ec66f387d9dcf7264141f.1543500286.git.jani.nikula@intel.com commit 56b7b1aa13b971e50402a63c37aaf244644b4f8a Author: Madhav Chauhan Date: Thu Nov 29 16:12:31 2018 +0200 drm/i915/icl: Define display GPIO pins for DSI Display Pins are the only GPIOs that need to be used by driver for DSI panels. So driver should now have its own implementation to toggle these pins based on GPIO info received from VBT sequences. Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e7e3bb05d4f48b1876169a69f495bcf6d511fda5.1543500286.git.jani.nikula@intel.com commit f4ff2120301d85ce18438dbb64ad4bf5e9382506 Author: Madhav Chauhan Date: Thu Nov 29 16:12:30 2018 +0200 drm/i915/icl: Define Panel power ctrl register There are two panel power sequencers. Each register has two addressable instances. This patch defines both the instances of Panel power control register Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/99bb687b17a9165527a6210a79271c8175c8a4e3.1543500286.git.jani.nikula@intel.com commit 05f2f03dd206177fda22d9e442e8becaaf502093 Author: Madhav Chauhan Date: Thu Nov 29 16:12:29 2018 +0200 drm/i915/icl: Define missing bitfield for shortplug reg This patch define missing bitfield for shortplug ctl ddi register which will be used for ICL DSI GPIO programming. Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4b9feb75eb6c303556b91c8a23c505a4593a99a1.1543500286.git.jani.nikula@intel.com commit 2eae5d6bfa5f5d3e815cd0c76d864c0ff09b2c4c Author: Madhav Chauhan Date: Thu Nov 29 16:12:28 2018 +0200 drm/i915/icl: Get pipe timings for DSI Transcoder timings for Gen11 DSI encoder is available at pipe level unlike in older platform where port specific registers need to be accessed. v2 by Jani: - get timings for (!dsi || icl) instead of (dsi && icl). Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f60e0c1aee08248e758da3219d3239898b43ba41.1543500286.git.jani.nikula@intel.com commit 2ca711caeca2c6a4f3026d9fbdb135b65d7d68b3 Author: Madhav Chauhan Date: Thu Nov 29 16:12:27 2018 +0200 drm/i915/icl: Consider DSI for getting transcoder state For Gen11 DSI, we use similar registers like for eDP to find if DSI encoder is connected or not to a pipe. This patch refactors existing hsw_get_transcoder_state() to handle this. v2 by Jani: - Add WARN_ON(dsi && edp) (Ville) Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2e10b977dfc7aa985a8559d6cd59ed0981848e95.1543500286.git.jani.nikula@intel.com commit 5a8507b5aa84fe26f2511fd667aa5965499c9d82 Author: Madhav Chauhan Date: Thu Nov 29 16:12:26 2018 +0200 drm/i915/icl: Configure DSI Dual link mode This patch configures DSI video mode dual link by programming DSS_CTL registers. v2: Use new bitfield definitions from Anusha's patch Correct register to be programmed and use max depth buffer value (James) v3 by Jani: - checkpatch fixes Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/d8962f4e1beffc2099b8bef8cb5a5191aa1d9efd.1543500286.git.jani.nikula@intel.com commit d04afb150172d0bd96bf115b62a6208bdc7e01ce Author: Madhav Chauhan Date: Thu Nov 29 16:12:25 2018 +0200 drm/i915/icl: Add DSI encoder compute config hook This patch implements compute config for Gen11 DSI encoder which is required at the time of modeset. For DSI 8X clock is AFE clock which is 5 times port clock. v2 by Jani: - drop the enable nop hook - fixed_mode is always true - HAS_GMCH_DISPLAY() is always false v3 by Jani: - set encoder->compute_config dropped during rebase v4 by Jani: - squash Vandita's port clock patch - remove todo comment Co-developed-by: Vandita Kulkarni Signed-off-by: Madhav Chauhan Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a21574173caa5e2932d9e3c537b0931097ab5ac2.1543500286.git.jani.nikula@intel.com commit ab8411483a3e37fd104c9947ead5d687aa1d1ad9 Author: Madhav Chauhan Date: Thu Nov 29 16:12:24 2018 +0200 drm/i915/icl: Get HW state for DSI encoder This patch read out the current hw state for DSI and return true if encoder is active. v2 by Jani: - Squash connector get hw state hook here - Squash encode get hw state fix here v3 by Jani: - Add encoder->get_power_domains() (Imre) v4 by Jani: - Make encoder->get_power_domains() sensible... (Imre) v5 by Jani: - Power domains are bit positions, not bits (Stan, Imre) Cc: Imre Deak Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ec6da32a55b9fb045527f14e41ed3dce86d46a97.1543500286.git.jani.nikula@intel.com commit 8327af281d292524822bae5388d76742750e63b5 Author: Vandita Kulkarni Date: Thu Nov 29 16:12:23 2018 +0200 drm/i915/icl: Add get config functionality for DSI This patch implements the functionality for getting PIPE configuration to which DSI encoder is connected. Use the same method to get port clock like other DDI encoders. Used during the atomic modeset. v2 by Jani: - Squash Madhav's and Vandita's get config bits together - Move cnl_calc_wrpll_link() to intel_drv.h - Drop extra temp variables - Use enc_to_intel_dsi() instead of open coding Co-developed-by: Madhav Chauhan Signed-off-by: Vandita Kulkarni Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f21fa4258068d04582f2bf30735e5536a8043bdf.1543500286.git.jani.nikula@intel.com commit c5f9c934936e33198f8c43e0a7c261aac5960344 Author: Madhav Chauhan Date: Thu Nov 29 16:12:22 2018 +0200 drm/i915/icl: Allocate DSI hosts and imlement host transfer Allocate DSI host structure for each DSI port available on gen11 and register them with DSI fwk of DRM. Some of the DSI host operations are also registered as part of this. Retrieves DSI pkt (from DSI msg) to be sent over DSI link using DRM DSI exported functions. A wrapper function is also added as "DSI host transfer" for sending DSI data/cmd. Add DSI packet payload to command payload queue using credit based mechanism for *long* packets. v2 by Jani: - indentation - Use the new credit available helper - Use int for free_credits - Add intel_dsi local variable for better code flow - Use the new credit available helper - Use int for free_credits, i, and j v3 by Jani: - Squash DSI host allocation and transfer patches together Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/af4f168ed8737d44687d8b6f21ecaa7e805eb695.1543500286.git.jani.nikula@intel.com commit 972d607c59ed4170cd25350d22ded19477360cb9 Author: Madhav Chauhan Date: Thu Nov 29 16:12:21 2018 +0200 drm/i915/icl: Fill DSI ports info This patch fills backlight, CABC and general port info for Gen11 DSI. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/48c9f867d61a60dc7c2ce744ac2325655652c55f.1543500286.git.jani.nikula@intel.com commit 95f2f4dbb19ff097fc86f4ea7529e6453bab3eb9 Author: Vandita Kulkarni Date: Thu Nov 29 16:12:20 2018 +0200 drm/i915/icl: Use the same pll functions for dsi The same pll manager functions can be used to enable dpll for mipi. Hence enabling the IO power and esc clock as part of pre pll enable call. v2 by Jani: - fix function parameter indent (Madhav) Signed-off-by: Vandita Kulkarni Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/07db5b1ce59c00295fad8a8e81908d59d8d76915.1543500286.git.jani.nikula@intel.com commit e275804873212fa0585f8d4efee5105ba3e50f83 Author: Madhav Chauhan Date: Thu Nov 29 16:12:19 2018 +0200 drm/i915/icl: Allocate DSI encoder/connector This patch allocates memory for DSI encoder and connector which will be used for various DSI encoder/connector operations and attaching the same to DRM subsystem. This patch also extracts DSI modes info from VBT and save the desired mode info to connector. v2 by Jani: - Drop GEN11 prefix from encoder name - Drop extra parenthesis - Drop extra local variable - Squash encoder power domain here v3 by Jani: - Squash connector and connector helper functions here - Move intel_dsi_vbt_init call here Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0197023b92ffa2d59064e30fd4ca22b6a4cff16c.1543500286.git.jani.nikula@intel.com commit 70a057b7d42582dc846be3d0502dde7e2bd33914 Author: Madhav Chauhan Date: Thu Nov 29 16:12:18 2018 +0200 drm/i915/icl: Calculate DPLL params for DSI This patch calculates various DPLL dividers and parameters for DSI encoder and adjust AFE clock for DSI. For DSI, 8x clock is AFE clock. v2: Extend haswell_crtc_compute_clock() for Gen11 DSI v3: Rebase v4: use port clock instead of bitrate. v5: Reabse and remove divide by 5 v6 by Jani: - Fix indent (Madhav) - Fix dpll state calc for EDP and DP MST Co-developed-by: Vandita Kulkarni Signed-off-by: Madhav Chauhan Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/525d41d0d893dcdc8874d2ce70afa226227ea3f4.1543500285.git.jani.nikula@intel.com commit 1dd07e56a3f1b38a68f3dbd263a4badc53ae274a Author: Imre Deak Date: Thu Nov 29 16:12:17 2018 +0200 drm/i915/icl: Sanitize DDI port clock gating for DSI ports The requirement for the DDI port clock gating for a port in DSI mode is the opposite wrt. the case when the port is in DDI mode: the clock should be gated when the port is active and ungated when the port is inactive. Note that we cannot simply keep the DDI clock gated when the port will be only used in DSI mode: it must be gated/ungated at a specific spot in the DSI enable/disable sequence. Ensure the above for all ports of a DSI encoder, also adding a sanity check that we haven't registered another encoder using the same port (VBT should never allow this to happen). Cc: Madhav Chauhan Cc: Vandita Kulkarni Cc: Jani Nikula Cc: Ville Syrjälä Cc: Clint Taylor Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ceb14d5a68e8e23988d923d4290a4f981789e616.1543500285.git.jani.nikula@intel.com commit 3b8c0d5bc9f48e3f2c2ecde08117f93fb6937d1a Author: Jani Nikula Date: Thu Nov 29 16:12:16 2018 +0200 drm/i915/icl: push pll to port mapping/unmapping to ddi encoder hooks Unclutter the haswell_crtc_enable() and haswell_crtc_disable() functions a bit by moving the pll to port mapping and unmapping functions to the ddi encoder hooks. This allows removal of a bunch of boilerplate code from the functions. Additionally, the ICL DSI encoder needs to do the clock gating and ungating slightly differently, and this allows its own handling in a clean fashion. Cc: Madhav Chauhan Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Madhav Chauhan Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f8e2982ceea4c05dc254a0c15e2b3be1d5f271d3.1543500285.git.jani.nikula@intel.com commit c07b6426df922d21a13a959cf785d46e9c531941 Author: Paul Gortmaker Date: Sat Dec 1 14:19:17 2018 -0500 iommu/arm-smmu: Make arm-smmu-v3 explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config ARM_SMMU_V3 drivers/iommu/Kconfig: bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, but unlike most drivers, we can't delete the function tied to the ".remove" field. This is because as of commit 7aa8619a66ae ("iommu/arm-smmu-v3: Implement shutdown method") the .remove function was given a one line wrapper and re-used to provide a .shutdown service. So we delete the wrapper and re-name the function from remove to shutdown. We add a moduleparam.h include since the file does actually declare some module parameters, and leaving them as such is the easiest way currently to remain backwards compatible with existing use cases. 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: Will Deacon Cc: Joerg Roedel Cc: Robin Murphy Cc: Nate Watterson Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Acked-by: Robin Murphy Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit addb672f200f4e99368270da205320b83efe01a0 Author: Paul Gortmaker Date: Sat Dec 1 14:19:16 2018 -0500 iommu/arm-smmu: Make arm-smmu explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config ARM_SMMU drivers/iommu/Kconfig: bool "ARM Ltd. System MMU (SMMU) Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, but unlike most drivers, we can't delete the function tied to the ".remove" field. This is because as of commit 7aa8619a66ae ("iommu/arm-smmu-v3: Implement shutdown method") the .remove function was given a one line wrapper and re-used to provide a .shutdown service. So we delete the wrapper and re-name the function from remove to shutdown. We add a moduleparam.h include since the file does actually declare some module parameters, and leaving them as such is the easiest way currently to remain backwards compatible with existing use cases. 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: Will Deacon Cc: Joerg Roedel Cc: Robin Murphy Cc: Nate Watterson Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Acked-by: Robin Murphy Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit 39fcbbccf8ed01e5b562136a97434d15d1fd039b Author: Paul Gortmaker Date: Sat Dec 1 14:19:15 2018 -0500 iommu/tegra: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config TEGRA_IOMMU_GART drivers/iommu/Kconfig: bool "Tegra GART IOMMU 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 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_init was not in use by this code, the init ordering remains unchanged with this commit. We replace module.h with moduleparam.h since the file does actually declare some module_param() and the easiest way to keep back compatibility with existing use cases is to leave it as-is for now. The init function was missing an __init annotation, so it was added. 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: Hiroshi Doyu Cc: Joerg Roedel Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: iommu@lists.linux-foundation.org Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit f295cf26d7766a1108d1dbfd183813b849c0f161 Author: Paul Gortmaker Date: Sat Dec 1 14:19:14 2018 -0500 iommu/qcom: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config MTK_IOMMU_V1 drivers/iommu/Kconfig: bool "MTK IOMMU Version 1 (M4U gen1) Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init just becomes device_initcall for non-modules, 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: Rob Clark Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit 8128ac3b0fe316d4bbedae54068ac24a623c08b5 Author: Paul Gortmaker Date: Sat Dec 1 14:19:13 2018 -0500 iommu/ipmmu-vmsa: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config IPMMU_VMSA drivers/iommu/Kconfig: bool "Renesas VMSA-compatible IPMMU" ...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 even used by this driver, 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. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Joerg Roedel Cc: Laurent Pinchart Cc: iommu@lists.linux-foundation.org Reviewed-by: Laurent Pinchart Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit d4cf5bbd56f5b7210fae65cb60645c71b8c39425 Author: Paul Gortmaker Date: Sat Dec 1 14:19:12 2018 -0500 iommu/mediatek: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config MTK_IOMMU_V1 drivers/iommu/Kconfig: bool "MTK IOMMU Version 1 (M4U gen1) Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init was not even used by this driver, 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. Cc: Joerg Roedel Cc: Matthias Brugger Cc: Honghui Zhang Cc: iommu@lists.linux-foundation.org Cc: linux-mediatek@lists.infradead.org Acked-by: Honghui Zhang Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit a007dd51e5598ab318d8d226a439f41f536ffbc2 Author: Paul Gortmaker Date: Sat Dec 1 14:19:11 2018 -0500 iommu/msm: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config MSM_IOMMU drivers/iommu/Kconfig: bool "MSM IOMMU Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init was not even used by this driver, 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. Cc: Joerg Roedel Cc: Stepan Moskovchenko Cc: iommu@lists.linux-foundation.org Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit 669a047b1812a980a4f183a0f2a70de24c187af0 Author: Paul Gortmaker Date: Sat Dec 1 14:19:10 2018 -0500 iommu/rockchip: Make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config ROCKCHIP_IOMMU drivers/iommu/Kconfig: bool "Rockchip IOMMU Support" ...meaning that it currently is not being built as a module by anyone. The bind/unbind/remove was already explicitly disabled in commit 98b72b94def9 ("iommu/rockchip: Prohibit unbind and remove"). Lets remove the remaining traces of modular infrastructure, 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: Joerg Roedel Cc: Heiko Stuebner Cc: Simon Xue Cc: Daniel Kurtz Cc: Jeffy Chen Cc: iommu@lists.linux-foundation.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Acked-by: Heiko Stuebner Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit c1af7b4013e86bcfd4e1e8f0eeb7ae914ca7e819 Author: Paul Gortmaker Date: Sat Dec 1 14:19:09 2018 -0500 iommu: 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 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 might have been the implicit 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. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel commit 753a31a46b1afebf2399c005bb81eccf227393c1 Author: Yangtao Li Date: Fri Nov 30 09:35:21 2018 -0500 irq_remapping: Remove unused header files seq_file.h does not need to be included,so remove it. Signed-off-by: Yangtao Li Signed-off-by: Joerg Roedel commit 807596491d33d016e420d217cf1350aef2d2b3f7 Author: Yoshihiro Shimoda Date: Wed Nov 28 09:23:36 2018 +0000 iommu/ipmmu-vmsa: Add an array of slave devices whitelist To avoid adding copy and pasted strcmp codes in the future, this patch adds an array "rcar_gen3_slave_whitelist" to check whether the device can work with the IPMMU or not. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit b7ee92c6ff0e023a473b2500d771f6bf504fcc1a Author: Yoshihiro Shimoda Date: Wed Nov 28 09:23:36 2018 +0000 iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions Some R-Car Gen3 SoCs has hardware restrictions on the IPMMU. So, to check whether this R-Car Gen3 SoC can use the IPMMU correctly, this patch modifies the ipmmu_slave_whitelist(). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit f81ff31cb47162a748fc4cccb7bf3a01f2b6f2f0 Author: Chris Wilson Date: Mon Dec 3 11:36:59 2018 +0000 drm/i915/selftests: Terminate hangcheck sanitycheck forcibly If all else fails and we are stuck eternally waiting for the undying request, abandon all hope. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-6-chris@chris-wilson.co.uk commit f36c071f6344e0a335ed4b4e0b3a38c0dd54648b Author: Chris Wilson Date: Mon Dec 3 11:36:56 2018 +0000 drm/i915/ringbuffer: Clear semaphore sync registers on ring init Ensure that the sync registers are cleared every time we restart the ring to avoid stale values from creeping in from random neutrinos. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108888 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-3-chris@chris-wilson.co.uk commit 616d4cf8ea1c370198f548a7e84f1fe90b09921b Author: Geert Uytterhoeven Date: Mon Nov 5 08:52:09 2018 +0100 m68k/defconfig: Update defconfigs for v4.20-rc1 Actual changes: -CONFIG_BATMAN_ADV_DAT=y -CONFIG_CRYPTO_SHA512=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_CRC64=m +CONFIG_CRYPTO_OFB=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_XFRM=m +CONFIG_TEST_BITFIELD=m +CONFIG_TEST_IDA=m +CONFIG_TEST_MEMCAT_P=m +CONFIG_TEST_XARRAY=m Signed-off-by: Geert Uytterhoeven commit af5d7a36d196654220b6f9172915a8c2d0bef33f Author: Bartlomiej Zolnierkiewicz Date: Tue Oct 16 15:33:58 2018 +0200 m68k: Remove redundant 'default n' from Kconfig 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Geert Uytterhoeven commit b6cf523c16e148e1ece5fc4ff4657d79323a4635 Author: Finn Thain Date: Sat Oct 13 11:47:55 2018 +1100 m68k: Unroll raw_outsb() loop Unroll the raw_outsb() loop using the optimized assembler code from raw_outsw(). That code is copied and pasted, with movew changed to moveb. This improves the performance of sequential write transfers using mac_esp in PIO mode by 5% or 10%. (The DMA controller on the 840av/660av models is still unsupported so PIO transfers are used.) Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven commit 9923e9072d813e2efa591d01e6971e0833c38815 Author: Pierre-Louis Bossart Date: Fri Nov 30 18:54:37 2018 -0600 ASoC: Intel: common: add ACPI matching tables for ICL Entry needed for ICL RVP w/ RT274 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 1286f930a0d7447748b398564d14e84ea5dfe890 Author: Lubomir Rintel Date: Mon Dec 3 12:47:28 2018 +0100 ASoC: dt-bindings: use a generic node name for rt5631 The example should follow the practice or using a generic node name instead of the precise programming model, as recommended by the DTSpec. Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit c2b142cc3939e932d4fa2210c2a5155df5736590 Author: Randy Dunlap Date: Thu Nov 29 14:34:15 2018 -0800 spi: fix spi-at91-usart.c build errors when PINCTRL is not set Fix build errors when CONFIG_PINCTRL is not enabled. The header file handles both CONFIG_PINCTRL enabled and disabled cases. CC [M] drivers/spi/spi-at91-usart.o ../drivers/spi/spi-at91-usart.c: In function 'at91_usart_spi_runtime_suspend': ../drivers/spi/spi-at91-usart.c:409:2: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration] pinctrl_pm_select_sleep_state(dev); ../drivers/spi/spi-at91-usart.c: In function 'at91_usart_spi_runtime_resume': ../drivers/spi/spi-at91-usart.c:419:2: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration] pinctrl_pm_select_default_state(dev); Signed-off-by: Randy Dunlap Cc: Radu Pirea Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Mark Brown commit db6e6244cb714029959f26caa58522e3c20d4c61 Author: Pascal PAILLET-LME Date: Fri Nov 30 09:55:51 2018 +0000 regulator: stpmic1: fix regulator_lock usage fix a compilation issue due to regulator_lock usage. Signed-off-by: Pascal Paillet Signed-off-by: Mark Brown commit 4b3ab9372ffa569827c8f7b7ffc7b69ba544a3bd Author: Vignesh R Date: Mon Dec 3 13:31:18 2018 +0530 iio: adc: ti_am335x_tscadc: Improve accuracy of measurement When performing single ended measurements with TSCADC, its recommended to set negative input (SEL_INM_SWC_3_0) of ADC step to ADC's VREFN in the corresponding STEP_CONFIGx register. Also, the positive(SEL_RFP_SWC_2_0) and negative(SEL_RFM_SWC_1_0) reference voltage for ADC step needs to be set to VREFP and VREFN respectively in STEP_CONFIGx register. Without these changes, there may be variation of as much as ~2% in the ADC's digital output which is bad for precise measurement. Signed-off-by: Vignesh R Acked-by: Jonathan Cameron Signed-off-by: Lee Jones commit b40ee006fe6a8a25093434e5d394128c356a48f3 Author: Vignesh R Date: Mon Dec 3 13:31:17 2018 +0530 mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering mfd cells Use PLATFORM_DEVID_AUTO to number mfd cells while registering, so that different instances are uniquely identified. This is required in order to support registering of multiple instances of same ti_am335x_tscadc IP. Signed-off-by: Vignesh R Signed-off-by: Lee Jones commit 502ae42ca600760cf32c4de320a91cc37dd5ac89 Author: Andy Shevchenko Date: Tue Nov 6 14:38:55 2018 +0200 gpio: lynxpoint: Use for_each_set_bit() in IRQ handler This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko commit 226e6b866d741a8cfb7486e7f0767fe4e018413c Author: Andy Shevchenko Date: Wed Nov 7 21:19:45 2018 +0200 gpio: pch: Convert to dev_pm_ops Convert the legacy system PM callbacks to new ones. Meanwhile, remove the redundant calls to the PCI for changing a power state since it's done by bus code. While here, remove weird indentation with backslash in use. Signed-off-by: Andy Shevchenko commit dfcb245e28481256a10a9133441baf2a93d26642 Author: Ingo Molnar Date: Mon Dec 3 10:05:56 2018 +0100 sched: Fix various typos in comments Go over the scheduler source code and fix common typos in comments - and a typo in an actual variable name. No change in functionality intended. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 6cb57c678bb70ea180362ac47a5bf78a8c579b45 Author: Martin Blumenstingl Date: Sun Dec 2 22:42:20 2018 +0100 clk: meson: meson8b: add the read-only video clock trees Add all clocks to give us the final video clocks within the Meson8, Meson8b and Meson8m2 SoCs. The final video clocks are: - cts_enct - cts_encl - cts_encp - cts_enci - cts_vdac0 - hdmi_tx_pixel - hdmi_sys Add multiple clocks in between which are needed to implement these clocks: - Opposed to GXBB there is no pre-multiplier for the PLL input. The assumption here is that the multiplier is required to achieve the HDMI 2.0 clock rates (which are up to twice the rate of the HDMI 1.4 rates). - The main PLL is called "HDMI PLL" or "HPLL" in the datasheet. Rename our existing "vid_pll_dco" to "hdmi_pll_dco". The actual VID_PLL clock also exists further down the tree. - Rename the existing "vid_pll" clock (which is the OD divider at HHI_VID_PLL_CNTL[17:16]) to "hdmi_pll_lvds_out" to match the naming from the datasheet. - Add the second OD divider called "hdmi_pll_hdmi_out" at HHI_VID_PLL_CNTL[19:18]. - Add the "vid_pll_in_sel" which can choose between "hdmi_pll_dco" and another parent. However, the second parent is not use on Amlogic's 3.10 kernel for HDMI or CVBS output so just leave a TODO in the code. - Add the "vid_pll_in_en" which is located after "vid_pll_in_sel" according to the datasheet. - Add "vid_pll_pre_div" which is used for divide-by-5 and divide-by-6 in Amlogic's 3.10 kernel sources. - Add "vid_pll_post_div" which divides the output of "vid_pll_pre_div" further down. The Amlogic 3.10 kernel configures this as divide-by-2 with "vid_pll_pre_div" being configured as divide-by-5 to achieve a total divider of 10. - Add the real "vid_pll" clock which selects between "vid_pll_pre_div", "vid_pll_post_div" and a third "vid_pll_pre_div_mult7_div2" (which is "vid_pll_pre_div" divided by 3.5). The latter is not supported yet because it's not used in Amlogic's 3.10 kernel. The "vid_pll" clock rate can also be measured by clkmsr to check whether this implementation is correct. - Add "vid_pll_final_div" which is a post-divider for "vid_pll" and it's used as input for "vclk" and "vclk2" - Add the two symmetric "vclk" and "vclk" clock trees, each with a divide-by-1, divide-by-2, divide-by-4, divide-by-6 and divide-by-12 clock and a divider for each clock. - Add the "cts_enct", "cts_encp" and "hdmi_tx_pixel" clocks which each have their own gate and can select between any of the five "vclk" dividers. - Add the "cts_encl" and "cts_vdac0" clocks which each have their own gate and can select between any of the five "vclk2" dividers. The "hdmi_sys" clock is a different than these video clocks. It takes "xtal" as input (there are three more but unknown parents). Add this clock as well as it's used by the HDMI controller. Amlogic's 3.10 kernel always configures this as "xtal divided by 1", so we can ignore the other parents for now. This was tested on Meson8b and Meson8m2 boards by comparing the common clock framework output with the clock measurer output. The following video modes were first set in u-boot (by running "video dev open $mode") before booting Linux: 4K2K30HZ (only supported by Meson8m2, not tested on Meson8b): - vid_pll: 297000000Hz - cts_encp: 297000000Hz - hdmi_tx_pixel: 297000000Hz 1080P: - vid_pll: 148500000Hz - cts_encp: 148500000Hz - hdmi_tx_pixel: 148500000Hz 720P: - vid_pll: 148500000Hz - cts_encp: 148500000Hz - hdmi_tx_pixel: 74250000Hz 480P: - vid_pll: 216000000Hz - cts_encp: 54000000Hz - hdmi_tx_pixel: 27000000Hz Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181202214220.7715-4-martin.blumenstingl@googlemail.com commit 007f3da7d38ac7eb71fb092e43354dbf2e7b5109 Author: Martin Blumenstingl Date: Sun Dec 2 22:42:19 2018 +0100 clk: meson: meson8b: add the fractional divider for vid_pll_dco This "vid_pll_dco" (which should be named HDMI_PLL or - as the datasheet calls it - HPLL) has a 12-bit wide fractional parameter at HHI_VID_PLL_CNTL2[11:0]. Add this so we correctly calculate the rate of this PLL when u-boot is configured for a video mode which uses this fractional parameter. Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181202214220.7715-3-martin.blumenstingl@googlemail.com commit 376d8c45bd6ac79f02ecf9ca1606dc5d1b271bc0 Author: Martin Blumenstingl Date: Sun Dec 2 22:42:18 2018 +0100 clk: meson: meson8b: fix the offset of vid_pll_dco's N value Unlike the other PLLs on Meson8b the N value "vid_pll_dco" (a better name would be hdmi_pll_dco or - as the datasheet calls it - HPLL) is located at HHI_VID_PLL_CNTL[14:10] instead of [13:9]. This results in an incorrect calculation of the rate of this PLL because the value seen by the kernel is double the actual N (divider) value. Update the offset of the N value to fix the calculation of the PLL rate. Fixes: 28b9fcd016126e ("clk: meson8b: Add support for Meson8b clocks") Reported-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181202214220.7715-2-martin.blumenstingl@googlemail.com commit 989a4222c13a3e148772730d362fceb0727852f5 Merge: e8da8794a7fd9 2595646791c31 Author: Ingo Molnar Date: Mon Dec 3 11:44:00 2018 +0100 Merge tag 'v4.20-rc5' into irq/core, to pick up fixes Signed-off-by: Ingo Molnar commit 5f675231e456cb599b283f8361f01cf34b0617df Merge: 3e184501083c3 2595646791c31 Author: Ingo Molnar Date: Mon Dec 3 11:42:17 2018 +0100 Merge tag 'v4.20-rc5' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit c78f59d7145e7f729c8df58fa7f99ecf66225ddc Author: Yangtao Li Date: Sun Dec 2 03:33:58 2018 -0500 mtd: use DEFINE_SHOW_ATTRIBUTE() instead of open-coding it DEFINE_SHOW_ATTRIBUTE macro can help us simplify the code, so change to it. And change the DEBUGFS_RO_ATTR macro defined in some file to a standard macro. Signed-off-by: Yangtao Li Signed-off-by: Boris Brezillon commit bafae53817e7f3a47ed74cd03152e166aa639131 Author: huijin.park Date: Wed Nov 28 23:19:51 2018 -0500 mtd: change len type from signed to unsigned type Callers of erase_write() always pass an unsigned int. So this patch avoids a cast to an int. Signed-off-by: huijin.park Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon commit fca0c116504e1c5c72963bf28b1ede0932228fef Author: Ingo Molnar Date: Mon Dec 3 10:52:21 2018 +0100 perf: Fix typos in comments Fix two typos in kernel/events/*. No change in functionality intended. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 3a936bc2869667d7768f2266d14c4c49a849ffbe Author: Neil Armstrong Date: Wed Nov 28 11:07:34 2018 +0100 drm/meson: Fix an Alpha Primary Plane bug on Meson GXL/GXM SoCs On the Amlogic GXL & GXM SoCs, a bug occurs on the primary plane when alpha is used where the alpha is not aligned with the pixel content. The workaround Amlogic implemented is to reset the OSD1 plane hardware block each time the plane is (re)enabled, solving the issue. In the reset, we still need to save the content of 2 registers which depends on the status of the plane, in addition to reload the scaler conversion matrix at the same time. Signed-off-by: Neil Armstrong Tested-by: Maxime Jourdan Reviewed-by: Maxime Jourdan [narmstrong: fixed typo in commit log] Link: https://patchwork.freedesktop.org/patch/msgid/20181128100734.6536-1-narmstrong@baylibre.com commit ddd1bd5cfde57973ba816e118c9c452934bb09e7 Merge: e8e94fce14658 2595646791c31 Author: Ingo Molnar Date: Mon Dec 3 10:51:50 2018 +0100 Merge tag 'v4.20-rc5' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit a97673a1c43d005a3ae215f4ca8b4bbb5691aea1 Author: Ingo Molnar Date: Mon Dec 3 10:47:34 2018 +0100 x86: Fix various typos in comments Go over arch/x86/ and fix common typos in comments, and a typo in an actual function argument name. No change in functionality intended. Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit df60673198ae678f68af54873b8904ba93fe13a0 Merge: 89f579ce99f7e 2595646791c31 Author: Ingo Molnar Date: Mon Dec 3 10:47:53 2018 +0100 Merge tag 'v4.20-rc5' into x86/cleanups, to sync up the tree Signed-off-by: Ingo Molnar commit c066cc8af9de8f749d29f75ad8c1c37d565f32b7 Author: Max Filippov Date: Tue Nov 20 18:46:20 2018 -0800 xtensa: drop unused declarations from elf.h do_copy_regs, do_restore_regs, do_save_fpregs and do_restore_fpregs are not used or implemented by xtensa, drop these declarations from the arch/xtensa/include/asm/elf.h Signed-off-by: Max Filippov commit 58b17c55b610c11b60f1da71c20cc09cfa4e47db Author: Max Filippov Date: Fri Nov 9 14:39:24 2018 -0800 xtensa: clean up syscall.h Drop non-existent/unneeded function declarations, add header guard. Signed-off-by: Max Filippov commit 3ffc2df9c76d3e1e02367dc3361902c1e9870b5d Author: Max Filippov Date: Mon Nov 26 13:15:21 2018 -0800 xtensa: drop unused coprocessor helper functions coprocessor_save, coprocessor_load and coprocessor_restore are neither used nor exported for use by modules. Drop them. Signed-off-by: Max Filippov commit 633f1ffbccc752a867e41f4d312c19ef2c3d1b22 Author: Max Filippov Date: Sat Nov 24 20:51:52 2018 -0800 xtensa: drop custom PTRACE_{PEEK,POKE}{TEXT,DATA} Custom implementations of these ptrace calls are the same as generic implementations. Drop custom code and use generic. Signed-off-by: Max Filippov commit 44ba57a23cde862dfd98c65fb2cfa0affc05a9ad Author: Max Filippov Date: Thu Nov 15 19:38:51 2018 -0800 xtensa: drop unused field from the struct exc_table exc_table::syscall_save and corresponding macro EXC_TABLE_SYSCALL_SAVE have never been used by the xtensa code. Drop them. Signed-off-by: Max Filippov commit 8ed3a5426b4245ae22e01f8a65573b8fd5854004 Author: Max Filippov Date: Thu Nov 15 18:17:41 2018 -0800 xtensa: drop fast_syscall_kernel There must be no xtensa-specific syscalls from the kernel code: register spilling uses call+entry sequence and atomics have proper function implementations. Drop fast_syscall_xtensa. Signed-off-by: Max Filippov commit aa5eee355b466cb33f97f79bed9740a472c4ab73 Author: Rafael J. Wysocki Date: Thu Nov 29 22:22:04 2018 +0100 Documentation: admin-guide: PM: Add cpuidle document Important information is missing from user/admin cpuidle documentation available today, so add a new user/admin document for cpuidle containing current and comprehensive information to admin-guide and drop the old .txt documents it is replacing. Signed-off-by: Rafael J. Wysocki Reviewed-by: Viresh Kumar Reviewed-by: Ulf Hansson commit ba08dcc87fc5b7f1f638a32d46b9fc6c8d105eb8 Author: Mesih Kilinc Date: Sun Dec 2 23:23:37 2018 +0300 ARM: sunxi: add Allwinner ARMv5 SoCs Add option for Allwinner ARMv5 SoCs and SoC F1C100s (which has a die used for many new F-series products, including F1C100A, F1C100s, F1C200s, F1C500, F1C600). Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard commit 71cd532d665159417f9c233b698b7400bc66bd8f Author: Mesih Kilinc Date: Sun Dec 2 23:23:36 2018 +0300 dt-bindings: arm: Add new Allwinner ARMv5 F1C100s SoC Add new Allwinner ARMv5 F1C100s SoC's compatible string Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard commit 2391f4ad89b795656872b76f6bebfd904fcee559 Author: Mesih Kilinc Date: Sun Dec 2 23:23:35 2018 +0300 ARM: Check ARCH_MULTI_V7 to differentiate ARMv5/v7 Allwinner SoCs Allwinner also has some ARMv5 SoCs. In order to add support for them, check ARM_MULTI_V7 before enabling ARMv7 SoC's. Add help text for ARCH_SUNXI menuconfig. Signed-off-by: Mesih Kilinc Signed-off-by: Maxime Ripard commit 5eacadb5e66b2b100695777ee7d68d8a2d9bd25c Author: Firoz Khan Date: Tue Nov 13 15:49:30 2018 +0530 xtensa: generate uapi header and syscall table header files System call table generation script must be run to gener- ate unistd_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by xtensa/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/syscall.c file. Signed-off-by: Firoz Khan Signed-off-by: Max Filippov commit c7914ef69dbb325d3d36f68a4befa282d0e0ddc8 Author: Firoz Khan Date: Tue Nov 13 15:49:29 2018 +0530 xtensa: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/syscall.c - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Max Filippov commit a86067f587a9460e5f004469d183a76d3a2ab068 Author: Firoz Khan Date: Tue Nov 13 15:49:28 2018 +0530 xtensa: add __NR_syscalls along with __NR_syscall_count __NR_syscall_count macro holds the number of system call exist in xtensa architecture. We have to change the value of __NR_syscall_count, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update __NR- _syscall_count value. 1. Update __NR_syscall_count in asm/unistd.h manually by counting the no.of system calls. No need to update __NR- _syscall_count until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update __NR_syscall_count in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Max Filippov [Max: Drop __NR_syscall_count completely, use __NR_syscalls instead] commit 22fee7d3851314f8384c9d44233bb86a2862ed64 Merge: b5570ca7c475b 2595646791c31 Author: Greg Kroah-Hartman Date: Mon Dec 3 07:56:15 2018 +0100 Merge 4.20-rc5 into char-misc-next We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d5d12ce229c17fde99c6f8cc42f3701264a60e8c Merge: 7626e002225a4 2595646791c31 Author: Greg Kroah-Hartman Date: Mon Dec 3 07:55:28 2018 +0100 Merge 4.20-rc5 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 7782b57ccc60534d6edd21f6b2bbdc4fda777fdf Merge: f88184bfee48d 2595646791c31 Author: Greg Kroah-Hartman Date: Mon Dec 3 07:54:31 2018 +0100 Merge 4.20-rc5 into driver-core-next We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 44c94100b6fa83488337fe639eb7baba7dd93a91 Merge: 77df6d8d7298f 2595646791c31 Author: Greg Kroah-Hartman Date: Mon Dec 3 07:53:39 2018 +0100 Merge 4.20-rc5 into usb-next We need the USB fixes into usb-next. Signed-off-by: Greg Kroah-Hartman commit c0c9872a8ba291fc39fdb62652c24418670ccc46 Author: Eddie James Date: Thu Nov 8 15:05:23 2018 -0600 dt-bindings: i2c: Add P8 OCC hwmon device documentation Document the bindings for I2C-based OCC hwmon device. Signed-off-by: Eddie James Acked-by: Rob Herring Signed-off-by: Guenter Roeck commit cd261c9832a4349a1432afd8747ac15cd1c4d3b0 Author: Eddie James Date: Thu Nov 8 15:05:22 2018 -0600 Documentation: hwmon: Add OCC documentation Document the hwmon interface for the OCC. Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit 7ed98dddb764eebf2783881a17dc4980181a6e1a Author: Eddie James Date: Thu Nov 8 15:05:21 2018 -0600 fsi: Add On-Chip Controller (OCC) driver The OCC is a device embedded on a POWER processor that collects and aggregates sensor data from the processor and system. The OCC can provide the raw sensor data as well as perform thermal and power management on the system. This driver provides an atomic communications channel between a service processor (e.g. a BMC) and the OCC. The driver is dependent on the FSI SBEFIFO driver to get hardware access through the SBE to the OCC SRAM. Commands are issued to the SBE to send or fetch data to the SRAM. Signed-off-by: Eddie James Signed-off-by: Andrew Jeffery Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley Signed-off-by: Guenter Roeck commit 6021c48f3acd68301eacd99ff5dd4744f7b2f288 Author: Eddie James Date: Thu Nov 8 15:05:20 2018 -0600 dt-bindings: fsi: Add P9 OCC device documentation Document the bindings for the FSI-attached POWER9 On-Chip Controller. Signed-off-by: Eddie James Signed-off-by: Guenter Roeck commit f1af93216c3460873e0ff46f17951eac4c066d79 Author: Chris Packham Date: Wed Oct 31 09:25:27 2018 +1300 hwmon: (adt7475) document mapping of sysfs entries to inputs As per the usual standard with hwmon drivers the mapping to sysfs entries follows the register map of the device e.g. in0_input corresponds to the register 0x20, in1_input corresponds to 0x21 etc. Hardware designers tend to work with input pins instead of registers which is where things start to get confusing. A hardware designer might say "the 1.5V rail is connected to the VCCP pin" leaving the software designer none the wiser as to which of the sysfs entries should be associated with the label "1.5V". Try to bridge the gap by documenting the mapping of sysfs entries to the corresponding pins. This should allow someone to create a configuration file or other mapping without needing to dive into the code and ADT datasheets. Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck commit 3b443def46cc730c0ba590c5692d085b80a8659c Author: Rasmus Villemoes Date: Sat Oct 27 00:30:59 2018 +0200 hwmon: (core) remove redundant cast struct attribute::name which this local variable name is eventually assigned to is "const char*", and so is the template parameter. We might as well preserve the constness all the way through. Signed-off-by: Rasmus Villemoes Signed-off-by: Guenter Roeck commit 6e5c06ad94115e58e4f274bdaed2618b1e39ac38 Author: Kun Yi Date: Wed Oct 17 15:26:39 2018 -0700 hwmon: (adm1275) Allow setting shunt reg value The ADM series of hotswap controllers support extending the current measurement range by using a sensing resistor value other than the typical 1 mOhm. For example, using a 0.5 mOhm sensing resistor doubles the maximal current can be measured. Current driver assumes a shunt resistor value of 1 mOhm in calculation, meaning for other resistor values, hwmon will report scaled current/power measurements. This patch parses device tree parameter "shunt-resistor-micro-ohms", if there is one. Signed-off-by: Kun Yi Signed-off-by: Guenter Roeck commit f567035a6187f1a5e7f86d4da4dbbca46cb68082 Author: Kun Yi Date: Wed Oct 17 15:27:09 2018 -0700 dt-bindings: hwmon: Add adm127x documentation adm127x are hot-swap controllers that allow a circuit board to be removed from or inserted into a live backplane. This patch adds the device tree bindings documentation. Signed-off-by: Kun Yi Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck commit 76d0bbd8a4ef1b1256d49e082a61a33eb0b004c7 Author: Tao Ren Date: Thu Nov 8 16:50:46 2018 -0800 ARM: dts: aspeed: Add Facebook Backpack-CMM BMC Add initial version of device tree file for Facebook Backpack CMM (Chasis Management Module) ast2500 BMC. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit b54a5b19926cfb36e758130de466e2abfc11b9e6 Author: Tao Ren Date: Thu Nov 8 16:50:34 2018 -0800 ARM: dts: Add Facebook BMC flash layout This is the layout used by Facebook BMC systems. It describes the fixed flash layout of a 32MB mtd device. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 6d2e46885f3dfc8b32560f88c5f10cb1c93a3996 Author: Matt Spinler Date: Fri Oct 12 10:29:15 2018 -0500 ARM: dts: aspeed: wspoon: Enable iio-hwmon battery The BMC can read the RTC battery voltage via ADC channel 12. Signed-off-by: Matt Spinler Reviewed-by: Lei YU Signed-off-by: Joel Stanley commit 163d88c4bf92721c297ce828c96f4d85367208d9 Author: Lei YU Date: Wed Aug 22 15:47:28 2018 +0800 ARM: dts: aspeed: romulus: Enable iio-hwmon-battery Add iio-hwmon-battery using adc channel 12 and enable adc to make adc running. This channel is used to read RTC battery voltage. Note with Romulus hardware design, it requires GPIOR3 to be pulled high to read the voltage, otherwise the reading is 0. When GPIOR3 is high, it consumes battery and impacts the battery life. So it is left for user space to toggle the GPIO when trying to read the voltage. Signed-off-by: Lei YU Signed-off-by: Joel Stanley commit 89b32a47e36ec6cd0243c1e573f46bb8d09d2fcb Author: Joel Stanley Date: Wed Jul 4 16:25:41 2018 +1000 ARM: dts: aspeed: Enable VHUB on Romulus The Romulus USB bus is connected to the Power9's PCIe USB controller. Signed-off-by: Joel Stanley commit 39cc9f037ca5ed417db29a57445e61a454216f49 Author: Joel Stanley Date: Mon Aug 27 16:15:19 2018 -0700 ARM: dts: aspeed-palmetto: Add LPC control node This adds the required LPC node with phandles to the reserved memory region and the mtd device. Signed-off-by: Joel Stanley commit fad06e25b04b1090c21b2be4343cf7ee07f02ab5 Author: Benjamin Herrenschmidt Date: Tue Jul 24 14:24:04 2018 +1000 ARM: dts: aspeed: Palmetto system can use coprocessor for FSI This allows userspace to switch away from bitbanging to use kernel FSI with the coprocessor. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley commit d776dd52247c2b82e719403fab9a755cf22bd258 Author: Benjamin Herrenschmidt Date: Tue Jul 24 14:24:03 2018 +1000 ARM: dts: aspeed: Romulus system can use coprocessor for FSI This replaces the FSI compatible with the ColdFire FSI compatible. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley commit 576f1b4bc80220e1f88f1de5ecb25d99a6e9fa04 Author: Houlong Wei Date: Thu Nov 29 11:37:09 2018 +0800 soc: mediatek: Add Mediatek CMDQ helper Add Mediatek CMDQ helper to create CMDQ packet and assemble GCE op code. Signed-off-by: Houlong Wei Signed-off-by: HS Liao Signed-off-by: Matthias Brugger commit 5482e9a93c83839f94e75db712e6837e6a39962c Author: Martin KaFai Lau Date: Sat Dec 1 17:08:44 2018 -0800 bpf: Fix memleak in aux->func_info and aux->btf The aux->func_info and aux->btf are leaked in the error out cases during bpf_prog_load(). This patch fixes it. Fixes: ba64e7d85252 ("bpf: btf: support proper non-jit func info") Cc: Yonghong Song Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 794e20ee038ea368f3f099d196792b024fb3170c Author: Slawomir Stepien Date: Sun Dec 2 12:42:35 2018 +0100 staging: iio: adc: ad7280a: fix overwrite of the returned value The ret returned from ad7280_chain_setup() is needed to initialize the slave_num. Don't overwrite it with call to devm_add_action_or_reset(). Fixes: cc9c58ef6e06 ("staging: iio: adc: ad7280a: use devm_* APIs") Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 9381fc5d655d172af737b5f16749a63e4b931040 Author: Andy Shevchenko Date: Wed Nov 7 21:18:04 2018 +0200 gpio: sodaville: Convert to use managed functions pcim_* and devm_* This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko commit 6ad02b29b836b6180263f14cc41147f4cb6d6a70 Author: Andy Shevchenko Date: Wed Nov 7 21:18:04 2018 +0200 gpio: pch: Convert to use managed functions pcim_* and devm_* This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko commit c40ad24254f1dbd54f2df5f5f524130dc1862122 Author: Daniel Mack Date: Sat Dec 1 14:54:51 2018 +0100 ARM: dts: pxa: clean up USB controller nodes PXA25xx SoCs don't have a USB controller, so drop the node from the common pxa2xx.dtsi base file. Both pxa27x and pxa3xx have a dedicated node already anyway. While at it, unify the names for the nodes across all pxa platforms. Signed-off-by: Daniel Mack Reported-by: Sergey Yanovich Link: https://patchwork.kernel.org/patch/8375421/ Signed-off-by: Robert Jarzmik commit e9ae49f7b3cb7d71b156ae76cd540f8c1b84753a Author: Daniel Mack Date: Fri Nov 30 18:55:42 2018 +0100 ARM: dts: pxa3xx: clean up pxa3xx clock controller node name The clock controller node does not need a unit slave designator as it does not have a reg property. Also, remove the underscore from the name. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit 64396bd286d36a3926f099db297f4d25b3156896 Author: Daniel Mack Date: Fri Nov 30 18:55:41 2018 +0100 ARM: dts: pxa3xx: order timer and gcu nodes under /pxabus These are devices on the PXA bus, so make the device tree structure reflect that. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit 513057f110a7c3c53ab08499e29dec29c6852648 Author: Daniel Mack Date: Fri Nov 30 18:55:39 2018 +0100 ARM: dts: pxa2xx: fix hwuart memory range The memory range for the hwuart is at 0x41600000, not 0x41100000. This also solves a conflict with the MMC controller node. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit 1b583921815cde6487f3f04b92730233d3ff7bd9 Author: Daniel Mack Date: Fri Nov 30 18:55:38 2018 +0100 ARM: dts: pxa3xx: drop #address-cells and #size-cells from pinctrl node The pinctrl node does not have any children, so the #address-cells and #size-cells properties are not needed. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit a6da403dc9d5d5f4ec20a29896d1d1262888aa24 Author: Daniel Mack Date: Fri Nov 30 18:55:37 2018 +0100 ARM: dts: pxa2xx: drop #address-cells and #size-cells from /cpus PXA is single-core only, so this node will not have enumerable children. Drop the #address-cells and #size-cells properties to squelch a dtc warning. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit 40b217a04363a7325aa9df743b830888fb18e816 Author: Daniel Mack Date: Mon Nov 5 20:18:27 2018 +0100 ARM: dts: pxa3xx: add gcu node Add a device node for hardware graphic acceleration. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik commit 6750f61a13a0197c40e4a40739117493b15f19e8 Author: Rafał Miłecki Date: Tue Nov 20 10:24:09 2018 +0100 mtd: improve calculating partition boundaries when checking for alignment When checking for alignment mtd should check absolute offsets. It's important for subpartitions as it doesn't make sense to check their relative addresses. Signed-off-by: Rafał Miłecki Signed-off-by: Boris Brezillon commit 1186af457cc186c5ed01708da71b1ffbdf0a2638 Author: Rafał Miłecki Date: Tue Nov 20 09:55:45 2018 +0100 mtd: keep original flags for every struct mtd_info When allocating a new partition mtd subsystem runs internal tests in the allocate_partition(). They may result in modifying specified flags (e.g. dropping some /features/ like write access). Those constraints don't have to be necessary true for subpartitions. It may happen parent partition isn't block aligned (effectively disabling write access) while subpartition may fit blocks nicely. In such case all checks should be run again (starting with original flags value). Signed-off-by: Rafał Miłecki Signed-off-by: Boris Brezillon commit 89f706dbd54faf2da1cb5bea9abc07b00c36ef69 Author: Miquel Raynal Date: Sun Nov 18 21:18:31 2018 +0100 mtd: fix Coverity integer handling issue A Coverity robot reported an integer handling issue (OVERFLOW_BEFORE_WIDEN) in the potentially overflowing expression: (mtd_div_by_ws(mtd->size, mtd) - mtd_div_by_ws(offs, mtd)) * mtd_oobavail(mtd, ops) While such overflow will certainly never happen due to the numbers handled, it is cleaner to fix this operation anyway. The problem is that all the maths include 32-bit quantities, while the result is stored in an explicit 64-bit value. As maxooblen will just be compared with a size_t, let's change the type of the variable to a size_t. This will not fix anything but will clarify a bit the situation. Then, do an explicit cast to fix Coverity warning. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 4348433d8c0234f44adb6e12112e69343f50f0c5 Author: Miquel Raynal Date: Sun Nov 18 21:18:30 2018 +0100 mtd: fix mtd_oobavail() incoherent returned value mtd_oobavail() returns either mtd->oovabail or mtd->oobsize. Both values are unsigned 32-bit entities, so there is no reason to pretend returning a signed one. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon commit 4845a077c0b9c5c10422a090dbd1d894233f9456 Author: Colin Ian King Date: Sun Nov 18 16:36:56 2018 +0000 mtd: nftl: clean up indentation, remove extraneous tabs The hunk of code is indented too much by one level, fix this by removing the extraneous tabs. Also terminate block comment using the recommended coding style to clean up checkpatch warning. Signed-off-by: Colin Ian King Signed-off-by: Boris Brezillon commit a788c5272769ddbcdbab297cf386413eeac04463 Author: Daniel Santos Date: Fri Oct 19 03:30:20 2018 -0500 jffs2: Fix use of uninitialized delayed_work, lockdep breakage jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER is defined then a write buffer is available and has been initialized. However, this does is not the case when the mtd device has no out-of-band buffer: int jffs2_nand_flash_setup(struct jffs2_sb_info *c) { if (!c->mtd->oobsize) return 0; ... The resulting call to cancel_delayed_work_sync passing a uninitialized (but zeroed) delayed_work struct forces lockdep to become disabled. [ 90.050639] overlayfs: upper fs does not support tmpfile. [ 90.652264] INFO: trying to register non-static key. [ 90.662171] the code is fine but needs lockdep annotation. [ 90.673090] turning off the locking correctness validator. [ 90.684021] CPU: 0 PID: 1762 Comm: mount_root Not tainted 4.14.63 #0 [ 90.696672] Stack : 00000000 00000000 80d8f6a2 00000038 805f0000 80444600 8fe364f4 805dfbe7 [ 90.713349] 80563a30 000006e2 8068370c 00000001 00000000 00000001 8e2fdc48 ffffffff [ 90.730020] 00000000 00000000 80d90000 00000000 00000106 00000000 6465746e 312e3420 [ 90.746690] 6b636f6c 03bf0000 f8000000 20676e69 00000000 80000000 00000000 8e2c2a90 [ 90.763362] 80d90000 00000001 00000000 8e2c2a90 00000003 80260dc0 08052098 80680000 [ 90.780033] ... [ 90.784902] Call Trace: [ 90.789793] [<8000f0d8>] show_stack+0xb8/0x148 [ 90.798659] [<8005a000>] register_lock_class+0x270/0x55c [ 90.809247] [<8005cb64>] __lock_acquire+0x13c/0xf7c [ 90.818964] [<8005e314>] lock_acquire+0x194/0x1dc [ 90.828345] [<8003f27c>] flush_work+0x200/0x24c [ 90.837374] [<80041dfc>] __cancel_work_timer+0x158/0x210 [ 90.847958] [<801a8770>] jffs2_sync_fs+0x20/0x54 [ 90.857173] [<80125cf4>] iterate_supers+0xf4/0x120 [ 90.866729] [<80158fc4>] sys_sync+0x44/0x9c [ 90.875067] [<80014424>] syscall_common+0x34/0x58 Signed-off-by: Daniel Santos Reviewed-by: Hou Tao Signed-off-by: Boris Brezillon commit 8e9b61b293d98f878cf1e6d1ae164e41c0219959 Author: Masahiro Yamada Date: Sat Dec 1 09:27:15 2018 +0900 kbuild: move .SECONDARY special target to Kbuild.include In commit 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers"), I missed one important feature of the .SECONDARY target: .SECONDARY with no prerequisites causes all targets to be treated as secondary. ... which agrees with the policy of Kbuild. Let's move it to scripts/Kbuild.include, with no prerequisites. Note: If an intermediate file is generated by $(call if_changed,...), you still need to add it to "targets" so its .*.cmd file is included. The arm/arm64 crypto files are generated by $(call cmd,shipped), so they do not need to be added to "targets", but need to be added to "clean-files" so "make clean" can properly clean them away. Signed-off-by: Masahiro Yamada commit 5ac7cdc29897e5fc3f5e214f3f8c8b03ef8d7029 Author: Paul E. McKenney Date: Tue Oct 16 05:46:58 2018 -0700 rcutorture: Don't do busted forward-progress testing The "busted" rcutorture type is an intentionally broken implementation of RCU. Doing forward-progress testing on this implementation is not particularly meaningful on the one hand and can result in fatal abuse of the memory allocator on the other. This commit therefore disables forward-progress testing of the "busted" rcutorture type. Reported-by: kernel test robot Signed-off-by: Paul E. McKenney commit 2e57bf97a6856f2dc10fb4377c452cb08f844047 Author: Paul E. McKenney Date: Fri Oct 5 16:43:09 2018 -0700 rcutorture: Use 100ms buckets for forward-progress callback histograms This commit narrows the scope of each bucket of the forward-progress callback-invocation histograms from one second to 100 milliseconds, which aids debugging of forward-progress problems by making shorter-duration callback-invocation stalls visible. Signed-off-by: Paul E. McKenney commit 2667ccce9328e4e25ed77a83291c066d5e11e65a Author: Paul E. McKenney Date: Fri Oct 5 09:09:49 2018 -0700 rcutorture: Recover from OOM during forward-progress tests This commit causes the OOM handler to do rcu_barrier() calls and to free up forward-progress callbacks in order to recover from OOM events. The current test is terminated, but subsequent forward-progress tests can proceed. This allows a long test to result in multiple forward-progress failures, greatly reducing the required testing time. Signed-off-by: Paul E. McKenney commit 73d665b1410afae405309ad4475a98924776ab13 Author: Paul E. McKenney Date: Thu Oct 4 10:54:22 2018 -0700 rcutorture: Print forward-progress test age upon failure This commit prints the age of the forward-progress test in jiffies, in order to allow better interpretation of the callback-invocation histograms. Signed-off-by: Paul E. McKenney commit c51d7b5e6c94aa6b554c27bd2b0eb64ebef02334 Author: Paul E. McKenney Date: Wed Oct 3 17:25:33 2018 -0700 rcutorture: Print time since GP end upon forward-progress failure If rcutorture's forward-progress tests fail while a grace period is not in progress, it is useful to print the time since the last grace period ended as a way to detect failure to launch a new grace period. This commit therefore makes this change. Signed-off-by: Paul E. McKenney commit 1a682754c7ed9df213069d5a0d3981f8360a32c2 Author: Paul E. McKenney Date: Wed Oct 3 12:33:41 2018 -0700 rcutorture: Print histogram of CB invocation at OOM time One reason why a forward-progress test might fail would be if something prevented or delayed callback invocation. This commit therefore adds a callback-invocation histogram printout when OOM is reported to rcutorture. Signed-off-by: Paul E. McKenney commit 8dd3b54689d9a2103c0817f2b7adc51760a45551 Author: Paul E. McKenney Date: Wed Oct 3 11:02:05 2018 -0700 rcutorture: Print GP age upon forward-progress failure Signed-off-by: Paul E. McKenney commit bfcfcffc5f23e76a1b88f7412ee7efaec5107b28 Author: Paul E. McKenney Date: Tue Oct 2 17:09:56 2018 -0700 rcu: Print per-CPU callback counts for forward-progress failures This commit prints out the non-zero per-CPU callback counts when a forware-progress error (OOM event) occurs. Signed-off-by: Paul E. McKenney [ paulmck: Fix a pair of uninitialized locals spotted by kbuild test robot. ] commit 903ee83d91776bc72d856147743687d4b6c99286 Author: Paul E. McKenney Date: Tue Oct 2 16:05:46 2018 -0700 rcu: Account for nocb-CPU callback counts in RCU CPU stall warnings The RCU CPU stall warnings print an estimate of the total number of RCU callbacks queued in the system, but this estimate leaves out the callbacks queued for nocbs CPUs. This commit therefore introduces rcu_get_n_cbs_cpu(), which gives an accurate callback estimate for both nocbs and normal CPUs, and uses this new function as needed. This commit also introduces a rcu_get_n_cbs_nocb_cpu() helper function that returns the number of callbacks for nocbs CPUs or zero otherwise, and also uses this function in place of direct access to ->nocb_q_count while in the area (fewer characters, you see). Signed-off-by: Paul E. McKenney commit e0aff97355575ac6a28a48a4217533a3953095c5 Author: Paul E. McKenney Date: Mon Oct 1 17:40:54 2018 -0700 rcutorture: Dump grace-period diagnostics upon forward-progress OOM This commit adds an OOM notifier during rcutorture forward-progress testing. If this notifier is invoked, it dumps out some grace-period state to help debug the forward-progress problem. Signed-off-by: Paul E. McKenney commit 61670adcb4a9f66ff3fa8a9e846a623d9a9e1553 Author: Paul E. McKenney Date: Mon Oct 1 13:27:41 2018 -0700 rcutorture: Prepare for asynchronous access to rcu_fwd_startat Because rcutorture's forward-progress checking will trigger from an OOM notifier, this notifier will introduce asynchronous concurrent access to the rcu_fwd_startat variable. This commit therefore prepares for this by converting updates to WRITE_ONCE(). Signed-off-by: Paul E. McKenney commit 2a7d968816a94a4c52f0082c085c6714a5b3f1ec Author: Pierce Griffiths Date: Fri Sep 21 20:21:31 2018 -0500 torture: Remove unnecessary "ret" variables Remove return variables (declared as "ret") in cases where, depending on whether a condition evaluates as true, the result of a function call can be immediately returned instead of storing the result in the return variable. When the condition evaluates as false, the constant initially stored in the return variable at declaration is returned instead. Signed-off-by: Pierce Griffiths Signed-off-by: Paul E. McKenney commit 5ab7ab8362fa8a4f7995d65ea05edf71530e8004 Author: Paul E. McKenney Date: Fri Sep 21 18:08:09 2018 -0700 rcutorture: Affinity forward-progress test to avoid housekeeping CPUs This commit affinities the forward-progress tests to avoid hogging a housekeeping CPU on the theory that the offloaded callbacks will be running on those housekeeping CPUs. Signed-off-by: Paul E. McKenney [ paulmck: Fix NULL-pointer issue located by kbuild test robot. ] Tested-by: Rong Chen commit 6b3de7a172bc59010a9d8e425877d98c1f24555e Author: Paul E. McKenney Date: Tue Aug 28 14:38:43 2018 -0700 rcutorture: Break up too-long rcu_torture_fwd_prog() function This commit splits rcu_torture_fwd_prog_nr() and rcu_torture_fwd_prog_cr() functions out of rcu_torture_fwd_prog() in order to reduce indentation pain and because rcu_torture_fwd_prog() was getting a bit too long. In addition, this will enable easier conditional execution of the rcu_torture_fwd_prog_cr() function, which can give false-positive failures in some NO_HZ_FULL configurations due to overloading the housekeeping CPUs. Signed-off-by: Paul E. McKenney commit fc6f9c57787e578473d47b7bbc846e317d17c1df Author: Paul E. McKenney Date: Mon Aug 27 14:43:05 2018 -0700 rcutorture: Remove cbflood facility Now that the forward-progress code does a full-bore continuous callback flood lasting multiple seconds, there is little point in also posting a mere 60,000 callbacks every second or so. This commit therefore removes the old cbflood testing. Over time, it may be desirable to concurrently do full-bore continuous callback floods on all CPUs simultaneously, but one dragon at a time. Signed-off-by: Paul E. McKenney commit 28cf5952f56005325f269ccfe402a880cd741189 Author: Paul E. McKenney Date: Tue Aug 21 15:27:16 2018 -0700 torture: Bring any extra CPUs online during kernel startup Currently, the torture scripts rely on the initrd/init script to bring any extra CPUs online, for example, in the case where the kernel and qemu have different ideas about how many CPUs are present. This works, but is an unnecessary dependency on initrd, which needs to vary depending on the distro. This commit therefore causes torture_onoff() to check for additional CPUs, attempting to bring any found online. Errors are ignored, just as they are by the initrd/init script. Signed-off-by: Paul E. McKenney commit 4871848531af1d62f30032bfb872c43b9afe03ad Author: Paul E. McKenney Date: Wed Aug 15 15:32:51 2018 -0700 rcutorture: Add call_rcu() flooding forward-progress tests This commit adds a call_rcu() flooding loop to the forward-progress test. This emulates tight userspace loops that force call_rcu() invocations, for example, the infamous loop containing close(open()) that instigated the addition of blimit. If RCU does not make sufficient forward progress in invoking the resulting flood of callbacks, rcutorture emits a warning. Signed-off-by: Paul E. McKenney commit eaaf055f27a0eaaed0cdb0d3aa8d7fb892829ccb Merge: f0ad56e876cdd df56e0f960627 97b59370fa595 3d709ab5a1767 b94ec36896daf d4d592a6eeda1 aacb5d91ab1bf Author: Paul E. McKenney Date: Sat Dec 1 12:43:16 2018 -0800 Merge branches 'bug.2018.11.12a', 'consolidate.2018.12.01a', 'doc.2018.11.12a', 'fixes.2018.11.12a', 'initrd.2018.11.08b', 'sil.2018.11.12a' and 'srcu.2018.11.27a' into HEAD bug.2018.11.12a: Get rid of BUG_ON() and friends consolidate.2018.12.01a: Continued RCU flavor-consolidation cleanup doc.2018.11.12a: Documentation updates fixes.2018.11.12a: Miscellaneous fixes initrd.2018.11.08b: Automate creation of rcutorture initrd sil.2018.11.12a: Remove more spin_unlock_wait() calls commit df56e0f960627f606cfc6ccda25c6ab5c61953d5 Author: Paul E. McKenney Date: Wed Nov 7 15:27:40 2018 -0800 rcutorture/formal: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change, even though it is but a comment. Signed-off-by: Paul E. McKenney commit 4a67e3a79e3bdc47dfd0c85a1888067d95a0282c Author: Paul E. McKenney Date: Wed Nov 7 15:25:13 2018 -0800 tools/kernel.h: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change, even though it is but a comment. Signed-off-by: Paul E. McKenney Cc: Matthew Wilcox Cc: commit dd06d25d06f4932c570540877eba88d868dbba9b Author: Paul E. McKenney Date: Wed Nov 7 15:12:34 2018 -0800 net/decnet: Replace rcu_barrier_bh() with rcu_barrier() Now that all RCU flavors have been consolidated, rcu_barrier_bh() is but a synonym for rcu_barrier(). This commit therefore replaces the former with the latter. Signed-off-by: Paul E. McKenney Cc: "David S. Miller" Cc: Cc: commit 0245b80e284d4fdabbf50589180482dc4d2cf277 Author: Paul E. McKenney Date: Wed Nov 7 15:09:25 2018 -0800 net/core/skmsg: Replace call_rcu_sched() with call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: John Fastabend Cc: Daniel Borkmann Cc: "David S. Miller" Cc: commit 6932689e4145f545062ca8c86cf76f38854d63d0 Author: Paul E. McKenney Date: Wed Nov 7 14:16:57 2018 -0800 livepatch: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change, even though it is but a comment. Signed-off-by: Paul E. McKenney commit 2af3024cd78f120d027cb44b454186ba9d7dab24 Author: Paul E. McKenney Date: Wed Nov 7 14:11:40 2018 -0800 cgroups: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change, even though it is but a comment. Signed-off-by: Paul E. McKenney Cc: Jens Axboe Cc: Dennis Zhou Cc: Johannes Weiner Cc: "Dennis Zhou (Facebook)" Acked-by: Tejun Heo commit d5cccfc7b772b8a20b06557f1b7c066e7fc2c393 Author: Paul E. McKenney Date: Wed Nov 7 14:01:39 2018 -0800 types: Remove call_rcu_bh() and call_rcu_sched() Now that call_rcu()'s callback is not invoked until after bh-disable and preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_bh() and call_rcu_sched(). This commit therefore removes these two API members from the callback_head structure's header comment. Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: Pekka Enberg Cc: Masahiro Yamada Cc: Alexey Dobriyan commit e3e740544173ef0dd8bffbf158182a7748e6c678 Author: Paul E. McKenney Date: Wed Nov 7 13:53:34 2018 -0800 percpu-rwsem: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change, even though it is but a comment. Signed-off-by: Paul E. McKenney Cc: Dennis Zhou Cc: Christoph Lameter Acked-by: Tejun Heo commit 1a56f7d53b5c8e82442e86eeac0b5d549088ee42 Author: Paul E. McKenney Date: Tue Nov 6 19:45:50 2018 -0800 net/bridge: Replace call_rcu_bh() and rcu_barrier_bh() Now that call_rcu()'s callback is not invoked until after all bh-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_bh(). Similarly, rcu_barrier() can be used in place of rcu_barrier_bh(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Cc: Roopa Prabhu Cc: "David S. Miller" Cc: Cc: Acked-by: Nikolay Aleksandrov commit 5da54c1810e52f7abba0ff7932dddd761f945875 Author: Paul E. McKenney Date: Tue Nov 6 19:43:32 2018 -0800 net/core: Replace call_rcu_bh() and synchronize_rcu_bh() Now that call_rcu()'s callback is not invoked until after all bh-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_bh(). Similarly, synchronize_rcu() can be used in place of synchronize_rcu_bh(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Cc: "David S. Miller" Cc: Eric Dumazet Cc: commit ae0e33494a601e13df79c4742d88d4d2bc2b0a87 Author: Paul E. McKenney Date: Tue Nov 6 19:40:39 2018 -0800 net/sched: Replace call_rcu_bh() and rcu_barrier_bh() Now that call_rcu()'s callback is not invoked until after bh-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_bh(). Similarly, rcu_barrier() can be used in place o frcu_barrier_bh(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: commit 2149da0748fc236b9916c53e26b3b0c9ab20a5dd Author: Balbir Singh Date: Tue Oct 30 02:40:15 2018 +0000 block: add cmd_flags to print_req_error I ran into a bug where after hibernation due to incompatible backends, the block driver returned BLK_STS_NOTSUPP, with the current message it's hard to find out what the command flags were. Adding req->cmd_flags help make the problem easier to diagnose. Reviewed-by: Eduardo Valentin Reviewed-by: Ming Lei Signed-off-by: Balbir Singh Signed-off-by: Jens Axboe commit f04b951f6c7eccd85ea7750a5fafa68fb98d6bfa Author: Christoph Hellwig Date: Sun Nov 4 17:47:44 2018 +0100 csky: use the generic remapping dma alloc implementation The csky code was largely copied from arm/arm64, so switch to the generic arm64-based implementation instead. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren commit 576d0d552be803b22867ed98a8619d68b1f78bbe Author: Christoph Hellwig Date: Sun Nov 4 17:46:21 2018 +0100 csky: don't use GFP_DMA in atomic_pool_init csky does not implement ZONE_DMA, which means passing GFP_DMA is a no-op. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren commit de90d7c42859d57a59aef3a6ec6e3013bcb337e7 Author: Christoph Hellwig Date: Sun Nov 4 17:53:47 2018 +0100 csky: don't select DMA_NONCOHERENT_OPS This option is gone past Linux 4.19. Signed-off-by: Christoph Hellwig Acked-by: Guo Ren commit e440e26a0251b054243b3db6356f3869a9f9c2d1 Author: Christoph Hellwig Date: Sun Nov 4 17:51:50 2018 +0100 dma-remap: support DMA_ATTR_NO_KERNEL_MAPPING Do not waste vmalloc space on allocations that do not require a mapping into the kernel address space. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit bfd56cd605219d90b210a5377fca31a644efe95c Author: Christoph Hellwig Date: Sun Nov 4 17:38:39 2018 +0100 dma-mapping: support highmem in the generic remap allocator By using __dma_direct_alloc_pages we can deal entirely with struct page instead of having to derive a kernel virtual address. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 0c3b3171ceccb8830c2bb5adff1b4e9b204c1450 Author: Christoph Hellwig Date: Sun Nov 4 20:29:28 2018 +0100 dma-mapping: move the arm64 noncoherent alloc/free support to common code The arm64 codebase to implement coherent dma allocation for architectures with non-coherent DMA is a good start for a generic implementation, given that is uses the generic remap helpers, provides the atomic pool for allocations that can't sleep and still is realtively simple and well tested. Move it to kernel/dma and allow architectures to opt into it using a config symbol. Architectures just need to provide a new arch_dma_prep_coherent helper to writeback an invalidate the caches for any memory that gets remapped for uncached access. Signed-off-by: Christoph Hellwig Reviewed-by: Will Deacon Reviewed-by: Robin Murphy commit f0edfea8ef93ed6cc5f747c46c85c8e53e0798a0 Author: Christoph Hellwig Date: Fri Aug 24 10:31:08 2018 +0200 dma-mapping: move the remap helpers to a separate file The dma remap code only makes sense for not cache coherent architectures (or possibly the corner case of highmem CMA allocations) and currently is only used by arm, arm64, csky and xtensa. Split it out into a separate file with a separate Kconfig symbol, which gets the right copyright notice given that this code was written by Laura Abbott working for Code Aurora at that point. Signed-off-by: Christoph Hellwig Acked-by: Laura Abbott Reviewed-by: Robin Murphy commit 704f2c20eaa566f6906e8812b6e2115889bd753d Author: Christoph Hellwig Date: Sat Sep 22 20:47:26 2018 +0200 dma-direct: reject highmem pages from dma_alloc_from_contiguous dma_alloc_from_contiguous can return highmem pages depending on the setup, which a plain non-remapping DMA allocator can't handle. Detect this case and fail the allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit b18814e767a445534ab9ccba02e82a31208f85d6 Author: Christoph Hellwig Date: Sun Nov 4 17:27:56 2018 +0100 dma-direct: provide page based alloc/free helpers Some architectures support remapping highmem into DMA coherent allocations. To use the common code for them we need variants of dma_direct_{alloc,free}_pages that do not use kernel virtual addresses. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 53e8785c248df097364b75e550d06bbc58db8af8 Author: Nicholas Mc Guire Date: Tue Nov 27 18:05:04 2018 +0100 staging: iio: adc: ad7280a: check for devm_kasprint() failure devm_kasprintf() may return NULL on failure of internal allocation thus the assignments to attr.name are not safe if not checked. On error ad7280_attr_init() returns a negative return so -ENOMEM should be OK here (passed on as return value of the probe function). To make the error case more readable a temporary iio_attr is introduced and the code refactored. Signed-off-by: Nicholas Mc Guire Fixes: 2051f25d2a26 ("iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System2") Signed-off-by: Jonathan Cameron commit 452ad2f2f8b7f210ac3b6fc08a52a6f5e392059a Author: Paweł Chmiel Date: Fri Nov 30 19:04:23 2018 +0100 ARM: dts: s5pv210: Add s5p-jpeg codec node. Add node for s5p-jpeg codec, which is present in S5PV210 SoC. Signed-off-by: Paweł Chmiel Signed-off-by: Krzysztof Kozlowski commit 88884a503ba854f3c0ff0fef458ac00aefa62671 Author: Lorenzo Bianconi Date: Mon Nov 26 10:05:55 2018 +0100 iio: humidity: hts221: add entry in MAINTAINERS file Add entry for hts221 temperature/humidity driver in MAINTAINERS file Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 0a9ff2a13b4637dec6ec61e5cec30dbb598a8b8d Author: Stephan Gerhold Date: Sun Nov 25 19:02:40 2018 +0100 iio: magnetometer: ak8975: Add the "AKM9911" ACPI HID This HID is used on the ASUS MeMO Pad 7 (ME176C) tablet. Signed-off-by: Stephan Gerhold Signed-off-by: Jonathan Cameron commit 9564c7a49290a003d3fc21b9b5762d82e84e3364 Author: Matheus Tavares Date: Fri Nov 23 22:23:12 2018 -0200 staging:iio:ad2s90: Move out of staging Move ad2s90 resolver driver out of staging to the main tree. Signed-off-by: Matheus Tavares Signed-off-by: Victor Colombo Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 3a1203bfa4964550a706fd786df9bcbcd026d8ed Author: Victor Colombo Date: Fri Nov 23 22:23:11 2018 -0200 staging:iio:ad2s90: Add comment to device state mutex Fix the checkpatch.pl issue: "CHECK: struct mutex definition without comment". Signed-off-by: Victor Colombo Signed-off-by: Matheus Tavares Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 07e00822cca5975b6df245554b8495dfee8482e0 Author: Matheus Tavares Date: Fri Nov 23 22:23:10 2018 -0200 staging:iio:ad2s90: Replace license text w/ SPDX identifier This patch removes the license boilerplate text at the top of ad2s90.c and, instead, adds the SPDX GPL-2.0 license identifier, which solves the checkpatch.pl warning: "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1". Signed-off-by: Matheus Tavares Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit e3d786a3745473e905e68aa918b1543c6f9da67c Author: Matheus Tavares Date: Fri Nov 23 22:23:09 2018 -0200 dt-bindings:iio:resolver: Add docs for ad2s90 This patch adds the device tree binding documentation for the ad2s90 resolver-to-digital converter. Signed-off-by: Matheus Tavares Reviewed-by: Rob Herring Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 11d509adfbe04f9eff49a17eed5d686472b435f4 Author: Alexandru Ardelean Date: Fri Nov 23 22:23:08 2018 -0200 staging:iio:ad2s90: Add max frequency check at probe This patch adds a max frequency check at the beginning of ad2s90_probe function so that when it is set to a value above 0.83Mhz, dev_err is called with an appropriate message and -EINVAL is returned. The defined limit is 0.83Mhz instead of 2Mhz, which is the chip's max frequency as specified in the datasheet, because, as also specified in the datasheet, a 600ns delay is expected between the application of a logic LO to CS and the application of SCLK. Since the delay is not implemented in the spi code, to satisfy it, SCLK's period should be at most 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives roughly 830000Hz. Signed-off-by: Alexandru Ardelean Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit a996590baddca587d91d07e264d2649b84788b17 Author: Matheus Tavares Date: Fri Nov 23 22:23:07 2018 -0200 staging:iio:ad2s90: Remove spi setup that should be done via dt The ad2s90 driver currently sets some spi settings (max_speed_hz and mode) at ad2s90_probe. Since the maximum frequency is a required element in DT binding for spi slave devices and because the spi mode for the device can be either (0,0) or (1,1), these settings should be handled via device tree, not in the driver's code. This patch removes them from the probe function. Note: The way in which the mentioned spi settings need to be specified on the ad2s90's node of a device tree will be documented in the future patch "dt-bindings:iio:resolver: Add docs for ad2s90". Signed-off-by: Matheus Tavares Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit f116914dca8ac81ec4bee6d517f867ea37b0d320 Author: Matheus Tavares Date: Fri Nov 23 22:23:06 2018 -0200 staging:iio:ad2s90: Add device tree support This patch adds device tree support to ad2s90 with standard device tree id table. Signed-off-by: Matheus Tavares Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 5439f09f488f291a9493455c24b197c99025764d Author: Masahiro Yamada Date: Fri Nov 30 10:05:30 2018 +0900 kbuild: remove redundant 'set -e' from cmd_* defines These three cmd_* are invoked in the $(call cmd,*) form. Now that 'set -e' moved to the 'cmd' macro, they do not need to explicitly give 'set -e'. Signed-off-by: Masahiro Yamada commit 67126965ee0856f0d1cdb10792a36eaf4b2f13c0 Author: Masahiro Yamada Date: Fri Nov 30 10:05:29 2018 +0900 kbuild: refactor if_changed '@set -e; $(echo-cmd) $(cmd_$(1)' can be replaced with '$(cmd)'. Signed-off-by: Masahiro Yamada commit e5d289100d3aef3e83dc1b8303999e26d86acb7b Author: Masahiro Yamada Date: Fri Nov 30 10:05:28 2018 +0900 kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule With the change of rule_cc_o_c / rule_as_o_S in the last commit, each command is executed in a separate subshell. Rip off unneeded semicolons. Signed-off-by: Masahiro Yamada commit 3a2429e1faf40b2aaa481aa4b001a74d222c7e8b Author: Masahiro Yamada Date: Fri Nov 30 10:05:27 2018 +0900 kbuild: change if_changed_rule for multi-line recipe The 'define' ... 'endef' directive is useful to confine a series of shell commands into a single macro: define foo [action1] [action2] [action3] endif Each action is executed in a separate subshell. However, rule_cc_o_c and rule_as_o_S in scripts/Makefile.build are written as follows (with a trailing semicolon in each cmd_*): define rule_cc_o_c [action1] ; \ [action2] ; \ [action3] ; endef All shell commands are concatenated with '; \' so that it looks like a single command from the Makefile point of view. This does not exploit the benefits of 'define' ... 'endef' form because a single shell command can be more simply written, like this: rule_cc_o_c = \ [action1] ; \ [action2] ; \ [action3] ; I guess the intention for the command concatenation was to let the '@set -e' in if_changed_rule cover all the commands. We can improve the readability by moving '@set -e' to the 'cmd' macro. The combo of $(call echo-cmd,*) $(cmd_*) in rule_cc_o_c and rule_as_o_S have been replaced with $(call cmd,*). The trailing back-slashes have been removed. Here is a note about the performance: the commands in rule_cc_o_c and rule_as_o_S were previously executed all together in a single subshell, but now each line in a separate subshell. This means Make will spawn extra subshells [1]. I measured the build performance for x86_64_defconfig + CONFIG_MODVERSIONS + CONFIG_TRIM_UNUSED_KSYMS and I saw slight performance regression, but I believe code readability and maintainability wins. [1] Precisely, GNU Make may optimize this by executing the command directly instead of forking a subshell, if no shell special characters are found in the command line and omitting the subshell will not change the behavior. Signed-off-by: Masahiro Yamada commit bbda5ec671d3fe62faefa1cab7270aa586042a4b Author: Masahiro Yamada Date: Fri Nov 30 10:05:26 2018 +0900 kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS My main motivation of this commit is to clean up scripts/Kbuild.include and scripts/Makefile.build. Currently, CONFIG_TRIM_UNUSED_KSYMS works with a tricky gimmick; possibly exported symbols are detected by letting $(CPP) replace EXPORT_SYMBOL* with a special string '=== __KSYM_*===', which is post-processed by sed, and passed to fixdep. The extra preprocessing is costly, and hacking cmd_and_fixdep is ugly. I came up with a new way to find exported symbols; insert a dummy symbol __ksym_marker_* to each potentially exported symbol. Those dummy symbols are picked up by $(NM), post-processed by sed, then appended to .*.cmd files. I collected the post-process part to a new shell script scripts/gen_ksymdeps.sh for readability. The dummy symbols are put into the .discard.* section so that the linker script rips them off the final vmlinux or modules. A nice side-effect is building with CONFIG_TRIM_UNUSED_KSYMS will be much faster. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Pitre commit ee3e46b7efd2954479f87030d31fda3c22bbc763 Author: Masahiro Yamada Date: Fri Nov 30 10:05:25 2018 +0900 kbuild: refactor modversions build rules Let $(CC) compile objects into normal files *.o instead of .tmp_*.o whether CONFIG_MODVERSIONS is enabled or not. With this, the input file for objtool is always *.o so objtool_o can go away. I guess the reason of using .tmp_*.o for intermediate objects was to avoid leaving incomplete *.o file (, whose timestamp says it is up-to-date) when the genksyms tool failed for some reasons. It no longer matters because any targets are deleted on errors since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Signed-off-by: Masahiro Yamada commit 4317ee3b6a5e8bd0f62780591df6424ef9397fbd Author: Masahiro Yamada Date: Fri Nov 30 10:05:24 2018 +0900 kbuild: remove redundant 'set -e' from sub_cmd_record_mcount This is executed inside the if_changed_rule, which already sets 'set -e'. Signed-off-by: Masahiro Yamada commit f3fd4a3f3a388041fe5f1ef74fdd461900513f1e Author: Masahiro Yamada Date: Fri Nov 30 10:05:23 2018 +0900 kbuild: remove redundant 'set -e' from filechk_offsets The filechk macro in scripts/Kbuild.include already sets 'set -e'. Signed-off-by: Masahiro Yamada commit 392885ee82d35d515ba2af7b72c5e357c3002113 Author: Masahiro Yamada Date: Fri Nov 30 10:05:22 2018 +0900 kbuild: let fixdep directly write to .*.cmd files Currently, fixdep writes dependencies to .*.tmp, which is renamed to .*.cmd after everything succeeds. This is a very safe way to avoid corrupted .*.cmd files. The if_changed_dep has carried this safety mechanism since it was added in 2002. If fixdep fails for some reasons or a user terminates the build while fixdep is running, the incomplete output from the fixdep could be troublesome. This is my insight about some bad scenarios: [1] If the compiler succeeds to generate *.o file, but fixdep fails to write necessary dependencies to .*.cmd file, Make will miss to rebuild the object when headers or CONFIG options are changed. In this case, fixdep should not generate .*.cmd file at all so that 'arg-check' will surely trigger the rebuild of the object. [2] A partially constructed .*.cmd file may not be a syntactically correct makefile. The next time Make runs, it would include it, then fail to parse it. Once this happens, 'make clean' is be the only way to fix it. In fact, [1] is no longer a problem since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Make deletes a target file on any failure in its recipe. Because fixdep is a part of the recipe of *.o target, if it fails, the *.o is deleted anyway. However, I am a bit worried about the slight possibility of [2]. So, here is a solution. Let fixdep directly write to a .*.cmd file, but allow makefiles to include it only when its corresponding target exists. This effectively reverts commit 2982c953570b ("kbuild: remove redundant $(wildcard ...) for cmd_files calculation"), and commit 00d78ab2ba75 ("kbuild: remove dead code in cmd_files calculation in top Makefile") because now we must check the presence of targets. Signed-off-by: Masahiro Yamada commit ce2fd53a10c7d17934c005029382f8310e565504 Author: Masahiro Yamada Date: Thu Nov 29 12:56:31 2018 +0900 kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile Now that 'archprepare' depends on 'scripts', Kbuild can descend into scripts/gcc-plugins in a more standard way. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook commit 059bc9fc375e00f159f9d7c5ca9d18ab843f95de Author: Masahiro Yamada Date: Thu Nov 29 12:56:30 2018 +0900 kbuild: make 'archprepare' depend on 'scripts' Before start descending, Kbuild needs to run 'prepare' and 'scripts', which has been orthogonal to each other. Going forward, let's consider 'scripts' is a part of the preparation. This will allow more cleanups. Move 'scripts' to the prerequisite of 'archprepare', where UML starts compiling target *.c files. Signed-off-by: Masahiro Yamada commit 60df1aee2aecb53efb4218b4dfdf7d6c80a5a3de Author: Masahiro Yamada Date: Thu Nov 29 12:13:24 2018 +0900 kbuild: move modpost out of 'scripts' target I am eagar to build under the scripts/ directory only with $(HOSTCC), but scripts/mod/ highly depends on the $(CC) and target arch headers. That it why the 'scripts' target must depend on 'asm-generic', 'gcc-plugins', and $(autoksyms_h). Move it to the 'prepare0' stage. I know this is a cheesy workaround, but better than the current situation. Signed-off-by: Masahiro Yamada commit 65bba0423ecf89fb291d2269e0087707888a1cef Author: Masahiro Yamada Date: Thu Nov 29 11:58:50 2018 +0900 kbuild: fix UML build error with CONFIG_GCC_PLUGINS UML fails to build with CONFIG_GCC_PLUGINS=y. $ make -s ARCH=um mrproper $ make -s ARCH=um allmodconfig $ make ARCH=um UPD include/generated/uapi/linux/version.h WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/x86/include/generated/uapi/asm/poll.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/export.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h SYSTBL arch/x86/include/generated/asm/syscalls_32.h SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h SYSTBL arch/x86/include/generated/asm/syscalls_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h HOSTCC scripts/unifdef CC arch/x86/um/user-offsets.s cc1: error: cannot load plugin ./scripts/gcc-plugins/cyc_complexity_plugin.so ./scripts/gcc-plugins/cyc_complexity_plugin.so: cannot open shared object file: No such file or directory cc1: error: cannot load plugin ./scripts/gcc-plugins/structleak_plugin.so ./scripts/gcc-plugins/structleak_plugin.so: cannot open shared object file: No such file or directory cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so ./scripts/gcc-plugins/latent_entropy_plugin.so: cannot open shared object file: No such file or directory cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so ./scripts/gcc-plugins/randomize_layout_plugin.so: cannot open shared object file: No such file or directory make[1]: *** [scripts/Makefile.build;119: arch/x86/um/user-offsets.s] Error 1 make: *** [arch/um/Makefile;152: arch/x86/um/user-offsets.s] Error 2 Reorder the preparation stage (with cleanups) to make sure gcc-plugins is built before descending to arch/x86/um/. Fixes: 6b90bd4ba40b ("GCC plugin infrastructure") Reported-by: kbuild test robot Signed-off-by: Masahiro Yamada commit 3b4152880348287b6b3d9a0708f1e2f4c540f3d0 Author: Masahiro Yamada Date: Fri Nov 23 16:57:23 2018 +0900 modpost: move unresolved symbol checks to check_exports() This will fit better in check_exports() than add_versions(). Signed-off-by: Masahiro Yamada commit c6826ad8a49f1230dcbc45dac26b54d492b13280 Author: Masahiro Yamada Date: Fri Nov 23 16:57:22 2018 +0900 modpost: merge module iterations Probably, this is just a matter of the order of error/warning messages. Merge the two for-loops. Signed-off-by: Masahiro Yamada commit d2665ca8e3310d045b62397590ab54dc485e035e Author: Masahiro Yamada Date: Fri Nov 23 16:57:21 2018 +0900 modpost: refactor seen flag clearing in add_depends() You do not need to iterate over all modules for resetting ->seen flag because add_depends() is only interested in modules that export symbols referenced from the given 'mod'. This also avoids shadowing the 'modules' parameter of add_depends(). Signed-off-by: Masahiro Yamada commit f880eea68fe593342fa6e09be9bb661f3c297aec Author: Masahiro Yamada Date: Thu Nov 22 13:28:42 2018 +0900 modpost: file2alias: check prototype of handler Use specific prototype instead of an opaque pointer so that the compiler can catch function prototype mismatch. Signed-off-by: Masahiro Yamada Reviewed-by: Mathieu Malaterre commit ec91e78d378cc5d4b43805a1227d8e04e5dfa17d Author: Masahiro Yamada Date: Thu Nov 22 13:28:41 2018 +0900 modpost: file2alias: go back to simple devtable lookup Commit e49ce14150c6 ("modpost: use linker section to generate table.") was not so cool as we had expected first; it ended up with ugly section hacks when commit dd2a3acaecd7 ("mod/file2alias: make modpost compile on darwin again") came in. Given a certain degree of unknowledge about the link stage of host programs, I really want to see simple, stupid table lookup so that this works in the same way regardless of the underlying executable format. Signed-off-by: Masahiro Yamada Acked-by: Mathieu Malaterre commit e07db28eea38ed4e332b3a89f3995c86b713cb5b Author: Masahiro Yamada Date: Thu Nov 22 08:11:54 2018 +0900 kbuild: fix single target build for external module Building a single target in an external module fails due to missing .tmp_versions directory. For example, $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o will fail in the following way: CC [M] /home/masahiro/foo/foo.o /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only before building /, %/, %.ko single targets of external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by: Masahiro Yamada commit a4d26f1a0958bb1c2b60c6f1e67c6f5d43e2647b Author: Paul Walmsley Date: Wed Nov 21 13:14:13 2018 -0800 modpost: skip ELF local symbols during section mismatch check During development of a serial console driver with a gcc 8.2.0 toolchain for RISC-V, the following modpost warning appeared: ---- WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup() The variable .LANCHOR1 references the function __init sifive_serial_console_setup() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console ---- ".LANCHOR1" is an ELF local symbol, automatically created by gcc's section anchor generation code: https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473 This was verified by compiling the kernel with -fno-section-anchors and observing that the ".LANCHOR1" ELF local symbol disappeared, and modpost no longer warned about the section mismatch. The serial driver code idiom triggering the warning is standard Linux serial driver practice that has a specific whitelist inclusion in modpost.c. I'm neither a modpost nor an ELF expert, but naively, it doesn't seem useful for modpost to report section mismatch warnings caused by ELF local symbols by default. Local symbols have compiler-generated names, and thus bypass modpost's whitelisting algorithm, which relies on the presence of a non-autogenerated symbol name. This increases the likelihood that false positive warnings will be generated (as in the above case). Thus, disable section mismatch reporting on ELF local symbols. The rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid ARM binutils leaking ELF local symbols") and of similar code already present in modpost.c: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256 This third version of the patch implements a suggestion from Masahiro Yamada to restructure the code as an additional pattern matching step inside secref_whitelist(), and further improves the patch description. Signed-off-by: Paul Walmsley Signed-off-by: Paul Walmsley Acked-by: Sam Ravnborg Signed-off-by: Masahiro Yamada commit 0126be38d98815d25d9ec4573541ed4315bf6a88 Author: Masahiro Yamada Date: Wed Nov 21 00:04:18 2018 +0900 kbuild: announce removal of SUBDIRS if used SUBDIRS has been kept as a backward compatibility since commit ("[PATCH] kbuild: external module support") in 2002. We do not need multiple ways to do the same thing, so I will remove SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and updated the document so that nobody would try to use it. Meanwhile, display the following warning if SUBDIRS is used. Makefile:189: ================= WARNING ================ Makefile:190: 'SUBDIRS' will be removed after Linux 5.3 Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:192: ========================================== Signed-off-by: Masahiro Yamada Acked-by: Boris Brezillon # for scx200_docflash.c Acked-by: Guenter Roeck # for scx200_wdt.c commit 6ed5943f8735e2b778d92ea4d9805c0a1d89bc2b Author: Florian Westphal Date: Thu Nov 15 10:22:59 2018 +0100 netfilter: nat: remove l4 protocol port rovers This is a leftover from days where single-cpu systems were common: Store last port used to resolve a clash to use it as a starting point when the next conflict needs to be resolved. When we have parallel attempt to connect to same address:port pair, its likely that both cores end up computing the same "available" port, as both use same starting port, and newly used ports won't become visible to other cores until the conntrack gets confirmed later. One of the cores then has to drop the packet at insertion time because the chosen new tuple turns out to be in use after all. Lets simplify this: remove port rover and use a pseudo-random starting point. Note that this doesn't make netfilter default to 'fully random' mode; the 'rover' was only used if NAT could not reuse source port as-is. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c3e9305983597a61083482581e83f0bd77ba306a Author: Pablo Neira Ayuso Date: Mon Nov 12 16:26:44 2018 +0100 netfilter: remove NFC_* cache bits These are very very (for long time unused) caching infrastructure definition, remove then. They have nothing to do with the NFC subsystem. Signed-off-by: Pablo Neira Ayuso commit c8d1da4000b0b95bf95d3e13b7450eec5428da1e Author: Paul E. McKenney Date: Sun Nov 11 11:43:59 2018 -0800 netfilter: Replace call_rcu_bh(), rcu_barrier_bh(), and synchronize_rcu_bh() Now that call_rcu()'s callback is not invoked until after bh-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_bh(). Similarly, rcu_barrier() can be used in place of rcu_barrier_bh() and synchronize_rcu() in place of synchronize_rcu_bh(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Signed-off-by: Pablo Neira Ayuso commit 71fc156ff5361beb1fb4c519add1f1ebda33ff13 Merge: 9ffd05d9b78a2 dc378a1ab5b60 Author: Alexei Starovoitov Date: Fri Nov 30 22:06:41 2018 -0800 Merge branch 'xdp1-improvements' Matteo Croce says: ==================== Small improvements to improve the readability and easiness to use of the xdp1 sample. ==================== Signed-off-by: Alexei Starovoitov commit dc378a1ab5b6009629a3f8410f8b3030ac6b14c9 Author: Matteo Croce Date: Sat Dec 1 01:23:06 2018 +0100 samples: bpf: get ifindex from ifname Find the ifindex with if_nametoindex() instead of requiring the numeric ifindex. Signed-off-by: Matteo Croce Signed-off-by: Alexei Starovoitov commit d606ee5c1d9a9bc4d1bba3c36fae615447f9851c Author: Matteo Croce Date: Sat Dec 1 01:23:05 2018 +0100 samples: bpf: improve xdp1 example Store only the total packet count for every protocol, instead of the whole per-cpu array. Use bpf_map_get_next_key() to iterate the map, instead of looking up all the protocols. Signed-off-by: Matteo Croce Signed-off-by: Alexei Starovoitov commit 9ffd05d9b78a2fb393d31936886c320b1d6e438f Merge: 88945f460603a 0a68632488aa0 Author: Alexei Starovoitov Date: Fri Nov 30 21:38:49 2018 -0800 Merge branch 'improve-test-coverage-sparc' David Miller says: ==================== On sparc64 a ton of test cases in test_verifier.c fail because the memory accesses in the test case are unaligned (or cannot be proven to be aligned by the verifier). Perhaps we can eventually try to (carefully) modify each test case which has this problem to not use unaligned accesses but: 1) That is delicate work. 2) The changes might not fully respect the original intention of the testcase. 3) In some cases, such a transformation might not even be feasible at all. So add an "any alignment" flag to tell the verifier to forcefully disable it's alignment checks completely. test_verifier.c is then annotated to use this flag when necessary. The presence of the flag in each test case is good documentation to anyone who wants to actually tackle the job of eliminating the unaligned memory accesses in the test cases. I've also seen several weird things in test cases, like trying to access __skb->mark in a packet buffer. This gets rid of 104 test_verifier.c failures on sparc64. Changes since v1: 1) Explain the new BPF_PROG_LOAD flag in easier to understand terms. Suggested by Alexei. 2) Make bpf_verify_program() just take a __u32 prog_flags instead of just accumulating boolean arguments over and over. Also suggested by Alexei. Changes since RFC: 1) Only the admin can allow the relaxation of alignment restrictions on inefficient unaligned access architectures. 2) Use F_NEEDS_EFFICIENT_UNALIGNED_ACCESS instead of making a new flag. 3) Annotate in the output, when we have a test case that the verifier accepted but we did not try to execute because we are on an inefficient unaligned access platform. Maybe with some arch machinery we can avoid this in the future. Signed-off-by: David S. Miller ==================== Signed-off-by: Alexei Starovoitov commit 0a68632488aa0129ed530af9ae9e8573f5650812 Author: David Miller Date: Fri Nov 30 21:08:50 2018 -0800 bpf: Apply F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to more ACCEPT test cases. If a testcase has alignment problems but is expected to be ACCEPT, verify it using F_NEEDS_EFFICIENT_UNALIGNED_ACCESS too. Maybe in the future if we add some architecture specific code to elide the unaligned memory access warnings during the test, we can execute these as well. Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit 2acc5fd5b8c25df0de7f3c8b8e385f5c6f8202ec Author: David Miller Date: Fri Nov 30 21:08:39 2018 -0800 bpf: Make more use of 'any' alignment in test_verifier.c Use F_NEEDS_EFFICIENT_UNALIGNED_ACCESS in more tests where the expected result is REJECT. Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit c7665702d3208b77b8e00f0699b6b88241b04360 Author: David Miller Date: Fri Nov 30 21:08:26 2018 -0800 bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in test_verifier.c Make it set the flag argument to bpf_verify_program() which will relax the alignment restrictions. Now all such test cases will go properly through the verifier even on inefficient unaligned access architectures. On inefficient unaligned access architectures do not try to run such programs, instead mark the test case as passing but annotate the result similarly to how it is done now in the presence of this flag. So, we get complete full coverage for all REJECT test cases, and at least verifier level coverage for ACCEPT test cases. Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit e9ee9efc0d176512cdce9d27ff8549d7ffa2bfcd Author: David Miller Date: Fri Nov 30 21:08:14 2018 -0800 bpf: Add BPF_F_ANY_ALIGNMENT. Often we want to write tests cases that check things like bad context offset accesses. And one way to do this is to use an odd offset on, for example, a 32-bit load. This unfortunately triggers the alignment checks first on platforms that do not set CONFIG_EFFICIENT_UNALIGNED_ACCESS. So the test case see the alignment failure rather than what it was testing for. It is often not completely possible to respect the original intention of the test, or even test the same exact thing, while solving the alignment issue. Another option could have been to check the alignment after the context and other validations are performed by the verifier, but that is a non-trivial change to the verifier. Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit 88945f460603ad8909b556c67a9229bb23188d41 Author: David Miller Date: Wed Nov 28 22:33:53 2018 -0800 bpf: Fix verifier log string check for bad alignment. The message got changed a lot time ago. This was responsible for 36 test case failures on sparc64. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: David S. Miller Signed-off-by: Alexei Starovoitov commit 97e6c858a26ee8a31719a08ae896ca682eb8978e Author: Nathan Chancellor Date: Wed Nov 28 23:01:05 2018 -0700 net: usb: aqc111: Initialize wol_cfg with memset in aqc111_suspend Clang warns: drivers/net/usb/aqc111.c:1326:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct aqc111_wol_cfg wol_cfg = { 0 }; ^ {} 1 warning generated. Use memset to initialize the object to take compiler instrumentation out of the equation. Fixes: e58ba4544c77 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet") Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 315c9e83010d63370fb0de160e52a21c3f3fa687 Author: YueHaibing Date: Thu Nov 29 02:36:32 2018 +0000 net: qualcomm: rmnet: Remove set but not used variable 'cmd' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c: In function 'rmnet_map_do_flow_control': drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:23:36: warning: variable 'cmd' set but not used [-Wunused-but-set-variable] struct rmnet_map_control_command *cmd; 'cmd' not used anymore now, should also be removed. Signed-off-by: YueHaibing Acked-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit 26d31925cd5ea4b5b168ed538b0326d63ccbb384 Author: Nicolas Dichtel Date: Wed Nov 28 19:12:56 2018 +0100 tun: implement carrier change The userspace may need to control the carrier state. Signed-off-by: Nicolas Dichtel Signed-off-by: Didier Pallard Signed-off-by: David S. Miller commit bf1c3ab8d3571db8a973b0c46c5aa963b30d9a82 Author: Paolo Abeni Date: Wed Nov 28 17:37:53 2018 +0100 net: reorder flowi_common fields to avoid holes the flowi* structures are used and memsetted by server functions in critical path. Currently flowi_common has a couple of holes that we can eliminate reordering the struct fields. As a side effect, both flowi4 and flowi6 shrink by 8 bytes. Before: pahole -EC flowi_common struct flowi_common { // ... /* size: 40, cachelines: 1, members: 10 */ /* sum members: 32, holes: 1, sum holes: 4 */ /* padding: 4 */ /* last cacheline: 40 bytes */ }; pahole -EC flowi6 struct flowi6 { // ... /* size: 88, cachelines: 2, members: 6 */ /* padding: 4 */ /* last cacheline: 24 bytes */ }; pahole -EC flowi4 struct flowi4 { // ... /* size: 56, cachelines: 1, members: 4 */ /* padding: 4 */ /* last cacheline: 56 bytes */ }; After: struct flowi_common { // ... /* size: 32, cachelines: 1, members: 10 */ /* last cacheline: 32 bytes */ }; struct flowi6 { // ... /* size: 80, cachelines: 2, members: 6 */ /* padding: 4 */ /* last cacheline: 16 bytes */ }; struct flowi4 { // ... /* size: 48, cachelines: 1, members: 4 */ /* padding: 4 */ /* last cacheline: 48 bytes */ }; Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit f4bb495cde4e64d6d582b3c389e5b0f3fa011efe Merge: 734317d93e5e1 b5166d7a92398 Author: David S. Miller Date: Fri Nov 30 17:06:29 2018 -0800 Merge branch 'mlxsw-Add-VxLAN-support-with-VLAN-aware-bridges' Ido Schimmel says: ==================== mlxsw: Add VxLAN support with VLAN-aware bridges Commit 53e50a6ec24d ("Merge branch 'mlxsw-Add-VxLAN-support'") added mlxsw support for VxLAN when the VxLAN device was enslaved to VLAN-unaware bridges. This patchset extends mlxsw to also support VxLAN with VLAN-aware bridges. With VLAN-aware bridges, the VxLAN device's VNI is mapped to the VLAN that is configured as 'pvid untagged' on the corresponding bridge port. To prevent ambiguity, mlxsw forbids configurations in which the same VLAN is configured as 'pvid untagged' on multiple VxLAN devices. Patches #1-#2 add the necessary APIs in mlxsw and the bridge driver. Patches #3-#4 perform small refactoring in order to prepare mlxsw for VLAN-aware support. Patch #5 finally enables the enslavement of VxLAN devices to a VLAN-aware bridge. Among other things, it extends mlxsw to handle switchdev notifications about VLAN add / delete on a VxLAN device enslaved to an offloaded VLAN-aware bridge. Patches #6-#8 add selftests to test the new functionality. ==================== Signed-off-by: David S. Miller commit b5166d7a92398e3bd7fc44f8705c07fdfbfc0c17 Author: Ido Schimmel Date: Wed Nov 28 20:07:08 2018 +0000 selftests: forwarding: Add VxLAN test with a VLAN-aware bridge The test is very similar to its VLAN-unaware counterpart (vxlan_bridge_1d.sh), but instead of using multiple VLAN-unaware bridges, a single VLAN-aware bridge is used with multiple VLANs. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit f07232375d7f9384ec971d55343bf44ea1881fc4 Author: Ido Schimmel Date: Wed Nov 28 20:07:06 2018 +0000 selftests: mlxsw: Add a test for VxLAN configuration with a VLAN-aware bridge Extend the existing VLAN-unaware tests with their VLAN-aware counterparts. This includes sanitization of invalid configuration and offload indication on the local route performing decapsulation and the FDB entries perform encapsulation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit bbe210615dc1fa7ec88516adb7dfccb47bccba21 Author: Ido Schimmel Date: Wed Nov 28 20:07:05 2018 +0000 selftests: mlxsw: Consider VLAN-aware bridges as valid Previous patches add the ability to work with VLAN-aware bridges and VxLAN devices, so make sure such configuration no longer fails. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d70e42b22dd40a56ee44f451fb5a661ab88e4691 Author: Ido Schimmel Date: Wed Nov 28 20:07:04 2018 +0000 mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges Commit 1c30d1836aeb ("mlxsw: spectrum: Enable VxLAN enslavement to bridges") enabled the enslavement of VxLAN devices to bridges that have mlxsw ports (or their upper) as slaves. This patch extends mlxsw to also support VLAN-aware bridges. The patch is similar in nature to mentioned commit, but there is one major difference. With VLAN-aware bridges, the VxLAN device's VNI is mapped to the VLAN that is configured as PVID and egress untagged on the bridge port. Therefore, the driver is extended to listen to VLAN configuration on VxLAN devices of interest and enable / disable NVE encapsulation on the corresponding 802.1Q FIDs. To prevent ambiguity, the driver makes sure that a given VLAN is not configured as PVID and egress untagged on multiple VxLAN devices. This sanitization takes place both when a port is enslaved to a bridge with existing VxLAN devices and when a VLAN is added to / removed from a VxLAN device of interest. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e Author: Ido Schimmel Date: Wed Nov 28 20:07:02 2018 +0000 mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridges The vxlan_join() function resolves the FID on which the VNI should be set and then sets the VNI. Currently, the FID is simply resolved according to the ifindex of the bridge device to which the VxLAN device is enslaved. This works because only VLAN-unaware bridges are supported. With VLAN-aware bridges the FID would need to be resolved based on the VLAN to which the VNI is mapped to. Add the VLAN ID to the argument list of the function. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit b03fa9e7e0cfe9ae5f3d294bbb60b5acd02dbfde Author: Ido Schimmel Date: Wed Nov 28 20:07:01 2018 +0000 mlxsw: spectrum_switchdev: Unify VxLAN leave function The function mlxsw_sp_bridge_vxlan_leave() is currently split between VLAN-aware and VLAN-unaware bridges, but actually both types can use the same function. The function needs to resolve the FID that corresponds to the VxLAN device and disable NVE encapsulation on it. Instead of looking up the FID differently for VLAN-aware and VLAN-unaware bridges, we can always use the VxLAN's device VNI. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5a8fb370bef8222c497130fc9aa100fe5ca78308 Author: Ido Schimmel Date: Wed Nov 28 20:06:59 2018 +0000 mlxsw: spectrum_fid: Add API to lookup 802.1Q FIDs without creating them In a similar fashion to commit 564c6d727aca ("mlxsw: spectrum_fid: Add APIs to lookup FID without creating it"), add a corresponding API to lookup 802.1Q FIDs. This is a prerequisite to VxLAN support with VLAN-aware bridges and will allow us to resolve a 802.1Q FID by its VLAN when an FDB entry is added on the bridge port of the VxLAN device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5a6db04ca8d44c873d6dd6bc3d2328aaa4c86a87 Author: Ido Schimmel Date: Wed Nov 28 20:06:58 2018 +0000 net: bridge: Extend br_vlan_get_pvid() for bridge ports Currently, the function only works for the bridge device itself, but subsequent patches will need to be able to query the PVID of a given bridge port, so extend the function. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c9533792a5cb943487d15e37865da286fff142ad Merge: 4737365aebd1a f98d45145e6a4 Author: Olof Johansson Date: Fri Nov 30 15:51:29 2018 -0800 Merge tag 'omap-for-v4.21/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/defconfig Defconfig changes for omaps for v4.21 merge window We're finally changing omaps to use 8250_OMAP instead of SERIAL_OMAP for multi_v7_defconfig. This will make things much easier for distros, and the kernel already warns about the kernel console getting redirected with CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP defaulting to y. People using /etc/inittab still need to s/ttyO/ttyS/ if using the out-of-box multi_v7_defconfig, and that did not seem to be an issue when we moved omap2plus_defconfig to use 8250_OMAP earlier. The other change is to enable CONFIG_SND_SOC_TLV320AIC23_I2C as a loadable module that I forgot to send a pull request for earlier. * tag 'omap-for-v4.21/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: multi_v7_defconfig: Enable 8250-omap serial driver and use it by default ARM: omap2plus_defconfig: Add tlv320aic23 as module Signed-off-by: Olof Johansson commit 3773b5c94e8a35565c99798c013043b92a49008f Merge: e47feed91a6e5 b76455335447f Author: Olof Johansson Date: Fri Nov 30 15:50:54 2018 -0800 Merge tag 'omap-for-v4.21/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc SoC changes for omaps for v4.21 merge window Few more non-critical section annotation fixes for Clang and remove obsolete timer header inclusion. * tag 'omap-for-v4.21/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: timer: Remove obsolete inclusion of ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup ARM: OMAP2+: hwmod: Fix some section annotations Signed-off-by: Olof Johansson commit 0277a623dd786cb07a7c5f4fb25327aa93cd5d49 Merge: 0be66f394efdf 3be5e10daf1fc Author: Olof Johansson Date: Fri Nov 30 15:50:23 2018 -0800 Merge tag 'omap-for-v4.21/driver-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers Driver changes for omaps for v4.21 merge window Few SoC related driver changes to add PRCM as the wake-up source for wkup_m3_ipc driver, and to improve ti-sysc driver for dra7 mcasp and device detection when debug is enabled. There is also a non-critical fix for ti-sysc to fix handling of the optional clocks but this can wait for the merge window no problem. * tag 'omap-for-v4.21/driver-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: wkup_m3: Add PRCM int16 as the wake up source bus: ti-sysc: Detect devices for debug on omap5 bus: ti-sysc: Add mcasp optional clocks flag bus: ti-sysc: Fix getting optional clocks in clock_roles Signed-off-by: Olof Johansson commit 0be66f394efdfb832f01248a0e043ae56c886cc1 Merge: 1e8518aa65934 2b45ebef39a2c Author: Olof Johansson Date: Fri Nov 30 15:47:23 2018 -0800 Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Amlogic SoC drivers for v4.21 - new clock measurement driver and bindings - COMPILE_TEST fix * tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: Add Meson Clock Measure driver dt-bindings: amlogic: Add Internal Clock Measurer bindings drivers: soc: Allow building the amlogic drivers without ARCH_MESON Signed-off-by: Olof Johansson commit b71a29d57dda86b270b847ad3570cd07138b58b7 Merge: 8ef86955fe59f 6ad5506ed191e Author: Olof Johansson Date: Fri Nov 30 15:46:17 2018 -0800 Merge tag 'hisi-arm64-dt-for-4.21' of git://github.com/hisilicon/linux-hisi into next/dt ARM64: DT: Hisilicon SoCs DT updates for 4.21 * Hi3660 SoC and related boards: - Standardize LED labels and triggers for the hikey960 board - Add the missing cooling-cells property for the cpu nodes - Add all cpus into the cooling maps * Hi3670 SoC and related boards: - Add clock nodes and update the uart clock - Add Pinctrl, GPIO and uart nodes - Enable uart and add GPIO line names for the hikey970 board * Hi3798 SoC and related boards: - Standardize LED labels and triggers for the poplar board * Hi6220 SoC and related boards: - Standardize LED labels and triggers for the hikey board - Add all cpus into the cooling maps * tag 'hisi-arm64-dt-for-4.21' of git://github.com/hisilicon/linux-hisi: ARM64: dts: hisilicon: Add all CPUs in cooling maps arm64: dts: hi3660: Add missing cooling device properties for CPUs arm64: dts: hisilicon: poplar: Standardize LED labels and triggers arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers arm64: dts: hisilicon: hikey: Standardize LED labels and triggers arm64: dts: hisilicon: hikey970: Add GPIO line names arm64: dts: hisilicon: hikey970: Enable on-board UARTs arm64: dts: hisilicon: hi3670: Add UART nodes arm64: dts: hisilicon: hi3670: Add GPIO controller support arm64: dts: hisilicon: Add Pinctrl support for HiKey970 board arm64: dts: hisilicon: Source SoC clock for UART6 arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC Signed-off-by: Olof Johansson commit 4737365aebd1a7c55342287f2e8b26e4d0549197 Merge: ccda4af0f4b92 7de642a3815d7 Author: Olof Johansson Date: Fri Nov 30 15:44:50 2018 -0800 Merge tag 'vexpress-defconfig-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/defconfig Versatile Express defconfig updates: This activates the new PL11x DRM driver with the Versatile Express family of reference designs. * tag 'vexpress-defconfig-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: defconfig: Enable the PL111 DRM driver on vexpress ARM: defconfig: Update the vexpress defconfig Signed-off-by: Olof Johansson commit e47feed91a6e5954c9ad49b57319b3a706366528 Author: Lubomir Rintel Date: Wed Nov 28 18:53:22 2018 +0100 ARM: mmp: add an instance of pxa-usb-phy to ttc_dkb and aspenite This will replace the *_pdata.phy_{de,}init() Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit a225daf72ee7885ec897e5624b399a024723246f Author: Lubomir Rintel Date: Wed Nov 28 18:53:21 2018 +0100 ARM: mmp: add a pxa-usb-phy device This is to replace the USB PHY initialization code (pxa_usb_phy_init(), pxa_usb_phy_deinit()) with a proper PHY driver. Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit f36797ee43802b367e59f0f9a9805304a4ff0c98 Author: Lubomir Rintel Date: Wed Nov 28 18:53:20 2018 +0100 ARM: mmp/mmp2: dt: enable the clock The device-tree booted MMP2 needs to enable the timer clock, otherwise it would stop ticking when the boot finishes. It can also use the clock rate from the clk, the non-DT boards need to keep using the hardcoded rates. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit e78ebdcb6ea83a891e6940381190040ae299e82d Author: Lubomir Rintel Date: Wed Nov 28 18:53:19 2018 +0100 ARM: mmp2: initialize clocks before the timer The timer shall enable its clock. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 7f17e390036ceb25f2daaba63ced02901396e9fd Merge: d88bb418b7cc0 fbc125afdc504 Author: Olof Johansson Date: Fri Nov 30 15:39:13 2018 -0800 Merge tag 'socfpga_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/soc SoCFPGA updates for v5.0 - Split Kconfig options for debug UART on Cyclone5 - Remove unused functions from socfpga platform code - Turn on ARM and PL310 errata for SOCFPGA ARMv7 platform * tag 'socfpga_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: Turn on ARM errata for L2 cache ARM: socfpga: Clean unused functions ARM: debug: enable UART1 for socfpga Cyclone5 Signed-off-by: Olof Johansson commit 1e8518aa65934f6c4cfa7e8e39af71f915c22d6c Merge: ccda4af0f4b92 24869610e867e Author: Olof Johansson Date: Fri Nov 30 15:36:07 2018 -0800 Merge tag 'v4.21-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers Powerdomain support for rk3066 and rk3188. * tag 'v4.21-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: power-domain: add rk3066 powerdomains soc: rockchip: power-domain: add rk3188 powerdomains dt-bindings: add compatibles for rk3066/rk3188 power controllers dt-bindings: add power-domain header for RK3066 SoCs dt-bindings: add power-domain header for RK3188 SoCs Signed-off-by: Olof Johansson commit 8ef86955fe59f7912a40d57ae4c6d511f0187b4d Author: Rob Herring Date: Thu Nov 29 19:52:51 2018 -0600 ARM: dts: aspeed: add missing memory unit-address The base aspeed-g5.dtsi already defines a '/memory@80000000' node, so '/memory' in the board files create a duplicate node. We're probably getting lucky that the bootloader fixes up the memory node that the kernel ends up using. Add the unit-address so it's merged with the base node. Found with DT json-schema checks. Cc: Joel Stanley Cc: Andrew Jeffery Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Signed-off-by: Rob Herring Signed-off-by: Olof Johansson commit 7f4b001b7f6e0480b5bdab9cd8ce1711e43e5cb5 Author: Rob Herring Date: Thu Nov 29 19:05:47 2018 -0600 ARM: dts: realview-pbx: Fix duplicate regulator nodes There's a bug in dtc in checking for duplicate node names when there's another section (e.g. "/ { };"). In this case, skeleton.dtsi provides another section. Upon removal of skeleton.dtsi, the dtb fails to build due to a duplicate node 'fixedregulator@0'. As both nodes were pretty much the same 3.3V fixed regulator, it hasn't really mattered. Fix this by renaming the nodes to something unique. In the process, drop the unit-address which shouldn't be present wtihout reg property. Cc: Linus Walleij Signed-off-by: Rob Herring Signed-off-by: Olof Johansson commit f6332990f6df9a217a94e1543d5d387abc0cd0e9 Merge: 4c4332761e65c 5e339a1d7e438 Author: Olof Johansson Date: Fri Nov 30 15:18:30 2018 -0800 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt arm64: Amlogic DT updates for v4.21 Some highlights: - new boards: Phicomm N1 (S905D), Libretech S805-AC - fixes for pinmux pad bias, GPIO line names - AXG: enable SCPI, add secure monitor * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (26 commits) arm64: dts: meson-gx: Add Internal Clock Measurer node arm64: dts: amlogic: Add all CPUs in cooling maps arm64: dts: meson: add libretech aml-s805x-ac board dt-bindings: arm: amlogic: add libretech aml-s805x-ac bindings dt-bindings: arm: amlogic: Add Phicomm N1 dt-bindings: Add vendor prefix for PHICOMM Co., Ltd. arm64: dts: meson-gxl: add support for phicomm n1 arm64: dts: meson: consistently disable pin bias arm64: dts: meson: disable pad bias for mmc pinmuxes arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux arm64: dts: meson: s400: add bcm bluetooth device arm64: dts: meson: p230: disable advertisement EEE for GbE. arm64: dts: meson-axg: enable SCPI Documentation: bindings: Add missing Amlogic SCPI sensor bindings arm64: dts: meson-axg: correct sram shared mem unit-address arm64: dts: meson-axg: fix mailbox address arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply arm64: dts: meson-axg: add secure monitor arm64: dts: meson-axg: s400: add cts-rts to the bluetooth uart arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names ... Signed-off-by: Olof Johansson commit 4c4332761e65c6d306f810247fb34d2270a75147 Merge: e14a6df96086f 7b141abe4aa13 Author: Olof Johansson Date: Fri Nov 30 15:18:03 2018 -0800 Merge tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Amlogic 32-bit DT updates for v4.21 - support more timers on meson8 - add the stdout-path property on several boards * tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: add the clock inputs for the Meson timer ARM: dts: meson: add the TIMER B/C/D interrupts ARM: dts: meson: consistently disable pin bias ARM: dts: meson8b: mxq: add the /chosen/stdout-path property ARM: dts: meson8: minix-neo-x8: add the /chosen/stdout-path property ARM: dts: meson6: atv1200: add the /chosen/stdout-path property dt-bindings: timer: meson6_timer: document the clock inputs dt-bindings: timer: meson6_timer: document all interrupts Signed-off-by: Olof Johansson commit e14a6df96086f6505b5a2d726c16a20b605d18e3 Merge: 9cf0418ee072c 0ec47be539e32 Author: Olof Johansson Date: Fri Nov 30 15:17:33 2018 -0800 Merge tag 'omap-for-v4.21/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Device tree changes for omaps for v4.21 merge window These changes mostly configure pinctrl for am437x-gp-evm. There is also non-critical fix for a comment for Clang, and we enable earlycon for am3517-evm. * tag 'omap-for-v4.21/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am437x-gp-evm: Add sleep state for beeper pins ARM: dts: am437x-gp-evm: Add pinmux for gpio0 wake ARM: dts: am437x-gp-evm: Add uart0 pinctrl default and sleep states ARM: dts: am437x-gp-evm: Add pinctrl for debugss pins ARM: dts: am437x-gp-evm: Add pinctrl for unused_pins ARM: dts: am437x-gp-evm: Add state for ddr3 vtt toggle pin ARM: dts: am3517-evm: Enable earlycon stdout path ARM: dts: omap3-gta04: Fix comment block Signed-off-by: Olof Johansson commit 9cf0418ee072c24a2bc438b6ad8fc4ab07ec5f5d Merge: d3e9d2ce7725d f1fe12c8bf332 Author: Olof Johansson Date: Fri Nov 30 15:16:42 2018 -0800 Merge tag 'vexpress-drm-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/dt Versatile Express DTS update for DRM: This updates the Versatile Express family DTS files to contain the correct and detailed information required for the PL11x DRM driver to work properly. * tag 'vexpress-drm-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: Modernize the Vexpress PL111 integration Signed-off-by: Olof Johansson commit 4e7bca6fc07bf9526d797b9787dcb21e40cd10cf Author: Pierre-Yves MORDRET Date: Tue Nov 27 15:35:31 2018 +0100 i2c: i2c-stm32f7: add PM Runtime support Use PM Runtime API to enable/disable clock Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit d3e9d2ce7725d87afdf71f1056a4fa5f447832e7 Author: Lubomir Rintel Date: Wed Nov 28 18:53:14 2018 +0100 ARM: dts: mmp2: Add SSP controllers Despite Marvel keeps their base addresses secret there's a good chance they're actually correct. SSP1 and SSP3 bases were taken from OLPC 1.75: OpenFirmware and kernel respectively. SSP2 and SSP4 addresses are from James Cameron who actually has a copy of the data sheet. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 3f3ad8ab3260ce0d370d2686ecdf75b0bbf73024 Author: Lubomir Rintel Date: Wed Nov 28 18:53:13 2018 +0100 ARM: dts: mmp2: add USB OTG host controller Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit df606f41abede3c6db1c053153874b71db59df04 Author: Lubomir Rintel Date: Wed Nov 28 18:53:12 2018 +0100 ARM: dts: mmp2: add OTG PHY The USB OTG PHY chip. To be used by the OTG controller. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 8a22b194cedfee5347f198eec7796080696c5050 Author: Lubomir Rintel Date: Wed Nov 28 18:53:11 2018 +0100 ARM: dts: mmp2: add more TWSI controllers I've gotten the base addresses, clocks and interrupts from an rusty and old out-of-tree driver. I haven't actually checked against the datasheet, since that one is reserved for the Marvell inner circle. Tested with an accelerometer on TWSI6 on an OLPC XO 1.75 machine. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 1147e05ac9fc2ef86a3691e7ca5c2db7602d81dd Author: Lubomir Rintel Date: Wed Nov 28 18:53:10 2018 +0100 ARM: dts: mmp2: fix TWSI2 Marvell keeps their MMP2 datasheet secret, but there are good clues that TWSI2 is not on 0xd4025000 on that platform, not does it use IRQ 58. In fact, the IRQ 58 on MMP2 seems to be a signal processor: arch/arm/mach-mmp/irqs.h:#define IRQ_MMP2_MSP 58 I'm taking a somewhat educated guess that is probably a copy & paste error from PXA168 or PXA910 and that the real controller in fact hides at address 0xd4031000 and uses an interrupt line multiplexed via IRQ 17. I'm also copying some properties from TWSI1 that were missing or incorrect. Tested on a OLPC XO 1.75 machine, where the RTC is on TWSI2. Signed-off-by: Lubomir Rintel Tested-by: Pavel Machek Signed-off-by: Olof Johansson commit 03f64e17f57c0a8041c8fed35de9c0176a730aa5 Author: Lubomir Rintel Date: Wed Nov 28 18:53:09 2018 +0100 ARM: dts: mmp2: add MMC controllers There's apparently four of them on a MMP2. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 1c22b9c10a61947f19d22cdd5d6e51415b59057b Author: Lubomir Rintel Date: Wed Nov 28 18:53:08 2018 +0100 ARM: dts: mmp2: add clock to the timer The timer needs the timer clock to be enabled, otherwise it stops ticking. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 5b3edb56bc6ef05a66c0902ea4315e3c35de93c5 Author: Lubomir Rintel Date: Wed Nov 28 18:53:07 2018 +0100 ARM: dts: mmp2: give gpio node a name This will be useful for boards that actually use GPIO pins. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 400583983f8a8e95ec02c9c9e2b50188753a87fb Author: Lubomir Rintel Date: Wed Nov 28 18:53:06 2018 +0100 ARM: dts: mmp2: fix the gpio interrupt cell number gpio-pxa uses two cell to encode the interrupt source: the pin number and the trigger type. Adjust the device node accordingly. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit ca40d2bd813efcee058760c63c9eae043d2939d9 Author: Lubomir Rintel Date: Wed Nov 28 18:53:05 2018 +0100 dt-bindings: mrvl,mmp-timer: add clock The timer needs the timer clock to be enabled, otherwise it stops ticking. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Olof Johansson commit 4abc79424f3e44ccfbbca88d02544142110763e5 Merge: e3d3781393d43 8bb4f3f559619 Author: Olof Johansson Date: Fri Nov 30 15:09:13 2018 -0800 Merge tag 'socfpga_dts_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v5.0 - Use SPDX license identifier for all SoCFPGA DTS files. - Remove dma-mask property as it has been deprecated. - Use tabs in DTS files. - Use the specific "altr,stratix10-rst-mgr" property for the Stratix10 reset manager. * tag 'socfpga_dts_updates_for_v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: stratix10: use "altr,stratix10-rst-mgr" binding ARM: dts: socfpga: use tabs for indentation arm: dts: socfpga: remove dma-mask property arm: dts: socfpga*.dts*: use SPDX-License-Identifier Signed-off-by: Olof Johansson commit e3d3781393d4351c254ccc3ba75e17d82167f66c Merge: 51ea46e828baf 275e4eb3f21a0 Author: Olof Johansson Date: Fri Nov 30 15:05:34 2018 -0800 Merge tag 'renesas-arm64-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM64 Based SoC DT Updates for v4.21 * H3 (r8a7795) SoC: - Remove unneeded sound #address/size-cells * M3-W (r8a7796) SoC: - Describe CMT (Compare Match Timer) devices in DT - Describe I2C-DVFS device node in DT * M3-N (r8a77965) SoC: - Describe CAN, CANFD and LVDS in DT * R-Car H3 (r8a7795) and M3-W (r8a7796) SoCs: - Describe CPU topology, capacity and cooling maps in DT - Add SSIU support to R-Car audio * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) SoCs: - Extend register range of HSUSB device to match documentation * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based Salvator-X, Salvator-XS and ULCB boards: - Switch eMMC bus to 1V8 * R-Car H3 (r8a7795), M3-W (r8a7796) and M3-N (r8a77965) based Salvator-X and Salvator-XS boards: - Describe USB3.0 xHCI host and prerepheral devices as companions * R-Car E3 (r8a77990) SoC: - Add thermal support - Add support for interupt controller for external devices (INTC-EX) - Describe all SCIF devices and SYS-DMA for I2C and MSIOF devices * R-Car E3 (r8a77990) based Ebisu board: - Enable SDHI, CAN, CANFD, audio and USB3.0 - Describe serial console pins * R-Car E3 (r8a77990) based Ebisu and R-Car D3 (r8a77995) based Draak board: - Enable USB2.0 peripheral device * R-Car M3-N (r8a77965), E3 (r8a77990) and V3H (r8a77980) SoCs: - Connect EtherAVB to IPMMU * R-Car V3M (r8a77970) and V3H (r8a77980) SoCs: - Describe TMU (timer unit), PWM timer controller and MSIOF devides in DT - Add thermal support * RZ/G2M (r8a774a1) SoC: - Use clock and power index macros - Describe VIN, CSI-2 and CAN devices in DT * tag 'renesas-arm64-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (40 commits) arm64: dts: renesas: Add all CPUs in cooling maps arm64: dts: renesas: r8a77990: add thermal device support arm64: dts: renesas: r8a77990: Enable I2C DMA arm64: dts: renesas: r8a7796: Add CMT device nodes arm64: dts: renesas: r8a7796: add SSIU support for sound arm64: dts: renesas: r8a77990: Add I2C-DVFS device node arm64: dts: renesas: r8a77990: ebisu: Add and enable CAN,FD device nodes arm64: dts: renesas: r8a77965: Add CAN and CANFD controller nodes arm64: dts: renesas: r8a77990: ebisu: Add and enable PCIe device node arm64: dts: renesas: Add CPU capacity-dmips-mhz arm64: dts: renesas: Add CPU topology on R-Car Gen3 SoCs arm64: dts: renesas: r8a774a1: Replace clock magic numbers arm64: dts: renesas: r8a774a1: Replace power magic numbers arm64: dts: renesas: r8a7795: add SSIU support for sound arm64: dts: renesas: r8a77990: Fix VIN endpoint numbering arm64: dts: renesas: ebisu: Add and enable SDHI device nodes arm64: dts: renesas: ebisu: Add serial console pins arm64: dts: renesas: Switch eMMC bus to 1V8 on Salvator-X and ULCB arm64: dts: renesas: r8a77990: Add all HSCIF nodes arm64: dts: renesas: r8a779{7|8}0: add TMU support ... Signed-off-by: Olof Johansson commit 51ea46e828bafea7af9ee5d21b40de60549e9580 Merge: 42d76db96ea0a 673df60a880f0 Author: Olof Johansson Date: Fri Nov 30 15:04:37 2018 -0800 Merge tag 'renesas-arm-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Updates for v4.21 * RZ/N1D (r9a06g032) SoC: - Correct GIC DT node name - Enable pin controller * RZ/G1C (r8a77470) iWave g23S single board computer - Add QSPI flash support - Add pinctl support for EtherAVB - Enable CMT0 (Renesas R-Car Compare Match Timer) - Enable RWDT (Renesas Watchdog Timer) - Enable uSD and eMMC support * RZ/G1C (r8a77470) SoC: - Describe USB-DMAC and I2C devices in DT * R-Mobile A1 (r8a7740), Emma Mobile EV2 (emev2) and SH-Mobile AG5 (sh72a0) SoCs: - Include SoC name in DTSI * R-Car H2 (r8a7790) based lager, and R-Car M2-W (r8a7791) based koelsch and porter boards: - Disable unconnected LVDS encoders * tag 'renesas-arm-dt-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r9a06g032: Correct the GIC DT node name ARM: dts: iwg23s-sbc: Add QSPI flash support ARM: dts: r8a77470: Add QSPI support ARM: dts: iwg23s-sbc: Add pinctl support for EtherAVB ARM: dts: iwg23s-sbc: Enable cmt0 ARM: dts: r8a77470: Add CMT SoC specific support ARM: dts: r8a77470: Add USB-DMAC device nodes ARM: dts: iwg23s-sbc: Enable watchdog support ARM: dts: r8a77470: Add watchdog support to SoC dtsi ARM: dts: r8a7740, emev2, sh73a0: Include SoC name in DTSI ARM: dts: r8a779[01]: Disable unconnected LVDS encoders ARM: dts: iwg23s-sbc: Add uSD and eMMC support ARM: dts: r8a77470: Add SDHI1 support ARM: dts: r8a77470: Add SDHI0 support ARM: dts: r8a77470: Add I2C[0123] support ARM: dts: r9a06g032: Add pinctrl node Signed-off-by: Olof Johansson commit 42d76db96ea0a8d9337ba8561f06278b35d2e015 Merge: 9733488310b3b cdd46460fe278 Author: Olof Johansson Date: Fri Nov 30 15:04:01 2018 -0800 Merge tag 'v4.21-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt New dts for Gru-Scarlet (tablet device), default backlight brightness for all Gru devices, rk3399 spi dma properties, some improvements for the rk3399-sapphire board (fan, chosen, backlight), hs200 mode for the emmc on the rock64 and declaring all cpu cores in the cooling maps instead of just cpu0. * tag 'v4.21-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add all CPUs in cooling maps arm64: dts: rockchip: add Gru Scarlet devicetrees arm64: dts: rockchip: move backlight from rk3399 sapphire to excavator arm64: dts: rockchip: Use default brightness table for rk3399-gru arm64: dts: rockchip: add chosen node on rk3399-sapphire arm64: dts: rockchip: enable HS200 for eMMC on rock64 arm64: dts: rockchip: add fan on rk3399-sapphire board arm64: dts: rockchip: add rk3399 SPI DMAs Signed-off-by: Olof Johansson commit 9733488310b3b954dddcb83768f76ad7d63165d3 Merge: 11c99479d4d4b 99935bd4b5b45 Author: Olof Johansson Date: Fri Nov 30 15:03:39 2018 -0800 Merge tag 'v4.21-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Powerdomain and QoS nodes for rk3066 and rk3188. A fix for a rock2 regulator name and referencing all cpus in the cooling maps instead of only cpu0. * tag 'v4.21-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add all CPUs in cooling maps ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name ARM: dts: rockchip: add rk3066/rk3188 power-domains ARM: dts: rockchip: add qos nodes found on rk3066 and rk3188 dt-bindings: add power-domain header for RK3066 SoCs dt-bindings: add power-domain header for RK3188 SoCs Signed-off-by: Olof Johansson commit 779a459719724eb51aabcd9457a996c66660e296 Merge: cc2b8ed136959 99a44bef58708 Author: Alexei Starovoitov Date: Fri Nov 30 14:06:07 2018 -0800 Merge branch 'bpftool-fixes' Quentin Monnet says: ==================== Hi, Several items for bpftool are included in this set: the first three patches are fixes for bpftool itself and bash completion, while the last two slightly improve the information obtained when dumping programs or maps, on Daniel's suggestion. Please refer to individual commit logs for more details. ==================== Signed-off-by: Alexei Starovoitov commit 99a44bef587082fbbaddf6aaa1e823ebbb629339 Author: Quentin Monnet Date: Fri Nov 30 16:25:48 2018 +0000 tools: bpftool: add owner_prog_type and owner_jited to bpftool output For prog array maps, the type of the owner program, and the JIT-ed state of that program, are available from the file descriptor information under /proc. Add them to "bpftool map show" output. Example output: # bpftool map show 158225: prog_array name jmp_table flags 0x0 key 4B value 4B max_entries 8 memlock 4096B owner_prog_type flow_dissector owner jited # bpftool --json --pretty map show [{ "id": 1337, "type": "prog_array", "name": "jmp_table", "flags": 0, "bytes_key": 4, "bytes_value": 4, "max_entries": 8, "bytes_memlock": 4096, "owner_prog_type": "flow_dissector", "owner_jited": true } ] As we move the table used for associating names to program types, complete it with the missing types (lwt_seg6local and sk_reuseport). Also add missing types to the help message for "bpftool prog" (sk_reuseport and flow_dissector). Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 73f0b9db53836a68c40691fad1467ed44a3123e8 Author: Quentin Monnet Date: Fri Nov 30 16:25:47 2018 +0000 tools: bpftool: mark offloaded programs more explicitly in plain output In bpftool (plain) output for "bpftool prog show" or "bpftool map show", an offloaded BPF object is simply denoted with "dev ifname", which is not really explicit. Change it with something that clearly shows the program is offloaded. While at it also add an additional space, as done between other information fields. Example output, before: # bpftool prog show 1337: xdp tag a04f5eef06a7f555 dev foo loaded_at 2018-10-19T16:40:36+0100 uid 0 xlated 16B not jited memlock 4096B After: # bpftool prog show 1337: xdp tag a04f5eef06a7f555 offloaded_to foo loaded_at 2018-10-19T16:40:36+0100 uid 0 xlated 16B not jited memlock 4096B Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 4f0fc6f571d29837bc09aa8c51591f330f17bbf0 Author: Quentin Monnet Date: Fri Nov 30 16:25:46 2018 +0000 tools: bpftool: fix bash completion for new map types (queue and stack) Commit 197c2dac74e4 ("bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to bpftool-map") added support for queue and stack eBPF map types in bpftool map handling. Let's update the bash completion accordingly. Fixes: 197c2dac74e4 ("bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to bpftool-map") Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit cad4977344b35ea116ec5fefe91a76b1dfa113f5 Author: Quentin Monnet Date: Fri Nov 30 16:25:45 2018 +0000 tools: bpftool: fix bash completion for bpftool prog (attach|detach) Fix bash completion for "bpftool prog (attach|detach) PROG TYPE MAP" so that the list of indices proposed for MAP are map indices, and not PROG indices. Also use variables for map and prog reference types ("id", "pinned", and "tag" for programs). Fixes: b7d3826c2ed6 ("bpf: bpftool, add support for attaching programs to maps") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 327e5dab6dd8559ba28739ec8873350d7b5bb080 Author: Quentin Monnet Date: Fri Nov 30 16:25:44 2018 +0000 tools: bpftool: use "/proc/self/" i.o. crafting links with getpid() The getpid() function is called in a couple of places in bpftool to craft links of the shape "/proc//...". Instead, it is possible to use the "/proc/self/" shortcut, which makes things a bit easier, in particular in jit_disasm.c. Do the replacement, and remove the includes of from the relevant files, now we do not use getpid() anymore. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 5d2ee7122c73be6a3b6bfe90d237e8aed737cfaa Author: Jens Axboe Date: Thu Nov 29 17:36:41 2018 -0700 sbitmap: optimize wakeup check Even if we have no waiters on any of the sbitmap_queue wait states, we still have to loop every entry to check. We do this for every IO, so the cost adds up. Shift a bit of the cost to the slow path, when we actually have waiters. Wrap prepare_to_wait_exclusive() and finish_wait(), so we can maintain an internal count of how many are currently active. Then we can simply check this count in sbq_wake_ptr() and not have to loop if we don't have any sleepers. Convert the two users of sbitmap with waiting, blk-mq-tag and iSCSI. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit ea86ea2cdced20057da4d2c32965c1219c238197 Author: Jens Axboe Date: Fri Nov 30 13:18:06 2018 -0700 sbitmap: ammortize cost of clearing bits sbitmap maintains a set of words that we use to set and clear bits, with each bit representing a tag for blk-mq. Even though we spread the bits out and maintain a hint cache, one particular bit allocated will end up being cleared in the exact same spot. This introduces batched clearing of bits. Instead of clearing a given bit, the same bit is set in a cleared/free mask instead. If we fail allocating a bit from a given word, then we check the free mask, and batch move those cleared bits at that time. This trades 64 atomic bitops for 2 cmpxchg(). In a threaded poll test case, half the overhead of getting and clearing tags is removed with this change. On another poll test case with a single thread, performance is unchanged. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 62d1a752874962f072de8a779e960fcd2ab4847b Author: Eric Anholt Date: Wed Nov 28 15:09:27 2018 -0800 drm/v3d: Fix prime imports of buffers from other drivers. v3d_bo_get_pages() checks this to decide to map the imported buffer instead of the backing shmem file. The caller was about to set this value anyway, and there's no error path in between. Ideally we wouldn't even allocate the shmem file for our imports, but that's a more invasive fix. Signed-off-by: Eric Anholt Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-3-eric@anholt.net Acked-by: Daniel Vetter Reviewed-by: Dave Emett commit 734317d93e5e19ced0d5b903afe6cceefc177c81 Merge: dd354208dc863 bd4db888ab848 Author: David S. Miller Date: Fri Nov 30 13:45:13 2018 -0800 Merge branch 'qed-Doorbell-overflow-recovery' Ariel Elior says: ==================== qed*: Doorbell overflow recovery Doorbell Overflow If sufficient CPU cores will send doorbells at a sufficiently high rate, they can cause an overflow in the doorbell queue block message fifo. When fill level reaches maximum, the device stops accepting all doorbells from that PF until a recovery procedure has taken place. Doorbell Overflow Recovery The recovery procedure basically means resending the last doorbell for every doorbelling entity. A doorbelling entity is anything which may send doorbells: L2 tx ring, rdma sq/rq/cq, light l2, vf l2 tx ring, spq, etc. This relies on the design assumption that all doorbells are aggregative, so last doorbell carries the information of all previous doorbells. APIs All doorbelling entities need to register with the mechanism before sending doorbells. The registration entails providing the doorbell address the entity would be using, and a virtual address where last doorbell data can be found. Typically fastpath structures already have this construct. Executing the recovery procedure Handling the attentions, iterating over all the registered entities and resending their doorbells, is all handled within qed core module. Relevance All doorbelling entities in all protocols need to register with the mechanism, via the new APIs. Technically this is quite simple (just call the API). Some protocol fastpath implementation may not have the doorbell data stored anywhere (compute it from scratch every time) and will have to add such a place. This is rare and is also better practice (save some cycles on the fastpath). Performance Penalty No performance penalty should incur as a result of this feature. If anything performance can improve by avoiding recalcualtion of doorbell data everytime doorbell is sent (in some flows). Add the database used to register doorbelling entities, and APIs for adding and deleting entries, and logic for traversing the database and doorbelling once on behalf of all entities. ==================== Signed-off-by: David S. Miller commit bd4db888ab848ac6f9a2a5f8e66bd4d5a99dce6f Author: Ariel Elior Date: Wed Nov 28 18:16:07 2018 +0200 qede: Register l2 queues with doorbell overflow recovery mechanism All L2 queues funnel through this flow, so this would cover the regular RSS queues, as well queues created for VFs, mqos queues, xdp queues, etc. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit 0e1f10447e2aa79ba7d8960e5d0ed3cf2ea8356e Author: Ariel Elior Date: Wed Nov 28 18:16:06 2018 +0200 qed: Expose the doorbell overflow recovery mechanism to the protocol drivers Most of the doorbelling entities are outside of the core module. L2 queues, Roce queues, iscsi and fcoe all need to register. Make the APIs available for these drivers. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit b78d5400bda4e7c49ffdb001df83e4ffcb93d63b Author: Ariel Elior Date: Wed Nov 28 18:16:05 2018 +0200 qed: Register light L2 queues with doorbell overflow recovery mechanism Light L2 queues are doorbelling entities. Modify the implementation to keep the doorbell data necessary for doorbelling in well known location instead of recomputing every time. Register the LL2 queue with doorbell recovery mechanism. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit 9ecd8c3feaa53405508499495d06a6f1e7dc8e7b Author: Ariel Elior Date: Wed Nov 28 18:16:04 2018 +0200 qed: Register slowpath queue doorbell with doorbell overflow recovery mechanism Slow path queue is a doorbelling entity. Register it with the overflow mechanism. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit a1b469b8b17f1573741eb0272349eca47d32462a Author: Ariel Elior Date: Wed Nov 28 18:16:03 2018 +0200 qed: Use the doorbell overflow recovery mechanism in case of doorbell overflow In case of an attention from the doorbell queue block, analyze the HW indications. In case of a doorbell overflow, execute a doorbell recovery. Since there can be spurious indications (race conditions between multiple PFs), schedule a periodic task for checking whether a doorbell overflow may have been missed. After a set time with no indications, terminate the periodic task. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit 36907cd5cd720c5a6d36670b49eba3b1f7f4d8fe Author: Ariel Elior Date: Wed Nov 28 18:16:02 2018 +0200 qed: Add doorbell overflow recovery mechanism Add the database used to register doorbelling entities, and APIs for adding and deleting entries, and logic for traversing the database and doorbelling once on behalf of all entities. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller commit dd354208dc8638a93f1c1482db8f9c205e3e53b4 Merge: 74315c393f510 a293974590cfd Author: David S. Miller Date: Fri Nov 30 13:33:35 2018 -0800 Merge branch 'rtnetlink-avoid-a-warning-in-rtnl_newlink' Jakub Kicinski says: ==================== rtnetlink: avoid a warning in rtnl_newlink() I've been hoping for some time that someone more competent would fix the stack frame size warning in rtnl_newlink(), but looks like I'll have to take a stab at it myself :) That's the only warning I see in most of my builds. First patch refactors away a somewhat surprising if (1) code block. Reindentation will most likely cause cherry-pick problems but OTOH rtnl_newlink() doesn't seem to be changed often, so perhaps we can risk it in the name of cleaner code? Second patch fixes the warning in simplest possible way. I was pondering if there is any more clever solution, but I can't see it.. rtnl_newlink() is quite long with a lot of possible execution paths so doing memory allocations half way through leads to very ugly results. ==================== Signed-off-by: David S. Miller commit a293974590cfdc2d59c559a54d62a5ecb648104b Author: Jakub Kicinski Date: Tue Nov 27 22:32:31 2018 -0800 rtnetlink: avoid frame size warning in rtnl_newlink() Standard kernel compilation produces the following warning: net/core/rtnetlink.c: In function ‘rtnl_newlink’: net/core/rtnetlink.c:3232:1: warning: the frame size of 1288 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ This should not really be an issue, as rtnl_newlink() stack is generally quite shallow. Fix the warning by allocating attributes with kmalloc() in a wrapper and passing it down to rtnl_newlink(), avoiding complexities on error paths. Alternatively we could kmalloc() some structure within rtnl_newlink(), slave attributes look like a good candidate. In practice it adds to already rather high complexity and length of the function. Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 420d031822737ef570df6834c0eae26f33988f20 Author: Jakub Kicinski Date: Tue Nov 27 22:32:30 2018 -0800 rtnetlink: remove a level of indentation in rtnl_newlink() rtnl_newlink() used to create VLAs based on link kind. Since commit ccf8dbcd062a ("rtnetlink: Remove VLA usage") statically sized array is created on the stack, so there is no more use for a separate code block that used to be the VLA's live range. While at it christmas tree the variables. Note that there is a goto-based retry so to be on the safe side the variables can no longer be initialized in place. It doesn't seem to matter, logically, but why make the code harder to read.. Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 74315c393f510064e20592a5e0b74ddddd76007e Merge: 6015c71e656bb 6db3a9dcf0b99 Author: David S. Miller Date: Fri Nov 30 13:30:45 2018 -0800 Merge branch 'nfp-update-TX-path-to-enable-repr-offloads' Jakub Kicinski says: ==================== nfp: update TX path to enable repr offloads This set starts with three micro optimizations to the TX path. The improvement is measurable, but below 1% of CPU utilization. Patches 4 - 9 add basic TX offloads to representor devices, like checksum offload or TSO, and remove the unnecessary TX lock and Qdisc (our representors are software constructs on top of the PF). The last 2 patches add more info to error messages - id of command which failed and exact location of incorrect TLVs, very useful for debugging. ==================== Signed-off-by: David S. Miller commit 6db3a9dcf0b99cf478c9b1421c83a81345ffbb15 Author: Jakub Kicinski Date: Tue Nov 27 22:24:58 2018 -0800 nfp: report more info when reconfiguration fails FW reconfiguration timeouts are a common indicator of FW trouble. To make debugging easier print requested update and control word when reconfiguration fails. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 9571d9877546434682b653e8a81a5a177cd4529e Author: Jakub Kicinski Date: Tue Nov 27 22:24:57 2018 -0800 nfp: add offset to all TLV parsing errors When troubleshooting incorrect FW capabilities it's useful to know where the faulty TLV is located. Add offset to all errors messages. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 51a6588e8c08a108ca7daa899a28b3219fc47e46 Author: Jakub Kicinski Date: Tue Nov 27 22:24:56 2018 -0800 nfp: add offloads on representors FW/HW can generally support the standard networking offloads on representors without any trouble. Add the ability for FW to advertise which features should be available on representors. Because representors are muxed on top of the vNIC we need to listen on feature changes of their lower devices, and update their features appropriately. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 71844fac1ed459024dd2a448d63d5b28b8c87daa Author: Jakub Kicinski Date: Tue Nov 27 22:24:55 2018 -0800 nfp: add locking around representor changes Up until now we never needed to keep a networking locks around representors accesses, we only accessed them when device was reconfigured (under nfp pf->lock) or on fast path (under RCU). Now we want to be able to iterate over all representors during notifications, so make sure representor assignment is done under RTNL lock. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit fbf60e377d5b9623abae599f947f3013c07842c4 Author: Jakub Kicinski Date: Tue Nov 27 22:24:54 2018 -0800 nfp: run don't require Qdiscs on representor netdevs Our representors are software devices built on top of the PF vNIC, the queuing should only happen at the vNIC netdevice. Allow representors to run qdisc-less. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 9db8bbcb9bc68e7f58e13d30eec87905e2b8825d Author: Jakub Kicinski Date: Tue Nov 27 22:24:53 2018 -0800 nfp: run representor TX locklessly Our representors are software devices built on top of the PF vNIC, the only state they have are per-cpu stats, so make the TX run locklessly. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit d7cc8252252f9e5b72975a3d498ba2ee08245740 Author: Jakub Kicinski Date: Tue Nov 27 22:24:52 2018 -0800 nfp: avoid oversized TSO headers with metadata prepend In preparation for TSO over representors make sure the port id prepend will always fit in the frame. The current max header length is 255, which is ample, so assume worst case scenario of 8 byte prepend and save ourselves the conditionals. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit b54ad0eaad8e5defcc48b224a7c7deb3f162cb99 Author: Jakub Kicinski Date: Tue Nov 27 22:24:51 2018 -0800 nfp: correct descriptor offsets in presence of metadata The TSO-related offsets in the descriptor should not include the length of the prepended metadata. Adjust them. Note that this could not have caused issues in the past as we don't support TSO with metadata prepend as of this patch. Signed-off-by: Michael Rapson Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 8b5ddf1e51818d2446f0ca997beb82a850718d2e Author: Jakub Kicinski Date: Tue Nov 27 22:24:50 2018 -0800 nfp: move queue variable init nd_q is only used at the very end of nfp_net_tx(), there is no need to initialize it early. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit de31049a48bb75bc458e9f8a0fae037fcbf1241f Author: Jakub Kicinski Date: Tue Nov 27 22:24:49 2018 -0800 nfp: move temporary variables in nfp_net_tx_complete() Move temporary variables in scope of the loop in nfp_net_tx_complete(), and add a temp for txbuf software structure. This saves us 0.2% of CPU. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 95862749674f598e979cb3ef2d18aec2e5d8bd29 Author: Jakub Kicinski Date: Tue Nov 27 22:24:48 2018 -0800 nfp: copy only the relevant part of the TX descriptor for frags Chained descriptors for fragments need to duplicate all the descriptor fields of the skb head, so we copy the descriptor and then modify the relevant fields. This is wasteful, because the top half of the descriptor will get overwritten entirely while the bottom half is not modified at all. Copy only the bottom half. This saves us 0.3% of CPU in a GSO test. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller commit 6015c71e656bb6895b416c31a8b7db457e45cecf Author: Eric Dumazet Date: Tue Nov 27 15:03:21 2018 -0800 tcp: md5: add tcp_md5_needed jump label Most linux hosts never setup TCP MD5 keys. We can avoid a cache line miss (accessing tp->md5ig_info) on RX and TX using a jump label. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2f69555315ad7dc1ac37366b2ac2429e2d24d444 Merge: b0e3f1bdf9e71 4f693b55c3d2d Author: David S. Miller Date: Fri Nov 30 13:26:54 2018 -0800 Merge branch 'tcp-take-a-bit-more-care-of-backlog-stress' Eric Dumazet says: ==================== tcp: take a bit more care of backlog stress While working on the SACK compression issue Jean-Louis Dupond reported, we found that his linux box was suffering very hard from tail drops on the socket backlog queue. First patch hints the compiler about sack flows being the norm. Second patch changes non-sack code in preparation of the ack compression. Third patch fixes tcp_space() to take backlog into account. Fourth patch is attempting coalescing when a new packet must be added to the backlog queue. Cooking bigger skbs helps to keep backlog list smaller and speeds its handling when user thread finally releases the socket lock. v3: Neal/Yuchung feedback addressed : Do not aggregate if any skb has URG bit set. Do not aggregate if the skbs have different ECE/CWR bits v2: added feedback from Neal : tcp: take care of compressed acks in tcp_add_reno_sack() added : tcp: hint compiler about sack flows added : tcp: make tcp_space() aware of socket backlog ==================== Signed-off-by: David S. Miller commit 4f693b55c3d2d2239b8a0094b518a1e533cf75d5 Author: Eric Dumazet Date: Tue Nov 27 14:42:03 2018 -0800 tcp: implement coalescing on backlog queue In case GRO is not as efficient as it should be or disabled, we might have a user thread trapped in __release_sock() while softirq handler flood packets up to the point we have to drop. This patch balances work done from user thread and softirq, to give more chances to __release_sock() to complete its work before new packets are added the the backlog. This also helps if we receive many ACK packets, since GRO does not aggregate them. This patch brings ~60% throughput increase on a receiver without GRO, but the spectacular gain is really on 1000x release_sock() latency reduction I have measured. Signed-off-by: Eric Dumazet Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 85bdf7db5b53cdcc7a901db12bcb3d0063e3866d Author: Eric Dumazet Date: Tue Nov 27 14:42:02 2018 -0800 tcp: make tcp_space() aware of socket backlog Jean-Louis Dupond reported poor iscsi TCP receive performance that we tracked to backlog drops. Apparently we fail to send window updates reflecting the fact that we are under stress. Note that we might lack a proper window increase when backlog is fully processed, since __release_sock() clears sk->sk_backlog.len _after_ all skbs have been processed. This should not matter in practice. If we had a significant load through socket backlog, we are in a dangerous situation. Reported-by: Jean-Louis Dupond Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Tested-by: Jean-Louis Dupond Signed-off-by: David S. Miller commit 19119f298bb1f2af3bb1093f5f2a1fed8da94e37 Author: Eric Dumazet Date: Tue Nov 27 14:42:01 2018 -0800 tcp: take care of compressed acks in tcp_add_reno_sack() Neal pointed out that non sack flows might suffer from ACK compression added in the following patch ("tcp: implement coalescing on backlog queue") Instead of tweaking tcp_add_backlog() we can take into account how many ACK were coalesced, this information will be available in skb_shinfo(skb)->gso_segs Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit ebeef4bcccf4681ba3de04fbf3a005f6054f7999 Author: Eric Dumazet Date: Tue Nov 27 14:42:00 2018 -0800 tcp: hint compiler about sack flows Tell the compiler that most TCP flows are using SACK these days. There is no need to add the unlikely() clause in tcp_is_reno(), the compiler is able to infer it. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit b0e3f1bdf9e7140fd1151af575f468b5827a61e1 Author: Geneviève Bastien Date: Tue Nov 27 12:52:39 2018 -0500 net: Add trace events for all receive exit points Trace events are already present for the receive entry points, to indicate how the reception entered the stack. This patch adds the corresponding exit trace events that will bound the reception such that all events occurring between the entry and the exit can be considered as part of the reception context. This greatly helps for dependency and root cause analyses. Without this, it is not possible with tracepoint instrumentation to determine whether a sched_wakeup event following a netif_receive_skb event is the result of the packet reception or a simple coincidence after further processing by the thread. It is possible using other mechanisms like kretprobes, but considering the "entry" points are already present, it would be good to add the matching exit events. In addition to linking packets with wakeups, the entry/exit event pair can also be used to perform network stack latency analyses. Signed-off-by: Geneviève Bastien CC: Mathieu Desnoyers CC: Steven Rostedt CC: Ingo Molnar CC: David S. Miller Reviewed-by: Steven Rostedt (VMware) (tracing side) Signed-off-by: David S. Miller commit 91c459561bfdc67eb3cb4a5d149e9cbfa4400d7f Author: Edward Cree Date: Tue Nov 27 15:40:59 2018 +0000 net/flow_dissector: correct comments on enum flow_dissector_key_id There are no such structs flow_dissector_key_flow_vlan or flow_dissector_key_flow_tags, the actual structs used are struct flow_dissector_key_vlan and struct flow_dissector_key_tags. So correct the comments against FLOW_DISSECTOR_KEY_VLAN, FLOW_DISSECTOR_KEY_FLOW_LABEL and FLOW_DISSECTOR_KEY_CVLAN to refer to those. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b0bd6f1c03b4670f3e4b2a328e47adb9f2f1684e Author: Bjorn Andersson Date: Thu Nov 29 22:54:56 2018 -0800 arm64: defconfig: Enable GCC and PINCTRL for MSM8998 Enable the GCC and PINCTRL for MSM8998 to make upstream boot to console. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit 1b974aa43ae22b4626721d11dd755a8541bb32de Author: Ganesh Goudar Date: Tue Nov 27 14:59:06 2018 +0530 cxgb4: number of VFs supported is not always 16 Total number of VFs supported by PF is used to determine the last byte of VF's mac address. Number of VFs supported is not always 16, use the variable nvfs to get the number of VFs supported rather than hard coding it to 16. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit e14a07fc4b961a75f6c275d6bd670ba54fbdae14 Author: Eric Anholt Date: Wed Nov 28 15:09:26 2018 -0800 drm/v3d: Drop the "dev" argument to lock/unlock of BO reservations. They were unused, as Dave Emett noticed in TFU review. Signed-off-by: Eric Anholt Cc: Dave Emett Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-2-eric@anholt.net Reviewed-by: Daniel Vetter commit 1584f16ca96ef124aad79efa3303cff5f3530e2c Author: Eric Anholt Date: Wed Nov 28 15:09:25 2018 -0800 drm/v3d: Add support for submitting jobs to the TFU. The TFU can copy from raster, UIF, and SAND input images to UIF output images, with optional mipmap generation. This will certainly be useful for media EGL image input, but is also useful immediately for mipmap generation without bogging the V3D core down. For now we only run the queue 1 job deep, and don't have any hang recovery (though I don't think we should need it, with TFU). Queuing multiple jobs in the HW will require synchronizing the YUV coefficient regs updates since they don't get FIFOed with the job. v2: Change the ioctl to IOW instead of IOWR, always set COEF0, explain why TFU is AUTH, clarify the syncing docs, drop the unused TFU interrupt regs (you're expected to use the hub's), don't take &bo->base for NULL bos. v3: Fix a little whitespace alignment (noticed by checkpatch), rebase on drm_sched_job_cleanup() changes. Signed-off-by: Eric Anholt Reviewed-by: Dave Emett (v2) Link: https://patchwork.freedesktop.org/patch/264607/ commit 11c99479d4d4bfcdda60431f226f6ef9ac89875c Merge: f1977a9be319f 1435696556e46 Author: Olof Johansson Date: Fri Nov 30 11:45:47 2018 -0800 Merge tag 'vexpress-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt ARMv7 Vexpress updates for v4.20 Single patch to use updated coresight graph bindings thereby removing loads of dtc warnings * tag 'vexpress-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: ARM: dts: vexpress/TC2: Update entries to match latest coresight bindings Signed-off-by: Olof Johansson commit 9994241ac97cb84d1df98fdc172d3cc6b04b11bf Author: Rafał Miłecki Date: Fri Nov 9 09:56:49 2018 +0100 ARM: dts: BCM5301X: Describe Northstar pins mux controller This describes hardware & will allow referencing pin functions. The first usage is UART1 which allows supporting devices using it. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 03e96644d7a810916fc4997d572577e876908b18 Author: René Kjellerup Date: Mon Oct 1 15:07:16 2018 -0700 ARM: dts: BCM5301X: Add basic DT for Linksys EA6500 V2 It is wireless home router based on BCM4708A0 with BCM4360 + BCM4331 wireless chipsets. The BCM4331 5GHz chip currently isn't supported only due to missing compatible firmware. Signed-off-by: Rene Kjellerup Signed-off-by: Florian Fainelli commit f0ad62a631e040ae4413286a4b46a90c5ce42d07 Author: José Roberto de Souza Date: Tue Nov 27 23:28:38 2018 -0800 drm/i915/psr: Get pipe id following atomic guidelines As stated in struct drm_encoder, crtc field should only be used by non-atomic drivers. So here caching the pipe id in intel_psr_enable() what is way more simple and efficient than at every call to intel_psr_flush()/invalidate() get the drm.mode_config.connection_mutex lock to safely be able to get the pipe id by reading drm_connector_state.crtc. This should fix the null pointer dereference crash below as the previous way to get the pipe id was prone to race conditions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105959 Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181128072838.22773-1-jose.souza@intel.com commit eefe328439642101774f0f5c4ea0dc6ba1cfb687 Author: Ding Tao Date: Fri Oct 26 11:50:27 2018 +0000 arm64: dts: marvell: armada37xx: Add emmc/sdio pinctrl definition Add emmc/sdio pinctrl definition for marvell armada37xx SoCs. Signed-off-by: Ding Tao Signed-off-by: Gregory CLEMENT commit 235df2d80d3b196943043203bcb900325013a80a Author: Baruch Siach Date: Fri Oct 19 07:57:54 2018 +0300 arm64: dts: clearfog-gt-8k: enable mini-PCIe CON2 USB Deassert the reset and wireless disable signals on the CON2 mini-PCIe socket. That allows the host to detect USB devices on the mini-PCIe socket. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit babc5544c2933a5cbf9389679507dfa4911101ee Author: Baruch Siach Date: Tue Oct 16 13:50:53 2018 +0300 arm64: dts: clearfog-gt-8k: 1G eth PHY reset signal This reset signal controls the Marvell 1512 1G PHY. Note that current implementation queries the PHY over the MDIO bus (get_phy_device() call from of_mdiobus_register_phy()) before reset signal deassert. If the PHY reset signal is asserted at boot time, PHY registration fails. So current code relies on the bootloader to deassert the reset signal. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit b597a6f54280cdb20fb19c0224757f70cfb731c4 Author: Baruch Siach Date: Tue Oct 16 13:50:52 2018 +0300 arm64: dts: clearfog-gt-8k: fix USB regulator gpio polarity The fixed regulator driver ignores the gpio flags, so this change has no practical effect in the current implementation. Fix it anyway to correct the hardware description. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit e2101675225fa45cf6994916c2051c5167ded3e2 Author: Fatemeh Darbehani Date: Tue Oct 30 11:32:40 2018 -0400 drm/amd/display: Clean up for DCN1 clock debug logging [Why] To prepare for clock debug logging. With the exception of removing max_supported_dppclk_khz from logs, there are no functional changes. [How] Add clk_bypass struct and clean up buffer logic Signed-off-by: Fatemeh Darbehani Reviewed-by: Yongqiang Sun Acked-by: Su Chung Acked-by: Leo Li Signed-off-by: Alex Deucher commit e96938a09dce68356654186f4ac0a31837e1da6f Author: Steven Chiu Date: Mon Nov 12 13:22:36 2018 -0500 drm/amd/display: 3.2.08 Signed-off-by: Steven Chiu Reviewed-by: Fatemeh Darbehani Acked-by: Leo Li Signed-off-by: Alex Deucher commit fa3547dd92deff8624a18621035e876f94f24a1b Author: David Francis Date: Fri Nov 9 11:50:18 2018 -0500 drm/amd/display: Allow clock lower on dce100 dce100 was set to always pass safe_to_lower = false to the clock manager Thus, on suspend the clocks were not being set to 0 which is incorrect behaviour This was causing s3 resume to blackscreen on intel CPUs with dce100 GPUs attached (Note that the hash in this Fixes: tag is the hash on Alex's tree) Fixes: ae7d8aeb38d7 ("drm/amd/display: remove safe_to_lower flag from dc, use 2 functions instead") Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8ccb596fc574bae614aea9a532d8993e0f400f7e Author: SivapiriyanKumarasamy Date: Wed Nov 7 14:59:41 2018 -0500 drm/amd/display: Program dithering if requested Dithering needs to be enabled or disabled as requested. If dc_stream_update->dither_option is non-null, program the FMT blocks. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit ed20dc0d8ca8285458f57e160ee3f99c6a9d8c48 Author: Nicholas Kazlauskas Date: Thu Nov 8 16:19:22 2018 -0500 drm/amd/display: Copy crc_enabled when duplicating dm_crtc_state [Why] When running igt@kms_plane@pixel-format-pipe-* tests the CRC read will time out and the test will fail. This is because the CRTC is duplicated but the crc_enabled parameter isn't copied over to the new dm_crtc_state. CRC reads will time out because amdgpu_dm_crtc_handle_crc_irq will no longer call drm_crtc_add_crc_entry. [How] Copy crc_enabled when duplicating the state. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Reviewed-by: Sun peng Li Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6de89f79ea7ad4804e3608863ffe3a155917b8b9 Author: Chiawen Huang Date: Fri Nov 9 11:44:38 2018 +0800 drm/amd/display: Add customizable tracing event [why] add customizable log with a message input, which is for adding test log in debugging as printf function in ETW. [Usage] EVENT_LOG_CUST_MSG1("TestLog","Hello World %d=0x%x", 123, pDC); Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1cc9f371fa3e37ec45ac60c2e334cb2373913dad Author: Nevenko Stupar Date: Thu Nov 8 19:20:11 2018 -0500 drm/amd/display: Re-arrange GFX9 fields For more clear usage in future Signed-off-by: Nevenko Stupar Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 65d38262b3e82fc795464e48ee88cb66fd4c85aa Author: hersen wu Date: Tue Oct 30 16:39:15 2018 -0400 drm/amd/display: fbc state could not reach while enable fbc [WHY] fbc is within the data path from memory to dce. while re-configure mc dmif, fbc should be enabled. otherwise, fbc may not be enabled properly. [HOW] before re-configure mc dmif, disable fbc, only after dmif re-configuration fully done, enable fbc again. Signed-off-by: hersen wu Reviewed-by: Roman Li Acked-by: Leo Li Signed-off-by: Alex Deucher commit ecd0136bfdb5a28b8a869c305823df9d663e85ee Author: Harmanprit Tatla Date: Mon Nov 5 17:55:53 2018 -0500 drm/amd/display: Info frame cleanup * Use provided infopacket in stream (if valid) instead of reconstructing in set_vendor_info_packet() * Use proper format for enums * Use dc info packet struct instead Signed-off-by: Harmanprit Tatla Reviewed-by: Anthony Koo Acked-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit 242b0c8ffa5ea5c089b00a605747a1458bcb9c30 Author: abdoulaye berthe Date: Fri Nov 2 12:07:46 2018 -0400 drm/amd/display: CTS 4.2.2.7 [Why] Failure to read Detailed Capabilities Info. [How] Read Detailed Capbilities Info 80h-08Fh. Signed-off-by: abdoulaye berthe Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 71f7f3e01bbc5543a498b709fbf221fca3ae58b6 Author: Krunoslav Kovac Date: Wed Oct 24 15:33:50 2018 -0400 drm/amd/display: Fix spelling of axis in modules/color/color_gamma.c Use axis instead of axix Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 02e056e870a19a598e27868dd5ff78e7af4efae4 Author: Joshua Aberback Date: Fri Nov 2 18:00:54 2018 -0400 drm/amd/display: Remove unused panel patch "disconnect_delay" [Why] This patch is for use by dm, no need for it in dc. Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2119aa17c963e59710617c70bb7b59e89c5ff447 Author: David Francis Date: Tue Oct 9 09:45:28 2018 -0400 drm/amd/display: Start documentation of DC [Why] There are a lot of unintuitive parts of the dm-dc interface. It would help us if these were documented to provide a common understanding of what they are supposed to do [How] Most of this documentation is stubs, to be filled out more thoroughly by the experts Not every dm-accessible function and struct is mentioned. Simple functions like getters, setters, retain, release, create, destroy can be left unadorned. Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit c452de15cfe561b1af56dbf040c4006f43a6ec35 Author: Steven Chiu Date: Mon Nov 5 11:42:19 2018 -0500 drm/amd/display: 3.2.07 Signed-off-by: Steven Chiu Reviewed-by: Shahin Khayyer Acked-by: Leo Li Signed-off-by: Alex Deucher commit 50f9ca048c190b08f06a2b88e4d18d507b528b52 Author: Yogesh Mohan Marimuthu Date: Fri Nov 2 00:18:48 2018 +0530 drm/amd/display: fix sporadic multiple aux transaction failure [why] When there are multiple aux transaction in parallel, it is sometime sporadically the aux transaction starts to continuously fail. The aux transaction was failing because the busy bit for the given gpio pin was always set. The busy bit was alway set because the programming sequence to read, modify and write busy bit was not atomic. Due to which when multiple threads are trying to modify the busy bits for their gpio pins in the same integer variable sometimes the busy bits integer variable is written with old data causing failure. [how] Instead of using individual bits to track gpio pins and grouping them to integers, one byte will be allcoated for each gpio pin. Now whenever a gpio pin needs to be set to mark being used, only writing a value of one to that byte is sufficient, other bytes are not impacted. Also no need to have atomicity with bytes unlike with bits. Signed-off-by: Yogesh Mohan Marimuthu Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2c486cc4c2774df684d8a43ca7a20670c67ccd76 Author: Christian König Date: Fri Oct 26 15:59:05 2018 +0200 drm/amdgpu: wait for IB test on first device open Instead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit f52c96430f6bbdb088ed813af66588335052ec4d Author: Alex Deucher Date: Tue Nov 27 11:41:27 2018 -0500 drm/amdgpu: add VCN JPEG support amdgpu_ctx_num_entities Looks like it was missed when setting support was added. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 20a96cd3868fff0ff5bb7f15db5fcdf5a628622f Author: Alex Deucher Date: Wed Nov 28 13:51:25 2018 -0500 drm/amdgpu: don't expose fan attributes on APUs They don't have a fan controller. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 88dc26e46beb964d8c4d80f7eb33bef51fc70c9a Author: Oak Zeng Date: Fri Nov 30 09:33:02 2018 -0600 drm/amdgpu: Fix num_doorbell calculation issue When paging queue is enabled, it use the second page of doorbell. The AMDGPU_DOORBELL64_MAX_ASSIGNMENT definition assumes all the kernel doorbells are in the first page. So with paging queue enabled, the total kernel doorbell range should be original num_doorbell plus one page (0x400 in dword), not *2. Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 082f0f21f71c522491a0cac4895b32bbab1b1006 Author: Christian König Date: Thu Nov 29 16:25:10 2018 +0100 drm/ttm: fix LRU handling in ttm_buffer_object_transfer We need to set the NO_EVICT flag on the ghost object or otherwise we are adding it to the LRU. When it is added to the LRU we can run into a race between destroying and evicting it again. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fb6e4709e32ce2c8eae2ca03d2175c3c24adbc54 Author: Nicholas Kazlauskas Date: Fri Nov 30 09:56:02 2018 -0500 drm/amd/display: Fix NULL ptr deref for commit_planes_to_stream [Why] With scaling, underscan and abm changes we can end up calling commit_planes_to_stream in commit_tail. This call uses dm_state->context which can be NULL if the commit was a fast update. [How] Use dc_state instead since that can't be NULL unless the system ran out of memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912 Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for dm_atomic_state") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 5946c4319ebb39af17fb9d6a606c866ce9b88740 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: allow a lock request to block other requests. Currently, a lock can block pending requests, but all pending requests are equal. If lots of pending requests are mutually exclusive, this means they will all be woken up and all but one will fail. This can hurt performance. So we will allow pending requests to block other requests. Only the first request will be woken, and it will wake the others. This patch doesn't implement this fully, but prepares the way. - It acknowledges that a request might be blocking other requests, and when the request is converted to a lock, those blocked requests are moved across. - When a request is requeued or discarded, all blocked requests are woken. - When deadlock-detection looks for the lock which blocks a given request, we follow the chain of ->fl_blocker all the way to the top. Tested-by: kernel test robot Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit d6367d6241371566597c9ab6efe4de0abf254eed Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: use properly initialized file_lock when unlocking. Both locks_remove_posix() and locks_remove_flock() use a struct file_lock without calling locks_init_lock() on it. This means the various list_heads are not initialized, which will become a problem with a later patch. So change them both to initialize properly. For flock locks, this involves using flock_make_lock(), and changing it to allow a file_lock to be passed in, so memory allocation isn't always needed. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit 4316c3c685f5bd949e75eb99df09a18e45cc8e5c Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 ocfs2: properly initial file_lock used for unlock. Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit 4d62d3f70b9b24497e489af79b0d730be792380f Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 gfs2: properly initial file_lock used for unlock. Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit 7b587e1a5a6cf6035ab1fbd6a1d00ce604eaf488 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 NFS: use locks_copy_lock() to copy locks. Using memcpy() to copy lock requests leaves the various list_head in an inconsistent state. As we will soon attach a list of conflicting request to another pending request, we need these lists to be consistent. So change NFS to use locks_init_lock/locks_copy_lock instead of memcpy. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit ad6bbd8b18dad182a7e91d7826e27e9a64d935f9 Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: split out __locks_wake_up_blocks(). This functionality will be useful in future patches, so split it out from locks_wake_up_blocks(). Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit ada5c1da8660ecae24b3e75c18ee77d79e099fee Author: NeilBrown Date: Fri Nov 30 10:04:08 2018 +1100 fs/locks: rename some lists and pointers. struct file lock contains an 'fl_next' pointer which is used to point to the lock that this request is blocked waiting for. So rename it to fl_blocker. The fl_blocked list_head in an active lock is the head of a list of blocked requests. In a request it is a node in that list. These are two distinct uses, so replace with two list_heads with different names. fl_blocked_requests is the head of a list of blocked requests fl_blocked_member is a node in a member of that list. The two different list_heads are never used at the same time, but that will change in a future patch. Note that a tracepoint is changed to report fl_blocker instead of fl_next. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields Signed-off-by: Jeff Layton commit 1d8224e790c7f9d0091a299b985c76ba0b229f43 Author: Daniel Vetter Date: Wed Nov 28 11:07:28 2018 +0100 drm: Fix up drm_atomic_state_helper.[hc] extraction I've misplaced two functions by accident: - drm_atomic_helper_duplicate_state is really part of the resume/suspend/shutdown device-wide helpers. - drm_atomic_helper_legacy_gamma_set is part of the legacy ioctl compat helpers. Move them both back. Fixes: 9ef8a9dc4b21 ("drm: Extract drm_atomic_state_helper.[hc]") Cc: Ville Syrjälä Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181128100728.4674-1-daniel.vetter@ffwll.ch commit 531724abc3bfb556c1dd68086cf9cb51f76464e3 Author: Christoph Hellwig Date: Fri Nov 30 09:23:48 2018 +0100 block: avoid extra bio reference for async O_DIRECT The bio referencing has a trick that doesn't do any actual atomic inc/dec on the reference count until we have to elevator to > 1. For the async IO O_DIRECT case, we can't use the simple DIO variants, so we use __blkdev_direct_IO(). It always grabs an extra reference to the bio after allocation, which means we then enter the slower path of actually having to do atomic_inc/dec on the count. We don't need to do that for the async case, unless we end up going multi-bio, in which case we're already doing huge amounts of IO. For the smaller IO case (< BIO_MAX_PAGES), we can do without the extra ref. Based on an earlier patch (and commit log) from Jens Axboe. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a2237fec1e0645d1e99e108f2658c26cb5a66c74 Author: Rob Herring Date: Fri Nov 30 09:08:21 2018 -0600 kbuild: Enable dtc graph_port warning by default All the 'graph_port' warnings have been fixed or have pending fixes, so we can enable it by default now. Signed-off-by: Rob Herring commit b9f78d675230a9f65611600496235cdbd369d55d Author: Tvrtko Ursulin Date: Fri Nov 30 09:52:11 2018 +0000 drm/i915/selftests: Fix live_workarounds to actually do resets The test was missing some magic ingredients to actually trigger the resets. In case of the full reset we need the I915_RESET_HANDOFF flag set, and in case of engine reset we need a busy request. Thanks to Chris for helping with reset magic. v2: * Grab RPM ref over reset. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181130095211.23849-1-tvrtko.ursulin@linux.intel.com commit 8d2f6e2f2721097549dded41aa6e1c1a4e8e12ee Author: Tvrtko Ursulin Date: Fri Nov 30 08:02:53 2018 +0000 drm/i915/selftests: Extract spinner code Pull out spinner code to a standalone file to enable it to be shortly used by other and new test cases. Plain code movement - no functional changes. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181130080254.15383-1-tvrtko.ursulin@linux.intel.com commit 70523a3ce5ff928faa43bb2cad554dc63438e3e7 Author: Rob Herring Date: Wed Nov 28 19:11:50 2018 -0600 kbuild: disable dtc simple_bus_reg warnings by default The updated version of dtc has a bug fix for simple_bus_reg warnings and lots of warnings are generated now. So disable this warning by default. Signed-off-by: Rob Herring commit 615aa3d9aee28806f947cd1d99f1fd1f9b3e35b6 Author: Sean Paul Date: Thu Nov 29 15:36:48 2018 -0500 drm: Fix compiler warning in drm_atomic_helper.c Kbuild was complaining about: >> drivers/gpu/drm/drm_atomic_helper.c:3169:27: warning: 'state' may be used uninitialized in this function [-Wmaybe-uninitialized] Now state can't actually be used uninitialized, but we'll assign a value anyways so it stops bellyaching. Kbuild config: link: https://lists.01.org/pipermail/kbuild-all/2018-November/055374.html tree: git://anongit.freedesktop.org/drm/drm-misc for-linux-next head: b7ea04d299c78b6cf96ab281a1683ff62a74f969 commit: b7ea04d299c78b6cf96ab281a1683ff62a74f969 [4/4] drm: Add DRM_MODESET_LOCK_BEGIN/END helpers config: x86_64-randconfig-x017-201847 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout b7ea04d299c78b6cf96ab281a1683ff62a74f969 # save the attached .config to linux build tree make ARCH=x86_64 Fixes: b7ea04d299c7 ("drm: Add DRM_MODESET_LOCK_BEGIN/END helpers") Cc: Daniel Vetter Cc: Sean Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul [seanpaul added extra details on airlied's suggestion] Link: https://patchwork.freedesktop.org/patch/msgid/20181129203652.223634-1-sean@poorly.run commit 70827d9f6bc4f481fafe790dd6654ba568526768 Author: Bjorn Andersson Date: Thu Nov 29 22:56:55 2018 -0800 arm64: dts: qcom: msm8998: Fix compatible of scm node The scm binding and driver was updated to rely on the fallback to the default qcom,scm for any modern SoC and as such both are required. Add the default compatible to make the scm instance probe. Fixes: d850156a226a ("arm64: dts: qcom: msm8998: Add firmware node") Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit efdb25efc7645b326cd5eb82be5feeabe167c24e Author: Ard Biesheuvel Date: Tue Nov 27 18:42:55 2018 +0100 arm64/lib: improve CRC32 performance for deep pipelines Improve the performance of the crc32() asm routines by getting rid of most of the branches and small sized loads on the common path. Instead, use a branchless code path involving overlapping 16 byte loads to process the first (length % 32) bytes, and process the remainder using a loop that processes 32 bytes at a time. Tested using the following test program: #include extern void crc32_le(unsigned short, char const*, int); int main(void) { static const char buf[4096]; srand(20181126); for (int i = 0; i < 100 * 1000 * 1000; i++) crc32_le(0, buf, rand() % 1024); return 0; } On Cortex-A53 and Cortex-A57, the performance regresses but only very slightly. On Cortex-A72 however, the performance improves from $ time ./crc32 real 0m10.149s user 0m10.149s sys 0m0.000s to $ time ./crc32 real 0m7.915s user 0m7.915s sys 0m0.000s Cc: Rui Sun Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit f6d266c279c01708c2937849bae57210af952fa2 Merge: 2c2853f7da33c 167bfe534dc2d Author: Sean Paul Date: Fri Nov 30 08:47:01 2018 -0500 Merge drm/drm-next into drm-misc-next Need to pick up the following patch to fix htmldocs build 167bfe534dc2 ("Documentation: drm: Remove dangling pointer from drm-mm.rst") Signed-off-by: Sean Paul commit 2340bad5d28e157c386cedf8d8a64ed6514e563f Author: Hans de Goede Date: Mon Nov 26 11:52:17 2018 +0100 HID: asus: Add support for the ASUS FX503VD laptop The ASUS FX503VD laptop uses an USB keyboard with several hotkeys which use the Asus Vendor specific UsagePage. This uses two usage-codes within the page which have not been seen before, 0x7c for its mic-mute hotkey and 0x99 for Fn+F5 which has a "fan" symbol as hotkey symbol on the keyb. we map this to KEY_PROG4 (PROG1-PROG3 are already used). This commit adds the mappings for the 2 new usage codes and the USB-ids for this keyboard to the hid-asus driver. Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit e98e38090f7ef4bf519d2b34e0d5128ed5bf8c79 Author: Hans de Goede Date: Mon Nov 26 11:52:16 2018 +0100 HID: asus: Add event handler to catch unmapped Asus Vendor UsagePage codes Various Asus devices generate HID events using the Asus Vendor specific UsagePage 0xff31 and hid-asus will map these in its input_mapping for all devices to which it binds (independent of any quirks). Add an event callback which check for unmapped (because sofar unknown) usages within the Asus Vendor UsagePage and log a warning for these. The purpose of this patch is to help debugging / find such unmapped codes and add them to the asus_input_mapping() function. Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit 7dc48bf96aa0fc8aa5b38cc3e5c36ac03171e680 Author: Mark Rutland Date: Thu Nov 15 22:42:03 2018 +0000 arm64: ftrace: always pass instrumented pc in x0 The core ftrace hooks take the instrumented PC in x0, but for some reason arm64's prepare_ftrace_return() takes this in x1. For consistency, let's flip the argument order and always pass the instrumented PC in x0. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit 49e258e05e8e56d53af20be481b311c43d7c286b Author: Mark Rutland Date: Thu Nov 15 22:42:02 2018 +0000 arm64: ftrace: remove return_regs macros The save_return_regs and restore_return_regs macros are only used by return_to_handler, and having them defined out-of-line only serves to obscure the logic. Before we complicate, let's clean this up and fold the logic directly into return_to_handler, saving a few lines of macro boilerplate in the process. At the same time, a missing trailing space is added to the comments, fixing a code style violation. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit 6e803e2e6e367db9a0d6ecae1bd24bb5752011bd Author: Mark Rutland Date: Thu Nov 15 22:42:01 2018 +0000 arm64: ftrace: don't adjust the LR value The core ftrace code requires that when it is handed the PC of an instrumented function, this PC is the address of the instrumented instruction. This is necessary so that the core ftrace code can identify the specific instrumentation site. Since the instrumented function will be a BL, the address of the instrumented function is LR - 4 at entry to the ftrace code. This fixup is applied in the mcount_get_pc and mcount_get_pc0 helpers, which acquire the PC of the instrumented function. The mcount_get_lr helper is used to acquire the LR of the instrumented function, whose value does not require this adjustment, and cannot be adjusted to anything meaningful. No adjustment of this value is made on other architectures, including arm. However, arm64 adjusts this value by 4. This patch brings arm64 in line with other architectures and removes the adjustment of the LR value. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit 5c176aff5b5a7027840c37da9d48a8f9cedb08b9 Author: Mark Rutland Date: Thu Nov 15 22:42:00 2018 +0000 arm64: ftrace: enable graph FP test The core frace code has an optional sanity check on the frame pointer passed by ftrace_graph_caller and return_to_handler. This is cheap, useful, and enabled unconditionally on x86, sparc, and riscv. Let's do the same on arm64, so that we can catch any problems early. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit e4fe196642678565766815d99ab98a3a32d72dd4 Author: Mark Rutland Date: Thu Nov 15 22:41:59 2018 +0000 arm64: ftrace: use GLOBAL() The global exports of ftrace_call and ftrace_graph_call are somewhat painful to read. Let's use the generic GLOBAL() macro to ameliorate matters. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit ad697a1aecac19ec351063b5d8e6fc9d4bca7ee5 Author: Mark Rutland Date: Thu Nov 15 22:41:58 2018 +0000 linkage: add generic GLOBAL() macro Declaring a global symbol in assembly is tedious, error-prone, and painful to read. While ENTRY() exists, this is supposed to be used for function entry points, and this affects alignment in a potentially undesireable manner. Instead, let's add a generic GLOBAL() macro for this, as x86 added locally in commit: 95695547a7db44b8 ("x86: asm linkage - introduce GLOBAL macro") ... thus allowing us to use this more freely in the kernel. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon commit dd6846d774693bfa27d7db4dae5ea67dfe373fa1 Author: Ard Biesheuvel Date: Fri Nov 30 12:35:58 2018 +0100 arm64: drop linker script hack to hide __efistub_ symbols Commit 1212f7a16af4 ("scripts/kallsyms: filter arm64's __efistub_ symbols") updated the kallsyms code to filter out symbols with the __efistub_ prefix explicitly, so we no longer require the hack in our linker script to emit them as absolute symbols. Cc: Nick Desaulniers Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit e28487ea84a9c081c6d8d7da319427f7fcc32ff5 Author: Felix Fietkau Date: Fri Nov 16 10:49:14 2018 +0100 mt76: replace sta_add/remove ops with common sta_state function Allows adding unassociated stations from mac80211 Signed-off-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi commit 54f1bf8a9fddf6e9af5b037a47be3074b1aabe96 Author: Felix Fietkau Date: Thu Nov 15 19:01:21 2018 +0100 mt76: mt76x02: remove mt76x02_txq_init Open-coding it simplifies the code Signed-off-by: Felix Fietkau commit c30bdfea80cca1348ef6e0c611d75793e533e4c7 Author: Felix Fietkau Date: Thu Nov 15 18:44:37 2018 +0100 mt76: mt76x02: make group_wcid the first member in struct mt76x02_vif Allows mt76 core to cast vif->drv_priv to struct mt76_wcid Signed-off-by: Felix Fietkau commit 723b90dc7d39e5f867cefc6a75468f9425fc9855 Author: Felix Fietkau Date: Tue Nov 13 11:33:46 2018 +0100 mt76: add mt76_sta_remove helper This allows station removal code to be used by mt7603 later Signed-off-by: Felix Fietkau commit c2a1a5e13684cafb866f15af2394119f62c423a9 Author: Felix Fietkau Date: Tue Nov 13 11:25:47 2018 +0100 mt76: fix race condition in station removal If there are still pending packets in the tx queue when removing a station, it could possibly lead to a call to further attempts to pull packets from the mac80211 tx queue after it has already been removed from the scheduling list. Prevent this from happening by calling synchronize_rcu after deleting the wcid pointer before further cleaning up the tx queues. To be extra careful, ensure that mtxq->list is always initialized properly. Signed-off-by: Felix Fietkau commit 13c6d5f8370a55f556443e32c314f8b3abf842ad Author: Felix Fietkau Date: Fri Nov 9 13:43:58 2018 +0100 mt76: do not wake tx queues during flush While the queue is being cleaned up, the stack must not attempt to add any extra packets Signed-off-by: Felix Fietkau commit 79d1c94c9c78ea2f90a7218e16946a1dde2527a0 Author: Felix Fietkau Date: Mon Nov 5 21:11:39 2018 +0100 mt76: avoid queue/status spinlocks while passing tx status to mac80211 There is some code in the mac80211 tx status processing code that could potentially call back into the tx codepath. To avoid deadlocks, make sure that no tx related spinlocks are taken during the ieee80211_tx_status call. Signed-off-by: Felix Fietkau commit 4ece1e0a86b35bbb43d8d3e5268e68c6b4c6294e Author: Stanislaw Gruszka Date: Fri Nov 9 11:56:10 2018 +0100 mt76: remove wait argument from mt76x02_mcu_calibrate We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used for do additional MT_MCU_COM_REG0 register operations, which are needed for mt76x2e devices and we can use appropriate check instead of wait argument. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 93ac31680e57eb45723948102680b03d83e2684e Author: Lorenzo Bianconi Date: Tue Nov 6 17:59:48 2018 +0100 mt76x2u: init: remove mt76x2u_init_beacon_offsets routine Remove mt76x2u_init_beacon_offsets routine since the driver supports just STA mode Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9446a928e1478f27838dc57608a1ac3b5f203ddd Author: Lorenzo Bianconi Date: Tue Nov 6 17:59:47 2018 +0100 mt76x2u: main: use mt76x02_bss_info_changed utility routine Initialize bss_info_changed mac80211 callback to mt76x02_bss_info_changed utility routine and remove duplicated code. Use 8 as WCID index for sta interface Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 04289783cec4cf942a9d7498624bde5287806399 Author: Lorenzo Bianconi Date: Tue Nov 6 17:59:46 2018 +0100 mt76x2u: phy: run phy_channel_calibrate after channel switch Perform channel calibration after each channel switch and not only after connection establishment since NetworkManager perform multiple frequency scanning if RSSI in lower a given threshold Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4f833fadc99cb19cd1bf74134e199dd4b1fad34c Author: Lorenzo Bianconi Date: Tue Nov 6 17:59:45 2018 +0100 mt76x2u: phy: add TX_SHAPING calibration Add MCU_CAL_TX_SHAPING calibration in mt76x2u_phy_channel_calibrate routine since now mt76x2 and mt76x2u driver run the same firmware Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8f2fbff574a9bc3ee0d34a080873e2dbec39f488 Author: Lorenzo Bianconi Date: Tue Nov 6 23:54:49 2018 +0100 mt76x0: pci: enable VHT rates in IBSS mode Enable VHT tx rates in ad-hoc mode for mt76x0e driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 269906ac82fb22d41e1f95111ec2bf2546c80ce8 Author: Lorenzo Bianconi Date: Tue Nov 6 23:49:12 2018 +0100 mt76: introduce mt76x02_config_mac_addr_list routine Add mt76x02_config_mac_addr_list routine in order to set the mac address list supported by the driver. Initialize wiphy->addresses/n_addresses for mt76x0e driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6bf4a8e902aad7df55d7f2b10b850cfa3f880996 Author: Lorenzo Bianconi Date: Mon Nov 5 00:18:26 2018 +0100 mt76x0: dfs: fix IBI_R11 configuration on non-radar channels Fix IBI_R11 configuration on non-radar channels for mt76x0e driver. This patch improve system stability under heavy load. Moreover use IBI_R11 name and remove magic numbers for 0x212c register Fixes: 0c3b3abc9251 ("mt76x0: pci: add DFS support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4784a3cc3fffd0ba5ef6c7a23980ae0318fc1369 Author: Stanislaw Gruszka Date: Thu Nov 1 16:35:02 2018 +0100 mt76x02: assure we update gain after scan Assure that after we initialize dev->cal.low_gain to -1 this will cause update gain calibration. Otherwise this might or might not happen depending on value of second bit of low_gain and values read from registers in mt76x02_phy_adjust_vga_gain(). Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit f1b8ee35fec4a070b7760a99709fc98f237c2b86 Author: Stanislaw Gruszka Date: Thu Nov 1 16:35:01 2018 +0100 mt76x02: run calibration after scanning If we are associated and scanning is performed, sw_scan_complete callback is done after we get back to operating channel, so we do not perform queue cal work. Fix this queue cal work from sw_scan_complete(). On mt76x0 we have to restore gain in MT_BBP(AGC, 8) register after scanning, as it was multiple times modified by channel switch code. So queue cal work without any delay to set AGC gain value. Similar like in mt76x2 init AGC gain only when set operating channel and just check before queuing cal work in sw_scan_complete() if initialization was already done. Fixes: bbd10586f0df ("mt76x0: phy: do not run calibration during channel switch") Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit c69505367c2a81683a35b0ff263485f41fe19c89 Author: Stanislaw Gruszka Date: Fri Oct 26 14:00:29 2018 +0200 mt76: remove wait argument from mt76x02_mcu_set_radio_state Remove wait argument from mt76x02_mcu_set_radio_state and newer wait for response when sending CMD_POWER_SAVING_OP mcu command. Note this change behaviour for PCIe devices, but the change is in align with vendor driver. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 3d2d61b5f7a52936e8ec01fa55ace709d52eacc2 Author: Stanislaw Gruszka Date: Fri Oct 26 14:00:28 2018 +0200 mt76: remove wait argument from mt76x02_mcu_function_select Remove wait argument from mt76x02_mcu_function_select and wait for response when function is not Q_SELECT, what is the same behaviour like in vendor driver. Note this change behaviour for PCIe devices for Q_SELECT function form wait to no-wait, and for mt76x0u BW_SETTING from no-wait to wait. But the change is in align with vendor driver. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit a74d6336092c954ddf07e0e0a31466befdef6ed7 Author: Stanislaw Gruszka Date: Fri Oct 26 14:00:26 2018 +0200 mt76: remove mcu_msg_alloc We almost always use patter like this: skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg)); return mt76_mcu_send_msg(dev, skb, CMD_FUN_SET_OP, wait_resp); This is not needed, we can allocate skb in mcu_send_msg routine. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit ad3f993a0857ad3b792e7463828eb0d90cdd6f4d Author: Stanislaw Gruszka Date: Thu Oct 25 18:18:33 2018 +0200 mt76x0: use band parameter for LC calibration We use always 1 as band parameter for MCU_CAL_LC, this break 2GHz, we should use 0 for this band instead. Patch fixes problems happened sometimes when try to associate with 2GHz AP and manifest by errors like below: [14680.920823] wlan0: authenticate with 18:31:bf:c0:51:b0 [14681.109506] wlan0: send auth to 18:31:bf:c0:51:b0 (try 1/3) [14681.310454] wlan0: send auth to 18:31:bf:c0:51:b0 (try 2/3) [14681.518469] wlan0: send auth to 18:31:bf:c0:51:b0 (try 3/3) [14681.726499] wlan0: authentication with 18:31:bf:c0:51:b0 timed out Fixes: 9aec146d0f6b ("mt76x0: pci: introduce mt76x0_phy_calirate routine") Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 07e548521274729c4af71e28a67b51dbd2361c0d Author: Lorenzo Bianconi Date: Mon Oct 29 22:31:25 2018 +0100 mt76x0: phy: use tssi reported value to configure tx power if available Use tssi calibrated value to configure tx power gain if tssi is enabled in eeprom data Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3548a9dd2def69d92952baa23c5baf2037f818dd Author: Lorenzo Bianconi Date: Mon Oct 29 22:31:24 2018 +0100 mt76x0: phy: introduce tssi calibration support Run mt76x0 tssi calibration process if enabled in eeprom data. Perform calibration procedure every 4s Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 693792ec55d5d87d6d9f704f40cc77f6932820ad Author: Lorenzo Bianconi Date: Mon Oct 29 22:31:23 2018 +0100 mt76: move mt76x02_eeprom_copy in mt76x02-lib module Move mt76x02_eeprom_copy utility routine in mt76x02-lib module in order to be reused by mt76x0 driver adding tssi calibration support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 016ebffba18f6f792ad346c5b62941970f0e5b45 Author: Lorenzo Bianconi Date: Mon Oct 29 22:16:50 2018 +0100 mt76x2u: init: use common routines for wcid/key initialization Use mt76x02_mac_wcid_setup and mt76x02_mac_shared_key_setup for shared keys and wcid table initialization and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 40b63348030a080e6438d19d354b8e29165fa67a Author: Lorenzo Bianconi Date: Mon Oct 29 15:12:22 2018 +0100 mt76x2u: init: remove not useful configuration Remove MT_TSO_CTRL and MT_HEADER_TRANS_CTRL_REG initialization since it is already done in mt76_write_mac_initvals routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 24702cdb5f49c4e09dd89cfc248ae4e43275b2bd Author: Lorenzo Bianconi Date: Mon Oct 29 01:37:00 2018 +0100 mt76x0: init: use mt76x02_mac_wcid_setup for wcid configuration Use mt76x02_mac_wcid_setup utility routine for wcid init configuration and remove duplicated code. This patch fixes a mt76x0 AP issue since hw key table selection was set to pairwise by default Fixes: dbad2adcb2c7 ("mt76x0: pci: enable AP support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 544f9a532f0ac3236dec903e1d0c3c5cc8bed919 Author: Lorenzo Bianconi Date: Mon Oct 29 01:36:59 2018 +0100 mt76x2: move wcid_tx_rate conf at bootstrap Move WCID tx rate configuration at device bootstrap since the related register are always set to 0 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 48c76588221b49e7d46e6f3c26bce0318fbea97a Author: Lorenzo Bianconi Date: Sun Oct 28 23:54:36 2018 +0100 mt76x0: init: use mt76x02_mac_shared_key_setup in mt76x0_init_hardware Use mt76x02_mac_shared_key_setup utility routine for shared key initialization and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0464cbfc36ac35700d572925769d7c73b3744798 Author: Lorenzo Bianconi Date: Sat Oct 27 21:06:25 2018 +0200 mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor Use mt76_poll_msec utility routine for CORE_R34 register polling instead of mt76_poll in order to allow the hw to complete requested calibration since on slow devices (e.g. mt7620 based boards) calibration takes longer than 2ms Fixes: 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b983a5b900627faa49cf37e101d65b56e941c740 Author: Stanislaw Gruszka Date: Wed Oct 31 08:32:58 2018 +0100 mt76x0: do not overwrite other MT_BBP(AGC, 8) fields MT_BBP(AGC, 8) register has values depend on band in mt76x0_bbp_switch_tab, so we should not overwrite other fields than MT_BBP_AGC_GAIN when setting gain. This can fix performance issues when connecting to 2.4GHz AP. Fixes: 4636a2544c3b ("mt76x0: phy: align channel gain logic to mt76x2 one") Acked-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 88046b2c9f6d8b91cc8b3ada547f49f6dd45469b Author: Felix Fietkau Date: Thu Oct 25 16:11:34 2018 +0200 mt76: add support for reporting tx status with skb MT76x2/MT76x0 has somewhat unreliable tx status reporting, and for that reason the driver currently does not report per-skb tx ack status at all. This breaks things like client idle polling, which relies on the tx ack status of a transmitted nullfunc frame. This patch adds code to report skb-attached tx status if requested by mac80211 or the rate control module. Since tx status is polled from a simple FIFO register, the code needs to account for the possibility of tx status events getting lost. The code keeps a list of skbs for which tx status is required and passes them to mac80211 once tx status has been filled in and the DMA queue is done with it. If a tx status event is not received after one second, the status rates are cleared, and a succesful ACK is indicated to avoid spurious disassoc during assoc or client polling. Signed-off-by: Felix Fietkau commit 59b55d066ff625f8613c563bd2ed705bce412fa8 Author: Felix Fietkau Date: Thu Oct 25 17:40:06 2018 +0200 mt76: mt76x02: only override control->sta on sw-encrypted tx control->sta is set to NULL early when encryption is turned on for the station and info->control.hw_key is not set. This code is missing a check for the 802.11 header protected flag, otherwise it resets the station for other frames, e.g. client probing frames. Signed-off-by: Felix Fietkau commit 65b526a108264aeac769ec82cf33e5f966c9a1df Author: Felix Fietkau Date: Thu Oct 25 14:23:13 2018 +0200 mt76: mt76x02: skip station tx status for non-sta wcid entries Fixes a crash that could occur if a frame is sent to a station, but the station's wcid was not used (e.g. for software encrypted mgmt tx) Signed-off-by: Felix Fietkau commit 1a4846fcfed6d7cf902719ad0cd1fe8eaf7b3f91 Author: Felix Fietkau Date: Wed Oct 24 17:57:10 2018 +0200 mt76: clean up more unused EXPORT_SYMBOLs Make functions static where possible Signed-off-by: Felix Fietkau commit 801ccc8a60381f76810b5da9b22f9fe47076a6e9 Author: Lorenzo Bianconi Date: Mon Oct 22 23:42:13 2018 +0200 mt76x0: pci: add DFS support Introduce dfs support in mt76x0e driver and unlock radar channels Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e6cb3291053fdf21e5caba68137b4bab112815fc Author: Lorenzo Bianconi Date: Mon Oct 22 23:42:12 2018 +0200 mt76: move dfs support in mt76x02-lib module Move mt76x2 DFS support in mt76x02-lib module in order to be reused by mt76x0 driver and unlock DFS frequencies Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cc726268e4dcec33c6ed65d664d70b9e13cb4760 Author: Lorenzo Bianconi Date: Sat Oct 20 12:40:55 2018 +0200 mt76: move mt76x02_bss_info_changed in mt76x02-lib module Unify drv_bss_info_changed mac80211 callback and remove duplicated code in mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 317ed42b701b088013fb8c909c10ca7f44bdf2b3 Author: Lorenzo Bianconi Date: Sat Oct 20 12:40:54 2018 +0200 mt76: move tx protection routines in mt76x02-lib module Move mt76x02_set_rts_threshold and mt76x02_mac_set_tx_protection routines in mt76x02-lib module and remove duplicated code in mt76x0 and mt76x2 drivers. Remove pci_mac.c and mt76x0/mac.c since now are empty files Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 13ed9d4ae5b3dc5775bba41d228e3bded0b84dec Author: Lorenzo Bianconi Date: Sat Oct 20 12:40:53 2018 +0200 mt76x0: update init vals for MT_TX_PROT registers Add missing VHT MT_TX_PROT register init values Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3670405193e2e7c1834244f44a3008149fca5059 Author: Lorenzo Bianconi Date: Sat Oct 20 12:40:52 2018 +0200 mt76: move mt76x02_set_tx_ackto in mt76x02-lib module Move mt76x02_set_tx_ackto and mt76x02_set_coverage_class routines in mt76x02-lib module in order to be reused by mt76x0 driver. This is a preliminary patch to unify drv_bss_info_changed mac80211 callback between mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4cb23b650a59b042f647d09d16d527d026b2d2f2 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:32 2018 +0200 mt76x0: pci: enable AP support Add missing mac80211 callbacks to mt76x0e_ops data structure and add mt76x02_beacon utility routines in mt76x0_bss_info_changed in order to enable/disable beacon transmission Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fc245983a8a8cc82046cfb83e327b991aefabaf7 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:31 2018 +0200 mt76: introduce mt76x02_init_beacon_config routine Add mt76x02_init_beacon_config utility routine in mt76x02-lib module in order to be reused by mt76x0 driver configuring BSSID registers and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f7c8a0f2da379dae08075d6023d24b9accf2d1f9 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:30 2018 +0200 mt76: move mt76x02_sta_ps in mt76x02-lib module Move mt76x02_sta_ps utility routine in mt76x02_util.c in order to be reused by mt76x0 driver adding AP support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1da0a411bece6f63e2110f6a69862db70aadcc5e Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:29 2018 +0200 mt76: move mt76x02_get_txpower in mt76x02_util.c Move mt76x02_get_txpower utility routine in mt76x02-lib module in order to be reused by mt76x0 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c2756a1c41e4d6433e9e994d97bae88a0b6033cf Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:28 2018 +0200 mt76: move mt76x02_sw_scan and mt76x02_sw_scan_complete in mt76x02-lib module Move mt76x02_sw_scan and mt76x02_sw_scan_complete utility routines in mt76x02_util.c in order to be reused by mt76x0 and mt76x2u drivers and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 82b5c239417a4abe16c46f5bb25383f6f2363921 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:27 2018 +0200 mt76x0: pci: add pre_tbtt_tasklet support Enable/disable pre_tbtt_tasklet in mt76x0 driver in order to add AP support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit dfe6c80c92248e0c196fdb396b281d7c68f07458 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:26 2018 +0200 mt76: move tx beacon routines in mt76x02-lib module Move mt76x02_tx beacon utility routines in mt76x02_mmio.c in order to be reused by mt76x0 driver adding AP support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit dc33b2512d9237ce80cf5f404d91ebb2ca9142b9 Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:25 2018 +0200 mt76: move mac beacon routines in mt76x02-lib module Move mt76x02_beacon mac routines in mt76x02_mac.c in order to be reused by mt76x0 driver adding AP support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5cbace02d842b62cf276ef97555a5f296d3dc59e Author: Lorenzo Bianconi Date: Sat Oct 20 12:13:24 2018 +0200 mt76: move mt76x02_init_device in mt76x02-lib module Move mt76x02_init_device routine in mt76x02_util.c in order to be reused by mt76x0 driver and remove duplicated code. Move interface combo definition supported by the driver in mt76x02_init_device routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit dd61100db4acb374a1d93f7bfa966d9c07cecfa8 Author: Lorenzo Bianconi Date: Fri Oct 19 14:56:24 2018 +0200 mt76: move mt76x02_mac_set_short_preamble in mt76x02_mac.c Move mt76x02_mac_set_short_preamble routine in mt76x02-lib module since it is shared between mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f47301403f112cfc681abb644a4c4e382503773c Author: Lorenzo Bianconi Date: Fri Oct 19 11:40:48 2018 +0200 mt76x0: align mt76x0u and mt76x0e fw version Unify firmware version used on mt76x0e and mt76x0u drivers. Fallback to mt7610u fw if mt7610e one is not available Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 64c6a54a5a7c0ce9f88aab718cc76e6fd2485150 Author: Lorenzo Bianconi Date: Fri Oct 19 12:47:35 2018 +0200 mt76x0: mac: remove mt76x0_mac_set_ampdu_factor Remove no longer used mt76x0_mac_set_ampdu_factor routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b13dc8a8da093a49219d54bb55981ef23e912da7 Author: Lorenzo Bianconi Date: Fri Oct 19 00:57:32 2018 +0200 mt76x0: pci: add missing MODULE_FIRMWARE macro Add missing firmware declaration for mt76x0e driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 00eccdd622078b319d789da4914715e68f42f3b5 Author: Lorenzo Bianconi Date: Tue Oct 16 11:42:32 2018 +0200 mt76x0: init: simplify mt76x0_init_mac_registers Simplify mt76x0_init_mac_registers routine using mt76_set, mt76_clear and mt76_rmw utility routines Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ef442b73b6bc36b5499e1983611abb46e6337975 Author: Stanislaw Gruszka Date: Thu Oct 18 12:15:31 2018 +0200 mt76x0: antenna select corrections Update mt76x0_phy_ant_select() to conform vendor driver, most notably add dual antenna mode support, read configuration from EEPROM and move ant select out of channel config to init phase. Plus small MT7630E quirk for MT_CMB_CTRL register which vendor driver dedicated to this chip do. This make MT7630E workable with mt76x0e driver and do not cause any problems on MT7610U for me. Signed-off-by: Stanislaw Gruszka Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e0168dc675e2b5fd36b2f3792966963c4feb0423 Author: Lorenzo Bianconi Date: Thu Oct 18 00:35:32 2018 +0200 mt76: usb: fix static tracepoints Add submit_urb and rx_urb static tracepoints in mt76-usb module. Move trace_mac_txstat_fetch in mt76x02_mac_load_tx_status routine in order to be available to usb drivers. Moreover remove no longer used mt76x0/trace.{c,h} Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cadc83efce65fe505ec7736cec6ff5f26cbce52a Author: Felix Fietkau Date: Thu Oct 18 16:09:07 2018 +0200 mt76: mt76x0: handle chip specific initval differences Some RF registers need different values for various chips. For at least mt76x0_rf_central_tab registers, overwriting them later does not work, as the wrong values can cause the entire system to hang on some devices with MT7610E Signed-off-by: Felix Fietkau commit 5567b37359919d2f678de04e9d6e83571b3140ff Author: Felix Fietkau Date: Wed Oct 17 13:10:16 2018 +0200 mt76: clean up unused leftover EXPORT_SYMBOLs Make previously exported functions static where possible Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a83150eaad42769e4d08b6e07956a489e40214ae Author: Stanislaw Gruszka Date: Tue Oct 16 09:58:43 2018 +0200 mt76x0: do not perform MCU calibration for MT7630 Driver works better for MT7630 without MCU calibration, which looks like it can hangs the firmware. Vendor driver do not perform it for MT7630 as well. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau commit 1163bdb636a118b9d7c3c03b9e67e7e799425a9c Author: Lorenzo Bianconi Date: Mon Oct 15 14:18:05 2018 +0200 mt76x0: phy: unify calibration between mt76x0u and mt76x0e Align phy calibration logic between mt76x0u and mt76x0e drivers This patch improves connection stability with low SNR Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 70289adc6af61efc6bce737c9b86bf42779829d3 Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:16 2018 +0200 mt76x2u: introduce mac workqueue support Add mac workqueue support to mt76x2u driver in order to compute device statistics and add mac stuck routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 73556561ab9f5e7ff14c0d4d248c53f0162b4090 Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:15 2018 +0200 mt76x0: use mt76x02_mac_work as stats handler Use mt76x02_mac_work utility routine as stats workqueue handler and remove duplicated code. Moreover run mac stuck check in mt76x02_mac_work for client interfaces. Remove no longer used avg_ampdu_len and mt76x02_mac_stats data structure in mt76x02_dev Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 63f15d9459db54491001437499647dc0aa74260e Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:14 2018 +0200 mt76x0: use shared debugfs implementation Use mt76x02 debugfs implementation and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 760554130852f6ab0d9fabb3f9f40b191b849787 Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:13 2018 +0200 mt76: move mt76x02_debugfs in mt76x02-lib module Move mt76x02_debugfs in mt76x02-lib module in order to be reused by mt76x0 driver and remove duplicated code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7dd735883dec1c0e8d64e22b56dda3848c0d48e3 Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:12 2018 +0200 mt76: move mt76x02_mac_work routine in mt76x02-lib module Move mt76x02_mac_work routine in mt76x02_mac.c in order to be reused by mt76x0 driver to read device statistics Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6250318694cad72f3dd6e5ead2bd612126383bb4 Author: Lorenzo Bianconi Date: Mon Oct 15 11:33:11 2018 +0200 mt76x0: pci: add get_survey support Move mt76x02_update_channel routine in mt76x02-lib module in order to be reused by mt76x0 driver adding get_survey support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b8defea4b2ee82cdb1e11c44f5ff401c45cf5748 Author: Lorenzo Bianconi Date: Sun Oct 14 18:55:20 2018 +0200 mt76x0: phy: improve code readability in initvals_phy.h Improve initvals_phy.h code readability (there are no actual changes of original values) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d3caa060e1718928d1514caf81a6312d2f2a9369 Author: Lorenzo Bianconi Date: Sun Oct 14 18:55:19 2018 +0200 mt76x0: phy: simplify rf configuration routines Simplify mt76x0_phy_vco_cal and mt76x0_phy_set_chan_rf_params routines using mt76x0_rf_wr, mt76x0_rf_set and mt76x0_rf_clear helper routines. Moreover over get rid of magic numbers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9c410782472e37539dff93688d205d31ad7c78ec Author: Lorenzo Bianconi Date: Sun Oct 14 18:55:18 2018 +0200 mt76x0: phy: use proper name convention Use mt76x0_phy as prefix for routines in mt76x0/phy.c Moreover use mt76x0_rf_set to enable vco calibration in mt76x0_phy_vco_cal Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 989582e50cbfd248707c0c3160f408dd4bd0c4bc Author: Lorenzo Bianconi Date: Sun Oct 14 20:27:28 2018 +0200 mt76x2u: align channel gain logic to mt76x2 one Update vga tuning algorithm to the one used in mt76x2 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cac97ed681db9891c74be91b54e6b550dc6afb03 Author: Lorenzo Bianconi Date: Sun Oct 14 18:38:05 2018 +0200 mt76x2: align mt76x2 and mt76x2u firmware Unify firmware version used on mt76x2e and mt76x2u drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2ed29e15e4b2500ae78de658a18f4482e7ac288b Author: Geert Uytterhoeven Date: Thu Nov 29 12:09:31 2018 +0100 ARM: shmobile: R-Mobile: Move pm-rmobile to drivers/soc/renesas/ The pm-rmobile driver is really a driver for the System Controller (SYSC) found in R-Mobile SoCs. An equivalent driver for R-Car SoCs is already located under drivers/soc/renesas/. Hence move the pm-rmobile driver from arch/arm/mach-shmobile/ to drivers/soc/renesas/, and rename it to rmobile-sysc. Enable compile-testing on non-ARM and non-R-Mobile SoCs. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 445aeb081bc7131c0dcb0818f0326a8dd5a14a14 Author: Geert Uytterhoeven Date: Thu Nov 29 12:09:30 2018 +0100 ARM: shmobile: R-Mobile: Clean up struct rmobile_pm_domain Commit 59b89af1d5551c12 ("ARM: shmobile: sh7372: Remove Legacy C SoC code") removed the last user of the rmobile_pm_domain.resume() callback. Commit 44d88c754e57a6d9 ("ARM: shmobile: Remove legacy SoC code for R-Mobile A1") removed the last user of the rmobile_pm_domain.no_debug flag and of the "pm-rmobile.h" header file (outside the actual driver). Hence remove no longer used rmobile_pm_domain members, and absorb the header file into the driver. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0c0f2f93e708b960985cf7e908d982366fe75770 Author: Honghui Zhang Date: Fri Nov 30 11:33:00 2018 +0800 PCI: mediatek: Use devm_of_pci_get_host_bridge_resources() to parse DT Use the devm_of_pci_get_host_bridge_resources() API in place of the PCI OF DT parser. Signed-off-by: Honghui Zhang Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 160bfa7c724b348a90a12dd9694f351927a15b8e Author: Geert Uytterhoeven Date: Thu Nov 29 11:56:18 2018 +0100 soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) renamed the A3VIP power domain on R-Car V3H to A3VIP0, and clarified the power domain hierarchy for the A3VIP[012] power domains. As the definition for the A3VIP0 domain is not yet used from DT, it can just be renamed. Fixes: 7755b40d07a8dba7 ("dt-bindings: power: add R8A77980 SYSC power domain definitions") Fixes: 41d6d8bd8ae94ca9 ("soc: renesas: rcar-sysc: add R8A77980 support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 97473bc85b22ac610b1810b6a9a4669a6cb0b7b0 Author: Geert Uytterhoeven Date: Thu Nov 29 11:56:17 2018 +0100 soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) renamed the A2PD0 and A2DP0 power domains on R-Car V3H to A2DP0 resp. A2DP1. As these definitions are not yet used from DT, they can just be renamed. Fixes: 7755b40d07a8dba7 ("dt-bindings: power: add R8A77980 SYSC power domain definitions") Fixes: 41d6d8bd8ae94ca9 ("soc: renesas: rcar-sysc: add R8A77980 support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b5eb730e031acaba2d25e8f522ac5966a70885ae Author: Geert Uytterhoeven Date: Thu Nov 29 11:56:16 2018 +0100 soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) renamed the A2IR2 and A2IR3 power domains on R-Car V3M to A2DP resp. A2CN. As these definitions are not yet used from DT, they can just be renamed. While at it, fix the indentation of the A3IR definition. Fixes: 833bdb47c826a1a6 ("dt-bindings: power: add R8A77970 SYSC power domain definitions") Fixes: bab9b2a74fe9da96 ("soc: renesas: rcar-sysc: add R8A77970 support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit da3e1c57caf93ed379f14686e877f806111abe7c Author: Geert Uytterhoeven Date: Thu Nov 29 11:56:15 2018 +0100 soc: renesas: r8a77970-sysc: Remove non-existent CR7 power domain The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) removed the CR7 power domain on R-Car V3M, as this SoC does not have an ARM Cortex-R7 Realtime Core. As this definition was never used from DT, it can just be removed. Fixes: 833bdb47c826a1a6 ("dt-bindings: power: add R8A77970 SYSC power domain definitions") Fixes: bab9b2a74fe9da96 ("soc: renesas: rcar-sysc: add R8A77970 support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit a93913cecb3c98c2310da42a9650cfd817fb00b8 Author: Geert Uytterhoeven Date: Thu Nov 29 11:56:14 2018 +0100 soc: renesas: r8a77965-sysc: Remove non-existent A3IR power domain The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018) removed the A3IR power domain on R-Car M3-N, as this SoC does not have an Image Processing Unit (IMP-X5). The definition in the DT bindings header cannot be removed yet, until its (incorrect) user has been removed. Fixes: a527709b78b3c997 ("soc: renesas: rcar-sysc: Add R-Car M3-N support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit f545425a0145dc6cc9c6aca0f69d0bf7ca198906 Author: Tvrtko Ursulin Date: Thu Nov 29 13:46:30 2018 +0000 drm/i915/icl: Remove Wa_1604302699 It seems that the documentation does not reference this any more, plus, bit 28 does not stick when written to the register. Therefore I can only assume this is something which was documented in the past but got removed from the hardware in the meantime. Signed-off-by: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181129134630.8222-1-tvrtko.ursulin@linux.intel.com commit a2538cbc989cfab007149dddd1b63a0ba509370a Author: Tvrtko Ursulin Date: Thu Nov 29 13:41:28 2018 +0000 drm/i915: Remove whitelist application from ringbuffer backend There is no white-listing before Gen8 and after the removal ringbuffer support for these platforms we can remove the call to this no-op. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181129134128.7994-1-tvrtko.ursulin@linux.intel.com commit 41e30b515a003a90e336b7a456c7c82d8c3aa6a7 Author: Geert Uytterhoeven Date: Thu Nov 29 11:34:35 2018 +0100 arm64: dts: renesas: r8a7795-es1: Add missing power domains to IPMMU nodes While commit 3b7e7848f0e88b36 ("arm64: dts: renesas: r8a7795: Add IPMMU device nodes") for R-Car H3 ES2.0 did include power-domains properties, they were forgotten in the counterpart for older R-Car H3 ES1.x SoCs. Fixes: e4b9a493df45075b ("arm64: dts: renesas: r8a7795-es1: Add IPMMU device nodes") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit d8c6557bc93be73ed1abe5b13fa1e46e59da028b Author: Geert Uytterhoeven Date: Thu Nov 29 11:34:34 2018 +0100 arm64: dts: renesas: r8a77965: Remove non-existent IPMMU-IR The R-Car Gen3 HardWare Manual Errata for Rev. 1.00 (Aug 24, 2018) removed the IPMMU-IR IOMMU instance on R-Car M3-N, as this SoC does not have an Image Processing Unit (IMP-X5) nor the A3IR power domain. Fixes: 55697cbb44e4f7ea ("arm64: dts: renesas: r8a779{65,80,90}: Add IPMMU devices nodes") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 5a756aadf5f7472422bbbfa373cdf090bcb343ec Author: Chris Wilson Date: Thu Nov 29 21:05:43 2018 +0000 drm/i915: Fixup stub definitions for intel_opregion_suspend|resume 248 "multiple definition of ...". E.g.: LD [M] drivers/gpu/drm/i915/i915.o ld: drivers/gpu/drm/i915/i915_irq.o: in function `intel_opregion_resume': i915_irq.c:(.text+0x58f0): multiple definition of `intel_opregion_resume'; drivers/gpu/drm/i915/i915_drv.o:i915_drv.c:(.text+0x2d40): first defined here Reported-by: Randy Dunlap Reported-by: Stephen Rothwell Fixes: a950adc6c343 ("drm/i915: Stop calling intel_opregion unregister/register in suspend/resume") Signed-off-by: Chris Wilson Acked-by: Randy Dunlap # build tested Link: https://patchwork.freedesktop.org/patch/msgid/20181129210543.31555-1-chris@chris-wilson.co.uk commit 2c2853f7da33c72fa271edac520d36ae47097354 Author: Boris Brezillon Date: Fri Nov 30 10:02:54 2018 +0100 drm/vc4: Allow YUV formats on cursor planes Now that scaling is allowed on cursor planes, we can also allow YUV formats. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-6-boris.brezillon@bootlin.com commit 5dc416d9c284e57d302be5fcf9bcb0f45aac28c2 Author: Boris Brezillon Date: Fri Nov 30 10:02:53 2018 +0100 drm/vc4: Allow scaling on cursor plane Now that async update has been reworked to allow scaled planes to be updated asynchronously when the scaling params do not change, we can remove the NO_SCALING constraint on cursor planes. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-5-boris.brezillon@bootlin.com commit 1d4118ca165e9cf393b29e606b7a3afddc76a3fb Author: Boris Brezillon Date: Fri Nov 30 10:02:52 2018 +0100 drm/vc4: Rework the async update logic vc4_plane_atomic_async_check() was only based on the state->{crtc,src}_{w,h} which was fine since scaling was not allowed on the cursor plane. We are about to change that to properly support underscan, and, in order to make the async check more reliable, we call vc4_plane_mode_set() from there and check that only the pos0, pos2 and ptr0 entries in the dlist have changed. In vc4_plane_atomic_async_update(), we no longer call vc4_plane_atomic_check() since vc4_plane_mode_set() has already been called in vc4_plane_atomic_async_check(), and we don't need to allocate a new LBM region (we reuse the one from the current state). Note that we now have to manually update each field of the current plane state since it's no longer updated in place (not sure we have to sync all of them, but it's harmless if we do). We also drop the vc4_plane_async_set_fb() call (ptr0 dlist entry has been properly updated in vc4_plane_mode_set()) Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-4-boris.brezillon@bootlin.com commit 8d93844965c3d5a7bb57a80afd915463fa7a0824 Author: Boris Brezillon Date: Fri Nov 30 10:02:51 2018 +0100 drm/vc4: Don't check plane state more than once We are about to use vc4_plane_mode_set() in the async check path, but async check can decide that async update is not possible and force the driver to fallback to a sync update. All the checks that have been done on the plane state during async check stay valid, and checking it again is not necessary. Add a ->checked field to vc4_plane_state, and use it to track the status of the state (checked or not). Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-3-boris.brezillon@bootlin.com commit 0a038c1c29a7a37724b39543ae36316745167239 Author: Boris Brezillon Date: Fri Nov 30 10:02:50 2018 +0100 drm/vc4: Move LBM creation out of vc4_plane_mode_set() We are about to use vc4_plane_mode_set() in the async check path, and async updates require that LBM size stay the same since they reuse the LBM from the previous state. So we definitely don't want to allocate a new LBM region that we know for sure will be free right away. Move the LBM allocation out of vc4_plane_mode_set() and call the new function (vc4_plane_update_lbm()) from vc4_plane_atomic_check(). Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-2-boris.brezillon@bootlin.com commit b2e554d4df5e758306e81d64e1782f992a74b995 Author: Boris Brezillon Date: Fri Nov 30 10:02:49 2018 +0100 drm/vc4: Make vc4_lbm_size() return 0 when vertical scaling is disabled LBM is not needed when vertical scaling is disabled. Return 0 in this case to avoid allocating LBM memory that will anyway be unused. While at it, drop the test on ->is_unity which is now redundant. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181130090254.594-1-boris.brezillon@bootlin.com commit cc2b8ed1369592fb84609e920f99a5659a6445f7 Author: Ard Biesheuvel Date: Fri Nov 23 18:29:02 2018 +0100 arm64/bpf: use movn/movk/movk sequence to generate kernel addresses On arm64, all executable code is guaranteed to reside in the vmalloc space (or the module space), and so jump targets will only use 48 bits at most, and the remaining bits are guaranteed to be 0x1. This means we can generate an immediate jump address using a sequence of one MOVN (move wide negated) and two MOVK instructions, where the first one sets the lower 16 bits but also sets all top bits to 0x1. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann commit c51ba54f6349e677d136dac4d45d628bf1f9524d Author: Douglas Anderson Date: Tue Nov 27 11:24:43 2018 -0800 dt-bindings: clock: Require #reset-cells in sdm845-videocc The #reset-cells was listed as optional in the bindings for qcom,sdm845-videocc. There's no reason for it to be optional. As per Stephen [1]: > We should update the binding to make it a required property. It > doesn't make any sense why that property would be optional given > that the hardware either has support for resets or it doesn't. sdm845 support is still in its infancy so we shouldn't be affecting any real device trees by modifying the bindings here. [1] https://lkml.kernel.org/r/154330186815.88331.12720647562079303842@swboyd.mtv.corp.google.com Fixes: 84b66b211603 ("dt-bindings: clock: Introduce QCOM Video clock bindings") Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Signed-off-by: Stephen Boyd commit f87d33e663d65d1c8a01585deb69aabb1aad0c6e Author: Loic Poulain Date: Wed Nov 21 18:40:41 2018 +0100 clk: qcom: msm8916: Additional clock rates for spi Add SPI friendly clock rates to the spi freq table. Today it's not possible to use SPI at lower than 960Khz. This patch adds 100/250/500/1000 kHz configs to the table. Signed-off-by: Loic Poulain Signed-off-by: Stephen Boyd commit 68000a0d983f539c95ebe5dccd4f29535c7ac0af Author: Thara Gopinath Date: Tue Nov 27 17:43:11 2018 -0500 thermal: Fix locking in cooling device sysfs update cur_state Sysfs interface to update cooling device cur_state does not currently holding cooling device lock sometimes leading to stale values in cur_state if getting updated simultanelously from user space and thermal framework. Adding the proper locking code fixes this issue. Signed-off-by: Thara Gopinath Signed-off-by: Zhang Rui commit 964f4843a455d2ffb199512b08be8d5f077c4cac Author: Wei Wang Date: Wed Nov 7 14:36:11 2018 -0800 Thermal: do not clear passive state during system sleep commit ff140fea847e ("Thermal: handle thermal zone device properly during system sleep") added PM hook to call thermal zone reset during sleep. However resetting thermal zone will also clear the passive state and thus cancel the polling queue which leads the passive cooling device state not being cleared properly after sleep. thermal_pm_notify => thermal_zone_device_reset set passive to 0 thermal_zone_trip_update will skip update passive as `old_target == instance->target'. monitor_thermal_zone => thermal_zone_device_set_polling will cancel tz->poll_queue, so the cooling device state will not be changed afterwards. Reported-by: Kame Wang Signed-off-by: Wei Wang Signed-off-by: Zhang Rui commit 209d07e63e14e04558cebba5e401e41bbde67b88 Author: Wolfram Sang Date: Sun Oct 21 22:00:52 2018 +0200 thermal: zx2967_thermal: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Shawn Guo Reviewed-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 445ae758ceaf394636ad7ab9872f52cdc24165a6 Author: Wolfram Sang Date: Sun Oct 21 22:00:51 2018 +0200 thermal: st: st_thermal: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Reviewed-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 3fc62efe09975c160c413a4b7d10c029e0f04470 Author: Wolfram Sang Date: Sun Oct 21 22:00:50 2018 +0200 thermal: spear_thermal: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Reviewed-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 26d84c276c1ecde8548aff41c9fa9e63ceac924e Author: Wolfram Sang Date: Sun Oct 21 22:00:49 2018 +0200 thermal: rockchip_thermal: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Reviewed-by: Heiko Stuebner Reviewed-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 9d6f76c6e82c336aaa57bc0c6e54e0444117bcee Author: Wolfram Sang Date: Sun Oct 21 22:00:48 2018 +0200 thermal: int340x_thermal: int3400_thermal: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Reviewed-by: Daniel Lezcano Signed-off-by: Zhang Rui commit 5be52fccaf3d218b278320b0d183aa36aab48add Author: Lukasz Luba Date: Mon Oct 15 09:21:01 2018 +0200 thermal: remove unused function parameter Clean unused parameter from internal framework function. Signed-off-by: Lukasz Luba Signed-off-by: Zhang Rui commit 553604c041b8c18cd6a8e1d785a77f3e4be61cdb Author: Stephen Boyd Date: Fri Nov 30 00:36:33 2018 -0800 clk: mediatek: Drop more __init markings for driver probe This function is called from driver probe, which isn't the same as __init code because driver probe can happen later. Drop the __init marking here to fix this potential problem. Cc: Sean Wang Cc: Ryder Lee Cc: Rob Herring Cc: Wenzhen Yu Cc: Weiyi Lu Fixes: 2fc0a509e4ee ("clk: mediatek: add clock support for MT7622 SoC") Signed-off-by: Stephen Boyd commit 28f1186a26f7e4e5df7be454710da26c810effb6 Author: Stephen Boyd Date: Fri Nov 30 00:34:33 2018 -0800 clk: mediatek: Drop __init from mtk_clk_register_cpumuxes() This function is used from more places than just __init code. Removing __init silences a section mismatch warning here. Cc: Sean Wang Cc: Ryder Lee Cc: Rob Herring Cc: Wenzhen Yu Cc: Weiyi Lu Signed-off-by: Stephen Boyd commit 80424b02d42bb22f8ff8839cb93a84ade53b39c0 Author: Ard Biesheuvel Date: Thu Nov 29 18:12:29 2018 +0100 efi: Reduce the amount of memblock reservations for persistent allocations The current implementation of efi_mem_reserve_persistent() is rather naive, in the sense that for each invocation, it creates a separate linked list entry to describe the reservation. Since the linked list entries themselves need to persist across subsequent kexec reboots, every reservation created this way results in two memblock_reserve() calls at the next boot. On arm64 systems with 100s of CPUs, this may result in a excessive number of memblock reservations, and needless fragmentation. So instead, make use of the newly updated struct linux_efi_memreserve layout to put multiple reservations into a single linked list entry. This should get rid of the numerous tiny memblock reservations, and effectively cut the total number of reservations in half on arm64 systems with many CPUs. [ mingo: build warning fix. ] Tested-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-11-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 2c8d843d498d49c96cbab6911205a8a0dee44ba0 Author: Vasily Khoruzhick Date: Tue Nov 20 19:52:08 2018 +0200 arm64: dts: allwinner: a64: pinebook: enable power supplies Pinebook has ACIN connector and 10000 mAh battery. Signed-off-by: Vasily Khoruzhick Signed-off-by: Oskari Lemmela Reviewed-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit 5e99c99aa8031ecaa5125ac41c210633e9f47b52 Author: Oskari Lemmela Date: Tue Nov 20 19:52:07 2018 +0200 arm64: dts: allwinner: a64: sopine-baseboard: enable power supplies AXP803 ACIN pins are routed from SOM to the DC jack on the baseboard. AXP803 charger pins BATSENSE, LOADSENSE, N_BATDRV, LX_CHG, VIN_CHG and IPSOUT are connected via PMOS driver to SOM VBAT pins. VBAT and AXP803 TS pins are routed to the baseboard 3-pin battery connector. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit 74221150240025841b8c76f0c7a82d3febbb2c20 Author: Oskari Lemmela Date: Tue Nov 20 19:52:06 2018 +0200 arm64: dts: allwinner: axp803: add AC and battery power supplies Parts of the AXP803 are compatible with their counterparts on the AXP813. Add DT nodes ADC, GPIO, AC and battery power supplies. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit 77e65779ad3b7d1604e0e2800d0706463bb3623f Author: Oskari Lemmela Date: Tue Nov 20 19:52:05 2018 +0200 ARM: dts: axp81x: add AC power supply subnode Add AC power supply subnode for AXP81X PMIC. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit 5f0b0ecf043a5319e729c11a53bc8294df12dab3 Author: Ard Biesheuvel Date: Thu Nov 29 18:12:28 2018 +0100 efi: Permit multiple entries in persistent memreserve data structure In preparation of updating efi_mem_reserve_persistent() to cause less fragmentation when dealing with many persistent reservations, update the struct definition and the code that handles it currently so it can describe an arbitrary number of reservations using a single linked list entry. The actual optimization will be implemented in a subsequent patch. Tested-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-10-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 3db5e0ba8b8f4aee631d7ee04b7a11c56cfdc213 Author: Nathan Chancellor Date: Thu Nov 29 18:12:26 2018 +0100 efi/libstub: Disable some warnings for x86{,_64} When building the kernel with Clang, some disabled warnings appear because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to this list so that the build is clean again. -Wpointer-sign was disabled for the whole kernel before the beginning of Git history. -Waddress-of-packed-member was disabled for the whole kernel and for the early boot code in these commits: bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member' warning") 20c6c1890455 ("x86/boot: Disable the address-of-packed-member compiler warning"). -Wgnu was disabled for the whole kernel and for the early boot code in these commits: 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang") 6c3b56b19730 ("x86/boot: Disable Clang warnings about GNU extensions"). [ mingo: Made the changelog more readable. ] Tested-by: Sedat Dilek Signed-off-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel Reviewed-by: Sedat Dilek Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-8-ard.biesheuvel@linaro.org Link: https://github.com/ClangBuiltLinux/linux/issues/112 Signed-off-by: Ingo Molnar commit 47c33a095e1fae376d74b4160a0d73c1a4e73969 Author: Sai Praneeth Prakhya Date: Thu Nov 29 18:12:25 2018 +0100 x86/efi: Move efi__boot_services() to arch/x86 efi__boot_services() are x86 specific quirks and as such should be in asm/efi.h, so move them from linux/efi.h. Also, call efi_free_boot_services() from __efi_enter_virtual_mode() as it is x86 specific call and ideally shouldn't be part of init/main.c Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-7-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 08cfb38f3ef49cfd1bba11a00401451606477d80 Author: Sai Praneeth Prakhya Date: Thu Nov 29 18:12:24 2018 +0100 x86/efi: Unmap EFI boot services code/data regions from efi_pgd efi_free_boot_services(), as the name suggests, frees EFI boot services code/data regions but forgets to unmap these regions from efi_pgd. This means that any code that's running in efi_pgd address space (e.g: any EFI runtime service) would still be able to access these regions but the contents of these regions would have long been over written by someone else. So, it's important to unmap these regions. Hence, introduce efi_unmap_pages() to unmap these regions from efi_pgd. After unmapping EFI boot services code/data regions, any illegal access by buggy firmware to these regions would result in page fault which will be handled by EFI specific fault handler. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 7e0dabd3010d6041ee0a952c1146b2150a11f1be Author: Sai Praneeth Prakhya Date: Thu Nov 29 18:12:23 2018 +0100 x86/mm/pageattr: Introduce helper function to unmap EFI boot services Ideally, after kernel assumes control of the platform, firmware shouldn't access EFI boot services code/data regions. But, it's noticed that this is not so true in many x86 platforms. Hence, during boot, kernel reserves EFI boot services code/data regions [1] and maps [2] them to efi_pgd so that call to set_virtual_address_map() doesn't fail. After returning from set_virtual_address_map(), kernel frees the reserved regions [3] but they still remain mapped. Hence, introduce kernel_unmap_pages_in_pgd() which will later be used to unmap EFI boot services code/data regions. While at it modify kernel_map_pages_in_pgd() by: 1. Adding __init modifier because it's always used *only* during boot. 2. Add a warning if it's used after SMP is initialized because it uses __flush_tlb_all() which flushes mappings only on current CPU. Unmapping EFI boot services code/data regions will result in clearing PAGE_PRESENT bit and it shouldn't bother L1TF cases because it's already handled by protnone_mask() at arch/x86/include/asm/pgtable-invert.h. [1] efi_reserve_boot_services() [2] efi_map_region() -> __map_region() -> kernel_map_pages_in_pgd() [3] efi_free_boot_services() Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Ard Biesheuvel Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Julien Thierry Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sedat Dilek Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-5-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 8c25db0a5a67986106aa3da7ce165ff961aa7847 Author: Julien Thierry Date: Thu Nov 29 18:12:22 2018 +0100 efi/fdt: Simplify the get_fdt() flow Reorganize the get_fdt() lookup loop, clearly showing that: - Nothing is done for table entries that do not have fdt_guid - Once an entry with fdt_guid is found, break out of the loop No functional changes. Suggested-by: Joe Perches Signed-off-by: Julien Thierry Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Jon Hunter Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 6935b3c43da96bb48017b2a3bc1d4f93899f9b28 Author: Julien Thierry Date: Thu Nov 29 18:12:21 2018 +0100 efi/fdt: Indentation fix Closing bracket seems to end a for statement when it is actually ending the contained if. Add some brackets to have clear delimitation of each scope. No functional change/fix, just fix the indentation. Signed-off-by: Julien Thierry Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Arend van Spriel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Jon Hunter Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit ab2180a15ce54739fed381efb4cb12e78dfb1561 Author: Arend van Spriel Date: Thu Nov 29 18:12:27 2018 +0100 firmware/efi: Add NULL pointer checks in efivars API functions Since commit: ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") we have a device driver accessing the efivars API. Several functions in the efivars API assume __efivars is set, i.e., that they will be accessed only after efivars_register() has been called. However, the following NULL pointer access was reported calling efivar_entry_size() from the brcmfmac device driver: Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = 60bfa5f1 [00000008] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM ... Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) Workqueue: events request_firmware_work_func PC is at efivar_entry_size+0x28/0x90 LR is at brcmf_fw_complete_request+0x3f8/0x8d4 [brcmfmac] pc : [] lr : [] psr: a00d0113 sp : ede7fe28 ip : ee983410 fp : c1787f30 r10: 00000000 r9 : 00000000 r8 : bf2b2258 r7 : ee983000 r6 : c1604c48 r5 : ede7fe88 r4 : edf337c0 r3 : 00000000 r2 : 00000000 r1 : ede7fe88 r0 : c17712c8 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: ad16804a DAC: 00000051 Disassembly showed that the local static variable __efivars is NULL, which is not entirely unexpected given that it is a non-EFI platform. So add a NULL pointer check to efivar_entry_size(), and to related functions while at it. In efivars_register() a couple of sanity checks are added as well. Reported-by: Jon Hunter Signed-off-by: Arend van Spriel Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Snowberg Cc: Hans de Goede Cc: Joe Perches Cc: Julien Thierry Cc: Linus Torvalds Cc: Marc Zyngier Cc: Matt Fleming Cc: Nathan Chancellor Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Sedat Dilek Cc: Thomas Gleixner Cc: YiFei Zhu Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20181129171230.18699-9-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar commit 25bf466bd2bd083f034d36b103a11831d0d0d7d6 Author: YueHaibing Date: Thu Nov 15 11:36:28 2018 +0000 clk: stm32mp1: drop pointless static qualifier in stm32_register_hw_clk() There is no need to have the 'struct clk_hw **hws' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Signed-off-by: Stephen Boyd commit 0cd41af05f130adcce6050acade97ec0fb5069b9 Author: Ryder Lee Date: Mon Nov 5 16:43:56 2018 +0800 dt-bindings: arm: mediatek: document clk bindings for MT7629 This patch adds the binding documentation for apmixedsys, infracfg, pciesys, pericfg, topckgen, ethsys, sgmiisys and ssusbsys for MT7629. Signed-off-by: Ryder Lee Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 3b5e748615e714711220b2a95d19bd25a037db09 Author: Ryder Lee Date: Mon Nov 5 16:43:55 2018 +0800 clk: mediatek: add clock support for MT7629 SoC Add all supported clocks exported from every susbystem found on MT7629 SoC. Signed-off-by: Wenzhen Yu Signed-off-by: Ryder Lee Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 5b39fc049ce1232a56628408058ae04f353ac705 Author: Sergey Senozhatsky Date: Thu Oct 25 16:05:43 2018 +0900 s390: use common bust_spinlocks() s390 is the only architecture that is using own bust_spinlocks() variant, while other arch-s seem to be OK with the common implementation. Heiko Carstens [1] said he would prefer s390 to use the common bust_spinlocks() as well: I did some code archaeology and this function is unchanged since ~17 years. When it was introduced it was close to identical to the x86 variant. All other architectures use the common code variant in the meantime. So if we change this I'd prefer that we switch s390 to the common code variant as well. Right now I can't see a reason for not doing that This patch removes s390 bust_spinlocks() and drops the weak attribute from the common bust_spinlocks() version. [1] lkml.kernel.org/r/20181025062800.GB4037@osiris Signed-off-by: Sergey Senozhatsky Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit be534791011100d204602e2e0496e9e6ce8edf63 Author: Harald Freudenberger Date: Mon Nov 19 11:36:13 2018 +0100 s390/zcrypt: improve special ap message cmd handling There exist very few ap messages which need to have the 'special' flag enabled. This flag tells the firmware layer to do some pre- and maybe postprocessing. However, it may happen that this special flag is enabled but the firmware is unable to deal with this kind of message and thus returns with reply code 0x41. For example older firmware may not know the newest messages triggered by the zcrypt device driver and thus react with reject and the named reply code. Unfortunately this reply code is not known to the zcrypt error routines and thus default behavior is to switch the ap queue offline. This patch now makes the ap error routine aware of the reply code and so userspace is informed about the bad processing result but the queue is not switched to offline state any more. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky commit 159491f3b509bd8101199944dc7b0673b881c734 Author: Harald Freudenberger Date: Fri Nov 16 15:48:10 2018 +0100 s390/ap: rework assembler functions to use unions for in/out register variables The inline assembler functions ap_aqic() and ap_qact() used two variables declared on the very same register. One variable was for input only, the other for output. Looks like newer versions of the gcc don't like this. Anyway it is a better coding to use one variable (which may have a union data type) on one register for input and output. So this patch introduces unions and uses only one variable now for input and output for GR1 for the PQAP(QACT) and PQAP(QIC) invocation. Signed-off-by: Harald Freudenberger Acked-by: Ilya Leoshkevich Signed-off-by: Martin Schwidefsky commit e45a64975b021b6fc9fdd0dd0b74539ae1b5aa86 Author: Petr Tesarik Date: Fri Nov 16 11:47:48 2018 +0100 s390: vfio-ap: include for test_facility() The driver uses test_facility(), but does not include the corresponding include file explicitly. The driver currently builds only thanks to the following include chain: vfio_ap_drv.c Files should not rely on such fragile implicit includes. Signed-off-by: Petr Tesarik Reviewed-by: Cornelia Huck Acked-by: Christian Borntraeger Signed-off-by: Halil Pasic Signed-off-by: Martin Schwidefsky commit 9cd2992f2d6c8df54c5b937d5d1f8a23b684cc1d Author: Steven Rostedt (VMware) Date: Wed Nov 14 13:14:58 2018 -0500 fgraph: Have set_graph_notrace only affect function_graph tracer In order to make the function graph infrastructure more generic, there can not be code specific for the function_graph tracer in the generic code. This includes the set_graph_notrace logic, that stops all graph calls when a function in the set_graph_notrace is hit. By using the trace_recursion mask, we can use a bit in the current task_struct to implement the notrace code, and move the logic out of fgraph.c and into trace_functions_graph.c and keeps it affecting only the tracer and not all call graph callbacks. Acked-by: Namhyung Kim Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit d864a3ca883095aa12575b84841ebd52b3d808fa Author: Steven Rostedt (VMware) Date: Mon Nov 12 15:21:22 2018 -0500 fgraph: Create a fgraph.c file to store function graph infrastructure As the function graph infrastructure can be used by thing other than tracing, moving the code to its own file out of the trace_functions_graph.c code makes more sense. The fgraph.c file will only contain the infrastructure required to hook into functions and their return code. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit c43ac4a5301986c015137bb89568979f9b3264ca Author: Steven Rostedt (VMware) Date: Tue Nov 27 09:36:37 2018 -0500 tracing: Do not line wrap short line in function_graph_enter() Commit 588ca1786f2dd ("function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack") removed a parameter from the call ftrace_push_return_trace() that made it so that the entire call was under 80 characters, but it did not remove the line break. There's no reason to break that line up, so make it a single line. Link: http://lkml.kernel.org/r/20181122100322.GN2131@hirez.programming.kicks-ass.net Reported-by: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) commit 23621fac32ec9dbc4afada344cbf82b0f6281be3 Author: Steven Rostedt (VMware) Date: Sun Nov 18 18:32:40 2018 -0500 function_graph: Remove unused task_curr_ret_stack() The static inline function task_curr_ret_stack() is unused, remove it. Reviewed-by: Joel Fernandes (Google) Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 01a7ea763fc46fd21692dfc070009d2c1cbc1b07 Author: Chen-Yu Tsai Date: Wed Nov 28 17:30:07 2018 +0800 clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output On the R40, in addition to a mux between the RTC's own RC oscillator and an external 32768 Hz crystal, which are muxed inside the RTC module, the CCU also has its own RC oscillator, which runs at around 2 MHz, and can be muxed with the LOSC output from the RTC. This muxed output is called "SYS 32K" in the module clock diagram, but otherwise referred to as the LOSC throughout the CCU documentation. The RC oscillator is not very accurate, even though it has an undocumented calibration function. We really want a precise clock at 32768 Hz, instead of something at around 32 KHz. This patch forces the SYS 32K clock to use the RTC output as its parent, and doesn't bother registering the internal oscillator nor a clock mux. Acked-by: Maxime Ripard Acked-by: Stephen Boyd Signed-off-by: Chen-Yu Tsai commit 93029d7d407fa744a2de358664bd779cda694657 Merge: 3d58c9c9f735c b42699547fc9f Author: David S. Miller Date: Thu Nov 29 18:15:07 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next 2018-11-30 The following pull-request contains BPF updates for your *net-next* tree. (Getting out bit earlier this time to pull in a dependency from bpf.) The main changes are: 1) Add libbpf ABI versioning and document API naming conventions as well as ABI versioning process, from Andrey. 2) Add a new sk_msg_pop_data() helper for sk_msg based BPF programs that is used in conjunction with sk_msg_push_data() for adding / removing meta data to the msg data, from John. 3) Optimize convert_bpf_ld_abs() for 0 offset and fix various lib and testsuite build failures on 32 bit, from David. 4) Make BPF prog dump for !JIT identical to how we dump subprogs when JIT is in use, from Yonghong. 5) Rename btf_get_from_id() to make it more conform with libbpf API naming conventions, from Martin. 6) Add a missing BPF kselftest config item, from Naresh. ==================== Signed-off-by: David S. Miller commit 5b7f180fb3827c5d04d2b4a38a52730b9d4660d5 Author: Bjorn Andersson Date: Fri Nov 2 14:53:03 2018 -0700 arm64: defconfig: Enable core Qualcomm SDM845 options Enable a few core config options to be able to boot SDM845 MTP. The GCC, PINCTRL and GENI options are required to be able to boot to a console. Several clocks from GCC are parented by the "bi_tcxo" clock from the RPMH clock driver, so enable this to save others the time to debug the missing parent clocks later. RPMH depends on the COMMAND_DB. While we're enabling the others let's do RPMH regulators as well, as everything beyond this point depends on that. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross commit b42699547fc9fb1057795bccc21a6445743a7fde Author: Yonghong Song Date: Thu Nov 29 15:31:45 2018 -0800 tools/bpf: make libbpf _GNU_SOURCE friendly During porting libbpf to bcc, I got some warnings like below: ... [ 2%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf.c.o /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf.c:12:0: warning: "_GNU_SOURCE" redefined [enabled by default] #define _GNU_SOURCE ... [ 3%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf_errno.c.o /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c: In function ‘libbpf_strerror’: /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c:45:7: warning: assignment makes integer from pointer without a cast [enabled by default] ret = strerror_r(err, buf, size); ... bcc is built with _GNU_SOURCE defined and this caused the above warning. This patch intends to make libpf _GNU_SOURCE friendly by . define _GNU_SOURCE in libbpf.c unless it is not defined . undefine _GNU_SOURCE as non-gnu version of strerror_r is expected. Signed-off-by: Yonghong Song Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 6da8016109fc0236cd465e06827804068fd00c7b Author: Jeffrey Hugo Date: Thu Nov 15 10:18:10 2018 -0700 arm64: dts: qcom: msm8998: Add SDC2 control pins The SDC2 control pins are typically used to manage sleep. Signed-off-by: Jeffrey Hugo Signed-off-by: Andy Gross commit 23bd4f785b53d96d45c0dc073ee219849b11e766 Author: Jeffrey Hugo Date: Thu Nov 15 10:18:11 2018 -0700 arm64: dts: qcom: msm8998-mtp: Add external SD The externally accessible SD card slot on the MTP is driven by SDCC2. Wire it up for use. Signed-off-by: Jeffrey Hugo Signed-off-by: Andy Gross commit 1cfce828dca847538f3ead447e52296202a2569c Author: Jeffrey Hugo Date: Thu Nov 15 10:18:09 2018 -0700 arm64: dts: qcom: msm8998: Add SDCC2 SDCC2 is typically used as the controller for an external SD card slot. Signed-off-by: Jeffrey Hugo Signed-off-by: Andy Gross commit 634da3307b083ee83eb9b377081fdfd6416a148a Author: Jeffrey Hugo Date: Thu Nov 15 10:18:08 2018 -0700 arm64: dts: qcom: msm8998: correct xo clock name The root parent clock of most msm8998 clock is the "xo" clock. The DT node is incorrectly named "xo_board", which prevents Linux from correctly parsing the clock tree, resulting in most clocks being unparented and unable to be manipulated. The end result is that we can't turn on clocks for peripherals like SD, so init usually fails. Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) Signed-off-by: Jeffrey Hugo Signed-off-by: Andy Gross commit 2aaa1b2161d34f81f2a0e2cd9a3d2d5f35a6de9e Merge: 9b08a32b29631 85bc3096b33f3 Author: Andy Gross Date: Thu Nov 29 19:28:48 2018 -0600 Merge branch 'qcs404-topic-revised' into arm64-for-4.21-3 commit 9b08a32b296315021a47bb14e2d5bdecc6f0b0a0 Merge: 6906b9fe5122f 6e17f8140521a Author: Andy Gross Date: Thu Nov 29 19:25:42 2018 -0600 Merge branch 'arm64-for-4.21' into arm64-for-4.21-3 commit 6906b9fe5122fbda0079860867ca594eac7b4438 Merge: 651022382c7f8 9134586715e38 Author: Andy Gross Date: Thu Nov 29 19:25:23 2018 -0600 Merge tag 'qcom-fixes-for-4.20-rc1' into arm64-for-4.21-3 Qualcomm ARM64 DT Fixes for 4.20-rc1 * Fix reserved gpio ranges for SDM845 and MSM8998 commit 93631211c9c07dd3e60ca8462281ff475d3b87a6 Author: Saeed Mahameed Date: Mon Nov 26 14:39:08 2018 -0800 net/mlx5: Debug print for forwarded async events Print a debug message for every async FW event forwarded to mlx5 interfaces (mlx5e netdev and mlx5_ib rdma module). Signed-off-by: Saeed Mahameed commit 4e2df04ad25ab8e627878817e56d6a27645ca4a8 Author: Saeed Mahameed Date: Mon Nov 26 14:39:07 2018 -0800 net/mlx5: Forward SRQ resource events Allow forwarding of SRQ events to mlx5_core interfaces, e.g. mlx5_ib. Use mlx5_notifier_register/unregister in srq.c in order to allow seamless transition of srq.c to infiniband subsystem. Signed-off-by: Saeed Mahameed commit 451be51c0b474f790e9833cd575fd9a6fbd679df Author: Saeed Mahameed Date: Mon Nov 26 14:39:06 2018 -0800 net/mlx5: Forward QP/WorkQueues resource events Allow forwarding QP and WQ events to mlx5_core interfaces, e.g. mlx5_ib Use mlx5_notifier_register/unregister in qp.c in order to allow seamless transition of qp.c to infiniband subsystem. Signed-off-by: Saeed Mahameed commit b8267cd765b333673e05696b517d38a1a7eb5b2e Author: Saeed Mahameed Date: Mon Nov 26 14:39:05 2018 -0800 net/mlx5: Remove all deprecated software versions of FW events Before the new mlx5 event notification infrastructure and API, mlx5_core used to process all events before forwarding them to mlx5 interfaces (mlx5e/mlx5_ib) and used to translate the event type enum to a software defined enum, this is not needed anymore since it is ok for mlx5e and mlx5_ib to receive FW events as is, at least the few ones mlx5 core allows. mlx5e and mlx5_ib already moved to use the new API and they only handle FW events types, it is now safe to remove all equivalent software defined events and the logic around them. Signed-off-by: Saeed Mahameed commit 09e574fa76d6a47e283a7eb18ec1b0cb34174532 Author: Saeed Mahameed Date: Mon Nov 26 14:39:04 2018 -0800 IB/mlx5: Handle raw delay drop general event Handle FW general event rq delay drop as it was received from FW via mlx5 notifiers API, instead of handling the processed software version of that event. After this patch we can safely remove all software processed FW events types and definitions. Signed-off-by: Saeed Mahameed commit cb6191bf25f755f47593fc40b8fd39d3eedde884 Author: Saeed Mahameed Date: Mon Nov 26 14:39:03 2018 -0800 net/mlx5: Allow forwarding event type general event as is FW general event is used by mlx5_ib for RQ delay drop timeout event handling, in this patch we allow to forward FW general event type to mlx5 notifiers chain so mlx5_ib can handle it and to deprecate the software version of it. Signed-off-by: Saeed Mahameed commit 134e9349ecf0e23c954e205a31f5b665ce25e5f6 Author: Saeed Mahameed Date: Mon Nov 26 14:39:02 2018 -0800 IB/mlx5: Handle raw port change event rather than the software version Use the FW version of the port change event as forwarded via new mlx5 notifiers API. After this patch, processed software version of the port change event will become deprecated and will be totally removed in downstream patches. Signed-off-by: Saeed Mahameed commit 02039fb659b366011f55b15890136754f3d82e2d Author: Saeed Mahameed Date: Mon Nov 26 14:39:01 2018 -0800 net/mlx5: Remove unused events callback and logic The mlx5_interface->event callback is not used by mlx5e/mlx5_ib anymore. We totally remove the delayed events logic work around, since with the dynamic notifier registration API it is not needed anymore, mlx5_ib can register its notifier and start receiving events exactly at the moment it is ready to handle them. Signed-off-by: Saeed Mahameed commit df097a278c7592873d88571a8c78f987f6ae511b Author: Saeed Mahameed Date: Mon Nov 26 14:39:00 2018 -0800 IB/mlx5: Use the new mlx5 core notifier API Remove the deprecated mlx5_interface->event mlx5_ib callback and use new mlx5 notifier API to subscribe for mlx5 events. For native mlx5_ib devices profiles pf_profile/nic_rep_profile register the notifier callback mlx5_ib_handle_event which treats the notifier context as mlx5_ib_dev. For vport repesentors, don't register any notifier, same as before, they didn't receive any mlx5 events. For slave port (mlx5_ib_multiport_info) register a different notifier callback mlx5_ib_event_slave_port, which knows that the event is coming for mlx5_ib_multiport_info and prepares the event job accordingly. Before this on the event handler work we had to ask mlx5_core if this is a slave port mlx5_core_is_mp_slave(work->dev), now it is not needed anymore. mlx5_ib_multiport_info notifier registration is done on mlx5_ib_bind_slave_port and de-registration is done on mlx5_ib_unbind_slave_port. Signed-off-by: Saeed Mahameed commit 58d180b34e98698fec178a469b700f1bb5a32c1f Author: Saeed Mahameed Date: Mon Nov 26 14:38:59 2018 -0800 net/mlx5: Forward all mlx5 events to mlx5 notifiers chain This to allow seamless migration to the new notifier chain API, and to eventually deprecate interfaces dev->event callback. Signed-off-by: Saeed Mahameed commit 7cffaddd39b438fab49863ea4602d6294a9d657f Author: Saeed Mahameed Date: Mon Nov 26 14:38:58 2018 -0800 net/mlx5e: Use the new mlx5 core notifier API Remove the deprecated mlx5_interface->event mlx5e callback and use new mlx5 notifier API to subscribe for mlx5 events, handle port change event as received from FW rather than handling the mlx5 core processed port change software version event. Signed-off-by: Saeed Mahameed commit 7a1795553074f90d59b3250b4a9b8aaf6ca2831e Author: Saeed Mahameed Date: Mon Nov 26 14:38:57 2018 -0800 net/mlx5: Allow port change event to be forwarded to driver notifiers chain The idea is to allow mlx5 core interfaces (mlx5e/mlx5_ib) to be able to receive some allowed FW events as is via the new notifier API. In this patch we allow forwarding port change event to mlx5 core interfaces (mlx5e/mlx5_ib) as it was received from FW. Once mlx5e and mlx5_ib start using this event we can safely remove the redundant software version of it and its translation logic. Signed-off-by: Saeed Mahameed commit 20902be46c4da59b1891d238801146134e0e06b5 Author: Saeed Mahameed Date: Mon Nov 26 14:38:56 2018 -0800 net/mlx5: Driver events notifier API Use atomic notifier chain to fire events to mlx5 core driver consumers (mlx5e/mlx5_ib) and provide mlx5 register/unregister notifier API. This API will replace the current mlx5_interface->event callback and all the logic around it, especially the delayed events logic introduced by commit 97834eba7c19 ("net/mlx5: Delay events till ib registration ends") Which is not needed anymore with this new API where the mlx5 interface can dynamically register/unregister its notifier. Signed-off-by: Saeed Mahameed commit 34f4c9554d8b2a7d2deb9503e9373b598ee3279f Author: Guy Levi Date: Mon Nov 26 08:15:50 2018 +0200 IB/mlx5: Use fragmented QP's buffer for in-kernel users The current implementation of create QP requires contiguous memory, such a requirement is problematic once the memory is fragmented or the system is low in memory, it causes failures in dma_zalloc_coherent(). This patch takes advantage of the new mlx5_core API which allocates a fragmented buffer. This makes the QP creation much more resilient to memory fragmentation. Data-path code was adapted to the fact that WQEs can cross buffers. We also use the opportunity to fix some cosmetic legacy coding convention errors which were in the feature scope. Signed-off-by: Guy Levi Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 20e5a59b2e64a01f8e0957727887564a4d004970 Author: Guy Levi Date: Mon Nov 26 08:15:39 2018 +0200 IB/mlx5: Use fragmented SRQ's buffer for in-kernel users The current implementation of create SRQ requires contiguous memory, such a requirement is problematic once the memory is fragmented or the system is low in memory, it causes failures in dma_zalloc_coherent(). This patch takes the advantage of the new mlx5_core API which allocates a fragmented buffer, and makes the SRQ creation much more resilient to memory fragmentation. Data-path code was adapted to the fact that WQEs can cross buffers. Signed-off-by: Guy Levi Reviewed-by: Majd Dibbiny Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b024dd0eba6e6d568f69d63c5e3153aba94c23e3 Author: Chuck Lever Date: Sun Nov 25 17:13:08 2018 -0500 rxe: IB_WR_REG_MR does not capture MR's iova field FRWR memory registration is done with a series of calls and WRs. 1. ULP invokes ib_dma_map_sg() 2. ULP invokes ib_map_mr_sg() 3. ULP posts an IB_WR_REG_MR on the Send queue Step 2 generates an iova. It is permissible for ULPs to change this iova (with certain restrictions) between steps 2 and 3. rxe_map_mr_sg captures the MR's iova but later when rxe processes the REG_MR WR, it ignores the MR's iova field. If a ULP alters the MR's iova after step 2 but before step 3, rxe never captures that change. When the remote sends an RDMA Read targeting that MR, rxe looks up the R_key, but the altered iova does not match the iova stored in the MR, causing the RDMA Read request to fail. Reported-by: Anna Schumaker Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 3d58c9c9f735c8c9960e8bf8dd796dbfe2585a6a Author: David S. Miller Date: Thu Nov 29 16:01:34 2018 -0800 net: Don't default Aquantia USB driver to 'y' Reported-by: Pavel Machek Signed-off-by: David S. Miller commit 22cb7405fada5305926d9bbcb476c1cd638d2dab Author: NeilBrown Date: Fri Nov 30 10:33:18 2018 +1100 VFS: use synchronize_rcu_expedited() in namespace_unlock() The synchronize_rcu() in namespace_unlock() is called every time a filesystem is unmounted. If a great many filesystems are mounted, this can cause a noticable slow-down in, for example, system shutdown. The sequence: mkdir -p /tmp/Mtest/{0..5000} time for i in /tmp/Mtest/*; do mount -t tmpfs tmpfs $i ; done time umount /tmp/Mtest/* on a 4-cpu VM can report 8 seconds to mount the tmpfs filesystems, and 100 seconds to unmount them. Boot the same VM with 1 CPU and it takes 18 seconds to mount the tmpfs filesystems, but only 36 to unmount. If we change the synchronize_rcu() to synchronize_rcu_expedited() the umount time on a 4-cpu VM drop to 0.6 seconds I think this 200-fold speed up is worth the slightly high system impact of using synchronize_rcu_expedited(). Acked-by: Paul E. McKenney (from general rcu perspective) Signed-off-by: NeilBrown Signed-off-by: Al Viro commit bfc5d839184f53cc16d551873f9254f2d4d493be Author: Mark Bloch Date: Tue Nov 20 20:31:08 2018 +0200 RDMA/mlx5: Attach a DEVX counter via raw flow creation Allow a user to attach a DEVX counter via mlx5 raw flow creation. In order to attach a counter we introduce a new attribute: MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX A counter can be attached to multiple flow steering rules. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b601f73130a375c912d9f2ec93c5f3cea5d6a3da Author: Stephen Boyd Date: Thu Nov 29 08:38:26 2018 -0800 drm: msm: Check cmd_db_read_aux_data() for failure We need to check the call to cmd_db_read_aux_data() for the error case, so that we don't continue and use potentially uninitialized values for 'pri_count' and 'sec_count'. Otherwise, we get the following compiler warnings: drivers/gpu/drm/msm/adreno/a6xx_gmu.c: In function 'a6xx_gmu_rpmh_arc_votes_init.isra.12': drivers/gpu/drm/msm/adreno/a6xx_gmu.c:943:12: warning: 'pri_count' is used uninitialized in this function [-Wuninitialized] pri_count >>= 1; ^~~ drivers/gpu/drm/msm/adreno/a6xx_gmu.c:948:12: warning: 'sec_count' may be used uninitialized in this function [-Wmaybe-uninitialized] sec_count >>= 1; ^~~ Reported-by: Stephen Rothwell Reported-by: kbuild test robot Cc: Jordan Crouse Cc: Bjorn Andersson Cc: Evan Green Cc: Jordan Crouse Cc: Rob Clark Fixes: ed3cafa79ea7 ("soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data()") Signed-off-by: Stephen Boyd Reviewed-by: Andy Gross Acked-by: Rob Clark Signed-off-by: Andy Gross commit 67810e8c3c01ed80b5118391a8939ff24f08acd3 Author: Leon Romanovsky Date: Thu Nov 29 14:15:28 2018 +0200 RDMA/qib: Remove all occurrences of BUG_ON() QIB driver was added in 2010 with many BUG_ON(), most of them were cleaned out after years of development and usages. It looks like that it is safe now to remove rest of BUG_ONs. Signed-off-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d12c416dd131df990036b9b9136d98e5682bb1a7 Author: Colin Ian King Date: Thu Nov 29 10:42:13 2018 +0000 IB/usnic: fix spelling mistake "miniumum" -> "minimum" There is a spelling mistake in a usnic_err error message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit 90849f4d059ca8764f9c4273996d4fab3c1603b3 Author: kbuild test robot Date: Wed Nov 28 07:21:30 2018 +0800 RDMA/uverbs: fix ptr_ret.cocci warnings drivers/infiniband/core/uverbs_cmd.c:1095:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 7106a9769715 ("RDMA/uverbs: Make write() handlers return 0 on success") Signed-off-by: kbuild test robot Signed-off-by: Jason Gunthorpe commit 901018f29e65c2c442b09b9913473dd8cf8d3cee Author: Colin Ian King Date: Wed Nov 28 15:11:16 2018 +0000 RDMA/drivers: Fix spelling mistake "initalize" -> "initialize" Fix spelling mistake in usnic_err error message Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit 167bfe534dc2de680ef706dbb903c9a7bfcb2dd8 Author: Sean Paul Date: Thu Nov 29 10:55:17 2018 -0500 Documentation: drm: Remove dangling pointer from drm-mm.rst Fixes htmldocs build error: Error: Cannot open file ../drivers/gpu/drm/drm_global.c Fixes: 2bb42410b1bd ("drm: Remove drm_global.{c,h} v2") Cc: Thomas Zimmermann Cc: Christian König Cc: Junwei Zhang Cc: Alex Deucher Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sean Paul Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20181129155522.33749-1-sean@poorly.run commit 1d956785da5585635eb7e266239729da6bc73e69 Author: Thomas Gleixner Date: Mon Nov 12 11:11:18 2018 -0800 selftests/ftrace: Fix invalid SPDX identifiers While GPL2.0 looks about right, the correct and valid identifiers for GPL v2 only code are 'GPL-2.0' or 'GPL-2.0-only'. Signed-off-by: Thomas Gleixner Cc: Masami Hiramatsu Cc: Shuah Khan (Samsung OSG) Signed-off-by: Shuah Khan commit 1ef06003a50caae05f866f44e6abf93fae7dfa5b Author: Stephen Boyd Date: Wed Nov 28 10:37:02 2018 -0800 clk: renesas: Mark rza2_cpg_clk_register static This is only used in this file, so mark it static to silence a sparse warning. Cc: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd commit 1464193107da8041e05341388964733bbba3be27 Author: Cong Wang Date: Mon Nov 26 09:31:26 2018 -0800 net: explain __skb_checksum_complete() with comments Cc: Herbert Xu Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit cccf6ae52d35f77fc8e8792d29b877024fdbe392 Author: Anson Huang Date: Mon Nov 26 02:59:48 2018 +0000 cpufreq: imx6q: save one condition block for normal case of nvmem read Put return value checks of calling imx6ul_opp_check_speed_grading() into one block to save one condition block for normal case. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 58ad4e619747f6b2711396ad068af84185afb74d Author: Anson Huang Date: Mon Nov 26 02:59:45 2018 +0000 cpufreq: imx6q: remove unused code In voltage scale down path, the return value is NOT used at all, remove them to simplify the code. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 0dc0eb78155bcc997932b7f19151ae3dd2748096 Author: Yangtao Li Date: Fri Nov 23 08:33:40 2018 -0500 cpufreq: pmac64: add of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. g5_neo2_cpufreq_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 3be466d681a92300908c51888f75cf298e040558 Author: Yangtao Li Date: Tue Nov 20 11:05:30 2018 -0500 cpufreq: powernv: add of_node_put() The of_find_node_by_path() returns a node pointer with refcount incremented,but there is the lack of use of the of_node_put() when done.Add the missing of_node_put() to release the refcount. Signed-off-by: Yangtao Li Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 60935c17e26ac2cfc4095bed02a6b4135c3e6d4a Author: Srinivas Pandruvada Date: Fri Nov 16 14:24:20 2018 -0800 Documentation: intel_pstate: Clarify coordination of P-State limits Explain influence of per-core P-states and hyper threading on the effective performance. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit af3b7379e2d709f2d7c6966b8a6f5ec6bd134241 Author: Srinivas Pandruvada Date: Fri Nov 16 14:24:19 2018 -0800 cpufreq: intel_pstate: Force HWP min perf before offline Force HWP Request MAX = HWP Request MIN = HWP Capability MIN and EPP to 0xFF. In this way the performance limits on the offlined CPU will not influence performance limits on its sibling CPU, which is still online. If the sibling CPU is calling for higher performance, it will impact the max core performance. Here core performance will follow higher of the performance requests from each sibling. Reported-and-tested-by: Chen Yu Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 6e218d21acef34b2db633c16cc6a7ebf5ba8c74d Author: Yangtao Li Date: Wed Nov 7 11:13:46 2018 -0500 cpufreq: s3c24xx: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 96c6935212d632cb78db9149c61005b839e03b75 Author: Yangtao Li Date: Tue Nov 6 09:38:06 2018 -0500 PM / QoS: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki commit 3e407c16f571b723c6d446e707d9e60cf53cd415 Merge: ae6b3e54aa52c 087286585d8b6 Author: Rafael J. Wysocki Date: Thu Nov 29 22:05:52 2018 +0100 Merge back earlier ACPICA changes for 4.21. commit 27fae429acee1e9418059e7fa545438075af5256 Author: Jens Axboe Date: Thu Nov 29 12:35:16 2018 -0700 sbitmap: don't loop for find_next_zero_bit() for !round_robin If we aren't forced to do round robin tag allocation, just use the allocation hint to find the index for the tag word, don't use it for the offset inside the word. This avoids a potential extra round trip in the bit looping, and since we're fetching this cacheline, we may as well check the whole word from the start. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit d6a09cee2458adeed5c07882c7e0b91f089515b8 Author: Anusha Srivatsa Date: Wed Nov 28 12:26:28 2018 -0800 drm/i915/fec: Disable FEC state. Set the suitable bits in DP_TP_CTL to stop bit correction when DSC is disabled. v2: - rebased. - Add additional check for compression state. (Gaurav) v3: rebased. v4: - Move the code to the proper spot according to spec (Ville) - Use proper checks (manasi) v5: Remove unnecessary checks (Ville) v6: Resolve warnings. Add crtc_state as an argument to intel_disable_ddi_buf(). (Manasi) Cc: dri-devel@lists.freedesktop.org Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-17-manasi.d.navare@intel.com commit 5c44b938629a81641e283f0b84e1d8cf48cbdc41 Author: Anusha Srivatsa Date: Wed Nov 28 12:26:27 2018 -0800 i915/dp/fec: Configure the Forward Error Correction bits. If FEC is supported, the corresponding DP_TP_CTL register bits have to be configured. The driver has to program the FEC_ENABLE in DP_TP_CTL[30] register and wait till FEC_STATUS in DP_TP_CTL[28] is 1. Also add the warn message to make sure that the control register is already active while enabling FEC. v2: - Change commit message. Configure fec state after link training (Manasi, Gaurav) - Remove redundent checks (Manasi) - Remove the registers that get added automagically (Anusha) v3: s/intel_dp_set_fec_state()/intel_dp_enable_fec_state() (Gaurav) v4: rebased. v5: - Move the code to the proper spot, according to spec.(Ville) - Use fec state as a check too. v6: Pass intel_encoder, instead of intel_dp. (Ville) v7: Remove unwanted comments (Manasi) Cc: dri-devel@lists.freedesktop.org Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-16-manasi.d.navare@intel.com commit a322b97589a6af4b87978d200645aac562fc746f Author: Anusha Srivatsa Date: Wed Nov 28 12:26:26 2018 -0800 drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION If the panel supports FEC, the driver has to set the FEC_READY bit in the dpcd register: FEC_CONFIGURATION. This has to happen before link training. v2: s/intel_dp_set_fec_ready/intel_dp_sink_set_fec_ready - change commit message. (Gaurav) v3: rebased. (r-b Manasi) v4: Use fec crtc state, before setting FEC_READY bit. (Anusha) v5: Move to intel_ddi.c - Make the function static (Anusha) v6: Dont pass state as a separate argument (Ville) v7: (From Manasi) * Correct the debug print (Ville) Cc: dri-devel@lists.freedesktop.org Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-15-manasi.d.navare@intel.com commit 240999cf339f146d186dfb1a82ac6ba77ef34a1a Author: Anusha Srivatsa Date: Wed Nov 28 12:26:25 2018 -0800 i915/dp/fec: Add fec_enable to the crtc state. For DP 1.4 and above, Display Stream compression can be enabled only if Forward Error Correctin can be performed. Add a crtc state for FEC. Currently, the state is determined by platform, DP and DSC being enabled. Moving forward we can use the state to have error correction on other scenarios too if needed. v2: - Control compression_enable with the fec_enable parameter in crtc state and with intel_dp_supports_fec() (Ville) - intel_dp_can_fec()/intel_dp_supports_fec()(manasi) v3: Check for FEC support along with setting crtc state. v4: add checks to intel_dp_source_supports_dsc.(manasi) - Move intel_dp_supports_fec() closer to intel_dp_supports_dsc() (Anusha) v5: Move fec check to intel_dp_supports_dsc(Ville) v6: Remove warning. rebase. v7: change crtc state to include DP sink and fec capability of source.(Manasi) v8: Set fec_enable in crtc in intel_dp_compute_config(). v9 (From Manasi): * Combine the !edp and !fec_support check * Derive dev_priv from intel_dp directly v10 (From Manasi): * Rebase Suggested-by: Ville Syrjala Cc: dri-devel@lists.freedesktop.org Cc: Ville Syrjala Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-14-manasi.d.navare@intel.com commit a24c62f94be1a478ceb1086df726615a73a9e113 Author: Manasi Navare Date: Wed Nov 28 12:26:24 2018 -0800 drm/i915/dsc: Enable and disable appropriate power wells for VDSC A separate power well 2 (PG2) is required for VDSC on eDP transcoder whereas all other transcoders use the power wells associated with the transcoders for VDSC. This patch adds a helper to obtain correct power domain depending on transcoder being used and enables/disables the power wells during VDSC enabling/disabling. v4: * Get VDSC power domain only if compression en is set in crtc_state (Ville, Imre) v3: * Call it intel_dsc_power_domain, add to intel_ddi_get_power_domains (Ville) v2: * Fix tabs, const crtc_state, fix comments (Ville) Suggested-by: Ville Syrjala Cc: Ville Syrjala Cc: Imre Deak Cc: Rodrigo Vivi Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-13-manasi.d.navare@intel.com commit a600622c09ddf7da660ca714d5644ecf270426fc Author: Manasi Navare Date: Wed Nov 28 12:26:23 2018 -0800 drm/i915/dp: Disable DSC in source by disabling DSS CTL bits 1. Disable Left/right VDSC branch in DSS Ctrl reg depending on the number of VDSC engines being used 2. Disable joiner in DSS Ctrl reg v4: * Remove encoder, make crtc_state const (Ville) v3 (From Manasi): * Add Disable PG2 for VDSC on eDP v2 (From Manasi): * Use old_crtc_state to find dsc params * Add a condition to disable only if dsc state compression is enabled * Use correct DSS CTL regs Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Signed-off-by: Gaurav K Singh Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-12-manasi.d.navare@intel.com commit a311b0b5d2094029dce2369d686044131e19e006 Author: Manasi Navare Date: Wed Nov 28 12:26:22 2018 -0800 drm/i915/dp: Configure Display stream splitter registers during DSC enable Display Stream Splitter registers need to be programmed to enable the joiner if two DSC engines are used and also to enable the left and the right DSC engines. This happens as part of the DSC enabling routine in the source in atomic commit. v4: * Remove redundant comment (Ville) v3: * Use cpu_transcoder instead of encoder->type (Ville) v2: * Rebase (Manasi) Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-11-manasi.d.navare@intel.com commit 5b1ea77228f913df20a445512bd57ea481905d4e Author: Manasi Navare Date: Wed Nov 28 12:26:21 2018 -0800 drm/i915/dp: Populate DSC PPS SDP and send PPS infoframes DSC PPS secondary data packet infoframes are filled with DSC picure parameter set metadata according to the DSC standard. These infoframes are sent to the sink device and used during DSC decoding. v3: * Rename to intel_dp_write_pps_sdp (Ville) * Use const intel_crtc_state (Ville) v2: * Rebase ond drm-tip Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-10-manasi.d.navare@intel.com commit 5e339a1d7e438b2cc9f46ec9f2682efb58ee2dd3 Author: Neil Armstrong Date: Sun Nov 18 14:50:24 2018 +0100 arm64: dts: meson-gx: Add Internal Clock Measurer node The Amlogic Meson GX SoCs embeds a clock measurer IP to measure the internal clock paths frequencies. This patch adds the node in the top-level meson-gx dtsi. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 146e99be22ee5ac50c89cfd68ef6617d097fb196 Author: Viresh Kumar Date: Fri Nov 16 15:34:24 2018 +0530 arm64: dts: amlogic: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 0449b8e371acb8609bd6363c91dda464a262f778 Author: Neil Armstrong Date: Fri Nov 16 16:15:39 2018 +0100 arm64: dts: meson: add libretech aml-s805x-ac board Add Libretech aml-s805x-ac board (aka 'La Frite') support Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Reviewed-by: Peter Korsgaard Signed-off-by: Kevin Hilman commit bc3285052afb7f8405b56831b028e14545d08891 Author: Jerome Brunet Date: Fri Nov 16 16:15:38 2018 +0100 dt-bindings: arm: amlogic: add libretech aml-s805x-ac bindings Add bindings for the Libretech aml-s805x-ac board, aka 'La Frite'. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit bf0fbc8f0f06b9aaef81a42c3223b8998fb33eab Author: He Yangxuan Date: Sat Nov 10 11:39:04 2018 +0800 dt-bindings: arm: amlogic: Add Phicomm N1 Add bindings documentation for the Phicomm N1. Signed-off-by: He Yangxuan Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit 2078231510714578d044b39109f0ab622bf49582 Author: He Yangxuan Date: Sat Nov 10 11:39:03 2018 +0800 dt-bindings: Add vendor prefix for PHICOMM Co., Ltd. PHICOMM Co., Ltd. is a hardware provider headquartered in Shanghai, it's product includes router and smart devices. Signed-off-by: He Yangxuan Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit ba1c84ee74d3fa6c99b2471bfac922bf63746591 Author: He Yangxuan Date: Sat Nov 10 11:39:02 2018 +0800 arm64: dts: meson-gxl: add support for phicomm n1 This patch adds support for the Phicomm N1. This device based on P230 reference design. And this box doesn't have cvbs, so disable related section in device tree. Signed-off-by: He Yangxuan Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 1c5cc1c805d8a2a348c7434dfde955e8c1483db1 Author: Jerome Brunet Date: Fri Nov 9 15:04:44 2018 +0100 arm64: dts: meson: consistently disable pin bias On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies. As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems. The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined. There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option. This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 96a13691c1ddfafc301d1ee451d91fc2cca48d27 Author: Jerome Brunet Date: Fri Nov 9 15:04:43 2018 +0100 arm64: dts: meson: disable pad bias for mmc pinmuxes In some cases (such as a boot from SPI) the bootloader or the ROM code may leave a bias pull-down on the mmc pins. If so the MMC will fail during the initialisation. Explicitly disabling the pinmux solves the problem. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 06096d7a8734b0ee3d5353f37a7d2c34fb1a6a26 Author: Jerome Brunet Date: Fri Nov 9 15:04:42 2018 +0100 arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux In the pinmux of the mmc clk_gate nodes, we define 2 subnodes. One for the function definition, the other for the bias. This is not necessary since we can define the function and the bias in the same subnode. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit ac444768bd998d5a412714b32801d7448fd7f37d Author: Jerome Brunet Date: Fri Nov 9 14:23:31 2018 +0100 arm64: dts: meson: s400: add bcm bluetooth device Add broadcom bluetooth device on the s400 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 920b4d3969ccd51c33b540a1315203c9d90e785b Author: He Yangxuan Date: Fri Nov 9 20:59:36 2018 +0800 arm64: dts: meson: p230: disable advertisement EEE for GbE. This patch disable EEE advertisement for P230 board (DWMAC + RTL8211F). If not disable it, the network connection is not stable, will got issues like throughput drop or broken link. Signed-off-by: He Yangxuan Signed-off-by: Kevin Hilman commit 2c130695ad5265ce2eb38f55ee0cce26238f7891 Author: Jerome Brunet Date: Thu Nov 8 14:53:52 2018 +0100 arm64: dts: meson-axg: enable SCPI Enable SCPI on the axg platform, with cpu clock and hwmon (core temperature) support Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit ef29fcc381814f56b7a6dfef5cb498edee176003 Author: Jerome Brunet Date: Thu Nov 8 14:53:51 2018 +0100 Documentation: bindings: Add missing Amlogic SCPI sensor bindings amlogic,meson-gxbb-scpi-sensors is both the driver and DT but is not documented. Just add it to amlogic's scpi documentation Signed-off-by: Jerome Brunet Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit 9c2d16bbfda645cbcf7191f8822f23f93149ffbe Author: Jerome Brunet Date: Thu Nov 8 14:53:50 2018 +0100 arm64: dts: meson-axg: correct sram shared mem unit-address Correct the unit-address in the node name of the SRAM shared memory Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 9fdff382e3d672231526a7a2d8b575925416aa8d Author: Jerome Brunet Date: Thu Nov 8 14:53:49 2018 +0100 arm64: dts: meson-axg: fix mailbox address MHU mailbox address is wrong. Fixing it enables the mailboxes on the A113. These mailboxes are needed for SCPI Fixes: 9d59b708500f ("arm64: dts: meson-axg: add initial A113D SoC DT support") Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit e1f2163deac059ad39f07aba9e314ebe605d5a7a Author: Neil Armstrong Date: Thu Nov 8 14:24:38 2018 +0100 arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply The hdmi_5v regulator must be enabled to provide power to the physical HDMI PHY and enables the HDMI 5V presence loopback for the monitor. Fixes: b409f625a6d5 ("ARM64: dts: meson-gx: Add HDMI_5V regulator on selected boards") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 96dc5702acbb203026f1629993037267f432a318 Author: Jerome Brunet Date: Thu Nov 8 14:07:44 2018 +0100 arm64: dts: meson-axg: add secure monitor Add the secure monitor device to the axg platform. With this, we can read the SoC serial number. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 4c614831d59bb3dfb3b5516c8dafee0363e4bdf0 Author: Manasi Navare Date: Wed Nov 28 12:26:20 2018 -0800 drm/i915/dp: Use the existing write_infoframe() for DSC PPS SDPs Infoframes are used to send secondary data packets. This patch adds support for DSC Picture parameter set secondary data packets in the existing write_infoframe helpers. v3: * Unused variables cleanup (Ville) v2: * Rebase on drm-tip (Manasi) Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-9-manasi.d.navare@intel.com commit a708c68563048eb2dce44e4b18347ca342673ee9 Author: Jerome Brunet Date: Thu Nov 8 10:56:40 2018 +0100 arm64: dts: meson-axg: s400: add cts-rts to the bluetooth uart The uart used with bluetooth chipset on the s400 has flow control available. Let's enable it. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 5b78012636f537344bd551934387f5772c38ba80 Author: Neil Armstrong Date: Wed Nov 7 11:45:50 2018 +0100 arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names The gpio line names were set in the pinctrl node instead of the gpio node, at the time it was merged, it worked, but was obviously wrong. This patch moves the properties to the gpio nodes. Fixes: 60795933b709 ("ARM64: dts: meson-gxl-khadas-vim: Add GPIO lines names") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 2165b006b65d609140dafafcb14cce5a4aaacbab Author: Neil Armstrong Date: Wed Nov 7 11:45:49 2018 +0100 arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names The gpio line names were set in the pinctrl node instead of the gpio node, at the time it was merged, it worked, but was obviously wrong. This patch moves the properties to the gpio nodes. Fixes: b03c7d6438bb ("ARM64: dts: meson-gxbb-odroidc2: Add GPIO lines names") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit f0783f5edb52af14ecaae6c5ce4f38e0a358f5d8 Author: Neil Armstrong Date: Wed Nov 7 11:45:48 2018 +0100 arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names The gpio line names were set in the pinctrl node instead of the gpio node, at the time it was merged, it worked, but was obviously wrong. This patch moves the properties to the gpio nodes. Fixes: 12ada0513d7a ("ARM64: dts: meson-gxbb-nanopi-k2: Add GPIO lines names") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 11fa9774612decea87144d7f950a9c53a4fe3050 Author: Neil Armstrong Date: Wed Nov 7 11:45:47 2018 +0100 arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names The gpio line names were set in the pinctrl node instead of the gpio node, at the time it was merged, it worked, but was obviously wrong. This patch moves the properties to the gpio nodes. Fixes: 47884c5c746e ("ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit fbd5cbc5c9fb16ba051d8e6b446d1a3bfeea0baf Author: Jerome Brunet Date: Thu Nov 8 10:51:56 2018 +0100 arm64: dts: meson-axg: fix dtc warning about unit address section 2.2.1 of the DT specs says: " If the node has no reg property, the @unit-address must be omitted and the node-name alone differentiates the node from other nodes at the same level in the tree" Simply replace the '@' with a '-' to fix this warning. Cc: Fabio Estevam Cc: Martin Blumenstingl Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit dd5297cc8b8b8422b0876b2e7fea8cc2eec4aa2d Author: Christian Hewitt Date: Sat Oct 13 16:07:06 2018 +0400 arm64: dts: meson-gxl-s905x-khadas-vim enable Bluetooth This enables Bluetooth support for the following models: - Khadas VIM basic (AP6212) using firmware BCM43438A1.hcd - Khadas VIM pro (AP6255) using firmware BCM4345C0.hcd The AP6212 module used on the VIM basic has an ID clash with another device. To get Bluetooth working you either need to apply a kernel patch to drivers/bluetooth/btbcm.c so 0x2209 loads BCM43438A1 or the BCM43438A1.hcd firmware must be renamed to BCM43430A1.hcd. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 7182414e25304d0f8c7071756b6e986227c70872 Author: Manasi Navare Date: Wed Nov 28 12:26:19 2018 -0800 drm/i915/dp: Configure i915 Picture parameter Set registers during DSC enabling After encoder->pre_enable() hook, after link training sequence is completed, PPS registers for DSC encoder are configured using the DSC state parameters in intel_crtc_state as part of DSC enabling routine in the source. DSC enabling routine is called after encoder->pre_enable() before enbaling the pipe and after compression is enabled on the sink. v7: * Remove unnecessary comments, leftovers (Ville) * No need for explicit val &= ~ (Ville) v6: intel_dsc_enable to be part of pre_enable hook (Ville) v5: * make crtc_state const (Ville) v4: * Use cpu_transcoder instead of encoder->type for using EDP transcoder DSC registers(Ville) * Keep all PSS regs together (Anusha) v3: * Configure Pic_width/2 for each VDSC engine when two VDSC engines per pipe are used (Manasi) * Add DSC slice_row_per_frame in PPS16 (Manasi) v2: * Enable PG2 power well for VDSC on eDP Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare [manasi: fixup the line longer than 100 chars while applying] Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-8-manasi.d.navare@intel.com commit 91ba2c8be4b7eef3c9c424ddd862cdb302f252f3 Author: Manasi Navare Date: Wed Nov 28 12:26:18 2018 -0800 drm/i915/dsc: Add a power domain for VDSC on eDP/MIPI DSI On Icelake, a separate power well PG2 is created for VDSC engine used for eDP/MIPI DSI. This patch adds a new display power domain for Power well 2. v3: * Call it POWER_DOMAIN_TRANSCODER_EDP_VDSC (Ville) * Move it around TRANSCODER power domain defs (Ville) v2: * Fix the power well mismatch CI error (Ville) * Rename as VDSC_PIPE_A (Imre) * Fix a whitespace (Anusha) * Fix Comments (Imre) Cc: Ville Syrjala Cc: Rodrigo Vivi Cc: Imre Deak Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjala Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-7-manasi.d.navare@intel.com commit 2279298dbf367c2f581cc61840a2e1700e9ceca0 Author: Gaurav K Singh Date: Wed Nov 28 12:26:17 2018 -0800 drm/i915/dp: Enable/Disable DSC in DP Sink This patch enables decompression support in sink device before link training and disables the same during the DDI disabling. v3 (From manasi): * Pass bool state to enable/disable (Ville) v2:(From Manasi) * Change the enable/disable function to take crtc_state instead of intel_dp as an argument (Manasi) * Use the compression_enable flag as part of crtc_state (Manasi) Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Gaurav K Singh Signed-off-by: Gaurav K Singh Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-6-manasi.d.navare@intel.com commit 27998631458a377bd1845f39b65492605299ad08 Author: Gaurav K Singh Date: Wed Nov 28 12:26:16 2018 -0800 drm/i915/dsc: Compute Rate Control parameters for DSC This computation of RC params happens in the atomic commit phase during compute_config() to validate if display stream compression can be enabled for the requested mode. v7 (From Manasi): * Use DRM_DEBUG instead of DRM_ERROR (Ville) * Use Error numberinstead of -1 (Ville) v6 (From Manasi): * Use 9 instead of 0x9 for consistency (Anusha) v5 (From Manasi): * Fix dim checkpatch warnings/checks v4(From Gaurav): * No change.Rebase on drm-tip v3 (From Gaurav): * Rebase on top of Manasi's latest series * Return -ve value in case of failure scenarios (Manasi) Fix review comments from Ville: * Remove unnecessary comments * Remove unnecessary paranthesis * Add comments for few RC params calculations v2 (From Manasi): * Rebase Gaurav's patch from intel-gfx to gfx-internal * Use struct drm_dsc_cfg instead of struct intel_dp as a parameter Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Signed-off-by: Gaurav K Singh Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-5-manasi.d.navare@intel.com commit 168243c1801065f7e3a6afb6d5bd49ae5bdf1871 Author: Gaurav K Singh Date: Thu Nov 29 11:38:27 2018 -0800 drm/i915/dsc: Define & Compute VESA DSC params This patches does the following: 1. This patch defines all the DSC parameters as per the VESA DSC specification. These are stored in the encoder and used to compute the PPS parameters to be sent to the Sink. 2. Compute all the DSC parameters which are derived from DSC state of intel_crtc_state. 3. Compute all parameters that are VESA DSC specific This computation happens in the atomic check phase during compute_config() to validate if display stream compression can be enabled for the requested mode. v8 (From Manasi): * DEBUG_KMS instead of DRM_ERROR for user triggerable errors (Ville) v7: (From Manasi) * Dont use signed int for rc_range_params (Manasi) * Mask the range_bpg_offset to use only 6 bits * Add SPDX identifier (Chris Wilson) v6 (From Manasi): * Add a check for line_buf_depth return value (Anusha) * Remove DRM DSC constants to different patch (Manasi) v5 (From Manasi): * Add logic to limit the max line buf depth for DSC 1.1 to 13 as per DSC 1.1 spec * Fix dim checkpatch warnings/checks v4 (From Gaurav): * Rebase on latest drm tip * rename variable name(Manasi) * Populate linebuf_depth variable(Manasi) v3 (From Gaurav): * Rebase my previous patches on top of Manasi's latest patch series * Using >>n rather than /2^n (Manasi) * Change the commit message to explain what the patch is doing(Gaurav) Fixed review comments from Ville: * Don't use macro TWOS_COMPLEMENT * Mention in comment about the source of RC params * Return directly from case statements * Using single asssignment for assigning rc_range_params * Using < Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Gaurav K Singh Signed-off-by: Gaurav K Singh Signed-off-by: Manasi Navare Co-developed-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181129193827.7914-1-manasi.d.navare@intel.com commit 8228c42fc0ee54dd2c798035baa35739e54bfe91 Author: Manasi Navare Date: Wed Nov 28 12:26:14 2018 -0800 drm/i915/dp: Do not enable PSR2 if DSC is enabled If a eDP panel supports both PSR2 and VDSC, our HW cannot support both at a time. Give priority to PSR2 if a requested resolution can be supported without compression else enable VDSC and keep PSR2 disabled. v4: Fix the unrealted stuff removed during rebase (Ville) v3: * Rebase v2: * Add warning for DSC and PSR2 enabled together (DK) Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-3-manasi.d.navare@intel.com commit a4a157777c807d5c0ead1b747dd9b07a07864498 Author: Manasi Navare Date: Wed Nov 28 13:36:21 2018 -0800 drm/i915/dp: Compute DSC pipe config in atomic check DSC params like the enable, compressed bpp, slice count and dsc_split are added to the intel_crtc_state. These parameters are set based on the requested mode and available link parameters during the pipe configuration in atomic check phase. These values are then later used to populate the remaining DSC and RC parameters before enbaling DSC in atomic commit. v15: * Rebase over drm-tip v14: Remove leftovers, use dsc_bpc, refine dsc_compute_config (Ville) v13: * Compute DSC bpc only when DSC is req to be enabled (Ville) v12: * Override bpp with dsc dpcd color depth (Manasi) v11: * Const crtc_state, reject DSC on DP without FEC (Ville) * Dont set dsc_split to false (Ville) v10: * Add a helper for dp_dsc support (Ville) * Set pipe_config to max bpp, link params for DSC for now (Ville) * Compute bpp - use dp dsc support helper (Ville) v9: * Rebase on top of drm-tip that now uses fast_narrow config for edp (Manasi) v8: * Check for DSC bpc not 0 (manasi) v7: * Fix indentation in compute_m_n (Manasi) v6 (From Gaurav): * Remove function call of intel_dp_compute_dsc_params() and invoke intel_dp_compute_dsc_params() in the patch where it is defined to fix compilation warning (Gaurav) v5: Add drm_dsc_cfg in intel_crtc_state (Manasi) v4: * Rebase on refactoring of intel_dp_compute_config on tip (Manasi) * Add a comment why we need to check PSR while enabling DSC (Gaurav) v3: * Check PPR > max_cdclock to use 2 VDSC instances (Ville) v2: * Add if-else for eDP/DP (Gaurav) Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Gaurav K Singh Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Reviewed-by: Ville Syrjala Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181128213621.21391-1-manasi.d.navare@intel.com commit 7b610f1fbed2ab3b82a6064a2b5dedf061f31fa6 Author: Manasi Navare Date: Wed Nov 28 12:26:12 2018 -0800 drm/i915/dp: Add DSC params and DSC config to intel_crtc_state Basic DSC parameters and DSC configuration data needs to be computed for each of the requested mode during atomic check. This is required since for certain modes, valid DSC parameters and config data might not be computed in which case compression cannot be enabled for that mode. For that reason we need to add these params and config structure to the intel_crtc_state so that if valid this state information can directly be used while enabling DSC in atomic commit. v2: * Rebase on drm-tip (Manasi) Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-1-manasi.d.navare@intel.com commit 028baad5221e5f96361c8c4df29020badc92e123 Author: Aaro Koskinen Date: Mon Nov 19 21:49:43 2018 +0200 ARM: OMAP1: devices: configure omap1_spi100k only on OMAP7xx Configure omap1_spi100k only on OMAP7xx. This allows running multiboard kernels on non-OMAP7xx HW with CONFIG_SPI_OMAP_100K enabled. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 04a92358b3964988c78dfe370a559ae550383886 Author: Aaro Koskinen Date: Mon Nov 19 21:46:41 2018 +0200 ARM: OMAP1/2: fix SoC name printing Currently we get extra newlines on OMAP1/2 when the SoC name is printed: [ 0.000000] OMAP1510 [ 0.000000] revision 2 handled as 15xx id: bc058c9b93111a16 [ 0.000000] OMAP2420 [ 0.000000] Fix by using pr_cont. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 3af89f2d3dceabce12cc656de39fe126c0061e76 Author: Janusz Krzysztofik Date: Wed Nov 7 21:17:46 2018 +0100 ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file That symbol is not used outside the board file, there is no need to keep it in the board header. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 0d5492cd141caaa17f8b9023c4f7b6c358bb9a6d Author: Janusz Krzysztofik Date: Wed Nov 7 21:17:45 2018 +0100 ARM: OMAP1: ams-delta: Drop unused symbols from the board header Those bitmap symbols defining pins of latch2 register, used with read()/write() calls before the latch was converted to a GPIO device, have been obsoleted by integer symbols defined inside the board file. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 771e53c4d1a1ae0cff7e43a551bcd358910e619f Author: Janusz Krzysztofik Date: Wed Nov 7 21:17:44 2018 +0100 ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers As all users of the board specific GPIO pins have been converted from legacy integer-based to descriptor-based interface, there is no longer a need to maintain statically assigned GPIO pin numbers. Drop support for that. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 8b686d0e34e3c36e9a4cd1710253fd028ed60f53 Author: Yangtao Li Date: Tue Nov 6 09:35:16 2018 -0500 ARM: OMAP: PM: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Tony Lindgren commit 08a84633851f5084d6e9cf7f92716f992de891af Author: Yangtao Li Date: Tue Nov 6 09:33:55 2018 -0500 ARM: OMAP1: clock: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Tony Lindgren commit b3cf5c06ca500150fe17b72f411d0fb620b2f864 Author: Ville Syrjälä Date: Tue Sep 25 22:37:08 2018 +0300 drm/i915: Decouple SKL stride units from intel_fb_stride_alignment() In the future framebuffer stride alignment requirements won't exactly match the units in which skl+ plane stride is specified. So extract the code for the skl+ stuff into a separate helper. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180925193714.25280-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 22be874012893d436438b538c21a896ed930fcc5 Author: Sean Paul Date: Thu Nov 29 14:58:33 2018 -0500 drm: TODO: Add DRM_MODESET_LOCK_ALL* conversion to todo.rst We should also get the drivers using the helpers. Seems like a good intermediate TODO item. Changes in v2: - Add line about replacing drm_modest_lock_all() (Daniel) Acked-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181129195838.222031-1-sean@poorly.run commit 19a2668a8ae3a65542a4567d0130717362cfeb15 Author: Janusz Krzysztofik Date: Tue Nov 6 00:23:49 2018 +0100 ARM: OMAP1: ams-delta: Provide GPIO lookup table for LED device Global GPIO numbers no longer have to be passed to leds-gpio driver, replace their assignment with a lookup table. Signed-off-by: Janusz Krzysztofik Acked-by: Pavel Machek Reviewed-by: Linus Walleij Signed-off-by: Tony Lindgren commit 70bbe53c6eacdf01485848b7568609e33372cad0 Author: Ville Syrjälä Date: Tue Oct 23 19:02:01 2018 +0300 drm/i915: Make sure fb gtt offsets stay within 32bits Let's try to make sure the fb offset computations never hit an integer overflow by making sure the entire fb stays below 32bits. framebuffer_check() in the core already does the same check, but as it doesn't know about tiling some things can slip through. Repeat the check in the driver with tiling taken into account. v2: Use add_overflows() after massaging it to work for me (Chris) v3: Call it add_overflow_t() to match min_t() & co. (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181023160201.9840-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 0a48a4134912465fcdbaa3e5530e60649d50f123 Author: Janusz Krzysztofik Date: Tue Nov 6 00:11:26 2018 +0100 ARM: OMAP1: ams-delta: make board header file local to mach-omap1 Now as the board header file is no longer included by drivers, move it to the root directory of mach-omap1. Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren commit 58124bf8f4a6ee4c91845d3b48712e1ee8876bdc Author: Jerry (Fangzhi) Zuo Date: Tue Nov 27 10:51:12 2018 -0500 drm/amd/display: Fix NULL ptr when calculating refresh rate Calculate preferred refresh rate only when preferred mode exists. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8b955e00d4a56a36763e9349a78483515560a3ca Author: Roman Li Date: Tue Nov 27 17:16:37 2018 -0500 drm/amd/display: Fix 6x4K displays light-up on Vega20 [Why] More than 4x4K didn't lightup on Vega20 due to low dcfclk value. Powerplay expects valid min requirement for dcfclk from DC. [How] Update min_dcfclock_khz based on min_engine_clock value. Reviewed-by: Hersen Wu Reviewed-by: Feifei Xu Reviewed-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit 3be5e10daf1fc063ec5cff3cd785c4a59814af0b Merge: 03b10fecb9214 f01067005ec3d Author: Tony Lindgren Date: Thu Nov 29 11:39:23 2018 -0800 Merge branch 'omap-for-v4.21/ti-sysc' into omap-for-v4.21/driver commit 19bf62613a800ef4ffa26cbae6b723d9f46740ed Author: Eric Dumazet Date: Thu Nov 29 07:56:20 2018 -0800 tcp: remove loop to compute wscale We can remove the loop and conditional branches and compute wscale efficiently thanks to ilog2() Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit b79e7b3bd1f2b66186278e8df80f371f310138f1 Author: Tero Kristo Date: Wed Nov 28 12:45:07 2018 +0200 ARM: dts: dra7: Move the ti,no-idle quirk on proper gmac node Hwmod parses the DT hierarchically from root to search for matching ti,hwmod property. With the introduction of L4 data, we have two nodes with the ti,hwmod = "gmac" declaration, and the hwmod core only matches the first one found, which is the target-module one. This node incorrectly dropped the ti,no-idle flag, which causes number of problems, like ignoring errata i877, and also causing an intermittent boot failure on certain dra7 boards. Fix the issue by moving the ti,no-idle flag to the proper node. Signed-off-by: Tero Kristo Reported-by: Grygorii Strashko Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 5d2632a577baa735ad05ec745a2f95997d5ad9e0 Author: Tony Lindgren Date: Thu Nov 29 11:05:35 2018 -0800 ARM: dts: Revert am335x mcasp ti-sysc changes Without this McASP FIFO would constantly underflow. EDMA test via dmatest works though. Let's revert the change for now until we know the root cause. Reported-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 22b3b41c709b63b1b9dffe6c4d56a5161d972e51 Merge: c94800a3952c7 9e908a180e6a9 Author: Takashi Iwai Date: Thu Nov 29 19:52:22 2018 +0100 Merge branch 'topic/leds-trigger' into for-next This is a series of patches for conversion to LEDs audio-mute trigger. It's based on 4.20-rc3 to be an immutable branch. Signed-off-by: Takashi Iwai commit dcc6abae0f473a67543ce651fbfb6b15452876f6 Author: Michael Shteinbok Date: Thu Nov 29 10:50:19 2018 +0200 qede - Add a statistic for a case where driver drops tx packet due to memory allocation failure. skb_linearization can fail due to memory allocation failure. In such a case, the driver will drop the packet. In such a case The driver used to print an error message. This patch replaces this error message by a dedicated statistic. Signed-off-by: Michael Shteinbok Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit c1cb11bcbd09f5f027cbc7fadddab169714948df Author: Ioana Ciocoi Radulescu Date: Thu Nov 29 08:43:40 2018 +0000 dpaa2-eth: Add "fall through" comments Add comments in the switch statement for XDP action to indicate fallthrough is intended. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit a32701068632f74c2ab8cb5fac5ca640e39dc43c Merge: bd82233f16c46 8d1283b1d6afe Author: David S. Miller Date: Thu Nov 29 10:34:46 2018 -0800 Merge branch 'ave-suspend-resume' Kunihiko Hayashi says: ==================== Add suspend/resume support for AVE ethernet driver This series adds support for suspend/resume to AVE ethernet driver. And to avoid the error that wol state of phy hardware is enabled by default, this sets initial wol state to disabled and add preservation the state in suspend/resume sequence. ==================== Signed-off-by: David S. Miller commit 8d1283b1d6afe9c67ad8d8053f6202ef6fcb038a Author: Kunihiko Hayashi Date: Thu Nov 29 17:06:33 2018 +0900 net: ethernet: ave: Preserve wol state in suspend/resume sequence Since the wol state forces to be initialized after reset, the state should be preserved in suspend/resume sequence. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 7200f2e3c9e267d29e2bfa075794339032e0b98e Author: Kunihiko Hayashi Date: Thu Nov 29 17:06:32 2018 +0900 net: ethernet: ave: Set initial wol state to disabled If wol state of phy hardware is enabled after reset, phy_ethtool_get_wol() returns that wol.wolopts is true. However, since net_device.wol_enabled is zero and this doesn't apply wol state until calling ethtool_set_wol(), so mdio_bus_phy_may_suspend() returns true, that is, it's in a state where phy can suspend even though wol state is enabled. In this inconsistency, phy_suspend() returns -EBUSY, and at last, suspend sequence fails with the following message: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x58 returns -16 PM: Device 65000000.ethernet-ffffffff:01 failed to suspend: error -16 PM: Some devices failed to suspend, or early wake event detected In order to fix the above issue, this patch forces to set initial wol state to disabled as default. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 0ba78b4a4989de294dd0f17e243f1f91f07d97b3 Author: Kunihiko Hayashi Date: Thu Nov 29 17:06:31 2018 +0900 net: ethernet: ave: Add suspend/resume support This patch introduces suspend and resume functions to ave driver. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit b2c5d16b72df1116f05c9be16a630ac939d34101 Author: Jens Axboe Date: Thu Nov 29 10:03:42 2018 -0700 blk-mq: use plug for devices that implement ->commits_rqs() If we have that hook, we know the driver handles bd->last == true in a smart fashion. If it does, even for multiple hardware queues, it's a good idea to flush batches of requests to the device, if we have batches of requests from the submitter. Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit be94f058f2bde6f0b0ee9059a35daa8e15be308f Author: Jens Axboe Date: Sat Nov 24 10:15:46 2018 -0700 blk-mq: use bd->last == true for list inserts If we are issuing a list of requests, we know if we're at the last one. If we fail issuing, ensure that we call ->commits_rqs() to flush any potential previous requests. Reviewed-by: Omar Sandoval Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 80ff2040ac3dd6d9d68d59159b0a6dffd8adc5ff Author: Jens Axboe Date: Wed Nov 28 06:09:07 2018 -0700 ataflop: implement mq_ops->commit_rqs() hook We need this for blk-mq to kick things into gear, if we told it that we had more IO coming, but then failed to deliver on that promise. Reviewed-by: Omar Sandoval Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 944e7c87967c820a0f34a935b1f2799944099750 Author: Jens Axboe Date: Mon Nov 26 11:00:12 2018 -0700 virtio_blk: implement mq_ops->commit_rqs() hook We need this for blk-mq to kick things into gear, if we told it that we had more IO coming, but then failed to deliver on that promise. Reviewed-by: Omar Sandoval Acked-by: Michael S. Tsirkin Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 04f3eafda6e05adc56afed4d3ae6e24aaa429058 Author: Jens Axboe Date: Thu Nov 29 10:02:29 2018 -0700 nvme: implement mq_ops->commit_rqs() hook Split the command submission and the SQ doorbell ring, and add the doorbell ring as our ->commit_rqs() hook. This allows a list of requests to be issued, with nvme only writing the SQ update when it's necessary. This is more efficient if we have lists of requests to issue, particularly on virtualized hardware, where writing the SQ doorbell is more expensive than on real hardware. For those cases, performance increases of 2-3x have been observed. The use case for this is plugged IO, where blk-mq flushes a batch of requests at the time. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d666ba98f849ad44c4405ecc2180390ebe80f4f9 Author: Jens Axboe Date: Tue Nov 27 17:02:25 2018 -0700 blk-mq: add mq_ops->commit_rqs() blk-mq passes information to the hardware about any given request being the last that we will issue in this sequence. The point is that hardware can defer costly doorbell type writes to the last request. But if we run into errors issuing a sequence of requests, we may never send the request with bd->last == true set. For that case, we need a hook that tells the hardware that nothing else is coming right now. For failures returned by the drivers ->queue_rq() hook, the driver is responsible for flushing pending requests, if it uses bd->last to optimize that part. This works like before, no changes there. Reviewed-by: Omar Sandoval Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ce5b009cff1961137127edf91f44effd0eec8ffd Author: Jens Axboe Date: Tue Nov 27 17:13:56 2018 -0700 block: improve logic around when to sort a plug list Only do it if we have requests for multiple queues in the same plug. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1b57ec8c75279b873639eb44a215479236f93481 Author: Will Deacon Date: Thu Nov 29 16:31:04 2018 +0000 arm64: io: Ensure value passed to __iormb() is held in a 64-bit register As of commit 6460d3201471 ("arm64: io: Ensure calls to delay routines are ordered against prior readX()"), MMIO reads smaller than 64 bits fail to compile under clang because we end up mixing 32-bit and 64-bit register operands for the same data processing instruction: ./include/asm-generic/io.h:695:9: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return readb(addr); ^ ./arch/arm64/include/asm/io.h:147:58: note: expanded from macro 'readb' ^ ./include/asm-generic/io.h:695:9: note: use constraint modifier "w" ./arch/arm64/include/asm/io.h:147:50: note: expanded from macro 'readb' ^ ./arch/arm64/include/asm/io.h:118:24: note: expanded from macro '__iormb' asm volatile("eor %0, %1, %1\n" \ ^ Fix the build by casting the macro argument to 'unsigned long' when used as an input to the inline asm. Reported-by: Nick Desaulniers Reported-by: Nathan Chancellor Signed-off-by: Will Deacon commit 754a58db6a556e6e5f5e32f3e84e7d67b5bf9c8e Author: Nicholas Mc Guire Date: Wed Nov 28 12:24:47 2018 +0100 perf: arm_spe: handle devm_kasprintf() failure devm_kasprintf() may return NULL on failure of internal allocation thus the assignment to 'name' is not safe if unchecked. If NULL is passed in for name then perf_pmu_register() would not fail but rather silently jump to skip_type which is not the intent here. As perf_pmu_register() may also return -ENOMEM returning -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here as well. Acked-by: Mark Rutland Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension") Signed-off-by: Nicholas Mc Guire [will: reworded error message] Signed-off-by: Will Deacon commit e75d04771ad60cb65005f35a7eb65caa6e7c266c Author: Thierry Reding Date: Thu Nov 29 17:24:35 2018 +0100 drm/tegra: dc: Don't clean up unused display controller Display controllers that don't own any windows and which therefore aren't currently being assigned a primary plane are not registered as a CRTC with the DRM framework. They request neither a syncpoint nor an interrupt because they don't use them, so avoid cleaning up those resources. Signed-off-by: Thierry Reding commit 0cffbde2e318cc1214486a84be0f31045b1fa493 Author: Thierry Reding Date: Thu Nov 29 17:24:34 2018 +0100 drm/tegra: hub: Enable all required clocks The display architecture on Tegra186 and Tegra194 requires that there be some valid clock on all domains before accessing any display register. A further requirement is that in addition to the host1x, hub, disp and dsc clocks, all the head clocks (pclk0-2 on Tegra186 or pclk0-3 on Tegra194) must also be enabled. Implement this logic within the display hub driver to ensure the clocks are always enabled at the right time. Signed-off-by: Thierry Reding commit 787f4889a6cf879a3b8b31cf34804da69b40cc10 Author: Mark Brown Date: Thu Nov 29 16:24:37 2018 +0000 spi: Fix formatting of header block Make everything look intentional by having a C++ comment for the whole block, not just the SPDX line. Signed-off-by: Mark Brown commit 5651248697f70aad78aa0208490c776d1f842315 Merge: 3bd7f6589f67f 29bdedfd9cf40 Author: Mark Brown Date: Thu Nov 29 16:23:39 2018 +0000 Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-4.21 commit d6b9bc025859521dae719d8fb8278b0c39b34861 Author: Thierry Reding Date: Fri Oct 26 10:59:38 2018 +0200 drm/tegra: vic: Add Tegra194 support The Video Image Composer (VIC) generation found on Tegra194 is backwards compatible with its predecessor found on Tegra186. Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit ac1bdbf22bebabfee150bb5c33a02c4d0119d185 Author: Thierry Reding Date: Thu Jan 25 14:10:44 2018 +0200 gpu: host1x: Add Tegra194 support The host1x hardware found on Tegra194 is mostly backwards compatible with the version found on Tegra186, with the notable exceptions of the increased number of syncpoints and mlocks. In addition, some rarely used features such as syncpoint wait bases were dropped and some registers had to move around to accomodate the increased number of syncpoints. Signed-off-by: Thierry Reding commit b91bf997ea6efe9c48540572d693415fddaf0c3a Author: Thierry Reding Date: Fri Nov 23 13:06:39 2018 +0100 drm/tegra: falcon: Wait for memory scrubbing to complete Before booting the Falcon processor, make sure to wait for memory scrubbing to complete. Signed-off-by: Thierry Reding commit 4eab8c0ebd384f080cce2ee466356b446acb283f Author: Thierry Reding Date: Fri Nov 23 13:06:38 2018 +0100 drm/tegra: falcon: Fix error handling The ->alloc() callback in struct falcon_ops returns an ERR_PTR()-encoded error code on failure, so it needs to be properly checked for, otherwise subsequent code may dereference an invalid pointer. Signed-off-by: Thierry Reding commit 0dc34e19f66eb84744af2fea4235302da39fd7e7 Author: Thierry Reding Date: Fri Nov 23 13:06:37 2018 +0100 drm/tegra: vic: Implement explicit reset support Tegra supports generic PM domains on 64-bit ARM, and if that is enabled, the power domain code will make sure that resets are asserted and deasserted at appropriate points in time. If generic PM domains are not implemented, such as on 32-bit Tegra, the resets need to be asserted and deasserted explicitly by the driver. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 3dde5a2342cd204df15b6b0b90ee0ed4542225ca Author: Thierry Reding Date: Fri Nov 23 13:04:03 2018 +0100 ARM: tegra: Add VIC on Tegra124 The Video Image Compositor can be used to perform a variety of image operations. Add a device tree node for it, so that it can be exposed as a host1x channel to userspace. Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 29bdedfd9cf40e59456110ca417a8cb672ac9b92 Author: Lukas Wunner Date: Thu Nov 29 15:14:49 2018 +0100 spi: bcm2835: Unbreak the build of esoteric configs Commit e82b0b382845 ("spi: bcm2835: Fix race on DMA termination") broke the build with COMPILE_TEST=y on arches whose cmpxchg() requires 32-bit operands (xtensa, older arm ISAs). Fix by changing the dma_pending flag's type from bool to unsigned int. Fixes: e82b0b382845 ("spi: bcm2835: Fix race on DMA termination") Signed-off-by: Lukas Wunner Signed-off-by: Mark Brown Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes commit b7ea04d299c78b6cf96ab281a1683ff62a74f969 Author: Sean Paul Date: Thu Nov 29 10:04:17 2018 -0500 drm: Add DRM_MODESET_LOCK_BEGIN/END helpers This patch adds a couple of helpers to remove the boilerplate involved in grabbing all of the modeset locks. I've also converted the obvious cases in drm core to use the helpers. The only remaining instance of drm_modeset_lock_all_ctx() is in drm_framebuffer. It's complicated by the state clear that occurs on deadlock. ATM, there's no way to inject code in the deadlock path with the helpers, so it's unfit for conversion. Changes in v2: - Relocate ret argument to the end of the list (Daniel) - Incorporate Daniel's doc suggestions (Daniel) Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-4-sean@poorly.run commit 2aa3eef85d4ac3843f4972269dbd39557e0ec0eb Author: Sean Paul Date: Thu Nov 29 10:04:16 2018 -0500 drm: Move atomic_state_put after locks are dropped drm_atomic_state_put doesn't require any locking, and this makes things easier for switching to modeset_lock_all helpers in a future patch Changes in v2: - Moved state->acquire_ctx clear to a separate patch (Daniel) Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-3-sean@poorly.run commit c232e9f41b136c141df9938024e521191a7b910d Author: Sean Paul Date: Thu Nov 29 10:04:15 2018 -0500 drm: Move drm_mode_setcrtc() local re-init to failure path Instead of always re-initializing the variables we need to clean up on out, move the re-initialization into the branch that goes back to retry label. This is a lateral move right now, but will allow us to pull out the modeset locking into common code. I kept this change separate to make things easier to review. Changes in v2: - None Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-2-sean@poorly.run commit aa394b0dd68cb00c483e151dcd84713d4d517ed1 Author: Sean Paul Date: Thu Nov 29 10:04:14 2018 -0500 drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state() drm_atomic_helper_commit_duplicated_state() sets state->acquire_ctx to the context given in the argument and leaves it in state after it quits. The lifetime of state and context are not guaranteed to be the same, so we shouldn't leave that pointer hanging around. This patch resets the context to NULL to avoid any oopses. Changes in v2: - Added to the set Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-1-sean@poorly.run commit 2f690fad237adea1bdce8ed9026cbf43cd9d8c46 Author: Noralf Trønnes Date: Wed Nov 28 22:27:11 2018 +0100 drm/rcar-du: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. drm_fbdev_generic_setup() handles mode_config.num_connector being zero. In that case it retries fbdev setup on the next .output_poll_changed. Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20181128212713.43500-4-noralf@tronnes.org commit b72c51a58e6d63ef673ac96b8ab5bc98799c5f7b Author: Lyude Paul Date: Sat Nov 24 17:57:05 2018 -0500 brcmfmac: Fix out of bounds memory access during fw load I ended up tracking down some rather nasty issues with f2fs (and other filesystem modules) constantly crashing on my kernel down to a combination of out of bounds memory accesses, one of which was coming from brcmfmac during module load: [ 30.891382] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2 [ 30.894437] ================================================================== [ 30.901581] BUG: KASAN: global-out-of-bounds in brcmf_fw_alloc_request+0x42c/0x480 [brcmfmac] [ 30.909935] Read of size 1 at addr ffff2000024865df by task kworker/6:2/387 [ 30.916805] [ 30.918261] CPU: 6 PID: 387 Comm: kworker/6:2 Tainted: G O 4.20.0-rc3Lyude-Test+ #19 [ 30.927251] Hardware name: amlogic khadas-vim2/khadas-vim2, BIOS 2018.07-rc2-armbian 09/11/2018 [ 30.935964] Workqueue: events brcmf_driver_register [brcmfmac] [ 30.941641] Call trace: [ 30.944058] dump_backtrace+0x0/0x3e8 [ 30.947676] show_stack+0x14/0x20 [ 30.950968] dump_stack+0x130/0x1c4 [ 30.954406] print_address_description+0x60/0x25c [ 30.959066] kasan_report+0x1b4/0x368 [ 30.962683] __asan_report_load1_noabort+0x18/0x20 [ 30.967547] brcmf_fw_alloc_request+0x42c/0x480 [brcmfmac] [ 30.967639] brcmf_sdio_probe+0x163c/0x2050 [brcmfmac] [ 30.978035] brcmf_ops_sdio_probe+0x598/0xa08 [brcmfmac] [ 30.983254] sdio_bus_probe+0x190/0x398 [ 30.983270] really_probe+0x2a0/0xa70 [ 30.983296] driver_probe_device+0x1b4/0x2d8 [ 30.994901] __driver_attach+0x200/0x280 [ 30.994914] bus_for_each_dev+0x10c/0x1a8 [ 30.994925] driver_attach+0x38/0x50 [ 30.994935] bus_add_driver+0x330/0x608 [ 30.994953] driver_register+0x140/0x388 [ 31.013965] sdio_register_driver+0x74/0xa0 [ 31.014076] brcmf_sdio_register+0x14/0x60 [brcmfmac] [ 31.023177] brcmf_driver_register+0xc/0x18 [brcmfmac] [ 31.023209] process_one_work+0x654/0x1080 [ 31.032266] worker_thread+0x4f0/0x1308 [ 31.032286] kthread+0x2a8/0x320 [ 31.039254] ret_from_fork+0x10/0x1c [ 31.039269] [ 31.044226] The buggy address belongs to the variable: [ 31.044351] brcmf_firmware_path+0x11f/0xfffffffffffd3b40 [brcmfmac] [ 31.055601] [ 31.057031] Memory state around the buggy address: [ 31.061800] ffff200002486480: 04 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 [ 31.068983] ffff200002486500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.068993] >ffff200002486580: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 [ 31.068999] ^ [ 31.069017] ffff200002486600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.096521] ffff200002486680: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa [ 31.096528] ================================================================== [ 31.096533] Disabling lock debugging due to kernel taint It appears that when trying to determine the length of the string in the alternate firmware path, we make the mistake of not handling the case where the firmware path is empty correctly. Since strlen(mp_path) can return 0, we'll end up accessing mp_path[-1] when the firmware_path isn't provided through the module arguments. So, fix this by just setting the end char to '\0' by default, and only changing it if we have a non-zero length. Additionally, use strnlen() with BRCMF_FW_ALTPATH_LEN instead of strlen() just to be extra safe. Fixes: 2baa3aaee27f ("brcmfmac: introduce brcmf_fw_alloc_request() function") Cc: Hante Meuleman Cc: Pieter-Paul Giesberts Cc: Franky Lin Cc: Arend van Spriel Cc: Kalle Valo Cc: Arend Van Spriel Cc: Himanshu Jha Cc: Dan Haab Cc: Jia-Shyr Chuang Cc: Ian Molton Cc: # v4.17+ Signed-off-by: Lyude Paul Signed-off-by: Kalle Valo commit 554da3868eb1d7174710c18b4ddd6ff01f6d612c Author: Hans de Goede Date: Fri Nov 23 10:11:48 2018 +0100 brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe ARM systems with UEFI may have both devicetree (of) and DMI data in this case we end up setting brcmf_mp_device.board_type twice. In this case we should prefer the devicetree data, because: 1) The devicerree data is more reliable 2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and classic uboot booting, the devicetree data is always there, so using it makes sure we ask for the same nvram file independent of how we booted. This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe call, so that the latter can override the value of the first if both are set. Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...") Cc: Peter Robinson Tested-and-reported-by: Peter Robinson Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit 4282ff17e557d319e1b988fa4f582792cfaf6fff Author: Dan Haab Date: Fri Nov 9 09:38:55 2018 -0700 brcmfmac: support STA info struct v7 The newest firmwares provide STA info using v7 of the struct. As v7 isn't backward compatible, a union is needed. Even though brcmfmac does not use any of the new info it's important to provide the proper struct buffer. Without this change new firmwares will fallback to the very limited v3 instead of something in between such as v4. Signed-off-by: Dan Haab Reviewed-by: Rafał Miłecki Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo commit d5a433556d096d8e5b2526695aadbc7fd6ff48c9 Author: Priit Laes Date: Mon Nov 19 20:01:25 2018 +0200 b43: Use cordic algorithm from kernel library Kernel library has a common cordic algorithm which is identical to internally implemented one, so use it and drop the duplicate implementation. Acked-by: Larry Finger Signed-off-by: Priit Laes Signed-off-by: Kalle Valo commit 8ea3819c0bbef57a51d8abe579e211033e861677 Author: Larry Finger Date: Mon Nov 19 20:01:24 2018 +0200 b43: Fix error in cordic routine The cordic routine for calculating sines and cosines that was added in commit 6f98e62a9f1b ("b43: update cordic code to match current specs") contains an error whereby a quantity declared u32 can in fact go negative. This problem was detected by Priit Laes who is switching b43 to use the routine in the library functions of the kernel. Fixes: 986504540306 ("b43: make cordic common (LP-PHY and N-PHY need it)") Reported-by: Priit Laes Cc: Rafał Miłecki Cc: Stable # 2.6.34 Signed-off-by: Larry Finger Signed-off-by: Priit Laes Signed-off-by: Kalle Valo commit ea3edda9ddba634b9bcb8fcdcd95fe6b0a031a47 Author: Priit Laes Date: Mon Nov 19 20:01:23 2018 +0200 brcmsmac: Use cordic-related macros from common cordic library Current driver includes macro that is available from general cordic library. Use that and drop unused duplicate and unneeded internal definitions. Signed-off-by: Priit Laes Signed-off-by: Kalle Valo commit 58d81d64e06ffaea6bddc85ae2b7295c371bcc55 Author: Priit Laes Date: Mon Nov 19 20:01:22 2018 +0200 lib: cordic: Move cordic macros and defines to header file Now that these macros are in header file, we can eventually clean up the duplicate macros present in the drivers that utilize the same cordic algorithm implementation. Also add CORDIC_ prefix to nonprefixed macros. Reviewed-by: Arend van Spriel Signed-off-by: Priit Laes Acked-by: Larry Finger Signed-off-by: Kalle Valo commit 4e6db0f21c99c25980c8d183f95cdb6ad64cebd2 Author: Dan Carpenter Date: Thu Nov 29 13:56:54 2018 +0300 blk-mq: Add a NULL check in blk_mq_free_map_and_requests() I recently found some code which called blk_mq_free_map_and_requests() with a NULL set->tags pointer. I fixed the caller, but it seems like a good idea to add a NULL check here as well. Now we can call: blk_mq_free_tag_set(set); blk_mq_free_tag_set(set); twice in a row and it's harmless. Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit 49379e6d1e9370d1e5dc09ca52aff29ae07c8ba6 Author: Dan Carpenter Date: Thu Nov 29 13:55:19 2018 +0300 ataflop: fix error handling in atari_floppy_init() Smatch complains that there is an off by one if the allocation fails in: DMABuffer = atari_stram_alloc(BUFFER_SIZE+512, "ataflop"); In that situation, "i" would be point to one element beyond the end of the unit[] array. There is a second bug because the error handling calls blk_mq_free_tag_set(&unit[i].tag_set); regardless of whether "disk->queue" is NULL or non-NULL. So if blk_mq_init_sq_queue() fails, then that means unit[i].tag_set->tags is NULL and it leads to an Oops. It's easiest to call put_disk() before the goto to clean up the partial iteration. Then the earlier unit[] elements are fully allocated so we can remove the checks whether "disk->queue" is NULL and the code is simpler. Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit 65ffc51aba406636a901b02067287d8535c02417 Merge: d7a86dffc280c 1ec28f8b8ada4 Author: Maarten Lankhorst Date: Thu Nov 29 16:12:27 2018 +0100 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next Requested by Boris Brezillon for some vc4 fixes that are needed for future vc4 work. Signed-off-by: Maarten Lankhorst commit 81c85ec15a1946f2e347ec0bf66936121eb97ce7 Author: Linus Walleij Date: Mon Nov 26 14:51:23 2018 +0100 gpio: OF: Parse MMC-specific CD and WP properties When retrieveing CD (card detect) and WP (write protect) GPIO handles from the device tree, make sure to assign them active low by default unless the "cd-inverted" or "wp-inverted" properties are set. These properties mean that respective signal is active HIGH since the SDHCI specification stipulates that this kind of signals should be treated as active LOW. If the twocell GPIO flag is also specified as active low, well that's nice and we will silently ignore the tautological specification. If however the GPIO line is specified as active low in the GPIO flasg cell and "cd-inverted" or "wp-inverted" is also specified, the latter takes precedence and we print a warning. The current effect on the MMC slot-gpio core are as follows: For CD GPIOs: no effect. The current code in mmc/core/host.c calls mmc_gpiod_request_cd() with the "override_active_level" argument set to true, which means that whatever the GPIO descriptor thinks about active low/high will be ignored, the core will use the MMC_CAP2_CD_ACTIVE_HIGH to keep track of this and reads the raw value from the GPIO descriptor, totally bypassing gpiolibs inversion semantics. I plan to clean this up at a later point passing the handling of inversion semantics over to gpiolib, so this patch prepares the ground for that. Fow WP GPIOs: this is probably fixing a bug, because the code in mmc/core/host.c calls mmc_gpiod_request_ro() with the "override_active_level" argument set to false, which means it will respect the inversion semantics of the gpiolib and ignore the MMC_CAP2_RO_ACTIVE_HIGH flag for everyone using this through device tree. However the code in host.c confusingly goes to great lengths setting up the MMC_CAP2_RO_ACTIVE_HIGH flag from the GPIO descriptor and by reading the "wp-inverted" property of the node. As far as I can tell this is all in vain and the inversion is broken: device trees that use "wp-inverted" do not work as intended, instead the only way to actually get inversion on a line is by setting the second cell flag to GPIO_ACTIVE_HIGH (which will be the default) or GPIO_ACTIVE_LOW if they want the proper MMC semantics. Presumably all device trees do this right but we need to parse and handle this properly. Cc: linux-mmc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 2d25bc55235314d869459c574be14e8faa73aca3 Author: Jessica Yu Date: Mon Nov 19 17:43:58 2018 +0100 module: make it clearer when we're handling kallsyms symbols vs exported symbols The module loader internally works with both exported symbols represented as struct kernel_symbol, as well as Elf symbols from a module's symbol table. It's hard to distinguish sometimes which type of symbol we're handling given that some helper function names are not consistent or helpful. Take get_ksymbol() for instance - are we looking for an exported symbol or a kallsyms symbol here? Or symname() and kernel_symbol_name() - which function handles an exported symbol and which one an Elf symbol? Clean up and unify the function naming scheme a bit to make it clear which kind of symbol we're handling. This change only affects static functions internal to the module loader. Reviewed-by: Miroslav Benes Signed-off-by: Jessica Yu commit d7a86dffc280cb5a2a18975d46c7b9d89b025c7e Author: Gerd Hoffmann Date: Wed Nov 28 16:10:21 2018 +0100 drm/virtio: virtio_gpu_cmd_resource_create_3d: drop unused fence arg Signed-off-by: Gerd Hoffmann Reviewed-by: Robert Foss Link: http://patchwork.freedesktop.org/patch/msgid/20181128151021.29565-3-kraxel@redhat.com commit 4d55fd66b454c3489758731b7c3f470579c3780e Author: Gerd Hoffmann Date: Wed Nov 28 16:10:20 2018 +0100 drm/virtio: fence: pass plain pointer Since commit "9fdd90c0f4 drm/virtio: add virtio_gpu_alloc_fence()" fences are not allocated any more by virtio_gpu_fence_emit(). So there is no need to pass down a reference to the fence pointer, a plain pointer is enough now. Convert virtio_gpu_fence_emit() and callers. Signed-off-by: Gerd Hoffmann Reviewed-by: Robert Foss Link: http://patchwork.freedesktop.org/patch/msgid/20181128151021.29565-2-kraxel@redhat.com commit cd7fdc45bc69a62b4e22c6e875f1f1aea566256d Author: Young_X Date: Tue Nov 27 06:33:16 2018 +0000 ASoC: au8540: use 64-bit arithmetic instead of 32-bit Add suffix ULL to constant 256 in order to give the compiler complete information about the proper arithmetic to use. Notice that such constant is used in a context that expects an expression of type u64 (64 bits, unsigned) and the following expression is currently being evaluated using 32-bit arithmetic: 256 * fs * 2 * mclk_src_scaling[i].param Signed-off-by: Young_X Signed-off-by: Mark Brown commit 6ad5506ed191eefec7d205245edabb8b5f7e950f Author: Viresh Kumar Date: Fri Nov 16 15:34:28 2018 +0530 ARM64: dts: hisilicon: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Wei Xu commit a7a6e2cbb4db370e84948e97adac332b59dd89d8 Author: Viresh Kumar Date: Fri Nov 16 15:34:27 2018 +0530 arm64: dts: hi3660: Add missing cooling device properties for CPUs The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Viresh Kumar Signed-off-by: Wei Xu commit 4c7c31104b4706023a2ce6d9aa0a3b3fe7a96f17 Author: Manivannan Sadhasivam Date: Mon Oct 29 15:12:43 2018 +0530 arm64: dts: hisilicon: poplar: Standardize LED labels and triggers For all 96Boards, the following standard is used for onboard LEDs. green:user1 default-trigger: heartbeat green:user2 default-trigger: mmc0/disk-activity(onboard-storage) green:user3 default-trigger: mmc1 (SD-card) green:user4 default-trigger: none, panic-indicator yellow:wlan default-trigger: phy0tx blue:bt default-trigger: hci0-power So lets adopt the same for Poplar, which is one of the 96Boards Enterprise edition platform. Due to absence of WLAN and BT support, corresponding LED nodes are not considered. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Wei Xu commit 28b45da9acffd6b5d25018b18dc18ad3376140d8 Author: Manivannan Sadhasivam Date: Mon Oct 29 15:12:42 2018 +0530 arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers For all 96Boards, the following standard is used for onboard LEDs. green:user1 default-trigger: heartbeat green:user2 default-trigger: mmc0/disk-activity(onboard-storage) green:user3 default-trigger: mmc1 (SD-card) green:user4 default-trigger: none, panic-indicator yellow:wlan default-trigger: phy0tx blue:bt default-trigger: hci0-power So lets adopt the same for HiKey960 which is one of the 96Boards CE platform. Since there is no trigger available for onboard-storage UFS now, user2 trigger is set to none. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Wei Xu commit 2e3ea3e7fba98c67639dd65d667b293e452efb9c Author: Manivannan Sadhasivam Date: Mon Oct 29 15:12:41 2018 +0530 arm64: dts: hisilicon: hikey: Standardize LED labels and triggers For all 96Boards, the following standard is used for onboard LEDs. green:user1 default-trigger: heartbeat green:user2 default-trigger: mmc0/disk-activity(onboard-storage) green:user3 default-trigger: mmc1 (SD-card) green:user4 default-trigger: none, panic-indicator yellow:wlan default-trigger: phy0tx blue:bt default-trigger: hci0-power So lets adopt the same for HiKey, which is one of the 96Boards CE platform. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Signed-off-by: Wei Xu commit 8aa2fca8342b227842758106028ed33d711959ce Author: Manivannan Sadhasivam Date: Wed Oct 24 00:36:55 2018 +0530 arm64: dts: hisilicon: hikey970: Add GPIO line names Add GPIO line names for HiSilicon HiKey970 board based on HI3670 SoC. The Line names are derived from "hikey970-schematics.pdf" document and named in conjunction with 96Boards CE Specification v1.0. Signed-off-by: Manivannan Sadhasivam Acked-by: Linus Walleij Signed-off-by: Wei Xu commit 84d9e4df19a7fac4f61dbab9bd9ab2aae71216fc Author: Manivannan Sadhasivam Date: Wed Oct 24 00:36:54 2018 +0530 arm64: dts: hisilicon: hikey970: Enable on-board UARTs Enable on-board UARTs on HiSilicon HiKey970 board. Signed-off-by: Manivannan Sadhasivam Acked-by: Linus Walleij Signed-off-by: Wei Xu commit dd54bb8a0a970188cda8839845920aff2e3da8a4 Author: Manivannan Sadhasivam Date: Wed Oct 24 00:36:53 2018 +0530 arm64: dts: hisilicon: hi3670: Add UART nodes Add UART nodes for HiSilicon HI3670 SoC and also relevant pinmux/pinconf entries. Signed-off-by: Manivannan Sadhasivam Acked-by: Linus Walleij Signed-off-by: Wei Xu commit e18813021a11c4f7c7fd21deb69589db8a8f9f8c Author: Manivannan Sadhasivam Date: Wed Oct 24 00:36:52 2018 +0530 arm64: dts: hisilicon: hi3670: Add GPIO controller support Add GPIO controller support for HiSilicon HI3670 SoC based on ARM Primecell PL061 GPIO controller. Signed-off-by: Manivannan Sadhasivam Acked-by: Linus Walleij Signed-off-by: Wei Xu commit 9adcfaffc34d53e498637237fb3701560359d50b Author: Tetsuo Handa Date: Sat Nov 24 13:10:25 2018 +0900 printk: Make printk_emit() local function. printk_emit() is called from only devkmsg_write() in the same file. Save object size by making it a local function. Link: http://lkml.kernel.org/r/5cc99d2c-c408-34f7-d1fc-e1cd2a9e31da@i-love.sakura.ne.jp Cc: Steven Rostedt Signed-off-by: Tetsuo Handa Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 7cdf33ab02e01300e7e6289acbac9cd8759f8712 Author: Daniel Vetter Date: Wed Nov 28 11:10:33 2018 +0100 drm/vkms: Fix plane duplicate_state We need to handle allocation failures and bail out. While at it, tune the allocation failures down to debug level. syzbot injected an allocation failure and then hit this WARN_ON. Reported-by: syzbot+eb6e5365f23c02517dda@syzkaller.appspotmail.com Signed-off-by: Daniel Vetter Cc: Haneen Mohammed Cc: Sean Paul Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Gustavo Padovan Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181128101033.4840-1-daniel.vetter@ffwll.ch commit 559afaa2c506688a94969158cd83249ceacb2e27 Merge: 12d56175c89c8 520229e4b02dc Author: Kalle Valo Date: Thu Nov 29 11:00:00 2018 +0200 Merge tag 'iwlwifi-next-for-kalle-2018-11-23' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next second batch of iwlwifi patches intended for v4.21 * New FW debugging infrastructure; * Some more work on 802.11ax; * Improve support for multiple RF modules with 22000 devices; * Remove an unused FW parameter; * Other debugging improvements; commit 7a027b57f959660547779b6290a3b50ff1601980 Author: Srikanth, Jampala Date: Wed Nov 21 09:52:24 2018 +0000 crypto: cavium/nitrox - Enable interrups for PF in SR-IOV mode. Enable the available interrupt vectors for PF in SR-IOV Mode. Only single vector entry 192 is valid of PF. This is used to notify any hardware errors and mailbox messages from VF(s). Signed-off-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 4bede34c1aa19266628b13f68db95ec4a16a6f38 Author: Nagadheeraj, Rottela Date: Wed Nov 21 07:36:58 2018 +0000 crypto: cavium/nitrox - crypto request format changes nitrox_skcipher_crypt() will do the necessary formatting/ordering of input and output sglists based on the algorithm requirements. It will also accommodate the mandatory output buffers required for NITROX hardware like Output request headers (ORH) and Completion headers. Signed-off-by: Nagadheeraj Rottela Reviewed-by: Srikanth Jampala Signed-off-by: Herbert Xu commit 180def6c4ad139ae6f97953ae810092ace295d5b Author: Martin Willi Date: Tue Nov 20 17:30:50 2018 +0100 crypto: x86/chacha20 - Add a 4-block AVX-512VL variant This version uses the same principle as the AVX2 version by scheduling the operations for two block pairs in parallel. It benefits from the AVX-512VL rotate instructions and the more efficient partial block handling using "vmovdqu8", resulting in a speedup of the raw block function of ~20%. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit 29a47b54e030efe308aa90e6c26a9ce7f5f84ed8 Author: Martin Willi Date: Tue Nov 20 17:30:49 2018 +0100 crypto: x86/chacha20 - Add a 2-block AVX-512VL variant This version uses the same principle as the AVX2 version. It benefits from the AVX-512VL rotate instructions and the more efficient partial block handling using "vmovdqu8", resulting in a speedup of ~20%. Unlike the AVX2 version, it is faster than the single block SSSE3 version to process a single block. Hence we engage that function for (partial) single block lengths as well. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit cee7a36ecb5bafef8c87fb2c10641e6125044154 Author: Martin Willi Date: Tue Nov 20 17:30:48 2018 +0100 crypto: x86/chacha20 - Add a 8-block AVX-512VL variant This variant is similar to the AVX2 version, but benefits from the AVX-512 rotate instructions and the additional registers, so it can operate without any data on the stack. It uses ymm registers only to avoid the massive core throttling on Skylake-X platforms. Nontheless does it bring a ~30% speed improvement compared to the AVX2 variant for random encryption lengths. The AVX2 version uses "rep movsb" for partial block XORing via the stack. With AVX-512, the new "vmovdqu8" can do this much more efficiently. The associated "kmov" instructions to work with dynamic masks is not part of the AVX-512VL instruction set, hence we depend on AVX-512BW as well. Given that the major AVX-512VL architectures provide AVX-512BW and this extension does not affect core clocking, this seems to be no problem at least for now. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit cb74635faa17cfa2991ddbe027596270af525c6d Author: Babu Moger Date: Wed Nov 28 22:42:47 2018 +0000 x86/resctrl: Remove unnecessary check for cbm_validate() The Smatch static checker reports the following error after commit: a36c5ff560fb ("x86/resctrl: Bring cbm_validate() into the resource structure"): arch/x86/kernel/cpu/resctrl/ctrlmondata.c:227 parse_cbm() error: uninitialized symbol 'cbm_val'. arch/x86/kernel/cpu/resctrl/ctrlmondata.c:236 parse_cbm() error: uninitialized symbol 'cbm_val'. This could happen if ->cbm_validate() is NULL which could leave cbm_val uninitialized. However, there is no case where ->cbm_validate() can be NULL as it is initialized based on a vendor check. So it is either an Intel or an AMD version it points to. And in both the cases it is initialized properly. Thus, remove the first check. Verified the fix running Smatch. [ bp: massage commit message. ] Fixes: a36c5ff560fb ("x86/resctrl: Bring cbm_validate() into the resource structure") Reported-by: Dan Carpenter Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Reinette Chatre Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20181128224234.22998-1-babu.moger@amd.com commit 7de642a3815d7fa61df0b7f94257034b10a8bfb2 Author: Linus Walleij Date: Fri May 4 11:43:53 2018 +0200 ARM: defconfig: Enable the PL111 DRM driver on vexpress This updates the Versatile defconfig to use the new P111 DRM driver that is merged in the DRM subsystem. We deactivate the old CLCD driver and activate the Pl111 DRM driver and the SiI9022 HDMI bridge. We activate DMA memory allocation using CMA so that the special graphics memory for the on-board CLCD can be used. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Tested-by: Liviu Dudau Signed-off-by: Linus Walleij commit 5bd444f1a3a07f92425bdbc8208c283b158fbadf Author: Linus Walleij Date: Fri May 4 11:41:43 2018 +0200 ARM: defconfig: Update the vexpress defconfig Update the Versatile Express defconfig to match the Kconfig changes in the kernel. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Tested-by: Liviu Dudau Signed-off-by: Linus Walleij commit f1fe12c8bf33241e04c57a0fc5b25b16ba77ba2d Author: Linus Walleij Date: Thu Feb 15 16:12:29 2018 +0100 ARM: dts: Modernize the Vexpress PL111 integration The Versatile Express was submitted with the actual display bridges unconnected (but defined in the device tree) and mock "panels" encoded in the device tree node of the PL111 controller. This doesn't even remotely describe the actual Versatile Express hardware. Exploit the SiI9022 bridge by connecting the PL111 pads to it, making it use EDID or fallback values to drive the monitor. The also has to use the reserved memory through the CMA pool rather than by open coding a memory region and remapping it explicitly in the driver. To achieve this, a reserved-memory node must exist in the root of the device tree, so we need to pull that out of the motherboard .dtsi include files, and push it into each top-level device tree instead. We do the same manouver for all the Versatile Express boards, taking into account the different location of the video RAM depending on which chip select is used on each platform. This plays nicely with the new PL111 DRM driver and follows the standard ways of assigning bridges and memory pools for graphics. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Robin Murphy Tested-by: Liviu Dudau Signed-off-by: Linus Walleij commit bd82233f16c4665f186c84fca68419f8cbe97f07 Merge: e561bb29b650d 6cbf76028dcac Author: David S. Miller Date: Wed Nov 28 23:18:16 2018 -0800 Merge tag 'linux-can-next-for-4.21-20181128' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== This is a pull request for net-next/master consisting of 18 patches. The first patch is by Colin Ian King and fixes the spelling in the ucan driver. The next three patches target the xilinx driver. YueHaibing's patch fixes the return type of ndo_start_xmit function. Two patches by Shubhrajyoti Datta add support for the CAN FD 2.0 controllers. Flavio Suligoi's patch for the sja1000 driver add support for the ASEM CAN raw hardware. Wolfram Sang's and Kuninori Morimoto's patches switch the rcar driver to use SPDX license identifiers. The remaining 111 patches improve the flexcan driver. Pankaj Bansal's patch enables the driver in Kconfig on all architectures with IOMEM support. The next four patches by me fix indention, add missing parentheses and comments. Aisheng Dong's patches add self wake support and document it in the DT bindings. The remaining patches by Pankaj Bansal first fix the loopback support and prepare the driver for the CAN-FD support needed for the LX2160A SoC. The actual CAN-FD support will be added in a later patch series. ==================== Signed-off-by: David S. Miller commit c94800a3952c71191c3a8a7151695216da43d5eb Author: Sameer Pujar Date: Thu Nov 29 09:28:52 2018 +0530 ALSA: hda/tegra: compatible string as shortname By default HDA sound card is registered with shortname "tegra-hda". Same driver is used across tegra platforms and it is necessary to distinguish between platforms to use platform specific settings from userspace. One such example is, hdmi port on different platforms use different alsa pcm device ID. For hdmi playback to work it should open correct pcm device depending on the platform. This patch applies shortname from first compatible string provided in root node of device tree. Userspace then can use this card name to apply specific settings. Signed-off-by: Sameer Pujar Signed-off-by: Takashi Iwai commit e561bb29b650d2817d10a4858f1817836ed08399 Merge: 62e3a93178822 60b548237fed4 Author: David S. Miller Date: Wed Nov 28 22:10:54 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Trivial conflict in net/core/filter.c, a locally computed 'sdif' is now an argument to the function. Signed-off-by: David S. Miller commit b7e386177fa53c3d704754095bd81189ef43bce4 Author: Bjorn Andersson Date: Wed Sep 19 18:45:40 2018 -0700 soc: qcom: smd-rpm: Add QCS404 compatible This patch adds a compatible for the rpm on the Qualcomm QCS404 platform. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Signed-off-by: Andy Gross commit a03397e27476b3ff94018eec832955ef6eb59c7a Author: Bjorn Andersson Date: Fri Nov 9 15:28:03 2018 +0530 arm64: defconfig: Enable some qcom remoteproc configs Enable remoteproc configs to boot the remoteprocs on QC chipsets. These are common configs and not specific to a specific SoC so should be enabled across the board. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 671942e26e28ef04b0842b18088b60606e9d6a03 Author: Bjorn Andersson Date: Fri Nov 9 15:28:02 2018 +0530 arm64: defconfig: Enable QCS404 configs Enable GCC and pin control configs to make it possible to boot the QCS404 EVBs. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 9167f0dcc523735d5df7c6e27b58c05740433657 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:34:35 2018 -0600 scsi: xen-scsifront: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Missed the backend's Closing state -- fallthrough" with "fall through - Missed the backend's Closing state", which contains the "fall through" annotation at the beginnig of the code comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross Signed-off-by: Martin K. Petersen commit 74e716f2a9d8fbe039b4149537dbc4cdf1b4bdf3 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:32:34 2018 -0600 scsi: megaraid_sas_fusion: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "Fall thru" with a "Fall through" annotation and added a dash as a token in order to separate the "Fall through" annotation from the rest of the comment on the same line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit 8d07f7d0009c8e2281a79fced49aa6ea60dc9153 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:32:27 2018 -0600 scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit 76df1da36c3d576452ce31eba90d089c85d70dd2 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:30:55 2018 -0600 scsi: libfc: fc_rport: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 5dfdb0893596a837a95fa4013c122ba32aae9946 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:29:07 2018 -0600 scsi: hpsa: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1195463 ("Missing break in switch") Addresses-Coverity-ID: 1195464 ("Missing break in switch") Addresses-Coverity-ID: 1195465 ("Missing break in switch") Addresses-Coverity-ID: 1195466 ("Missing break in switch") Addresses-Coverity-ID: 1357338 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Don Brace Signed-off-by: Martin K. Petersen commit c121c57a45ec048d1f3c70b20727fcf400237058 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:26:09 2018 -0600 scsi: aacraid: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen commit 8d4d5b346cfc597295598afad7312bee3e7ae147 Author: Gustavo A. R. Silva Date: Tue Nov 27 22:25:41 2018 -0600 scsi: aacraid: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Also, a break statement is properly aligned. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen commit 8837aa8bc093b29bd52ba55f98ad206d5418d240 Author: Bart Van Assche Date: Tue Nov 27 15:04:54 2018 -0800 scsi: qla2xxx: Introduce a switch/case statement in qlt_xmit_tm_rsp() This patch improves code readability but does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8700bc76f1938198a7d4b72fd1f2937243c7d572 Author: Colin Ian King Date: Wed Nov 28 15:30:48 2018 +0000 scsi: mpt3sas: fix spelling mistake "manufaucturing" -> "manufacturing" There is a spelling mistake in some description text, fix it. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 30eb2e4cd5d69c15d4720f67db4be66f001dc9f6 Author: Tomas Winkler Date: Mon Nov 26 10:10:34 2018 +0200 scsi: ufs: add fall through annotation Add /* fallthrough */ annotation, to eliminate compilation warning: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Tomas Winkler Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 037bc0d43447336cc6e4a531f8a6519d2b206f80 Author: Nilesh Javali Date: Wed Nov 21 01:25:23 2018 -0800 scsi: qedi: Update driver version to 8.33.0.21 Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 9632a6b4b747ae6550f0877bfc7db7fec45bbee4 Author: Manish Rangankar Date: Wed Nov 21 01:25:22 2018 -0800 scsi: qedi: Move LL2 producer index processing in BH. 1. Removed logic to update HW producer index in interrupt context. 2. Update HW producer index after UIO ring and buffer gets initialized. Signed-off-by: Manish Rangankar Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit dcceeeb71fb7f927e609175dfd76bcdf0f44abc2 Author: Nilesh Javali Date: Wed Nov 21 01:25:21 2018 -0800 scsi: qedi: add module param to set ping packet size Default packet size is 0x400. For jumbo packets set to 0x2400. Signed-off-by: Nilesh Javali Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit cdd3ff87f10813e42ef6573a1c92a91a9fc24709 Author: Manish Rangankar Date: Wed Nov 21 01:25:20 2018 -0800 scsi: qedi: Add packet filter in light L2 Rx path. Add packet filter to avoid unnecessary packet processing in iscsiuio. Signed-off-by: Manish Rangankar Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit d5632b11f0a17efa6356311e535ae135d178438d Author: Manish Rangankar Date: Wed Nov 21 01:25:19 2018 -0800 scsi: qedi: Check for session online before getting iSCSI TLV data. The kernel panic was observed after switch side perturbation, BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] strcmp+0x20/0x40 PGD 0 Oops: 0000 [#1] SMP CPU: 8 PID: 647 Comm: kworker/8:1 Tainted: G W OE ------------ 3.10.0-693.el7.x86_64 #1 Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 06/20/2018 Workqueue: slowpath-13:00. qed_slowpath_task [qed] task: ffff880429eb8fd0 ti: ffff880429190000 task.ti: ffff880429190000 RIP: 0010:[] [] strcmp+0x20/0x40 RSP: 0018:ffff880429193c68 EFLAGS: 00010202 RAX: 000000000000000a RBX: 0000000000000002 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff88042bda7a41 RBP: ffff880429193c68 R08: 000000000000ffff R09: 000000000000ffff R10: 0000000000000007 R11: ffff88042b3af338 R12: ffff880420b007a0 R13: ffff88081aa56af8 R14: 0000000000000001 R15: ffff88081aa50410 FS: 0000000000000000(0000) GS:ffff88042fe00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000000019f2000 CR4: 00000000003407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff880429193d20 ffffffffc02a0c90 ffffc90004b32000 ffff8803fd3ec600 ffff88042bda7800 ffff88042bda7a00 ffff88042bda7840 ffff88042bda7a40 0000000129193d10 2e3836312e323931 ff000a342e363232 ffffffffc01ad99d Call Trace: [] qedi_get_protocol_tlv_data+0x270/0x470 [qedi] [] ? qed_mfw_process_tlv_req+0x24d/0xbf0 [qed] [] qed_mfw_fill_tlv_data+0x5e/0xd0 [qed] [] qed_mfw_process_tlv_req+0x269/0xbf0 [qed] Fix kernel NULL pointer deref by checking for session is online before getting iSCSI TLV data. Signed-off-by: Manish Rangankar Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 1a291bce5eaf5374627d337157544aa6499ce34a Author: Nilesh Javali Date: Wed Nov 21 01:25:18 2018 -0800 scsi: qedi: Allocate IRQs based on msix_cnt The driver load on some systems failed with error, [0004:01:00.5]:[qedi_request_msix_irq:2524]:8: request_irq failed. Allocate the IRQs based on MSIX count obtained from qed module instead of number of queues. Signed-off-by: Nilesh Javali Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit fa97c51109867c17b91ff01bc21f99d20e446968 Author: Nilesh Javali Date: Wed Nov 21 01:25:17 2018 -0800 scsi: qedi: Replace PAGE_SIZE with QEDI_PAGE_SIZE Use QEDI_PAGE_SIZE for enablement of module on systems with 64K page size. Signed-off-by: Nilesh Javali Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit f853053da9754d488c43ede24485881ac929c8d9 Author: Nilesh Javali Date: Wed Nov 21 01:25:16 2018 -0800 scsi: qedi: Fix spelling mistake "OUSTANDING" -> "OUTSTANDING" Fix trivial spelling mistake within macro definition. Signed-off-by: Nilesh Javali Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 3fb5a21fd008a9f4e7f172f062fa04b35e16b9d4 Author: Nilesh Javali Date: Wed Nov 21 01:25:15 2018 -0800 scsi: qedi: Cleanup redundant QEDI_PAGE_SIZE macro definition Remove redundant macro definition. Signed-off-by: Nilesh Javali Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 2b45ebef39a2caad409f70b22b4a2a41df9815b6 Author: Neil Armstrong Date: Sun Nov 18 14:50:23 2018 +0100 soc: amlogic: Add Meson Clock Measure driver The Amlogic Meson SoCs embeds a clock measurer IP to measure the internal clock paths frequencies. The precision is determined by stepping into the duration until the counter overflows. The debugfs slows a pretty summary and each clock can be measured individually aswell. Cc: Martin Blumenstingl Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit b4c29e89026892494952b648f03958906d357129 Author: Neil Armstrong Date: Sun Nov 18 14:53:10 2018 +0100 dt-bindings: amlogic: Add Internal Clock Measurer bindings The Amlogic Meson SoCs embeds a clock measurer IP to measure the internal clock paths frequencies. Acked-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Kevin Hilman commit 7b141abe4aa137f362d7324de5a49fd3105f570f Author: Martin Blumenstingl Date: Fri Nov 16 21:42:35 2018 +0100 ARM: dts: meson: add the clock inputs for the Meson timer The Meson Timer IP block has two clock inputs: - clk81 for using the system clock as timebase - xtal for a timebase with 1us, 10us, 100us and 1ms resolution The clocksource driver does not use these yet, but it's still a good idea to add them as this describes how the hardware actually works internally. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 523b8b31d3e1292b69f233e1a1814151878d6ac8 Author: Martin Blumenstingl Date: Fri Nov 16 21:42:34 2018 +0100 ARM: dts: meson: add the TIMER B/C/D interrupts The timer on Meson6/Meson8/Meson8b SoCs has four internal timer events. For each of these a separate interrupt exists. Pass these interrupts to allow using the timers other than TIMER A. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 7e26335b1a3fb2400fcf6d5eb35328257ea2e139 Author: Jerome Brunet Date: Fri Nov 9 15:04:45 2018 +0100 ARM: dts: meson: consistently disable pin bias On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies. As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems. The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined. There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option. This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself. Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 5cfc879caee810828d90aec808d85560f34f02af Author: Masahiro Yamada Date: Mon Nov 26 17:15:41 2018 +0900 pcmcia: remove per-arch PCMCIA config entry Now that all architectures include drivers/pcmcia/Kconfig where the PCMCIA config is defined, the PCMCIA config entries in per-arch Kconfig files are redundant. Signed-off-by: Masahiro Yamada Reviewed-by: Christoph Hellwig Acked-by: Dominik Brodowski commit c2e7075ca83036317cee4a564729eb82a5433169 Author: Rob Herring Date: Wed Nov 28 18:37:35 2018 -0600 scripts/dtc: Update to upstream version v1.4.7-57-gf267e674d145 This adds the following commits from upstream: f267e674d145 checks: Fix crash with multiple source annotations 3616b9a811b6 checks: Use source position information for check failures 2bdbd07a1223 checks: Make each message output atomic a1eff70c02cf util: Add xa{v}sprintf_append functions 82a52ce4573b libfdt: Add a test for fdt_getprop_by_offset() 607b8586b383 PEP8 / Flake8 cleanups for setup.py f9c0a425b648 Remove broken objdir / srcdir support 5182b5e6f28c pylibfdt: Use common PREFIX variable d45bf1f5f2a6 Refine make tests_clean target 99284c4db9cb Refine pylibfdt_clean target a4629cfaedfb Refine libfdt_clean target 08380fc43aa2 tests: Use modern octal literals for Python 8113c00b99d3 pylibfdt: Allow switch to Python 3 via environment variable PYTHON 11738cf01f15 libfdt: Don't use memcpy to handle unaligned reads on ARM 86a288a73670 checks: Restructure check_msg to decrease indentation 5667e7ef9a9a annotations: add the annotation functionality 8e20ccf52f90 annotations: add positions ca930e20bb54 tests: Don't lose errors from make checkm 43366bb4eeee tests: Property count valgrind errors in wrapped tests 5062516fb8cb srcpos: Remove srcpos_empty a3143fafbf83 Revert "annotations: add positions" 403cc79f06a1 checks: Update SPI bus check for 'spi-slave' baa1d2cf7894 annotations: add positions ff2ad38f6a5a Merge remote-tracking branch 'origin/pr/18' aa7254d9cb17 libfdt: return correct value if #size-cells property is not present 49903aed7783 use ptrdiff_t modifier for printing pointer differences da2b691ccf68 treesource: Fix dts output for phandles in middle of a sequence of ints 8f8b77a0d62d tests: Wrap check_align() calls with base_run_test() 522d81d572f2 Fix dts output with a REF_PATH marker e45198c98359 Added test cases for target references 0fcffda15e9f Merge nodes with local target label references 1e4a0928f3b3 pylibfdt: Don't have setup.py depend on where it's invoked from ca399b14956f pylibfdt: Eliminate run_setup make function 98972f1b3e33 pylibfdt: Improved version extraction 7ba2be6cda5f pylibfdt: Don't silence setup.py when V=1 7691f9d39301 pylibfdt: Make SETUP make variable 855b9963def9 pylibfdt: Simpler CFLAGS handling 47cafbeeb977 pylibfdt: Link extension module with libfdt rather than rebuilding dd695d6afb19 pylibfdt: Correctly set build output directory 59327523d0d8 pylibfdt: We don't need include files from the base directory e84742aa7b93 checks: fix simple-bus compatible matching 8c59a97ce096 Fix missing labels when emitting dts format d448f9a5fd94 Revert dts output formatting changes of spaces around brackets Signed-off-by: Rob Herring commit 1ec28f8b8ada4e4f77d1af006a3a474f4f83b8e3 Merge: 61647c77cb153 2e6e902d18502 Author: Dave Airlie Date: Thu Nov 29 10:34:03 2018 +1000 Merge v4.20-rc4 into drm-next Requested by Boris Brezillon for some vc4 fixes that are needed for future vc4 work. Signed-off-by: Dave Airlie commit 61647c77cb15354a329cbb36fe7a2253b36b51b1 Merge: 1a31c26ed7b49 08f73d668048f Author: Dave Airlie Date: Thu Nov 29 10:21:23 2018 +1000 Merge tag 'drm-misc-next-2018-11-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v4.21: Core Changes: - Merge drm_info.c into drm_debugfs.c - Complete the fake drm_crtc_commit's hw_done/flip_done sooner. - Remove deprecated drm_obj_ref/unref functions. All drivers use get/put now. - Decrease stack use of drm_gem_prime_mmap. - Improve documentation for dumb callbacks. Driver Changes: - Add edid support to virtio. - Wait on implicit fence in meson and sun4i. - Add support for BGRX8888 to sun4i. - Preparation patches for sun4i driver to start supporting linear and tiled YUV formats. - Add support for HDMI 1.4 4k modes to meson, and support for VIC alternate timings. - Drop custom dumb_map in vkms. - Small fixes and cleanups to v3d. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/151a3270-b1be-ed75-bd58-6b29d741f592@linux.intel.com commit 1a31c26ed7b495f152e3103dc7c68e3307a39541 Merge: bfeb122d3080b 256856efb8cc2 Author: Dave Airlie Date: Thu Nov 29 10:19:04 2018 +1000 Merge tag 'du-next-20181123' of git://linuxtv.org/pinchartl/media into drm-next R-Car DU changes for v4.21: - R8A7744 and R8A77470 support - R8A77965 LVDS support - Miscellaneous fixes Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/3165107.GPE8tO0qUE@avalon commit 4ecd94b8e13b014a28be48c94f751fb62f7c749e Author: Gustavo A. R. Silva Date: Thu Jul 5 15:38:07 2018 -0500 platform/x86: dell-laptop: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Darren Hart (VMware) commit 1ad93ab10e24856ea1ae9f0fd3352992afa67e1b Author: David Miller Date: Wed Nov 28 12:56:10 2018 -0800 bpf: Fix various lib and testsuite build failures on 32-bit. Cannot cast a u64 to a pointer on 32-bit without an intervening (long) cast otherwise GCC warns. Signed-off-by: David S. Miller Acked-by: Song Liu Signed-off-by: Alexei Starovoitov commit 59a206b4499edf4c54fd53983f0e366eef052b05 Author: David Disseldorp Date: Fri Nov 23 18:36:13 2018 +0100 scsi: target: replace fabric_ops.name with fabric_alias iscsi_target_mod is the only LIO fabric where fabric_ops.name differs from the fabric_ops.fabric_name string. fabric_ops.name is used when matching target/$fabric ConfigFS create paths, so rename it .fabric_alias and fallback to target/$fabric vs .fabric_name comparison if .fabric_alias isn't initialised. iscsi_target_mod is the only fabric module to set .fabric_alias . All other fabric modules rely on .fabric_name matching and can drop the duplicate string. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 30c7ca9350048486ab32fdb9f5f6ed0603bba39a Author: David Disseldorp Date: Fri Nov 23 18:36:12 2018 +0100 scsi: target: drop unnecessary get_fabric_name() accessor from fabric_ops All fabrics return a const string. In all cases *except* iSCSI the get_fabric_name() string matches fabric_ops.name. Both fabric_ops.get_fabric_name() and fabric_ops.name are user-facing, with the former being used for PR/ALUA state and the latter for ConfigFS (config/target/$name), so we unfortunately need to keep both strings around for now. Replace the useless .get_fabric_name() accessor function with a const string fabric_name member variable. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 6baca7601bdee2e57f20c45d63eb53b89b33e816 Author: David Disseldorp Date: Fri Nov 23 18:36:11 2018 +0100 scsi: target: drop unused pi_prot_format attribute storage On write, the pi_prot_format configfs attribute invokes the device format_prot() callback if present. Read dumps the contents of se_dev_attrib.pi_prot_format which is always zero. Make the configfs attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format storage. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit bfeb122d3080b03aa49405c615f4d8144ab30073 Merge: b239499f927f7 b4bf44d2dcbd6 Author: Dave Airlie Date: Thu Nov 29 09:50:33 2018 +1000 Merge tag 'drm-intel-next-2018-11-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Changes outside i915: - Connector property to limit max bpc (Radhakrishna) - Fix LPE audio runtime PM and deinit (Ville) - DP FEC prep work (Anusha) - Mark pinned shmemfs pages as unevictable (Kuo-Hsin) - Backmerge drm-next (Jani) Inside i915: - Revert OA UAPI change that lacks userspace (Joonas) - Register macro cleanup (Jani) - 32-bit build fixes on pin flags (Chris) - Fix MG DP mode and PHY gating for HDMI (Imre) - DP MST race, hpd and irq fixes (Lyude) - Combo PHY fixes and cleanup (Imre, Lucas) - Move display init and cleanup under modeset init and cleanup (José) - PSR fixes (José) - Subslice size fixes (Daniele) - Abstract and clean up fixed point helpers (Jani) - Plane input CSC for YUV to RGB conversion (Uma) - Break long iterations for get/put shmemfs pages (Chris) - Improve DDI encoder hw state readout sanity checks (Imre) - Fix power well leaks for MST (José) - Scaler fixes (Ville) - Watermark fixes (Ville) - Fix VLV/CHV DSI panel orientation readout (Ville) - ICL rawclock fixes (Paulo) - Workaround DMC power well request issues (Imre) - Plane allocation fix (Maarten) - Transcoder enum value/ordering robustness fixes (Imre) - UTS_RELEASE build dependency fix (Hans Holmberg) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87k1l4cesj.fsf@intel.com commit 9095d0f8eae4bf6b4d63a36623ee1ad5a164df43 Author: YueHaibing Date: Mon Nov 19 01:57:15 2018 +0000 soc: qcom: llcc-slice: Remove duplicated include from llcc-slice.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Andy Gross commit 972910948fb6f555e83f37bc6172f51984d738a9 Author: Andy Gross Date: Thu Nov 15 11:35:10 2018 -0800 ARM: dts: qcom: Remove Arrow SD600 eval board This patch removes support for the APQ8064 based Arrow SD600 eval board. This board was never sold publicly and had very limited distribution. As such, we are removing this board and no longer going to support it. Signed-off-by: Andy Gross Reviewed-by: Bjorn Andersson Reviewed-by: Nicolas Dechesne Acked-by: Olof Johansson commit f50c9d797d3df41e13265491c722d3d15b038d57 Author: Colin Ian King Date: Sat Nov 3 16:12:53 2018 +0000 nfsd: clean up indentation, increase indentation in switch statement Trivial fix to clean up indentation, add in missing tabs. Signed-off-by: Colin Ian King Signed-off-by: J. Bruce Fields commit 97bce63408f192712574a4d9d6dcab794eed3a79 Author: Chuck Lever Date: Tue Nov 27 11:11:35 2018 -0500 svcrdma: Optimize the logic that selects the R_key to invalidate o Select the R_key to invalidate while the CPU cache still contains the received RPC Call transport header, rather than waiting until we're about to send the RPC Reply. o Choose Send With Invalidate if there is exactly one distinct R_key in the received transport header. If there's more than one, the client will have to perform local invalidation after it has already waited for remote invalidation. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit b493fd31c0b89d9453917e977002de58bebc3802 Author: Scott Mayhew Date: Tue Nov 6 13:35:08 2018 -0500 nfsd: fix a warning in __cld_pipe_upcall() __cld_pipe_upcall() emits a "do not call blocking ops when !TASK_RUNNING" warning due to the dput() call in rpc_queue_upcall(). Fix it by using a completion instead of hand coding the wait. Signed-off-by: Scott Mayhew Signed-off-by: J. Bruce Fields commit 62a063b8e7d1db684db3f207261a466fa3194e72 Author: J. Bruce Fields Date: Tue Nov 27 15:54:17 2018 -0500 nfsd4: fix crash on writing v4_end_grace before nfsd startup Anatoly Trosinenko reports that this: 1) Checkout fresh master Linux branch (tested with commit e195ca6cb) 2) Copy x84_64-config-4.14 to .config, then enable NFS server v4 and build 3) From `kvm-xfstests shell`: results in NULL dereference in locks_end_grace. Check that nfsd has been started before trying to end the grace period. Reported-by: Anatoly Trosinenko Signed-off-by: J. Bruce Fields commit 28d13d317bacd7b5316a8bd21488e9850b8e84c1 Author: Douglas Anderson Date: Mon Nov 5 13:09:20 2018 -0800 ARM: dts: qcom: Add SoC-specific string for sdhci-msm-v4 nodes As per upstream discussion [1], we should have an SoC-specific compatible string for Qualcomm's SDHCI nodes. Let's add it. [1] https://lkml.kernel.org/r/20181105203657.GA32282@bogus Signed-off-by: Douglas Anderson Signed-off-by: Andy Gross commit 0567022c019ad1a1d7bb980a99797f7a7a11d7d3 Author: Brian Masney Date: Wed Nov 28 04:53:35 2018 -0500 ARM: dts: qcom: msm8974-hammerhead: correct gpios property on magnetometer This patch correctly sets the gpios property for the ak8963 magnetometer's DRDY pin so that interrupts work properly. Signed-off-by: Brian Masney Signed-off-by: Andy Gross commit 9e908a180e6a90fa102d5d3f96ca86825f43e4fb Author: Takashi Iwai Date: Mon Nov 26 17:47:47 2018 +0100 platform/x86: thinkpad_acpi: Drop superfluous exported function Since we've switched to the LED trigger for binding with HD-audio, we can drop the exported function as well as the whole linux/thinkpad_acpi.h. The own TPACPI_LED_MUTE and TPACPI_LED_MICMUTE definitions are replaced with the identical ones for LEDS, i.e. LED_AUDIO_MUTE and LED_AUDIO_MICMUTE, respectively. They are no longer needed as referred only locally. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Andy Shevchenko Acked-by: Henrique de Moraes Holschuh Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit f783e128a6f1484d72ceab06d483ea32df0ce333 Author: Takashi Iwai Date: Mon Nov 26 17:47:46 2018 +0100 platform/x86: dell-laptop: Drop superfluous exported function Since we've switched to the LED trigger for binding with HD-audio, we can drop the exported function as well as the whole linux/dell-led.h. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Andy Shevchenko Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit b3802783d0b58989d70a484aa2d50fb8ce40841b Author: Takashi Iwai Date: Mon Nov 26 17:47:46 2018 +0100 ALSA: hda - Support led audio trigger Now all relevant platform drivers are providing the LED audio trigger, we can switch the mute LED control with the LED trigger, finally. For the mic-mute LED trigger, a common fixup function, snd_hda_gen_fixup_micmute_led(), is provided to be called for the corresponding quirk entries. This sets up the capture sync hook with ledtrig_audio_set() call appropriately. For the mute LED trigger, which is done currently only for thinkpad_acpi, the call is replaced with ledtrig_audio_set() as well. Overall, the beauty of the new implementation is that the whole ugly bindings with request_symbol() are dropped, and also that it provides more flexibility to users. One potential behavior change by this patch is that the mute LED enum may be created on machines that actually have no LED device. In the former code, we did test-call and abort binding if the test failed. But with the LED-trigger binding, this test isn't possible, and the actual check is done in the LED class device side. So it's the downside of simpleness. Also, note that the HD-audio codec driver doesn't select CONFIG_LEDS and co by itself. It's supposed to be selected by the platform drivers instead. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit 4e1d092445a58b0a58d2743448a7aa17ae1cb0ef Author: Takashi Iwai Date: Mon Nov 26 17:47:45 2018 +0100 platform/x86: thinkpad_acpi: Add audio mute LED classdev support In the upcoming change, the binding of audio mute / mic-mute LED controls will be switched with LED trigger. This patch is the last piece of preparation: adding the audio mute / mic-mute LED class devices to thinkpad_acpi driver. Two devices, platform::mute and platform::micmute, will be added for controlling the mute LED and mic-mute LED, respectively. The new prefix "platform" is the suggestion by upstream for indicating the generic laptop attribute. Also this selects CONFIG_LEDS_TRIGGERS and CONFIG_LEDS_TRIGGERS_AUDIO unconditionally. Strictly speaking, these aren't 100% mandatory, but leaving these manual selections would lead to a functional regression easily once after converting from the dynamic symbol binding to the LEDs trigger in a later patch. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Andy Shevchenko Acked-by: Henrique de Moraes Holschuh Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit d00fa46e0a2c670d980af6e9e81b41ae3f9f02b5 Author: Takashi Iwai Date: Mon Nov 26 17:47:45 2018 +0100 platform/x86: dell-laptop: Add micmute LED trigger support This patch adds the LED trigger support for audio mic-mute control. As of this patch, the LED device isn't tied with the audio driver, and can be changed via user-space at "platform::micmute" sysfs entry. (This new prefix "platform" is the agreement among people for indicating the generic laptop / system-wide attribute.) The binding with HD-audio is still done via the existing exported dell_micmute_led_set(). It will be replaced with the LED trigger binding in later patches. Also this selects CONFIG_LEDS_TRIGGERS and CONFIG_LEDS_TRIGGERS_AUDIO unconditionally. Strictly speaking, these aren't 100% mandatory, but leaving these manual selections would lead to a functional regression easily once after converting from the dynamic symbol binding to the LEDs trigger in a later patch. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Andy Shevchenko Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit e374e06880f93fffdc5ce320c9152bad4776911f Author: Yangtao Li Date: Fri Nov 23 10:01:04 2018 -0500 clk: tegra: Change to use DEFINE_SHOW_ATTRIBUTE macro Use macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit 9579346ecf761303fc85be908d1ad3d947fac354 Author: Yangtao Li Date: Fri Nov 23 10:06:00 2018 -0500 clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro Use macro to simplify the code. Signed-off-by: Yangtao Li [sboyd@kernel.org: Rename show function to keep compiling] Signed-off-by: Stephen Boyd commit 1861a7f07e02292830a1ca256328d370deefea30 Author: Yangtao Li Date: Sat Nov 24 09:52:23 2018 -0500 soc: bcm: brcmstb: Don't leak device tree node reference of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. soc_is_brcmstb() doesn't do that, so fix it. [treding: slightly rewrite to avoid inline comparison] Fixes: d52fad262041 ("soc: add stubs for brcmstb SoC's") Signed-off-by: Yangtao Li Signed-off-by: Florian Fainelli commit 922b8fae085d6561ef4a2d1527a14bfde82fd1e8 Author: Douglas Anderson Date: Wed Nov 28 10:57:42 2018 -0800 dt-bindings: clock: qcom: Fix the xo parent in gpucc example In the bindings that landed for the gpucc we require that the XO clock (one possible parent of the gpucc) be listed. The code doesn't use this yet--this is just to allow us to move toward the day when it does use it. What the code does do today is to hardcode the parent name to "bi_tcxo". That's all well and good. ...but the example in the bindings shows this clock mapping to the clock "xo_board". On the current sdm845.dtsi file the "xo_board" clock is a fixed clock with an output name of "xo_board". The clock with the name "bi_tcxo" is actually provided by the RPMh Clock Controller. Presumably that's the one that was wanted. Let's update the example to make this clearer. Fixes: e431c92188a9 ("dt-bindings: clock: Introduce QCOM Graphics clock bindings") Signed-off-by: Douglas Anderson Signed-off-by: Stephen Boyd commit 74c31ff9c84a9eb55df34b4bba1870fe1cdcf678 Author: Douglas Anderson Date: Wed Nov 28 10:48:59 2018 -0800 clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6 In an earlier version of commit 453361cdd757 ("clk: qcom: Add graphics clock controller driver for SDM845") there were 6 listed parents for "gpu_cc_gmu_clk_src". In the version that landed there were 5. ...but "num_parents" was still left at 6. On my system this goes boom at bootup. Fixes: 453361cdd757 ("clk: qcom: Add graphics clock controller driver for SDM845") Signed-off-by: Douglas Anderson Signed-off-by: Stephen Boyd commit 295daee4ba108a025b9ac66231b0700e18ff5315 Author: Naresh Kamboju Date: Tue Nov 27 20:54:44 2018 +0530 selftests/bpf: add config fragment CONFIG_FTRACE_SYSCALLS CONFIG_FTRACE_SYSCALLS=y is required for get_cgroup_id_user test case this test reads a file from debug trace path /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id Signed-off-by: Naresh Kamboju Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 36dbe571c2c9ac21b964fc87f3e34206b33507ac Merge: 17d95e4225bf2 1ade9abadfca0 Author: Daniel Borkmann Date: Wed Nov 28 22:07:57 2018 +0100 Merge branch 'bpf-sk-msg-pop-data' John Fastabend says: ==================== After being able to add metadata to messages with sk_msg_push_data we have also found it useful to be able to "pop" this metadata off before sending it to applications in some cases. This series adds a new helper sk_msg_pop_data() and the associated patches to add tests and tools/lib support. Thanks! v2: Daniel caught that we missed adding sk_msg_pop_data to the changes data helper so that the verifier ensures BPF programs revalidate data after using this helper. Also improve documentation adding a return description and using RST syntax per Quentin's comment. And delta calculations for DROP with pop'd data (albeit a strange set of operations for a program to be doing) had potential to be incorrect possibly confusing user space applications, so fix it. ==================== Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 1ade9abadfca0250c8256bb222a1cd5cc5fa8bbc Author: John Fastabend Date: Mon Nov 26 14:16:19 2018 -0800 bpf: test_sockmap, add options for msg_pop_data() helper Similar to msg_pull_data and msg_push_data add a set of options to have msg_pop_data() exercised. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit d913a2273a8988cd810a031bfa08249ca7dd5f7c Author: John Fastabend Date: Mon Nov 26 14:16:18 2018 -0800 bpf: add msg_pop_data helper to tools Add the necessary header definitions to tools for new msg_pop_data_helper. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit 7246d8ed4dcce23f7509949a77be15fa9f0e3d28 Author: John Fastabend Date: Mon Nov 26 14:16:17 2018 -0800 bpf: helper to pop data from messages This adds a BPF SK_MSG program helper so that we can pop data from a msg. We use this to pop metadata from a previous push data call. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann commit b3f4bdda998be6018b76f46b852313ae74db5606 Author: Young Xiao Date: Tue Nov 27 11:50:17 2018 +0000 drm: radeon: fix overflow on 32bit systems the type mem->start is unsigned long, so this can overflow on 32bit system, since the type addr is uint64_t. Reviewed-by: Christian König Signed-off-by: Young Xiao Signed-off-by: Alex Deucher commit ce99814973ac8bd94e371a65c023efc4703af6f6 Author: Colin Ian King Date: Tue Nov 27 14:19:43 2018 +0000 drm/amd/pp: fix spelling mistake "dependancy" -> "dependency" There are spelling mistakes in PP_ASSERT_WITH_CODE messages, fix these. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 3b34c14fd50c302db091f020f26dd00ede902c80 Author: Chris Wilson Date: Fri Nov 16 09:34:24 2018 +0000 drm/amdgpu: Reorder uvd ring init before uvd resume As amd_uvd_resume() accesses the uvd ring, it must be initialised first or else we trigger errors like: [ 5.595963] [drm] Found UVD firmware Version: 1.87 Family ID: 17 [ 5.595969] [drm] PSP loading UVD firmware [ 5.596266] ------------[ cut here ]------------ [ 5.596268] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: (null) [ 5.596285] WARNING: CPU: 0 PID: 507 at lib/debugobjects.c:329 debug_print_object+0x6a/0x80 [ 5.596286] Modules linked in: amdgpu(+) hid_logitech_hidpp(+) chash gpu_sched amd_iommu_v2 ttm drm_kms_helper crc32c_intel drm hid_sony ff_memless igb hid_logitech_dj nvme dca i2c_algo_bit nvme_core wmi pinctrl_amd uas usb_storage [ 5.596299] CPU: 0 PID: 507 Comm: systemd-udevd Tainted: G W 4.20.0-0.rc1.git4.1.fc30.x86_64 #1 [ 5.596301] Hardware name: System manufacturer System Product Name/ROG STRIX X470-I GAMING, BIOS 0901 07/23/2018 [ 5.596303] RIP: 0010:debug_print_object+0x6a/0x80 [ 5.596305] Code: 8b 43 10 83 c2 01 8b 4b 14 4c 89 e6 89 15 e6 82 b0 02 4c 8b 45 00 48 c7 c7 60 fd 34 a6 48 8b 14 c5 a0 da 08 a6 e8 6a 6a b8 ff <0f> 0b 5b 83 05 d0 45 3e 01 01 5d 41 5c c3 83 05 c5 45 3e 01 01 c3 [ 5.596306] RSP: 0018:ffffa02ac863f8c0 EFLAGS: 00010282 [ 5.596307] RAX: 0000000000000000 RBX: ffffa02ac863f8e0 RCX: 0000000000000006 [ 5.596308] RDX: 0000000000000007 RSI: ffff9160e9a7bfe8 RDI: ffff9160f91d6c60 [ 5.596310] RBP: ffffffffa6742740 R08: 0000000000000002 R09: 0000000000000000 [ 5.596311] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa634ff69 [ 5.596312] R13: 00000000000b79d0 R14: ffffffffa80f76d8 R15: 0000000000266000 [ 5.596313] FS: 00007f762abf7940(0000) GS:ffff9160f9000000(0000) knlGS:0000000000000000 [ 5.596314] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.596315] CR2: 000055fdc593f000 CR3: 00000007e999c000 CR4: 00000000003406f0 [ 5.596317] Call Trace: [ 5.596321] debug_object_assert_init+0x14a/0x180 [ 5.596327] del_timer+0x2e/0x90 [ 5.596383] amdgpu_fence_process+0x47/0x100 [amdgpu] [ 5.596430] amdgpu_uvd_resume+0xf6/0x120 [amdgpu] [ 5.596475] uvd_v7_0_sw_init+0xe0/0x280 [amdgpu] [ 5.596523] amdgpu_device_init.cold.30+0xf97/0x14b6 [amdgpu] [ 5.596563] ? amdgpu_driver_load_kms+0x53/0x330 [amdgpu] [ 5.596604] amdgpu_driver_load_kms+0x86/0x330 [amdgpu] [ 5.596614] drm_dev_register+0x115/0x150 [drm] [ 5.596654] amdgpu_pci_probe+0xbd/0x120 [amdgpu] [ 5.596658] local_pci_probe+0x41/0x90 [ 5.596661] pci_device_probe+0x188/0x1a0 [ 5.596666] really_probe+0xf8/0x3b0 [ 5.596669] driver_probe_device+0xb3/0xf0 [ 5.596672] __driver_attach+0xe1/0x110 [ 5.596674] ? driver_probe_device+0xf0/0xf0 [ 5.596676] bus_for_each_dev+0x79/0xc0 [ 5.596679] bus_add_driver+0x155/0x230 [ 5.596681] ? 0xffffffffc07d9000 [ 5.596683] driver_register+0x6b/0xb0 [ 5.596685] ? 0xffffffffc07d9000 [ 5.596688] do_one_initcall+0x5d/0x2be [ 5.596691] ? rcu_read_lock_sched_held+0x79/0x80 [ 5.596693] ? kmem_cache_alloc_trace+0x264/0x290 [ 5.596695] ? do_init_module+0x22/0x210 [ 5.596698] do_init_module+0x5a/0x210 [ 5.596701] load_module+0x2137/0x2430 [ 5.596703] ? lockdep_hardirqs_on+0xed/0x180 [ 5.596714] ? __do_sys_init_module+0x150/0x1a0 [ 5.596715] __do_sys_init_module+0x150/0x1a0 [ 5.596722] do_syscall_64+0x60/0x1f0 [ 5.596725] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 5.596726] RIP: 0033:0x7f762b877dee [ 5.596728] Code: 48 8b 0d 9d 20 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 6a 20 0c 00 f7 d8 64 89 01 48 [ 5.596729] RSP: 002b:00007ffc777b8558 EFLAGS: 00000246 ORIG_RAX: 00000000000000af [ 5.596730] RAX: ffffffffffffffda RBX: 000055fdc48da320 RCX: 00007f762b877dee [ 5.596731] RDX: 00007f762b9f284d RSI: 00000000006c5fc6 RDI: 000055fdc527a060 [ 5.596732] RBP: 00007f762b9f284d R08: 0000000000000003 R09: 0000000000000002 [ 5.596733] R10: 000055fdc48ad010 R11: 0000000000000246 R12: 000055fdc527a060 [ 5.596734] R13: 000055fdc48dca20 R14: 0000000000020000 R15: 0000000000000000 [ 5.596740] irq event stamp: 134618 [ 5.596743] hardirqs last enabled at (134617): [] console_unlock+0x45e/0x610 [ 5.596744] hardirqs last disabled at (134618): [] trace_hardirqs_off_thunk+0x1a/0x1c [ 5.596746] softirqs last enabled at (133146): [] __do_softirq+0x365/0x47c [ 5.596748] softirqs last disabled at (133139): [] irq_exit+0x119/0x120 [ 5.596749] ---[ end trace eaee508abfebccdc ]--- Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108709 Reviewed-by: Christian König Signed-off-by: Chris Wilson Cc: Alex Deucher Signed-off-by: Alex Deucher commit 26bc534094ed45fdedef6b4ce8b96030340c5ce7 Author: Andrey Grodzovsky Date: Thu Nov 22 18:57:08 2018 -0500 drm/amdgpu: Refactor GPU reset for XGMI hive case For XGMI hive case do reset in steps where each step iterates over all devs in hive. This especially important for asic reset since all PSP FW in hive must come up within a limited time (around 1 sec) to properply negotiate the link. Do this by refactoring amdgpu_device_gpu_recover and amdgpu_device_reset into pre_asic_reset, asic_reset and post_asic_reset functions where is part is exectued for all the GPUs in the hive before going to the next step. v2: Update names for amdgpu_device_lock/unlock functions. v3: Introduce per hive locking to avoid multiple resets for GPUs in same hive. v4: Remove delayed_workqueue()/ttm_bo_unlock_delayed_workqueue() - they are copy & pasted over from radeon and on amdgpu there isn't any reason for that any more. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ed2bf5229c53f20cfbca7a34fcbafa91c3168e1e Author: Andrey Grodzovsky Date: Wed Nov 14 15:50:05 2018 -0500 drm/amdgpu: Expose hive adev list and xgmi_mutex It's needed for device reset of entire hive. v3: Add per hive lock to allow avoiding duplicate resets triggered by multiple members of same hive. Expose amdgpu_hive_info instead of adding getter functions. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit 5183411b56bde159e5c3172fcb8904f8421c2c38 Author: Andrey Grodzovsky Date: Mon Nov 12 16:16:03 2018 -0500 drm/amdgpu: Refactor amdgpu_xgmi_add_device This is prep work for updating each PSP FW in hive after GPU reset. Split into build topology SW state and update each PSP FW in the hive. Save topology and count of XGMI devices for reuse. v2: Create seperate header for XGMI. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Signed-off-by: Alex Deucher commit bb47de736661887f37b5380f68a3faedf077aed0 Author: Nicholas Kazlauskas Date: Thu Oct 4 13:03:30 2018 -0400 drm/amdgpu: Set FreeSync state using drm VRR properties Support for AMDGPU specific FreeSync properties and ioctls are dropped from amdgpu_dm in favor of supporting drm variable refresh rate properties. The notify_freesync and set_freesync_property functions are dropped from amdgpu_display_funcs. The drm vrr_capable property is now attached to any DP/HDMI connector. Its value is updated accordingly to the connector's FreeSync capabiltiy. The freesync_enable logic and ioctl control has has been dropped in favor of utilizing the vrr_enabled on the drm CRTC. This allows for more fine grained atomic control over which CRTCs should support variable refresh rate. To handle state changes for vrr_enabled it was easiest to drop the forced modeset on freesync_enabled change. This patch now performs the required stream updates when planes are flipped. This is done for a few reasons: (1) VRR stream updates can be done in the fast update path (2) amdgpu_dm_atomic_check would need to be hacked apart to check desired variable refresh state and capability before the CRTC disable pass. (3) Performing VRR stream updates on-flip is needed for enabling BTR support. VRR packets and timing adjustments are now tracked and compared to previous values sent to the hardware. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 520f08df45fbe300ed650da786a74093d658b7e1 Author: Nicholas Kazlauskas Date: Thu Nov 1 11:00:59 2018 -0400 drm/amdgpu: Correct get_crtc_scanoutpos behavior when vpos >= vtotal When variable refresh rate is active the hardware counter can return a position >= vtotal. This results in a vpos being returned from amdgpu_display_get_crtc_scanoutpos that's a positive value. The positive value indicates to the caller that the display is currently in scanout when the display is actually still in vblank. This is because the vfront porch duration is unknown with variable refresh active and will end when either a page flip occurs or the timeout specified by the driver/display is reached. The behavior of the amdgpu_display_get_crtc_scanoutpos remains the same when the position is below vtotal. When the position is above vtotal the function will return a value that is effectively -vbl_end, the size of the vback porch. The only caller affected by this change is the DRM helper for calculating vblank timestamps. This change corrects behavior for calculating the page flip timestamp from being the previous timestamp to the calculation to the next timestamp when position >= vtotal. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit ab7a664f7a2d6230689ba6b7c8976f23789179d7 Author: Nicholas Kazlauskas Date: Thu Oct 4 14:38:42 2018 -0400 drm: Document variable refresh properties These include the drm_connector 'vrr_capable' and the drm_crtc 'vrr_enabled' properties. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Pekka Paalanen Signed-off-by: Alex Deucher commit 1398958cfd8d331342d657d37151791dd7256b40 Author: Nicholas Kazlauskas Date: Thu Oct 4 11:46:07 2018 -0400 drm: Add vrr_enabled property to drm CRTC This patch introduces the 'vrr_enabled' CRTC property to allow dynamic control over variable refresh rate support for a CRTC. This property should be treated like a content hint to the driver - if the hardware or driver is not capable of driving variable refresh timings then this is not considered an error. Capability for variable refresh rate support should be determined by querying the vrr_capable drm connector property. It is worth noting that while the property is intended for atomic use it isn't filtered from legacy userspace queries. This allows for Xorg userspace drivers to implement support. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit ba1b0f6c73d4ea1390f0d5381f715ffa20c75f09 Author: Nicholas Kazlauskas Date: Tue Sep 18 09:55:20 2018 -0400 drm: Add vrr_capable property to the drm connector Modern display hardware is capable of supporting variable refresh rates. This patch introduces the "vrr_capable" property on the connector to allow userspace to query support for variable refresh rates. Atomic drivers should attach this property to connectors that are capable of driving variable refresh rates using drm_connector_attach_vrr_capable_property(). The value should be updated based on driver and hardware capability by using drm_connector_set_vrr_capable_property(). Signed-off-by: Nicholas Kazlauskas Reviewed-by: Manasi Navare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit cde577bd116e14174652c5abe1f881381c9a131e Author: Oak Zeng Date: Fri Nov 23 13:48:27 2018 -0600 drm/amdgpu: Move doorbell structures to seperate file Move doorbell structures, enum definitions and helper functions from amdgpu.h to amdgpu_doorbell.h. No functional change Signed-off-by: Oak Zeng Proposed-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9564f1928ed29b093bb997df9573e8edae61983d Author: Oak Zeng Date: Mon Nov 19 15:20:07 2018 -0600 drm/amdgpu: Use asic specific doorbell index instead of macro definition ASIC specific doorbell layout is used instead of enum definition Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6585661ddd6a0a47c4d2a70e1441031c294e6de2 Author: Oak Zeng Date: Mon Nov 19 14:36:09 2018 -0600 drm/amdgpu: Call doorbell index init on device initialization Also call functioin amdgpu_device_doorbell_init after amdgpu_device_ip_early_init because the former depends on the later to set up asic-specific init_doorbell_index function Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c93aa77586c2ffe328cca32b40fc988bde8318b2 Author: Oak Zeng Date: Mon Nov 19 15:59:53 2018 -0600 drm/amdgpu: Doorbell layout for vega20 and future asic This introduces new doorbell layout for vega20 and future asics v2: Use enum definition instead of hardcoded value Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e2c1ac2027d1ad99109b676450db8759779222c Author: Oak Zeng Date: Mon Nov 19 09:51:20 2018 -0600 drm/amdgpu: Doorbell index initialization for ASICs before vega10 Initialize doorbell index for asics vi and cik v2: Use enum definition instead of hardcoded number Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 062f380725376efab279956b5441071684c2a7ff Author: Oak Zeng Date: Mon Nov 19 09:25:37 2018 -0600 drm/amdgpu: Vega10 doorbell index initialization v2: Use enum definition instead of hardcoded value v3: Remove unused enum definition Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5253163a11fba4ad0a0fafc2f7486ca02e56f295 Author: Oak Zeng Date: Mon Nov 26 10:41:23 2018 -0600 drm/amdgpu: Add asic func interface to init doorbell index This is preparation to move doorbell index initialization to amdgpu_asic_funcs Signed-off-by: Oak Zeng Proposed-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 409c5191b4999abef6687a18eb59aa8b88d714d3 Author: Oak Zeng Date: Fri Nov 16 19:23:44 2018 -0600 drm/amdgpu: Add field in amdgpu_dev to hold reserved doorbell index This is a preparation work to make reserved doorbell index per device, instead of using a global macro definition. By doing this, we can easily change doorbell layout for future ASICs while not affecting ASICs in production. Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8bcbc9ef9657697146ef8cc86b745fc927bca4cb Author: David Francis Date: Tue Nov 27 11:10:07 2018 -0500 drm/amd/display: Fix compile error with ACPI disabled The fallback code for getting default backlight caps was using the wrong variable name. Fix it. Fixes: https://lists.freedesktop.org/archives/dri-devel/2018-November/197752.html Signed-off-by: David Francis Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit eb3dc8978596a045f469f13bb13271a707623ecb Author: Nicholas Kazlauskas Date: Thu Nov 22 12:34:36 2018 -0500 drm/amd/display: Use private obj helpers for dm_atomic_state [Why] Two non-blocking commits in succession can result in a sequence where the same dc->current_state is queried for both commits. 1. 1st commit -> check -> commit -> swaps atomic state -> queues work 2. 2nd commit -> check -> commit -> swaps atomic state -> queues work 3. 1st commit work finishes The issue with this sequence is that the same dc->current_state is read in both atomic checks. If the first commit modifies streams or planes those will be missing from the dc->current_state for the second atomic check. This result in many stream and plane errors in atomic commit tail. [How] The driver still needs to track old to new state to determine if the commit in its current implementation. Updating the dc_state in atomic tail is wrong since the dc_state swap should be happening as part of drm_atomic_helper_swap_state *before* the worker queue kicks its work off. The simplest replacement for the subclassing (which doesn't properly manage the old to new atomic state swap) is to use the drm private object helpers. While some of the dc_state members could be merged into dm_crtc_state or dm_plane_state and copied over that way it is easier for now to just treat the whole dc_state structure as a single private object. This allows amdgpu_dm to drop the dc->current_state copy from within atomic check. It's replaced by a copy from the current atomic state which is propagated correctly for the sequence described above. Since access to the dm_state private object is now locked this should also fix issues that could arise if submitting non-blocking commits from different threads. Cc: Harry Wentland Cc: Leo Li Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 68c12d24ce26ae7cabc671230a4e390e902005c1 Author: Christian König Date: Thu Nov 22 11:57:15 2018 +0100 drm/sched: revert "fix timeout handling v2" v2 This reverts commit 0efd2d2f68cd5dbddf4ecd974c33133257d16a8e. It's still causing problems for V3D. v2: keep rearming the timeout. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1fdee7582cce4c9d56b24e6caf1a87cd47a11825 Author: Ville Syrjälä Date: Wed Nov 14 23:07:29 2018 +0200 drm/i915: Pass the plane to icl_program_input_csc_coeff() On icl+ the plane state that gets passed to update_slave() is not the plane state of the plane we're programming. With NV12 the plane state would be coming from the master (UV) plane whereas the plane we're programming is the slave (Y) plane. For that reason we need to explicitly pass around the slave plane (or we'd have to otherwise deduce it by checking whether we were called via .update_plane() or .update_slave()). In the case of icl_program_input_csc_coeff() it's actually OK to assume that we are always the master plane because the input CSC only exists on HDR planes which can never be a slave plane. But for consistency let's pass in the plane explicitly anyway. While at it drop the "_coeff" from the function name since it's kinda redundant, and this makes the name a bit shorter :) Cc: Uma Shankar Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-14-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar Reviewed-by: Maarten Lankhorst Reviewed-by: Matt Roper commit 45bee430b8438a26e0da7c664605ceea97823ec8 Author: Ville Syrjälä Date: Wed Nov 14 23:07:28 2018 +0200 drm/i915: Rename the confusing 'plane_id' to 'color_plane' A variable whose name is 'plane_id' is expected to be of the enum plane_id type. In this case we have a raw int, which turns out to refer to the plane of the framebuffer. Rename the variable to 'color_plane' in line with the trend started earlier. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-13-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 5f2e511205bbc40b6f58f7d2125c10bd39007748 Author: Ville Syrjälä Date: Wed Nov 14 23:07:27 2018 +0200 drm/i915: Commit skl+ planes in an order that avoids ddb overlaps skl+ can go belly up if there are overlapping ddb allocations between planes. If we could absolutely guarantee that we can perform the atomic update within a single frame we shouldn't have to worry about this. But we can't rely on that so let's steal the ddb overlap check trick from skl_update_crtcs() and apply it to the plane updates. Since each step of the sequence is free from ddb overlaps we don't have to worry about a vblank sneaking up on us in the middle of the sequence. The partial state that gets latched by the hardware will be safe. And unlike skl_update_crtcs() we don't have to intoduce any extra vblank waits on account of only having to worry about a single pipe. v2: Fix typo in commit msg (Matt) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-12-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit ff43bc379e16c9195323cb88ac0c9f4d0613d07a Author: Ville Syrjälä Date: Tue Nov 27 18:59:00 2018 +0200 drm/i915: Move ddb/wm programming into plane update/disable hooks on skl+ On SKL+ the plane WM/BUF_CFG registers are a proper part of each plane's register set. That means accessing them will cancel any pending plane update, and we would need a PLANE_SURF register write to arm the wm/ddb change as well. To avoid all the problems with that let's just move the wm/ddb programming into the plane update/disable hooks. Now all plane registers get written in one (hopefully atomic) operation. To make that feasible we'll move the plane ddb tracking into the crtc state. Watermarks were already tracked there. v2: Rebase due to input CSC v3: Split out a bunch of junk (Matt) v4: Add skl_wm_add_affected_planes() to deal with cursor special case and non-zero wm register reset value v5: Drop the unrelated for_each_intel_plane_mask() fix (Matt) Remove the redundant ddb memset() (Matt) Cc: Matt Roper Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst #v3 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181127165900.31298-1-ville.syrjala@linux.intel.com commit 51de9c6d25594f70c0a03466546ca3deb9705d0e Author: Ville Syrjälä Date: Wed Nov 14 23:07:25 2018 +0200 drm/i915: Don't pass dev_priv around so much Simplify the calling convention of the skl+ watermark functions by not passing around dev_priv needlessly. The callees have what they need to dig it out anyway. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-10-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 8315847bf4df9290042f0d8bce3b1a2d303afe80 Author: Ville Syrjälä Date: Tue Nov 27 18:57:26 2018 +0200 drm/i915: Clean up skl+ vs. icl+ watermark computation Make a cleaner split between the skl+ and icl+ ways of computing watermarks. This way skl_build_pipe_wm() doesn't have to know any of the gritty details of icl+ master/slave planes. We can also simplify a bunch of the lower level code by pulling the plane visibility checks a bit higher up. v2: WARN_ON(!visible) for the icl+ master plane case (Matt) Cc: Matt Roper Reviewed-by: Maarten Lankhorst Reviewed-by: Matt Roper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181127165726.31122-1-ville.syrjala@linux.intel.com commit 6a3c910b081d90fc7fddf771b249ff0059d5005c Author: Ville Syrjälä Date: Wed Nov 14 23:07:23 2018 +0200 drm/i915: Pass the entire skl_plane_wm to skl_compute_transition_wm() We have to pass both level 0 watermark struct and the transition watermark struct to skl_compute_transition_wm(). Make life less confusing by just passing the entire plane watermark struct that contains both aforementioned structures. Cc: Matt Roper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-8-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 14a43062b90383f2cb0e634ff31f0bb7fa02cd1c Author: Ville Syrjälä Date: Wed Nov 14 23:07:22 2018 +0200 drm/i915: Remove some useless zeroing on skl+ wm calculations We memset(0) the entire watermark struct the start, so there's no need to clear things later on. v2: Rebase due to some stale w/a removal Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-7-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit ce110ec311e9feae0905c24078146a2adbca877e Author: Ville Syrjälä Date: Wed Nov 14 23:07:21 2018 +0200 drm/i915: Fix latency==0 handling for level 0 watermark on skl+ If the level 0 latency is 0 we can't do anything. Return an error rather than success. While this can't happen due to WaWmMemoryReadLatency, it can happen if the user clears out the level 0 latency via debugfs. v2: Clarify how how we can end here with zero level 0 latency (Matt) Cc: Matt Roper Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-6-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 0dd14be30d4c8401be9cd129df3b3ee238ea6f78 Author: Ville Syrjälä Date: Wed Nov 14 23:07:20 2018 +0200 drm/i915: Pass the new crtc_state to ->disable_plane() We're going to need access to the new crtc state in ->disable_plane() for SKL+ wm/ddb programming and pre-skl pipe gamma/csc control. Pass the crtc state down. We'll also try to make intel_crtc_disable_planes() do the right thing as much as it's possible. The fact that we don't have a separate crtc state for the disabled state when we're going to re-enable the crtc later means we might end up poking at a few extra planes in there. But that's harmless. I suppose one might argue that we wouldn't have to care about proper ddb/wm/csc/gamma if the pipe is going to permanently disable anyway, but the state checker probably cares so we should try our best to make sure everything is programmed correctly even in that case. v2: Fix the commit message a bit (Matt) Cc: Matt Roper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-5-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit afbd8a722bd64e0020a3b2f8ac2c42e02dc8f596 Author: Ville Syrjälä Date: Tue Nov 27 18:37:42 2018 +0200 drm/i915: Introduce crtc_state->update_planes bitmask Keep track which planes need updating during the commit. For now we set the bit for any plane that was or will be visible (including icl+ nv12 slave planes). In the future I'll have need to update invisible planes as well, for skl plane ddbs and for pre-skl pipe gamma/csc control (which lives in the primary plane control register). v2: Pimp the commit message to mention icl+ nv12 slave planes (Matt) Reviewed-by: Rodrigo Vivi Reviewed-by: Maarten Lankhorst Reviewed-by: Matt Roper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181127163742.30215-1-ville.syrjala@linux.intel.com commit 019575a58c84b1cd534d1dd1cad36592995f8f6b Author: Ville Syrjälä Date: Wed Nov 14 23:07:18 2018 +0200 drm/i915: Move single buffered plane register writes to the end The plane color correction registers are single buffered. So ideally we would write them at the start of vblank just after the double buffered plane registers have been latched. Since we have no convenient way to do that for now let's at least move the single buffered register writes to happen after the double buffered registers have been written. Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-3-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 83234d13f9fda65e6c1a5e5900aa247334b1a621 Author: Ville Syrjälä Date: Wed Nov 14 23:07:17 2018 +0200 drm/i915: Reorganize plane register writes to make them more atomic Some observations about the plane registers: - the control register will self-arm if the plane is not already enabled, thus we want to write it as close to (or ideally after) the surface register - tileoff/linoff/offset/aux_offset are self-arming as well so we want them close to the surface register as well - color keying registers we maybe self arming before SKL. Not 100% sure but we can try to keep them near to the surface register as well - chv pipe b csc register are double buffered but self arming so moving them down a bit - the rest should be mostly armed by the surface register so we can safely write them first, and to just for some consistency let's try to follow keep them in order based on the register offset None of this will have any effect of course unless the vblank evasion fails (which it still does sometimes). Another potential future benefit might be pulling the non-self armings registers outside the vblank evasion since they won't latch until the arming register has been written. This would make the critical section a bit lighter and thus less likely to exceed the deadline. v2: Rebase due to input CSC v3: Swap LINOFF/TILEOFF and KEYMSK/KEYMAX to actually follow the last rule above (Matt) Add a bit more rationale to the commit message (Matt) Cc: Matt Roper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-2-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst commit 62e3a931788223048120357ab3f29dcb55c5ef79 Author: YueHaibing Date: Wed Nov 28 20:31:42 2018 +0800 net: qualcomm: rmnet: remove set but not used variables 'ip_family, fc_seq, qos_id' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:26:6: warning: variable 'ip_family' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:27:6: warning: variable 'fc_seq' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:28:6: warning: variable 'qos_id' set but not used [-Wunused-but-set-variable] It never used since introduction in commit ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 8eb08cf8a35a525dc40b9fedd33833a4a7aecfb2 Author: YueHaibing Date: Wed Nov 28 20:29:39 2018 +0800 qlcnic: remove set but not used variables 'cur_rings, max_hw_rings, tx_desc_info' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:4011:5: warning: variable 'max_hw_rings' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:4013:6: warning: variable 'cur_rings' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:2996:25: warning: variable 'tx_desc_info' set but not used [-Wunused-but-set-variable] 'cur_rings, max_hw_rings' never used since introduction in commit 34e8c406fda5 ("qlcnic: refactor Tx/SDS ring calculation and validation in driver.") 'tx_desc_info' never used since commit 95b3890ae39f ("qlcnic: Enhance Tx timeout debugging.") Also 'queue_type' only can be QLCNIC_RX_QUEUE/QLCNIC_TX_QUEUE, so make a trival cleanup on if statement. Signed-off-by: YueHaibing Acked-by: Shahed Shaikh Signed-off-by: David S. Miller commit 9cc549e4a7300a4b09da1429ed8c9c8f5759246f Author: YueHaibing Date: Wed Nov 28 20:24:41 2018 +0800 net: neterion: vxge: remove set but not used variables 'max_frags' and 'txdl_priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/neterion/vxge/vxge-traffic.c:1698:35: warning: variable 'txdl_priv' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/neterion/vxge/vxge-traffic.c:1699:6: warning: variable 'max_frags' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 113241321dcd ("Neterion: New driver: Traffic & alarm handler") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 69be4efeb959147ff86f22e35aea9526f9b86715 Author: Mattias Jacobsson <2pi@mok.nu> Date: Wed Nov 28 17:16:07 2018 +0100 x86/boot: Add missing va_end() to die() Each call to va_start() must have a corresponding call to va_end() before the end of the function. Add the missing va_end(). Found with Coccinelle. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20181128161607.10973-1-2pi@mok.nu commit 582754106716042baa8e5db2b29e8dd2c7c38b22 Merge: 86d1d8b72caf6 a4a7b762eb217 Author: David S. Miller Date: Wed Nov 28 10:57:46 2018 -0800 Merge branch 'dpaa2-eth-Introduce-XDP-support' Ioana Ciocoi Radulescu says: ==================== dpaa2-eth: Introduce XDP support Add support for XDP programs. Only XDP_PASS, XDP_DROP and XDP_TX actions are supported for now. Frame header changes are also allowed. v2: - count the XDP packets in the rx/tx inteface stats - add message with the maximum supported MTU value for XDP ==================== Signed-off-by: David S. Miller commit a4a7b762eb21755bce190de1b75ba7e32bfab4e0 Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:34 2018 +0000 dpaa2-eth: Add xdp counters Add counters for xdp processed frames to the channel statistics. Signed-off-by: Ioana Radulescu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0ff8f0aab49bb1383d848e44aedac6cfc1329f4f Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:33 2018 +0000 dpaa2-eth: Cleanup channel stats Remove unused counter. Reorder fields in channel stats structure to match the ethtool strings order and make it easier to print them with ethtool -S. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 99e43521a06906b6936f0c7b547a2bef856b7d64 Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:33 2018 +0000 dpaa2-eth: Add support for XDP_TX Send frames back on the same port for XDP_TX action. Since the frame buffers have been allocated by us, we can recycle them directly into the Rx buffer pool instead of requesting a confirmation frame upon transmission complete. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 18c2e770e65180c0cfbc70965c2421ac2a1e8fbb Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:32 2018 +0000 dpaa2-eth: Map Rx buffers as bidirectional In order to support enqueueing Rx FDs back to hardware, we need to DMA map Rx buffers as bidirectional. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 5d39dc21482aad384d0a34f44cd06cb841a9ee29 Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:31 2018 +0000 dpaa2-eth: Release buffers back to pool on XDP_DROP Instead of freeing the RX buffers, release them back into the pool. We wait for the maximum number of buffers supported by a single release command to accumulate before issuing the command. Also, don't unmap the Rx buffers at the beginning of the Rx routine anymore, since that would require remapping them before release. Instead, just do a DMA sync at first and only unmap if the frame is meant for the stack. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 569375fb5732b7d7bb5be126c6243acf658697e4 Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:31 2018 +0000 dpaa2-eth: Move function We'll use function free_bufs() on the XDP path as well, so move it higher in order to avoid a forward declaration. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 7b1eea1a747574612d9ec1aeeb4ade9817abfbba Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:30 2018 +0000 dpaa2-eth: Allow XDP header adjustments Reserve XDP_PACKET_HEADROOM bytes in Rx buffers to allow XDP programs to increase frame header size. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 7e273a8ebdd3b83f94eb8b49fc8ee61464f47cc2 Author: Ioana Ciocoi Radulescu Date: Mon Nov 26 16:27:29 2018 +0000 dpaa2-eth: Add basic XDP support We keep one XDP program reference per channel. The only actions supported for now are XDP_DROP and XDP_PASS. Until now we didn't enforce a maximum size for Rx frames based on MTU value. Change that, since for XDP mode we must ensure no scatter-gather frames can be received. Signed-off-by: Ioana Radulescu Acked-by: Camelia Groza Reviewed-by: David Ahern Signed-off-by: David S. Miller commit dba4296bc7431f8f61a9d7d89431f990bded7e83 Merge: 651022382c7f8 eb38c119dd91c Author: Stephen Boyd Date: Wed Nov 28 10:27:27 2018 -0800 Merge tag 'clk-renesas-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull renesas clk driver updates from Geert Uytterhoeven: - Add support for SDHI and USB clocks on RZ/A2, - Add support for RPC (SPI Multi I/O Bus Controller) clocks on R-Car V3M. * tag 'clk-renesas-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r7s9210: Add USB clocks clk: renesas: r8a77970: Add RPC clocks clk: renesas: r7s9210: Add SDHI clocks commit 45fdfdb6475905704134afba3c0ef5f24c2b5921 Author: Yangtao Li Date: Wed Nov 21 08:17:23 2018 -0500 drm/pl111: add of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. Signed-off-by: Yangtao Li Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181121131723.22431-1-tiny.windzz@gmail.com commit 1aca96cc545536fc00b533764135ced79a9a65ba Author: Chris Wilson Date: Wed Nov 28 13:53:25 2018 +0000 drm/i915: Mark up early pre-production Kabylakes Mark A0 as the one and only pre-production variant of Kabylake and remove its couple of workarounds, consigning them to the annals of history. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181128135325.10641-1-chris@chris-wilson.co.uk commit 489db5d941500249583ec6b49fa70e006bd8f632 Author: Jiada Wang Date: Wed Nov 28 21:26:12 2018 +0900 ASoC: pcm3168a: Don't disable pcm3168a when CONFIG_PM defined pcm3168 codec support runtime_[resume|suspend], whenever it is not active, it enters suspend mode, and it's clock and regulators will be disabled. so there is no need to disable them again in remove callback. Otherwise we got following kernel warnings, when unload pcm3168a driver [ 222.257514] unbalanced disables for amp-en-regulator [ 222.262526] ------------[ cut here ]------------ [ 222.267158] WARNING: CPU: 0 PID: 2423 at drivers/regulator/core.c:2264 _regulator_disable+0x28/0x108 [ 222.276291] Modules linked in: [ 222.279343] snd_soc_pcm3168a_i2c(-) [ 222.282916] snd_aloop [ 222.285272] arc4 [ 222.287194] wl18xx [ 222.289289] wlcore [ 222.291385] mac80211 [ 222.293654] cfg80211 [ 222.295923] aes_ce_blk [ 222.298366] crypto_simd [ 222.300896] cryptd [ 222.302992] aes_ce_cipher [ 222.305696] crc32_ce [ 222.307965] ghash_ce [ 222.310234] aes_arm64 [ 222.312590] gf128mul [ 222.314860] snd_soc_rcar [ 222.317476] sha2_ce [ 222.319658] xhci_plat_hcd [ 222.322362] sha256_arm64 [ 222.324978] xhci_hcd [ 222.327247] sha1_ce [ 222.329430] renesas_usbhs [ 222.332133] evdev [ 222.334142] sha1_generic [ 222.336758] rcar_gen3_thermal [ 222.339810] cpufreq_dt [ 222.342253] ravb_streaming(C) [ 222.345304] wlcore_sdio [ 222.347834] thermal_sys [ 222.350363] udc_core [ 222.352632] mch_core(C) [ 222.355161] usb_dmac [ 222.357430] snd_soc_pcm3168a [ 222.360394] snd_soc_ak4613 [ 222.363184] gpio_keys [ 222.365540] virt_dma [ 222.367809] nfsd [ 222.369730] ipv6 [ 222.371652] autofs4 [ 222.373834] [last unloaded: snd_soc_pcm3168a_i2c] [ 222.378629] CPU: 0 PID: 2423 Comm: rmmod Tainted: G WC 4.14.63-04798-gd456126e4a42-dirty #457 [ 222.388196] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT) [ 222.396199] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000 [ 222.402117] PC is at _regulator_disable+0x28/0x108 [ 222.406906] LR is at _regulator_disable+0x28/0x108 [ 222.411695] pc : [] lr : [] pstate: 00000145 [ 222.419089] sp : ffff00000a0a3c80 [ 222.422401] x29: ffff00000a0a3c80 [ 222.425799] x28: ffff8006fa8c6200 [ 222.429199] x27: ffff0000086f1000 [ 222.432597] x26: 000000000000006a [ 222.435997] x25: 0000000000000124 [ 222.439395] x24: 0000000000000018 [ 222.442795] x23: 0000000000000006 [ 222.446193] x22: ffff8006f925d490 [ 222.449592] x21: ffff8006f9ac2068 [ 222.452991] x20: ffff8006f9ac2000 [ 222.456390] x19: 0000000000000005 [ 222.459787] x18: 000000000000000a [ 222.463186] x17: 0000000000000000 [ 222.466584] x16: 0000000000000000 [ 222.469984] x15: 000000000d3f616a [ 222.473382] x14: 0720072007200720 [ 222.476781] x13: 0720072007200720 [ 222.480179] x12: 0720072007200720 [ 222.483578] x11: 0720072007200720 [ 222.486975] x10: 0720072007200720 [ 222.490375] x9 : 0720072007200720 [ 222.493773] x8 : 07200772076f0774 [ 222.497172] x7 : 0000000000000000 [ 222.500570] x6 : 0000000000000007 [ 222.503969] x5 : 0000000000000000 [ 222.507367] x4 : 0000000000000000 [ 222.510766] x3 : 0000000000000000 [ 222.514164] x2 : c790b852091e2600 [ 222.517563] x1 : 0000000000000000 [ 222.520961] x0 : 0000000000000028 [ 222.524361] Call trace: [ 222.526805] Exception stack(0xffff00000a0a3b40 to 0xffff00000a0a3c80) [ 222.533245] 3b40: 0000000000000028 0000000000000000 c790b852091e2600 0000000000000000 [ 222.541075] 3b60: 0000000000000000 0000000000000000 0000000000000007 0000000000000000 [ 222.548905] 3b80: 07200772076f0774 0720072007200720 0720072007200720 0720072007200720 [ 222.556735] 3ba0: 0720072007200720 0720072007200720 0720072007200720 000000000d3f616a [ 222.564564] 3bc0: 0000000000000000 0000000000000000 000000000000000a 0000000000000005 [ 222.572394] 3be0: ffff8006f9ac2000 ffff8006f9ac2068 ffff8006f925d490 0000000000000006 [ 222.580224] 3c00: 0000000000000018 0000000000000124 000000000000006a ffff0000086f1000 [ 222.588053] 3c20: ffff8006fa8c6200 ffff00000a0a3c80 ffff0000083bd89c ffff00000a0a3c80 [ 222.595883] 3c40: ffff0000083bd89c 0000000000000145 0000000000000000 0000000000000000 [ 222.603713] 3c60: 0000ffffffffffff ffff00000a0a3c30 ffff00000a0a3c80 ffff0000083bd89c [ 222.611543] [] _regulator_disable+0x28/0x108 [ 222.617375] [] regulator_disable+0x48/0x68 [ 222.623033] [] regulator_bulk_disable+0x58/0xc0 [ 222.629134] [] pcm3168a_remove+0x30/0x50 [snd_soc_pcm3168a] [ 222.636270] [] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c] [ 222.644106] [] i2c_device_remove+0x38/0x70 [ 222.649766] [] device_release_driver_internal+0xd0/0x1c0 [ 222.656640] [] driver_detach+0x70/0x7c [ 222.661951] [] bus_remove_driver+0x74/0xa0 [ 222.667609] [] driver_unregister+0x48/0x4c [ 222.673268] [] i2c_del_driver+0x24/0x30 [ 222.678666] [] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c] [ 222.687019] [] SyS_delete_module+0x198/0x1d4 [ 222.692850] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000) [ 222.699289] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8 [ 222.707119] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000 [ 222.714948] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005 [ 222.722778] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000 [ 222.730607] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000 [ 222.738436] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001 [ 222.746266] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010 [ 222.754096] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130 [ 222.761926] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a [ 222.769755] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 222.777589] [] el0_svc_naked+0x34/0x38 [ 222.782899] ---[ end trace eaf8939a3698b1a8 ]--- [ 222.787609] Failed to disable VCCDA2: -5 [ 222.791649] ------------[ cut here ]------------ [ 222.796283] WARNING: CPU: 0 PID: 2423 at drivers/clk/clk.c:595 clk_core_disable+0xc/0x1d8 [ 222.804460] Modules linked in: [ 222.807511] snd_soc_pcm3168a_i2c(-) [ 222.811083] snd_aloop [ 222.813439] arc4 [ 222.815360] wl18xx [ 222.817456] wlcore [ 222.819551] mac80211 [ 222.821820] cfg80211 [ 222.824088] aes_ce_blk [ 222.826531] crypto_simd [ 222.829060] cryptd [ 222.831155] aes_ce_cipher [ 222.833859] crc32_ce [ 222.836127] ghash_ce [ 222.838396] aes_arm64 [ 222.840752] gf128mul [ 222.843020] snd_soc_rcar [ 222.845637] sha2_ce [ 222.847818] xhci_plat_hcd [ 222.850522] sha256_arm64 [ 222.853138] xhci_hcd [ 222.855407] sha1_ce [ 222.857589] renesas_usbhs [ 222.860292] evdev [ 222.862300] sha1_generic [ 222.864917] rcar_gen3_thermal [ 222.867968] cpufreq_dt [ 222.870410] ravb_streaming(C) [ 222.873461] wlcore_sdio [ 222.875991] thermal_sys [ 222.878520] udc_core [ 222.880789] mch_core(C) [ 222.883318] usb_dmac [ 222.885587] snd_soc_pcm3168a [ 222.888551] snd_soc_ak4613 [ 222.891341] gpio_keys [ 222.893696] virt_dma [ 222.895965] nfsd [ 222.897886] ipv6 [ 222.899808] autofs4 [ 222.901990] [last unloaded: snd_soc_pcm3168a_i2c] [ 222.906783] CPU: 0 PID: 2423 Comm: rmmod Tainted: G WC 4.14.63-04798-gd456126e4a42-dirty #457 [ 222.916349] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT) [ 222.924351] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000 [ 222.930270] PC is at clk_core_disable+0xc/0x1d8 [ 222.934799] LR is at clk_core_disable_lock+0x20/0x34 [ 222.939761] pc : [] lr : [] pstate: 800001c5 [ 222.947154] sp : ffff00000a0a3cf0 [ 222.950466] x29: ffff00000a0a3cf0 [ 222.953864] x28: ffff8006fa8c6200 [ 222.957263] x27: ffff0000086f1000 [ 222.960661] x26: 000000000000006a [ 222.964061] x25: 0000000000000124 [ 222.967458] x24: 0000000000000015 [ 222.970858] x23: ffff8006f9ffa8d0 [ 222.974256] x22: ffff8006faf16480 [ 222.977655] x21: ffff0000007e7040 [ 222.981053] x20: ffff8006faadd100 [ 222.984452] x19: 0000000000000140 [ 222.987850] x18: 000000000000000a [ 222.991249] x17: 0000000000000000 [ 222.994647] x16: 0000000000000000 [ 222.998046] x15: 000000000d477819 [ 223.001444] x14: 0720072007200720 [ 223.004843] x13: 0720072007200720 [ 223.008242] x12: 0720072007200720 [ 223.011641] x11: 0720072007200720 [ 223.015039] x10: 0720072007200720 [ 223.018438] x9 : 0720072007200720 [ 223.021837] x8 : 0720072007200720 [ 223.025236] x7 : 0000000000000000 [ 223.028634] x6 : 0000000000000007 [ 223.032034] x5 : 0000000000000000 [ 223.035432] x4 : 0000000000000000 [ 223.038831] x3 : 0000000000000000 [ 223.042229] x2 : 0000000004720471 [ 223.045628] x1 : 0000000000000000 [ 223.049026] x0 : ffff8006faadd100 [ 223.052426] Call trace: [ 223.054870] Exception stack(0xffff00000a0a3bb0 to 0xffff00000a0a3cf0) [ 223.061309] 3ba0: ffff8006faadd100 0000000000000000 [ 223.069139] 3bc0: 0000000004720471 0000000000000000 0000000000000000 0000000000000000 [ 223.076969] 3be0: 0000000000000007 0000000000000000 0720072007200720 0720072007200720 [ 223.084798] 3c00: 0720072007200720 0720072007200720 0720072007200720 0720072007200720 [ 223.092628] 3c20: 0720072007200720 000000000d477819 0000000000000000 0000000000000000 [ 223.100458] 3c40: 000000000000000a 0000000000000140 ffff8006faadd100 ffff0000007e7040 [ 223.108287] 3c60: ffff8006faf16480 ffff8006f9ffa8d0 0000000000000015 0000000000000124 [ 223.116117] 3c80: 000000000000006a ffff0000086f1000 ffff8006fa8c6200 ffff00000a0a3cf0 [ 223.123947] 3ca0: ffff0000083acd28 ffff00000a0a3cf0 ffff0000083ab9b8 00000000800001c5 [ 223.131777] 3cc0: ffff00000a0a3cf0 ffff0000083acd1c 0000ffffffffffff ffff8006faadd100 [ 223.139606] 3ce0: ffff00000a0a3cf0 ffff0000083ab9b8 [ 223.144483] [] clk_core_disable+0xc/0x1d8 [ 223.150054] [] clk_disable+0x1c/0x28 [ 223.155198] [] pcm3168a_remove+0x3c/0x50 [snd_soc_pcm3168a] [ 223.162334] [] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c] [ 223.170167] [] i2c_device_remove+0x38/0x70 [ 223.175826] [] device_release_driver_internal+0xd0/0x1c0 [ 223.182700] [] driver_detach+0x70/0x7c [ 223.188012] [] bus_remove_driver+0x74/0xa0 [ 223.193669] [] driver_unregister+0x48/0x4c [ 223.199329] [] i2c_del_driver+0x24/0x30 [ 223.204726] [] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c] [ 223.213079] [] SyS_delete_module+0x198/0x1d4 [ 223.218909] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000) [ 223.225349] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8 [ 223.233179] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000 [ 223.241008] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005 [ 223.248838] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000 [ 223.256668] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000 [ 223.264497] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001 [ 223.272327] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010 [ 223.280157] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130 [ 223.287986] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a [ 223.295816] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 223.303648] [] el0_svc_naked+0x34/0x38 [ 223.308958] ---[ end trace eaf8939a3698b1a9 ]--- [ 223.313752] ------------[ cut here ]------------ [ 223.318383] WARNING: CPU: 0 PID: 2423 at drivers/clk/clk.c:477 clk_core_unprepare+0xc/0x1ac [ 223.326733] Modules linked in: [ 223.329784] snd_soc_pcm3168a_i2c(-) [ 223.333356] snd_aloop [ 223.335712] arc4 [ 223.337633] wl18xx [ 223.339728] wlcore [ 223.341823] mac80211 [ 223.344092] cfg80211 [ 223.346360] aes_ce_blk [ 223.348803] crypto_simd [ 223.351332] cryptd [ 223.353428] aes_ce_cipher [ 223.356131] crc32_ce [ 223.358400] ghash_ce [ 223.360668] aes_arm64 [ 223.363024] gf128mul [ 223.365293] snd_soc_rcar [ 223.367909] sha2_ce [ 223.370091] xhci_plat_hcd [ 223.372794] sha256_arm64 [ 223.375410] xhci_hcd [ 223.377679] sha1_ce [ 223.379861] renesas_usbhs [ 223.382564] evdev [ 223.384572] sha1_generic [ 223.387188] rcar_gen3_thermal [ 223.390239] cpufreq_dt [ 223.392682] ravb_streaming(C) [ 223.395732] wlcore_sdio [ 223.398261] thermal_sys [ 223.400790] udc_core [ 223.403059] mch_core(C) [ 223.405588] usb_dmac [ 223.407856] snd_soc_pcm3168a [ 223.410820] snd_soc_ak4613 [ 223.413609] gpio_keys [ 223.415965] virt_dma [ 223.418234] nfsd [ 223.420155] ipv6 [ 223.422076] autofs4 [ 223.424258] [last unloaded: snd_soc_pcm3168a_i2c] [ 223.429050] CPU: 0 PID: 2423 Comm: rmmod Tainted: G WC 4.14.63-04798-gd456126e4a42-dirty #457 [ 223.438616] Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT) [ 223.446618] task: ffff8006fa8c6200 task.stack: ffff00000a0a0000 [ 223.452536] PC is at clk_core_unprepare+0xc/0x1ac [ 223.457239] LR is at clk_unprepare+0x28/0x3c [ 223.461506] pc : [] lr : [] pstate: 60000145 [ 223.468900] sp : ffff00000a0a3d00 [ 223.472211] x29: ffff00000a0a3d00 [ 223.475609] x28: ffff8006fa8c6200 [ 223.479009] x27: ffff0000086f1000 [ 223.482407] x26: 000000000000006a [ 223.485807] x25: 0000000000000124 [ 223.489205] x24: 0000000000000015 [ 223.492604] x23: ffff8006f9ffa8d0 [ 223.496003] x22: ffff8006faf16480 [ 223.499402] x21: ffff0000007e7040 [ 223.502800] x20: ffff8006faf16420 [ 223.506199] x19: ffff8006faadd100 [ 223.509597] x18: 000000000000000a [ 223.512997] x17: 0000000000000000 [ 223.516395] x16: 0000000000000000 [ 223.519794] x15: 0000000000000000 [ 223.523192] x14: 00000033fe89076c [ 223.526591] x13: 0000000000000400 [ 223.529989] x12: 0000000000000400 [ 223.533388] x11: 0000000000000000 [ 223.536786] x10: 00000000000009e0 [ 223.540185] x9 : ffff00000a0a3be0 [ 223.543583] x8 : ffff8006fa8c6c40 [ 223.546982] x7 : ffff8006fa8c6400 [ 223.550380] x6 : 0000000000000001 [ 223.553780] x5 : 0000000000000000 [ 223.557178] x4 : ffff8006fa8c6200 [ 223.560577] x3 : 0000000000000000 [ 223.563975] x2 : ffff8006fa8c6200 [ 223.567374] x1 : 0000000000000000 [ 223.570772] x0 : ffff8006faadd100 [ 223.574170] Call trace: [ 223.576615] Exception stack(0xffff00000a0a3bc0 to 0xffff00000a0a3d00) [ 223.583054] 3bc0: ffff8006faadd100 0000000000000000 ffff8006fa8c6200 0000000000000000 [ 223.590884] 3be0: ffff8006fa8c6200 0000000000000000 0000000000000001 ffff8006fa8c6400 [ 223.598714] 3c00: ffff8006fa8c6c40 ffff00000a0a3be0 00000000000009e0 0000000000000000 [ 223.606544] 3c20: 0000000000000400 0000000000000400 00000033fe89076c 0000000000000000 [ 223.614374] 3c40: 0000000000000000 0000000000000000 000000000000000a ffff8006faadd100 [ 223.622204] 3c60: ffff8006faf16420 ffff0000007e7040 ffff8006faf16480 ffff8006f9ffa8d0 [ 223.630033] 3c80: 0000000000000015 0000000000000124 000000000000006a ffff0000086f1000 [ 223.637863] 3ca0: ffff8006fa8c6200 ffff00000a0a3d00 ffff0000083ace4c ffff00000a0a3d00 [ 223.645693] 3cc0: ffff0000083ab5a4 0000000060000145 0000000000000140 ffff8006faadd100 [ 223.653523] 3ce0: 0000ffffffffffff ffff0000083ace44 ffff00000a0a3d00 ffff0000083ab5a4 [ 223.661353] [] clk_core_unprepare+0xc/0x1ac [ 223.667103] [] pcm3168a_remove+0x44/0x50 [snd_soc_pcm3168a] [ 223.674239] [] pcm3168a_i2c_remove+0x10/0x1c [snd_soc_pcm3168a_i2c] [ 223.682070] [] i2c_device_remove+0x38/0x70 [ 223.687731] [] device_release_driver_internal+0xd0/0x1c0 [ 223.694604] [] driver_detach+0x70/0x7c [ 223.699915] [] bus_remove_driver+0x74/0xa0 [ 223.705572] [] driver_unregister+0x48/0x4c [ 223.711230] [] i2c_del_driver+0x24/0x30 [ 223.716628] [] pcm3168a_i2c_driver_exit+0x10/0xf98 [snd_soc_pcm3168a_i2c] [ 223.724980] [] SyS_delete_module+0x198/0x1d4 [ 223.730811] Exception stack(0xffff00000a0a3ec0 to 0xffff00000a0a4000) [ 223.737250] 3ec0: 0000aaaafeb4b268 0000000000000800 14453f6470497100 0000fffffaa520d8 [ 223.745079] 3ee0: 0000fffffaa520d9 000000000000000a 1999999999999999 0000000000000000 [ 223.752909] 3f00: 000000000000006a 0000ffffa8f7d1d8 000000000000000a 0000000000000005 [ 223.760739] 3f20: 0000000000000000 0000000000000000 000000000000002d 0000000000000000 [ 223.768568] 3f40: 0000aaaae19b9f68 0000ffffa8f411f0 0000000000000000 0000aaaae19b9000 [ 223.776398] 3f60: 0000fffffaa533b8 0000fffffaa531f0 0000000000000000 0000000000000001 [ 223.784227] 3f80: 0000fffffaa53ec6 0000000000000000 0000aaaafeb4b200 0000aaaafeb4a010 [ 223.792057] 3fa0: 0000000000000000 0000fffffaa53130 0000aaaae199f36c 0000fffffaa53130 [ 223.799886] 3fc0: 0000ffffa8f411f8 0000000000000000 0000aaaafeb4b268 000000000000006a [ 223.807715] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 223.815546] [] el0_svc_naked+0x34/0x38 [ 223.820855] ---[ end trace eaf8939a3698b1aa ]--- Fix this issue by only disable clock and regulators in remove callback when CONFIG_PM isn't defined Signed-off-by: Jiada Wang Signed-off-by: Mark Brown commit e3e403c218cd07b497127a29e604fc26a71e8558 Author: Thierry Reding Date: Wed Sep 19 18:42:37 2018 +0200 soc/tegra: pmc: Add initial Tegra194 wake events Tegra194 supports 96 wake events in total. Many of them are never used, so only the most common ones (RTC alarm and power key) are currently defined. Signed-off-by: Thierry Reding commit e59333c83fe9e7cb35f60522848408c20958044a Author: Thierry Reding Date: Wed Sep 19 18:41:59 2018 +0200 soc/tegra: pmc: Add initial Tegra186 wake events Tegra186 support 96 wake events in total. Many of them are never used, so only the most common ones (RTC alarm and power key) are currently defined. Signed-off-by: Thierry Reding commit 19906e6b16672178959c4f3e1345c46ed33f83ac Author: Thierry Reding Date: Mon Sep 17 15:08:17 2018 +0200 soc/tegra: pmc: Add wake event support The power management controller has top-level controls that allow certain interrupts (such as from the RTC or a subset of GPIOs) to wake the system from sleep. Implement infrastructure to support these wake events. Signed-off-by: Thierry Reding commit 65cd1d13b880920054d6c750679baa80b7f9c072 Author: Weiping Zhang Date: Thu Nov 29 00:04:39 2018 +0800 block: add io timeout to sysfs Give a interface to adjust io timeout(ms) by device. Signed-off-by: Weiping Zhang Signed-off-by: Jens Axboe commit 94a2c3a32b62e868dc1e3d854326745a7f1b8c7a Author: Yufen Yu Date: Wed Nov 28 16:42:01 2018 +0800 block: use rcu_work instead of call_rcu to avoid sleep in softirq We recently got a stack by syzkaller like this: BUG: sleeping function called from invalid context at mm/slab.h:361 in_atomic(): 1, irqs_disabled(): 0, pid: 6644, name: blkid INFO: lockdep is turned off. CPU: 1 PID: 6644 Comm: blkid Not tainted 4.4.163-514.55.6.9.x86_64+ #76 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 0000000000000000 5ba6a6b879e50c00 ffff8801f6b07b10 ffffffff81cb2194 0000000041b58ab3 ffffffff833c7745 ffffffff81cb2080 5ba6a6b879e50c00 0000000000000000 0000000000000001 0000000000000004 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0x114/0x1a0 lib/dump_stack.c:51 [] ___might_sleep+0x291/0x490 kernel/sched/core.c:7675 [] __might_sleep+0xb3/0x270 kernel/sched/core.c:7637 [] slab_pre_alloc_hook mm/slab.h:361 [inline] [] slab_alloc_node mm/slub.c:2610 [inline] [] slab_alloc mm/slub.c:2692 [inline] [] kmem_cache_alloc_trace+0x2c3/0x5c0 mm/slub.c:2709 [] kmalloc include/linux/slab.h:479 [inline] [] kzalloc include/linux/slab.h:623 [inline] [] kobject_uevent_env+0x2c7/0x1150 lib/kobject_uevent.c:227 [] kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:374 [] kobject_cleanup lib/kobject.c:633 [inline] [] kobject_release+0x229/0x440 lib/kobject.c:675 [] kref_sub include/linux/kref.h:73 [inline] [] kref_put include/linux/kref.h:98 [inline] [] kobject_put+0x72/0xd0 lib/kobject.c:692 [] put_device+0x25/0x30 drivers/base/core.c:1237 [] delete_partition_rcu_cb+0x1d4/0x2f0 block/partition-generic.c:232 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2705 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:2973 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:2940 [inline] [] rcu_process_callbacks+0x59c/0x1c70 kernel/rcu/tree.c:2957 [] __do_softirq+0x299/0xe20 kernel/softirq.c:273 [] invoke_softirq kernel/softirq.c:350 [inline] [] irq_exit+0x216/0x2c0 kernel/softirq.c:391 [] exiting_irq arch/x86/include/asm/apic.h:652 [inline] [] smp_apic_timer_interrupt+0x8b/0xc0 arch/x86/kernel/apic/apic.c:926 [] apic_timer_interrupt+0xa5/0xb0 arch/x86/entry/entry_64.S:746 [] ? audit_kill_trees+0x180/0x180 [] fd_install+0x57/0x80 fs/file.c:626 [] do_sys_open+0x45e/0x550 fs/open.c:1043 [] SYSC_open fs/open.c:1055 [inline] [] SyS_open+0x32/0x40 fs/open.c:1050 [] entry_SYSCALL_64_fastpath+0x1e/0x9a In softirq context, we call rcu callback function delete_partition_rcu_cb(), which may allocate memory by kzalloc with GFP_KERNEL flag. If the allocation cannot be satisfied, it may sleep. However, That is not allowed in softirq contex. Although we found this problem on linux 4.4, the latest kernel version seems to have this problem as well. And it is very similar to the previous one: https://lkml.org/lkml/2018/7/9/391 Fix it by using RCU workqueue, which allows sleep. Reviewed-by: Paul E. McKenney Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 3bd7f6589f67f05a7901bdc2810631814d89e462 Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Overcome sglist entry length limitation When in DMA mode, the BCM2835 SPI controller requires that the FIFO is accessed in 4 byte chunks. This rule is not fulfilled if a transfer consists of multiple sglist entries, one per page, and the first entry starts in the middle of a page with an offset not a multiple of 4. The driver currently falls back to programmed I/O for such transfers, incurring a significant performance penalty. Overcome this hardware limitation by transferring the first few bytes of a transfer without DMA such that the remainder of the first sglist entry becomes a multiple of 4. Specifics are provided in kerneldoc comments. An alternative approach would have been to split transfers in the ->prepare_message hook, but this may necessitate two transfers per page, defeating the goal of clustering multiple pages together in a single transfer for efficiency. E.g. if the first TX sglist entry's length is 23 and the first RX's is 40, the first transfer would send and receive 23 bytes, the second 40 - 23 = 17 bytes, the third 4096 - 17 = 4079 bytes, the fourth 4096 - 4079 = 17 bytes and so on. In other words, O(n) transfers are necessary (n = number of sglist entries), whereas the algorithm implemented herein only requires O(1) additional work. Signed-off-by: Lukas Wunner Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit acf0f856959937952b9758381d5b5bcb65a52cfd Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Document struct bcm2835_spi Document the driver's data structure to lower the barrier to entry for contributors. Signed-off-by: Lukas Wunner Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit 5c09e42f59313774bc494b652f3177ee347786d9 Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Drop unused code for native Chip Select Commit a30a555d7435 ("spi: bcm2835: transform native-cs to gpio-cs on first spi_setup") disabled the use of hardware-controlled native Chip Select in favour of software-controlled GPIO Chip Select but left code to support the former untouched. Remove it to simplify the driver and ease the addition of new features and further optimizations. Signed-off-by: Lukas Wunner Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit c06eea7d2a0ee79174c912810e0065d3f5c0d784 Merge: 942779c6f1f89 e82b0b3828451 Author: Mark Brown Date: Wed Nov 28 15:55:24 2018 +0000 Merge branch 'spi-4.20' into spi-4.21 for bcm stuff. commit 6cbf76028dcac01129211828d62314285231f79e Author: Pankaj Bansal Date: Tue Aug 28 23:19:12 2018 +0530 can: flexcan: split the Message Buffer RAM area The message buffer RAM area is not a contiguous 1KB area but 2 partitions of 512 bytes each. Till now, we used Message buffers with payload size 8 bytes, which translates to 32 MBs per partition and no spare space is left in any partition. However, in upcoming SOC LX2160A the message buffers can have payload size 64 bytes. This results in less than 32 MBs per partition and some empty area is left at the end of each partition.This empty area should not be accessed. Therefore, split the Message Buffer RAM area into two partitions. Signed-off-by: Pankaj Bansal Signed-off-by: Marc Kleine-Budde commit 0517961ccdf190a7f25da9ab17982a6d496e5d1d Author: Pankaj Bansal Date: Fri Nov 23 22:18:44 2018 +0100 can: flexcan: Add provision for variable payload size Till now the flexcan module supported 8 byte payload size as per CAN 2.0 specifications. But now upcoming flexcan module in NXP LX2160A SOC supports CAN FD protocol too. The Message buffers need to be configured to have payload size 64 bytes. Therefore, added provision in the driver for payload size to be 64 bytes. Signed-off-by: Pankaj Bansal Signed-off-by: Marc Kleine-Budde commit 5156c7b11f35bf305b809dd381d7842f7e078a37 Author: Pankaj Bansal Date: Mon Aug 13 23:50:49 2018 +0530 can: flexcan: move rx_offload_add() from flexcan_probe() to flexcan_open() rx offload depends on number of message buffers, which in turn depends on messgae buffer size. with the upcoming LX2160A SOC the message buffer size can be configured to 72 bytes if it were to be used in CAN FD mode. The current mode in which the flexcan is being operated is known at the time of flexcan_open() but not at the time of flexcan_probe(). Therefore, move the rx_offload_add() from flexcan_probe() to flexcan_open(). correspondingly, move rx_offload_delete() from flexcan_remove() to flexcan_close(). Signed-off-by: Pankaj Bansal Signed-off-by: Marc Kleine-Budde commit 7ad0f53a394ba829e45682c2e21175791e36b649 Author: Pankaj Bansal Date: Mon Aug 13 23:50:48 2018 +0530 can: flexcan: flexcan_chip_start(): enable loopback mode in flexcan Self reception disable bit needs to be cleared for loopback mode to work in flexcan. Signed-off-by: Pankaj Bansal Signed-off-by: Marc Kleine-Budde commit de3578c198c6d846448c8c989bd0ee7a05f3b601 Author: Aisheng Dong Date: Fri Nov 23 08:35:33 2018 +0000 can: flexcan: add self wakeup support If wakeup is enabled, enter stop mode, else enter disabled mode. Self wake can only work on stop mode. Starting from IMX6, the flexcan stop mode control bits is SoC specific, move it out of IP driver and parse it from devicetree. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Reviewed-by: Dong Aisheng Signed-off-by: Marc Kleine-Budde commit b9c9c39e3d20666c80f64e931ccf4c5684c525ba Author: Aisheng Dong Date: Fri Nov 23 08:35:29 2018 +0000 dt-bindings: can: flexcan: add stop mode property to device tree The FlexCAN controller can parse the stop mode property to enable CAN self wakeup feature. Signed-off-by: Aisheng Dong Signed-off-by: Joakim Zhang Reviewed-by: Rob Herring Signed-off-by: Marc Kleine-Budde commit c982a3ca49e330aeb5d8b8446e7bc60c9191080d Author: Marc Kleine-Budde Date: Fri Aug 17 14:52:58 2018 +0200 can: flexcan: flexcan_chip_start(): adjust comment to match the code With the conversion of the flexcan driver to support both timestamp and FIFO mode the setup of the MCR register ("enable fifo") has been moved. This patch moves the comment too, in order to match the code again. Signed-off-by: Marc Kleine-Budde commit eac9c48aac0822c2621aa6f3a03b501cd6524bf6 Author: Thierry Reding Date: Thu Jan 25 14:43:45 2018 +0200 soc/tegra: pmc: Add Tegra194 support The PMC controller on Tegra194 has a couple of new I/O pads and drops others compared to Tegra186. Signed-off-by: Thierry Reding commit 73b551ba8fed31118973c906a31588298d4c0891 Author: Thierry Reding Date: Fri Nov 23 14:29:31 2018 +0100 arm64: tegra: Clarify that P2972-0000 is Jetson Xavier The official name for the P2972-0000 board is Jetson AGX Xavier Development Kit. Set that as the model string in the device tree for clarity. Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 585423535cd695bf452d3c485791557439a5a97e Author: Thierry Reding Date: Fri Sep 21 11:08:28 2018 +0200 arm64: tegra: Add PWM fan support on Jetson Xavier Enable PWM4 in device tree and use it to drive the PWM fan on the Jetson Xavier. Signed-off-by: Thierry Reding commit 6a574ec70c52c9ff5524d95e3061a24ffb202a52 Author: Thierry Reding Date: Fri Sep 21 11:05:52 2018 +0200 arm64: tegra: Add PWM controllers on Tegra194 Tegra194 has eight single-channel PWM controllers, one of them in the AON partition. Signed-off-by: Thierry Reding commit 36ec29f781a21a5b0599766ba11766837695209b Author: Jon Hunter Date: Fri Sep 28 15:11:50 2018 +0100 arm64: dts: tegra210: Add power-domains for xHCI Populate the power-domain properties for the xHCI device for Tegra210. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 3e9e46b7b981328c43d37cb8822e2ed401cb936c Merge: 252babf3a175b b4c7bf003cb57 Author: Thierry Reding Date: Wed Nov 28 16:43:57 2018 +0100 Merge branch 'for-4.21/dt-bindings' into for-4.21/arm64/dt commit b4c7bf003cb57220af64b59e887581e74f0ce527 Author: Thierry Reding Date: Fri Sep 21 12:03:54 2018 +0200 dt-bindings: tegra186-pmc: Add interrupt controller properties The PMC can be a top-level interrupt controller that provides the top- level controls for wake events. Add optional properties to mark the PMC as interrupt controller. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit e82b0b3828451c1cd331d9f304c6078fcd43b62e Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Fix race on DMA termination If a DMA transfer finishes orderly right when spi_transfer_one_message() determines that it has timed out, the callbacks bcm2835_spi_dma_done() and bcm2835_spi_handle_err() race to call dmaengine_terminate_all(), potentially leading to double termination. Prevent by atomically changing the dma_pending flag before calling dmaengine_terminate_all(). Signed-off-by: Lukas Wunner Fixes: 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") Cc: stable@vger.kernel.org # v4.2+ Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit dbc944115eed48af110646992893dc43321368d8 Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Fix book-keeping of DMA termination If submission of a DMA TX transfer succeeds but submission of the corresponding RX transfer does not, the BCM2835 SPI driver terminates the TX transfer but neglects to reset the dma_pending flag to false. Thus, if the next transfer uses interrupt mode (because it is shorter than BCM2835_SPI_DMA_MIN_LENGTH) and runs into a timeout, dmaengine_terminate_all() will be called both for TX (once more) and for RX (which was never started in the first place). Fix it. Signed-off-by: Lukas Wunner Fixes: 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") Cc: stable@vger.kernel.org # v4.2+ Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit 56c1723426d3cfd4723bfbfce531d7b38bae6266 Author: Lukas Wunner Date: Thu Nov 8 08:06:10 2018 +0100 spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode The IRQ handler bcm2835_spi_interrupt() first reads as much as possible from the RX FIFO, then writes as much as possible to the TX FIFO. Afterwards it decides whether the transfer is finished by checking if the TX FIFO is empty. If very few bytes were written to the TX FIFO, they may already have been transmitted by the time the FIFO's emptiness is checked. As a result, the transfer will be declared finished and the chip will be reset without reading the corresponding received bytes from the RX FIFO. The odds of this happening increase with a high clock frequency (such that the TX FIFO drains quickly) and either passing "threadirqs" on the command line or enabling CONFIG_PREEMPT_RT_BASE (such that the IRQ handler may be preempted between filling the TX FIFO and checking its emptiness). Fix by instead checking whether rx_len has reached zero, which means that the transfer has been received in full. This is also more efficient as it avoids one bus read access per interrupt. Note that bcm2835_spi_transfer_one_poll() likewise uses rx_len to determine whether the transfer has finished. Signed-off-by: Lukas Wunner Fixes: e34ff011c70e ("spi: bcm2835: move to the transfer_one driver model") Cc: stable@vger.kernel.org # v4.1+ Cc: Mathias Duckeck Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Signed-off-by: Mark Brown commit 8bb4f3f55961954154967d4747686ababb67df0d Author: Dinh Nguyen Date: Thu Oct 18 13:57:01 2018 -0500 arm64: dts: stratix10: use "altr,stratix10-rst-mgr" binding The standard reset-simple driver the uses the "altr,rst-mgr" binding is not getting initialized early enough in the boot process, so timers that the kernel needs are still left in reset. Thus an early reset driver was created. This early reset driver is only for the SoCFPGA 32-bit platform. The Stratix10 platform does not need any of the timers that in reset to boot, thus we don't need to early reset driver. Therefore, use the "altr,stratix10-rst-mgr" binding for the reset-simple platform driver on the Stratix10 platform. Also remove the "altr,modrst-offset" property because the driver no longer needs it. Signed-off-by: Dinh Nguyen commit d23968448f291d9cbb67432ac6bb1a1a25dd4ec8 Author: Simon Goldschmidt Date: Mon Nov 5 21:39:00 2018 +0100 ARM: dts: socfpga: use tabs for indentation In two of the gen5 socfpga devicetree files, there are some lines indented using spaces instead of tabs. Fix this by correctly indenting them with tabs. Signed-off-by: Simon Goldschmidt Signed-off-by: Dinh Nguyen commit 3e464ad53ce0ec66212aa001a87f87c362f8d818 Author: Dinh Nguyen Date: Thu Nov 8 10:10:57 2018 -0600 arm: dts: socfpga: remove dma-mask property The dma-mask property has been removed from the NAND driver. Remove the property from the DTS files. Signed-off-by: Dinh Nguyen commit e793b284d7f37c3b41ea8581fb0d0dd48dfac7a8 Author: Simon Goldschmidt Date: Mon Nov 5 21:27:27 2018 +0100 arm: dts: socfpga*.dts*: use SPDX-License-Identifier Follow the recent trend for the license description. This is also in an effort to fully sync the devicetrees with U-Boot. Signed-off-by: Simon Goldschmidt Signed-off-by: Dinh Nguyen commit fbc125afdc5048cb027002147a0e0def7c18573a Author: Dinh Nguyen Date: Tue Oct 9 13:20:21 2018 +0200 ARM: socfpga: Turn on ARM errata for L2 cache Turn on these ARM and PL310 errata for SoCFPGA: ARM_ERRATA_754322 ARM_ERRATA_764369 ARM_ERRATA_775420 PL310_ERRATA_588369 PL310_ERRATA_727915 PL310_ERRATA_753970 PL310_ERRATA_769419 Signed-off-by: Clément Péron Signed-off-by: Dinh Nguyen commit 274c516d6490c7f18458afb32cdfd5b6fe9af236 Author: Manivannan Sadhasivam Date: Wed Oct 24 00:36:51 2018 +0530 arm64: dts: hisilicon: Add Pinctrl support for HiKey970 board Add pinctrl support based on "pinctrl-single" driver for HiKey970 development board from HiSilicon. Signed-off-by: Manivannan Sadhasivam Acked-by: Linus Walleij Signed-off-by: Wei Xu commit 22233f7bf2c99ef52ec19d30876a12d2f725972e Author: Marc Kleine-Budde Date: Wed Nov 28 15:31:37 2018 +0100 can: flexcan: FLEXCAN_IFLAG_MB: add () around macro argument This patch fixes the following checkpatch warning: | Macro argument 'x' may be better as '(x)' to avoid precedence issues Fixes: cbffaf7aa09e ("can: flexcan: Always use last mailbox for TX") Signed-off-by: Marc Kleine-Budde commit bc8ad651516df40bd013ba787ad19f60dac61523 Author: Marc Kleine-Budde Date: Wed Nov 28 15:45:27 2018 +0100 can: flexcan: flexcan_irq(): fix indention The patch fixes the indention by replacing space by tabs, as noted by checkpatch: | ERROR: code indent should use tabs where possible | #980: FILE: drivers/net/can/flexcan.c:980: Fixes: da49a8075c00 ("can: flexcan: implement error passive state quirk") Signed-off-by: Marc Kleine-Budde commit 9dc1ee1184b4177f98001885387c0e268db06c2a Author: Marc Kleine-Budde Date: Mon Nov 12 15:33:57 2018 +0100 can: flexcan: flexcan_start_xmit(): fix indention This patch fixes the indentio nin flexcan_start_xmit() by alligning the code to the opening parenthesis. Signed-off-by: Marc Kleine-Budde commit 0f8af56f74cda146c279c6b8e7e590f778a96cc1 Author: Pankaj Bansal Date: Wed Aug 1 19:36:45 2018 +0530 can: flexcan: enable flexcan for all architectures flexcan is an IP module independent of the SOC architecture. Therefore, enable it for all architectures. Signed-off-by: Pankaj Bansal Signed-off-by: Marc Kleine-Budde commit e3dfddbf0d63d4503bd502d45d6e41961151b786 Author: Kuninori Morimoto Date: Wed Sep 26 01:41:53 2018 +0000 can: rcar: add SPDX identifiers to Kconfig and Makefile This patch adds SPDX-License-Identifier to Kconfig and Makefile. Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Acked-by: Ramesh Shanmugasundaram Signed-off-by: Marc Kleine-Budde commit 7af42e50f67a4e6f42ca377d7150f5bee93135e3 Author: Wolfram Sang Date: Thu Aug 23 15:34:55 2018 +0200 can: rcar: use SPDX identifier for Renesas drivers Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Marc Kleine-Budde commit 06a3f31ae22b4dda56b8512694e029e98779c475 Author: Flavio Suligoi Date: Tue Aug 7 09:17:19 2018 +0200 can: sja1000: plx_pci: add support for ASEM CAN raw device This patch adds support for ASEM opto-isolated dual channels CAN raw device (http://www.asem.it) Signed-off-by: Flavio Suligoi Signed-off-by: Marc Kleine-Budde commit 0db9071353a0ac1ffb49537bf2be0729e1020645 Author: Shubhrajyoti Datta Date: Fri Oct 12 09:55:08 2018 +0530 can: xilinx: add can 2.0 support Add support for can 2.0. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Marc Kleine-Budde commit c5435adc3d2981bbf608a5fa8de1cf2d0d2f2ef9 Author: Shubhrajyoti Datta Date: Fri Oct 12 09:55:09 2018 +0530 dt-bindings: can: xilinx_can: add Xilinx CAN FD 2.0 bindings Add compatible string and new attributes to support the Xilinx CAN FD 2.0. Signed-off-by: Shubhrajyoti Datta Reviewed-by: Rob Herring Signed-off-by: Marc Kleine-Budde commit 81de0cd60fd492575b24d97667f38b8b833fb058 Author: YueHaibing Date: Wed Sep 26 18:32:29 2018 +0800 can: xilinx: fix return type of ndo_start_xmit function The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Marc Kleine-Budde commit 3b17d4175414baefaaf59948b5e0bc030cc3d943 Author: Colin Ian King Date: Mon Jul 30 14:40:37 2018 +0100 can: ucan: fix spelling mistake: "resumbmitting" -> "resubmitting" Trivial fix to spelling mistake in netdev_dbg error message Signed-off-by: Colin Ian King Signed-off-by: Marc Kleine-Budde commit f6f30a609c526dbf6d59490a8c85adaf6ac9b0fa Author: Jenny TC Date: Wed Nov 28 12:22:46 2018 +0530 ASoC: dmic: introduce module_param wakeup_delay Introducing a module param for wakeup_delay in order to align with modeswitch_delay parameter. With this change, both wakeup_delay and modeswitch_delay parameters can be passed as module parameters. Signed-off-by: Jenny TC Signed-off-by: Mark Brown commit bc0a7dbc5a54a06b925064adba8b07d65acf8718 Author: Jenny TC Date: Wed Nov 28 12:22:45 2018 +0530 ASoC: dmic: introduce mode switch delay On startup, applications such as PulseAudio or CRAS enable playback or capture on all PCM devices to verify that configurations are correct, and close them immediately. For DMICs, this can result in the clock being turned off very quickly, which may not compatible with internal state machine transition requirements. This patch add a mode-switch delay which will prevent the clock from being turned off without complying with manufacturer timing specifications. While the DMIC clock may be controlled at a lower level, be it with hardware or firmware, applying the delay during the STOP_TRIGGER phase ensures that there is no race condition, e.g. with the hardware/firmware turning off the clock earlier Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Harsha Priya Signed-off-by: Jenny TC Signed-off-by: Mark Brown commit 22cc062c4dfb16330fe18e8d7e155d733fd59e61 Author: Peter Ujfalusi Date: Wed Nov 14 14:46:30 2018 +0200 dt-bindings: sound: omap-mcpdm: Update documentation for pdmclk McPDM module receives it's functional clock from external source. This clock is the pdmclk provided by the twl6040 audio IC. If the clock is not available all register accesses to McPDM fails and the module is not operational. Signed-off-by: Peter Ujfalusi Acked-by: Rob Herring Signed-off-by: Mark Brown commit 80e733fda42f511b346106351ba7b73d5a8196d4 Author: Cheng-Yi Chiang Date: Sat Nov 24 19:09:46 2018 +0800 ASoC: qcom: sdm845: Create and setup jack in init callback Add a callback for init ops on dai_link to create and setup jack. Signed-off-by: Rohit kumar Signed-off-by: Cheng-Yi Chiang Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 48e2bab90d8e5ea5955e386445626bac939e3b4b Author: Clément Péron Date: Tue Oct 9 13:20:19 2018 +0200 ARM: socfpga: Clean unused functions These functions are unused externally, removed them and declare the one used locally as static. Signed-off-by: Clément Péron Signed-off-by: Dinh Nguyen commit 7f1806ebb08cc28e17dc3320790a01ccdff3d17d Author: Cheng-Yi Chiang Date: Sat Nov 24 19:09:45 2018 +0800 ASoC: qcom: sdm845: Add board specific dapm widgets Add board specific dapm widgets so these widgets can be used in the route. Signed-off-by: Rohit kumar Signed-off-by: Cheng-Yi Chiang Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit f6628486c8489e91c513b62608f89ccdb745600d Author: Clément Péron Date: Tue Oct 9 13:28:37 2018 +0200 ARM: debug: enable UART1 for socfpga Cyclone5 Cyclone5 and Arria10 doesn't have the same memory map for UART1. Split the SOCFPGA_UART1 into 2 options to allow debugging on UART1 for Cyclone5. Signed-off-by: Clément Péron Signed-off-by: Dinh Nguyen commit a758dd2e3a5108ab84c33c1069dd838f866b014e Author: Manivannan Sadhasivam Date: Thu Sep 20 23:01:02 2018 -0700 arm64: dts: hisilicon: Source SoC clock for UART6 Remove fixed clock and source SoC clock for UART6 for HiSilicon Hi3670 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Wei Xu commit f31a89692830061bceba8469607e4e4b0f900159 Author: Wen Yang Date: Wed Nov 28 15:25:00 2018 +0800 dlm: NULL check before kmem_cache_destroy is not needed kmem_cache_destroy(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix ifnullfree.cocci warnings. Signed-off-by: Wen Yang Signed-off-by: David Teigland commit c00e3f8080d1ad8645ba51ae34817df830b44fa2 Author: Manivannan Sadhasivam Date: Thu Sep 20 23:01:01 2018 -0700 arm64: dts: hisilicon: Add clock nodes for Hi3670 SoC Add clock nodes for HiSilicon Hi3670 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Wei Xu commit 4403037daf66104a8c81cffd50395fb8a2e7163e Author: Maxime Ripard Date: Wed Nov 21 09:39:24 2018 +0100 ARM: dts: sun8i: v3s: Remove skeleton and memory to avoid warnings Our memory node will generate a warning in DTC since the unit address is not matching the reg property. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 93870e414d511bbf91a30c052ef291fc8af18eb8 Author: Maxime Ripard Date: Tue Nov 20 22:03:28 2018 +0100 ARM: dts: sun8i: v3s: Provide default muxing for relevant controllers The MMC0 controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 438a44ce7e51ce571f942433c6c7cb87c4c0effd Author: Maxime Ripard Date: Wed Nov 7 10:58:01 2018 +0100 ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 84d794d672001e88d8b877440ede7c739032ad90 Author: Maxime Ripard Date: Wed Nov 21 10:57:41 2018 +0100 ARM: dts: sun8i: v3s: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 420731a25fc57864fd695dd6d9d4dbf0d395486a Author: Maxime Ripard Date: Wed Nov 21 10:04:39 2018 +0100 ARM: dts: sun8i: h3: Remove leading zeros from unit-addresses Most of our device trees have had leading zeros for padding as part of the nodes unit-addresses. Remove all these useless zeros that generate warnings Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 9c4273ee02f68ce39916f3c9c10b6c01dd5bfa42 Author: Maxime Ripard Date: Wed Nov 21 11:57:49 2018 +0100 ARM: dts: sun8i: BPI-M2M: Remove i2c nodes The i2c nodes were pre-populated to ease the use of overlays. However, now that we provide default muxing options for those nodes, the one in the DTS don't provide any content at all. Remove them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit ec16a8e7092b416227ad6adb0d831d10255ba116 Author: Maxime Ripard Date: Tue Nov 20 22:03:28 2018 +0100 ARM: dts: sun8i: a23/a33: Provide default muxing for relevant controllers The I2C's and MMC0 controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit fbb1f83c15a9c69c66a4312227cc638605eedbda Author: Maxime Ripard Date: Wed Nov 21 12:05:00 2018 +0100 ARM: dts: sunxi: reference: Move the muxing back to the common DTSI Now that all the SoCs using the tablet reference design DTSI are using the same pinctrl naming scheme, we can move back the pinctrl phandles to the main DTSI. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 9e41b5e966fe478bbef3cf795cf07c8d6fcb1ccb Author: Maxime Ripard Date: Tue Nov 20 21:42:36 2018 +0100 ARM: dts: sun8i: a23/a33: Remove underscores from nodes names Some GPIO pinctrl nodes cannot be easily removed, because they would also change the pin configuration, for example to add a pull resistor or change the current delivered by the pin. Those nodes still have underscores and unit-addresses in their node names in our DTs, so adjust their name to remove the warnings. Use that occasion to also fix some poorly chosen node-names. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 090e563c91e6cea86e79659868ad70ef313a884a Author: Maxime Ripard Date: Wed Nov 7 10:58:01 2018 +0100 ARM: dts: sun8i: a23/a33: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 4ead0ad7b21734c03d91659ca60818114fffcf7c Author: Maxime Ripard Date: Tue Nov 20 21:03:20 2018 +0100 ARM: dts: sun8i: a23/a33: Remove card detect pull-up Boards usually have an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 9c2d3d17a9127844a0bb3ba730de493c60d90348 Author: Maxime Ripard Date: Wed Nov 21 11:13:25 2018 +0100 ARM: dts: sun8i: a23/a33: Reorder the pin groups The pin groups are supposed to be in alphabetical order, and they aren't. Fix this. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit f2a5e42580e9107c20897ac69a83125bf1325883 Author: Maxime Ripard Date: Wed Nov 21 10:57:41 2018 +0100 ARM: dts: sun8i: a23/a33: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit ec6b944c5adbef09aac9b436fb07e91632f75e05 Author: Maxime Ripard Date: Wed Nov 7 11:14:15 2018 +0100 ARM: dts: sun8i: a23/a33: Remove all useless pinctrl nodes The gpio pinctrl nodes are redundant and as such useless most of the times. Since they will also generate warnings in DTC, we can simply remove most of them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit dac89fd27886fdf6aa6ecb9aa29ee6c1039db0e5 Author: Maxime Ripard Date: Wed Nov 21 10:44:54 2018 +0100 ARM: dts: sun8i: a23/a33: Remove redundant MMC pinmux tuning Some boards override the MMC pin muxing settings in order to enable the pull-ups and change the drive strength to a value higher than the default. While this was needed in the earlier days, this is now the default setting for those pins, and therefore we don't need those board-specific settings anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 3af4c3eaf8cf32c75803ac625eccaefc3a39efd0 Author: Maxime Ripard Date: Wed Nov 21 10:39:42 2018 +0100 ARM: dts: sun8i: a23/a33: Change framebuffer node names to avoid warnings The simple-framebuffer nodes have a unit address, but no reg property which generates a warning when compiling it with DTC. Change the simple-framebuffer node names so that there is no warnings on this anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 5759b8d6f4e01a1dbb220068a1f398b73d18bfe5 Author: Maxime Ripard Date: Wed Nov 21 10:04:39 2018 +0100 ARM: dts: sun8i: a23/a33: Remove leading zeros from unit-addresses Most of our device trees have had leading zeros for padding as part of the nodes unit-addresses. Remove all these useless zeros that generate warnings Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 6013d660a4784454c87302e5e14388cd983dcbcb Author: Maxime Ripard Date: Wed Nov 21 10:02:26 2018 +0100 ARM: dts: sun8i: a23/a33: Remove unused address-cells/size-cells The #address-cells and #size-cells are only relevant for nodes that have childs with reg properties. Otherwise, DTC will emit a warning saying that those properties are unnecessary. Remove them when needed. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit a858f569b80a69076c521532a289097af905cf1e Author: Maxime Ripard Date: Wed Nov 21 09:51:04 2018 +0100 ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings DTC will emit a warning on our OPPs nodes for the common DTSI between the A23 and A33 since those nodes use the frequency as unit addresses, but don't have a matching reg property. Fix this by moving the frequency to the node name instead. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit cce55d8c2b00b1909231b8d9c049766eb5a39eb1 Author: Maxime Ripard Date: Wed Nov 21 09:40:48 2018 +0100 ARM: dts: sun8i: a23/a33: Remove SoC node unit-name to avoid warnings Our main node for all the in-SoC controllers used to have a unit name. The unit-name, in addition to being actually false, would not match any reg property, which generates a warning. Remove it in order to remove those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 7ece96910c5d6aff0ecbd79f729dd0a17642516b Author: Maxime Ripard Date: Wed Nov 21 09:39:24 2018 +0100 ARM: dts: sun8i: a23/a33: Remove skeleton and memory to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 5e043563d119d88c0777fffbd7c2eec630b713cb Author: Maxime Ripard Date: Wed Nov 21 10:02:26 2018 +0100 ARM: dts: sun7i: lamobo-r1: Remove unused address-cells/size-cells The #address-cells and #size-cells are only relevant for nodes that have childs with reg properties. Otherwise, DTC will emit a warning saying that those properties are unnecessary. Remove them when needed. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit d02932889b43524ce6515f09ea3b7df19d124074 Author: Maxime Ripard Date: Wed Nov 21 10:44:54 2018 +0100 ARM: dts: sun7i: Remove redundant MMC pinmux tuning Some boards override the MMC pin muxing settings in order to enable the pull-ups and change the drive strength to a value higher than the default. While this was needed in the earlier days, this is now the default setting for those pins, and therefore we don't need those board-specific settings anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 7dab9adb7d427ffd8ea430f90e2bf4f763c7079d Author: Maxime Ripard Date: Tue Nov 20 22:03:28 2018 +0100 ARM: dts: sun7i: Provide default muxing for relevant controllers The I2C and MMC controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 4d9a06979b1ae0c802440cb4433dfcd85fc7bdd3 Author: Maxime Ripard Date: Fri Sep 7 16:00:22 2018 +0200 ARM: dts: sun7i: Fix HDMI output DTC warning Our HDMI output endpoint on the A10s DTSI has a warning under DTC: "graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary". Fix this by removing those properties. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 0356f1ae06e322a309e52276fcf9d3c2e6c52099 Author: Maxime Ripard Date: Tue Nov 20 21:42:36 2018 +0100 ARM: dts: sun7i: Remove underscores from nodes names Some GPIO pinctrl nodes cannot be easily removed, because they would also change the pin configuration, for example to add a pull resistor or change the current delivered by the pin. Those nodes still have underscores and unit-addresses in their node names in our DTs, so adjust their name to remove the warnings. Use that occasion to also fix some poorly chosen node-names. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 89dddc2cb22fae6ff4e88c756ce8a0c70d1665d8 Author: Maxime Ripard Date: Thu Nov 22 11:19:35 2018 +0100 ARM: dts: sun7i: som204: Use the UART3 TX and RX pin group The SOM204-EVB doesn't use the CTS pin, and thus was defining its own pinctrl node for the UART3 muxing. Since we split away the TX and RX pin, we can use the global node now, and only have the RTS pin in our local node. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit bb4d3ec9a7daa327608e69bb45704f76e2d9413c Author: Maxime Ripard Date: Thu Nov 22 11:18:09 2018 +0100 ARM: dts: sun7i: Split the RTS and CTS pins out of the UART nodes Some UART nodes on the A20 DTSI do not share the same pattern that we use everywhere else, with the RTS and CTS pins split away from the TX and RX pins. Make those pin groups consistent with the rest of our DT. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 85a8c520ca41c719d552595d0aac456ac84b8a33 Author: Maxime Ripard Date: Wed Nov 7 10:58:01 2018 +0100 ARM: dts: sun7i: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit c8fd1584f4df4028e278a95796da0b225b2720cd Author: Maxime Ripard Date: Wed Nov 21 14:16:29 2018 +0100 ARM: dts: sun7i: Remove gpio-keys warnings Some gpio-keys definitions in our DTs were having buttons defined with a unit-address and that would generate a DTC warning. Change the buttons node names to remove the warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 0b92b823b8d880c6b1c1136a6e0caa47fc3df14a Author: Maxime Ripard Date: Wed Nov 21 14:14:58 2018 +0100 ARM: dts: sun7i: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 8860687aaccd59f437c165086772f345b5268e15 Author: Maxime Ripard Date: Tue Nov 20 21:03:20 2018 +0100 ARM: dts: sun7i: Remove card detect pull-up Boards usually have an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 054da074b1e02f7fa49c84820883bffd6b03cad0 Author: Maxime Ripard Date: Wed Nov 7 11:14:15 2018 +0100 ARM: dts: sun7i: Remove all useless pinctrl nodes The gpio pinctrl nodes are redundant and as such useless most of the times. Since they will also generate warnings in DTC, we can simply remove most of them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 8ce97caa3b0a326d96e872b8448a5ef64d3759e6 Author: Maxime Ripard Date: Wed Nov 21 10:39:42 2018 +0100 ARM: dts: sun7i: Change framebuffer node names to avoid warnings The simple-framebuffer nodes have a unit address, but no reg property which generates a warning when compiling it with DTC. Change the simple-framebuffer node names so that there is no warnings on this anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 73732b1d0ef15bf6992ca2f7ed0a5f334ea0635d Author: Maxime Ripard Date: Wed Nov 21 14:03:42 2018 +0100 ARM: dts: sun7i: Change clock node names to avoid warnings Our oscillators clock names have a unit address, but no reg property, which generates a warning in DTC. Change these names to remove those unit addresses. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 1a8a50ad6c3306a424908c6d65a84368ca3d5791 Author: Maxime Ripard Date: Wed Nov 21 09:40:48 2018 +0100 ARM: dts: sun7i: Remove SoC node unit-name to avoid warnings Our main node for all the in-SoC controllers used to have a unit name. The unit-name, in addition to being actually false, would not match any reg property, which generates a warning. Remove it in order to remove those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 3bb9d5a682c828e747ab2a0815438dc11c2c6d99 Author: Maxime Ripard Date: Wed Nov 21 09:39:24 2018 +0100 ARM: dts: sun7i: Remove skeleton and memory to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 1f8bed29730273540be248fa45db6410d63c3a69 Author: Maxime Ripard Date: Tue Nov 20 22:03:28 2018 +0100 ARM: dts: sun6i: Provide default muxing for relevant controllers The I2C and MMC controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 403fa08b29dc3d86c4103105953d429f7f6a1ead Author: Maxime Ripard Date: Fri Sep 7 16:34:40 2018 +0200 ARM: dts: sun6i: colombus: Change i2c node name to avoid warnings Our I2C GPIO bus node name has a unit address, but no reg property, which generates a warning in DTC. Change the name to remove that unit address. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit e3797192428428c7bc2d18bcad8d894e04c231a3 Author: Maxime Ripard Date: Tue Nov 20 21:42:36 2018 +0100 ARM: dts: sun6i: Remove underscores from nodes names Some GPIO pinctrl nodes cannot be easily removed, because they would also change the pin configuration, for example to add a pull resistor or change the current delivered by the pin. Those nodes still have underscores and unit-addresses in their node names in our DTs, so adjust their name to remove the warnings. Use that occasion to also fix some poorly chosen node-names. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 9b60a3bfd8406f3143fe30bf797b5851b7d5ff88 Author: Maxime Ripard Date: Wed Nov 7 10:58:01 2018 +0100 ARM: dts: sun6i: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit dea296bc62a45826629a046b6fec7f06d57989cd Author: Maxime Ripard Date: Wed Nov 21 10:44:54 2018 +0100 ARM: dts: sun6i: Remove redundant MMC pinmux tuning Some boards override the MMC pin muxing settings in order to enable the pull-ups and change the drive strength to a value higher than the default. While this was needed in the earlier days, this is now the default setting for those pins, and therefore we don't need those board-specific settings anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit d491714e8187bd5c3254971074d6c96875f0b957 Author: Maxime Ripard Date: Tue Nov 20 21:03:20 2018 +0100 ARM: dts: sun6i: Remove card detect pull-up Boards usually have an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 8f9e10524902d0b476bcda18cec1925fba6ce2df Author: Maxime Ripard Date: Wed Nov 7 11:14:15 2018 +0100 ARM: dts: sun6i: Remove all useless pinctrl nodes The gpio pinctrl nodes are redundant and as such useless most of the times. Since they will also generate warnings in DTC, we can simply remove most of them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 97b3d91204899faa2daf742cb9f4b661c6e4274b Author: Maxime Ripard Date: Wed Nov 21 14:14:58 2018 +0100 ARM: dts: sun6i: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 1b7e882d30653dd7cf971bdd7de168e23bf6fe68 Author: Maxime Ripard Date: Wed Nov 21 09:40:48 2018 +0100 ARM: dts: sun6i: Remove SoC node unit-name to avoid warnings Our main node for all the in-SoC controllers used to have a unit name. The unit-name, in addition to being actually false, would not match any reg property, which generates a warning. Remove it in order to remove those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit acfd5bbe2641d34a8c377bac8df9dd4b1a3230d3 Author: Maxime Ripard Date: Wed Nov 21 14:03:42 2018 +0100 ARM: dts: sun6i: Change clock node names to avoid warnings Our oscillators clock names have a unit address, but no reg property, which generates a warning in DTC. Change these names to remove those unit addresses. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 5e570c04751c16efd30a939b81bbfeba226743fb Author: Maxime Ripard Date: Wed Nov 21 10:39:42 2018 +0100 ARM: dts: sun6i: Change framebuffer node names to avoid warnings The simple-framebuffer nodes have a unit address, but no reg property which generates a warning when compiling it with DTC. Change the simple-framebuffer node names so that there is no warnings on this anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 86f085c58b984a6cb25a74db5a21ec1997b5ace4 Author: Maxime Ripard Date: Wed Nov 21 09:39:24 2018 +0100 ARM: dts: sun6i: Remove skeleton and memory to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 1eb3927c207e94e48db76b70a5238d68a8b7bdb2 Author: Maxime Ripard Date: Tue Nov 20 22:03:28 2018 +0100 ARM: dts: sun5i: Provide default muxing for relevant controllers The I2C's, MMC0 and MMC1 controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit a45207cef8a476be1443df6aeeecdf8495641b23 Author: Maxime Ripard Date: Tue Nov 20 21:32:43 2018 +0100 ARM: dts: sun5i: A10s: Remove empty SRAM node The SRAM node in the A10s DTSI is empty, remove it. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 17222eb932ad2ec67e583179f507982460d81bde Author: Derek Basehore Date: Tue Nov 27 15:23:31 2018 -0800 arm64: dts: rockchip: Add 32k clk on rk3399-gru This adds the 32k clock to the RK3399 Gru board file, which is provided by a Silego oscillator on Gru boards. Even though it's not directly used, muxes will end up traversing the entire clk tree on calls to determine_rate if it doesn't exist. This is because the 32k clk is listed as a possible parent on some clks. Since the clk doesn't know about the 32k clk (it was never registered), it triggers a global search for it. This can happen about 40 times per second, which isn't great for power. Signed-off-by: Derek Basehore Reviewed-by: Douglas Anderson [moved clock position and adapted commit message a bit] Signed-off-by: Heiko Stuebner commit 4711b57317f0ff5ca9fbd5e2df6c73b2c07ddc53 Author: Jens Axboe Date: Tue Nov 27 17:07:17 2018 -0700 blk-mq: fix failure to decrement plug count on single rq removal If we yank a 'same_queue_rq' request off the plug list, we should also decrement the cached request count. Fixes: 5f0ed774ed29 ("block: sum requests in the plug structure") Signed-off-by: Jens Axboe commit d7c2d23b6fe66f116ebf8180c8e320cf48e96c8a Author: Maxime Ripard Date: Thu Nov 8 11:21:05 2018 +0100 ARM: dts: sunxi: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit bc0160655ec32e0b8e46aa29aa5da1430431b3f7 Author: Maxime Ripard Date: Thu Nov 8 11:20:15 2018 +0100 ARM: dts: sun5i: Remove underscores from nodes names Some GPIO pinctrl nodes cannot be easily removed, because they would also change the pin configuration, for example to add a pull resistor or change the current delivered by the pin. Those nodes still have underscores and unit-addresses in their node names in our DTs, so adjust their name to remove the warnings. Use that occasion to also fix some poorly chosen node-names. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 335d7fcb1d69a5fae9f199b2e9eb3047f1a4dba7 Author: Maxime Ripard Date: Wed Nov 7 15:30:17 2018 +0100 ARM: dts: sunxi: Remove the CMA node label There's no phandle pointing to the CMA pool, so it's label is unnecessary. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 7038250756c42b2bbe02b04223da14aac3a6f641 Author: Maxime Ripard Date: Wed Nov 7 15:28:28 2018 +0100 ARM: dts: sunxi: Change default CMA pool node name The CMA node has a unit address, but no reg property which generates a warning in DTC. Change the node name to reflect its usage and drop the unit address. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit a11f6ca9aef989b56cd31ff4ee2af4fb31a172ec Author: Young Xiao Date: Wed Nov 28 12:36:39 2018 +0000 sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN __vdc_tx_trigger should only loop on EAGAIN a finite number of times. See commit adddc32d6fde ("sunvnet: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN") for detail. Signed-off-by: Young Xiao Signed-off-by: Jens Axboe commit 673df60a880f060e3e94920c7b5f7a9ed8aa65f2 Author: Phil Edworthy Date: Wed Nov 21 10:08:44 2018 +0000 ARM: dts: r9a06g032: Correct the GIC DT node name Harmless mistake, but it's incorrect. The DT spec provides recommendations for the node names: "The name of a node should be somewhat generic, reflecting the function of the device and not its precise programming model. If appropriate, the name should be one of the following choices: ... interrupt-controller" Signed-off-by: Phil Edworthy Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 91f5c32dd0c8fc662694de4d8c5eeb61e4b4210b Author: Fabrizio Castro Date: Thu Nov 8 17:04:43 2018 +0000 ARM: dts: iwg23s-sbc: Add QSPI flash support This commit adds QSPI flash support to the iwg23s board specific device tree. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman commit b6239d4219643bd1ac1d0b5a0faedf69cd2a2bfa Author: Fabrizio Castro Date: Thu Nov 8 17:04:42 2018 +0000 ARM: dts: r8a77470: Add QSPI support Add QSPI[01] support to the RZ/G1C SoC specific device tree. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman commit 976a5ccb808da21f77a3bb1123a9e5df6f2d9564 Author: Biju Das Date: Wed Nov 7 12:06:43 2018 +0000 ARM: dts: iwg23s-sbc: Add pinctl support for EtherAVB Adding pinctrl support for EtherAVB interface. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman commit b5079d767b881b0f516df6627e0c4297137fa5d0 Author: Biju Das Date: Fri Oct 26 09:48:29 2018 +0100 ARM: dts: iwg23s-sbc: Enable cmt0 This patch enables cmt0 support on the iWave iwg23s sbc. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 8129890823855fedab15bc0df1f89beaac5653db Author: Biju Das Date: Fri Oct 26 09:48:28 2018 +0100 ARM: dts: r8a77470: Add CMT SoC specific support Add CMT[01] support to r8a77470 SoC DT. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 92c3ccd9b847a6cf130e10aa305e9e349626e4f0 Author: Biju Das Date: Thu Oct 25 15:53:38 2018 +0100 ARM: dts: r8a77470: Add USB-DMAC device nodes This patch adds USB DMAC nodes. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit e1d31e7ebaa4087ecc7a5e16197f7fa6857aaa75 Author: Biju Das Date: Fri Oct 26 10:32:27 2018 +0100 ARM: dts: iwg23s-sbc: Enable watchdog support This patch enables watchdog support on the iWave iwg23s sbc. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit dc7bf8795d848890641387d98c5e1324d397e9c8 Author: Biju Das Date: Fri Oct 26 10:32:26 2018 +0100 ARM: dts: r8a77470: Add watchdog support to SoC dtsi This patch adds watchdog support to the r8a77470 SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro [simon: moved node to preserve sort order] Signed-off-by: Simon Horman commit fb09bf59f081940a5bc5109aed184e63b2abdd67 Author: Magnus Damm Date: Mon Oct 22 03:21:20 2018 +0900 ARM: dts: r8a7740, emev2, sh73a0: Include SoC name in DTSI Update the R-Mobile A1 (r8a7740), Emma Mobile EV2 (emev2) and SH-Mobile AG5 (sh72a0) DTSI to include product name. Signed-off-by: Magnus Damm [simon: squashed similar patches] Signed-off-by: Simon Horman commit 89862542fab10fed8a3c2f9c167622ef4287351d Author: Laurent Pinchart Date: Wed Oct 17 20:48:01 2018 +0300 ARM: dts: r8a779[01]: Disable unconnected LVDS encoders The LVDS0 encoder on Koelsh and Porter, and the LVDS1 encoder on Lager, are enabled in DT but have no device connected to their output. This result in spurious messages being printed to the kernel log such as rcar-du feb00000.display: no connector for encoder /soc/lvds@feb90000, skipping Fix it by disabling the encoders. Fixes: 15a1ff30d8f9 ("ARM: dts: r8a7790: Convert to new LVDS DT bindings") Fixes: e5c3f4707f39 ("ARM: dts: r8a7791: Convert to new LVDS DT bindings") Reported-by: Geert Uytterhoeven Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman commit 9eb36b945b5c21d57c02a26cc629dd9484ced9aa Author: Fabrizio Castro Date: Mon Oct 8 09:51:52 2018 +0100 ARM: dts: iwg23s-sbc: Add uSD and eMMC support Add uSD card and eMMC support to the iwg23s single board computer powered by the RZ/G1C SoC (a.k.a. r8a77470). Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 0485da788028ecd525291974c8efe2d072607476 Author: Fabrizio Castro Date: Mon Oct 8 09:51:51 2018 +0100 ARM: dts: r8a77470: Add SDHI1 support Althought interface SDHI1 found on the RZ/G1C SoC (a.k.a. r8a77470) is compatible with the R-Car Gen3 ones, its OF compatibility is restricted to the SoC specific compatible string to avoid confusion, as from a more generic perspective the RZ/G1C is sharing the most similarities with the R-Car Gen2 family of SoCs, and there is a combination of R-Car Gen2 compatible SDHI IPs and R-Car Gen3 compatible SDHI IP on this specific chip. This patch adds the SoC specific part of SDHI1 support, and since SDHI1 comes with internal DMA, its DT node looks fairly different from SDHI0 and SDHI2. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 15aa5a95e820e8183aa34535131e7c97789b8504 Author: Fabrizio Castro Date: Mon Oct 8 09:51:50 2018 +0100 ARM: dts: r8a77470: Add SDHI0 support RZ/G1C comes with two different types of IP for the SDHI interfaces, SDHI0 and SDHI2 share the same IP type, and such an IP is also compatible with the one found in R-Car Gen2. SDHI1 IP on the other hand is compatible with R-Car Gen3 with internal DMA. This patch completes the SDHI support of the R-Car Gen2 compatible IPs, including fixing the max-frequency definition of SDHI2, as it turns out there is a bug in Section 1.3.9 of the RZ/G1C Hardware User's Manual (Rev. 1.00 Oct. 2017). Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 4f94af57237ad1c9c6328b468fd8fbbd19c2fb78 Author: Fabrizio Castro Date: Mon Oct 8 10:52:38 2018 +0100 ARM: dts: r8a77470: Add I2C[0123] support Add device tree nodes for the I2C[0123] controllers. Also, add the aliases node. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit ddeec86cb608cc520bd69ab568135ee45d500595 Author: Phil Edworthy Date: Thu Sep 27 14:59:22 2018 +0100 ARM: dts: r9a06g032: Add pinctrl node This provides a pinctrl driver for the Renesas R9A06G032 SoC Based on a patch originally written by Michel Pollet at Renesas. Signed-off-by: Phil Edworthy Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit bc184549853133303cf08d1f19477f9c87ef39fb Author: Peter Ujfalusi Date: Fri Nov 16 15:41:41 2018 +0200 ASoC: davinci-mcasp: Implement configurable dismod handling If the dismod is specified in the DT node, use the specified custom value to configure the drive on state of the inactive TX slots. If the dismod is not present or booted in legacy mode, the dismod is set to low as it was the original behavior. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit a3641b30c19b93b1298028a7210b55145e70056c Author: Peter Ujfalusi Date: Fri Nov 16 15:41:40 2018 +0200 ASoC: davinci-mcasp: Document dismod optional property The dismod property can be used to specify the drive on level of inactive TX slots. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit ca3d9433349ed6a8eadfc9d0ec9e88fff439d0e9 Author: Peter Ujfalusi Date: Fri Nov 16 15:41:39 2018 +0200 ASoC: davinci-mcasp: Update PDIR (pin direction) register handling When McASP is master and the PDIR for the clock pins are configured as outputs before the clocking is configured it will output whatever clock is generated at the moment internally. The clock will switch to the correct rate only when the we start the clock generators. To avoid this we must only set the pin as output after the clock is configured and enabled. AXR pins configured as outputs behaves somehow interesting as well: when McASP is not enabled and the pin is selected as output it will not honor the DISMOD settings for the inactive state, but will pull the pin down. Add a new bitfield and mark the pins there which needs to be output and set the pins only at the time when they will behave correctly. On stream stop configure the pins back to input which makes them to obey the global pin configuration regarding to pull up/down. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 1003c27acfc2174558b2a0803bd6974e19be2738 Author: Peter Ujfalusi Date: Fri Nov 16 15:41:38 2018 +0200 ASoC: davinci-mcasp: Clear TXSTAT register before activating serializers Follow the guideline from the TRM: Before starting, clear the respective transmitter and receiver status registers To avoid stale state stored in the status registers. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 61f94ee4a7435c35d78b22e4ae6e0551908000ae Author: Subhransu S. Prusty Date: Mon Jan 29 21:46:00 2018 +0530 ASoC: Intel: Skylake: Add FW reply for MCLK/SCLK IPC If mclk/sclk is already running, FW responds with IPC reply MCLK/SCLK already running. Add these to the IPC reply lookup table. Signed-off-by: Subhransu S. Prusty Signed-off-by: Sriram Periyasamy Signed-off-by: Vinod Koul Signed-off-by: Mark Brown commit aa15679b2dc898049e9117fbe3ddda0b50fa52d2 Author: Subhransu S. Prusty Date: Mon Jan 29 21:45:59 2018 +0530 ASoC: Intel: Skylake: Make DSP replies more human readable Add more meaning to the IPC replies for easy debugging. Replace the switch case with a lookup table to lookup for the IPC replies and print in human readable form. Signed-off-by: Subhransu S. Prusty Signed-off-by: Sriram Periyasamy Signed-off-by: Vinod Koul Signed-off-by: Mark Brown commit faa2541f5b1afa8b6d777a73bc2f27d5c8c98695 Author: Takashi Iwai Date: Mon Nov 26 17:47:44 2018 +0100 leds: trigger: Introduce audio mute LED trigger This patch adds a new LED trigger for coupling the audio mixer change with the LED on laptops or other devices. Currently there are two trigger types, "audio-mute" and "audio-micmute". The audio driver triggers the LED brightness change via ledtrig_audio_set() call with the proper type (either mute or mic-mute). OTOH, the consumers may call ledtrig_audio_get() for the initial brightness value that may have been set by the audio driver beforehand. This new stuff will be used by HD-audio codec driver and some platform drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi). Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Acked-by: Pali Rohár Signed-off-by: Takashi Iwai commit ed5fc60b909427be6ca93d3e07a0a5f296d7000a Author: Maxime Ripard Date: Fri Sep 7 16:00:22 2018 +0200 ARM: dts: sun5i: a10s: Fix HDMI output DTC warning Our HDMI output endpoint on the A10s DTSI has a warning under DTC: "graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary". Fix this by removing those properties. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 6a9951a18b013b81759f11fd0d30fa5574d30bb6 Author: Maxime Ripard Date: Wed Nov 7 10:58:01 2018 +0100 ARM: dts: sun5i: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 79badc748b44ca0fa5ba51e11a4366953d624218 Author: Maxime Ripard Date: Tue Nov 20 21:03:20 2018 +0100 ARM: dts: sun5i: Remove card detect pull-up Boards usually have an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit f606c4b3b7e942a975db0e3d835dd245473e6dbd Author: Maxime Ripard Date: Wed Nov 7 11:14:15 2018 +0100 ARM: dts: sun5i: Remove all useless pinctrl nodes The gpio pinctrl nodes are redundant and as such useless most of the times. Since they will also generate warnings in DTC, we can simply remove most of them. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 7d94610e1612d9d0249425542c2675b68f6f9b36 Author: Maxime Ripard Date: Fri Sep 7 16:48:33 2018 +0200 ARM: dts: sun5i: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 39bfc2311ca24728357b551708f4d8b950fa4e05 Author: Maxime Ripard Date: Fri Sep 7 16:43:04 2018 +0200 ARM: dts: sun5i: Remove redundant interrupt-controller The interrupt-parent property is set in sun5i.dtsi, so there's no need to repeat it. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit d6b7baed20023b25d9bfa4a05d388a1bbd2df5ea Author: Maxime Ripard Date: Fri Sep 7 16:42:42 2018 +0200 ARM: dts: sun5i: Remove SoC node unit-name to avoid warnings Our main node for all the in-SoC controllers used to have a unit name. The unit-name, in addition to being actually false, would not match any reg property, which generates a warning. Remove it in order to remove those warnings. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 3fb5ff698d53a7f37a4ff281f1bd284c7d6a8835 Author: Maxime Ripard Date: Fri Sep 7 16:41:42 2018 +0200 ARM: dts: sun5i: Remove skeleton to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit a2ff5fe12acc22faf2ce22ac744efecf4bd36579 Author: Maxime Ripard Date: Fri Sep 7 16:34:40 2018 +0200 ARM: dts: sun5i: Change clock node names to avoid warnings Our oscillators clock names have a unit address, but no reg property, which generates a warning in DTC. Change these names to remove those unit addresses. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit d0a595255312ca7a2df51761c1e064255774de87 Author: Maxime Ripard Date: Fri Sep 7 16:05:18 2018 +0200 ARM: dts: sun5i: Change framebuffer node names to avoid warnings The simple-framebuffer nodes have a unit address, but no reg property which generates a warning when compiling it with DTC. Change the simple-framebuffer node names so that there is no warnings on this anymore. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 123b796d3fac60d69a3737d81901ab483c4efd6e Author: Maxime Ripard Date: Fri Sep 7 16:00:22 2018 +0200 ARM: dts: sun4i: Fix HDMI output DTC warning Our HDMI output endpoint on the A10 DTSI has a warning under DTC: "graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary". Fix this by removing those properties. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit c9b543404c5e1fd51a7ac375294519be5064bf80 Author: Maxime Ripard Date: Fri Sep 7 15:59:30 2018 +0200 ARM: dts: sun4i: Fix gpio-keys warning Fix the 'unnecessary #address-cells/#size-cells without "ranges" or child "reg" property' DTC warning for the gpio-keys DT node on A10 boards. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai commit 9c698e8481a15237a5b1db5f8391dd66d59e42a4 Author: Kuninori Morimoto Date: Tue Nov 27 07:35:34 2018 +0000 ASoC: rsnd: tidyup registering method for rsnd_kctrl_new() Current rsnd dvc.c is using flags to avoid duplicating register for MIXer case. OTOH, commit e894efef9ac7 ("ASoC: core: add support to card rebind") allows to rebind sound card without rebinding all drivers. Because of above patch and dvc.c flags, it can't re-register kctrl if only sound card was rebinded, because dvc is keeping old flags. (Of course it will be no problem if rsnd driver also be rebinded, but it is not purpose of above patch). This patch checks current card registered kctrl when registering. In MIXer case, it can avoid duplicate register if card already has same kctrl. In rebind case, it can re-register kctrl because card registered kctl had been removed when unbinding. This patch is updated version of commit b918f1bc7f1ce ("ASoC: rsnd: DVC kctrl sets once") Reported-by: Nguyen Viet Dung Signed-off-by: Kuninori Morimoto Tested-by: Nguyen Viet Dung Cc: Hiroyuki Yokoyama Signed-off-by: Mark Brown commit db4a555f7c4cfcca26ca3a4ff5f9ee9bd6a78f98 Author: Olliver Schinagl Date: Mon Nov 26 17:27:42 2018 +0200 regulator: axp20x: use defines for masks The AXP20X driver currently has several masks defined throughout the code. Use nice defines to make them clean and more descriptive. Additionally include bitops.h, which was missing before, and sort headers. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit 6f5086a6e3383ae6a1b08a88836fcfda7d171ca4 Author: Joerg Roedel Date: Tue Nov 27 17:18:52 2018 +0100 iommu/amd: Remove leading 0s in error log messages Remove the leading 0s in the address field of the error log messages. Signed-off-by: Joerg Roedel commit 1a21ee1aabf7ff9484f2eb122476d80c7f60a620 Author: Joerg Roedel Date: Tue Nov 27 16:43:57 2018 +0100 iommu/amd: Fix line-break in error log reporting With the switch to dev_err for reporting errors from the iommu log there was an unwanted newline introduced. The reason was that the reporting was done in multiple dev_err() calls, and dev_err adds a newline after every call. Fix it by printing the log messages with only one dev_err() call. Signed-off-by: Joerg Roedel commit 101fa0371478aa0457c58e175b8f66a110c4b24c Author: Joerg Roedel Date: Tue Nov 27 16:22:31 2018 +0100 iommu/amd: Use pr_fmt() Make use of pr_fmt instead of having the 'AMD-Vi' prefix added manually at every printk() call. Signed-off-by: Joerg Roedel commit 46c977b2b5b098856dda4735c08e58b6ad7cc44a Author: Andreas Müller Date: Sun Nov 25 20:20:27 2018 -0200 ARM: imx_v6_v7_defconfig: Enable USB_ANNOUNCE_NEW_DEVICES This is very helpful debugging USB issues. Reviewed-by: Fabio Estevam Signed-off-by: Andreas Müller Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit c10f38e7bc296b6928d92e69489f42533f59394d Author: Andreas Müller Date: Sun Nov 25 20:20:26 2018 -0200 ARM: imx_v6_v7_defconfig: Enable BT_BNEP This is necessary to support network over bluetooth: | Sep 11 15:36:33 imx6qdl-variscite-som bluetoothd[281]: kernel lacks bnep-protocol support | Sep 11 15:36:33 imx6qdl-variscite-som bluetoothd[281]: System does not support network plugin Reviewed-by: Fabio Estevam Signed-off-by: Andreas Müller Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit 7df073a864e020a407f1617a295444941dce5912 Author: Otavio Salvador Date: Sun Nov 25 20:20:25 2018 -0200 ARM: imx_v6_v7_defconfig: Remove explicit ARM_UNWIND disable CONFIG_ARM_UNWIND is removed when running 'savedefconfig', but selected by ARM EABI (AEBI) support. This is done in preparation to making further changes to this defconfig cleaner. Reviewed-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Shawn Guo commit a742fd41c02c34e0b1b39ee366eb4982837439df Author: Jaegeuk Kim Date: Tue Nov 27 23:28:37 2018 -0800 f2fs: avoid frequent costly fsck triggers If we want to re-enable nat_bits, we rely on fsck which requires full scan of directory tree. Let's do that by regular fsck or unclean shutdown. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 88584c30e31967db2ad03c7015a9aea3460deb2c Author: Florian Westphal Date: Tue Nov 27 13:28:54 2018 +0100 xfrm: policy: fix policy hash rebuild Dan Carpenter reports following static checker warning: net/xfrm/xfrm_policy.c:1316 xfrm_hash_rebuild() warn: 'dir' is out of bounds '3' vs '2' | 1280 /* reset the bydst and inexact table in all directions */ | 1281 xfrm_hash_reset_inexact_table(net); | 1282 | 1283 for (dir = 0; dir < XFRM_POLICY_MAX; dir++) { | ^^^^^^^^^^^^^^^^^^^^^ |dir == XFRM_POLICY_MAX at the end of this loop. | 1304 /* re-insert all policies by order of creation */ | 1305 list_for_each_entry_reverse(policy, &net->xfrm.policy_all, walk.all) { [..] | 1314 xfrm_policy_id2dir(policy->index)); | 1315 if (!chain) { | 1316 void *p = xfrm_policy_inexact_insert(policy, dir, 0); Fix this by updating 'dir' based on current policy. Otherwise, the inexact policies won't be found anymore during lookup, as they get hashed to a bogus bin. Reported-by: Dan Carpenter Fixes: cc1bb845adc9 ("xfrm: policy: return NULL when inexact search needed") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 86d1d8b72caf648e5b14ac274f9afeaab58bbae1 Author: David Ahern Date: Tue Nov 27 20:52:24 2018 -0800 net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled Randy reported when CONFIG_PROC_FS is not enabled: ld: net/ipv4/af_inet.o: in function `inet_init': af_inet.c:(.init.text+0x42d): undefined reference to `raw_init' Fix by moving the endif up to the end of the proc entries Fixes: 6897445fb194c ("net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs") Reported-by: Randy Dunlap Cc: Mike Manning Signed-off-by: David Ahern Signed-off-by: David S. Miller commit f91528955d0094ff2200632661d62ee64019c985 Author: Al Viro Date: Tue Nov 27 22:32:59 2018 -0500 iov_iter: reduce code duplication The same combination of csum_partial_copy_nocheck() with csum_add_block() is used in a bunch of places. Add a helper doing just that and use it. Signed-off-by: Al Viro commit f25310c7360b1825ee25858b68685c94abaa11a3 Author: Manasi Navare Date: Tue Nov 27 13:41:08 2018 -0800 drm/dsc: Define the DSC 1.1 and 1.2 Line Buffer depth constants DSC specification defines linebuf_depth which contains the line buffer bit depth used to generate the bitstream. These values are defined as per Table 4.1 in DSC 1.2 spec v2 (From Manasi): * Rename as MAX_LINEBUF_DEPTH for DSC 1.1 and DSC 1.2 Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Gaurav K Singh Signed-off-by: Manasi Navare Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-6-manasi.d.navare@intel.com commit a408c857a92be8b4f9932def15737ced02564e47 Author: Manasi Navare Date: Tue Nov 27 13:41:07 2018 -0800 drm/dsc: Add helpers for DSC picture parameter set infoframes According to Display Stream compression spec 1.2, the picture parameter set metadata is sent from source to sink device using the DP Secondary data packet. An infoframe is formed for the PPS SDP header and PPS SDP payload bytes. This patch adds helpers to fill the PPS SDP header and PPS SDP payload according to the DSC 1.2 specification. v7: * Use BUILD_BUG_ON() to protect changing struct size (Ville) * Remove typecaseting (Ville) * Include byteorder.h in drm_dsc.c (Ville) * Correct kernel doc spacing (Anusha) v6: * Use proper sequence points for breaking down the assignments (Chris Wilson) * Use SPDX identifier v5: Do not use bitfields for DRM structs (Jani N) v4: * Use DSC constants for params that dont change across configurations v3: * Add reference to added kernel-docs in Documentation/gpu/drm-kms-helpers.rst (Daniel Vetter) v2: * Add EXPORT_SYMBOL for the drm functions (Manasi) Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Harry Wentland Signed-off-by: Manasi Navare Acked-by: Harry Wentland Reviewed-by: Anusha Srivatsa Acked-by: Sean Paul (For merging through drm-intel) Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-5-manasi.d.navare@intel.com commit 082a7b86013c2b8af75fcbf490c55110945673d8 Author: Srivatsa, Anusha Date: Tue Nov 27 13:41:06 2018 -0800 drm/dsc: Define Rate Control values that do not change over configurations DSC has some Rate Control values that remain constant across all configurations. These are as per the DSC standard. v3: * Define them in drm_dsc.h as they are DSC constants (Manasi) v2: * Add DP_DSC_ prefix (Jani Nikula) Cc: dri-devel@lists.freedesktop.org Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Cc: Gaurav K Singh Cc: Harry Wentland Signed-off-by: Srivatsa, Anusha Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Acked-by: Sean Paul (For merging through drm-intel) Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-4-manasi.d.navare@intel.com commit 538a6b911d8eee93d65fde3a2ab0d2cdc95dbd56 Author: Jan Tuerk Date: Tue Nov 27 16:04:04 2018 +0100 ARM: imx_v6_v7_defconfig: Enable DA9063 PMIC support All recent emtrion modules based on i.mx6 make use of the DA9063. Therefore enable it with the following defaults: - CONFIG_MFD_DA9063=y - CONFIG_REGULATOR_DA9063=y - CONFIG_DA9063_WATCHDOG=m MFD and REGULATOR are built-in to have it at Kernel boot-time. The WATCHDOG is optional and could be loaded from userspace. Signed-off-by: Jan Tuerk Signed-off-by: Shawn Guo commit 85a3d920d30a5460522d180205a61aee53687d07 Author: Jordan Crouse Date: Mon Nov 26 10:20:32 2018 -0700 clk: qcom: Add a dummy enable function for GX gdsc Most of the time the CPU should not be touching the GX domain on the GPU except for a very special use case when the CPU needs to force the GX headswitch off. Add a dummy enable function for the GX gdsc to simulate success so that the pm_runtime reference counting is correct. Signed-off-by: Jordan Crouse Signed-off-by: Stephen Boyd commit 7895861a963cfa995f4233e83665563ab404f73e Author: Jordan Crouse Date: Mon Nov 26 10:20:31 2018 -0700 clk: qcom: gdsc: Don't override existing gdsc pd functions In extreme cases an individual gdsc may wish to override the power domain enable or disable callback functions for their own purposes. Only set the generic gdsc callback if the function pointers are not already set. Acked-by: Rajendra Nayak Signed-off-by: Jordan Crouse Signed-off-by: Stephen Boyd commit 453361cdd757a01a2955dbc7480bc7706e09bd86 Author: Amit Nischal Date: Sun Nov 25 10:06:08 2018 +0530 clk: qcom: Add graphics clock controller driver for SDM845 Add support for the graphics clock controller found on SDM845 based devices. This would allow graphics drivers to probe and control their clocks. Signed-off-by: Amit Nischal Signed-off-by: Taniya Das [sboyd@kernel.org: Collapse return in probe into less lines] Signed-off-by: Stephen Boyd commit 2c30aac50d922e511bead4c8d4366eb3a2657864 Merge: e7395f1f4ba24 96a60ae886a47 Author: David S. Miller Date: Tue Nov 27 16:41:19 2018 -0800 Merge branch 'bnx2x-Popoulate-firmware-versions-in-driver-info-query' Sudarsana Reddy Kalluru says: ==================== bnx2x: Popoulate firmware versions in driver info query. The patch series populates MBI and storm firware versions in the ethtool driver info query. ==================== Signed-off-by: David S. Miller commit 96a60ae886a479196e84b6f56f217c9c23b7cb2b Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 22:25:57 2018 -0800 bnx2x: Add storm FW version to ethtool driver query output. The patch populates the Storm FW version in the ethtool driver query data. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit a1bcaf023120d44c3500cbcf5769bb3cf034c9ca Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 22:25:56 2018 -0800 bnx2x: Add MBI version to ethtool driver query output. The patch populates the MBI version in the ethtool driver query data. Adding 'extended_dev_info_shared_cfg' structure describing the nvram structure, this is required to access the mbi version string. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit e7395f1f4ba24dc4116b0b87b4ed0664109b450a Author: Eric Dumazet Date: Mon Nov 26 14:49:12 2018 -0800 tcp: remove hdrlen argument from tcp_queue_rcv() Only one caller needs to pull TCP headers, so lets move __skb_pull() to the caller side. Signed-off-by: Eric Dumazet Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 16e8c4ca21a238cdf0355475bf15bd72e92feb8f Author: Vijay Khemka Date: Mon Nov 26 13:49:04 2018 -0800 net/ncsi: Add NCSI Mellanox OEM command This patch adds OEM Mellanox commands and response handling. It also defines OEM Get MAC Address handler to get and configure the device. ncsi_oem_gma_handler_mlx: This handler send NCSI mellanox command for getting mac address. ncsi_rsp_handler_oem_mlx: This handles response received for all mellanox OEM commands. ncsi_rsp_handler_oem_mlx_gma: This handles get mac address response and set it to device. Signed-off-by: Vijay Khemka Signed-off-by: David S. Miller commit bd7153bd83b806bfcc2e79b7a6f43aa653d06ef3 Author: Heiner Kallweit Date: Mon Nov 26 20:24:16 2018 +0100 r8169: remove unneeded mmiowb barriers writex() has implicit barriers, that's what makes it different from writex_relaxed(). Therefore these calls to mmiowb() can be removed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 5d497936756fa2a917643ca688585d721dc6d31e Author: Peng Li Date: Mon Nov 26 18:43:00 2018 +0000 net: hns3: Config NIC port speed same as that of optical module Port 0/1 of HiP08 supports 10G and 25G. This patch adds a change to configure NIC port speed same as that of optical module(SFP/QFSP). Driver gets the optical module speed and sets NIC port speed accordingly. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit e431c92188a9b76c16707302a9fe848a70982c13 Author: Amit Nischal Date: Sun Nov 25 10:06:07 2018 +0530 dt-bindings: clock: Introduce QCOM Graphics clock bindings Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SDM845 SoCs. Signed-off-by: Amit Nischal Reviewed-by: Rob Herring [sboyd@kernel.org: Add input clocks property] Signed-off-by: Stephen Boyd commit cc3ec656c78cdbaed925bdc47112735b2d8d2e0b Merge: 3251a2ff95139 288f06a001eb6 Author: David S. Miller Date: Tue Nov 27 16:20:20 2018 -0800 Merge branch 'net-nsid-interpretation' Nicolas Dichtel says: ==================== Ease to interpret net-nsid The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID). After this series, with a patched iproute2: $ ip netns add foo $ ip netns add bar $ touch /var/run/netns/init_net $ mount --bind /proc/1/ns/net /var/run/netns/init_net $ ip netns set init_net 11 $ ip netns set foo 12 $ ip netns set bar 13 $ ip netns init_net (id: 11) bar (id: 13) foo (id: 12) $ ip -n foo netns set init_net 21 $ ip -n foo netns set foo 22 $ ip -n foo netns set bar 23 $ ip -n foo netns init_net (id: 21) bar (id: 23) foo (id: 22) $ ip -n bar netns set init_net 31 $ ip -n bar netns set foo 32 $ ip -n bar netns set bar 33 $ ip -n bar netns init_net (id: 31) bar (id: 33) foo (id: 32) $ ip netns list-id target-nsid 12 nsid 21 current-nsid 11 (iproute2 netns name: init_net) nsid 22 current-nsid 12 (iproute2 netns name: foo) nsid 23 current-nsid 13 (iproute2 netns name: bar) $ ip -n bar netns list-id target-nsid 32 nsid 31 nsid 21 current-nsid 31 (iproute2 netns name: init_net) v3 -> v4: - patch 5/5: fix imbalance lock in error path v2 -> v3: - patch 5/5: account NETNSA_CURRENT_NSID in rtnl_net_get_size() v1 -> v2: - patch 1/5: remove net from struct rtnl_net_dump_cb - patch 2/5: new in this version - patch 3/5: use a bool to know if rtnl_get_net_ns_capable() was called - patch 5/5: use struct net_fill_args ==================== Signed-off-by: David S. Miller commit 288f06a001eb6265122c620295b68a0dd53d1482 Author: Nicolas Dichtel Date: Mon Nov 26 15:42:06 2018 +0100 netns: enable to dump full nsid translation table Like the previous patch, the goal is to ease to convert nsids from one netns to another netns. A new attribute (NETNSA_CURRENT_NSID) is added to the kernel answer when NETNSA_TARGET_NSID is provided, thus the user can easily convert nsids. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 3a4f68bf660414801781fd06506a9c75c2d936e5 Author: Nicolas Dichtel Date: Mon Nov 26 15:42:05 2018 +0100 netns: enable to specify a nsid for a get request Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one netns to a nsid of another netns. This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the user to interpret a nsid received from an other netns. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit cff478b9d9ccaee0de0e02700c63addf007b5d3c Author: Nicolas Dichtel Date: Mon Nov 26 15:42:04 2018 +0100 netns: add support of NETNSA_TARGET_NSID Like it was done for link and address, add the ability to perform get/dump in another netns by specifying a target nsid attribute. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a0732ad14d40ee7562c8c6e04b01af6134c82831 Author: Nicolas Dichtel Date: Mon Nov 26 15:42:03 2018 +0100 netns: introduce 'struct net_fill_args' This is a preparatory work. To avoid having to much arguments for the function rtnl_net_fill(), a new structure is defined. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 74be39ebba36e98a973ddb914fb41dc9e5129e36 Author: Nicolas Dichtel Date: Mon Nov 26 15:42:02 2018 +0100 netns: remove net arg from rtnl_net_fill() This argument is not used anymore. Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 3251a2ff951393bcc4dafb68331162f20a3ad304 Merge: 77f06aacac23b 057d2b192be89 Author: David S. Miller Date: Tue Nov 27 16:17:20 2018 -0800 Merge branch 'qed-enhancements-series' Sudarsana Reddy Kalluru says: ==================== qed* enhancements series The patch series add few enhancements to qed/qede drivers. Changes from previous versions: ------------------------------- v3: Revert v2 changes as the other paths (i.e. ptp) access the same data in atomic context. v2: Use __set_bit()/__clear_bit() where data access doesn't need to be atomic. ==================== Signed-off-by: David S. Miller commit 057d2b192be89df4c78fc8eb5d344d362d75e3c5 Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 02:27:00 2018 -0800 qed: Add support for MBI upgrade over MFW. The patch adds driver support for MBI image update through MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit f04e48dbfaf732e0a9f926057e8f6fd44d45d1bb Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 02:26:59 2018 -0800 qede: Update link status only when interface is ready. In the case of internal reload (e.g., mtu change), there could be a race between link-up notification from mfw and the driver unload processing. In such case kernel assumes the link is up and starts using the queues which leads to the server crash. Send link notification to the kernel only when driver has already requested MFW for the link. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 149d3775f108c9b97f3309891f010b65e912c7b7 Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 02:26:58 2018 -0800 qede: Simplify the usage of qede-flags. The values represented by qede->flags is being used in mixed ways: 1. As 'value' at some places e.g., QEDE_FLAGS_IS_VF usage 2. As bit-mask(value) at some places e.g., QEDE_FLAGS_PTP_TX_IN_PRORGESS usage. This implementation pose problems in future when we want to add more flag values e.g., overlap of the values, overflow of 64-bit storage. Updated the implementation to go with approach (2) for qede->flags. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit ec036eb92e34298871c45ae6469cd8f7bb56c30e Author: Sudarsana Reddy Kalluru Date: Mon Nov 26 02:26:57 2018 -0800 qed: Display port_id in the UFP debug messages. MFW sends UFP notifications mostly during the device init phase and PFs might not be assigned with a name by this time. Hence capturing port-id in the debug messages would help in finding which PF the ufp notification was sent to. Also, fixed a minor scemantic issue in a debug print. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 19fd5adbb595f022c8f3a05133a673143c79fa91 Author: Manasi Navare Date: Tue Nov 27 13:41:05 2018 -0800 drm/dsc: Define VESA Display Stream Compression Capabilities This defines all the DSC parameters as per the VESA DSC spec that will be required for DSC encoder/decoder v6: (From Manasi) * Add a bit mask for RANGE_BPG_OFFSET for 6 bits(Manasi) v5 (From Manasi) * Add the RC constants as per the spec v4 (From Manasi) * Add the DSC_MUX_WORD_SIZE constants (Manasi) v3 (From Manasi) * Remove the duplicate define (Suggested By:Harry Wentland) v2: Define this struct in DRM (From Manasi) * Changed the data types to u8/u16 instead of unsigned longs (Manasi) * Remove driver specific fields (Manasi) * Move this struct definition to DRM (Manasi) * Define DSC 1.2 parameters (Manasi) * Use DSC_NUM_BUF_RANGES (Manasi) * Call it drm_dsc_config (Manasi) Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Harry Wentland Signed-off-by: Manasi Navare Signed-off-by: Gaurav K Singh Co-developed-by: Gaurav K Singh Acked-by: Harry Wentland Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-3-manasi.d.navare@intel.com commit 77f06aacac23b19bab9d8da588d02cd0758eb4d6 Merge: 712ee16c230fd d596df3a1421e Author: David S. Miller Date: Tue Nov 27 15:46:08 2018 -0800 Merge branch 'aquantia-usb' Igor Russkikh says: ==================== Add support for Aquantia AQtion USB to 5/2.5GbE devices This patchset introduces support for new multigig ethernet to USB dongle, developed jointly by Aquantia (Phy) and ASIX (USB MAC). The driver has similar structure with other ASIX MAC drivers (AX88179), but with a number of important differences: - Driver supports both direct Phy and custom firmware interface for Phy programming. This is due to different firmware modules available with this product. - Driver handles new 2.5G/5G link speed configuration and reporting. - Device support all speeds from 100M up to 5G. - Device supports MTU up to 16K. Device supports various standard networking features, like checksum offloads, vlan tagging/filtering, TSO. The code of this driver is based on original ASIX sources and was extended by Aquantia for 5G multigig support. Patchset v2 includes following changes: - Function variables declarions fixed to reverse xmass tree - Improve patch layout structure - Remove unnecessary curly braces in switch/case statements - Use 'packed' attribute for HW structures only - Use eth_mac_addr function in set_mac_addr callback - Remove unnecessary 'memset' calls. - Read MAC address from EEPROM function has now better name - Use driver_priv field to store context. It avoids ugly cast. - Set max_mtu field. Remove check for MTU size - Rewrite read/write functions. Add helpers for read/write 16/32 bit values - Use mask and shifts instead of bitfields to support BE platforms. - Use stack allocated buffer for configuring mcast filters - Use AUTONEG_ENABLE when go to suspend state - Pad out wol_cfg field from context structure. Use stack allocated instead - Remove driver version - Check field 'duplex' in set_link_ksetting callback as well - Use already created defines in usb matching macro - Rename phy_ops struct to phy_cfg - Use ether_addr_copy for copying mac address - Add fall-through comment in switch/case for avoid checkpatch warning - Remove match for CDC ether device - Add ASIX's HW id-s to match this driver - Add all HW id-s with which driver can work to blacklist of cdc_ether driver Patchset v3 includes following changes: - Use linkmode_copy instead of bitmap_copy - Remove Direct PHY access code since production HW will not have this mode anymore - Fix line over 80 symbols and alignments in cdc_ether patch - Add match for ECM configuration On start our HW reports both ECM and vendor configs. Linux prefers to use ECM driver and chooses active configuration which is for ecm driver (not for vendor specific). We need to match this configuration and forcibly switch configuration to vendor specific. Patchset v4 includes following changes: - Set gso_max_size. - Optimize accessing to descriptors - Use SKB_TRUESIZE macro. ==================== Signed-off-by: David S. Miller commit d596df3a1421e56ff42508dcc8bae44224f9b231 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:50 2018 +0000 net: usb: aqc111: Extend cdc_ether blacklist Added Aquantia and ASIX device IDs to prevent loading cdc_ether for these devices. Our firmware reports CDC configuration simultaneously with vendor specific. Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit fa61ce4db81c8c939c4d0cf4db83b1d2d9a401ad Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:47 2018 +0000 net: usb: aqc111: Add ASIX's HW ids It enables driver for ASIX products which are also based on aqc111/112U chips. Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e58ba4544c7771591d1e3157bc01b4a8e4d1c3fc Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:45 2018 +0000 net: usb: aqc111: Add support for wake on LAN by MAGIC packet Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit abbd8e7d6d108d34405159fc898b0717cfd3e6de Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:42 2018 +0000 net: usb: aqc111: Implement get/set_link_ksettings callbacks Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 027e6f7800e5ff2b66afced2f3a0f0029c98ecf3 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:38 2018 +0000 net: usb: aqc111: Initialize ethtool_ops structure Implement get_drvinfo, set/get_msglevel, get_link callbacks Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 4189673a2e60e45edb5cc74df96c4a738907e63e Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:35 2018 +0000 net: usb: aqc111: Add RX VLAN filtering support Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7afa6c9803eac43b205c9e33a5ea543b2c51d026 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:33 2018 +0000 net: usb: aqc111: Add support for VLAN_CTAG_TX/RX offload Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 59b04eeaf294704f29052216344ce52294d7d4e1 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:31 2018 +0000 net: usb: aqc111: Implement set_rx_mode callback Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit de074e7a7e20f04023c8fdcb0ed6e356f699ec4b Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:28 2018 +0000 net: usb: aqc111: Add support for TSO Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 6649d2a6c43298552db5aa09e522f821cda0b5e0 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:26 2018 +0000 net: usb: aqc111: Add support for enable/disable checksum offload Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a4017cc264c66b368218ece00f1b8a1a1de31731 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:23 2018 +0000 net: usb: aqc111: Add support for changing MTU Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 0203146646be831de832e7fd2dc4ef1f32958f51 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:21 2018 +0000 net: usb: aqc111: Add checksum offload support Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 361459cd9642631f048719169da9ef14cbf4a932 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:19 2018 +0000 net: usb: aqc111: Implement RX data path Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 4a3576d2bcc755475890e2db717cab0effb1f140 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:16 2018 +0000 net: usb: aqc111: Implement TX data path Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit df2d59a2ab6c9ceac2c4104272fce03493b8f62f Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:14 2018 +0000 net: usb: aqc111: Add support for getting and setting of MAC address Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7b8b06544ab03553022ea77736203d3502de6415 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:12 2018 +0000 net: usb: aqc111: Introduce link management Add full hardware initialization sequence and link configuration logic Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 33cd597fbfe00d80ce9762fdec8a296b0bc2bfe6 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:09 2018 +0000 net: usb: aqc111: Introduce PHY access Add helpers to write 32bit values. Implement PHY power up/down sequences. AQC111, PHY is being controlled via vendor command interface. Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit f3aa095ac7ba2ef35ab7cfae52a7ee476723c155 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:07 2018 +0000 net: usb: aqc111: Various callbacks implementation Reset, stop callbacks, driver unbind callback. More register defines required for these callbacks. Add helpers to read/write 16bit values Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 619fcb4487959ad5238af1adb13c331dc6945072 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:04 2018 +0000 net: usb: aqc111: Add implementation of read and write commands Read/write command register defines and functions Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7cea2d40afd05375d521a0f8e17dec1c1b5806b2 Author: Dmitry Bezrukov Date: Mon Nov 26 09:33:02 2018 +0000 net: usb: aqc111: Add bind and empty unbind callbacks Initialize net_device_ops structure Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 17364b805f5b9016bb528241ba91481e3497e5e1 Author: Dmitry Bezrukov Date: Mon Nov 26 09:32:59 2018 +0000 net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Initialize usb_driver structure skeleton Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 712ee16c230fdddb15e0ff5d7c33a441d43e5787 Author: yupeng Date: Sun Nov 25 23:35:46 2018 -0800 add documents for snmp counters Add explaination of below counters: TcpExtTCPRcvCoalesce TcpExtTCPAutoCorking TcpExtTCPOrigDataSent TCPSynRetrans TCPFastOpenActiveFail TcpExtListenOverflows TcpExtListenDrops TcpExtTCPHystartTrainDetect TcpExtTCPHystartTrainCwnd TcpExtTCPHystartDelayDetect TcpExtTCPHystartDelayCwnd Signed-off-by: yupeng Signed-off-by: David S. Miller commit 7c247c067590b102ed2bd119bcadf4986ca10e94 Author: Manasi Navare Date: Tue Nov 27 13:41:04 2018 -0800 drm/dsc: Define Display Stream Compression PPS infoframe This patch defines a new header file for all the DSC 1.2 structures and creates a structure for PPS infoframe which will be used to send picture parameter set secondary data packet for display stream compression. All the PPS infoframe syntax elements are taken from DSC 1.2 specification from VESA. v4: * Remove redundant blankline in doc (Ville) * use drm_dsc namespace for all structs (Ville) * Use packed struct (Ville) v3: * Add the SPDX shorthand (Chris Wilson) v2: * Do not use bitfields in the struct (Jani Nikula) Cc: Gaurav K Singh Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Harry Wentland Signed-off-by: Manasi Navare Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-2-manasi.d.navare@intel.com commit 4d4101c8b32186657c4693e1c33f90679193280b Author: Manasi Navare Date: Tue Nov 27 13:41:03 2018 -0800 drm/dsc: Modify DRM helper to return complete DSC color depth capabilities DSC DPCD color depth register advertises its color depth capabilities by setting each of the bits that corresponding to a specific color depth. This patch defines those specific color depths and adds a helper to return an array of color depth capabilities. v2: * Simplify the logic (Ville) Signed-off-by: Manasi Navare Cc: Ville Syrjala Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Ville Syrjala Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-1-manasi.d.navare@intel.com commit 50853808ff4ab3fc85707bd51703b046546cf822 Merge: 4e3c7c00bba06 c2e7490c31ff6 Author: David S. Miller Date: Tue Nov 27 15:27:08 2018 -0800 Merge branch 'mlxsw-Prepare-for-VLAN-aware-bridge-w-VxLAN' Ido Schimmel says: ==================== mlxsw: Prepare for VLAN-aware bridge w/VxLAN The driver is using 802.1Q filtering identifiers (FIDs) to represent the different VLANs in the VLAN-aware bridge (only one is supported). However, the device cannot assign a VNI to such FIDs, which prevents the driver from supporting the enslavement of VxLAN devices to the VLAN-aware bridge. This patchset works around this limitation by emulating 802.1Q FIDs using 802.1D FIDs, which can be assigned a VNI and so far have only been used in conjunction with VLAN-unaware bridges. The downside of this approach is that multiple {Port,VID}->FID entries are required, whereas a single VID->FID entry is required with "true" 802.1Q FIDs. First four patches introduce the new FID family of emulated 802.1Q FIDs and the associated type of router interfaces (RIFs). Last patch flips the driver to use this new FID family. The diff is relatively small because the internal implementation of each FID family is contained and hidden in spectrum_fid.c. Different internal users (e.g., bridge, router) are aware of the different FID types, but do not care about their internal implementation. This makes it trivial to swap the current implementation of 802.1Q FIDs with the new one, using 802.1D FIDs. ==================== Signed-off-by: David S. Miller commit c2e7490c31ff6f53617bae4cd85faf50fa543d56 Author: Ido Schimmel Date: Sun Nov 25 09:43:59 2018 +0000 mlxsw: spectrum: Flip driver to use emulated 802.1Q FIDs Replace 802.1Q FIDs and VLAN RIFs with their emulated counterparts. The emulated 802.1Q FIDs are actually 802.1D FIDs and thus use the same flood tables, of per-FID type. Therefore, add 4K-1 entries to the per-FID flood tables for the new FIDs and get rid of the FID-offset flood tables that were used by the old 802.1Q FIDs. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit ba6da02a9cffa49f40f8979a6f91e9218a870870 Author: Ido Schimmel Date: Sun Nov 25 09:43:58 2018 +0000 mlxsw: spectrum_router: Introduce emulated VLAN RIFs Router interfaces (RIFs) constructed on top of VLAN-aware bridges are of "VLAN" type, whereas RIFs constructed on top of VLAN-unaware bridges of "FID" type. In other words, the RIF type is derived from the underlying FID type. VLAN RIFs are used on top of 802.1Q FIDs, whereas FID RIFs are used on top of 802.1D FIDs. Since the previous patch emulated 802.1Q FIDs using 802.1D FIDs, this patch emulates VLAN RIFs using FID RIFs. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d62dd8a0c808b6afac5c85547a84aad7b187b108 Author: Ido Schimmel Date: Sun Nov 25 09:43:57 2018 +0000 mlxsw: spectrum_fid: Introduce emulated 802.1Q FIDs The driver uses 802.1Q FIDs when offloading a VLAN-aware bridge. Unfortunately, it is not possible to assign a VNI to such FIDs, which prompts the driver to forbid the enslavement of VxLAN devices to a VLAN-aware bridge. Workaround this hardware limitation by creating a new family of FIDs, emulated 802.1Q FIDs. These FIDs are emulated using 802.1D FIDs, which can be assigned a VNI. The downside of this approach is that multiple {Port, VID}->FID entries are required, whereas only a single VID->FID is required with "true" 802.1Q FIDs. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 7c4a729221566c3523701c7a08983c580a84012a Author: Ido Schimmel Date: Sun Nov 25 09:43:55 2018 +0000 mlxsw: spectrum_fid: Make flood index calculation more robust 802.1D FIDs use a per-FID flood table, where the flood index into the table is calculated by subtracting 4K from the FID's index. Currently, 802.1D FIDs start at 4K, so the calculation is correct, but if it was ever to change, the calculation will no longer be correct. In addition, this change will allow us to reuse the flood index calculation function in the next patch, where we are going to emulate 802.1Q FIDs using 802.1D FIDs. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 6502be9f04da2df88095e9ff7c964c2d5915bb3a Author: Ido Schimmel Date: Sun Nov 25 09:43:54 2018 +0000 mlxsw: spectrum_switchdev: Do not set field when it is reserved When configuring an FDB entry pointing to a LAG netdev (or its upper), the driver should only set the 'lag_vid' field when the FID (filtering identifier) is of 802.1D type. Extend the 802.1D FID family with an attribute indicating whether this field should be set and based on its value set the field or leave it blank. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit e9fca076569c7502e2c3af5d386a0b8cab4c081c Merge: f60d405a870f9 703c605fac82d Author: Florian Fainelli Date: Tue Nov 27 15:26:06 2018 -0800 Merge tag 'tags/bcm2835-dt-next-2018-11-27' into devicetree/next This pull request adds a compatible string to the DT necessary for the firmware and VCHI driver to coordinate on using the correct cache line size for the platform. Signed-off-by: Florian Fainelli commit 34758f81559a1a664c8a99209b15267a542c3cf5 Merge: 0810d5cc29a1e 502b431cda801 Author: Florian Fainelli Date: Tue Nov 27 15:25:25 2018 -0800 Merge tag 'tags/bcm2835-drivers-next-2018-11-27' into drivers/next This pull request adds SPDX to BCM2835 drivers, and fixes some bugs in the firmware driver (silently hanging if the VPU doesn't respond to a mailbox transaction, and undersized buffers in the firmware property transactions for tags that aren't used yet in the upstream). Signed-off-by: Florian Fainelli commit 4e3c7c00bba0636b97eb23d582c20b0f5d95ce20 Author: YueHaibing Date: Sat Nov 24 18:16:41 2018 +0800 net: aquantia: return 'err' if set MPI_DEINIT state fails Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:260:7: warning: variable 'err' set but not used [-Wunused-but-set-variable] 'err' should be returned while set MPI_DEINIT state fails in hw_atl_utils_soft_reset. Fixes: cce96d1883da ("net: aquantia: Regression on reset with 1.x firmware") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit ff2237890caba72221e1d500f450a922ed96345e Merge: 02c72d5edadc4 1ed1ccb99e2a6 Author: David S. Miller Date: Tue Nov 27 15:04:16 2018 -0800 Merge branch 'bridge-bools' Nikolay Aleksandrov says: ==================== net: bridge: add an option to disabe linklocal learning This set adds a new bridge option which can control learning from link-local packets, by default learning is on to be consistent and avoid breaking users expectations. If the new no_linklocal_learn option is enabled then the bridge will stop learning from link-local packets. In order to save space for future boolean options, patch 01 adds a new bool option API that uses a bitmask to control boolean options. The bridge is by far the largest netlink attr user and we keep adding simple boolean options which waste nl attr ids and space. We're not directly mapping these to the in-kernel bridge flags because some might require more complex configuration changes (e.g. if we were to add the per port vlan stats now, it'd require multiple checks before changing value). Any new bool option needs to be handled by both br_boolopt_toggle and get in order to be able to retrieve its state later. All such options are automatically exported via netlink. The behaviour of setting such options is consistent with netlink option handling when a missing option is being set (silently ignored), e.g. when a newer iproute2 is used on older kernel. All supported options are exported via bm's optmask when dumping the new attribute. v2: address Andrew Lunn's comments, squash a minor change into patch 01, export all supported options via optmask when dumping, add patch 03, pass down extack so options can return meaningful errors, add WARN_ON on unsupported options (should not happen) ==================== Signed-off-by: David S. Miller commit 1ed1ccb99e2a6bf3e2eb5f2a9f8420f17ea00e92 Author: Nikolay Aleksandrov Date: Sat Nov 24 04:34:22 2018 +0200 net: bridge: export supported boolopts Now that we have at least one bool option, we can export all of the supported bool options via optmask when dumping them. v2: new patch Signed-off-by: Nikolay Aleksandrov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 70e4272b4c81828e7d942209bae83b9d92752cfe Author: Nikolay Aleksandrov Date: Sat Nov 24 04:34:21 2018 +0200 net: bridge: add no_linklocal_learn bool option Use the new boolopt API to add an option which disables learning from link-local packets. The default is kept as before and learning is enabled. This is a simple map from a boolopt bit to a bridge private flag that is tested before learning. v2: pass NULL for extack via sysfs Signed-off-by: Nikolay Aleksandrov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a428afe82f98d2ffb31c981671630df1fa25906f Author: Nikolay Aleksandrov Date: Sat Nov 24 04:34:20 2018 +0200 net: bridge: add support for user-controlled bool options We have been adding many new bridge options, a big number of which are boolean but still take up netlink attribute ids and waste space in the skb. Recently we discussed learning from link-local packets[1] and decided yet another new boolean option will be needed, thus introducing this API to save some bridge nl space. The API supports changing the value of multiple boolean options at once via the br_boolopt_multi struct which has an optmask (which options to set, bit per opt) and optval (options' new values). Future boolean options will only be added to the br_boolopt_id enum and then will have to be handled in br_boolopt_toggle/get. The API will automatically add the ability to change and export them via netlink, sysfs can use the single boolopt function versions to do the same. The behaviour with failing/succeeding is the same as with normal netlink option changing. If an option requires mapping to internal kernel flag or needs special configuration to be enabled then it should be handled in br_boolopt_toggle. It should also be able to retrieve an option's current state via br_boolopt_get. v2: WARN_ON() on unsupported option as that shouldn't be possible and also will help catch people who add new options without handling them for both set and get. Pass down extack so if an option desires it could set it on error and be more user-friendly. [1] https://www.spinics.net/lists/netdev/msg532698.html Signed-off-by: Nikolay Aleksandrov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 12e0888de8d3bab92d219379d4226c7f9c306a91 Merge: 99b90b5d02e16 7b369a42e6d06 Author: Florian Fainelli Date: Tue Nov 27 13:24:50 2018 -0800 Merge tag 'tags/bcm2835-soc-next-2018-11-27' into soc/next This pull request adds SPDX identifiers to the bcm2835 platform files. Signed-off-by: Florian Fainelli commit b8db159239b3f51e2b909859935cc25cb3ff3eed Author: J. Bruce Fields Date: Mon Nov 26 11:36:52 2018 -0500 lockd: fix decoding of TEST results We fail to advance the read pointer when reading the stat.oh field that identifies the lock-holder in a TEST result. This turns out not to matter if the server is knfsd, which always returns a zero-length field. But other servers (Ganesha is an example) may not do this. The result is bad values in fcntl F_GETLK results. Fix this. Signed-off-by: J. Bruce Fields commit 0d4d6720ce9ac0d393aa35696520fde48b2064a5 Author: J. Bruce Fields Date: Tue Nov 6 17:44:03 2018 -0500 nfsd4: skip unused assignment Signed-off-by: J. Bruce Fields commit f8f71d00651325377ec125938ee8a29c1f7da6ef Author: J. Bruce Fields Date: Tue Nov 6 11:47:20 2018 -0500 nfsd4: forbid all renames during grace period The idea here was that renaming a file on a nosubtreecheck export would make lookups of the old filehandle return STALE, making it impossible for clients to reclaim opens. But during the grace period I think we should also hold off on operations that would break delegations. Signed-off-by: J. Bruce Fields commit d8836f772422210517fc6b36283fa5f63dd789e8 Author: J. Bruce Fields Date: Mon Nov 5 20:04:06 2018 -0500 nfsd4: remove unused nfs4_check_olstateid parameter Signed-off-by: J. Bruce Fields commit fdec6114ee1f0f43b1ad081ad8d46b23ba126d70 Author: J. Bruce Fields Date: Thu Nov 15 11:21:40 2018 -0500 nfsd4: zero-length WRITE should succeed Zero-length writes are legal; from 5661 section 18.32.3: "If the count is zero, the WRITE will succeed and return a count of zero subject to permissions checking". This check is unnecessary and is causing zero-length reads to return EINVAL. Cc: stable@vger.kernel.org Fixes: 3fd9557aec91 "NFSD: Refactor the generic write vector fill helper" Cc: Chuck Lever Signed-off-by: J. Bruce Fields commit 694f1f926c725a8955c1c156ad6d3c4e1b853bd8 Author: Daniel Díaz Date: Tue Oct 16 16:46:59 2018 -0500 selftests: gpio: Find libmount with pkg-config if available If pkg-config is available, use it to define the CFLAGS and LDLIBS needed for libmount; else, use the current hard-coded paths and options. Using pkg-config is very helpful for cross-compilation environments, and is sometimes readily available on developer boxes to ensure we get the right compiler/linker options for the given package. Signed-off-by: Daniel Díaz Signed-off-by: Shuah Khan commit 7492902e8d22b568463897fa967c0886764cf034 Author: Dan Rue Date: Mon Nov 26 21:12:16 2018 -0600 selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y is required for fw_fallback.sh. Without it, fw_fallback.sh fails with 'usermode helper disabled so ignoring test'. Enable the config in selftest so that it gets built by default. Signed-off-by: Dan Rue Acked-by: Kees Cook Signed-off-by: Shuah Khan commit f70b472e937bb659a7b7a14e64f07308e230888c Author: Dan Rue Date: Mon Nov 26 21:12:15 2018 -0600 selftests: firmware: remove use of non-standard diff -Z option "diff -Z" is used to trim the trailing whitespace when comparing the loaded firmware file with the source firmware file. However, per the comment in the source code, -Z should not be necessary. In testing, the input and output files are identical. Additionally, -Z is not a standard option and is not available in environments such as busybox. When -Z is not supported, diff fails with a usage error, which is suppressed, but then causes read_firmwares() to exit with a false failure message. Signed-off-by: Dan Rue Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 08f73d668048ffa3ba6b1426b6ba0a89b16aefd7 Author: Eric Anholt Date: Mon Nov 26 13:59:28 2018 -0800 drm/vkms: Drop custom vkms_dumb_map(). This is the same as the default drm_gem_dumb_map_offset() implementation, except that this one missed the ban on userspace mapping an imported dmabuf (which seems like intended common behavior for drivers). Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181126215929.20546-1-eric@anholt.net Acked-by: Daniel Vetter commit 8f1cd826641d677d0f7494253ecfc3335f0bcd4e Author: Eric Anholt Date: Thu Nov 8 08:16:53 2018 -0800 drm/v3d: Clean up the reservation object setup. The extra to_v3d_bo() calls came from copying this from the vc4 driver, which stored the cma gem object in the structs. v2: Fix an unused var warning Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-4-eric@anholt.net Reviewed-by: Boris Brezillon (v1) commit e90e45f6bd45cc494a6f4cd1853c5e7cd4be7f68 Author: Eric Anholt Date: Thu Nov 8 08:16:52 2018 -0800 drm/v3d: Update a comment about what uses v3d_job_dependency(). I merged bin and render's paths in a late refactoring. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-3-eric@anholt.net Reviewed-by: Boris Brezillon commit 3eb152720c734112c5069e531442463e0a2abfb3 Author: Eric Anholt Date: Thu Nov 8 08:16:51 2018 -0800 drm/v3d: Fix whitespace inconsistency in the header. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-2-eric@anholt.net Reviewed-by: Boris Brezillon commit 456824896de2b68df40b3ea5777ef49dc6cc8fda Author: Reinette Chatre Date: Tue Nov 27 11:19:36 2018 -0800 x86/resctrl: Use rdt_last_cmd_puts() where possible The last_cmd_status sequence buffer contains user-visible messages (accessed via /sys/fs/resctrl/info/last_cmd_status) that detail any errors encountered while interacting with the resctrl filesystem. rdt_last_cmd_printf() and rdt_last_cmd_puts() are the two calls available to respectively print a string with format specifiers or a simple one (which contains no format specifiers) to the last_cmd_status buffer. A few occurrences exist where rdt_last_cmd_printf() is used to print a simple string. Doing so does not result in incorrect result or incorrect behavior, but rdt_last_cmd_puts() is the function intended to be used in these cases, as it is faster and it doesn't need to do the vsnprintf() formatting. Fix these occurrences to use rdt_last_cmd_puts() instead. While doing so, fix two typos that were recently introduced into two of these simple strings. [ bp: massage commit message and correct typos. ] Fixes: 723f1a0dd8e2 ("x86/resctrl: Fixup the user-visible strings") Fixes: e0bdfe8e36f3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") Fixes: 9ab9aa15c309 ("x86/intel_rdt: Ensure requested schemata respects mode") Fixes: d48d7a57f718 ("x86/intel_rdt: Introduce resource group's mode resctrl file") Fixes: dfe9674b04ff ("x86/intel_rdt: Enable entering of pseudo-locksetup mode") Signed-off-by: Reinette Chatre Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Fenghua Yu Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Tony Luck Cc: babu.moger@amd.com Cc: jithu.joseph@intel.com Cc: x86-ml Link: https://lkml.kernel.org/r/f48e46a016d6a5c79f13de8faeca382052189e2e.1543346009.git.reinette.chatre@intel.com commit 3d65b6bbc01ecece8142e62a8a5f1d48ba41a240 Author: Will Deacon Date: Mon Nov 19 18:08:49 2018 +0000 arm64: tlbi: Set MAX_TLBI_OPS to PTRS_PER_PTE In order to reduce the possibility of soft lock-ups, we bound the maximum number of TLBI operations performed by a single call to flush_tlb_range() to an arbitrary constant of 1024. Whilst this does the job of avoiding lock-ups, we can actually be a bit smarter by defining this as PTRS_PER_PTE. Due to the structure of our page tables, using PTRS_PER_PTE means that an outer loop calling flush_tlb_range() for entire table entries will end up performing just a single TLBI operation for each entry. As an example, mremap()ing a 1GB range mapped using 4k pages now requires only 512 TLBI operations when moving the page tables as opposed to 262144 operations (512*512) when using the current threshold of 1024. Cc: Joel Fernandes Acked-by: Catalin Marinas Signed-off-by: Will Deacon commit bdb85cd1d20669dfae813555dddb745ad09323ba Author: Ard Biesheuvel Date: Thu Nov 22 09:46:46 2018 +0100 arm64/module: switch to ADRP/ADD sequences for PLT entries Now that we have switched to the small code model entirely, and reduced the extended KASLR range to 4 GB, we can be sure that the targets of relative branches that are out of range are in range for a ADRP/ADD pair, which is one instruction shorter than our current MOVN/MOVK/MOVK sequence, and is more idiomatic and so it is more likely to be implemented efficiently by micro-architectures. So switch over the ordinary PLT code and the special handling of the Cortex-A53 ADRP errata, as well as the ftrace trampline handling. Reviewed-by: Torsten Duwe Signed-off-by: Ard Biesheuvel [will: Added a couple of comments in the plt equality check] Signed-off-by: Will Deacon commit 0aaddaaf68410014f346bb022068d4da3dfa8324 Author: Malathi Gottam Date: Mon Oct 22 08:05:12 2018 -0400 media: venus: handle peak bitrate set property Max bitrate property is not supported for venus version 4xx. Return unsupported from packetization layer. Handle it in hfi_venus layer to exit gracefully to venc layer. Signed-off-by: Malathi Gottam Tested-by: Alexandre Courbot Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6748c1cfd25311001e0a18a436fce005952c0f61 Author: Malathi Gottam Date: Tue Oct 9 03:52:37 2018 -0400 media: venus: add support for USERPTR to queue Add USERPTR to queue access methods by adding this support to io_modes on both the planes. Signed-off-by: Malathi Gottam Tested-by: Alexandre Courbot Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7aaf7b2fd26c3a069472dd9778367b2f941dd866 Author: Ard Biesheuvel Date: Thu Nov 22 09:46:45 2018 +0100 arm64/insn: add support for emitting ADR/ADRP instructions Add support for emitting ADR and ADRP instructions so we can switch over our PLT generation code in a subsequent patch. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 2d13969ee7d892c69a9fff5af8c0356682290c41 Author: Johan Hovold Date: Wed Nov 14 16:09:04 2018 +0100 serdev: document the write functions using kernel-doc Document the asynchronous serdev_device_write_buf() and synchronous serdev_device_write() functions using kernel-doc. Specifically, mention that writing data only means that data has been buffered by the controller, and that the synchronous helper depends on serdev_device_write_wakeup() being called in the driver write_wakeup() callback. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 70d188041e6f1f92004f1d5d7ddfd5013273b7a5 Author: Johan Hovold Date: Wed Nov 14 16:09:03 2018 +0100 serdev: make synchronous write helper interruptible Allow the synchronous serdev_device_write() helper to be interrupted. This is useful for cases where I/O is performed on behalf of user space and we don't want to block indefinitely when using flow control. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 0bbf0a88fa29de6a043ba40058409c7e550fc8be Author: Johan Hovold Date: Wed Nov 14 16:09:02 2018 +0100 serdev: make synchronous write return bytes written Make the synchronous serdev_device_write() helper behave analogous to the asynchronous serdev_device_write_buf() by returning the number of bytes written (or rather buffered) also on timeout. This will allow drivers to distinguish the case where data was partially written from the case where no data was written. Also update the only two users that checked the return value. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman commit 22d66c85fde3b1ca27ab596357e8e2505af7e388 Author: Johan Hovold Date: Wed Nov 14 16:09:01 2018 +0100 serdev: use zero to indicate infinite write timeout Use zero to indicate infinite timeout for the synchronous serdev_device_write() helper. This allows drivers to specify an infinite timeout without knowing about serdev implementation details, while also allowing the same timeout argument to be used for both serdev_device_write() and serdev_device_wait_until_sent(). Note that passing zero to the current helper makes no sense; just call the asynchronous serdev_device_write_buf() directly instead. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman commit d8797b125711f23d83f5a71e908d34dfcd1fc3e9 Author: James Morse Date: Tue Nov 27 15:35:21 2018 +0000 arm64: Use a raw spinlock in __install_bp_hardening_cb() __install_bp_hardening_cb() is called via stop_machine() as part of the cpu_enable callback. To force each CPU to take its turn when allocating slots, they take a spinlock. With the RT patches applied, the spinlock becomes a mutex, and we get warnings about sleeping while in stop_machine(): | [ 0.319176] CPU features: detected: RAS Extension Support | [ 0.319950] BUG: scheduling while atomic: migration/3/36/0x00000002 | [ 0.319955] Modules linked in: | [ 0.319958] Preemption disabled at: | [ 0.319969] [] cpu_stopper_thread+0x7c/0x108 | [ 0.319973] CPU: 3 PID: 36 Comm: migration/3 Not tainted 4.19.1-rt3-00250-g330fc2c2a880 #2 | [ 0.319975] Hardware name: linux,dummy-virt (DT) | [ 0.319976] Call trace: | [ 0.319981] dump_backtrace+0x0/0x148 | [ 0.319983] show_stack+0x14/0x20 | [ 0.319987] dump_stack+0x80/0xa4 | [ 0.319989] __schedule_bug+0x94/0xb0 | [ 0.319991] __schedule+0x510/0x560 | [ 0.319992] schedule+0x38/0xe8 | [ 0.319994] rt_spin_lock_slowlock_locked+0xf0/0x278 | [ 0.319996] rt_spin_lock_slowlock+0x5c/0x90 | [ 0.319998] rt_spin_lock+0x54/0x58 | [ 0.320000] enable_smccc_arch_workaround_1+0xdc/0x260 | [ 0.320001] __enable_cpu_capability+0x10/0x20 | [ 0.320003] multi_cpu_stop+0x84/0x108 | [ 0.320004] cpu_stopper_thread+0x84/0x108 | [ 0.320008] smpboot_thread_fn+0x1e8/0x2b0 | [ 0.320009] kthread+0x124/0x128 | [ 0.320010] ret_from_fork+0x10/0x18 Switch this to a raw spinlock, as we know this is only called with IRQs masked. Signed-off-by: James Morse Signed-off-by: Will Deacon commit 9eb1c92b47c73249465d388eaa394fe436a3b489 Author: Jeremy Linton Date: Tue Nov 27 17:59:12 2018 +0000 arm64: acpi: Prepare for longer MADTs The BAD_MADT_GICC_ENTRY check is a little too strict because it rejects MADT entries that don't match the currently known lengths. We should remove this restriction to avoid problems if the table length changes. Future code which might depend on additional fields should be written to validate those fields before using them, rather than trying to globally check known MADT version lengths. Link: https://lkml.kernel.org/r/20181012192937.3819951-1-jeremy.linton@arm.com Signed-off-by: Jeremy Linton [lorenzo.pieralisi@arm.com: added MADT macro comments] Signed-off-by: Lorenzo Pieralisi Acked-by: Sudeep Holla Cc: Will Deacon Cc: Catalin Marinas Cc: Al Stone Cc: "Rafael J. Wysocki" Signed-off-by: Will Deacon commit 252babf3a175bbec484c5cfac1b85c10e873d67f Merge: 651022382c7f8 34e8b809bf136 Author: Thierry Reding Date: Tue Nov 27 18:43:59 2018 +0100 Merge branch 'for-4.21/dt-bindings' into for-4.21/arm64/dt commit 34e8b809bf136c0554ba1131c6671ae6339543e0 Author: Thierry Reding Date: Fri Nov 23 13:18:37 2018 +0100 dt-bindings: thermal: tegra-bpmp: Add Tegra194 support The thermal controller implementation on Tegra194 is very similar to the implementation on Tegra186. Add a compatible string for the new generation. Signed-off-by: Thierry Reding commit e8b1dee21420f871e300d46342f2c98a2e08158d Author: Rob Herring Date: Wed Aug 29 08:36:12 2018 -0500 of: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring commit aacb5d91ab1bfbb0e8123da59a2e333d52ba7f60 Author: Paul E. McKenney Date: Sun Oct 28 10:32:51 2018 -0700 srcu: Use "ssp" instead of "sp" for srcu_struct pointer In RCU, the distinction between "rsp", "rnp", and "rdp" has served well for a great many years, but in SRCU, "sp" vs. "sdp" has proven confusing. This commit therefore renames SRCU's "sp" pointers to "ssp", so that there is "ssp" for srcu_struct pointer, "snp" for srcu_node pointer, and "sdp" for srcu_data pointer. Signed-off-by: Paul E. McKenney commit eb4c2382272ae7ae5d81fdfa5b7a6c86146eaaa4 Author: Dennis Krein Date: Fri Oct 26 07:38:24 2018 -0700 srcu: Lock srcu_data structure in srcu_gp_start() The srcu_gp_start() function is called with the srcu_struct structure's ->lock held, but not with the srcu_data structure's ->lock. This is problematic because this function accesses and updates the srcu_data structure's ->srcu_cblist, which is protected by that lock. Failing to hold this lock can result in corruption of the SRCU callback lists, which in turn can result in arbitrarily bad results. This commit therefore makes srcu_gp_start() acquire the srcu_data structure's ->lock across the calls to rcu_segcblist_advance() and rcu_segcblist_accelerate(), thus preventing this corruption. Reported-by: Bart Van Assche Reported-by: Christoph Hellwig Reported-by: Sebastian Kuzminsky Signed-off-by: Dennis Krein Signed-off-by: Paul E. McKenney Tested-by: Dennis Krein Cc: # 4.16.x commit b401ec18485ab95c49c160b170514f7ab0f8f774 Author: Paul E. McKenney Date: Tue Nov 6 19:30:34 2018 -0800 mm: Replace call_rcu_sched() with call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney commit 6564a25e6c185e65ca3148ed6e18f80882f6798f Author: Paul E. McKenney Date: Tue Nov 6 19:24:33 2018 -0800 slab: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: commit 36bd1a8e91c66e9def12958547548aa549de9cbf Author: Paul E. McKenney Date: Tue Nov 6 19:22:23 2018 -0800 percpu-refcount: Replace call_rcu_sched() with call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Ming Lei Cc: Bart Van Assche Cc: Jens Axboe Acked-by: Tejun Heo commit 0809d95451f7d867d37cf2b526b8da923fd72891 Author: Paul E. McKenney Date: Tue Nov 6 19:20:05 2018 -0800 events: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim commit 25b0077511fe7cf1b876174f8481fb1742f4fb4d Author: Paul E. McKenney Date: Tue Nov 6 19:18:45 2018 -0800 workqueue: Replace call_rcu_sched() with call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Lai Jiangshan Acked-by: Tejun Heo commit cb2f55369d3a9e6cf5c34d2da39eb242279a582d Author: Paul E. McKenney Date: Tue Nov 6 19:17:01 2018 -0800 modules: Replace synchronize_sched() and call_rcu_sched() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). Similarly, call_rcu_sched() can be replaced by call_rcu(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Acked-by: Jessica Yu commit c9a863bbb1620dca3af57934cdbb002e852449fc Author: Paul E. McKenney Date: Tue Nov 6 19:09:14 2018 -0800 sched/membarrier: synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Mathieu Desnoyers Cc: Ingo Molnar Cc: Peter Zijlstra commit 51959d85f32dde9041655936eef206cc3323dc12 Author: Paul E. McKenney Date: Tue Nov 6 19:06:51 2018 -0800 lockdep: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon commit ae8b7ce7647bc5c56a9a9fc32b03e1cd0ae49629 Author: Paul E. McKenney Date: Tue Nov 6 19:04:39 2018 -0800 kprobes: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Acked-by: Masami Hiramatsu commit ba180314253947f2a6057e21a0f92b5c314454b1 Author: Paul E. McKenney Date: Tue Nov 6 18:58:01 2018 -0800 main: Replace rcu_barrier_sched() with rcu_barrier() Now that all RCU flavors have been consolidated, rcu_barrier_sched() is but a synonym for rcu_barrier(). This commit therefore replaces the former with the latter. Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: "Steven Rostedt (VMware)" Cc: Thomas Gleixner Cc: commit 7440172974e85b1828bdd84ac6b23b5bcad9c5eb Author: Paul E. McKenney Date: Tue Nov 6 18:44:52 2018 -0800 tracing: Replace synchronize_sched() and call_rcu_sched() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). Similarly, call_rcu_sched() can be replaced by call_rcu(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney Cc: Ingo Molnar Cc: Acked-by: Steven Rostedt (VMware) commit c93ffc15cceb057924410f9178e679120ee12353 Author: Paul E. McKenney Date: Mon Nov 5 17:31:31 2018 -0800 fs/file: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Alexander Viro Cc: commit cc69b389fd7bfcd14ade19e302a771f0234e9c85 Author: Paul E. McKenney Date: Mon Nov 5 17:23:56 2018 -0800 cpufreq/cpufreq_governor: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney commit 09659af30860789b6f7d1c7dd35a7e829d530db5 Author: Paul E. McKenney Date: Mon Nov 5 17:17:47 2018 -0800 cpufreq/intel_pstate: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Srinivas Pandruvada Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: commit d05faa5f1ac50beef77b4ceba0e8e157d41146e2 Author: Paul E. McKenney Date: Mon Nov 5 17:14:53 2018 -0800 drivers/vhost: Replace synchronize_rcu_bh() with synchronize_rcu() Now that synchronize_rcu() waits for bh-disable regions of code as well as RCU read-side critical sections, synchronize_rcu_bh() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Cc: Cc: commit 16f11500842ce022fe654e38bd447e15790911dd Author: Paul E. McKenney Date: Mon Nov 5 17:07:39 2018 -0800 ethernet/realtek: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Realtek linux nic maintainers Cc: "David S. Miller" Cc: commit fd8e688b0e8cc0c0a8ca18acb69cb8397ed62eec Author: Paul E. McKenney Date: Mon Nov 5 17:05:08 2018 -0800 ethernet/sis: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Francois Romieu Cc: "David S. Miller" Cc: commit 17c0eb74151ead3a7068e1691998de9950e91a08 Author: Paul E. McKenney Date: Mon Nov 5 17:00:58 2018 -0800 drivers/ipmi: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Acked-by: Corey Minyard commit a0076e1778c23de4a42d90fee4ecb4c21dbb5838 Author: Paul E. McKenney Date: Mon Nov 5 16:57:40 2018 -0800 crypto/pcrypt: Replace synchronize_rcu_bh() with synchronize_rcu() Now that synchronize_rcu() waits for bh-disable regions of code as well as RCU read-side critical sections, the synchronize_rcu_bh() in pcrypt_cpumask_change_notify() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Steffen Klassert Cc: Acked-by: Herbert Xu commit e31d0fc6fd1bf62e56e7e3d0b69e7e64d8b7db58 Author: Rob Herring Date: Wed Sep 5 11:34:56 2018 -0500 power: reset: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring commit acfe63ec1c591629ad04b299ee7bb1d18d299c69 Author: Rob Herring Date: Wed Aug 29 09:08:57 2018 -0500 mtd: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-mtd@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring commit f86b77583d88c8402e8d89a339d96f847318f8a8 Author: Rob Herring Date: Mon Aug 27 20:03:42 2018 -0500 backlight: pm8941: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Rob Herring commit c86f98544f234e64bb53558545782c24e78d5c49 Author: Rob Herring Date: Mon Aug 27 19:57:23 2018 -0500 memory: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Roger Quadros Cc: Kukjin Kim Cc: Jonathan Hunter Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-tegra@vger.kernel.org Acked-by: Thierry Reding Acked-by: Tony Lindgren Acked-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 2ef790dc443a25cc3818b0fa34cb9f4ed0ec5ec1 Author: Rob Herring Date: Mon Aug 27 19:56:15 2018 -0500 irqchip: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit 2fc777ba8422e4a38cae61537ad6a26435a86fb8 Author: Thierry Reding Date: Mon Nov 19 11:31:30 2018 +0100 gpu: host1x: Fix syncpoint ID field size on Tegra186 The number of syncpoints on Tegra186 is 576 and therefore no longer fits into 8 bits. Increase the size of the syncpoint ID field to 10 in order to accomodate all syncpoints. Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit b7c61d511df4404c9bbc8f4b987059c55abfe2b4 Author: Thierry Reding Date: Mon Nov 19 11:27:39 2018 +0100 gpu: host1x: Resize channel register region on Tegra186 and later The register region allocated per channel was decreased from 16384 bytes to 256 bytes on Tegra186 and later. Resize the region to make sure every channel (instead of only the first) is properly programmed. Suggested-by: Mikko Perttunen Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit f89120b6f554901075bb1636cfc1d14d26adaaa3 Author: Mylène Josserand Date: Mon Sep 18 10:55:28 2017 +0200 ARM: dts: sun8i: Add the H3/H5 CSI controller The H3 and H5 features the same CSI controller that was initially found on the A31. Add a DT node for it. Signed-off-by: Mylène Josserand Signed-off-by: Maxime Ripard commit 91a753608262d26faf48b1805aed60aa3283be93 Author: Loic WEI YU NENG Date: Wed Nov 14 07:12:12 2018 -0800 platform/x86: ideapad-laptop: Add Yoga 2 13 to no_hw_rfkill list Some Lenovo IdeaPad models lack a physical rfkill switch. On Lenovo models Yoga 2 13, ideapad-laptop would wrongly report all radios as blocked by hardware which caused wireless network connections to fail. Add these models without an rfkill switch to the no_hw_rfkill list. Signed-off-by: Loic WEI YU NENG Signed-off-by: Andy Shevchenko commit ff217bc710e09360187ab5dd7d704f871c29e006 Author: Neil Armstrong Date: Tue Nov 6 11:54:35 2018 +0100 drm/meson: Add support for VIC alternate timings This change is an attempt to handle the alternate clock for the CEA mode. 60Hz vs. 59.94Hz, 30Hz vs 29.97Hz or 24Hz vs 23.97Hz on the Amlogic Meson SoC DRM Driver pixel clock generation. The actual clock generation will be moved to the Common Clock framework once all the video clock are handled by the Amlogic Meson SoC clock driver, then these alternate timings will be handled in the same time in a cleaner fashion. Signed-off-by: Neil Armstrong Reviewed-by: Maxime Jourdan [narmstrong: fix maybe-uninitialized warnings after applying] Link: https://patchwork.freedesktop.org/patch/msgid/1541501675-3928-1-git-send-email-narmstrong@baylibre.com commit 5d0bfe448481c9c109f5052c4ad36ef855aedc4f Author: Neil Armstrong Date: Tue Nov 6 10:35:09 2018 +0100 drm/meson: Add HDMI 1.4 4k modes Add the timings for the HDMI 1.4 4K modes support : - 3840x2160@30 - 3840x2160@25 - 3840x2160@24 Since the 297000Hz pixel clock is already managed and the modes are compatible with the HDMI 1.4 current HDMI PHY+Controller support, only the missing timings values needs to be added. Signed-off-by: Neil Armstrong Reviewed-by: Maxime Jourdan Link: https://patchwork.freedesktop.org/patch/msgid/1541496909-19625-1-git-send-email-narmstrong@baylibre.com commit 21310c39ec01e82ef3ef9bf8ac385b53ccdc158c Author: Neil Armstrong Date: Wed Nov 21 12:19:22 2018 +0100 clk: meson: Fix GXL HDMI PLL fractional bits width The GXL Documentation specifies 12 bits for the Fractional bit field, bit the last bits have a different purpose that we cannot handle right now, so update the bitwidth to have correct fractional calculations. Signed-off-by: Neil Armstrong [narmstrong: added comment on GXL HHI_HDMI_PLL_CNTL register shift] Acked-by: Martin Blumenstingl Link: https://lkml.kernel.org/r/20181121111922.1277-1-narmstrong@baylibre.com commit dc93967b8094b64ea3fd85bf933561d89b6951af Merge: 8341f2f222d72 2e6e902d18502 Author: Greg Kroah-Hartman Date: Tue Nov 27 15:47:52 2018 +0100 Merge 4.20-rc4 into tty-next We need the gsps fixes in here for some other serdev patches we will be merging into this branch. Signed-off-by: Greg Kroah-Hartman commit 39dea70d8a479a1c4578129466da2bc4601e47be Author: Daniel Vetter Date: Tue Nov 27 10:19:21 2018 +0100 drm: Improve dumb callback docs Noticed while reviewing a patch from Eric. Also add a todo for the dumb_map_offset callbacks (it should be simple to do, but piles of work). Plus fix up vbox, because vbox. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Greg Kroah-Hartman Cc: Hans de Goede Cc: Nicholas Mc Guire Cc: Daniel Vetter Cc: Fabio Rafael da Rosa Reviewed-by: Maxime Ripard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181127091921.8325-1-daniel.vetter@ffwll.ch commit 942779c6f1f899bc54332f7bb67666244f3f6d6c Author: Leilk Liu Date: Tue Nov 20 16:41:08 2018 +0800 spi: mediatek: add spi support for mt7629 IC this patch add support for mt7629 IC. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit 96ed3ecde2c0911ffa11838050a058c2a40742f0 Author: Radu Pirea Date: Wed Nov 21 13:27:30 2018 +0200 spi: at91-usart: add power management support This patch implements power management callback function for USART as SPI driver. Signed-off-by: Radu Pirea Signed-off-by: Mark Brown commit 584f8ca10c1489be32637e1de1f78c222b569bbd Author: Heiko Stuebner Date: Mon Nov 12 13:27:25 2018 +0100 ARM: dts: rockchip: update cpu supplies on rk3188 cpu0-supply in cpu0 is deprecated, instead each cpu-core is supposed to list its supply separately. With the added cpu core phandles, update existing rk3188 boards accordingly. Signed-off-by: Heiko Stuebner commit 66dc478a283ca32a9d9c40a53e97fad4d408757c Author: Heiko Stuebner Date: Mon Oct 15 14:46:19 2018 +0200 ARM: dts: rockchip: add phandles to secondary cpu cores Add phandles to secondary cpu cores as we may need to reference these down the road as well. Signed-off-by: Heiko Stuebner commit 0222aac4486e7bf5b37defa7fd03e3b2c52fe2be Author: Heiko Stuebner Date: Wed Nov 7 17:12:24 2018 +0100 ARM: dts: rockchip: add cpu-core resets for rk3188 Specify the reset handles for each cpu core. Signed-off-by: Heiko Stuebner commit abcee7a86373144249adec203cbaa98770101ce8 Author: Heiko Stuebner Date: Wed Oct 10 11:46:48 2018 +0200 ARM: dts: rockchip: convert rk3188 to opp-v2 The fact that OPPs specified only on cpu0 work is Linux specific and normally cpu frequencies should be specified for each cpu core. To facilitate this without needing to duplicate the frequency table each time, convert to opp-v2 before adding references to all cores. Signed-off-by: Heiko Stuebner commit 812b3dc37574ee45ee986fa4f7130b280d7610e9 Author: Heiko Stuebner Date: Wed Sep 5 15:48:33 2018 +0200 ARM: dts: rockchip: add #sound-dai-cells to Cortex-A9 i2s The Rockchip i2s always just requires a sound-dail-cells value of 0, so add them to the core soc dtsi for convenience. Signed-off-by: Heiko Stuebner commit 1d2319efb6a970d5f5740a60828244e6c309df2b Author: Olof Johansson Date: Fri Nov 16 19:55:04 2018 -0800 spi: npcm: Fix uninitialized variable warning The compiler has no way to know that rsize 1 or 2 are the only valid values. Also simplify the code a bit with early return. The warning was: drivers/spi/spi-npcm-pspi.c:215:6: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Olof Johansson Signed-off-by: Mark Brown commit 39e84937b5b447973f2c7322ce4da35775e1bfbf Author: Chris Wilson Date: Mon Nov 26 09:56:10 2018 +0000 drm/i915: Skip engine serialisation for no-op seqno reset If the engine's seqno is already at our target seqno (most likely it hasn't been used since the last reset), we can skip serialising the engine and leave it as is. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181126095610.20962-1-chris@chris-wilson.co.uk commit d53701067f048b8b11635e964b6d3bd9a248c622 Author: Felipe Balbi Date: Tue Aug 14 10:42:43 2018 +0300 usb: dwc3: gadget: check if dep->frame_number is still valid Gadget driver may take an unbounded amount of time to queue requests after XferNotReady. This is important for isochronous endpoints which need to be started for a specific (micro-)frame. If we fail to start a transfer for isochronous endpoint, let's try queueing to a future interval and see if that helps. We will stop trying if we fail a start transfer for 5 intervals in the future. Signed-off-by: Felipe Balbi commit 5eb316e636eb298c204f5b368526d4480b63c0ba Author: Simon Horman Date: Wed Nov 21 13:09:28 2018 +0100 i2c: sh_mobile: add support for r8a77990 (R-Car E3) Add support for the IIC code for the r8a77990 (R-Car E3). It is not considered compatible with existing fallback bindings due to the documented absence of automatic transmission registers. These registers are currently not used by the driver and thus the provides the same behaviour for "renesas,iic-r8a77990" and "renesas,rcar-gen3-iic". The point of declaring incompatibility is to allow for automatic transmission register support to be added to "renesas,iic-r8a77990" and "renesas,rcar-gen3-iic" in future. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit fca34b910ddc556c51294d58287f7c33863dddef Author: Simon Horman Date: Wed Nov 21 13:09:27 2018 +0100 i2c: sh_mobile: document support for r8a77990 (R-Car E3) Document support for the IIC code for the r8a77990 (R-Car E3). It is not considered compatible with existing fallback bindings due to the documented absence of automatic transmission registers. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 6460d32014717686d3b7963595950ba2c6d1bb5e Author: Will Deacon Date: Wed Nov 7 23:06:15 2018 +0000 arm64: io: Ensure calls to delay routines are ordered against prior readX() A relatively standard idiom for ensuring that a pair of MMIO writes to a device arrive at that device with a specified minimum delay between them is as follows: writel_relaxed(42, dev_base + CTL1); readl(dev_base + CTL1); udelay(10); writel_relaxed(42, dev_base + CTL2); the intention being that the read-back from the device will push the prior write to CTL1, and the udelay will hold up the write to CTL1 until at least 10us have elapsed. Unfortunately, on arm64 where the underlying delay loop is implemented as a read of the architected counter, the CPU does not guarantee ordering from the readl() to the delay loop and therefore the delay loop could in theory be speculated and not provide the desired interval between the two writes. Fix this in a similar manner to PowerPC by introducing a dummy control dependency on the output of readX() which, combined with the ISB in the read of the architected counter, guarantees that a subsequent delay loop can not be executed until the readX() has returned its result. Cc: Benjamin Herrenschmidt Cc: Arnd Bergmann Signed-off-by: Will Deacon commit 61170ee9386888f1e6f7e9cc58e8d9a8c2a3c1dd Author: Heiko Stuebner Date: Mon Nov 12 10:02:57 2018 +0100 backlight: pwm_bl: Fix devicetree parsing with auto-generated brightness tables Commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") made the parse-dt function return early when using an auto- generated brightness-table, but didn't take into account that some more settings were handled below the brightness handling, like power-on-delays and also setting the pdata enable-gpio to -EINVAL. This surfaces for example in the case of a backlight without any enable-gpio which then tries to use gpio-0 in error. Fix this by simply moving the trailing settings above the brightness handling. Fixes: 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") Signed-off-by: Heiko Stuebner Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit e4c8ae3e3d6d473bfbfbb5db234792b9f8ddab3b Author: Heiko Stuebner Date: Fri Nov 9 10:48:57 2018 +0100 backlight: pwm_bl: Re-add driver internal enabled tracking Commit e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API") removed the driver internal enabled tracking in favor of simply checking the pwm state. This can lead to issues as all of gpio-, regulator- and pwm-state are used to determine the initial state and the bootloader or kernel can leave them in an inconsistent state at boot. In my case on rk3399-kevin, the pwm backlight is build as module and the kernel disables the supply regulator as unused while keeping the pwm running thus pwm_bl calling pwm_backlight_power_off() during probe and creating an unmatched regulator-disable call, as it never got enabled from the pwm-bl before. To prevent these consistency issues, reintroduce the driver-internal tracking of the enabled state. Fixes: e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API") Signed-off-by: Heiko Stuebner Acked-by: Thierry Reding Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit cb944fb973bcd326bc99a5381f5fb109c0b9de95 Author: Pierre-Yves MORDRET Date: Mon Nov 19 12:03:32 2018 +0100 i2c: stm32f7: SYSCFG Fast Mode Plus support for I2C STM32F7 Read SYSCFG bindings to set Fast Mode Plus bits if Fast Mode Plus speed is selected. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 9d9aa7ec7baf62640cd4e1a869746b2356731e93 Author: Pierre-Yves MORDRET Date: Mon Nov 19 12:03:31 2018 +0100 dt-bindings: i2c-stm32: SYSCFG Fast Mode Plus support for I2C STM32F7 Append optional bindings to update SYSCFG Fast Mode Plus bits if Fast Mode Plus speed is selected. Signed-off-by: Pierre-Yves MORDRET Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit e79ba3b55086f717d997114f45822605f97c1e41 Author: Davidlohr Bueso Date: Thu Nov 15 16:27:12 2018 -0800 i2c: Remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Signed-off-by: Davidlohr Bueso Signed-off-by: Wolfram Sang commit fca91f6d60b6ee53b8d43c8ad5bad153a758961c Author: Jim Mattson Date: Wed Mar 15 07:40:55 2017 -0700 kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page It is never correct for a VMX instruction to fail with "invalid VMCS" if there is, in fact, a current VMCS. Reads from unbacked addresses return all 1's, which means that an unbacked VMCS will not have the correct VMCS revision ID (i.e. VMCS12_REVISION). Fixes: 63846663eac78 ("KVM: nVMX: Implement VMPTRLD") Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 14aa61d0a9eb3ddad06c3a0033f88b5fa7f05613 Author: Krish Sadhukhan Date: Thu Nov 1 01:21:58 2018 -0400 nVMX x86: Check VMX-preemption timer controls on vmentry of L2 guests According to section "Checks on VMX Controls" in Intel SDM vol 3C, the following check needs to be enforced on vmentry of L2 guests: If the "activate VMX-preemption timer" VM-execution control is 0, the the "save VMX-preemption timer value" VM-exit control must also be 0. Signed-off-by: Krish Sadhukhan Reviewed-by: Mihai Carabas Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit fece4978510e43f09c8cd386fee15210e8c68493 Author: Lucas Stach Date: Wed Nov 14 18:29:13 2018 +0100 i2c: imx: don't print error message on probe defer Probe deferral is a normal operating condition in the probe function, so don't spam the log with an error in this case. Signed-off-by: Lucas Stach Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 00df9181de2a116af2bc81cce7e3dda4e0431a2d Author: Uros Bizjak Date: Tue Oct 23 00:09:11 2018 +0200 KVM/nVMX: Remove unneeded forward jump in nested_vmx_check_vmentry_hw asm There is no need to jump just after the jump insn itself. Also, make code similar to entering guest mode in vmx_vcpu_run. Signed-off-by: Uros Bizjak Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 88656040b0c0c09202fbcb461a8c33d2ec1c0c19 Author: Jim Mattson Date: Mon Sep 24 11:05:43 2018 -0700 KVM: nVMX: Unrestricted guest mode requires EPT As specified in Intel's SDM, do not allow the L1 hypervisor to launch an L2 guest with the VM-execution controls for "unrestricted guest" or "mode-based execute control for EPT" set and the VM-execution control for "enable EPT" clear. Note that the VM-execution control for "mode-based execute control for EPT" is not yet virtualized by kvm. Reported-by: Andrew Thornton Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Sean Christopherson Reviewed-by: Wanpeng Li Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit 09f70c3b70e7d9e209a820b54dda42502fa40711 Author: Stefan Raspl Date: Wed Oct 24 21:41:34 2018 +0200 tools/kvm_stat: switch to python3 The current shebang does not work in environments that only support python3 and have no python2 installed. Plus there does not seem to be a way to support python2 and python3 at the same time. Since all known python3 issues were fixed, and as python3 is the way to go, let's switch over. Note that the code is still python2 compliant, so folks in bad use can simply revert the shebang. Suggested-by: Christian Ehrhardt Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini commit 45c3af974ec6c22d7392e15eb5d755e3c0079bd1 Author: Paolo Bonzini Date: Sun Nov 25 18:45:35 2018 +0100 KVM: x86: Trace changes to active TSC offset regardless if vCPU in guest-mode For some reason, kvm_x86_ops->write_l1_tsc_offset() skipped trace of change to active TSC offset in case vCPU is in guest-mode. This patch changes write_l1_tsc_offset() behavior to trace any change to active TSC offset to aid debugging. The VMX code is changed to look more similar to SVM, which is in my opinion nicer. Based on a patch by Liran Alon. Signed-off-by: Paolo Bonzini commit a1880d38674b1b7e120a231151298b2eb530b645 Author: Leilk Liu Date: Tue Nov 27 10:29:50 2018 +0800 spi: mediatek: Add bindings for mediatek MT7629 soc platform This patch adds a DT binding documentation for the MT7629 soc. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit 346f7e6b7b135c277b001925fa6d05d054d882e4 Author: Stefan Wahren Date: Sat Nov 10 16:49:16 2018 +0100 i2c: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Wolfram Sang commit f88184bfee48d482dfff04cd1eed6906f289db4a Author: Kaitao cheng Date: Tue Nov 6 08:34:54 2018 -0800 driver core: Replace simple_strto{l,ul} by kstrtou{l,ul} The simple_strto{l,ul} are deprecated, use kstrtou{l,ul} instead. Signed-off-by: Kaitao cheng Signed-off-by: Greg Kroah-Hartman commit 03c0a9208bb10821e5e3f1c81e6218df32524311 Author: Radu Rendec Date: Thu Nov 15 21:09:54 2018 -0500 kernfs: Improve kernfs_notify() poll notification latency kernfs_notify() does two notifications: poll and fsnotify. Originally, both notifications were done from scheduled work context and all that kernfs_notify() did was schedule the work. This patch simply moves the poll notification from the scheduled work handler to kernfs_notify(). The fsnotify notification still needs to be done from scheduled work context because it can sleep (it needs to lock a mutex). If the poll notification is time critical (the notified thread needs to wake as quickly as possible), it's better to do it from kernfs_notify() directly. One example is calling sysfs_notify_dirent() from a hardware interrupt handler to wake up a thread and handle the interrupt in user space. Signed-off-by: Radu Rendec Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit b5570ca7c475bffbc5fc2e9af994dc6d249eb13e Author: Zhaolong Zhang Date: Fri Nov 16 18:21:51 2018 +0800 uio: dismiss waiters on device unregistration When the device is unregistered, it should wake up the blocking waiters. Otherwise, they will sleep forever. Signed-off-by: Zhaolong Zhang Signed-off-by: Greg Kroah-Hartman commit 8341f2f222d729688014ce8306727fdb9798d37e Author: Matthias Kaehlcke Date: Thu Sep 20 10:12:53 2018 -0700 sysrq: Use panic() to force a crash sysrq_handle_crash() currently forces a crash by dereferencing a NULL pointer, which is undefined behavior in C. Just call panic() instead, which is simpler and doesn't depend on compiler specific handling of the undefined behavior. Remove the comment on why the RCU lock needs to be released, it isn't accurate anymore since the crash now isn't handled by the page fault handler (for reference: the comment was added by commit 984cf355aeaa ("sysrq: Fix warning in sysrq generated crash.")). Releasing the lock is still good practice though. Suggested-by: Greg Kroah-Hartman Signed-off-by: Matthias Kaehlcke Signed-off-by: Greg Kroah-Hartman commit 279070b96a5a087ba712e6ff333fa126d3e6fbb7 Author: Yangtao Li Date: Wed Nov 21 08:12:14 2018 -0500 tty/sysrq: add of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. bl_idle_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 01f965ce9e5d1c865ed1a5e0a484a3246f51502d Author: Olliver Schinagl Date: Mon Nov 26 17:27:51 2018 +0200 ARM: dts: sun7i: set proper lradc vref on OLinuXino Lime2 The lradc's analog reference voltage is set to 3.0 volt in the hardware. This is more or less set in copper for at least lradc0. Set the property in the dts to ensure the lradc is referenced properly. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard commit 7626e002225a4c1b9455689b1f22909dfeff43ca Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:51 2018 +0100 staging: vchiq: add more tasks to the TODO list The TODO list was missing some tasks needed before upstreaming the device. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 4ab0f5ce5f4576c3eb24fe5c788cb755ebdddb0f Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:50 2018 +0100 staging: vchiq_arm: fix open/release cdev functions Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 187ac53e590c87b9c3f967c601b062393dcd7a73 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:49 2018 +0100 staging: vchiq_arm: rework probe and init functions Moves the allocation of a chardev region and class creation to the init function of the driver since those functions are meant to be run on a per driver basis, as opposed to the code run in the probe function which is run in a per device basis. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit d7d3bf2117a7e4c0a4e3b8643cf1f14124b3916f Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:48 2018 +0100 staging: vchiq_core: fix logic redundancy in parse_open We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 96f33712725e93677b2a91b68d93548068fb5c98 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:47 2018 +0100 staging: vchiq_util: get rid of unneeded memory barriers All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit f27e47bc6b8b96dd34ebad2a659b8a983cf367df Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:46 2018 +0100 staging: vchiq: use completions instead of semaphores It is preferred in the kernel to avoid using semaphores to wait for events, as they are optimised for the opposite situation; where the common case is that they are available and may block only occasionally. FYI see this thread: https://lkml.org/lkml/2008/4/11/323. Also completions are semantically more explicit in this case. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 51c071265079319583e4c6e8c61e09660300d0bf Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:45 2018 +0100 staging: vchiq_core: don't add a wmb() before remote_event_signal() It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 02d84a950139cbaa514f1fce28e9012cd6c486b1 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:44 2018 +0100 staging: vchiq_core: do not initialize semaphores twice vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. We get rid of the second initialization. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 3fc499c8b53401c44dcf37b95b2329c5591f14ae Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:43 2018 +0100 staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state vchiq_init_state() checks the initial contents of slot_zero are correct. These are set in vchiq_init_slots(), using the same hard-coded defaults as the checks. Both functions are called sequentially and Video Core isn't yet aware of the slot's address. There is no way the contents of slot_zero changed in between functions, making the checks useless. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 14f4d72fb799a9b3170a45ab80d4a3ddad541960 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:42 2018 +0100 staging: vchiq-core: get rid of is_master distinction VCHIQ bulk transfers are what most people call DMA transfers. The CPU sends a list of physical addresses to the VideoCore which then access the memory directly without the need for CPU interaction. With this setup we call the CPU the "slave" and the VideoCore the "master". There seems to be an option to switch roles in vchiq. Which nobody is using nor is properly implemented. So we get rid of the "is_master == 1" option, and all the related code. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 44c1e1bcbc334c3716a802a84145650057748611 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:41 2018 +0100 staging: vchiq_arm: rework vchiq_ioc_copy_element_data The function is passed to vchiq_core.c for it to go trough all the transfer elements (an array of pointers to data) and copy them into the actual transfer memory (contiguous memory). The logic in the function was "copy an element and return, except when the element is empty, in which case look for the next non-empty element and copy it. The function will be called as many times as necessary until all the elements are copied". Now, this approach already forces the function to loop around elements and felt convoluted, so it was changed to a more straightforward "Copy all the elements into memory as long as they fit". The resulting function is shorter and simpler. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 02a3ce3c2a67f3c3693029bc650f0c0571d9a3a2 Author: Paul Kocialkowski Date: Fri Nov 23 10:25:04 2018 +0100 drm/sun4i: Pass modifier to backend and frontend format support helpers To prepare the introduction of tiled mode support, pass the framebuffer format modifier to the helpers dealing with format support. Since only linear mode is supported for now, add corresponding checks in each helper. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-33-paul.kocialkowski@bootlin.com commit ee43f74585f3e5abaf75d373d2cb313831565acf Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:40 2018 +0100 staging: vchiq_arm: get rid of vchi_mh.h The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 46e4b9ec4fa481b33b4bc5eafbc479750b69207c Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:39 2018 +0100 staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 9851968b6e4176348fd870c5f0b4c54b72cab033 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:38 2018 +0100 staging: vchiq_shim: delete vchi_service_create No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit ddd7536ad4d6bb31d4201c28d221c3e3d15cce64 Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:37 2018 +0100 staging: vchiq_arm: rework close/remove_service IOCTLS The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 49fa9157a408ca673b947b841c12120d19ba885c Author: Nicolas Saenz Julienne Date: Tue Nov 20 15:53:36 2018 +0100 staging: vchiq_core: rework vchiq_get_config The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit b3885feb8af7c52f7697f8aac06d8accd7d80c7c Author: Ricardo Silva Date: Mon Nov 26 11:42:17 2018 -0800 staging: rb8822be Change line not to end with '(' To comply with checkpatch. CHECK: Lines should not end with a '(' +u8 rtl_mrate_idx_to_arfr_id( Signed-off-by: Ricardo Silva Signed-off-by: Greg Kroah-Hartman commit 3b1ad360acad6052c2568f891bb3d0f3f057016f Author: YueHaibing Date: Mon Nov 26 18:24:22 2018 +0800 pps: using ERR_PTR instead of NULL while pps_register_source fails pps_register_source() has keeps error codes in a local variable, but it does not make use of the code. This patch let it return the errcode in case of failure. Suggested-by: Richard Cochran Signed-off-by: YueHaibing Acked-by: Rodolfo Giometti Signed-off-by: Greg Kroah-Hartman commit b36d95846117dc47cd5a7e854a862aa2b509026b Author: Paul Kocialkowski Date: Fri Nov 23 10:24:54 2018 +0100 drm/sun4i: frontend: Add support for the BGRX8888 output format This introduces support for the BGRX8888 output format for the frontend, with its associated output format value definition. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-23-paul.kocialkowski@bootlin.com commit 31cf282a53cf529ebe9e4bb50f0e750226f870a7 Author: Paul Kocialkowski Date: Fri Nov 23 10:25:01 2018 +0100 drm/sun4i: Make pitch even for GEM dumb alloc as per hardware constraint Our hardware requires the pitch to be an even number when using YUV formats with the frontend. Implement a driver-specific callback for GEM dumb allocation that sets the pitch accordingly. Since only the bpp is passed (and not the format), we cannot really distinguish if this alignment is really required. Since it doesn't hurt to align the pitch anyway, always do it. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-30-paul.kocialkowski@bootlin.com commit 411e83069e1590cad8c29adcb04de8e73714fa9f Author: Paul Kocialkowski Date: Fri Nov 23 10:24:57 2018 +0100 drm/sun4i: frontend: Apply format sub-sampling to CH1 dimensions The frontend comes with two "channels", that can be configured independently. When used in YUV mode, the first channel (CH0) represents the luminance component while the second channel (CH1) represents the chrominance. In RGB mode, both have to be configured the same way. Use variables (with the YUV terminology) for each channel's dimensions, calculating the chroma dimensions from the luma dimensions and the sub-sampling factors from the format description. Since the configured size only has pixel precision, the fractional fixed-point part of the source size is dropped for both components to ensure that the scaling factors are accurate. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-26-paul.kocialkowski@bootlin.com commit dc7d4b655a2c4a8db1342600319a7939eafeb9af Author: Paul Kocialkowski Date: Fri Nov 23 10:24:55 2018 +0100 drm/sun4i: backend: Detail the YUV to RGB values coding explanation The values in the BT601 YUV to RGB colorspace translation are not simply coded as multiples, but rather as fixed-point signed fractional values on a given number of bits. Add an explanation about that. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-24-paul.kocialkowski@bootlin.com commit b636d3f97d041cbb5e782a29b282c40cbd77c0aa Author: Paul Kocialkowski Date: Fri Nov 23 10:24:53 2018 +0100 drm/sun4i: frontend: Add support for the BGRX8888 input format This introduces support for the BGRX8888 input format for the frontend, with its associated pixel sequence value definition. Other fields are already configured correctly as they no longer depend on the format's fourcc directly. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-22-paul.kocialkowski@bootlin.com commit 63fd4b94b948c14eeb27a3bbf50ea0f7f0593bad Author: Stefan Agner Date: Wed Nov 14 18:49:38 2018 +0100 serial: imx: fix error handling in console_setup The ipg clock only needs to be unprepared in case preparing per clock fails. The ipg clock has already disabled at the point. Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check") Signed-off-by: Stefan Agner Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit ae4ba1936ab97c6a2733a243370f303da3c11839 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:51 2018 +0100 drm/sun4i: frontend: Determine input mode based on the number of planes Use the number of planes associated with the DRM format to determine the input mode configuration instead of the format iteself. This way, the helper can be used for all packed formats without future changes. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-20-paul.kocialkowski@bootlin.com commit 9579f9190487cc99ac280beda5da8ba7c3414b92 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:50 2018 +0100 drm/sun4i: frontend: Add proper definitions for format registers This introduces proper definitions for the input and output format configuration registers instead of a macro and raw values in the code, with the intent to increase code readability and reduce indirections. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-19-paul.kocialkowski@bootlin.com commit 47d0f9bdb190eccbd2d9f9b6a585ae64e48f8183 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:49 2018 +0100 drm/sun4i: frontend: Add helpers for input data mode and pixel sequence This introduces new helpers for retrieving the input data mode and pixel sequence register field values based on the DRM format instead of hardcoding these. This makes it easier to add support for more formats. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-18-paul.kocialkowski@bootlin.com commit 01260ffad2a8eff7f43218bdc93072fd068036f6 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:48 2018 +0100 drm/sun4i: frontend: Move CSC bypass setup to format update routine In order to support YUV to RGB conversion with the frontend (which is generally used for connecting with the backend), the CSC block must not be bypassed. As a result, the bit to enable CSC bypass is moved from the runtime resume routine to the format update routine, so that it can disabled when introducing support for YUV formats later. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-17-paul.kocialkowski@bootlin.com commit 1c29d263f6243e0007f0c61a82d1e1261efc5395 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:47 2018 +0100 drm/sun4i: Rename sun4i_backend_layer_formats to sun4i_layer_formats Since more formats can be supported by the frontend, rename the variable listing the layer formats to avoid suggesting that the backend itself supports all the listed formats. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-16-paul.kocialkowski@bootlin.com commit ae56bfbdad9b1996037a7209321cfb2ef49ea563 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:46 2018 +0100 drm/sun4i: backend: Avoid counting YUV planes that use the frontend Our hardware has a limited number of YUV planes (usually 1) that can be supported using the backend only. However, YUV planes can also be supported by the frontend and must then not be counted when checking for that limitation. Only count the YUV plane when the frontend is not used. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-15-paul.kocialkowski@bootlin.com commit ab6985108a53d531f0abaf06529ba148403d187d Author: Paul Kocialkowski Date: Fri Nov 23 10:24:39 2018 +0100 drm/sun4i: backend: Use a specific function to check if a plane is supported Before this patch, it is assumed that a plane is supported either through the frontend or through the backend alone. However, the DRM interface does not allow finely reporting our hardware capabilities and there are cases where neither are support. In particular, some plane formats are supported by the backend and not the frontend, so they can only be supported without scaling. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-8-paul.kocialkowski@bootlin.com commit aaf3880b0823113af9ed742a687e7fb1b411a201 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:38 2018 +0100 drm/sun4i: backend: Refine the logic behind using the frontend Checking that scaling is in use is not sufficient as a condition to decide to use the frontend. Since not all layer formats are supported by the frontend, we need to check for that support first. Then, the frontend must only be enabled if the backend doesn't support the format or that scaling is required. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-7-paul.kocialkowski@bootlin.com commit ee286db13395d6c228d3f9f96e7121739a6b229a Author: Paul Kocialkowski Date: Fri Nov 23 10:24:37 2018 +0100 drm/sun4i: frontend: Add a helper and a list for supported formats In order to check whether the frontend supports a specific format, an explicit list and a related helper are introduced. Just like in the backend, the prototype of the helper is added to the frontend header so that it can be used later on. The helper is also exported because it will be used outside of the frontend module. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-6-paul.kocialkowski@bootlin.com commit 3d4265f89d064df2a6952e3f24a3da4fd687cc65 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:36 2018 +0100 drm/sun4i: backend: Add a helper and a list for supported formats In order to check whether the backend supports a specific format, an explicit list and a related helper are introduced. The prototype of this helper is added to the header so that it can be called from sun4i_layer later (when introducing tiled mode support). Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-5-paul.kocialkowski@bootlin.com commit ad25d0736db00afb2c7bf355bc50437434325387 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:35 2018 +0100 drm/sun4i: Add TODO comment about supporting scaling with the backend The backend allows integer-only scaling but can handle alpha components, unlike the frontend. It could be useful to add support for this eventually, so add a short TODO comment describing the situation. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-4-paul.kocialkowski@bootlin.com commit b79a3a97f64f90dac79a9fc57a0280607306ba38 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:34 2018 +0100 drm/sun4i: frontend: Replace ARGB with XRGB as supported format The frontend documentation (for the A33) mentions that ARGB is supported as output, but with the alpha component always set to 0xff. In practice, this means that the alpha component cannot be preserved when going through the frontend. Since the information is lost, ARGB is not properly supported. As a result, expose the matching format supported by the frontend (both for input and output) as XRGB instead of ARGB. Since ARGB was the selected format for connecting the frontend to the backend, change it to XRGB to reflect this as well. The A31 and A80 SoCs apparently have a bit to enable proper alpha, but this is not supported at this point (see the comment already in the code). Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-3-paul.kocialkowski@bootlin.com commit 686d263856a9d5e1b3f66c7795308af9e8e20d96 Author: Paul Kocialkowski Date: Fri Nov 23 10:24:33 2018 +0100 drm/sun4i: Cleanup video/YUV source before enabling a layer This adds a dedicated function for cleaning the video and YUV source channel layer enable bits. This function is called first on layer atomic update to make sure that there are no leftover bits from previous plane configuration that were not cleaned until now. It fixes issues when alternating between video and YUV planes, where both bits would be set eventually, leading to broken plane display. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-2-paul.kocialkowski@bootlin.com commit c56689e6f2fbbb92d853e1251819f9b5731d7389 Author: Chen-Yu Tsai Date: Mon Nov 26 13:59:46 2018 +0800 arm64: dts: allwinner: a64: bananapi-m64: Enable audio codec This patch enables audio via the SoC's internal audio codec. All relevant device nodes are enabled, and the routing is set to match the board design. MIC1 is routed to an onboard microphone, with MBIAS providing power. MIC2 and HP are routed to the 3.5mm headset TRRS jack. No phantom power is provided to the headset microphone. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 35d7a58ac282e220a820e2bf996063a6c9a493c8 Author: Miquel Raynal Date: Fri Nov 23 16:45:30 2018 +0100 serial: mvebu-uart: initialize over sampling stack register The baudrate derivation relies on the state of the programmable over sampling stack (OSAMP register) being empty, while never initializing it. Set all the fields of this register to 0 (except reserved areas) to ensure a x16 divisor, as assumed by the driver. The suspend/resume callbacks are untouched because they already save/restore correctly this register. Suggested-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman commit 0e4cf69ede8751d25f733cd7a6f954c5b505fa03 Author: Miquel Raynal Date: Fri Nov 23 16:45:29 2018 +0100 serial: mvebu-uart: clarify the baud rate derivation The current comment in ->set_baud_rate() is rather incomplete as it fails to describe what are the actual stages for the baudrate derivation. Replace this comment with something more explicit and close to the functional specification. Also adapt the variable names to it. Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman commit 20d8e8611eb0596047fd4389be7a7203a883b9bf Author: Yangtao Li Date: Wed Nov 21 11:06:15 2018 -0500 serial/sunsu: add missing of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. This place is not doing this, so fix it. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 3c81ba9242b79adc8a2e569815ec3b0caa3e03bf Author: Yangtao Li Date: Wed Nov 21 10:22:54 2018 -0500 drivers/tty: add missing of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. This place is not doing this, so fix it. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit ee0a29ba574bde9861eee08d7b13a9cfbfcc8d1f Author: Colin Ian King Date: Tue Nov 13 09:43:23 2018 +0000 serial-uartlite: fix null pointer dereference on pointer port Pointer port is dereferenced on port->private_data when assigning pointer pdata before port is null checked, leading to a potential null pointer dereference. Fix this by assigning pdata after the null pointer check on port. Detected by CoverityScan, CID#1475434 ("Dereference before null check") Fixes: 3b209d253e7f ("serial-uartlite: Do not use static struct uart_driver out of probe()") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit eb30abeedee76c04bdf41c6d88545472c11a5632 Author: Peng Hao Date: Fri Nov 16 19:13:26 2018 +0800 misc/pvpanic: resolve compile errors for arch=um Resolve compile error for arch=um pvpanic.c:(.text+0xb6): undefined reference to `devm_ioremap_resource' Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit eeabdfabdc53fc77a3404eb874da505f2fee1101 Author: Mathieu Poirier Date: Mon Nov 12 10:05:47 2018 -0700 MAINTAINERS: Add reviewer for CoreSight sub-system On top of providing useful review and comments, Suzuki has done good work in the CoreSight sub-system over the past couple of years. As agreed during a recent face-to-face converstation, adding him as a reviewer to lessen the maintenance workload. Signed-off-by: Mathieu Poirier Acked-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman commit 9ccb645683ef46e3c52c12c088a368baa58447d4 Author: Colin Ian King Date: Sat Nov 24 12:34:10 2018 +0000 altera-stapl: check for a null key before strcasecmp'ing it Currently the null check on key is occurring after the strcasecmp on the key, hence there is a potential null pointer dereference on key. Fix this by checking if key is null first. Also replace the == 0 check on strcasecmp with just the ! operator. Detected by CoverityScan, CID#1248787 ("Dereference before null check") Fixes: fa766c9be58b ("[media] Altera FPGA firmware download module") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 5323ac5177c445c15f49c91fadf9539a0bc95fa9 Author: Niklas Cassel Date: Mon Nov 12 12:25:26 2018 +0000 slimbus: ngd: QCOM_QMI_HELPERS has to be selected QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it. Because of this change, we now also need to depend on the same Kconfigs as QCOM_QMI_HELPERS depends on. Signed-off-by: Niklas Cassel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit 458a445deb9c9fb13cec46fe9b179a84d2ff514f Author: Srinivas Kandagatla Date: Mon Nov 12 12:25:25 2018 +0000 slimbus: ngd: Fix build error on x86 on non DT platforms like x86 of_match_node is set to NULL, dereferencing directly would throw an error. Fix this by doing this in two steps, get the match then the data. Reported-by: Greg KH Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman commit c9d76d0655c06b8c1f944e46c4fd9e9cf4b331c0 Author: Niklas Söderlund Date: Wed Aug 29 23:29:21 2018 +0200 dma-mapping: fix return type of dma_set_max_seg_size() The function dma_set_max_seg_size() can return either 0 on success or -EIO on error. Change its return type from unsigned int to int to capture this. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Christoph Hellwig commit aa1f0fa374ed23528b915a693a11b0f275a299c0 Author: Gustavo A. R. Silva Date: Sun Nov 25 21:48:45 2018 +0000 parport: parport_pc: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114730 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman commit 885b3680c4a6c052da937770652aec81f8e5590b Author: Sudip Mukherjee Date: Sun Nov 25 19:47:37 2018 +0000 char: lp: fix spacing style before open parenthesis Fixes the checkpatch warning: "space prohibited between function name and open parenthesis" Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 2081f9c03cc901ff288b65c4493d9272bf7df084 Author: Sudip Mukherjee Date: Sun Nov 25 19:47:36 2018 +0000 char: lp: fix whitespace with pointers Fixes checkpatch warning: "foo * bar should be foo *bar" Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 1b3451e0edd3257594dbad79bef7b1e451463273 Author: Sudip Mukherjee Date: Sun Nov 25 19:47:35 2018 +0000 char: lp: use tabs instead of spaces Fixes the checkpatch error: ERROR: code indent should use tabs where possible Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 39992028c76c4dfcf26f965922fecb579b7f8d6e Author: Sudip Mukherjee Date: Sun Nov 25 19:47:34 2018 +0000 char: lp: do not use return as a function return is not a function, parentheses are not required. Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 1c3de93621b310276ae4d966a14ed01b711312c2 Author: Sudip Mukherjee Date: Sun Nov 25 19:47:33 2018 +0000 char: lp: move trailing statement to next line Fix checkpatch errors for trailing if else statements. Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 69f92163f47ab5ac1d3a26e17563576cd651d56e Author: Sudip Mukherjee Date: Sun Nov 25 19:47:32 2018 +0000 char: lp: remove trailing whitespace Fix checkpatch error for trailing whitespace. Signed-off-by: Sudip Mukherjee Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 55949c7e75ba535effd6965e47f705f173547dea Author: Rob Herring Date: Fri Nov 16 16:11:02 2018 -0600 misc: cxl: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Cc: Frederic Barrat Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring Acked-by: Andrew Donnellan Signed-off-by: Greg Kroah-Hartman commit 97a64ba77db12e3f33680fc2540453c35b3681f7 Author: Dan Carpenter Date: Mon Nov 26 11:12:29 2018 +0300 misc/pvpanic: fix a NULL vs IS_ERR() check The devm_ioremap_resource() function doesn't return NULL, it returns error pointers. Fixes: 46f934c9a12f ("misc/pvpanic: add support to get pvpanic device info FDT") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit 1aeba347b3a90a8b22f1c3eed0dcfba38bb8dbb8 Author: Paul Burton Date: Mon Nov 26 18:58:40 2018 +0000 MIPS: Hardcode cpu_has_mips* where target ISA allows In the same vein as commit 93e01942a6eb ("MIPS: Hardcode cpu_has_* where known at compile time due to ISA"), we can use our knowledge of the ISA being targeted by the kernel build to make cpu_has_mips* macros compile-time constant in some cases. This allows the compiler greater opportunity to optimize out code which will never execute. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21245/ Cc: linux-mips@linux-mips.org commit f08153186ca5023c1672aa6417ee4fc748ac5901 Author: Paul Burton Date: Mon Nov 26 18:47:33 2018 +0000 MIPS: MT: Remove norps command line parameter The "norps" kernel command line parameter has apparently been deprecated ever since it was added to the kernel back in 2006 - all it does is print a message telling the user to use something else. Remove the long dead "norps" parameter. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21244/ Cc: linux-mips@linux-mips.org commit 02c72d5edadc453f8e7f367df066ab6bd516c050 Merge: 4afe60a97ba6f f959a128fe830 Author: David S. Miller Date: Mon Nov 26 22:17:40 2018 -0800 Merge branch 'virtio-support-packed-ring' Tiwei Bie says: ==================== virtio: support packed ring This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should be fixed in vhost): https://lkml.org/lkml/2018/7/3/33 v2 -> v3: - Use leXX instead of virtioXX (MST); - Refactor split ring first (MST); - Add debug helpers (MST); - Put split/packed ring specific fields in sub structures (MST); - Handle normal descriptors and indirect descriptors differently (MST); - Track the DMA addr/len related info in a separate structure (MST); - Calculate AVAIL/USED flags only when wrap counter wraps (MST); - Define a struct/union to read event structure (MST); - Define a macro for wrap counter bit in uapi (MST); - Define the AVAIL/USED bits as shifts instead of values (MST); - s/_F_/_FLAG_/ in VRING_PACKED_EVENT_* as they are values (MST); - Drop the notify workaround for QEMU's tx-timer in packed ring (MST); v1 -> v2: - Use READ_ONCE() to read event off_wrap and flags together (Jason); - Add comments related to ccw (Jason); RFC v6 -> v1: - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() when event idx is off (Jason); - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); - Test the state of the desc at used_idx instead of last_used_idx in virtqueue_enable_cb_delayed_packed() (Jason); - Save wrap counter (as part of queue state) in the return value of virtqueue_enable_cb_prepare_packed(); - Refine the packed ring definitions in uapi; - Rebase on the net-next tree; RFC v5 -> RFC v6: - Avoid tracking addr/len/flags when DMA API isn't used (MST/Jason); - Define wrap counter as bool (Jason); - Use ALIGN() in vring_init_packed() (Jason); - Avoid using pointer to track `next` in detach_buf_packed() (Jason); - Add comments for barriers (Jason); - Don't enable RING_PACKED on ccw for now (noticed by Jason); - Refine the memory barrier in virtqueue_poll(); - Add a missing memory barrier in virtqueue_enable_cb_delayed_packed(); - Remove the hacks in virtqueue_enable_cb_prepare_packed(); RFC v4 -> RFC v5: - Save DMA addr, etc in desc state (Jason); - Track used wrap counter; RFC v3 -> RFC v4: - Make ID allocation support out-of-order (Jason); - Various fixes for EVENT_IDX support; RFC v2 -> RFC v3: - Split into small patches (Jason); - Add helper virtqueue_use_indirect() (Jason); - Just set id for the last descriptor of a list (Jason); - Calculate the prev in virtqueue_add_packed() (Jason); - Fix/improve desc suppression code (Jason/MST); - Refine the code layout for XXX_split/packed and wrappers (MST); - Fix the comments and API in uapi (MST); - Remove the BUG_ON() for indirect (Jason); - Some other refinements and bug fixes; RFC v1 -> RFC v2: - Add indirect descriptor support - compile test only; - Add event suppression supprt - compile test only; - Move vring_packed_init() out of uapi (Jason, MST); - Merge two loops into one in virtqueue_add_packed() (Jason); - Split vring_unmap_one() for packed ring and split ring (Jason); - Avoid using '%' operator (Jason); - Rename free_head -> next_avail_idx (Jason); - Add comments for virtio_wmb() in virtqueue_add_packed() (Jason); - Some other refinements and bug fixes; ==================== Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit f959a128fe83090981add69aadc87a4e496e9369 Author: Tiwei Bie Date: Wed Nov 21 18:03:30 2018 +0800 virtio_ring: advertize packed ring layout Advertize the packed ring layout support. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 3a814fdf271552a5c4641f812ff7e2dd8ad09ee4 Author: Tiwei Bie Date: Wed Nov 21 18:03:29 2018 +0800 virtio_ring: disable packed ring on unsupported transports Currently, ccw, vop and remoteproc need some legacy virtio APIs to create or access virtio rings, which are not supported by packed ring. So disable packed ring on these transports for now. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit f51f982682e2a612fa642dfee47cc8da63677148 Author: Tiwei Bie Date: Wed Nov 21 18:03:28 2018 +0800 virtio_ring: leverage event idx in packed ring Leverage the EVENT_IDX feature in packed ring to suppress events when it's available. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 1ce9e6055fa0a9043405c5604cf19169ec5379ff Author: Tiwei Bie Date: Wed Nov 21 18:03:27 2018 +0800 virtio_ring: introduce packed ring support Introduce the packed ring support. Packed ring can only be created by vring_create_virtqueue() and each chunk of packed ring will be allocated individually. Packed ring can not be created on preallocated memory by vring_new_virtqueue() or the likes currently. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit fb3fba6b162aaa42aeba6e9034f3e92716c2a749 Author: Tiwei Bie Date: Wed Nov 21 18:03:26 2018 +0800 virtio_ring: cache whether we will use DMA API Cache whether we will use DMA API, instead of doing the check every time. We are going to check whether DMA API is used more often in packed ring. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit d79dca75c79680f52a27a7ee1b6ae75066f36b3e Author: Tiwei Bie Date: Wed Nov 21 18:03:25 2018 +0800 virtio_ring: extract split ring handling from ring creation Introduce a specific function to create the split ring. And also move the DMA allocation and size information to the .split sub-structure. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit cbeedb72b97ad826e31e68e0717b763e2db0806d Author: Tiwei Bie Date: Wed Nov 21 18:03:24 2018 +0800 virtio_ring: allocate desc state for split ring separately Put the split ring's desc state into the .split sub-structure, and allocate desc state for split ring separately, this makes the code more readable and more consistent with what we will do for packed ring. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 2f18c2d153fb6fc889665688f266c780353002ec Author: Tiwei Bie Date: Wed Nov 21 18:03:23 2018 +0800 virtio_ring: introduce helper for indirect feature Introduce a helper to check whether we will use indirect feature. It will be used by packed ring too. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 4d6a105eb534b8f1a5ef9215deb1932cd8abacc2 Author: Tiwei Bie Date: Wed Nov 21 18:03:22 2018 +0800 virtio_ring: introduce debug helpers Introduce debug helpers for last_add_time update, check and invalid. They will be used by packed ring too. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit e593bf9751566e0ba5a055a976a4abd54101d572 Author: Tiwei Bie Date: Wed Nov 21 18:03:21 2018 +0800 virtio_ring: put split ring fields in a sub struct Put the split ring specific fields in a sub-struct named as "split" to avoid misuse after introducing packed ring. There is no functional change. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit e6f633e5beab659513297f1210b428ce6f46e69c Author: Tiwei Bie Date: Wed Nov 21 18:03:20 2018 +0800 virtio_ring: put split ring functions together Put the xxx_split() functions together to make the code more readable and avoid misuse after introducing the packed ring. There is no functional change. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 138fd25148638a93313f8ce703dd4aef2704dcea Author: Tiwei Bie Date: Wed Nov 21 18:03:19 2018 +0800 virtio_ring: add _split suffix for split ring functions Add _split suffix for split ring specific functions. This is a preparation for introducing the packed ring support. There is no functional change. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit 89a9157e1253bb3384a7596cb51bf1ceeac063ed Author: Tiwei Bie Date: Wed Nov 21 18:03:18 2018 +0800 virtio: add packed ring types and macros Add types and macros for packed ring. Signed-off-by: Tiwei Bie Signed-off-by: David S. Miller commit f4f0b6777db4e7a4ba4f713d1d68f8e8f0ef421a Author: Jia Zhu Date: Tue Nov 20 04:29:35 2018 +0800 f2fs: fix m_may_create to make OPU DIO write correctly Previously, we added a parameter @map.m_may_create to trigger OPU allocation and call f2fs_balance_fs() correctly. But in get_more_blocks(), @create has been overwritten by below code. So the function f2fs_map_blocks() will not allocate new block address but directly go out. Meanwile,there are several functions calling f2fs_map_blocks() directly and @map.m_may_create not initialized. CODE: create = dio->op == REQ_OP_WRITE; if (dio->flags & DIO_SKIP_HOLES) { if (fs_startblk <= ((i_size_read(dio->inode) - 1) >> i_blkbits)) create = 0; } This patch fixes it. Signed-off-by: Jia Zhu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 17d95e4225bf24ef3399d9e71c512311259d1ac9 Merge: b89c2998d9983 76d1b894c5155 Author: Alexei Starovoitov Date: Mon Nov 26 18:57:15 2018 -0800 Merge branch 'libbpf-versioning-doc' Andrey Ignatov says: ==================== This patch set adds ABI versioning and documentation to libbpf. Patch 1 renames btf_get_from_id to btf__get_from_id to follow naming convention. Patch 2 adds version script and has more details on ABI versioning. Patch 3 adds simple check that all global symbols are versioned. Patch 4 documents a few aspects of libbpf API and ABI in dev process. v1->v2: * add patch from Martin KaFai Lau to rename btf_get_from_id; * add documentation for libbpf API and ABI. ==================== Signed-off-by: Alexei Starovoitov commit 76d1b894c5155dbc44d24f6df2e0da3726d54bbd Author: Andrey Ignatov Date: Fri Nov 23 16:44:35 2018 -0800 libbpf: Document API and ABI conventions Document API and ABI for libbpf: naming convention, symbol visibility, ABI versioning. This is just a starting point. Documentation can be significantly extended in the future to cover more topics. ABI versioning section touches only a few basic points with a link to more comprehensive documentation from Ulrich Drepper. This section can be extended in the future when there is better understanding what works well and what not so well in libbpf development process and production usage. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 306b267cb3c4c2a3d12138041fed10478804da82 Author: Andrey Ignatov Date: Fri Nov 23 16:44:34 2018 -0800 libbpf: Verify versioned symbols Since ABI versioning info is kept separately from the code it's easy to forget to update it while adding a new API. Add simple verification that all global symbols exported with LIBBPF_API are versioned in libbpf.map version script. The idea is to check that number of global symbols in libbpf-in.o, that is the input to the linker, matches with number of unique versioned symbols in libbpf.so, that is the output of the linker. If these numbers don't match, it may mean some symbol was not versioned and make will fail. "Unique" means that if a symbol is present in more than one version of ABI due to ABI changes, it'll be counted once. Another option to calculate number of global symbols in the "input" could be to count number of LIBBPF_ABI entries in C headers but it seems to be fragile. Example of output when a symbol is missing in version script: ... LD libbpf-in.o LINK libbpf.a LINK libbpf.so Warning: Num of global symbols in libbpf-in.o (115) does NOT match with num of versioned symbols in libbpf.so (114). Please make sure all LIBBPF_API symbols are versioned in libbpf.map. make: *** [check_abi] Error 1 Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 16192a771d8c4d844529cbc920c75d170d16fb14 Author: Andrey Ignatov Date: Fri Nov 23 16:44:33 2018 -0800 libbpf: Add version script for DSO More and more projects use libbpf and one day it'll likely be packaged and distributed as DSO and that requires ABI versioning so that both compatible and incompatible changes to ABI can be introduced in a safe way in the future without breaking executables dynamically linked with a previous version of the library. Usual way to do ABI versioning is version script for the linker. Add such a script for libbpf. All global symbols currently exported via LIBBPF_API macro are added to the version script libbpf.map. The version name LIBBPF_0.0.1 is constructed from the name of the library + version specified by $(LIBBPF_VERSION) in Makefile. Version script does not duplicate the work done by LIBBPF_API macro, it rather complements it. The macro is used at compile time and can be used by compiler to do optimization that can't be done at link time, it is purely about global symbol visibility. The version script, in turn, is used at link time and takes care of ABI versioning. Both techniques are described in details in [1]. Whenever ABI is changed in the future, version script should be changed appropriately. [1] https://www.akkadia.org/drepper/dsohowto.pdf Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 1d2f44ca342445f7da56555ca7a43d19aac8996a Author: Martin KaFai Lau Date: Fri Nov 23 16:44:32 2018 -0800 libbpf: Name changing for btf_get_from_id s/btf_get_from_id/btf__get_from_id/ to restore the API naming convention. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit b89c2998d9983af94037d4292cc8cb878441cf62 Merge: d8f3e978bd300 812dd689da2a9 Author: Alexei Starovoitov Date: Mon Nov 26 17:57:11 2018 -0800 Merge branch 'non-jit-btf-func_info' Yonghong Song says: ==================== Commit 838e96904ff3 ("bpf: Introduce bpf_func_info") added bpf func info support. The userspace is able to get better ksym's for bpf programs with jit, and is able to print out func prototypes. For a program containing func-to-func calls, the existing implementation returns user specified number of function calls and BTF types if jit is enabled. If the jit is not enabled, it only returns the type for the main function. This is undesirable. Interpreter may still be used and we should keep feature identical regardless of whether jit is enabled or not. This patch fixed this discrepancy. The following example shows bpftool output for the bpf program in selftests test_btf_haskv.o when jit is disabled: $ bpftool prog dump xlated id 1490 int _dummy_tracepoint(struct dummy_tracepoint_args * arg): 0: (85) call pc+2#__bpf_prog_run_args32 1: (b7) r0 = 0 2: (95) exit int test_long_fname_1(struct dummy_tracepoint_args * arg): 3: (85) call pc+1#__bpf_prog_run_args32 4: (95) exit int test_long_fname_2(struct dummy_tracepoint_args * arg): 5: (b7) r2 = 0 6: (63) *(u32 *)(r10 -4) = r2 7: (79) r1 = *(u64 *)(r1 +8) 8: (15) if r1 == 0x0 goto pc+9 9: (bf) r2 = r10 10: (07) r2 += -4 11: (18) r1 = map[id:1173] 13: (85) call bpf_map_lookup_elem#77088 14: (15) if r0 == 0x0 goto pc+3 15: (61) r1 = *(u32 *)(r0 +4) 16: (07) r1 += 1 17: (63) *(u32 *)(r0 +4) = r1 18: (95) exit $ bpftool prog dump jited id 1490 no instructions returned ==================== Signed-off-by: Alexei Starovoitov commit 812dd689da2a9af1208449588e4529c89a9d661d Author: Yonghong Song Date: Sat Nov 24 23:20:45 2018 -0800 tools/bpf: change selftest test_btf for both jit and non-jit The selftest test_btf is changed to test both jit and non-jit. The test result should be the same regardless of whether jit is enabled or not. Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit ba64e7d8525236aa56ab58ba3a3a71615c4ee289 Author: Yonghong Song Date: Sat Nov 24 23:20:44 2018 -0800 bpf: btf: support proper non-jit func info Commit 838e96904ff3 ("bpf: Introduce bpf_func_info") added bpf func info support. The userspace is able to get better ksym's for bpf programs with jit, and is able to print out func prototypes. For a program containing func-to-func calls, the existing implementation returns user specified number of function calls and BTF types if jit is enabled. If the jit is not enabled, it only returns the type for the main function. This is undesirable. Interpreter may still be used and we should keep feature identical regardless of whether jit is enabled or not. This patch fixed this discrepancy. Fixes: 838e96904ff3 ("bpf: Introduce bpf_func_info") Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 73c0a9272a7d2942bcae29d4829bf63277cc57c8 Author: Jia Zhu Date: Tue Nov 27 02:32:32 2018 +0800 f2fs: fix to update new block address correctly for OPU Previously, we allocated a new block address for OPU mode in direct_IO. But the new address couldn't be assigned to @map->m_pblk correctly. This patch fix it. Cc: Fixes: 511f52d02f05 ("f2fs: allow out-place-update for direct IO in LFS mode") Signed-off-by: Jia Zhu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e3c59108da8655de78fe59843372b8cfab1a8e33 Author: Sahitya Tummala Date: Mon Nov 26 13:31:42 2018 +0530 f2fs: adjust trace print in f2fs_get_victim() to cover all paths Adjust the trace print in f2fs_get_victim() to cover GC done by F2FS_IOC_GARBAGE_COLLECT_RANGE. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 08ac9a3870f6babb2b1fff46118536ca8a71ef19 Author: Sahitya Tummala Date: Mon Nov 26 13:31:41 2018 +0530 f2fs: fix to allow node segment for GC by ioctl path Allow node type segments also to be GC'd via f2fs ioctl F2FS_IOC_GARBAGE_COLLECT_RANGE. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7d2cecb0849fbb4cb27bfa3828a5a52c57a50748 Author: Otavio Salvador Date: Mon Nov 26 15:35:05 2018 -0200 ARM: dts: rockchip: Add UART DMA support for rv1108 Pass the 'dmas' property to the UART ports so that DMA can be supported. Signed-off-by: Otavio Salvador Tested-by: Fabio Berton Signed-off-by: Heiko Stuebner commit efc2e0bd9594060915696a418564aefd0270b1d6 Author: Otavio Salvador Date: Mon Nov 26 15:35:04 2018 -0200 ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108 It is not correct to assign the 24MHz clock oscillator to the GPIO ports. Fix it by assigning the proper GPIO clocks instead. Signed-off-by: Otavio Salvador Tested-by: Fabio Berton Signed-off-by: Heiko Stuebner commit c955b7aec510145129ca7aaea6ecbf6d748f5ebf Author: Otavio Salvador Date: Mon Nov 26 15:35:03 2018 -0200 ARM: dts: rockchip: Fix the PMU interrupt number for rv1108 According to the Rockchip vendor tree the PMU interrupt number is 76, so fix it accordingly. Signed-off-by: Otavio Salvador Tested-by: Fabio Berton Signed-off-by: Heiko Stuebner commit 19880e6e5ff3b3574f510cd65b6677998ff08336 Author: Alexey Dobriyan Date: Sat Nov 24 12:06:42 2018 +0300 f2fs: make "f2fs_fault_name[]" const char * Those strings are immutable. Signed-off-by: Alexey Dobriyan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0ea295dd853e0879a9a30ab61f923c26be35b902 Author: Pan Bian Date: Thu Nov 22 18:58:46 2018 +0800 f2fs: read page index before freeing The function truncate_node frees the page with f2fs_put_page. However, the page index is read after that. So, the patch reads the index before freeing the page. Fixes: bf39c00a9a7f ("f2fs: drop obsolete node page when it is truncated") Cc: Signed-off-by: Pan Bian Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f6176473a0c7472380eef72ebeb330cf9485bf0a Author: Tiezhu Yang Date: Wed Nov 21 07:21:38 2018 +0800 f2fs: fix wrong return value of f2fs_acl_create When call f2fs_acl_create_masq() failed, the caller f2fs_acl_create() should return -EIO instead of -ENOMEM, this patch makes it consistent with posix_acl_create() which has been fixed in commit beaf226b863a ("posix_acl: don't ignore return value of posix_acl_create_masq()"). Fixes: 83dfe53c185e ("f2fs: fix reference leaks in f2fs_acl_create") Signed-off-by: Tiezhu Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f5d5510e7389fa264337fb524346bac9eb93adc8 Author: Jaegeuk Kim Date: Mon Nov 26 14:20:32 2018 -0800 f2fs: avoid build warn of fall_through After merging the f2fs tree, today's linux-next build (x86_64_allmodconfig) produced this warning: In file included from fs/f2fs/dir.c:11: fs/f2fs/f2fs.h: In function '__mark_inode_dirty_flag': fs/f2fs/f2fs.h:2388:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (set) ^ fs/f2fs/f2fs.h:2390:2: note: here case FI_DATA_EXIST: ^~~~ Exposed by my use of -Wimplicit-fallthrough Reported-by: Stephen Rothwell Signed-off-by: Jaegeuk Kim commit 2866fb16d67992195b0526d19e65acb6640fb87f Author: Sheng Yong Date: Wed Nov 14 19:34:28 2018 +0800 f2fs: fix race between write_checkpoint and write_begin The following race could lead to inconsistent SIT bitmap: Task A Task B ====== ====== f2fs_write_checkpoint block_operations f2fs_lock_all down_write(node_change) down_write(node_write) ... sync ... up_write(node_change) f2fs_file_write_iter set_inode_flag(FI_NO_PREALLOC) ...... f2fs_write_begin(index=0, has inline data) prepare_write_begin __do_map_lock(AIO) => down_read(node_change) f2fs_convert_inline_page => update SIT __do_map_lock(AIO) => up_read(node_change) f2fs_flush_sit_entries <= inconsistent SIT finish write checkpoint sudden-power-off If SPO occurs after checkpoint is finished, SIT bitmap will be set incorrectly. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4e240d1bab1ead280ddf5eb05058dba6bbd57d10 Author: Jaegeuk Kim Date: Wed Nov 14 12:40:30 2018 -0800 f2fs: check memory boundary by insane namelen If namelen is corrupted to have very long value, fill_dentries can copy wrong memory area. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1e771e83ce26d0ba2ce6c7df7effb7822f032c4a Author: Yunlong Song Date: Tue Nov 13 11:57:32 2018 +0800 f2fs: only flush the single temp bio cache which owns the target page Previously, when f2fs finds which temp bio cache owns the target page, it will flush all the three temp bio caches, but we only need to flush one single bio cache indeed, which can help to keep bio merged. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f9d6d0597698c0d27ac54c7dca459a7a1b931315 Author: Chao Yu Date: Tue Nov 13 14:33:45 2018 +0800 f2fs: fix out-place-update DIO write In get_more_blocks(), we may override @create as below code: create = dio->op == REQ_OP_WRITE; if (dio->flags & DIO_SKIP_HOLES) { if (fs_startblk <= ((i_size_read(dio->inode) - 1) >> i_blkbits)) create = 0; } But in f2fs_map_blocks(), we only trigger f2fs_balance_fs() if @create is 1, so in LFS mode, dio overwrite under LFS mode can easily run out of free segments, result in below panic. Call Trace: allocate_segment_by_default+0xa8/0x270 [f2fs] f2fs_allocate_data_block+0x1ea/0x5c0 [f2fs] __allocate_data_block+0x306/0x480 [f2fs] f2fs_map_blocks+0x6f6/0x920 [f2fs] __get_data_block+0x4f/0xb0 [f2fs] get_data_block_dio_write+0x50/0x60 [f2fs] do_blockdev_direct_IO+0xcd5/0x21e0 __blockdev_direct_IO+0x3a/0x3c f2fs_direct_IO+0x1ff/0x4a0 [f2fs] generic_file_direct_write+0xd9/0x160 __generic_file_write_iter+0xbb/0x1e0 f2fs_file_write_iter+0xaf/0x220 [f2fs] __vfs_write+0xd0/0x130 vfs_write+0xb2/0x1b0 SyS_pwrite64+0x69/0xa0 ? vtime_user_exit+0x29/0x70 do_syscall_64+0x6e/0x160 entry_SYSCALL64_slow_path+0x25/0x25 RIP: new_curseg+0x36f/0x380 [f2fs] RSP: ffffac570393f7a8 So this patch introduces a parameter map.m_may_create to indicate that f2fs_map_blocks() is called from write or read path, which can give the right hint to let f2fs_map_blocks() trigger OPU allocation and call f2fs_balanc_fs() correctly. BTW, it disables physical address preallocation for direct IO in f2fs_preallocate_blocks, which is redundant to OPU allocation of f2fs_map_blocks. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fef4129ec2e691a8411584c8bd126a35d0870298 Author: Chao Yu Date: Mon Nov 12 00:55:44 2018 +0800 f2fs: fix to be aware discard/preflush/dio command in is_idle() This patch adds missing in-flight discard/preflush/dio command count check in is_idle(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 02b16d0a34a188a21d08be52b37505e531aa558a Author: Chao Yu Date: Mon Nov 12 00:46:46 2018 +0800 f2fs: add to account direct IO This patch adds f2fs_dio_submit_bio() to hook submit_io/end_io functions in direct IO path, in order to account DIO. Later, we will add this count into is_idle() to let background GC/Discard thread be aware of DIO. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b61ac5b720146c619c7cdf17eff2551b934399e5 Author: Yunlei He Date: Tue Nov 6 10:25:29 2018 +0800 f2fs: move dir data flush to write checkpoint process This patch move dir data flush to write checkpoint process, by doing this, it may reduce some time for dir fsync. pre: -f2fs_do_sync_file enter -file_write_and_wait_range <- flush & wait -write_checkpoint -do_checkpoint <- wait all -f2fs_do_sync_file exit now: -f2fs_do_sync_file enter -write_checkpoint -block_operations <- flush dir & no wait -do_checkpoint <- wait all -f2fs_do_sync_file exit Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim commit 155c62fe9c5fe510746d06d12bc28d3084e63687 Author: Yangtao Li Date: Mon Nov 5 09:41:48 2018 -0500 f2fs: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 67b0e42b768c9ddc3fd5ca1aee3db815cfaa635c Author: Yunlong Song Date: Tue Oct 30 20:37:55 2018 +0800 f2fs: change segment to section in f2fs_ioc_gc_range f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves blocks of section each time, so fix it from segment to section. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3465557556b45a933cf3566d4040fd66aa2fc87b Author: Chao Yu Date: Thu Oct 25 16:19:28 2018 +0800 f2fs: export migration_granularity sysfs entry Add one sysfs entry to control migration granularity of GC in large section f2fs, it can be tuned to mitigate heavy overhead of migrating huge number of blocks in large section. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7beb01f74415c56f5992922b5b902b45d365e694 Author: Chao Yu Date: Wed Oct 24 18:34:26 2018 +0800 f2fs: clean up f2fs_sb_has_##feature_name In F2FS_HAS_FEATURE(), we will use F2FS_SB(sb) to get sbi pointer to access .raw_super field, to avoid unneeded pointer conversion, this patch changes to F2FS_HAS_FEATURE() accept sbi parameter directly. Just do cleanup, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e3080b0120a15e648f59491919cb5da0bc9802c3 Author: Chao Yu Date: Wed Oct 24 18:37:27 2018 +0800 f2fs: support subsectional garbage collection Section is minimal garbage collection unit of f2fs, in zoned block device, or ancient block mapping flash device, in order to improve GC efficiency, we can align GC unit to lower device erase unit, normally, it consists of multiple of segments. Once background or foreground GC triggers, it brings a large number of IOs, which will impact user IO, and also occupy cpu/memory resource intensively. So, to reduce impact of GC on large size section, this patch supports subsectional GC, in one cycle of GC, it only migrate partial segment{s} in victim section. Currently, by default, we use sbi->segs_per_sec as migration granularity. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 089842de5750f434aa016eb23f3d3a3a151083bd Author: Yunlong Song Date: Wed Oct 24 16:09:42 2018 +0800 f2fs: remove codes of unused wio_mutex Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2c70c5e3874e8cf2f39f4ce4e2b832f4380a0c1b Author: Chao Yu Date: Wed Oct 24 18:37:26 2018 +0800 f2fs: introduce __is_large_section() for cleanup Introduce a wrapper __is_large_section() to clean up codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d6c66cd19ef322fe0d51ba09ce1b7f386acab04a Author: Yunlong Song Date: Wed Oct 24 16:08:30 2018 +0800 f2fs: fix count of seg_freed to make sec_freed correct When sbi->segs_per_sec > 1, and if some segno has 0 valid blocks before gc starts, do_garbage_collect will skip counting seg_freed++, and this will cause seg_freed < sbi->segs_per_sec and finally skip sec_freed++. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a8075dc484cf10ebdb07bee2b17322fb0a846309 Author: Chao Yu Date: Wed Oct 24 17:24:10 2018 +0800 f2fs: fix to account preflush command for noflush_merge mode Previously, we only account preflush command for flush_merge mode, so for noflush_merge mode, we can not know in-flight preflush command count, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9bf1a3f73927492c8be127b642197125e9d52be8 Author: Yunlong Song Date: Tue Sep 18 20:39:53 2018 +0800 f2fs: avoid GC causing encrypted file corrupted The encrypted file may be corrupted by GC in following case: Time 1: | segment 1 blkaddr = A | GC -> | segment 2 blkaddr = B | Encrypted block 1 is moved from blkaddr A of segment 1 to blkaddr B of segment 2, Time 2: | segment 1 blkaddr = B | GC -> | segment 3 blkaddr = C | Before page 1 is written back and if segment 2 become a victim, then page 1 is moved from blkaddr B of segment 2 to blkaddr Cof segment 3, during the GC process of Time 2, f2fs should wait for page 1 written back before reading it, or move_data_block will read a garbage block from blkaddr B since page is not written back to blkaddr B yet. Commit 6aa58d8a ("f2fs: readahead encrypted block during GC") introduce ra_data_block to read encrypted block, but it forgets to add f2fs_wait_on_page_writeback to avoid racing between GC and flush. Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 07f05f40d956d40f32852a7b3ff109a72d254cf9 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:20 2018 +0200 RDMA/uverbs: Use uverbs_attr_bundle to pass udata for ioctl() Have the core code initialize the driver_udata if the method has a udata description. This is done using the same create_udata the handler was supposed to call. This makes ioctl consistent with the write and write_ex paths. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 3a6532c9af1a7836da2d597f1aaca73cb16c3b97 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:19 2018 +0200 RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write Now that we have metadata describing the command format the core code can directly compute the udata pointers and all the really ugly ib_uverbs_init_udata() calls can be removed from the handlers. This means all the write() handlers are no longer sensitive to the layout of the command buffer. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit ef87df2c7a8f04d31cbf06f0b14b8dd5feafe473 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:18 2018 +0200 RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write_ex The core code needs to compute the udata so we may as well pass it in the uverbs_attr_bundle instead of on the stack. This converts the simple case of write_ex() which already has a core calculation. Also change the write() path to use the attrs for ib_uverbs_init_udata() instead of on the stack. This lets the write to write_ex compatibility path continue to follow the lead of the _ex path. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit da0f60df7bd5a045aa423ec64fe5d7e29ba803ff Author: Jason Gunthorpe Date: Sun Nov 25 20:51:17 2018 +0200 RDMA/uverbs: Prohibit write() calls with too small buffers The size meta-data in the prior patch describes the smallest acceptable buffer for the write() interface. Globally check this in the core code. This is necessary in the case of write() methods that have a driver udata to prevent computing a negative udata buffer length. The return code of -ENOSPC is chosen here as some of the handlers already use this code, however many other handler use EINVAL. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 669dac1e00c50a65cb8ecf08862c3c9dd7a29a98 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:16 2018 +0200 RDMA/uverbs: Add structure size info to write commands We need the structure sizes to compute the location of the udata in the core code. Annotate the sizes into the new macro language. This is generated largely by script and checked by comparing against the similar list in rdma-core. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 15a1b4becba886176aa1426604548c34904fd054 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:15 2018 +0200 RDMA/uverbs: Do not pass ib_uverbs_file to ioctl methods The uverbs_attr_bundle already contains this pointer, and most methods don't actually need it. Get rid of the redundant function argument. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 7106a9769715bb4c0448927a29aa3b505855871c Author: Jason Gunthorpe Date: Sun Nov 25 20:51:14 2018 +0200 RDMA/uverbs: Make write() handlers return 0 on success Currently they return the command length, while all other handlers return 0. This makes the write path closer to the write_ex and ioctl path. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 8313c10fa8be032fccc1e757bccc21207f533127 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:13 2018 +0200 RDMA/uverbs: Replace ib_uverbs_file with uverbs_attr_bundle for write Now that we can add meta-data to the description of write() methods we need to pass the uverbs_attr_bundle into all write based handlers so future patches can use it as a container for any new data transferred out of the core. This is the first step to bringing the write() and ioctl() methods to a common interface signature. This is a simple search/replace, and we push the attr down into the uobj and other APIs to keep changes minimal. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 1b09577bef3ac135ed02115943c9ab53f2129555 Author: Jason Gunthorpe Date: Sun Nov 25 20:51:12 2018 +0200 RDMA/uverbs: Add missing driver_data If the struct is used with a driver_udata it should have a trailing driver_data flex array to mark it as having udata. In most cases this forces the end of the struct to be aligned to u64 which is needed to make the trailing driver_data naturally aligned. Unfortunately We have a few cases where the base struct is not aligned to 8 bytes, these are marked with a u32 driver_data and userspace will check for alignment issues when it compiles the driver. Also remove the empty ib_uverbs_modify_qp_resp as nothing uses this. pahole says there is no change to any struct sizes by this change. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit d2c9d9abe117a470753283bf5884fea6f4af15d4 Author: Colin Ian King Date: Mon Nov 26 16:23:20 2018 +0000 IB/qib: fix spelling mistake "colescing" -> "coalescing" There is a spelling mistake in the module description text, fix it. Signed-off-by: Colin Ian King Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 2a1fe215e7300c7ebd6a7a24afcab71db5107bb0 Author: Paul Moore Date: Mon Nov 26 18:40:07 2018 -0500 audit: use current whenever possible There are many places, notably audit_log_task_info() and audit_log_exit(), that take task_struct pointers but in reality they are always working on the current task. This patch eliminates the task_struct arguments and uses current directly which allows a number of cleanups as well. Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit d0a3f18a70f2d9700bf9f5e9c4a505472388a7c1 Author: Paul Moore Date: Thu Aug 2 17:56:50 2018 -0400 audit: minimize our use of audit_log_format() There are some cases where we are making multiple audit_log_format() calls in a row, for no apparent reason. Squash these down to a single audit_log_format() call whenever possible. Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 89f5bebcf0401dac470756869587a50dd72ff7b5 Author: Alexey Dobriyan Date: Sat Nov 24 12:11:32 2018 +0300 selinux: make "selinux_policycap_names[]" const char * Those strings aren't written. Signed-off-by: Alexey Dobriyan Signed-off-by: Paul Moore commit 2cbdcb882f97a45f7475c67ac6257bbc16277dfe Author: Ondrej Mosnacek Date: Fri Nov 16 14:12:02 2018 +0100 selinux: always allow mounting submounts If a superblock has the MS_SUBMOUNT flag set, we should always allow mounting it. These mounts are done automatically by the kernel either as part of mounting some parent mount (e.g. debugfs always mounts tracefs under "tracing" for compatibility) or they are mounted automatically as needed on subdirectory accesses (e.g. NFS crossmnt mounts). Since such automounts are either an implicit consequence of the parent mount (which is already checked) or they can happen during regular accesses (where it doesn't make sense to check against the current task's context), the mount permission check should be skipped for them. Without this patch, attempts to access contents of an automounted directory can cause unexpected SELinux denials. In the current kernel tree, the MS_SUBMOUNT flag is set only via vfs_submount(), which is called only from the following places: - AFS, when automounting special "symlinks" referencing other cells - CIFS, when automounting "referrals" - NFS, when automounting subtrees - debugfs, when automounting tracefs In all cases the submounts are meant to be transparent to the user and it makes sense that if mounting the master is allowed, then so should be the automounts. Note that CAP_SYS_ADMIN capability checking is already skipped for (SB_KERNMOUNT|SB_SUBMOUNT) in: - sget_userns() in fs/super.c: if (!(flags & (SB_KERNMOUNT|SB_SUBMOUNT)) && !(type->fs_flags & FS_USERNS_MOUNT) && !capable(CAP_SYS_ADMIN)) return ERR_PTR(-EPERM); - sget() in fs/super.c: /* Ensure the requestor has permissions over the target filesystem */ if (!(flags & (SB_KERNMOUNT|SB_SUBMOUNT)) && !ns_capable(user_ns, CAP_SYS_ADMIN)) return ERR_PTR(-EPERM); Verified internally on patched RHEL 7.6 with a reproducer using NFS+httpd and selinux-tesuite. Fixes: 93faccbbfa95 ("fs: Better permission checking for submounts") Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit d8f3e978bd30014081c599456285ca1d58c2aae1 Author: David Miller Date: Mon Nov 26 13:42:41 2018 -0800 bpf: Avoid unnecessary instruction in convert_bpf_ld_abs() 'offset' is constant and if it is zero, no need to subtract it from BPF_REG_TMP. Signed-off-by: David S. Miller Signed-off-by: Daniel Borkmann commit 229c55ccb487c0c10721fdb92af874d7b8671cda Author: Florian Fainelli Date: Mon Nov 5 14:54:31 2018 -0800 arch: Move initrd= parsing into do_mounts_initrd.c ARC, ARM, ARM64 and Unicore32 are all capable of parsing the "initrd=" command line parameter to allow specifying the physical address and size of an initrd. Move that parsing into init/do_mounts_initrd.c such that we no longer duplicate that logic. Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Signed-off-by: Rob Herring commit cdbc848b03414c75b7badccd8ada29deba7ec6e4 Author: Florian Fainelli Date: Mon Nov 5 14:54:30 2018 -0800 of/fdt: Remove custom __early_init_dt_declare_initrd() implementation Now that ARM64 uses phys_initrd_start/phys_initrd_size, we can get rid of its custom __early_init_dt_declare_initrd() which causes a fair amount of objects rebuild when changing CONFIG_BLK_DEV_INITRD. In order to make sure ARM64 does not produce a BUG() when VM debugging is turned on though, we must avoid early calls to __va() which is what __early_init_dt_declare_initrd() does and wrap this around to avoid running that code on ARM64. Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Signed-off-by: Rob Herring commit c756c592e442ba101c91daed3524ba5b3a784ba6 Author: Florian Fainelli Date: Mon Nov 5 14:54:29 2018 -0800 arm64: Utilize phys_initrd_start/phys_initrd_size ARM64 is the only architecture that re-defines __early_init_dt_declare_initrd() in order for that function to populate initrd_start/initrd_end with physical addresses instead of virtual addresses. Instead of having an override we can leverage drivers/of/fdt.c populating phys_initrd_start/phys_initrd_size to populate those variables for us. Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Acked-by: Will Deacon Signed-off-by: Rob Herring commit fe7db7570379dafec67430bb843d2e78df89e7f1 Author: Florian Fainelli Date: Mon Nov 5 14:54:28 2018 -0800 of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT Now that we have central and global variables holding the physical address and size of the initrd, we can have early_init_dt_check_for_initrd() populate phys_initrd_start/phys_initrd_size for us. This allows us to remove a chunk of code from arch/arm/mm/init.c introduced with commit 65939301acdb ("arm: set initrd_start/initrd_end for fdt scan"). Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Signed-off-by: Rob Herring commit b1ab95c63622e9d9bd0ce685e149034d393afc2e Author: Florian Fainelli Date: Mon Nov 5 14:54:27 2018 -0800 arch: Make phys_initrd_start and phys_initrd_size global variables Make phys_initrd_start and phys_initrd_size global variables declared in init/do_mounts_initrd.c such that we can later have generic code in drivers/of/fdt.c populate those variables for us. This requires both the ARM and unicore32 implementations to be properly guarded against CONFIG_BLK_DEV_INITRD, and also initialize the variables to the expected default values (unicore32). Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Signed-off-by: Rob Herring commit cd5e0fa0837c232f50a17390ce40a953c437a75f Author: Florian Fainelli Date: Mon Nov 5 14:54:26 2018 -0800 nds32: Remove phys_initrd_start and phys_initrd_size This will conflict with a subsequent change making phys_initrd_start and phys_initrd_size global variables. nds32 does not make use of those nor provides a suitable declarations so just get rid of them. Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Signed-off-by: Rob Herring commit 2c89156082b3be7a064b09dfb0bcd274609f355d Author: Saeed Mahameed Date: Tue Nov 20 14:12:28 2018 -0800 net/mlx5: Improve core device events handling Register a separate handler per event type, rather than listening for all events and looking for the events to handle in a switch case. Signed-off-by: Saeed Mahameed commit 69c1280b1f3b9123bc5154b2062507abcc14c3ef Author: Saeed Mahameed Date: Tue Nov 20 14:12:27 2018 -0800 net/mlx5: Device events, Use async events chain Move all the generic async events handling into new specific events handling file events.c to keep eq.c file clean from concrete event logic handling. Use new API to register for NOTIFY_ANY to handle generic events and dispatch allowed events to mlx5_core consumers (mlx5_ib and mlx5e) Signed-off-by: Saeed Mahameed commit 2742bc90bc102644d67e17758e234646d91ae696 Author: Saeed Mahameed Date: Tue Nov 20 14:12:26 2018 -0800 net/mlx5: CQ ERR, Use async events chain Remove the explicit call to mlx5_eq_cq_event on MLX5_EVENT_TYPE_CQ_ERROR and register a specific CQ ERROR handler via the new API. Signed-off-by: Saeed Mahameed commit 221c14f3d12489ced0f2ca8b31b2221c5dbbf145 Author: Saeed Mahameed Date: Tue Nov 20 14:12:25 2018 -0800 net/mlx5: Resource tables, Use async events chain Remove the explicit call to QP/SRQ resources events handlers on several FW events and let resources logic register resources events notifiers via the new API. Signed-off-by: Saeed Mahameed commit 71edc69ca1a78ce18411a540c550a4ef1eb017cd Author: Saeed Mahameed Date: Tue Nov 20 14:12:24 2018 -0800 net/mlx5: CmdIF, Use async events chain Remove the explicit call to mlx5_cmd_comp_handler on MLX5_EVENT_TYPE_CMD and let command interface to register its own handler when its ready. Signed-off-by: Saeed Mahameed commit 0cf53c1247565b339a23d82a1853a0c41e9a2a34 Author: Saeed Mahameed Date: Tue Nov 20 14:12:23 2018 -0800 net/mlx5: FWPage, Use async events chain Remove the explicit call to mlx5_core_req_pages_handler on MLX5_EVENT_TYPE_PAGE_REQUEST and let FW page logic to register its own handler when its ready. Signed-off-by: Saeed Mahameed commit 6933a93795590b51a3056b6d66562ca1da1557ae Author: Saeed Mahameed Date: Tue Nov 20 14:12:22 2018 -0800 net/mlx5: E-Switch, Use async events chain Remove the explicit call to mlx5_eswitch_vport_event on MLX5_EVENT_TYPE_NIC_VPORT_CHANGE and let the eswitch register its own handler when its ready. Signed-off-by: Saeed Mahameed commit 41069256e93045a45a2c359c9715439be0b47bf4 Author: Saeed Mahameed Date: Tue Nov 20 14:12:21 2018 -0800 net/mlx5: Clock, Use async events chain Remove the explicit call to mlx5_pps_event on MLX5_EVENT_TYPE_PPS_EVENT and let clock logic to register its own handler when its ready. Signed-off-by: Saeed Mahameed commit a52a7d01fde117bc6d57602e2e7e947037c865b0 Author: Saeed Mahameed Date: Tue Nov 20 14:12:20 2018 -0800 net/mlx5: FPGA, Use async events chain Remove the explicit call to mlx5_fpga_event on MLX5_EVENT_TYPE_FPGA_ERROR or MLX5_EVENT_TYPE_FPGA_QP_ERROR let fpga core to register its own handler when its ready. Signed-off-by: Saeed Mahameed commit 720a936d407709dcbcf714293112667677d8c967 Author: Saeed Mahameed Date: Tue Nov 20 14:12:19 2018 -0800 net/mlx5: FWTrace, Use async events chain Remove the explicit call to mlx5_fw_tracer_event on MLX5_EVENT_TYPE_DEVICE_TRACER and let fw tracer to register its own handler when its ready. Signed-off-by: Saeed Mahameed commit 0f597ed435b9ea1296e25474b762bedceba97a50 Author: Saeed Mahameed Date: Tue Nov 20 14:12:18 2018 -0800 net/mlx5: EQ, Introduce atomic notifier chain subscription API Use atomic_notifier_chain to fire firmware events at internal mlx5 core components such as eswitch/fpga/clock/FW tracer/etc.., this is to avoid explicit calls from low level mlx5_core to upper components and to simplify the mlx5_core API for future developments. Simply provide register/unregister notifiers API and call the notifier chain on firmware async events. Example: to subscribe to a FW event: struct mlx5_nb port_event; MLX5_NB_INIT(&port_event, port_event_handler, PORT_CHANGE); mlx5_eq_notifier_register(mdev, &port_event); where: - port_event_handler is the notifier block callback. - PORT_EVENT is the suffix of MLX5_EVENT_TYPE_PORT_CHANGE. The above will guarantee that port_event_handler will receive all FW events of the type MLX5_EVENT_TYPE_PORT_CHANGE. To receive all FW/HW events one can subscribe to MLX5_EVENT_TYPE_NOTIFY_ANY. The next few patches will start moving all mlx5 core components to use this new API and cleanup mlx5_eq_async_int misx handler from component explicit calls and specific logic. Signed-off-by: Saeed Mahameed commit 4afe60a97ba6ffacc4d030b13653dc64099fea26 Merge: 4bffc669d6248 ffac28f95a98a Author: David S. Miller Date: Mon Nov 26 13:08:17 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2018-11-26 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Extend BTF to support function call types and improve the BPF symbol handling with this info for kallsyms and bpftool program dump to make debugging easier, from Martin and Yonghong. 2) Optimize LPM lookups by making longest_prefix_match() handle multiple bytes at a time, from Eric. 3) Adds support for loading and attaching flow dissector BPF progs from bpftool, from Stanislav. 4) Extend the sk_lookup() helper to be supported from XDP, from Nitin. 5) Enable verifier to support narrow context loads with offset > 0 to adapt to LLVM code generation (currently only offset of 0 was supported). Add test cases as well, from Andrey. 6) Simplify passing device functions for offloaded BPF progs by adding callbacks to bpf_prog_offload_ops instead of ndo_bpf. Also convert nfp and netdevsim to make use of them, from Quentin. 7) Add support for sock_ops based BPF programs to send events to the perf ring-buffer through perf_event_output helper, from Sowmini and Daniel. 8) Add read / write support for skb->tstamp from tc BPF and cg BPF programs to allow for supporting rate-limiting in EDT qdiscs like fq from BPF side, from Vlad. 9) Extend libbpf API to support map in map types and add test cases for it as well to BPF kselftests, from Nikita. 10) Account the maximum packet offset accessed by a BPF program in the verifier and use it for optimizing nfp JIT, from Jiong. 11) Fix error handling regarding kprobe_events in BPF sample loader, from Daniel T. 12) Add support for queue and stack map type in bpftool, from David. ==================== Signed-off-by: David S. Miller commit 3198ec5dfc7207b7977c8258f7d07fe423d7dfcd Author: Colin Ian King Date: Mon Nov 26 15:02:28 2018 +0000 drm/amdgpu: fix spelling mistake "Pramater" -> "Parameter" There is a spelling mistake in the module description text and a comment too, fix them. Also line break overly long comment. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 77f6916aee7a66c8153b54c52c01453b71906d2d Author: Brajeswar Ghosh Date: Thu Nov 22 19:31:26 2018 +0530 drm/amd/display: Remove duplicate header Remove dce/dce_mem_input.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit b8b3ede2debeffcd37849a231920f9198b0cabc7 Author: Brajeswar Ghosh Date: Thu Nov 22 19:37:14 2018 +0530 drm/amd/amdkfd: Remove duplicate header Remove gca/gfx_8_0_enum.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit e55b8616cc5f3f600c07d6d273b2d9469632e2cc Author: Brajeswar Ghosh Date: Fri Nov 23 08:48:31 2018 +0530 drm/amd/amdgpu: Remove duplicate header Remove drm/drm_fb_helper.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit 206bbafe00dcacccf40e6f09e624329ec124201b Author: David Francis Date: Mon Nov 26 11:44:06 2018 -0500 drm/amd: Query and use ACPI backlight caps ACPI ATIF has a function called query backlight transfer characteristics. Among the information returned by this function is the minimum and maximum input signals for the backlight Call that function on ACPI init. When DM backlight device is updated, copy over the backlight caps into DM, but only once. Use the backlight caps in the backlight-to-dc calculation Signed-off-by: David Francis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 7349a3afaaea4600be86b2663a3b9e775f9590eb Author: David Francis Date: Mon Nov 26 13:14:14 2018 -0500 drm/amd: update ATIF functions in AMD ACPI header The ACPI interface in AMD was a few years out of date and contained some unused and deprecated functions Remove functions: Select Active Displays, Get Lid State, Get TV Standard, Set TV Standard, Get Panel Expansion Mode, Set Panel Expansion Mode, Get Graphics Device Types Add functions: Query Backlight Transfer Characteristics, Ready To Undock Notification Changed functions: Get System Parameters, Get System BIOS Requests All changes are right from the standard ATI ACPI Control Methods V0.44 Signed-off-by: David Francis Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1ee92f94ce3b9aa72524f861dea67882d02ad34 Author: David Francis Date: Mon Nov 26 15:51:09 2018 -0500 drm/amd: Add abm level drm property Adaptive Backlight Management (ABM) is a feature that reduces backlight level to save power, while increasing pixel contrast and pixel luminance to maintain readability and image quality. ABM will adjust in response to the pixel luminance of the displayed content. ABM is made available as a drm property on eDP monitors called "abm level", which ranges from 0 to 4. When this property is set to 0, ABM is off. Levels 1 to 4 represent different ranges of backlight reduction. At higher levels both the backlight reduction and pixel adjustment will be greater. ABM requires DMCU firmware, which is currently available for Raven ASICs only. If the feature does not work, please ensure your firmware is up to date. v2: Fix commit message, only attach property if DMCU loaded v3: Store ABM level in crtc state to accommodate dc v4: Fix ABM saving on dpms cycle Signed-off-by: David Francis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit bbf854dc3570eb0a2b9d851f21e363e1570c717e Author: David Francis Date: Mon Nov 26 11:38:33 2018 -0500 drm/amd/display: Load DMCU IRAM DMCU IRAM must be loaded by the driver before DMCU can function. Move the IRAM code out of the shadows and into a new file modules/power/power_helpers.c The IRAM table contains the backlight curve and ABM parameters Add this new file to the Makefiles Call dmcu_load_iram in late init of DM Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 51f1f6f51712aade68cabb145ed8bab4a6c3997e Author: Rex Zhu Date: Fri Nov 23 18:52:21 2018 +0800 drm/amdgpu: Fix static checker warning drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:49 amdgpu_allocate_static_csa() error: uninitialized symbol 'ptr'. the test if (!bo) doesn't work, as the bo is a pointer to a pointer. if bo create failed, the *bo will be set to NULL. so change to test *bo. Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 8ca606de76a212b8c2b8212f82a13f8201cc3117 Author: Guttula, Suresh Date: Fri Nov 16 06:50:37 2018 +0000 drm/amd:Enable/Disable NBPSTATE on On/OFF of UVD We observe black lines (underflow) on display when playing a 4K video with UVD. On Disabling Low memory P state this issue is not seen. In this patch ,disabling low memory P state only when video size >= 4k. Multiple runs of power measurement shows no impact Signed-off-by: suresh guttula Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e5bbf0e9ef0d1875050201eeb0239b040f09ed5b Author: Guttula, Suresh Date: Fri Nov 16 06:50:32 2018 +0000 drm/amd/powerplay:add hwmgr callback to update nbpstate on Carrizo Add hwmgr callback "update_nbdpm_pstate".This will use to access "cz_nbdpm_pstate_enable_disable" function to enable/disable low memory pstate. Signed-off-by: suresh guttula Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 00fedbe629bfc0a51c07b6e665265ce31d8b6f3c Author: Shirish S Date: Fri Nov 16 06:50:28 2018 +0000 Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD" This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8. Reason for revert: This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers. This msg should ideally be sent only when the UVD is about to decode a 4k video. Signed-off-by: Shirish S Signed-off-by: suresh guttula Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b333730d126efcc8f2fad60df3c9b3971ff59833 Author: Bhawanpreet Lakha Date: Fri Nov 16 11:46:14 2018 -0500 drm/amd/display: Fix Scaling (RMX_*) for DC driver Before: We use drm_match_cea_mode() to get the vic for any mode we want to set, most of the time vic will be different for the new mode. DC uses memcmp to check if timing changed, in this case DC will say timing changed and we endup doing a full modeset. Current: Now we check if !RMX_OFF and old_refresh == new_refresh if so we copy the vic from old timing. In a case where we are currently on a lower timing and want to change to higher mode, stream->dst will be different and cause us to do a full modeset, which is what we want. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 91b66c47ba3468f7882ea4a84d5e0e0c186b638f Author: Bhawanpreet Lakha Date: Fri Nov 16 11:36:21 2018 -0500 drm/amd/display: Set RMX_ASPECT as default Setting this allows for display scaling by default Signed-off-by: Bhawanpreet Lakha Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 8478c35a858c75bf2b00917009ba1b46c1b9b7b4 Author: Cristian Sicilia Date: Sun Nov 25 17:58:15 2018 +0100 staging: greybus: Parenthesis alignment Some parameters are aligned with parentheses. Some parentheses was opened at end of line. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit 2f5496d878c6616235ab14e88ea056b9671514e6 Author: Sergio Paracuellos Date: Sat Nov 24 18:54:55 2018 +0100 staging: mt7621-pci: avoid using clk_* operations There is no clock driver for ralink mips and clk_enable are no-ops for this architecture. This has been also tested without using clocks and seems to work so avoid to use them in this driver. Fixes: ad9c87e129d1: "staging: mt7621-pci: parse and init port data from device tree" Reported-by: NeilBrown Signed-off-by: Sergio Paracuellos Tested-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit e51844bf825169024e0c743a92cf264e27f2366f Author: Sergio Paracuellos Date: Sat Nov 24 18:54:54 2018 +0100 staging: mt7621-pci: fix reset lines for each pcie port Depending of chip revision reset lines are inverted. It is also necessary to read PCIE_FTS_NUM register before enabling the phy. Hence update the code to achieve this. Fixes: 745eeeac68d7 ("staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function") Reported-by: NeilBrown Signed-off-by: Sergio Paracuellos Tested-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit fe62afd7eb0b54d676b5e4ae1a5b93cef704b78a Author: Sergio Paracuellos Date: Sat Nov 24 18:54:53 2018 +0100 staging: mt7621-pci: dt-bindings: update bindings doc removing sysctls registers The sysctl register are already claimed by palmbus, so pci fails to claim it. Device tree has been updated to not use it at all with pcie. Update bindings documentation. Signed-off-by: Sergio Paracuellos Tested-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 65f679a826c0bc427ddff55e7aebc13bb3a42ede Author: Sergio Paracuellos Date: Sat Nov 24 18:54:52 2018 +0100 staging: mt7621-dts: remove sysctl registers from pcie bindings The sysctl register are already claimed by palmbus, so pci fails to claim it. Remove registers accordly from DT bindings. Fixes: 624c5227ed0a: staging: mt7621-dts: add sysctl registers base address to pcie Reported-by: NeilBrown Signed-off-by: Sergio Paracuellos Tested-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit ce0c99e22e458ac5ef7bdb14c143894146c8f4f8 Author: Sergio Paracuellos Date: Sat Nov 24 18:54:51 2018 +0100 staging: mt7621-pci: avoid mapping sysctls registers The sysctl register are already claimed by palmbus, so pci fails to claim it. The best way to access the sysc registers is to use rt_sysc_[rwm]32(). Fixes: 89e9f6e6adfc: staging: mt7621-pci: remap and use sysctl from device tree Reported-by: NeilBrown Signed-off-by: Sergio Paracuellos Tested-by: NeilBrown Signed-off-by: Greg Kroah-Hartman commit 64c4c4ca6c129a4191e8e1e91b2d5d9b8d08c518 Author: Michael Straube Date: Sun Nov 25 10:22:25 2018 +0100 staging: pi433: fix potential null dereference Add a test for successful call to cdev_alloc() to avoid potential null dereference. Issue reported by smatch. Signed-off-by: Michael Straube Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Greg Kroah-Hartman commit 2a68ead3de431924d22997f121ae30aa0f99f356 Author: Wen Yang Date: Sat Nov 24 11:22:19 2018 +0000 staging: rtl8723bs: remove redundant null check on pregpriv The null check on &padapter->registrypriv is redundant since registrypriv is a struct inside padapter and can never be null, so the check is always true. we may remove it. Signed-off-by: Wen Yang CC: devel@driverdev.osuosl.org CC: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman commit 3253374714cecd5df3d3c93b5523352b784b3551 Author: Michael Straube Date: Fri Nov 23 21:41:06 2018 +0100 staging: rtl8188eu: cleanup lines over 80 characters Cleanup lines over 80 characters by replacing tabs with spaces or adding appropriate line breaks. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit a08a9a6517522c62c1c7efaf413d51952e341cf6 Author: Michael Straube Date: Fri Nov 23 21:41:05 2018 +0100 staging: rtl8188eu: correct indentation Correct indentation to clear a checkpatch warning. WARNING: suspect code indent for conditional statements (8, 24) Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 5e51ed1a90ada554b0b14334e5aee6ee386daed4 Author: Michael Straube Date: Fri Nov 23 21:41:04 2018 +0100 staging: rtl8188eu: remove return from void function Remove return from a void function to clear a checkpatch warning. WARNING: void function return statements are not generally useful Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c202e1ab78e398a7729f633f4524bdfe4b4a774e Author: Michael Straube Date: Fri Nov 23 21:41:03 2018 +0100 staging: rtl8188eu: refactor if else statement Refactor if else statement to clear checkpatch warnings. WARNING: else is not generally useful after a break or return WARNING: line over 80 characters Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 794f81656692acfda5639bef9afe117969aa6fd1 Author: Michael Straube Date: Fri Nov 23 21:41:02 2018 +0100 staging: rtl8188eu: cleanup declarations in rtw_mlme.c Replace tabs with spaces, remove spaces, remove blank lines and break lines appropriatly in declarations. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 2077ca1cd4592c845536f48c01df5e4a63c82074 Author: Michael Straube Date: Fri Nov 23 21:41:01 2018 +0100 staging: rtl8188eu: remove rtw_android_set_block() The function rtw_android_set_block() just returns zero. The only user is the function rtw_android_priv_cmd(). The variable bytes_written is initialized to zero and not changed before the use of rtw_android_set_block(). Remove rtw_android_set_block() and it's only use. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 1d9416d6d55710a6d33d15ba6c68df3b71e63bac Author: Michael Straube Date: Fri Nov 23 21:41:00 2018 +0100 staging: rtl8188eu: use __func__ in rtw_mlme.c Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 18bd05bb9c0e500b363491147964cbfb3807d9e2 Author: Michael Straube Date: Fri Nov 23 21:40:59 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3f95106ea07562f4e9cf4d6798e09b821d55210b Author: Michael Straube Date: Fri Nov 23 21:40:58 2018 +0100 staging: rtl8188eu: cleanup remaining comparsions to true Cleanup remaining comparsions to true. if (x == true) -> if (x) if (x != true) -> if (!x) if (!x == true) -> if (!x) Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d39c02a65810611f0bc686febea4c6c7dd7e143a Author: Xavier Deguillard Date: Wed Nov 14 12:02:50 2018 -0800 vmw_balloon: update maintainers list Julien will be replacing me as the vmw_balloon maintainer. Cc: Julien Freche Signed-off-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman commit 488d040e3a3452a0dceef5d3ec4f61942262f57f Author: Moritz Fischer Date: Mon Nov 12 13:38:33 2018 -0600 fpga: of-fpga-region: Use platform_set_drvdata Use platform_set_drvdata rather than dev_set_drvdata to match the platform_get_drvdata in the _remove() function of the platform driver. Signed-off-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit b77c98780e682fe780d899b91543769d4cf94585 Author: Moritz Fischer Date: Mon Nov 12 13:38:34 2018 -0600 fpga: dfl-fme-region: Use platform_get_drvdata() Use platform_get_drvdata() in remove() function of the platform driver rather than dev_get_drvdata() to match the platform_set_drvdata in the probe(). Signed-off-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 4d3c5c69191f98c7f7e699ff08d2fd96d7070ddb Author: Dexuan Cui Date: Mon Nov 26 02:17:56 2018 +0000 Drivers: hv: vmbus: Remove the useless API vmbus_get_outgoing_channel() Commit d86adf482b84 ("scsi: storvsc: Enable multi-queue support") removed the usage of the API in Jan 2017, and the API is not used since then. netvsc and storvsc have their own algorithms to determine the outgoing channel, so this API is useless. And the API is potentially unsafe, because it reads primary->num_sc without any lock held. This can be risky considering the RESCIND-OFFER message. Let's remove the API. Cc: Long Li Cc: Stephen Hemminger Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 6b50d882d38d5a1e4c0c476712384067c19c744b Author: Richard Gong Date: Tue Nov 13 12:14:06 2018 -0600 firmware: add remote status update client support Extend Intel Stratix10 service layer to support the second service layer client, Remote Status Update (RSU). RSU is used to provide our customers with protection against loading bad bitstreams onto their devices when those devices are booting from flash. Signed-off-by: Richard Gong Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 0d5c06aa0ee8ba36e9c4a3ae7a3a3377c105b412 Author: Richard Gong Date: Tue Nov 13 12:14:05 2018 -0600 Documentation: driver-api: add stratix10 service layer Add Intel Stratix10 service layer driver document Signed-off-by: Richard Gong Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit e7eef1d7633a875977705d203e6f651893582374 Author: Alan Tull Date: Tue Nov 13 12:14:04 2018 -0600 fpga: add intel stratix10 soc fpga manager driver Add driver for reconfiguring Intel Stratix10 SoC FPGA devices. This driver communicates through the Intel service layer driver which does communication with privileged hardware (that does the FPGA programming) through a secure mailbox. Signed-off-by: Alan Tull Signed-off-by: Richard Gong Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 919d1100370c0bcfa05570113751cd5366822318 Author: Alan Tull Date: Tue Nov 13 12:14:03 2018 -0600 arm64: dts: stratix10: add fpga manager and region Add the Stratix10 FPGA manager and a FPGA region to the device tree. Signed-off-by: Alan Tull Signed-off-by: Richard Gong Signed-off-by: Greg Kroah-Hartman commit 59e328039f47356c63c43c8617aba29a3afcc109 Author: Alan Tull Date: Tue Nov 13 12:14:02 2018 -0600 dt-bindings: fpga: add Stratix10 SoC FPGA manager binding Add a Device Tree binding for the Intel Stratix10 SoC FPGA manager. Signed-off-by: Alan Tull Signed-off-by: Richard Gong Reviewed-by: Rob Herring Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 7ca5ce896524f5292e610b27d168269e5ab74951 Author: Richard Gong Date: Tue Nov 13 12:14:01 2018 -0600 firmware: add Intel Stratix10 service layer driver Some features of the Intel Stratix10 SoC require a level of privilege higher than the kernel is granted. Such secure features include FPGA programming. In terms of the ARMv8 architecture, the kernel runs at Exception Level 1 (EL1), access to the features requires Exception Level 3 (EL3). The Intel Stratix10 SoC service layer provides an in kernel API for drivers to request access to the secure features. The requests are queued and processed one by one. ARM’s SMCCC is used to pass the execution of the requests on to a secure monitor (EL3). The header file stratix10-sve-client.h defines the interface between service providers (FPGA manager is one of them) and service layer. The header file stratix10-smc.h defines the secure monitor call (SMC) message protocols used for service layer driver in normal world (EL1) to communicate with secure monitor SW in secure monitor exception level 3 (EL3). Signed-off-by: Richard Gong Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit adb9e3543d229484f5e7e5136b3f27e85b8a1675 Author: Richard Gong Date: Tue Nov 13 12:14:00 2018 -0600 arm64: dts: stratix10: add stratix10 service driver binding to base dtsi Add Intel Stratix10 service layer to the device tree Signed-off-by: Richard Gong Signed-off-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit a2c1c192656b701939b9028646b8a8bb90edd911 Author: Richard Gong Date: Tue Nov 13 12:13:59 2018 -0600 dt-bindings, firmware: add Intel Stratix10 service layer binding Add a device tree binding for the Intel Stratix10 service layer driver Signed-off-by: Richard Gong Signed-off-by: Alan Tull Reviewed-by: Rob Herring Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 1a195d87d2c58aa9524af9531539ccfa203cd52c Author: Anatolij Gustschin Date: Mon Nov 26 11:35:28 2018 -0600 fpga: mgr: altera-ps-spi: enable usage on non-dt platforms Driver probing fails on non-dt platforms since of_match_device() always returns NULL here. Add spi ids with device names and matching driver data as an index of a map array with data for supported devices. Add this map array and a function for mapping spi ids to driver data. This allows driver binding to dynamically added PS-SPI devices (e.g. when added via spi_new_device() after hot-plugging). Signed-off-by: Anatolij Gustschin Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 30522a951f9d02f261d0697c35cb42205b1fae17 Author: Anatolij Gustschin Date: Mon Nov 26 11:35:27 2018 -0600 fpga: altera-cvp: fix probing for multiple FPGAs on the bus Currently registering CvP managers works only for first probed CvP device, for all other devices it is refused due to duplicated chkcfg sysfs entry: fpga_manager fpga3: Altera CvP FPGA Manager @0000:0c:00.0 registered sysfs: cannot create duplicate filename '/bus/pci/drivers/altera-cvp/chkcfg' CPU: 0 PID: 3808 Comm: bash Tainted: G O 4.19.0-custom+ #5 Call Trace: dump_stack+0x46/0x5b sysfs_warn_dup+0x53/0x60 sysfs_add_file_mode_ns+0x16d/0x180 sysfs_create_file_ns+0x51/0x60 altera_cvp_probe+0x16f/0x2a0 [altera_cvp] local_pci_probe+0x3f/0xa0 ? pci_match_device+0xb1/0xf0 pci_device_probe+0x116/0x170 really_probe+0x21b/0x2c0 driver_probe_device+0x4b/0xe0 bind_store+0xcb/0x130 kernfs_fop_write+0xfd/0x180 __vfs_write+0x21/0x150 ? selinux_file_permission+0xdc/0x130 vfs_write+0xa8/0x1a0 ? find_vma+0xd/0x60 ksys_write+0x3d/0x90 do_syscall_64+0x44/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... altera-cvp 0000:0c:00.0: Can't create sysfs chkcfg file fpga_manager fpga3: fpga_mgr_unregister Altera CvP FPGA Manager @0000:0c:00.0 Move chkcfg creation to module init as suggested by Alan. Signed-off-by: Anatolij Gustschin Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 324fa64cf4189094bc4df744a9e7214a1b81d845 Author: Todd Kjos Date: Tue Nov 6 15:56:31 2018 -0800 binder: fix sparse warnings on locking context Add __acquire()/__release() annnotations to fix warnings in sparse context checking There is one case where the warning was due to a lack of a "default:" case in a switch statement where a lock was being released in each of the cases, so the default case was added. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 5f0ed774ed2914decfd397569fface997532e94d Author: Jens Axboe Date: Fri Nov 23 22:04:33 2018 -0700 block: sum requests in the plug structure This isn't exactly the same as the previous count, as it includes requests for all devices. But that really doesn't matter, if we have more than the threshold (16) queued up, flush it. It's not worth it to have an expensive list loop for this. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit af78ff7c6e66832afcdf5418f67b11c409f9e7a1 Author: Keith Busch Date: Mon Nov 26 09:54:30 2018 -0700 blk-mq: Simplify request completion state There are no more users relying on blk-mq request states to prevent double completions, so replace the relatively expensive cmpxchg operation with WRITE_ONCE. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit f1342709d18af97b0e71449d5696b8873d1a456c Author: Keith Busch Date: Mon Nov 26 09:54:29 2018 -0700 scsi: Do not rely on blk-mq for double completions The scsi timeout error handling had been directly updating the block layer's request state to prevent a error handling and a natural completion from completing the same request twice. Fix this layering violation by having scsi control the fate of its commands with scsi owned flags rather than use blk-mq's. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 16c15eb16a793f2d81ae52f41f43fb6831b34212 Author: Keith Busch Date: Mon Nov 26 09:54:28 2018 -0700 blk-mq: Return true if request was completed A driver may have internal state to cleanup if we're pretending a request didn't complete. Return 'false' if the command wasn't actually completed due to the timeout error injection, and true otherwise. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit f8c6d1402b89f22a3647705d63cbd171aa19a77e Author: Alexey Dobriyan Date: Fri Nov 23 23:07:14 2018 +0300 ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion() acpi_find_child_device() accepts boolean not pointer as last argument. Signed-off-by: Alexey Dobriyan [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki commit b413b1abeb21b4a152c0bf8d1379efa30759b6e3 Author: Andy Shevchenko Date: Wed Nov 21 15:43:37 2018 +0200 ACPI: SPCR: Consider baud rate 0 as preconfigured state Since SPCR 1.04 [1] the baud rate of 0 means a preconfigured state of UART. Assume firmware or bootloader configures console correctly. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table Signed-off-by: Andy Shevchenko Reviewed-by: Prarit Bhargava Signed-off-by: Rafael J. Wysocki commit caf35cd52242a0a184e0530f9814ab50759fa772 Author: Heikki Krogerus Date: Fri Nov 9 17:21:38 2018 +0300 device property: Remove struct property_set Replacing struct property_set with the software nodes that were just introduced. The API and functionality for adding properties to devices remains the same, however, the goal is to convert the drivers to use the API for software nodes when the device has no real firmware node, and use the old API only when "extra" build-in properties are needed. Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit ed1cdf31f92219458af484d4c306afbf2c611b04 Author: Heikki Krogerus Date: Fri Nov 9 17:21:37 2018 +0300 device property: Move device_add_properties() to swnode.c Concentrating struct property_entry processing to drivers/base/swnode.c Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 59abd83672f70cac4b6bf9b237506c5bc6837606 Author: Heikki Krogerus Date: Fri Nov 9 17:21:36 2018 +0300 drivers: base: Introducing software nodes to the firmware node framework Software node is a new struct fwnode_handle type that can be used to describe devices in kernel (software). It is meant to complement fwnodes representing real firmware nodes when they are incomplete (for example missing device properties) and to supply the primary fwnode when the firmware lacks hardware description for a device completely. The software node type is really meant to replace the currently used "property_set" struct fwnode_handle type. The handling of struct property_set is glued to the generic device property handling code, and it is not possible to create a struct property_set independently from the device that it is bind to. struct property_set is only created when device properties are added to already initialized struct device, and control of it is only possible from the generic property handling code. Software nodes are instead designed to be created independently from the device entries (struct device). It makes them much more flexible, as then the device meant to be bind to the node can be created at a later time, and from another location. It is also possible to bind multiple devices to a single software node if needed. The software node implementation also includes support for node hierarchy, which was the main motivation for this commit. The node hierarchy was something that was requested for the struct property_set, but it did not seem reasonable to try to extend the property_set support for that purpose. struct property_set was really meant only for device property handling like the name suggests. Support for struct property_set is not yet removed in this commit, but it will be in the following one. Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 7847a1455fc4574d53e349d60feb1e1106cdc012 Author: Heikki Krogerus Date: Fri Nov 9 17:21:35 2018 +0300 ACPI / glue: Add acpi_platform_notify() function Instead of relying on the "platform_notify" callback hook, introducing separate notification function acpi_platform_notify() and calling that directly from drivers core when device entries are added and removed. Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 07de0e86fe081cd74f5b397af86172d156280d3e Author: Heikki Krogerus Date: Fri Nov 9 17:21:34 2018 +0300 drivers core: Prepare support for multiple platform notifications Since it should be possible to support several hardware description models at the same time (at least in theory), for example ACPI and devicetree on a running system, the platform notifications need to be handled differently. For now a single "platform_notify" callback function was used to notify the underlying base system which is in charge of the hardware description when a new device entry was added to the system, but that callback is available to only a single base system at the time. This will add a function device_platform_notify() and replace all direct platform_notify() calls with it. device_platform_notify() will first simply call the platform_notify() callback, so this commit has no functional affect, however, the idea is that individual base systems will put their direct notification calls there instead of using the platform_notify function pointer. Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 2d51ac9086fd4852c1e43d615bd8dd99f2a616eb Author: Heikki Krogerus Date: Fri Nov 9 17:21:33 2018 +0300 driver core: platform: Remove duplicated device_remove_properties() call device_remove_properties() is called for every device in device_del(). Signed-off-by: Heikki Krogerus Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit fa94e48e13a1aaf814b9e956d8e5a52ef303b569 Author: Douglas Anderson Date: Mon Nov 26 09:08:27 2018 -0800 regulator: core: Apply system load even if no consumer loads Prior to commit 5451781dadf8 ("regulator: core: Only count load for enabled consumers") we used to always add up the total load on every enable in _regulator_enable(). After that commit we only updated the total load when enabling / disabling a regulator where a consumer specified a load or when changing the consumer load on an enabled regulator. The problem with the new scheme is that if there is a system load specified for a regulator but no consumers specify a load then we never account for it. Let's account for the system load in set_machine_constraints(). NOTE: with the new scheme we end up with a bit of a quandry. What if someone specifies _both_ an initial mode and a system load? If we take the system load into account right at init time then it will effectively clobber the initial mode. We'll resolve this by saying that if both are specified then the initial mode will win. The system load will then only take effect if/when a consumer specifies a load. If no consumers ever specify a load then the initial mode will persist and the system load will have no effect. Fixes: 5451781dadf8 ("regulator: core: Only count load for enabled consumers") Reported-by: Brian Masney Signed-off-by: Douglas Anderson Tested-by: Brian Masney Signed-off-by: Mark Brown commit 3403e56b41c176f6531a2a6d77d85b46fa34169c Author: Alex Van Brunt Date: Mon Oct 29 14:55:58 2018 +0530 arm64: mm: Don't wait for completion of TLB invalidation when page aging When transitioning a PTE from young to old as part of page aging, we can avoid waiting for the TLB invalidation to complete and therefore drop the subsequent DSB instruction. Whilst this opens up a race with page reclaim, where a PTE in active use via a stale, young TLB entry does not update the underlying descriptor, the worst thing that happens is that the page is reclaimed and then immediately faulted back in. Given that we have a DSB in our context-switch path, the window for a spurious reclaim is fairly limited and eliding the barrier claims to boost NVMe/SSD accesses by over 10% on some platforms. A similar optimisation was made for x86 in commit b13b1d2d8692 ("x86/mm: In the PTE swapout page reclaim case clear the accessed bit instead of flushing the TLB"). Signed-off-by: Alex Van Brunt Signed-off-by: Ashish Mhetre [will: rewrote patch] Signed-off-by: Will Deacon commit 2bb1666369339f69f227ad060c250afde94d5c69 Author: Olliver Schinagl Date: Mon Nov 26 17:27:44 2018 +0200 regulator: core: enable power when setting up constraints When a regulator is marked as always on, it is enabled early on, when checking and setting up constraints. It makes the assumption that the bootloader properly initialized the regulator, and just in case enables the regulator anyway. Some constraints however currently get missed, such as the soft-start and ramp-delay. This causes the regulator to be enabled, without the soft-start and ramp-delay being applied, which in turn can cause high-currents or other start-up problems. By moving the always-enabled constraints later in the constraints check, we can at least ensure all constraints for the regulator are followed. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes Signed-off-by: Mark Brown commit 1dbfe7f23bdb7238c72d8efcffcd75280ff71d20 Author: Alexander Usyskin Date: Thu Nov 22 13:11:42 2018 +0200 mei: me: mark CNP devices as having dma support Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit d2227583dc711443a6fa7971ea02812ebc1490f5 Author: Alexander Usyskin Date: Thu Nov 22 13:11:41 2018 +0200 mei: bump hbm version to 2.1 Bump HBM version to 2.1 to indicate DMA transfer support. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit c30362cc326ac5c3d4e6c96aa8f68dbd86955489 Author: Tomas Winkler Date: Thu Nov 22 13:11:40 2018 +0200 mei: dma ring: implement transmit flow Implement a circular buffer on allocated system memory. Read and write indices are stored on the control block which is also shared between the device and the host. Two new functions are exported from the DMA module: mei_dma_ring_write, and mei_dma_ring_empty_slots. The former simply copy a packet on the TX DMA circular buffer and later, returns the number of empty slots on the TX DMA circular buffer. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman commit 6316321f12ad30cf5af176f26bb39897b320ef46 Author: Tomas Winkler Date: Thu Nov 22 13:11:39 2018 +0200 mei: dma ring: implement rx circular buffer logic Implement circular buffer protocol over receive dma buffer. Add extension to the mei message header that holds length of the buffer on the dma buffer. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman commit 2513eb0dd7ba8a8766b9642075c19ac5f2d5463b Author: Tomas Winkler Date: Thu Nov 22 13:11:38 2018 +0200 mei: hw: add dma ring control block The DMA ring control block contains write and read indices for host and device circular buffers. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman commit c55bf542e91b5c9156d57fd0461aa257b7d20858 Author: Tomas Winkler Date: Thu Nov 22 13:11:37 2018 +0200 mei: hbm: setup dma ring DMA ring is allocated upon HBM handshake and the ring parameters are set via dedicated HBM_DMA_SETUP request command. The firmware will perform its setup and respond with a status. On failure the DMA buffers are released. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman commit ce0925e8c2f85f6bbf5d24b56621336cceaf743d Author: Tomas Winkler Date: Thu Nov 22 13:11:36 2018 +0200 mei: dma ring buffers allocation Allocate DMA ring buffers from managed coherent memory. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman commit 77df6d8d7298fd3fae12a646fd368fdcdb86152c Author: Thiébaud Weksteen Date: Mon Nov 26 15:49:26 2018 +0100 Documentation/usb: Fix typo Fix small typo authroized -> authorized in the authorization page. Signed-off-by: Thiébaud Weksteen Signed-off-by: Greg Kroah-Hartman commit aec2c81291b85939d9e885fb1f5e3368a77a1a93 Author: Viresh Kumar Date: Fri Nov 16 15:31:15 2018 +0530 ARM: dts: uniphier: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Masahiro Yamada commit 1c36155a802b6192f3ad532da76a12ad7e2b8158 Author: Masahiro Yamada Date: Fri Oct 19 19:30:18 2018 +0900 dt-bindings: uniphier: move cache-uniphier.txt to vendor directory Now, the Socionext vendor directory is available at Documentation/devicetree/bindings/arm/socionext/ Move cache-uniphier.txt over to it. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring commit 4b5d90f408f82549b5d02f95e5892a5e1545c4b4 Author: Masahiro Yamada Date: Fri Oct 19 19:30:17 2018 +0900 dt-bindings: uniphier: add bindings for UniPhier SoC family Document the list of SoCs and boards of UniPhier platform. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring commit 4ab32bf3305eedb4d31f85cac68a67becab10494 Author: Jens Axboe Date: Sun Nov 18 16:15:35 2018 -0700 blk-mq: never redirect polled IO completions It's pointless to do so, we are by definition on the CPU we want/need to be, as that's the one waiting for a completion event. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit aa61bec30eca11816789dc25c2090366b0ccfaf8 Author: Jens Axboe Date: Tue Nov 13 21:32:10 2018 -0700 blk-mq: ensure mq_ops ->poll() is entered at least once Right now we immediately bail if need_resched() is true, but we need to do at least one loop in case we have entries waiting. So just invert the need_resched() check, putting it at the bottom of the loop. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0a1b8b87d064a47fad9ec475316002da28559207 Author: Jens Axboe Date: Mon Nov 26 08:24:43 2018 -0700 block: make blk_poll() take a parameter on whether to spin or not blk_poll() has always kept spinning until it found an IO. This is fine for SYNC polling, since we need to find one request we have pending, but in preparation for ASYNC polling it can be beneficial to just check if we have any entries available or not. Existing callers are converted to pass in 'spin == true', to retain the old behavior. Signed-off-by: Jens Axboe commit e7d943910719b44738e86f91a26a64e3b61ae419 Author: Jens Axboe Date: Mon Nov 19 08:29:33 2018 -0700 nvme: remove opportunistic polling from bdev target It doesn't set HIPRI on the bio, so polling for it is pretty silly. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9743139c5d11ab170f70a308dcb88c342390adfb Author: Jens Axboe Date: Fri Nov 16 09:48:21 2018 -0700 blk-mq: remove 'tag' parameter from mq_ops->poll() We always pass in -1 now and none of the callers use the tag value, remove the parameter. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1052b8ac5282daf35df331edcbdb645839d17e6a Author: Jens Axboe Date: Mon Nov 26 08:21:49 2018 -0700 blk-mq: when polling for IO, look for any completion If we want to support async IO polling, then we have to allow finding completions that aren't just for the one we are looking for. Always pass in -1 to the mq_ops->poll() helper, and have that return how many events were found in this poll loop. Signed-off-by: Jens Axboe commit b7f21899276a3e06ea3c98d0b3771f09eefc6e3d Author: Chris Wilson Date: Mon Nov 26 12:28:21 2018 +0000 drm/i915/ringbuffer: 2-step restart We may be simply restarting too fast for the culmudgeonly gen3/gen4 as we still see missing interrupts following a reset. So let's try restarting a little slower, first wake up the ring empty and then tell it about the work it has to perform. References: https://bugs.freedesktop.org/show_bug.cgi?id=108735 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181126122821.4537-1-chris@chris-wilson.co.uk commit d0618247a80f0c1c5a522b93888f20d8f034ec09 Author: Katsuhiro Suzuki Date: Mon Nov 26 02:56:03 2018 +0900 clk: rockchip: add clock-id to gate of ACODEC for rk3328 Add the newly added clock-id for PCLK_ACODECPHY to the gate-clock, so that it gets usable from devicetree. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit e690d1b0dd3d3e5d723ff4bbc90406c65d25079d Merge: df7b1f2e0a4ae 02bee9e545ef8 Author: Heiko Stuebner Date: Mon Nov 26 14:20:55 2018 +0100 Merge branch 'v4.21-shared/clkids' into v4.21-clk/next commit 02bee9e545ef80fa25b93a7778709c745f4339b9 Author: Katsuhiro Suzuki Date: Mon Nov 26 02:55:49 2018 +0900 clk: rockchip: add clock ID of ACODEC for rk3328 This patch adds clock ID of audio CODEC (ACODEC) for rk3328. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit 933662f28981cf8520a814e47acaea53061ec894 Author: Ladislav Michl Date: Fri Nov 23 15:27:00 2018 +0100 ASoC: max9867: Fix whitespace Minor changes to match coding style. Signed-off-by: Ladislav Michl Signed-off-by: Mark Brown commit 2708bccf9c6f142c3ef5a27f15d34febe751ce4c Author: Kuninori Morimoto Date: Mon Nov 26 01:21:22 2018 +0000 ASoC: soc.h: makes snd_soc_of_parse_audio_prefix() inline commit 3b7103562c03c ("ASoC: soc-core: add snd_soc_of_parse_node_prefix()") maked snd_soc_of_parse_audio_prefix() as #define. But it'd be better to make this a static inline rather than a #define. It helps with error messages and type safety. This patch makes it inline. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7121779fec95ce106ed3a7948d265809bd4e849b Author: Kuninori Morimoto Date: Mon Nov 26 01:17:01 2018 +0000 ASoC: rsnd: tidyup for SSIU subnode commit da48a6eb82ea2 ("ASoC: rsnd: add SSIU BUSIF support for Document") updated Documentation for SSIU, but 1) we want to keep old/deprecated DMA description, 2) it is missing SSIU subnode properties. This patch tidyup these Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 83b12c2e1d942459f420490d4219fc1ad38c3620 Author: Dan Carpenter Date: Mon Nov 26 11:13:07 2018 +0300 ASoC: amd: Fix a NULL vs IS_ERR() check in probe The platform_device_register_full() function doesn't return NULL, it returns error pointers. Fixes: 7894a7e7ea3d ("ASoC: amd: create ACP3x PCM platform device") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown commit 26598f2856e91533af40ba8d05c7c4a8a0300e37 Author: Christophe Leroy Date: Sat Nov 17 10:25:07 2018 +0000 powerpc/kconfig: remove PPC_STD_MMU_32 and PPC_STD_MMU PPC_STD_MMU_32 and PPC_STD_MMU are not used anymore. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 5b3e84fc10ddb77193d6ac1d2be991d47264c716 Author: Christophe Leroy Date: Sat Nov 17 10:25:04 2018 +0000 powerpc: change CONFIG_PPC_STD_MMU to CONFIG_PPC_BOOK3S Today we have: config PPC_BOOK3S def_bool y depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 config PPC_STD_MMU def_bool y depends on PPC_BOOK3S PPC_STD_MMU is therefore redundant with PPC_BOOK3S. Lets remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit 68289ae935da5a8488c0268111631f644d27b683 Author: Christophe Leroy Date: Sat Nov 17 10:25:02 2018 +0000 powerpc: change CONFIG_PPC_STD_MMU_32 to CONFIG_PPC_BOOK3S_32 Today we have: config PPC_BOOK3S_32 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx" [depends on PPC32 within a choice] config PPC_BOOK3S def_bool y depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 config PPC_STD_MMU def_bool y depends on PPC_BOOK3S config PPC_STD_MMU_32 def_bool y depends on PPC_STD_MMU && PPC32 PPC_STD_MMU_32 is therefore redundant with PPC_BOOK3S_32. In order to make the code clearer, lets use preferably PPC_BOOK3S_32. This will allow to remove CONFIG_PPC_STD_MMU_32 in a later patch. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit a0cd0f8cab4d3cdd75916a6c803f768a1b0abda9 Author: Christophe Leroy Date: Sat Nov 17 10:25:00 2018 +0000 powerpc/32: Remove #ifdef CONFIG_PPC_STD_MMU_32 in asm/book3s/32/pgtable.h asm/book3s/32/pgtable.h is only included when CONFIG_PPC_BOOK3S_32 is set. Whenever CONFIG_PPC_BOOK3S_32 is set, CONFIG_PPC_STD_MMU_32 is set as well. This patch removes useless CONFIG_PPC_STD_MMU_32 #ifdefs Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit be34fff07c3755b22455c3077932d24931b17863 Author: Christophe Leroy Date: Sat Nov 17 10:24:58 2018 +0000 powerpc/kconfig: remove CONFIG_6xx CONFIG_6xx is not used anymore. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit d7cceda96badc1bd444cff27ab9c375a1277c1e3 Author: Christophe Leroy Date: Sat Nov 17 10:24:56 2018 +0000 powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 Today we have: config PPC_BOOK3S_32 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx" [depends on PPC32 within a choice] config PPC_BOOK3S def_bool y depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 config 6xx def_bool y depends on PPC32 && PPC_BOOK3S 6xx is therefore redundant with PPC_BOOK3S_32. In order to make the code clearer, lets use preferably PPC_BOOK3S_32. This will allow to remove CONFIG_6xx in a later patch. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman commit f99e33f12490d03e34e1b9cb1b3e3a8beff34ae5 Author: Christophe Leroy Date: Sat Nov 17 10:24:54 2018 +0000 drivers/cpufreq: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 Today, powerpc has three CONFIG labels which means exactly the same: - CONFIG_6xx - CONFIG_PPC_BOOK3S_32 - CONFIG_PPC_STD_MMU_32 By consistency with PPC64, CONFIG_PPC_BOOK3S_32 is the preferred one. Using a label with includes _PPC_ also makes it clearer that it is linked to powerpc. In preparation of the removal of CONFIG_6xx, this patch replaces it by CONFIG_PPC_BOOK3S_32 Signed-off-by: Christophe Leroy Acked-by: Viresh Kumar Signed-off-by: Michael Ellerman commit d2db097905d6ec439b7e863dc9a7e790889a7607 Author: Rob Herring Date: Fri Nov 16 16:11:02 2018 -0600 cxl: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Signed-off-by: Rob Herring Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman commit bf82d3758d4a075d17f4930c9872b05bd277ab0c Author: Rob Herring Date: Fri Nov 16 16:11:01 2018 -0600 macintosh: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 15b680c474afd54dac05530d8fed41c1e8d607e0 Author: Rob Herring Date: Fri Nov 16 16:05:39 2018 -0600 macintosh: windfarm: Another convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Convert the open coded iterating thru child nodes to for_each_child_of_node() while we're here. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit e5480bdcc4429e4c172d450ee1db1934d84482ef Author: Rob Herring Date: Fri Nov 16 16:11:00 2018 -0600 powerpc: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Replace the open coded iterating over child nodes with for_each_child_of_node() while we're here. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 5b8d6be7b8dd286bd654e37d637ded139eae5dd4 Author: Rob Herring Date: Fri Nov 16 16:10:59 2018 -0600 powerpc: Rework btext_find_display to use of_stdout and device_type helpers Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. In the process, the of_stdout pointer can be used instead of finding the stdout node again. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman commit 721c01ba8b46ddb5355bd6e6b3bbfdabfdf01e97 Author: Satheesh Rajendran Date: Thu Nov 15 12:19:50 2018 +0530 powerpc/configs: Add KVM guest defconfig This patch adds new defconfig options for powerpc KVM guest and guest.config with additional config symbols enabled, which is to build kernel to boot without initramfs and can be used as place holder for guest specific additional config symbols in future. Signed-off-by: Michael Ellerman Signed-off-by: Satheesh Rajendran Signed-off-by: Michael Ellerman commit b6e888235775eb312b2dda48bcc4200124c58b65 Author: Satheesh Rajendran Date: Thu Nov 15 11:57:11 2018 +0530 powerpc/configs: Add missing config symbols for ppc64_defconfig This patch adds missing config symbols for ppc64_defconfig to enable cgroups, memhotplug, numa balancing and XFS in core kernel image. Signed-off-by: Satheesh Rajendran Signed-off-by: Michael Ellerman commit 2f40d82fef1ccad05ea5d99dbd8db5a215b0f4a3 Author: Satheesh Rajendran Date: Thu Nov 8 15:55:18 2018 +0530 powerpc/configs: Add CONFIG_NR_CPUS to ppc64_defconfig CONFIG_NR_CPUS is not set in ppc64_defconfig, So it gets default of 32 which is quite small for modern powerpc systems. Instead set a default of 2048 like other powerpc defconfigs. Signed-off-by: Satheesh Rajendran Signed-off-by: Michael Ellerman commit 4ba34d5dfede7fdaddf95e0f373047e3cc3c98e3 Author: Michael Ellerman Date: Mon Nov 26 20:01:10 2018 +1100 powerpc/configs: Update ppc64_defconfig with savedefconfig Update ppc64_defconfig with savedefconfig. No symbols are added or removed, this is 100% movement. Signed-off-by: Michael Ellerman commit b1cfa0391a0bcb91e7e3f49fb4490f9d48cc4913 Author: Michael Ellerman Date: Mon Nov 26 19:33:00 2018 +1100 powerpc/configs: Remove unnecessary ftrace symbols In commit 539df7fcb303 ("powerpc/configs: Enable function trace by default") we added: CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_GRAPH_TRACER=y To ppc64_defconfig, powernv_defconfig and pseries_defconfig. But only CONFIG_FUNCTION_TRACER=y is required, CONFIG_FTRACE is default y if DEBUG_KERNEL is enabled, which we have. And then CONFIG_FUNCTION_GRAPH_TRACER is default y when CONFIG_FUNCTION_TRACER is enabled. The extra symbols were already removed from powernv_defconfig in commit 9a018fb1e147 ("powerpc/config: powernv_defconfig updates"). Signed-off-by: Michael Ellerman commit 507bc2f580adf97916e8feba643420660e70baf6 Author: Otavio Salvador Date: Sun Nov 25 19:19:06 2018 -0200 ARM: dts: rockchip: Pass the 'arm,cpu-registers-not-fw-configured' property on rv1108 Since firmware does not initialize any of the generic timer CPU registers pass the 'arm,cpu-registers-not-fw-configured' property as suggested in Documentation/devicetree/bindings/timer/arm,arch_timer.txt. This also aligns with other Rockchip SoC dtsi files. Signed-off-by: Otavio Salvador Signed-off-by: Heiko Stuebner commit 84ea3a131b6813f7d2b5282e3fe93a4a490cfd25 Author: Otavio Salvador Date: Sun Nov 25 19:19:07 2018 -0200 ARM: dts: rockchip: Pass the 'clock-latency' property on rv1108 Like it is done on cpu nodes of other Rockchip SoCs, pass the 'clock-latency' property to the CPU node, so that cpufreq driver can take the latency into account when switching frequencies. Signed-off-by: Otavio Salvador Signed-off-by: Heiko Stuebner commit 7d015bd7bc9b35f2d786ec675b4ff5a5b6281c17 Author: Otavio Salvador Date: Sun Nov 25 19:19:00 2018 -0200 ARM: dts: rockchip: Add rv1108 GMAC support Add GMAC support for RV1108. Signed-off-by: Otavio Salvador Signed-off-by: Heiko Stuebner commit bdd9868153a780ad1463e1d9c4d43d3bc05c55cb Author: Otavio Salvador Date: Sun Nov 25 19:14:27 2018 -0200 ARM: dts: rockchip: add rv1108 eMMC pin settings Add the pin settings for the emmc pins so they can be used across multiple boards. Signed-off-by: Otavio Salvador Signed-off-by: Heiko Stuebner commit 7c0d404fac4b9a7167002dfe0850781cbcd3a942 Author: Phil Edworthy Date: Tue Nov 20 11:17:09 2018 +0000 gpio: dwapb: Correct the DT node name in the example The sub-nodes should not be called gpio-controller, but simply gpio. Signed-off-by: Phil Edworthy Signed-off-by: Linus Walleij commit 45fd26d39026ac1c80320a934a04d1086ee9224b Author: Shawn Guo Date: Tue Nov 20 13:45:22 2018 +0800 pinctrl: qcom: spmi-gpio: add compatible for pms405 GPIO Let's add "qcom,pms405-gpio" to match table, as commit ed80f6eb799a ("dt-bindings: pinctrl: qcom-pmic-gpio: Add pms405 support") already adds the compatible. Signed-off-by: Shawn Guo Signed-off-by: Linus Walleij commit 89444dad60de0a94d87ee2a6a9d9b73122e86344 Author: Shawn Guo Date: Tue Nov 20 13:45:21 2018 +0800 dt-bindings: pinctrl: fix qcom-pmic-gpio for pms405 Rather than gpio1-gpio11 for pms405, there are 12 GPIOs for pms405. But gpio1, gpio9 and gpio10 are not available. Fix the bindings doc to make it correct for pms405. Fixes: ed80f6eb799a ("dt-bindings: pinctrl: qcom-pmic-gpio: Add pms405 support") Signed-off-by: Shawn Guo Signed-off-by: Linus Walleij commit 275e4eb3f21a09b6b8bd4a353b9a01e500240385 Author: Viresh Kumar Date: Fri Nov 16 15:34:31 2018 +0530 arm64: dts: renesas: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Simon Horman commit 8f1ee2a166f88388fd3b20698958334be357aa52 Author: Yoshihiro Kaneko Date: Mon Oct 15 23:12:26 2018 +0900 arm64: dts: renesas: r8a77990: add thermal device support This patch adds the thermal device node and the thermal-zone for the R8A77990 SoC. Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman Signed-off-by: Simon Horman commit 8fbe048bd95b560ed5fcb8eaa80456a64aeb66a2 Author: Takeshi Kihara Date: Sun Oct 21 06:35:26 2018 +0900 arm64: dts: renesas: r8a77990: Enable I2C DMA This patch enables I2C DMA. NOTE: I2C7 DMA is not supported by R-Car Gen3 Hardware User's Manual Rev.0.80E. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Tested-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 35faaf0df42d285b40f8a6310afbe096720f7758 Author: Vinod Koul Date: Mon Nov 26 13:34:15 2018 +0530 dmaengine: coh901318: Remove unused variable Commit 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") left flags variable unused, so remove it to fix the warning. drivers/dma/coh901318.c: In function 'coh901318_config': drivers/dma/coh901318.c:1805:16: warning: unused variable 'flags' [-Wunused-variable] unsigned long flags; ^~~~~ Fixes: 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") Reported-By: Stephen Rothwell Signed-off-by: Vinod Koul commit 3451f6affaef8c2a0a7a6a5960b86eac9d2ff2f7 Author: Felipe Balbi Date: Wed Aug 15 08:34:44 2018 +0300 usb: dwc3: gadget: remove unnecessary dev_info() Running out of requests on isochronous endpoints is part of normal operation. We don't really need to know about it every time it happens. Signed-off-by: Felipe Balbi commit 1517265228b4ea6b89379fa8e134e62f75ea1dfe Author: Felipe Balbi Date: Wed Aug 15 08:30:59 2018 +0300 usb: dwc3: trace: log ep commands in hex They are much more useful in hexadecimal than in decimal. Moreover, generic commands are already logged in hex. Signed-off-by: Felipe Balbi commit 25abad6a0584c3c08e2859738d23cbc53597179d Author: Felipe Balbi Date: Tue Aug 14 10:41:19 2018 +0300 usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc() Sometimes, errors happen when kicking transfers from __dwc3_gadget_start_isoc(). In those cases, we need to pass along the error so gadget driver can make informed decisions. Signed-off-by: Felipe Balbi commit fec9095bdef4e7c988adb603d0d4f92ee735d4a1 Author: Felipe Balbi Date: Wed Aug 1 13:56:50 2018 +0300 usb: dwc3: gadget: remove wait_end_transfer Now that we have a list of cancelled requests, we can skip over TRBs when END_TRANSFER command completes. Signed-off-by: Felipe Balbi commit d4f1afe5e896c18ae01099a85dab5e1a198bd2a8 Author: Felipe Balbi Date: Wed Aug 1 13:54:25 2018 +0300 usb: dwc3: gadget: move requests to cancelled_list Whenever we have a request in flight, we can move it to the cancelled list and later simply iterate over that list and skip over any TRBs we find. Signed-off-by: Felipe Balbi commit d5443bbf5fc8f8389cce146b1fc2987cdd229d12 Author: Felipe Balbi Date: Wed Aug 1 13:53:29 2018 +0300 usb: dwc3: gadget: introduce cancelled_list This list will host cancelled requests who still have TRBs being processed. Signed-off-by: Felipe Balbi commit 7746a8dfb3f9c91b3a0b63a1d5c2664410e6498d Author: Felipe Balbi Date: Wed Aug 1 13:42:29 2018 +0300 usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs() Extract the logic for skipping over TRBs to its own function. This makes the code slightly more readable and makes it easier to move this call to its final resting place as a following patch. Signed-off-by: Felipe Balbi commit c3acd59014148470dc58519870fbc779785b4bf7 Author: Felipe Balbi Date: Wed Aug 1 13:37:53 2018 +0300 usb: dwc3: gadget: use num_trbs when skipping TRBs on ->dequeue() Now that we track how many TRBs a request uses, it's easier to skip over them in case of a call to usb_ep_dequeue(). Let's do so and simplify the code a bit. Signed-off-by: Felipe Balbi commit 09fe1f8d7e2f461275b1cdd832f2cfa5e9be346d Author: Felipe Balbi Date: Wed Aug 1 13:32:07 2018 +0300 usb: dwc3: gadget: track number of TRBs per request This will help us remove the wait_event() from our ->dequeue(). Signed-off-by: Felipe Balbi commit 1a22ec643580626f439c8583edafdcc73798f2fb Author: Felipe Balbi Date: Wed Aug 1 13:15:05 2018 +0300 usb: dwc3: gadget: combine unaligned and zero flags Both flags are used for the same purpose in dwc3: appending an extra TRB at the end to deal with controller requirements. By combining both flags into one, we make it clear that the situation is the same and that they should be treated equally. Signed-off-by: Felipe Balbi commit d92021f66063b30910255d70dc95e0d7b57f018f Author: Thinh Nguyen Date: Wed Nov 14 22:56:54 2018 -0800 usb: dwc3: Add workaround for isoc start transfer failure In DWC_usb31 version 1.70a-ea06 and prior, for highspeed and fullspeed isochronous IN, BIT[15:14] of the 16-bit microframe number reported by the XferNotReady event are invalid. The driver uses this number to schedule the isochronous transfer and passes it to the START TRANSFER command. Because this number is invalid, the command may fail. If BIT[15:14] matches the internal 16-bit microframe, the START TRANSFER command will pass and the transfer will start at the scheduled time, if it is off by 1, the command will still pass, but the transfer will start 2 seconds in the future. For all other conditions, the START TRANSFER command will fail with bus-expiry. In order to workaround this issue, we can test for the correct combination of BIT[15:14] by sending START TRANSFER commands with different values of BIT[15:14]: 'b00, 'b01, 'b10, and 'b11. Each combination is 2^14 uframe apart (or 2 seconds). 4 seconds into the future will result in a bus-expiry status. As the result, within the 4 possible combinations for BIT[15:14], there will be 2 successful and 2 failure START COMMAND status. One of the 2 successful command status will result in a 2-second delay start. The smaller BIT[15:14] value is the correct combination. Since there are only 4 outcomes and the results are ordered, we can simply test 2 START TRANSFER commands with BIT[15:14] combinations 'b00 and 'b01 to deduce the smaller successful combination. Let test0 = test status for combination 'b00 and test1 = test status for 'b01 of BIT[15:14]. The correct combination is as follow: if test0 fails and test1 passes, BIT[15:14] is 'b01 if test0 fails and test1 fails, BIT[15:14] is 'b10 if test0 passes and test1 fails, BIT[15:14] is 'b11 if test0 passes and test1 passes, BIT[15:14] is 'b00 Synopsys STAR 9001202023: Wrong microframe number for isochronous IN endpoints. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit dd74b96c74806da7a0e8cc794328950a2a7cb833 Author: Thinh Nguyen Date: Wed Nov 14 22:56:48 2018 -0800 usb: dwc3: Add disabling of start_transfer failure quirk DWC_usb31 peripheral v1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. However, some affected versions may have RTL patches to fix this without a SW workaround. Add this quirk to disable the SW workaround when it is not needed. Synopsys STAR 9001202023: Wrong microframe number for isochronous IN endpoints. Signed-off-by: Thinh Nguyen Reviewed-by: Rob Herring Signed-off-by: Felipe Balbi commit 475d8e0197f1bcf4647041f46206ffc1a16d15dd Author: Thinh Nguyen Date: Thu Nov 8 12:06:48 2018 -0800 usb: dwc3: Track DWC_usb31 VERSIONTYPE Add a new field to dwc3 structure to track VERSIONTYPE. The VERSIONTYPE is represented in ASCII in the 32-bit VERSIONTYPE register. In DWC_usb31, sub releases for each version are tracked with VERSIONTYPE such as "ea01" and "ea02". Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 772a7a724f69d258025fedd87dde1aafe4171aef Author: Andrzej Pietrasiewicz Date: Wed Nov 14 10:47:48 2018 +0100 usb: gadget: f_fs: Allow scatter-gather buffers Some protocols implemented in userspace with FunctionFS might require large buffers, e.g. 64kB or more. Currently the said memory is allocated with kmalloc, which might fail should system memory be highly fragmented. On the other hand, some UDC hardware allows scatter-gather operation and this patch takes advantage of this capability: if the requested buffer is larger than PAGE_SIZE and the UDC allows scatter-gather operation, then the buffer is allocated with vmalloc and a scatterlist describing it is created and passed to usb request. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi commit 7f7c548c5f652375a61c1072bac3db11f7a48326 Author: Vincent Pelletier Date: Tue Oct 9 14:43:18 2018 +0000 usb: gadget: f_fs: Add support for CCID descriptors. Nothing to remap, only check length. Define a minimal structure for CCID descriptor only used to check length. As this descriptor shares the same value as HID descriptors, keep track and compare current interface's class to expected HID and CCID standard values. Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi commit 4ab9c39f038d929845f70aade2c2eb64174bba87 Author: Colin Ian King Date: Mon Oct 29 22:49:45 2018 +0000 usb: gadget: udc: fix spelling mistake "intrerrupt" -> "interrupt" Trivial fix to spelling mistake in comment Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit e89428381080b73740e1fb1fa9b08f1173723b80 Author: Julia Lawall Date: Tue Oct 30 16:31:21 2018 +0100 usb: gadget: uvc: constify vb2_ops structure The vb2_ops structure can be const as it is only stored in the ops field of a vb2_queue structure and this field is const. Done with the help of Coccinelle. Reviewed-by: Laurent Pinchart Signed-off-by: Julia Lawall Signed-off-by: Felipe Balbi commit 9aed8c08c82d8498769119b73358d070a7cbb54c Author: Artur Petrosyan Date: Fri Nov 2 11:29:55 2018 -0400 usb: dwc2: gadget: Accept LPM token when TxFIFO is not empty Set GLPMCFG_LPM_ACCEPT_CTRL_ISOC bit in GLPMCFG register to accept LPM token during ISOC transfers when TxFIFO is not empty. - Added two definitions. #define GLPMCFG_LPM_ACCEPT_CTRL_CONTROL BIT(21) #define GLPMCFG_LPM_ACCEPT_CTRL_ISOC BIT(22) This patch uses GLPMCFG_LPM_ACCEPT_CTRL_ISOC. GLPMCFG_LPM_ACCEPT_CTRL_CONTROL is defined for further use. - Added setting GLPMCFG_LPM_ACCEPT_CTRL_ISOC bit in GLPMCFG register in dwc2_gadget_init_lpm function. Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit d64bc8ee92856e39b3150d93e244ca8239ae6ada Author: Artur Petrosyan Date: Fri Nov 2 11:29:48 2018 -0400 usb: dwc2: gadget: Fix WkupAlert interrupt handler. According to the databook DCTL_RMTWKUPSIG bit is defined in DCTL register not in DCFG. Updated setting DCTL_RMTWKUPSIG bit to DCTL register. Fixes: 187c5298a122 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit 89a9cc47513e91bc91ba2c438d5e422a0c8d05e7 Author: Thinh Nguyen Date: Fri Nov 2 18:41:42 2018 -0700 usb: dwc3: Set default mode for DWC_usb3 v3.30a and higher DWC_usb31 and DWC_usb3 v3.30a and higher do not support OTG mode. If the controller supports DRD but the dr_mode is not specified or set to OTG, then set the mode to peripheral. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit ceb94bc52c437463f0903e61060a94a2226fb672 Author: Yoshihiro Shimoda Date: Fri Nov 9 20:44:36 2018 +0900 usb: gadget: udc: renesas_usb3: add a safety connection way for forced_b_device This patch adds a safety connection way for "forced_b_device" with "workaround_for_vbus" like below: < Example for R-Car E3 Ebisu > # modprobe # echo 1 > /sys/kernel/debug/ee020000.usb/b_device (connect a usb cable to host side.) # echo 2 > /sys/kernel/debug/ee020000.usb/b_device Previous code should have connected a usb cable before the "b_device" is set to 1 on the Ebisu board. However, if xHCI driver on the board is probed, it causes some troubles: - Conflicts USB VBUS/signals between the board and another host. - "Cannot enable. Maybe the USB cable is bad?" might happen on both the board and another host with a usb hub. - Cannot enumerate a usb gadget correctly because an interruption of VBUS change happens unexpectedly. Reported-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi commit 268784ba14a7bff23bc80531d6db31986eafd54b Author: Andy Shevchenko Date: Sat Nov 10 20:11:01 2018 +0200 usb: dwc3: drd: Add support for DR detection through extcon Allow extcon device, found by name, to provide DR status for USB. This is needed, for example, in case of Intel Merrifield platform, where the Intel Basin Cove PMIC provides an extcon device to communicate the detected role. Note, that the "linux,extcon-name" property name is only for kernel internal use by X86/ACPI platform code and as such is not documented in the device tree bindings. Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi commit 85383756ae34db2ee46daa779f869598a3443651 Author: Andy Shevchenko Date: Sat Nov 10 20:11:00 2018 +0200 usb: dwc3: drd: Switch to device property for 'extcon' handling Switch to device property for 'extcon' handling. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Felipe Balbi commit 408d3ba006af57380fa48858b39f72fde6405031 Author: Brian Norris Date: Wed Nov 7 12:40:29 2018 -0800 usb: dwc3: don't log probe deferrals; but do log other error codes It's not very useful to repeat a bunch of probe deferral errors. And it's also not very useful to log "failed" without telling the error code. Signed-off-by: Brian Norris Signed-off-by: Felipe Balbi commit 1808bd2132d1a53a401459474213bdcdbc94d215 Author: Julia Lawall Date: Tue Oct 30 17:19:59 2018 +0100 usb: gadget: aspeed-vhub: constify usb_gadget_ops structure The usb_gadget_ops structure can be const as it is only stored in the ops field of a usb_gadget structure and this field is const. Done with the help of Coccinelle. Reviewed-by: Andrew Jeffery Signed-off-by: Julia Lawall Signed-off-by: Felipe Balbi commit 022a0208c0ff038f8970a71cb298f85722b4a0ef Author: Thinh Nguyen Date: Wed Nov 7 18:10:42 2018 -0800 usb: dwc3: Support option to disable USB2 LPM Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" property via "snps,usb2-lpm-disable" property. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 5455e156078bfcb72505f59b933c9ef726351e2b Author: Thinh Nguyen Date: Wed Nov 7 18:10:36 2018 -0800 usb: dwc3: Add a property to disable USB2 LPM Add an option to disable USB2 LPM from host. There maybe cases where the user does not want to enable USB2 LPM (e.g. USB2 LPM is broken). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit eafeacf1196447dac0b8c40e77e96a81b74b8f7f Author: Thinh Nguyen Date: Wed Nov 7 18:10:30 2018 -0800 usb: dwc3: Set GUSB2PHYCFG.ENBLSLPM GUSB2PHYCFG.ENBLSLPM enables the controller to assert low power signals to the PHY. Unless disabled via device property, explicitly set GUSB2PHYCFG.ENBLSLPM as it may not be set by default. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit d102444cac156425e1f154089eb4400ddb581629 Author: Thinh Nguyen Date: Wed Nov 7 17:56:23 2018 -0800 usb: dwc3: debugfs: Print/set link state for peripheral mode Current implementation only prints/sets the link state for peripheral mode only. Check and prevent printing bogus link state if the current mode of operation is not peripheral. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 Author: Thinh Nguyen Date: Wed Nov 7 17:55:19 2018 -0800 usb: dwc3: debugfs: Properly print/set link state for HS Highspeed device and below has different state names than superspeed and higher. Add proper checks and printouts of link states for highspeed and below. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 62ba09d6bb6330d8a70e40e23891d8764663d469 Author: Thinh Nguyen Date: Wed Nov 7 17:55:13 2018 -0800 usb: dwc3: debugfs: Dump internal LSP and ep registers To dump internal LSP and endpoint state debug registers, we must write to GDBGLSPMUX register. This patch correctly dump LSP and endpoint states from the debug registers. If the controller is in device mode, all LSP and endpoint state registers will be dumped via the debugfs attribute "lsp_dump". In host mode, the user has to write the LSP number to "lsp_dump" to dump a specific LSP selection. Fixes: 80b776340c78 ("usb: dwc3: Dump LSP and BMU debug info") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 0f874f79dc81aec0229babebd6ef04e591a548d2 Author: Thinh Nguyen Date: Wed Nov 7 17:55:06 2018 -0800 usb: dwc3: debugfs: Print eps Tx/RxFIFO in bytes TxFIFO and RxFIFO from GDBGFIFOSPACE are fifo depths in MDWIDTH. Convert them into bytes for easier read. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 2c85a1817e4ba09592964226b46305a7b9599884 Author: Thinh Nguyen Date: Wed Nov 7 17:55:00 2018 -0800 usb: dwc3: debugfs: Properly name Tx/RxFIFO The Tx/RxFIFO types in the GDBGFIFOSPACE.FIFO_QUEUE_SELECT are not queue. Properly rename them. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit a62d2d44902cf1222b5ac41ff1f61167a010cd6b Merge: f4b614adbf3ac 2e6e902d18502 Author: Greg Kroah-Hartman Date: Mon Nov 26 07:54:40 2018 +0100 Merge 4.20-rc4 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 986fb2e0532b1b0fa1e8312fbc38b9e7ed826547 Merge: 24438e46268c7 2e6e902d18502 Author: Greg Kroah-Hartman Date: Mon Nov 26 07:50:56 2018 +0100 Merge 4.20-rc4 into char-misc-next We want the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit ffac28f95a98a87db0850801cd98771a08bb1dec Author: David Calavera Date: Fri Nov 23 15:58:39 2018 -0800 bpf: align map type names formatting. Make the formatting for map_type_name array consistent. Signed-off-by: David Calavera Signed-off-by: Daniel Borkmann commit 311fe1a813324ea6d8172a3e9eefb1b274c72fea Author: Colin Ian King Date: Sun Nov 25 23:32:51 2018 +0000 bpf: btf: fix spelling mistake "Memmber" -> "Member" There is a spelling mistake in a btf_verifier_log_member message, fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann commit cf0dd411e80f7066cabf69899724e48dd3192b99 Author: Rustam Kovhaev Date: Fri Nov 23 15:48:16 2018 -0800 bpf, tags: Fix DEFINE_PER_CPU expansion Building tags produces warning: ctags: Warning: kernel/bpf/local_storage.c:10: null expansion of name pattern "\1" Let's use the same fix as in commit 25528213fe9f ("tags: Fix DEFINE_PER_CPU expansions"), even though it violates the usual code style. Signed-off-by: Rustam Kovhaev Signed-off-by: Daniel Borkmann commit 27038c3e1f140a9c3f0e514db6db82495f78bbc9 Author: Vladimir Zapolskiy Date: Thu Nov 22 15:59:01 2018 +0200 gpio: restore original GPLv2+ license of gpiolib-of.c sources It's easy to verify that the change of drivers/gpio/gpiolib-of.c license header to SPDX standard changes the license from GPLv2+ to GPLv2, and this change corrects it. Fixes: dae5f0afcfc3 ("gpio: Use SPDX header for core library") Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij commit 84d49fff23f52d5bd818c3f6c0efdde2a3bad06f Merge: 9088276d1a86c b59d0e7827067 Author: Linus Walleij Date: Sun Nov 25 23:53:01 2018 +0100 Merge tag 'sh-pfc-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.21 - Fix VIN (Video IN) versioned groups on R-Car V2H, H3, and M3-W, - Add I2C[0-3], DU1, VIN, QSPI1, and SDHI pin groups on RZ/G1C, - Add audio, SDHI, VIN, HSCIF, and CAN(FD) support on R-Car E3, - Add QSPI pin groups on R-Car V3M and V3H, - Add VIN and CAN(FD) pin groups on R-Car M3-N, - Add I2C[035] pin groups on R-Car H3 and M3-W, - Add pinctrl and GPIO support for the new RZ/A2M (R7S9210) SoC, - Small cleanups, - Maintainership updates. commit fb265c9cb49e2074ddcdd4de99728aefdd3b3592 Author: Theodore Ts'o Date: Sun Nov 25 17:20:31 2018 -0500 ext4: add ext4_sb_bread() to disambiguate ENOMEM cases Today, when sb_bread() returns NULL, this can either be because of an I/O error or because the system failed to allocate the buffer. Since it's an old interface, changing would require changing many call sites. So instead we create our own ext4_sb_bread(), which also allows us to set the REQ_META flag. Also fixed a problem in the xattr code where a NULL return in a function could also mean that the xattr was not found, which could lead to the wrong error getting returned to userspace. Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3") Cc: stable@kernel.org # 2.6.19 Signed-off-by: Theodore Ts'o commit 3d9bfb19bd705f503ac7afc2776d5d56dab88858 Author: Sakari Ailus Date: Thu Nov 22 13:06:04 2018 +0200 scripts/kernel-doc: Fix struct and struct field attribute processing The kernel-doc attempts to clear the struct and struct member attributes from the API documentation it produces. It falls short of the job in the following respects: - extra whitespaces are left where __attribute__((...)) was removed, - only a single attribute is removed per struct, - attributes (such as aligned) containing numbers were not removed, - attributes are only cleared from struct fields, not structs themselves. This patch addresses these issues by removing the attributes. Signed-off-by: Sakari Ailus Signed-off-by: Jonathan Corbet commit 32ddfe8b0b0ae39e15b01c5ce7d6ae75e9cfe6f4 Author: Shreyans Devendra Doshi <0xinfosect0r@gmail.com> Date: Thu Nov 22 10:34:56 2018 -0500 Documentation: dev-tools: Fix typos in index.rst Fixes a spelling error and removes an extra whitespace character. Signed-off-by: Shreyans Devendra Doshi <0xinfosect0r@gmail.com> Signed-off-by: Jonathan Corbet commit 06ee6ed36f941b6359d014e842d2a41a2fbd4e9c Author: Andrzej Bednarski Date: Sun Nov 25 14:22:14 2018 +0100 Correct gen_init_cpio tool's documentation The documentation for gen_init_cpio mentions to invoke the tool with '--help' flag for showing directive file format information. However, only the short name variant '-h' is implemented. Invoking the tool with the long name returns invalid option message and sets an error code. Signed-off-by: Andrzej Bednarski Signed-off-by: Jonathan Corbet commit 4bffc669d6248d655aeb985a0e51bfaaf21c8b40 Author: Eric Dumazet Date: Sun Nov 25 08:26:23 2018 -0800 net: remove unsafe skb_insert() I do not see how one can effectively use skb_insert() without holding some kind of lock. Otherwise other cpus could have changed the list right before we have a chance of acquiring list->lock. Only existing user is in drivers/infiniband/hw/nes/nes_mgt.c and this one probably meant to use __skb_insert() since it appears nesqp->pau_list is protected by nesqp->pau_lock. This looks like nesqp->pau_lock could be removed, since nesqp->pau_list.lock could be used instead. Signed-off-by: Eric Dumazet Cc: Faisal Latif Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-rdma Signed-off-by: David S. Miller commit 40b1c813ba8e0aac9ee36b57f2835777506084c6 Author: Colin Ian King Date: Sun Nov 25 16:08:51 2018 +0000 net: bridge: remove redundant checks for null p->dev and p->br A recent change added a null check on p->dev after p->dev was being dereferenced by the ns_capable check on p->dev. It turns out that neither the p->dev and p->br null checks are necessary, and can be removed, which cleans up a static analyis warning. As Nikolay Aleksandrov noted, these checks can be removed because: "My reasoning of why it shouldn't be possible: - On port add new_nbp() sets both p->dev and p->br before creating kobj/sysfs - On port del (trickier) del_nbp() calls kobject_del() before call_rcu() to destroy the port which in turn calls sysfs_remove_dir() which uses kernfs_remove() which deactivates (shouldn't be able to open new files) and calls kernfs_drain() to drain current open/mmaped files in the respective dir before continuing, thus making it impossible to open a bridge port sysfs file with p->dev and p->br equal to NULL. So I think it's safe to remove those checks altogether. It'd be nice to get a second look over my reasoning as I might be missing something in sysfs/kernfs call path." Thanks to Nikolay Aleksandrov's suggestion to remove the check and David Miller for sanity checking this. Detected by CoverityScan, CID#751490 ("Dereference before null check") Fixes: a5f3ea54f3cc ("net: bridge: add support for raw sysfs port options") Signed-off-by: Colin Ian King Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a1f2d60aaf2c4f88d81cfd71c84744b19a46043d Merge: 358be656406dc 2e6eedb4813e3 Author: David S. Miller Date: Sun Nov 25 10:18:14 2018 -0800 Merge branch 'r8169-xmit_more' Heiner Kallweit says: ==================== r8169: make use of xmit_more and __netdev_sent_queue This series adds helper __netdev_sent_queue to the core and makes use of it in the r8169 driver. Heiner Kallweit (2): net: core: add __netdev_sent_queue as variant of __netdev_tx_sent_queue r8169: make use of xmit_more and __netdev_sent_queue v2: - fix minor style issue ==================== Signed-off-by: David S. Miller commit 2e6eedb4813e34d8d84ac0eb3afb668966f3f356 Author: Heiner Kallweit Date: Sun Nov 25 14:31:54 2018 +0100 r8169: make use of xmit_more and __netdev_sent_queue Make use of xmit_more and add the functionality introduced with 3e59020abf0f ("net: bql: add __netdev_tx_sent_queue()"). I used the mlx4 driver as template. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 620344c43edfa020bbadfd81a144ebe5181fc94f Author: Heiner Kallweit Date: Sun Nov 25 14:30:29 2018 +0100 net: core: add __netdev_sent_queue as variant of __netdev_tx_sent_queue Similar to netdev_sent_queue add helper __netdev_sent_queue as variant of __netdev_tx_sent_queue. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3aed83caa2f7370a04cc0be0e86d0939eba0c5f7 Author: Lorenzo Bianconi Date: Sat Nov 17 19:04:27 2018 +0100 iio: imu: st_lsm6dsx: do not use a fixed read len in read_oneshot Generalize st_lsm6dsx_shub_read_oneshot in order to not use a fixed read length and take into account iio channel realbits for single read operations Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 8611b69e95464da1458c1430c64b147b0f51058a Author: Colin Ian King Date: Sun Nov 18 16:27:57 2018 +0000 iio: hid-sensor-hub: clean up indentation, remove extraneous tab The statement is indented too much by one level, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron commit 49ad8d289284b28fcac73a04838bf8eb39fd058d Author: Fabrice Gasnier Date: Tue Nov 20 11:12:32 2018 +0100 iio: adc: stm32-adc: switch off running adc when going to low power Switch off ADC when going to low power mode, in case it has been left running in buffer mode. Then re-enable it when resuming. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 9bdbb1139ca11301257fa1fae9cf71a598911efc Author: Fabrice Gasnier Date: Tue Nov 20 11:12:31 2018 +0100 iio: adc: stm32-adc: add power management support Add support for runtime PM & sleep. Move all regulator and clock management to dedicated HW start/stop routines. Then rely on (runtime) PM OPS to call them. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 0da98c7b28bd189bfe916d2203edf5b7792784fe Author: Fabrice Gasnier Date: Tue Nov 20 11:12:30 2018 +0100 iio: adc: stm32-adc: move self-calibration to prepare routine Move self-calibration routine to prepare routine. - This is precursor patch to ease power management handling. - This also allow to factorize few error cases (error handling). Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 9088276d1a86c7a377e89e2d3221176cd2cc37c5 Author: Mesih Kilinc Date: Sun Nov 25 10:43:14 2018 +0300 pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs) The suniv F1C100s chip (several new F-series SoCs) of Allwinner has a pin controller like other SoCs from Allwinner. Add support for it. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit bbeb6a6ded3bfa369d99160d9788c7a3fb2a52ae Author: Mesih Kilinc Date: Sun Nov 25 10:43:13 2018 +0300 dt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl Add compatible string for Allwinner suniv F1C100s SoC's pinctrl. Signed-off-by: Mesih Kilinc Acked-by: Maxime Ripard Signed-off-by: Linus Walleij commit 7f6232e69539971cf9eaed07a6c14ab4a2361133 Author: Hans de Goede Date: Tue Nov 20 12:10:14 2018 +0100 iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID Various 2-in-1's use KIOX010A and KIOX020A as HIDs for 2 KXCJ91008 accelerometers. The KIOX010A HID is for the one in the base and the KIOX020A for the accelerometer in the keyboard. Since userspace does not have a way yet to deal with (or ignore) the accelerometer in the keyboard, this commit just adds the KIOX010A HID for now so that display rotation will work. Related: https://github.com/hadess/iio-sensor-proxy/issues/166 Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron commit 092cb71a604e2d8dd3b79fddef779a2d4aaad5a8 Author: Chris Coffey Date: Tue Nov 20 14:17:13 2018 +0000 iio: potentiometer: Add driver for Microchip MCP41xxx/42xxx This patch adds driver support for the Microchip MCP41xxx/42xxx family of digital potentiometers: DEVICE Wipers Positions Resistance (kOhm) MCP41010 1 256 10 MCP41050 1 256 50 MCP41100 1 256 100 MCP42010 2 256 10 MCP42050 2 256 50 MCP42100 2 256 100 Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf Signed-off-by: Chris Coffey Signed-off-by: Jonathan Cameron commit f71b3c99128bae93c1b4262fc4f639652bb04e1e Author: Chris Coffey Date: Tue Nov 20 14:17:12 2018 +0000 dt-bindings: iio: potentiometer: Add Microchip MCP41xxx/42xxx This patch adds device tree documentation for the Microchip MCP41xxx/42xxx family of digital potentiometers. Signed-off-by: Chris Coffey Signed-off-by: Jonathan Cameron commit c3d8360deb9d204a2bec3ede8310929913a1a100 Author: Shreeya Patel Date: Tue Nov 20 22:28:36 2018 +0530 Staging: iio: adt7316: Change the name from irq_flags to irq_type Most of the drivers in IIO uses irq_type as the name for storing the interrupt type and hence change the name from irq_flags to irq_type for maintaining the consistency. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit 3310280830a9426b775a8f5e2693f2e4e11f915d Author: Shreeya Patel Date: Tue Nov 20 22:26:58 2018 +0530 Staging: iio: adt7316: Switch irq_flags to a local variable There is no need to store irq_flags into the structure as it is always set to the same thing. Hence switch irq_flags to a local variable. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit c63460c4298f93cdc4e30cda96d21b3583d7e3a0 Author: Shreeya Patel Date: Tue Nov 20 22:24:36 2018 +0530 Staging: iio: adt7316: Use device tree data to set ldac_pin Make the driver use device tree instead of the platform data. Hence, use devm_gpiod_get_optional function to get the data from device tree for ldac-pin and accordingly make the needed changes in the driver. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit f8f612530e6010cef1971ec986d55d04269d1365 Author: Shreeya Patel Date: Tue Nov 20 22:22:30 2018 +0530 Staging: iio: adt7316: Add of_device_id table When the kernel starts up, it kicks off compiled-in drivers that match “compatible” entries it finds in the device tree. At a later stage (when /lib/modules is available), all kernel modules that match “compatible” entries in the device tree are loaded. But if there is no dt table then there should be a fall back path with which desired kernel modules can be loaded. Hence, add of_device_id table in the i2c driver to be able to use when there is no dt table. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit 50314f98b0ac468218e7c9af8c99f215a35436df Author: Martin Blumenstingl Date: Thu Nov 22 23:01:11 2018 +0100 iio: adc: meson-saradc: fix internal clock names Before this patch we are registering the internal clocks (for example on Meson8b, where the SAR ADC IP block implements the divider and gate clocks) with the following names: - /soc/cbus@c1100000/adc@8680#adc_div - /soc/cbus@c1100000/adc@8680#adc_en This is bad because the common clock framework uses the clock to create a directory in /clk. With such name, the directory creation (silently) fails and the debugfs entry ends up being created at the debugfs root. With this change, the new clock names are: - c1108680.adc#adc_div - c1108680.adc#adc_en This matches the clock naming scheme used in the PWM, Ethernet and MMC drivers. It also fixes the problem with debugfs. The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson: Fix mux clock names"). Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name") Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit aad172b017617994343e36d8659c69e14cd694fd Author: Nicholas Mc Guire Date: Thu Nov 22 08:46:43 2018 +0100 iio: adc: meson-saradc: check for devm_kasprintf failure devm_kasprintf() may return NULL on failure of internal allocation thus the assignments to init.name are not safe if not checked. On error meson_sar_adc_clk_init() returns negative values so -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here. Signed-off-by: Nicholas Mc Guire Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Acked-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit bac257b0d2a1e06426f7db56abeda7c2ffcf0752 Author: Marcelo Schmitt Date: Sat Nov 24 11:18:57 2018 -0200 staging: iio: ad5933: add device tree support Add a of_device_id struct variable and subsequent call to MODULE_DEVICE_TABLE macro to complete device tree support. Signed-off-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit b911b0ab0d89d8488ae0d21db121907dcacef6ad Author: Stephan Gerhold Date: Sat Nov 24 17:22:20 2018 +0100 iio: accel: kxcjk-1013: Add the "KXJ2109" ACPI HID This HID is used on the ASUS MeMO Pad 7 (ME176C) tablet. Signed-off-by: Stephan Gerhold Signed-off-by: Jonathan Cameron commit c3d6a64bd1e82ea486bff46b17d5403c2d2602d6 Author: Sabyasachi Gupta Date: Mon Nov 5 08:58:23 2018 +0530 powerpc/pasemi: Use dma_zalloc_coherent() Replace dma_alloc_coherent() + memset() with dma_zalloc_coherent(). Signed-off-by: Sabyasachi Gupta Signed-off-by: Michael Ellerman commit af8511cf32189ba66c7e2a4146f11c86c9813ab7 Author: Yue Haibing Date: Thu Nov 15 12:33:16 2018 +0000 powerpc/85xx: Drop pointless static qualifier There is no need to have the 'void __iomem *cpld_base' variable static since new value always be assigned before use it. Signed-off-by: Yue Haibing Signed-off-by: Michael Ellerman commit d64cf54e89c86487c1369991af79d8331c3e8988 Author: YueHaibing Date: Tue Nov 13 13:56:56 2018 +0000 powerpc64/ftrace: Drop pointless static qualifier in is_b_op() There is no need to have the 'intoffset' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman commit e734dd63cc42febee4730ecef97ae32d1be41e2b Author: Geert Uytterhoeven Date: Wed Nov 7 14:49:03 2018 +0100 powerpc: Typo s/use use/use/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman commit f6cee260309807acb12ff84524ffc84720c2904b Author: Yangtao Li Date: Mon Nov 5 10:01:19 2018 -0500 powerpc/fadump: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Reviewed-by: David Gibson Signed-off-by: Michael Ellerman commit 267acedffc614b78ec09bc279f921a6b9a38585e Author: Yangtao Li Date: Tue Nov 6 09:39:30 2018 -0500 powerpc/powernv/vas: Use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Michael Ellerman commit d456f3529a7a980ca7410c62e9e3496d828858f2 Author: Daniel Axtens Date: Wed Nov 7 01:48:03 2018 +1100 powerpc: mark 64-bit PD_HUGE constant as unsigned long When compiled for 64-bit, the PD_HUGE constant is a 64-bit integer. Mark it as an unsigned long. This squashes over a thousand sparse warnings on my minimal T4240RDB (e6500, ppc64be) config, of the following 2 forms: arch/powerpc/include/asm/hugetlb.h:52:49: warning: constant 0x8000000000000000 is so big it is unsigned long arch/powerpc/include/asm/nohash/pgtable.h:269:49: warning: constant 0x8000000000000000 is so big it is unsigned long Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit c516886f8437b85489d06115c54761880c7d67ac Author: Mathieu Malaterre Date: Wed Oct 31 12:03:07 2018 +0100 powerpc/mm: remove const type qualifier from function ‘pud_pfn’ Type qualifier on return type is ignored. Remove warning in W=1: arch/powerpc/include/asm/book3s/64/pgtable.h:1268:25: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman commit beba24ac59133cb36ecd03f9af9ccb11971ee20e Author: Mathieu Malaterre Date: Wed Oct 31 13:31:56 2018 +0100 powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y` are set, link step typically produce numberous warnings about orphan section: + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic --orphan-handling=warn --build-id --gc-sections -X -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds --who le-archive built-in.a --no-whole-archive --start-group lib/lib.a --end-group powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data393' from `init/main.o' being placed in section `.data..Lubsan_data393'. powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data394' from `init/main.o' being placed in section `.data..Lubsan_data394'. ... powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type11' from `init/main.o' being placed in section `.data..Lubsan_type11'. powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type12' from `init/main.o' being placed in section `.data..Lubsan_type12'. ... This commit remove those warnings produced at W=1. Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg135407.html Suggested-by: Nicholas Piggin Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman commit eafcd8e3fbad4f426a40ed2b6a8c697c3a4ef36a Author: Breno Leitao Date: Wed Oct 31 11:38:22 2018 -0300 selftests/powerpc: Skip test instead of failing Current core-pkey selftest fails if the test runs without privileges to write into the core pattern file (/proc/sys/kernel/core_pattern). This causes the test to fail and give the impression that the subsystem being tested is broken, when, in fact, the test is being executed without the proper privileges. This is the current error: test: core_pkey tags: git_version:v4.19-3-g9e3363be9bce-dirty Error writing to core_pattern file: Permission denied failure: core_pkey This patch simply skips this test if it runs without the proper privileges, avoiding this undesired failure. CC: Tyrel Datwyler CC: Thiago Jung Bauermann Signed-off-by: Breno Leitao Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman commit e653b6567e9c1854f51fb649c676499498560977 Author: Breno Leitao Date: Wed Oct 31 11:38:21 2018 -0300 selftests/powerpc: Create a new SKIP_IF macro This patch creates a new macro that skips a test and prints a message to stderr. This is useful to give an idea why the tests is being skipped, other than just skipping the test blindly. Signed-off-by: Breno Leitao Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman commit 5249497a7bb6334fcc128588d6a7e1e21786515a Author: Breno Leitao Date: Wed Oct 31 11:38:20 2018 -0300 selftests/powerpc: Allocate base registers Some ptrace selftests are passing input operands using a constraint that can allocate any register for the operand, and using these registers on load/store operations. If the register allocated by the compiler happens to be zero (r0), it might cause an invalid memory address access, since load and store operations consider the content of 0x0 address if the base register is r0, instead of the content of the r0 register. For example: r1 := 0xdeadbeef r0 := 0xdeadbeef ld r2, 0(1) /* will load into r2 the content of r1 address */ ld r2, 0(0) /* will load into r2 the content of 0x0 */ In order to avoid this possible problem, the inline assembly constraint should be aware that these registers will be used as a base register, thus, r0 should not be allocated. Other than that, this patch removes inline assembly operands that are not used by the tests. Signed-off-by: Breno Leitao Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman commit bce85a167b336da80642952b222588c25c8613d7 Author: Breno Leitao Date: Wed Oct 31 11:24:11 2018 -0300 powerpc/mm: Remove extern from function definition Function huge_ptep_set_access_flags() has the 'extern' keyword in the function definition and also in the function declaration. This causes a warning in 'sparse' since the 'extern' storage class should not be used in the function definition. arch/powerpc/mm/pgtable.c:232:12: warning: function 'huge_ptep_set_access_flags' with external linkage has definition This patch removes the keyword from the definition part. It also removes the extern keyword from the declaration part, since checkpatch --strict complains about it. Suggested-by: Christophe Leroy Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 71432ce23c360fe06843499fcf7efdd10f8f35a5 Author: Breno Leitao Date: Mon Oct 22 11:54:20 2018 -0300 powerpc/pkey: Define functions as static Sparse tool is showing some warnings on pkeys.c file, mainly related to storage class identifiers. There are static variables and functions not declared as such. The same thing happens with an extern function, which misses the header inclusion. arch/powerpc/mm/pkeys.c:14:6: warning: symbol 'pkey_execute_disable_supported' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:16:6: warning: symbol 'pkeys_devtree_defined' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:19:6: warning: symbol 'pkey_amr_mask' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:20:6: warning: symbol 'pkey_iamr_mask' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:21:6: warning: symbol 'pkey_uamor_mask' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:22:6: warning: symbol 'execute_only_key' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:60:5: warning: symbol 'pkey_initialize' was not declared. Should it be static? arch/powerpc/mm/pkeys.c:404:6: warning: symbol 'arch_vma_access_permitted' was not declared. Should it be static? This patch fix al the warning, basically turning all global variables that are not declared as extern at asm/pkeys.h into static. It also includes asm/mmu_context.h header, which contains the definition of arch_vma_access_permitted. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 4851f75098bc9cb2feb44c8168b99ab78b60961d Author: Breno Leitao Date: Mon Oct 22 11:54:19 2018 -0300 powerpc/perf: Declare static identifier a such There are three symbols (two variables and a function) that are being used solely in the same file (imc-pmu.c), thus, these symbols should be static, but they are not. This was detected by sparse: arch/powerpc/perf/imc-pmu.c:31:20: warning: symbol 'nest_imc_refc' was not declared. Should it be static? arch/powerpc/perf/imc-pmu.c:37:20: warning: symbol 'core_imc_refc' was not declared. Should it be static? arch/powerpc/perf/imc-pmu.c:46:16: warning: symbol 'imc_event_to_pmu' was not declared. Should it be static? This patch simply adds the 'static' storage-class definition to these symbols, thus, restricting their usage only in the imc-pmu.c file. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 3347c9f691bf23c65375c51f904c848b36b6f8fb Author: Breno Leitao Date: Mon Oct 22 11:54:18 2018 -0300 powerpc/scom: Return NULL instead of 0 Function scom_map_device() returns data type 'scom_map_t', which is a typedef for 'void *'. This functions is currently returning NULL and zero, which causes the following warning by 'sparse': arch/powerpc/sysdev/scom.c:63:24: warning: Using plain integer as NULL pointer arch/powerpc/sysdev/scom.c:86:24: warning: Using plain integer as NULL pointer This patch simply replaces zero by NULL. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 3b30c6e8b962c5d4d8d8b6ae7688380dadc03174 Author: Breno Leitao Date: Mon Oct 22 11:54:17 2018 -0300 powerpc/lib: Declare static methods Functions do_stf_{entry,exit}_barrier_fixups are static but not declared as such. This was detected by `sparse` tool with the following warning: arch/powerpc/lib/feature-fixups.c:121:6: warning: symbol 'do_stf_entry_barrier_fixups' was not declared. Should it be static? arch/powerpc/lib/feature-fixups.c:171:6: warning: symbol 'do_stf_exit_barrier_fixups' was not declared. Should it be static? This patch declares both functions as static, as they are only called by do_stf_barrier_fixups(), which is in the same source code file. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit e3a8379948623e5f03789bbd24055170b6216abd Author: Breno Leitao Date: Mon Oct 22 11:54:16 2018 -0300 powerpc/xmon: Define static functions Currently sparse is complaining about three issues on the xmon code. Two storage classes issues and a dereferencing a 'noderef' pointer. These are the warnings: arch/powerpc/xmon/xmon.c:2783:1: warning: symbol 'dump_log_buf' was not declared. Should it be static? arch/powerpc/xmon/xmon.c:2989:6: warning: symbol 'format_pte' was not declared. Should it be static? arch/powerpc/xmon/xmon.c:2983:30: warning: dereference of noderef expression This patch fixes all of them, turning both functions static and dereferencing a pointer calling rcu_dereference() instead of a straightforward dereference. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 92a4543209d39215e678e81c0d56de07074bbe3a Author: Breno Leitao Date: Mon Oct 22 11:54:15 2018 -0300 powerpc/xive: Define xive_do_source_eoi as static Sparse shows that xive_do_source_eoi() file is defined without any declaration, thus, it should be a static function. arch/powerpc/sysdev/xive/common.c:312:6: warning: symbol 'xive_do_source_eoi' was not declared. Should it be static? This patch simply turns this symbol into static. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit c36c5ffd5173bad377749c136718f3c77d896691 Author: Breno Leitao Date: Mon Oct 22 11:54:13 2018 -0300 powerpc/eeh: Declare pci_ers_result_name() as static Function pci_ers_result_name() is a static function, although not declared as such. This was detected by sparse in the following warning arch/powerpc/kernel/eeh_driver.c:63:12: warning: symbol 'pci_ers_result_name' was not declared. Should it be static? This patch simply declares the function a static. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 42e2acde1237878462b028f5a27d9cc5bea7502c Author: Breno Leitao Date: Mon Oct 22 11:54:12 2018 -0300 powerpc/64s: Include cpu header Current powerpc security.c file is defining functions, as cpu_show_meltdown(), cpu_show_spectre_v{1,2} and others, that are being declared at linux/cpu.h header without including the header file that contains these declarations. This is being reported by sparse, which thinks that these functions are static, due to the lack of declaration: arch/powerpc/kernel/security.c:105:9: warning: symbol 'cpu_show_meltdown' was not declared. Should it be static? arch/powerpc/kernel/security.c:139:9: warning: symbol 'cpu_show_spectre_v1' was not declared. Should it be static? arch/powerpc/kernel/security.c:161:9: warning: symbol 'cpu_show_spectre_v2' was not declared. Should it be static? arch/powerpc/kernel/security.c:209:6: warning: symbol 'stf_barrier' was not declared. Should it be static? arch/powerpc/kernel/security.c:289:9: warning: symbol 'cpu_show_spec_store_bypass' was not declared. Should it be static? This patch simply includes the proper header (linux/cpu.h) to match function definition and declaration. Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman commit 54a21b5c941c3c5eb7478a660b6a3119100b2c8d Merge: ccda4af0f4b92 b2fed34a628df Author: Michael Ellerman Date: Sun Nov 25 17:10:59 2018 +1100 Merge branch 'fixes' into next This contains a few must have fixes, like the stack alignment one. commit 358be656406dce296fafeac7a913ba33e9a66971 Author: Willem de Bruijn Date: Sat Nov 24 21:09:26 2018 -0500 selftests/net: add txring_overwrite Packet sockets with PACKET_TX_RING send skbs with user data in frags. Before commit 5cd8d46ea156 ("packet: copy user buffers before orphan or clone") ring slots could be released prematurely, possibly allowing a process to overwrite data still in flight. This test opens two packet sockets, one to send and one to read. The sender has a tx ring of one slot. It sends two packets with different payload, then reads both and verifies their payload. Before the above commit, both receive calls return the same data as the send calls use the same buffer. From the commit, the clone needed for looping onto a packet socket triggers an skb_copy_ubufs to create a private copy. The separate sends each arrive correctly. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3c18aa1464f9232d6abac8d7b4540f61b0658d62 Author: Colin Ian King Date: Sat Nov 24 15:03:02 2018 +0000 net: qualcomm: rmnet: move null check on dev before dereferecing it Currently dev is dereferenced by the call dev_net(dev) before dev is null checked. Fix this by null checking dev before the potential null pointer dereference. Detected by CoverityScan, CID#1462955 ("Dereference before null check") Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 21ab664aece634ade40ad9d1cca589895e9f9174 Author: YueHaibing Date: Sat Nov 24 18:36:21 2018 +0800 cxgb4: remove set but not used variables 'multitrc, speed' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:5883:6: warning: variable 'multitrc' set but not used [-Wunused-but-set-variable] drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:8585:32: warning: variable 'speed' set but not used [-Wunused-but-set-variable] 'multitrc' never used since introduction in commit 8e3d04fd7d70 ("cxgb4: Add MPS tracing support") 'speed' never used since introduction in commit c3168cabe1af ("cxgb4/cxgbvf: Handle 32-bit fw port capabilities") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 2183435c251e09df11e1b431c84416424b5fd2ac Author: Alexey Dobriyan Date: Sat Nov 24 12:01:41 2018 +0300 net: fixup type in netdev_start_xmit() Return code should be formally "netdev_tx_t". Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c Merge: aea0a897af9e4 d146194f31c96 Author: David S. Miller Date: Sat Nov 24 17:01:43 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit a42facc82c3d5841987b8b363a8a5cc564915c3c Author: Fernando Ramos Date: Thu Nov 15 23:16:29 2018 +0100 docs: drm: remove no longer relevant TODO entry This entry asked to rename all drm core "*_reference/_unrefence" functions to "*_get/_put". Now that this task is complete, we can remove this entry from the TODO list. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-10-greenfoo@gluegarage.com commit 4ddf3737cb076fcc26d097453b06b49ff7f1a48b Author: Fernando Ramos Date: Thu Nov 15 23:16:28 2018 +0100 drm: remove no longer needed drm-get-put coccinelle script The coccinelle script was used to rename some (deprecated) functions which no longer exist now. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Acked-by: Julia Lawall Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-9-greenfoo@gluegarage.com commit 55b446209d041383934308f7f5fc38dee813218e Author: Fernando Ramos Date: Thu Nov 15 23:16:27 2018 +0100 drm: remove deprecated "drm_framebuffer_[un]reference" functions There are no more places where this (deprecated) function is being used from, thus it can now be removed. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-8-greenfoo@gluegarage.com commit 8dd0e9d3aa993af1357e1455602fe6eba2d06741 Author: Fernando Ramos Date: Thu Nov 15 23:16:26 2018 +0100 drm: remove deprecated "drm_connector_[un]reference" functions There are no more places where this (deprecated) function is being used from, thus it can now be removed. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Reviewed-by: Lyude Paul Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-7-greenfoo@gluegarage.com commit 895170ce9205f3f19fb00e54e2a620389bd11038 Author: Fernando Ramos Date: Thu Nov 15 23:16:25 2018 +0100 drm: replace "drm_connector_unreference" with "drm_connector_put" This patch unifies the naming of DRM functions for reference counting as requested on Documentation/gpu/todo.rst Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-6-greenfoo@gluegarage.com commit ba1d345401476a5f7fbad622607c5a1f95e59b31 Author: Fernando Ramos Date: Thu Nov 15 23:16:24 2018 +0100 drm: remove deprecated "drm_dev_unref" function There are no more places where this (deprecated) function is being used from, thus it can now be removed. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-5-greenfoo@gluegarage.com commit 808bad32ea423321bff17178aebfbc507165ab3b Author: Fernando Ramos Date: Thu Nov 15 23:16:23 2018 +0100 drm: replace "drm_dev_unref" function with "drm_dev_put" This patch unifies the naming of DRM functions for reference counting as requested on Documentation/gpu/todo.rst Signed-off-by: Fernando Ramos Acked-by: Boris Brezillon Acked-by: Alexey Brodkin Acked-by: Stefan Agner Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-4-greenfoo@gluegarage.com commit 3e70fd160cf0b1945225eaa08dd2cb8544f21cb8 Author: Fernando Ramos Date: Thu Nov 15 23:16:22 2018 +0100 drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions There are no more places where these (deprecated) functions are being used from, thus they can now be removed. Signed-off-by: Fernando Ramos Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-3-greenfoo@gluegarage.com commit 3103c08f968ddba3fff339a59aba40389b3f724f Author: Takashi Iwai Date: Thu Nov 22 15:22:40 2018 +0100 ALSA: control: Consolidate helpers for adding and replacing ctl elements Both snd_ctl_add() and snd_ctl_replace() process the things in a fairly similar way, and indeed the most of the codes can be unified. This patch is a refactoring to consolidate the both functions to call a single helper with an extra "mode" argument. There should be no functional difference, except for one additional sanity check applied now to snd_ctl_replace() (which was rather overlooking, IMO), too. Signed-off-by: Takashi Iwai commit 5f2ad5942f6b682efe2e35aff58f82568ab8c929 Merge: a8c0d13267a41 e1a7bfe380797 Author: Takashi Iwai Date: Sat Nov 24 20:03:54 2018 +0100 Merge branch 'for-linus' into for-next Pull the user control race fix, so that we can continue working on the code refactoring. Signed-off-by: Takashi Iwai commit 9e314ef35c3844b53a72c588028383e5e678f4d2 Author: Vinod Koul Date: Mon Oct 29 10:09:47 2018 +0530 dmaengine: ste_dma40: remove dma_slave_config direction usage dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul commit 445897cbc9d3e2bcae8a1b3bcf80f69b699eafda Author: Vinod Koul Date: Thu Oct 25 15:26:07 2018 +0100 dmaengine: pl330: remove dma_slave_config direction usage dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul commit 107d06441b709d31ce592535086992799ee51e17 Author: Vinod Koul Date: Thu Oct 25 15:15:28 2018 +0100 dmaengine: imx-sdma: remove dma_slave_config direction usage and leave sdma_event_enable() dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed ENBLn bit should be set before any dma request triggered, please refer to the below information from i.mx6sololite RM. Otherwise, spi/uart test will be fail because there is dma request from tx fifo always before dmaengine_prep_slave_sg() in where ENBLn set and violate the below rule. https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf: 40.8.28 Channel Enable RAM (SDMAARM_CHNENBLn) "It is thus essential for the Arm platform to program them before any DMA request is triggered to the SDMA, otherwise an unpredictable combination of channels may be started". Signed-off-by: Robin Gong [vkoul: sqashed patch from Robin into direction change] Signed-off-by: Vinod Koul commit 7b0c03ecc42fb223baf015877fee9d517c2c8af1 Author: Christian Lamparter Date: Sat Nov 17 17:17:21 2018 +0100 dmaengine: dw-dmac: implement dma protection control setting This patch adds a new device-tree property that allows to specify the dma protection control bits for the all of the DMA controller's channel uniformly. Setting the "correct" bits can have a huge impact on the PPC460EX and APM82181 that use this DMA engine in combination with a DesignWare' SATA-II core (sata_dwc_460ex driver). In the OpenWrt Forum, the user takimata reported that: |It seems your patch unleashed the full power of the SATA port. |Where I was previously hitting a really hard limit at around |82 MB/s for reading and 27 MB/s for writing, I am now getting this: | |root@OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024 |1024+0 records in |1024+0 records out |real 0m 13.65s |user 0m 0.01s |sys 0m 11.89s | |root@OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024 |1024+0 records in |1024+0 records out |real 0m 8.41s |user 0m 0.01s |sys 0m 4.70s | |This means: 121 MB/s reading and 75 MB/s writing! | |The drive is a WD Green WD10EARX taken from an older MBL Single. |I repeated the test a few times with even larger files to rule out |any caching, I'm still seeing the same great performance. OpenWrt is |now completely on par with the original MBL firmware's performance. Another user And.short reported: |I can report that your fix worked! Boots up fine with two |drives even with more partitions, and no more reboot on |concurrent disk access! A closer look into the sata_dwc_460ex code revealed that the driver did initally set the correct protection control bits. However, this feature was lost when the sata_dwc_460ex driver was converted to the generic DMA driver framework. BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/55 BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/50 Fixes: 8b3444852a2b ("sata_dwc_460ex: move to generic DMA driver") Reviewed-by: Andy Shevchenko Signed-off-by: Christian Lamparter Signed-off-by: Vinod Koul commit 538098281ce884a51d2aa4ab445056a41741c6ad Author: Christian Lamparter Date: Sat Nov 17 17:17:20 2018 +0100 dt-bindings: dmaengine: dw-dmac: add protection control property This patch for the DesignWare AHB Central Direct Memory Access Controller adds the dma protection control property: "snps,dma-protection-control" as well as the properties specific values defines into a new include file: include/dt-bindings/dma/dw-dmac.h Note: The protection control signals are one-to-one mapped to the AHB HPROT[1:3] signals for this controller. The HPROT0 (Data Access) is always hardwired to 1. Reviewed-by: Andy Shevchenko Reviewed-by: Rob Herring Signed-off-by: Christian Lamparter Signed-off-by: Vinod Koul commit b9b4ed210380e51f5c5960dcbceedcc0bbe28408 Author: Biju Das Date: Thu Nov 15 11:59:14 2018 +0000 dt-bindings: dmaengine: usb-dmac: Add binding for r8a774a1 This patch adds binding for r8a774a1 (RZ/G2M). Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Vinod Koul commit 9693f670895fe2b439f2c26c2c78e4bba671b1b2 Author: Fabrizio Castro Date: Thu Nov 15 11:58:29 2018 +0000 dmaengine: rcar-dmac: Document R8A774A1 bindings Renesas' RZ/G2M (R8A774A1) SoC has DMA controllers compatible with this driver, therefore document RZ/G2M specific bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Vinod Koul commit 627469e4445b9b12e0229b3bdf8564d5ce384dd7 Author: Jia-Ju Bai Date: Tue Nov 6 11:33:48 2018 +0800 dmaengine: coh901318: Fix a double-lock bug The function coh901318_alloc_chan_resources() calls spin_lock_irqsave() before calling coh901318_config(). But coh901318_config() calls spin_lock_irqsave() again in its definition, which may cause a double-lock bug. Because coh901318_config() is only called by coh901318_alloc_chan_resources(), the bug fix is to remove the calls to spin-lock and -unlock functions in coh901318_config(). Signed-off-by: Jia-Ju Bai Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul commit 32e74aabebc8d045a11452d2de0ac9d2625fcd45 Author: Masahiro Yamada Date: Fri Oct 12 01:41:03 2018 +0900 dmaengine: uniphier-mdmac: add UniPhier MIO DMAC driver The MIO DMAC (Media IO DMA Controller) is used in UniPhier LD4, Pro4, and sLD8 SoCs. Signed-off-by: Masahiro Yamada Signed-off-by: Vinod Koul commit eeea81474bc40402d8037e73ee1751db65f25176 Author: Masahiro Yamada Date: Fri Oct 12 01:41:02 2018 +0900 dt-bindings: dmaengine: add DT binding for UniPhier MIO DMAC The MIO DMAC (Media IO DMA Controller) is used in UniPhier LD4, Pro4, and sLD8 SoCs. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Signed-off-by: Vinod Koul commit 787d3083caf899b8c3abf5a0c7a04e79d77f2c32 Author: Alexandru Ardelean Date: Thu Nov 1 18:07:16 2018 +0200 dmaengine: dmatest: move size checks earlier in function There's no need to allocate all that memory if these sizes are invalid anyway. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul commit fbffb6b4d44f1263390130cb8b35cabc030af3f7 Author: Alexandru Ardelean Date: Mon Oct 29 11:23:36 2018 +0200 dmaengine: dmatest: use dmaengine_terminate_sync() instead The `dmaengine_terminate_all()` is marked as deprecated, so update the test with `dmaengine_terminate_sync()` which is the recommended alternative. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul commit 0255200bd29afc320c6ea4c1adf8bdc13a9b3c15 Author: Alexandru Ardelean Date: Mon Oct 29 12:08:08 2018 +0200 dmaengine: dmatest: unmap data on a single code-path when xfer done After the DMA transfer is done, we don't need to call the un-mapping code in 3 places. One is enough. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul commit aeaebcc17cdf37065d2693865eeb1ff1c7dc5bf3 Author: Nathan Chancellor Date: Thu Oct 25 11:05:25 2018 -0700 dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll Clang warns: drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes] }; __aligned(64) ^ ./include/linux/compiler_types.h:200:38: note: expanded from macro '__aligned' ^ 1 warning generated. As Nick pointed out in the previous version of this patch, the author likely intended for this struct to be 8-byte (64-bit) aligned, not 64-byte, which is the default. Remove the hanging __aligned attribute. Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support") Reported-by: Nick Desaulniers Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Vinod Koul commit af8bf89a8e0b8354576dcaa507c8f2fd4a205742 Author: Fabio Estevam Date: Thu Oct 25 14:52:36 2018 -0300 dmaengine: imx-sdma: Use a single line for dma_alloc_coherent() Make the call to dma_alloc_coherent() to fit into a single line, which helps readability. Signed-off-by: Fabio Estevam Signed-off-by: Vinod Koul commit aea0a897af9e44c258e8ab9296fad417f1bc063a Author: YueHaibing Date: Fri Nov 23 09:54:55 2018 +0800 ptp: Fix pass zero to ERR_PTR() in ptp_clock_register Fix smatch warning: drivers/ptp/ptp_clock.c:298 ptp_clock_register() warn: passing zero to 'ERR_PTR' 'err' should be set while device_create_with_groups and pps_register_source fails Fixes: 85a66e550195 ("ptp: create "pins" together with the rest of attributes") Signed-off-by: YueHaibing Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 06d212900ea9183e707218c04f4e77fc204a4fde Merge: 2eb487c1cf3d9 ab4a16869f256 Author: David S. Miller Date: Fri Nov 23 18:02:24 2018 -0800 Merge branch 'switchdev-blocking-notifiers' Petr Machata says: ==================== switchdev: Convert switchdev_port_obj_{add,del}() to notifiers An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed between the bridge and a front-panel-port device (such as is the case e.g. for LAG devices), so the usual switchdev ops don't reach the driver. VXLAN is likely not the only device type like this: in theory any L2 tunnel device that needs offloading will prompt requirement of this sort. A way to fix this is to give up the notion of port object addition / deletion as a switchdev operation, which assumes somewhat tight coupling between the message producer and consumer. And instead send the message over a notifier chain. The series starts with a clean-up patch #1, where SWITCHDEV_OBJ_PORT_{VLAN, MDB}() are fixed up to lift the constraint that the passed-in argument be a simple variable named "obj". switchdev_port_obj_add and _del are invoked in a context that permits blocking. Not only that, at least for the VLAN notification, being able to signal failure is actually important. Therefore introduce a new blocking notifier chain that the new events will be sent on. That's done in patch #2. Retain the current (atomic) notifier chain for the preexisting notifications. In patch #3, introduce two new switchdev notifier types, SWITCHDEV_PORT_OBJ_ADD and SWITCHDEV_PORT_OBJ_DEL. These notifier types communicate the same event as the corresponding switchdev op, except in a form of a notification. struct switchdev_notifier_port_obj_info was added to carry the fields that correspond to the switchdev op arguments. An additional field, handled, will be used to communicate back to switchdev that the event has reached an interested party, which will be important for the two-phase commit. In patches #4, #5, and #7, rocker, DSA resp. ethsw are updated to subscribe to the switchdev blocking notifier chain, and handle the new notifier types. #6 introduces a helper to determine whether a netdevice corresponds to a front panel port. What these three drivers have in common is that their ports don't support any uppers besides bridge. That makes it possible to ignore any notifiers that don't reference a front-panel port device, because they are certainly out of scope. Unlike the previous three, mlxsw and ocelot drivers admit stacked devices as uppers. While the current switchdev code recursively descends through layers of lower devices, eventually calling the op on a front-panel port device, the notifier would reference a stacking device that's one of front-panel ports uppers. The filtering is thus more complex. For ocelot, such iteration is currently pretty much required, because there's no bookkeeping of LAG devices. mlxsw does keep the list of LAGs, however it iterates the lower devices anyway when deciding whether an event on a tunnel device pertains to the driver or not. Therefore this patch set instead introduces, in patch #8, a helper to iterate through lowers, much like the current switchdev code does, looking for devices that match a given predicate. Then in patches #9 and #10, first mlxsw and then ocelot are updated to dispatch the newly-added notifier types to the preexisting port_obj_add/_del handlers. The dispatch is done via the new helper, to recursively descend through lower devices. Finally in patch #11, the actual switch is made, retiring the current SDO-based code in favor of a notifier. Now that the event is distributed through a notifier, the explicit netdevice check in rocker, DSA and ethsw doesn't let through any events except those done on a front-panel port itself. It is therefore unnecessary to check in VLAN-handling code whether a VLAN was added to the bridge itself: such events will simply be ignored much sooner. Therefore remove it in patch #12. ==================== Signed-off-by: David S. Miller commit ab4a16869f25648570976a4d55923d0c9e7effb8 Author: Petr Machata Date: Thu Nov 22 23:48:05 2018 +0000 rocker, dsa, ethsw: Don't filter VLAN events on bridge itself Due to an explicit check in rocker_world_port_obj_vlan_add(), dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects that are added to a device that is not a front-panel port device are ignored. Therefore this check is immaterial. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit d17d9f5e5143125f9274194d8f7368f76b9d141f Author: Petr Machata Date: Thu Nov 22 23:32:57 2018 +0000 switchdev: Replace port obj add/del SDO with a notification Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_obj_notify() that sends the switchdev notifications SWITCHDEV_PORT_OBJ_ADD and _DEL. Update switchdev_port_obj_del_now() to dispatch to this new function. Drop __switchdev_port_obj_add() and update switchdev_port_obj_add() likewise. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 0e332c854f4118680b6d37b22551f2f16df806d6 Author: Petr Machata Date: Thu Nov 22 23:30:11 2018 +0000 ocelot: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. Dispatch the new events to ocelot_port_obj_add() resp. _del() to maintain the same behavior that the switchdev operation based code currently has. Pass through switchdev_handle_port_obj_add() / _del() to handle the recursive descend, because Ocelot supports LAG uppers. Register to the new switchdev blocking notifier chain to get the new events when they start getting distributed. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 52a227b30eba3ad4b8ac06ad187751ced0295c2a Author: Petr Machata Date: Thu Nov 22 23:29:57 2018 +0000 mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking notifier chain. Dispatch to mlxsw_sp_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Defer to switchdev_handle_port_obj_add() / _del() to handle the recursive descend, because mlxsw supports a number of upper types. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit f30f0601eb934dda107decd2e57b37168096fd74 Author: Petr Machata Date: Thu Nov 22 23:29:44 2018 +0000 switchdev: Add helpers to aid traversal through lower devices After the transition from switchdev operations to notifier chain (which will take place in following patches), the onus is on the driver to find its own devices below possible layer of LAG or other uppers. The logic to do so is fairly repetitive: each driver is looking for its own devices among the lowers of the notified device. For those that it finds, it calls a handler. To indicate that the event was handled, struct switchdev_notifier_port_obj_info.handled is set. The differences lie only in what constitutes an "own" device and what handler to call. Therefore abstract this logic into two helpers, switchdev_handle_port_obj_add() and switchdev_handle_port_obj_del(). If a driver only supports physical ports under a bridge device, it will simply avoid this layer of indirection. One area where this helper diverges from the current switchdev behavior is the case of mixed lowers, some of which are switchdev ports and some of which are not. Previously, such scenario would fail with -EOPNOTSUPP. The helper could do that for lowers for which the passed-in predicate doesn't hold. That would however break the case that switchdev ports from several different drivers are stashed under one master, a scenario that switchdev currently happily supports. Therefore tolerate any and all unknown netdevices, whether they are backed by a switchdev driver or not. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit a39b888863afef5d43d6262d14b2f153ccda3151 Author: Petr Machata Date: Thu Nov 22 23:29:30 2018 +0000 staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. ethsw currently doesn't support any uppers other than bridge. SWITCHDEV_OBJ_ID_HOST_MDB and _PORT_MDB objects are always notified on the bridge port device. Thus the only case that a stacked device could be validly referenced by port object notifications are bridge notifications for VLAN objects added to the bridge itself. But the driver explicitly rejects such notifications in port_vlans_add(). It is therefore safe to assume that the only interesting case is that the notification is on a front-panel port netdevice. To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking notifier chain. Dispatch to swdev_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit bb896805611fae33a67edb20820147b8a9ca68a5 Author: Petr Machata Date: Thu Nov 22 23:29:18 2018 +0000 staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check() ethsw currently uses an open-coded comparison of netdev_ops to determine whether whether a device represents a front panel port. Wrap this into a named function to simplify reuse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 2b239f678079fd8423c3cd7c5b804abadd2fe898 Author: Petr Machata Date: Thu Nov 22 23:29:05 2018 +0000 net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. DSA currently doesn't support any other uppers than bridge. SWITCHDEV_OBJ_ID_HOST_MDB and _PORT_MDB objects are always notified on the bridge port device. Thus the only case that a stacked device could be validly referenced by port object notifications are bridge notifications for VLAN objects added to the bridge itself. But the driver explicitly rejects such notifications in dsa_port_vlan_add(). It is therefore safe to assume that the only interesting case is that the notification is on a front-panel port netdevice. Therefore keep the filtering by dsa_slave_dev_check() in place. To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking notifier chain. Dispatch to rocker_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit c6fa35b2370aeed280fccbc02ff24b94ab48fcf9 Author: Petr Machata Date: Thu Nov 22 23:28:51 2018 +0000 rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. rocker currently doesn't support any uppers other than bridge. Thus the only case that a stacked device could be validly referenced by port object notifications are bridge notifications for VLAN objects added to the bridge itself. But the driver explicitly rejects such notifications in rocker_world_port_obj_vlan_add(). It is therefore safe to assume that the only interesting case is that the notification is on a front-panel port netdevice. Subscribe to the blocking notifier chain. In the handler, filter out notifications on any foreign netdevices. Dispatch the new notifiers to rocker_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit aa4efe21393f5c39a72c132d6e0d777d7405b885 Author: Petr Machata Date: Thu Nov 22 23:28:38 2018 +0000 switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed between the bridge and a front-panel-port device (such as is the case e.g. for LAG devices), so the usual switchdev ops don't reach the driver. VXLAN is likely not the only device type like this: in theory any L2 tunnel device that needs offloading will prompt requirement of this sort. This falsifies the assumption that only the lower devices of a front panel port need to be notified to achieve flawless offloading. A way to fix this is to give up the notion of port object addition / deletion as a switchdev operation, which assumes somewhat tight coupling between the message producer and consumer. And instead send the message over a notifier chain. To that end, introduce two new switchdev notifier types, SWITCHDEV_PORT_OBJ_ADD and SWITCHDEV_PORT_OBJ_DEL. These notifier types communicate the same event as the corresponding switchdev op, except in a form of a notification. struct switchdev_notifier_port_obj_info was added to carry the fields that the switchdev op carries. An additional field, handled, will be used to communicate back to switchdev that the event has reached an interested party, which will be important for the two-phase commit. The two switchdev operations themselves are kept in place. Following patches first convert individual clients to the notifier protocol, and only then are the operations removed. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit a93e3b17227ed8b0db7e44d0302b4da7d07f9a35 Author: Petr Machata Date: Thu Nov 22 23:28:25 2018 +0000 switchdev: Add a blocking notifier chain In general one can't assume that a switchdev notifier is called in a non-atomic context, and correspondingly, the switchdev notifier chain is an atomic one. However, port object addition and deletion messages are delivered from a process context. Even the MDB addition messages, whose delivery is scheduled from atomic context, are queued and the delivery itself takes place in blocking context. For VLAN messages in particular, keeping the blocking nature is important for error reporting. Therefore introduce a blocking notifier chain and related service functions to distribute the notifications for which a blocking context can be assumed. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit ec394af5ea1d8ee62681815d167115ac618bcb42 Author: Petr Machata Date: Thu Nov 22 23:28:07 2018 +0000 switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize The two macros SWITCHDEV_OBJ_PORT_VLAN() and SWITCHDEV_OBJ_PORT_MDB() expand to a container_of() call, yielding an appropriate container of their sole argument. However, due to a name collision, the first argument, i.e. the contained object pointer, is not the only one to get expanded. The third argument, which is a structure member name, and should be kept literal, gets expanded as well. The only safe way to use these two macros is therefore to name the local variable passed to them "obj". To fix this, rename the sole argument of the two macros from "obj" (which collides with the member name) to "OBJ". Additionally, instead of passing "OBJ" to container_of() verbatim, parenthesize it, so that a comma in the passed-in expression doesn't pollute the container_of() invocation. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 2eb487c1cf3d93b3863c1d0987d7a0e1fbd98a4d Merge: fd0fb612155b3 76085c9e7eaeb Author: David S. Miller Date: Fri Nov 23 17:32:29 2018 -0800 Merge branch 'r8169-next' Heiner Kallweit says: ==================== r8169: some functional improvements This series includes a few functional improvements. ==================== Signed-off-by: David S. Miller commit 76085c9e7eaebf0caa2476f77380efc3d55b050c Author: Heiner Kallweit Date: Thu Nov 22 22:03:08 2018 +0100 r8169: replace macro TX_FRAGS_READY_FOR with a function Replace macro TX_FRAGS_READY_FOR with function rtl_tx_slots_avail to make code cleaner and type-safe. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 5317d5c6d47eba1a4aa8316610c64329301f20a4 Author: Heiner Kallweit Date: Thu Nov 22 22:02:00 2018 +0100 r8169: use napi_consume_skb where possible Use napi_consume_skb() where possible to profit from bulk free infrastructure. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 45f1996f4fd8f289e345c7a4157741100febb47d Author: Heiner Kallweit Date: Thu Nov 22 22:00:10 2018 +0100 r8169: simplify detecting chip versions with same XID For the GMII chip versions we set the version number which was set already. This can be simplified. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b4cc2dcc9c7c9cea293d1fa6a7b91876c8f23bdf Author: Heiner Kallweit Date: Thu Nov 22 21:58:48 2018 +0100 r8169: remove default chip versions Even the chip versions within a family have so many differences that using a default chip version doesn't really make sense. Instead of leaving a best case flaky network connectivity, bail out and report the unknown chip version. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 734c140982ac0c8e97d82b66b94032db28996e21 Author: Heiner Kallweit Date: Thu Nov 22 21:56:48 2018 +0100 r8169: remove ancient GCC bug workaround in a second place Remove ancient GCC bug workaround in a second place and factor out rtl_8169_get_txd_opts1. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fd0fb612155b32dde6b06347ce309b7f682b3406 Merge: 53b44cb9220e4 7d9d7f8864bac Author: David S. Miller Date: Fri Nov 23 17:29:00 2018 -0800 Merge branch 'hns3-debugfs' Salil Mehta says: ==================== net: hns3: Adds support of debugfs to HNS3 driver This patchset adds support of debugfs to the HNS3 driver. Support has been added to query info related to below items: 1. Queue related ("echo queue info [queue no] > cmd") 2. Flow Director ("echo dump fd tcam > cmd") 3. TC config ("echo dump tc > cmd") 4. Transmit Module/Scheduler ("echo dump tm > cmd") 5. QoS pause ("echo dump qos pause cfg > cmd") 6. QoS buffer ("echo dump qos pri map > cmd") 7. QoS prio map ("echo dump qos buf cfg > cmd") NOTE: Above commands are *read-only* and are only intended to query the information from the SoC(and dump inside the kernel, for now) and in no way tries to perform write operations for the purpose of configuration etc. Change Log ---------- V1-->V2: * Addressed the comments provided by Jakub Kicinski. 1. Removed the .rej files mistakenly made part of Flow Director patch. Link: https://lkml.org/lkml/2018/11/20/249 2. Added command summary in the cover letter Link: https://lkml.org/lkml/2018/11/22/1 ==================== Signed-off-by: David S. Miller commit 7d9d7f8864bacdf5afd68daa737f4f082fd724c8 Author: liuzhongzhu Date: Thu Nov 22 14:09:48 2018 +0000 net: hns3: Add "qos buffer" config info query function This patch prints qos buffer config information. debugfs command: echo dump qos buf cfg > cmd Sample Command: root@(none)# echo dump qos buf cfg > cmd hns3 0000:7d:00.0: dump qos buf cfg hns3 0000:7d:00.0: tx_packet_buf_tc_0: 0x1aa hns3 0000:7d:00.0: tx_packet_buf_tc_1: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_2: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_3: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_4: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_5: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_6: 0x0 hns3 0000:7d:00.0: tx_packet_buf_tc_7: 0x0 hns3 0000:7d:00.0: hns3 0000:7d:00.0: rx_packet_buf_tc_0: 0x130 hns3 0000:7d:00.0: rx_packet_buf_tc_1: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_2: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_3: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_4: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_5: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_6: 0x0 hns3 0000:7d:00.0: rx_packet_buf_tc_7: 0x0 hns3 0000:7d:00.0: rx_share_buf: 0x1e0e root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 6fc2244057b0edf77d697a172e0cd6be97344de5 Author: liuzhongzhu Date: Thu Nov 22 14:09:47 2018 +0000 net: hns3: Add "qos prio map" info query function This patch prints qos priority map information. debugfs command: echo dump qos pri map > cmd Sample Command: root@(none)# echo dump qos pri map > cmd hns3 0000:7d:00.0: dump qos pri map hns3 0000:7d:00.0: vlan_to_pri: 0x0 hns3 0000:7d:00.0: pri_0_to_tc: 0x0 hns3 0000:7d:00.0: pri_1_to_tc: 0x0 hns3 0000:7d:00.0: pri_2_to_tc: 0x0 hns3 0000:7d:00.0: pri_3_to_tc: 0x0 hns3 0000:7d:00.0: pri_4_to_tc: 0x0 hns3 0000:7d:00.0: pri_5_to_tc: 0x0 hns3 0000:7d:00.0: pri_6_to_tc: 0x0 hns3 0000:7d:00.0: pri_7_to_tc: 0x0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d958919dc15c9e315df7d28d08d3ab6f3b909a32 Author: liuzhongzhu Date: Thu Nov 22 14:09:46 2018 +0000 net: hns3: Add "qos pause" config info query function This patch prints qos pause config information. debugfs command: echo dump qos pause cfg > cmd Sample Command: root@(none)# echo dump qos pause cfg > cmd hns3 0000:7d:00.0: dump qos pause cfg hns3 0000:7d:00.0: pause_trans_gap: 0xff hns3 0000:7d:00.0: pause_trans_time: 0xffff root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 96227f4cd701ffb60b66ad22b0ff716bfe3e1317 Author: liuzhongzhu Date: Thu Nov 22 14:09:45 2018 +0000 net: hns3: Add "tm config" info query function This patch prints Transmit Module's Traffic sched related config information. debugfs command: echo dump tm > cmd Sample output: root@(none)# echo dump tm > cmd hns3 0000:7d:00.0: dump tm hns3 0000:7d:00.0: PG_TO_PRI gp_id: 0 hns3 0000:7d:00.0: PG_TO_PRI map: 0x1 hns3 0000:7d:00.0: QS_TO_PRI qs_id: 0 hns3 0000:7d:00.0: QS_TO_PRI priority: 0 hns3 0000:7d:00.0: QS_TO_PRI link_vld: 1 hns3 0000:7d:00.0: NQ_TO_QS nq_id: 0 hns3 0000:7d:00.0: NQ_TO_QS qset_id: 1024 hns3 0000:7d:00.0: PG pg_id: 0 hns3 0000:7d:00.0: PG dwrr: 100 hns3 0000:7d:00.0: QS qs_id: 0 hns3 0000:7d:00.0: QS dwrr: 100 hns3 0000:7d:00.0: PRI pri_id: 0 hns3 0000:7d:00.0: PRI dwrr: 100 hns3 0000:7d:00.0: PRI_C pri_id: 0 hns3 0000:7d:00.0: PRI_C pri_shapping: 0x2850000 hns3 0000:7d:00.0: PRI_P pri_id: 0 hns3 0000:7d:00.0: PRI_P pri_shapping: 0x2850796 hns3 0000:7d:00.0: PG_C pg_id: 0 hns3 0000:7d:00.0: PG_C pg_shapping: 0x2850000 hns3 0000:7d:00.0: PG_P pg_id: 0 hns3 0000:7d:00.0: PG_P pg_shapping: 0x2850496 hns3 0000:7d:00.0: PORT port_shapping: 0x2850296 hns3 0000:7d:00.0: PG_SCH pg_id: 0 hns3 0000:7d:00.0: PRI_SCH pg_id: 0 hns3 0000:7d:00.0: QS_SCH pg_id: 0 hns3 0000:7d:00.0: BP_TO_QSET pg_id: 0 hns3 0000:7d:00.0: BP_TO_QSET pg_shapping: 0x0 hns3 0000:7d:00.0: BP_TO_QSET qs_bit_map: 0x0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 2849d4e7a1beb483e9ebab3904f03010c0bc1daf Author: liuzhongzhu Date: Thu Nov 22 14:09:44 2018 +0000 net: hns3: Add "tc config" info query function This patch prints tc config information. debugfs command: echo dump tc > cmd Sample Output: root@(none)# echo dump tc > cmd hns3 0000:7d:00.0: weight_offset: 14 hns3 0000:7d:00.0: tc(0): no sp mode hns3 0000:7d:00.0: tc(1): no sp mode hns3 0000:7d:00.0: tc(2): no sp mode hns3 0000:7d:00.0: tc(3): no sp mode hns3 0000:7d:00.0: tc(4): no sp mode hns3 0000:7d:00.0: tc(5): no sp mode hns3 0000:7d:00.0: tc(6): no sp mode hns3 0000:7d:00.0: tc(7): no sp mode root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 3c666b586af1c6ed6e352555aec38d2f9478cd47 Author: liuzhongzhu Date: Thu Nov 22 14:09:43 2018 +0000 net: hns3: Add "FD flow table" info query function All the Flow Director rules are stored in tcam blocks. For each bit of tcam entry, the match value depends on two input value(x, y). debugfs command: echo dump fd tcam > cmd Sample output: root@(none)# echo dump fd tcam > cmd hns3 0000:7d:00.0: read result tcam key x(31): hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 08000000 hns3 0000:7d:00.0: 00000600 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: read result tcam key y(31): hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: f7ff0000 hns3 0000:7d:00.0: 0000f900 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 00000000 hns3 0000:7d:00.0: 0000fff8 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 57ceee2ca71c653de7bf644a54a186a50105c5ac Author: liuzhongzhu Date: Thu Nov 22 14:09:42 2018 +0000 net: hns3: Add "queue info" query function Query the queue information of the current NIC such as BD size, queue header and tail pointer. This patch adds support for debugfs command: echo queue info 1 > cmd it can print queue config information... root@(none)# echo queue info 1 > cmd hns3 0000:7d:00.0: queue info hns3 0000:7d:00.0: RX(1) BASE ADD: 0x00000000ffb58000 hns3 0000:7d:00.0: RX(1) RING BD NUM: 127 hns3 0000:7d:00.0: RX(1) RING BD LEN: 2 hns3 0000:7d:00.0: RX(1) RING TAIL: 120 hns3 0000:7d:00.0: RX(1) RING HEAD: 0 hns3 0000:7d:00.0: RX(1) RING FBDNUM: 0 hns3 0000:7d:00.0: RX(1) RING PKTNUM: 0 hns3 0000:7d:00.0: TX(1) BASE ADD: 0x00000000fffd8000 hns3 0000:7d:00.0: TX(1) RING BD NUM: 127 hns3 0000:7d:00.0: TX(1) RING TC: 0 hns3 0000:7d:00.0: TX(1) RING TAIL: 2 hns3 0000:7d:00.0: TX(1) RING HEAD: 2 hns3 0000:7d:00.0: TX(1) RING FBDNUM: 0 hns3 0000:7d:00.0: TX(1) RING OFFSET: 0 hns3 0000:7d:00.0: TX(1) RING PKTNUM: 0 root@(none)# Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit b2292360bb2ae50be043c3806e84210f9027f6eb Author: liuzhongzhu Date: Thu Nov 22 14:09:41 2018 +0000 net: hns3: Add debugfs framework registration Add the debugfs framework to the driver and create a debugfs command interface for each device. example command: "echo queue info > cmd" Query the packet forwarding queue information. Signed-off-by: liuzhongzhu Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 53b44cb9220e4ff7e3c091d91c94b2872b2f62d1 Author: YueHaibing Date: Thu Nov 22 21:27:19 2018 +0800 net: cavium: clean up return value check in cavium_ptp_probe ptp_clock_register never return NULL, so no need check this in cavium_ptp_probe. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 21f49468466a41340ea389c25770dd38b7cbc748 Author: Quentin Schulz Date: Thu Nov 22 14:24:32 2018 +0100 net: phy: vitesse: remove duplicate support for VSC8574 A more featureful support for VSC8574 was recently added to the Microsemi (mscc.c) driver. I checked that features supported in the Vitesse driver are also supported in the Microsemi driver. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller commit 0cb98e8427b696d55125541cacfb98708ce2b201 Merge: e159e592872ed d3b2b9ab1ef2c Author: David S. Miller Date: Fri Nov 23 17:23:26 2018 -0800 Merge branch 'octeontx2-af-CGX-LMAC-link-bringup-and-cleanups' Linu Cherian says: ==================== octeontx2-af: CGX LMAC link bringup and cleanups Patch 1: Code cleanup Patch 2: Adds support for an unhandled hardware configuration Patch 3: Preparatory patch for enabling cgx lmac links Patch 4: Support for enabling cgx lmac links ==================== Signed-off-by: David S. Miller commit d3b2b9ab1ef2ca1d883f3729ceb54503193b7958 Author: Linu Cherian Date: Thu Nov 22 17:18:37 2018 +0530 octeontx2-af: Bringup CGX LMAC links by default - Added new CGX firmware interface API for sending link up/down commands - Do link up for cgx lmac ports by default at the time of CGX driver probe. Since cgx link up in driver probe affects the Linux boot time, linkup procedure is kept threaded using workqueues. For this, a new cgx API cgx_lmac_linkup_start has been added. Signed-off-by: Linu Cherian Signed-off-by: David S. Miller commit c929323609aefdd6da40d02860c2d59fb4a9d421 Author: Linu Cherian Date: Thu Nov 22 17:18:36 2018 +0530 octeontx2-af: Unregister cgx event callbacks gracefully Added provision to unregister cgx event callbacks. This enables the exit path to ensure event callbacks are unregistered before workqueues get destroyed. Signed-off-by: Linu Cherian Signed-off-by: David S. Miller commit 12e4c9ab2eb3244f9f90b595bb4b988e4d423c62 Author: Linu Cherian Date: Thu Nov 22 17:18:35 2018 +0530 octeontx2-af: Handle non-contiguous CGX LMAC interfaces For this, cgx_id(struct cgx) definition has been changed to reflect cgx port id instead of device instance id. Now cgx_id can be directly used as channel offset for NPC configuration. Assumptions on contiguous cgx port ids has been removed from nix_calibrate_x2p as well. As a side effect, allocation of conversion tables that were based on cgx count are changed to cgx port id max value. Tables would return NULL for invalid cgx ports. Signed-off-by: Linu Cherian Signed-off-by: David S. Miller commit 44990aaa939439cfd151435e5dcd965494ace8b0 Author: Linu Cherian Date: Thu Nov 22 17:18:34 2018 +0530 octeontx2-af: Misc cleanups in cgx driver * Do CGX init before NIX init This would add consistency in NIX code that depends on cgx ports * Few other misc cleanups - rvu_cgx_probe renamed as rvu_cgx_init for consistency - rvu_cgx_exit wrapper added to take care of the exit path - Added error check on cgx_lmac_event_handler_init - Minor cleanups in cgx.h related to tab alignment - Removed redundant ids from enum cgx_cmd_id Signed-off-by: Linu Cherian Signed-off-by: David S. Miller commit e159e592872edc0536f55ec242dbc5b70a593265 Author: Colin Ian King Date: Thu Nov 22 10:05:01 2018 +0000 net: hinic: fix null pointer dereference on pointer hwdev Pointer hwdev is being dereferenced when declaring hwif , however, later on hwdev is being null checked, hence we have dereference before null check error. Fix this by assigning hwif and pdef only once hwdev has been null checked. Detected by CoverityScan, CID#1485581 ("Dereference before null check") Fixes: 4a61abb100c8 ("net-next/hinic:add rx checksum offload for HiNIC") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit b0c4b041e37c7972f42349cb75a1dab68f234b5b Merge: e4a3e9ff5ba9f c7674c001b114 Author: David S. Miller Date: Fri Nov 23 17:20:33 2018 -0800 Merge branch 'smc-next' Ursula Braun says: ==================== net/smc: patches 2018-11-22 here are more patches for SMC: * patches 1-3 and 7 are cleanups without functional change * patches 4-6 and 8 are optimizations of existing code * patches 9 and 10 introduce and exploit LLC message DELETE RKEY ==================== Signed-off-by: David S. Miller commit c7674c001b1143a5bc6b36efc7adc4bdd8ff5e76 Author: Karsten Graul Date: Thu Nov 22 10:26:43 2018 +0100 net/smc: unregister rkeys of unused buffer When an rmb is no longer in use by a connection, unregister its rkey at the remote peer with an LLC DELETE RKEY message. With this change, unused buffers held in the buffer pool are no longer registered at the remote peer. They are registered before the buffer is actually used and unregistered when they are no longer used by a connection. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 60e03c62c5db22c5eb63bcb6ce226cf05f4ee47c Author: Karsten Graul Date: Thu Nov 22 10:26:42 2018 +0100 net/smc: add infrastructure to send delete rkey messages Add the infrastructure to send LLC messages of type DELETE RKEY to unregister a shared memory region at the peer. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 4600cfc302f70f2b4d89818b4d4c79bd19e5ab87 Author: Karsten Graul Date: Thu Nov 22 10:26:41 2018 +0100 net/smc: avoid a delay by waiting for nothing When a send failed then don't start to wait for a response in smc_llc_do_confirm_rkey. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 587e41dcea357a1ac15e3b31d800900e1c585d7e Author: Ursula Braun Date: Thu Nov 22 10:26:40 2018 +0100 net/smc: cleanup listen worker mutex unlocking For easier reading move the unlock of mutex smc_create_lgr_pending into smc_listen_work(), i.e. into the function the mutex has been locked. No functional change. Reported-by: Dan Carpenter Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 2b59f58e34e78abec2bccd2413ae9e7ea509a855 Author: Ursula Braun Date: Thu Nov 22 10:26:39 2018 +0100 net/smc: short wait for late smc_clc_wait_msg After sending one of the initial LLC messages CONFIRM LINK or ADD LINK, there is already a wait for the LLC response. It does not make sense to wait another long time for a CLC DECLINE. Thus this patch introduces a shorter wait time for these cases. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 90d8b29cb4b251cd874aa00a50d11b28a7322986 Author: Ursula Braun Date: Thu Nov 22 10:26:38 2018 +0100 net/smc: no link delete for a never active link If a link is terminated that has never reached the active state, there is no need to trigger an LLC DELETE LINK. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 9ed28556a388fdb894bdf9bd64c05cf6e7783ba3 Author: Ursula Braun Date: Thu Nov 22 10:26:37 2018 +0100 net/smc: allow fallback after clc timeouts If connection initialization fails for the LLC CONFIRM LINK or the LLC ADD LINK step, fallback to TCP should be enabled. Thus the negative return code -EAGAIN should switch to a positive timeout reason code in these cases, and the internal CLC socket should not have a set sk_err. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 6ae36bff3f511d8b24ebbc126e3f1f23ac202ef4 Author: Ursula Braun Date: Thu Nov 22 10:26:36 2018 +0100 net/smc: remove sock_error detour in clc-functions There is no need to store the return value in sk_err, if it is afterwards cleared again with sock_error(). This patch sets the return value directly. Just cleanup, no functional change. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 3f3f0e364eb8ca18366e462f65dfe303f7449a6f Author: Ursula Braun Date: Thu Nov 22 10:26:35 2018 +0100 net/smc: make smc_lgr_free() static smc_lgr_free() is just called inside smc_core.c. Make it static. Just cleanup, no functional change. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 263ffaeef174cc3adb51c87d6bb383d7af0199e7 Author: Ursula Braun Date: Thu Nov 22 10:26:34 2018 +0100 net/smc: cleanup tcp_listen_worker initialization The tcp_listen_worker is already initialized when socket is created (in smc_sock_alloc()). Get rid of the duplicate initialization in smc_listen(). No functional change. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit e4a3e9ff5ba9f6b67595ec2768ed4be2054c2aa5 Author: YueHaibing Date: Thu Nov 22 14:42:00 2018 +0800 net: mvneta: remove redundant check for eee->tx_lpi_timer < 0 fixes the smatch warning: drivers/net/ethernet/marvell/mvneta.c:4252 mvneta_ethtool_set_eee() warn: unsigned 'eee->tx_lpi_timer' is never less than zero. Signed-off-by: YueHaibing Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller commit 197c2dac74e4ae3158ad10f848c5402236d6b176 Author: David Calavera Date: Thu Nov 22 12:59:45 2018 -0800 bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to bpftool-map I noticed that these two new BPF Maps are not defined in bpftool. This patch defines those two maps and adds their names to the bpftool-map documentation. Signed-off-by: David Calavera Signed-off-by: Daniel Borkmann commit 5a863813216ce79e16a8c1503b2543c528b778b6 Author: Daniel T. Lee Date: Fri Nov 23 07:14:32 2018 +0900 samples: bpf: fix: error handling regarding kprobe_events Currently, kprobe_events failure won't be handled properly. Due to calling system() indirectly to write to kprobe_events, it can't be identified whether an error is derived from kprobe or system. // buf = "echo '%c:%s %s' >> /s/k/d/t/kprobe_events" err = system(buf); if (err < 0) { printf("failed to create kprobe .."); return -1; } For example, running ./tracex7 sample in ext4 partition, "echo p:open_ctree open_ctree >> /s/k/d/t/kprobe_events" gets 256 error code system() failure. => The error comes from kprobe, but it's not handled correctly. According to man of system(3), it's return value just passes the termination status of the child shell rather than treating the error as -1. (don't care success) Which means, currently it's not working as desired. (According to the upper code snippet) ex) running ./tracex7 with ext4 env. # Current Output sh: echo: I/O error failed to open event open_ctree # Desired Output failed to create kprobe 'open_ctree' error 'No such file or directory' The problem is, error can't be verified whether from child ps or system. But using write() directly can verify the command failure, and it will treat all error as -1. So I suggest using write() directly to 'kprobe_events' rather than calling system(). Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann commit 47ae7e3d0be539c6af83b7b349ece31a18001aa6 Author: Nikita V. Shirokov Date: Fri Nov 23 12:58:12 2018 -0800 libbpf: make bpf_object__open default to UNSPEC currently by default libbpf's bpf_object__open requires bpf's program to specify version in a code because of two things: 1) default prog type is set to KPROBE 2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified in this patch i'm changing default prog type to UNSPEC and also changing requirments for version's section to be present in object file. now it would reflect what we have today in kernel (only KPROBE prog type requires for version to be explicitly set). v1 -> v2: - RFC tag has been dropped Signed-off-by: Nikita V. Shirokov Signed-off-by: Daniel Borkmann commit 9af8009082c73492c24a46494c1a29b506b3ad86 Merge: 42519ede4fde2 6ed4babed9cc7 Author: David S. Miller Date: Fri Nov 23 11:33:54 2018 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-11-21 This series contains updates to all of the Intel LAN drivers and documentation. Shannon Nelson updates the ixgbe kernel documentation to include IPsec hardware offload. Joe Perches cleans up whitespace issues in the igb driver. Jesse update the netdev kernel documentation for NETIF_F_GSO_UDP_L4 to align with the actual code. Also aligned all the NAPI driver code for all of the Intel drivers to implement the recommendations of Eric Dumazet to check the return code of the napi_complete_done() to determine whether or not to enable interrupts or exit poll. Paul E. McKenney replaces synchronize_sched() with synchronize_rcu() for ixgbe. Sasha implements suggestions made by Joe Perches to remove obsolete code and to use the dev_err() method. ==================== Signed-off-by: David S. Miller commit 42519ede4fde2a50919215933e0f02c8342aba0f Author: Eric Dumazet Date: Wed Nov 21 11:39:28 2018 -0800 net-gro: use ffs() to speedup napi_gro_flush() We very often have few flows/chains to look at, and we might increase GRO_HASH_BUCKETS to 32 or 64 in the future. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d72ff4b4eaa21922218b28b8f44ed119d4a5e543 Merge: 2882b06ddaa5f 10f70e9432311 Author: David S. Miller Date: Fri Nov 23 11:17:07 2018 -0800 Merge branch 'dpaa-coalesce' Madalin Bucur says: ==================== dpaa_eth: add ethtool coalesce control Add control of the DPAA portal interrupt coalescing settings from ethtool. changes from v2: read ithresh from HW, set previous values on failure changes from v1: added range checking for the QMan APIs ==================== Signed-off-by: David S. Miller commit 10f70e9432311540ac252037f9fa7d068e81fbe2 Author: Madalin Bucur Date: Wed Nov 21 13:41:09 2018 +0200 dpaa_eth: add ethtool coalesce control Allow ethtool control of the DPAA QMan portal interrupt coalescing settings. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 5c664ace8cdfd947d293b97871a4f1e4bedca5b9 Author: Madalin Bucur Date: Wed Nov 21 13:41:08 2018 +0200 soc/qman: add return value to interrupt coalesce changing APIs Check that the values received by the portal interrupt coalesce change APIs are in range. Signed-off-by: Madalin Bucur Signed-off-by: Roy Pledge Signed-off-by: David S. Miller commit 830b61ba4ee2b7a33cac160d55275513b1ba4eea Author: Madalin Bucur Date: Wed Nov 21 13:41:07 2018 +0200 soc: fsl: qbman: read ithresh from HW Read the DQRR interrupt threshold directly from the hardware. Signed-off-by: Madalin Bucur Signed-off-by: Roy Pledge Signed-off-by: David S. Miller commit 2882b06ddaa5fbfaf1e65c1beaed8819fb7a0440 Merge: 02d805dc5fe34 08b43857804dd Author: David S. Miller Date: Fri Nov 23 11:14:48 2018 -0800 Merge branch 'ravb-Duplex-handling-update-V3' Magnus Damm says: ==================== ravb: Duplex handling update V3 [PATCH v3 01/02] ravb: Do not announce HDX as supported [PATCH v3 02/02] ravb: Clean up duplex handling This series is V3 of duplex handling improvements for the Ethernet-AVB driver. Previous versions of this series have been posted to linux-renesas-soc as RFC so V3 is the first actual version to make it to netdev. Based on the latest data sheet for R-Car Gen3 [1] and R-Car Gen2 [2] the following information is part of the EthernetAVB-IF overview page: Transfer speed: Supports transfer at 100 and 1000 Mbps Mode: Full-duplex mode It seems that the driver implementation is not matching the information provided in the friendly data sheet, and on top of this during run-time when changing PHY configuration of the link partner the Ethernet-AVB PHY seems to want to announce unsupported modes. [1] R-Car Series, 3rd Generation Rev.1.00 (Apr 2018) [2] R-Car Series, 2nd Generation Rev.2.00 (Feb 2016) Changes since V2: - Updated patch 1/2 to make use of phy_remove_link_mode() - Added Reviewed-by from Sergei - thanks! Changes since V1: - Updated patches to reflect input from Sergei and Geert - thanks! ==================== Signed-off-by: David S. Miller commit 08b43857804dd0eca48f5c5a84885cf0079586e0 Author: Magnus Damm Date: Wed Nov 21 20:21:26 2018 +0900 ravb: Clean up duplex handling Since only full-duplex operation is supported by the hardware, remove duplex handling code and keep the register setting of ECMR.DM fixed at 1. This updates the driver implementation to follow the data sheet text "This bit should always be set to 1." Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Magnus Damm Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit ebc227fd91f26406840543074c2e7a55700a5644 Author: Magnus Damm Date: Wed Nov 21 20:21:17 2018 +0900 ravb: Do not announce HDX as supported According to the data sheet the Ethernet-AVB hardware in R-Car Gen3 and R-Car Gen2 SoCs do not support half duplex operation. So update the driver to mark 100Mbit and 1Gbps HDX as unsupported. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Magnus Damm Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 02d805dc5fe34358b8a5e9fc141031a40cd496ed Author: Santosh Rastapur Date: Wed Nov 21 13:40:24 2018 +0530 cxgb4: use new fw interface to get the VIN and smt index If the fw supports returning VIN/VIVLD in FW_VI_CMD save it in port_info structure else retrieve these from viid and save them in port_info structure. Do the same for smt_idx from FW_VI_MAC_CMD Signed-off-by: Santosh Rastapur Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 24d476db6dfb0f85130e348ca1bbd14afb73a8be Author: Doug Berger Date: Tue Nov 20 15:17:01 2018 -0800 net: bcmgenet: remove HFB_CTRL access Commit c5a54bbcecec ("net: bcmgenet: abort suspend on error") mistakenly introduced register accesses that should not occur in bcmgenet_wol_power_up_cfg(). Fixes: c5a54bbcecec ("net: bcmgenet: abort suspend on error") Signed-off-by: Doug Berger Signed-off-by: David S. Miller commit 708d75fe1c7c6e9abc5381b6fcc32b49830383d0 Author: Mauro Carvalho Chehab Date: Fri Nov 23 12:10:57 2018 -0500 media: dvb-pll: don't re-validate tuner frequencies The dvb_frontend core already checks for the frequencies. No need for any additional check inside the driver. It is part of the fixes for the following bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1116374 Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz") Reported-by: Stakanov Schufter Reported-by: Takashi Iwai Cc: stable@vger.kernel.org # For 4.19 Signed-off-by: Mauro Carvalho Chehab commit a1d88fe498480c3458d668ee23273e5cea16d99b Author: Mauro Carvalho Chehab Date: Tue Nov 20 05:19:36 2018 -0500 media: dvb-pll: fix tuner frequency ranges Tuners should report frequencies in Hz. That works fine on most drivers, but, in the case of dvb-pll, some settings are for satellite tuners, while others are for terrestrial/cable ones. The code was trying to solve it at probing time, but that doesn't work, as, when _attach is called, the delivery system may be wrong. Fix it by ensuring that all frequencies are in Hz at the per-tuner max/min values. While here, add a debug message, as this would help to debug any issues there. It partially fixes the following bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1116374 Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz") Reported-by: Stakanov Schufter Reported-by: Takashi Iwai Cc: stable@vger.kernel.org # For 4.19 Signed-off-by: Mauro Carvalho Chehab commit 00ecd6bc7128e41da4f7d00b9e204f9f89287fad Author: Mauro Carvalho Chehab Date: Tue Nov 20 05:19:35 2018 -0500 media: dvb_frontend: add debug message for frequency intervals As we did an internal change inside the subsystem to always represent min/max frequencies in Hz, add a debug message, as this would help to discover bugs on drivers, if any. Signed-off-by: Mauro Carvalho Chehab commit 807b8675a67bbdbe8cf5e80bbdd02a04b8421dc4 Author: Mauro Carvalho Chehab Date: Tue Nov 20 05:19:34 2018 -0500 media: dvb_frontend: don't print function names twice The dvb_frontend dprintk() macro already prints __func__. So, we don't need to add it again at the printed message. Signed-off-by: Mauro Carvalho Chehab commit 6de8e717848f1b07b05f1b512dd6b8552677d958 Author: Vasily Khoruzhick Date: Thu Nov 22 18:23:25 2018 +0800 arm64: dts: allwinner: a64: enable sound on Pinebook The Pinebook has a headphone jack tied to the HP headphone output of the SoC, and internal speakers connected to the LINEOUT of the SoC, through a standalone amplifier. This commit enables I2S, digital and analog parts of audio codec on Pinebook, along with a device node for the external amplifier. Signed-off-by: Vasily Khoruzhick [wens@csie.org: dropped headphone_amp; added headphone amp regulator supply; fixed speaker_amp node name and sound-name-prefix name] Acked-by: Maxime Ripard Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit 498c21f233ed0bd643b5f11ecc19dc8727231c7e Author: Vasily Khoruzhick Date: Thu Nov 22 18:23:24 2018 +0800 arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine This commit enables I2S, digital and analog parts of audiocodec on Pine64 and SoPine boards. Signed-off-by: Vasily Khoruzhick [wens@csie.org: Dropped headphone_amp; added headphone amp regulator supply] Acked-by: Maxime Ripard Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit ec4a95409d5c28962e0097e8291aa7048f8b262a Author: Vasily Khoruzhick Date: Thu Nov 22 18:23:23 2018 +0800 arm64: dts: allwinner: a64: add nodes necessary for analog sound support Add nodes for i2s, digital and analog parts of audiocodec on A64. The routing paths listed are entries connecting the digital and analog side of the audio codec together. Due to how device tree works, these must be copied over to each board device tree, in addition to any board level routes. The oversampling rate is set to 128, so that when playing back 192 kHz audio samples, the MCLK runs at the same rate as the module clock, at 24.576 MHz. The user manual suggests using different oversampling rates for different sample rates, but that's not possible without a platform-specific machine driver. Signed-off-by: Vasily Khoruzhick [wens@csie.org: Lowered oversampling rate to 128; expanded commit message] Acked-by: Maxime Ripard Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit 5e06aa50524b45a834b1f22b3160b93fb3adabc4 Author: Chen-Yu Tsai Date: Thu Nov 22 18:23:22 2018 +0800 clk: sunxi-ng: sun50i: a64: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for some SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can port the settings for H3 onto the A64. Acked-by: Maxime Ripard Tested-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai commit f4b614adbf3aceaa4dab034665c379352777de39 Author: Colin Ian King Date: Mon Nov 19 16:34:00 2018 +0000 drivers: usb: early: clean up indentation, remove extraneous tabs There is a hunk of code that is indented too much by one level, fix this by removing the extraneous tabs. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 18557feccfbf96dd6d4a62723904927064ad3592 Author: Colin Ian King Date: Mon Nov 19 16:43:54 2018 +0000 USB: ene_usb6250: add missing indentation There is a missing indentation before the return statement. Add it. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit a8c0d13267a4151b2ff124cde6331ec28ed0d55e Author: Takashi Sakamoto Date: Fri Nov 23 13:13:07 2018 +0900 ALSA: firewire-tascam: notify events of change of state for userspace applications In former commits, ALSA firewire-tascam driver queues events to notify change of state of control surface to userspace via ALSA hwdep interface. This commit implements actual notification of the events. The events are not governed by real time, thus no need to care underrun. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit afb8e2daa031b39900488515a73c0998491ac4b8 Author: Takashi Sakamoto Date: Fri Nov 23 13:13:06 2018 +0900 ALSA: firewire-tascam: apply small refactoring to handle several type of event for hwdep interface In later commits, ALSA firewire-tascam driver will allow userspace applications to receive notifications about changes of device state, transferred in tx isochronous packet. At present, all of drivers in ALSA firewire stack have mechanism to notify change of status of packet streaming, thus it needs to distinguish these two types of notification. This commit is a preparation for the above. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit d7167422433cdb61e58baee9c25543d0eba95c9d Author: Takashi Sakamoto Date: Fri Nov 23 13:13:05 2018 +0900 ALSA: firewire-tascam: queue events for change of control surface Units of TASCAM FireWire series transfer image of states of the unit in tx isochronous packets. Demultiplexing of the states from the packets is done in software interrupt context regardless of any process context. In a view of userspace applications, it needs to have notification mechanism to catch change of the states. This commit implements a queue to store events for the notification. The image of states includes fluctuating data such as level of gain/volume for physical input/output and position of knobs. Therefore the events are queued corresponding to some control features only. Furthermore, the queued events are planned to be consumed by userspace applications via ALSA hwdep interface. This commit suppresses event queueing when no applications open the hwdep interface. However, the queue is maintained in an optimistic scenario, thus without any care against overrrun. This is reasonable because target events are useless just to handle PCM frames. It starts queueing when an usespace application opens hwdep interface, thus it's expected to read the queued events steadily. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 90e8ac5c9d446124a5b43a6f135bf67e060c0c9d Author: Takashi Sakamoto Date: Fri Nov 23 13:13:04 2018 +0900 ALSA: firewire-tascam: add new hwdep ioctl command to get state image In a previous commit, ALSA firewire-tascam driver stores state image from tx isochronous packets. This image includes states of knob, fader, button of control surface, level of gain/volume of each physical inputs/outputs, and so on. It's useful for userspace applications to read whole of the image. This commit adds a unique ioctl command for ALSA hwdep interface for the purpose. For actual meaning of each bits in this image, please refer to discussion in alsa-devel[1]. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-October/140785.html Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 33b2e1442aeaacabb4e29f8adb31469e87599b16 Author: Takashi Sakamoto Date: Fri Nov 23 13:13:03 2018 +0900 ALSA: firewire-tascam: pick up data of state from tx isochronous pakcets Units of TASCAM FireWire series multiplex PCM frames and state of control surface into the same tx isochronous packets. One isochronous packet includes a part of the state in a quadlet data. An image of the state consists of 64 quadlet data. This commit demultiplexes the state from tx isochronous packets. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit a7d19b05ce817d60ae672c4c112e77892978dc3c Author: Martin Blumenstingl Date: Thu Nov 22 22:40:17 2018 +0100 clk: meson: meson8b: add the CPU clock post divider clocks There are four CPU clock post dividers: - ABP - PERIPH (used for the ARM global timer and ARM TWD timer) - AXI - L2 DRAM Each of these clocks consists of two clocks: - a mux to select between "cpu_clk" divided by 2, 3, 4, 5, 6, 7 or 8 - a "_clk_dis" gate. The public S805 datasheet states that this should be set to 1 to disable the clock, the default value is 0. There is also a hint that these are "just in case" bits which only exist in case the corresponding mux implementation does not allow glitch-free parent changes (the muxes are designed in a way that the clock can stay enabled when changing the mux). It's still good practise to describe this clock even if we're not supposed to modify it. Thus this uses the read-only gate ops. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181122214017.25643-5-martin.blumenstingl@googlemail.com commit 700ecf7f51b2d7c9bcf6a77cc5659f293219383d Author: Martin Blumenstingl Date: Thu Nov 22 22:40:16 2018 +0100 clk: meson: meson8b: rename cpu_div2/cpu_div3 to cpu_in_div2/cpu_in_div3 The "cpu_div2" and "cpu_div3" take "cpu_in" as input and divide that by 2 or 3. The clock controller can also generate various CPU clock post-dividers (2, 3, 4, 5, 6, 7, 8) which are derived from "cpu_clk". When adding support for these post-dividers our clock naming could be misleading as we have "cpu_div2" as well as "cpu_clk_div2". Rename the existing "cpu_in" dividers so the name of the divider's parent is part of the divider clock's name. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181122214017.25643-4-martin.blumenstingl@googlemail.com commit 3cf94c94e81bcd5e41afcf039f98661e7698d4ca Author: Martin Blumenstingl Date: Thu Nov 22 22:40:15 2018 +0100 clk: meson: clk-regmap: add read-only gate ops Some of the gate clocks are described as "just in case" bits in the datasheet. Examples are the ABP, PERIPH, AXI and L2 DRAM clocks on Meson8b. The datasheet suggests that these bits are not touched. The full explanation is: "Set to 1 to manually disable the [...] clock when changing the mux selection. Typically this bit is set to 0 since the clock muxes can switch without glitches.". This adds new read-only ops for gate clocks so we can describe these clocks in our clock controller drivers while ensuring that we can't accidentally modify the registers. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181122214017.25643-3-martin.blumenstingl@googlemail.com commit 7fc1609b0c01fccf8ab7230d548fad74ab5a870a Author: Martin Blumenstingl Date: Thu Nov 15 23:40:48 2018 +0100 clk: meson: meson8b: allow changing the CPU clock tree Currently all clocks in the CPU clock tree are marked as read-only (using the corresponding _ro_ clk_ops). This was correct since changing the clock tree could cause the system to lock up. Switch all clocks to their corresponding clk_ops variant which is not read-only to allow changing the CPU clock tree since the bug which locked up the system is now fixed (by switching the CPU clock temporary to run off XTAL while changing the CPU clock tree). Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-7-martin.blumenstingl@googlemail.com commit 7dc7eeb8c0875c4bb7607509d9270ad3fd726b6b Author: Martin Blumenstingl Date: Thu Nov 15 23:40:47 2018 +0100 clk: meson: meson8b: run from the XTAL when changing the CPU frequency Changing the CPU clock requires changing various clocks including the SYS PLL. The existing meson clk-pll and clk-regmap drivers can change all of the relevant clocks already. However, changing for exampe the SYS PLL is problematic because as long as the CPU is running off a clock derived from SYS PLL changing the latter results in a full system lockup. Fix this system lockup by switching the CPU clock to run off the XTAL while we are changing the any of the clocks in the CPU clock tree. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-6-martin.blumenstingl@googlemail.com commit e36c7e9898f2ba34becf37bda37b70e984b0bf4e Author: Martin Blumenstingl Date: Thu Nov 15 23:40:46 2018 +0100 clk: meson: meson8b: add support for more M/N values in sys_pll The sys_pll on the EC-100 board is configured to 1584MHz at boot (either by u-boot, firmware or chip defaults). This is achieved by using M = 66, N = 1 (24MHz * 66 / 1). At boot the CPU clock is running off sys_pll divided by 2 which results in 792MHz. Thus M = 66 is considered to be a "safe" value for Meson8b. To achieve 1608MHz (one of the CPU OPPs on Meson8 and Meson8m2) we need M = 67, N = 1. I ran "stress --cpu 4" while infinitely cycling through all available frequencies on my Meson8m2 board and could not spot any issues with this setting (after ~12 hours of running this). On Meson8, Meson8b and Meson8m2 we also want to be able to use 408MHz and 816MHz CPU frequencies. These can be achieved by dividing sys_pll by 4 (for 408MHz) or 2 (for 816MHz). That means that sys_pll has to run at 1632MHz which can be generated using M = 68, N = 1. Similarily we also want to be able to use 1008MHz as CPU frequency. This means that sys_pll has to run either at 1008MHz or 2016MHz. The former would result in an M value of 42, which is lower than the smallest value used by the 3.10 GPL kernel sources from Amlogic (50 is the lower limit there). Thus we need to run sys_pll at 2016MHz which can ge generated using M = 84, N = 1. I tested M = 68 and M = 84 on my Meson8b Odroid-C1 and my Meson8m2 board by running "stress --cpu 4" while infinitely cycling thorugh all available frequencies. I could not spot any issues after ~12 hours of running this. Amlogic's 3.10 GPL kernel sources have more M/N combinations. I did not add them yet because M = 74 (to achieve close to 1800MHz on Meson8) and M = 82 (to achieve close to 1992MHz on Meson8 as well) caused my Meson8m2 board to hang randomly. It's not clear why this is (for example because the board's voltage regulator design is bad, some missing bits for these values in our clk-pll driver, etc.). Thus the following M values from the Amlogic 3.10 GPL kernel sources are skipped as of now: 69, 70, 71, 72, 73, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98 Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-5-martin.blumenstingl@googlemail.com commit 0dad1ec65bc30a549aba38d34a727309bbf41bc8 Author: Martin Blumenstingl Date: Thu Nov 15 23:40:45 2018 +0100 clk: meson: meson8b: mark the CPU clock as CLK_IS_CRITICAL We don't want the common clock framework to disable the "cpu_clk" if it's not used by any device. The cpufreq-dt driver does not enable the CPU clocks. However, even if it would we would still want the CPU clock to be enabled at all times because the CPU clock is also required even if we disable CPU frequency scaling on a specific board. The reason why we want the CPU clock to be enabled is a clock further up in the tree: Since commit 6f888e7bc7bd58 ("clk: meson: clk-pll: add enable bit") the sys_pll can be disabled. However, since the CPU clock is derived from sys_pll we don't want sys_pll to get disabled. The common clock framework takes care of that for us by enabling all parent clocks of our CPU clock when we mark the CPU clock with CLK_IS_CRITICAL. Until now this is not a problem yet because all clocks in the CPU clock's tree (including sys_pll) are read-only. However, once we allow modifications to the clocks in that tree we will need this. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-4-martin.blumenstingl@googlemail.com commit a5ac1ead32c9aac285f6436e09b4f6111996e9b8 Author: Martin Blumenstingl Date: Thu Nov 15 23:40:44 2018 +0100 clk: meson: meson8b: do not use cpu_div3 for cpu_scale_out_sel The cpu_div3 clock (cpu_in divided by 3) generates a signal with a duty cycle of 33%. The CPU clock however requires a clock signal with a duty cycle of 50% to run stable. cpu_div3 was observed to be problematic when cycling through all available CPU frequencies (with additional patches on top of this one) while running "stress --cpu 4" in the background. This caused sporadic hangs where the whole system would fully lock up. Amlogic's 3.10 kernel code also does not use the cpu_div3 clock either when changing the CPU clock. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-3-martin.blumenstingl@googlemail.com commit d6e81845b7d900f1f6738bd972bf89dff4bd55a8 Author: Martin Blumenstingl Date: Thu Nov 15 23:40:43 2018 +0100 clk: meson: clk-pll: check if the clock is already enabled Since commit 6f888e7bc7bd58 ("clk: meson: clk-pll: add enable bit") our PLLs also support the "enable" bit. Currently meson_clk_pll_enable unconditionally resets the PLL, enables it, takes it out of reset and waits until it is locked. This works fine for our current clock trees. However, there will be a problem once we allow modifications to sys_pll on Meson8, Meson8b and Meson8m2 (which will be required for CPU frequency scaling): the CPU clock is derived from the sys_pll clock. Once clk_enable is called on the CPU clock this will be propagated by the common clock framework up until the sys_pll clock. If we reset the PLL unconditionally in meson_clk_pll_enable the CPU will be stopped (on Meson8, Meson8b and Meson8m2). To prevent this we simply check if the PLL is already enabled and do reset the PLL if it's already enabled and locked. Now that we have a utility function to check whether the PLL is enabled we can also pass that to our clk_ops to let the common clock framework know about the status of the hardware clock. For now this is of limited use since the only common clock framework's internal "disabled unused clocks" mechanism checks for this. Everything else still uses the ref-counting (internal to the common clock framework) when clk_enable is called. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181115224048.13511-2-martin.blumenstingl@googlemail.com commit a8662eadd1032018f31e37deda811790b2326662 Author: Martin Blumenstingl Date: Thu Sep 27 10:59:21 2018 +0200 clk: meson: meson8b: fix the width of the cpu_scale_div clock According to the public S805 datasheet HHI_SYS_CPU_CLK_CNTL1[29:20] is the register for the CPU scale_div clock. This matches the code in Amlogic's 3.10 GPL kernel sources: N = (aml_read_reg32(P_HHI_SYS_CPU_CLK_CNTL1) >> 20) & 0x3FF; This means that the divider register is 10 bit wide instead of 9 bits. So far this is not a problem since all u-boot versions I have seen are not using the cpu_scale_div clock at all (instead they are configuring the CPU clock to run off cpu_in_sel directly). The fixes tag points to the latest rework of the CPU clocks. However, even before the rework it was wrong. Commit 7a29a869434e8b ("clk: meson: Add support for Meson clock controller") defines MESON_N_WIDTH as 9 (in drivers/clk/meson/clk-cpu.c). But since the old clk-cpu implementation this only carries the fixes tag for the CPU clock rewordk. Fixes: 251b6fd38bcb9c ("clk: meson: rework meson8b cpu clock") Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20180927085921.24627-3-martin.blumenstingl@googlemail.com commit ad9b2b8e53af61375322e3c7d624acf3a3ef53b0 Author: Martin Blumenstingl Date: Thu Sep 27 10:59:20 2018 +0200 clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table The public S805 datasheet only mentions that HHI_SYS_CPU_CLK_CNTL1[20:29] contains a divider called "cpu_scale_div". Unfortunately it does not mention how to use the register contents. The Amlogic 3.10 GPL kernel sources are using the following code to calculate the CPU clock based on that register (taken from arch/arm/mach-meson8/clock.c in the 3.10 Amlogic kernel, shortened to make it easier to read): N = (aml_read_reg32(P_HHI_SYS_CPU_CLK_CNTL1) >> 20) & 0x3FF; if (sel == 3) /* use cpu_scale_div */ div = 2 * N; else div = ... /* not relevant for this example */ cpu_clk = parent_clk / div; This suggests that the formula is: parent_rate / 2 * register_value However, running perf (which can measure the CPU clock rate thanks to the ARM PMU) shows that this formula is not correct. This can be reproduced with the following steps: 1. boot into u-boot 2. let the CPU clock run off the XTAL clock: mw.l 0xC110419C 0x30 1 3. set the cpu_scale_div register: to value 0x1: mw.l 0xC110415C 0x801016A2 1 to value 0x2: mw.l 0xC110415C 0x802016A2 1 to value 0x5: mw.l 0xC110415C 0x805016A2 1 4. let the CPU clock run off cpu_scale_div: mw.l 0xC110419C 0xbd 1 5. boot Linux 6. run: perf stat -aB stress --cpu 4 --timeout 10 7. check the "cycles" value I get the following results depending on the cpu_scale_div value: - (cpu_in_sel - this is the input clock for cpu_scale_div - runs at 1.2GHz) - 0x1 = 300MHz - 0x2 = 200MHz - 0x5 = 100MHz This means that the actual formula to calculate the output of the cpu_scale_div clock is: parent_rate / 2 * (register value + 1). The register value 0x0 is reserved. When letting the CPU clock run off the cpu_scale_div while the value is 0x0 the whole board hangs (even in u-boot). I also verified this with the TWD timer: when adding this to the .dts without specifying it's clock it will auto-detect the PERIPH (which is the input clock of the TWD) clock rate (and the result is shown in the kernel log). On Meson8, Meson8b and Meson8m2 the PERIPH clock is CPUCLK divided by 4. This also matched for all three test-cases from above (in all cases the TWD timer clock rate was approx. one fourth of the CPU clock rate). A small note regarding the "fixes" tag: the original issue seems to exist virtually since forever. Even commit 28b9fcd016126e ("clk: meson8b: Add support for Meson8b clocks") seems to handle this wrong. I still decided to use commit 251b6fd38bcb9c ("clk: meson: rework meson8b cpu clock") because this is the first commit which gets the CPU hiearchy correct and thus it's the first commit where the cpu_scale_div register is used correctly (apart from the bug in the cpu_scale_table). Fixes: 251b6fd38bcb9c ("clk: meson: rework meson8b cpu clock") Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20180927085921.24627-2-martin.blumenstingl@googlemail.com commit bb6eddd1d28c9c42b1372f023088a8913f3ea7e4 Author: Martin Blumenstingl Date: Sun Oct 28 13:08:58 2018 +0100 clk: meson: meson8b: use the HHI syscon if available The clock controller is located in a register range (called "HHI") which contains more than just registers for the clock controller. Known consumers of the HHI register range are: - the clock controller - a reset controller - temperature sensor calibration coefficient (TSC) (only on Meson8b and Meson8m2) - HDMI controller The main reason for using a syscon is the "temperature sensor calibration coefficient" which has to be set for the built-in temperature sensor to work correctly. Four TSC bits are located in the SAR ADC's register space. However on Meson8b and Meson8m2 there is a fifth TSC bit which is unfortunately located in the HHI register space. To be more precise, bit 9 of the HHI_DPLL_TOP_0 register (which sits right between the HHI_SYS_PLL and HHI_VID_PLL registers). Get the regmap from the parent (HHI syscon) node to support all functionality of the HHI register range. Backwards compatibility with old .dtbs is ensured by falling back to parsing the registers just like before this change. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181028120859.5735-3-martin.blumenstingl@googlemail.com commit 6c763077163d13901ed2d41a67c741a940b695ac Author: Martin Blumenstingl Date: Sun Oct 28 13:08:57 2018 +0100 dt-bindings: clock: meson8b: use the registers from the HHI syscon The clock controller on Meson8/Meson8m2 and Meson8b is part of a register region called "HHI". This register area contains more functionality than just a clock controller: - the clock controller - some reset controller bits - temperature sensor calibration coefficient (only on Meson8b and Meson8m2 - one one out of five TSC bits is stored in the HHI registers) - HDMI controller The HHI register area may be accessed concurrently. Allow this by using a "system controller" as parent node. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181028120859.5735-2-martin.blumenstingl@googlemail.com commit a8080f247bcd736b767485d42b089613e25d7b95 Author: Neil Armstrong Date: Tue Nov 6 15:57:37 2018 +0100 clk: meson-gxbb: Add video clocks Add the clocks entries used in the video clock path, the clock path is doubled to permit having different synchronized clocks for different parts of the video pipeline. All dividers are flagged with CLK_GET_RATE_NOCACHE, and all gates are flagged with CLK_IGNORE_UNUSED since they are currently directly handled by the Meson DRM Driver. Once the DRM Driver is fully migrated to using the Common Clock Framework to handle the video clock tree, the CLK_GET_RATE_NOCACHE and CLK_IGNORE_UNUSED will be dropped. Signed-off-by: Neil Armstrong Acked-by: Jerome Brunet Link: http://lkml.kernel.org/r/1541516257-16157-5-git-send-email-narmstrong@baylibre.com commit f95e6ca628952730cccd991bd5f5b9492547c74c Author: Neil Armstrong Date: Tue Nov 6 15:57:36 2018 +0100 dt-bindings: clk: meson-gxbb: Add Video clock bindings Add the video clock bindings covering all the video graphics pipeline and the HDMI controller. Signed-off-by: Neil Armstrong Acked-by: Jerome Brunet Link: http://lkml.kernel.org/r/1541516257-16157-4-git-send-email-narmstrong@baylibre.com commit 0058502fb93a9285a36f8c179884f1992eef40d8 Author: Neil Armstrong Date: Tue Nov 6 15:57:35 2018 +0100 clk: meson-gxbb: Fix HDMI PLL for GXL SoCs In an attempt to better describe the HDMI PLL, a single DCO clock was left for GXBB and GXL, but the GXL DCO does not have a pre-multiplier. This patch adds back a GXL specific HDMI PLL DCO with xtal as parent. Fixes: 87173557d2f6 ("clk: meson: clk-pll: remove od parameters") Signed-off-by: Neil Armstrong Acked-by: Jerome Brunet Link: http://lkml.kernel.org/r/1541516257-16157-3-git-send-email-narmstrong@baylibre.com commit 72dbb8c94d0d8a44d1a006fd487e755e2de48dec Author: Neil Armstrong Date: Tue Nov 6 15:57:34 2018 +0100 clk: meson: Add vid_pll divider driver Add support the VID_PLL fully programmable divider used right after the HDMI PLL clock source. It is used to achieve complex fractional division with a programmble bitfield. Signed-off-by: Neil Armstrong Acked-by: Jerome Brunet Link: http://lkml.kernel.org/r/1541516257-16157-2-git-send-email-narmstrong@baylibre.com commit 8e1dd17c8b0e3f8c66ed2a3f88a440d36135e589 Author: Martin Blumenstingl Date: Thu Nov 22 22:40:14 2018 +0100 dt-bindings: clock: meson8b: export the CPU post dividers There are four CPU clock post dividers: - ABP - PERIPH (used as input for the ARM global timer and ARM TWD timer) - AXI - L2 DRAM Export these so we can use them in .dts files. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20181122214017.25643-2-martin.blumenstingl@googlemail.com commit 64ef0817b9679b525f86773e929777be96f5c728 Author: Kuninori Morimoto Date: Thu Nov 22 00:57:40 2018 +0000 ASoC: audio-graph-card: tidyup define position commit f986907c9225 ("ASoC: audio-graph-card: add widgets and routing for external amplifier support") added new function asoc_graph_card_outdrv_event(), but the inserted position breaks define area. This patch tidyup it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c3830f1a00f0c7b224aa64e99adbdc14e86d78d5 Author: Kuninori Morimoto Date: Thu Nov 22 00:57:23 2018 +0000 ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD 1 "simple" is enough on Kconfig help Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 338d7159c488268dd4ccc6a69ab4af8f829f75d0 Author: Kuninori Morimoto Date: Thu Nov 22 00:57:09 2018 +0000 ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing Current audio-graph-scu-card driver is parsing codec position for DPCM and consider DAI format. But, current operation is doing totally pointless, because 1) asoc_simple_card_parse_daifmt() will be called not only for 1st codec on current implementation, and it will be used as fixed format 2) it should be called for each CPU/Codec pair. Let's tidyup asoc_simple_card_parse_daifmt() timing. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7f07a39acf0591fd3823abc1af3c5456e708b77e Author: Kuninori Morimoto Date: Thu Nov 22 00:56:53 2018 +0000 ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit df976517733e34e9c12828357c19bafea5c90cf5 Author: Kuninori Morimoto Date: Thu Nov 22 00:56:41 2018 +0000 ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 2624fc7882244abeb4dabbd5b67328676a109b6a Author: Kuninori Morimoto Date: Thu Nov 22 00:56:21 2018 +0000 ASoC: audio-graph-scu-card: tidyup "prefix" parsing audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 264d15035eac5e779788c435bafb5c8319ffed81 Author: Kuninori Morimoto Date: Thu Nov 22 00:55:54 2018 +0000 ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc audio-graph-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit ca8d95c709378d0792c9dbacdab176a75e521ffb Author: Kuninori Morimoto Date: Thu Nov 22 00:55:40 2018 +0000 ASoC: simple-scu-card: tidyup "prefix" parsing simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit f94b0f7f9246013ac158ae3adf194c1bfa1d1847 Author: Kuninori Morimoto Date: Thu Nov 22 00:55:24 2018 +0000 ASoC: simple-scu-card: tidyup "prefix" parsing on Doc simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3b7103562c03cffb1a351f8c235b3bba2acd9e9b Author: Kuninori Morimoto Date: Thu Nov 22 00:55:09 2018 +0000 ASoC: soc-core: add snd_soc_of_parse_node_prefix() Current ASoC has snd_soc_of_parse_audio_prefix() to get codec_conf settings from DT which is used to avoid DAI naming conflict when CPU/Codec matching. Currently, it is parsing from "top node", but, we want to parse from "each sub node" if sound card had multi cpus/codecs. This patch adds new snd_soc_of_parse_node_prefix() to allow parsing settings from selected node. It is keeping existing snd_soc_of_parse_audio_prefix() by using macro. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 6debd01a74b8c15ab3f2a6f7ff4a7dcbada101cb Author: Vasily Khoruzhick Date: Thu Nov 22 18:23:21 2018 +0800 ASoC: simple-amplifier: add VCC regulator widget Amplifier may have assosicated regulator, so add a widget for it and appropriate route. Signed-off-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 8e84de031a11c4240f3654fd4c380542e358f5f6 Author: Vasily Khoruzhick Date: Thu Nov 22 18:23:20 2018 +0800 ASoC: dt-bindings: add regulator property to simple amplifier Amplifier may have associated regulator, so add a property for it. Signed-off-by: Vasily Khoruzhick Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown commit ca0412a05756cd0b94751ca4d54fe6522f00b1f4 Author: Chen-Yu Tsai Date: Thu Nov 22 18:23:19 2018 +0800 ASoC: sunxi: sun50i-codec-analog: Add support for cpvdd regulator supply On the Allwinner A64 SoCs, the audio codec has a built-in headphone amplifier. This amplifier has a power supply separate from the rest of the analog audio circuitry, labeled cpvdd. This patch adds a DAPM widget for this supply, and ties it to the headphone amp widget. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Mark Brown commit 21dd30200e3d350fe420d23a2a00b17633a3d1a2 Author: Chen-Yu Tsai Date: Thu Nov 22 18:23:18 2018 +0800 ASoC: dt-bindings: sun50i-codec-analog: Add headphone amp regulator supply On the Allwinner A64 SoC, the audio codec has a built-in headphone amplifier. This amplifier has a power supply separate from the rest of the analog audio circuitry. Add a regulator supply property to handle this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown commit 0e39037b3165567660b0e03f67534da5269a0465 Author: Chris Wilson Date: Fri Nov 23 13:23:25 2018 +0000 drm/i915: Cache the error string Currently, we convert the error state into a string every time we read from sysfs (and sysfs reads in page size (4KiB) chunks). We do try to window the string and only capture the portion that is being read, but that means that we must always convert up to the window to find the start. For a very large error state bordering on EXEC_OBJECT_CAPTURE abuse, this is noticeable as it degrades to O(N^2)! As we do not have a convenient hook for sysfs open(), and we would like to keep the lazy conversion into a string, do the conversion of the whole string on the first read and keep the string until the error state is freed. v2: Don't double advance simple_read_from_buffer v3: Due to extreme pain of lack of vrealloc, use a scatterlist v4: Keep the forward iterator loosely cached v5: Stylistic improvements to reduce patch size Reported-by: Jason Ekstrand Testcase: igt/gem_exec_capture/many* Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Jason Ekstrand Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181123132325.26541-1-chris@chris-wilson.co.uk commit 428f977a6a6b43154928571b01fa8415c11a9244 Author: Dan Carpenter Date: Fri Nov 23 10:20:24 2018 +0300 spi: npcm: Fix an error code in the probe function There is an IS_ERR() vs PTR_ERR() typo here. The current code returns 1 but we want to return the negative error code. Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown commit 8942ce2bfaa162f8d915b50778724be0c5c2662b Author: Biju Das Date: Fri Oct 26 09:25:07 2018 +0100 arm64: dts: renesas: r8a7796: Add CMT device nodes This patch adds CMT{0|1|2|3} device nodes for r8a7796 SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit 8d14bfa074dbd7ad9a1ff1bfbaff9ec5e450a567 Author: Kuninori Morimoto Date: Wed Nov 21 01:07:11 2018 +0000 arm64: dts: renesas: r8a7796: add SSIU support for sound rsnd driver supports SSIU now, let's use it. Then, BUSIF DMA settings on rcar_sound,ssi (= rxu, txu) are no longer needed. To avoid git merge timing issue / git bisect issue, this patch doesn't remove it so far, but will be removed in the future. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman commit 44ea652a92d209045da9183981b55fd0c2c01971 Author: Takeshi Kihara Date: Wed Nov 21 13:11:39 2018 +0100 arm64: dts: renesas: r8a77990: Add I2C-DVFS device node This patch adds I2C-DVFS device node for the R8A77990 SoC. v2 * Drop aliases update as in upstream it is not required to configure the BD9571 PMIC for DDR backup, nor is the use of i2c are aliases desired. * Do not describe the device as compatible with "renesas,rcar-gen3-iic" or "renesas,rmobile-iic" fallback compat strings. The absence of automatic transmission registers leads us to declare the r8a77990 IIC controller as incompatible. v2.1 * Reduced register range to reflect documentation Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 327d1f320872c6c616e4cd369257f31eb48d0401 Author: Marek Vasut Date: Sun Nov 18 18:34:24 2018 +0100 arm64: dts: renesas: r8a77990: ebisu: Add and enable CAN,FD device nodes This patch adds CAN0,1 and CANFD device nodes for the r8a77990 SoC and enables CANFD connected to CN10 on the E3 Ebisu board using the R8A77990 SoC. Signed-off-by: Marek Vasut Acked-by: Wolfram Sang Signed-off-by: Simon Horman commit 10a599fabbe54a0159b5b706aaad608400acd599 Author: Ville Syrjälä Date: Thu Nov 22 16:34:12 2018 +0200 drm/atomic-helper: WARN if fake_commit->hw_done is not completed as expected For real commits we WARN if ->hw_done hasn't been completed by the time drm_atomic_helper_commit_cleanup_done() is called. Let's do the same for the fake commit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181122143412.11655-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 2de42f79bb21a412f40ade8831eb6fc445cb78a4 Author: Ville Syrjälä Date: Thu Nov 22 16:34:11 2018 +0200 drm/atomic-helper: Complete fake_commit->flip_done potentially earlier Consider the following scenario: 1. nonblocking enable crtc 2. wait for the event 3. nonblocking disable crtc On i915 this can lead to a spurious -EBUSY from step 3 on account of non-enabled planes getting the fake_commit in step 1 and we don't complete the fake_commit-> flip_done until drm_atomic_helper_commit_hw_done() which can happen a long time after the flip event was sent out. This will become somewhat easy to hit on SKL+ once we start to add all the planes for the crtc to every modeset commit for the purposes of forcing a watermark register programming [1]. To make the race a little less pronounced let's complete fake_commit->flip_done after drm_atomic_helper_wait_for_flip_done(). For the single crtc case this should make the race quite theoretical, assuming drm_atomic_helper_wait_for_flip_done() actually has to wait for the real commit flip_done. In case the real commit flip_done gets completed singificantly before drm_atomic_helper_wait_for_flip_done(), or we are dealing with multiple crtcs whose vblanks don't line up nicely the race still exists. [1] https://patchwork.freedesktop.org/patch/262670/ Cc: Maarten Lankhorst Fixes: 080de2e5be2d ("drm/atomic: Check for busy planes/connectors before setting the commit") Testcase: igt/kms_cursor_legacy/*nonblocking-modeset-vs-cursor-atomic Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181122143412.11655-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit c06ef2e9acef4cda1feee2ce055b8086e33d251a Author: Mauro Carvalho Chehab Date: Fri Nov 23 07:05:58 2018 -0500 media: vb2: be sure to unlock mutex on errors As reported by smatch: drivers/media/common/videobuf2/videobuf2-core.c: drivers/media/common/videobuf2/videobuf2-core.c:2159 vb2_mmap() warn: inconsistent returns 'mutex:&q->mmap_lock'. Locked on: line 2148 Unlocked on: line 2100 line 2108 line 2113 line 2118 line 2156 line 2159 There is one error condition that doesn't unlock a mutex. Fixes: cd26d1c4d1bc ("media: vb2: vb2_mmap: move lock up") Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a2717eae73ac4f1548fa5195adb9fafbacdfc1ad Author: Mauro Carvalho Chehab Date: Fri Nov 23 06:59:41 2018 -0500 media: seco-cec: declare ops as static const As warned by smatch: drivers/media/platform/seco-cec/seco-cec.c:338:21: warning: symbol 'secocec_cec_adap_ops' was not declared. Should it be static? This struct should be static. Also, it is const, so declare it as such. Signed-off-by: Mauro Carvalho Chehab commit 5609f2067691acf6748fbc84e8fbee8634bdcb9b Author: Hans Verkuil Date: Fri Nov 23 06:53:58 2018 -0500 media: seco-cec: fix Makefile Fix the incorrect obj-y. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 256856efb8cc2b5468c69edf45eb0ab579833ce7 Author: Laurent Pinchart Date: Sun Nov 11 04:15:08 2018 +0200 drm: rcar-du: Reject modes that fail CRTC timing requirements The hardware requires the HDSR and VDSR registers to be set to 1 or higher. This translates to a minimum combined horizontal sync and back porch of 20 pixels and a minimum vertical back porch of 3 lines. Reject modes that fail those requirements. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 63a298f22a6183b5b7536a203596c6570dfcfe8e Author: Laurent Pinchart Date: Tue Nov 6 17:13:44 2018 +0200 drm: rcar-du: Fix external clock error checks The rcar-du driver supports probe deferral for external clocks, but implements it badly by checking the wrong pointer due to a bad copy and paste. Fix it. While at it, reject invalid clocks outright for DU channels that have a display PLL, as the external clock is mandatory in that case. This avoids a WARN_ON() at runtime. Fixes: 1b30dbde8596 ("drm: rcar-du: Add support for external pixel clock") Reported-by: Kuninori Morimoto Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit bf17cda650d5723bbc1439bbcde81265ad207004 Author: Kieran Bingham Date: Wed Sep 19 16:56:59 2018 +0100 drm: rcar-du: Enable alpha property on primary planes The hardware supports alpha on all planes, and using it on the primary plane can be useful. Don't restrict the alpha property to overlay planes. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 03e37b507c664d5275c08cd0c563cf919d8aac49 Author: Laurent Pinchart Date: Thu Oct 18 02:57:39 2018 +0300 drm: rcar-du: lvds: Add R8A77965 support Add support for the R-Car M3-N (R8A77965) SoC to the LVDS encoder driver. The encoder appears identical to the M3-W version, we can thus simply point to the generic Gen3 data. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 828ff2adaac405a1a3a10ccf6b04e7ca3de59967 Author: Laurent Pinchart Date: Thu Oct 18 02:56:18 2018 +0300 dt-bindings: display: renesas: lvds: Document r8a77965 bindings The M3-N (r8a77965) includes one LVDS encoder. Extend the binding to support it. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 3d61fe5f59dd3e6f96fc0772156d257cb04dc656 Author: Laurent Pinchart Date: Wed Oct 17 22:08:31 2018 +0300 drm: rcar-du: Fix vblank initialization The drm_vblank_init() takes the total number of CRTCs as an argument, but the rcar-du driver passes a bitmask of the CRTC indices. Fix it. Fixes: 4bf8e1962f91 ("drm: Renesas R-Car Display Unit DRM driver") Reported-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 4d486f18d91b1876040bf87e9ad78981a08b15a6 Author: Christophe JAILLET Date: Tue Oct 16 08:58:25 2018 +0200 drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()' We return 0 unconditionally in 'rcar_du_crtc_set_crc_source()'. However, 'ret' is set to some error codes if some function calls fail. Return 'ret' instead to propagate the error code. Fixes: 47a52d024e89 ("media: drm: rcar-du: Add support for CRC computation") Signed-off-by: Christophe JAILLET Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 5dc34af19c98171174f563a4b9f79a902bf665b4 Author: Biju Das Date: Fri Sep 21 19:08:30 2018 +0100 drm: rcar-du: Add R8A7744 support Add support for the R8A7744 DU (which is very similar to the R8A7743 DU); it has 1 DPAD (RGB) output and 1 LVDS output. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit d1796786e3e9455e4f5cec919e4f7d63d154ddc7 Author: Fabrizio Castro Date: Tue Oct 16 17:58:59 2018 +0100 drm: rcar-du: Add r8a77470 support Add RZ/G1C (a.k.a. r8a77470) support to the R-Car DU driver. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 5eb08d995564c9f9d4818a84050f7716b73c86cc Author: Biju Das Date: Fri Sep 21 19:08:28 2018 +0100 dt-bindings: display: renesas: du: Document the r8a7744 bindings Document the RZ/G1N (R8A7744) SoC in the R-Car DU bindings. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit aab2b5297668e86504d730bbc6c33f7b69023812 Author: Fabrizio Castro Date: Fri Sep 21 19:08:27 2018 +0100 dt-bindings: display: renesas: du: Document the r8a77470 bindings Document the RZ/G1C (r8a77470) SoC in R-Car DU bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 31aea15a846ca5756010fec87c6cf1091dec1c90 Author: Laurent Pinchart Date: Fri Sep 28 18:15:21 2018 +0300 drm: rcar-du: Fix typo in comment Fix the misspelled 'belance' in a comment. Reported-by: Ulrich Hecht Signed-off-by: Laurent Pinchart commit c0ece6742d8025ddfc8584ac6bc656ff2c43cedf Author: Thomas Zimmermann Date: Wed Sep 26 13:55:25 2018 +0200 drm/shmobile: Replace drm_dev_unref with drm_dev_put This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Reviewed-by: Simon Horman Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 06fa0d46b181e762f22d0742839200e7235d32ce Author: Thomas Zimmermann Date: Wed Sep 26 13:53:12 2018 +0200 drm/rcar-du: Replace drm_dev_unref with drm_dev_put This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Reviewed-by: Kieran Bingham Reviewed-by: Simon Horman Signed-off-by: Laurent Pinchart commit 5e99456c20f712dcc13d9f6ca4278937d5367355 Author: Hans Verkuil Date: Mon Nov 19 10:33:44 2018 -0500 media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused() Userspace shouldn't set bytesused to 0 for output buffers. vb2_warn_zero_bytesused() warns about this (only once!), but it also calls WARN_ON(1), which is confusing since it is not immediately clear that it warns about a 0 value for bytesused. Just drop the WARN_ON as it serves no purpose. Signed-off-by: Hans Verkuil Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit d644cca50f366cd109845ae92e37c09ed79adf81 Author: John Sheu Date: Thu Nov 15 10:57:16 2018 -0500 media: vb2: Allow reqbufs(0) with "in use" MMAP buffers Videobuf2 presently does not allow VIDIOC_REQBUFS to destroy outstanding buffers if the queue is of type V4L2_MEMORY_MMAP, and if the buffers are considered "in use". This is different behavior than for other memory types and prevents us from deallocating buffers in following two cases: 1) There are outstanding mmap()ed views on the buffer. However even if we put the buffer in reqbufs(0), there will be remaining references, due to vma .open/close() adjusting vb2 buffer refcount appropriately. This means that the buffer will be in fact freed only when the last mmap()ed view is unmapped. 2) Buffer has been exported as a DMABUF. Refcount of the vb2 buffer is managed properly by VB2 DMABUF ops, i.e. incremented on DMABUF get and decremented on DMABUF release. This means that the buffer will be alive until all importers release it. Considering both cases above, there does not seem to be any need to prevent reqbufs(0) operation, because buffer lifetime is already properly managed by both mmap() and DMABUF code paths. Let's remove it and allow userspace freeing the queue (and potentially allocating a new one) even though old buffers might be still in processing. To let userspace know that the kernel now supports orphaning buffers that are still in use, add a new V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS to be set by reqbufs and create_bufs. [p.zabel@pengutronix.de: added V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS, updated documentation, and added back debug message] Signed-off-by: John Sheu Reviewed-by: Pawel Osciak Signed-off-by: Tomasz Figa Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: added V4L2-BUF-CAP-SUPPORTS-ORPHANED-BUFS ref] Signed-off-by: Mauro Carvalho Chehab commit 949f29f6071416f847ed8d2b2ad3a5f702583468 Author: Ezequiel Garcia Date: Thu Oct 18 14:02:24 2018 -0400 media: cedrus: Get rid of interrupt bottom-half Now that the mem2mem framework guarantees that .device_run won't be called from interrupt context, it is safe to call v4l2_m2m_job_finish directly in the top-half. So this means the bottom-half is no longer needed and we can get rid of it. Signed-off-by: Ezequiel Garcia Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cbd9463da1b12cdf9aa79e7cf470431d39131fca Author: Ezequiel Garcia Date: Thu Oct 18 14:02:23 2018 -0400 media: v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish v4l2_m2m_job_finish() is typically called when DMA operations complete, in interrupt handlers or DMA completion callbacks. Calling .device_run from v4l2_m2m_job_finish creates a nasty re-entrancy path into the driver. Moreover, some implementation of .device_run might need to sleep, as is the case for drivers supporting the Request API, where controls are applied via v4l2_ctrl_request_setup, which takes the ctrl handler mutex. This commit adds a deferred context that calls v4l2_m2m_try_run, and gets scheduled by v4l2_m2m_job_finish(). Before this change, device_run would be called from these paths: vb2_m2m_request_queue, or v4l2_m2m_streamon, or v4l2_m2m_qbuf v4l2_m2m_try_schedule v4l2_m2m_try_run .device_run v4l2_m2m_job_finish v4l2_m2m_try_run .device_run After this change, the latter is now gone and instead: v4l2_m2m_device_run_work v4l2_m2m_try_run .device_run Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cbec2836f8be61ca573d48efe8803929100d4cba Author: Sakari Ailus Date: Thu Oct 18 14:02:22 2018 -0400 media: v4l2-mem2mem: Simplify exiting the function in __v4l2_m2m_try_schedule The __v4l2_m2m_try_schedule function acquires and releases multiple spinlocks. Simplify unlocking the job lock by adding labels to unlock the lock and exit the function. Signed-off-by: Sakari Ailus Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 542a522d32efb613cfc929bdbf2c4160359167f9 Author: Ezequiel Garcia Date: Thu Oct 18 14:02:21 2018 -0400 media: v4l2-ioctl.c: Simplify locking for m2m devices Now that the mutexes for output and capture vb2 queues match, it is possible to refer to the context q_lock as the m2m lock for a given m2m context. Remove the output/capture lock selection. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 913f3ec280abddc111a49287a59b658b6b181c4c Author: Ezequiel Garcia Date: Thu Oct 18 14:02:20 2018 -0400 media: mem2mem: Require capture and output mutexes to match Currently, all the mem2mem driver either use a single mutex to lock the capture and output videobuf2 queues, or don't set any mutex. This means the mutexes match, and so the mem2mem framework is able to set the m2m context lock. Enforce this by making it mandatory for drivers to set the same capture and output mutex, or not set any mutex at all. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe5a2bbb6333e7dc9202eb6a1c574d356a528de6 Author: Vikash Garodia Date: Wed Oct 17 09:18:23 2018 -0400 media: dt-bindings: media: Document bindings for venus firmware device Add devicetree binding documentation for firmware loader for video hardware running on qualcomm chip. Signed-off-by: Vikash Garodia Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit df381dc8e475204fbcc58302ae2eb7860f4e4e1e Author: Vikash Garodia Date: Wed Oct 17 09:18:22 2018 -0400 media: venus: firmware: add no TZ boot and shutdown routine Video hardware is mainly comprised of vcodec subsystem and video control subsystem. Video control has ARM9 which executes the video firmware instructions whereas vcodec does the video frame processing. This change adds support to load the video firmware and bring ARM9 out of reset for platforms which does not have trustzone. An iommu domain is associated and managed with the firmware device. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9799fcce4bb383206c08a2ac960039efdfa4a2f Author: Stanimir Varbanov Date: Wed Oct 17 09:18:21 2018 -0400 media: venus: firmware: register separate platform_device for firmware loader This registers a firmware platform_device and associate it with video-firmware DT subnode. Then calls dma configure to initialize dma and iommu. Signed-off-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a4cf7e3c069db63b083b0d649b9e7d7263e50e33 Author: Vikash Garodia Date: Wed Oct 17 09:18:20 2018 -0400 media: venus: firmware: move load firmware in a separate function Separate firmware loading part into a new function. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5df317c8786b5ecef9ccb2d8df7b4f6f1bc5dcd1 Author: Vikash Garodia Date: Wed Oct 17 09:18:19 2018 -0400 media: venus: firmware: add routine to reset ARM9 Add routine to reset the ARM9 and brings it out of reset. Also abstract the Venus CPU state handling with a new function. This is in preparation to add PIL functionality in venus driver. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 560ccb75c2caa6b1039dec1a53cd2ef526f5bf03 Author: Hans Verkuil Date: Fri Nov 9 08:37:44 2018 -0500 media: vivid: free bitmap_cap when updating std/timings/etc. When vivid_update_format_cap() is called it should free any overlay bitmap since the compose size will change. Signed-off-by: Hans Verkuil Reported-by: syzbot+0cc8e3cc63ca373722c6@syzkaller.appspotmail.com Cc: # for v3.18 and up Signed-off-by: Mauro Carvalho Chehab commit e5f71a27fa12c1a1b02ad478a568e76260f1815e Author: Hans Verkuil Date: Thu Nov 8 11:12:47 2018 -0500 media: v4l2-tpg: array index could become negative text[s] is a signed char, so using that as index into the font8x16 array can result in negative indices. Cast it to u8 to be safe. Signed-off-by: Hans Verkuil Reported-by: syzbot+ccf0a61ed12f2a7313ee@syzkaller.appspotmail.com Cc: # for v4.7 and up Signed-off-by: Mauro Carvalho Chehab commit b01783f801e65243afed9012c12343f5d63920eb Author: Hans Verkuil Date: Thu Nov 8 08:23:58 2018 -0500 media: MAINTAINERS fixups Update file paths in MAINTAINERS. Signed-off-by: Hans Verkuil Reported-by: Joe Perches Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 62dcb4f41836bd3c44b5b651bb6df07ea4cb1551 Author: Hans Verkuil Date: Thu Nov 8 07:23:37 2018 -0500 media: vb2: check memory model for VIDIOC_CREATE_BUFS vb2_core_create_bufs did not check if the memory model for newly added buffers is the same as for already existing buffers. It should return an error if they aren't the same. Signed-off-by: Hans Verkuil Reported-by: syzbot+e1fb118a2ebb88031d21@syzkaller.appspotmail.com Cc: # for v4.16 and up Signed-off-by: Mauro Carvalho Chehab commit 2912289a518077ddb8214e05336700148e97e235 Author: Hans Verkuil Date: Thu Nov 8 04:51:51 2018 -0500 media: adv*/tc358743/ths8200: fill in min width/height/pixelclock The v4l2_dv_timings_cap struct is used to do sanity checks when setting and enumerating DV timings, ensuring that only valid timings as per the HW capabilities are allowed. However, many drivers just filled in 0 for the minimum width, height or pixelclock frequency. This can cause timings with e.g. 0 as width and height to be accepted, which will in turn lead to a potential division by zero. Fill in proper values are minimum boundaries. 640x350 was chosen since it is the smallest resolution in v4l2-dv-timings.h. Same for 13 MHz as the lowest pixelclock frequency (it's slightly below the minimum of 13.5 MHz in the v4l2-dv-timings.h header). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 52117be68b82ee05c96da0a7beec319906ccf6cc Author: Hans Verkuil Date: Wed Nov 7 09:04:54 2018 -0500 media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work The use of flush_schedule_work() made no sense and caused a syzkaller error. Replace with the correct cancel_delayed_work_sync(). Signed-off-by: Hans Verkuil Reported-by: syzbot+69780d144754b8071f4b@syzkaller.appspotmail.com Cc: # for v4.20 and up Signed-off-by: Mauro Carvalho Chehab commit e10b40f3304360d3a2d07d690ff12197f828f2c8 Author: Hans Verkuil Date: Tue Nov 6 09:06:41 2018 -0500 media: vivid: fill in media_device bus_info If you create multiple vivid instances, each with their own media device, then there was no way to tell them apart. Fill in the bus_info so each instance has a unique bus_info string. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be773a176cbba68e9b2b6b669e5efe966844adba Author: Julia Lawall Date: Fri Nov 2 10:48:15 2018 -0400 media: rockchip/rga: constify video_device structure The video_device structure is only copied into another structure, so it can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9729d6d282a6d7ce88e64c9119cecdf79edf4e88 Author: Hans Verkuil Date: Mon Oct 29 13:32:38 2018 -0400 media: vivid: set min width/height to a value > 0 The capture DV timings capabilities allowed for a minimum width and height of 0. So passing a timings struct with 0 values is allowed and will later cause a division by zero. Ensure that the width and height must be >= 16 to avoid this. Signed-off-by: Hans Verkuil Reported-by: syzbot+57c3d83d71187054d56f@syzkaller.appspotmail.com Signed-off-by: Mauro Carvalho Chehab commit 701f49bc028edb19ffccd101997dd84f0d71e279 Author: Hans Verkuil Date: Mon Oct 29 06:15:31 2018 -0400 media: vivid: fix error handling of kthread_run kthread_run returns an error pointer, but elsewhere in the code dev->kthread_vid_cap/out is checked against NULL. If kthread_run returns an error, then set the pointer to NULL. I chose this method over changing all kthread_vid_cap/out tests elsewhere since this is more robust. Signed-off-by: Hans Verkuil Reported-by: syzbot+53d5b2df0d9744411e2e@syzkaller.appspotmail.com Signed-off-by: Mauro Carvalho Chehab commit da411ab10cc13dde4673608142cbd8c290505235 Author: Julia Lawall Date: Sat Oct 27 08:49:05 2018 -0400 media: vimc: constify structures stored in fields of v4l2_subdev_ops structure The fields of a v4l2_subdev_ops structure are all const, so the structures that are stored there and are not used elsewhere can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a74865e7a17a4991a38258d54482708c270df648 Author: Julia Lawall Date: Sat Oct 27 08:30:32 2018 -0400 media: rockchip/rga: constify v4l2_m2m_ops structure The v4l2_m2m_ops structure can be const as it is only passed to v4l2_m2m_init whose parameter is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 299553d88e2d48bbc91dfaba4a1d7bf5a93ef528 Author: Julia Lawall Date: Sat Oct 27 08:16:39 2018 -0400 media: vicodec: constify v4l2_ctrl_ops structure The v4l2_ctrl_ops structure is only stored in the ops field of a v4l2_ctrl_config structure, and this field is const, or passed as the second argument of v4l2_ctrl_new_std, and the corresponding parameter is declared as const. Accordingly, the structure can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e9a2ec53cd6e93b5b7f6d15a4cc6bdb4ba82488 Author: Sean Young Date: Fri Oct 26 08:18:33 2018 -0400 media: v4l uapi docs: few minor corrections and typos Do a series of minor corrections at the V4L2 uAPI documentation. Signed-off-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 520229e4b02dc4f5241a251a569fe0691a2c2e2c Author: Shaul Triebitz Date: Wed Jul 18 10:29:53 2018 +0300 iwlwifi: mvm: set HW capability VHT_EXT_NSS_BW Enable the VHT extended NSS BW feature in iwlwifi/mvm. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 02221a81887a9ed83cd4b355e0342eb241d31dea Author: Shaul Triebitz Date: Wed Aug 8 13:24:50 2018 +0300 iwlwifi: mvm: send the STA_HE_CTXT command in AP mode In AP mode, if AP supports HE (and the STA), send the STA_HE_CTXT command. This is needed mainly for PPE (packet extension) params. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit 3b5ee8dd8bb1a0f820eb5c85e31f92a2897bfa3d Author: Shaul Triebitz Date: Wed Aug 8 13:20:45 2018 +0300 iwlwifi: mvm: set MAC_FILTER_IN_11AX in AP mode In AP mode, if AP supports 11ax, add the MAC_FILTER_IN_11AX flag in MAC_CTXT command (needed for various 11ax stuff). Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho commit a024016fafc4a350db4364e4b6af34d8fd06ea9a Author: Sara Sharon Date: Mon Aug 13 08:21:10 2018 +0300 iwlwifi: fw: support API change to debug TLVs A new field was added. Since the code isn't operational (yet) no need to worry about backward compatibility. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit f7805b33f9b13a87b1fcf9dfbc3dcbce281a1436 Author: Lior Cohen Date: Thu May 3 10:17:05 2018 +0300 iwlwifi: add debugfs file to read fw debug data recording FW debug data will oneshot read all data available in DRAM and fill the supplied user buffer. In case the read request is greater than the new data in DRAM, the driver will write all data it has and return the buffer immediately. Signed-off-by: Shahar S Matityahu Signed-off-by: Lior Cohen Signed-off-by: Luca Coelho commit d47902f9f71d7679b9a2a9d14aa7d4b98d95430b Author: Sara Sharon Date: Wed Jun 13 15:19:47 2018 +0300 iwlwifi: dbg: add apply point logic Add a function to be called when apply point occurs. For each of the TLVs, the function will perform the apply point logic: - For HCMD - send the stored host command - For buffer allocation - allocate the memory and send the buffer allocation command - For trigger and region - update the stored configuration Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 743742231a79ea068b3897165a74f9a04cf76846 Author: Sara Sharon Date: Wed Jun 13 14:41:35 2018 +0300 iwlwifi: dbg: disable triggers for ini When ini is loaded, disable all legacy trigger configuration. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 68f6f492c4fae8b5f0204de99689408f524c8b14 Author: Sara Sharon Date: Thu Jun 14 10:49:03 2018 +0300 iwlwifi: trans: support loading ini TLVs from external file Support loading and storing ini TLVs from external file. Those TLVs are appended to the default TLVs, so store them separately. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit f14cda6f3b31347d1d814839d7e671dea749f1b0 Author: Sara Sharon Date: Thu May 17 10:14:30 2018 +0300 iwlwifi: trans: parse and store debug ini TLVs The new debug ini TLVs can be either packed into firmware binary or written in external file. Support loading them from both. Store the data per apply point. Apply point is a point during driver runtime, where the TLV becomes active. For example, a trigger of hardware error may be configured to collect a subset of data pre-alive, as a opposed to HW error that occurs after alive. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit bd2944665713e397409dcbde8f22aa6025eb3992 Author: Sara Sharon Date: Wed Jun 13 14:58:18 2018 +0300 iwlwifi: fw: add FW API of new TLV infrastructure Add the FW API of the new debug infrastructure. Next patches will introduce the utilization of this infra. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit d91d9b94492f956a39d86c2efa413076025392e7 Author: Emmanuel Grumbach Date: Wed Aug 8 10:42:23 2018 +0300 iwlwifi: mvm: add support for TWT capabilities We need to check the TWT support of the peer and to propagte the capability to the firmware. The current implementation will enable TWT only if the TWT support is advertised in the HE CAP IE and in the Extended Capability IE. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 7125648074e8134b3f7df2f755156bedc1f54020 Author: Lior Cohen Date: Thu Aug 2 11:48:18 2018 +0300 iwlwifi: add fw dump upon RT ucode start failure FW dump was missing in case the RT FW ucode section failed to load. This failure happens when the RT section of the FW file is corrupted. Signed-off-by: Lior Cohen Signed-off-by: Luca Coelho commit b1bbc1a636505ebdd6336ff781e417123226d4f7 Author: Luca Coelho Date: Sat Aug 4 14:45:42 2018 +0300 iwlwifi: fix cfg structs for 22000 with different RF modules We have to choose different configuration and different firmwares depending on the external RF module that is installed. Since the external module is not represented in the PCI IDs, we need to change the configuration at runtime, after checking the RF ID of the module installed. We have a bit of a mess in the code that does this, because it applies cfg's according to the RF ID only, ignoring the integrated module that is in use. Fix that for some devices by adding correct configurations for them and not ignoring the integrated module's type when making the decision. Signed-off-by: Luca Coelho commit 8ea20d95899c2bb2aa92193058a4bfef7c8a03b1 Author: Emmanuel Grumbach Date: Tue Jul 31 15:34:20 2018 +0300 iwlwifi: mvm: remove assignment of the reciprocal The firmware stopped looking at this field long ago. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit 32b258e9e55cffd5f6c4e27285a43a1cdf7385a4 Author: Sara Sharon Date: Tue Jul 31 09:54:26 2018 +0300 iwlwifi: dbg: split fifos dump Split the dump of RXF and TXF. This is in order to enable code reuse for INI, which may decide to dump only RXF and not TXF, and vice versa. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 79f033f6f229e9e1975172f8e766d3549595e0bf Author: Sara Sharon Date: Mon Jul 30 11:59:16 2018 +0300 iwlwifi: dbg: don't limit dump decisions to all or monitor Currently opmode is limited to asking transport to either dump all the dumps configured at startup, or monitor only. Instead, pass to transport a bitmask, to allow flexibility. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 32804fcb612bf867034a093f459415e485cf044b Author: Hans Verkuil Date: Fri Oct 19 03:55:34 2018 -0400 media: cec: keep track of outstanding transmits I noticed that repeatedly running 'cec-ctl --playback' would occasionally select 'Playback Device 2' instead of 'Playback Device 1', even though there were no other Playback devices in the HDMI topology. This happened both with 'real' hardware and with the vivid CEC emulation, suggesting that this was an issue in the core code that claims a logical address. What 'cec-ctl --playback' does is to first clear all existing logical addresses, and immediately after that configure the new desired device type. The core code will poll the logical addresses trying to find a free address. When found it will issue a few standard messages as per the CEC spec and return. Those messages are queued up and will be transmitted asynchronously. What happens is that if you run two 'cec-ctl --playback' commands in quick succession, there is still a message of the first cec-ctl command being transmitted when you reconfigure the adapter again in the second cec-ctl command. When the logical addresses are cleared, then all information about outstanding transmits inside the CEC core is also cleared, and the core is no longer aware that there is still a transmit in flight. When the hardware finishes the transmit it calls transmit_done and the CEC core thinks it is actually in response of a POLL messages that is trying to find a free logical address. The result of all this is that the core thinks that the logical address for Playback Device 1 is in use, when it is really an earlier transmit that ended. The main transmit thread looks at adap->transmitting to check if a transmit is in progress, but that is set to NULL when the adapter is unconfigured. adap->transmitting represents the view of userspace, not that of the hardware. So when unconfiguring the adapter the message is marked aborted from the point of view of userspace, but seen from the PoV of the hardware it is still ongoing. So introduce a new bool transmit_in_progress that represents the hardware state and use that instead of adap->transmitting. Now the CEC core waits until the hardware finishes the transmit before starting a new transmit. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab commit db07c5ca5596901a9723245c0068668a7f2403c6 Author: Hans Verkuil Date: Wed Oct 17 07:05:41 2018 -0400 media: cec: add debug_phys_addr module option If debug_phys_addr is set, then CEC_CAP_PHYS_ADDR is added to the CEC adapter capabilities. This allows for testing CEC even if the physical address isn't set. This makes it possible to connect two HDMI outputs together and still use CEC. Very useful for testing CEC if you don't have access to an HDMI receiver under linux. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f02ac77c768ba2bcdd0ce719c1fca0870ffe2fb Author: Hans Verkuil Date: Tue Oct 16 03:44:20 2018 -0400 media: cec: report Vendor ID after initialization The CEC specification requires that the Vendor ID (if any) is reported after a logical address was claimed. This was never done, so add support for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40d91c9988af56d7a831df92c58fe28cebb3a764 Author: Hans Verkuil Date: Fri Oct 12 07:30:02 2018 -0400 media: adv7604: add CEC support for adv7611/adv7612 The CEC IP is very similar between the three HDMI receivers, but not identical. Add support for all three variants. Tested with an adv7604 and an adv7612. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit cd26d1c4d1bc947b56ae404998ae2276df7b39b7 Author: Hans Verkuil Date: Tue Nov 13 09:06:46 2018 -0500 media: vb2: vb2_mmap: move lock up If a filehandle is dup()ped, then it is possible to close it from one fd and call mmap from the other. This creates a race condition in vb2_mmap where it is using queue data that __vb2_queue_free (called from close()) is in the process of releasing. By moving up the mutex_lock(mmap_lock) in vb2_mmap this race is avoided since __vb2_queue_free is called with the same mutex locked. So vb2_mmap now reads consistent buffer data. Signed-off-by: Hans Verkuil Reported-by: syzbot+be93025dd45dccd8923c@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0141de741e0710d5e2e68087577329606f59ed71 Author: Thomas Gleixner Date: Wed Oct 31 19:21:16 2018 +0100 posix-timers: Remove license boilerplate The SPDX identifier defines the license of the file already. No need for the boilerplate. Remove also the completely outdated Montavista snail mail address. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182253.479792883@linutronix.de commit c804efeb58229e6040b9a200cbab1fc8c150f99d Author: Thomas Gleixner Date: Wed Oct 31 19:21:15 2018 +0100 posix-clocks: Remove license boiler plate The SPDX identifier defines the license of the file already. No need for the boilerplate. Signed-off-by: Thomas Gleixner Acked-by: Richard Cochran Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: Manfred Rudigier Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: "Paul E. McKenney" Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182253.385909804@linutronix.de commit 2fa6d420c22268b30dc46c8cbfe8bec0e361e03e Author: Thomas Gleixner Date: Wed Oct 31 19:21:14 2018 +0100 sched/clock: Remove license boilerplate The SPDX identifier defines the license of the file already. No need for the boilerplate. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182253.300140921@linutronix.de commit 3c8f2515ac0a986c8af6ba17c376f874306e71f4 Author: Thomas Gleixner Date: Wed Oct 31 19:21:13 2018 +0100 posix-timers/stubs: Remove license boilerplate The SPDX identifier defines the license of the file already. No need for the boilerplate. Signed-off-by: Thomas Gleixner Acked-by: Nicolas Pitre Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: David Riley Cc: Colin Cross Cc: Mark Brown Cc: Arnd Bergmann Link: https://lkml.kernel.org/r/20181031182253.215825217@linutronix.de commit 6c7811c628a96fe00965622f3aa1cf272cb898f7 Author: Thomas Gleixner Date: Wed Oct 31 19:21:12 2018 +0100 time: Remove license boilerplate The SPDX identifier defines the license of the files already. No need for the boilerplates. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Acked-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Cc: Paul E. McKenney Link: https://lkml.kernel.org/r/20181031182253.132458951@linutronix.de commit 9281a7857b91cf4d283be7c86d80e5d091bfb3d9 Author: Thomas Gleixner Date: Wed Oct 31 19:21:11 2018 +0100 time/debug: Remove license boilerplate The SPDX identifier is enough. Remove the license boilerplate. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182253.047449481@linutronix.de commit f49c174b5f431db9fa17315269e288d4548b651c Author: Thomas Gleixner Date: Wed Oct 31 19:21:10 2018 +0100 hrtimers/tick/clockevents: Remove sloppy license references "For licencing details see kernel-base/COPYING" and similar license references have no value over the SPDX identifier. Remove them. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182252.963632760@linutronix.de commit 35728b8209ee7d25b6241a56304ee926469bd154 Author: Thomas Gleixner Date: Wed Oct 31 19:21:09 2018 +0100 time: Add SPDX license identifiers Update the time(r) core files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Philippe Ombredanne, Kate Stewart and myself. The data has been created with two independent license scanners and manual inspection. The following files do not contain any direct license information and have been omitted from the big initial SPDX changes: timeconst.bc: The .bc files were not touched time.c, timer.c, timekeeping.c: Licence was deduced from EXPORT_SYMBOL_GPL As those files do not contain direct license references they fall under the project license, i.e. GPL V2 only. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Russell King Cc: Richard Cochran Cc: Nicolas Pitre Cc: David Riley Cc: Colin Cross Cc: Mark Brown Cc: H. Peter Anvin Cc: Paul E. McKenney Link: https://lkml.kernel.org/r/20181031182252.879109557@linutronix.de commit 58c5fc2b96e4ae65068d815a1c3ca81da92fa1c9 Author: Thomas Gleixner Date: Wed Oct 31 19:21:08 2018 +0100 time: Remove useless filenames in top level comments Remove the pointless filenames in the top level comments. They have no value at all and just occupy space. While at it tidy up some of the comments and remove a stale one. Signed-off-by: Thomas Gleixner Acked-by: Nicolas Pitre Acked-by: Kees Cook Acked-by: Ingo Molnar Acked-by: John Stultz Acked-by: Corey Minyard Cc: Peter Zijlstra Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Anvin Cc: Russell King Cc: Richard Cochran Cc: "Paul E. McKenney" Cc: David Riley Cc: Colin Cross Cc: Mark Brown Link: https://lkml.kernel.org/r/20181031182252.794898238@linutronix.de commit 2e84eb9affac43eeaf834992888b72426a8cd442 Author: Hans Verkuil Date: Wed Nov 14 08:25:53 2018 -0500 media: pulse8-cec: return 0 when invalidating the logical address Return 0 when invalidating the logical address. The cec core produces a warning for drivers that do this. Signed-off-by: Hans Verkuil Reported-by: Torbjorn Jansson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac791f19a273a7fe254a7596f193af6534582a9f Author: Hans Verkuil Date: Wed Nov 14 03:37:53 2018 -0500 media: cec-pin: fix broken tx_ignore_nack_until_eom error injection If the tx_ignore_nack_until_eom error injection was activated, then tx_nacked was never set instead of setting it when the last byte of the message was transmitted. As a result the transmit was marked as OK, when it should have been NACKed. Modify the condition so that it always sets tx_nacked when the last byte of the message was transmitted. Signed-off-by: Hans Verkuil Cc: # for v4.17 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 02e6d2eaa9c3f7dc04d67b5a37e17716fa019033 Author: Ricardo Ribalda Date: Fri Nov 9 10:25:41 2018 -0500 media: doc-rst: Fix broken references Documentation and code was linking the old documentation at: http://v4l2spec.bytesex.org/spec/x1904.htm Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b12c7afc10b01297949ef2cbc72385576169c9ed Author: kbuild test robot Date: Tue Nov 6 06:33:19 2018 -0500 media: platform: fix platform_no_drv_owner.cocci warnings drivers/staging/media/sunxi/cedrus/cedrus.c:421: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 Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver") CC: Paul Kocialkowski Signed-off-by: kbuild test robot Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87c6f1b57f61e83392dcb6b2e4398d444e83c7c8 Author: Jacopo Mondi Date: Tue Nov 6 05:54:27 2018 -0500 media: rcar-csi2: Handle per-SoC number of channels The R-Car CSI-2 interface has a number of selectable 'channels' that provides pixel data to the VINs during image acquisition. Each channel can be used to match a CSI-2 data type and a CSI-2 virtual channel to be routed to output path. Different SoCs have different number of channels, with R-Car E3 being the notable exception supporting only 2 of them. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 10c08812fe60ddfd480730a58bb78616262d659a Author: Jacopo Mondi Date: Tue Nov 6 05:54:26 2018 -0500 media: rcar: rcar-csi2: Update V3M/E3 PHTW tables Update PHTW tables for V3M and E3 SoCs to the latest datasheet release (R-Car Series, 3rd Generation manual rev1.00 20181017). Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6511459d2a233f3cfe405af219b3de5b62ca31f6 Author: Jacopo Mondi Date: Tue Nov 6 05:54:25 2018 -0500 media: rcar-csi2: Add R8A77990 support Add support for R-Car E3 R8A77965 to R-Car CSI-2 driver. Based on the experimental patch from Magnus Damm. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 72a8914ff0667f029bd80a51a14719e70a3c82a9 Author: Jacopo Mondi Date: Tue Nov 6 05:54:24 2018 -0500 media: dt-bindings: rcar-csi2: Add R8A77990 Add compatible string for R-Car E3 R8A77990 to the list of supported SoCs. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Simon Horman Reviewed-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fad6d6dd4e091992eda85364125299c9ff261111 Author: Jacopo Mondi Date: Tue Nov 6 05:54:23 2018 -0500 media: rcar-vin: Add support for R-Car R8A77990 Add R-Car E3 R8A77990 SoC to the rcar-vin supported ones. Based on the experimental patch from Magnus Damm. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cc4e51b838605ba3f03522b24a1cdc8828e5a7fd Author: Jacopo Mondi Date: Tue Nov 6 05:54:22 2018 -0500 media: dt-bindings: rcar-vin: Add R8A77990 support Add compatible string for R-Car E3 R8A77990 to the list of SoCs supported by rcar-vin driver. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Simon Horman Reviewed-by: Laurent Pinchart Acked-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3431ebe5a6c0ec665f25464183c7a810e483dee8 Author: Fabio Estevam Date: Tue Nov 6 05:16:05 2018 -0500 media: imx-pxp: Improve pxp_soft_reset() error message Improve the pxp_soft_reset() error message by moving it to the caller function, associating it with a proper device and also by displaying the error code. Signed-off-by: Fabio Estevam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e03eb362103b0b11ee210186675e835351866cb4 Author: Fabio Estevam Date: Tue Nov 6 05:16:04 2018 -0500 media: imx-pxp: Check for pxp_soft_reset() error pxp_soft_reset() may fail with a timeout, so it is better to propagate the error in this case. Signed-off-by: Fabio Estevam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit efceb765ff1df6d0ce0d024de5fe66bd7bb241da Author: Fabio Estevam Date: Tue Nov 6 05:16:03 2018 -0500 media: imx-pxp: Check the return value from clk_prepare_enable() clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c229f5c746657702df9b3980bdafd396ba60ed3c Author: Philipp Zabel Date: Mon Nov 5 10:25:13 2018 -0500 media: coda: debug output when setting visible size via crop selection In addition to the S_FMT debug output, S_SELECTION (SEL_TGT_CROP) is relevant to determine encoded size. Add debug output for it. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f90d15e6d5471bde75e77dbd415b27907bd56bd Author: Philipp Zabel Date: Mon Nov 5 10:25:12 2018 -0500 media: coda: normalise debug output Consistently add the context index to debug output, which otherwise is impossible to make sense of when two contexts are running concurrently. For this purpose, add a convenience macro coda_dbg(). Use the function name with the coda_ prefix stripped as keyword where applicable, and consistently use vid-out and vid-cap names for the queues. Add sequence counters to the decoder job finished message and correctly indicate B frames. Add a start streaming message to complement the stop streaming message and a start encoding message to complement the existing start decoding message. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 299cc3181b432e748cc8d333c875d909238c7609 Author: Philipp Zabel Date: Mon Nov 5 10:25:11 2018 -0500 media: coda: improve queue busy error message Use v4l2_type_names to indicate which of the two queues is busy. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01a2d72149d867f3e13c2f6cd503aaec02ecd5e5 Author: Michael Tretter Date: Mon Nov 5 10:25:10 2018 -0500 media: coda: print SEQ_INIT error code as hex value The error code looks much more like a bit field than an error value. Print it as hex rather than decimal. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7e47c38414145d31265369014ef0663e193ca661 Author: Philipp Zabel Date: Mon Nov 5 10:25:09 2018 -0500 media: coda: fail S_SELECTION for read-only targets v4l2-compliance complains if S_SELECTION returns 0 for read-only targets. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf13135cf593439ebae0db6d8177e8af0fc3a945 Author: Philipp Zabel Date: Mon Nov 5 10:25:08 2018 -0500 media: coda: never set infinite timeperframe v4l2-compliance complains if G_PARM returns 0 in the denominator. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 07b6080d4e6d4b60f69dab06c07d8b36017a05e3 Author: Philipp Zabel Date: Mon Nov 5 10:25:07 2018 -0500 media: coda: implement ENUM_FRAMEINTERVALS v4l2-compliance complains about S_PARM being supported, but not ENUM_FRAMEINTERVALS. Report a continuous frame interval even though the hardware only supports 16-bit numerator and denominator, with min/max values that can be programmed into the mailbox registers. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c5ce24bcacbfead905b210031bab131b416661a Author: Philipp Zabel Date: Mon Nov 5 10:25:06 2018 -0500 media: coda: set V4L2_CAP_TIMEPERFRAME flag in coda_s_parm The flag is already set in coda_g_parm, but v4l2-compliance complains about it not being set during S_PARM. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68d66a931079ac8badc0b224491dd57c5eacc4f4 Author: Lucas Stach Date: Mon Nov 5 10:25:05 2018 -0500 media: coda: don't disable IRQs across buffer meta handling The CODA driver uses threaded IRQs only, so there is nothing happening in hardirq context that could interfere with the buffer meta handling. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cdd87d3a2c3b68b4e199c041d9472216a2c503f9 Author: Philipp Zabel Date: Mon Nov 5 10:25:04 2018 -0500 media: coda: remove unused instances list The per-device instance list is unused, remove it. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 074e8db02cb4fa5890362bb6f11de5d055c03350 Author: Philipp Zabel Date: Mon Nov 5 10:25:03 2018 -0500 media: coda: reduce minimum frame size to 48x16 pixels. Three macroblocks seem to be the minimum resolution that can be encoded and decoded by the CODA960 h.264 codec. Picture run commands fail for smaller resolutions. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3d996fb03c6539771ad778cd66ff5595bfc263a Author: Lucas Stach Date: Mon Nov 5 10:25:02 2018 -0500 media: coda: limit queueing into internal bitstream buffer The ringbuffer used to hold the bitstream is very conservatively sized, as keyframes can get very large and still need to fit into this buffer. This means that the buffer is way oversized for the average stream to the extend that it will hold a few hundred frames when the video data is compressing well. The current strategy of queueing as much bitstream data as possible leads to large delays when draining the decoder. In order to keep the drain latency to a reasonable bound, try to only queue a full reorder window of buffers. We can't always hit this low target for very well compressible video data, as we might end up with less than the minimum amount of data that needs to be available to the bitstream prefetcher, so we must take this into account and allow more buffers to be queued in this case. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 51407c2da0b7baac581d0d9fbfc297d10b7d0424 Author: Philipp Zabel Date: Mon Nov 5 10:25:01 2018 -0500 media: coda: always hold back decoder jobs until we have enough bitstream payload The bitstream prefetch unit reads data in 256 byte blocks with some kind of queueing. For the decoder to see data up to a desired position in the next run, the bitstream has to be filled for 2 256 byte blocks past that position aligned up to the next 256 byte boundary. This should make sure we never run into a buffer underrun condition if userspace does not supply new input buffers fast enough. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c0f5d236fd0205a8dca24b82cfad1b1c6c0a1e0 Author: Philipp Zabel Date: Mon Nov 5 10:25:00 2018 -0500 media: coda: store unmasked fifo position in meta Storing the unmasked kfifo->in position as meta->start and ->end allows to more easily compare a point past meta->end with the current kfifo->in. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 649cfc2bdfeeb98ff7d8fdff0af3f8fb9c8da50f Author: Philipp Zabel Date: Tue Nov 6 05:40:54 2018 -0500 media: coda: fix memory corruption in case more than 32 instances are opened The ffz() return value is undefined if the instance mask does not contain any zeros. If it returned 32, the following set_bit would corrupt the debugfs_root pointer. Switch to IDA for context index allocation. This also removes the artificial 32 instance limit for all except CodaDx6. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c45fbdf24c61a7b7a37f1b3bbd46f054637a3627 Author: Rui Miguel Silva Date: Wed Nov 21 05:59:55 2018 -0500 media: ov2680: fix null dereference at power on Swapping the order between v4l2 subdevice registration and checking chip id in b7a417628abf ("media: ov2680: don't register the v4l2 subdevice before checking chip ID") makes the mode restore to use the sensor controls before they are set, so move the mode restore call to s_power after the handler setup for controls is done. This remove also the need for the error code path in power on function. Fixes: b7a417628abf ("media: ov2680: don't register the v4l2 subdevice before checking chip ID") Signed-off-by: Rui Miguel Silva Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5f229dcabc4acfb4e233e7678569f0fb9ab9c469 Author: Sakari Ailus Date: Wed Nov 21 12:29:35 2018 -0500 media: v4l: uAPI doc: Changing frame interval won't change format Document that changing the frame interval has no effect on frame size. While this was the assumption in the API, it was not documented as such. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 482ac2aa36fe24abac85c55db9213effce018929 Author: Maxime Ripard Date: Wed Nov 14 09:59:32 2018 -0500 media: sun6i: Add A31 compatible The first device that used that IP was the A31. Add it to our list of compatibles. Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b7eadaa3a02a38cfbfcc8603366d426043f159d5 Author: Maxime Ripard Date: Wed Nov 14 09:59:31 2018 -0500 media: dt-bindings: media: sun6i: Add A31 and H3 compatibles The H3 has a slightly different CSI controller (no BT656, no CCI) which looks a lot like the original A31 controller. Add a compatible for the A31, and more specific compatible the for the H3 to be used in combination for the A31. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 71bfeb42796e7c7b26d4f4bbcd88b57a35e3a9a9 Author: Mauro Carvalho Chehab Date: Fri Nov 23 05:11:04 2018 -0500 media: sun6i: manually fix other coding style issues There are a few other coding style issues reported by checkpatch while in --strict mode. Fix the ones that make sense. Signed-off-by: Mauro Carvalho Chehab commit 34d833a91ae67977e506b8afc5b869817537cb19 Author: Mauro Carvalho Chehab Date: Fri Nov 23 05:00:41 2018 -0500 media: sum6i: Fix a few coding style issues Make checkpatch.pl happier by running it on strict mode and using the --fix-inline to solve some issues. Signed-off-by: Mauro Carvalho Chehab commit 5cc7522d89655770a4b838ea77aeedf62f151891 Author: Yong Deng Date: Tue Oct 30 04:18:10 2018 -0400 media: sun6i: Add support for Allwinner CSI V3s Allwinner V3s SoC features a CSI module with parallel interface. This patch implement a v4l2 framework driver for it. Reviewed-by: Hans Verkuil Reviewed-by: Maxime Ripard Tested-by: Maxime Ripard Signed-off-by: Yong Deng Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 16c44c57ecd89402a1acc81617cff463ff446fe7 Author: Ricardo Reis Marques Silva Date: Thu Nov 22 02:49:05 2018 -0800 staging: vboxvideo: Rename uint32_t type to u32 Issue found by checkpatch. CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_cursor_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_primary_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' + const uint32_t *formats; Signed-off-by: Ricardo Reis Marques Silva Signed-off-by: Greg Kroah-Hartman commit b44beecab84a69d5d64fd2651b716e7c8cf2cdf7 Author: Michael Straube Date: Thu Nov 22 14:52:18 2018 +0100 staging: rtl8188eu: remove variable from rtl8188eu_xmit_tasklet() The local variable ret is only used to test the return value of the call to rtl8188eu_xmitframe_complete(). Use the function directly in the if test and remove the variable ret. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit fdf60cd7e68cb10148ca84ec14ecfd468b9be461 Author: Michael Straube Date: Thu Nov 22 14:52:17 2018 +0100 staging: rtl8188eu: cleanup declarations in usb_ops_linux.c Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit aa8591db2b8a384875b62754a0ddefe8304009cf Author: Michael Straube Date: Thu Nov 22 14:52:16 2018 +0100 staging: rtl8188eu: add spaces around '>>' and '&' Add spaces around '>>' and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 718d2523b998ccc95499537929909e3fa95db870 Author: Michael Straube Date: Thu Nov 22 14:52:15 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses Remove unnecessary parentheses in usb_ops_linux.c. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit d6ad6d389d1055183d436401bc532141ff574185 Author: Michael Straube Date: Thu Nov 22 14:52:14 2018 +0100 staging: rtl8188eu: correct spelling mistake in a comment Correct spelling mistake in a comment reported by checkpatch. checksumed -> checksummed Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit fa50658ec33754bb91819445e4e130f18604dfcc Author: Michael Straube Date: Thu Nov 22 14:52:13 2018 +0100 staging: rtl8188eu: remove braces from single if else statement Remove braces from single line if else statement. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c9ad9c49cc328af97a680d1da772483c374e887f Author: Michael Straube Date: Thu Nov 22 14:52:12 2018 +0100 staging: rtl8188eu: cleanup line ending with a '(' Cleanup line ending with a '(' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c03b0ff72e1b59434d59bec6a276e27655649ebf Author: Michael Straube Date: Thu Nov 22 14:52:11 2018 +0100 staging: rtl8188eu: use __func__ in usb_ops_linux.c Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit f0c519fc2679ca05a05bba2b5290b0cf621fbaa1 Author: Gao Xiang Date: Fri Nov 23 01:21:49 2018 +0800 staging: erofs: rename strange variable names in z_erofs_vle_frontend Previously, 2 members called `initial' and `cachedzone_la' are used for applying caching policy (whether the workgroup is at either end), which are hard to understand, rename them to `backmost' and `headoffset'. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 2d9b5dcd99428f9b8faea7f76c3e30c37c32cc9c Author: Gao Xiang Date: Fri Nov 23 01:21:48 2018 +0800 staging: erofs: decompress asynchronously if PG_readahead page at first For the case of nr_to_read == lookahead_size, it is better to decompress asynchronously as well since no page will be needed immediately. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 23edf3abe7abb1d1ab856c893629b96209473a5b Author: Gao Xiang Date: Fri Nov 23 01:21:47 2018 +0800 staging: erofs: locked before registering for all new workgroups Let's make sure that the one registering a workgroup will also take the primary work lock at first for two reasons: 1) There's no need to introduce such a race window (and consequently overhead) between registering and locking, other tasks could break in by chance, and the race seems unnecessary (no benefit at all); 2) It's better to take the primary work when a workgroup is registered to apply the cache managed policy, for example, if some other tasks break in, it could turn into the in-place decompression rather than use as the cached decompression. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 48d4bf3b05a683539a43faa02c6f3091c715c9cc Author: Gao Xiang Date: Fri Nov 23 01:21:46 2018 +0800 staging: erofs: separate into init_once / always `z_erofs_vle_workgroup' is heavily generated in the decompression, for example, it resets 32 bytes redundantly for 64-bit platforms even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES, default 4, pages are stored in `z_erofs_vle_workgroup'. As an another example, `struct mutex' takes 72 bytes for our kirin 64-bit platforms, it's unnecessary to be reseted at first and be initialized each time. Let's avoid filling all `z_erofs_vle_workgroup' with 0 at first since most fields are reinitialized to meaningful values later, and pagevec is no need to initialized at all. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 948bbdb1818b7ad6e539dad4fbd2dd4650793ea9 Author: Gao Xiang Date: Fri Nov 23 01:16:03 2018 +0800 staging: erofs: add a full barrier in erofs_workgroup_unfreeze Just like other generic locks, insert a full barrier in case of memory reorder. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 73f5c66df3e26ab750cefcb9a3e08c71c9f79cad Author: Gao Xiang Date: Fri Nov 23 01:16:02 2018 +0800 staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}' There are two minor issues in the current freeze interface: 1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, therefore fix the incorrect conditions; 2) For SMP platforms, it should also disable preemption before doing atomic_cmpxchg in case that some high priority tasks preempt between atomic_cmpxchg and disable_preempt, then spin on the locked refcount later. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit df134b8d17b90c1e7720e318d36416b57424ff7a Author: Gao Xiang Date: Fri Nov 23 01:16:01 2018 +0800 staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup It's better to use atomic_cond_read_relaxed, which is implemented in hardware instructions to monitor a variable changes currently for ARM64, instead of open-coded busy waiting. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 51232df5e4b268936beccde5248f312a316800be Author: Gao Xiang Date: Fri Nov 23 01:16:00 2018 +0800 staging: erofs: fix race when the managed cache is enabled When the managed cache is enabled, the last reference count of a workgroup must be used for its workstation. Otherwise, it could lead to incorrect (un)freezes in the reclaim path, and it would be harmful. A typical race as follows: Thread 1 (In the reclaim path) Thread 2 workgroup_freeze(grp, 1) refcnt = 1 ... workgroup_unfreeze(grp, 1) refcnt = 1 workgroup_get(grp) refcnt = 2 (x) workgroup_put(grp) refcnt = 1 (x) ...unexpected behaviors * grp is detached but still used, which violates cache-managed freeze constraint. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit eef168789866514e5d4316f030131c9fe65b643f Author: Gao Xiang Date: Fri Nov 23 01:15:59 2018 +0800 staging: erofs: fix the definition of DBG_BUGON It's better not to positively BUG_ON the kernel, however developers need a way to locate issues as soon as possible. DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. It is helpful for developers to find and solve bugs quickly by eng builds. Previously, DBG_BUGON is defined as ((void)0) if EROFS_FS_DEBUG is off, but some unused variable warnings as follows could occur: drivers/staging/erofs/unzip_vle.c: In function `init_alway:': drivers/staging/erofs/unzip_vle.c:61:33: warning: unused variable `work' [-Wunused-variable] struct z_erofs_vle_work *const work = ^~~~ Fix it to #define DBG_BUGON(x) ((void)(x)). Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit ba9ce771b018c5bbb22c9ed6f03fd0868f1003d5 Author: Gao Xiang Date: Fri Nov 23 01:15:58 2018 +0800 staging: erofs: fix `trace_erofs_readpage' position `trace_erofs_readpage' was designed for .readpage() interface hook in order to trace the detailed synchronized read rather than the internal implementation `z_erofs_do_read_page' which both .readpage() and .readpages() use. It seems the tracepoint was placed to a wrong place by mistake and it should be moved to the right place. Fixes: 284db12cfda3 ("staging: erofs: add trace points for reading zipped data") Reviewed-by: Chen Gong Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit d959c40f370e9c072a575db08415c7e258796424 Author: Yong Deng Date: Tue Oct 30 04:12:23 2018 -0400 media: dt-bindings: media: Add Allwinner V3s Camera Sensor Interface (CSI) Add binding documentation for Allwinner V3s CSI. Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Yong Deng Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bedfcd467c33976c4a25ccafb3c6a61f88fc5511 Author: Akinobu Mita Date: Mon Nov 12 11:00:54 2018 -0500 media: ov772x: support log_status ioctl and event interface This adds log_status ioctl and event interface for ov772x's v4l2 controls. Cc: Jacopo Mondi Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7852adf83cdd466b08f6d8204bf704dfa748408d Author: Akinobu Mita Date: Mon Nov 12 11:00:53 2018 -0500 media: ov7670: support log_status ioctl and event interface This adds log_status ioctl and event interface for ov7670's v4l2 controls. Cc: Jonathan Corbet Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2d18fbc5518f051718ce7d54bba1e2665921aa1d Author: Akinobu Mita Date: Mon Nov 12 11:00:52 2018 -0500 media: ov5640: support log_status ioctl and event interface This adds log_status ioctl and event interface for ov5640's v4l2 controls. Cc: Steve Longerbeam Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c65455160a72f306ddb6cc18964717e43fdb0a94 Author: Akinobu Mita Date: Mon Nov 12 11:00:51 2018 -0500 media: ov2640: support log_status ioctl and event interface This adds log_status ioctl and event interface for ov2640's v4l2 controls. Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6210500691b21e1f755b0076dd54fdb31236e2de Author: Akinobu Mita Date: Mon Nov 12 11:00:50 2018 -0500 media: ov2640: add V4L2_CID_TEST_PATTERN control The ov2640 has the test pattern generator features. This makes use of it through V4L2_CID_TEST_PATTERN control. [Sakari Ailus: Use "Eight Vertical Colour Bars" as the second manu entry] Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dde64f725a4d0afa7a589292365afe5759af7388 Author: Akinobu Mita Date: Mon Nov 12 11:00:49 2018 -0500 media: mt9m111: add V4L2_CID_COLORFX control The mt9m111 has special camera effects feature. This makes use of it through V4L2_CID_COLORFX control. Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 329d9e353df4dde2fbf21939685ada7f1d322cb3 Author: Akinobu Mita Date: Mon Nov 12 11:00:48 2018 -0500 media: mt9m111: support log_status ioctl and event interface This adds log_status ioctl and event interface for mt9m111's v4l2 controls. Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 53f6f81da7db96557fe2bff9b15bd6b83d301f9f Author: Chen, JasonX Z Date: Wed Nov 7 21:47:34 2018 -0500 media: imx258: remove test pattern map from driver change bayer order when using test pattern mode. remove test pattern mapping method [Sakari Ailus: Drop extra added newline] Signed-off-by: Chen, JasonX Z Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9ffd7ffe6504379d40b07b03510f3ef080f85af9 Author: Sakari Ailus Date: Wed Nov 7 10:02:30 2018 -0500 media: v4l: uAPI doc: Simplify NATIVE_SIZE selection target documentation The NATIVE_SIZE target is documented for mem2mem devices but no driver has ever apparently used it. It may be never needed; remove it for now. Suggested-by: Hans Verkuil Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cb24f1a0ee61b7dc8adf39aa19f290bf12df9d7f Author: Nathan Chancellor Date: Wed Nov 7 01:24:50 2018 -0500 media: imx214: Remove unnecessary self assignment in for loop Clang warns when a variable is assigned to itself: drivers/media/i2c/imx214.c:695:13: error: explicitly assigning value of variable of type 'const struct reg_8 *' to itself [-Werror,-Wself-assign] for (table = table; table->addr != IMX214_TABLE_END ; table++) { ~~~~~ ^ ~~~~~ 1 error generated. Signed-off-by: Nathan Chancellor Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 16ecf6dff97ce0194a7126e26159492668d47a7e Author: Dafna Hirschfeld Date: Thu Nov 15 06:23:32 2018 -0500 media: vicodec: Add support for 4 planes formats Add support for formats with 4 planes: V4L2_PIX_FMT_ABGR32, V4L2_PIX_FMT_ARGB32. Also add alpha plane related flags to the header of the encoded file. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix line-too-long warnings] Signed-off-by: Mauro Carvalho Chehab commit 195057196bfe2ebda5f48fb073ffe1841b70b37e Author: Dafna Hirschfeld Date: Thu Nov 15 06:23:31 2018 -0500 media: vicodec: Add support of greyscale format Add support for single plane greyscale format V4L2_PIX_FMT_GREY. Also change the header of the encoded file to include the number of components. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix line-too-long warnings] Signed-off-by: Mauro Carvalho Chehab commit aec89917542c60af06fb36e433dd92c4eb7d792a Author: Dafna Hirschfeld Date: Thu Nov 15 06:23:30 2018 -0500 media: vicodec: prepare support for various number of planes Add fields to the structs `fwht_raw_frame`, `v4l2_fwht_pixfmts` to support various number of planes - formats with alpha channel that have 4 planes and greyscale formats that have 1 plane. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e3f14052f7301a27915973287cf8c2e669f0b8c Author: Hans Verkuil Date: Sun Nov 18 05:17:07 2018 -0500 media: vidioc-enum-fmt.rst: update list of valid buftypes ENUM_FMT is valid for SDR and META buffer types as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 47fc65fab146611849c0291bcb92da800e6de445 Author: Hans Verkuil Date: Thu Nov 15 03:16:22 2018 -0500 media: vim2m/vicodec: set device_caps in video_device struct Instead of setting device_caps/capabilities in the querycap ioctl, set it in struct video_device instead. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7c91d0a4e1b7160da25a044a9e696f8ba1df3934 Author: Eric Biggers Date: Wed Nov 14 14:04:49 2018 -0500 media: v4l: constify v4l2_ioctls[] v4l2_ioctls[] is never modified, so mark it 'const'. This way it gets placed in .rodata. Signed-off-by: Eric Biggers Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f8e5b2f3903ce187106f73d0b34cab7c2f6c068a Author: Malathi Gottam Date: Mon Nov 12 04:06:02 2018 -0500 media: venus: change the default value of GOP size When the client doesn't explicitly set any GOP size, current default value is low and overshoots bitrate beyond tolerance. Hence default value is modified so as to have intra period of 1sec. Signed-off-by: Malathi Gottam Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7f7da2a603a62dfcfe272ed027c6493170fc057 Author: Julia Lawall Date: Tue Oct 30 11:31:22 2018 -0400 media: video-i2c: hwmon: constify vb2_ops structure The vb2_ops structure can be const as it is only stored in the ops field of a vb2_queue structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Matt Ranostay Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ea0f2ba0fa3f91ea1b8d823a54b042026ada6b3 Author: Alexey Khoroshilov Date: Sat Oct 20 13:50:19 2018 -0400 media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm() of_parse_phandle() returns the device node with refcount incremented. There are two nodes that are used temporary in mtk_vcodec_init_enc_pm(), but their refcounts are not decremented. The patch adds one of_node_put() and fixes returning error codes. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56281021d654332fc176563e64da0383e48fc9d8 Author: Akinobu Mita Date: Sat Oct 20 10:26:27 2018 -0400 media: video-i2c: support changing frame interval AMG88xx has a register for setting frame rate 1 or 10 FPS. This adds support changing frame interval. Reference specifications: https://docid81hrs3j1.cloudfront.net/medialibrary/2017/11/PANA-S-A0002141979-1.pdf Acked-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a714f6c70c286f0e470c63a97e6212e8f006836a Author: Akinobu Mita Date: Sat Oct 20 10:26:26 2018 -0400 media: vivid: use V4L2_FRACT_COMPARE Now the equivalent of FRACT_CMP() is added in v4l2 common internal API header. Cc: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 85de5e069a394b60bfa605086bae136da19a70fb Author: Akinobu Mita Date: Sat Oct 20 10:26:25 2018 -0400 media: v4l2-common: add V4L2_FRACT_COMPARE Add macro to compare two v4l2_fract values in v4l2 common internal API. The same macro FRACT_CMP() is used by vivid and bcm2835-camera. This just renames it to V4L2_FRACT_COMPARE in order to avoid namespace collision. Cc: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ae9e196dad3b5c9b23b2ac2b21e91f548cd60d3b Author: Akinobu Mita Date: Sat Oct 20 10:26:24 2018 -0400 media: video-i2c: use i2c regmap Use regmap for i2c register access. This simplifies register accesses and chooses suitable access commands based on the functionality that the adapter supports. Acked-by: Matt Ranostay Acked-by: Sakari Ailus Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c764da98a600a4b068d25c77164f092f159cecec Author: Akinobu Mita Date: Sat Oct 20 10:26:23 2018 -0400 media: video-i2c: avoid accessing released memory area when removing driver The video device release() callback for video-i2c driver frees the whole struct video_i2c_data. If there is no user left for the video device when video_unregister_device() is called, the release callback is executed. However, in video_i2c_remove() some fields (v4l2_dev, lock, and queue_lock) in struct video_i2c_data are still accessed after video_unregister_device() is called. This fixes the use after free by moving the code from video_i2c_remove() to the release() callback. Fixes: 5cebaac60974 ("media: video-i2c: add video-i2c driver") Reviewed-by: Matt Ranostay Signed-off-by: Akinobu Mita Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6abd837104a3a8e1cda64fc4d7675f6c3ece9d8b Author: Nikolaj Fogh Date: Thu Nov 22 21:27:46 2018 +0100 USB: serial: ftdi_sio: use rounding when calculating baud rate divisors Improve baud-rate generation by using rounding-to-closest instead of truncation in divisor calculation. Results have been verified by logic analyzer on an FT232RT (232BM) chip. The following table shows the wanted baud rate, the baud rate obtained with the old method (truncation), with the new method (rounding) and the baud rate generated by the windows 10 driver. The numbers in parentheses is the error. +- Wanted --+------ Old -------+------ New -------+------ Win -------+ |   9600  |   9600 (0.00%)  |   9604 (0.05%)  |   9605 (0.05%)  | |   19200   |   19200 (0.00%)  |   19199 (0.01%)  |   19198 (0.01%)  | |   38400   |   38395 (0.01%)  |   38431 (0.08%)  |   38394 (0.02%)  | |   57600   |   57725 (0.22%)  |   57540 (0.10%)  |   57673 (0.13%)  | |  115200   |  115307 (0.09%)  |  115330 (0.11%)  |  115320 (0.10%)  | |  921600   |  919963 (0.18%)  |  920386 (0.13%)  |  920810 (0.09%)  | |  961200   |  996512 (3.67%)  |  956480 (0.49%)  |  956937 (0.44%)  | +-----------+------------------+------------------+------------------+ The error due to noise in the measurements is in the order of a few tenths of a %. As can be seen, the baud rate is significantly improved for some rates (e.g. 961200), and corresponds to the output given by the windows driver. The theoretical baud rate has been calculated for all baud rates from 1 to 3M, and as expected, the error is centered around 0, with a triangle shape instead of a sawtooth, so the maximum error is decreased to half. Signed-off-by: Nikolaj Fogh [ johan: edit commit message slightly ] Signed-off-by: Johan Hovold commit b59d0e782706785b7042539e820e95df3be4d04c Author: Chris Brandt Date: Thu Nov 15 11:15:27 2018 -0500 pinctrl: Add RZ/A2 pin and gpio controller Adds support for the pin and gpio controller found in R7S9210 (RZ/A2) SoCs. Signed-off-by: Chris Brandt Reviewed-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven commit 94693b7b83c0a326965d4e59cf7767b253803712 Author: Chris Brandt Date: Thu Nov 15 11:15:28 2018 -0500 dt-bindings: pinctrl: Add RZ/A2 pinctrl and GPIO Add device tree binding documentation and header file for Renesas R7S9210 (RZ/A2) SoCs. Signed-off-by: Chris Brandt Reviewed-by: Rob Herring Reviewed-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven commit 89f579ce99f7e028e81885d3965f973c0f787611 Author: Yi Wang Date: Thu Nov 22 10:04:09 2018 +0800 x86/headers: Fix -Wmissing-prototypes warning When building the kernel with W=1 we get a lot of -Wmissing-prototypes warnings, which are trivial in nature and easy to fix - and which may mask some real future bugs if the prototypes get out of sync with the function definition. This patch fixes most of -Wmissing-prototypes warnings which are in the root directory of arch/x86/kernel, not including the subdirectories. These are the warnings fixed in this patch: arch/x86/kernel/signal.c:865:17: warning: no previous prototype for ‘sys32_x32_rt_sigreturn’ [-Wmissing-prototypes] arch/x86/kernel/signal_compat.c:164:6: warning: no previous prototype for ‘sigaction_compat_abi’ [-Wmissing-prototypes] arch/x86/kernel/traps.c:625:46: warning: no previous prototype for ‘sync_regs’ [-Wmissing-prototypes] arch/x86/kernel/traps.c:640:24: warning: no previous prototype for ‘fixup_bad_iret’ [-Wmissing-prototypes] arch/x86/kernel/traps.c:929:13: warning: no previous prototype for ‘trap_init’ [-Wmissing-prototypes] arch/x86/kernel/irq.c:270:28: warning: no previous prototype for ‘smp_x86_platform_ipi’ [-Wmissing-prototypes] arch/x86/kernel/irq.c:301:16: warning: no previous prototype for ‘smp_kvm_posted_intr_ipi’ [-Wmissing-prototypes] arch/x86/kernel/irq.c:314:16: warning: no previous prototype for ‘smp_kvm_posted_intr_wakeup_ipi’ [-Wmissing-prototypes] arch/x86/kernel/irq.c:328:16: warning: no previous prototype for ‘smp_kvm_posted_intr_nested_ipi’ [-Wmissing-prototypes] arch/x86/kernel/irq_work.c:16:28: warning: no previous prototype for ‘smp_irq_work_interrupt’ [-Wmissing-prototypes] arch/x86/kernel/irqinit.c:79:13: warning: no previous prototype for ‘init_IRQ’ [-Wmissing-prototypes] arch/x86/kernel/quirks.c:672:13: warning: no previous prototype for ‘early_platform_quirks’ [-Wmissing-prototypes] arch/x86/kernel/tsc.c:1499:15: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes] arch/x86/kernel/process.c:653:13: warning: no previous prototype for ‘arch_post_acpi_subsys_init’ [-Wmissing-prototypes] arch/x86/kernel/process.c:717:15: warning: no previous prototype for ‘arch_randomize_brk’ [-Wmissing-prototypes] arch/x86/kernel/process.c:784:6: warning: no previous prototype for ‘do_arch_prctl_common’ [-Wmissing-prototypes] arch/x86/kernel/reboot.c:869:6: warning: no previous prototype for ‘nmi_panic_self_stop’ [-Wmissing-prototypes] arch/x86/kernel/smp.c:176:27: warning: no previous prototype for ‘smp_reboot_interrupt’ [-Wmissing-prototypes] arch/x86/kernel/smp.c:260:28: warning: no previous prototype for ‘smp_reschedule_interrupt’ [-Wmissing-prototypes] arch/x86/kernel/smp.c:281:28: warning: no previous prototype for ‘smp_call_function_interrupt’ [-Wmissing-prototypes] arch/x86/kernel/smp.c:291:28: warning: no previous prototype for ‘smp_call_function_single_interrupt’ [-Wmissing-prototypes] arch/x86/kernel/ftrace.c:840:6: warning: no previous prototype for ‘arch_ftrace_update_trampoline’ [-Wmissing-prototypes] arch/x86/kernel/ftrace.c:934:7: warning: no previous prototype for ‘arch_ftrace_trampoline_func’ [-Wmissing-prototypes] arch/x86/kernel/ftrace.c:946:6: warning: no previous prototype for ‘arch_ftrace_trampoline_free’ [-Wmissing-prototypes] arch/x86/kernel/crash.c:114:6: warning: no previous prototype for ‘crash_smp_send_stop’ [-Wmissing-prototypes] arch/x86/kernel/crash.c:351:5: warning: no previous prototype for ‘crash_setup_memmap_entries’ [-Wmissing-prototypes] arch/x86/kernel/crash.c:424:5: warning: no previous prototype for ‘crash_load_segments’ [-Wmissing-prototypes] arch/x86/kernel/machine_kexec_64.c:372:7: warning: no previous prototype for ‘arch_kexec_kernel_image_load’ [-Wmissing-prototypes] arch/x86/kernel/paravirt-spinlocks.c:12:16: warning: no previous prototype for ‘__native_queued_spin_unlock’ [-Wmissing-prototypes] arch/x86/kernel/paravirt-spinlocks.c:18:6: warning: no previous prototype for ‘pv_is_native_spin_unlock’ [-Wmissing-prototypes] arch/x86/kernel/paravirt-spinlocks.c:24:16: warning: no previous prototype for ‘__native_vcpu_is_preempted’ [-Wmissing-prototypes] arch/x86/kernel/paravirt-spinlocks.c:30:6: warning: no previous prototype for ‘pv_is_native_vcpu_is_preempted’ [-Wmissing-prototypes] arch/x86/kernel/kvm.c:258:1: warning: no previous prototype for ‘do_async_page_fault’ [-Wmissing-prototypes] arch/x86/kernel/jailhouse.c:200:6: warning: no previous prototype for ‘jailhouse_paravirt’ [-Wmissing-prototypes] arch/x86/kernel/check.c:91:13: warning: no previous prototype for ‘setup_bios_corruption_check’ [-Wmissing-prototypes] arch/x86/kernel/check.c:139:6: warning: no previous prototype for ‘check_for_bios_corruption’ [-Wmissing-prototypes] arch/x86/kernel/devicetree.c:32:13: warning: no previous prototype for ‘early_init_dt_scan_chosen_arch’ [-Wmissing-prototypes] arch/x86/kernel/devicetree.c:42:13: warning: no previous prototype for ‘add_dtb’ [-Wmissing-prototypes] arch/x86/kernel/devicetree.c:108:6: warning: no previous prototype for ‘x86_of_pci_init’ [-Wmissing-prototypes] arch/x86/kernel/devicetree.c:314:13: warning: no previous prototype for ‘x86_dtb_init’ [-Wmissing-prototypes] arch/x86/kernel/tracepoint.c:16:5: warning: no previous prototype for ‘trace_pagefault_reg’ [-Wmissing-prototypes] arch/x86/kernel/tracepoint.c:22:6: warning: no previous prototype for ‘trace_pagefault_unreg’ [-Wmissing-prototypes] arch/x86/kernel/head64.c:113:22: warning: no previous prototype for ‘__startup_64’ [-Wmissing-prototypes] arch/x86/kernel/head64.c:262:15: warning: no previous prototype for ‘__startup_secondary_64’ [-Wmissing-prototypes] arch/x86/kernel/head64.c:350:12: warning: no previous prototype for ‘early_make_pgtable’ [-Wmissing-prototypes] [ mingo: rewrote the changelog, fixed build errors. ] Signed-off-by: Yi Wang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: akpm@linux-foundation.org Cc: andy.shevchenko@gmail.com Cc: anton@enomsg.org Cc: ard.biesheuvel@linaro.org Cc: bhe@redhat.com Cc: bhelgaas@google.com Cc: bp@alien8.de Cc: ccross@android.com Cc: devicetree@vger.kernel.org Cc: douly.fnst@cn.fujitsu.com Cc: dwmw@amazon.co.uk Cc: dyoung@redhat.com Cc: ebiederm@xmission.com Cc: frank.rowand@sony.com Cc: frowand.list@gmail.com Cc: ivan.gorinov@intel.com Cc: jailhouse-dev@googlegroups.com Cc: jan.kiszka@siemens.com Cc: jgross@suse.com Cc: jroedel@suse.de Cc: keescook@chromium.org Cc: kexec@lists.infradead.org Cc: konrad.wilk@oracle.com Cc: kvm@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@kernel.org Cc: m.mizuma@jp.fujitsu.com Cc: namit@vmware.com Cc: oleg@redhat.com Cc: pasha.tatashin@oracle.com Cc: pbonzini@redhat.com Cc: prarit@redhat.com Cc: pravin.shedge4linux@gmail.com Cc: rajvi.jingar@intel.com Cc: rkrcmar@redhat.com Cc: robh+dt@kernel.org Cc: robh@kernel.org Cc: rostedt@goodmis.org Cc: takahiro.akashi@linaro.org Cc: thomas.lendacky@amd.com Cc: tony.luck@intel.com Cc: up2wing@gmail.com Cc: virtualization@lists.linux-foundation.org Cc: zhe.he@windriver.com Cc: zhong.weidong@zte.com.cn Link: http://lkml.kernel.org/r/1542852249-19820-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Ingo Molnar commit 6e662ae7bce6db602f79e57791f5fb887fb7d371 Author: Yafang Shao Date: Wed Nov 21 19:12:14 2018 +0800 x86/process: Avoid unnecessary NULL check in get_wchan() Task 'p' is always guaranteed to be non-NULL, because the only call sites are in fs/proc/ which all guarantee a non-NULL task pointer. [ mingo: Improved the changelog. ] Signed-off-by: Yafang Shao 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/1542798734-12532-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Ingo Molnar commit e822eac560a89d04e26843b4908b0c2011c79de4 Merge: 3e27c79c4b121 534245cc69c2a Author: Viresh Kumar Date: Fri Nov 23 10:50:18 2018 +0530 Merge branch 'opp/genpd/required-opps' into opp/linux-next commit 6630a8e5010517cc7f28788137d5cdae2550f346 Author: Christoph Hellwig Date: Thu Nov 15 20:05:37 2018 +0100 eisa: consolidate EISA Kconfig entry in drivers/eisa Let architectures opt into EISA support by selecting HAVE_EISA and handle everything else in drivers/eisa. Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit 1753d50c9fdc39338d90ed246fc99f9a0efc35c3 Author: Christoph Hellwig Date: Thu Nov 15 20:05:36 2018 +0100 rapidio: consolidate RAPIDIO config entry in drivers/rapidio There is no good reason to duplicate the RAPIDIO menu in various architectures. Instead provide a selectable HAVE_RAPIDIO symbol that indicates native availability of RAPIDIO support and the handle the rest in drivers/pci. This also means we now provide support for PCI(e) to Rapidio bridges for every architecture instead of a limited subset. Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit 8fb71ef9b91d6c89b22ea9430c231e988d88f688 Author: Christoph Hellwig Date: Thu Nov 15 20:05:35 2018 +0100 pcmcia: allow PCMCIA support independent of the architecture There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC. Signed-off-by: Christoph Hellwig Acked-by: Dominik Brodowski Acked-by: Thomas Gleixner Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit 20f1b79d33590dfe8dfdac52a683c7d96e3d101f Author: Christoph Hellwig Date: Thu Nov 15 20:05:34 2018 +0100 PCI: consolidate the PCI_SYSCALL symbol Let architectures select the syscall support instead of duplicating the kconfig entry. Signed-off-by: Christoph Hellwig Signed-off-by: Masahiro Yamada commit 2eac9c2dfb2b9660d592abbf3d172ebcb0af3719 Author: Christoph Hellwig Date: Thu Nov 15 20:05:33 2018 +0100 PCI: consolidate the PCI_DOMAINS and PCI_DOMAINS_GENERIC config options Move the definitions to drivers/pci and let the architectures select them. Two small differences to before: PCI_DOMAINS_GENERIC now selects PCI_DOMAINS, cutting down the churn for modern architectures. As the only architectured arm did previously also offer PCI_DOMAINS as a user visible choice in addition to selecting it from the relevant configs, this is gone now. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit eb01d42a77785ff96b6e66a2a2e7027fc6d78e4a Author: Christoph Hellwig Date: Thu Nov 15 20:05:32 2018 +0100 PCI: consolidate PCI config entry in drivers/pci There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAVE_PCI symbol that indicates availability of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the rest in drivers/pci. Signed-off-by: Christoph Hellwig Reviewed-by: Palmer Dabbelt Acked-by: Max Filippov Acked-by: Thomas Gleixner Acked-by: Bjorn Helgaas Acked-by: Geert Uytterhoeven Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit 437f2b8c20858a9a27fed4066ed679f92b982f38 Author: Christoph Hellwig Date: Thu Nov 15 20:05:31 2018 +0100 MIPS: remove the HT_PCI config option This option is always selected from LOONGSON_MACH3X. Switch to just seleting PCI from that option and definining LOONGSON_PCIIO_BASE based on CONFIG_LOONGSON_MACH3X. PCI already selects PCI_DOMAINS. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton Signed-off-by: Masahiro Yamada commit f11216b24219ab26d8d159fbfa12dff886b16e32 Author: Vlad Dumitrescu Date: Thu Nov 22 14:39:16 2018 -0500 bpf: add skb->tstamp r/w access from tc clsact and cg skb progs This could be used to rate limit egress traffic in concert with a qdisc which supports Earliest Departure Time, such as FQ. Write access from cg skb progs only with CAP_SYS_ADMIN, since the value will be used by downstream qdiscs. It might make sense to relax this. Changes v1 -> v2: - allow access from cg skb, write only with CAP_SYS_ADMIN Signed-off-by: Vlad Dumitrescu Acked-by: Eric Dumazet Acked-by: Willem de Bruijn Signed-off-by: Alexei Starovoitov commit 16c36c4cb84de069cf6b1398b7a2de29052b8eb9 Author: José Roberto de Souza Date: Wed Nov 21 14:54:41 2018 -0800 drm/i915/hsw: Drop the stereo 3D enabled check in psr_compute_config() We should not access hardware while computing config also we don't support stereo 3D so this test was never true. Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-6-jose.souza@intel.com commit 888bf84dba3d60a347d67ab0b6c22f72dec7eb26 Author: José Roberto de Souza Date: Wed Nov 21 14:54:40 2018 -0800 drm/i915: Keep PSR disabled after a driver reload after a PSR error If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR will still keep the error set even after the reset done in the irq_preinstall and irq_uninstall hooks. And enabling in this situation cause the screen to freeze in the first time that PSR HW tries to activate so lets keep PSR disabled to avoid any rendering problems. v5: rebased: using edp_psr_shift() v4: Moved handling from intel_psr_compute_config() to intel_psr_init() to avoid hardware access during compute(Ville) Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza squash Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-5-jose.souza@intel.com commit 183b8e676db2cbf80c0769e472d045bb602e4ea5 Author: José Roberto de Souza Date: Wed Nov 21 14:54:39 2018 -0800 drm/i915: Disable PSR when a PSR aux error happen While PSR is active hardware will do aux transactions by it self to wakeup sink to receive a new frame when necessary. If that transaction is not acked by sink, hardware will trigger this interruption. So let's disable PSR as it is a hint that there is problem with this sink. The removed FIXME was asking to manually train the link but we don't need to do that as by spec sink should do a short pulse when it is out of sync with source, we just need to make sure it is awaken and the SDP header with PSR inactive set it will trigger the short pulse with a error set in the link status. v3: added workarround to fix scheduled work starvation cause by to frequent PSR error interruption v4: only setting irq_aux_error as we don't care in clear it and not using dev_priv->irq_lock as consequence. v5: rebased: using edp_psr_shift() Cc: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-4-jose.souza@intel.com commit 50a12d8fc9a0d687d9ef4ac9cc16d177a2529937 Author: José Roberto de Souza Date: Wed Nov 21 14:54:38 2018 -0800 drm/i915: Do not enable PSR in the next modeset after a error When we detect a error and disable PSR, it is kept disabled until the next modeset but as the sink already show signs that it do not properly work with PSR lets disabled it for good to avoid any additional flickering. Cc: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-3-jose.souza@intel.com commit 2f8e7ea974c164c6d2f7761b7406a28fbf0f20c9 Author: José Roberto de Souza Date: Wed Nov 21 14:54:37 2018 -0800 drm/i915: Check PSR errors instead of retrain while PSR is enabled When a PSR error happens sink sets the PSR error register and also set the link status to a error status. So in the short pulse handling it was returning earlier and doing a full detection and attempting to retrain but it fails as PSR HW is in change of the main-link. Just call intel_psr_short_pulse() before intel_dp_needs_link_retrain() is not the right fix as intel_dp_needs_link_retrain() would return true and trigger a full detection while PSR HW is still in change of main-link. Check for PSR active is also not safe as it could be inactive due a frontbuffer invalidate and still doing the PSR exit sequence. v3: added comment in intel_dp_needs_link_retrain() Cc: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-2-jose.souza@intel.com commit 2bb06265cfd4e4d00ab9612e6a2b9a788f819afd Author: José Roberto de Souza Date: Wed Nov 21 14:54:36 2018 -0800 drm/i915: Avoid a full port detection in the first eDP short pulse Some eDP panels do not set a valid sink count value and even for the ones that sets is should always be one for eDP, that is why it is not cached in intel_edp_init_dpcd(). But intel_dp_short_pulse() compares the old count with the read one if there is a mistmatch a full port detection will be executed, what was happening in the first short pulse interruption of eDP panels that sets sink count. Instead of just skip the compasison for eDP panels, lets not read the sink count at all for eDP. v2: the previous version of this patch it was caching the sink count in intel_edp_init_dpcd() but I was pointed out by Ville a patch that handled a case of a eDP panel that do not set sink count and as sink count is not used to eDP certification was choosed to just not read it at all. Cc: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181121225441.18785-1-jose.souza@intel.com commit 01b671170d7f82b959dad6d5dbb44d7a915e647d Author: Parav Pandit Date: Fri Nov 16 03:50:57 2018 +0200 RDMA/core: Sync unregistration with netlink commands When the rdma device is getting removed, get resource info can race with device removal, as below: CPU-0 CPU-1 -------- -------- rdma_nl_rcv_msg() nldev_res_get_cq_dumpit() mutex_lock(device_lock); get device reference mutex_unlock(device_lock); [..] ib_unregister_device() /* Valid reference to * device->dev exists. */ ib_dealloc_device() [..] provider->fill_res_entry(); Even though device object is not freed, fill_res_entry() can get called on device which doesn't have a driver anymore. Kernel core device reference count is not sufficient, as this only keeps the structure valid, and doesn't guarantee the driver is still loaded. Similar race can occur with device renaming and device removal, where device_rename() tries to rename a unregistered device. While this is fine for devices of a class which are not net namespace aware, but it is incorrect for net namespace aware class coming in subsequent series. If a class is net namespace aware, then the below [1] call trace is observed in above situation. Therefore, to avoid the race, keep a reference count and let device unregistration wait until all netlink users drop the reference. [1] Call trace: kernfs: ns required in 'infiniband' for 'mlx5_0' WARNING: CPU: 18 PID: 44270 at fs/kernfs/dir.c:842 kernfs_find_ns+0x104/0x120 libahci i2c_core mlxfw libata dca [last unloaded: devlink] RIP: 0010:kernfs_find_ns+0x104/0x120 Call Trace: kernfs_find_and_get_ns+0x2e/0x50 sysfs_rename_link_ns+0x40/0xb0 device_rename+0xb2/0xf0 ib_device_rename+0xb3/0x100 [ib_core] nldev_set_doit+0x165/0x190 [ib_core] rdma_nl_rcv_msg+0x249/0x250 [ib_core] ? netlink_deliver_tap+0x8f/0x3e0 rdma_nl_rcv+0xd6/0x120 [ib_core] netlink_unicast+0x17c/0x230 netlink_sendmsg+0x2f0/0x3e0 sock_sendmsg+0x30/0x40 __sys_sendto+0xdc/0x160 Fixes: da5c85078215 ("RDMA/nldev: add driver-specific resource tracking") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e45678973dcbb131f29a6c90b0ea3829f38eeab8 Author: Daniel Jurgens Date: Wed Nov 21 17:12:05 2018 +0200 {net, IB}/mlx4: Initialize CQ buffers in the driver when possible Perform CQ initialization in the driver when the capability is supported by the FW. When passing the CQ to HW indicate that the CQ buffer has been pre-initialized. Doing so decreases CQ creation time. Testing on P8 showed a single 2048 entry CQ creation time was reduced from ~395us to ~170us, which is 2.3x faster. Signed-off-by: Daniel Jurgens Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 1d0795ea9ca37be0fa0823776e0367b8fc398c91 Author: Paolo Abeni Date: Wed Nov 21 14:31:15 2018 +0100 selftests: explicitly require kernel features needed by udpgro tests commit 3327a9c46352f1 ("selftests: add functionals test for UDP GRO") make use of ipv6 NAT, but such a feature is not currently implied by selftests. Since the 'ip[6]tables' commands may actually create nft rules, depending on the specific user-space version, let's pull both NF and NFT nat modules plus the needed deps. Reported-by: Naresh Kamboju Fixes: 3327a9c46352f1 ("selftests: add functionals test for UDP GRO") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 1f8251d3bfadf42357cf6c3eebb5cda6cd3987b5 Author: Babu Moger Date: Wed Nov 21 20:28:49 2018 +0000 MAINTAINERS: Update resctrl filename patterns The file nameswith intel_rdt* have been moved to the new directory arch/x86/kernel/cpu/resctrl/. Update to reflect the changed files and documentation. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-14-babu.moger@amd.com commit a6f771c9bf4eea2da1516e70c283ede61a7d666f Author: Babu Moger Date: Wed Nov 21 20:28:47 2018 +0000 Documentation: Rename and update intel_rdt_ui.txt to resctrl_ui.txt Rename intel_rdt_ui.txt to generic resctrl_ui.txt and update the documentation for AMD. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-13-babu.moger@amd.com commit 4d05bf71f157d756932e77cdee16dc99e235d636 Author: Babu Moger Date: Wed Nov 21 20:28:45 2018 +0000 x86/resctrl: Introduce AMD QOS feature Enable QOS feature on AMD. Following QoS sub-features are supported on AMD if the underlying hardware supports it: - L3 Cache allocation enforcement - L3 Cache occupancy monitoring - L3 Code-Data Prioritization support - Memory Bandwidth Enforcement (Allocation) The specification is available at: https://developer.amd.com/wp-content/resources/56375.pdf There are differences in the way some of the features are implemented. Separate those functions and add those as vendor specific functions. The major difference is in MBA feature: - AMD uses CPUID leaf 0x80000020 to initialize the MBA features. - AMD uses direct bandwidth value instead of delay based on bandwidth values. - MSR register base addresses are different for MBA. - AMD allows non-contiguous L3 cache bit masks. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-12-babu.moger@amd.com commit 723f1a0dd8e26a7523ba068204bee11c95ded38d Author: Babu Moger Date: Wed Nov 21 20:28:43 2018 +0000 x86/resctrl: Fixup the user-visible strings Fix the messages in rdt_last_cmd_printf() and rdt_last_cmd_puts() to make them more meaningful and consistent. [ bp: s/cpu/CPU/; s/mem\W/memory ] Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-11-babu.moger@amd.com commit 9f72f855a6cdbb5313787145a69b474cd9f55f28 Author: Sherry Hurwitz Date: Wed Nov 21 20:28:41 2018 +0000 x86/resctrl: Add AMD's X86_FEATURE_MBA to the scattered CPUID features The feature bit X86_FEATURE_MBA is detected via CPUID leaf 0x80000008 EBX Bit 06. This bit indicates the support of AMD's MBA feature. This feature is supported by both Intel and AMD. But they are detected in different CPUID leaves. [ bp: s/cpuid/CPUID/g ] Signed-off-by: Sherry Hurwitz Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-10-babu.moger@amd.com commit 6fe07ce35e8ad870ba1cf82e0481e0fc0f526eff Author: Babu Moger Date: Wed Nov 21 20:28:39 2018 +0000 x86/resctrl: Rename the config option INTEL_RDT to RESCTRL The resource control feature is supported by both Intel and AMD. So, rename CONFIG_INTEL_RDT to the vendor-neutral CONFIG_RESCTRL. Now CONFIG_RESCTRL will be used for both Intel and AMD to enable Resource Control support. Update the texts in config and condition accordingly. [ bp: Simplify Kconfig text. ] Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-9-babu.moger@amd.com commit 580ebb66cbb3de979adb4becbad7bd383746f162 Author: Babu Moger Date: Wed Nov 21 20:28:37 2018 +0000 x86/resctrl: Add vendor check for the MBA software controller MBA software controller support is available only on Intel. Suggested-by: Fenghua Yu Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-8-babu.moger@amd.com commit a36c5ff560fb32d17c020fa3e7f4c70f753d8834 Author: Babu Moger Date: Wed Nov 21 20:28:35 2018 +0000 x86/resctrl: Bring cbm_validate() into the resource structure Bring all the functions that are different between the vendors into the resource structure and initialize them dynamically. Add _intel suffix to the Intel-specific functions. cbm_validate() which does cache bitmask validation, differs between the vendors as AMD allows non-contiguous masks. So, use separate functions for Intel and AMD. [ bp: Massage commit message and fixup rdt_resource members' vertical alignment. ] Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-7-babu.moger@amd.com commit 1ad4fa41d99f606098fd7b90c1f5deb2b3dfae5d Author: Babu Moger Date: Wed Nov 21 20:28:33 2018 +0000 x86/resctrl: Initialize the vendor-specific resource functions Initialize the resource functions that are different between the vendors. Some features are initialized differently between the vendors. Add _intel suffix to Intel-specific functions. For example, the MBA feature varies significantly between Intel and AMD. Separate the initialization of these resource functions. That way we can easily add AMD's functions later. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-6-babu.moger@amd.com commit aa50453a448ad645ea05788505680aa403934aa8 Author: Babu Moger Date: Wed Nov 21 20:28:31 2018 +0000 x86/resctrl: Move all the macros to resctrl/internal.h Move all the macros to resctrl/internal.h and rename the registers with MSR_ prefix for consistency. [bp: align MSR definitions vertically ] Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-5-babu.moger@amd.com commit 0f00717ecce4b366b3f530153e982cb2eeadafd1 Author: Babu Moger Date: Wed Nov 21 20:28:29 2018 +0000 x86/resctrl: Re-arrange the RDT init code Separate the call sequence for rdt_quirks and MBA feature. This is in preparation to handle vendor differences in these call sequences. Rename the functions to make the flow a bit more meaningful. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Cc: x86-ml Link: https://lkml.kernel.org/r/20181121202811.4492-4-babu.moger@amd.com commit 352940ececaca58536a7fc4ff6b41d181156fd65 Author: Babu Moger Date: Wed Nov 21 20:28:27 2018 +0000 x86/resctrl: Rename the RDT functions and definitions As AMD is starting to support RESCTRL features, rename the RDT functions and definitions to more generic names. Replace "intel_rdt" with "resctrl" where applicable. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-3-babu.moger@amd.com commit fa7d949337ccad32c76740c88e0e0351c349053b Author: Babu Moger Date: Wed Nov 21 20:28:25 2018 +0000 x86/resctrl: Rename and move rdt files to a separate directory New generation of AMD processors add support for RDT (or QOS) features. Together, these features will be called RESCTRL. With more than one vendors supporting these features, it seems more appropriate to rename these files. Create a new directory with the name 'resctrl' and move all the intel_rdt files to the new directory. This way all the resctrl related code resides inside one directory. [ bp: Add SPDX identifier to the Makefile ] Suggested-by: Borislav Petkov Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Brijesh Singh Cc: "Chang S. Bae" Cc: David Miller Cc: David Woodhouse Cc: Dmitry Safonov Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kate Stewart Cc: "Kirill A. Shutemov" Cc: Cc: Mauro Carvalho Chehab Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Pu Wen Cc: Cc: "Rafael J. Wysocki" Cc: Reinette Chatre Cc: Rian Hunter Cc: Sherry Hurwitz Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Tony Luck Cc: Vitaly Kuznetsov Cc: Link: https://lkml.kernel.org/r/20181121202811.4492-2-babu.moger@amd.com commit eeb8df87e4e71eae6dfb9cf518b2812c61f87c43 Author: Parav Pandit Date: Tue Nov 13 00:45:24 2018 +0200 RDMA/cma: Move cma module specific functions to cma_priv.h Currently several rdma_cm module specific functions are declared in core_priv.h file. Now that we have cma_priv.h file specific to rdma_cm kernel module, move them from core_priv.h to cma_priv.h Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a140692a52d2e12ba6a76dd042d556348e8bb55a Author: Jason Gunthorpe Date: Mon Nov 12 22:59:58 2018 +0200 RDMA/uverbs: Check for NULL driver methods for every write call Add annotations to the uverbs_api structure indicating which driver methods are called by the implementation. If the required method is NULL the write API will be not be callable. This effectively duplicates the cmd_mask system, however it does it by expressing invariants required by the core code, not by delegating decision making to the driver. This is another step toward eliminating cmd_mask. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 1de751caf7d52debd9820dbcd0190c6306f3f7b0 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:57 2018 +0200 RDMA/uverbs: Make all the method functions in uverbs_cmd static Now that we use struct uverbs_uapi to link the method functions to the dispatcher there is no reason to have them be extern symbols. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit d120c3c91871650699ac8e71795925cc98358c3d Author: Jason Gunthorpe Date: Mon Nov 12 22:59:56 2018 +0200 RDMA/uverbs: Convert the write interface to use uverbs_api This organizes the write commands into objects and links them to the uverbs_api data structure. The command path is reworked to use uapi instead of its internal structures. The command mask is moved from a runtime check to a registration time check in the uapi. Since the write interface does not have the object ID as part of the command, the radix bins are converted into linear lists to support the lookup. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 6884c6c4bd09fb35b79a3967d15821cdfcbe77a3 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:55 2018 +0200 RDMA/verbs: Store the write/write_ex uapi entry points in the uverbs_api Bringing all uapi entry points into one place lets us deal with them consistently. For instance the write, write_ex and ioctl paths can be disabled when an API is not supported by the driver. This will replace the uverbs_cmd_table static arrays. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 0bd01f3d090788188d3766bac044292de2789d03 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:54 2018 +0200 RDMA/uverbs: Require all objects to have a driver destroy function If we can't destroy the object then we certainly shouldn't allow it be created or used. Remove it from the uverbs_uapi in this case. This also disables methods of other objects that have mandatory object handle inputs - ie REG_DM_MR is now automatically removed if DM objects cannot be created. Typically drivers not supporting an interface will mark all of the supporting functions as NULL, including destroy. This is intended to automatically eliminate entire corner cases in the API that are difficult to test. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 36e235c8829935a59d4652c878cffb08229205c2 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:53 2018 +0200 RDMA/mlx5: Use the uapi disablement APIs instead of code Rely on UAPI_DEF_IS_OBJ_SUPPORTED instead of manipulating the contents of the driver's definition list. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 6829c1c2b371674a05562a39d608b5cf48351bea Author: Jason Gunthorpe Date: Mon Nov 12 22:59:52 2018 +0200 RDMA/uverbs: Add helpers to mark uapi functions as unsupported We have many cases where parts of the uapi are not supported in a driver, needs a certain protocol, or whatever. It is best to reflect this directly into the struct uverbs_api when it is built so that everything is simply blocked off, and future introspection can report a proper supported list. This is done by adding some additional helpers to the definition list language that disable objects based on a 'supported' call back, and a helper that disables based on a NULL struct ib_device function pointer. Disablement is global. For instance, if a driver disables an object then everything connected to that object is removed, including core methods. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit c27f6aa8c9df7f3270d5f5f2957a2a024262eb99 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:51 2018 +0200 RDMA/uverbs: Factor out the add/get pattern into a helper The next patch needs another copy of this, provide a simple helper to reduce the coding. uapi_add_get_elm() returns an existing entry or adds a new one. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 0cbf432db405289216747a8d31d74bab2452337c Author: Jason Gunthorpe Date: Mon Nov 12 22:59:50 2018 +0200 RDMA/uverbs: Use a linear list to describe the compiled-in uapi The 'tree' data structure is very hard to build at compile time, and this makes it very limited. The new radix tree based compiler can handle a more complex input language that does not require the compiler to perfectly group everything into a neat tree structure. Instead use a simple list to describe to input, where the list elements can be of various different 'opcodes' instructing the radix compiler what to do. Start out with opcodes chaining to other definition lists and chaining to the existing 'tree' definition. Replace the very top level of the 'object tree' with this list type and get rid of struct uverbs_object_tree_def and DECLARE_UVERBS_OBJECT_TREE. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit dfb631a187b9b04c066df60e28adf05334112ca6 Author: Jason Gunthorpe Date: Mon Nov 12 22:59:49 2018 +0200 RDMA/mlx5: Do not generate the uabi specs unconditionally For DM there is no reason not to add the spec for the START_OFFSET, if DM is not supported then ib_dev.alloc_dm is already set to NULL which ensures we do not call the method. For IPSEC, the core code should be setting ib_dev.create_flow_action_esp to NULL to disable it, not relying on wonky manipulation of the specs. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit fc6526fba130dcbd496b96a9abf75a9382da95da Author: Ursula Braun Date: Mon Nov 12 12:41:55 2018 +0100 mlx4: trigger IB events needed by SMC The mlx4 driver does not trigger an IB_EVENT_PORT_ACTIVE when the RoCE network interface is activated. When SMC determines the RoCE device port to be used, it checks the port states. This patch triggers IB events for NETDEV_UP and NETDEV_DOWN. Signed-off-by: Ursula Braun Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6035cbcceb069f87296b3cd0bc4736ad5618bf47 Author: Marek Szyprowski Date: Tue Nov 20 16:54:28 2018 +0100 ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module DWC2 hardware module integrated in Samsung SoCs requires some quirks to operate properly, so use Samsung SoC specific compatible to notify driver to apply respective fixes. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 8e782fcf78275f505194e767c515202d4fd274bc Author: Sean Young Date: Sun Nov 4 05:12:09 2018 -0500 media: rc: ensure close() is called on rc_unregister_device If userspace has an open file descriptor on the rc input device or lirc device when rc_unregister_device() is called, then the rc close() is never called. This ensures that the receiver is turned off on the nuvoton-cir driver during shutdown. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2396e2821b0f42ab5048d015298d4858a0eefa32 Author: Mauro Carvalho Chehab Date: Mon Sep 10 16:14:15 2018 -0400 media: rc: imon: replace strcpy() by strscpy() The strcpy() function is being deprecated. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e5bb9d3d755f128956ed467ae50b41d22bb680c6 Author: Sean Young Date: Mon Oct 22 05:01:50 2018 -0400 media: rc: cec devices do not have a lirc chardev This fixes an oops in ir_lirc_scancode_event(). BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 9 PID: 27687 Comm: kworker/9:2 Tainted: P           OE 4.18.12-200.fc28.x86_64 #1 Hardware name: Supermicro C7X99-OCE-F/C7X99-OCE-F, BIOS 2.1a 06/15/2018 Workqueue: events pulse8_irq_work_handler [pulse8_cec] RIP: 0010:ir_lirc_scancode_event+0x3d/0xb0 [rc_core] Code: 8d ae b4 07 00 00 49 81 c6 b8 07 00 00 53 e8 4a df c3 d5 48 89 ef 49 89 45 00 e8 4e 84 41 d6 49 8b 1e 49 89 c4 4c 39 f3 74 58 <8b> 43 38 8b 53 40 89 c1 2b 4b 3c 39 ca 72 41 21 d0 49 8b 7d 00 49 RSP: 0018:ffffaa10e3c07d58 EFLAGS: 00010017 RAX: 0000000000000002 RBX: 0000000000000000 RCX: 0000000000000018 RDX: 0000000000000001 RSI: 00316245397fa93c RDI: ffff966d31c8d7b4 RBP: ffff966d31c8d7b4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000003 R11: ffffaa10e3c07e28 R12: 0000000000000002 R13: ffffaa10e3c07d88 R14: ffff966d31c8d7b8 R15: 0000000000000073 FS:  0000000000000000(0000) GS:ffff966d3f440000(0000) knlGS:0000000000000000 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 00000009d820a003 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace:  ir_do_keydown+0x75/0x260 [rc_core]  rc_keydown+0x54/0xc0 [rc_core]  cec_received_msg_ts+0xaa8/0xaf0 [cec]  process_one_work+0x1a1/0x350  worker_thread+0x30/0x380  ? pwq_unbound_release_workfn+0xd0/0xd0  kthread+0x112/0x130  ? kthread_create_worker_on_cpu+0x70/0x70  ret_from_fork+0x35/0x40 Modules linked in: rc_tt_1500 dvb_usb_dvbsky dvb_usb_v2 uas usb_storage fuse vhost_net vhost tap xt_CHECKSUM iptable_mangle ip6t_REJECT nf_reject_ipv6 tun 8021q garp mrp xt_nat macvlan xfs devlink ebta  si2157 si2168 cx25840 cx23885 kvm altera_ci tda18271 joydev ir_rc6_decoder rc_rc6_mce crct10dif_pclmul crc32_pclmul ghash_clmulni_intel intel_cstate intel_uncore altera_stapl m88ds3103 tveeprom cx2341  mxm_wmi igb crc32c_intel megaraid_sas dca i2c_algo_bit wmi vfio_pci irqbypass vfio_virqfd vfio_iommu_type1 vfio i2c_dev CR2: 0000000000000038 Cc: # v4.16+ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0cfd56a8187d41bd85afdc4bf28ae644ca6b06c7 Author: Sean Young Date: Sat Oct 27 10:44:22 2018 -0400 media: saa7134: hvr1110 can decode rc6 The function get_key_hvr1110 can only decode rc5, however this is a standard hauppauge z8f0811 which can decode rc6 as well. Use get_key_haup_xvr() instead. Tested on a HVR 1110. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9916ac07cd7958a6b0a85bf4a498dde9ce7abb63 Author: Sean Young Date: Fri Oct 26 11:13:25 2018 -0400 media: saa7134: rc device does not need 'saa7134 IR (' prefix Before this patch, the rc name is truncated to: saa7134 IR (Hauppauge WinTV-HVR Now it is: Hauppauge WinTV-HVR1150 ATSC/QAM-Hybrid Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 8d023a5787775cd1cee73957777122366f6eb88e Author: Sean Young Date: Thu Oct 18 12:06:05 2018 -0400 media: rc: imon_raw: use fls rather than loop per bit Previously, the code would loop for each of the 40 bits. Now it will branch for each edge in the IR, which will be much less. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cea1c41d6ba010559f9ccdcfc80ce185e7fab080 Author: Sean Young Date: Thu Oct 18 07:03:33 2018 -0400 media: rc: XBox DVD Remote uses 12 bits scancodes The xbox dvd remote sends 24 bits, the first 12 bits are repeated and inverted so only 12 bits are used. The upper 4 bits can be read at offset 3. Ensure we pass this to rc-core and update the keymap accordingly. Tested-by: Benjamin Valentin Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 02d32bdad3123d7376244256936a6b3b6ee434e8 Author: Benjamin Valentin Date: Tue Oct 9 12:02:11 2018 -0400 media: rc: add driver for Xbox DVD Movie Playback Kit The Xbox DVD Movie Playback Kit is a USB dongle with an IR remote for the Original Xbox. Historically it has been supported by the out-of-tree lirc_xbox driver, but this one has fallen out of favour and was just dropped from popular Kodi (formerly XBMC) distributions. This driver is heavily based on the ati_remote driver where all the boilerplate was taken from - I was mostly just removing code. Signed-off-by: Benjamin Valentin Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit fd044de30b78d26c3c4c610acdbfb3a2e3f5e422 Author: Brad Love Date: Fri Oct 5 11:19:49 2018 -0400 media: mceusb: Include three Hauppauge USB dvb device with IR rx The three following Hauppauge USB DVB devices have IR receivers, but lacked the support in mceusb to enable it: - WinTV-HVR-935C - WinTV-HVR-955Q - WinTV-HVR-975 Tested HVR-955Q and HVR-975 plus RC5 remote and irw, works as intended. Signed-off-by: Brad Love Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 73852e56827f5cb5db9d6e8dd8191fc2f2e8f424 Author: Baruch Siach Date: Mon Nov 19 14:34:02 2018 +0200 rtc: dt-binding: abx80x: fix resistance scale The abracon,tc-resistor property value is in kOhm. Signed-off-by: Baruch Siach Signed-off-by: Alexandre Belloni commit daef95769b3a1d60afc31fa97578824a2ff39915 Author: Ettore Chimenti Date: Sun Oct 21 12:58:20 2018 -0400 media: seco-cec: add Consumer-IR support Introduce support for Consumer-IR into seco-cec driver, as it shares the same interrupt for receiving messages. The device decodes RC5 signals only, defaults to hauppauge mapping. It will spawn an input interface using the RC framework (like CEC device). Signed-off-by: Ettore Chimenti Reviewed-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b03c2fb97adcc65d3c4098c4aa41fbaa6623ebf2 Author: Ettore Chimenti Date: Sun Oct 21 12:58:19 2018 -0400 media: add SECO cec driver This patch adds support to the CEC device implemented with a STM32 microcontroller in X86 SECO Boards, including UDOO X86. The communication is achieved via Braswell integrated SMBus (i2c-i801). The driver use direct access to the PCI addresses, due to the limitations of the specific driver in presence of ACPI calls. The basic functionalities are tested with success with cec-ctl and cec-compliance. Inspired by cros-ec-cec implementation, attaches to i915 driver cec-notifier. Signed-off-by: Ettore Chimenti Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6fc5d789512f7c1a33cbfd420d68d001e899b0de Author: Lyude Paul Date: Tue Nov 20 19:37:17 2018 -0500 drm/i915: Synchronize hpd work in i915_hpd_storm_ctl_show() While trying to add a chamelium test for short HPD IRQs, I ran into issues where a hotplug storm would be triggered, but the point at which it would be reported by the kernel would be after igt actually finished checking i915_hpd_storm_ctl's status. So, fix this by simply synchronizing our IRQ work, dig_port_work, and hotplug_work before printing out the HPD storm status in i915_hpd_storm_ctl_show(). Signed-off-by: Lyude Paul Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181121003718.17704-1-lyude@redhat.com commit facc23b8ff21e9fb328938baf15ae68a91af0cb9 Author: Trent Piepho Date: Thu Nov 15 18:51:18 2018 +0000 rtc: isl1208: Use i2c block read/write routines The Linux i2c layer has functions to execute common SMBUS/I2C transactions. The register access code here is identical to the I2C read/write block data routines. Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Trent Piepho Signed-off-by: Alexandre Belloni commit 41ef3878203cd9218d92eaa07df4b85a2cb128fb Author: Christophe JAILLET Date: Wed Nov 14 18:19:51 2018 +0100 rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()' In case of error, we return 0. This is spurious and not consistent with the other functions of the driver. Propagate the error code instead. Signed-off-by: Christophe JAILLET Signed-off-by: Alexandre Belloni commit 41c9e132c5cc3e5f28cf44032ff82f7614a42989 Author: Alexandre Belloni Date: Sat Nov 10 21:29:03 2018 +0100 rtc: nvmem: remove nvmem from struct rtc_device Using devm_nvmem_register allows to avoid tracking the nvmem pointer in the rtc_device structure. This ultimately allows to register multiple nvmem devices from an RTC driver. Signed-off-by: Alexandre Belloni commit 461e557b97277b693cd8008c32a9d01c7f8f453b Author: Alexandre Belloni Date: Sat Nov 10 21:29:02 2018 +0100 rtc: nvmem: use devm_nvmem_register() Use the resource managed variant of nvmem_register(). Signed-off-by: Alexandre Belloni commit 17e8fd119f8292f0e96bbddc68bbf5c15305a957 Author: Ville Syrjälä Date: Mon Oct 29 20:34:53 2018 +0200 drm/i915: Eliminate the horrendous format check code Replace the messy framebuffer format/modifier validation code with a single call to drm_any_plane_has_format(). The code was extremely annoying to maintain as you had to have a lot of platform checks for different formats. The new code requires zero maintenance. v2: Nuke the modifier checks as well since the core does that too now v3: Call drm_any_plane_has_format() from the driver code v4: Rebase Cc: Dhinakaran Pandiyan Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181029183453.28541-2-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan commit 062e52a5af9cce644593fbd115d6db1b4558a8cf Author: Yangtao Li Date: Thu Nov 22 08:30:47 2018 -0500 iommu/tegra: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Acked-by: Thierry Reding Signed-off-by: Joerg Roedel commit a6906a8b0ebfbf6330847ba640c8dde8aca679be Author: Yangtao Li Date: Thu Nov 22 08:54:43 2018 -0500 iommu/omap: Remove DEBUG_SEQ_FOPS_RO() Because we already have the DEFINE_SHOW_ATTRIBUTE,there is no need to define such a macro.So remove DEBUG_SEQ_FOPS_RO. Signed-off-by: Yangtao Li Signed-off-by: Joerg Roedel commit 3569dd07aaad71920c5ea4da2d5cc9a167c1ffd4 Author: Sohil Mehta Date: Wed Nov 21 15:29:33 2018 -0800 iommu/vt-d: Handle domain agaw being less than iommu agaw The Intel IOMMU driver opportunistically skips a few top level page tables from the domain paging directory while programming the IOMMU context entry. However there is an implicit assumption in the code that domain's adjusted guest address width (agaw) would always be greater than IOMMU's agaw. The IOMMU capabilities in an upcoming platform cause the domain's agaw to be lower than IOMMU's agaw. The issue is seen when the IOMMU supports both 4-level and 5-level paging. The domain builds a 4-level page table based on agaw of 2. However the IOMMU's agaw is set as 3 (5-level). In this case the code incorrectly tries to skip page page table levels. This causes the IOMMU driver to avoid programming the context entry. The fix handles this case and programs the context entry accordingly. Fixes: de24e55395698 ("iommu/vt-d: Simplify domain_context_mapping_one") Cc: Cc: Ashok Raj Cc: Jacob Pan Cc: Lu Baolu Reviewed-by: Lu Baolu Reported-by: Ramos Falcon, Ernesto R Tested-by: Ricardo Neri Signed-off-by: Sohil Mehta Signed-off-by: Joerg Roedel commit 2a8c9f1203c6cda24dd032a1007bf3abd4e541f0 Author: Yangtao Li Date: Thu Nov 22 07:59:41 2018 -0500 soc: sunxi: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard commit 57ba33d56884bed7f7043b37b668bb2067abf13b Author: Yangtao Li Date: Thu Nov 22 08:12:07 2018 -0500 soc/tegra: pmc: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Thierry Reding commit 9eb40fa2cd2d1f6829e7b49bb22692f754b9cfe0 Author: Yangtao Li Date: Wed Nov 21 07:49:12 2018 -0500 soc/tegra: Don't leak device tree node reference of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. soc_is_tegra() doesn't do that, so fix it. Signed-off-by: Yangtao Li Acked-by: Jon Hunter [treding: slightly rewrite to avoid inline comparison] Signed-off-by: Thierry Reding commit b4bf44d2dcbd6c35d9651bc6286e4940b8b3df95 Author: Jani Nikula Date: Thu Nov 22 16:49:47 2018 +0200 drm/i915: Update DRIVER_DATE to 20181122 Signed-off-by: Jani Nikula commit 10fdb7d2ad4244c668f33706f98d019795fc63c8 Author: Noralf Trønnes Date: Wed Nov 21 19:02:15 2018 +0100 drm/prime: Fix drm_gem_prime_mmap() stack use drivers/gpu/drm/drm_prime.c: In function 'drm_gem_prime_mmap': >> drivers/gpu/drm/drm_prime.c:688:1: warning: the frame size of 1592 bytes is larger than 1024 bytes [-Wframe-larger-than=] Fix by allocating on the heap. Fixes: 7698799f9554 ("drm/prime: Add drm_gem_prime_mmap()") Reported-by: kbuild test robot Cc: Daniel Vetter Cc: Christian König Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181121180215.13881-1-noralf@tronnes.org commit 478652f3d45cc6f0ef9be3cda8b13fcd85076fa6 Author: Ryan Case Date: Mon Oct 22 18:07:07 2018 -0700 spi: spi-qcom-qspi: Fix remaining driver nits Address remaining comments from original driver patch series * Move RD_FIFO_CFG to be ordered corretly * Expand spinlock comment Signed-off-by: Ryan Case Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown commit 1fc12b05895ea50386f0e666f84053f0c8307943 Author: Douglas Anderson Date: Tue Nov 20 09:52:54 2018 -0800 regulator: core: Avoid propagating to supplies when possible When we called regulator_enable() on a regulator we'd end up propagating that call all the way up the chain every time. This is a bit of a waste of time. A child regulator already refcounts its own enables so it should avoid passing on to its parent unless the refcount transitioned between 0 and 1. Historically this hasn't been a huge problem since we skipped dealing with enable for always-on regulators. In a previous patch, however, we removed the always-on optimization. On one system, the debugfs regulator_summary was now showing a "use_count" of 33 for a top-level regulator. Let's implement this optimization. This turns out to be fairly trivial with the recent reorganization of the regulator core. NOTE: as part of this patch I'll make "always-on" regulators start with a use count of 1. This keeps the counts clean when recursively resolving regulators. ALSO NOTE: this commit also contains somewhat of a bug fix to regulator_force_disable(). It was incorrectly looping over "rdev->open_count" when it should have been looping over use_count. We have to touch that code anyway (since we should no longer loop at all), so we'll fix it together in one patch. Also: since this comes after commit f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") we can now move to use _regulator_disable() for our supply and keep it in the lock. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 5451781dadf85000665e0e2c3288e9e0f34b860a Author: Douglas Anderson Date: Tue Nov 20 09:52:53 2018 -0800 regulator: core: Only count load for enabled consumers In general when the consumer of a regulator requests that the regulator be disabled it no longer will be drawing much load from the regulator--it should just be the leakage current and that should be very close to 0. Up to this point the regulator framework has continued to count a consumer's load request for disabled regulators. This has led to code patterns that look like this: enable_my_thing(): regular_set_load(reg, load_uA) regulator_enable(reg) disable_my_thing(): regulator_disable(reg) regulator_set_load(reg, 0) Sometimes disable_my_thing() sets a nominal (<= 100 uA) load instead of setting a 0 uA load. I will make the assertion that nearly all (if not all) places where we set a nominal load of 100 uA or less we end up with a result that is the same as if we had set a load of 0 uA. Specifically: - The whole point of setting the load is to help set the operating mode of the regulator. Higher loads may need less efficient operating modes. - The only time this matters at all is if there is another consumer of the regulator that wants the regulator on. If there are no other consumers of the regulator then the regulator will turn off and we don't care about the operating mode. - If there's another consumer that actually wants the regulator on then presumably it is requesting a load that makes our nominal <= 100 uA load insignificant. A quick survey of the existing callers to regulator_set_load() to see how everyone uses it: Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 835cb5c500b15f4acab7a4c86275997994517c2f Author: Jani Nikula Date: Thu Nov 22 16:03:03 2018 +0200 drm/i915: Update DRIVER_DATE to 20181122 Signed-off-by: Jani Nikula commit c7c3f05e341a9a2bd1a92993d4f996cfd6e7348e Author: Sergey Senozhatsky Date: Thu Oct 25 19:10:36 2018 +0900 panic: avoid deadlocks in re-entrant console drivers From printk()/serial console point of view panic() is special, because it may force CPU to re-enter printk() or/and serial console driver. Therefore, some of serial consoles drivers are re-entrant. E.g. 8250: serial8250_console_write() { if (port->sysrq) locked = 0; else if (oops_in_progress) locked = spin_trylock_irqsave(&port->lock, flags); else spin_lock_irqsave(&port->lock, flags); ... } panic() does set oops_in_progress via bust_spinlocks(1), so in theory we should be able to re-enter serial console driver from panic(): CPU0 uart_console_write() serial8250_console_write() // if (oops_in_progress) // spin_trylock_irqsave() call_console_drivers() console_unlock() console_flush_on_panic() bust_spinlocks(1) // oops_in_progress++ panic() spin_lock_irqsave(&port->lock, flags) // spin_lock_irqsave() serial8250_console_write() call_console_drivers() console_unlock() printk() ... However, this does not happen and we deadlock in serial console on port->lock spinlock. And the problem is that console_flush_on_panic() called after bust_spinlocks(0): void panic(const char *fmt, ...) { bust_spinlocks(1); ... bust_spinlocks(0); console_flush_on_panic(); ... } bust_spinlocks(0) decrements oops_in_progress, so oops_in_progress can go back to zero. Thus even re-entrant console drivers will simply spin on port->lock spinlock. Given that port->lock may already be locked either by a stopped CPU, or by the very same CPU we execute panic() on (for instance, NMI panic() on printing CPU) the system deadlocks and does not reboot. Fix this by removing bust_spinlocks(0), so oops_in_progress is always set in panic() now and, thus, re-entrant console drivers will trylock the port->lock instead of spinning on it forever, when we call them from console_flush_on_panic(). Link: http://lkml.kernel.org/r/20181025101036.6823-1-sergey.senozhatsky@gmail.com Cc: Steven Rostedt Cc: Daniel Wang Cc: Peter Zijlstra Cc: Andrew Morton Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Alan Cox Cc: Jiri Slaby Cc: Peter Feiner Cc: linux-serial@vger.kernel.org Cc: Sergey Senozhatsky Cc: stable@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit ab85b0143428739cb0f2533182d5824375b6b66b Author: Colin Ian King Date: Thu Nov 22 10:13:45 2018 +0000 tools/bpf: fix spelling mistake "memeory" -> "memory" The CHECK message contains a spelling mistake, fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann commit 9e3bc2b0f490be287f025de1cc8399e189490024 Author: Michael Straube Date: Wed Nov 21 20:49:37 2018 +0100 staging: rtl8188eu: rename SwLed0 to avoid CamelCase Rename struct field SwLed0 to avoid CamelCase. SwLed0 -> sw_led Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 236b3d87e6bf58c9cc6830b71010bf5dc4723b64 Author: Michael Straube Date: Wed Nov 21 20:49:36 2018 +0100 staging: rtl8188eu: rename LedControl8188eu to avoid CamelCase Rename the function LedControl8188eu to avoid CamelCase. LedControl8188eu -> led_control_8188eu Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 86d0d292914bfce63aebc9d23501591e6a1d6d79 Author: Michael Straube Date: Wed Nov 21 20:49:35 2018 +0100 staging: rtl8188eu: cleanup a function comment The comment for blink_handler() adds no extra information in addition to the function name, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 87631cf279e5f57963bd723059e0d426805edf98 Author: Michael Straube Date: Wed Nov 21 20:49:34 2018 +0100 staging: rtl8188eu: rename BlinkHandler to avoid CamelCase Rename the function BlinkHandler to avoid CamelCase. BlinkHandler -> blink_handler Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit dfd2fb58fc5fb64aeefa00278e1c225b471fee4c Author: Michael Straube Date: Wed Nov 21 20:49:33 2018 +0100 staging: rtl8188eu: rename SwLedOff to avoid CamelCase Rename the function SwLedOff to avoid CamelCase. SwLedOff -> sw_led_off Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 01b3ce533aa341618d958e4d2eb5616661f7b3b3 Author: Michael Straube Date: Wed Nov 21 20:49:32 2018 +0100 staging: rtl8188eu: rename SwLedOn to avoid CamelCase Rename the function SwLedOn to avoid CamelCase. SwLedOn -> sw_led_on Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 3c73979334a4418be70878574653992d8cd05608 Author: Michael Straube Date: Wed Nov 21 20:49:31 2018 +0100 staging: rtl8188eu: rename LedCfg to avoid CamelCase Rename the variable LedCfg to avoid CamleCase. LedCfg -> led_cfg Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit cfe0610fd73d1afd6082fec6be79ee7de305cc3a Author: Michael Straube Date: Wed Nov 21 20:49:30 2018 +0100 staging: rtl8188eu: add spaces around '&' in rtl8188eu_led.c Add spaces around '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 5718ba5e8cc72fe7fb1158fed6b5400593b0d573 Author: Michael Straube Date: Wed Nov 21 20:49:29 2018 +0100 staging: rtl8188eu: cleanup comments in rtl8188eu_led.c Remove comments in rtl8188eu_led.c. The function names are well descriptive. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 6a03492a776e964f96f88e3c60b873704442ba5d Author: Michael Straube Date: Wed Nov 21 20:49:28 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtl8188eu_led.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit e2f3f8b4a497d26bdcd55a53246ec2e613ae0fd4 Author: Nylon Chen Date: Thu Nov 8 19:28:15 2018 +0800 nds32: support hardware prefetcher We add a config for user to enable or disable this feature. It can be used to control the hardware prefetch function. Signed-off-by: Nylon Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit a5234068e6dc18ae5300d678fbf3e129d9b93f78 Author: Nylon Chen Date: Thu Nov 8 19:28:05 2018 +0800 nds32: Fix the items of hwcap_str ordering issue. The hwcap_str should be set in a correct order according to HWCAP_xx. We also add the missing "fpu_dp" to it. Signed-off-by: Nylon Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 83312f1b7ae205dca647bf52bbe2d51303cdedfb Author: Vincent Chen Date: Thu Nov 22 11:14:38 2018 +0800 math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning _FP_ROUND_ZERO is defined as 0 and used as a statemente in macro _FP_ROUND. This generates "error: statement with no effect [-Werror=unused-value]" from gcc. Defining _FP_ROUND_ZERO as (void)0 to fix it. This modification is quoted from glibc 'commit (8ed1e7d5894000c155acbd06f)' Signed-off-by: Vincent Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 7adb3e998f5bea3e1fd2f76c1cf80d76b8af6626 Author: Vincent Chen Date: Thu Nov 22 11:14:37 2018 +0800 math-emu/op-2.h: Use statement expressions to prevent negative constant shift This modification is quoted from glibc 'commit < sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to> (fe0b1e854ad32a69b260)' Signed-off-by: Vincent Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 44e92e0364adfd7b6759084e02a550d06336d896 Author: Vincent Chen Date: Thu Nov 22 11:14:36 2018 +0800 nds32: support denormalized result through FP emulator Currently, the nds32 FPU dose not support the arithmetic of denormalized number. When the nds32 FPU finds the result of the instruction is a denormlized number, the nds32 FPU considers it to be an underflow condition and rounds the result to an appropriate number. It may causes some loss of precision. This commit proposes a solution to re-execute the instruction by the FPU emulator to enhance the precision. To transfer calculations from user space to kernel space, this feature will enable the underflow exception trap by default. Enabling this feature may cause some side effects: 1. Performance loss due to extra FPU exception 2. Need another scheme to control real underflow trap A new parameter, UDF_trap, which is belong to FPU context is used to control underflow trap. User can configure this feature via CONFIG_SUPPORT_DENORMAL_ARITHMETIC Signed-off-by: Vincent Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 1ac832509f2ea1b566f0c06f98f308f58b03d098 Author: Vincent Chen Date: Thu Nov 22 11:14:35 2018 +0800 nds32: Support FP emulation The Andes FPU coprocessor does not support denormalized number handling. According to the specification, FPU generates a denorm input exception that requires the kernel to deal with this instrution operation when it encounters denormalized operands. Hence an nds32 FPU ISA emulator in the kernel is required to meet requirement. Signed-off-by: Vincent Chen Signed-off-by: Nickhu Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit e46bf83c1864a20f9dd17d597ec9be18ed05add8 Author: Vincent Chen Date: Thu Nov 22 11:14:34 2018 +0800 nds32: nds32 FPU port This patch set contains basic components for supporting the nds32 FPU, such as exception handlers and context switch for FPU registers. By default, the lazy FPU scheme is supported and the user can configure it via CONFIG_LZAY_FPU. Signed-off-by: Vincent Chen Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 95fd94a645f75165134802987b21c6680ce90433 Author: Hans Holmberg Date: Wed Nov 21 10:54:23 2018 +0100 drm/i915: avoid rebuilding i915_gpu_error.o on version string updates There is no need to rebuild i915_gpu_error.o when the version string changes as the version is available in init_utsname()->release. Signed-off-by: Hans Holmberg Reviewed-by: Jani Nikula Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181121095423.20760-1-hans.ml.holmberg@owltronix.com commit 8d75839b843ae0ef8d9db97ed05b493e687e6b75 Author: Eric Dumazet Date: Wed Nov 21 21:39:52 2018 -0800 bpf, lpm: make longest_prefix_match() faster At LPC 2018 in Vancouver, Vlad Dumitrescu mentioned that longest_prefix_match() has a high cost [1]. One reason for that cost is a loop handling one byte at a time. We can handle more bytes at a time, if enough attention is paid to endianness. I was able to remove ~55 % of longest_prefix_match() cpu costs. [1] https://linuxplumbersconf.org/event/2/contributions/88/attachments/76/87/lpc-bpf-2018-shaping.pdf Signed-off-by: Eric Dumazet Cc: Vlad Dumitrescu Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Daniel Borkmann commit 7b24eec754ba0f0f794ab09413dcde2585b4a84b Author: Qiang Yu Date: Thu Nov 22 09:44:17 2018 +0800 drm/sun4i: wait on implicit fence before display Render like lima will attach a fence to the framebuffer dma_buf, display like sun4i should wait it finish before show the framebuffer. Otherwise tearing will be observed. Signed-off-by: Qiang Yu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181122014417.23285-1-yuq825@gmail.com commit c6fdea6e1a1942bd1ab2abaa16c34f23a25226b9 Author: Daniel Vetter Date: Wed Nov 21 22:35:10 2018 +0100 drm: Merge drm_info.c into drm_debugfs.c Ever since commit cb6458f97b53d7f73043206c18014b3ca63ac345 Author: Daniel Vetter Date: Thu Aug 8 15:41:34 2013 +0200 drm: remove procfs code, take 2 Having the code shared between procfs and debugfs in the separate drm_info.c file stopped making sense. Merge them. Noticed because Lyude asked some questions on irc about why we even have drm_info_node and I remember this old story. Cc: Lyude Paul Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181121213510.31260-1-daniel.vetter@ffwll.ch commit 7c0bc65c84035cd2d7561ba47d7bad1cae62c4c3 Merge: 0e2c8fb54d7ae 00426e9978935 Author: Greg Kroah-Hartman Date: Thu Nov 22 09:39:45 2018 +0100 Merge tag 'iio-for-4.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-testing Jonathan writes: First set of new device support, features and cleanups for IIO in the 4.21 cycle Along with the headline feature of 5 new drivers, we have the substantial addition of auxilliary sensor support on the lsm6sdx parts for ST. There has also been a good set of staging cleanup in this period with more underway. An ever increasing number of devices supported with just a new ID which is a good sign that at least some manufacturers are continuing to stabilise their interfaces. New device support, * ad7124 - New driver supporting Analog Devices' ad7124-4 and ad7124-8 parts with the inevitable DT binding. * ad7949 - New driver supporting Analog Devices' ad7949, AD7682 and AD7689 ADCs. * rm3100 - New driver supporting PNIs RM3100 magnometer with bindings and vendor prefix. * ti-dac7311 - New driver supporting DAC7311, DAC6311 and DAC5311 TI DACs, with DT bindings. * vcnl5035 - New driver supporting the light sensor part of the VCNL4035, with DT bindings Features, * bindings - Add a generic ADC channel binding as we keep reinventing this wheel. * adc128s052 - Add IDs for additional pin compatible parts. - Add APCI ID seen on E3940 UP squared boards. * ad_sigma_delta - Allow for custom data register overiding default. * kxcjk1013 - Add KIOX0009 ACPI ID as seen on the Acer One 10. * lsm6dsx - Rework leading to... - External sensor support using the built in I2C master. - Initial support for a slave lis2mdl magnetometer. * meson-saradc - Add temperature sensor support and bindings. * st_magn - New ID for lsm9dsl_magn with bindings - New ID for lis3de accelerometer * tpl0102 - Add supprot for IIO_AVAIL_RANGE to report the range available from this device to userspace and in kernel users. Cleanups and minor fixes * tools - Allow outside specification of CFLAGS * ad2s90 - Handle and spi_read error. - Handle spi_setup failure - Drop a pointless assignment. - Prevent a potentail race by moving device registration to after all other setup. - Add missing scale attribute. - Add a sanity check on channel type before trying to read it. * ad2s1210 - Move to modern gpio descriptors. - Drop a gpioin flag which made no sense as far as we can tell. - Add dt table (bindings doc to follow when this is ready for moving out of staging). * ad5933 - Drop camel-case naming of ext_clk_hz. - White space fixes. * ad7150 - Local variable to shorten overly long line. - Alignment and line break fixes. * ad7280a - Handle an error path that was previously ignored. - Use crc8.h to build the crc table replacing custom code. - Avoid unecessary cast. - Power down the device if an error happens in probe - Use devm routines to simplify probe and remove. * ad7606 - Alignment fixes. * ad7780 - This worked as long as by coincidence an uninitialized value was 0. Lets not rely on that. - Ensure gain update is only used with the ad778x chips that actually support it. - Tidy up pattern mask generation. - Read regulator when scale is requested (which should be infrequent) as it might have changed from initialization. * ad7816 - Move to modern gpio descriptors - Don't use a busy_pin for ad7818 as there isn't one. - Ensure RD/WR and CONVST pins are outputs (previously they were brought up as inputs which doesn't seem to make any sense) - DT id table. * adc128s052 - SPDX * adt7316 - Alignment fix. - Fix data reading. When using I2C the driver never actually used the value read. This has been broken a very long time hence no rush to fix it now + the driver is undergoing a lot of cleanup. - Sanity check that the i2c read didn't fail to actually read anything. * dpot-dac - Mark a switch full through with slightly different text so that gcc doesn't warn on it. * gyro-adc - Fix a wrong file in the MAINTAINERS entry and add binding doc to the listed files. * ina2xx - Add some early returns to clarify error paths in switch. * lsm6dsx - MAINTAINERS entry. * max11100 - SPDX * max9611 - SPDX * mcp4131 - use of_device_get_match_data in preference to spi_get_device_id approach. * rcar-adc - SPDX * sc27xx - Add ADC conversion timeout support to avoid possible fault. * ssp_sensors - Don't free managed resources manually. * st-magn - Add a comment to avoid future confusion over when to use -magn postfix (on multi chip in package parts) - Add BDU register for LIS3MDL where it seems to have been missed. * st-sensors - Minor spelling, grammar etc fixes. * tpl0102 - Use a pointer rather than an index of an array to improve conciseness. * tag 'iio-for-4.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (80 commits) Staging: iio: adt7316: Add an extra check for 'ret' equals to 0 Staging: iio: adt7316: Fix i2c data reading, set the data field dt-bindings: iio: adc: Add docs for ad7124 iio: adc: Add ad7124 support dt-bindings: iio: adc: Add common ADCs properties to a separate file iio: ad_sigma_delta: Allow to provide custom data register address staging: iio: ad7816: Add device tree table. iio: imu: st_lsm6dsx: add entry in MAINTAINERS file iio: potentiometer: mcp4131: use of_device_get_match_data() staging: iio: adc: ad7280a: use devm_* APIs staging: iio: adc: ad7280a: power down the device on error in probe dt-bindings: iio: imu: st_lsm6dsx: add support to i2c pullup resistors iio: imu: st_lsm6dsx: add hw FIFO support to i2c controller iio: imu: st_lsm6dsx: add st_lsm6dsx_push_tagged_data routine iio: imu: st_lsm6dsx: add i2c embedded controller support iio: imu: st_lsm6dsx: introduce st_lsm6dsx_sensor_set_enable routine iio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids iio: imu: st_lsm6dsx: remove static from st_lsm6dsx_set_watermark iio: imu: st_lsm6dsx: reload trimming parameter at bootstrap iio: imu: st_lsm6dsx: introduce locked read/write utility routines ... commit a2aa52ab16efbee40ad118ebac4a5e438f5b43ee Author: Ingo Molnar Date: Thu Nov 22 09:34:03 2018 +0100 x86/fault: Clean up the page fault oops decoder a bit - Make the oops messages a bit less scary (don't mention 'HW errors') - Turn 'PROT USER' (which is visually easily confused with PROT_USER) into individual bit descriptors: "[PROT] [USER]". This also makes "[normal kernel read fault]" more apparent. - De-abbreviate variables to make the code easier to read - Use vertical alignment where appropriate. - Add comment about string size limits and the helper function. - Remove unnecessary line breaks. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit a1a371c468f7238b7826fde55786b02377faf8e2 Author: Andy Lutomirski Date: Wed Nov 21 15:11:25 2018 -0800 x86/fault: Decode page fault OOPSes better One of Linus' favorite hobbies seems to be looking at OOPSes and decoding the error code in his head. This is not one of my favorite hobbies :) Teach the page fault OOPS hander to decode the error code. If it's a !USER fault from user mode, print an explicit note to that effect and print out the addresses of various tables that might cause such an error. With this patch applied, if I intentionally point the LDT at 0x0 and run the x86 selftests, I get: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 HW error: normal kernel read fault This was a system access from user code IDT: 0xfffffe0000000000 (limit=0xfff) GDT: 0xfffffe0000001000 (limit=0x7f) LDTR: 0x50 -- base=0x0 limit=0xfff7 TR: 0x40 -- base=0xfffffe0000003000 limit=0x206f PGD 800000000456e067 P4D 800000000456e067 PUD 4623067 PMD 0 SMP PTI CPU: 0 PID: 153 Comm: ldt_gdt_64 Not tainted 4.19.0+ #1317 Hardware name: ... RIP: 0033:0x401454 Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/11212acb25980cd1b3030875cd9502414fbb214d.1542841400.git.luto@kernel.org Signed-off-by: Ingo Molnar commit af2ebdcf044039e89da3cd44c0f04dea317020c5 Author: Andy Lutomirski Date: Wed Nov 21 15:11:26 2018 -0800 x86/vsyscall/64: Use X86_PF constants in the simulated #PF error code Rather than hardcoding 6 with a comment, use the defined constants. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/e023f20352b0d05a8b0205629897917262d2ad68.1542841400.git.luto@kernel.org Signed-off-by: Ingo Molnar commit d38bc89c72e7235ac889ae64fe7828e2e61a18af Author: Andy Lutomirski Date: Wed Nov 21 15:11:24 2018 -0800 x86/oops: Show the correct CS value in show_regs() show_regs() shows the CS in the CPU register instead of the value in regs. This means that we'll probably print "CS: 0010" almost all the time regardless of what was actually in CS when the kernel malfunctioned. This gives a particularly confusing result if we OOPSed due to an implicit supervisor access from user mode. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/4e36812b6e1e95236a812021d35cbf22746b5af6.1542841400.git.luto@kernel.org Signed-off-by: Ingo Molnar commit ebb53e2597e2dc7637ab213df006e99681b6ee25 Author: Andy Lutomirski Date: Wed Nov 21 15:11:23 2018 -0800 x86/fault: Don't try to recover from an implicit supervisor access This avoids a situation in which we attempt to apply various fixups that are not intended to handle implicit supervisor accesses from user mode if we screw up in a way that causes this type of fault. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/9999f151d72ff352265f3274c5ab3a4105090f49.1542841400.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 0ed32f1aa66ee758e6c8164f549f7ff9d399a20e Author: Andy Lutomirski Date: Wed Nov 21 15:11:22 2018 -0800 x86/fault: Remove sw_error_code All of the fault handling code now corrently checks user_mode(regs) as needed, and nothing depends on the X86_PF_USER bit being munged. Get rid of the sw_error code and use hw_error_code everywhere. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/078f5b8ae6e8c79ff8ee7345b5c476c45003e5ac.1542841400.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 382744d359167fe83d30c304aefefc03bf15259e Author: Hao Zhang Date: Wed Nov 21 23:43:57 2018 +0800 ARM: dts: sun8i: Add board dts file for t3-cqa3t-bv3. The T3/R40/V40 using the same sdk and config file in allwinner sdk, it seem they are the same SOC just with different name, so compatible with R40. The t3-cqa3t-bv3 based on Allwinner T3 SoC, it has various connectors, leds, buttons, and sell on: https://item.taobao.com/item.htm?spm=2013.1.w4023-4203040713.25.62704cce7UCgLS&id=557154455330 It features: - X-Powers AXP221s PMIC connected to i2c0 - 1/2 GB DDR3 DRAM - 8 GB eMMC - 2x USB 2.0 hosts - 1x USB 2.0 OTG - 2 LVDS connectors - 24 bit RGB LCD connector - HDMI output - DVP camera interface (support 500w cmos camera) - GPIO connectors - 5 TTL uarts and 2 RS232 uarts - 1 RS485 connector - support i2c capacitive tp and usb infrared tp - boot control, reset and user buttons - 3.5mm headphone and 3.5mm mic jack - 100M RJ45 - micro SD card slot - DC power jack - RCT power slot - 1 CVBS TVIN - 1 CVBS TVOUT - 2 customer leds - 1 buzzer - 1 minipcie - I2C output - SPI output - PCM output - wifi and bt connector reserved. Board info can find here: https://github.com/Axl-zhang/Allwinner-V40-T3-R40-manual Signed-off-by: Hao Zhang Signed-off-by: Maxime Ripard commit 8cc77e014917c65f05a61503bf67d8a2daa0ed90 Author: Hao Zhang Date: Wed Nov 21 23:44:47 2018 +0800 Documentation: ARM: sunxi: Add Allwinner SoC T3. Add Allwinner SoC T3 document and fix format. Signed-off-by: Hao Zhang Signed-off-by: Maxime Ripard commit d491324f966518fbd3f4c627a3e9766d018a4eef Author: Songjun Wu Date: Thu Nov 22 15:47:35 2018 +0800 include: Add lantiq.h in include/linux/ In some existing lantiq driver, the C codes include lantiq_soc.h header file directly. ./arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h ./arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h Those drivers need to be extended to support more platform. lantiq.h is added in include/linux/ to make it globally available and provides some wrapper codes. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 3fcccec008cf095ac61018cfce0e4bb76edddb5b Author: Li RongQing Date: Mon Nov 12 17:28:22 2018 +0800 xfrm6: remove BUG_ON from xfrm6_dst_ifdown if loopback_idev is NULL pointer, and the following access of loopback_idev will trigger panic, which is same as BUG_ON Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert commit e8e94fce14658defc659021a50d4253a681d02e7 Merge: b1a9d7b019011 f4a0742b3cc1d Author: Ingo Molnar Date: Thu Nov 22 07:52:50 2018 +0100 Merge tag 'perf-core-for-mingo-4.21-20181122' 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: - Start using BPF maps in 'perf trace' for filters in the augmented syscalls code, keeping the existing code for tracepoint filters so that we can switch back and forth while getting everything BPFied (Arnaldo Carvalho de Melo) - Suppress potential format-truncation warning in the PMU code (Ben Hutchings) - Introduce 'perf bench epoll', with "wait" and "ctl" benchmarks (Davidlohr Bueso) - Fix slowness due to -ffunction-section, do it by sorting the maps by name, so avoiding the using rb_first/next to traverse all entries looking for a map name, that with --ffunction-section gets to thousands of maps (Eric Saint-Etienne) - Separate jvmti cmlr check (Jiri Olsa) - Allow using the stepping when figuring out which JSON files to use for a x86 processor, so that Cascadelake server can be support, which has the same cpuid as some other processor, being different only in the stepping (Kan Liang) - Share code and output format for uregs and iregs 'perf script' output (Milian Wolff) - Use perf_evsel__is_clocki() for clock events in 'perf stat' (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 66a4059ba72c23ae74a7c702894ff76c4b7eac1f Author: Paul Burton Date: Wed Nov 21 19:47:57 2018 -0800 MIPS: Only include mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y MIPS' asm/mmzone.h includes the machine/platform mmzone.h unconditionally, but since commit bb53fdf395ee ("MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3") is included by asm/rk4cache.h for all r4k-style configs regardless of CONFIG_NEED_MULTIPLE_NODES. This is problematic when CONFIG_NEED_MULTIPLE_NODES=n because both the loongson3 & ip27 mmzone.h headers unconditionally define the NODE_DATA preprocessor macro which is aready defined by linux/mmzone.h, resulting in the following build error: In file included from ./arch/mips/include/asm/mmzone.h:10, from ./arch/mips/include/asm/r4kcache.h:23, from arch/mips/mm/c-r4k.c:33: ./arch/mips/include/asm/mach-loongson64/mmzone.h:48: error: "NODE_DATA" redefined [-Werror] #define NODE_DATA(n) (&__node_data[(n)]->pglist) In file included from ./include/linux/topology.h:32, from ./include/linux/irq.h:19, from ./include/asm-generic/hardirq.h:13, from ./arch/mips/include/asm/hardirq.h:16, from ./include/linux/hardirq.h:9, from arch/mips/mm/c-r4k.c:11: ./include/linux/mmzone.h:907: note: this is the location of the previous definition #define NODE_DATA(nid) (&contig_page_data) Resolve this by only including the machine mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y, which also removes the need for the empty mach-generic version of the header which we delete. Signed-off-by: Paul Burton Fixes: bb53fdf395ee ("MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3") commit 359d0ac1e806caa6c233e32d33c8970aa94f6cb7 Author: Sabyasachi Gupta Date: Sun Nov 18 20:08:48 2018 +0530 scsi: lpfc: Use dma_zalloc_coherent Replaced dma_alloc_coherent + memset with dma_zalloc_coherent. Signed-off-by: Sabyasachi Gupta Acked-by: James Smart Signed-off-by: Martin K. Petersen commit 9959376c1b4f024e41371cffa139a533f34b415f Author: YueHaibing Date: Mon Nov 12 01:54:05 2018 +0000 scsi: bnx2i: remove set but not used variable 'cid_num' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/bnx2i/bnx2i_hwi.c: In function 'bnx2i_process_ofld_cmpl': drivers/scsi/bnx2i/bnx2i_hwi.c:2430:6: warning: variable 'cid_num' set but not used [-Wunused-but-set-variable] It never used since commit cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.") Signed-off-by: YueHaibing Acked-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 1794ef2b150dd502bc31cb50ad36c901337b4d0e Author: Christoph Hellwig Date: Sat Nov 10 09:28:22 2018 +0100 scsi: aha1542: convert to DMA mapping API aha1542 is one of the last users of the legacy isa_*_to_bus APIs, which also isn't portable enough. Convert it to the proper DMA mapping API. Thanks to Ondrej Zary for testing and finding and fixing a crucial bug. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 469f72ddc618d0afe05176b18ae6ebefb1fc6fe2 Author: Shivasharan S Date: Fri Nov 9 09:47:20 2018 -0800 scsi: megaraid_sas: Add support for MegaRAID Aero controllers This patch adds support for MegaRAID Aero controller PCI IDs. Print a message when a configurable secure type controller is encountered. Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 1c7a94e4aa564cd5e9d6fc661916c44328263ea7 Author: Sreekanth Reddy Date: Fri Nov 9 15:04:12 2018 +0530 scsi: mpt3sas: Display message on Configurable secure HBA Display following warning message only upon detection of configurable secure type controllers. "HBA is in Configurable Secure mode" [mkp: typos] Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 6920e6a255d5ebd8501693afe9847f0e0ace2b4d Author: Yue Haibing Date: Thu Nov 8 06:31:21 2018 +0000 scsi: libfc: Remove set but not used variable 'disc' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/libfc/fc_rport.c: In function 'fc_rport_recv_flogi_req': drivers/scsi/libfc/fc_rport.c:866:18: warning: variable 'disc' set but not used [-Wunused-but-set-variable] It no used any more after commit baa6719f902a ("libfc: Update rport reference counting") Signed-off-by: Yue Haibing Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit b49d6f7885306ee636d5c1af52170f3069ccf5f7 Author: David Disseldorp Date: Wed Nov 7 14:11:07 2018 +0100 scsi: target: add emulate_pr backstore attr to toggle PR support The new emulate_pr backstore attribute allows for Persistent Reservation and SCSI2 RESERVE/RELEASE support to be completely disabled. This can be useful for scenarios such as: - Ensuring ATS (Compare & Write) usage on recent VMware ESXi initiators. - Allowing clustered (e.g. tcm-user) backends to block such requests, avoiding the multi-node reservation state propagation. When explicitly disabled, PR and RESERVE/RELEASE requests receive Invalid Command Operation Code response sense data. Signed-off-by: David Disseldorp Reviewed-by: Mike Christie Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 8d0bb86e2cf6c96d88c3de56a2a29329872c454d Author: Arnd Bergmann Date: Fri Nov 2 16:35:23 2018 +0100 scsi: cxgb4i: fix thermal configuration dependencies I fixed a bug by adding a dependency in the network driver, but that fix caused a related bug in the SCSI driver: WARNING: unmet direct dependencies detected for CHELSIO_T4 Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=y] || IPV6 [=y]=n) && (THERMAL [=m] || !THERMAL [=m]) Selected by [y]: - SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI [=y] && INET [=y] && (IPV6 [=y] || IPV6 [=y]=n) drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_init': cxgb4_thermal.c:(.text+0x158): undefined reference to `thermal_zone_device_register' drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_remove': cxgb4_thermal.c:(.text+0x1d8): undefined reference to `thermal_zone_device_unregister' /git/arm-soc/Makefile:1042: recipe for target 'vmlinux' failed The same dependency needs to be propagated here to make it work correctly with CONFIG_THERMAL=m and SCSI_CXGB4_ISCSI=y. That change by itself causes another problem with a circular dependency, as we use 'select NETDEVICES'. This is something we really should not do anyway, as a driver symbol should never select another major subsystem, so let's turn that into a 'depends on'. I don't see any downsides of that, as NETDEVICES is only disabled in rather obscure cases that are not relevant to the users of cxgb4i. Fixes: e70a57fa59bb ("cxgb4: fix thermal configuration dependencies") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 0e55892ea2e62c66fee24a3d73eea3ad0b287ba4 Author: Souptick Joarder Date: Thu Nov 1 09:49:09 2018 +0530 scsi: aic94xx: Use dma_pool_zalloc Replaced dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Brajeswar Ghosh Signed-off-by: Souptick Joarder Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit b239499f927f79401d51a677bc640980ca630604 Merge: 9235dd441af43 0081cdfe63f0b Author: Dave Airlie Date: Thu Nov 22 12:54:33 2018 +1000 Merge tag 'drm-misc-next-2018-11-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v4.21, part 2: UAPI Changes: - Remove syncobj timeline support from drm. Cross-subsystem Changes: - Document canvas provider node in the DT bindings. - Improve documentation for TPO TPG110 DT bindings. Core Changes: - Use explicit state in drm atomic functions. - Add panel quirk for new GPD Win2 firmware. - Add DRM_FORMAT_XYUV8888. - Set the default import/export function in prime to drm_gem_prime_import/export. - Add a separate drm_gem_object_funcs, to stop relying on dev->driver->*gem* functions. - Make sure that tinydrm sets the virtual address also on imported buffers. Driver Changes: - Support active-low data enable signal in sun4i. - Fix scaling in vc4. - Use canvas provider node in meson. - Remove unused variables in sti and qxl and cirrus. - Add overlay plane support and primary plane scaling to meson. - i2c fixes in drm/bridge/sii902x - Fix mailbox read size in rockchip. - Spelling fix in panel/s6d16d0. - Remove unnecessary null check from qxl_bo_unref. - Remove unused arguments from qxl_bo_pin. - Fix qxl cursor pinning. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/9c0409e3-a85f-d2af-b4eb-baf1eb8bbae4@linux.intel.com commit f4a0742b3cc1d03b2ff448017b8c714a77e5a261 Author: Kan Liang Date: Wed Nov 21 08:49:39 2018 -0800 perf pmu: Move *_cpuid_str() weak functions to header.c The weak functions, strcmp_cpuid_str() and get_cpuid_str(), are defined in pmu.c. Most of the cpuid related functions, including *_cpuid_str()'s declaration and platform specific definition, are in header.c/h. To make the declaration and definition of all cpuid related functions in a consistent place, move the weak functions to header.c. There is no functional change. Suggested-by: Jiri Olsa Signed-off-by: Kan Liang Link: http://lkml.kernel.org/r/20181121164939.13482-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1e6285699b3034e6f4d1f091edd46d717580bf7c Author: Eric Saint-Etienne Date: Wed Nov 21 09:51:19 2018 -0800 perf symbols: Fix slowness due to -ffunction-section Perf can take minutes to parse an image when -ffunction-section is used. This is especially true with the kernel image when it is compiled this way, which is the arm64 default since the patcheset "Enable deadcode elimination at link time". Perf organize maps using a rbtree. Whenever perf finds a new symbols, it first searches this rbtree for the map it belongs to, by strcmp()'aring section names. When it finds the map with the right name, it uses it to add the symbol. With a usual image there aren't so many maps but when using -ffunction-section there's basically one map per function. With the kernel image that's north of 40,000 maps. For most symbols perf has to parses the entire rbtree to eventually create a new map and add it. Consequently perf spends most of the time browsing a rbtree that keeps getting larger. This performance fix introduces a secondary rbtree that indexes maps based on the section name. Signed-off-by: Eric Saint-Etienne Reviewed-by: Dave Kleikamp Reviewed-by: David Aldridge Reviewed-by: Rob Gardner Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1542822679-25591-1-git-send-email-eric.saint.etienne@oracle.com Signed-off-by: Arnaldo Carvalho de Melo commit dd1d0044dd1c1bf84a9b3e1f24e43347b26b96a0 Author: Jiri Olsa Date: Wed Nov 21 16:43:41 2018 +0100 perf jvmti: Separate jvmti cmlr check The Compiled Method Load Record (cmlr) is JDK specific interface to access JVM stack info. This makes the jvmti agent code not compile under another jdk, which does not support that. Separating jvmti cmlr check into special feature check, and adding HAVE_JVMTI_CMLR macro to indicate that. Mark cmlr code in jvmti/libjvmti.c with HAVE_JVMTI_CMLR, so we can compile it on system without cmlr support. This change makes the jvmti compile with java-1.8.0-ibm package. It's without the line numbers support, but the rest works. Adding NO_JVMTI_CMLR compile variable for testing. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ben Gainey Cc: Gustavo Luiz Duarte Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20181121154341.21521-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ecd94f1be3033e27a74eccdb29ee9884a01cf32b Author: Kan Liang Date: Thu Nov 15 08:33:27 2018 -0500 perf vendor events: Add JSON metrics for Cascadelake server Add JSON metrics (based on event list v1) for Cascadelake server Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/3ab97c73-c197-8555-1a35-b54636e667e6@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b54411a4485c9f1d50f003810ecfceca82a09ae Author: Kan Liang Date: Wed Nov 14 13:24:15 2018 -0800 perf vendor events: Add stepping in CPUID string for x86 The perf tools cannot find the proper event list for the Cascadelake server. Because the Cascadelake server and the Skylake server have the same CPU model number, which are used by the perf tools to find the event list. The stepping for Skylake server is up to 4. The stepping for Cascadelake server starts from 5. The stepping can be used to distinguish between them. The stepping is added in get_cpuid_str(). The stepping information for Skylake server is updated in mapfile.csv. A x86 specific strcmp_cpuid_cmp() function is added to handle two CPUID formats in mapfile.csv, "vendor-family-model-stepping" and "vendor-family-model": - If a cpuid-regular-expression from the mapfile.csv using the new stepping format, a cpuid-string generated on the machine must include stepping. Otherwise, it is a mismatch. - If the cpuid-regular-expression using the old non-stepping format, the stepping in the cpuid-string will be ignored. The script, using environment string "PERF_CPUID" without stepping on Skylake server, will be broken. If so, users must fix their scripts. Committer notes: Fixed this build error on centos:6 and debian:7: arch/x86/util/header.c: In function 'is_full_cpuid': arch/x86/util/header.c:82:39: error: declaration of 'cpuid' shadows a global declaration [-Werror=shadow] arch/x86/util/header.c:12:1: error: shadowed declaration is here [-Werror=shadow] arch/x86/util/header.c: In function 'strcmp_cpuid_str': arch/x86/util/header.c:98:56: error: declaration of 'cpuid' shadows a global declaration [-Werror=shadow] arch/x86/util/header.c:12:1: error: shadowed declaration is here [-Werror=shadow] cc1: all warnings being treated as errors Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181114212416.15665-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit eb08d006054e7e374592068919e32579988602d4 Author: Ravi Bangoria Date: Thu Nov 15 15:25:32 2018 +0530 perf stat: Use perf_evsel__is_clocki() for clock events We already have function to check if a given event is either SW_CPU_CLOCK or SW_TASK_CLOCK. Utilize it. Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Anton Blanchard Cc: Jin Yao Cc: Namhyung Kim Cc: Thomas Richter Cc: yuzhoujian@didichuxing.com Link: http://lkml.kernel.org/r/20181115095533.16930-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 11a64a05dc649815670b1be9fe63d205cb076401 Author: Ben Hutchings Date: Sun Nov 11 18:45:24 2018 +0000 perf pmu: Suppress potential format-truncation warning Depending on which functions are inlined in util/pmu.c, the snprintf() calls in perf_pmu__parse_{scale,unit,per_pkg,snapshot}() might trigger a warning: util/pmu.c: In function 'pmu_aliases': util/pmu.c:178:31: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=] snprintf(path, PATH_MAX, "%s/%s.unit", dir, name); ^~ I found this when trying to build perf from Linux 3.16 with gcc 8. However I can reproduce the problem in mainline if I force __perf_pmu__new_alias() to be inlined. Suppress this by using scnprintf() as has been done elsewhere in perf. Signed-off-by: Ben Hutchings Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20181111184524.fux4taownc6ndbx6@decadent.org.uk Signed-off-by: Arnaldo Carvalho de Melo commit 4787eff3fa88f62fede6ed7afa06477ae6bf984d Author: Pu Wen Date: Mon Nov 12 15:40:51 2018 +0800 perf tools: Add Hygon Dhyana support The tool perf is useful for the performance analysis on the Hygon Dhyana platform. But right now there is no Hygon support for it to analyze the KVM guest os data. So add Hygon Dhyana support to it by checking vendor string to share the code path of AMD. Signed-off-by: Pu Wen Acked-by: Borislav Petkov Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1542008451-31735-1-git-send-email-puwen@hygon.cn Signed-off-by: Arnaldo Carvalho de Melo commit 231457ec707475c71d4e538a3253f1ed9e294cf0 Author: Davidlohr Bueso Date: Tue Nov 6 07:22:26 2018 -0800 perf bench: Add epoll_ctl(2) benchmark Benchmark the various operations allowed for epoll_ctl(2). The idea is to concurrently stress a single epoll instance doing add/mod/del operations. Committer testing: # perf bench epoll ctl # Running 'epoll/ctl' benchmark: Run summary [PID 20344]: 4 threads doing epoll_ctl ops 64 file-descriptors for 8 secs. [thread 0] fdmap: 0x21a46b0 ... 0x21a47ac [ add: 1680960 ops; mod: 1680960 ops; del: 1680960 ops ] [thread 1] fdmap: 0x21a4960 ... 0x21a4a5c [ add: 1685440 ops; mod: 1685440 ops; del: 1685440 ops ] [thread 2] fdmap: 0x21a4c10 ... 0x21a4d0c [ add: 1674368 ops; mod: 1674368 ops; del: 1674368 ops ] [thread 3] fdmap: 0x21a4ec0 ... 0x21a4fbc [ add: 1677568 ops; mod: 1677568 ops; del: 1677568 ops ] Averaged 1679584 ADD operations (+- 0.14%) Averaged 1679584 MOD operations (+- 0.14%) Averaged 1679584 DEL operations (+- 0.14%) # Lets measure those calls with 'perf trace' to get a glympse at what this benchmark is doing in terms of syscalls: # perf trace -m32768 -s perf bench epoll ctl # Running 'epoll/ctl' benchmark: Run summary [PID 20405]: 4 threads doing epoll_ctl ops 64 file-descriptors for 8 secs. [thread 0] fdmap: 0x21764e0 ... 0x21765dc [ add: 1100480 ops; mod: 1100480 ops; del: 1100480 ops ] [thread 1] fdmap: 0x2176790 ... 0x217688c [ add: 1250176 ops; mod: 1250176 ops; del: 1250176 ops ] [thread 2] fdmap: 0x2176a40 ... 0x2176b3c [ add: 1022464 ops; mod: 1022464 ops; del: 1022464 ops ] [thread 3] fdmap: 0x2176cf0 ... 0x2176dec [ add: 705472 ops; mod: 705472 ops; del: 705472 ops ] Averaged 1019648 ADD operations (+- 11.27%) Averaged 1019648 MOD operations (+- 11.27%) Averaged 1019648 DEL operations (+- 11.27%) Summary of events: epoll-ctl (20405), 1264 events, 0.0% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ eventfd2 256 9.514 0.001 0.037 5.243 68.00% clone 4 1.245 0.204 0.311 0.531 24.13% mprotect 66 0.345 0.002 0.005 0.021 7.43% openat 45 0.313 0.004 0.007 0.073 21.93% mmap 88 0.302 0.002 0.003 0.013 5.02% futex 4 0.160 0.002 0.040 0.140 83.43% sched_setaffinity 4 0.124 0.005 0.031 0.070 49.39% read 44 0.103 0.001 0.002 0.013 15.54% fstat 40 0.052 0.001 0.001 0.003 5.43% close 39 0.039 0.001 0.001 0.001 1.48% stat 9 0.034 0.003 0.004 0.006 7.30% access 3 0.023 0.007 0.008 0.008 4.25% open 2 0.021 0.008 0.011 0.013 22.60% getdents 4 0.019 0.001 0.005 0.009 37.15% write 2 0.013 0.004 0.007 0.009 38.48% munmap 1 0.010 0.010 0.010 0.010 0.00% brk 3 0.006 0.001 0.002 0.003 26.34% rt_sigprocmask 2 0.004 0.001 0.002 0.003 43.95% rt_sigaction 3 0.004 0.001 0.001 0.002 16.07% prlimit64 3 0.004 0.001 0.001 0.001 5.39% prctl 1 0.003 0.003 0.003 0.003 0.00% epoll_create 1 0.003 0.003 0.003 0.003 0.00% lseek 2 0.002 0.001 0.001 0.001 11.42% sched_getaffinity 1 0.002 0.002 0.002 0.002 0.00% arch_prctl 1 0.002 0.002 0.002 0.002 0.00% set_tid_address 1 0.001 0.001 0.001 0.001 0.00% getpid 1 0.001 0.001 0.001 0.001 0.00% set_robust_list 1 0.001 0.001 0.001 0.001 0.00% execve 1 0.000 0.000 0.000 0.000 0.00% epoll-ctl (20406), 1245480 events, 14.6% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ epoll_ctl 619511 1034.927 0.001 0.002 6.691 0.67% nanosleep 3226 616.114 0.006 0.191 10.376 7.57% futex 2 11.336 0.002 5.668 11.334 99.97% set_robust_list 1 0.001 0.001 0.001 0.001 0.00% clone 1 0.000 0.000 0.000 0.000 0.00% epoll-ctl (20407), 1243151 events, 14.5% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ epoll_ctl 618350 1042.181 0.001 0.002 2.512 0.40% nanosleep 3220 366.261 0.012 0.114 18.162 9.59% futex 4 5.463 0.001 1.366 5.427 99.12% set_robust_list 1 0.002 0.002 0.002 0.002 0.00% epoll-ctl (20408), 1801690 events, 21.1% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ epoll_ctl 896174 1540.581 0.001 0.002 6.987 0.74% nanosleep 4667 783.393 0.006 0.168 10.419 7.10% futex 2 4.682 0.002 2.341 4.681 99.93% set_robust_list 1 0.002 0.002 0.002 0.002 0.00% clone 1 0.000 0.000 0.000 0.000 0.00% epoll-ctl (20409), 4254890 events, 49.8% syscall calls total min avg max stddev (msec) (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- --------- ------ epoll_ctl 2116416 3768.097 0.001 0.002 9.956 0.41% nanosleep 11023 1141.778 0.006 0.104 9.447 4.95% futex 3 0.037 0.002 0.012 0.029 70.50% set_robust_list 1 0.008 0.008 0.008 0.008 0.00% madvise 1 0.005 0.005 0.005 0.005 0.00% clone 1 0.000 0.000 0.000 0.000 0.00% # Committer notes: Fix build on fedora:24-x-ARC-uClibc, debian:experimental-x-mips, debian:experimental-x-mipsel, ubuntu:16.04-x-arm and ubuntu:16.04-x-powerpc CC /tmp/build/perf/bench/epoll-ctl.o bench/epoll-ctl.c: In function 'init_fdmaps': bench/epoll-ctl.c:214:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (i = 0; i < nfds; i+=inc) { ^ bench/epoll-ctl.c: In function 'bench_epoll_ctl': bench/epoll-ctl.c:377:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (i = 0; i < nthreads; i++) { ^ bench/epoll-ctl.c:388:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (i = 0; i < nthreads; i++) { ^ cc1: all warnings being treated as errors Signed-off-by: Davidlohr Bueso Tested-by: Arnaldo Carvalho de Melo Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jason Baron Link: http://lkml.kernel.org/r/20181106152226.20883-3-dave@stgolabs.net [ Use inttypes.h to print rlim_t fields, fixing the build on Alpine Linux / musl libc ] [ Check if eventfd() is available, i.e. if HAVE_EVENTFD is defined ] Signed-off-by: Arnaldo Carvalho de Melo commit 121dd9ea0116de3e79a4903a84018190c595e2b6 Author: Davidlohr Bueso Date: Tue Nov 6 07:22:25 2018 -0800 perf bench: Add epoll parallel epoll_wait benchmark This program benchmarks concurrent epoll_wait(2) for file descriptors that are monitored with with EPOLLIN along various semantics, by a single epoll instance. Such conditions can be found when using single/combined or multiple queuing when load balancing. Each thread has a number of private, nonblocking file descriptors, referred to as fdmap. A writer thread will constantly be writing to the fdmaps of all threads, minimizing each threads's chances of epoll_wait not finding any ready read events and blocking as this is not what we want to stress. Full details in the start of the C file. Committer testing: # perf bench Usage: perf bench [] [] # List of all available benchmark collections: sched: Scheduler and IPC benchmarks mem: Memory access benchmarks numa: NUMA scheduling and MM benchmarks futex: Futex stressing benchmarks epoll: Epoll stressing benchmarks all: All benchmarks # perf bench epoll # List of available benchmarks for collection 'epoll': wait: Benchmark epoll concurrent epoll_waits all: Run all futex benchmarks # perf bench epoll wait # Running 'epoll/wait' benchmark: Run summary [PID 19295]: 3 threads monitoring on 64 file-descriptors for 8 secs. [thread 0] fdmap: 0xdaa650 ... 0xdaa74c [ 328241 ops/sec ] [thread 1] fdmap: 0xdaa900 ... 0xdaa9fc [ 351695 ops/sec ] [thread 2] fdmap: 0xdaabb0 ... 0xdaacac [ 381423 ops/sec ] Averaged 353786 operations/sec (+- 4.35%), total secs = 8 # Committer notes: Fix the build on debian:experimental-x-mips, debian:experimental-x-mipsel and others: CC /tmp/build/perf/bench/epoll-wait.o bench/epoll-wait.c: In function 'writerfn': bench/epoll-wait.c:399:12: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] printinfo("exiting writer-thread (total full-loops: %ld)\n", iter); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ bench/epoll-wait.c:86:31: note: in definition of macro 'printinfo' do { if (__verbose) { printf(fmt, ## arg); fflush(stdout); } } while (0) ^~~ cc1: all warnings being treated as errors Signed-off-by: Davidlohr Bueso Tested-by: Arnaldo Carvalho de Melo Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jason Baron Link: http://lkml.kernel.org/r/20181106152226.20883-2-dave@stgolabs.net Link: http://lkml.kernel.org/r/20181106182349.thdkpvshkna5vd7o@linux-r8p5> [ Applied above fixup as per Davidlohr's request ] [ Use inttypes.h to print rlim_t fields, fixing the build on Alpine Linux / musl libc ] [ Check if eventfd() is available, i.e. if HAVE_EVENTFD is defined ] Signed-off-by: Arnaldo Carvalho de Melo commit 11c6cbe706f218a8dc7e1f962f12b3a52ddd33a9 Author: Arnaldo Carvalho de Melo Date: Wed Nov 21 17:42:00 2018 -0300 tools build feature: Check if eventfd() is available A new 'perf bench epoll' will use this, and to disable it for older systems, add a feature test for this API. This is just a simple program that if successfully compiled, means that the feature is present, at least at the library level, in a build that sets the output directory to /tmp/build/perf (using O=/tmp/build/perf), we end up with: $ ls -la /tmp/build/perf/feature/test-eventfd* -rwxrwxr-x. 1 acme acme 8176 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.bin -rw-rw-r--. 1 acme acme 588 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.d -rw-rw-r--. 1 acme acme 0 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.make.output $ ldd /tmp/build/perf/feature/test-eventfd.bin linux-vdso.so.1 (0x00007fff3bf3f000) libc.so.6 => /lib64/libc.so.6 (0x00007fa984061000) /lib64/ld-linux-x86-64.so.2 (0x00007fa984417000) $ grep eventfd -A 2 -B 2 /tmp/build/perf/FEATURE-DUMP feature-dwarf=1 feature-dwarf_getlocations=1 feature-eventfd=1 feature-fortify-source=1 feature-sync-compare-and-swap=1 $ The main thing here is that in the end we'll have -DHAVE_EVENTFD in CFLAGS, and then the 'perf bench' entry needing that API can be selectively pruned. Cc: Adrian Hunter Cc: Andrew Morton Cc: David Ahern Cc: Davidlohr Bueso Cc: Jason Baron Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-wkeldwob7dpx6jvtuzl8164k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f072df95f82811d3c2463b5626f65af499738fac Merge: d59da3fbfe3f2 c39c56a8c8a06 Author: David S. Miller Date: Wed Nov 21 17:10:32 2018 -0800 Merge branch 'mlxsw-Add-VxLAN-learning-support' Ido Schimmel says: ==================== mlxsw: Add VxLAN learning support This patchset adds VxLAN learning support in the mlxsw driver. The first five patches from Petr add the required switchdev APIs which allow device drivers to notify the VxLAN driver about learned / aged-out FDB entries. First in patch #1, an unnecessary argument is dropped from __vxlan_fdb_delete(). In patches #2-#4, the VxLAN FDB handling code is extended to make sending the switchdev events configurable; to mark user-added entries as such; and to make sure HW-learned FDB entries do not take over user-added ones. Finally in patch #5, the necessary switchdev notifications are added and handled by VxLAN, similarly to how this is handled in the bridge driver. Patch #6 allows changing of the VxLAN's device ageing time since it is useful for the selftest in the last patch. Patch #7 adds support for querying bridge port flags of a given netdevice, as a new entry should not be learned and notified to the bridge driver in case learning is disabled on the bridge port. Next patches gradually add learning support in mlxsw. The last patch adds a new test case for VxLAN learning. ==================== Signed-off-by: David S. Miller commit c39c56a8c8a06330eacc739fda7d175dd1781db5 Author: Ido Schimmel Date: Wed Nov 21 08:02:52 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add learning test Add a test which checks that the VxLAN driver can learn FDB entries and that these entries are correctly deleted and aged-out. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit dbd4485a69e15b850107eea516cd64387dff1f2e Author: Ido Schimmel Date: Wed Nov 21 08:02:51 2018 +0000 selftests: mlxsw: Consider VxLAN learning enabled as valid The test currently expects that a configuration which includes a VxLAN device with learning enabled to fail. Previous patches enabled VxLAN learning in mlxsw, so change the test accordingly. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 20134ee9c52677f9dff654a7954a278e691f47cb Author: Ido Schimmel Date: Wed Nov 21 08:02:50 2018 +0000 mlxsw: spectrum_nve: Allow VxLAN learning Up until now the driver returned an error when learning was enabled on a VxLAN device enslaved to an offloaded bridge. Previous patches added VxLAN learning support, so remove the check. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 8b547a60262121b2b471a8f2fa0e33a50c6c1ecd Author: Ido Schimmel Date: Wed Nov 21 08:02:48 2018 +0000 mlxsw: spectrum_switchdev: Allow deletion of learned FDB entries Allow users to delete learned FDB entries from the bridge's FDB before enabling VxLAN learning. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 981f084b36754b4e5179e8a3fbba554ba0183f0a Author: Ido Schimmel Date: Wed Nov 21 08:02:47 2018 +0000 mlxsw: spectrum_switchdev: Process learned VxLAN FDB entries Start processing two new entry types in addition to current ones: * Learned unicast tunnel entry * Aged-out unicast tunnel entry In both cases the device reports on a new {MAC, FID, IP address} tuple that was learned / aged-out. Based on this notification, the driver instructs the device to add / delete the entry to / from its database. The driver also makes sure to notify the bridge and VxLAN drivers about the new entry. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 3c55bdaca015839ca1d1e5695e7667a9bcfa6e35 Author: Ido Schimmel Date: Wed Nov 21 08:02:46 2018 +0000 mlxsw: spectrum_nve: Add API to resolve learned IP addresses FDB notifications for entries learned from an NVE tunnel contain the IP address of the remote VTEP. In the case of IPv4 underlay, the IP address is specified as-is. IPv6 addresses on the other hand, are specified as handles which then need to be used to query the actual address from the device. Only IPv4 underlay is currently supported, so we cannot receive notifications for IPv6 addresses and therefore an error is returned when one tries to resolve such an address. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5d44a712e6af87842b6d3a01481ff020d1d2fddd Author: Ido Schimmel Date: Wed Nov 21 08:02:45 2018 +0000 mlxsw: spectrum_fid: Allow FID lookup by its index When processing a notification about a new FDB entry learned from a VxLAN tunnel, the driver is provided with the FID index among other parameters. The driver potentially needs to update the bridge and VxLAN drivers about the new entry using a pointer to the VxLAN device and the corresponding VNI. These two parameters are stored in the FID, so add a new function that allows looking up a FID based on its index. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5bae63d9b7627939eb67a7720548c82562ef7fa3 Author: Ido Schimmel Date: Wed Nov 21 08:02:44 2018 +0000 mlxsw: spectrum_fid: Store ifindex of NVE device in FID The driver periodically polls for new FDB entries learned by the device. In the case of an FDB entry learned from a VxLAN tunnel, the notification includes the IP of the remote VTEP, the filtering identifier (FID) and the source MAC address of the overlay packet. Assuming learning is enabled in the VxLAN and bridge drivers, the driver needs to generate a notification and update them about the new FDB entry. Store the ifindex of the NVE device in the FID so that the driver will be able to update the VxLAN and bridge drivers using it. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 933b1ecd001de3db4e94ba34b83f4eb3c0aa78d8 Author: Ido Schimmel Date: Wed Nov 21 08:02:42 2018 +0000 mlxsw: reg: Add definition of unicast tunnel record for SFN register Will be used to process learned FDB records from an NVE tunnel. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 085ddc87d05fdf649ccee7a7da42110e9e1c6311 Author: Ido Schimmel Date: Wed Nov 21 08:02:41 2018 +0000 bridge: Allow querying bridge port flags Allow querying bridge port flags so that drivers capable of performing VxLAN learning will update the bridge driver only if learning is enabled on its bridge port corresponding to the VxLAN device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 40051c4dcad5b374156ad9cceae8d15c0ef1cb95 Author: Ido Schimmel Date: Wed Nov 21 08:02:40 2018 +0000 vxlan: Allow changing ageing time In a similar fashion to the bridge device, allow changing the ageing time of the VxLAN device by scheduling its timer to fire if the ageing time changed. One use case is selftests where learning / ageing of VxLAN FDB entries is tested. The default ageing time is 5 minutes, which is too long for a simple selftest. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 5728ae0d17d27e14b7e5034f73a38b562cfcd5c5 Author: Petr Machata Date: Wed Nov 21 08:02:39 2018 +0000 vxlan: Add hardware FDB learning In order to allow devices to signal learning events to VXLAN, introduce two new switchdev messages: SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE and SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE. Listen to these notifications in the vxlan driver. The FDB entries learned this way have an NTF_EXT_LEARNED flag, and only entries marked as such can be unlearned by the _DEL_ event. They are also immediately marked as offloaded. This is the same behavior that the bridge driver observes. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0ec566aacc26da9292cddfe7109a467ac8a8d9a6 Author: Petr Machata Date: Wed Nov 21 08:02:37 2018 +0000 vxlan: Don't override user-added entries with ext-learned ones When an external learning event collides with an user-added entry, the user-added entry shouldn't be taken over. Otherwise on an unlearn event the entry would be completely lost, even though the user added it by hand. Therefore skip update of FDB flags and state for these cases. This is in accordance with the bridge behavior. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 45598c1cee69b9c7ce111fa634226ab335fafabe Author: Petr Machata Date: Wed Nov 21 08:02:36 2018 +0000 vxlan: Mark user-added FDB entries The VXLAN driver needs to differentiate between FDB entries learned by the VXLAN driver, and those added by the user. The latter ones shouldn't be taken over by external learning events. This is in accordance with bridge behavior. Therefore, extend the flags bitfield to 16 bits and add a new private NTF flag to mark the user-added entries. This seems preferable to adding a dedicated boolean, because passing the flag, unlike passing e.g. a true, makes it clear what the meaning of the bit is. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0e6160f3f5a9a817c3100f02e1605c49cbb2fe78 Author: Petr Machata Date: Wed Nov 21 08:02:35 2018 +0000 vxlan: vxlan_fdb_notify(): Make switchdev notification configurable In a following patch, vxlan is extended to allow hardware FDB learning. For FDB entries learned this way, switchdev notifications should not be sent again, because the driver already knows about these entries. To that end, add an argument vxlan_fdb_notify() to determine whether the switchdev notifications should be sent. Propagate the argument to all call sites transitively, eventually passing true in all root calls. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5572c815603b316d0807f18fbfabace7572cc0e2 Author: Petr Machata Date: Wed Nov 21 08:02:34 2018 +0000 vxlan: __vxlan_fdb_delete(): Drop unused argument vid This argument is necessary for vxlan_fdb_delete(), the API of which is prescribed by ndo_fdb_del, but __vxlan_fdb_delete() doesn't need it. Therefore drop it. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d59da3fbfe3f2bd9cbf29495e818b79d6349b12d Author: Andrea Claudi Date: Tue Nov 20 18:30:30 2018 +0100 net: lpc_eth: fix trivial comment typo Fix comment typo rxfliterctrl -> rxfilterctrl Signed-off-by: Andrea Claudi Signed-off-by: David S. Miller commit 1e33f015994f23f53322e1256c6de97f5d681636 Merge: 11c6c0c228579 6c0fbd726229f Author: David S. Miller Date: Wed Nov 21 15:41:31 2018 -0800 Merge branch 'VLAN-tag-handling-cleanup' Michał Mirosław says: ==================== VLAN tag handling cleanup This is a cleanup set after VLAN_TAG_PRESENT removal. The CFI bit handling is made similar to how other tag fields are used. ==================== Signed-off-by: David S. Miller commit 6c0fbd726229fabecf8e8b631e3e134713eb30ef Author: Michał Mirosław Date: Tue Nov 20 13:20:33 2018 +0100 mlx5: use skb_vlan_tag_get_prio() Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit fb1e3df0023051a1be6f857eea80e7476ebb20ac Author: Michał Mirosław Date: Tue Nov 20 13:20:32 2018 +0100 benet: use skb_vlan_tag_get_prio() Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 98ba780e4c71b9a66fa5819184879315a946aabb Author: Michał Mirosław Date: Tue Nov 20 13:20:32 2018 +0100 net/hyperv: use skb_vlan_tag_*() helpers Replace open-coded bitfield manipulation with skb_vlan_tag_*() helpers. This also enables correctly passing of VLAN.CFI bit. Signed-off-by: Michał Mirosław Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit a2e768b861108d846b6df21074cff738660b45b7 Author: Michał Mirosław Date: Tue Nov 20 13:20:31 2018 +0100 net/vlan: introduce skb_vlan_tag_get_cfi() helper Abstract CFI/DEI bit access consistently with other VLAN tag fields. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit c0436b503591f927f326457a588c461881260276 Author: Paul Burton Date: Wed Nov 21 21:56:36 2018 +0000 MIPS: Enable dead code elimination Select CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION for MIPS, allowing the user to enable dead code elimination. In order for this to work, ensure that we keep the data bus exception table & the machine list by annotating them with KEEP. This shrinks both 32r2el_defconfig & 64r6el_defconfig builds by ~6%, as shown by numbers from scripts/bloat-o-meter: | 32r2el_defconfig | 64r6el_defconfig --------|------------------|------------------ No DCE | 8919864 | 8286307 DCE | 8338988 (-6.51%) | 7741808 (-6.57%) Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21187/ Cc: linux-mips@linux-mips.org commit 1feba8df94f9a866a8d407e253fd34fd98080207 Author: Aaro Koskinen Date: Thu Nov 22 00:37:45 2018 +0200 MIPS: OCTEON: cvmx-ciu2-defs.h: delete unused unions Delete unused unions. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21201/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 3a048cde6bf7dff371e8d1881d89be97f61d123e Author: Aaro Koskinen Date: Thu Nov 22 00:37:44 2018 +0200 MIPS: OCTEON: cvmx-ciu2-defs.h: delete unused macros Delete unused macros. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21199/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 4815c6d77df7684014c115f03fb4314ef58ca649 Author: Aaro Koskinen Date: Thu Nov 22 00:37:43 2018 +0200 MIPS: OCTEON: cvmx-gmxx-defs.h: use default register value return when possible If we are about to return the same register address that would be the default anyway, fallback to default return instead of adding a case label. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21200/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 5e605d2efed1702e99abfd347f7ac152599defbe Author: Aaro Koskinen Date: Thu Nov 22 00:37:42 2018 +0200 MIPS: OCTEON: cvmx-gmxx-defs.h: delete unused union fields When register definition is identical on all OCTEONs, we can trivially delete the model specific union fields. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21203/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 453022b40120a316ab81dee23a9e207795f00136 Author: Aaro Koskinen Date: Thu Nov 22 00:37:41 2018 +0200 MIPS: OCTEON: cvmx-gmxx-defs.h: delete unused unions Delete unused unions. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21197/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 007ed77f3d2a4112eb16816bea91edd59865c918 Author: Aaro Koskinen Date: Thu Nov 22 00:37:40 2018 +0200 MIPS: OCTEON: gmxx-defs.h: delete unused functions and macros Delete unused functions and macros. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21198/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit e0f171ebd43b253f7b71f184e7a7cf70c690be71 Author: Aaro Koskinen Date: Thu Nov 22 00:37:39 2018 +0200 MIPS: OCTEON: delete cvmx override functions Delete cmvx override functions, they are not used. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21196/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit a1afedbc3fd8b444f0e0623ea2973df583deb726 Author: Aaro Koskinen Date: Thu Nov 22 00:37:38 2018 +0200 MIPS: OCTEON: cvmx-bootmem: make more functions static Make cvmx_bootmem_phy_named_block_find/free() static. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21190/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit bf2d401c8bbce143be0df8046aa1c15c2ee54c4a Author: Aaro Koskinen Date: Thu Nov 22 00:37:37 2018 +0200 MIPS: OCTEON: cvmx-bootmem: move code to avoid forward declarations Move code to avoid forward declarations. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21193/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 3e431666a79b79e6d00fc8923566d0e25fc5112d Author: Aaro Koskinen Date: Thu Nov 22 00:37:36 2018 +0200 MIPS: OCTEON: cvmx-bootmem: delete unused functions Delete unused functions. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21191/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 5f35b33ac41ecc553030cfda0147e46f52be3760 Author: Aaro Koskinen Date: Thu Nov 22 00:37:35 2018 +0200 MIPS: OCTEON: make cvmx_bootmem_alloc_range static Make cvmx_bootmem_alloc_range() static, it's not used outside the file. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21195/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 183044637859dc558da06ffa64dd73064c554617 Author: Aaro Koskinen Date: Thu Nov 22 00:37:34 2018 +0200 MIPS: OCTEON: cvmx-helper-util: make cvmx_helper_setup_red_queue static Make cvmx_helper_setup_red_queue static, it's not used outside this file. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21194/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit f3c541bc7f371e2fdd5e3543adbab4f62b1720c5 Author: Aaro Koskinen Date: Thu Nov 22 00:37:33 2018 +0200 MIPS: OCTEON: cvmx-helper-util: delete cvmx_helper_dump_packet Delete unused cvmx_helper_dump_packet(). Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21212/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 51807f641ff9236c1c9e558c80bfcaa8494a96c5 Author: Aaro Koskinen Date: Thu Nov 22 00:37:32 2018 +0200 MIPS: OCTEON: smp: make internal symbols static Make internal symbols static. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21192/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 4d1f01164137a1869f53ebabdd23348201dcdb02 Author: Aaro Koskinen Date: Thu Nov 22 00:37:31 2018 +0200 MIPS: OCTEON: csrc-octeon: include linux/sched/clock.h Include linux/sched/clock.h to get the declaration for sched_clock(). Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21189/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit bcb64116aaf0bd9841d6b94463ace14fd19725ba Author: Aaro Koskinen Date: Thu Nov 22 00:37:30 2018 +0200 MIPS: OCTEON: octeon-irq: make octeon_irq_ciu3_set_affinity() static Make octeon_irq_ciu3_set_affinity() static. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21207/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 2cf1c8933dd93088cfb5f8f58b3bb9bbdf1781b9 Author: Aaro Koskinen Date: Thu Nov 22 00:37:29 2018 +0200 MIPS: OCTEON: octeon-platform: fix typing Use correct type for fdt_property nameoff field. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21204/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit fa1d2e3ffa761687366162d7fb646318bd63962e Author: Aaro Koskinen Date: Thu Nov 22 00:37:28 2018 +0200 MIPS: OCTEON: octeon-platform: make octeon_ids static Make octeon_ids static. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21208/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 75a9da11fea3f1f18536a95d159e8c8c6e740abe Author: Aaro Koskinen Date: Thu Nov 22 00:37:27 2018 +0200 MIPS: OCTEON: delete unused loopback configuration functions Delete unused loopback configuration functions. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21205/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit a37411024d483a279a3b27da881d5227c89ebd83 Author: Aaro Koskinen Date: Thu Nov 22 00:37:26 2018 +0200 MIPS: OCTEON: cvmx-helper: make __cvmx_helper_errata_fix_ipd_ptr_alignment static Make __cvmx_helper_errata_fix_ipd_ptr_alignment static, it's not used outside the file. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21210/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 3533b9acf2771159c37d42035c899f0e350cb4f6 Author: Aaro Koskinen Date: Thu Nov 22 00:37:25 2018 +0200 MIPS: OCTEON: setup: include asm/prom.h Include arm/prom.h to get the declaration of device_tree_init(). Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21202/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit ef4f91e63737861bc2a2437ee54bf103efdf5ec1 Author: Aaro Koskinen Date: Thu Nov 22 00:37:24 2018 +0200 MIPS: OCTEON: setup: include asm/fw/fw.h Include asm/fw/fw.h to get the declaration of fw_init_cmdline(). Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21206/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 751423be06e0ad7643c7cdc74fb6f670e917135e Author: Aaro Koskinen Date: Thu Nov 22 00:37:23 2018 +0200 MIPS: OCTEON: setup: make internal functions and data static Make some internal data and functions static to avoid sparse warnings. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21211/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 6430ba58125713f88327996055a53572b58dbe66 Author: Aaro Koskinen Date: Thu Nov 22 00:37:22 2018 +0200 MIPS: OCTEON: cvmx-l2c: make cvmx_l2c_spinlock static Make cvmx_l2c_spinlock static, it's not used outside the file. Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21209/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org commit 9828ca654b52848e7eb7dcc9b0994ff130dd4546 Author: Steve Wise Date: Sat Nov 10 05:27:39 2018 -0800 iw_cxgb4: only reconnect with MPAv1 if the peer aborts Only retry connection setup with MPAv1 if the peer actually aborted the connection upon receiving the MPAv2 start message. This avoids retrying with MPAv1 in the case where the connection was aborted due to retransmit timeouts. Fixes: d2fe99e86bb2 ("RDMA/cxgb4: Add support for MPAv2 Enhanced RDMA Negotiation") Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe commit 3eeeb7a59acddaa326b03efdf6dce61c120449a3 Author: Yuval Shaia Date: Wed Nov 21 13:47:02 2018 +0200 IB/core: Make function ib_fmr_pool_unmap return void Since the function always returns 0 make it void. Reported-by: Håkon Bugge Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 89180e814aa3cfbdfceaaeed08b6ebab73b1e359 Author: Yue Haibing Date: Thu Nov 15 10:55:00 2018 +0000 IB/srpt: Drop pointless static qualifier in srpt_make_tpg() There is no need to have the 'struct se_portal_group *tpg' variable static since new value always be assigned before use. Signed-off-by: Yue Haibing Reviewed-by: Leon Romanovsky Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 2dc50c5a543148e2a02926214a786805dc4d947b Author: Parav Pandit Date: Thu Nov 15 04:03:35 2018 +0200 RDMA/core: Remove unused header files mm.h, socket.h, scatterlist.h Structures of ib_verbs.h don't use fields/structures of mm.h, socket.h or scatterlist.h. So remove such header files inclusion. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2b91fdfd13f5d3c3a5800731b4c46b0b5d69feaf Author: Sabyasachi Gupta Date: Mon Nov 12 20:51:59 2018 +0530 infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta Acked-by: Steve Wise Signed-off-by: Jason Gunthorpe commit fb670347559bc5e370c008e2673cd67a3e80b189 Author: Sabyasachi Gupta Date: Fri Nov 9 22:20:29 2018 +0530 infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta Acked-by: Steve Wise Signed-off-by: Jason Gunthorpe commit e4b0c94bd24cf8c992919233a2a4e350cd15cde2 Merge: 5b32a23e1d879 b1957c92eba5a Author: Daniel Borkmann Date: Wed Nov 21 23:33:22 2018 +0100 Merge branch 'bpf-libbpf-mapinmap' Nikita V. Shirokov says: ==================== In this patch series I'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). First patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example usage. v4->v5: - naming: renamed everything to map_in_map instead of mapinmap - start to return nonzero val if set_inner_map_fd failed v3->v4: - renamed helper to set_inner_map_fd - now we set this value only if it haven't been set before and only for (array|hash) of maps v2->v3: - fixing typo in patch description - initializing inner_map_fd to -1 by default v1->v2: - addressing nits - removing const identifier from fd in new helper - starting to check return val for bpf_map_update_elem ==================== Signed-off-by: Daniel Borkmann commit b1957c92eba5acad7d8a0a6f968561e08714e978 Author: Nikita V. Shirokov Date: Tue Nov 20 20:55:57 2018 -0800 bpf: adding tests for map_in_map helpber in libbpf adding test/example of bpf_map__set_inner_map_fd usage Signed-off-by: Nikita V. Shirokov Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit addb9fc90f13898e7779da54f471792e3dfb0d55 Author: Nikita V. Shirokov Date: Tue Nov 20 20:55:56 2018 -0800 bpf: adding support for map in map in libbpf idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3) find (by name) map-in-map which you want to load and update w/ descriptor of inner map w/ a new helper from this patch 4) load bpf program w/ bpf_object__load Signed-off-by: Nikita V. Shirokov Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 5b32a23e1d879b78ee72144311314eccf7581bf4 Author: Stanislav Fomichev Date: Tue Nov 20 17:11:21 2018 -0800 bpf: libbpf: don't specify prog name if kernel doesn't support it Use recently added capability check. See commit 23499442c319 ("bpf: libbpf: retry map creation without the name") for rationale. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 94cb310cfaa16582cd49ebbeea5925e8f49324a1 Author: Stanislav Fomichev Date: Tue Nov 20 17:11:20 2018 -0800 bpf: libbpf: remove map name retry from bpf_create_map_xattr Instead, check for a newly created caps.name bpf_object capability. If kernel doesn't support names, don't specify the attribute. See commit 23499442c319 ("bpf: libbpf: retry map creation without the name") for rationale. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 47eff61777c7b2db58805f974994713c8acbe9a6 Author: Stanislav Fomichev Date: Tue Nov 20 17:11:19 2018 -0800 bpf, libbpf: introduce bpf_object__probe_caps to test BPF capabilities It currently only checks whether kernel supports map/prog names. This capability check will be used in the next two commits to skip setting prog/map names. Suggested-by: Daniel Borkmann Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit 8c4905b995c649ac71e21611abc2fcefc904b56a Author: Stanislav Fomichev Date: Wed Nov 21 09:29:44 2018 -0800 libbpf: make sure bpf headers are c++ include-able Wrap headers in extern "C", to turn off C++ mangling. This simplifies including libbpf in c++ and linking against it. v2 changes: * do the same for btf.h v3 changes: * test_libbpf.cpp to test for possible future c++ breakages Signed-off-by: Stanislav Fomichev Acked-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann commit 87429024757cf85db1fba618c0801c772539151d Merge: 5ec0304cdc355 6d2d6fc83a281 Author: Jason Gunthorpe Date: Wed Nov 21 14:29:40 2018 -0700 Merge branch 'mlx5-next' into rdma.git From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux mlx5 updates taken for dependencies on later ODP patches. Conflict resolved by deleting mlx5_ib_get_vector_affinity() * branch 'mlx5-next': (21 commits) net/mlx5: EQ, Make EQE access methods inline {net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA net/mlx5: EQ, Generic EQ net/mlx5: EQ, Different EQ types net/mlx5: EQ, Privatize eq_table and friends net/mlx5: EQ, irq_info and rmap belong to eq_table net/mlx5: EQ, Create all EQs in one place net/mlx5: EQ, Move all EQ logic to eq.c net/mlx5: EQ, Remove redundant completion EQ list lock net/mlx5: EQ, No need to store eq index as a field net/mlx5: EQ, Remove unused fields and structures net/mlx5: EQ, Use the right place to store/read IRQ affinity hint IB/mlx5: Improve ODP debugging messages net/mlx5: Use multi threaded workqueue for page fault handling net/mlx5: Return success for PAGE_FAULT_RESUME in internal error state IB/mlx5: Lock QP during page fault handling net/mlx5: Enumerate page fault types net/mlx5: Add interface to hold and release core resources net/mlx5: Release resource on error flow net/mlx5: Fix offsets of ifc reserved fields ... Signed-off-by: Jason Gunthorpe commit 5ec0304cdc35585085292d91867f15ec38afb134 Author: Artemy Kovalyov Date: Mon Nov 5 08:12:07 2018 +0200 IB/mlx5: Allow modify AV in DCI QP to RTR This is required so the user can set the SL on the DC QP. Signed-off-by: Artemy Kovalyov Reviewed-by: Yossi Itigin Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 462c124c590fe633564192dbfa26e99af788a67c Author: Yonghong Song Date: Wed Nov 21 11:22:42 2018 -0800 bpf: fix a libbpf loader issue Commit 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") added support to read .BTF.ext sections from an object file, create and pass prog_btf_fd and func_info to the kernel. The program btf_fd (prog->btf_fd) is initialized to be -1 to please zclose so we do not need special handling dur prog close. Passing -1 to the kernel, however, will cause loading error. Passing btf_fd 0 to the kernel if prog->btf_fd is invalid fixed the problem. Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") Reported-by: Andrey Ignatov Reported-by: Emre Cantimur Tested-by: Andrey Ignatov Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit f8195e5910785218ed53bc7e522cb31dad26401b Author: Colin Ian King Date: Tue Nov 20 17:17:45 2018 +0000 drm/amd/display: fix dereference of pointer fs_params before it is null checked Currently there are several instances of pointer fs_params being dereferenced before fs_params is being null checked. Fix this by only dereferencing fs_params after the null check. Detected by CoverityScan, CID#1475565 ("Dereference before null check") Fixes: e1e8a020c6b8 ("drm/amd/display: Add support for Freesync 2 HDR and Content to Display Mapping") Signed-off-by: Colin Ian King Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 9d7d2a0af2e4cbfc1f4d50dfa262b5994ac4fb23 Author: Brajeswar Ghosh Date: Wed Nov 21 17:39:13 2018 +0530 drm/amd/display/amdgpu_dm/amdgpu_dm.c: Remove duplicate header Remove dm_services_types.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit 1894687b92030ac39cea2fbcdb5f866207e0da2b Author: Brajeswar Ghosh Date: Wed Nov 21 19:21:52 2018 +0530 drm/amd/amdgpu: Remove duplicate header Remove gca/gfx_8_0_sh_mask.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit 0a46fc2eee81eb420cb2e24b4a079d5885c3c3cf Author: Brajeswar Ghosh Date: Wed Nov 21 12:41:03 2018 +0530 drm/amd/amdgpu/vce_v3_0.c: Remove duplicate header Remove gca/gfx_8_0_d.h which is included more than once Reviewed-by: Junwei Zhang Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit 6c3c559325ab0a2d8128ffdd4088fe891706c4d3 Author: Philip Yang Date: Mon Nov 19 09:53:43 2018 -0500 drm/amdgpu: enable paging queue based on FW version (v2) Based SDMA fw version to enable has_page_queue support. Have to move sdma_v4_0_init_microcode from sw_init to early_init, to load firmware and init fw_version before set_ring/buffer/vm_pte_funcs use it. v2: don't enable on vega12, 20 until confirmed Signed-off-by: Philip Yang Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit e41ca3b1eab89f3d50d0910adb7d6f49ac82d604 Author: Yangtao Li Date: Wed Nov 21 07:31:38 2018 -0500 leds: powernv: add of_node_put() of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. powernv_led_probe() doesn't do that, so fix it. Signed-off-by: Yangtao Li Signed-off-by: Jacek Anaszewski commit 6ed4babed9cc7eaa71522b5c10265ef3a4a06297 Author: Sasha Neftin Date: Mon Nov 12 11:05:20 2018 +0200 igc: Remove obsolete IGC_ERR define Address community comment. Remove obsolete IGC_ERR define and use dev_err method. Suggested by Joe Perches. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 8166abb1ea7d53a26ac0e2598b77a5440216811a Author: Paul E. McKenney Date: Sun Nov 11 11:43:42 2018 -0800 ixgbe: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: "Paul E. McKenney" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0bcd952feec7042d9a5383b639c8edc943402add Author: Jesse Brandeburg Date: Thu Nov 8 14:55:32 2018 -0800 ethernet/intel: consolidate NAPI and NAPI exit While reviewing code, I noticed that Eric Dumazet recommends that drivers check the return code of napi_complete_done, and use that to decide to enable interrupts or not when exiting poll. One of the Intel drivers was already fixed (ixgbe). Upon looking at the Intel drivers as a whole, we are handling our polling and NAPI exit in a few different ways based on whether we have multiqueue and whether we have Tx cleanup included. Several drivers had the bug of exiting NAPI with return 0, which appears to mess up the accounting in the stack. Consolidate all the NAPI routines to do best known way of exiting and to just mostly look like each other. 1) check return code of napi_complete_done to control interrupt enable 2) return the actual amount of work done. 3) return budget immediately if need NAPI poll again Tested the changes on e1000e with a high interrupt rate set, and it shows about an 8% reduction in the CPU utilization when busy polling because we aren't re-enabling interrupts when we're about to be polled. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Reviewed-by: Jacob Keller Signed-off-by: Jeff Kirsher commit 09e58b2d538cfd4fa3f48bc4fc78ba1c1b28b05a Author: Jesse Brandeburg Date: Wed Nov 7 21:40:17 2018 -0800 docs-networking: fix typo in define The #define for NETIF_F_GSO_UDP_L4 was incorrect in the documentation, fix it by making it match the actual code. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 4df3c543a72585fdcac8fed9547d2ce395729221 Author: Joe Perches Date: Thu Nov 1 00:03:31 2018 -0700 igb: Fix format with line continuation whitespace The line continuation unintentionally adds whitespace so instead use a coalesced format to remove the whitespace. Miscellanea: o Use a more typical style for ternaries and arguments for this logging message Signed-off-by: Joe Perches Tested-by: Aaron Brown Acked-by: Vinicius Costa Gomes Signed-off-by: Jeff Kirsher commit b3c4d7c93e45f2cb9265c40e874c7ea56828d8df Author: Shannon Nelson Date: Mon Oct 29 15:54:12 2018 -0700 ixgbe: add ipsec hw offload note to ixgbe Documentation Add a short note about using IPsec Hardware Offload with the ixgbe driver. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cbb72a3c19eff0ea3ccb0b068eca189063c86174 Author: Hoan Tran Date: Wed Nov 7 19:40:58 2018 +0000 drivers/perf: xgene: Add CPU hotplug support If the CPU assigned to the xgene PMU is taken offline, then subsequent perf invocations on the PMU will fail: # echo 0 > /sys/devices/system/cpu/cpu0/online # perf stat -a -e l3c0/cycle-count/,l3c0/write/ sleep 1 Error: The sys_perf_event_open() syscall returned with 19 (No such device) for event (l3c0/cycle-count/). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? This patch implements a hotplug notifier in the xgene PMU driver so that the PMU context is migrated to another online CPU should its assigned CPU disappear. Acked-by: Mark Rutland Signed-off-by: Hoan Tran [will: Made naming of new cpuhp_state enum entry consistent] Signed-off-by: Will Deacon commit aa6a65daca110df41ac0224bea1198dc97fd6695 Author: Chris Wilson Date: Wed Nov 21 15:16:53 2018 +0000 drm/i915: Show waiter's status on engine dump When showing the list of waiters, include the task's status so that we can tell if they have been woken up and are waiting for the CPU, or if they are still waiting to be woken. v2: task_state_to_char() Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181121151653.24595-1-chris@chris-wilson.co.uk commit d47d77c3f008d3cf02c6ce92ef4f6e32ca270351 Author: Davidlohr Bueso Date: Fri Nov 9 13:07:19 2018 -0800 perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h Both futex and epoll need this call, and can cause build failure on systems that don't have it pthread_attr_setaffinity_np(). Signed-off-by: Davidlohr Bueso Reported-by: Arnaldo Carvalho de Melo Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jason Baron Link: http://lkml.kernel.org/r/20181109210719.pr7ohayuwqmfp2wl@linux-r8p5 Signed-off-by: Arnaldo Carvalho de Melo commit 9add8fe8e6f63db47e40e65173530dcb68cd7a07 Author: Milian Wolff Date: Wed Nov 7 23:34:37 2018 +0100 perf script: Share code and output format for uregs and iregs output The iregs output was missing the newline at end as well as the leading ABI output. This made it hard to compare the iregs and uregs values. Instead, use a single function to output the register values and use it for both, iregs and uregs, to ensure the output is consistent. Before: perf 7049 [-01] 1343.354347: 1 cycles:ppp: ffffffffa7bc21ce perf_event_exec+0x18e (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7ead3 setup_new_exec+0xf3 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7cd7be5 load_elf_binary+0x395 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7e540 search_binary_handler+0x80 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f1aa __do_execve_file.isra.13+0x58a (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f561 do_execve+0x21 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f596 __x64_sys_execve+0x26 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7a041cb do_syscall_64+0x5b (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa840008c entry_SYSCALL_64+0x7c (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) AX:0x80000000 BX:0x0 CX:0x0 DX:0x7 SI:0xf DI:0x286 BP:0xffff95bc8213a460 SP:0xffffacbf0ba97d18 IP:0xffffffffa7bc21cd FLAGS:0x28e CS:0x10 SS:0x18 R8:0x2 R9:0x21440 R10:0x33816fb3b8c R11:0x1 R12:0xffff95bc8213a460 R13:0xffff95bc8213a400 R14:0xffff95bc8213a400 R15:0x1 ABI:2 AX:0xffffffffffffffda BX:0xffffffffffffffff CX:0x7f84ad85798b DX:0x560209699d50 SI:0x7ffe2c7a6820 DI:0x7ffe2c7a8c9b BP:0x7ffe2c7a20d0 SP:0x7ffe2c7a2058 IP:0x7f84ad85798b FLAGS:0x206 CS:0x33 SS:0x2b R8:0x7ffe2c7a2030 R9:0x7f84ae55f010 R10:0x8 R11:0x206 R12:0xffffffffffffffff R13:0xffffffffffffffff R14:0xffffffffffffffff R15:0xffffffffffffffff perf 7049 [-01] 1343.354363: 1 cycles:ppp: ... After: perf 7049 [-01] 1343.354347: 1 cycles:ppp: ffffffffa7bc21ce perf_event_exec+0x18e (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7ead3 setup_new_exec+0xf3 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7cd7be5 load_elf_binary+0x395 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7e540 search_binary_handler+0x80 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f1aa __do_execve_file.isra.13+0x58a (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f561 do_execve+0x21 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7c7f596 __x64_sys_execve+0x26 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa7a041cb do_syscall_64+0x5b (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ffffffffa840008c entry_SYSCALL_64+0x7c (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) ABI:2 AX:0x80000000 BX:0x0 CX:0x0 DX:0x7 SI:0xf DI:0x286 BP:0xffff95bc8213a460 SP:0xffffacbf0ba97d18 IP:0xffffffffa7bc21cd FLAGS:0x28e CS:0x10 SS:0x18 R8:0x2 R9:0x21440 R10:0x33816fb3b8c R11:0x1 R12:0xffff95bc8213a460 R13:0xffff95bc8213a400 R14:0xffff95bc8213a400 R15:0x1 ABI:2 AX:0xffffffffffffffda BX:0xffffffffffffffff CX:0x7f84ad85798b DX:0x560209699d50 SI:0x7ffe2c7a6820 DI:0x7ffe2c7a8c9b BP:0x7ffe2c7a20d0 SP:0x7ffe2c7a2058 IP:0x7f84ad85798b FLAGS:0x206 CS:0x33 SS:0x2b R8:0x7ffe2c7a2030 R9:0x7f84ae55f010 R10:0x8 R11:0x206 R12:0xffffffffffffffff R13:0xffffffffffffffff R14:0xffffffffffffffff R15:0xffffffffffffffff perf 7049 [-01] 1343.354363: 1 cycles:ppp: ... Signed-off-by: Milian Wolff Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20181107223437.9071-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit 0f7c2de5dd3f5c0ed9603e4ccfb6a3ddc55f46df Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 14:49:27 2018 -0300 perf bpf: Reduce the hardcoded .max_entries for pid_maps While working on augmented syscalls I got into this error: # trace -vv --filter-pids 2469,1663 -e tools/perf/examples/bpf/augmented_raw_syscalls.c sleep 1 libbpf: map 0 is "__augmented_syscalls__" libbpf: map 1 is "__bpf_stdout__" libbpf: map 2 is "pids_filtered" libbpf: map 3 is "syscalls" libbpf: collecting relocating info for: '.text' libbpf: relo for 13 value 84 name 133 libbpf: relocation: insn_idx=3 libbpf: relocation: find map 3 (pids_filtered) for insn 3 libbpf: collecting relocating info for: 'raw_syscalls:sys_enter' libbpf: relo for 8 value 0 name 0 libbpf: relocation: insn_idx=1 libbpf: relo for 8 value 0 name 0 libbpf: relocation: insn_idx=3 libbpf: relo for 9 value 28 name 178 libbpf: relocation: insn_idx=36 libbpf: relocation: find map 1 (__augmented_syscalls__) for insn 36 libbpf: collecting relocating info for: 'raw_syscalls:sys_exit' libbpf: relo for 8 value 0 name 0 libbpf: relocation: insn_idx=0 libbpf: relo for 8 value 0 name 0 libbpf: relocation: insn_idx=2 bpf: config program 'raw_syscalls:sys_enter' bpf: config program 'raw_syscalls:sys_exit' libbpf: create map __bpf_stdout__: fd=3 libbpf: create map __augmented_syscalls__: fd=4 libbpf: create map syscalls: fd=5 libbpf: create map pids_filtered: fd=6 libbpf: added 13 insn from .text to prog raw_syscalls:sys_enter libbpf: added 13 insn from .text to prog raw_syscalls:sys_exit libbpf: load bpf program failed: Operation not permitted libbpf: failed to load program 'raw_syscalls:sys_exit' libbpf: failed to load object 'tools/perf/examples/bpf/augmented_raw_syscalls.c' bpf: load objects failed: err=-4009: (Incorrect kernel version) event syntax error: 'tools/perf/examples/bpf/augmented_raw_syscalls.c' \___ Failed to load program for unknown reason (add -v to see detail) Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events If I then try to use strace (perf trace'ing 'perf trace' needs some more work before its possible) to get a bit more info I get: # strace -e bpf trace --filter-pids 2469,1663 -e tools/perf/examples/bpf/augmented_raw_syscalls.c sleep 1 bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size=4, value_size=4, max_entries=4, map_flags=0, inner_map_fd=0, map_name="__bpf_stdout__", map_ifindex=0}, 72) = 3 bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size=4, value_size=4, max_entries=4, map_flags=0, inner_map_fd=0, map_name="__augmented_sys", map_ifindex=0}, 72) = 4 bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=1, max_entries=500, map_flags=0, inner_map_fd=0, map_name="syscalls", map_ifindex=0}, 72) = 5 bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=4, value_size=1, max_entries=512, map_flags=0, inner_map_fd=0, map_name="pids_filtered", map_ifindex=0}, 72) = 6 bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_TRACEPOINT, insn_cnt=57, insns=0x1223f50, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(4, 18, 10), prog_flags=0, prog_name="sys_enter", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS}, 72) = 7 bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_TRACEPOINT, insn_cnt=18, insns=0x1224120, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(4, 18, 10), prog_flags=0, prog_name="sys_exit", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS}, 72) = -1 EPERM (Operation not permitted) bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_TRACEPOINT, insn_cnt=18, insns=0x1224120, license="GPL", log_level=1, log_size=262144, log_buf="", kern_version=KERNEL_VERSION(4, 18, 10), prog_flags=0, prog_name="sys_exit", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS}, 72) = -1 EPERM (Operation not permitted) bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_KPROBE, insn_cnt=18, insns=0x1224120, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(4, 18, 10), prog_flags=0, prog_name="sys_exit", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS}, 72) = -1 EPERM (Operation not permitted) event syntax error: 'tools/perf/examples/bpf/augmented_raw_syscalls.c' \___ Failed to load program for unknown reason # I managed to create the maps, etc, but then installing the "sys_exit" hook into the "raw_syscalls:sys_exit" tracepoint somehow gets -EPERMed... I then go and try reducing the size of this new table: +++ b/tools/perf/examples/bpf/augmented_raw_syscalls.c @@ -47,6 +47,17 @@ struct augmented_filename { #define SYS_OPEN 2 #define SYS_OPENAT 257 +struct syscall { + bool filtered; +}; + +struct bpf_map SEC("maps") syscalls = { + .type = BPF_MAP_TYPE_ARRAY, + .key_size = sizeof(int), + .value_size = sizeof(struct syscall), + .max_entries = 500, +}; And after reducing that .max_entries a tad, it works. So yeah, the "unknown reason" should be related to the number of bytes all this is taking, reduce the default for pid_map()s so that we can have a "syscalls" map with enough slots for all syscalls in most arches. And take notes about this error message, improve it :-) Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David Ahern Cc: Edward Cree Cc: Jiri Olsa Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Wang Nan Cc: Yonghong Song Link: https://lkml.kernel.org/n/tip-yjzhak8asumz9e9hts2dgplp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b07d16f7e9e4cf2562f61b5f68a4b0831fe5ef14 Author: Milian Wolff Date: Wed Nov 7 10:37:05 2018 +0100 perf script: Add newline after uregs output This change makes it much easier to easily distinguish between consecutive samples by keeping the empty line between them, like we see when we do not enable uregs output. Before: cpp-inlining 28298 [-01] 54837.342780: 3068085 cycles:pp: 7ffff7c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so) ... ABI:2 AX:0x0 BX:0x40f56cf6 CX:0x294a3ae7 ... cpp-inlining 28298 [-01] 54837.344493: 2881929 cycles:pp: 7ffff7c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so) ... ABI:2 AX:0x40d440c7 BX:0x40d440c7 CX:0x4d45e5da ... After: cpp-inlining 28298 [-01] 54837.342780: 3068085 cycles:pp: 7ffff7c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so) ... ABI:2 AX:0x0 BX:0x40f56cf6 CX:0x294a3ae7 ... cpp-inlining 28298 [-01] 54837.344493: 2881929 cycles:pp: 7ffff7c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so) ... ABI:2 AX:0x40d440c7 BX:0x40d440c7 CX:0x4d45e5da ... Signed-off-by: Milian Wolff Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181107093705.16346-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit 4aa792de0b136edbde777d3d69c6fe8cdd8cda72 Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 10:54:06 2018 -0300 Revert "perf augmented_syscalls: Drop 'write', 'poll' for testing without self pid filter" Now that we have the "filtered_pids" logic in place, no need to do this rough filter to avoid the feedback loop from 'perf trace's own syscalls, revert it. This reverts commit 7ed71f124284359676b6496ae7db724fee9da753. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-88vh02cnkam0vv5f9vp02o3h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e312747b49d382584aaa62398952832765e28f74 Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 10:09:41 2018 -0300 perf augmented_syscalls: Remove example hardcoded set of filtered pids Now that 'perf trace' fills in that "filtered_pids" BPF map, remove the set of filtered pids used as an example to test that feature. That feature works like this: Starting a system wide 'strace' like 'perf trace' augmented session we noticed that lots of events take place for a pid, which ends up being the feedback loop of perf trace's syscalls being processed by the 'gnome-terminal' process: # perf trace -e tools/perf/examples/bpf/augmented_raw_syscalls.c 0.391 ( 0.002 ms): gnome-terminal/2469 read(fd: 17, buf: 0x564b79f750bc, count: 8176) = 453 0.394 ( 0.001 ms): gnome-terminal/2469 read(fd: 17, buf: 0x564b79f75280, count: 7724) = -1 EAGAIN Resource temporarily unavailable 0.438 ( 0.001 ms): gnome-terminal/2469 read(fd: 4, buf: 0x7fffc696aeb0, count: 16) = 8 0.519 ( 0.001 ms): gnome-terminal/2469 read(fd: 17, buf: 0x564b79f75280, count: 7724) = 114 0.522 ( 0.001 ms): gnome-terminal/2469 read(fd: 17, buf: 0x564b79f752f1, count: 7611) = -1 EAGAIN Resource temporarily unavailable ^C So we can use --filter-pids to get rid of that one, and in this case what is being used to implement that functionality is that "filtered_pids" BPF map that the tools/perf/examples/bpf/augmented_raw_syscalls.c created and that 'perf trace' bpf loader noticed and created a "struct bpf_map" associated that then got populated by 'perf trace': # perf trace --filter-pids 2469 -e tools/perf/examples/bpf/augmented_raw_syscalls.c 0.020 ( 0.002 ms): gnome-shell/1663 epoll_pwait(epfd: 12, events: 0x7ffd8f3ef960, maxevents: 32, sigsetsize: 8) = 1 0.025 ( 0.002 ms): gnome-shell/1663 read(fd: 24, buf: 0x560c01bb8240, count: 8112) = 48 0.029 ( 0.001 ms): gnome-shell/1663 read(fd: 24, buf: 0x560c01bb8258, count: 8088) = -1 EAGAIN Resource temporarily unavailable 0.032 ( 0.001 ms): gnome-shell/1663 read(fd: 24, buf: 0x560c01bb8240, count: 8112) = -1 EAGAIN Resource temporarily unavailable 0.040 ( 0.003 ms): gnome-shell/1663 recvmsg(fd: 46, msg: 0x7ffd8f3ef950) = -1 EAGAIN Resource temporarily unavailable 21.529 ( 0.002 ms): gnome-shell/1663 epoll_pwait(epfd: 5, events: 0x7ffd8f3ef960, maxevents: 32, sigsetsize: 8) = 1 21.533 ( 0.004 ms): gnome-shell/1663 recvmsg(fd: 82, msg: 0x7ffd8f3ef7b0, flags: DONTWAIT|CMSG_CLOEXEC) = 236 21.581 ( 0.006 ms): gnome-shell/1663 ioctl(fd: 8, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffd8f3ef060) = 0 21.605 ( 0.020 ms): gnome-shell/1663 ioctl(fd: 8, cmd: DRM_I915_GEM_CREATE, arg: 0x7ffd8f3eeea0) = 0 21.626 ( 0.119 ms): gnome-shell/1663 ioctl(fd: 8, cmd: DRM_I915_GEM_SET_DOMAIN, arg: 0x7ffd8f3eee94) = 0 21.746 ( 0.081 ms): gnome-shell/1663 ioctl(fd: 8, cmd: DRM_I915_GEM_PWRITE, arg: 0x7ffd8f3eeea0) = 0 ^C Oops, yet another gnome process that is involved with the output that 'perf trace' generates, lets filter that out too: # perf trace --filter-pids 2469,1663 -e tools/perf/examples/bpf/augmented_raw_syscalls.c ? ( ): wpa_supplicant/1366 ... [continued]: select()) = 0 Timeout 0.006 ( 0.002 ms): wpa_supplicant/1366 clock_gettime(which_clock: BOOTTIME, tp: 0x7fffe5b1e430) = 0 0.011 ( 0.001 ms): wpa_supplicant/1366 clock_gettime(which_clock: BOOTTIME, tp: 0x7fffe5b1e3e0) = 0 0.014 ( 0.001 ms): wpa_supplicant/1366 clock_gettime(which_clock: BOOTTIME, tp: 0x7fffe5b1e430) = 0 ? ( ): gmain/1791 ... [continued]: poll()) = 0 Timeout 0.017 ( ): wpa_supplicant/1366 select(n: 6, inp: 0x55646fed3ad0, outp: 0x55646fed3b60, exp: 0x55646fed3bf0, tvp: 0x7fffe5b1e4a0) ... 157.879 ( 0.019 ms): gmain/1791 inotify_add_watch(fd: 8, pathname: , mask: 16789454) = -1 ENOENT No such file or directory ? ( ): cupsd/1001 ... [continued]: epoll_pwait()) = 0 ? ( ): gsd-color/1908 ... [continued]: poll()) = 0 Timeout 499.615 ( ): cupsd/1001 epoll_pwait(epfd: 4, events: 0x557a21166500, maxevents: 4096, timeout: 1000, sigsetsize: 8) ... 586.593 ( 0.004 ms): gsd-color/1908 recvmsg(fd: 3, msg: 0x7ffdef34e800) = -1 EAGAIN Resource temporarily unavailable ? ( ): fwupd/2230 ... [continued]: poll()) = 0 Timeout ? ( ): rtkit-daemon/906 ... [continued]: poll()) = 0 Timeout ? ( ): rtkit-daemon/907 ... [continued]: poll()) = 1 724.603 ( 0.007 ms): rtkit-daemon/907 read(fd: 6, buf: 0x7f05ff768d08, count: 8) = 8 ? ( ): ssh/5461 ... [continued]: select()) = 1 810.431 ( 0.002 ms): ssh/5461 clock_gettime(which_clock: BOOTTIME, tp: 0x7ffd7f39f870) = 0 ^C Several syscall exit events for syscalls in flight when 'perf trace' started, etc. Saner :-) Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-c3tu5yg204p5mvr9kvwew07n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a9964c432bccb9222b6ac671324f73d629ff7ac9 Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 10:08:00 2018 -0300 perf trace: Fill in BPF "filtered_pids" map when present This makes the augmented_syscalls support the --filter-pids and auto-filtered feedback loop pids just like when working without BPF, i.e. with just raw_syscalls:sys_{enter,exit} and tracepoint filters. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zc5n453sxxm0tz1zfwwelyti@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 744fafc787deebf26a39e6b5be36026bb2ff65fb Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 10:04:51 2018 -0300 perf trace: See if there is a map named "filtered_pids" Lookup for the first map named "filtered_pids" and, if augmenting syscalls, i.e. if a BPF event is present and the "__augmented_syscalls__" is present, then fill in that map with the pids to filter, be it feedback loop ones (perf trace's pid, its father if it is "sshd", more auto-filtered in the future) or the ones explicitely stated in the tool command line via --filter-pids. The code to actually fill in the map comes next. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-rhzytmw7qpe6lqyjxi1ded9t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6a0b3abad9decb3c20e19baa3c442e1e5518546e Author: Arnaldo Carvalho de Melo Date: Wed Nov 7 09:38:49 2018 -0300 perf trace: Add "_from_option" suffix to trace__set_filter() As we'll need that name for a new function to set filters for both tracepoints and BPF maps for filtering pids. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-mdkck6hf3fnd21rz2766280q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7ad92a3371e1536a2dddf68337015569c4917170 Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 17:02:33 2018 -0300 perf evlist: Rename perf_evlist__set_filter* to perf_evlist__set_tp_filter* To better reflect that this is a tracepoint filter, as opposed, for instance to map based BPF filters. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-9138svli6ddcphrr3ymy9oy3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ed9a77ba7703f7da8f106d241cd0c734f8664b4d Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 16:09:06 2018 -0300 perf augmented_syscalls: Use pid_filter Just to test filtering a bunch of pids, now its time to go and get that hooked up in 'perf trace', right after we load the bpf program, if we find a "pids_filtered" map defined, we'll populate it with the filtered pids. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1i9s27wqqdhafk3fappow84x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 77ecb64050ff580963cbb8b8f1b02db91dc9efaf Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 16:01:26 2018 -0300 perf augmented_syscalls: Drop 'write', 'poll' for testing without self pid filter When testing system wide tracing without filtering the syscalls called by 'perf trace' itself we get into a feedback loop, drop for now those two syscalls, that are the ones that 'perf trace' does in its loop for writing the syscalls it intercepts, to help with testing till we get that filtering in place. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-rkbu536af66dbsfx51sr8yof@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8008aab0962ea68cc00d15e8d7b0637b48837a40 Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 15:50:36 2018 -0300 perf bpf: Add simple pid_filter class accessible to BPF proggies Will be used in the augmented_raw_syscalls.c to implement 'perf trace --filter-pids'. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-9sybmz4vchlbpqwx2am13h9e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 382b55dbef6b68e3fef2fd8a438fbaff57695308 Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 15:46:27 2018 -0300 perf bpf: Add defines for map insertion/lookup Starting with a helper for a basic pid_map(), a hash using a pid as a key. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-gdwvq53wltvq6b3g5tdmh0cw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 66067538e0425beca98e1bee55a357f3869a0e31 Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 15:26:46 2018 -0300 perf augmented_syscalls: Remove needless linux/socket.h include Leftover from when we started augmented_raw_syscalls.c from tools/perf/examples/bpf/augmented_syscalls. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: e58a0322dbac ("perf examples bpf: Start augmenting raw_syscalls:sys_{start,exit}") Link: https://lkml.kernel.org/n/tip-pmts9ls2skh8n3zisb4txudd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 55f127b43143363d000165c7cb72e4b95de1380d Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 15:23:40 2018 -0300 perf augmented_syscalls: Filter on a hard coded pid Just to show where we'll hook pid based filters, and what we use to obtain the current pid, using a BPF getpid() equivalent. Now we need to remove that hardcoded PID with a BPF hash map, so that we start by filtering 'perf trace's own PID, implement the --filter-pid functionality, etc. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-oshrcgcekiyhd0whwisxfvtv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1475d35c4a6174d4ec633b9af5713e9770b3ac0d Author: Arnaldo Carvalho de Melo Date: Tue Nov 6 15:21:45 2018 -0300 perf bpf: Add unistd.h to the headers accessible to bpf proggies Start with a getpid() function wrapping BPF_FUNC_get_current_pid_tgid, idea is to mimic the system headers. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zo8hv22onidep7tm785dzxfk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0987abcbeea4c87aef80a6138efc13ed0798fcf2 Author: Paul Walmsley Date: Wed Nov 14 16:56:01 2018 -0800 modpost: drop unused command line switches Drop modpost command line switches that are no longer used by makefile.modpost, upon request from Sam Ravnborg , who wrote: modpost is not supposed to be used outside the kernel build. [...] I checked if there were any options supported by modpost that was not configurable in Makefile.modpost. And I could see that the -M and -K options in getopt() were leftovers. The code that used these option was dropped in: commit a8773769d1a1 ("Kbuild: clear marker out of modpost") Could you add a patch that delete these on top of what you already have. https://lore.kernel.org/lkml/20181020140835.GA3351@ravnborg.org/ Suggested-by: Sam Ravnborg Signed-off-by: Paul Walmsley Signed-off-by: Paul Walmsley Acked-by: Sam Ravnborg Signed-off-by: Masahiro Yamada commit ff64dd4857303dd5550faed9fd598ac90f0f2238 Author: Brian Norris Date: Wed Nov 14 18:11:18 2018 -0800 scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks git-diff-index does not refresh the index for you, so using it for a "-dirty" check can give misleading results. Commit 6147b1cf19651 ("scripts/setlocalversion: git: Make -dirty check more robust") tried to fix this by switching to git-status, but it overlooked the fact that git-status also writes to the .git directory of the source tree, which is definitely not kosher for an out-of-tree (O=) build. That is getting reverted. Fortunately, git-status now supports avoiding writing to the index via the --no-optional-locks flag, as of git 2.14. It still calculates an up-to-date index, but it avoids writing it out to the .git directory. So, let's retry the solution from commit 6147b1cf19651 using this new flag first, and if it fails, we assume this is an older version of git and just use the old git-diff-index method. It's hairy to get the 'grep -vq' (inverted matching) correct by stashing the output of git-status (you have to be careful about the difference betwen "empty stdin" and "blank line on stdin"), so just pipe the output directly to grep and use a regex that's good enough for both the git-status and git-diff-index version. Cc: Christian Kujau Cc: Guenter Roeck Suggested-by: Alexander Kapshuk Signed-off-by: Brian Norris Tested-by: Genki Sky Signed-off-by: Masahiro Yamada commit 5818c683a619c534c113e1f66d24f636defc29bc Author: Sami Tolvanen Date: Tue Oct 23 15:15:35 2018 -0700 modpost: validate symbol names also in find_elf_symbol If an ARM mapping symbol shares an address with a valid symbol, find_elf_symbol can currently return the mapping symbol instead, as the symbol is not validated. This can result in confusing warnings: WARNING: vmlinux.o(.text+0x18f4028): Section mismatch in reference from the function set_reset_devices() to the variable .init.text:$x.0 This change adds a call to is_valid_name to find_elf_symbol, similarly to how it's already used in find_elf_symbol2. Signed-off-by: Sami Tolvanen Signed-off-by: Masahiro Yamada commit aeed35faee5261e6e93d51192923b7a7c3c4dab5 Author: Daniel M. Lambea Date: Sun Nov 18 14:42:55 2018 +0000 HID: cougar: Add support for Cougar 700K Gaming Keyboard Add USB ID 060b:700a to the list of valid USB IDS for the cougar hid driver. Signed-off-by: Daniel M. Lambea Signed-off-by: Benjamin Tissoires commit 502b431cda801645fd73857f7b47a4666de3cb62 Author: Stefan Wahren Date: Mon Oct 22 22:26:24 2018 +0200 firmware: raspberrypi: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Eric Anholt Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt commit 33404f3f10beaf0d69d8765f5804b6fb3b305f0f Author: Kuninori Morimoto Date: Wed Nov 21 02:11:13 2018 +0000 ASoC: simple_card_utils: remove "option" from asoc_simple_card_of_parse_routing() asoc_simple_card_of_parse_routing() had "option" parameter to consider error handling, but it is very pointless parameter. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit a48bf02b35d9325eedb56ab531038511695a2734 Author: Kuninori Morimoto Date: Wed Nov 21 02:10:51 2018 +0000 ASoC: simple-card-utils: tidyup asoc_simple_card_parse_convert() Current simple-card-utils has asoc_simple_card_parse_convert() to parse convert channel/rate for be_hw_params_fixup. But, it is parsing from top of node. If sound card had multi subnode, we need to parse it from each sub node. This patch tidyup asoc_simple_card_parse_convert() to allow parsing settings from each node. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit f31a17105560f5f074f4d26fd5469a221f50af18 Author: Kuninori Morimoto Date: Wed Nov 21 02:09:16 2018 +0000 ASoC: simple-card-utils: accept NULL parameter on asoc_simple_card_xxx() If simple-card-utils accept NULL pointer on asoc_simple_card_xxx(), each driver code will be more simple. Let's accept NULL pointer. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c0f4697c5dbca0c9bdd1264bcf2d7c5d15a14f67 Author: Kuninori Morimoto Date: Wed Nov 21 02:08:59 2018 +0000 ASoC: simple-card-utils: remove asoc_simple_card_clk_register() asoc_simple_card_clk_register() is used but only 1 user, and very pointless code. Let's remove it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 0ade2ccfb81244d0a271a5f9917f9fccc349b6cf Author: Kuninori Morimoto Date: Wed Nov 21 08:15:30 2018 +0000 ASoC: rsnd: makes rsnd_ssi_is_dma_mode() static ssi.c only is using rsnd_ssi_is_dma_mode(). Let's move it as static function. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 331e875432ecfb651d9335a18149160c307429ab Author: Kuninori Morimoto Date: Wed Nov 21 01:58:30 2018 +0000 ASoC: rsnd: tidyup rsnd_parse_connect_ssiu_compatible() rsnd_parse_connect_ssiu_compatible() is doing - using rsnd_ssiu_id(), but we use it via rsnd_mod_id() - we can break loop if rsnd_dai_connect() was called This patch fixup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit f6c2d6026afe2f1e611bdec270e1f42af0a42f06 Author: Hiroyuki Yokoyama Date: Wed Nov 21 01:06:43 2018 +0000 ASoC: rsnd: Add device tree support for r8a77995 Simply document new compat strings. There appears to be no need for a driver updates. Signed-off-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 992e75b3c80952fc60946458c75e1bf609e86aa2 Author: Rohit kumar Date: Fri Nov 16 13:11:58 2018 +0530 ASoC: sdm845: Add support for Secondary MI2S interface Add support to configure bit clock for secondary MI2S TX interface. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit a1849b7dd30a07654b53f3599cc8f028afeb5d9f Author: Rohit kumar Date: Fri Nov 16 13:11:57 2018 +0530 ASoC: sdm845: Update slot_width for Quaternary TDM port Change slot_width for quaternary TDM port to 16 and update bclk rate for TDM and MI2S interfaces accordingly. Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown commit 472dc9fa7cc0769321d91b55eed4e21e2ab86632 Author: Jeremy Linton Date: Fri Oct 12 14:24:09 2018 -0500 perf: arm_spe: Enable automatic DT loading When built as a module, the spe driver isn't automatically loaded on DT systems. Add the MODULE_DEVICE_TABLE entry. Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon commit 81e9fa8bab381f8b6eb04df7cdf0f71994099bd4 Author: Anders Roxell Date: Wed Oct 17 17:26:22 2018 +0200 arm64: perf: set suppress_bind_attrs flag to true The armv8_pmuv3 driver doesn't have a remove function, and when the test 'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled, the following Call trace can be seen. [ 1.424287] Failed to register pmu: armv8_pmuv3, reason -17 [ 1.424870] WARNING: CPU: 0 PID: 1 at ../kernel/events/core.c:11771 perf_event_sysfs_init+0x98/0xdc [ 1.425220] Modules linked in: [ 1.425531] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.19.0-rc7-next-20181012-00003-ge7a97b1ad77b-dirty #35 [ 1.425951] Hardware name: linux,dummy-virt (DT) [ 1.426212] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 1.426458] pc : perf_event_sysfs_init+0x98/0xdc [ 1.426720] lr : perf_event_sysfs_init+0x98/0xdc [ 1.426908] sp : ffff00000804bd50 [ 1.427077] x29: ffff00000804bd50 x28: ffff00000934e078 [ 1.427429] x27: ffff000009546000 x26: 0000000000000007 [ 1.427757] x25: ffff000009280710 x24: 00000000ffffffef [ 1.428086] x23: ffff000009408000 x22: 0000000000000000 [ 1.428415] x21: ffff000009136008 x20: ffff000009408730 [ 1.428744] x19: ffff80007b20b400 x18: 000000000000000a [ 1.429075] x17: 0000000000000000 x16: 0000000000000000 [ 1.429418] x15: 0000000000000400 x14: 2e79726f74636572 [ 1.429748] x13: 696420656d617320 x12: 656874206e692065 [ 1.430060] x11: 6d616e20656d6173 x10: 2065687420687469 [ 1.430335] x9 : ffff00000804bd50 x8 : 206e6f7361657220 [ 1.430610] x7 : 2c3376756d705f38 x6 : ffff00000954d7ce [ 1.430880] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.431226] x3 : 0000000000000000 x2 : ffffffffffffffff [ 1.431554] x1 : 4d151327adc50b00 x0 : 0000000000000000 [ 1.431868] Call trace: [ 1.432102] perf_event_sysfs_init+0x98/0xdc [ 1.432382] do_one_initcall+0x6c/0x1a8 [ 1.432637] kernel_init_freeable+0x1bc/0x280 [ 1.432905] kernel_init+0x18/0x160 [ 1.433115] ret_from_fork+0x10/0x18 [ 1.433297] ---[ end trace 27fd415390eb9883 ]--- Rework to set suppress_bind_attrs flag to avoid removing the device when CONFIG_DEBUG_TEST_DRIVER_REMOVE=y, since there's no real reason to remove the armv8_pmuv3 driver. Cc: Arnd Bergmann Co-developed-by: Arnd Bergmann Signed-off-by: Anders Roxell Signed-off-by: Will Deacon commit e2b5c5c7de79605f6317bfbd20ecabfaf1aec821 Author: Shaokun Zhang Date: Sat Oct 6 15:57:38 2018 +0800 arm64: perf: Fix typos in comment Fix up one typos: Onl -> Only Cc: Will Deacon Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon commit 2ddd5e58252669a96018719adf60f7d078dc8a95 Author: Will Deacon Date: Fri Oct 5 13:33:02 2018 +0100 arm64: perf: Hook up new events There have been some additional events added to the PMU architecture since Armv8.0, so expose them via our sysfs infrastructure. Signed-off-by: Will Deacon commit 4b47e573a4a4f462b619fe623f6dab5c723c2f27 Author: Will Deacon Date: Fri Oct 5 13:31:10 2018 +0100 arm64: perf: Move event definitions into perf_event.h The PMU event numbers are split between perf_event.h and perf_event.c, which makes it difficult to spot any gaps in the numbers which may be allocated in the future. This patch sorts the events numerically, adds some missing events and moves the definitions into perf_event.h. Signed-off-by: Will Deacon commit cf7175ece01741317e1ea07609d0ec0dcbc9c31a Author: Will Deacon Date: Fri Oct 5 13:28:57 2018 +0100 arm64: perf: Remove duplicate generic cache events We cannot distinguish reads from writes in our generic cache events, so drop the WRITE entries and leave the READ entries pointing to the combined read/write events, as is done by other CPUs and architectures. Reported-by: Ganapatrao Kulkarni Signed-off-by: Will Deacon commit 342e53bd8548e07c6a734d2d3a6437ad6e6d3b09 Author: Will Deacon Date: Fri Oct 5 13:28:07 2018 +0100 arm64: perf: Add support for Armv8.1 PMCEID register format Armv8.1 allocated the upper 32-bits of the PMCEID registers to describe the common architectural and microarchitecture events beginning at 0x4000. Add support for these registers to our probing code, so that we can advertise the SPE events when they are supported by the CPU. Signed-off-by: Will Deacon commit d3adeed7289220fdc78ee4400efbcd4cf1556215 Author: Will Deacon Date: Fri Oct 5 13:26:21 2018 +0100 arm64: perf: Terminate PMU assignment statements with semicolons As a hangover from when this code used a designated initialiser, we've been using commas to terminate the arm_pmu field assignments. Whilst harmless, it's also weird, so replace them with semicolons instead. Signed-off-by: Will Deacon commit 1db4909e76f64a85f4aaa187f0f683f5c85a471d Author: Ming Lei Date: Tue Nov 20 09:44:35 2018 +0800 blk-mq: not embed .mq_kobj and ctx->kobj into queue instance Even though .mq_kobj, ctx->kobj and q->kobj share same lifetime from block layer's view, actually they don't because userspace may grab one kobject anytime via sysfs. This patch fixes the issue by the following approach: 1) introduce 'struct blk_mq_ctxs' for holding .mq_kobj and managing all ctxs 2) free all allocated ctxs and the 'blk_mq_ctxs' instance in release handler of .mq_kobj 3) grab one ref of .mq_kobj before initializing each ctx->kobj, so that .mq_kobj is always released after all ctxs are freed. This patch fixes kernel panic issue during booting when DEBUG_KOBJECT_RELEASE is enabled. Reported-by: Guenter Roeck Cc: "jianchao.wang" Tested-by: Guenter Roeck Reviewed-by: Greg Kroah-Hartman Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 466affa06703d5668b06b25fe34942a784506b62 Author: Charles Keepax Date: Wed Nov 21 10:13:16 2018 +0000 regulator: wm8994: Don't use devres for enable GPIOs The regulator core takes over managing the lifetime of the enable GPIO once the regulator is registered. As such we shouldn't register the enable GPIO using devm, or it will be freed twice. Reported-by: Marek Szyprowski Signed-off-by: Charles Keepax Tested-by: Marek Szyprowski Signed-off-by: Mark Brown commit f43348a3db89305bb1935da9fe4499fdcdde9796 Author: Ville Syrjälä Date: Tue Nov 20 15:54:50 2018 +0200 drm/i915: Add rotation readout for plane initial config If we need to force a full plane update before userspace/fbdev have given us a proper plane state we should try to maintain the current plane state as much as possible (apart from the parts of the state we're trying to fix up with the plane update). To that end add basic readout for the plane rotation and maintain it during the initial fb takeover. Cc: Hans de Goede Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181120135450.3634-2-ville.syrjala@linux.intel.com Tested-by: Hans de Goede Reviewed-by: Rodrigo Vivi Reviewed-by: Maarten Lankhorst commit fa6af5145b4e87a30a530be0d80734a9dd40da77 Author: Ville Syrjälä Date: Tue Nov 20 15:54:49 2018 +0200 drm/i915: Force a LUT update in intel_initial_commit() If we force a plane update to fix up our half populated plane state we'll also force on the pipe gamma for the plane (since we always enable pipe gamma currently). If the BIOS hasn't programmed a sensible LUT into the hardware this will cause the image to become corrupted. Typical symptoms are a purple/yellow/etc. flash when the driver loads. To avoid this let's program something sensible into the LUT when we do the plane update. In the future I plan to add proper plane gamma enable readout so this is just a temporary measure. Cc: Hans de Goede Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181120135450.3634-1-ville.syrjala@linux.intel.com Tested-by: Hans de Goede Reviewed-by: Rodrigo Vivi commit 8f19b401a6fc6d1262c5bfbfc18146c5e8ecb491 Author: Imre Deak Date: Mon Nov 19 20:00:21 2018 +0200 drm/i915: Make CHICKEN_TRANS reg not depend on enum value Depending on the transcoder enum values to translate from transcoder to the corresponding CHICKEN_TRANS register can easily break if we add a new transcoder. Add an explicit mapping instead, by using helpers to look up the register instance either by transcoder or port (since unconveniently the registers have both port and transcoder specific bits). While at it also check for the correctness of GEN, port, transcoder. I wasn't sure if psr2_enabled can only be set for GEN9+, but that seems to be the case indeed (see setting of sink_psr2_support in intel_psr_init_dpcd()). v2 (Ville): - Make gen9_chicken_trans_reg() internal to intel_psr.c. - s/trans/cpu_transcoder/ Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181119180021.370-1-imre.deak@intel.com commit 8f78df90d84acd7a0b22c2b44a258421063a972f Author: Imre Deak Date: Tue Nov 20 11:23:25 2018 +0200 drm/i915: Add code comment on assumption of pipe==transcoder Add a comment to the pipe and transcoder enum definitions about our assumption in the code about enum values for pipes and transcoders with a 1:1 transcoder -> pipe mapping. v2: - Clarify more what are the assumptions about the enum values. (Ville) v3: (Lucas) - s/->/ -> / so it looks less like pointer dereferencing. - Use pipe enums as initializers in the transcoder enum definition. Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä (v2) Link: https://patchwork.freedesktop.org/patch/msgid/20181120092325.21249-3-imre.deak@intel.com commit c0871805ce1c716889c02450e507b420cb5e6d26 Author: Imre Deak Date: Tue Nov 20 11:23:24 2018 +0200 drm/i915: Make EDP PSR flags not depend on enum values Depending on the transcoder enum values to translate from transcoder to EDP PSR flags can easily break if we add a new transcoder. So remove the dependency by using an explicit mapping. While at it also add a WARN for unexpected trancoders. v2: - Simplify things by defining flag shift values instead of indices. - s/trans/cpu_transcoder/ (Ville) v3: - Define flags to look like separate bits instead of the values of the same bitfield. (Ville) Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181120092325.21249-2-imre.deak@intel.com commit 931f54920ba82427b2b9371e8d357b15853b1c15 Author: Imre Deak Date: Tue Nov 20 11:23:23 2018 +0200 drm/i915: Make pipe/transcoder offsets not depend on enum values Depending on the transcoder enum values to translate from transcoder to pipe/transcoder register addresses can easily break if we add a new transcoder. So remove the dependency by using named initializers. Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181120092325.21249-1-imre.deak@intel.com commit d8007306f6ad18f2ba0dcad68ffe9b2fd1d56bfb Author: Peter Rosin Date: Tue Nov 20 21:20:43 2018 +0000 ARM: dts: at91: nattis: initialize the BLON pin as output-low early The pwm-backlight driver initializes BLON (the enable gpio) to output-high if the gpio is input on probe. Initializing the gpio to output-low before the driver probes prevents this action by the pwm-backlight driver and gets rid of a nasty blink of full backlight with an uninitialized panel. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni commit 42843dc2d536afb5bb1b318b48f3f22b485f0dec Author: Koen Kooi Date: Mon Nov 19 11:02:39 2018 +0100 drm/meson: Add implicit fencing support for primary and overlay planes Suggested by Qiang Yu to fix tearing artefacts in the Kodi GUI. Suggested-by: Qiang Yu Signed-off-by: Koen Kooi Acked-by: Neil Armstrong [narmstrong: added Suggested-by tag] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1542621759-26413-1-git-send-email-koen@dominion.thruhere.net commit b4b01b4995fb15b55a2d067eb405917f5ab32709 Author: Gerd Hoffmann Date: Tue Oct 30 07:32:06 2018 +0100 drm/virtio: add edid support linux guest driver implementation of the VIRTIO_GPU_F_EDID feature. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20181030063206.19528-3-kraxel@redhat.com commit 610c0c2b2813c36dc16838bbdbba4c29f8680dde Author: Gerd Hoffmann Date: Tue Oct 30 07:32:05 2018 +0100 virtio-gpu: add VIRTIO_GPU_F_EDID feature The feature allows the guest request an EDID blob (describing monitor capabilities) for a given scanout (aka virtual monitor connector). It brings a new command message, which has just a scanout field (beside the standard virtio-gpu header) and a response message which carries the EDID data. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181030063206.19528-2-kraxel@redhat.com commit 0a4499dfbf8080fcb0a5ead3f3b83d41b8e8ec2d Author: Alexandre Belloni Date: Mon Sep 10 22:02:41 2018 +0200 ARM: dts: at91: at91sam9rl: switch to new clock bindings Switch at91sam9rl boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit 6cf8f828ef08c1044938bdcdbbe7e95a75405018 Author: Alexandre Belloni Date: Mon Jul 16 11:24:17 2018 +0200 ARM: dts: at91: at91sam9x5: switch to new clock bindings Switch at91sam9x5 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit 7f2fbc1e40a97ad810127247ad41e9afd7380bef Author: Alexandre Belloni Date: Tue Aug 21 18:12:08 2018 +0200 ARM: dts: at91: at91sam9263: switch to new clock bindings Switch at91sam9263 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit 7637d42cb18338fcc93b112a641d3ee77271d44d Author: Alexandre Belloni Date: Wed Aug 22 21:42:51 2018 +0200 ARM: dts: at91: at91sam9261: switch to new clock bindings Switch at91sam9261 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit e239e06004118aac16d0f3a7b2fd53bfa5896786 Author: Alexandre Belloni Date: Thu Aug 16 18:29:20 2018 +0200 ARM: dts: at91: at91sam9260: switch to new clock bindings Switch at91sam9260 and at91sam9g20 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit b60557876849767bad580856d3a7ec0e06d5a6bc Author: Alexandre Belloni Date: Tue Jun 12 20:02:52 2018 +0200 ARM: dts: at91: sama5d2: switch to new clock binding Switch sama5d2 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit dcfc827d4449e5c05dce181d8a758b968cc27791 Author: Alexandre Belloni Date: Fri Jun 8 13:27:30 2018 +0200 ARM: dts: at91: sama5d4: switch to new clock bindings Switch sama5d4 boards to the new PMC clock bindings. Signed-off-by: Alexandre Belloni commit 55db8ac68d38755d631cffdc4c6cf7d68a63decc Author: Takeshi Kihara Date: Wed Nov 21 00:32:52 2018 +0100 arm64: dts: renesas: r8a77965: Add CAN and CANFD controller nodes This patch adds CAN{0,1} and CANFD controller nodes for the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Signed-off-by: Simon Horman commit 3c64ea8c98eeb28707ce901c313b6c1e490b27b2 Author: Alexandre Belloni Date: Tue Nov 20 16:14:15 2018 +0100 drm/i915: fix spelling mistake "reserverd" -> "reserved" Fix a spelling mistake in a comment. Signed-off-by: Alexandre Belloni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181120151415.32419-1-alexandre.belloni@bootlin.com commit 0081cdfe63f0b5e72b14d13f45a93ca7b0b8092f Author: Christophe Fergeau Date: Tue Nov 20 17:20:04 2018 +0100 qxl: Make sure qxl_cursor memory is pinned QEMU keeps a vram reference to the last QXLCursorCmd it received. This QXLCursorCmd command points to a QXLCursor instance (stored in vram too). However, while the QXLCursorCmd memory is pinned, the QXLCursor memory is not. When booting a recent Fedora to its login screen while monitoring the QXLCursorCmd QEMU holds, it's possible to see the QXLCursor memory becoming invalid shortly after boot. Pinning that memory ensures that that QXLCursor memory is not going to be moved by the guest kernel. Moving the pin/unpin to qxl_release_list_add()/qxl_release_free_list() would be a more generic fix. However, doing this quickly exhausts QXL video memory, so more fixing would be needed before this is workable. Signed-off-by: Christophe Fergeau Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-3-cfergeau@redhat.com Signed-off-by: Gerd Hoffmann commit 545592fb3ddbf762001f3fa59f1464f73c3c3360 Author: Christophe Fergeau Date: Tue Nov 20 17:20:03 2018 +0100 qxl: Remove unused qxl_bo_pin arguments The 'domain' argument to qxl_bo_pin is redundant with 'bo', and 'gpu_addr' is unused, so we can remove both. Signed-off-by: Christophe Fergeau Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-2-cfergeau@redhat.com Signed-off-by: Gerd Hoffmann commit 76a57db4a867ade779fbe292112cb6d7f0762e4e Author: Christophe Fergeau Date: Tue Nov 20 17:20:02 2018 +0100 qxl: No need for NULL check before calling qxl_bo_unref() qxl_bo_unref() is already performing a NULL check. Signed-off-by: Christophe Fergeau Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-1-cfergeau@redhat.com Signed-off-by: Gerd Hoffmann commit a071a8ff1f5fd4aa6897c9260be548029b3acaff Author: YueHaibing Date: Thu Nov 15 12:10:36 2018 +0000 drm/cirrus: Remove set but not used variable 'bo' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/cirrus/cirrus_fbdev.c: In function 'cirrusfb_create': drivers/gpu/drm/cirrus/cirrus_fbdev.c:172:20: warning: variable 'bo' set but not used [-Wunused-but-set-variable] It never used since introduction in commit f9aa76a85248 ("drm/kms: driver for virtual cirrus under qemu") Signed-off-by: YueHaibing Link: http://patchwork.freedesktop.org/patch/msgid/1542283836-152176-1-git-send-email-yuehaibing@huawei.com Signed-off-by: Gerd Hoffmann commit af84c0030b298e307889554439b73593968132e2 Author: Paul Burton Date: Wed Nov 21 00:58:31 2018 +0000 MIPS: Regenerate defconfigs A couple of patches have come up recently to remove particular instances of obsolete Kconfig symbols from defconfigs. Rather than doing this piecemeal, simply regenerate them all. Signed-off-by: Paul Burton References: https://patchwork.linux-mips.org/patch/19635/ References: https://patchwork.linux-mips.org/patch/21156/ Patchwork: https://patchwork.linux-mips.org/patch/21184/ Cc: Anders Roxell Cc: Krzysztof Kozlowski Cc: linux-mips@linux-mips.org commit 0b0037490f379b4a9515391967ce1c17d8ef2e14 Author: Paul Burton Date: Tue Nov 20 23:59:56 2018 +0000 MIPS: malta: Use img-ascii-lcd driver for LCD display Remove the Malta display platform code in favour of probing the img-ascii-lcd driver via device tree. This reduces the amount of platform code & the img-ascii-lcd driver offers us advantages in terms of code sharing with other boards & functionality such as changing the displayed message via sysfs. Defconfigs are untouched because the driver already defaults y on when CONFIG_MIPS_MALTA=y. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21182/ Cc: linux-mips@linux-mips.org commit 3cd640832894b85b5929d5bda74505452c800421 Author: Paul Burton Date: Tue Nov 20 20:41:05 2018 +0000 MIPS: ptrace: introduce NT_MIPS_MSA regset The current methods for obtaining FP context via ptrace only provide either 32 or 64 bits per data register. With MSA, where vector registers are aliased with scalar FP data registers, those registers are 128 bits wide. Thus a new mechanism is required for userland to access those registers via ptrace. This patch introduces an NT_MIPS_MSA regset which provides, in this order: - The full 128 bits value of each vector register, in native endianness saved as though elements are doubles. That is, the format of each vector register is as would be obtained by saving it to memory using an st.d instruction. - The 32 bit scalar FP implementation register (FIR). - The 32 bit scalar FP control & status register (FCSR). - The 32 bit MSA implementation register (MSAIR). - The 32 bit MSA control & status register (MSACSR). The provision of the FIR & FCSR registers in addition to the MSA equivalents allows scalar FP context to be retrieved as a subset of the context available via this regset. Along with the MSA equivalents they also nicely form the final 128 bit "register" of the regset. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21180/ Cc: linux-mips@linux-mips.org commit bec0de4cfad21bd284dbddee016ed1767a5d2823 Author: Huacai Chen Date: Thu Nov 15 15:53:56 2018 +0800 MIPS: Align kernel load address to 64KB KEXEC needs the new kernel's load address to be aligned on a page boundary (see sanity_check_segment_list()), but on MIPS the default vmlinuz load address is only explicitly aligned to 16 bytes. Since the largest PAGE_SIZE supported by MIPS kernels is 64KB, increase the alignment calculated by calc_vmlinuz_load_addr to 64KB. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21131/ Cc: Ralf Baechle Cc: James Hogan Cc: Steven J . Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: # 2.6.36+ commit 92aa0718c9fa5160ad2f0e7b5bffb52f1ea1e51a Author: Huacai Chen Date: Thu Nov 15 15:53:54 2018 +0800 MIPS: Ensure pmd_present() returns false after pmd_mknotpresent() This patch is borrowed from ARM64 to ensure pmd_present() returns false after pmd_mknotpresent(). This is needed for THP. References: 5bb1cc0ff9a6 ("arm64: Ensure pmd_present() returns false after pmd_mknotpresent()") Reviewed-by: James Hogan Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21135/ Cc: Ralf Baechle Cc: James Hogan Cc: Steven J . Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: # 3.8+ commit bb53fdf395eed103f85061bfff3b116cee123895 Author: Huacai Chen Date: Thu Nov 15 15:53:53 2018 +0800 MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 For multi-node Loongson-3 (NUMA configuration), r4k_blast_scache() can only flush Node-0's scache. So we add r4k_blast_scache_node() by using (CAC_BASE | (node_id << NODE_ADDRSPACE_SHIFT)) instead of CKSEG0 as the start address. Signed-off-by: Huacai Chen [paul.burton@mips.com: Include asm/mmzone.h from asm/r4kcache.h for nid_to_addrbase(). Add asm/mach-generic/mmzone.h to allow inclusion for all platforms.] Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21129/ Cc: Ralf Baechle Cc: James Hogan Cc: Steven J . Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: # 3.15+ commit 11c6c0c22857967815b65cc7692181866549a06f Merge: 51428fd66139c f25dad19ba70f Author: David S. Miller Date: Tue Nov 20 20:59:27 2018 -0800 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 2018-11-20 This series contains updates to the ice driver only. Akeem updates the driver to determine whether or not to do auto-negotiation based on the VSI state. Bruce cleans up the control queue code to remove duplicate code. Take advantage of some compiler optimizations by making some structures constant, and also note that they cannot be modified. Cleaned up formatting issues and code comment that needed clarification. Fixed a potential NULL pointer dereference by adding a check. Jaroslaw adds a check to verify if memory was allocated or not. Yashaswini Raghuram fixes the driver to ensure we are not enabling the LAN_EN flag if the MAC in the MAC-VLAN is a unicast MAC, so that the unicast packets are not forwarded to the wire. Dave fixes the return value of ice_napi_poll() to be more useful in returning the work that was done and should only return 0 when no work was done. Anirudh does code comment cleanup, to make more consistent. ==================== Signed-off-by: David S. Miller commit 51428fd66139ce5ddb2bfbd3c509c7db6e7e73e0 Merge: b1a200484143a 84bd1908192ff Author: David S. Miller Date: Tue Nov 20 20:57:12 2018 -0800 Merge branch 'dsa-microchip-Modify-KSZ9477-DSA-driver-in-preparation-to-add-other-KSZ-switch-drivers' Tristram Ha says: ==================== net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers This series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code. There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific function. Second is to move common code into header that can be shared. Last is to modify tag_ksz.c so that it can handle many tail tag formats used by different KSZ switch drivers. ksz_common.c will contain the common code used by all KSZ switch drivers. ksz9477.c will contain KSZ9477 code from the original ksz_common.c. ksz9477_spi.c is renamed from ksz_spi.c. ksz9477_reg.h is renamed from ksz_9477_reg.h. ksz_common.h is added to provide common code access to KSZ switch drivers. ksz_spi.h is added to provide common SPI access functions to KSZ SPI drivers. v4 - Patches were removed to concentrate on changing driver structure without adding new code. v3 - The phy_device structure is used to hold port link information - A structure is passed in ksz_xmit and ksz_rcv instead of function pointer - Switch offload forwarding is supported v2 - Initialize reg_mutex before use - The alu_mutex is only used inside chip specific functions v1 - Each patch in the set is self-contained - Use ksz9477 prefix to indicate KSZ9477 specific code ==================== Signed-off-by: David S. Miller commit 84bd1908192ffa5231ca6709c8cd87efaf57226c Author: Tristram Ha Date: Tue Nov 20 15:55:10 2018 -0800 net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.h Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product name is always KSZ####. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c2e866911e2540677c31ee009d8f75cdb4c023aa Author: Tristram Ha Date: Tue Nov 20 15:55:09 2018 -0800 net: dsa: microchip: break KSZ9477 DSA driver into two files Break KSZ9477 DSA driver into two files in preparation to add more KSZ switch drivers. Add common functions in ksz_common.h so that other KSZ switch drivers can access code in ksz_common.c. Add ksz_spi.h for common functions used by KSZ switch SPI drivers. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 74a7194f15b33789f2423391d4c4e26fa96db752 Author: Tristram Ha Date: Tue Nov 20 15:55:08 2018 -0800 net: dsa: microchip: rename ksz_spi.c to ksz9477_spi.c Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add more KSZ switch drivers. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 353592781d44d2900931b4e30059661cb5183af8 Author: Tristram Ha Date: Tue Nov 20 15:55:07 2018 -0800 net: dsa: microchip: rename some functions with ksz9477 prefix Rename some functions with ksz9477 prefix to separate chip specific code from common code. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9bc981c35530c136e61934f682dfef765fadcb5a Author: Tristram Ha Date: Tue Nov 20 15:55:06 2018 -0800 net: dsa: microchip: clean up code Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5b79c72e965a21da08f1e498649d514cdb82712e Author: Tristram Ha Date: Tue Nov 20 15:55:05 2018 -0800 net: dsa: microchip: replace license with GPL Replace license with GPL. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn Acked-by: Pavel Machek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0c62bff1fd633774756be6d88d71002cd37615e0 Author: Jens Axboe Date: Tue Nov 20 19:12:46 2018 -0700 block: fix attempt to assign NULL io_context If the first request allocated and issued by a process is a passhthrough request, we don't set up an IO context for it. Ensure that blk_mq_sched_assign_ioc() ignores a NULL io_context. Fixes: e2b3fa5af70c ("block: Remove bio->bi_ioc") Reported-by: Ming Lei Tested-by: Ming Lei Signed-off-by: Jens Axboe commit 31a8b3ee16e3051a0d9abc557ca203e2330621b6 Author: Jonathan Davies Date: Tue Nov 20 17:48:32 2018 +0000 HID: samples/hidraw: fix typo in printed message Signed-off-by: Jonathan Davies Signed-off-by: Jiri Kosina commit f6161a8f3036caa45f225486be39783e99e0fa29 Author: Yonghong Song Date: Tue Nov 20 14:08:20 2018 -0800 bpf: fix a compilation error when CONFIG_BPF_SYSCALL is not defined Kernel test robot (lkp@intel.com) reports a compilation error at https://www.spinics.net/lists/netdev/msg534913.html introduced by commit 838e96904ff3 ("bpf: Introduce bpf_func_info"). If CONFIG_BPF is defined and CONFIG_BPF_SYSCALL is not defined, the following error will appear: kernel/bpf/core.c:414: undefined reference to `btf_type_by_id' kernel/bpf/core.c:415: undefined reference to `btf_name_by_offset' When CONFIG_BPF_SYSCALL is not defined, let us define stub inline functions for btf_type_by_id() and btf_name_by_offset() in include/linux/btf.h. This way, the compilation failure can be avoided. Fixes: 838e96904ff3 ("bpf: Introduce bpf_func_info") Reported-by: kbuild test robot Cc: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 78abd9e2c8f4e2a5859c100278baf44d46d47c85 Author: Lucas De Marchi Date: Fri Nov 16 16:42:34 2018 -0800 drm/i915: Downgrade unknown CSR firmware warnings Like it was done in commit 9e180d9991dc ("drm/i915: Downgrade unknown firmware warnings") for huc and guc: downgrade CSR firmware warnings. If we have released no firmware yet for a platform, stop scaring the consumer and merely note its expected absence. By simply removing the warning and early return we hit the condition with the appropriate message. Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181117004234.23437-2-lucas.demarchi@intel.com commit 02c07b76af5a7b97f4af1d211503b53444193dbb Author: Lucas De Marchi Date: Fri Nov 16 16:42:33 2018 -0800 drm/i915: allow to load DMC firmware on next gen Before commit d8a5b7d79fb7 ("drm/i915/csr: keep max firmware size together with firmare name and version") it was possible to load the firmware for testing purposes via parameter. Let's use the size of the last known platform to recover that behavior. Cc: Jani Nikula Cc: Rodrigo Vivi Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181117004234.23437-1-lucas.demarchi@intel.com commit cab870b7fdf3c4be747d88de5248b28db7d4055e Author: José Roberto de Souza Date: Mon Nov 19 15:01:01 2018 -0800 drm/i915/ilk: Fix warning when reading emon_status with no output When there is no output no one will hold a runtime_pm reference causing a warning when trying to read emom_status in debugfs. [22.756480] ------------[ cut here ]------------ [22.756489] RPM wakelock ref not held during HW access [22.756578] WARNING: CPU: 0 PID: 1058 at drivers/gpu/drm/i915/intel_drv.h:2104 gen5_read32+0x16b/0x1a0 [i915] [22.756580] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core e1000e snd_pcm mei_me prime_numbers mei lpc_ich [22.756595] CPU: 0 PID: 1058 Comm: debugfs_test Not tainted 4.20.0-rc1-CI-Trybot_3219+ #1 [22.756597] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.13 07/14/2011 [22.756634] RIP: 0010:gen5_read32+0x16b/0x1a0 [i915] [22.756637] Code: a4 ea e0 0f 0b e9 d2 fe ff ff 80 3d a5 71 19 00 00 0f 85 d3 fe ff ff 48 c7 c7 48 d0 2d a0 c6 05 91 71 19 00 01 e8 35 a4 ea e0 <0f> 0b e9 b9 fe ff ff e8 69 c6 f2 e0 85 c0 75 92 48 c7 c2 78 d0 2d [22.756639] RSP: 0018:ffffc90000f1fd38 EFLAGS: 00010282 [22.756642] RAX: 0000000000000000 RBX: ffff8801f7ab0000 RCX: 0000000000000006 [22.756643] RDX: 0000000000000006 RSI: ffffffff8212886a RDI: ffffffff820d6d57 [22.756645] RBP: 0000000000011020 R08: 0000000043e3d1a8 R09: 0000000000000000 [22.756647] R10: ffffc90000f1fd80 R11: 0000000000000000 R12: 0000000000000001 [22.756649] R13: ffff8801f7ab0068 R14: 0000000000000001 R15: ffff88020d53d188 [22.756651] FS: 00007f2878849980(0000) GS:ffff880213a00000(0000) knlGS:0000000000000000 [22.756653] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [22.756655] CR2: 00005638deedf028 CR3: 0000000203292001 CR4: 00000000000206f0 [22.756657] Call Trace: [22.756689] i915_mch_val+0x1b/0x60 [i915] [22.756721] i915_emon_status+0x45/0xd0 [i915] [22.756730] seq_read+0xdb/0x3c0 [22.756736] ? lockdep_hardirqs_off+0x94/0xd0 [22.756740] ? __slab_free+0x24e/0x510 [22.756746] full_proxy_read+0x52/0x90 [22.756752] __vfs_read+0x31/0x170 [22.756759] ? do_sys_open+0x13b/0x240 [22.756763] ? rcu_read_lock_sched_held+0x6f/0x80 [22.756766] vfs_read+0x9e/0x140 [22.756770] ksys_read+0x50/0xc0 [22.756775] do_syscall_64+0x55/0x190 [22.756781] entry_SYSCALL_64_after_hwframe+0x49/0xbe [22.756783] RIP: 0033:0x7f28781dc34e [22.756786] Code: 00 00 00 00 48 8b 15 71 8c 20 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 0f 1f 40 00 8b 05 ba d0 20 00 85 c0 75 16 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 5a f3 c3 0f 1f 84 00 00 00 00 00 41 54 55 49 [22.756787] RSP: 002b:00007ffd33fa0d08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [22.756790] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f28781dc34e [22.756792] RDX: 0000000000000200 RSI: 00007ffd33fa0d50 RDI: 0000000000000008 [22.756794] RBP: 00007ffd33fa0f60 R08: 0000000000000000 R09: 0000000000000020 [22.756796] R10: 0000000000000000 R11: 0000000000000246 R12: 00005638de45c2c0 [22.756797] R13: 00007ffd33fa14b0 R14: 0000000000000000 R15: 0000000000000000 [22.756806] irq event stamp: 47950 [22.756811] hardirqs last enabled at (47949): [] vprintk_emit+0x124/0x320 [22.756813] hardirqs last disabled at (47950): [] trace_hardirqs_off_thunk+0x1a/0x1c [22.756816] softirqs last enabled at (47518): [] __do_softirq+0x33a/0x4b9 [22.756820] softirqs last disabled at (47479): [] irq_exit+0xa9/0xc0 [22.756858] WARNING: CPU: 0 PID: 1058 at drivers/gpu/drm/i915/intel_drv.h:2104 gen5_read32+0x16b/0x1a0 [i915] [22.756860] ---[ end trace bf56fa7d6a3cbf7a ] Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181119230101.32460-1-jose.souza@intel.com commit 5386e6caa6711407182573e2b0344fe908b0fbcc Author: Ondrej Mosnacek Date: Tue Nov 13 14:52:53 2018 +0100 selinux: refactor sidtab conversion This is a purely cosmetic change that encapsulates the three-step sidtab conversion logic (shutdown -> clone -> map) into a single function defined in sidtab.c (as opposed to services.c). Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley [PM: whitespaces fixes to make checkpatch happy] Signed-off-by: Paul Moore commit 1e35918ad9d1172efdc78e28cf0d2209194f3961 Author: Hassan Naveed Date: Mon Nov 19 16:49:37 2018 -0800 MIPS: Enable Undefined Behavior Sanitizer UBSAN Select ARCH_HAS_UBSAN_SANITIZE_ALL in order to allow the user to enable CONFIG_UBSAN_SANITIZE_ALL and instrument the entire kernel for ubsan checks. We exclude the VDSO from this because its build doesn't include the __ubsan_handle_*() functions that the kernel proper defines in from lib/ubsan.c, and the VDSO would have no sane way to report errors even if it had definitions of these functions. Signed-off-by: Hassan Naveed Reviewed-by: Paul Burton Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21179/ Cc: commit f25dad19ba70f7cc135da78ec013325042cd8c52 Author: Bruce Allan Date: Wed Nov 7 10:19:35 2018 -0800 ice: Fix possible NULL pointer de-reference A recent update to smatch is causing it to report the error "we previously assumed 'm_entry->vsi_list_info' could be null". Fix that. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d337f2afb7aceb16840a2621c5e2f9e868630653 Author: Anirudh Venkataramanan Date: Fri Oct 26 11:44:47 2018 -0700 ice: Use Tx|Rx in comments In code comments, use Tx|Rx instead of tx|rx Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit df17b7e02f0fa3a13c5aac26c317447d72612e1c Author: Anirudh Venkataramanan Date: Fri Oct 26 11:44:46 2018 -0700 ice: Cosmetic formatting changes 1. Fix several cases of double spacing 2. Fix typos 3. Capitalize abbreviations Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2c5492de8770b72cb9c97c91fbcbb90c16470819 Author: Bruce Allan Date: Fri Oct 26 11:44:45 2018 -0700 ice: Cleanup short function signatures Function signatures that do not exceed 80-characters should be on a single line. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit bc0c6fab8a1e0d6eb3309b5b0512b5cd06f07979 Author: Bruce Allan Date: Fri Oct 26 11:44:44 2018 -0700 ice: Cleanup ice_tx_timeout() Clean up number of formatting issues and a comment that could use clarification. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit e0c9fd9b77a7334032ec407d9e14d7c3cac1ac4f Author: Dave Ertman Date: Fri Oct 26 11:44:43 2018 -0700 ice: Fix return value from NAPI poll ice_napi_poll is hard-coded to return zero when it's done. It should instead return the work done (if any work was done). The only time it should return zero is if an interrupt or poll is handled and no work is performed. So change the return value to be the minimum of work done or budget-1. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 55aa141ed909711939ee4546b85d09d2f2894532 Author: Bruce Allan Date: Fri Oct 26 11:44:42 2018 -0700 ice: Constify global structures that can/should be Indicate these structs should not be modified and take advantage of some compiler optimizations by making these structs const. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6a7e69936992104e7abbf12c7f619a39bf139a48 Author: Yashaswini Raghuram Prathivadi Bhayankaram Date: Fri Oct 26 11:44:41 2018 -0700 ice: Do not set LAN_EN for MAC-VLAN filters In the action fields for a MAC-VLAN filter, do not set the LAN_EN flag if the MAC in the MAC-VLAN is unicast MAC. The unicast packets that match should not be forwarded to the wire. Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5fb597d7c83310716be185f36a8b153e2457ea7f Author: Jaroslaw Ilgiewicz Date: Fri Oct 26 11:44:40 2018 -0700 ice: Pass the return value of ice_init_def_sw_recp() Added check of return value for ice_init_def_sw_recp(). Now we know if memory was correctly allocated. Signed-off-by: Jaroslaw Ilgiewicz Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7afdbc903a7c22510bbf5a82866e1a607e2f0997 Author: Bruce Allan Date: Fri Oct 26 11:44:39 2018 -0700 ice: Cleanup duplicate control queue code 1. Assigning the register offset and mask values contains duplicate code that can easily be replaced with a macro. 2. Separate functions for freeing send queue and receive queue rings are not needed; replace with a single function that uses a pointer to the struct ice_ctl_q_ring structure as a parameter instead of a pointer to the struct ice_ctl_q_info structure. 3. Initializing register settings for both send queue and receive queue contains duplicate code that can easily be replaced with a helper function. 4. Separate functions for freeing send queue and receive queue buffers are not needed; duplicate code can easily be replaced with a macro. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d38b08834fc35720ad685e9e2f6d865f681fbc34 Author: Akeem G Abodunrin Date: Fri Oct 26 11:44:38 2018 -0700 ice: Do autoneg based on VSI state If VSI state is up, we should do autoneg with link up, otherwise with link down. Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ec3db8a63d4aeceaee726b92f85b23c475e0e255 Author: Philip Yang Date: Mon Nov 19 10:36:02 2018 -0500 drm/amdgpu: enable paging queue doorbell support v4 Because increase SDMA_DOORBELL_RANGE to add new SDMA doorbell for paging queue will break SRIOV, instead we can reserve and map two doorbell pages for amdgpu, paging queues doorbell index use same index as SDMA gfx queues index but on second page. For Vega20, after we change doorbell layout to increase SDMA doorbell for 8 SDMA RLC queues later, we could use new doorbell index for paging queue. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bc5ab2d29b8a57493072d3ba19fde4def9b6b3b5 Author: Philip Yang Date: Mon Nov 19 10:37:08 2018 -0500 drm/amdgpu: fix typo in function sdma_v4_0_page_resume This looks like copy paste typo Signed-off-by: Philip Yang Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 448d105120b1c90d16f19a1c00826a2bfcad87dc Author: Rex Zhu Date: Mon Nov 19 18:59:53 2018 +0800 drm/amdgpu: Remove dead static variable The static struct drm_driver *driver was not used because drm_pci_init was deprecated v2: Remove static pointer pdriver(Christian) Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 5d240da93edc29adb68320c5e475dc9c7fcad5dd Author: Eric Huang Date: Wed Sep 5 11:46:14 2018 -0400 drm/amdkfd: change system memory overcommit limit It is to improve system limit by: 1. replacing userptrlimit with a total memory limit that conunts TTM memory usage and userptr usage. 2. counting acc size for all BOs. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0f04e538580c086046e3b31cbc7ef4307a5b771d Author: Felix Kuehling Date: Thu May 3 17:37:56 2018 -0400 drm/amdgpu: Fix KFD doorbell SG BO mapping This change prepares for adding SG BOs that will be used for mapping doorbells into GPUVM address space. This type of BO would be mistaken for an invalid userptr BO. Improve that check to test that it's actually a userptr BO so that SG BOs that are still in the CPU domain can be validated and mapped correctly. Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5aae7335b1ee609da13e5c9fa535802654171e10 Author: Felix Kuehling Date: Tue Mar 13 16:05:59 2018 -0400 drm/amdkfd: Fix and simplify sync object handling for KFD The adev parameter in amdgpu_sync_fence and amdgpu_sync_resv is only needed for updating sync->last_vm_update. This breaks if different adevs are passed to calls for the same sync object. Always pass NULL for calls from KFD because sync objects used for KFD don't belong to any particular device, and KFD doesn't need the sync->last_vm_update fence. This fixes kernel log warnings on multi-GPU systems after recent changes in amdgpu_amdkfd_gpuvm_restore_process_bos. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3d97da4463d87148269a087c26422a2a5304d5d3 Author: Harish Kasiviswanathan Date: Wed Feb 28 11:50:10 2018 -0500 drm/amdgpu: KFD Restore process: Optimize waiting Instead of waiting for each KFD BO after validation just wait for the last BO moving fence. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9130cc01d1fda46009529d04303c6ed958d9e3d1 Author: Harish Kasiviswanathan Date: Fri Jan 26 15:36:06 2018 -0500 drm/amdgpu: Remove explicit wait after VM validate PD or PT might have to be moved during validation and this move has to be completed before updating it. If page table updates are done using SDMA then this serializing is done by SDMA command submission. And if PD/PT updates are done by CPU, then explicit waiting for PD/PT updates are done in amdgpu VM amdgpu_vm_wait_pd function. Sync to PD BO moving fence to handle corner case where none of the PTs are updated but PD is evicted. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5200ab6a32d6055428896a49ec9e3b1652c1a100 Author: Hans Verkuil Date: Thu Oct 4 17:38:15 2018 -0400 media: vidioc_cropcap -> vidioc_g_pixelaspect Now vidioc_cropcap is only used to return the pixelaspect, so rename it accordingly. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 740baecd811f8e0be7475e952a0f3174b82d813b Merge: bbe5d311be662 254471e57a86b Author: Alexei Starovoitov Date: Tue Nov 20 10:54:40 2018 -0800 Merge branch 'btf-func-info' Martin KaFai Lau says: ==================== The BTF support was added to kernel by Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced .BTF section into ELF file and is primarily used for map pretty print. pahole is used to convert dwarf to BTF for ELF files. This patch added func info support to the kernel so we can get better ksym's for bpf function calls. Basically, function call types are passed to kernel and the kernel extract function names from these types in order to contruct ksym for these functions. The llvm patch at https://reviews.llvm.org/D53736 will generate .BTF section and one more section .BTF.ext. The .BTF.ext section encodes function type information. The following is a sample output for selftests test_btf with file test_btf_haskv.o for translated insns and jited insns respectively. $ bpftool prog dump xlated id 1 int _dummy_tracepoint(struct dummy_tracepoint_args * arg): 0: (85) call pc+2#bpf_prog_2dcecc18072623fc_test_long_fname_1 1: (b7) r0 = 0 2: (95) exit int test_long_fname_1(struct dummy_tracepoint_args * arg): 3: (85) call pc+1#bpf_prog_89d64e4abf0f0126_test_long_fname_2 4: (95) exit int test_long_fname_2(struct dummy_tracepoint_args * arg): 5: (b7) r2 = 0 6: (63) *(u32 *)(r10 -4) = r2 7: (79) r1 = *(u64 *)(r1 +8) ... 22: (07) r1 += 1 23: (63) *(u32 *)(r0 +4) = r1 24: (95) exit $ bpftool prog dump jited id 1 int _dummy_tracepoint(struct dummy_tracepoint_args * arg): bpf_prog_b07ccb89267cf242__dummy_tracepoint: 0: push %rbp 1: mov %rsp,%rbp ...... 3c: add $0x28,%rbp 40: leaveq 41: retq int test_long_fname_1(struct dummy_tracepoint_args * arg): bpf_prog_2dcecc18072623fc_test_long_fname_1: 0: push %rbp 1: mov %rsp,%rbp ...... 3a: add $0x28,%rbp 3e: leaveq 3f: retq int test_long_fname_2(struct dummy_tracepoint_args * arg): bpf_prog_89d64e4abf0f0126_test_long_fname_2: 0: push %rbp 1: mov %rsp,%rbp ...... 80: add $0x28,%rbp 84: leaveq 85: retq Changelogs: v4 -> v5: . Add back BTF_KIND_FUNC_PROTO as v1 did. The difference is BTF_KIND_FUNC_PROTO cannot have t->name_off now. All param metadata is defined in BTF_KIND_FUNC_PROTO. BTF_KIND_FUNC must have t->name_off != 0 and t->type refers to a BTF_KIND_FUNC_PROTO. The above is the conclusion after the discussion between Edward Cree, Alexei, Daniel, Yonghong and Martin. v3 -> v4: . Remove BTF_KIND_FUNC_PROTO. BTF_KIND_FUNC is used for both function pointer and subprogram. The name_off field is used to distinguish both. . The record size is added to the func_info subsection in .BTF.ext to enable future extension. . The bpf_prog_info interface change to make it similar bpf_prog_load. . Related kernel and libbpf changes to accommodate the new .BTF.ext and kernel interface changes. v2 -> v3: . Removed kernel btf extern functions btf_type_id_func() and btf_get_name_by_id(). Instead, exposing existing functions btf_type_by_id() and btf_name_by_offset(). . Added comments about ELF section .BTF.ext layout. . Better codes in btftool as suggested by Edward Cree. v1 -> v2: . Added missing sign-off. . Limited the func_name/struct_member_name length for validity test. . Removed/changed several verifier messages. . Modified several commit messages to remove line_off reference. ==================== Acked-by: Edward Cree Signed-off-by: Alexei Starovoitov commit 254471e57a86b8dc1a2cc19848e99f5d7c0558f4 Author: Yonghong Song Date: Mon Nov 19 15:29:21 2018 -0800 tools/bpf: bpftool: add support for func types This patch added support to print function signature if btf func_info is available. Note that ksym now uses function name instead of prog_name as prog_name has a limit of 16 bytes including ending '\0'. The following is a sample output for selftests test_btf with file test_btf_haskv.o for translated insns and jited insns respectively. $ bpftool prog dump xlated id 1 int _dummy_tracepoint(struct dummy_tracepoint_args * arg): 0: (85) call pc+2#bpf_prog_2dcecc18072623fc_test_long_fname_1 1: (b7) r0 = 0 2: (95) exit int test_long_fname_1(struct dummy_tracepoint_args * arg): 3: (85) call pc+1#bpf_prog_89d64e4abf0f0126_test_long_fname_2 4: (95) exit int test_long_fname_2(struct dummy_tracepoint_args * arg): 5: (b7) r2 = 0 6: (63) *(u32 *)(r10 -4) = r2 7: (79) r1 = *(u64 *)(r1 +8) ... 22: (07) r1 += 1 23: (63) *(u32 *)(r0 +4) = r1 24: (95) exit $ bpftool prog dump jited id 1 int _dummy_tracepoint(struct dummy_tracepoint_args * arg): bpf_prog_b07ccb89267cf242__dummy_tracepoint: 0: push %rbp 1: mov %rsp,%rbp ...... 3c: add $0x28,%rbp 40: leaveq 41: retq int test_long_fname_1(struct dummy_tracepoint_args * arg): bpf_prog_2dcecc18072623fc_test_long_fname_1: 0: push %rbp 1: mov %rsp,%rbp ...... 3a: add $0x28,%rbp 3e: leaveq 3f: retq int test_long_fname_2(struct dummy_tracepoint_args * arg): bpf_prog_89d64e4abf0f0126_test_long_fname_2: 0: push %rbp 1: mov %rsp,%rbp ...... 80: add $0x28,%rbp 84: leaveq 85: retq Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 999d82cbc04416cc7f2b5cb6daab947c16f0fd3a Author: Yonghong Song Date: Mon Nov 19 15:29:20 2018 -0800 tools/bpf: enhance test_btf file testing to test func info Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to have two sections, and enhance test_btf.c test_file feature to test btf func_info returned by the kernel. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit d7f5b5e051554c91bab995b67101af4625af591a Author: Yonghong Song Date: Mon Nov 19 15:29:18 2018 -0800 tools/bpf: refactor to implement btf_get_from_id() in lib/bpf The function get_btf() is implemented in tools/bpf/bpftool/map.c to get a btf structure given a map_info. This patch refactored this function to be function btf_get_from_id() in tools/lib/bpf so that it can be used later. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 9ce6ae22c8e878aee7a96836b2ed9fd9a8173e41 Author: Yonghong Song Date: Mon Nov 19 15:29:17 2018 -0800 tools/bpf: do not use pahole if clang/llvm can generate BTF sections Add additional checks in tools/testing/selftests/bpf and samples/bpf such that if clang/llvm compiler can generate BTF sections, do not use pahole. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 2993e0515bb44e157c17c9ba7309ba46366b6add Author: Yonghong Song Date: Mon Nov 19 15:29:16 2018 -0800 tools/bpf: add support to read .BTF.ext sections The .BTF section is already available to encode types. These types can be used for map pretty print. The whole .BTF will be passed to the kernel as well for which kernel can verify and return to the user space for pretty print etc. The llvm patch at https://reviews.llvm.org/D53736 will generate .BTF section and one more section .BTF.ext. The .BTF.ext section encodes function type information and line information. Note that this patch set only supports function type info. The functionality is implemented in libbpf. The .BTF section can be directly loaded into the kernel, and the .BTF.ext section cannot. The loader may need to do some relocation and merging, similar to merging multiple code sections, before loading into the kernel. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 4798c4ba3ba94e4da37b2557dfda04f80a94e8d5 Author: Yonghong Song Date: Mon Nov 19 15:29:15 2018 -0800 tools/bpf: extends test_btf to test load/retrieve func_type info A two function bpf program is loaded with btf and func_info. After successful prog load, the bpf_get_info syscall is called to retrieve prog info to ensure the types returned from the kernel matches the types passed to the kernel from the user space. Several negative tests are also added to test loading/retriving of func_type info. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 7e0d0fb5522a388700ceff723af98c47ffa8a0a9 Author: Yonghong Song Date: Mon Nov 19 15:29:14 2018 -0800 tools/bpf: add new fields for program load in lib/bpf The new fields are added for program load in lib/bpf so application uses api bpf_load_program_xattr() is able to load program with btf and func_info data. This functionality will be used in next patch by bpf selftest test_btf. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit cc19435cb2ee34a3663f0be69f3a4647795b0417 Author: Yonghong Song Date: Mon Nov 19 15:29:13 2018 -0800 tools/bpf: sync kernel uapi bpf.h header to tools directory The kernel uapi bpf.h is synced to tools directory. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 838e96904ff3fc6c30e5ebbc611474669856e3c0 Author: Yonghong Song Date: Mon Nov 19 15:29:11 2018 -0800 bpf: Introduce bpf_func_info This patch added interface to load a program with the following additional information: . prog_btf_fd . func_info, func_info_rec_size and func_info_cnt where func_info will provide function range and type_id corresponding to each function. The func_info_rec_size is introduced in the UAPI to specify struct bpf_func_info size passed from user space. This intends to make bpf_func_info structure growable in the future. If the kernel gets a different bpf_func_info size from userspace, it will try to handle user request with part of bpf_func_info it can understand. In this patch, kernel can understand struct bpf_func_info { __u32 insn_offset; __u32 type_id; }; If user passed a bpf func_info record size of 16 bytes, the kernel can still handle part of records with the above definition. If verifier agrees with function range provided by the user, the bpf_prog ksym for each function will use the func name provided in the type_id, which is supposed to provide better encoding as it is not limited by 16 bytes program name limitation and this is better for bpf program which contains multiple subprograms. The bpf_prog_info interface is also extended to return btf_id, func_info, func_info_rec_size and func_info_cnt to userspace, so userspace can print out the function prototype for each xlated function. The insn_offset in the returned func_info corresponds to the insn offset for xlated functions. With other jit related fields in bpf_prog_info, userspace can also print out function prototypes for each jited function. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 78a2540e8945678b390a5f41eb82459bc6f0f36c Author: Martin KaFai Lau Date: Mon Nov 19 15:29:10 2018 -0800 tools/bpf: Add tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC This patch adds unit tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC to test_btf. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 781e775e296ce3aabe0a4a0f773dccda02267695 Author: Martin KaFai Lau Date: Mon Nov 19 15:29:09 2018 -0800 tools/bpf: Sync kernel btf.h header The kernel uapi btf.h is synced to the tools directory. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 2667a2626f4da370409c2830552f6e8c8b8c41e2 Author: Martin KaFai Lau Date: Mon Nov 19 15:29:08 2018 -0800 bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO This patch adds BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO to support the function debug info. BTF_KIND_FUNC_PROTO must not have a name (i.e. !t->name_off) and it is followed by >= 0 'struct bpf_param' objects to describe the function arguments. The BTF_KIND_FUNC must have a valid name and it must refer back to a BTF_KIND_FUNC_PROTO. The above is the conclusion after the discussion between Edward Cree, Alexei, Daniel, Yonghong and Martin. By combining BTF_KIND_FUNC and BTF_LIND_FUNC_PROTO, a complete function signature can be obtained. It will be used in the later patches to learn the function signature of a running bpf program. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit b47a0bd23e34022aa0d4b812fcebe85cb0c54d49 Author: Martin KaFai Lau Date: Mon Nov 19 15:29:06 2018 -0800 bpf: btf: Break up btf_type_is_void() This patch breaks up btf_type_is_void() into btf_type_is_void() and btf_type_is_fwd(). It also adds btf_type_nosize() to better describe it is testing a type has nosize info. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit ed3e2749ff4a94e35de653f9bbce407eb25ae363 Author: Hans Verkuil Date: Thu Oct 4 16:48:12 2018 -0400 media: v4l2-ioctl: remove unused vidioc_g/s_crop Now that all drivers have dropped vidioc_g/s_crop we can remove support for them in the V4L2 core. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Acked-by: Sakari Ailus Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit f72b9d8cfcd60f76146ac5ec31b0284fab0071b5 Author: Hans Verkuil Date: Thu Oct 4 16:12:06 2018 -0400 media: s5p-g2d: convert g/s_crop to g/s_selection Replace g/s_crop by g/s_selection and set the V4L2_FL_QUIRK_INVERTED_CROP flag since this is one of the old drivers that predates the selection API. Those old drivers allowed g_crop when it really shouldn't have since g_crop returns a compose rectangle instead of a crop rectangle for the CAPTURE stream, and vice versa for the OUTPUT stream. Also drop the now unused vidioc_cropcap. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 158efdeebc4871aebd4d99ee009a350515e9d509 Author: Hans Verkuil Date: Thu Oct 4 15:37:10 2018 -0400 media: exynos4-is: convert g/s_crop to g/s_selection Replace g/s_crop by g/s_selection and set the V4L2_FL_QUIRK_INVERTED_CROP flag since this is one of the old drivers that predates the selection API. Those old drivers allowed g_crop when it really shouldn't have since g_crop returns a compose rectangle instead of a crop rectangle for the CAPTURE stream, and vice versa for the OUTPUT stream. Also drop the now unused vidioc_cropcap. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 8edf27c275a8dcf9f9f8af19345344eaa7f605b6 Author: Hans Verkuil Date: Thu Oct 4 16:02:42 2018 -0400 media: s5p_mfc_dec.c: convert g_crop to g_selection The g_crop really implemented composition for the CAPTURE stream. Replace g_crop by g_selection and set the V4L2_FL_QUIRK_INVERTED_CROP flag since this is one of the old drivers that predates the selection API. Those old drivers allowed g_crop when it really shouldn't have since g_crop returns a compose rectangle instead of a crop rectangle. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 9ad763d0eb1a739b8f1bc9e7e8a049139b2a77c2 Author: Hans Verkuil Date: Thu Oct 4 15:45:02 2018 -0400 media: exynos-gsc: replace v4l2_crop by v4l2_selection Replace the use of struct v4l2_crop by struct v4l2_selection. Also drop the unused gsc_g_crop function. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit b1a200484143a727ce293e0f200a543cc7584152 Author: Xue Chaojing Date: Tue Nov 20 05:47:34 2018 +0000 net-next/hinic: fix a bug in rx data flow In rx_alloc_pkts(), there is a loop call of tasklet, which causes 100% cpu utilization, even no packets are being received. This patch fixes this bug. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit 9ea72dc9430306b77c73a8a21beb51437cde1d6d Author: Xue Chaojing Date: Tue Nov 20 05:47:33 2018 +0000 net-next/hinic:fix a bug in set mac address In add_mac_addr(), if the MAC address is a muliticast address, it will not be set, which causes the network card fail to receive the multicast packet. This patch fixes this bug. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit 4a61abb100c8a647959147034f60e9fce17ce9af Author: Xue Chaojing Date: Tue Nov 20 05:47:32 2018 +0000 net-next/hinic:add rx checksum offload for HiNIC In order to improve performance, this patch adds rx checksum offload for the HiNIC driver. Performance test(Iperf) shows more than 80% improvement in TCP streams. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit ebda9b46cebc9c1245fcfe96c76525717ef984cc Author: Xue Chaojing Date: Tue Nov 20 05:47:31 2018 +0000 net-next/hinic:replace multiply and division operators To improve performance, this patch uses bit operations to replace multiply and division operators. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller commit ee10dc36b485920e87eefa325d74fd8804648621 Author: Hans Verkuil Date: Thu Oct 4 17:06:32 2018 -0400 media: cropcap/g_selection split If g_selection is implemented, then the v4l2-ioctl cropcap code assumes that cropcap just implements the pixelaspect part and that g_selection provides the crop bounds and default rectangles. There are still some drivers that only implement cropcap and not g_selection. Split up cropcap into a cropcap and g_selection for those drivers. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a421ce088ac8eb3591d2a1ae0ded2dcece72018f Author: Vadim Pasternak Date: Tue Nov 20 06:52:03 2018 +0000 mlxsw: core: Extend cooling device with cooling levels Extend cooling device with cooling levels vector to allow more flexibility of PWM setting. Thermal zone algorithm operates with the numerical states for PWM setting. Each state is the index, defined in range from 0 to 10 and it's mapped to the relevant duty cycle value, which is written to PWM controller. With the current definition fan speed is set to 0% for state 0, 10% for state 1, and so on up to 100% for the maximum state 10. Some systems have limitation for the PWM speed minimum. For such systems PWM setting speed to 0% will just disable the ability to increase speed anymore and such device will be stall on zero speed. Cooling levels allow to configure state vector according to the particular system requirements. For example, if PWM speed is not allowed to be below 30%, cooling levels could be configured as 30%, 30%, 30%, 30%, 40%, 50% and so on. Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b539ea60f5043b9acd7562f04fa2117f18776cbb Author: Arjun Vynipadath Date: Tue Nov 20 12:11:39 2018 +0530 cxgb4/cxgb4vf: Fix mac_hlist initialization and free Null pointer dereference seen when cxgb4vf driver is unloaded without bringing up any interfaces, moving mac_hlist initialization to driver probe and free the mac_hlist in remove to fix the issue. Fixes: 24357e06ba51 ("cxgb4vf: fix memleak in mac_hlist initialization") Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 98af278b1e0fa6b7e6c762e185e99f0cc5e31cfe Author: Hans Verkuil Date: Thu Oct 4 17:36:40 2018 -0400 media: davinci/vpbe: drop unused g_cropcap This function/callback is never used. Drop it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8cbd94bda98368d9fc0c5d69f64e221dbcb5a3a8 Author: Hans Verkuil Date: Thu Oct 4 16:44:01 2018 -0400 media: v4l2-ioctl: add QUIRK_INVERTED_CROP Some old Samsung drivers use the legacy crop API incorrectly: the crop and compose targets are swapped. Normally VIDIOC_G_CROP will return the CROP rectangle of a CAPTURE stream and the COMPOSE rectangle of an OUTPUT stream. The Samsung drivers do the opposite. Note that these drivers predate the selection API. If this 'QUIRK' flag is set, then the v4l2-ioctl core will swap the CROP and COMPOSE targets as well. That way backwards compatibility is ensured and we can convert the Samsung drivers to the selection API. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Acked-by: Sakari Ailus Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit ade9628ed049242fac5dd94730881f8c5e244634 Author: Eric Dumazet Date: Mon Nov 19 17:45:55 2018 -0800 tcp: drop dst in tcp_add_backlog() Under stress, softirq rx handler often hits a socket owned by the user, and has to queue the packet into socket backlog. When this happens, skb dst refcount is taken before we escape rcu protected region. This is done from __sk_add_backlog() calling skb_dst_force(). Consumer will have to perform the opposite costly operation. AFAIK nothing in tcp stack requests the dst after skb was stored in the backlog. If this was the case, we would have had failures already since skb_dst_force() can end up clearing skb dst anyway. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 177bbc67812d96dfec517ef293017ca614a0955a Author: Hans Verkuil Date: Thu Oct 4 16:30:04 2018 -0400 media: v4l2-common.h: put backwards compat defines under #ifndef __KERNEL__ This ensures that they won't be used in kernel code. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Acked-by: Sakari Ailus Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit b2c851006386c1c5c0e55eab4a7f60da2a3e25b3 Author: David S. Miller Date: Tue Nov 20 10:15:36 2018 -0800 ipv4: Don't try to print ASCII of link level header in martian dumps. This has no value whatsoever. Signed-off-by: David S. Miller commit 6d2d6fc83a281d51863fb5d08b59333ed1b46cc1 Author: Saeed Mahameed Date: Mon Nov 19 10:52:42 2018 -0800 net/mlx5: EQ, Make EQE access methods inline These are one/two liner generic EQ access methods, better have them declared static inline in eq.h. Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit d5d284b829a6eb7127df24d1bd3896a698981e62 Author: Saeed Mahameed Date: Mon Nov 19 10:52:41 2018 -0800 {net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA Use the new generic EQ API to move all ODP RDMA data structures and logic form mlx5 core driver into mlx5_ib driver. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Acked-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit 7701707cb94ed4d1e63ae4fa5ef62a2345ef9db7 Author: Saeed Mahameed Date: Mon Nov 19 10:52:40 2018 -0800 net/mlx5: EQ, Generic EQ Add mlx5_eq_{create/destroy}_generic APIs and EQE access methods, for mlx5 core consumers generic EQs. This API will be used in downstream patch to move page fault (RDMA ODP) EQ logic into mlx5_ib rdma driver, hence it will use a generic EQ. Current mlx5 EQ allocation scheme: On load mlx5 allocates 4 (for async) + #cores (for data completions) MSIX vectors, mlx5 core will assign 3 MSIX vectors for internal async EQs and will use all of the #cores MSIX vectors for completion EQs, (One vector is going to be reserved for a generic EQ). After this patch an external user (e.g mlx5_ib) of mlx5_core can use this new API to create new generic EQs with the reserved msix vector index for that eq. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit 16d760839ceef510cf95cbfadc069c4473c7a277 Author: Saeed Mahameed Date: Mon Nov 19 10:52:39 2018 -0800 net/mlx5: EQ, Different EQ types In mlx5 we have three types of usages for EQs, 1. Asynchronous EQs, used internally by mlx5 core for a. FW command completions b. FW page requests c. one EQ for all other Asynchronous events 2. Completion EQs, used for CQ completion (we create one per core) 3. *Special type of EQ (page fault) used for RDMA on demand paging (ODP). *The 3rd type shouldn't be special at least in mlx5 core, it is yet another async events EQ with specific use case, it will be removed in the next two patches, and will completely move its logic to mlx5_ib, as it is rdma specific. In this patch we remove use case (eq type) specific fields from struct mlx5_eq into a new eq type specific structures. struct mlx5_eq_async; truct mlx5_eq_comp; struct mlx5_eq_pagefault; Separate between their type specific flows. In the future we will allow users to create there own generic EQs. for now we will allow only one for ODP in next patches. We will introduce event listeners registration API for those who want to receive mlx5 async events. After that mlx5 eq handling will be clean from feature/user specific handling. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit f2f3df5501391bc784c8462dc97d989c2194fb74 Author: Saeed Mahameed Date: Mon Nov 19 10:52:38 2018 -0800 net/mlx5: EQ, Privatize eq_table and friends Move unnecessary EQ table structures and declaration from the public include/linux/mlx5/driver.h into the private area of mlx5_core and into eq.c/eq.h. Introduce new mlx5 EQ APIs: mlx5_comp_vectors_count(dev); mlx5_comp_irq_get_affinity_mask(dev, vector); And use them from mlx5_ib or mlx5e netdevice instead of direct access to mlx5_core internal structures. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit d674a9aa434409826b2408609be493739e61e6f6 Author: Saeed Mahameed Date: Mon Nov 19 10:52:37 2018 -0800 net/mlx5: EQ, irq_info and rmap belong to eq_table irq_info and rmap are EQ properties of the driver, and only needed for EQ objects, move them to the eq_table EQs database structure. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit c8e21b3b576b78fe1b07522aea046af2634a24e8 Author: Saeed Mahameed Date: Mon Nov 19 10:52:36 2018 -0800 net/mlx5: EQ, Create all EQs in one place Instead of creating the EQ table in three steps at driver load, - allocate irq vectors - allocate async EQs - allocate completion EQs Gather all of the procedures into one function in eq.c and call it from driver load. This will help us reduce the EQ and EQ table private structures visibility to eq.c in downstream refactoring. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit ca828cb4686f1aece8d30541e11b8e21de1a7b0e Author: Saeed Mahameed Date: Mon Nov 19 10:52:35 2018 -0800 net/mlx5: EQ, Move all EQ logic to eq.c Move completion EQs flows from main.c to eq.c, reasons: 1) It is where this logic belongs. 2) It will help centralize the EQ logic in one file for downstream refactoring, and future extensions/updates. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit aaa553a64438640ee4e41a2c1027c3435a75c0e7 Author: Saeed Mahameed Date: Mon Nov 19 10:52:34 2018 -0800 net/mlx5: EQ, Remove redundant completion EQ list lock Completion EQs list is only modified on driver load/unload, locking is not required, remove it. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit 2883f352571b9b830561ca21b8a666936366a120 Author: Saeed Mahameed Date: Mon Nov 19 10:52:33 2018 -0800 net/mlx5: EQ, No need to store eq index as a field eq->index is used only for completion EQs and is assigned to be the completion eq index, it is used only when traversing the completion eqs list, and it can be calculated dynamically, thus remove the eq->index field. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit 4de45c758636c37efd313589f91c739f613fbe7d Author: Saeed Mahameed Date: Mon Nov 19 10:52:32 2018 -0800 net/mlx5: EQ, Remove unused fields and structures Some fields and structures are not referenced nor used by the driver, remove them. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit 1e86ace4c140fd5a693e266c9b23409358f25381 Author: Saeed Mahameed Date: Mon Nov 19 10:52:31 2018 -0800 net/mlx5: EQ, Use the right place to store/read IRQ affinity hint Currently the cpu affinity hint mask for completion EQs is stored and read from the wrong place, since reading and storing is done from the same index, there is no actual issue with that, but internal irq_info for completion EQs stars at MLX5_EQ_VEC_COMP_BASE offset in irq_info array, this patch changes the code to use the correct offset to store and read the IRQ affinity hint. Signed-off-by: Saeed Mahameed Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Leon Romanovsky commit 5b79da06f74ef4c099b814972803cd25131f901f Author: Hans Verkuil Date: Fri Oct 5 03:10:20 2018 -0400 media: v4l2-ioctl: don't use CROP/COMPOSE_ACTIVE Drop the deprecated _ACTIVE part. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Acked-by: Sakari Ailus Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 6b015a523fa3ba57ccd9c72697163b560fcdedb4 Author: Eric Dumazet Date: Mon Nov 19 17:30:19 2018 -0800 net_sched: sch_fq: avoid calling ktime_get_ns() if not needed There are two cases were we can avoid calling ktime_get_ns() : 1) Queue is empty. 2) Internal queue is not empty. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ab60075f2a4eebca1abb04f712569963fb4d9d6c Author: Ji-Ze Hong (Peter Hong) Date: Thu Nov 15 10:58:44 2018 +0800 USB: serial: f81534: fix reading old/new IC config The F81532/534 had a internal configuration space to save & control IC state with address F81534_CUSTOM_ADDRESS_START (0x2f00). Layout as following: +00h: to indicate the section is valid +01h~04h: UART Mode & port availability +05h~08h: Output pin control on IC power on +09h~12h: Output pin control on working <-- New added Old driver will use +05~08h as default on working, but newer IC will configed with shutdown mode(7) in 05h~08h and working mode with RS232(1) in 09h~12h. It'll make mainstream driver not working. This patch will make mainstream driver compatible older and newer IC. If using a old IC, the +05h~08h will be 00h~06h, we'll direct apply it. If using a new IC, the +05h~08h will be 07h or larger, we'll read +09h~12h to apply newer configuration. Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Johan Hovold commit 8ff00ba79283e691ae294a158879237179c683eb Author: Douglas Anderson Date: Mon Nov 19 16:26:50 2018 -0800 regulator: core: Don't double-disable supplies in regulator_disable_deferred() In the commit f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") disabling of the supply was moved into _regulator_disable(). That means regulator_disable_work() shouldn't be disabling since that double-disables the supply. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 5a619b9e8883a0f9691964d001b8480df44df5b9 Author: Pierre-Louis Bossart Date: Fri Nov 16 18:47:06 2018 -0600 ASoC: Intel: use platform_data for machine drivers For some reason we have different mechanisms for passing data to machine drivers. Use the solution used by Atom/SST and SOF instead of using drv_data as done by Skylake. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit b92826fa8c5a423edf6c9e385b5d433c61375cc8 Author: Pierre-Louis Bossart Date: Fri Nov 16 18:47:05 2018 -0600 ASoC: Intel: fix interface for Chromebook machine drivers The changes for HDaudio overlooked the fact that the machine drivers used for Chromebooks rely on the dmic number information passed as pdata. Add dmic_num field to standard interface and use standard interface instead of SKL-specific one. Also clean-up pdata definition to remove fields that are no longer used. Fixes: 842bb5135f10 ('ASoC: Intel: use standard interface for Hdaudio machine driver') Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit c969eb830175f42b6cc0c8e80f6fce452fd75788 Author: Daniel Colascione Date: Mon Nov 5 13:22:05 2018 +0000 Document /proc/pid PID reuse behavior State explicitly that holding a /proc/pid file descriptor open does not reserve the PID. Also note that in the event of PID reuse, these open file descriptors refer to the old, now-dead process, and not the new one that happens to be named the same numeric PID. Signed-off-by: Daniel Colascione Acked-by: Michal Hocko Reviewed-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 8a880560d58a7af15ec08ab2e7132a981e67e29c Author: Alexandre Belloni Date: Tue Nov 20 17:10:32 2018 +0100 MAINTAINERS, EDAC: Drop bouncing email jetztechnologies.com doesn't exist anymore and emails to Ranganathan are bouncing. Signed-off-by: Alexandre Belloni Signed-off-by: Borislav Petkov Cc: "Arvind R ." Cc: Mauro Carvalho Chehab Cc: linux-edac Link: https://lkml.kernel.org/r/20181120161032.3417-1-alexandre.belloni@bootlin.com commit 37d964f9147ac629f416fd813ed7dc093a2d8969 Author: Alexandre Belloni Date: Tue Nov 20 16:33:04 2018 +0100 EDAC, i82975x: Fix spelling mistake "reserverd" -> "reserved" Fix a spelling mistake in a register layout description. Signed-off-by: Alexandre Belloni Signed-off-by: Borislav Petkov Cc: "Arvind R." Cc: linux-edac Link: https://lkml.kernel.org/r/20181120153304.1218-1-alexandre.belloni@bootlin.com commit 1428cc0e0c36de4f32b3de38ae497394dca6972b Author: NeilBrown Date: Mon Nov 19 11:55:46 2018 +1100 Documentation: update path-lookup.md for parallel lookups Since this document was written, i_mutex has been replace with i_rwsem, and shared locks are utilized to allow lookups in the one directory to happen in parallel. So replace i_mutex with i_rwsem, and explain how this is used for parallel lookups. Signed-off-by: NeilBrown Signed-off-by: Jonathan Corbet commit a59817fa8f4d299c46c94842bd2acb2aeff67d88 Author: York Sun Date: Mon Nov 19 22:53:40 2018 +0000 EDAC, fsl: Move error injection under CONFIG_EDAC_DEBUG Gate error injection feature with CONFIG_EDAC_DEBUG so that it is not visible in production setups. Suggested-by: Borislav Petkov Signed-off-by: York Sun Signed-off-by: Borislav Petkov Cc: linux-edac Link: https://lkml.kernel.org/r/20181119225303.13265-1-york.sun@nxp.com commit 806654a9667c6f60a65f1a4a4406082b5de51233 Author: Will Deacon Date: Mon Nov 19 11:02:45 2018 +0000 Documentation: Use "while" instead of "whilst" Whilst making an unrelated change to some Documentation, Linus sayeth: | Afaik, even in Britain, "whilst" is unusual and considered more | formal, and "while" is the common word. | | [...] | | Can we just admit that we work with computers, and we don't need to | use þe eald Englisc spelling of words that most of the world never | uses? dictionary.com refers to the word as "Chiefly British", which is probably an undesirable attribute for technical documentation. Replace all occurrences under Documentation/ with "while". Cc: David Howells Cc: Liam Girdwood Cc: Chris Wilson Cc: Michael Halcrow Cc: Jonathan Corbet Reported-by: Linus Torvalds Signed-off-by: Will Deacon Signed-off-by: Jonathan Corbet commit 48c465d23d5ce55a84062e556e07a8a663349536 Author: Andy Shevchenko Date: Tue Nov 20 15:15:33 2018 +0200 dmaengine: Add mailing list address to the documentation It's not the first time I've got a private email in regard to dmatest.c module. Motivate people, by adding a note, to send their questions to the mailing list instead Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Corbet commit aa167f3fed0c37e0e4c707d4331d827661f46644 Author: Boris Brezillon Date: Tue Nov 6 17:05:33 2018 +0100 spi: spi-mem: Add a new API to support direct mapping Most modern SPI controllers can directly map a SPI memory (or a portion of the SPI memory) in the CPU address space. Most of the time this brings significant performance improvements as it automates the whole process of sending SPI memory operations every time a new region is accessed. This new API allows SPI memory drivers to create direct mappings and then use them to access the memory instead of using spi_mem_exec_op(). Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Mark Brown commit f86c24f4795303e4024bc113196de32782f6ccb5 Author: Boris Brezillon Date: Tue Nov 6 17:05:32 2018 +0100 spi: spi-mem: Split spi_mem_exec_op() code The logic surrounding the ->exec_op() call applies to direct mapping accessors. Move this code to separate functions to avoid duplicating code. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Mark Brown commit 0ebb261a0b2d090de618a383d2378d4a00834958 Author: Boris Brezillon Date: Tue Nov 6 17:05:31 2018 +0100 spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum When defining spi_mem_op templates we don't necessarily know the size that will be passed when the template is actually used, and basing the supports_op() check on op->data.nbytes to know whether there will be data transferred for a specific operation is this not possible. Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum so that we can base our checks on op->data.dir instead of op->data.nbytes. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Mark Brown commit cf17e50a5c65ae86353fbf88cc2c8bd8e18a1a19 Author: Mike Rapoport Date: Sun Nov 11 11:24:23 2018 +0200 docs/admin-guide/mm/concepts.rst: grammar and style fixups Signed-off-by: Mike Rapoport Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit 6afe76a6723975391d06c42a422370a588395f84 Author: Boris Brezillon Date: Tue Nov 6 17:05:30 2018 +0100 spi: spi-mem: Add missing word in the SPI_MEM_DATA_OUT description Missing 'to' in the SPI_MEM_DATA_OUT description. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Mark Brown commit 3870a2371263d4f8e6cec4a8b3860c1f6ee601ad Merge: acf0f57a2cb89 01598ba6b1a86 Author: Jonathan Corbet Date: Tue Nov 20 09:22:24 2018 -0700 Merge branch 'kmalloc' into docs-next jc: fixed conflict with willy's memory-allocation tag patch. commit 01598ba6b1a863fbd819fc5c36c27886e5072164 Author: Mike Rapoport Date: Sun Nov 11 18:48:44 2018 +0200 docs/mm: update kmalloc kernel-doc description Add references to GFP documentation and the memory-allocation.rst and remove GFP_USER, GFP_DMA and GFP_NOIO descriptions. While on it slightly change the formatting so that the list of GFP flags will be rendered as "description" in the generated html. Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit acf0f57a2cb89be0d99fb834079f91b1c67aa133 Author: Matthew Wilcox Date: Mon Nov 19 08:00:49 2018 -0800 Link the memory allocation guide from the MM docs I just went looking for the memory allocation guide in the MM docs instead of in the core API. For the benefit of the next person who makes that mistake, link to it from the MM docs. Signed-off-by: Matthew Wilcox Acked-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit e9d81a1bc2c48ea9782e3e8b53875f419766ef47 Author: Tejun Heo Date: Thu Nov 8 12:15:15 2018 -0800 cgroup: fix CSS_TASK_ITER_PROCS CSS_TASK_ITER_PROCS implements process-only iteration by making css_task_iter_advance() skip tasks which aren't threadgroup leaders; however, when an iteration is started css_task_iter_start() calls the inner helper function css_task_iter_advance_css_set() instead of css_task_iter_advance(). As the helper doesn't have the skip logic, when the first task to visit is a non-leader thread, it doesn't get skipped correctly as shown in the following example. # ps -L 2030 PID LWP TTY STAT TIME COMMAND 2030 2030 pts/0 Sl+ 0:00 ./test-thread 2030 2031 pts/0 Sl+ 0:00 ./test-thread # mkdir -p /sys/fs/cgroup/x/a/b # echo threaded > /sys/fs/cgroup/x/a/cgroup.type # echo threaded > /sys/fs/cgroup/x/a/b/cgroup.type # echo 2030 > /sys/fs/cgroup/x/a/cgroup.procs # cat /sys/fs/cgroup/x/a/cgroup.threads 2030 2031 # cat /sys/fs/cgroup/x/cgroup.procs 2030 # echo 2030 > /sys/fs/cgroup/x/a/b/cgroup.threads # cat /sys/fs/cgroup/x/cgroup.procs 2031 2030 The last read of cgroup.procs is incorrectly showing non-leader 2031 in cgroup.procs output. This can be fixed by updating css_task_iter_advance() to handle the first advance and css_task_iters_tart() to call css_task_iter_advance() instead of the inner helper. After the fix, the same commands result in the following (correct) result: # ps -L 2062 PID LWP TTY STAT TIME COMMAND 2062 2062 pts/0 Sl+ 0:00 ./test-thread 2062 2063 pts/0 Sl+ 0:00 ./test-thread # mkdir -p /sys/fs/cgroup/x/a/b # echo threaded > /sys/fs/cgroup/x/a/cgroup.type # echo threaded > /sys/fs/cgroup/x/a/b/cgroup.type # echo 2062 > /sys/fs/cgroup/x/a/cgroup.procs # cat /sys/fs/cgroup/x/a/cgroup.threads 2062 2063 # cat /sys/fs/cgroup/x/cgroup.procs 2062 # echo 2062 > /sys/fs/cgroup/x/a/b/cgroup.threads # cat /sys/fs/cgroup/x/cgroup.procs 2062 Signed-off-by: Tejun Heo Reported-by: "Michael Kerrisk (man-pages)" Fixes: 8cfd8147df67 ("cgroup: implement cgroup v2 thread support") Cc: stable@vger.kernel.org # v4.14+ commit a929a42a3e7e8f8bebde51ead6742884782f6fcc Author: Federico Vaga Date: Fri Nov 9 00:24:17 2018 +0100 doc:it_IT:doc-guide: fix reference to foobar Replicate the following patch into italian translation 1bb37a35671c doc-guide:kernel-doc.rst: Reference to foobar Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet commit 34523ec2f437eca4050862bfaead5b1fe3677f94 Author: Federico Vaga Date: Fri Nov 9 00:24:16 2018 +0100 doc:it_IT: fix locking.rst section title This title was still in English. I just translated it Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet commit edba5eecfd6e96ea9b8e3e5b1db1f9dc9eb77af8 Author: Federico Vaga Date: Fri Nov 9 00:24:15 2018 +0100 doc:it_IT: add some process/* translations This patch does not translate entirely the subfolder "process/" but only part of it (to begin with). In order to avoid broken links, I included empty documents for those which are not yet translated. In order to be able to refer to all documents in "process/", I added a sphinx label to those which had not one. Translated documents: - howto - 1.Intro - clang-format - coding-style - kernel-driver-statement - magic-number - volatile-considered-harmful - development-process Signed-off-by: Federico Vaga Signed-off-by: Alessia Mantegazza Signed-off-by: Jonathan Corbet commit 7b51a821211eb6217f60962c31f30cb73e30a0c7 Author: Douglas Anderson Date: Mon Nov 19 16:26:48 2018 -0800 regulator: core: Properly expose requested_microamps in sysfs The "requested_microamps" sysfs attribute was only being exposed for "current" regulators. This didn't make sense. Allow it to be exposed always. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown commit 9e6d9c9b737326d880e52ebe5a845f4afde378ea Author: Charles Keepax Date: Tue Nov 20 14:16:28 2018 +0000 regulator: lochnagar: Add initial binding documentation Lochnagar is an evaluation and development board for Cirrus Logic Smart CODEC and Amp devices. It allows the connection of most Cirrus Logic devices on mini-cards, as well as allowing connection of various application processor systems to provide a full evaluation platform. This driver supports the board controller chip on the Lochnagar board. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit d90acbc4e3ddd72ccccebcaf9cdc7ed8da669132 Author: Charles Keepax Date: Tue Nov 20 14:16:24 2018 +0000 regulator: lochnagar: Move driver to binding from DT Based on review comments on the MFD driver, move the child drivers for the Lochnagar MFD over to binding through device tree. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit 4647598cde0e55d5c6d6a3c4223953611a472289 Author: Peter Ujfalusi Date: Tue Nov 20 14:42:53 2018 +0200 ASoC: tlv320aic3x: Add support for CBM_CFS and CBS_CFM clocking modes The codec can support any variation of bclk/fs master/slave configuration. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit d7c7fc442fa6f6f0cd0115d7b8dbdf6fe2eeea44 Author: Marek Szyprowski Date: Tue Nov 20 13:38:44 2018 +0100 regulator: s2mps11: Fix GPIO descriptor initialization GPIO descriptor array must be zero initialized to ensure that core will properly handle also the case when no external GPIO pin is defined. Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown commit f1abf67217de91f5cd3c757ae857632ca565099a Author: Mark Brown Date: Fri Nov 16 19:19:30 2018 -0800 regulator: Fix return value of _set_load() stub The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang Signed-off-by: Mark Brown Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown commit 14a742724fc0f089893c6f70a62d30ab418ed7ff Author: Dmitry Osipenko Date: Tue Nov 20 04:20:19 2018 +0300 regulator: core: Export regulator_lock and regulator_unlock This fixes compiling regulator drivers that use these function when these drivers are built as kernel modules. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit e32c8d3caefbb8ec734a0a79c8d4245f38c99d2a Author: Chris Wilson Date: Tue Nov 20 12:06:01 2018 +0000 drm/i915/selftests: Hold task reference to reset worker As the worker may exit by itself, we need to hold a task reference to it in the parent. References: https://bugs.freedesktop.org/show_bug.cgi?id=108735 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181120120601.24083-1-chris@chris-wilson.co.uk commit 61e49394a31aee438e026e553a1422e13e0309d9 Author: Stanislav Lisovskiy Date: Fri Nov 9 11:39:15 2018 +0200 drm: Introduce new DRM_FORMAT_XYUV v5: This is YUV444 packed format same as AYUV, but without alpha, as supported by i915. v6: Removed unneeded initializer for new XYUV format. v7: Added is_yuv field initialization according to latest drm_fourcc format structure initialization changes. v8: Edited commit message to be more clear about skl+, renamed PLANE_CTL_FORMAT_AYUV to PLANE_CTL_FORMAT_XYUV as this format doesn't support per-pixel alpha. Fixed minor code issues. v9: Moved DRM format check to proper place in intel_framebuffer_init. v10: Changed DRM_FORMAT_XYUV to be DRM_FORMAT_XYUV8888 v11: Fixed rebase conflict, caused by added new formats to drm-tip meanwhile. Reviewed-by: Alexandru Gheorghe Signed-off-by: Stanislav Lisovskiy [vsyrjala: Removed stray tab and sorted the formats differently] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181109093916.25858-2-stanislav.lisovskiy@intel.com commit 3db8d37dd84e93f352b8a8d34a713415cd1a6d0f Author: Noralf Trønnes Date: Sat Nov 10 15:56:47 2018 +0100 drm/tinydrm: Use DRM_GEM_CMA_VMAP_DRIVER_OPS The CMA helper now has the functionality to ensure a virtual address on imported buffer so use that. While touching all tinydrm drivers, remove the unnecessary inclusion of drm_fb_helper.h in some drivers. Cc: David Lechner Cc: Eric Anholt Signed-off-by: Noralf Trønnes Acked-by: Christian König Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-6-noralf@tronnes.org commit b9068cde51eea189c2c3560a9a8ae83f7b213c9c Author: Noralf Trønnes Date: Sat Nov 10 15:56:46 2018 +0100 drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS This adds functionality to the CMA helper which ensures that the kernel virtual address is set on the CMA GEM object also for imported buffers. The drivers have been audited to ensure that none set ->vaddr on imported buffers, making the conditional dma_buf_vunmap() call in drm_gem_cma_free_object() safe. Signed-off-by: Noralf Trønnes Acked-by: Christian König Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-5-noralf@tronnes.org commit b39b5394fabc79acbaafb26b777fd348c868bf7e Author: Noralf Trønnes Date: Sat Nov 10 15:56:45 2018 +0100 drm/gem: Add drm_gem_object_funcs This adds an optional function table on GEM objects. The main benefit is for drivers that support more than one type of memory (shmem,vram,cma) for their buffers depending on the hardware it runs on. With the callbacks attached to the GEM object itself, it is easier to have core helpers for the the various buffer types. The driver only has to make the decision about buffer type on GEM object creation and all other callbacks can be handled by the chosen helper. drm_driver->gem_prime_res_obj has not been added since there's a todo to put a reservation_object into drm_gem_object. v3: Add todo entry v2: Drop drm_gem_object_funcs->prime_mmap in favour of drm_gem_prime_mmap() (Daniel Vetter) v1: - drm_gem_object_funcs.map -> .prime_map let it only do PRIME mmap like the function it superseeds (Daniel Vetter) - Flip around the if ladders and make obj->funcs the first choice highlighting the fact that this the new default way of doing it (Daniel Vetter) Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-4-noralf@tronnes.org commit 7698799f9554deeb0f3abb22857c3deb41c10db8 Author: Noralf Trønnes Date: Sat Nov 10 15:56:44 2018 +0100 drm/prime: Add drm_gem_prime_mmap() Add a generic PRIME GEM mmap function. v2: Fix link in docs (Daniel Vetter) Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-3-noralf@tronnes.org commit f001488112c43fea6b7558e15f71d64ee7495286 Author: Noralf Trønnes Date: Sat Nov 10 15:56:43 2018 +0100 drm/driver: Add defaults for .gem_prime_export/import callbacks The majority of drivers use drm_gem_prime_export() and drm_gem_prime_import() for these callbacks so let's make them the default. Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-2-noralf@tronnes.org commit f577f7eac5ad19eb1455acd2ec22aeb5f6a40ba0 Author: Colin Ian King Date: Tue Nov 6 15:40:22 2018 +0000 drm/panel: s6d16d0: fix spelling mistake "enble" -> "enable" Trivial fix to spelling mistake in DRM_DEV_ERROR error message Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181106154022.9209-1-colin.king@canonical.com commit e24b6b513e747727ee56b77ad46f04dff36cee53 Author: Leonard Crestez Date: Mon Oct 8 18:06:20 2018 +0000 dt-bindings: imx6q-pcie: Add multi-pd bindings for imx6sx The PCIe and PCIE_PHY blocks are in different power domains on imx6sx and this needs to be described using multi-pd bindings. This was not required until now because the power-domain of the PCIe block (DISPLAY) was always on. Signed-off-by: Leonard Crestez [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit c8ebf64eab743130fe404dc6679c2ff0cbc01615 Author: Jessica Yu Date: Mon Nov 5 19:53:23 2018 +0100 arm64/module: use plt section indices for relocations Instead of saving a pointer to the .plt and .init.plt sections to apply plt-based relocations, save and use their section indices instead. The mod->arch.{core,init}.plt pointers were problematic for livepatch because they pointed within temporary section headers (provided by the module loader via info->sechdrs) that would be freed after module load. Since livepatch modules may need to apply relocations post-module-load (for example, to patch a module that is loaded later), using section indices to offset into the section headers (instead of accessing them through a saved pointer) allows livepatch modules on arm64 to pass in their own copy of the section headers to apply_relocate_add() to apply delayed relocations. Reviewed-by: Ard Biesheuvel Reviewed-by: Miroslav Benes Signed-off-by: Jessica Yu Signed-off-by: Will Deacon commit c55191e96caa9d787e8f682c5e525b7f8172a3b4 Author: Ard Biesheuvel Date: Wed Nov 7 11:36:20 2018 +0100 arm64: mm: apply r/o permissions of VM areas to its linear alias as well On arm64, we use block mappings and contiguous hints to map the linear region, to minimize the TLB footprint. However, this means that the entire region is mapped using read/write permissions, which we cannot modify at page granularity without having to take intrusive measures to prevent TLB conflicts. This means the linear aliases of pages belonging to read-only mappings (executable or otherwise) in the vmalloc region are also mapped read/write, and could potentially be abused to modify things like module code, bpf JIT code or other read-only data. So let's fix this, by extending the set_memory_ro/rw routines to take the linear alias into account. The consequence of enabling this is that we can no longer use block mappings or contiguous hints, so in cases where the TLB footprint of the linear region is a bottleneck, performance may be affected. Therefore, allow this feature to be runtime en/disabled, by setting rodata=full (or 'on' to disable just this enhancement, or 'off' to disable read-only mappings for code and r/o data entirely) on the kernel command line. Also, allow the default value to be set via a Kconfig option. Tested-by: Laura Abbott Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit b34d2ef0c60e4d9c2bb8a4d72d4519c67363d390 Author: Ard Biesheuvel Date: Wed Nov 7 11:36:19 2018 +0100 arm64: mm: purge lazily unmapped vm regions before changing permissions Call vm_unmap_aliases() every time we apply any changes to permission attributes of mappings in the vmalloc region. This avoids any potential issues resulting from lingering writable or executable aliases of mappings that should be read-only or non-executable, respectively. Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 2ac5e38ea4203852d6e99edd3cf11f044b0a409f Merge: f48cc647f3e19 9235dd441af43 Author: Jani Nikula Date: Tue Nov 20 13:14:08 2018 +0200 Merge drm/drm-next into drm-intel-next-queued Pull in v4.20-rc3 via drm-next. Signed-off-by: Jani Nikula commit f48cc647f3e196a3179d695d3c2d56c13e9dec98 Author: Jani Nikula Date: Fri Nov 16 14:07:29 2018 +0200 drm/i915/fixed: cosmetic cleanup Clean up fixed point temp variable initialization, use the more conventional tmp name for temp variables, add empty lines before return. No functional changes. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-5-jani.nikula@intel.com commit f1eea8910bfefd4c7af5249be8a8286d6ab1fadd Author: Jani Nikula Date: Fri Nov 16 14:07:28 2018 +0200 drm/i915/fixed: simplify is_fixed16_zero() Simply return the condition. No functional changes. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-4-jani.nikula@intel.com commit e7a23816913177d652802c4756f677368b32e5c4 Author: Jani Nikula Date: Fri Nov 16 14:07:27 2018 +0200 drm/i915/fixed: simplify FP_16_16_MAX definition No need to use a compound statement enclosed in parenthesis where a C99 compound literal will do. No functional changes. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-3-jani.nikula@intel.com commit 3122b9c52705eec649c0dde5d9d8a9983b8c2572 Author: Jani Nikula Date: Fri Nov 16 14:07:26 2018 +0200 drm/i915/fixed: prefer kernel types over stdint types While at it, conform to kernel spacing (i.e. no space) after cast. No functional changes. Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-2-jani.nikula@intel.com commit 2d332ee12396d8f9007e1f896c48cc9088cf55be Author: Jani Nikula Date: Fri Nov 16 14:07:25 2018 +0200 drm/i915: extract fixed point math to i915_fixed.h Reduce bloat in one of the bigger header files. Fix some indentation while at it. No functional changes. v2: Add include guards (Joonas) Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-1-jani.nikula@intel.com commit 0e2c8fb54d7ae0c3e816dc8b1eedbeb345e9cdad Author: André Almeida Date: Tue Nov 13 16:58:35 2018 -0200 staging: vchi: Add SPDX-License-Identifier Using multiple license representation as shown here [1]. [1] https://spdx.org/sites/cpstandard/files/pages/files/using_spdx_license_list_short_identifiers.pdf Signed-off-by: André Almeida Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 1aa30a00b5ed279e2241a1dc59b46b93a47acf0c Author: André Almeida Date: Tue Nov 13 16:58:34 2018 -0200 staging: vchi: change type 'int32_t' to 's32' As one can see in a typedef at linux/types.h:103, s32 and int32_t are both a 32 bits signed integer. s32 is preferred because it is defined by the kernel maintainers and it prevents portability issues. Changed to meet checkpatch criteria. Signed-off-by: André Almeida Signed-off-by: Greg Kroah-Hartman commit 2853a061be96b8a9009861e998746fda204ef426 Author: Cristian Sicilia Date: Mon Nov 12 21:43:59 2018 +0100 staging: erofs: unzip_vle.c: Align parameter to the parentesis Align parameters to the opened parentesis. Signed-off-by: Cristian Sicilia Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit bc8098de78d19eafbc197c29e76d96eb9e831db8 Author: Cristian Sicilia Date: Mon Nov 12 21:43:58 2018 +0100 staging: erofs: unzip_vle.c: Constant in comparison on right side Comparisons should place the constant on the right side of the test. Signed-off-by: Cristian Sicilia Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 42d40b4ad840f9b4cfc9505e253a4d3cfd712e59 Author: Cristian Sicilia Date: Mon Nov 12 21:43:57 2018 +0100 staging: erofs: unzip_vle.c: Replace comparison to NULL. Replace equal to NULL with logic unary operator, and removing not equal to NULL comparison. Signed-off-by: Cristian Sicilia Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit 700fe657dd09159710778bec394e5a11ca6c93d9 Author: Tim Collier Date: Mon Nov 19 08:41:31 2018 +0000 staging: wlan-ng: remove unused variable in prism2fw.c Remove the unused crcend variable from the crcimage function. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit e2d34dfdffcfd1c5a5fe9f1cb697a954f7f4e521 Author: Cristian Sicilia Date: Sat Nov 17 00:46:07 2018 +0100 staging: emxx_udc: Fixing function naming Fix function naming and parenthesis. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit 14d697716f99ec52dc9f32fa077487ea81b44993 Author: Cristian Sicilia Date: Sat Nov 17 00:24:49 2018 +0100 staging: axis-fifo: Split line to stay in 80 characters. The line is split up to stay in 80 characters- Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit e89760084bc1278acd040a646d0024f475b3be1d Author: Josenivaldo Benito Jr Date: Mon Nov 12 23:57:16 2018 -0200 staging: rtl8723bs: Correct errors from checkpatch Correct following errors reported by checkpath.pl: ERROR: space required before the open parenthesis '(' #265: FILE: drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c:265: +                       if(!precvframe) ')' Also similar errors on line 274 and 283. Signed-off-by: Josenivaldo Benito Jr Signed-off-by: Greg Kroah-Hartman commit 43671e60041c6efc1c3df03e02c8b5c03d21f2e1 Author: Cristian Sicilia Date: Tue Nov 13 20:34:39 2018 +0100 staging: rtlwifi: Add new line to stay in 80 characters The parameter is sent to next line to stay in 80 characters Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit fd8595413a6628ae505be07bc062360d6923c708 Author: Cristian Sicilia Date: Tue Nov 13 20:34:38 2018 +0100 staging: rtlwifi: Add spaces to match open parenthesis Added before parameters some spaces to match open parenthesis on previous line. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit 7e9463709c582d661cb1e703b40877f8334c5637 Author: Michael Straube Date: Tue Nov 13 18:13:40 2018 +0100 staging: pi433: remove GPL boiler plate text The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. All source and header files have SPDX identifiers. Remove the GPL boiler plate text to reduce file size. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 7fa28e146994da1e8a4124623d7da97b798ea520 Author: Chris Wilson Date: Mon Nov 19 15:41:53 2018 +0000 drm/i915: Write GPU relocs harder with gen3 Under moderate amounts of GPU stress, we can observe on Bearlake and Pineview (later gen3 models) that we execute the following batch buffer before the write into the batch is coherent. Adding extra (tested with upto 32x) MI_FLUSH to either the invalidation, flush or both phases does not solve the incoherency issue with the relocations, but emitting the MI_STORE_DWORD_IMM twice does. So be it. Fixes: 7dd4f6729f92 ("drm/i915: Async GPU relocation processing") Testcase: igt/gem_tiled_fence_blits # blb/pnv Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181119154153.15327-1-chris@chris-wilson.co.uk commit 927ce0f0422ea77b95495ae015e097de152dfe91 Author: Greg Kroah-Hartman Date: Tue Nov 20 10:37:04 2018 +0100 Revert "staging: greybus: remove extra space before tab" This reverts commit 57d053682ff55aa16a390ddb054a26deb4dfbf9e. Johan writes: This commit doesn't even do what it claims. It leaves the two spaces before tabs in place and instead removes a tab that was used to indent a continuation line, and therefore also hurts readability while introducing an inconsistency. Reported-by: Johan Hovold Cc: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit f8765177034a521b98ae404c8286d2d28f152310 Author: Greg Kroah-Hartman Date: Tue Nov 20 10:35:12 2018 +0100 Revert "staging: greybus: remove multiple blank lines" This reverts commit fcb733b546ea943dd2e312cc3b556159cb44345a. Johan writes: This patch removes the double newlines that were used as section headers in the lengthy protocol header file, and therefore hurts readability. So I'm reverting it. Reported-by: Johan Hovold Cc: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit ea6b13e9fed0fda9532ee04d38ed1bef1edbfdbf Author: Fabrizio Castro Date: Mon Nov 19 13:26:18 2018 +0000 drm/bridge/sii902x: Add missing dependency on I2C_MUX kbuild test robot reports: >> ERROR: "i2c_mux_add_adapter" [drivers/gpu/drm/bridge/sii902x.ko] undefined! >> ERROR: "i2c_mux_alloc" [drivers/gpu/drm/bridge/sii902x.ko] undefined! >> ERROR: "i2c_mux_del_adapters" [drivers/gpu/drm/bridge/sii902x.ko] undefined! Quite obviously the driver depends on I2C_MUX, but adding a "depends on" introduces a recursive dependency, therefore this patch selects I2C_MUX instead. Fixes: 21d808405fe4 ("drm/bridge/sii902x: Fix EDID readback") Signed-off-by: Fabrizio Castro Link: https://lists.01.org/pipermail/kbuild-all/2018-November/054924.html Acked-by: Peter Rosin Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/1542633978-22064-1-git-send-email-fabrizio.castro@bp.renesas.com commit c21b73235e1fa644dcc725078af38e13cdb778fb Author: Dmitry Shifrin Date: Mon Nov 19 20:30:06 2018 +0300 pinctrl: sh-pfc: r8a77980: Add QSPI pins, groups, and functions Add the QSPI{0|1} pins/groups/functions to the R8A77980 PFC driver. [Sergei: ported to the upstream driver, fixed up the swapped QSPI0 SPCLK/ SSL pins, fixed up the comments, moved the QSPI pins/groups/functions to be in the alphanumeric order, removed unneeded empty lines, renamed the patch.] Signed-off-by: Dmitry Shifrin Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven commit 1e33e0db826fb48bae9587b6f3a6ea29509bc6ca Author: Chen-Yu Tsai Date: Tue Nov 20 14:53:11 2018 +0800 arm64: dts: allwinner: h6: orangepi: Add device nodes for LEDs The Orange Pi Lite 2 and Orange Pi One Plus both have two LEDs, one red and one green. These are driven directly by GPIO lines in an active high arrangement. The red LED is labeled "power", so it is set to be on by default. Note that the default drive current for the GPIO lines makes the LEDs very bright. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 9b8d1ccd6dc546aaef37eabe1b29da5d6b2b8c02 Author: Chen-Yu Tsai Date: Tue Nov 20 14:53:10 2018 +0800 arm64: dts: allwinner: h6: orangepi: Enable USB 2.0 host and OTG ports The Orange Pi Lite 2 and Orange Pi One Plus share the same design for their USB 2.0 ports. VBUS is directly tied to the board wide 5V rail, which is also directly tied to the DC jack. There is no current limiting in this design. This patch enables all the USB 2.0 related device nodes, and sets the VBUS regulator supplies and OTG ID detection GPIO. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 919d2514641f2672496df144392dc24a62ca261e Author: Chen-Yu Tsai Date: Tue Nov 20 14:53:09 2018 +0800 arm64: dts: allwinner: h6: orangepi: Add board-wide 5V regulator The Orange Pi Lite 2 and Orange Pi One Plus share the same design for their USB 2.0 ports. VBUS is directly tied to the board wide 5V rail, which is also directly tied to the DC jack. There is no current limiting in this design. This 5V rail also supplies the various inputs to the PMIC. This patch adds a board wide 5V regulator and sets it as the input to the PMIC inputs. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 29ce4e436f27562b366b9dc20ebf5a92f109f729 Author: Icenowy Zheng Date: Thu Nov 15 11:15:51 2018 +0800 arm64: dts: allwinner: h6: fix EMAC compatible string sequence The SoC-specific compatible should come before the fallback compatible string when multiple compatible strings are present, but the sequence is wrong currently on H6 EMAC node (A64 fallback before H6 compatible). Fix the sequence. Fixes: c8ced5516d23 ("arm64: allwinner: h6: add EMAC device nodes") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit 6b683d7640995dc7f68d711160378b0a0f10b5c6 Author: Jagan Teki Date: Wed Nov 14 09:58:37 2018 +0530 arm64: dts: allwinner: a64: Add device node for Mali-400 GPU Add support for Allwinner A64 has Mali-400MP2. All interrupt lines are mentioned in the manual so used the same. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit bebaa63f5c4070be025f29d182d2d43aa443b510 Author: Jagan Teki Date: Wed Nov 14 09:58:36 2018 +0530 dt-bindings: gpu: mali-utgard: Add compatible for A64 Mali Allwinner A64 has Mali-400MP2, so document the relevant compatible as "allwinner,sun50i-a64-mali" along with reset line. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit 1ad33f5aec20f53785dbad44c6fb3b204aefd921 Author: Andy Lutomirski Date: Mon Nov 19 14:45:32 2018 -0800 x86/fault: Don't set thread.cr2, etc before OOPSing The fault handling code sets the cr2, trap_nr, and error_code fields in thread_struct before OOPSing. No one reads those fields during an OOPS, so remove the code to set them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/d418022aa0fad9cb40467aa7acaf4e95be50ee96.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit e49d3cbef0176c182b86206185f137a87f16ab91 Author: Andy Lutomirski Date: Mon Nov 19 14:45:31 2018 -0800 x86/fault: Make error_code sanitization more robust The error code in a page fault on a kernel address indicates whether that address is mapped, which should not be revealed in a signal. The normal code path for a page fault on a kernel address sanitizes the bit, but the paths for vsyscall emulation and SIGBUS do not. Both are harmless, but for subtle reasons. SIGBUS is never sent for a kernel address, and vsyscall emulation will never fault on a kernel address per se because it will fail an access_ok() check instead. Make the code more robust by adding a helper that sets the relevant fields and sanitizing the error code in the helper. This also cleans up the code -- we had three copies of roughly the same thing. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/b31159bd55bd0c4fa061a20dfd6c429c094bebaa.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 6ea59b074f15e7ef4b042a108950861b383e7b02 Author: Andy Lutomirski Date: Mon Nov 19 14:45:30 2018 -0800 x86/fault: Improve the condition for signalling vs OOPSing __bad_area_nosemaphore() currently checks the X86_PF_USER bit in the error code to decide whether to send a signal or to treat the fault as a kernel error. This can cause somewhat erratic behavior. The straightforward cases where the CPL agrees with the hardware USER bit are all correct, but the other cases are confusing. - A user instruction accessing a kernel address with supervisor privilege (e.g. a descriptor table access failed). The USER bit will be clear, and we OOPS. This is correct, because it indicates a kernel bug, not a user error. - A user instruction accessing a user address with supervisor privilege (e.g. a descriptor table was incorrectly pointing at user memory). __bad_area_nosemaphore() will be passed a modified error code with the user bit set, and we will send a signal. Sending the signal will work (because the regs and the entry frame genuinely come from user mode), but we really ought to OOPS, as this event indicates a severe kernel bug. - A kernel instruction with user privilege (i.e. WRUSS). This should OOPS or get fixed up. The current code would instead try send a signal and malfunction. Change the logic: a signal should be sent if the faulting context is user mode *and* the access has user privilege. Otherwise it's either a kernel mode fault or a failed implicit access, either of which should end up in no_context(). Note to -stable maintainers: don't backport this unless you backport CET. The bug it fixes is unobservable in current kernels unless something is extremely wrong. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/10e509c43893170e262e82027ea399130ae81159.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit e50928d7213e72ee95507221a89ed07d2bb6517b Author: Andy Lutomirski Date: Mon Nov 19 14:45:29 2018 -0800 x86/fault: Fix SMAP #PF handling buglet for implicit supervisor accesses Currently, if a user program somehow triggers an implicit supervisor access to a user address (e.g. if the kernel somehow sets LDTR to a user address), it will be incorrectly detected as a SMAP violation if AC is clear and SMAP is enabled. This is incorrect -- the error has nothing to do with SMAP. Fix the condition so that only accesses with the hardware USER bit set are diagnosed as SMAP violations. With the logic fixed, an implicit supervisor access to a user address will hit the code lower in the function that is intended to handle it even if SMAP is enabled. That logic is still a bit buggy, and later patches will clean it up. I *think* this code is still correct for WRUSS, and I've added a comment to that effect. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/d1d1b2e66ef31f884dba172084486ea9423ddcdb.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit a15781b536293edc32bf374233f3b8ad77c3f72b Author: Andy Lutomirski Date: Mon Nov 19 14:45:28 2018 -0800 x86/fault: Fold smap_violation() into do_user_addr_fault() smap_violation() has a single caller, and the contents are a bit nonsensical. I'm going to fix it, but first let's fold it into its caller for ease of comprehension. In this particular case, the user_mode(regs) check is incorrect -- it will cause false positives in the case of a user-initiated kernel-privileged access. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/806c366f6ca861152398ce2c01744d59d9aceb6d.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit dae0a10593007d049ea71601357ac41d4f247ee9 Author: Andy Lutomirski Date: Mon Nov 19 14:45:27 2018 -0800 x86/cpufeatures, x86/fault: Mark SMAP as disabled when configured out Add X86_FEATURE_SMAP to the disabled features mask as appropriate and use cpu_feature_enabled() in the fault code. This lets us get rid of a redundant IS_ENABLED(CONFIG_X86_SMAP). Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/fe93332eded3d702f0b0b4cf83928d6830739ba3.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 6344be608c039f3a787f1144c46fcb04c0f76561 Author: Andy Lutomirski Date: Mon Nov 19 14:45:25 2018 -0800 x86/fault: Check user_mode(regs) when avoiding an mmap_sem deadlock The fault-handling code that takes mmap_sem needs to avoid a deadlock that could occur if the kernel took a bad (OOPS-worthy) page fault on a user address while holding mmap_sem. This can only happen if the faulting instruction was in the kernel (i.e. user_mode(regs)). Rather than checking the sw_error_code (which will have the USER bit set if the fault was a USER-permission access *or* if user_mode(regs)), just check user_mode(regs) directly. The old code would have malfunctioned if the kernel executed a bogus WRUSS instruction while holding mmap_sem. Fortunately, that is extremely unlikely in current kernels, which don't use WRUSS. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/4b89b542e8ceba9bd6abde2f386afed6d99244a9.1542667307.git.luto@kernel.org Signed-off-by: Ingo Molnar commit 059c2a4d8e164dccc3078e49e7f286023b019a98 Author: Eric Biggers Date: Fri Nov 16 17:26:31 2018 -0800 crypto: adiantum - add Adiantum support Add support for the Adiantum encryption mode. Adiantum was designed by Paul Crowley and is specified by our paper: Adiantum: length-preserving encryption for entry-level processors (https://eprint.iacr.org/2018/720.pdf) See our paper for full details; this patch only provides an overview. Adiantum is a tweakable, length-preserving encryption mode designed for fast and secure disk encryption, especially on CPUs without dedicated crypto instructions. Adiantum encrypts each sector using the XChaCha12 stream cipher, two passes of an ε-almost-∆-universal (εA∆U) hash function, and an invocation of the AES-256 block cipher on a single 16-byte block. On CPUs without AES instructions, Adiantum is much faster than AES-XTS; for example, on ARM Cortex-A7, on 4096-byte sectors Adiantum encryption is about 4 times faster than AES-256-XTS encryption, and decryption about 5 times faster. Adiantum is a specialization of the more general HBSH construction. Our earlier proposal, HPolyC, was also a HBSH specialization, but it used a different εA∆U hash function, one based on Poly1305 only. Adiantum's εA∆U hash function, which is based primarily on the "NH" hash function like that used in UMAC (RFC4418), is about twice as fast as HPolyC's; consequently, Adiantum is about 20% faster than HPolyC. This speed comes with no loss of security: Adiantum is provably just as secure as HPolyC, in fact slightly *more* secure. Like HPolyC, Adiantum's security is reducible to that of XChaCha12 and AES-256, subject to a security bound. XChaCha12 itself has a security reduction to ChaCha12. Therefore, one need not "trust" Adiantum; one need only trust ChaCha12 and AES-256. Note that the εA∆U hash function is only used for its proven combinatorical properties so cannot be "broken". Adiantum is also a true wide-block encryption mode, so flipping any plaintext bit in the sector scrambles the entire ciphertext, and vice versa. No other such mode is available in the kernel currently; doing the same with XTS scrambles only 16 bytes. Adiantum also supports arbitrary-length tweaks and naturally supports any length input >= 16 bytes without needing "ciphertext stealing". For the stream cipher, Adiantum uses XChaCha12 rather than XChaCha20 in order to make encryption feasible on the widest range of devices. Although the 20-round variant is quite popular, the best known attacks on ChaCha are on only 7 rounds, so ChaCha12 still has a substantial security margin; in fact, larger than AES-256's. 12-round Salsa20 is also the eSTREAM recommendation. For the block cipher, Adiantum uses AES-256, despite it having a lower security margin than XChaCha12 and needing table lookups, due to AES's extensive adoption and analysis making it the obvious first choice. Nevertheless, for flexibility this patch also permits the "adiantum" template to be instantiated with XChaCha20 and/or with an alternate block cipher. We need Adiantum support in the kernel for use in dm-crypt and fscrypt, where currently the only other suitable options are block cipher modes such as AES-XTS. A big problem with this is that many low-end mobile devices (e.g. Android Go phones sold primarily in developing countries, as well as some smartwatches) still have CPUs that lack AES instructions, e.g. ARM Cortex-A7. Sadly, AES-XTS encryption is much too slow to be viable on these devices. We did find that some "lightweight" block ciphers are fast enough, but these suffer from problems such as not having much cryptanalysis or being too controversial. The ChaCha stream cipher has excellent performance but is insecure to use directly for disk encryption, since each sector's IV is reused each time it is overwritten. Even restricting the threat model to offline attacks only isn't enough, since modern flash storage devices don't guarantee that "overwrites" are really overwrites, due to wear-leveling. Adiantum avoids this problem by constructing a "tweakable super-pseudorandom permutation"; this is the strongest possible security model for length-preserving encryption. Of course, storing random nonces along with the ciphertext would be the ideal solution. But doing that with existing hardware and filesystems runs into major practical problems; in most cases it would require data journaling (like dm-integrity) which severely degrades performance. Thus, for now length-preserving encryption is still needed. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 16aae3595a9d41c97d983889b341c455779c2ecf Author: Eric Biggers Date: Fri Nov 16 17:26:30 2018 -0800 crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 Add an ARM NEON implementation of NHPoly1305, an ε-almost-∆-universal hash function used in the Adiantum encryption mode. For now, only the NH portion is actually NEON-accelerated; the Poly1305 part is less performance-critical so is just implemented in C. Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 26609a21a9460145e37d90947ad957b358a05288 Author: Eric Biggers Date: Fri Nov 16 17:26:29 2018 -0800 crypto: nhpoly1305 - add NHPoly1305 support Add a generic implementation of NHPoly1305, an ε-almost-∆-universal hash function used in the Adiantum encryption mode. CONFIG_NHPOLY1305 is not selectable by itself since there won't be any real reason to enable it without also enabling Adiantum support. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1b6fd3d5d18bbc1b1abf3b0cbc4b95a9a63d407b Author: Eric Biggers Date: Fri Nov 16 17:26:28 2018 -0800 crypto: poly1305 - add Poly1305 core API Expose a low-level Poly1305 API which implements the ε-almost-∆-universal (εA∆U) hash function underlying the Poly1305 MAC and supports block-aligned inputs only. This is needed for Adiantum hashing, which builds an εA∆U hash function from NH and a polynomial evaluation in GF(2^{130}-5); this polynomial evaluation is identical to the one the Poly1305 MAC does. However, the crypto_shash Poly1305 API isn't very appropriate for this because its calling convention assumes it is used as a MAC, with a 32-byte "one-time key" provided for every digest. But by design, in Adiantum hashing the performance of the polynomial evaluation isn't nearly as critical as NH. So it suffices to just have some C helper functions. Thus, this patch adds such functions. Acked-by: Martin Willi Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 878afc35cd28bcd93cd3c5e1985ef39a104a4d45 Author: Eric Biggers Date: Fri Nov 16 17:26:27 2018 -0800 crypto: poly1305 - use structures for key and accumulator In preparation for exposing a low-level Poly1305 API which implements the ε-almost-∆-universal (εA∆U) hash function underlying the Poly1305 MAC and supports block-aligned inputs only, create structures poly1305_key and poly1305_state which hold the limbs of the Poly1305 "r" key and accumulator, respectively. These structures could actually have the same type (e.g. poly1305_val), but different types are preferable, to prevent misuse. Acked-by: Martin Willi Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit bdb063a79f6da589af1de3f10a7c8f654fba9ae8 Author: Eric Biggers Date: Fri Nov 16 17:26:26 2018 -0800 crypto: arm/chacha - add XChaCha12 support Now that the 32-bit ARM NEON implementation of ChaCha20 and XChaCha20 has been refactored to support varying the number of rounds, add support for XChaCha12. This is identical to XChaCha20 except for the number of rounds, which is 12 instead of 20. XChaCha12 is faster than XChaCha20 but has a lower security margin, though still greater than AES-256's since the best known attacks make it through only 7 rounds. See the patch "crypto: chacha - add XChaCha12 support" for more details about why we need XChaCha12 support. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3cc215198eac75cc4130729ddd94a5cdbdb4d300 Author: Eric Biggers Date: Fri Nov 16 17:26:25 2018 -0800 crypto: arm/chacha20 - refactor to allow varying number of rounds In preparation for adding XChaCha12 support, rename/refactor the NEON implementation of ChaCha20 to support different numbers of rounds. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d97a94309d764ed907d4281da6246f5d935166f8 Author: Eric Biggers Date: Fri Nov 16 17:26:24 2018 -0800 crypto: arm/chacha20 - add XChaCha20 support Add an XChaCha20 implementation that is hooked up to the ARM NEON implementation of ChaCha20. This is needed for use in the Adiantum encryption mode; see the generic code patch, "crypto: chacha20-generic - add XChaCha20 support", for more details. We also update the NEON code to support HChaCha20 on one block, so we can use that in XChaCha20 rather than calling the generic HChaCha20. This required factoring the permutation out into its own macro. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit be2830b15b60011845ad701076511e8b93b2fd76 Author: Eric Biggers Date: Fri Nov 16 17:26:23 2018 -0800 crypto: arm/chacha20 - limit the preemption-disabled section To improve responsivesess, disable preemption for each step of the walk (which is at most PAGE_SIZE) rather than for the entire encryption/decryption operation. Suggested-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit aa7624093cb7fbf4fea95e612580d8d29a819f67 Author: Eric Biggers Date: Fri Nov 16 17:26:22 2018 -0800 crypto: chacha - add XChaCha12 support Now that the generic implementation of ChaCha20 has been refactored to allow varying the number of rounds, add support for XChaCha12, which is the XSalsa construction applied to ChaCha12. ChaCha12 is one of the three ciphers specified by the original ChaCha paper (https://cr.yp.to/chacha/chacha-20080128.pdf: "ChaCha, a variant of Salsa20"), alongside ChaCha8 and ChaCha20. ChaCha12 is faster than ChaCha20 but has a lower, but still large, security margin. We need XChaCha12 support so that it can be used in the Adiantum encryption mode, which enables disk/file encryption on low-end mobile devices where AES-XTS is too slow as the CPUs lack AES instructions. We'd prefer XChaCha20 (the more popular variant), but it's too slow on some of our target devices, so at least in some cases we do need the XChaCha12-based version. In more detail, the problem is that Adiantum is still much slower than we're happy with, and encryption still has a quite noticeable effect on the feel of low-end devices. Users and vendors push back hard against encryption that degrades the user experience, which always risks encryption being disabled entirely. So we need to choose the fastest option that gives us a solid margin of security, and here that's XChaCha12. The best known attack on ChaCha breaks only 7 rounds and has 2^235 time complexity, so ChaCha12's security margin is still better than AES-256's. Much has been learned about cryptanalysis of ARX ciphers since Salsa20 was originally designed in 2005, and it now seems we can be comfortable with a smaller number of rounds. The eSTREAM project also suggests the 12-round version of Salsa20 as providing the best balance among the different variants: combining very good performance with a "comfortable margin of security". Note that it would be trivial to add vanilla ChaCha12 in addition to XChaCha12. However, it's unneeded for now and therefore is omitted. As discussed in the patch that introduced XChaCha20 support, I considered splitting the code into separate chacha-common, chacha20, xchacha20, and xchacha12 modules, so that these algorithms could be enabled/disabled independently. However, since nearly all the code is shared anyway, I ultimately decided there would have been little benefit to the added complexity. Reviewed-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1ca1b917940c24ca3d1f490118c5474168622953 Author: Eric Biggers Date: Fri Nov 16 17:26:21 2018 -0800 crypto: chacha20-generic - refactor to allow varying number of rounds In preparation for adding XChaCha12 support, rename/refactor chacha20-generic to support different numbers of rounds. The justification for needing XChaCha12 support is explained in more detail in the patch "crypto: chacha - add XChaCha12 support". The only difference between ChaCha{8,12,20} are the number of rounds itself; all other parts of the algorithm are the same. Therefore, remove the "20" from all definitions, structures, functions, files, etc. that will be shared by all ChaCha versions. Also make ->setkey() store the round count in the chacha_ctx (previously chacha20_ctx). The generic code then passes the round count through to chacha_block(). There will be a ->setkey() function for each explicitly allowed round count; the encrypt/decrypt functions will be the same. I decided not to do it the opposite way (same ->setkey() function for all round counts, with different encrypt/decrypt functions) because that would have required more boilerplate code in architecture-specific implementations of ChaCha and XChaCha. Reviewed-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit de61d7ae5d3789dcba3749a418f76613fbee8414 Author: Eric Biggers Date: Fri Nov 16 17:26:20 2018 -0800 crypto: chacha20-generic - add XChaCha20 support Add support for the XChaCha20 stream cipher. XChaCha20 is the application of the XSalsa20 construction (https://cr.yp.to/snuffle/xsalsa-20081128.pdf) to ChaCha20 rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length from 64 bits (or 96 bits, depending on convention) to 192 bits, while provably retaining ChaCha20's security. XChaCha20 uses the ChaCha20 permutation to map the key and first 128 nonce bits to a 256-bit subkey. Then, it does the ChaCha20 stream cipher with the subkey and remaining 64 bits of nonce. We need XChaCha support in order to add support for the Adiantum encryption mode. Note that to meet our performance requirements, we actually plan to primarily use the variant XChaCha12. But we believe it's wise to first add XChaCha20 as a baseline with a higher security margin, in case there are any situations where it can be used. Supporting both variants is straightforward. Since XChaCha20's subkey differs for each request, XChaCha20 can't be a template that wraps ChaCha20; that would require re-keying the underlying ChaCha20 for every request, which wouldn't be thread-safe. Instead, we make XChaCha20 its own top-level algorithm which calls the ChaCha20 streaming implementation internally. Similar to the existing ChaCha20 implementation, we define the IV to be the nonce and stream position concatenated together. This allows users to seek to any position in the stream. I considered splitting the code into separate chacha20-common, chacha20, and xchacha20 modules, so that chacha20 and xchacha20 could be enabled/disabled independently. However, since nearly all the code is shared anyway, I ultimately decided there would have been little benefit to the added complexity of separate modules. Reviewed-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5e04542a0e0763294e9fced73a149c38c4e0cee5 Author: Eric Biggers Date: Fri Nov 16 17:26:19 2018 -0800 crypto: chacha20-generic - don't unnecessarily use atomic walk chacha20-generic doesn't use SIMD instructions or otherwise disable preemption, so passing atomic=true to skcipher_walk_virt() is unnecessary. Suggested-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit dd333449d0fb667c5250c42488a7e90470e16c77 Author: Eric Biggers Date: Fri Nov 16 17:26:18 2018 -0800 crypto: chacha20-generic - add HChaCha20 library function Refactor the unkeyed permutation part of chacha20_block() into its own function, then add hchacha20_block() which is the ChaCha equivalent of HSalsa20 and is an intermediate step towards XChaCha20 (see https://cr.yp.to/snuffle/xsalsa-20081128.pdf). HChaCha20 skips the final addition of the initial state, and outputs only certain words of the state. It should not be used for streaming directly. Reviewed-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3d234b3313cd12157946522fe35f5a4574f31169 Author: Eric Biggers Date: Wed Nov 14 12:21:11 2018 -0800 crypto: drop mask=CRYPTO_ALG_ASYNC from 'shash' tfm allocations 'shash' algorithms are always synchronous, so passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_shash() has no effect. Many users therefore already don't pass it, but some still do. This inconsistency can cause confusion, especially since the way the 'mask' argument works is somewhat counterintuitive. Thus, just remove the unneeded CRYPTO_ALG_ASYNC flags. This patch shouldn't change any actual behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1ad0f1603a6b2afb62a1c065409aaa4e43ca7627 Author: Eric Biggers Date: Wed Nov 14 12:19:39 2018 -0800 crypto: drop mask=CRYPTO_ALG_ASYNC from 'cipher' tfm allocations 'cipher' algorithms (single block ciphers) are always synchronous, so passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_cipher() has no effect. Many users therefore already don't pass it, but some still do. This inconsistency can cause confusion, especially since the way the 'mask' argument works is somewhat counterintuitive. Thus, just remove the unneeded CRYPTO_ALG_ASYNC flags. This patch shouldn't change any actual behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d41655909e3236bfb00aa69f435a9634cd74b60b Author: Eric Biggers Date: Wed Nov 14 11:35:48 2018 -0800 crypto: remove useless initializations of cra_list Some algorithms initialize their .cra_list prior to registration. But this is unnecessary since crypto_register_alg() will overwrite .cra_list when adding the algorithm to the 'crypto_alg_list'. Apparently the useless assignment has just been copy+pasted around. So, remove the useless assignments. Exception: paes_s390.c uses cra_list to check whether the algorithm is registered or not, so I left that as-is for now. This patch shouldn't change any actual behavior. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2b78aeb366365bd9cbf56c710e8b2ac494620306 Author: Eric Biggers Date: Wed Nov 14 11:10:53 2018 -0800 crypto: inside-secure - remove useless setting of type flags Remove the unnecessary setting of CRYPTO_ALG_TYPE_SKCIPHER. Commit 2c95e6d97892 ("crypto: skcipher - remove useless setting of type flags") took care of this everywhere else, but a few more instances made it into the tree at about the same time. Squash them before they get copy+pasted around again. This patch shouldn't change any actual behavior. Signed-off-by: Eric Biggers Acked-by: Antoine Tenart Signed-off-by: Herbert Xu commit 52ad259eaac0454c1ac7123e7148cf8d6e6f5301 Author: Adeodato Simó Date: Tue Nov 13 03:28:53 2018 -0300 net/9p: include trans_common.h to fix missing prototype warning. This silences -Wmissing-prototypes when defining p9_release_pages. Link: http://lkml.kernel.org/r/b1c4df8f21689b10d451c28fe38e860722d20e71.1542089696.git.dato@net.com.org.es Signed-off-by: Adeodato Simó Signed-off-by: Dominique Martinet commit 6133e78f4102405b1505b749d3bd06564ddafea9 Merge: e432abfb99e56 340a4864d538a Author: David S. Miller Date: Mon Nov 19 18:53:46 2018 -0800 Merge branch 'gred-add-offload-support' Jakub Kicinski says: ==================== gred: add offload support This series adds support for GRED offload in the nfp driver. So far we have only supported the RED Qdisc offload, but we need a way to differentiate traffic types e.g. based on DSCP marking. It may seem like PRIO+RED is a good match for this job, however, (a) we don't need strict priority behaviour of PRIO, and (b) PRIO uses the legacy way of mapping ToS fields to bands, which is quite awkward and limitting. The less commonly used GRED Qdisc is a better much for the scenario, it allows multiple sets of RED parameters and queue lengths to be maintained with a single FIFO queue. This is exactly how nfp offload behaves. We use a trivial u32 classifier to assign packets to virtual queues. There is also the minor advantage that GRED can't have its child changed, therefore limitting ways in which the configuration of SW path can diverge from HW offload. Last patch of the series adds support for (G)RED in non-ECN mode, where packets are dropped instead of marked. ==================== Signed-off-by: David S. Miller commit 340a4864d538ab718b0e888a1d5933bc13e6a372 Author: Jakub Kicinski Date: Mon Nov 19 15:21:50 2018 -0800 nfp: abm: add support for more threshold actions Original FW only allowed us to perform ECN marking. Newer releases also support plain old drop. Add the ability to configure drop policy. This is particularly useful in combination with GRED, because different bands can have different ECN marking setting. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 174ab544e3bc0b0c944b8e642618203dd0c2ecdf Author: Jakub Kicinski Date: Mon Nov 19 15:21:49 2018 -0800 nfp: abm: add cls_u32 offload for simple band classification Use offload of very simple u32 filters to direct packets to GRED bands based on the DSCP marking. No u32 hashing is supported, just plain simple filters matching on ToS or Priority with appropriate mask device can support. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 6a80240571800ba4ea2487f0531553424b6922e0 Author: Jakub Kicinski Date: Mon Nov 19 15:21:48 2018 -0800 nfp: abm: add functions to update DSCP -> virtual queue map Learn how to set the DSCP map. FW uses a packed array which geometry depends on the number of supported priorities and virtual queues. Write code to assemble this map and to communicate the setting to the FW via mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 14780c34294f41da8f02d99d7b6ada990e685561 Author: Jakub Kicinski Date: Mon Nov 19 15:21:47 2018 -0800 nfp: abm: calculate PRIO map len and check mailbox size In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 068ceb3555397dbd82593fb505688c5bd200a4ad Author: Jakub Kicinski Date: Mon Nov 19 15:21:46 2018 -0800 net: sched: cls_u32: add res to offload information In case of egress offloads the class/flowid assigned by the filter may be very important for offloaded Qdisc selection. Provide this info to drivers. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit f3d63720649413ac60f4723f117280391acd5015 Author: Jakub Kicinski Date: Mon Nov 19 15:21:45 2018 -0800 nfp: abm: add GRED offload Add support for GRED offload. It behaves much like RED, but can apply different parameters to different bands. GRED operates pretty much exactly like our HW/FW with a single FIFO and different RED state instances. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 990b50a53ad80fe4e0357c7cc41a393eea2b0d76 Author: Jakub Kicinski Date: Mon Nov 19 15:21:44 2018 -0800 nfp: abm: wrap RED parameters in bands Wrap RED parameters and stats into a structure, and a 1-element array. Upcoming GRED offload will add the support for more bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit e49efd5288bd6670cc05860fe04ef611c3887399 Author: Jakub Kicinski Date: Mon Nov 19 15:21:43 2018 -0800 net: sched: gred: support reporting stats from offloads Allow drivers which offload GRED to report back statistics. Since A lot of GRED stats is fairly ad hoc in nature pass to drivers the standard struct gnet_stats_basic/gnet_stats_queue pairs, and untangle the values in the core. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 890d8d23ec3c9eca847be0593c0cf5f650b97271 Author: Jakub Kicinski Date: Mon Nov 19 15:21:42 2018 -0800 net: sched: gred: add basic Qdisc offload Add basic offload for the GRED Qdisc. Inform the drivers any time Qdisc or virtual queue configuration changes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 184ec856cad966688e98072a1a7edae6af5d23f3 Author: Jakub Kicinski Date: Mon Nov 19 15:21:41 2018 -0800 nfp: abm: add up bands for sto/non-sto stats Add up stats for all bands for the extra ethtool statistics. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 57f31bbaa9c1576118c020aef67ca9de97f14392 Author: Jakub Kicinski Date: Mon Nov 19 15:21:40 2018 -0800 nfp: abm: switch to extended stats for reading packet/byte counts In PRIO-enabled FW read the statistics from per-band symbol, rather than from the standard per-PCIe-queue counters. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 68e9864221cae716680f64ac2832c4bfa50006f0 Author: Jakub Kicinski Date: Mon Nov 19 15:21:39 2018 -0800 nfp: abm: size threshold table to account for bands Make sure the threshold table is large enough to hold information for all bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 5720769609fbc244c67ccbcf817db44e3fa5f50c Author: Jakub Kicinski Date: Mon Nov 19 15:21:38 2018 -0800 nfp: abm: pass band parameter to functions In preparation for per-band RED offload pass band parameter to functions. For now it will always be 0. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 3a44820591c276ab74a3bba710742dccc9a39d73 Author: Jakub Kicinski Date: Mon Nov 19 15:21:37 2018 -0800 nfp: abm: map per-band symbols In preparation for multi-band RED offload if FW is capable map the extended symbols which will allow us to set per-band parameters and read stats. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit e432abfb99e5642a7e7fcaa1c8cb0e80c8fcf58e Author: Yunsheng Lin Date: Mon Nov 19 21:02:15 2018 +0800 net: hns3: add common validation in hclge_dcb Before setting tm related configuration to hardware, driver needs to check the configuration provided by user is valid. Currently hclge_ieee_setets and hclge_setup_tc both implement their own checking, which has a lot in common. This patch addes hclge_dcb_common_validate to do the common checking. The checking in hclge_tm_prio_tc_info_update and hclge_tm_schd_info_update is unnecessary now, so change the return type to void, which removes the need to do error handling when one of the checking fails. Also, ets->prio_tc is indexed by user prio and ets->tc_tsa is indexed by tc num, so this patch changes them to use different index. Signed-off-by: Yunsheng Lin Signed-off-by: Tan Xiaojun Signed-off-by: David S. Miller commit 20578bdfd0418efb11ec316229e670d085cd574a Author: Damien Le Moal Date: Tue Nov 20 10:52:38 2018 +0900 block: Initialize BIO I/O priority early For the synchronous I/O path case (read(), write() etc system calls), a BIO I/O priority is not initialized until the execution of blk_init_request_from_bio() when the BIO is submitted and a request initialized for the BIO execution. This is due to the ki_ioprio field of the struct kiocb defined on stack being always initialized to IOPRIO_CLASS_NONE, regardless of the calling process I/O context ioprio value set with ioprio_set(). This late initialization can result in the BIO being merged to pending requests even when the I/O priorities differ. Fix this by initializing the ki_iopriority field of on stack struct kiocb using the get_current_ioprio() helper, ensuring that all BIOs allocated and submitted for the system call execution see the correct intended I/O priority early. With this, since a BIO I/O priority is always set to the intended effective value for both the sync and async path, blk_init_request_from_bio() can be simplified. Reviewed-by: Christoph Hellwig Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 668ffc03418bc779f699797c72ecf968cd6525a9 Author: Damien Le Moal Date: Tue Nov 20 10:52:37 2018 +0900 block: prevent merging of requests with different priorities Growing in size a high priority request by merging it with a lower priority BIO or request will increase the request execution time. This is the opposite result of the desired effect of high I/O priorities, namely getting low I/O latencies. Prevent merging of requests and BIOs that have different I/O priorities to fix this. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 76dc891395dc61e92e2ff31b6161815ce5eb715b Author: Damien Le Moal Date: Tue Nov 20 10:52:36 2018 +0900 aio: Fix fallback I/O priority value For cases when the application does not specify aio_reqprio for an aio, fallback to use get_current_ioprio() to obtain the task I/O priority last set using ioprio_set() rather than the hardcoded IOPRIO_CLASS_NONE value. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 64845a1ddd655574886eb48e9a5eaeeb9b05bf0d Author: Damien Le Moal Date: Tue Nov 20 10:52:35 2018 +0900 block: Introduce get_current_ioprio() Define get_current_ioprio() as an inline helper to obtain the caller I/O priority from its task I/O context. Use this helper in blk_init_request_from_bio() to set a request ioprio. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit e2b3fa5af70c1e646270f6c7c799414f5e904d7a Author: Damien Le Moal Date: Tue Nov 20 10:52:34 2018 +0900 block: Remove bio->bi_ioc bio->bi_ioc is never set so always NULL. Remove references to it in bio_disassociate_task() and in rq_ioc() and delete this field from struct bio. With this change, rq_ioc() always returns current->io_context without the need for a bio argument. Further simplify the code and make it more readable by also removing this helper, which also allows to simplify blk_mq_sched_assign_ioc() by removing its bio argument. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 23464f8c3407b83106463999b64fe10dc66ff6a3 Author: Damien Le Moal Date: Tue Nov 20 10:52:33 2018 +0900 aio: Comment use of IOCB_FLAG_IOPRIO aio flag Comment the use of the IOCB_FLAG_IOPRIO aio flag similarly to the IOCB_FLAG_RESFD flag. Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 43478201959da54d8e3058f9a017111749c6ace6 Merge: 7abaf9a8b4881 94d302deae25a Author: David S. Miller Date: Mon Nov 19 17:59:45 2018 -0800 Merge branch 'selftests-Add-tests-for-VXLAN-at-an-802-1d-bridge' Ido Schimmel says: ==================== selftests: Add tests for VXLAN at an 802.1d bridge Petr says: This patchset adds several tests for VXLAN attached to an 802.1d bridge and fixes a related bug. First patch #1 fixes a bug in propagating SKB already-forwarded marks over veth to bridges, where they are irrelevant. This bug causes the vxlan_bridge_1d test suite from this patchset to fail as the packets aren't forwarded by br2. In patches #2 and #3, lib.sh is extended to support network namespaces. The use of namespaces is necessitated by VXLAN, which allows only one VXLAN device with a given VNI per namespace. Thus to host full topology on a single box for selftests, the "remote" endpoints need to be in namespaces. In patches #4-#6, lib.sh is extended in other ways to facilitate the following patches. In patches #7-#15, first the skeleton, and later the generic tests themselves are added. Patch #16 then adds another test that serves as a wrapper around the previous one, and runs it with a non-default port number. Patches #17 and #18 add mlxsw-specific tests. About those, Ido writes: The first test creates various configurations with regards to the VxLAN and bridge devices and makes sure the driver correctly forbids unsupported configuration and permits supported ones. It also verifies that the driver correctly sets the offload indication on FDB entries and the local route used for VxLAN decapsulation. The second test verifies that the driver correctly configures the singly linked list used to flood BUM traffic and that traffic is flooded as expected. ==================== Signed-off-by: David S. Miller commit 94d302deae25a0925dc736e444005918522be730 Author: Ido Schimmel Date: Mon Nov 19 16:11:27 2018 +0000 selftests: mlxsw: Add a test for VxLAN flooding The device stores flood records in a singly linked list where each record stores up to three IPv4 addresses of remote VTEPs. The test verifies that packets are correctly flooded in various cases such as deletion of a record in the middle of the list. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 99c9b084f0bec000ef394d1bb58f33c4910752d9 Author: Ido Schimmel Date: Mon Nov 19 16:11:26 2018 +0000 selftests: mlxsw: Add a test for VxLAN configuration Test various aspects of VxLAN offloading which are specific to mlxsw, such as sanitization of invalid configurations and offload indication. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 3485f87cb7f82434cb6526a2ab5088012378dcb6 Author: Petr Machata Date: Mon Nov 19 16:11:25 2018 +0000 selftests: forwarding: vxlan_bridge_1d_port_8472: New test This simple wrapper reruns the VXLAN ping test with a port number of 8472. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a0b61f3d8ebfe927d596c1aaca9b6e23bd185f55 Author: Petr Machata Date: Mon Nov 19 16:11:24 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test Test that when decapsulating from VXLAN, the values of inner and outer TOS are handled appropriately. Because VXLAN driver on its own won't produce the arbitrary TOS combinations necessary to test this feature, simply open-code a single ICMP packet and have mausezahn assemble it. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1e5abfb3ff41a532f687875ada9ea2af7a1069b3 Author: Petr Machata Date: Mon Nov 19 16:11:22 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add an ECN encap test Test that ECN bits in the VXLAN envelope are correctly deduced from the overlay packet. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d417ecf533fe014de667705f58ae5c579f7740b9 Author: Petr Machata Date: Mon Nov 19 16:11:21 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add a TOS test Test that TOS is inherited from the tunneled packet into the envelope as configured at the VXLAN device. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b3a7ee74ee659c789b6e6254d0839789477f5c3e Author: Petr Machata Date: Mon Nov 19 16:11:20 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add a TTL test This tests whether TTL of VXLAN envelope packets is properly set based on the device configuration. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 50a02b0825668fe96884d47914fa082c91bda504 Author: Petr Machata Date: Mon Nov 19 16:11:19 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Reconfigure & rerun tests The ordering of the topology creation can have impact on whether a driver is successful in offloading VXLAN. Therefore add a pseudo-test that reshuffles bits of the topology, and then reruns the same suite of tests again to make sure that the new setup is supported as well. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit bfd1e27038ab7e9ee3f730667cd0ae0e0eb23f88 Author: Petr Machata Date: Mon Nov 19 16:11:18 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add unicast test Test that when sending traffic to a learned MAC address, the traffic is forwarded accurately only to the right endpoint. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit edaa117efe46845e17275c51f61591df15d9e9a9 Author: Petr Machata Date: Mon Nov 19 16:11:17 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add flood test Test that when sending traffic to an unlearned MAC address, the traffic is flooded to both remote VXLAN endpoints. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5852fd07c441bc7c2e720440d8df2e2b80aea58b Author: Petr Machata Date: Mon Nov 19 16:11:15 2018 +0000 selftests: forwarding: vxlan_bridge_1d: Add ping test Test end-to-end reachability between local and remote endpoints. Note that because learning is disabled on the VXLAN device, the ICMP requests will end up being flooded to all remotes. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fd64d5a2e383568bb0d6b7b8c619358e68b6718c Author: Petr Machata Date: Mon Nov 19 16:11:14 2018 +0000 selftests: forwarding: Add a skeleton of vxlan_bridge_1d This skeleton sets up a topology with three VXLAN endpoints: one "local", possibly offloaded, and two "remote", formed using veth pairs and likely purely software bridges. The "local" endpoint is connected to host systems by a VLAN-unaware bridge. Since VXLAN tunnels must be unique per namespace, each of the "remote" endpoints is in its own namespace. H3 forms the bridge between the three domains. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d1038cd0f67e542f2744782f958b95c4909fb63a Author: Petr Machata Date: Mon Nov 19 16:11:13 2018 +0000 selftests: forwarding: lib: Add link_stats_rx_errors_get() Such a function will be useful for counting malformed packets in the ECN decap test. To that end, introduce a common handler for handling stat-fetching, and reuse it in link_stats_tx_packets_get() and link_stats_rx_errors_get(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d20b0f214aa74a3f6b28b8d522f273e1fd2abea3 Author: Petr Machata Date: Mon Nov 19 16:11:12 2018 +0000 selftests: forwarding: ping{6, }_do(): Allow passing ping arguments Make the ping routine more generic by allowing passing arbitrary ping command-line arguments. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 58c7a2d19e90a6ec3fbe6cd0c6b1025b731bc000 Author: Petr Machata Date: Mon Nov 19 16:11:11 2018 +0000 selftests: forwarding: ping{6, }_test(): Add description argument Have ping_test() recognize an optional argument with a description of the test. This is handy if there are several ping test, to make it clear which is which. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d0540d1706c3cfbb51769de02858f846d3836389 Author: Petr Machata Date: Mon Nov 19 16:11:10 2018 +0000 selftests: forwarding: lib: Add in_ns() In order to run a certain command inside another network namespace, it's possible to use "ip netns exec ns command". However then one can't use functions defined in lib.sh or a test suite. One option is to do "ip netns exec ns bash -c command", provided that all functions that one wishes to use (and their dependencies) are published using "export -f". That may not be practical. Therefore, introduce a helper in_ns(), which wraps a given command in a boilerplate of "ip netns exec" and "source lib.sh", thus making all library functions available. (Custom functions that a script wishes to run within a namespace still need to be exported.) Because quotes in "$@" aren't recognized in heredoc, hand-expand the array in an explicit for loop, leveraging printf %q to handle proper quoting. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 601bc1c13916899a14e682ada3dfa3ec21b13318 Author: Petr Machata Date: Mon Nov 19 16:11:08 2018 +0000 selftests: forwarding: lib: Support NUM_NETIFS of 0 So far the case of NUM_NETIFS of 0 has not been interesting. However if one wishes to reuse the lib.sh routines in a setup of a separate namespace, being able to import like this is handy. Therefore replace the {1..$NUM_NETIFS} references, which cause iteration over 1 and 0, with an explicit for loop like we do in setup_wait() and tc_offload_check(), so that for NUM_NETIFS of 0 no iteration is done. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6f9a50691055618b1042ead4d84f80755d1b9315 Author: Petr Machata Date: Mon Nov 19 16:11:07 2018 +0000 net: skb_scrub_packet(): Scrub offload_fwd_mark When a packet is trapped and the corresponding SKB marked as already-forwarded, it retains this marking even after it is forwarded across veth links into another bridge. There, since it ingresses the bridge over veth, which doesn't have offload_fwd_mark, it triggers a warning in nbp_switchdev_frame_mark(). Then nbp_switchdev_allowed_egress() decides not to allow egress from this bridge through another veth, because the SKB is already marked, and the mark (of 0) of course matches. Thus the packet is incorrectly blocked. Solve by resetting offload_fwd_mark() in skb_scrub_packet(). That function is called from tunnels and also from veth, and thus catches the cases where traffic is forwarded between bridges and transformed in a way that invalidates the marking. Signed-off-by: Petr Machata Suggested-by: Ido Schimmel Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7abaf9a8b48816d3010e97969747cd6d057fee75 Merge: 93c3de3e61367 e12890f44ca22 Author: David S. Miller Date: Mon Nov 19 17:56:09 2018 -0800 Merge branch 'octeontx2-af-NPC-MCAM-support-and-FLR-handling' Sunil Goutham says: ==================== octeontx2-af: NPC MCAM support and FLR handling This patchset is a continuation to earlier submitted three patch series to add a new driver for Marvell's OcteonTX2 SOC's Resource virtualization unit (RVU) admin function driver. 1. octeontx2-af: Add RVU Admin Function driver https://www.spinics.net/lists/netdev/msg528272.html 2. octeontx2-af: NPA and NIX blocks initialization https://www.spinics.net/lists/netdev/msg529163.html 3. octeontx2-af: NPC parser and NIX blocks initialization https://www.spinics.net/lists/netdev/msg530252.html This patch series adds support for below RVU generic: - Function Level Reset irq handler When FLR is triggered for PFs, AF receives interrupt. This patchset adds logic for cleaning up of NPA, NIX and NPC block resources being used by PF. - Mailbox communication between AF and it's VFs. Unlike VFs of PF1-PFn, AF which is PF0 can communicate with it's VFs directly. Added support for the same. - AF's VFs IO configuration These VFs are mapped to use internal HW loopback channels instead of CGX LMACs. Each pair of VFs work as two of ends of hardwired interfaces. VF0's TX is VF1's Rx & viceversa. NPC block: - MCAM entry management Alloc/Free of contiguous/non-contiguous and lower/higher priority MCAM entry allocation and programming support. - MCAM counters management and map/unmap with MCAM entries - Default KEY extract profile - HW errata workarounds NIX block: - Minimum and maximum allowed packet length config - HW errata workarounds Few more changes like shift to use mutex instead of spinlock etc are done in this patchset. Changes from v2: 1 Fixed commit message of patch 'Relax resource lock into mutex' to a more unambiguous one. - Suggested by David Miller. Changes from v1: 1 Converted all mailbox message handler API names to small letters from mixed small and capital letters. - Suggested by David Miller. 2 Fixed endian issues in patch 'Add support for stripping STAG/CTAG' - Suggested by Arnd Bergmann 3 Elaborated commit message of patch 'Add FLR interrupt handler' to make it a bit more easy to understand. - Suggested by Arnd Bergmann Will fix the padding and alignment in mailbox message structure in a follow-up patch. ==================== Signed-off-by: David S. Miller commit e12890f44ca22a853df3be0eb7b25819162bdc72 Author: Sunil Goutham Date: Mon Nov 19 16:17:43 2018 +0530 octeontx2-af: Workarounds for HW errata Errata 35038 Software sets NIX_AF_RX_SW_SYNC[ENA] to sync (flush) in-flight packets the RX data path before configuration changes (e.g. disabling one or more RQs). Hardware clears [ENA] to indicate sync is done An issue exists whereby NIX may clear NIX_AF_RX_SW_SYNC [ENA] too early. Errata 35057 NIX may corrupt internal state when conditional clocks turn off. So turnon all clocks by default. Errata 35786 Parse nibble enable NPC configuration for KEY generation has to be identical for both Rx and Tx interfaces. Also corrected endianness configuration for NIX i.e NIX_AF_CFG[AF_BE] is bit8 and not bit1. Signed-off-by: Sunil Goutham Signed-off-by: Jerin Jacob Signed-off-by: David S. Miller commit 4fa9121046ce7e6b917405ddbdd51e2ead0c2bb2 Author: Linu Cherian Date: Mon Nov 19 16:17:42 2018 +0530 octeontx2-af: Add interrupt handlers for Master Enable event - Add interrupt handlers for Master Enable events from PFs and Master Enable events from VFs of AF - Master Enable is required for the MSIX delivery to work - Master Enable bit trap handler doesn't have to do any anything other than clearing the TRPEND bit, since the enable/disable requirements are already taken care using mbox requests/flr handler. Signed-off-by: Linu Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 465ed9c1fc3b8f091c978b8a80ada5953a15b45c Author: Sunil Goutham Date: Mon Nov 19 16:17:41 2018 +0530 octeontx2-af: Add FLR handling support for AF's VFs Added support to handle FLR for AF's VFs (i.e LBK VFs). Just the FLR interrupt enable/disable, handler registration etc, actual HW resource cleanup or LFs teardown logic is already there. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 8bb991c5e7c697b968abd9e8f6ad1c5fe8962536 Author: Tomasz Duszynski Date: Mon Nov 19 16:17:40 2018 +0530 octeontx2-af: Configure AF VFs to talk over LBK channels Configure AF VFs such that they are able to talk over consecutive loopback channels. If 8 VFs are attached to AF then communication will work as below: TX RX lbk0 -> lbk1 lbk1 -> lbk0 lbk2 -> lbk3 lbk3 -> lbk2 lbk4 -> lbk5 lbk5 -> lbk4 lbk6 -> lbk7 lbk7 -> lbk6 Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 9bd6caf33567f2326ac66a7030df11fb32a3fbea Author: Tomasz Duszynski Date: Mon Nov 19 16:17:39 2018 +0530 octeontx2-af: Enable sriov on AF to create VFs Enable all AF VFs during probe. Since AF's VFs work in pairs (eg: Pkts sent on VF0 are received by VF1 and viceversa), enable only even number of VFs out of totalVFs, which should again be less than number of loopback (LBK) channels. Also enable VF's mailbox interrupts. Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 9bdc47a6e3288b65947af841bb5b76998d097b18 Author: Tomasz Duszynski Date: Mon Nov 19 16:17:38 2018 +0530 octeontx2-af: Mbox communication support btw AF and it's VFs VFs attached to PFs other than AF can not communicate with AF directly. Instead they are supposed to first send message to the PF they are residing on and PF forwards it to the AF. Responses to messages are handled in the reverse order. On the other hand if VFs are on AF (PF0) itself then direct mailbox communication is possible since there's no other PF in the way. This patch addresses this particular case and adds support for handling it. Signed-off-by: Tomasz Duszynski Signed-off-by: Marko Kallio Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit c554f9c1574e022821260b24b043a4277e8ec5d8 Author: Geetha sowjanya Date: Mon Nov 19 16:17:37 2018 +0530 octeontx2-af: Teardown NPA, NIX LF upon receiving FLR Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable Pool/Aura HW contexts In future teardown of SSO/SSOW/TIM/CPT will be added. Also added a mailbox message for a RVU PF to request AF, to perform FLR for a RVU VF under it. Signed-off-by: Geetha sowjanya Signed-off-by: Stanislaw Kardach Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 9fe4ebf7176edea8f9761dbad900804f37aa04f9 Author: Geetha sowjanya Date: Mon Nov 19 16:17:36 2018 +0530 octeontx2-af: Add FLR interrupt handler RVU admin function (AF) has all the priviliges to cleanup HW state when VFIO triggers a PCIe function level reset (FLR) due to either reset or a VM crash. FLR for RVU PF1-PFn will trigger an IRQ to AF. This patch enables all RVU PF's FLR interrupts and registers a handler. Upon receiving an interrupt, a workqueue is scheduled to cleanup all hardware blocks being used by the PF which received the FLR. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit f325d3f4cb190a944239072650d842fad6156a9c Author: Sunil Goutham Date: Mon Nov 19 16:17:35 2018 +0530 octeontx2-af: Verify NPA/SSO/NIX PF_FUNC mapping While mapping a NIX LF to a NPA LF attached PF_FUNC or SSO LF attached PF_FUNC, verify if PF_FUNC is valid and if that PF_FUNC has a LF of that block attached to it or not. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 86cea61d3f38826e885f35084daa376ece308295 Author: Tomasz Duszynski Date: Mon Nov 19 16:17:34 2018 +0530 octeontx2-af: Add support for stripping STAG/CTAG This works by shadowing existing UCAST MCAM entry with a new one additionally matching either NPC_LT_LB_CTAG or NPC_LT_LB_STAG. For this to fully work one needs to send properly configured NIX_VTAG_CFG message afterwards i.e with strip and capture enabled and type set to 0. On receiving tagged packet NIX will remove outer VLAN and capture TCI in NIX_RX_PARSE_S. Also simplified RX Vtag configuration flow With this setting STRIP/CAPTURE VTAG actions separately would be possible. Following combinations are possible: STRIP, STRIP and CAPTURE, CAPTURE or nothing (0 disables respective actions). Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 40df309e4166c69600968c93846aa0b1821e83f0 Author: Sunil Goutham Date: Mon Nov 19 16:17:33 2018 +0530 octeontx2-af: Support to enable/disable default MCAM entries For a PF/VF with a NIXLF attached has default/reserved MCAM entries for receiving Ucast/Bcast/Promisc traffic. Ideally traffic should be forwarded to NIXLF only after it's contexts are initialized. This patch keeps these default entries disabled and adds mbox messages for a PF/VF to enable these once NPA/NIXLF initialization is done. Likewise while PF/VF is being teared down, it can send the disable mailbox message to stop receiving traffic. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 631e70bb84e08d4b2c14119f9d2a1cb9ea6dbf30 Author: Santosh Shukla Date: Mon Nov 19 16:17:32 2018 +0530 octeontx2-af: Add MKEX default profile Added basic default MKEX profile. This profile tells hardware what data to extract from packet and where to place it (bit offset) in final KEY generated for the parsed packet. Based on the bit placement of the packet data, MCAM entries have to programmed for matching. Also added a msg to retrieve this MKEX profile from PF/VF which inturn can process it to determine how MCAM entry has to be populated. Signed-off-by: Santosh Shukla Signed-off-by: Yuri Tolstov Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 63be91c89dd435fa5e88e7bae5390bfea5d54743 Author: Sunil Goutham Date: Mon Nov 19 16:17:31 2018 +0530 octeontx2-af: Alloc and config NPC MCAM entry at a time A new mailbox message is added to support allocating a MCAM entry along with a counter and configuring it in one go. This reduces the amount of mailbox communication involved in installing a new MCAM rule. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit a958dd59f9cef9fa7b38258a559a162a09b3ae00 Author: Sunil Goutham Date: Mon Nov 19 16:17:30 2018 +0530 octeontx2-af: Map or unmap NPC MCAM entry and counter Alloc memory to save MCAM 'entry to counter' mapping and since multiple entries can map to same counter, added counter's reference count tracking. Do 'entry to counter' mapping when a entry is being installed and mbox msg sender requested to configure a counter as well. Mapping is removed when a entry or counter is being freed or a explicit mbox msg is received to unmap them. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 7fbb3f238c09e8fcd4ce21284ed20baeaf4805cc Author: Sunil Goutham Date: Mon Nov 19 16:17:29 2018 +0530 octeontx2-af: Support for NPC MCAM counters NPC HW has counters which can be mapped to MCAM entries to gather entry match statistics. This patch adds support to allocate, free, clear and retrieve stats of NPC MCAM counters. New mailbox messages have been added for this. Similar to MCAM entries both contiguous and non-contiguous counter allocation is supported. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 651cd2652339d5223bab9802faaf0a7f14c870b7 Author: Sunil Goutham Date: Mon Nov 19 16:17:28 2018 +0530 octeontx2-af: MCAM entry installation support Add support for a RVU PF/VF to enable, disable, configure and shuffle MCAM entries via mbox commands. This patch adds mailbox message formats and handling of these commands. As of now otherthan validating MCAM entry index, info like channel number e.t.c in MCAM config data sent by PF/VF are not validated. Also a max of 64 MCAM entries can be shuffled with a single mbox command. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit f92749586176f884044f47da62dcc231f6b43cd5 Author: Sunil Goutham Date: Mon Nov 19 16:17:27 2018 +0530 octeontx2-af: NPC MCAM entry alloc/free support This patch adds NPC MCAM entry management and support for allocating and freeing them via mailbox. Both contiguous and non-contiguous allocations are supported. Incase of contiguous, if request cannot be met then max contiguous number of available entries are allocated. High or low priority index allocation w.r.t a reference MCAM index is also supported. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 0964fc8f5f30f4ec7cce4c7a09c547ac87b4ed25 Author: Stanislaw Kardach Date: Mon Nov 19 16:17:26 2018 +0530 octeontx2-af: Relax resource lock into mutex Mailbox message handling is done in a workqueue context scheduled from interrupt handler. So resource locks does not need to be a spinlock. Therefore relax them into a mutex so that later on we may use them in routines that might sleep. Signed-off-by: Stanislaw Kardach Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 34425e8c7589b87fea3659c35d8a217110fcbd4b Author: Kiran Kumar Date: Mon Nov 19 16:17:25 2018 +0530 octeontx2-af: Support to get NIX HW constants from AF This patch adds reading HW limits like number of Rx/Tx stats, number of queue IRQs supported per NIX LF from AF registers and sync them to PF/VF. Signed-off-by: Kiran Kumar Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 9b7dd87ac07119036d7c74c67160c496ddd8bfc4 Author: Sunil Goutham Date: Mon Nov 19 16:17:24 2018 +0530 octeontx2-af: Support to modify min/max allowed packet lengths This patch adds support for RVU PF/VFs to modify min/max packet lengths allowed by HW. For VFs on PF0, settings will be automatically applied on LBK link. RX link's min/maxlen is configured to min/max of PF and it's all VFs. On the TX side if requested all SMQs attached to the requesting NIXLF will be updated with new min/max lengths. Also updates transmit credits for Tx links based on new maxlen. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit eac66686c60b7559e7343ce31f18e12665c6c3bd Author: Sunil Goutham Date: Mon Nov 19 16:17:23 2018 +0530 octeontx2-af: Convert mbox handlers APIs to lowercase This patch converts all mailbox message handler API names to lowercase. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 93c3de3e61367e78489c4a1b64b568e84950a28a Merge: cfc6731d2f793 55d2ad7b90722 Author: David S. Miller Date: Mon Nov 19 17:32:15 2018 -0800 Merge branch 'r8169-series-with-further-smaller-improvements' Heiner Kallweit says: ==================== r8169: series with further smaller improvements Again nothing exciting, just smaller improvements. ==================== Signed-off-by: David S. Miller commit 55d2ad7b907225e476dd10b69683e508a6bed7f4 Author: Heiner Kallweit Date: Mon Nov 19 22:41:35 2018 +0100 r8169: improve chip version identification Only the upper 12 bits are used for chip identification, this helps to reduce the size of array mac_info. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3c72bf71a97fe4125270b2b618aaa6266f80a825 Author: Heiner Kallweit Date: Mon Nov 19 22:40:04 2018 +0100 r8169: simplify ocp functions rtl8168_oob_notify is used in rtl8168dp_driver_start and rtl8168dp_driver_stop only, so we can rename it to r8168dp_oob_notify. The same applies to condition rtl_ocp_read_cond which can be renamed to rtl_dp_ocp_read_cond. This allows to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8b6dd85666e217c1e16396b08ccb855524025f28 Author: Heiner Kallweit Date: Mon Nov 19 22:39:14 2018 +0100 r8169: remove workaround for ancient gcc bug The kernel can't be built any longer with this ancient GCC version. Eventually it becomes clear what this statement actually does. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit ad45ff0c12e530dd52b8c9ecc46959fb4e468e2b Author: Heiner Kallweit Date: Mon Nov 19 22:38:22 2018 +0100 r8169: remove manual padding in struct ring_info The compiler takes care of alignment and padding, I see no need to bother him with manual hints. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b10ceb55710dd2574fd61ed54fd94aab263f4af3 Author: Heiner Kallweit Date: Mon Nov 19 22:37:34 2018 +0100 r8169: remove "not PCI Express" message The ones who want to know can easily identify whether chip is PCI or PCIe based on the chip name. I doubt there's any benefit in this message, so remove it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8c0511ec52c8f5030602b2e8f9ab5a4913949bfe Author: Heiner Kallweit Date: Mon Nov 19 22:36:15 2018 +0100 r8169: remove print_mac_version The syslog message printed on driver load allows to easily identify the mac version number (based on chip name and XID). So we don't need this extra debug message which is wrong anyway because e.g. RTL_GIGA_MAC_VER_01 has value 0. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6f0d308855a26fd20c1994a322a3ebee768e0615 Author: Heiner Kallweit Date: Mon Nov 19 22:35:08 2018 +0100 r8169: use PCI_VDEVICE macro Using macro PCI_VDEVICE helps to simplify the PCI ID table. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 559c3c046d4b4f52715ffdac7572302010b6d648 Author: Heiner Kallweit Date: Mon Nov 19 22:34:17 2018 +0100 r8169: replace event_slow with irq_mask Recently the "slow event" handler was removed, therefore the member name isn't appropriate any longer. In addition store the full mask, including the RTL_EVENT_NAPI interrupt source bits. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 97ad92f28342ffd6be1452eafbc0b7f6a9028747 Author: Heiner Kallweit Date: Mon Nov 19 22:33:00 2018 +0100 r8169: remove unused interrupt sources Setting PCSTimeout interrupt source was copied from the vendor driver which uses the chip programmable timer interrupt. The mainline driver doesn't use this timer interrupt. SYSErr indicates a PCI error and isn't defined on the PCIe models. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0f07bd850d3656b2a02815ba7965dc30d30f49f0 Author: Heiner Kallweit Date: Mon Nov 19 22:32:18 2018 +0100 r8169: use dev_get_drvdata where possible Using dev_get_drvdata directly is simpler here. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fe716f8a33abf1ce14e0982bb02cd6e429bd25b7 Author: Heiner Kallweit Date: Mon Nov 19 22:31:32 2018 +0100 r8169: merge rtl_irq_enable and rtl_irq_enable_all After the recent changes to the interrupt handler rtl_irq_enable and rtl_irq_enable_all can be merged. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit bbe5d311be6624d15df1d060094cfcb3259f3ccd Merge: 23499442c3194 bf5d68c730400 Author: Daniel Borkmann Date: Tue Nov 20 00:53:40 2018 +0100 Merge branch 'bpf-zero-hash-seed' Lorenz Bauer says: ==================== Allow forcing the seed of a hash table to zero, for deterministic execution during benchmarking and testing. Changes from v2: * Change ordering of BPF_F_ZERO_SEED in linux/bpf.h Comments adressed from v1: * Add comment to discourage production use to linux/bpf.h * Require CAP_SYS_ADMIN ==================== Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit bf5d68c7304008ef838f1a2ca1aae8fab74d633d Author: Lorenz Bauer Date: Fri Nov 16 11:41:11 2018 +0000 tools: add selftest for BPF_F_ZERO_SEED Check that iterating two separate hash maps produces the same order of keys if BPF_F_ZERO_SEED is used. Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann commit 608114e441ad3a4fa1fced4d6d00653a34765eee Author: Lorenz Bauer Date: Fri Nov 16 11:41:10 2018 +0000 tools: sync linux/bpf.h Synchronize changes to linux/bpf.h from * "bpf: allow zero-initializing hash map seed" * "bpf: move BPF_F_QUERY_EFFECTIVE after map flags" Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann commit 2f1833607aed6a9c1e1729bf0e2588c341ceb409 Author: Lorenz Bauer Date: Fri Nov 16 11:41:09 2018 +0000 bpf: move BPF_F_QUERY_EFFECTIVE after map flags BPF_F_QUERY_EFFECTIVE is in the middle of the flags valid for BPF_MAP_CREATE. Move it to its own section to reduce confusion. Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann commit 96b3b6c9091d23289721350e32c63cc8749686be Author: Lorenz Bauer Date: Fri Nov 16 11:41:08 2018 +0000 bpf: allow zero-initializing hash map seed Add a new flag BPF_F_ZERO_SEED, which forces a hash map to initialize the seed to zero. This is useful when doing performance analysis both on individual BPF programs, as well as the kernel's hash table implementation. Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann commit 23499442c319412aa8e54e7a939e2eb531bdd77d Author: Stanislav Fomichev Date: Mon Nov 19 14:49:01 2018 -0800 bpf: libbpf: retry map creation without the name Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for maps. Pre v4.14 kernels don't know about map names and return an error about unexpected non-zero data. Retry sys_bpf without a map name to cover older kernels. v2 changes: * check for errno == EINVAL as suggested by Daniel Borkmann Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann commit f3ade253615ae6d83aeb72d1c8a96f62a4b4b29b Author: Huacai Chen Date: Thu Nov 15 15:53:52 2018 +0800 MIPS: Loongson: Add Loongson-3A R2.1 basic support Loongson-3A R2.1 is the bugfix revision of Loongson-3A R2. All Loongson-3 CPU family: Code-name Brand-name PRId Loongson-3A R1 Loongson-3A1000 0x6305 Loongson-3A R2 Loongson-3A2000 0x6308 Loongson-3A R2.1 Loongson-3A2000 0x630c Loongson-3A R3 Loongson-3A3000 0x6309 Loongson-3A R3.1 Loongson-3A3000 0x630d Loongson-3B R1 Loongson-3B1000 0x6306 Loongson-3B R2 Loongson-3B1500 0x6307 Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21128/ Cc: Ralf Baechle Cc: James Hogan Cc: Steven J . Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu commit 39e94569039b58b55eef9e18ad96d666293aea4f Author: Brajeswar Ghosh Date: Mon Nov 19 22:02:19 2018 +0530 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: Remove duplicate header Remove gca/gfx_8_0_enum.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Alex Deucher commit ccce29abfe036967a0fa0f291acb9ea4f5595486 Author: Alex Deucher Date: Fri Nov 16 13:22:38 2018 -0500 drm/amdgpu/psp: use define rather than magic number for mode1 reset Use the define rather than hardcoded value. Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 85744e9c100696d3f210e80b85fd56dd19767c81 Author: Trigger Huang Date: Wed Nov 14 10:44:50 2018 +0800 drm/scheduler: Fix bad job be re-processed in TDR A bad job is the one triggered TDR(In the current amdgpu's implementation, actually all the jobs in the current joq-queue will be treated as bad jobs). In the recovery process, its fence will be fake signaled and as a result, the work behind will be scheduled to delete it from the mirror list, but if the TDR process is invoked before the work's execution, then this bad job might be processed again and the call dma_fence_set_error to its fence in TDR process will lead to kernel warning trace: [ 143.033605] WARNING: CPU: 2 PID: 53 at ./include/linux/dma-fence.h:437 amddrm_sched_job_recovery+0x1af/0x1c0 [amd_sched] kernel: [ 143.033606] Modules linked in: amdgpu(OE) amdchash(OE) amdttm(OE) amd_sched(OE) amdkcl(OE) amd_iommu_v2 drm_kms_helper drm i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 snd_hda_codec_generic crypto_simd glue_helper cryptd snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq joydev snd_seq_device snd_timer snd soundcore binfmt_misc input_leds mac_hid serio_raw nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 8139too floppy psmouse 8139cp mii i2c_piix4 pata_acpi [ 143.033649] CPU: 2 PID: 53 Comm: kworker/2:1 Tainted: G OE 4.15.0-20-generic #21-Ubuntu [ 143.033650] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 143.033653] Workqueue: events drm_sched_job_timedout [amd_sched] [ 143.033656] RIP: 0010:amddrm_sched_job_recovery+0x1af/0x1c0 [amd_sched] [ 143.033657] RSP: 0018:ffffa9f880fe7d48 EFLAGS: 00010202 [ 143.033659] RAX: 0000000000000007 RBX: ffff9b98f2b24c00 RCX: ffff9b98efef4f08 [ 143.033660] RDX: ffff9b98f2b27400 RSI: ffff9b98f2b24c50 RDI: ffff9b98efef4f18 [ 143.033660] RBP: ffffa9f880fe7d98 R08: 0000000000000001 R09: 00000000000002b6 [ 143.033661] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9b98efef3430 [ 143.033662] R13: ffff9b98efef4d80 R14: ffff9b98efef4e98 R15: ffff9b98eaf91c00 [ 143.033663] FS: 0000000000000000(0000) GS:ffff9b98ffd00000(0000) knlGS:0000000000000000 [ 143.033664] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 143.033665] CR2: 00007fc49c96d470 CR3: 000000001400a005 CR4: 00000000003606e0 [ 143.033669] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 143.033669] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 143.033670] Call Trace: [ 143.033744] amdgpu_device_gpu_recover+0x144/0x820 [amdgpu] [ 143.033788] amdgpu_job_timedout+0x9b/0xa0 [amdgpu] [ 143.033791] drm_sched_job_timedout+0xcc/0x150 [amd_sched] [ 143.033795] process_one_work+0x1de/0x410 [ 143.033797] worker_thread+0x32/0x410 [ 143.033799] kthread+0x121/0x140 [ 143.033801] ? process_one_work+0x410/0x410 [ 143.033803] ? kthread_create_worker_on_cpu+0x70/0x70 [ 143.033806] ret_from_fork+0x35/0x40 So just delete the bad job from mirror list directly Changes in v3: - Add a helper function to delete the bad jobs from mirror list and call it directly *before* the job's fence is signaled Changes in v2: - delete the useless list node check - also delete bad jobs in drm_sched_main because: kthread_unpark(ring->sched.thread) will be invoked very early before amdgpu_device_gpu_recover's return, then drm_sched_main will have chance to pick up a new job from the job queue. This new job will be added into the mirror list and processed by amdgpu_job_run, but may not be deleted from the mirror list on time due to the same reason. And finally re-processed by drm_sched_job_recovery Signed-off-by: Trigger Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5814cef8079bd1118fc14ff9231d487f4d539d34 Author: Alex Deucher Date: Fri Nov 16 14:46:51 2018 -0500 drm/amdgpu/gfx: use proper offset define for MEC doorbells Looks like a copy paste typo. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a53a11a835b657c99e740712f7c95625143afcd8 Author: Yong Zhao Date: Wed Oct 17 12:24:02 2018 -0400 drm/amdkfd: Workaround PASID missing in gfx9 interrupt payload under non HWS This is a known gfx9 HW issue, and this change can perfectly workaround the issue. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 00557f4131473c0012f8d8c468987468b42d2eb2 Author: Yong Zhao Date: Wed Oct 17 12:03:48 2018 -0400 drm/amdkfd: Adjust the debug message in KFD ISR This makes debug message get printed even when there is early return. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 846a44d7e918a4012715f79164bf71b9a6840657 Author: Gang Ba Date: Wed Sep 5 11:27:14 2018 -0400 drm/amdkfd: Added Vega12 and Polaris12 for KFD. Add Vega12 and Polaris12 device info and device IDs to KFD. Signed-off-by: Gang Ba Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e6c6fc19d3ffc9a60df3a2abf46bf3b08c7a329 Author: Yong Zhao Date: Mon Jun 4 14:33:13 2018 -0400 drm/amdkfd: Replace mqd with mqd_mgr as the variable name for mqd_manager This will make reading code much easier. This fixes a few spots missed in a previous commit with the same title. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c8fc5d49c341805fee7fc295f2ea8a709f78aec4 Author: Richard Guy Briggs Date: Fri Nov 16 12:17:35 2018 -0500 audit: remove WATCH and TREE config options Remove the CONFIG_AUDIT_WATCH and CONFIG_AUDIT_TREE config options since they are both dependent on CONFIG_AUDITSYSCALL and force CONFIG_FSNOTIFY. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 1287533d3d95d5ad8b02773733044500b1be06bc Author: Sean Young Date: Fri Nov 16 16:09:39 2018 +0000 MIPS: Remove superfluous check for __linux__ When building BPF code using "clang -target bpf -c", clang does not define __linux__. To build BPF IR decoders the include linux/lirc.h is needed which includes linux/types.h. Currently this workaround is needed: https://git.linuxtv.org/v4l-utils.git/commit/?id=dd3ff81f58c4e1e6f33765dc61ad33c48ae6bb07 This check might otherwise be useful to stop users from using a non-linux compiler, but if you're doing that you are going to have a lot more trouble anyway. Signed-off-by: Sean Young Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21149/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 82d1a1b128705c4c77a00fd2ea2682867f1dc195 Author: Chengming Gui Date: Fri Nov 16 14:54:39 2018 +0800 Revert "drm/amdgpu: use GMC v9 KIQ workaround only for the GFXHUB" (v2) With GFXOFF enabled, this patch will cause PCO amdgpu_test failed, but GFXOFF is necessary for PCO, so revert the patch. This reverts commit b83761bb0b09ec11c924afe9d88e458cb16a0372. v2: add a comment for future reference (Alex) Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Jack Gui Signed-off-by: Alex Deucher commit 527aa2a0ac241d3ecc02c628db50b16d87e646e0 Author: Joerg Roedel Date: Thu Nov 15 14:40:29 2018 +0100 drm/amd/powerplay: Ratelimit all "was not implemented" messages Running kfdtest on an AMD Carizzo flooded the kernel log with thousands of these "was not implemented" messages, making it impossible to see other messages there. Ratelimit the messages to prevent user-space from flooding the kernel log. Signed-off-by: Joerg Roedel Signed-off-by: Alex Deucher commit d7203171177aa8063e8a80cbc7988386e5c0ceda Author: David Francis Date: Thu Oct 25 14:18:12 2018 -0400 drm/amd/display: Clean up DCN1 clock requests [Why] There was a full clock request struct of which only one value was being used. [How] Replace the struct with a uint32_t Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cedde71cc61bdf5e2f386f06bada29fe9fe11b78 Author: Nicholas Kazlauskas Date: Thu Nov 15 17:21:34 2018 -0500 drm/amd/display: Support amdgpu "max bpc" connector property (v2) [Why] Many panels support more than 8bpc but some modes are unavailable while running at greater than 8bpc due to DP/HDMI bandwidth constraints. Support for more than 8bpc was added recently in the driver but it defaults to the maximum supported bpc - locking out these modes. This should be a user configurable option such that the user can select what bpc configuration they would like. [How] This patch adds support for getting and setting the amdgpu driver specific "max bpc" property on the connector. It also adds support for limiting the output bpc based on the property value. The default limitation is the lowest value in the range, 8bpc. This was the old value before the range was uncapped. This patch should be updated/replaced later once common drm support for max bpc lands. Bugzilla: https://bugs.freedesktop.org/108542 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201585 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200645 Fixes: e03fd3f300f6 ("drm/amd/display: Do not limit color depth to 8bpc") v2: rebase on upstream (Alex) Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit e2306cc6a07aefc458982b3d7ae1e146515ed656 Author: Nicholas Kazlauskas Date: Thu Nov 15 17:19:12 2018 -0500 drm/amdgpu: Add amdgpu "max bpc" connector property (v2) [Why] Many panels support more than 8bpc but some modes are unavailable while running at greater than 8bpc due to DP/HDMI bandwidth constraints. Support for more than 8bpc was added recently in the driver but it defaults to the maximum supported bpc - locking out these modes. This should be a user configurable option such that the user can select what bpc configuration they would like. [How] This patch introduces the "max bpc" amdgpu driver specific connector property so the user can limit the maximum bpc. It ranges from 8 to 16. This doesn't directly set the preferred bpc for the panel since it follows Intel's existing driver conventions. This proprety should be removed once common drm support for max bpc lands. v2: rebase on upstream (Alex) Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 900cc36338188773230c3c7fa099619bf532517b Author: YueHaibing Date: Thu Nov 15 20:00:35 2018 +0800 drm/amdgpu: remove set but not used variable 'ring' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/psp_v10_0.c: In function 'psp_v10_0_ring_stop': drivers/gpu/drm/amd/amdgpu/psp_v10_0.c:230:19: warning: variable 'ring' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/psp_v3_1.c: In function 'psp_v3_1_ring_stop': drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:359:19: warning: variable ‘ring’ set but not used [-Wunused-but-set-variable] It not used since commit 4ef72453311a ("drm/amdgpu: added api for stopping psp ring (v2)") Signed-off-by: YueHaibing Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit bed1ed366d5f68a9e038364ec22fe34ed361c1ba Author: Emily Deng Date: Wed Nov 14 23:20:13 2018 +0800 drm/amd/amdgpu/sriov: Aligned the definition with libgv Aligned the amd_sriov_msg_pf2vf_info_header and amd_sriov_msg_pf2vf_info_header's definition with libgv. Signed-off-by: Emily Deng Reviewed-by: Frank.Min Signed-off-by: Alex Deucher commit 6ccda157732d7ff6773a325f3d3252ad4d56f015 Author: David Francis Date: Thu Oct 25 15:47:43 2018 -0400 drm/amd/display: Get backlight controller id from link [Why] dc_link_set_backlight_level can be called from a context where the stream is unknown. In this case, we can still find which controller is driving this particular backlight [How] Compare links for equality instead of streams Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d9672a5bfbb506d3276403a309c5013b4fd7c56c Author: Charlene Liu Date: Wed Oct 31 16:51:40 2018 -0400 drm/amd/display: expose surface confirm color function expose dcn10_get_surface_visual_confirm_color() to be used in the future Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 1a1adf172f6a9747d5dd2d9236af28ccff8646a8 Author: Dmytro Laktyushkin Date: Wed Oct 31 07:59:54 2018 -0400 drm/amd/display: fix pipe interdependent hubp programming A number of registers need to be updated for all active pipes wherever any pipe causes a change in watermarks. This change separates programming of these registers into a separate function call that is called for all active pipes during a bw update. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 14fee4ca84ecaa42aeada8ff404269e8c0a15efb Author: Joshua Aberback Date: Tue Oct 30 15:34:33 2018 -0400 drm/amd/display: Adjust stream enable sequence [Why] We observed an issue where a display would not accept programming of the ignore_MSA_timing_param bit if the stream was blanked. [How] move enable_stream_features from enable_link_dp to core_link_enable_stream, after unblank_stream Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 00737c59a231a4eab955f6cd53c88e7c6449abd0 Author: Eric Bernstein Date: Mon Oct 29 16:05:47 2018 -0400 drm/amd/display: get tail pipe before aquire free pipe [Why] For some complicated blending transition cases, the head pipe of the second stream may end up being a higher pipe index than the free pipe. In those cases dc_add_plane_to_context will incorrectly set the tail_pipe to the free pipe, which will cause the top_pipe and bottom_pipe to be the same [How] Move the call to resource_get_tail_pipe_for_stream() to be before call to acquire_free_pipe_for_stream(). Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 818832bf2bc0d86d2a114d3baadfae12a40f7f36 Author: Xiaodong Yan Date: Wed Oct 24 02:08:53 2018 +0800 drm/amd/display: retry 3 times before successfully reading DPCD Extended Receiver Capability Field [Why] 1.dpcd extended receiver capability sometimes read fail, and corrupted data leads to sink caps is not correct. 2.sometimes sink reply ack with fewer data [How] check the return value of core_link_read_dpcd, try to read again when failure happens Signed-off-by: Xiaodong Yan Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit a7513419610b118eeabda6e85de187030fea57ae Author: Steven Chiu Date: Fri Oct 19 15:04:45 2018 -0400 drm/amd/display: 3.2.06 Signed-off-by: Steven Chiu Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9b6067c08de84215d4c66a74150e9ac3e9f0ef72 Author: Dmytro Laktyushkin Date: Fri Oct 19 16:17:29 2018 -0400 drm/amd/display: redesign scaling rotation math Change the math to work in viewport rotation when calculating viewport and viewport adjustment. This simplifies the math for viewport calculation and makes viewport adjustment easier to understand. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 3ce224421b66c740bb2902e69f0dd1163373842a Author: Jun Lei Date: Wed Oct 24 11:39:55 2018 -0400 drm/amd/display: clear underflow on optc unblank [why] Underflow is asserted due to some timing condition which does not actually result in visible underflow (i.e. it occurs while blanked). [how] Force clear underflow occured bit whenver we unblank. Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6263f0fd0626740cb7d68fe1182f16a8b4eb6d37 Author: Nikola Cornij Date: Thu Oct 25 17:02:42 2018 -0400 drm/amd/display: Consolidate two-pixels-per-container check [why] The condition to check for two pixels per containter has become rather long and is used in number of places. [how] Move the check to a helper function. Signed-off-by: Nikola Cornij Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 08e1c28dd521c7b08d1b0af0bae9fb22ccc012a4 Author: Yogesh Mohan Marimuthu Date: Sat Oct 20 01:21:40 2018 +0530 drm/amd/display: calculate stream->phy_pix_clk before clock mapping [why] phy_pix_clk is one of the variable used to check if one PLL can be shared with displays having common mode set configuration. As of now phy_pix_clock varialbe is calculated in function dc_validate_stream(). dc_validate_stream() function is called after clocks are assigned for the new display. Due to this during hotplug, when PLL sharing conditions are checked for new display phy_pix_clk variable will be 0 and for displays that are already enabled phy_pix_clk will have some value. Hence PLL will not be shared and if the display hardware doesn't have any more PLL to assign, mode set will fail due to resource unavailability. [how] Instead of only calculating the phy_pix_clk variable after the PLL is assigned for new display, this patch calculates phy_pix_clk also during the before assigning the PLL for new display. Signed-off-by: Yogesh Mohan Marimuthu Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 010c8fe9a5040f1573db647ce1930414764dbe8b Author: Yongqiang Sun Date: Thu Oct 25 11:32:26 2018 -0400 drm/amd/display: Typo for return check value. [Why] Typo for return check value. [How] Correct one should be "return enable ? true : false;" Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 37c8f6e6a8d827673fc03e9ae30dfcff912f67ea Author: David Francis Date: Wed Oct 24 10:08:02 2018 -0400 drm/amd/display: Clean up dp_blank functions [Why] Unused variable "refresh" and incorrect comment formatting [How] Remove variable, reindent comments Signed-off-by: David Francis Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4b594b8d87cbc06602d03395c20fd1d7d216990f Author: David Francis Date: Tue Oct 23 13:58:39 2018 -0400 drm/amd/display: Check for dmcu initialization before calling dmcu [Why] DMCU firmware is not required - the system is expected to run fine without it. Therefore, wherever dmcu functions could be called, dmcu initialization shoudl be checked [How] Use the helpful hook dmcu_funcs->is_dmcu_initialized Signed-off-by: David Francis Reviewed-by: Hersen Wu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8ce504b9389be846bcdf512ed5be8f661b3bf097 Author: Murton Liu Date: Wed Oct 17 14:47:45 2018 -0400 drm/amd/display: fix gamma not being applied correctly [why] Gamma was always being set as identity on SDR monitor, leading to no changes in gamma. This caused nightlight to not apply correctly. [how] Added a default gamma structure to compare against in the sdr case. Signed-off-by: Murton Liu Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit eb6b29d62841ec38665840af4c443fbef85bf2ec Author: Jun Lei Date: Tue Oct 23 12:12:50 2018 -0400 drm/amd/display: make underflow status clear explicit [why] HUBP underflow is never cleared, which causes underflow in one test to fail another test, violating the independence requirements [how] Rather than make clearing implicit, we explicitly clear underflow status in DTN. Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 261f392429a968604847917e7467ac5e24c8c2c6 Author: Nevenko Stupar Date: Tue Oct 23 11:36:49 2018 -0400 drm/amd/display: expose dentist_get_divider_from_did expose this functions for future use. Signed-off-by: Nevenko Stupar Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit eb9714a201f46ac46c1314849242d9eba56752e4 Author: Wenjing Liu Date: Mon Oct 22 16:34:32 2018 -0400 drm/amd/display: resolve minor log problems [Why] dc_add_stream_to_context is used to check bw requirement. It is not an error if it fails. [How] Replace DC_ERROR with DC_LOG_WARNING. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 37cd85ce3322706d9d357ffbe54481fa884af9e5 Author: David Francis Date: Tue Oct 16 14:21:32 2018 -0400 drm/amd/display: Remove dc_stream_state->status [Why] dc_state has an array of dc_stream_status that contain pointers to the dc_plane_state and other useful information Confusingly, dc_stream_state also contains a dc_stream_status called status. This struct was partially initialized and used in a few places [How] stream->status.link has been replaced with stream->sink->link. If a stream does not have a sink, or a sink does not have a link, something has gone seriously wrong All other properties of stream->status were zeroed by kzalloc and never initialized, so they have been replaced by the number 0 This is a refactor: no functional change is intended Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit 2aa0061b9810e79f8e0e7db98fe692729ec8e95f Author: Steven Chiu Date: Mon Oct 15 14:16:20 2018 -0400 drm/amd/display: 3.2.05 Signed-off-by: Steven Chiu Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cfc6731d2f793942cda664251faf353623e8aa10 Merge: f2be6d710d25b 480ba9c18a27f Author: David S. Miller Date: Mon Nov 19 12:25:43 2018 -0800 Merge branch 'sctp-add-subscribe-per-asoc-and-sockopt-SCTP_EVENT' Xin Long says: ==================== sctp: add subscribe per asoc and sockopt SCTP_EVENT This patchset mainly adds the Event Subscription sockopt described in rfc6525#section-6.2: "Subscribing to events as described in [RFC6458] uses a setsockopt() call with the SCTP_EVENT socket option. This option takes the following structure, which specifies the association, the event type (using the same value found in the event type field), and an on/off boolean. struct sctp_event { sctp_assoc_t se_assoc_id; uint16_t se_type; uint8_t se_on; }; The user fills in the se_type field with the same value found in the strreset_type field, i.e., SCTP_STREAM_RESET_EVENT. The user will also fill in the se_assoc_id field with either the association to set this event on (this field is ignored for one-to-one style sockets) or one of the reserved constant values defined in [RFC6458]. Finally, the se_on field is set with a 1 to enable the event or a 0 to disable the event." As for the old SCTP_EVENTS Option with struct sctp_event_subscribe, it's being DEPRECATED. v1->v2: - fix some key word in changelog that triggerred the filters at vger.kernel.org. v2->v3: - fix an array out of bounds noticed by Neil in patch 1/4. ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit 480ba9c18a27ff77b02a2012e50dfd3e20ee9f7a Author: Xin Long Date: Sun Nov 18 16:08:54 2018 +0800 sctp: add sockopt SCTP_EVENT This patch adds sockopt SCTP_EVENT described in rfc6525#section-6.2. With this sockopt users can subscribe to an event from a specified asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 88ee48c1f3b7092414fb93c3cf0838ba24f62e16 Author: Xin Long Date: Sun Nov 18 16:08:53 2018 +0800 sctp: rename enum sctp_event to sctp_event_type sctp_event is a structure name defined in RFC for sockopt SCTP_EVENT. To avoid the conflict, rename it. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit a1e3a0590f9bd232f3a03fd87226a4a99bd5ec92 Author: Xin Long Date: Sun Nov 18 16:08:52 2018 +0800 sctp: add subscribe per asoc The member subscribe should be per asoc, so that sockopt SCTP_EVENT in the next patch can subscribe a event from one asoc only. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2cc0eeb67636e0339ad7b6cdfa305f63983642af Author: Xin Long Date: Sun Nov 18 16:08:51 2018 +0800 sctp: define subscribe in sctp_sock as __u16 The member subscribe in sctp_sock is used to indicate to which of the events it is subscribed, more like a group of flags. So it's better to be defined as __u16 (2 bytpes), instead of struct sctp_event_subscribe (13 bytes). Note that sctp_event_subscribe is an UAPI struct, used on sockopt calls, and thus it will not be removed. This patch only changes the internal storage of the flags. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 92f806d678e5136e4777b21e5ed5368482ac9ea9 Author: Jens Axboe Date: Mon Nov 19 11:37:31 2018 -0700 nvme-fc: remove ->poll implementation It's specifically looking for a given request, which we will not be supporting going forward. Also kill the qla2xxx poll implementation as that's the only user of the nvme-fc poll, and the now unused ->poll_queue() hook. Reviewed-by: Christoph Hellwig Reviewed-by: James Smart Signed-off-by: Jens Axboe commit 49e510dd164c8365fe03cd9638afbc7c1a156527 Author: Rob Herring Date: Fri Nov 16 16:10:58 2018 -0600 MIPS: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Signed-off-by: Rob Herring Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21150/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit f2be6d710d25be7d8d13f49f713d69dea9c71d57 Merge: bae4e109837b4 f2ce1065e767f Author: David S. Miller Date: Mon Nov 19 10:55:00 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 03b10fecb92143aa2599180ee2efd3388fe6ecc0 Author: Keerthy Date: Mon Nov 12 10:47:40 2018 +0530 soc: ti: wkup_m3: Add PRCM int16 as the wake up source Add PRCM int16 as the wake up source. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 0ec47be539e323ef4919fd63ea2f4162bf74892e Author: Keerthy Date: Wed Nov 7 10:34:20 2018 +0530 ARM: dts: am437x-gp-evm: Add sleep state for beeper pins Add sleep state for beeper pins. Without this there was a power increase during the suspend and standby states on V3_3D domain. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 6a156a05bb55de2655505429516bbce040aa89f8 Author: Dave Gerlach Date: Wed Nov 7 10:34:19 2018 +0530 ARM: dts: am437x-gp-evm: Add pinmux for gpio0 wake Add pinctrl settings so that gpio0 wake from suspend will be supported using buttons SW4 and SW7. Also, add pinctrl configuration for 0x954, spi0_d0, which is an unused pin brought out to a header on the board that in it's default state also connects to the gpio used for wakeup, gpio0_3, which affects the state of the pin and prevents a working wakeup unless we set the mux to a different state. Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 74fe9bf45e71a3122831106a19398dc96443181a Author: Dave Gerlach Date: Wed Nov 7 10:34:18 2018 +0530 ARM: dts: am437x-gp-evm: Add uart0 pinctrl default and sleep states Currently uart0 uses pinctrl config set by bootloader so create default state that can be restored after a suspend event. Also, modify uart0 pinctrl to include RTS and CTS pins as by default these are not in a mode for optimal power savings. Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 7235ed186e12d2e57de969cda55db8a620b0bcbf Author: Dave Gerlach Date: Wed Nov 7 10:34:17 2018 +0530 ARM: dts: am437x-gp-evm: Add pinctrl for debugss pins The pins used by debugss are not configued by default, place pulldowns on the pins for maximum power savings during sleep. Signed-off-by: Dave Gerlach [t-kristo@ti.com: converted to use AM4372_IOPAD macro] Signed-off-by: Tero Kristo Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 88f527d0cf0bf1b749d0d2fc245d50f28e078a7b Author: Dave Gerlach Date: Wed Nov 7 10:34:16 2018 +0530 ARM: dts: am437x-gp-evm: Add pinctrl for unused_pins There are several pins on this EVM that are not in use but they can still draw power if misconfigured. Create a pinctrl entry for these pins and configure each one for optimal power savings. Signed-off-by: Dave Gerlach [t-kristo@ti.com: converted to use AM4372_IOPAD macro] Signed-off-by: Tero Kristo Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit 865852a6e52f3790ee2ac154c9b57f15a4490a61 Author: Dave Gerlach Date: Wed Nov 7 10:34:15 2018 +0530 ARM: dts: am437x-gp-evm: Add state for ddr3 vtt toggle pin Add pinctrl data for ddr_vtt_toggle pin so that it is configured for proper state during DeepSleep0. The pin should enter DS0 off mode and hold the line low so VTT regulator is kept off while suspended. It is also important for the PULLUP to be set on this pin so that on removal of isolation, the VTT line is pulled high as a requirement for bringing the DDR3 out of self-refresh. This toggling is dependent on the IO isolation controlled by the wkup_m3. Without placing the IOs into isolation the DS0 states set for the pin will not be latched into effect during suspend. Signed-off-by: Dave Gerlach Signed-off-by: Keerthy Signed-off-by: Tony Lindgren commit a18695933b6eae84a8f24738aaefc20d7d651d09 Author: Adam Ford Date: Tue Oct 30 19:09:03 2018 -0500 ARM: dts: am3517-evm: Enable earlycon stdout path As long as the kernel cmdline has "earlycon" in it, this allows seeing debug messages earlier and does not require DEBUG_LL to be enabled. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit de6777c50e3517725180092e523547dfd29d96ac Author: Nathan Chancellor Date: Wed Oct 17 17:48:16 2018 -0700 ARM: dts: omap3-gta04: Fix comment block When compiling the kernel with Clang, the following warning appears: arch/arm/boot/dts/omap3-gta04.dtsi:385:56: warning: '/*' within block comment [-Wcomment] /* OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp_clks */ ^ 1 warning generated. Fixes: 3c10507a39e8 ("ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux") Signed-off-by: Nathan Chancellor Signed-off-by: Tony Lindgren commit b76455335447fa8b73ebc0ca768e46ee74fcd329 Author: Geert Uytterhoeven Date: Thu Nov 15 10:58:58 2018 +0100 ARM: OMAP2+: timer: Remove obsolete inclusion of As of commit d1dabab2841d546f ("ARM: OMAP2+: Clean up omap4_local_timer_init"), this header file is no longer used. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tony Lindgren commit 7d3b37b170b85359678f2d2291e27c6b810a4369 Author: Nathan Chancellor Date: Wed Oct 17 17:54:00 2018 -0700 ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup When building the kernel with Clang, the following section mismatch warning appears: WARNING: vmlinux.o(.text+0x38b3c): Section mismatch in reference from the function omap44xx_prm_late_init() to the function .init.text:omap44xx_prm_enable_io_wakeup() The function omap44xx_prm_late_init() references the function __init omap44xx_prm_enable_io_wakeup(). This is often because omap44xx_prm_late_init lacks a __init annotation or the annotation of omap44xx_prm_enable_io_wakeup is wrong. Remove the __init annotation from omap44xx_prm_enable_io_wakeup so there is no more mismatch. Signed-off-by: Nathan Chancellor Signed-off-by: Tony Lindgren commit c10b26abeb53cabc1e6271a167d3f3d396ce0218 Author: Nathan Chancellor Date: Wed Oct 17 17:52:07 2018 -0700 ARM: OMAP2+: hwmod: Fix some section annotations When building the kernel with Clang, the following section mismatch warnings appears: WARNING: vmlinux.o(.text+0x2d398): Section mismatch in reference from the function _setup() to the function .init.text:_setup_iclk_autoidle() The function _setup() references the function __init _setup_iclk_autoidle(). This is often because _setup lacks a __init annotation or the annotation of _setup_iclk_autoidle is wrong. WARNING: vmlinux.o(.text+0x2d3a0): Section mismatch in reference from the function _setup() to the function .init.text:_setup_reset() The function _setup() references the function __init _setup_reset(). This is often because _setup lacks a __init annotation or the annotation of _setup_reset is wrong. WARNING: vmlinux.o(.text+0x2d408): Section mismatch in reference from the function _setup() to the function .init.text:_setup_postsetup() The function _setup() references the function __init _setup_postsetup(). This is often because _setup lacks a __init annotation or the annotation of _setup_postsetup is wrong. _setup is used in omap_hwmod_allocate_module, which isn't marked __init and looks like it shouldn't be, meaning to fix these warnings, those functions must be moved out of the init section, which this patch does. Signed-off-by: Nathan Chancellor Signed-off-by: Tony Lindgren commit 0427612cddef07568ba80596a02089181092783d Author: Petr Vorel Date: Sat Nov 17 07:25:55 2018 +0100 Documentation: Update SELinux reference policy URL Signed-off-by: Petr Vorel Signed-off-by: Paul Moore commit a2c97da11cdb973b752dd434aee9636ce10ee737 Author: Richard Guy Briggs Date: Fri Nov 16 16:30:10 2018 -0500 audit: use session_info helper There are still a couple of places (mark and watch config changes) that open code auid and ses fields in sequence in records instead of using the audit_log_session_info() helper. Use the helper. Adjust the helper to accommodate being the first fields. Passes audit-testsuite. Signed-off-by: Richard Guy Briggs [PM: fixed misspellings in the description] Signed-off-by: Paul Moore commit 0fe3c7fceb500de2d0adfb9dcf292580cd43ea38 Author: Richard Guy Briggs Date: Fri Nov 16 12:16:35 2018 -0500 audit: localize audit_log_session_info prototype The audit_log_session_info() function is only used in kernel/audit*, so move its prototype to kernel/audit.h Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit fb6f0b64e455b207a636346588e65bf9598d30eb Author: Chris Wilson Date: Fri Nov 2 16:12:12 2018 +0000 drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture Since capturing the error state requires fiddling around with the GGTT to read arbitrary buffers and is itself run under stop_machine(), it deadlocks the machine (effectively a hard hang) when run in conjunction with Broxton's VTd workaround to serialize GGTT access. v2: Store the ERR_PTR in first_error so that the error can be reported to the user via sysfs. v3: Mention the quirk in dmesg (using info as per usual) Fixes: 0ef34ad6222a ("drm/i915: Serialize GTT/Aperture accesses on BXT") Signed-off-by: Chris Wilson Cc: Jon Bloomfield Cc: John Harrison Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181102161232.17742-5-chris@chris-wilson.co.uk commit 85f4d4b65fdd67f1d6dc9eeb1d91923cef07eb6a Author: Jens Axboe Date: Tue Nov 6 13:30:55 2018 -0700 block: have ->poll_fn() return number of entries polled We currently only really support sync poll, ie poll with 1 IO in flight. This prepares us for supporting async poll. Note that the returned value isn't necessarily 100% accurate. If poll races with IRQ completion, we assume that the fact that the task is now runnable means we found at least one entry. In reality it could be more than 1, or not even 1. This is fine, the caller will just need to take this into account. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 849a370016a5489c49253338507ee6cc4a08df4b Author: Jens Axboe Date: Fri Nov 16 08:37:34 2018 -0700 block: avoid ordered task state change for polled IO For the core poll helper, the task state setting don't need to imply any atomics, as it's the current task itself that is being modified and we're not going to sleep. For IRQ driven, the wakeup path have the necessary barriers to not need us using the heavy handed version of the task state setting. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a4668d9ba4be1ca9f4a39798ba3419fdfef0750d Author: Jens Axboe Date: Mon Nov 19 08:18:24 2018 -0700 nvme: default to 0 poll queues We need a better way of configuring this, and given that polling is (still) a bit niche, let's default to using 0 poll queues. That way we'll have the same read/write/poll behavior as 4.20, and users that want to test/use polling are required to do manual configuration of the number of poll queues. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9ede2a76f66e48e728579fbd699077c2ae613f3a Author: Rob Herring Date: Fri Nov 16 16:05:40 2018 -0600 pinctrl: mediatek: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 977d057ad3464c4698fd875ca6bf3f30e554cee2 Author: Evan Green Date: Fri Nov 16 10:58:53 2018 -0800 pinctrl: msm: Add sleep pinctrl state transitions Add PM suspend callbacks to the msm core driver that select the sleep and default pinctrl states. Then wire those callbacks up in the sdm845 driver, for those boards that may have GPIO hogs that need to change state during suspend. Signed-off-by: Evan Green Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 757bd6d536deeed200926d1d47cfd1a6369e9af6 Author: Ryder Lee Date: Mon Nov 12 09:45:06 2018 +0800 dt-bindings: pinctrl: update bindings for MT7629 SoC This updates bindings for MT7629 pinctrl driver. Signed-off-by: Ryder Lee Reviewed-by: Sean Wang Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit b44677375fee84882a51eea586947676a260300b Author: Ryder Lee Date: Mon Nov 12 09:45:05 2018 +0800 pinctrl: mediatek: add pinctrl support for MT7629 SoC This adds MT7629 pinctrl driver based on MediaTek pinctrl-moore core. Signed-off-by: Ryder Lee Acked-by: Sean Wang Signed-off-by: Linus Walleij commit ef4734500407ce4df3985eb55e25c25a98580ac3 Author: Viresh Kumar Date: Fri Nov 16 15:31:14 2018 +0530 ARM: dts: sunxi: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Maxime Ripard commit 8a9d000f015d0ee9191f5d0c2abc43ec9b8a4756 Author: Brajeswar Ghosh Date: Fri Nov 16 16:19:10 2018 +0530 drivers/gpio/gpio-grgpio.c: Remove duplicate header Remove linux/gpio/driver.h which is included more than once Signed-off-by: Brajeswar Ghosh Signed-off-by: Linus Walleij commit fa68d4f8476bea4cdf441062b614b41bb85ef1da Author: Damian Kos Date: Tue Nov 6 15:37:05 2018 +0000 drm/rockchip: fix for mailbox read size Some of the functions (like cdn_dp_dpcd_read, cdn_dp_get_edid_block) allow to read 64KiB, but the cdn_dp_mailbox_read_receive, that is used by them, can read only up to 255 bytes at once. Normally, it's not a big issue as DPCD or EDID reads won't (hopefully) exceed that value. The real issue here is the revocation list read during the HDCP authentication process. (problematic use case: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/gpu/drm/rockchip/cdn-dp-reg.c#1152) The list can reach 127*5+4 bytes (num devs * 5 bytes per ID/Bksv + 4 bytes of an additional info). In other words - CTSes with HDCP Repeater won't pass without this fix. Oh, and the driver will most likely stop working (best case scenario). Signed-off-by: Damian Kos Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1541518625-25984-1-git-send-email-dkos@cadence.com commit 571610678bf344006ab4c47c6fd0a842e9ac6a1b Author: A.s. Dong Date: Mon Nov 12 15:25:48 2018 +0000 pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"), NO_PAD_CTL pads map are not skipped anymore which results in a possible memory corruption. As we actually only need to create config maps for SCU pads and MMIO pads which are not using the default config (a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating the config maps. And during MMIO pads parsing, we also need update the list_p point as SCU case to ensure the pin data next parsed is correct. Cc: Linus Walleij Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support") Reported-by: Martin Kaiser Suggested-by: Leonard Crestez Signed-off-by: Dong Aisheng Reviewed-by: Martin Kaiser Tested-by: Leonard Crestez Tested-by: Kevin Hilman Signed-off-by: Linus Walleij commit cdd46460fe278e04d8ee665d975aa2962036838f Author: Viresh Kumar Date: Fri Nov 16 15:34:32 2018 +0530 arm64: dts: rockchip: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Heiko Stuebner commit 99935bd4b5b4558beb069222e6d6143fe5830d64 Author: Viresh Kumar Date: Fri Nov 16 15:31:13 2018 +0530 ARM: dts: rockchip: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Heiko Stuebner commit df7b1f2e0a4ae0fceff261e29cde63dafcf2360f Author: Katsuhiro Suzuki Date: Sun Nov 18 13:18:02 2018 +0900 clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328 This patch fixes mistakes in HCLK_I2S1_8CH for running I2S1 successfully. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit 5c73ac2f8b70834a603eb2d92eb0bb464634420b Author: Katsuhiro Suzuki Date: Sun Nov 18 13:16:12 2018 +0900 clk: rockchip: fix I2S1 clock gate register for rk3328 This patch fixes definition of I2S1 clock gate register for rk3328. Current setting is not related I2S clocks. - bit6 of CRU_CLKGATE_CON0 means clk_ddrmon_en - bit6 of CRU_CLKGATE_CON1 means clk_i2s1_en Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner commit ffb8c1e45e7ae648a3a1689aa71be50fb459316e Merge: a8d8ee437ea0b ff9b34b615a37 Author: Mark Brown Date: Mon Nov 19 13:16:15 2018 +0000 Merge branch 'topic/coupled' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21 for trivial conflict commit ed54ffbe554f0902689fd6d1712bbacbacd11376 Author: Lubomir Rintel Date: Fri Nov 16 17:23:47 2018 +0100 power: supply: olpc_battery: correct the temperature units According to [1] and [2], the temperature values are in tenths of degree Celsius. Exposing the Celsius value makes the battery appear on fire: $ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery ... temperature: 236.9 degrees C Tested on OLPC XO-1 and OLPC XO-1.75 laptops. [1] include/linux/power_supply.h [2] Documentation/power/power_supply_class.txt Fixes: fb972873a767 ("[BATTERY] One Laptop Per Child power/battery driver") Cc: stable@vger.kernel.org Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel commit 81c9d563cc7413135f398d95676f947877f9cf0f Author: Saravanan Sekar Date: Thu Nov 15 13:47:47 2018 +0100 pinctrl: actions: Add Actions Semi S700 pinctrl driver Add pinctrl and gpio driver for Actions Semi S700 SoC. The driver supports pinctrl, pinmux, pinconf, gpio and interrupt functionalities through a range of registers common to both gpio driver and pinctrl driver. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Acked-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit ba54e3005de16c948165ef14f1f196f14830e4b9 Author: Saravanan Sekar Date: Thu Nov 15 13:47:46 2018 +0100 dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC Add pinctrl and pio bindings for Actions Semi S700 SoC. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Reviewed-by: Rob Herring Acked-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit f3f7af952a1a74d346b3b58f517cd0f66dd8a04a Author: Saravanan Sekar Date: Thu Nov 15 13:47:45 2018 +0100 pinctrl: actions: define pad control configurtion to SoC specific pad control for s900 and s700 are differs in number of pull control configuraions s900 has 4 pull controls - high impedence, pull up, pull down, repeater s700, s500 has 2 pull controls - pull up and pull down so pad control configuration has to SoC specific, moved out from pinctrl common to s900 specific. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Acked-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit 0a98bf52b15dfd66da2cf666495b3f7841c7b5ab Author: Saravanan Sekar Date: Thu Nov 15 13:47:44 2018 +0100 pinctrl: actions: define constructor generic to Actions Semi SoC's Move generic defines common to the Owl family out of S900 driver. Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Acked-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit a8d8ee437ea0bf21f840f33ca87f8e1641727aae Author: Dmitry Osipenko Date: Mon Nov 19 00:56:16 2018 +0300 regulator: Change regulator-coupled-max-spread property Redefine binding for regulator-coupled-max-spread property in a way that max-spread values are defined per regulator couple instead of defining single max-spread for the whole group of coupled regulators. With that change the following regulators coupling configuration will be possible: regA: regulatorA { regulator-coupled-with = <®B ®C>; regulator-coupled-max-spread = <100000 300000>; }; regB: regulatorB { regulator-coupled-with = <®A ®C>; regulator-coupled-max-spread = <100000 200000>; }; regC: regulatorC { regulator-coupled-with = <®A ®B>; regulator-coupled-max-spread = <300000 200000>; }; Note that the regulator-coupled-max-spread property does not have any users yet, hence it's okay to change the binding. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit ff9b34b615a37a3f4d359bf82fc97f5e0310b301 Author: Dmitry Osipenko Date: Mon Nov 19 00:56:19 2018 +0300 regulator: core: Keep regulators-list locked while traversing the list It's unlikely that regulators may disappear/appear while regulators debug-summary is being prepared, but let's be consistent and avoid that situation. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 089e2cc2e1861ad13a56811aa538419989346089 Author: Dmitry Osipenko Date: Mon Nov 19 00:56:18 2018 +0300 regulator: core: Properly handle case where supply is the couple Check whether supply regulator is the couple to avoid infinite recursion during of locking. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit f8702f9e4aa7b45131af3df5531d6e3835269141 Author: Dmitry Osipenko Date: Mon Nov 19 00:56:17 2018 +0300 regulator: core: Use ww_mutex for regulators locking Wait/wound mutex shall be used in order to avoid lockups on locking of coupled regulators. Signed-off-by: Dmitry Osipenko Suggested-by: Lucas Stach Signed-off-by: Mark Brown commit 97cfb6cd34f2a3dab03dce5f885333c213bbec8a Author: Benjamin Gaignard Date: Tue Nov 13 10:51:41 2018 +0100 pinctrl: stm32: protect configuration registers with a hwspinlock If a hwspinlock if defined in device tree use it to protect configuration registers. Signed-off-by: Benjamin Gaignard Acked-by: Alexandre TORGUE Signed-off-by: Linus Walleij commit c43f666af0cc8e668575e83e3d528847448ae72e Author: Benjamin Gaignard Date: Tue Nov 13 10:51:40 2018 +0100 dt-bindings: pinctrl: stm32: Document hwlocks properties Add hwlocks as optional property Signed-off-by: Benjamin Gaignard Signed-off-by: Linus Walleij commit c12faa2bc56cb1e7a12b49f0b3a935c0c64fd0b4 Author: Rob Herring Date: Fri Nov 16 16:11:04 2018 -0600 ALSA: aoa: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Replace the open coded iterating over child nodes with for_each_child_of_node() while we're here. Cc: Johannes Berg Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: linuxppc-dev@lists.ozlabs.org Cc: alsa-devel@alsa-project.org Signed-off-by: Rob Herring Signed-off-by: Takashi Iwai commit 988e30af9a508a40d958a9eec5c47b1c6d36176f Merge: 4593f2da15bcc a6b0961b39896 Author: Takashi Iwai Date: Mon Nov 19 12:19:21 2018 +0100 Merge branch 'for-linus' into for-next Backporting for further works on ca0132 codec driver Signed-off-by: Takashi Iwai commit 31579ba22c0c5b7645087823904a5780d2385d4a Author: Joonas Lahtinen Date: Fri Nov 16 16:44:47 2018 +0200 drm/i915: Hide enable_gvt modparam when not compiled in Hide the enable_gvt modparam in the default scenario where support has not been compiled in. Cc: Zhenyu Wang Cc: Zhi Wang Cc: Chris Wilson Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Acked-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20181116144447.7836-1-joonas.lahtinen@linux.intel.com commit 4593f2da15bcc5657ee80c1f4f2dfd50aca4a0e2 Author: Colin Ian King Date: Fri Nov 16 15:06:32 2018 +0000 ALSA: asihpi: clean up indentation, replace spaces with tab The struct declaration is not indented correctly. Fix this by replacing spaces with a tab. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai commit 6b671c27ff57cb420fb0066563ce6d696ec3abc5 Author: Joonas Lahtinen Date: Fri Nov 16 15:55:10 2018 +0200 Revert "drm/i915/perf: Fix warning in documentation" Userspace portion is still missing. This reverts commit 9fa6e2f7609fdbb7d6f86be86371a5719bec0376. Cc: Lionel Landwerlin Cc: Matthew Auld Signed-off-by: Joonas Lahtinen Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181116135510.13807-2-joonas.lahtinen@linux.intel.com commit fe841686470d383e33b606d0704ef4295141c582 Author: Joonas Lahtinen Date: Fri Nov 16 15:55:09 2018 +0200 Revert "drm/i915/perf: add a parameter to control the size of OA buffer" Userspace portion is still missing. This reverts commit cd956bfcd0f58d20485ac0a785415f7d9327a95f. Cc: Lionel Landwerlin Cc: Matthew Auld Signed-off-by: Joonas Lahtinen Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181116135510.13807-1-joonas.lahtinen@linux.intel.com commit b5ff38f15c3e3f5533c530a725140e9994c6011d Author: Takeshi Kihara Date: Sun Nov 18 18:29:03 2018 +0100 pinctrl: sh-pfc: r8a77990: Add CAN FD pins, groups and functions This patch adds CAN FD{0,1} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut [geert: Move canfd from common to automotive] Signed-off-by: Geert Uytterhoeven commit c1e5bd286fe501992165608551f889ec69f5901a Author: Takeshi Kihara Date: Sun Nov 18 18:29:02 2018 +0100 pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Signed-off-by: Geert Uytterhoeven commit 1b259dde9bd9001783d2deb1c4773a2e5ce45860 Author: Takeshi Kihara Date: Sun Nov 18 18:29:01 2018 +0100 pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions This patch adds CAN FD{0,1} pins, groups and functions to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Signed-off-by: Geert Uytterhoeven commit 3a44d6a92e2572c602cfce692ae96d0e95d9c848 Author: Takeshi Kihara Date: Sun Nov 18 18:29:00 2018 +0100 pinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions This patch adds CAN{0,1} pins, groups and functions to the R8A77965 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Signed-off-by: Geert Uytterhoeven commit 8d7bcad65ef390ef9efd4b3d3fd18dc2a08f2a14 Author: Takeshi Kihara Date: Fri Nov 16 15:20:51 2018 +0800 pinctrl: sh-pfc: r8a7796: Add I2C{0,3,5} pins, groups and functions This patch adds I2C{0,3,5} pins, groups and functions to the R8A7796 SoC. These pins are physically muxed with other pins. Therefore, setup of MOD_SEL is needed for exclusive control with other pins. Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven commit e244ff6f913f6ce4c77a00647462bc34c4221f46 Author: Takeshi Kihara Date: Fri Nov 16 15:20:50 2018 +0800 pinctrl: sh-pfc: r8a7795-es1: Add I2C{0,3,5} pins, groups and functions This patch adds I2C{0,3,5} pins, groups and functions to the R8A7795 ES1.x SoC. These pins are physically muxed with other pins. Therefore, setup of MOD_SEL is needed for exclusive control with other pins. Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven commit 100431b61dc5a591913b16971af644d8bf622599 Author: Takeshi Kihara Date: Fri Nov 16 15:20:49 2018 +0800 pinctrl: sh-pfc: r8a7795: Add I2C{0,3,5} pins, groups and functions This patch adds I2C{0,3,5} pins, groups and functions to the R8A7795 SoC. These pins are physically muxed with other pins. Therefore, setup of MOD_SEL is needed for exclusive control with other pins. Signed-off-by: Takeshi Kihara Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven commit 50d1ba1764b3e00ae8c331202d50c5535d6b3361 Author: Ulrich Hecht Date: Fri Nov 16 15:20:48 2018 +0800 pinctrl: sh-pfc: Add physical pin multiplexing helper macros Used by I2C controllers 0, 3 and 5 in R8A7795 and R8A7796 SoCs. Signed-off-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven commit 341fe38975211e73c4b1e9b44d5ccbdf7960466b Author: Geert Uytterhoeven Date: Mon Nov 19 11:16:51 2018 +0100 pinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2,PHYS}() The PINMUX_IPSR_MSEL2() and PINMUX_IPSR_PHYS() macros are unused, and will conflict with generic macros that are to be added. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman commit ba3ac35b4896cf291f6fdaf04a505985e5ccce30 Author: Takeshi Kihara Date: Tue Nov 13 20:22:26 2018 +0100 arm64: dts: renesas: r8a77990: ebisu: Add and enable PCIe device node This patch adds PCI express channel 0 device node to the R8A77990 SoC and enables PCIEC0 PCI express controller on the Ebisu board. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Signed-off-by: Simon Horman commit 2ffcbce39ea1e355eed8c6527308624f366f1c58 Author: Borislav Petkov Date: Sat Oct 20 15:04:52 2018 +0200 x86/microcode/AMD: Update copyright Adjust copyright. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-17-bp@alien8.de commit 413c89154c6759cbd5e17febd04c187470613173 Author: Maciej S. Szmigiero Date: Thu Sep 13 12:01:52 2018 +0200 x86/microcode/AMD: Check the equivalence table size when scanning it Currently, the code scanning the CPU equivalence table read from a microcode container file assumes that it actually contains a terminating zero entry. Check also the size of this table to make sure that no reads past its end happen, in case there's no terminating zero entry at the end of the table. [ bp: Adjust to new changes. ] Signed-off-by: Maciej S. Szmigiero Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-16-bp@alien8.de commit 39cd7c17f9bc3fe3737dacd4225eeabe56df197c Author: Maciej S. Szmigiero Date: Thu Sep 13 11:45:42 2018 +0200 x86/microcode/AMD: Convert CPU equivalence table variable into a struct Convert the CPU equivalence table into a proper struct in preparation for tracking also the size of this table. [ bp: Have functions deal with struct equiv_cpu_table pointers only. Rediff. ] Signed-off-by: Maciej S. Szmigiero Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-15-bp@alien8.de commit 38673f623dfcaa03921aa5704ade176cd584c886 Author: Maciej S. Szmigiero Date: Thu Sep 13 08:49:22 2018 +0200 x86/microcode/AMD: Check microcode container data in the late loader Convert the late loading path to use the newly introduced microcode container data checking functions as it was previously done for the early loader. [ bp: Keep header length addition in install_equiv_cpu_table() and rediff. ] Signed-off-by: Maciej S. Szmigiero Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-14-bp@alien8.de commit 72dc571a3a77081112944fe0c2dbff614114b04a Author: Borislav Petkov Date: Wed Sep 12 18:50:23 2018 +0200 x86/microcode/AMD: Fix container size's type Make it size_t everywhere as this is what we get from cpio. [ bp: Fix a smatch warning. ] Originally-by: Maciej S. Szmigiero Reported-by: kbuild test robot Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20181107170218.7596-13-bp@alien8.de commit c45e80358cb3c61eaf6f5d35af86c6a874935bd0 Author: Borislav Petkov Date: Wed Sep 12 18:33:34 2018 +0200 x86/microcode/AMD: Convert early parser to the new verification routines Now that they have the required functionality, use them to verify the equivalence table and each patch, thus making parse_container() more readable. Originally-by: "Maciej S. Szmigiero" Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-12-bp@alien8.de commit d430a305b7f8127d992e79e90b6fac00f99d23b3 Author: Borislav Petkov Date: Fri Oct 19 14:27:24 2018 +0200 x86/microcode/AMD: Change verify_patch()'s return value Have it return 0 on success, positive value when the current patch should be skipped and negative on error. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-11-bp@alien8.de commit c79570205ba6064bd756f531e6d9d0b498a191d6 Author: Borislav Petkov Date: Fri Oct 19 14:09:39 2018 +0200 x86/microcode/AMD: Move chipset-specific check into verify_patch() ... where it belongs. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org https://lkml.kernel.org/r/20181107170218.7596-10-bp@alien8.de commit 51776fb805fe4f248f264c1783c286ae60552e9a Author: Borislav Petkov Date: Thu Jul 26 06:50:44 2018 +0200 x86/microcode/AMD: Move patch family check to verify_patch() ... where all the microcode patch verification is being concentrated. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-9-bp@alien8.de commit 6cdce951f7a1d8161910d5cd9bd9e6197bf5cc97 Author: Borislav Petkov Date: Thu Jul 19 15:47:07 2018 +0200 x86/microcode/AMD: Simplify patch family detection Instead of traversing the equivalence table, compute the family a patch is for, from the processor revision ID in the microcode header. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-8-bp@alien8.de commit 2b8d34b1ece506a9bbd47b56d266ee020a0c65ac Author: Borislav Petkov Date: Thu Jul 19 15:32:42 2018 +0200 x86/microcode/AMD: Concentrate patch verification Add a verify_patch() function which tries to sanity-check many aspects of a microcode patch supplied by an outside container before attempting a load. Prepend all sub-functions' names which verify an aspect of a microcode patch with "__". Call it in verify_and_add_patch() *before* looking at the microcode header. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-7-bp@alien8.de commit 70887cb23eda6bedac73eef227b55e3eb74e0cb7 Author: Borislav Petkov Date: Thu Oct 18 17:55:45 2018 +0200 x86/microcode/AMD: Cleanup verify_patch_size() more Rename the variable which contains the patch size read out from the section header to sh_psize for better differentiation of all the "sizes" in that function. Also, improve the comment above it. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-6-bp@alien8.de commit cfffbfeb424bc274aba3b5ed4afd5891662481a8 Author: Borislav Petkov Date: Sat Jul 28 19:04:02 2018 +0200 x86/microcode/AMD: Clean up per-family patch size checks Starting with family 0x15, the patch size verification is not needed anymore. Thus get rid of the need to update this checking function with each new family. Keep the check for older families. Signed-off-by: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-5-bp@alien8.de commit 3974b68114fed3735f623931e673538d8ab92d26 Author: Borislav Petkov Date: Thu Jun 28 19:44:29 2018 +0200 x86/microcode/AMD: Move verify_patch_size() up in the file ... to enable later improvements. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20181107170218.7596-4-bp@alien8.de commit f4ff25916c1186912e1b53c25861c8abc9f15687 Author: Maciej S. Szmigiero Date: Tue Jun 19 20:47:32 2018 +0200 x86/microcode/AMD: Add microcode container verification Add container and patch verification functions to the AMD microcode update driver. These functions check whether a passed buffer contains the relevant structure, whether it isn't truncated and (for actual microcode patches) whether the size of a patch is not too large for a particular CPU family. By adding these checks as separate functions the actual microcode loading code won't get interspersed with a lot of checks and so will be more readable. [ bp: Make all pr_err() calls into pr_debug() and drop the verify_patch() bits. ] Signed-off-by: Maciej S. Szmigiero Signed-off-by: Borislav Petkov Cc: x86-ml Link: http://lkml.kernel.org/r/3014e96c82cd90761b4601bd2cfe59c4119e46a7.1529424596.git.mail@maciej.szmigiero.name commit 479229d1607b6051abc4f9c2ccbb65338f030c65 Author: Maciej S. Szmigiero Date: Tue Jun 19 20:47:31 2018 +0200 x86/microcode/AMD: Subtract SECTION_HDR_SIZE from file leftover length verify_patch_size() verifies whether the remaining size of the microcode container file is large enough to contain a patch of the indicated size. However, the section header length is not included in this indicated size but it is present in the leftover file length so it should be subtracted from the leftover file length before passing this value to verify_patch_size(). [ bp: Split comment. ] Signed-off-by: Maciej S. Szmigiero Signed-off-by: Borislav Petkov Cc: x86-ml Link: http://lkml.kernel.org/r/6df43f4f6a28186a13a66e8d7e61143c5e1a2324.1529424596.git.mail@maciej.szmigiero.name commit 5160063d567283cff1b85fdc1bcf843295b39eca Author: Takeshi Kihara Date: Fri Nov 16 01:47:07 2018 +0900 pinctrl: sh-pfc: r8a77990: Add HSCIF pins, groups, and functions This patch adds HSCIF{0,1,2,3,4} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Geert Uytterhoeven commit bae4e109837b419b93fbddcb414c86673b1c90a5 Author: Shalom Toledo Date: Sun Nov 18 16:43:03 2018 +0000 mlxsw: spectrum: Expose discard counters via ethtool Expose packets discard counters via ethtool to help with debugging. Signed-off-by: Shalom Toledo Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit aa6daacaa113cda96760c8d3157bae937908f6e3 Author: Eric Dumazet Date: Sun Nov 18 07:37:33 2018 -0800 tun: use netdev_alloc_frag() in tun_napi_alloc_frags() In order to cook skbs in the same way than Ethernet drivers, it is probably better to not use GFP_KERNEL, but rather use the GFP_ATOMIC and PFMEMALLOC mechanisms provided by netdev_alloc_frag(). This would allow to use tun driver even in memory stress situations, especially if swap is used over this tun channel. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Eric Dumazet Cc: Petar Penkov Cc: Mahesh Bandewar Cc: Willem de Bruijn Signed-off-by: David S. Miller commit 726799a4f9192800a6393b92da8d7573d573eb8e Merge: 20a9da34ae009 3680033002f46 Author: David S. Miller Date: Sun Nov 18 18:52:27 2018 -0800 Merge branch 'sparc-syscall-gen' Firoz Khan says: ==================== sparc: system call table generation support The purpose of this patch series is, we can easily add/modify/delete system call table support by cha- nging entry in syscall.tbl file instead of manually changing many files. The other goal is to unify the system call table generation support implementation across all the architectures. The system call tables are in different format in all architecture. It will be difficult to manually add, modify or delete the system calls in the resp- ective files manually. To make it easy by keeping a script and which'll generate uapi header file and syscall table file. syscall.tbl contains the list of available system calls along with system call number and correspond- ing entry point. Add a new system call in this arch- itecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. - Compat entry name, if required. ARM, s390 and x86 architecuture does exist the sim- ilar support. I leverage their implementation to come up with a generic solution. I have done the same support for work for alpha, ia64, m68k, microblaze, mips, parisc, powerpc, sh and xtensa. Below mentioned git repository contains more details about the workflow. https://github.com/frzkhn/system_call_table_generator/ Finally, this is the ground work to solve the Y2038 issue. We need to add two dozen of system calls to solve Y2038 issue. So this patch series will help to add new system calls easily by adding new entry in the syscall.tbl. Changes since v2: - changed from generic-y to generated-y in Kbuild. - added io_pgetevents entry in the syscall.tbl. - updated the compat system call table. Changes since v1: - optimized/updated the syscall table generation scripts. - fixed all mixed indentation issues in syscall.tbl. - added "comments" in syscall.tbl. ==================== Signed-off-by: David S. Miller commit 3680033002f4682ae6799b4b864961a4f99be6df Author: Firoz Khan Date: Wed Nov 14 10:56:31 2018 +0530 sparc: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_32/64.h and syscall_table_32/64/c32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32.h files by the syscall table generation script invoked by parisc/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/systbls_32/64.S file. Signed-off-by: Firoz Khan Signed-off-by: David S. Miller commit 6ff645dd683af0cc465798325d1a436ff2f26ccf Author: Firoz Khan Date: Wed Nov 14 10:56:30 2018 +0530 sparc: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. - Compat entry name, if required. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32/64.h and syscall_table_32/64/c32.h files respect- ively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32/64.h will be included by uapi/asm/unistd.h and syscall_table_32/64/- c32.h is included by kernel/syscall.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: David S. Miller commit 61257f56ada73302cce7da4887921fa634279865 Author: Firoz Khan Date: Wed Nov 14 10:56:29 2018 +0530 sparc: add __NR_syscalls along with NR_syscalls NR_syscalls macro holds the number of system call exist in sparc architecture. We have to change the value of NR- _syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_sy- scalls value. 1. Update NR_syscalls in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_sys- calls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_syscalls asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: David S. Miller commit d441f93dd07262e3d7520cc51de7db2333186b88 Author: Firoz Khan Date: Wed Nov 14 10:56:28 2018 +0530 sparc: move __IGNORE* entries to non uapi header All the __IGNORE* entries are resides in the uapi header file move to non uapi header asm/unistd.h as it is not used by any user space applications. It is correct to keep __IGNORE* entry in non uapi header asm/unistd.h while uapi/asm/unistd.h must hold information only useful for user space applications. One of the patch in this patch series will generate uapi header file. The information which directly used by the user space application must be present in uapi file. Signed-off-by: Firoz Khan Signed-off-by: David S. Miller commit 9235dd441af43599b9cdcce599a3da4083fcad3c Merge: d7563c55ef9fc 36b486bc68211 Author: Dave Airlie Date: Mon Nov 19 11:07:52 2018 +1000 Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next New features for 4.21: amdgpu: - Support for SDMA paging queue on vega - Put compute EOP buffers into vram for better performance - Share more code with amdkfd - Support for scanout with DCC on gfx9 - Initial kerneldoc for DC - Updated SMU firmware support for gfx8 chips - Rework CSA handling for eventual support for preemption - XGMI PSP support - Clean up RLC handling - Enable GPU reset by default on VI, SOC15 dGPUs - Ring and IB test cleanups amdkfd: - Share more code with amdgpu ttm: - Move global init out of the drivers scheduler: - Track if schedulers are ready for work - Timeout/fault handling changes to facilitate GPU recovery Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20181114165113.3751-1-alexander.deucher@amd.com commit d7563c55ef9fc1fd2301b8708b3c1f53509d6745 Merge: 9ff01193a20d3 e7afb623b4fb8 Author: Dave Airlie Date: Mon Nov 19 10:40:00 2018 +1000 Merge tag 'drm-misc-next-2018-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v4.21, part 1: UAPI Changes: - Add syncobj timeline support to drm. Cross-subsystem Changes: - Remove shared fence staging in dma-buf's fence object, and allow reserving more than 1 fence and add more paranoia when debugging. - Constify infoframe functions in video/hdmi. Core Changes: - Add vkms todo, and a lot of assorted doc fixes. - Drop transitional helpers and convert drivers to use drm_atomic_helper_shutdown(). - Move atomic state helper functions to drm_atomic_state_helper.[ch] - Refactor drm selftests, and add new tests. - DP MST atomic state cleanups. - Drop EXPORT_SYMBOL from drm leases. - Lease cleanups and fixes. - Create render node for vgem. Driver Changes: - Fix build failure in imx without fbdev emulation. - Add rotation quirk for GPD win2 panel. - Add support for various CDTech panels, Banana Pi Panel, DLC1010GIG, Olimex LCD-O-LinuXino, Samsung S6D16D0, Truly NT35597 WQXGA, Himax HX8357D, simulated RTSM AEMv8. - Add dw_hdmi support to rockchip driver. - Fix YUV support in vc4. - Fix resource id handling in virtio. - Make rockchip use dw-mipi-dsi bridge driver, and add dual dsi support. - Advertise that tinydrm only supports DRM_FORMAT_MOD_LINEAR. - Convert many drivers to use atomic helpers, and drm_fbdev_generic_setup(). - Add Mali linear tiled formats, and enable them in the Mali-DP driver. - Add support for H6 DE3 mixer 0, DW HDMI, HDMI PHY and TCON TOP. - Assorted driver cleanups and fixes. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/be7ebd91-edd9-8fa4-4286-1c57e3165113@linux.intel.com commit 05b0e1d6980f9d76a6e5c6184854141bc26c2b13 Merge: cddaf02bcb731 f2f1a847e74f6 Author: David S. Miller Date: Sun Nov 18 16:16:20 2018 -0800 Merge branch 'IP101GR-devicetree-based-configuration-of-SEL_INTR32' Martin Blumenstingl says: ==================== IP101GR: devicetree based configuration of SEL_INTR32 The IP101GR is a 32-pin QFN package variant of the IP101G/IP101GA Ethernet PHY. Due to it's limited amount of pins the RXER (receive error) and INTR32 (interrupt) functions share pin 21. The goal of this series is: - some small cleanups in patches 3, 4 and 5 - allowing the kernel to detect IRQ floods on boards where the IP101GR is configured in RXER mode but the RXER line is configured on the host SoC as interrupt line (patch 6) - configuration of the SEL_INTR32 register so we can use the interrupt function on boards where the RXER/INTR32 pin (pin 21) is routed to one of the host SoC's interrupt inputs (patches 1, 2, 7) A use-case where this is needed is the Endless Mini (EC-100). I have tested my changes on that board. This also confirms that Heiner Kallweit's recent icplus.c PHY driver changes are working (at least on my setup). This series is based on net-next commit 7c460cf9cd1a ("net: aquantia: fix spelling mistake "specfield" -> "specified"") Changes since v1 at [0]: - collected Andrew's Reviewed-by's (thank you!) - updated description of patch #2 to explain why two properties were added instead of adding an "this is a IP101GR" property - validate that there's no conflicting configuration in patch #7 - rebased on top of latest net-next [0] https://patchwork.ozlabs.org/cover/999371/ ==================== Signed-off-by: David S. Miller commit f2f1a847e74f61fb151e0f6f689a8485345ed1fc Author: Martin Blumenstingl Date: Sun Nov 18 22:23:59 2018 +0100 net: phy: icplus: allow configuring the interrupt function on IP101GR The IP101GR is a 32-pin QFN package variant of the IP101G/IP101GA Ethernet PHY. Due to it's limited amount of pins the RXER (receive error) and INTR32 (interrupt) functions share pin 21. By default the PHY is configured to output the "receive error" status on pin 21. Depending on the board layout and requirements we may want to re-configure the PHY to output the interrupt signal there. The mode of pin 21 can be configured in the "Digital I/O Specific Control Register" (register 29), bit 2: - 0 = RXER function - 1 = INTR(32) function Depending on the devicetree configuration we will now: - change the mode to either ther RXER or INTR32 function - keep the SEL_INTR32 value set by the bootloader (default) if no configuration is provided (to ensure that we're not breaking existing boards) - error out if conflicting configuration is given (RXER and INTR32 mode are enabled at the same time) Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller commit f7e290fbeb336421ba6237548b693c9afb4d75fa Author: Martin Blumenstingl Date: Sun Nov 18 22:23:58 2018 +0100 net: phy: icplus: implement .did_interrupt for IP101A/G The IP101A_G_IRQ_CONF_STATUS register has bits to detect which interrupts have fired. Implement the .did_interrupt callback to let the PHY core know whether the interrupt was for this specific PHY. This is useful for debugging interrupt problems with 32-pin IP101GR PHYs where the interrupt line is shared with the RX_ERR (receive error status) signal. The default values are: - RX_ERR is enabled by default (LOW means that there is no receive error) - the PHY's interrupt line is configured "active low" by default Without any additional changes there is a flood of interrupts if the RX_ERR/INTR32 signal is configured in RX_ERR mode (which is the default). Having a did_interrupt ensures that the PHY core returns IRQ_NONE instead of endlessly triggering the PHY state machine. Additionally the kernel will report this after a while: irq 28: nobody cared (try booting with the "irqpoll" option) Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a872c388f9d9e515d9c4102110d0bf0fd7a9778a Author: Martin Blumenstingl Date: Sun Nov 18 22:23:57 2018 +0100 net: phy: icplus: rename IP101A_G_NO_IRQ to IP101A_G_IRQ_ALL_MASK The datasheet uses the name "All Mask" for this bit. Change the name of our #define to be consistent with the datasheet. While here also replace the tab between the #define and IP101A_G_IRQ_ALL_MASK with a space. No functional changes. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ee336140864d069d95194e8a007827363bd36da4 Author: Martin Blumenstingl Date: Sun Nov 18 22:23:56 2018 +0100 net: phy: icplus: use the BIT macro where possible This makes the code consistent by using the BIT() macro instead of manual bit-shifting for some of the fields. No functional changes. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 034289b2d7cf29c8ddb79cf73d4886edabcff05e Author: Martin Blumenstingl Date: Sun Nov 18 22:23:55 2018 +0100 net: phy: icplus: keep all ip101a_g functions together This simply moves ip101a_g_config_init right above ip101a_g_config_intr so all functions for the ICPlus IP101A/G PHYs are grouped together. No functional changes. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit fdc13a9effd5359ae00705708c8c846b1cb2b69c Author: Martin Blumenstingl Date: Sun Nov 18 22:23:54 2018 +0100 dt-bindings: net: phy: add bindings for the IC Plus Corp. IP101A/G PHYs The IP101A and IP101G series both have various models. Depending on the board implementation we need a special property for the IP101GR (32-pin LQFP package) PHY: pin 21 ("RXER/INTR_32") outputs the "receive error" signal by default (LOW means "normal operation", HIGH means that there's either a decoding error of the received signal or that the PHY is receiving LPI). This pin can also be switched to INTR32 mode, where the interrupt signal is routed to this pin. The other PHYs don't need this special handling because they have more pins available so the interrupt function gets a dedicated pin. This adds two properties to either select the "receive error" or "interrupt" function of pin 21. Not specifying any function means that the default set by the bootloader is used. This is required because the IP101GR cannot be differentiated between other IP101 PHYs as the PHY identification registers on all of these is 0x02430c54. The IP101G (sold as die only, without package) may suffer from the same issue depending on how it's integrated into a multi chip package by another manufacturer. If only the RXER/INTR_32 pin is routed then the users of the die-only variant may also have to explicitly configure the mode of hte RXER/INTR_32 pin. This is the reason why no "is-ip101gr" property was added. I have no evidence though which would confirm this theory - so the binding itself is independent of that. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8a49f9db47af69f736dc119c5dbd20227abd22ff Author: Martin Blumenstingl Date: Sun Nov 18 22:23:53 2018 +0100 dt-bindings: vendor-prefix: add prefix for IC Plus Corp. IC Plus Corp. has various Ethernet related products such as Ethernet transceivers, Ethernet controllers, Ethernet switches, etc. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller commit a78b03bc7300e4f17b1e510884bea1095d92b17b Merge: fce15a609f8f3 9ff01193a20d3 Author: Jens Axboe Date: Sun Nov 18 15:46:03 2018 -0700 Merge tag 'v4.20-rc3' into for-4.21/block Merge in -rc3 to resolve a few conflicts, but also to get a few important fixes that have gone into mainline since the block 4.21 branch was forked off (most notably the SCSI queue issue, which is both a conflict AND needed fix). Signed-off-by: Jens Axboe commit fce15a609f8f30cfacfaf684729add9582be780b Author: Jens Axboe Date: Sun Nov 18 15:42:48 2018 -0700 floppy: remove now unused 'flags' variable With the locking removed, it's unused. Kill it. Fixes: 503f620f0cb8 ("floppy: remove queue_lock around floppy_end_request") Signed-off-by: Jens Axboe commit 20a9da34ae009176e443e217f3747635fc4bc57f Merge: 25e19c1fe4212 86ef771ed543a Author: David S. Miller Date: Sun Nov 18 13:35:31 2018 -0800 Merge branch 'sparc-OF-name-and-device_type-rework' Rob Herring says: ==================== sparc: OF name and device_type rework All other platforms have been converted to only store the local node name in device_node.full_name except Sparc. Sparc was complicated by having a path_component_name in addition to full_name and name. By switching full_name to just the local node name, path_component_name becomes redundant and can be removed. The rest of the series converts the sparc code to use printf specifiers and helper functions to access node name and device_type instead of directly accessing device_node full_name, name and type pointers. I've tested this series under qemu. v2: - Add patch using of_node_name_eq for openpromfs - Add patch converting some resource names to full_name - Also drop full path on !Sparc PDT node name construction - Add a few missed %pOFn conversions ==================== Signed-off-by: David S. Miller commit 86ef771ed543ad19fd984e715348eaeeb0b4e035 Author: Rob Herring Date: Fri Nov 16 15:07:01 2018 -0600 sparc: Use DT node full_name instead of name for resources The device_node.name pointer is going to be removed. As the device_node.full_name is now just the name+unit-address instead of the full path, use the full_name pointer instead. This will add the unit-address if there is one to the resource name. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 8119f042d0599df848a5c55ac08b9c2a05c9b359 Author: Rob Herring Date: Fri Nov 16 15:07:00 2018 -0600 sparc: Remove unused leon_trans_init The function leon_trans_init is unused. Remove it and save us from figuring out what to do with a '' node name. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 88ca0557a01386834cbb59d5fc43041e810cbc69 Author: Rob Herring Date: Fri Nov 16 15:06:59 2018 -0600 sparc: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Replace the open coded iterating over child nodes with for_each_child_of_node() while we're here. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 29c990dfc77c58b21a0f2ff4640b6a26955d0661 Author: Rob Herring Date: Fri Nov 16 15:06:58 2018 -0600 sparc: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit ead1c2bdedcb98217f95430e41bf282326edc8d4 Author: Rob Herring Date: Fri Nov 16 15:06:57 2018 -0600 sparc: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. This was originally applied for 4.19, but reverted. The problematic changes to prom_{32,64}.c have been dropped. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit bb31f9eb4abef1b7e2524a36f60e221937dc6fab Author: Rob Herring Date: Fri Nov 16 15:06:56 2018 -0600 sparc: prom: use property "name" directly to construct node names In preparation to remove direct accesses to the device_node.name pointer, retrieve the node name from the "name" property instead. This is slightly less optimal as we have to walk the kernel's DT property list to find the "name" property. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 0c5eaa7749726b2e4667a5e3668c3eb8516e7440 Author: Rob Herring Date: Fri Nov 16 15:06:55 2018 -0600 of: Drop full path from full_name for PDT systems Now that there are no more users of path_component_name for Sparc outside of the PDT code and all users of device_node.full_name are converted to use "%pOF" printf specifier, we can align Sparc with FDT and store just the base node name and unit address in full_name. This makes path_component_name redundant, so it can be removed. As full_name is used by printf specifiers, set it as early as possible. Cc: Frank Rowand Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit a412c85aa82a5c8d585b08808aeefcd186712bb5 Author: Rob Herring Date: Fri Nov 16 15:06:54 2018 -0600 sparc: Convert to using %pOF instead of full_name Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit f3180e1828e63eae22269ec81ab627f647d43f39 Author: Rob Herring Date: Fri Nov 16 15:06:53 2018 -0600 fs/openpromfs: Use of_node_name_eq for node name comparisons Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 105e996a8322079fa1aa2f40001eed6bbdbe10f9 Author: Rob Herring Date: Fri Nov 16 15:06:52 2018 -0600 fs/openpromfs: use full_name instead of path_component_name In preparation to remove struct device_node.path_component_name, use full_name instead. kbasename is used so full_name can be used whether it is the full path or just the node's name and unit-address. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit cddaf02bcb7313a23b06e46683a1381b85840687 Author: thesven73@gmail.com Date: Sat Nov 17 10:56:18 2018 -0500 tg3: optionally use eth_platform_get_mac_address() to get mac address This function will try to determine the mac address via the devicetree, or via an architecture-specific method (e.g. a PROM on SPARC). The SPARC-specific code in this driver (#ifdef SPARC) did exactly this, and is therefore removed. Note that you can now specify the tg3 mac address via the devicetree, on any platform, not just SPARC: Devicetree example: (see Documentation/devicetree/bindings/pci/pci.txt) &pcie { host@0 { #address-cells = <3>; #size-cells = <2>; reg = <0 0 0 0 0>; bcm5778: bcm5778@0 { reg = <0 0 0 0 0>; mac-address = [CA 11 AB 1E 10 01]; }; }; }; Signed-off-by: Sven Van Asbroeck Signed-off-by: David S. Miller commit 80cc49507ba48f85929f499734e4dbe2d50ecdf8 Author: yupeng Date: Fri Nov 16 11:17:40 2018 -0800 net: Add part of TCP counts explanations in snmp_counters.rst Add explanations of some generic TCP counters, fast open related counters and TCP abort related counters and several examples. Signed-off-by: yupeng Signed-off-by: David S. Miller commit 9deffb5ee78e41e2a5d6c448874a24caec6467d0 Author: Viresh Kumar Date: Fri Nov 16 15:34:25 2018 +0530 arm64: dts: exynos: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Krzysztof Kozlowski commit 670734f5581023a2e695e82ea662e4d603fd3e8a Author: Viresh Kumar Date: Fri Nov 16 15:31:10 2018 +0530 ARM: dts: exynos: Add all CPUs in cooling maps Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar Signed-off-by: Krzysztof Kozlowski commit cafbc79e327f44411b8bd8bdc101b9e6c65ab42a Author: Pankaj Dubey Date: Thu Nov 15 16:11:30 2018 +0100 ARM: exynos: Remove secondary startup initialization from smp_prepare_cpus We are taking care of setting secondary cpu boot address in exynos_boot_secondary just before sending ipi to secondary CPUs, so we can safely remove this setting from smp_prepare_cpus. Signed-off-by: Pankaj Dubey Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit b1658855f08754dc685bd75d12f0b5b0e2925f3f Author: Bartlomiej Zolnierkiewicz Date: Wed Nov 14 16:30:58 2018 +0100 ARM: samsung: Limit SAMSUNG_PM_DEBUG config option to non-Exynos platforms "Samsung PM Suspend debug" feature (controlled by SAMSUNG_PM_DEBUG config option) is not working properly (debug messages are not displayed after resume) on Exynos platforms because GPIOs restore code is not implemented. Add PLAT_S3C24XX, ARCH_S3C64XX and ARCH_S5PV210 dependencies to SAMSUNG_PM_DEBUG config option to hide it on Exynos platforms. Then convert Exynos code to not require header (use pr_debug() directly instead of S3C_PMDBG() macro and remove redundant s3c_pm_*() calls). Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit 91c6ada69f396e663acb2b713e8acb8a9463557d Author: James Hughes Date: Fri Nov 16 14:39:07 2018 +0000 firmware: raspberrypi: Fix firmware calls with large buffers Commit a1547e0bca51 ("firmware: raspberrypi: Remove VLA usage") moved away from VLA's to a fixed maximum size for mailbox data. However, some mailbox calls use larger data buffers than the maximum allowed in that change. This fix therefor moves from using fixed buffers to kmalloc to ensure all sizes are catered for. There is some documentation, which is somewhat out of date, on the mailbox calls here : https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface Fixes: a1547e0bca51 ("firmware: raspberrypi: Remove VLA usage") Signed-off-by: James Hughes Reviewed-by: Eric Anholt Signed-off-by: Stefan Wahren commit 85bc3096b33f3eb1bfbc4bc13034cd47ae0943da Author: Vinod Koul Date: Fri Nov 9 15:14:17 2018 +0530 arm64: dts: qcom: pms405: Add pon and pwrkey nodes PMS405 also features PON block, so add PON and PWRKEY nodes Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit aec2a7659ab4e52460c8d299b423be2b2176b208 Author: Vinod Koul Date: Fri Nov 9 15:14:16 2018 +0530 arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2 We can use BAM DAM for serial UART data transfers, so add it Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit e77c52068c63ff9f31d2d26a6786dc01953c91a5 Author: Vinod Koul Date: Fri Nov 9 15:14:15 2018 +0530 arm64: dts: qcom: qcs404: Add BAM DMA node Add the BAM DMA instance found in BLSP1 node of the QCS404 Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit df96c65c3d658ccb37d7d3b49d30d3af9e4a82cc Author: Vinod Koul Date: Fri Nov 9 15:14:14 2018 +0530 arm64: dts: qcom: qcs404: add prng-ee node RNG hardware in QCS404 features (Execution Environment) EE for HLOS to use, add the node for prng-ee for QCS404. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 9395df5f0ecacaf2c380faf10815848dd077451e Author: Bjorn Andersson Date: Fri Nov 9 15:14:13 2018 +0530 arm64: dts: qcom: qcs404: Add remoteproc nodes Add the TrustZone based remoteproc nodes and their glink edges for adsp, cdsp and wcss. Enable them for EVB common DTS. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit e7fd184f559f28fa04ef2fff322ee383ea3b7c3c Author: Bjorn Andersson Date: Fri Nov 9 15:14:12 2018 +0530 arm64: dts: qcom: qcs404: Add scm firmware node Add the scm firmware node to QCS404 Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit dbc5c766691f5a6e171b861992cc18df68756f41 Author: Vinod Koul Date: Fri Nov 9 15:14:11 2018 +0530 arm64: dts: qcom: pms405: add gpios Add the GPIOs present on PMS405 chip. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit dc294716049695fc743c83e9b3037c1a75d5846c Author: Vinod Koul Date: Fri Nov 9 15:14:10 2018 +0530 arm64: dts: qcom: pms405: add rtc node RTC is found on PMIC PMS405 and is same as other PMIC used, so add the rtc node with compatible as qcom,pm8941-rtc Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 1a94b65b67d05639845afb0b4c1b169e2082d3f4 Author: Vinod Koul Date: Fri Nov 9 15:14:09 2018 +0530 arm64: dts: qcom: qcs404: add spmi node PMS405 is used in QCS405-EVB so include that with SPMI nodes Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 06e2ddbaa096a997243395f104bbf6b07834c7f1 Author: Vinod Koul Date: Fri Nov 9 15:14:08 2018 +0530 arm64: dts: qcom: pms405: add spmi node Add the pms405 DT file with spmi node. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 7241ab944da3ee1e6e6278c3423a59eda516c362 Author: Bjorn Andersson Date: Fri Nov 9 15:14:07 2018 +0530 arm64: dts: qcom: qcs404: Add sdcc1 node Add the sdcc1 node and enable it for the QCS404-EVB. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 75f6e6d967ded66b909f4dcbda95891893a6f6f9 Author: Bjorn Andersson Date: Fri Nov 9 15:14:06 2018 +0530 arm64: dts: qcom: qcs404: Add TLMM pinctrl node Add the QCS404 TLMM pinctrl node with its three tiles. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit afdfb0b36712d752fc6c74b8db044392b037b60c Author: Vinod Koul Date: Fri Nov 9 15:14:05 2018 +0530 arm64: dts: qcom: qcs404: add smp2p nodes Add the smp2p-adsp, smp2p-cdsp and smp2p-wcss nodes found in QCS404. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 0b363f5b871c2cdae108d272edb4a6bde61a84c5 Author: Bjorn Andersson Date: Fri Nov 9 15:14:04 2018 +0530 arm64: dts: qcom: qcs404: Add PMS405 RPM regulators Add the RPM regulators found in PMS405 which is used in qcs404-evb Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 7fc7089d9d56d7592e1f35f68b6323f7c18e191f Author: Bjorn Andersson Date: Fri Nov 9 15:14:03 2018 +0530 arm64: dts: qcom: qcs404: Add RPM GLINK related nodes Add RPM GLINK node and the RPM message ram, hwspinlock, APCS apps global and smem nodes it depends on. Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit d59117abacddff816d7a62a6a91192a44ac9fea8 Author: Bjorn Andersson Date: Fri Nov 9 15:14:02 2018 +0530 arm64: dts: qcom: qcs404: Add reserved-memory regions Add the reserved memory regions in QCS404 Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit cac8e787fe182bf62bde77b723ba24a771807f70 Author: Vinod Koul Date: Fri Nov 9 15:14:01 2018 +0530 arm64: dts: qcom: qcs404-evb: add dts files for EVBs QCS404 has two EVBs, EVB-1000 and EVB-4000. These boards are mostly similar with few differences in the peripherals used. So use a common qcs404-evb.dtsi which contains the common parts and use qcs404-evb-1000.dts and qcs404-evb-4000.dts for diffs Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit b4d82f4d00d12a0977f08d37a9c73ad0580114af Author: Vinod Koul Date: Fri Nov 9 15:14:00 2018 +0530 arm64: dts: qcom: qcs404: add base dts files Add base dts files for QCS404 chipset along with cpu, timer, gcc and uart2 nodes. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 17bf1693a6877c9f828404608e9c4a84c558c79f Merge: 8a962c4aa1e6c c5a54bbcececa Author: David S. Miller Date: Sat Nov 17 22:04:39 2018 -0800 Merge branch 'bcmgenet-fix-aborted-suspend' Doug Berger says: ==================== net: bcmgenet: fix aborted suspend It is not enough to return an error code from the driver suspend routine. The driver must also restore the device functionality. This commit corrects the issue introduced by commit 0db55093b566 ("net: bcmgenet: return correct value 'ret' from bcmgenet_power_down") by calling the driver resume function if the suspend function returns an error. ==================== Signed-off-by: David S. Miller commit c5a54bbcececa36852807c36157a86d808b62310 Author: Doug Berger Date: Fri Nov 16 18:00:22 2018 -0800 net: bcmgenet: abort suspend on error If an error occurs during suspension of the driver the driver should restore the hardware configuration and return an error to force the system to resume. Fixes: 0db55093b566 ("net: bcmgenet: return correct value 'ret' from bcmgenet_power_down") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a94cbf03eb514d4d64d8c4f4caa0616b7ce5040a Author: Doug Berger Date: Fri Nov 16 18:00:21 2018 -0800 net: bcmgenet: code movement This commit switches the order of bcmgenet_suspend and bcmgenet_resume in the file to prevent the need for a forward declaration in the next commit and to make the review of that commit easier. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8a962c4aa1e6c0836985a5843f44d74fe3cced12 Author: Nathan Chancellor Date: Fri Nov 16 18:36:27 2018 -0700 geneve: Initialize addr6 with memset Clang warns: drivers/net/geneve.c:428:29: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] struct in6_addr addr6 = { 0 }; ^ {} Rather than trying to appease the various compilers that support the kernel, use memset, which is unambiguous. Fixes: a07966447f39 ("geneve: ICMP error lookup handler") Suggested-by: David S. Miller Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 52c951f1049223f98888b136fae13c1feb49365f Merge: d7b4a2f2329e1 cdca4c485d0c6 Author: David S. Miller Date: Sat Nov 17 21:57:30 2018 -0800 Merge branch 'net-hns3-Add-vf-mtu-support' Salil Mehta says: ==================== net: hns3: Add vf mtu support This patchset adds vf mtu support to HNS3 driver. ==================== Signed-off-by: David S. Miller commit cdca4c485d0c6467211f7181710122100552b4b9 Author: Yunsheng Lin Date: Sun Nov 18 03:19:14 2018 +0000 net: hns3: up/down netdev in hclge module when setting mtu Currently netdev is down in enet module, and it is before mtu range checking in hclge module, which may be cause netdev being down unnecessarily. Signed-off-by: Yunsheng Lin Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 818f167587f402aedcf406ba57d0caff739dcad8 Author: Yunsheng Lin Date: Sun Nov 18 03:19:13 2018 +0000 net: hns3: Add mtu setting support for vf The patch adds mtu setting support for vf, currently vf and pf share the same hardware mtu setting. Mtu set by vf must be less than or equal to pf' mtu, and mtu set by pf must be greater than or equal to vf' mtu. Signed-off-by: Yunsheng Lin Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit a6d818e31d08bae09c417e579c4a39cf3d6dde2e Author: Yunsheng Lin Date: Sun Nov 18 03:19:12 2018 +0000 net: hns3: Add vport alive state checking support Currently there is no way for pf to know if a vf device is alive or not, so PF does not know which vf to notify when reset happens, or which vf's mtu is invalid when vf and pf share the same hardware mtu setting. This patch adds vport alive state checking support, in order to support the above scenario. Signed-off-by: Yunsheng Lin Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit e6d7d79d3ed6034f9b1ffc768fdff9257b6f7fd5 Author: Yunsheng Lin Date: Sun Nov 18 03:19:11 2018 +0000 net: hns3: Refactor mac mtu setting related functions This patch refactors mac mtu setting related functions, normalizes the use of mps and mtu. Signed-off-by: Yunsheng Lin Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit a0b4371751bf836fb438877c981bda733f918988 Author: Yunsheng Lin Date: Sun Nov 18 03:19:10 2018 +0000 net: hns3: Support two vlan header when setting mtu This patch adds supports for two vlan header when setting mtu. Signed-off-by: Yunsheng Lin Signed-off-by: Jian Shen Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit d7b4a2f2329e1727b31b898dba1d397e5d90a5d8 Author: Rob Herring Date: Fri Nov 16 16:11:03 2018 -0600 net: fsl: Use device_type helpers to access the node type Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit ee5b60eba73bd9f854c6d810c582a8097bdca0ef Author: Rob Herring Date: Fri Nov 16 16:05:37 2018 -0600 atm: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 001c96db0181263740215a7f5fec7e937b800a94 Author: Eric Dumazet Date: Fri Nov 16 07:43:29 2018 -0800 net: align gnet_stats_basic_cpu struct This structure is small (12 or 16 bytes depending on 64bit or 32bit kernels), but we do not want it spanning two cache lines. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9a5ee462302512b7f3929c19f0711715613ac418 Author: Eric Dumazet Date: Fri Nov 16 07:24:24 2018 -0800 net: align pcpu_sw_netstats and pcpu_lstats structs Do not risk spanning these small structures on two cache lines, it is absolutely not worth it. For 32bit arches, the hint might not be enough, but we do not really care anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7c460cf9cd1a4edec0c2c4aa121c3aab9c0a17f1 Author: Colin Ian King Date: Fri Nov 16 13:36:36 2018 +0000 net: aquantia: fix spelling mistake "specfield" -> "specified" There is a spelling mistake in a netdev_err message. Fix this. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 098aafaa68b35c857f1ae9bc17f8e8b195a02e65 Author: YueHaibing Date: Fri Nov 16 18:25:27 2018 +0800 net: aquantia: cleanup err handing in hw_atl_utils_fw_rpc_wait 'err' always be 0 in the two places. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 1115439f534d0b3d42b6324ef58f678a795730e3 Merge: 2391b0030e241 8d951a75d022d Author: David S. Miller Date: Sat Nov 17 21:09:50 2018 -0800 Merge branch 'ncsi-Allow-enabling-multiple-packages-and-channels' Samuel Mendoza-Jonas says: ==================== net/ncsi: Allow enabling multiple packages & channels This series extends the NCSI driver to configure multiple packages and/or channels simultaneously. Since the RFC series this includes a few extra changes to fix areas in the driver that either made this harder or were roadblocks due to deviations from the NCSI specification. Patches 1 & 2 fix two issues where the driver made assumptions about the capabilities of the NCSI topology. Patches 3 & 4 change some internal semantics slightly to make multi-mode easier. Patch 5 introduces a cleaner way of reconfiguring the NCSI configuration and keeping track of channel states. Patch 6 implements the main multi-package/multi-channel configuration, configured via the Netlink interface. Readers who have an interesting NCSI setup - especially multi-package with HWA - please test! I think I've covered all permutations but I don't have infinite hardware to test on. Changes in v2: - Updated use of the channel lock in ncsi_reset_dev(), making the channel invisible and leaving the monitor check to ncsi_stop_channel_monitor(). - Fixed ncsi_channel_is_tx() to consider the state of channels in other packages. Changes in v3: - Fixed bisectability bug in patch 1 - Consider channels on all packages in a few places when multi-package is enabled. - Avoid doubling up reset operations, and check the current driver state before reset to let any running operations complete. - Reorganise the LSC handler slightly to avoid enabling Tx twice. Changes in v4: - Fix failover in the single-channel case - Better handle ncsi_reset_dev() entry during a current config/suspend operation. ==================== Signed-off-by: David S. Miller commit 8d951a75d022d94a05f5fa74217670a981e8302d Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:59 2018 +1100 net/ncsi: Configure multi-package, multi-channel modes with failover This patch extends the ncsi-netlink interface with two new commands and three new attributes to configure multiple packages and/or channels at once, and configure specific failover modes. NCSI_CMD_SET_PACKAGE mask and NCSI_CMD_SET_CHANNEL_MASK set a whitelist of packages or channels allowed to be configured with the NCSI_ATTR_PACKAGE_MASK and NCSI_ATTR_CHANNEL_MASK attributes respectively. If one of these whitelists is set only packages or channels matching the whitelist are considered for the channel queue in ncsi_choose_active_channel(). These commands may also use the NCSI_ATTR_MULTI_FLAG to signal that multiple packages or channels may be configured simultaneously. NCSI hardware arbitration (HWA) must be available in order to enable multi-package mode. Multi-channel mode is always available. If the NCSI_ATTR_CHANNEL_ID attribute is present in the NCSI_CMD_SET_CHANNEL_MASK command the it sets the preferred channel as with the NCSI_CMD_SET_INTERFACE command. The combination of preferred channel and channel whitelist defines a primary channel and the allowed failover channels. If the NCSI_ATTR_MULTI_FLAG attribute is also present then the preferred channel is configured for Tx/Rx and the other channels are enabled only for Rx. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 2878a2cfe57a5db21844801cf502fe535a3134b2 Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:58 2018 +1100 net/ncsi: Reset channel state in ncsi_start_dev() When the NCSI driver is stopped with ncsi_stop_dev() the channel monitors are stopped and the state set to "inactive". However the channels are still configured and active from the perspective of the network controller. We should suspend each active channel but in the context of ncsi_stop_dev() the transmit queue has been or is about to be stopped so we won't have time to do so. Instead when ncsi_start_dev() is called if the NCSI topology has already been probed then call ncsi_reset_dev() to suspend any channels that were previously active. This resets the network controller to a known state, provides an up to date view of channel link state, and makes sure that mode flags such as NCSI_MODE_TX_ENABLE are properly reset. In addition to ncsi_start_dev() use ncsi_reset_dev() in ncsi-netlink.c to update the channel configuration more cleanly. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 0b970e1b040c10d0e2a252943a2feaa6ee3cacdf Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:57 2018 +1100 net/ncsi: Don't mark configured channels inactive The concepts of a channel being 'active' and it having link are slightly muddled in the NCSI driver. Tweak this slightly so that NCSI_CHANNEL_ACTIVE represents a channel that has been configured and enabled, and NCSI_CHANNEL_INACTIVE represents a de-configured channel. This distinction is important because a channel can be 'active' but have its link down; in this case the channel may still need to be configured so that it may receive AEN link-state-change packets. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit cd09ab095c6dc4b2b0860f968a0f3ae8d752e76a Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:56 2018 +1100 net/ncsi: Don't deselect package in suspend if active When a package is deselected all channels of that package cease communication. If there are other channels active on the package of the suspended channel this will disable them as well, so only send a deselect-package command if no other channels are active. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 8e13f70be05ee49985dfc3c766868bc85ed43b8a Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:55 2018 +1100 net/ncsi: Probe single packages to avoid conflict Currently the NCSI driver sends a select-package command to all possible packages simultaneously to discover what packages are available. However at this stage in the probe process the driver does not know if hardware arbitration is available: if it isn't then this process could cause collisions on the RMII bus when packages try to respond. Update the probe loop to probe each package one by one, and once complete check if HWA is universally supported. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 60ab49bfe4fa576c5b1d98b9dfc523bfcb3c610c Author: Samuel Mendoza-Jonas Date: Fri Nov 16 15:51:54 2018 +1100 net/ncsi: Don't enable all channels when HWA available NCSI hardware arbitration allows multiple packages to be enabled at once and share the same wiring. If the NCSI driver recognises that HWA is available it unconditionally enables all packages and channels; but that is a configuration decision rather than something required by HWA. Additionally the current implementation will not failover on link events which can cause connectivity to be lost unless the interface is manually bounced. Retain basic HWA support but remove the separate configuration path to enable all channels, leaving this to be handled by a later implementation. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit 2391b0030e241386d710df10e53e2cfc3c5d4fc1 Author: Arjun Vynipadath Date: Fri Nov 16 09:15:42 2018 +0530 cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size The SGE Host Page Size has nothing to do with the actual Host Page Size. It's the SGE's BAR2 Doorbell/GTS Page Size for interpreting the SGE Ingress/Egress Queue per Page values. Firmware reads all of these things and makes all the subsequent changes necessary. The Host Driver uses the SGE Host Page Size in order to properly calculate BAR2 Offsets. Signed-off-by: Casey Leedom Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit e8bd8fca6773ef49390269bd467bf940a0841ccf Author: Yousuk Seung Date: Thu Nov 15 16:44:12 2018 -0800 tcp: add SRTT to SCM_TIMESTAMPING_OPT_STATS Add TCP_NLA_SRTT to SCM_TIMESTAMPING_OPT_STATS that reports the smoothed round trip time in microseconds (tcp_sock.srtt_us >> 3). Signed-off-by: Yousuk Seung Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 54e8cb786130949a4d37792383cb528176771e5d Author: Stephen Hemminger Date: Thu Nov 15 15:26:51 2018 -0800 uapi/ethtool: fix spelling errors Trivial spelling errors found by codespell. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 6f0271d92963bc8588ad7058622ec7b1e94852de Author: David S. Miller Date: Sat Nov 17 16:53:46 2018 -0800 tun: Adjust on-stack tun_page initialization. Instead of constantly playing with the struct initializer syntax trying to make gcc and CLang both happy, just clear it out using memset(). >> drivers/net/tun.c:2503:42: warning: Using plain integer as NULL pointer Reported-by: kbuild test robot Signed-off-by: David S. Miller commit f9e06c45cb28beb30a6a474952ead7da2b8940f3 Author: Jason Wang Date: Thu Nov 15 17:43:10 2018 +0800 tuntap: free XDP dropped packets in a batch Thanks to the batched XDP buffs through msg_control. Instead of calling put_page() for each page which involves a atomic operation, let's batch them by record the last page that needs to be freed and its refcnt count and free them in a batch. Testpmd(virtio-user + vhost_net) + XDP_DROP shows 3.8% improvement. Before: 4.71Mpps After : 4.89Mpps Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit e4dab1e6ea64376ebd3b59281ecaaeb788116be3 Author: Jason Wang Date: Thu Nov 15 17:43:09 2018 +0800 vhost_net: mitigate page reference counting during page frag refill We do a get_page() which involves a atomic operation. This patch tries to mitigate a per packet atomic operation by maintaining a reference bias which is initially USHRT_MAX. Each time a page is got, instead of calling get_page() we decrease the bias and when we find it's time to use a new page we will decrease the bias at one time through __page_cache_drain_cache(). Testpmd(virtio_user + vhost_net) + XDP_DROP on TAP shows about 1.6% improvement. Before: 4.63Mpps After: 4.71Mpps Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit c04e55388a4f2184e37827a1d2e733cded52d653 Author: Rob Herring Date: Fri Nov 16 14:18:20 2018 -0600 x86/platform/olpc: Do not call of_platform_bus_probe() The DT core will probe the DT by default now, so the OLPC platform code calling of_platform_bus_probe() is not necessary. The algorithm for what nodes are probed is a little different in how compatible is handled, but since OLPC uses compatible strings for matching it is not affected by this difference. Also, only the battery node located at the root level gets a device created as the dcon is a PCI device and the RTC device is created in olpc-xo1-rtc.c. Signed-off-by: Rob Herring Signed-off-by: Borislav Petkov CC: "H. Peter Anvin" CC: Ingo Molnar CC: Lubomir Rintel Cc: Thomas Gleixner CC: devicetree@vger.kernel.org CC: x86-ml Link: http://lkml.kernel.org/r/20181116201820.10065-1-robh@kernel.org commit 00426e99789357dbff7e719a092ce36a3ce49d94 Author: Shreeya Patel Date: Sat Nov 17 04:21:32 2018 +0530 Staging: iio: adt7316: Add an extra check for 'ret' equals to 0 ret = 0 indicates a case of no error but no data read from the bus which is an invalid case. This case doesn't ever happen in reality. It should perhaps be handled for correctness though. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit 688cd642ba0c393344c802647848da5f0d925d0e Author: Shreeya Patel Date: Sat Nov 17 04:19:07 2018 +0530 Staging: iio: adt7316: Fix i2c data reading, set the data field adt7316_i2c_read function nowhere sets the data field. It is necessary to have an appropriate value for it. Hence, assign the value stored in 'ret' variable to data field. This is an ancient bug, and as no one seems to have noticed, probably no sense in applying it to stable. Signed-off-by: Shreeya Patel Signed-off-by: Jonathan Cameron commit 9f84a1bdd38ad449a725efbe8b5773efdee463d5 Author: Stefan Popa Date: Tue Nov 13 13:22:18 2018 +0200 dt-bindings: iio: adc: Add docs for ad7124 Add support for Analog Devices AD7124 4-channels and 8-channels ADC. Signed-off-by: Stefan Popa Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit b3af341bbd9662c672d596427ad23973584221d3 Author: Stefan Popa Date: Tue Nov 13 13:21:32 2018 +0200 iio: adc: Add ad7124 support The ad7124-4 and ad7124-8 are a family of 4 and 8 channel sigma-delta ADCs with 24-bit precision and reference. Three power modes are available which in turn affect the output data rate: * Full power: 9.38 SPS to 19,200 SPS * Mid power: 2.34 SPS to 4800 SPS * Low power: 1.17 SPS to 2400 SPS The ad7124-4 can be configured to have four differential inputs, while ad7124-8 can have 8. Moreover, ad7124 also supports per channel configuration. Each configuration consists of gain, reference source, output data rate and bipolar/unipolar configuration. Datasheets: Link: http://www.analog.com/media/en/technical-documentation/data-sheets/AD7124-4.pdf Link: http://www.analog.com/media/en/technical-documentation/data-sheets/ad7124-8.pdf Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit 90c430d32c5fa08363b3db402df1b937901dd5b3 Author: Stefan Popa Date: Tue Nov 13 13:21:01 2018 +0200 dt-bindings: iio: adc: Add common ADCs properties to a separate file There are several ADC drivers that depend on the same device tree bindings. Rather than continue to duplicate the properties, this patch adds a common adc binding document that can be referenced. For beginning, only two properties are documented. Signed-off-by: Stefan Popa Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit f0aef2d018643187101199d8af1dd5ea3a43a3b7 Author: Lars-Peter Clausen Date: Tue Nov 13 13:20:24 2018 +0200 iio: ad_sigma_delta: Allow to provide custom data register address Some newer devices from the Sigma-Delta ADC family do have their data register at a different address than the current default address. Add a parameter to the ad_sigma_delta_info struct which allows to override the default address. Signed-off-by: Lars-Peter Clausen Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron commit f5d72c5c55bc392523cbdcdedd575c280203d31c Author: Christoph Hellwig Date: Fri Nov 16 09:10:06 2018 +0100 mmc: stop abusing the request queue_lock pointer Replace the lock in mmc_blk_data that is only used through a pointer in struct mmc_queue and to protect fields in that structure with an actual lock in struct mmc_queue. Suggested-by: Ulf Hansson Reviewed-by: Ulf Hansson Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ada62b7c893369200992cc21de3469ed1da50e30 Author: Heiko Stuebner Date: Sun Nov 11 22:00:47 2018 +0100 pinctrl: rockchip: add rk3188 routes to switch between nand and emmc The rk3188 has pins that are not handled through the regular iomuxing for handling either nand-flash or an emmc and are set through only one specifal setting. So utilize the routing function to simply do that setting depending on one of the core nand/emmc signals that are actually regular pins handled through pinctrl. Signed-off-by: Heiko Stuebner Signed-off-by: Linus Walleij commit 51ff47aa4c933f17839cd31d7f349841df0a6f38 Author: Heiko Stuebner Date: Sun Nov 11 22:00:46 2018 +0100 pinctrl: rockchip: allow specifying the regmap location for pin-routes Right now we expect the pin-rounting settings to be in the same area as the iomux setting itself. And while that seems to be true for all newer Rockchip socs, back in the wild west days of old this wasn't true. Nowadays pin settings in the GRF normally stay in the GRF and the same is true for pins configured from PMU registers. But old socs like the rk3188 really sprinkle pin settings somewhat randomly through both for its bank0. Therefore add the option to specify a location for the route setting, so that we can map older socs correctly. We'll keep "same" as the default, so that we only need to specify a location in the corner-cases described above. Signed-off-by: Heiko Stuebner Reviewed-by: David Wu Signed-off-by: Linus Walleij commit 7db706a2184d37ca52a4f5315556ed4adac86e82 Author: Tomer Maimon Date: Mon Nov 5 18:11:52 2018 +0200 watchdog: npcm: Modify npcm watchdog kconfig arch parameter Modify Nuvoton watchdog Kconfig default supported architecture name to ARCH_NPCM7XX because ARCH_NPCM750 architecture name is not supported. Signed-off-by: Tomer Maimon Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f8cde726739c60109cc4a30b6b5475b5bd5e1d97 Author: Fabrizio Castro Date: Mon Nov 5 10:53:47 2018 +0000 watchdog: renesas_wdt: Fix typos Do not use "," but ";" to separate instructions. Signed-off-by: Fabrizio Castro Reviewed-by: Guenter Roeck Reviewed-by: Simon Horman Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b8b9618a4f6a6660cb1ff44dd401a4b21f2caf6c Merge: 9c549a6b05738 72111015024f4 Author: David S. Miller Date: Fri Nov 16 23:08:52 2018 -0800 Merge branch 'net-sched-gred-introduce-per-virtual-queue-attributes' Jakub Kicinski says: ==================== net: sched: gred: introduce per-virtual queue attributes This series updates the GRED Qdisc. The Qdisc matches nfp offload very well, but before we can offload it there are a number of improvements to make. First few patches add extack messages to the Qdisc and pass extack to netlink validation. Next a new netlink attribute group is added, to allow GRED to be extended more easily. Currently GRED passes C structures as attributes, and even an array of C structs for virtual queue configuration. User space has hard coded the expected length of that array, so adding new fields is not possible. New two-level attribute group is added: [TCA_GRED_VQ_LIST] [TCA_GRED_VQ_ENTRY] [TCA_GRED_VQ_DP] [TCA_GRED_VQ_FLAGS] [TCA_GRED_VQ_STAT_*] [TCA_GRED_VQ_ENTRY] [TCA_GRED_VQ_DP] [TCA_GRED_VQ_FLAGS] [TCA_GRED_VQ_STAT_*] [TCA_GRED_VQ_ENTRY] ... Statistics are dump only. Patch 4 switches the byte counts to be 64 bit, and patch 5 introduces the new stats attributes for dump. Patch 6 switches RED flags to be per-virtual queue, and patch 7 allows them to be dumped and set at virtual queue granularity. ==================== Signed-off-by: David S. Miller commit 72111015024f4eddb5aac400ddbe38a4f8f0279a Author: Jakub Kicinski Date: Wed Nov 14 22:23:51 2018 -0800 net: sched: gred: allow manipulating per-DP RED flags Allow users to set and dump RED flags (ECN enabled and harddrop) on per-virtual queue basis. Validation of attributes is split from changes to make sure we won't have to undo previous operations when we find out configuration is invalid. The objective is to allow changing per-Qdisc parameters without overwriting the per-vq configured flags. Old user space will not pass the TCA_GRED_VQ_FLAGS attribute and per-Qdisc flags will always get propagated to the virtual queues. New user space which wants to make use of per-vq flags should set per-Qdisc flags to 0 and then configure per-vq flags as it sees fit. Once per-vq flags are set per-Qdisc flags can't be changed to non-zero. Vice versa - if the per-Qdisc flags are non-zero the TCA_GRED_VQ_FLAGS attribute has to either be omitted or set to the same value as per-Qdisc flags. Update per-Qdisc parameters: per-Qdisc | per-VQ | result 0 | 0 | all vq flags updated 0 | non-0 | error (vq flags in use) non-0 | 0 | -- impossible -- non-0 | non-0 | all vq flags updated Update per-VQ state (flags parameter not specified): no change to flags Update per-VQ state (flags parameter set): per-Qdisc | per-VQ | result 0 | any | per-vq flags updated non-0 | 0 | -- impossible -- non-0 | non-0 | error (per-Qdisc flags in use) Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 25fc1989077e71be9fdbe6b78670cf90df2fb789 Author: Jakub Kicinski Date: Wed Nov 14 22:23:50 2018 -0800 net: sched: gred: store red flags per virtual queue Right now ECN marking and HARD drop (the common RED flags) can only be configured for the entire Qdisc. In preparation for per-vq flags store the values in the virtual queue structure. Setting per-vq flags will only be allowed when no flags are set for the entire Qdisc. For the new flags we will also make sure undefined bits are 0. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 80e22e961dfd15530215f6f6dcd94cd8f65ba1ea Author: Jakub Kicinski Date: Wed Nov 14 22:23:49 2018 -0800 net: sched: gred: provide a better structured dump and expose stats Currently all GRED's virtual queue data is dumped in a single array in a single attribute. This makes it pretty much impossible to add new fields. In order to expose more detailed stats add a new set of attributes. We can now expose the 64 bit value of bytesin and all the mark stats which were not part of the original design. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 9f5cd0c8066997b77ba98fc5355faa425f14b381 Author: Jakub Kicinski Date: Wed Nov 14 22:23:48 2018 -0800 net: sched: gred: store bytesin as a 64 bit value 32 bit counters for bytes are not really going to last long in modern world. Make sch_gred count bytes on a 64 bit counter. It will still get truncated during dump but follow up patch will add set of new stat dump attributes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 4777be08b8aab41286efdf5362a02f8e26d1a84e Author: Jakub Kicinski Date: Wed Nov 14 22:23:47 2018 -0800 net: sched: gred: use extack to provide more details on configuration errors Add extack messages to -EINVAL errors, to help users identify their mistakes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 79c59fe01e70f595f0d67be76ae8309a32a3760d Author: Jakub Kicinski Date: Wed Nov 14 22:23:46 2018 -0800 net: sched: gred: pass extack to nla_parse_nested() In case netlink wants to provide parsing error pass extack to nla_parse_nested(). Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 255f4803ecc490319596d73f24ed775f99923a53 Author: Jakub Kicinski Date: Wed Nov 14 22:23:45 2018 -0800 net: sched: gred: separate error and non-error path in gred_change() We will soon want to add more code to the non-error path, separate it from the error handling flow. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 9c549a6b057386df478e4307902cbc84f1eee058 Author: Paolo Abeni Date: Thu Nov 15 03:24:05 2018 +0100 selftests: add explicit test for multiple concurrent GRO sockets This covers for proper accounting of encap needed static keys Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit b24b767fb1b37da7e630460db4a8121caf5ae4d2 Author: YueHaibing Date: Thu Nov 15 10:23:03 2018 +0800 isdn/hisax: remove set but not used variable 'total' Fixes gcc '-Wunused-but-set-variable' warning: drivers/isdn/hisax/hfc_pci.c:277:6: warning: variable ‘total’ set but not used [-Wunused-but-set-variable] It never used since git history start. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 9c48060141bd937497774546e4bb89b8992be383 Author: Paolo Abeni Date: Thu Nov 15 02:34:50 2018 +0100 udp: fix jump label misuse The commit 60fb9567bf30 ("udp: implement complete book-keeping for encap_needed") introduced a severe misuse of jump label APIs, which syzbot, as reported by Eric, was able to exploit. When multiple sockets/process can concurrently request (and than disable) the udp encap, we need to track the activation counter with *_inc()/*_dec() jump label variants, or we can experience bad things at disable time. Fixes: 60fb9567bf30 ("udp: implement complete book-keeping for encap_needed") Reported-by: Eric Dumazet Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 592ee43faf860c1f2c0a4c11838db6fdb974bb78 Author: Colin Ian King Date: Tue Nov 13 09:29:26 2018 +0000 bpf: fix null pointer dereference on pointer offload Pointer offload is being null checked however the following statement dereferences the potentially null pointer offload when assigning offload->dev_state. Fix this by only assigning it if offload is not null. Detected by CoverityScan, CID#1475437 ("Dereference after null check") Fixes: 00db12c3d141 ("bpf: call verifier_prep from its callback in struct bpf_offload_dev") Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 29a9c10e4110e368443f0b606d71557edee7f2cc Author: Stanislav Fomichev Date: Mon Nov 12 13:44:10 2018 -0800 bpftool: make libbfd optional Make it possible to build bpftool without libbfd. libbfd and libopcodes are typically provided in dev/dbg packages (binutils-dev in debian) which we usually don't have installed on the fleet machines and we'd like a way to have bpftool version that works without installing any additional packages. This excludes support for disassembling jit-ted code and prints an error if the user tries to use these features. Tested by: cat > FEATURES_DUMP.bpftool < Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 37342bdaf5b363cf2e1bd170ce7d1de34ecf57e7 Author: Jesus Sanchez-Palencia Date: Wed Nov 14 17:26:35 2018 -0800 etf: Drop all expired packets Currently on dequeue() ETF only drops the first expired packet, which causes a problem if the next packet is already expired. When this happens, the watchdog will be configured with a time in the past, fire straight way and the packet will finally be dropped once the dequeue() function of the qdisc is called again. We can save quite a few cycles and improve the overall behavior of the qdisc if we drop all expired packets if the next packet is expired. This should allow ETF to recover faster from bad situations. But packet drops are still a very serious warning that the requirements imposed on the system aren't reasonable. This was inspired by how the implementation of hrtimers use the rb_tree inside the kernel. Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller commit cbeeb8efec821188c770f582be345ed7b04a0b60 Author: Jesus Sanchez-Palencia Date: Wed Nov 14 17:26:34 2018 -0800 etf: Split timersortedlist_erase() This is just a refactor that will simplify the implementation of the next patch in this series which will drop all expired packets on the dequeue flow. Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller commit 09fd4860ea258d9666f852c213875e6bcdb1204e Author: Jesus Sanchez-Palencia Date: Wed Nov 14 17:26:33 2018 -0800 etf: Use cached rb_root ETF's peek() operation is heavily used so use an rb_root_cached instead and leverage rb_first_cached() which will run in O(1) instead of O(log n). Even if on 'timesortedlist_clear()' we could be using rb_erase(), we choose to use rb_erase_cached(), because if in the future we allow runtime changes to ETF parameters, and need to do a '_clear()', this might cause some hard to debug issues. Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller commit 3fcbdaee3b5c4a7f8ea4c7c11fecc009d2a1e7e4 Author: Jesus Sanchez-Palencia Date: Wed Nov 14 17:26:32 2018 -0800 etf: Cancel timer if there are no pending skbs There is no point in firing the qdisc watchdog if there are no future skbs pending in the queue and the watchdog had been set previously. Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller commit 213d7767af02a079e6d485daab30167d5d675a57 Author: Yafang Shao Date: Wed Nov 14 22:26:17 2018 +0800 tcp: clean up STATE_TRACE Currently we can use bpf or tcp tracepoint to conveniently trace the tcp state transition at the run time. So we don't need to do this stuff at the compile time anymore. Signed-off-by: Yafang Shao Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e119a369b0f1e2295d7a11bff9806ea47878b3ae Merge: 9cd821b744728 75938f77105fc Author: David S. Miller Date: Fri Nov 16 20:16:20 2018 -0800 Merge branch 'SMSC95xx-driver-updates' Ben Dooks says: ==================== SMSC95xx driver updates (round 1) This is a series of a few driver cleanups and some fixups of the code for the SMSC95XX driver. There have been a few reviews, and the issues have been fixed so this should be ready for merging. I will work on the tx-alignment and the other bits of usbnet changes and produce at least two more patch series for this later. ==================== Signed-off-by: David S. Miller commit 75938f77105fcede560b9b6967389cdbd6b83361 Author: Ben Dooks Date: Wed Nov 14 11:50:22 2018 +0000 usbnet: smsc95xx: check for csum being in last four bytes The manual states that the checksum cannot lie in the last DWORD of the transmission, so add a basic check for this and fall back to software checksumming the packet. This only seems to trigger for ACK packets with no options or data to return to the other end, and the use of the tx-alignment option makes it more likely to happen. Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 6809d2167c404c2c8cbbbe1667c70ea88576ccac Author: Ben Dooks Date: Wed Nov 14 11:50:21 2018 +0000 usbnet: smsc95xx: fix memcpy for accessing rx-data Change the RX code to use get_unaligned_le32() instead of the combo of memcpy and cpu_to_le32s(&var). Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 0c8b26556c6f6abf84bca67ce2c2e010953bba81 Author: Ben Dooks Date: Wed Nov 14 11:50:20 2018 +0000 usbnet: smsc95xx: simplify tx_fixup code The smsc95xx_tx_fixup is doing multiple calls to skb_push() to put an 8-byte command header onto the packet. It would be easier to do one skb_push() and then copy the data in once the push is done. We also make the code smaller by using proper unaligned puts for the header. This merges in the CPU to LE32 conversion as well and makes the whole sequence easier to understand hopefully. Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 810eeb1f41a9a272eedc94ca18c072e75678ede4 Author: Ben Dooks Date: Wed Nov 14 11:50:19 2018 +0000 usbnet: smsc95xx: fix rx packet alignment The smsc95xx driver already takes into account the NET_IP_ALIGN parameter when setting up the receive packet data, which means we do not need to worry about aligning the packets in the usbnet driver. Adding the EVENT_NO_IP_ALIGN means that the IPv4 header is now passed to the ip_rcv() routine with the start on an aligned address. Tested on Raspberry Pi B3. Signed-off-by: Ben Dooks Signed-off-by: David S. Miller commit 9cd821b74472895d88edeeb12b70dc1d6ccbed2d Merge: 32764c66faba8 569dac6a5a0da Author: David S. Miller Date: Fri Nov 16 20:12:31 2018 -0800 Merge branch 'dpaa2-eth-add-bql-support' Ioana Ciocoi Radulescu says: ==================== dpaa2-eth: add bql support The first two patches make minor tweaks to the driver to simplify bql implementation. The third patch adds the actual bql support. ==================== Signed-off-by: David S. Miller commit 569dac6a5a0da48b7dd3e9439fbb5d57bc8fe72d Author: Ioana Ciocoi Radulescu Date: Wed Nov 14 11:48:36 2018 +0000 dpaa2-eth: bql support Add support for byte queue limit. On NAPI poll, we save the total number of Tx confirmed frames/bytes and register them with bql at the end of the poll function. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit dbcdf7289870611a97cac996c2cc82b2ffbc044b Author: Ioana Ciocoi Radulescu Date: Wed Nov 14 11:48:35 2018 +0000 dpaa2-eth: Update callback signature Change the frame consume callback signature: * the entire FQ structure is passed to the callback instead of just the queue index * the NAPI structure can be easily obtained from the channel it is associated to, so we don't need to pass it explicitly Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit b0e4f37b0175e60a475a6b94c2b7f010860dc357 Author: Ioana Ciocoi Radulescu Date: Wed Nov 14 11:48:35 2018 +0000 dpaa2-eth: Don't use multiple queues per channel The DPNI object on which we build a network interface has a certain number of {Rx, Tx, Tx confirmation} frame queues as resources. The default hardware setup offers one queue of each type, as well as one DPCON channel, for each core available in the system. There are however cases where the number of queues is greater than the number of cores or channels. Until now, we configured and used all the frame queues associated with a DPNI, even if it meant assigning multiple queues of one type to the same channel. Update the driver to only use a number of queues equal to the number of channels, ensuring each channel will contain exactly one Rx and one Tx confirmation queue. >From the user viewpoint, this change is completely transparent. Performance wise there is no impact in most scenarios. In case the number of queues is larger than and not a multiple of the number of channels, Rx hash distribution offers now better load balancing between cores, which can have a positive impact on overall system performance. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller commit 32764c66faba8fff950346776eb46801b67c610f Author: Jiri Pirko Date: Tue Nov 13 23:22:48 2018 +0100 net: 8021q: move vlan offload registrations into vlan_core Currently, the vlan packet offloads are registered only upon 8021q module load. However, even without this module loaded, the offloads could be utilized, for example by openvswitch datapath. As reported by Michael, that causes 2x to 5x performance improvement, depending on a testcase. So move the vlan offload registrations into vlan_core and make this available even without 8021q module loaded. Reported-by: Michael Shteinbok Signed-off-by: Jiri Pirko Tested-by: Michael Shteinbok Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 99310e732a75c40fc9843f52b306fc9943bcce9d Author: Colin Ian King Date: Tue Nov 13 14:18:17 2018 +0000 net/decnet: add missing indentation There is a missing indentation before the declaration of port. Add it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 790cd1a8f0022c8e9fe7d856b2866bb9088825f7 Author: Colin Ian King Date: Tue Nov 13 11:50:57 2018 +0000 net: hns3: fix spelling mistake "failded" -> "failed" Trivial fix, the spelling of "failded" is incorrect in dev_err and dev_warn messages. Fix this. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 7f600f14dfac4ba4aee6283a415cdad2925d7791 Author: Cong Wang Date: Mon Nov 12 18:05:24 2018 -0800 net: remove unused skb_send_sock() Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit a21ff3c83b1a7e110bae208221ef817251ef564c Author: Heiner Kallweit Date: Mon Nov 12 21:16:06 2018 +0100 net: phy: check for implementation of both callbacks in phy_drv_supports_irq Now that the icplus driver has been fixed all PHY drivers supporting interrupts have both callbacks (config_intr and ack_interrupt) implemented - as it should be. Therefore phy_drv_supports_irq() can be changed now to check for both callbacks being implemented. Signed-off-by: Heiner Kallweit Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 6551971ea8fef40d4f047621b193e9c2e7f529e8 Merge: 5aa25c05be022 0c4b2d370514c Author: David S. Miller Date: Fri Nov 16 19:25:29 2018 -0800 Merge branch 'Remove-VLAN-CFI-overload' Michał Mirosław says: ==================== Remove VLAN.CFI overload Fix BPF code/JITs to allow for separate VLAN_PRESENT flag storage and finally move the flag to separate storage in skbuff. This is final step to make CLAN.CFI transparent to core Linux networking stack. An #ifdef is introduced temporarily to mark fragments masking VLAN_TAG_PRESENT. This is removed altogether in the final patch. ==================== Signed-off-by: David S. Miller commit 0c4b2d370514cb4f3454dd3b18f031d2651fab73 Author: Michał Mirosław Date: Sat Nov 10 19:58:36 2018 +0100 net: remove VLAN_TAG_PRESENT Replace VLAN_TAG_PRESENT with single bit flag and free up VLAN.CFI overload. Now VLAN.CFI is visible in networking stack and can be passed around intact. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 4b50d23179737e4b5f5f16e4bb58bedcf437addc Author: Michał Mirosław Date: Sat Nov 10 19:58:36 2018 +0100 net/bpf_jit: SPARC: split VLAN_PRESENT bit handling from VLAN_TCI Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 3955dec5376b9fc29f76273b7b92921ecefca99f Author: Michał Mirosław Date: Sat Nov 10 19:58:35 2018 +0100 net/bpf_jit: MIPS: split VLAN_PRESENT bit handling from VLAN_TCI Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 4ef3a142d8db8b2136435061cbeb2c11fe31df24 Author: Michał Mirosław Date: Sat Nov 10 19:58:35 2018 +0100 net/bpf_jit: PPC: split VLAN_PRESENT bit handling from VLAN_TCI Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 9c2122559709fe35f493634bc61065b8c0ecb2ad Author: Michał Mirosław Date: Sat Nov 10 19:58:35 2018 +0100 net/bpf: split VLAN_PRESENT bit handling from VLAN_TCI Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 5109f9fd6a76116090b34a192d4a957d2ad0621e Author: Michał Mirosław Date: Sat Nov 10 19:58:34 2018 +0100 net/skbuff: add macros for VLAN_PRESENT bit Wrap VLAN_PRESENT bit using macro like PKT_TYPE_* and CLONED_*, as used by BPF code. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 746dca0aebd4d77adccb76c500a60028a900dabb Author: Cheng-Yi Chiang Date: Fri Nov 16 17:28:56 2018 +0800 ASoC: rt5663: Fix error handling of regulator_set_load The default implementation of regulator_set_load returns REGULATOR_MODE_NORMAL, which is positive. [This was a bug which is being fixed but the change is valid anyway -- bronie] rt5663_i2c_probe should only do error handling when return value of regulator_set_load is negative. In this case, rt5663_i2c_probe should return error. Also, consolidate err_irq into err_enable. Fix the missing goto for temporary regmap and rt5663->regmap. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Mark Brown commit 00347e4ea8ca4c6ed5e254d7cebad0917175a07e Author: Colin Ian King Date: Fri Nov 16 13:39:43 2018 +0000 ASoC: amd: fix spelling mistake "Inavlid" -> "Invalid" There is a spelling mistake in a dev_err message. Fix this. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit e8d4bf8ae8dbcf635a87883437539fb3e5deb6d4 Author: Colin Ian King Date: Fri Nov 16 15:06:36 2018 +0000 ASoC: qcom: clean up indentation, remove extraneous tab The return statement is indented too much by one level, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 812fb75d977efb0257fe41700e6f8e04900ab27c Author: Colin Ian King Date: Fri Nov 16 15:06:35 2018 +0000 ASoC: arizona: fix indentation issue with return statement The return statement is indented incorrectly. Fix this by adding in the missing tab. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 6857b9d0881e4cbf30237a1091e83a8e3e7ee7c3 Author: Colin Ian King Date: Fri Nov 16 15:06:34 2018 +0000 ASoC: tlv320dac33: clean up indentation, remove extraneous tab The goto statement is indented too much by one level, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 7806869c6e5ea3c48aee80a72c790c55e6c3c303 Author: Colin Ian King Date: Fri Nov 16 15:06:33 2018 +0000 ASoC: tlv320aic31xx: asihpi: clean up indentation, remove extraneous tab The return statement is indented too much by one level, fix this by removing an extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit dc43d3aa045c6588f163f4c0f5084e09cb5c0295 Author: Rob Herring Date: Fri Nov 16 15:43:49 2018 -0600 ASoC: Convert a few more users to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Olivier Moysan Cc: Arnaud Pouliquen Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: alsa-devel@alsa-project.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Mark Brown commit 276aa6d38e619d2bd61fbac71388a4da680e7ed5 Author: Cheng-Yi Chiang Date: Fri Nov 16 10:12:43 2018 +0800 ASoC: rt5663: Add documentation for power supply support rt5663 codec driver will support setting CPVDD and AVDD power supply from device tree. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Mark Brown commit f0915dfc44365b487a720d447ad3faa66de5205c Author: Lubomir Rintel Date: Thu Nov 15 11:32:09 2018 +0100 spi: pxa2xx: Fix '"CONFIG_OF" is not defined' warning A careless oversight. Sorry. Fixes: 0a897143b7c9 ("spi: pxa2xx: Add slave mode support") Signed-off-by: Lubomir Rintel Signed-off-by: Mark Brown commit ae9435f696035894a57987ba25396818c756eeaf Merge: ac8acec9912a9 9108e3a023d3e Author: Alexei Starovoitov Date: Fri Nov 16 17:54:30 2018 -0800 Merge branch 'socket-lookup-cg_sock' Andrey Ignatov says: ==================== This patch set makes bpf_sk_lookup_tcp, bpf_sk_lookup_udp and bpf_sk_release helpers available in programs of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. Patch 1 is a fix for bpf_sk_lookup_udp that was already merged to bpf (stable) tree. Here it's prerequisite for patch 3. Patch 2 is the main patch in the set, it makes the helpers available for BPF_PROG_TYPE_CGROUP_SOCK_ADDR and provides more details about use-case. Patch 3 adds selftest for new functionality. v1->v2: - remove "Split bpf_sk_lookup" patch since it was already split by: commit c8123ead13a5 ("bpf: Extend the sk_lookup() helper to XDP hookpoint."); - avoid unnecessary bpf_sock_addr_sk_lookup function. ==================== Signed-off-by: Alexei Starovoitov commit 9108e3a023d3e4e77d94b589b07d397b0a790285 Author: Andrey Ignatov Date: Fri Nov 9 10:54:02 2018 -0800 selftest/bpf: Use bpf_sk_lookup_{tcp, udp} in test_sock_addr Use bpf_sk_lookup_tcp, bpf_sk_lookup_udp and bpf_sk_release helpers from test_sock_addr programs to make sure they're available and can lookup and release socket properly for IPv4/IPv4, TCP/UDP. Reading from a few fields of returned struct bpf_sock is also tested. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 6c49e65e0d462963b4fac97ebd87014342167027 Author: Andrey Ignatov Date: Fri Nov 9 10:54:01 2018 -0800 bpf: Support socket lookup in CGROUP_SOCK_ADDR progs Make bpf_sk_lookup_tcp, bpf_sk_lookup_udp and bpf_sk_release helpers available in programs of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. Such programs operate on sockets and have access to socket and struct sockaddr passed by user to system calls such as sys_bind, sys_connect, sys_sendmsg. It's useful to be able to lookup other sockets from these programs. E.g. sys_connect may lookup IP:port endpoint and if there is a server socket bound to that endpoint ("server" can be defined by saddr & sport being zero), redirect client connection to it by rewriting IP:port in sockaddr passed to sys_connect. Signed-off-by: Andrey Ignatov Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit cac6cc2f5ac710334ae0f6bba5630d791c253574 Author: Andrey Ignatov Date: Fri Nov 9 10:54:00 2018 -0800 bpf: Fix IPv6 dport byte order in bpf_sk_lookup_udp Lookup functions in sk_lookup have different expectations about byte order of provided arguments. Specifically __inet_lookup, __udp4_lib_lookup and __udp6_lib_lookup expect dport to be in network byte order and do ntohs(dport) internally. At the same time __inet6_lookup expects dport to be in host byte order and correspondingly name the argument hnum. sk_lookup works correctly with __inet_lookup, __udp4_lib_lookup and __inet6_lookup with regard to dport. But in __udp6_lib_lookup case it uses host instead of expected network byte order. It makes result returned by bpf_sk_lookup_udp for IPv6 incorrect. The patch fixes byte order of dport passed to __udp6_lib_lookup. Originally sk_lookup properly handled UDPv6, but not TCPv6. 5ef0ae84f02a fixes TCPv6 but breaks UDPv6. Fixes: 5ef0ae84f02a ("bpf: Fix IPv6 dport byte-order in bpf_sk_lookup") Signed-off-by: Andrey Ignatov Acked-by: Joe Stringer Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit ac8acec9912a93be9953446766e0bb73aeeecc64 Author: Nathan Chancellor Date: Mon Nov 12 15:10:42 2018 -0700 bpf: Remove unused variable in nsim_bpf Clang warns: drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state' [-Werror,-Wunused-variable] struct nsim_bpf_bound_prog *state; ^ 1 error generated. The declaration should have been removed in commit b07ade27e933 ("bpf: pass translate() as a callback and remove its ndo_bpf subcommand"). Signed-off-by: Nathan Chancellor Acked-by: Jakub Kicinski Acked-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit a83d6e76a67424ebbbbed643f51e97934ffc2bc2 Author: Martin KaFai Lau Date: Mon Nov 12 15:44:53 2018 -0800 bpf: libbpf: Fix bpf_program__next() API This patch restores the behavior in commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs") such that bpf_program__next() does not return pseudo programs in ".text". Fixes: 0c19a9fbc9cd ("libbpf: cleanup after partial failure in bpf_object__pin") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 5c86d2125b58949122e03f04ce940e6f5b8534ba Author: Joe Stringer Date: Fri Nov 9 10:18:16 2018 -0800 selftests/bpf: Fix uninitialized duration warning Daniel Borkmann reports: test_progs.c: In function ‘main’: test_progs.c:81:3: warning: ‘duration’ may be used uninitialized in this function [-Wmaybe-uninitialized] printf("%s:PASS:%s %d nsec\n", __func__, tag, duration);\ ^~~~~~ test_progs.c:1706:8: note: ‘duration’ was declared here __u32 duration; ^~~~~~~~ Signed-off-by: Joe Stringer Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 570d54fe24634e87a48193dfc04a2486371cacea Author: Ryder Lee Date: Wed Nov 7 15:10:16 2018 +0800 dt-bindings: rng: update bindings for MT7629 SoC This updates bindings for MT7629 RNG driver. Signed-off-by: Ryder Lee Acked-by: Sean Wang Signed-off-by: Rob Herring commit f0001f587731603d2eccf5577ea74f12aa9a477c Author: Alan Douglas Date: Mon Nov 12 16:42:01 2018 +0000 dt-bindings: phy: Document cadence Sierra PHY bindings Add DT binding documentation for Sierra PHY. The PHY supports a number of different protocols, including PCIe and USB. The PHY lanes may be configured as single or multi-lane links. Each link is treated as a separate sub-node. For example, if there are 4 lanes in total the first 2 might be configured as a multi-lane PCIe link while the other two are single lane USB links, and in this case there would be 3 sub-nodes. There are two resets for the PHY block (one for APB register access, one for the PHY link) and separate resets for each link. For multi-lane links, the reset corresponds to the reset line on the master lane, the resets on other lanes have no effect. Signed-off-by: Alan Douglas Signed-off-by: Rob Herring commit 7ed07855773814337b9814f1c3e866df52ebce68 Author: Brian Masney Date: Sat Nov 10 20:34:11 2018 -0500 pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues When attempting to setup up a gpio hog, device probing will repeatedly fail with -EPROBE_DEFERED errors. It is caused by a circular dependency between the gpio and pinctrl frameworks. If the gpio-ranges property is present in device tree, then the gpio framework will handle the gpio pin registration and eliminate the circular dependency. See Christian Lamparter's commit a86caa9ba5d7 ("pinctrl: msm: fix gpio-hog related boot issues") for a detailed commit message that explains the issue in much more detail. The code comment in this commit came from Christian's commit. I did not test this change against any hardware supported by this particular driver, however I was able to validate this same fix works for pinctrl-spmi-gpio.c using a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit a62c36775ba873611b00b82ce7ebcd4ff2126111 Author: Stefan Wahren Date: Sat Nov 10 17:15:11 2018 +0100 pinctrl: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Simon Arlott Cc: Stephen Warren Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij commit 91393622bca33cac70175e0fdc5a3ec8f9efe08b Author: A.s. Dong Date: Sat Nov 10 14:21:18 2018 +0000 gpio: vf610: add optional clock support Some SoCs need the gpio clock to be enabled before accessing HW registers. This patch add the optional clock handling. Cc: Linus Walleij Cc: Stefan Agner Cc: Shawn Guo Cc: linux-gpio@vger.kernel.org Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit 1a5287a3dbc34cd0c02c8f64c9131bd23cdfe2bb Author: Anson Huang Date: Fri Nov 9 04:56:56 2018 +0000 gpio: mxc: move gpio noirq suspend/resume to syscore phase During noirq suspend/resume phase, GPIO irq could arrive and its registers like IMR will be changed by irq handle process, to make the GPIO registers exactly when it is powered ON after resume, move the GPIO noirq suspend/resume callback to syscore suspend/resume phase, local irq is disabled at this phase so GPIO registers are atomic. Signed-off-by: Anson Huang Signed-off-by: Linus Walleij commit eee3919c5f2949a8b7b1e9fa239d153be1538656 Author: Johan Hovold Date: Mon Nov 12 15:10:28 2018 +0100 gpio: drop broken to_gpio_irq_chip() helper Drop the broken to_gpio_irq_chip() container_of() helper, which would break the build for anyone who tries to use it. Specifically, struct gpio_irq_chip only holds a pointer to a struct irq_chip so using container_of() on an irq-chip pointer makes no sense. Fixes: da80ff81a8f5 ("gpio: Move irqchip into struct gpio_irq_chip") Cc: Thierry Reding Cc: Grygorii Strashko Signed-off-by: Johan Hovold Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit c24a4173f6bbea49b09ae2c137db23035d3a7932 Author: Nishad Kamdar Date: Wed Nov 14 23:16:14 2018 +0530 staging: iio: ad7816: Add device tree table. Add device tree table for matching vendor ID. Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit 639eab7482174618bbac08af7445f34f5430bf4f Author: Lorenzo Bianconi Date: Thu Nov 15 10:10:57 2018 +0100 iio: imu: st_lsm6dsx: add entry in MAINTAINERS file Add entry for st_lsm6dsx imu driver in MAINTAINERS file Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 853bfaf43555e6352e4f9d7856603f6443292d05 Author: Slawomir Stepien Date: Fri Nov 16 10:47:21 2018 +0100 iio: potentiometer: mcp4131: use of_device_get_match_data() Try to get the device's data using OF API. In case of failure, fallback to the spi_get_device_id() method. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit cc9c58ef6e0623f92edc2988c8a8ebfb63b40cea Author: Slawomir Stepien Date: Sun Nov 11 16:59:11 2018 +0100 staging: iio: adc: ad7280a: use devm_* APIs devm_* APIs are device managed and make code simpler. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 9829f9e5415c17824f23aa6e1573829256c8c298 Author: Slawomir Stepien Date: Sun Nov 11 16:59:10 2018 +0100 staging: iio: adc: ad7280a: power down the device on error in probe Power down the device if anything goes wrong after the SPI has been setup correctly in the probe function. Existing code that toggles the AD7280A_CTRL_LB_SWRST bit inside ad7280_chain_setup function is responsible for powering up the device. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 1d6b36752bb31c4407ec8e995b361ffdc15fb86d Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:36 2018 +0100 dt-bindings: iio: imu: st_lsm6dsx: add support to i2c pullup resistors Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 6d0205fd1e5b1c4281b7648569b065bc0f6a55ab Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:35 2018 +0100 iio: imu: st_lsm6dsx: add hw FIFO support to i2c controller Introduce hw FIFO support to lsm6dsx i2c controller. st_lsm6dsx sensor-hub relies on SLV0 for slave configuration since SLV0 is the only channel that can be used to write into i2c slave devices. SLV{1,2,3} channels are used to read external data and push them into the hw FIFO Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 14c7c6e1a86077c551632034df1d0bba50ecf3ca Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:34 2018 +0100 iio: imu: st_lsm6dsx: add st_lsm6dsx_push_tagged_data routine Introduce st_lsm6dsx_push_tagged_data routine to push samples to iio buffers. st_lsm6dsx_push_tagged_data will be reused adding hw fifo support to st_lsm6dsx i2c embedded controller in order to improve code readability Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit c91c1c844ebd868ad15bcfc866879fca1079234a Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:33 2018 +0100 iio: imu: st_lsm6dsx: add i2c embedded controller support i2c controller embedded in lsm6dx series can connect up to four slave devices using accelerometer sensor as trigger for i2c read/write operations. Introduce sensor hub support for lsm6dso sensor. Add register map for lis2mdl magnetometer sensor. In order to perform single read/write operations st_lsm6dsx driver relies on SLV0 channel (hw FIFO is not supported yet) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 1775044356c2f7f268e9c64d0c3fdd64588322e2 Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:32 2018 +0100 iio: imu: st_lsm6dsx: introduce st_lsm6dsx_sensor_set_enable routine Add st_lsm6dsx_sensor_set_enable routine and remove st_lsm6dsx_sensor_{enable/disable} ones in order to make the code more readable and remove unnecessary functions Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 6ffb55e5009ffdf103aa206511ea620490c0f002 Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:31 2018 +0100 iio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids Add ST_LSM6DSX_ID_EXT{0,1,2} sensor ids as reference for slave devices connected to st_lsm6dsx i2c controller. Moreover introduce odr dependency between accel and ext devices since i2c embedded controller relies on the accelerometer sensor as bus read/write trigger so we need to enable accel device at odr = max(accel_odr, ext_odr) in order to properly communicate with i2c slave devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit d40464f30dc91e7882ff2ad2f2f6a148bd9c39e5 Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:30 2018 +0100 iio: imu: st_lsm6dsx: remove static from st_lsm6dsx_set_watermark Remove static qualifier from st_lsm6dsx_set_watermark routine in order to be reused supporting st_lsm6dsx i2c controller Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 19435425f29d2d34a326d7ac0dc7e83a4f0f3210 Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:29 2018 +0100 iio: imu: st_lsm6dsx: reload trimming parameter at bootstrap Perform a complete device reset at bootstrap reloading trimming parameter after sw reset is completed. Device sw reset/boot is explained here: https://www.st.com/resource/en/application_note/dm00517282.pdf, section 5.7 Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 739aff87a8176c1193cc46ebce5ce6dd537501af Author: Lorenzo Bianconi Date: Sun Nov 11 15:15:28 2018 +0100 iio: imu: st_lsm6dsx: introduce locked read/write utility routines Add st_lsm6dsx_update_bits_locked, st_lsm6dsx_read_locked and st_lsm6dsx_write_locked utility routines in order to guarantee the bus access is atomic respect to reg page configuration. This is a preliminary patch to add i2c sensor hub support since i2c master registers are accessed through a reg page multiplexer Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 750ac07eb2c85617b5522402a99b4b408cd0b1b3 Author: Freeman Liu Date: Fri Nov 9 11:25:31 2018 +0800 iio: adc: sc27xx: Add ADC data conversion timeout Sometimes the ADC controller met some problems, and it will not complete the data conversion, that will can not wake up the read process any more to block users. So we should add one maximum conversion time to avoid this issue. Signed-off-by: Freeman Liu Signed-off-by: Baolin Wang Signed-off-by: Jonathan Cameron commit befa9f6a3e1f00df0cff9d991650dc8d541fb730 Author: Renato Lui Geh Date: Mon Nov 5 17:16:14 2018 -0200 staging: iio: ad7780: remove unnecessary stashed voltage value This patch removes the unnecessary field int_vref_mv in ad7780_state referring to the device's voltage. Signed-off-by: Renato Lui Geh Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 336650c785b62c3bea7c8cf6061c933a90241f67 Author: Renato Lui Geh Date: Mon Nov 5 17:14:58 2018 -0200 staging: iio: ad7780: update voltage on read The ad7780 driver previously did not read the correct device output, as it read an outdated value set at initialization. It now updates its voltage on read. Signed-off-by: Renato Lui Geh Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 121354b2eceb2669ebdffa76b105ad6c03413966 Author: Song Qiang Date: Thu Nov 8 17:27:49 2018 +0800 iio: magnetometer: Add driver support for PNI RM3100 PNI RM3100 is a high resolution, large signal immunity magnetometer, composed of 3 single sensors and a processing chip with a MagI2C interface. Following functions are available: - Single-shot measurement from /sys/bus/iio/devices/iio:deviceX/in_magn_{axis}_raw - Triggerd buffer measurement. - DRDY pin for data ready trigger. - Both i2c and spi interface are supported. - Both interrupt and polling measurement is supported, depends on if the 'interrupts' in DT is declared. Signed-off-by: Song Qiang Signed-off-by: Jonathan Cameron commit 9a8d64fa97206eb68ec741b5c52436f32286b7fd Author: Song Qiang Date: Thu Nov 8 17:27:48 2018 +0800 iio: magnetometer: Add DT support for PNI RM3100 Signed-off-by: Song Qiang Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit cad4d0a3d0ffe764d22432ef772e6c05e8ca21d3 Author: Song Qiang Date: Thu Nov 8 17:27:47 2018 +0800 dt-bindings: Add PNI to the vendor prefixes Signed-off-by: Song Qiang Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 49b623732e4af1853186ecf859e2c371228074af Author: Heiko Stuebner Date: Wed Nov 7 16:45:21 2018 +0100 iio: st-accel: add support for lis3de This commit add support for STMicroelectronics lis3de accelerometer. Datasheet for this device can be found here: https://www.st.com/resource/en/datasheet/lis3de.pdf Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 74a257a0b5f0118b183a3be4b35530a30e30de48 Author: Parthiban Nallathambi Date: Wed Nov 7 18:08:21 2018 +0100 iio: light: Add device tree binding for vishay vcnl4035 Adding device tree binding for vcnl4035 and vendor prefix for Vishay Intertechnology Signed-off-by: Parthiban Nallathambi Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 55707294c4eb0d61054468ecccdddef5c5151fc0 Author: Parthiban Nallathambi Date: Wed Nov 7 18:08:20 2018 +0100 iio: light: Add support for vishay vcnl4035 Add support for VCNL4035, which is capable of Ambient light sensing (ALS) and proximity function. This patch adds support only for ALS function Signed-off-by: Parthiban Nallathambi Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit efeb87d81c6fab5158039b3095e3b4df35038b9d Author: Kuninori Morimoto Date: Thu Nov 8 06:40:21 2018 +0000 iio: adc: rcar-gyroadc: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Jonathan Cameron commit c924eee309d919e8719eb06666085095c0be0813 Author: Kuninori Morimoto Date: Thu Nov 8 06:41:10 2018 +0000 iio: adc: max11100: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Jonathan Cameron commit 2fa720b4b755c9ae0319a8f458657c5196672148 Author: Kuninori Morimoto Date: Thu Nov 8 06:42:43 2018 +0000 iio: adc: max9611: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Jonathan Cameron commit c036a324c03eed9a31a2733fa2ad4ae96840244e Author: Giuliano Belinassi Date: Thu Nov 8 11:03:40 2018 -0200 staging: iio: ad7780: generates pattern_mask from PAT bits Previously, all pattern_masks and patterns in the chip_info table were hardcoded. Now they are generated using the PAT macros, as described in the datasheets. Signed-off-by: Giuliano Belinassi Signed-off-by: Jonathan Cameron commit 23da6a15113e97043d37b2ac83d234cd43dc627b Author: Giuliano Belinassi Date: Thu Nov 8 11:03:20 2018 -0200 staging: iio: ad7780: check if ad778x before gain update Only the ad778x have the 'gain' status bit. Check it before updating through a new variable is_ad778x in chip_info. Signed-off-by: Giuliano Belinassi Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit f04842734c7a68381ab3cb45628ffb3ff1029490 Author: Christoph Hellwig Date: Fri Nov 16 09:10:05 2018 +0100 ide: don't acquire queue_lock in ide_complete_pm_rq blk_mq_stop_hw_queues doesn't need any locking, and the ide dev_flags field isn't protected by it either. Reviewed-by: Omar Sandoval Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b2101f655f8f6bd510154364e24d1cdba037133f Author: Christoph Hellwig Date: Fri Nov 16 09:10:04 2018 +0100 ide: don't acquire queue lock in ide_pm_execute_rq There is nothing we can synchronize against over a call to blk_queue_dying. Reviewed-by: Omar Sandoval Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a50f9aec1ac713dd25f1b1b443d97aa2fc69f740 Author: Christoph Hellwig Date: Fri Nov 16 09:10:03 2018 +0100 pktcdvd: remove queue_lock around blk_queue_max_hw_sectors blk_queue_max_hw_sectors can't do anything with queue_lock protection so don't hold it. Reviewed-by: Omar Sandoval Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 503f620f0cb8a9da9c2bba72f2141aaa4b0e3962 Author: Christoph Hellwig Date: Fri Nov 16 09:10:02 2018 +0100 floppy: remove queue_lock around floppy_end_request There is nothing the queue_lock could protect inside floppy_end_request, so remove it. Reviewed-by: Omar Sandoval Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2b78eae147a13ab2ca7caa121dd3fca2eecf8613 Author: Christoph Hellwig Date: Fri Nov 16 09:10:01 2018 +0100 block: remove the rq_alloc_data request_queue field Reviewed-by: Omar Sandoval Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6e2422ff9492514a618746f490ff816d65c68f3b Author: Krzysztof Kozlowski Date: Tue Nov 13 20:46:26 2018 +0100 ARM: dts: exynos: Clarify comment explaining purpose of Odroid XU3 DTSI There are two common DTSI files for Exynos5422 Odroid XU3 family of boards. One is shared between all of them (XU3, XU3-Lite, XU4 and HC1) and the second skips HC1. Document this in the files. Signed-off-by: Krzysztof Kozlowski commit 9e180d9991dc4d9c6b18ffede928841e6b0e35f4 Author: Chris Wilson Date: Tue Oct 9 12:12:59 2018 +0100 drm/i915: Downgrade unknown firmware warnings If we have released no firmware yet for a platform, stop scaring the consumer and merely note its expected absence. Signed-off-by: Chris Wilson Cc: Petri Latvala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181009111259.20807-1-chris@chris-wilson.co.uk commit cb700eb3faa488fbb4b60689adec84032d7cf24a Author: Jens Axboe Date: Thu Nov 15 19:56:53 2018 -0700 block: don't plug for aio/O_DIRECT HIPRI IO Those will go straight to issue inside blk-mq, so don't bother setting up a block plug for them. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d34513d384487e8022f143a3a6b791e6d7f0dad6 Author: Jens Axboe Date: Tue Nov 6 14:29:11 2018 -0700 block: for async O_DIRECT, mark us as polling if asked to Inherit the iocb IOCB_HIPRI flag, and pass on REQ_HIPRI for those kinds of requests. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0619317ff8baa2da9238191ad5167ed3618c16d9 Author: Jens Axboe Date: Tue Nov 13 21:16:54 2018 -0700 block: add polled wakeup task helper If we're polling for IO on a device that doesn't use interrupts, then IO completion loop (and wake of task) is done by submitting task itself. If that is the case, then we don't need to enter the wake_up_process() function, we can simply mark ourselves as TASK_RUNNING. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e504545446e4be916b170f159b6495c352a2b5a5 Author: Jens Axboe Date: Thu Nov 15 12:25:10 2018 -0700 blk-rq-qos: inline check for q->rq_qos functions Put the short code in the fast path, where we don't have any functions attached to the queue. This minimizes the impact on the hot path in the core code. Cc: Josef Bacik Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 344e9ffcbd1898e1dc04085564a6e05c30ea8199 Author: Jens Axboe Date: Thu Nov 15 12:22:51 2018 -0700 block: add queue_is_mq() helper Various spots check for q->mq_ops being non-NULL, but provide a helper to do this instead. Where the ->mq_ops != NULL check is redundant, remove it. Since mq == rq-based now that legacy is gone, get rid of the queue_is_rq_based() and just use queue_is_mq() everywhere. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit dabcefab45d36ecb5a22f16577bb0f298876a22d Author: Jens Axboe Date: Wed Nov 14 09:38:28 2018 -0700 nvme: provide optimized poll function for separate poll queues If we have separate poll queues, we know that they aren't using interrupts. Hence we don't need to disable interrupts around finding completions. Provide a separate set of blk_mq_ops for such devices. Signed-off-by: Jens Axboe commit 062887bf5ef733133e51c77900ad5a570a974817 Author: Geert Uytterhoeven Date: Fri Nov 16 14:48:42 2018 +0100 ARM: shmobile: Move SoC Kconfig symbols to drivers/soc/renesas/ For consistency with arm64, where vendors have a single Kconfig symbol in arch/arm64/Kconfig.platforms. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit fa43948f6736b74c5840ec0b028d3662caf0f558 Author: Geert Uytterhoeven Date: Fri Nov 16 14:48:41 2018 +0100 arm64: renesas: Move SoC Kconfig symbols to drivers/soc/renesas/ arch/arm64/Kconfig.platforms has SoC-specific Kconfig symbols for Renesas SoCs, while other vendors have only a single Kconfig symbol. Increase consistency with other vendors by moving the SoC-specific Kconfig symbols to drivers/soc/renesas/Kconfig. Increase consistency with R-Car Gen1 and Gen2 SoCs on arm32 by introducing a family-specific Kconfig symbol for R-Car Gen3 (ARCH_RCAR_GEN3), which enables family-specific hardware features. While so far only a single family (R-Car Gen3 and derivatives) of Renesas arm64 SoCs is supported by Linux, this will make it easier to add support for other SoC families later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 79aac4b9b2081235ecf9fb1683aa765e539dc0e2 Author: Geert Uytterhoeven Date: Fri Nov 16 14:38:03 2018 +0100 ARM: shmobile: Hide ARCH_RZN1 to improve consistency Unlike all other family-specific Kconfig symbols for Renesas ARM SoCs, ARCH_RZN1 is user-visible. As this symbol is already selected by the SoC-specific ARCH_R9A06G032 symbol, there is no need for that. Hide ARCH_RZN1 from the user, and move it up, where all other family-specific Kconfig symbols live. Drop the select of CPU_V7, as this is already implied by the dependency of ARCH_RENESAS on ARCH_MULTI_V7. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit e743454a0f42b5acf17b5fddce9811d53e4bf24b Author: Geert Uytterhoeven Date: Thu Nov 15 10:57:31 2018 +0100 ARM: shmobile: sh73a0: Remove obsolete inclusion of As of commit 9a9863987bf7307f ("ARM: shmobile: Remove legacy SoC code for SH-Mobile AG5"), this header file is no longer used. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 94cf946b8c19f90c39a0f01f0e2fe2ff32383b35 Author: Geert Uytterhoeven Date: Thu Nov 15 10:56:39 2018 +0100 ARM: shmobile: Restrict TWD support to SoCs that have it Currently support for the ARM Timer and Watchdog Unit is included unconditionally, while only some Renesas multicore Cortex-A9 SoCs have a TWD. This decreases kernel image size by ca. 2 KiB on SoCs without a TWD. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit af3a03cded07f4d6637e5b3660b6622cf60af338 Author: Geert Uytterhoeven Date: Thu Nov 15 10:56:38 2018 +0100 ARM: shmobile: Restrict SCU support to SoCs that have it Currently support for the ARM Cortex-A9 Snoop Control Unit is included unconditionally, while only Renesas multicore Cortex-A9 SoCs have this kind of SCU. This decreases kernel image size by ca. 300 bytes on SoCs without such an SCU. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 03981c6ebec4fc7056b9b45f847393aeac90d060 Author: Ville Syrjälä Date: Wed Nov 14 19:34:40 2018 +0200 drm/i915: Disable LP3 watermarks on all SNB machines I have a Thinkpad X220 Tablet in my hands that is losing vblank interrupts whenever LP3 watermarks are used. If I nudge the latency value written to the WM3 register just by one in either direction the problem disappears. That to me suggests that the punit will not enter the corrsponding powersave mode (MPLL shutdown IIRC) unless the latency value in the register matches exactly what we read from SSKPD. Ie. it's not really a latency value but rather just a cookie by which the punit can identify the desired power saving state. On HSW/BDW this was changed such that we actually just write the WM level number into those bits, which makes much more sense given the observed behaviour. We could try to handle this by disallowing LP3 watermarks only when vblank interrupts are enabled but we'd first have to prove that only vblank interrupts are affected, which seems unlikely. Also we can't grab the wm mutex from the vblank enable/disable hooks because those are called with various spinlocks held. Thus we'd have to redesigne the watermark locking. So to play it safe and keep the code simple we simply disable LP3 watermarks on all SNB machines. To do that we simply zero out the latency values for watermark level 3, and we adjust the watermark computation to check for that. The behaviour now matches that of the g4x/vlv/skl wm code in the presence of a zeroed latency value. v2: s/USHRT_MAX/U32_MAX/ for consistency with the types (Chris) Cc: stable@vger.kernel.org Cc: Chris Wilson Acked-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101269 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103713 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181114173440.6730-1-ville.syrjala@linux.intel.com commit fa1c071c1efb28baef2409e28c186d40c76d7839 Author: Qiuxu Zhuo Date: Fri Nov 16 15:35:05 2018 +0800 EDAC, skx: Let EDAC core show the decoded result for debugfs Current debugfs shows the decoded result in its own print format which is inconvenient for analysis/statistics. Use skx_mce_check_error() instead of skx_decode() for debugfs, then the decoded result is showed via EDAC core in a more readable format like "CPU_SrcID#[0-9]_MC#[0-9]_Chan#[0-9]_DIMM#[0-9]". Print a warning the first time this interface is used so the administrator can see the console log that error(s) have been faked. Co-developed-by: Tony Luck Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: arozansk@redhat.com CC: linux-edac Link: http://lkml.kernel.org/r/1542353705-13531-1-git-send-email-qiuxu.zhuo@intel.com commit 85b9c8bfee67ed151c44861c71adc816fc1b46a9 Author: Qiuxu Zhuo Date: Fri Nov 16 15:34:44 2018 +0800 EDAC, skx: Move debugfs node under EDAC's hierarchy The debugfs node is /sys/kernel/debug/skx_edac_test. Rename it and move under EDAC debugfs root directory. Remove the unused 'skx_fake_addr' and remove the 'skx_test' on error. Co-developed-by: Tony Luck Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: arozansk@redhat.com CC: linux-edac Link: http://lkml.kernel.org/r/1542353684-13496-1-git-send-email-qiuxu.zhuo@intel.com commit e235dd43d8b0f0e036fc528504d7a129685fb572 Author: Qiuxu Zhuo Date: Fri Nov 16 15:34:20 2018 +0800 EDAC, skx: Prepend hex formatting with '0x' Some debug/error strings in hex formatting do not have the '0x' prefix. Prepend hex formatting with '0x' for them, but with one exception: "Couldn't enable %04x:%04x", instead of putting '0x' in this line, add the word 'device'. We commonly use 8086:1234 without the leading '0x' (e.g. as '-d' argument to lspci(8) and setpci(8) commands). Suggested-by: Borislav Petkov Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Tony Luck CC: arozansk@redhat.com CC: linux-edac Link: http://lkml.kernel.org/r/1542353660-13458-1-git-send-email-qiuxu.zhuo@intel.com commit a6a386152a89f650ad93ebdf4ab160914e75ca20 Author: Qiuxu Zhuo Date: Fri Nov 16 15:33:36 2018 +0800 EDAC, skx: Fix function calling order in skx_exit() The order of function calling in skx_exit() is not the reversed order in skx_init(). Fix it. Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Tony Luck CC: arozansk@redhat.com CC: linux-edac Link: http://lkml.kernel.org/r/1542353616-13421-1-git-send-email-qiuxu.zhuo@intel.com commit f82d15e223403b05fffb33ba792b87a8620f6fee Author: Uwe Kleine-König Date: Fri Nov 16 07:52:08 2018 +0100 pwm: lpc18xx-sct: Don't reconfigure PWM in .request and .free Regarding the .request case: The consumer might be interested in taking over the configured state from the boot loader. So the initially configured state should be retained. For the free case the PWM consumer is responsible for disabling the PWM before calling pwm_put() and there are three subcases to consider: a) The PWM is already off. Then there is no gain in disabling the PWM once more. b) The PWM is still running and there is a good reason for that. (Not sure this is a valid case, I cannot imagine such a good reason.) Then it is counterproductive to disable the PWM. c) The PWM is still running because the consumer failed to disable the PWM. Then the consumer needs fixing and there is little incentive to paper over the problem in the backend driver. This aligns the lpc18xx-sct driver to the other PWM drivers that also don't reconfigure the hardware in .request and .free. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f911e7234f83efe4842a453406e90ceac3cabd8e Author: Chris Wilson Date: Thu Nov 15 20:38:51 2018 +0000 drm/i915/selftests: Workaround an issue with unused lockdep subclass lockdep insists that if we give a lock a subclass, it must be used. Failure to do so triggers a self-consistency check when reading lockdep_stats: [ 49.902002] DEBUG_LOCKS_WARN_ON(debug_atomic_read(nr_unused_locks) != nr_unused) [ 49.902009] WARNING: CPU: 3 PID: 383 at kernel/locking/lockdep_proc.c:249 lockdep_stats_show+0x984/0xa10 [ 49.902026] Modules linked in: nls_ascii nls_cp437 vfat fat crct10dif_pclmul crc32_pclmul crc32c_intel aesni_intel aes_x86_64 crypto_simd cryptd glue_helper intel_cstate intel_uncore intel_rapl_perf intel_gtt efivars prime_numbers ahci libahci i2c_i801 video button efivarfs [last unloaded: drm_kms_helper] [ 49.902059] CPU: 3 PID: 383 Comm: cat Tainted: G U 4.20.0-rc2+ #304 [ 49.902068] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 49.902079] RIP: 0010:lockdep_stats_show+0x984/0xa10 [ 49.902086] Code: 00 85 c0 0f 84 aa f8 ff ff 8b 05 77 37 e2 00 85 c0 0f 85 9c f8 ff ff 48 c7 c6 e0 57 bc 81 48 c7 c7 28 30 bb 81 e8 6b 77 fa ff <0f> 0b e9 82 f8 ff ff 48 c7 44 24 50 00 00 00 00 45 31 e4 31 db 31 [ 49.902103] RSP: 0018:ffffc90000247d58 EFLAGS: 00010292 [ 49.902110] RAX: 0000000000000044 RBX: 00000000000002f0 RCX: 0000000000000000 [ 49.902118] RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffffffff810b3464 [ 49.902126] RBP: 0000000000000039 R08: 0000000000000002 R09: 0000000000000000 [ 49.902133] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000007ead [ 49.902141] R13: 0000000000000001 R14: ffff88884c021000 R15: 0000000000000097 [ 49.902150] FS: 00007fb347e66540(0000) GS:ffff88885e600000(0000) knlGS:0000000000000000 [ 49.902159] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 49.902165] CR2: 00007fb347aeb000 CR3: 00000008544bd005 CR4: 00000000001606e0 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181115203851.25739-1-chris@chris-wilson.co.uk commit d1d4445abffb2b17e841d37b555b6f1364b571c1 Author: Michal Simek Date: Thu Nov 8 10:06:53 2018 +0100 arm64: dts: zynqmp: Fix node names which contain "_" s/_/-/ for node names. It fixes warnings like this: ... Warning (node_name_chars_strict): /cpu_opp_table: Character '_' not recommended in node name ... Issues reported by make dtbs W=12 Signed-off-by: Michal Simek commit 4556b160a1195343ea36f7e4bf7ca28c45835fac Author: Michal Simek Date: Thu Nov 8 14:30:34 2018 +0100 arm64: dts: zynqmp: Add missing gpio-controller to ps gpio Add missing gpio-controller property to ps gpio. This was found via DT schema validation. Signed-off-by: Michal Simek commit 1e17ab5320a654eaf1e4ce121c61e7aa9732805a Author: Firoz Khan Date: Tue Nov 13 11:34:34 2018 +0530 microblaze: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by microblaze/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/syscall_table.S file. Signed-off-by: Firoz Khan Signed-off-by: Michal Simek commit fc06bac35c8c76894028f1c318f99d8165f03cf4 Author: Firoz Khan Date: Tue Nov 13 11:34:33 2018 +0530 microblaze: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_32.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_32.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/syscall_table.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Michal Simek commit c0b2826aa02a0747c3016457b9c1917ba14d0655 Author: Firoz Khan Date: Tue Nov 13 11:34:32 2018 +0530 microblaze: move __NR_syscalls macro from asm/unistd.h __NR_syscalls holds the number of system call exist in microblaze architecture. We have to change the value of __NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update __NR- _syscalls value. 1. Update __NR_syscalls in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_sys- calls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update __NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I moved the __NR_syscalls macro from asm/unistd.h to uapi- /asm/unistd.h. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Michal Simek commit 3da2c1dfdb802b184eea0653d1e589515b52d74b Author: Vitaly Chikunov Date: Sun Nov 11 20:40:02 2018 +0300 crypto: ecc - regularize scalar for scalar multiplication ecc_point_mult is supposed to be used with a regularized scalar, otherwise, it's possible to deduce the position of the top bit of the scalar with timing attack. This is important when the scalar is a private key. ecc_point_mult is already using a regular algorithm (i.e. having an operation flow independent of the input scalar) but regularization step is not implemented. Arrange scalar to always have fixed top bit by adding a multiple of the curve order (n). References: The constant time regularization step is based on micro-ecc by Kenneth MacKay and also referenced in the literature (Bernstein, D. J., & Lange, T. (2017). Montgomery curves and the Montgomery ladder. (Cryptology ePrint Archive; Vol. 2017/293). s.l.: IACR. Chapter 4.6.2.) Signed-off-by: Vitaly Chikunov Cc: kernel-hardening@lists.openwall.com Signed-off-by: Herbert Xu commit 8a5a79d5556b822143b4403fc46068d4eef2e4e2 Author: Martin Willi Date: Sun Nov 11 10:36:30 2018 +0100 crypto: x86/chacha20 - Add a 4-block AVX2 variant This variant builds upon the idea of the 2-block AVX2 variant that shuffles words after each round. The shuffling has a rather high latency, so the arithmetic units are not optimally used. Given that we have plenty of registers in AVX, this version parallelizes the 2-block variant to do four blocks. While the first two blocks are shuffling, the CPU can do the XORing on the second two blocks and vice-versa, which makes this version much faster than the SSSE3 variant for four blocks. The latter is now mostly for systems that do not have AVX2, but there it is the work-horse, so we keep it in place. The partial XORing function trailer is very similar to the AVX2 2-block variant. While it could be shared, that code segment is rather short; profiling is also easier with the trailer integrated, so we keep it per function. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit a5dd97f86211e91219807db607d740f9896b8e0b Author: Martin Willi Date: Sun Nov 11 10:36:29 2018 +0100 crypto: x86/chacha20 - Add a 2-block AVX2 variant This variant uses the same principle as the single block SSSE3 variant by shuffling the state matrix after each round. With the wider AVX registers, we can do two blocks in parallel, though. This function can increase performance and efficiency significantly for lengths that would otherwise require a 4-block function. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit 9b17608f15b940babe2e32522ea29787abd10af2 Author: Martin Willi Date: Sun Nov 11 10:36:28 2018 +0100 crypto: x86/chacha20 - Use larger block functions more aggressively Now that all block functions support partial lengths, engage the wider block sizes more aggressively. This prevents using smaller block functions multiple times, where the next larger block function would have been faster. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit c3b734dd325dadc73c2f5b4d187208730bf21df5 Author: Martin Willi Date: Sun Nov 11 10:36:27 2018 +0100 crypto: x86/chacha20 - Support partial lengths in 8-block AVX2 variant Add a length argument to the eight block function for AVX2, so the block function may XOR only a partial length of eight blocks. To avoid unnecessary operations, we integrate XORing of the first four blocks in the final lane interleaving; this also avoids some work in the partial lengths path. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit db8e15a24957904d10f784a9adc4ea4824ee996c Author: Martin Willi Date: Sun Nov 11 10:36:26 2018 +0100 crypto: x86/chacha20 - Support partial lengths in 4-block SSSE3 variant Add a length argument to the quad block function for SSSE3, so the block function may XOR only a partial length of four blocks. As we already have the stack set up, the partial XORing does not need to. This gives a slightly different function trailer, so we keep that separate from the 1-block function. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit e4e72063d3c0ee9ba10faeb5645dcdaae2d733e9 Author: Martin Willi Date: Sun Nov 11 10:36:25 2018 +0100 crypto: x86/chacha20 - Support partial lengths in 1-block SSSE3 variant Add a length argument to the single block function for SSSE3, so the block function may XOR only a partial length of the full block. Given that the setup code is rather cheap, the function does not process more than one block; this allows us to keep the block function selection in the C glue code. The required branching does not negatively affect performance for full block sizes. The partial XORing uses simple "rep movsb" to copy the data before and after doing XOR in SSE. This is rather efficient on modern processors; movsw can be slightly faster, but the additional complexity is probably not worth it. Signed-off-by: Martin Willi Signed-off-by: Herbert Xu commit 05ba88468b7d85c50d0945446248e0fcda7536bb Author: Stefan Wahren Date: Sat Nov 10 15:51:16 2018 +0100 hwrng: bcm2835 - Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. While we are at this fix the comment style, too. Cc: Lubomir Rintel Signed-off-by: Stefan Wahren Acked-by: Greg Kroah-Hartman Reviewed-by: Eric Anholt Acked-by: Lubomir Rintel Signed-off-by: Herbert Xu commit 8ddab428730d66e86ebe90aef15d5f7c5c45fe0d Author: Colin Ian King Date: Fri Nov 9 13:16:39 2018 +0000 padata: clean an indentation issue, remove extraneous space Trivial fix to clean up an indentation issue Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit c10a53367901b36eec6208f1dbaf53da9fd358bb Author: Horia Geantă Date: Thu Nov 8 15:36:31 2018 +0200 crypto: caam/qi2 - add support for Chacha20 + Poly1305 Add support for Chacha20 + Poly1305 combined AEAD: -generic (rfc7539) -IPsec (rfc7634 - known as rfc7539esp in the kernel) Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit d6bbd4eea243951d2543a0f427c9a6bf2835b6f5 Author: Horia Geantă Date: Thu Nov 8 15:36:30 2018 +0200 crypto: caam/jr - add support for Chacha20 + Poly1305 Add support for Chacha20 + Poly1305 combined AEAD: -generic (rfc7539) -IPsec (rfc7634 - known as rfc7539esp in the kernel) Signed-off-by: Cristian Stoica Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 193188e5512db5e84d2d9a7a6a157de651e78f3a Author: Cristian Stoica Date: Thu Nov 8 15:36:29 2018 +0200 crypto: chacha20poly1305 - export CHACHAPOLY_IV_SIZE Move CHACHAPOLY_IV_SIZE to header file, so it can be reused. Signed-off-by: Cristian Stoica Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit c99d4a2454009d6fb51e03248fac7629c4d6a5ca Author: Horia Geantă Date: Thu Nov 8 15:36:28 2018 +0200 crypto: caam/qi2 - add support for ChaCha20 Add support for ChaCha20 skcipher algorithm. Signed-off-by: Carmen Iorga Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit d239b10d4ceb986d998779a4ed81824368aca831 Author: Horia Geantă Date: Thu Nov 8 15:36:27 2018 +0200 crypto: caam - add register map changes cf. Era 10 Era 10 changes the register map. The updates that affect the drivers: -new version registers are added -DBG_DBG[deco_state] field is moved to a new register - DBG_EXEC[19:16] @ 8_0E3Ch. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 57f002891e08c589abf09409f2d606dfd1164e32 Author: Leonard Crestez Date: Wed Nov 7 15:33:32 2018 +0000 crypto: mxs-dcp - Add support for dcp clk On 6ull and 6sll the DCP block has a clock which needs to be explicitly enabled. Add minimal handling for this at probe/remove time. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Herbert Xu commit 70db8b79e561a2965927a08ccdb06c796834a1b7 Author: Leonard Crestez Date: Wed Nov 7 15:33:31 2018 +0000 dt-bindings: crypto: Mention clocks for mxs-dcp Explicit clock enabling is required on 6sll and 6ull so mention that standard clock bindings are used. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 25a0b9d4e512ea04d80c84bd5e3b9e2722b92ec1 Author: Vitaly Chikunov Date: Wed Nov 7 00:00:03 2018 +0300 crypto: streebog - add Streebog test vectors Add testmgr and tcrypt tests and vectors for Streebog hash function from RFC 6986 and GOST R 34.11-2012, for HMAC-Streebog vectors are from RFC 7836 and R 50.1.113-2016. Cc: linux-integrity@vger.kernel.org Signed-off-by: Vitaly Chikunov Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit dfdda82e3b84c13601be09f8351ec4f15a4fbe03 Author: Vitaly Chikunov Date: Wed Nov 7 00:00:02 2018 +0300 crypto: streebog - register Streebog in hash info for IMA Register Streebog hash function in Hash Info arrays to let IMA use it for its purposes. Cc: linux-integrity@vger.kernel.org Signed-off-by: Vitaly Chikunov Reviewed-by: Mimi Zohar Signed-off-by: Herbert Xu commit fe18957e8e87403a9d4be8e8a62352ef107def99 Author: Vitaly Chikunov Date: Wed Nov 7 00:00:01 2018 +0300 crypto: streebog - add Streebog hash function Add GOST/IETF Streebog hash function (GOST R 34.11-2012, RFC 6986) generic hash transformation. Cc: linux-integrity@vger.kernel.org Signed-off-by: Vitaly Chikunov Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit d65ddecbea3c07f9f93af9d32680e650f20aa102 Author: Brajeswar Ghosh Date: Tue Nov 6 17:46:14 2018 +0530 crypto: aes-ce - Remove duplicate header Remove asm/hwcap.h which is included more than once Signed-off-by: Brajeswar Ghosh Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4f0129d13e69bad0363fd75553fb22897b32c379 Author: Raveendra Padasalagi Date: Tue Nov 6 13:58:58 2018 +0530 crypto: bcm - fix normal/non key hash algorithm failure Remove setkey() callback handler for normal/non key hash algorithms and keep it for AES-CBC/CMAC which needs key. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi Signed-off-by: Herbert Xu commit ecd6d5c9cba5fc6053ba21e3f8a4c536f65ea27a Author: Gilad Ben-Yossef Date: Mon Nov 5 12:05:01 2018 +0000 crypto: cts - document NIST standard status cts(cbc(aes)) as used in the kernel has been added to NIST standard as CBC-CS3. Document it as such. Signed-off-by: Gilad Ben-Yossef Suggested-by: Stephan Mueller Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 2eb4942b6609d35a4e835644a33203b0aef7443d Author: Vitaly Chikunov Date: Mon Nov 5 11:36:18 2018 +0300 crypto: ecc - check for invalid values in the key verification test Currently used scalar multiplication algorithm (Matthieu Rivain, 2011) have invalid values for scalar == 1, n-1, and for regularized version n-2, which was previously not checked. Verify that they are not used as private keys. Signed-off-by: Vitaly Chikunov Signed-off-by: Herbert Xu commit 75c63de104831df4abc2c997f913f3719781fdf0 Author: Fabio Estevam Date: Tue Nov 6 10:03:43 2018 -0200 ARM: imx_v6_v7_defconfig: Select the PXP driver The Pixel Pipeline (PXP) block is present on several i.MX SoCs such as imx6dl, imx6sl, imx6ul, imx6sx, imx6ull and imx7d. Select the PXP driver by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 4951c2da1a3a8b56d4ef0659d80938942307a8a3 Author: Lucas Stach Date: Mon Nov 5 18:34:02 2018 +0100 ARM: dts: imx6: add thermal sensor and cooling cells This allows a board to specify a custom thermal zone configuration involving the SoC internal sensor, CPU and GPU nodes without having to change those nodes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 749a5068f2e2453a38777b1d5fc322d503cabf1d Author: Lucas Stach Date: Mon Nov 5 18:31:56 2018 +0100 ARM: dts: imx6: RDU2: fix eGalax touchscreen node Use the correct compatible for the new protocol used by the firmware on the touch controller, the GPIO wakeup isn't used in that case. Also eGalax touch needs axis swapping, just as with the RMI4 touch. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 381aafc016f072af3602deeec4bb7b3e1194a8b1 Author: Alex Gonzalez Date: Mon Nov 5 11:48:04 2018 +0100 ARM: dts: imx6ul: ccimx6ulsom: Fix indentation on iomuxc nodes This patch corrects indentation problems in the gpmigrp and i2c1grp nodes. Signed-off-by: Alex Gonzalez Signed-off-by: Shawn Guo commit 9d60e0f031e4b4fe2ad3250b3c1e02d77ed44786 Author: Alex Gonzalez Date: Mon Nov 5 11:43:42 2018 +0100 ARM: dts: imx6ul: ccimx6ulsom: Add support for wireless SOM variant The wireless variants of the ConnecCore 6UL SOM include a Qualcomm QCA6564 wireless chip with dual WiFi and Bluetooth. Both the ConnectCore 6UL SBC Express and Pro boards fit a wireless SOM. The Wifi is connected through the SDIO interface on usdhc1 and the Bluetooth is connected via uart1. Reviewed-by: Fabio Estevam Signed-off-by: Alex Gonzalez Signed-off-by: Shawn Guo commit 8ab9c127bf7235ad568c13e1525ea6e8f4f3a0ef Author: Xiaowei Bao Date: Mon Nov 5 16:46:49 2018 +0800 ARM: dts: ls1021a: Add the status property disable PCIe Add the status property disable the PCIe, the property will be enable by bootloader. Signed-off-by: Xiaowei Bao Signed-off-by: Shawn Guo commit 9334ae5e6f9972110c2be136178ca2591c072b62 Author: Jens Axboe Date: Thu Nov 15 19:42:07 2018 -0700 ide: clear ide_req()->special for non-passthrough requests The initial patch cleared this for all requests, which is wrong since internal uses can't have this cleared as that's what they are using to pass data. The fix moved the initialization to the mq_ops->initialize_rq_fn(), but that's only a partial fix since it only catches uses from blk_get_request(), not requests coming from the file system. Keep the non-fs initialization, and add the IDE entry clear IFF RQF_DONTPREP isn't set and it's a passthrough request. Fixes: d16a67667c61 ("ide: don't clear special on ide_queue_rq() entry") Fixes: 22ce0a7ccf23 ("ide: don't use req->special") Reported-by: Guenter Roeck Signed-off-by: Jens Axboe commit 7dd9c42f2668821141690346ca58ecffdaa281f0 Author: Ian Ray Date: Sun Nov 4 08:19:38 2018 +0200 ARM: dts: imx6q-bx50v3: user-space watchdog GPIO configuration Leave b{4,6}50v3 GPIO expander pca953x pins P05,P10,P11 unconfigured as they are now used to implement an additional watchdog mechanism in user space. P10,P11 pins remain unused (and therefore hogged) on b850v3. Signed-off-by: Ian Ray Signed-off-by: Shawn Guo commit 56d4eac0a1eba31f8c2ff1051388f6cc3a730999 Author: Lucas De Marchi Date: Tue Nov 13 17:15:09 2018 -0800 drm/i195: spell out reverse on for_each macros Do like it's done for list.h macros, and use "reverse" suffix rather than "rev". Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181114011509.3667-3-lucas.demarchi@intel.com commit c6e1f8cc88586d72e7049604d9e93edd08f70408 Author: Lucas De Marchi Date: Tue Nov 13 17:15:08 2018 -0800 drm/i915/icl: reverse uninit order Bspec 21257 says "DDIA PHY is the comp master, so it must not be un-initialized if other combo PHYs are in use". Here we are shutting down all phys, so it's not strictly required. However let's be consistent on deinitializing things in the reversed order we initialized them. v2: simplify protection for enum port being unsigned in future v3: spell out reverse rather than rev Signed-off-by: Lucas De Marchi Reviewed-by: Imre Deak Reviewed-by: Jani Nikula Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181114011509.3667-2-lucas.demarchi@intel.com commit 6233016484c0217cb1dbf323f1e439e519a59906 Author: Lucas De Marchi Date: Tue Nov 13 17:15:07 2018 -0800 drm/i915/icl: replace check for combo phy These are the only places that assume ports A and B are the ones with combo phy. Let's use intel_port_is_combophy() there to make sure it checks for combo phy ports the same way everywhere. v2: define for_each_combo_port() helper to check the ports Signed-off-by: Lucas De Marchi Reviewed-by: Imre Deak Reviewed-by: Jani Nikula Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181114011509.3667-1-lucas.demarchi@intel.com commit 5aa25c05be0223aea170385484b0965c9fd90144 Merge: 45cf7959c3040 016fd28568295 Author: David S. Miller Date: Thu Nov 15 16:12:19 2018 -0800 Merge tag 'batadv-next-for-davem-20181114' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - Bump version strings, by Simon Wunderlich - Fixup includes, by Sven Eckelmann (3 patches) - Separate BATMAN_ADV_DEBUG from DEBUGFS, by Sven Eckelmann - Fixup tracing log documentation, by Sven Eckelmann - Use exclusive locks to secure netlink information dump transfers, by Sven Eckelmann (8 patches) - Move CRC16 dependency, by Sven Eckelmann - Enable MCAST by default, by Linus Luessing ==================== Signed-off-by: David S. Miller commit d57e79601bc587f140a9bbb102493ad86f648ae0 Author: Mark Brown Date: Thu Nov 15 16:08:32 2018 -0800 spi: Fix core transfer waits after slave support The refactoring done as part of adding the core support for handling waiting for slave transfer dropped a conditional which meant that we started waiting for completion of all transfers, not just those that the controller asked for. This caused hangs and massive delays on platforms that don't need the core delay. Re-add the delay to fix this. Fixes: 810923f3bf06c11 (spi: Deal with slaves that return from transfer_one() unfinished) Reported-by: Tony Lindgren Tested-by: Tony Lindgren Signed-off-by: Mark Brown commit 45cf7959c30402d7c4ea43568a6f1bab0ba6ca63 Author: Li RongQing Date: Tue Nov 13 09:34:31 2018 +0800 net: slightly optimize eth_type_trans netperf udp stream shows that eth_type_trans takes certain cpu, so adjust the mac address check order, and firstly check if it is device address, and only check if it is multicast address only if not the device address. After this change: To unicast, and skb dst mac is device mac, this is most of time reduce a comparision To unicast, and skb dst mac is not device mac, nothing change To multicast, increase a comparision Before: 1.03% [kernel] [k] eth_type_trans After: 0.78% [kernel] [k] eth_type_trans Signed-off-by: Zhang Yu Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 982c17b9e3c27389a8d214333c686dab0e95cf63 Author: Li RongQing Date: Tue Nov 13 09:16:52 2018 +0800 net: remove BUG_ON from __pskb_pull_tail if list is NULL pointer, and the following access of list will trigger panic, which is same as BUG_ON Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 7e18750cda3d0df7c35ed1a60612229f36b957e8 Merge: 110e2b4b94c62 d5585b7b6846a Author: David S. Miller Date: Thu Nov 15 15:05:11 2018 -0800 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 2018-11-14 This series contains updates to i40e and virtchnl. Lance Roy updates i40e to use lockdep_assert_held() instead of spin_is_locked(), since it is better suited to check locking requirements. Jan improves the code readability in XDP by adding the use of a local variable. Provides protection on methods that create/modify/destroy VF's via locking mechanism to prevent unstable behaviour and potential kernel panics. Krzysztof adds a hardware capability flag to indicate whether firmware supports stopping the LLDP agent. Patryk replaces the use of strncpy() with strlcpy() to ensure the buffer is NULL terminated. Mitch fixes the issue of trying to start nway on devices that do not support auto-negotiation, by checking the autoneg state before attempting to restart nway. Alice updates virtchnl to keep the checks all together for ease of readability and consistency. Also fixed a "off by one" error in the number of traffic classes being calculated. Richard fixed VF port VLANs, where the priority bits were incorrectly set because the incorrect shift and mask bits were being used. Alan adds a bit to set and check if a timeout recovery is already pending to prevent overlapping transmit timeout recovery. ==================== Signed-off-by: David S. Miller commit db29eb059cdc571f9d75cec4a41b9884b3b8286a Author: Jens Axboe Date: Thu Nov 15 16:05:02 2018 -0700 nvme: fix handling of EINVAL on pci_alloc_irq_vectors_affinity() At least on SPARC, if MSI/MSI-X isn't supported, we get EINVAL if we ask for more than one vector. This isn't covered by our ENOSPC check. If we get EINVAL, decrease our ask to just one vector, instead of bailing out in error. Fixes: 3b6592f70ad7 ("nvme: utilize two queue maps, one for reads and one for writes") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Jens Axboe commit 110e2b4b94c623b36d0345a604970db34935f158 Author: David S. Miller Date: Thu Nov 15 14:57:09 2018 -0800 test_objagg: Fix warning. lib/test_objagg.c: In function ‘test_delta_action_item’: ./include/linux/printk.h:308:2: warning: ‘errmsg’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: David S. Miller commit f01067005ec3dc03d49e430ec91243111ce518c2 Author: Tony Lindgren Date: Thu Nov 15 14:46:53 2018 -0800 bus: ti-sysc: Detect devices for debug on omap5 We want to see the names of detected devices when DEBUG is enabled. Signed-off-by: Tony Lindgren commit 2c63a833e4500b341a62bf97e67488909ae12086 Author: Tony Lindgren Date: Thu Nov 15 14:46:53 2018 -0800 bus: ti-sysc: Add mcasp optional clocks flag We have OPT_CLKS_NEEDED in legacy platform data, but it's missing from the ti-sysc driver for device tree based configuration. In order to pass OPT_CLKS_NEEDED quirk flag we need to update omap4 module data and add a new compatible for dra7 as the module layout is different from sysc_regbits_omap4_mcasp. Fixes: 70a65240efb1 ("bus: ti-sysc: Add register bits for interconnect target modules") Cc: Mark Rutland Cc: Rob Herring Signed-off-by: Tony Lindgren commit 7b4f8ac2f1acdff3c0cce23d8c3b86434a6e768a Author: Tony Lindgren Date: Thu Nov 15 14:46:52 2018 -0800 bus: ti-sysc: Fix getting optional clocks in clock_roles We can have holes in clock_roles with interface clock missing for example. Currently getting an optional clock will fail if there are only a functional clock and an optional clock. Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks") Signed-off-by: Tony Lindgren commit 4e86889b52ac53a164feb92d27bd2a7d9f3e6ad4 Merge: 6ab6dfa6bb500 3b423271b89a7 Author: David S. Miller Date: Thu Nov 15 14:43:44 2018 -0800 Merge branch 'mlxsw-ERP-sharing-multiple-masks' Ido Schimmel says: ==================== mlxsw: spectrum: acl: Introduce ERP sharing by multiple masks Jiri says: The Spectrum-2 hardware has limitation number of ERPs per-region. In order to accommodate more masks than number of ERPs, the hardware supports to insert rules with delta bits. By that, the rules with masks that differ in up-to 8 consecutive bits can share the same ERP. Patches 1 and 2 fix couple of issues that would appear in existing selftests after adding delta support Patch 3 introduces a generic object aggregation library. Now it is static, but it will get extended for recalculation of aggregations in the future in order to reach more optimal aggregation. Patch 4 just simply converts existing ERP code to use the objagg library instead of a rhashtable. Patches 5-9 do more or less small changes to prepare ground for the last patch. Patch 10 fills-up delta callbacks of objagg library and utilizes the delta bits for rule insertion. The last patch adds selftest to test the mlxsw Spectrum-2 delta flows. ==================== Signed-off-by: David S. Miller commit 3b423271b89a78757ad49725e131472e4fe1a49c Author: Jiri Pirko Date: Wed Nov 14 08:22:36 2018 +0000 selftests: mlxsw: spectrum-2: Add simple delta test Track the basic codepaths of delta handling, using objagg tracepoints. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c22291f7cf45f82a4cd1a82f780922cbbcf004b3 Author: Jiri Pirko Date: Wed Nov 14 08:22:35 2018 +0000 mlxsw: spectrum: acl: Implement delta for ERP Allow ERP sharing for multiple mask. Do it by properly implementing delta_create() objagg object. Use the computed delta info for inserting rules in A-TCAM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c293ba3403566c771fd80fc10800a200ef8539e8 Author: Jiri Pirko Date: Wed Nov 14 08:22:34 2018 +0000 mlxsw: spectrum: acl: Push code related to num_ctcam_erps inc/dec into separate helpers Later on the same code is going to be needed for deltas as well. So push the procedures related to increment and decrement of num_ctcam_erps into a separate helpers. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 59600844cf4ef6acf65166ef6e47e89f7a79717c Author: Jiri Pirko Date: Wed Nov 14 08:22:33 2018 +0000 mlxsw: spectrum: acl: Remove mlxsw_afk_encode() block range args and key/mask check Since two remaining users of mlxsw_afk_encode() do not specify block ranges to work on, remove the args. Also, key/mask is always non-NULL now, so skip the checks. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b1ce60e6214d93fbeffa39e6f9db21c0a4591b1e Author: Jiri Pirko Date: Wed Nov 14 08:22:32 2018 +0000 mlxsw: spectrum: acl: Don't encode the key again in mlxsw_sp_acl_atcam_12kb_lkey_id_get() No need to do key encoding again in mlxsw_sp_acl_atcam_12kb_lkey_id_get(). Instead of that, introduce a new helper that would just clear unused blocks. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3bc6f3858a0d25667164f9b58667d7f3fbce98b6 Author: Jiri Pirko Date: Wed Nov 14 08:22:31 2018 +0000 mlxsw: core_acl: Change order of args of ops->encode_block() Change order so it is aligned with the usual case where the "write_to" buffer comes as the first arg. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d07cd660603349df100e56ef98ee31ae7a5e1423 Author: Jiri Pirko Date: Wed Nov 14 08:22:30 2018 +0000 mlxsw: spectrum: acl: Pass key pointer to master_mask_set/clear The device requires that the master mask of each region will be composed from a logical OR between all the unmasked bits in the region. Currently, this is just a logical OR between all the eRPs used in the region, but the next patch is going to introduce delta bits support which need to be taken into account as well. Since the eRP does not include the delta bits, pass the key pointer to mlxsw_sp_acl_erp_master_mask_set/clear instead. Convert key->mask to the bitmap on fly. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c71abd7d9414d059005391120e2166d61e7905ca Author: Jiri Pirko Date: Wed Nov 14 08:22:29 2018 +0000 mlxsw: spectrum: acl_erp: Convert to use objagg for tracking ERPs Currently the ERPs are tracked internally in a hashtable. Benefit from the newly introduced objagg library and use it to track ERPs. At this point, there is no nesting of objects done, as the delta_create callback always returns -EOPNOTSUPP. On the way, add "mask" into ERP mask get and set functions and struct names. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0a020d416d0af0b0c782e2a8363896e756e9121e Author: Jiri Pirko Date: Wed Nov 14 08:22:28 2018 +0000 lib: introduce initial implementation of object aggregation manager This lib tracks objects which could be of two types: 1) root object 2) nested object - with a "delta" which differentiates it from the associated root object The objects are tracked by a hashtable and reference-counted. User is responsible of implementing callbacks to create/destroy root entity related to each root object and callback to create/destroy nested object delta. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7dc5a0eeea185e5f3af3f97a86e76419791cdd60 Author: Jiri Pirko Date: Wed Nov 14 08:22:27 2018 +0000 selftests: Adjust spectrum-2 ctcam_two_atcam_masks_test In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 36107c485f5efabe92ec4e0743724df5205511a4 Author: Jiri Pirko Date: Wed Nov 14 08:22:26 2018 +0000 selftests: Adjust spectrum-2 two_mask_test In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fd7de6370cb62b147185834d60069568a21acacd Author: Kirill Marinushkin Date: Thu Nov 15 08:12:53 2018 +0100 ASoC: Add documentation for pcm3060 property out-single-ended Output of pcm3060 codec may be configured as single-ended or differential Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit fe06051dbf8abf5962d9258c4a863056bdfa6eae Author: zoro Date: Wed Nov 14 17:38:22 2018 +0800 regulator/of_get_regulator: add child path to find the regulator supplier when the VIR_LDO1 regulator supplier is it's brother, we can't find the supplier. example code : &vir_regulator { ldo0_vir: ldo0-virtual { regulator-compatible = "VIR_LDO0"; regulator-name= "VIR_LDO0"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <2000000>; }; ldo1_vir: ldo1-virtual { regulator-compatible = "VIR_LDO1"; regulator-name= "VIR_LDO1"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <3000000>; ldo1-supply = <&ldo0_vir>; }; ... } so we add the child ptah to find the suppier. Signed-off-by: zoro Signed-off-by: Mark Brown commit eed5afc6fc194b9615c1f8239ed1391fb3ee50aa Author: Jerome Brunet Date: Tue Oct 30 11:22:30 2018 +0100 arm64: dts: meson-gx: add efuse pclk Add the required peripheral clock for the efuse device. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 41bb5769b7f4b7a85e4b92c37429228279b4f569 Author: Maxime Jourdan Date: Mon Nov 12 17:46:54 2018 +0100 drivers: soc: Allow building the amlogic drivers without ARCH_MESON The current condition makes it difficult to compile the amlogic/ drivers with COMPILE_TEST, or without ARCH_MESON in general. Fixes kbuild errors with patch series that depend on drivers in that directory, for instance the meson video decoder. Signed-off-by: Maxime Jourdan Signed-off-by: Kevin Hilman commit 399b6c8bc9f705c8fc718ddeb1671f88174da051 Author: Steffen Maier Date: Thu Nov 8 15:44:58 2018 +0100 scsi: zfcp: drop old default switch case which might paper over missing case This was introduced with v2.6.27 commit 287ac01acf22 ("[SCSI] zfcp: Cleanup code in zfcp_erp.c") but would now suppress helpful -Wswitch compiler warnings when building with W=1 such as the following forced example: drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_setup_act': drivers/s390/scsi/zfcp_erp.c:220:2: warning: enumeration value 'ZFCP_ERP_ACTION_REOPEN_PORT' not handled in switch [-Wswitch] switch (need) { ^~~~~~ But then again, only with W=1 we would notice unhandled enum cases. Without the default cases and a missed unhandled enum case, the code might perform unforeseen things we might not want... As of today, we never run through the removed default case, so removing it is no functional change. In the future, we never should run through a default case but introduce the necessary specific case(s) to handle new functionality. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 0c902936e55cff9335b27ed632fc45e7115ced75 Author: Steffen Maier Date: Thu Nov 8 15:44:57 2018 +0100 scsi: zfcp: drop default switch case which might paper over missing case This was introduced with v4.18 commit 8c3d20aada70 ("scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED") but would now suppress helpful -Wswitch compiler warnings when building with W=1 such as the following forced example: drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_handle_failed': drivers/s390/scsi/zfcp_erp.c:126:2: warning: enumeration value 'ZFCP_ERP_ACTION_REOPEN_PORT_FORCED' not handled in switch [-Wswitch] switch (want) { ^~~~~~ But then again, only with W=1 we would notice unhandled enum cases. Without the default cases and a missed unhandled enum case, the code might perform unforeseen things we might not want... As of today, we never run through the removed default case, so removing it is no functional change. In the future, we never should run through a default case but introduce the necessary specific case(s) to handle new functionality. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 3505144e5428e1a75a573dcc37bf865d7d7bf988 Author: Steffen Maier Date: Thu Nov 8 15:44:56 2018 +0100 scsi: zfcp: silence -Wimplicit-fallthrough in zfcp_erp_lun_strategy() For some reason the already existing substring "fall through" in the comment is not sufficient for GCC to silence -Wimplicit-fallthrough. CC [M] drivers/s390/scsi/zfcp_erp.o drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_lun_strategy': drivers/s390/scsi/zfcp_erp.c:1065:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN) ^ drivers/s390/scsi/zfcp_erp.c:1068:2: note: here case ZFCP_ERP_STEP_LUN_CLOSING: ^~~~ Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 623cd180c10c5bec815a46c4ce73c8c148d2f518 Author: Steffen Maier Date: Thu Nov 8 15:44:55 2018 +0100 scsi: zfcp: silence remaining kdoc warnings in header files Improve whatever the following simple invocation reported: $ ./scripts/kernel-doc -none drivers/s390/scsi/*.h While at it, improve some related kdoc, including struct zfcp_fsf_ct_els in zfcp_fsf.h. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 8684d61481e2de0599fa12c184f066f7d19955ff Author: Steffen Maier Date: Thu Nov 8 15:44:54 2018 +0100 scsi: zfcp: silence all W=1 build warnings for existing kdoc While at it also improve some copy & paste kdoc mistakes. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit e0effe893514c9d25cc84998fe74fe69f9be7dd8 Author: Steffen Maier Date: Thu Nov 8 15:44:53 2018 +0100 scsi: zfcp: properly format LUN (and WWPN) for LUN sharing violation kmsg zfcp: : LUN 0x0 on port 0x5005076......... ... zfcp: : LUN 0x1000000000000 on port 0x5005076......... ... should be zfcp: : LUN 0x0000000000000000 on port 0x5005076......... ... zfcp: : LUN 0x0001000000000000 on port 0x5005076......... is already in use by CSS., MIF Image ID . Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit d5fcdced311bf51a587b26b36e568eb1b640fbc9 Author: Steffen Maier Date: Thu Nov 8 15:44:52 2018 +0100 scsi: zfcp: use enum zfcp_erp_act_result for argument/return of affected functions With that instead of just "int" it becomes clear which functions return this type and which ones also accept it as argument they just pass through in some cases or modify in other cases. v2.6.27 commit 287ac01acf22 ("[SCSI] zfcp: Cleanup code in zfcp_erp.c") introduced the enum which was cpp defines previously. Silence some false -Wswitch compiler warning cases with individual NOP cases. When adding more enum values and building with W=1 we would get compiler warnings about missed new cases. Consistently use the variable name "result", so change "retval" in zfcp_erp_strategy() to "result". This avoids confusion with other compile unit variables "retval" having different semantics and type. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 0023beece0c73bc11c1e2827c3de5bbbb66b4542 Author: Steffen Maier Date: Thu Nov 8 15:44:51 2018 +0100 scsi: zfcp: use enum zfcp_erp_steps for struct zfcp_erp_action.step Use the already defined enum for this purpose to get at least some build checking (even though an enum is type equivalent to an int in C). v2.6.27 commit 287ac01acf22 ("[SCSI] zfcp: Cleanup code in zfcp_erp.c") introduced the enum which was cpp defines previously. Since struct zfcp_erp_action type is embedded into other structures living in zfcp_def.h, we have to move enum zfcp_erp_act_type from its private definition in zfcp_erp.c to the zfcp-global zfcp_def.h Silence some false -Wswitch compiler warning cases with individual NOP cases. When adding more enum values and building with W=1 we would get compiler warnings about missed new cases. Add missing break statements in some of the above switch cases. No functional change, but making it future-proof. I think all of these should have had a break statement ever since, even if these switch cases happened to be the last ones in the switch statement body. "Fall through" in the context of switch case usually means not to have a break and fall through to the subsequent switch case. However, I think this old comment meant that here we do not have an _early return_ in the switch case but the code path continues after the switch case body. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit df91eefd080dcd9801145d1c210d3b078cf912b1 Author: Steffen Maier Date: Thu Nov 8 15:44:50 2018 +0100 scsi: zfcp: the action field of zfcp_erp_action is actually the type &zfcp_erp_action.action ==> &zfcp_erp_action.type While at it, make use of the already defined enum for this purpose to get at least some build checking (even though an enum is type equivalent to an int in C). v2.6.27 commit 287ac01acf22 ("[SCSI] zfcp: Cleanup code in zfcp_erp.c") introduced the enum which was cpp defines previously. To prevent compiler warnings with the switch(act->type), we have to separate the recently added eyecatchers from enum zfcp_erp_act_type. Since struct zfcp_erp_action type is embedded into other structures living in zfcp_def.h, we have to move enum zfcp_erp_act_type from its private definition in zfcp_erp.c to the zfcp-global zfcp_def.h. Silence one false -Wswitch compiler warning case: LUNs as the leaves in our object tree do not have any follow-up success recovery. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 208d096154da8457ee73ddbb490d48cb07abcb20 Author: Steffen Maier Date: Thu Nov 8 15:44:49 2018 +0100 scsi: zfcp: clarify function argument name for trace tag string v2.6.30 commit 5ffd51a5e495 ("[SCSI] zfcp: replace current ERP logging with a more convenient version") changed trace record distinguishing from a numerical ID to a 7 character string called "trace tag". While starting to use function arguments with different type and semantics, it did not change the argument name accordingly. v2.6.38 commit ae0904f60fab ("[SCSI] zfcp: Redesign of the debug tracing for recovery actions.") renamed variable names "id" into "tag" but only within zfcp_dbf.*, not within zfcp_erp.c. This was a bit confusing since the remainder of zfcp does use the term "trace tag". Also "id" is quite generic and it's not obvious for what. Just unify it consistently and use the "dbf" prefix to relate the arguments to the code in zfcp_dbf.*. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 64eba38418d85ba7c819f61732bdc014e9523246 Author: Steffen Maier Date: Thu Nov 8 15:44:48 2018 +0100 scsi: zfcp: ERP thread setup kdoc update zfcp_erp_thread_setup() update complements v2.6.32 commit 347c6a965dc1 ("[SCSI] zfcp: Use kthread API for zfcp erp thread"). Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 724e144387f4d7e7668d3da913d0efc44a9b4664 Author: Steffen Maier Date: Thu Nov 8 15:44:47 2018 +0100 scsi: zfcp: update kernel message for invalid FCP_CMND length, it's not the CDB The CDB is just a part inside of FCP_CMND, see zfcp_fc_scsi_to_fcp(). While at it, fix the device driver reaction: adapter not LUN shutdown. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 9704154fa0b20fe76e7a46c902adce88da1a75d6 Author: Steffen Maier Date: Thu Nov 8 15:44:46 2018 +0100 scsi: zfcp: drop duplicate seq_no from zfcp_fsf_req which is also in QTCB header There is no point for double bookkeeping especially just for tracing. The trace can take it from the QTCB which always exists for non-SRB responses traced with zfcp_dbf_hba_fsf_res(). As a side effect, this removes an alignment hole and reduces the size of struct zfcp_fsf_req, and thus of each pending request, by 8 bytes. Before: $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko ... struct fsf_qtcb * qtcb; /* 144 8 */ u32 seq_no; /* 152 4 */ /* XXX 4 bytes hole, try to pack */ void * data; /* 160 8 */ ... /* size: 296, cachelines: 2, members: 14 */ /* sum members: 288, holes: 2, sum holes: 8 */ /* last cacheline: 40 bytes */ After: $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko ... struct fsf_qtcb * qtcb; /* 144 8 */ void * data; /* 152 8 */ ... /* size: 288, cachelines: 2, members: 13 */ /* sum members: 284, holes: 1, sum holes: 4 */ Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit f9eca022760079c0556cb311e3aa9091a3921a31 Author: Steffen Maier Date: Thu Nov 8 15:44:45 2018 +0100 scsi: zfcp: drop duplicate fsf_command from zfcp_fsf_req which is also in QTCB header Status read buffers (SRBs, unsolicited notifications) never use a QTCB [zfcp_fsf_req_create()]. zfcp_fsf_req_send() already uses this to distinguish SRBs from other FSF request types. We can re-use this method in zfcp_fsf_req_complete(). Introduce a helper function to make the check for req->qtcb less magic. SRBs always are FSF_QTCB_UNSOLICITED_STATUS, so we can hard-code this for the two trace functions dealing with SRBs. All other FSF request types have a QTCB and we can get the fsf_command from there. zfcp_dbf_hba_fsf_response() and thus zfcp_dbf_hba_fsf_res() are only called for non-SRB requests so it's safe to dereference the QTCB [zfcp_fsf_req_complete() returns early on SRB, else calls zfcp_fsf_protstatus_eval() which calls zfcp_dbf_hba_fsf_response()]. In zfcp_scsi_forget_cmnd() we guard the QTCB dereference with a preceding NULL check and rely on boolean shortcut evaluation. As a side effect, this causes an alignment hole which we can close in a later patch after having cleaned up all fields of struct zfcp_fsf_req. Before: $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko ... u32 status; /* 136 4 */ u32 fsf_command; /* 140 4 */ struct fsf_qtcb * qtcb; /* 144 8 */ ... After: $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko ... u32 status; /* 136 4 */ /* XXX 4 bytes hole, try to pack */ struct fsf_qtcb * qtcb; /* 144 8 */ ... Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 2c53d8a0cce4f8490a1829867930b519e65db2b4 Author: Steffen Maier Date: Thu Nov 8 15:44:44 2018 +0100 scsi: zfcp: drop unnecessary forward prototype for struct zfcp_fsf_req Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 21cb0bcc739a3e744d4ce54dac625b68e6cb2cc4 Author: Steffen Maier Date: Thu Nov 8 15:44:43 2018 +0100 scsi: zfcp: group sort internal structure definitions for proximity Have structures just before the structures that use them (without disrupting sequences of using structures such as zfcp_unit and zfcp_scsi_dev): - zfcp_adapter_mempool embedded in zfcp_adapter, - zfcp_latenc... embedded in zfcp_scsi_dev. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit eb67f93ffa7c3c8c9fbaa9b40d036539cba9879c Author: Steffen Maier Date: Thu Nov 8 15:44:42 2018 +0100 scsi: zfcp: namespace prefix for internal latency data structures In contrast to struct fsf_qual_latency_info, the ones here are not FSF but software defined zfcp-internal. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit e0c1da39d7bdfd06474f7aba5990304a33bbe3be Author: Steffen Maier Date: Thu Nov 8 15:44:41 2018 +0100 scsi: zfcp: update width in comment for ZFCP_COMMON_FLAGS mask v2.6.10 history commit 4062e12b2ba2 ("[PATCH] s390: zfcp act enhancements") extended this mask by one nibble with the introduction of ZFCP_STATUS_COMMON_ACCESS_DENIED == 0x00800000 for ACT (access control table). Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit a0e86d95558435670ce0616d031ba18aff6e4cd5 Author: Steffen Maier Date: Thu Nov 8 15:44:40 2018 +0100 scsi: zfcp: move scsi_eh & non-ERP timeout defines owned by and local to zfcp_fsf.c Also clarify namespace prefix for the timeout used for FSF requests on behalf of SCSI error recovery: It is zfcp_fsf_ not zfcp_scsi_. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit c24635acce1e875838d4bc5aae1da27e4e5ced23 Author: Steffen Maier Date: Thu Nov 8 15:44:39 2018 +0100 scsi: zfcp: drop unnecessary forward prototype for struct zfcp_reqlist While struct zfcp_adapter contains a pointer to zfcp_reqlist, the pointer field does not need to know the structure or even a prototype. The prototype was introduced with v2.6.34 commit b6bd2fb92a7b ("[SCSI] zfcp: Move FSF request tracking code to new file"). Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 58f3ead54752a083be6faaec270b5c4c39105c7e Author: Steffen Maier Date: Thu Nov 8 15:44:38 2018 +0100 scsi: zfcp: move SG table helper from aux to fc and make them static Since commit 663e0890e31c ("[SCSI] zfcp: remove access control tables interface") these helper functions are only used for auto port scan in zfcp_fc.c. Also change them to the corresponding namespace prefix. This is a small cleanup for the miscellaneous catchall compile unit zfcp_aux.c. Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 6be552276e3cc0a04d734dc93cb837e64b6d9e33 Author: zhong jiang Date: Thu Nov 8 15:44:37 2018 +0100 scsi: zfcp: remove unnecessary null pointer check before mempool_destroy mempool_destroy has taken null pointer check into account. so remove the redundant check. Signed-off-by: zhong jiang Acked-by: Benjamin Block [maier@linux.ibm.com: depends on v4.3 4e3ca3e033d1 ("mm/mempool: allow NULL `pool' pointer in mempool_destroy()")] Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen commit 340cda67ed80d976c6bec143979cb34bef4c9c85 Author: Martin Blumenstingl Date: Sun Oct 28 15:03:43 2018 +0100 ARM: dts: meson8b: mxq: add the /chosen/stdout-path property Support for this board is currently very limited. To debug any potential issues on this board the "earlycon" kernel parameter can be used (without any arguments). However, this requires the board to define a /chosen/stdout-path property in it's .dts. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 96392c3d8ca47f6654dfa40680c926b1a3419754 Author: Linus Walleij Date: Thu Nov 15 09:01:19 2018 +0100 regulator: max77686: Pass descriptor instead of GPIO number Instead of passing a global GPIO number, pass a descriptor looked up from the device tree configuration node. Tested on Odroid U3 (with max77686 although not using any GPIOs for regulators, so at least default paths are not broken). Cc: Chanwoo Choi Cc: Krzysztof Kozlowski Cc: Bartlomiej Zolnierkiewicz Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 42196c98a965bcf9bc7c14e58d52b7ac026b9655 Author: Martin Blumenstingl Date: Sun Oct 28 15:03:42 2018 +0100 ARM: dts: meson8: minix-neo-x8: add the /chosen/stdout-path property Support for this board is currently very limited. To debug any potential issues on this board the "earlycon" kernel parameter can be used (without any arguments). However, this requires the board to define a /chosen/stdout-path property in it's .dts. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 1d2f46814d20a55c45ac171739b6885826e0c793 Author: Linus Walleij Date: Thu Nov 15 09:01:18 2018 +0100 regulator: wm8994: Pass descriptor instead of GPIO number Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up from the device tree node or the board file decriptor table for the regulator. There is a single board file passing the GPIOs for LDO1 and LDO2 through platform data, so augment this to pass descriptors associated with the i2c device as well. The special GPIO enable DT property for the enable GPIO is nonstandard but this was accomodated in commit 6a537d48461deacc57c07ed86d9915e5aa4b3539 "gpio: of: Support regulator nonstandard GPIO properties". Cc: patches@opensource.cirrus.com Acked-by: Charles Keepax Acked-by: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 51152f65bb89b6c2bfd335c514a58d9035c08fc0 Author: Martin Blumenstingl Date: Sun Oct 28 15:03:41 2018 +0100 ARM: dts: meson6: atv1200: add the /chosen/stdout-path property Support for Meson6 SoCs is currently very limited. It's often unclear why such a device does not boot. To debug this the "earlycon" kernel parameter can be used (without any arguments). However, this requires the board to define a /chosen/stdout-path property in it's .dts. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 6ab6dfa6bb500f5cbb9b7a0f23a1613417ca2d12 Author: Cong Wang Date: Mon Nov 12 16:17:00 2018 -0800 net: get rid of __tcp_checksum_complete() __tcp_checksum_complete() is 100% same with __skb_checksum_complete() and there is no other caller except tcp_checksum_complete(). So, just use __skb_checksum_complete() there. Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 1c984942f0a480ed41635528234b8bc672f6bac7 Author: Linus Walleij Date: Thu Nov 15 09:01:17 2018 +0100 regulator: s2mps11: Pass descriptor instead of GPIO number Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up with the standard devm_gpiod_get_optional() call. This regulator supports passing platform data, but enable/sleep regulators are looked up from the device tree exclusively, so we can need not touch other files. Tested on Odroid XU3 (with s2mps11 although not using any GPIOs for regulators, so at least default paths are not broken). Cc: Sangbeom Kim Cc: Chanwoo Choi Cc: Bartlomiej Zolnierkiewicz Cc: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit 5c72299fba9df407c2f2994e194edebf878996ee Author: Amritha Nambiar Date: Mon Nov 12 16:15:55 2018 -0800 net: sched: cls_flower: Classify packets using port ranges Added support in tc flower for filtering based on port ranges. Example: 1. Match on a port range: ------------------------- $ tc filter add dev enp4s0 protocol ip parent ffff:\ prio 1 flower ip_proto tcp dst_port range 20-30 skip_hw\ action drop $ tc -s filter show dev enp4s0 parent ffff: filter protocol ip pref 1 flower chain 0 filter protocol ip pref 1 flower chain 0 handle 0x1 eth_type ipv4 ip_proto tcp dst_port range 20-30 skip_hw not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 installed 85 sec used 3 sec Action statistics: Sent 460 bytes 10 pkt (dropped 10, overlimits 0 requeues 0) backlog 0b 0p requeues 0 2. Match on IP address and port range: -------------------------------------- $ tc filter add dev enp4s0 protocol ip parent ffff:\ prio 1 flower dst_ip 192.168.1.1 ip_proto tcp dst_port range 100-200\ skip_hw action drop $ tc -s filter show dev enp4s0 parent ffff: filter protocol ip pref 1 flower chain 0 handle 0x2 eth_type ipv4 ip_proto tcp dst_ip 192.168.1.1 dst_port range 100-200 skip_hw not_in_hw action order 1: gact action drop random type none pass val 0 index 2 ref 1 bind 1 installed 58 sec used 2 sec Action statistics: Sent 920 bytes 20 pkt (dropped 20, overlimits 0 requeues 0) backlog 0b 0p requeues 0 v4: 1. Added condition before setting port key. 2. Organized setting and dumping port range keys into functions and added validation of input range. v3: 1. Moved new fields in UAPI enum to the end of enum. 2. Removed couple of empty lines. v2: Addressed Jiri's comments: 1. Added separate functions for dst and src comparisons. 2. Removed endpoint enum. 3. Added new bit TCA_FLOWER_FLAGS_RANGE to decide normal/range lookup. 4. Cleaned up fl_lookup function. Signed-off-by: Amritha Nambiar Signed-off-by: David S. Miller commit 200858bbb64294882606c8a7332c4994555ee65d Author: John Garry Date: Thu Nov 15 18:20:32 2018 +0800 scsi: libsas: Remove pcidev reference Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 15ba7806c316ce88d45db7d12d32380f53c01a06 Author: John Garry Date: Thu Nov 15 18:20:31 2018 +0800 scsi: libsas: Drop SAS_DPRINTK() and revise logs levels Like sas_printk() did previously, SAS_DPRINTK() offers little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt). So it can be dropped. However, after reviewing some logs in libsas, it is noticed that debug level is too low in many instances. So this change drops SAS_DPRINTK() and revises some logs to a more appropriate level. However many stay at debug level, although some are significantly promoted. We add -DDEBUG for compilation so that we keep the debug messages by default, as before. All the pre-existing checkpatch errors for spanning messages across multiple lines are also fixed. Finally, all other references to printk() [apart from special formatting in sas_ata.c] are removed and replaced with appropriate pr_xxx(). Suggested-by: Joe Perches Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 71a4a9923122091be1167bac9379d5d1cfdb1153 Author: John Garry Date: Thu Nov 15 18:20:30 2018 +0800 scsi: libsas: Drop sas_printk() The printk wrapper sas_printk() adds little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt), so just use pr_notice() directly. In addition, strings which span multiple lines are reunited. Originally-from: Joe Perches Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit d188e5db9d274db4c183861438f883c1d74b0f16 Author: John Garry Date: Thu Nov 15 18:20:29 2018 +0800 scsi: libsas: Use pr_fmt(fmt) In preparation for dropping the libsas printk wrappers, use pr_fmt(fmt) declaration to add the framework log prefix - "sas". Suggested-by: Joe Perches Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 1399846d4b99cbb945362c9867709fe7613d30fd Author: John Garry Date: Thu Nov 15 18:20:28 2018 +0800 scsi: libsas: Delete sas_dump.{c, h} The code in these files is not longer referenced, so delete them. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 15bc43f31a074076f114e0b87931e3b220b7bff1 Author: Xiang Chen Date: Fri Nov 9 22:06:36 2018 +0800 scsi: hisi_sas: change the time of SAS SSP connection Currently the time of SAS SSP connection is 1ms, which means the link connection will fail if no IO response after this period. For some disks handling large IO (such as 512k), 1ms is not enough, so change it to 5ms. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 745b6847634c11dda1079d0290781a443eddb4b7 Author: Xiang Chen Date: Fri Nov 9 22:06:35 2018 +0800 scsi: hisi_sas: Relocate some codes to avoid an unused check In function hisi_sas_task_prep(), we check asd_sas_port, but in function hisi_sas_task_exec(), we already refer to asd_sas_port by using function dev_to_hisi_hba() implicitly. So to avoid this possible invalid dereference, relocate the check to function hisi_sas_task_prep(). Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 37359798ec44ae03fab383a9bef3b7c9df819063 Author: Xiang Chen Date: Fri Nov 9 22:06:34 2018 +0800 scsi: hisi_sas: Add support for interrupt coalescing for v3 hw If INT_COAL_EN is enabled, configure time and count of interrupt coalescing. Then if CQ collects count of CQ entries in time, it will report the interrupt. Or if CQ doesn't collect enough CQ entries in time, it will report the interrupt at timeout. As all the registers are not supported to be changed dynamically, we need to config those register between disable and enable PHYs. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 488cf558e3d7c95daf737d9cae165019ee3f2840 Author: Xiang Chen Date: Fri Nov 9 22:06:33 2018 +0800 scsi: hisi_sas: Add support for interrupt converge for v3 hw If CQ_INT_CONVERGE_EN is enabled, the interrupts of all the 16 CQ queues will be reported by CQ0. So we need to change the process of CQ tasklet for this situation. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit c3566f9a617de3288739fd3b8e7539951bf2b04d Author: Xiang Chen Date: Fri Nov 9 22:06:32 2018 +0800 scsi: hisi_sas: Create separate host attributes per HBA Currently all the three HBA (v1/v2/v3 HW) share the same host attributes. To support each HBA having separate attributes in future, create per-HBA attributes. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 7fe50ac83f4319c18ed7c634d85cad16bd0bf509 Author: Cong Wang Date: Mon Nov 12 14:47:18 2018 -0800 net: dump more useful information in netdev_rx_csum_fault() Currently netdev_rx_csum_fault() only shows a device name, we need more information about the skb for debugging csum failures. Sample output: ens3: hw csum failure dev features: 0x0000000000014b89 skb len=84 data_len=0 pkt_type=0 gso_size=0 gso_type=0 nr_frags=0 ip_summed=0 csum=0 csum_complete_sw=0 csum_valid=0 csum_level=0 Note, I use pr_err() just to be consistent with the existing one. Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit e81a2a6d12e85fbd7b19e96ad72b82a3cc8a6b2d Author: Cheng-Yi Chiang Date: Thu Nov 15 12:13:34 2018 +0800 ASoC: rt5663: Add regulator support Add regulator support to turn on cpvdd and avdd in probe. If a regulator is not given from device tree, a dummy regulator will be used. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Mark Brown commit bf897b441bd3afdd43e19605df4fb5a105678664 Author: Adrien Charruel Date: Wed Nov 14 13:16:41 2018 +0100 ASoC: ak4118: Add support for AK4118 S/PDIF transceiver The AK4118A is a digital audio transceiver supporting 8 input channels at 192kHz and with 24bits resolution. It converts the S/PDIF signal to I2S format and is configurable over I2C. This driver introduce a minimal support of the AK4118, like selecting the input channel, reading input frequency and detecting some errors. Datasheet is available here: https://www.akm.com/akm/en/file/datasheet/AK4118AEQ.pdf Signed-off-by: Adrien Charruel Signed-off-by: Clément Péron Signed-off-by: Mark Brown commit e815f404afdb70beefe2ffd0d767bf3785985869 Author: Jens Axboe Date: Thu Nov 15 12:31:27 2018 -0700 block: add wbt_disable_default export for BFQ This isn't unused, if BFQ is modular we get into trouble. Fixes: b6676f653f13 ("block: remove a few unused exports") Signed-off-by: Jens Axboe commit ddc49acb659a2d8bfc5fdb0de0ef197712c11d75 Author: Andrew Lunn Date: Mon Nov 12 18:51:01 2018 +0100 net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2 We already have a workaround for a couple of switches whose internal PHYs only have the Marvel OUI, but no model number. We detect such PHYs and give them the 6390 ID as the model number. However the mv88e6161 has two SERDES interfaces in the same address range as its internal PHYs. These suffer from the same problem, the Marvell OUI, but no model number. As a result, these SERDES interfaces were getting the same PHY ID as the mv88e6390, even though they are not PHYs, and the Marvell PHY driver was trying to drive them. Add a special case to stop this from happen. Reported-by: Chris Healy Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 8076de2244c6c1bf703c844134bfa13110b16349 Author: Clément Péron Date: Wed Nov 14 13:16:42 2018 +0100 ASoC: dt-bindings: add bindings for AK4118 transceiver Document the bindings for AK4118 S/PDIF transceiver Signed-off-by: Clément Péron Signed-off-by: Mark Brown commit 236bd823fbdd083ed082b39a87c7569b11376074 Author: Christoph Hellwig Date: Fri Nov 9 16:54:06 2018 +0100 scsi: wd719x: always use generic DMA API The wd719x driver currently uses a mix of the legacy PCI DMA and the generic DMA APIs. Switch it over to the generic DMA API entirely. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit fde46e968258500fdf94ab9a450a958e4062174b Author: Christoph Hellwig Date: Fri Nov 9 16:54:05 2018 +0100 scsi: wd719x: use per-command private data Add the SCB onto the scsi command allocation and use dma streaming mappings for it only when in use. This avoid possibly calling dma_alloc_coherent under a lock or even in irq context, while also making the code simpler. Thanks to Ondrej Zary for testing and various bug fixes. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit d9c30dbca7994859d14eef51813454adaff1a9a0 Author: Christoph Hellwig Date: Fri Nov 9 16:54:04 2018 +0100 scsi: wd719x: there should be no active SCBs on removal Warn on that case instead of trying to free them which would be fatal in case we actually had active ones. [mkp: typos] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 4e5598db12843eb5e56d4c376692b34372e81aa8 Author: Christoph Hellwig Date: Thu Oct 18 15:10:24 2018 +0200 scsi: sym53c8xx: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit b5a4ad1db5fd6d1093e415e1949421d65c4a44a0 Author: Christoph Hellwig Date: Thu Oct 18 15:10:23 2018 +0200 scsi: stex: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit bddbd00cb076b1bcd0df19e620ebb79108ae7e58 Author: Christoph Hellwig Date: Thu Oct 18 15:10:22 2018 +0200 scsi: mvumi: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit f30e1bfd61541edfd6fa1622013978e6f9c47564 Author: Christoph Hellwig Date: Thu Oct 18 15:10:21 2018 +0200 scsi: lpfc: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 52f603fee1a5f4bdc398837cc3eff1d3fd0e857d Author: Christoph Hellwig Date: Thu Oct 18 15:10:20 2018 +0200 scsi: isci: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. [mkp: s/iscsi/isci/] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 663b4117d6414fd0e0f9ce72acfebdf9690130ad Author: Christoph Hellwig Date: Thu Oct 18 15:10:19 2018 +0200 scsi: initio: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 453cd3700ca37f759cf975999abb7b5b4347fd85 Author: Christoph Hellwig Date: Thu Oct 18 15:10:18 2018 +0200 scsi: hptiop: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit e4db40e7a1a2cd6af3b6d5f8f3fba15533872398 Author: Christoph Hellwig Date: Thu Oct 18 15:10:17 2018 +0200 scsi: hisi_sas: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig Acked-by: John Garry Signed-off-by: Martin K. Petersen commit fdc32fb38d76f95fa98bc8efa6c3a91e68bab64c Author: Christoph Hellwig Date: Thu Oct 18 15:10:16 2018 +0200 scsi: esas2r: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Also move the dma_get_required_mask check before actually setting the dma mask so that we don't end up with inconsistent settings in corner cases. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit c79cd9a24ef71c5d9b9185a20b387391abaa6cc7 Author: Christoph Hellwig Date: Thu Oct 18 15:10:15 2018 +0200 scsi: dpt_i2o: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Also move the dma_get_required_mask check before actually setting the dma mask, so that we don't end up with inconsistent settings in corner cases. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit a69b080025ea3c7cd15cc91a9188475bce39e921 Author: Christoph Hellwig Date: Thu Oct 18 15:10:14 2018 +0200 scsi: bfa: use dma_set_mask_and_coherent The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API helper and also ensure we set the coherent mask as well in the resume path. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit b3b07762dbda4f4c96eddec3ed8f6ab7ffbf8a7a Author: Christoph Hellwig Date: Thu Oct 18 15:10:13 2018 +0200 scsi: arcmsr: use dma_set_mask The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit f0739e6517dacf8373b513654e45f88c8ac5638e Merge: bd5196b6863d2 ef878d6086611 Author: David S. Miller Date: Thu Nov 15 11:23:30 2018 -0800 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 2018-11-13 This series contains updates to the ice driver only. Brett cleans up debug print messages by removing useless or duplicate messages, and make sure we assign the hardware head pointer to head instead of the software head pointer. Resolved an issue when disabling SRIOV we were trying to stop queues multiple times, so make sure we disable SRIOV before stopping transmit and receive queues for VF. Tony fixes a potential NULL pointer dereference during a VF reset. Anirudh resolves an issue where we were releasing the VSI before removing the VSI scheduler node, which was resulting in an error "Failed to set LAN Tx queue context, error: -1". Also fixed the guaranteed number of VSIs available and used by discovering the device capabilities to determine the 'guar_num_vsi' per function, rather than always using the theoretical max number of VSIs every time. Dave avoids a deadlock by nesting RTNL locking, so added a boolean to determine if the RTNL lock is already held. Lev fixes bad mask values which would break compilation. Piotr increases the receive queue disable timeout since it can take additional time to finish all pending queue requests. Usha resolves an issue of VLAN priority tagged traffic not appearing on all traffic classes, which was causing ETS bandwidth shaping to not work as expected. Henry fixes the reset path to cleanup the old scheduler tree before rebuilding it. Md Fahad removes a unnecessary check which was causing a driver load error on platforms with more than 128 cores. ==================== Signed-off-by: David S. Miller commit 424d5b56d020b750803134cc15bbd4d0addaaee7 Author: YueHaibing Date: Thu Nov 15 01:56:35 2018 +0000 ASoC: amd: remove set but not used variable 'dma_buffer' Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/amd/raven/acp3x-pcm-dma.c: In function 'acp3x_dma_hw_params': sound/soc/amd/raven/acp3x-pcm-dma.c:333:25: warning: variable 'dma_buffer' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 8de1b5ed0337 ("ASoC: amd: add acp3x system resume pm op") Signed-off-by: YueHaibing Signed-off-by: Mark Brown commit 7986e2273c1ed987ff34f1c318d5a2b18e8c0fee Author: kbuild test robot Date: Thu Nov 15 15:11:13 2018 +0800 spi: npcm: fix platform_no_drv_owner.cocci warnings drivers/spi/spi-npcm-pspi.c:470: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 Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") CC: Tomer Maimon Signed-off-by: kbuild test robot Signed-off-by: Mark Brown commit d5a932e541f61a2be1cca7bab1e00d2bf7803e71 Author: Vijendar Mukunda Date: Thu Nov 15 21:43:50 2018 +0530 ASoC: amd: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 1c4fb2457e541c614792e6d9986bc95461e67e41 Author: Vijendar Mukunda Date: Thu Nov 15 21:43:49 2018 +0530 ASoC: amd: Fixed build errors Fixed build errors. - Implicit declaration of pci_enable_msi() & pci_disable_msi() api's for openrisc architecture. - type defaults to 'int' in declaration of 'module_pci_driver' Enabled build for x86 architecture. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Mark Brown commit 6e17f8140521a73844721af8a2ff03ad00519ab8 Author: Vinod Koul Date: Mon Oct 1 11:51:51 2018 +0530 arm64: dts: sdm845: add prng-ee node RNG hardware in SDM845 features (Execution Environment) EE for HLOS to use, add the node for prng-ee for sdm845. Signed-off-by: Vinod Koul Signed-off-by: Andy Gross commit 0d945c1f966b2bcb67bb12be749da0a7fb00201b Author: Christoph Hellwig Date: Thu Nov 15 12:17:28 2018 -0700 block: remove the queue_lock indirection With the legacy request path gone there is no good reason to keep queue_lock as a pointer, we can always use the embedded lock now. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Fixed floppy and blk-cgroup missing conversions and half done edits. Signed-off-by: Jens Axboe commit 6e382cc7ba2931d3e2683787a2d9279e4c31c4df Author: Vinod Koul Date: Mon Oct 1 11:51:50 2018 +0530 arm64: dts: msm8996: add prng-ee node RNG hardware in 8996 features (Execution Environment) EE for HLOS to use, add the node for prng-ee for msm8996. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit 0c8224c34aa82901037e6c5921b692ea1b78fd24 Author: David Lin Date: Thu Nov 15 17:49:13 2018 +0800 ASoC: nau8822: convert to SPDX identifiers This patch fixes typo in the comment. Signed-off-by: David Lin Signed-off-by: Mark Brown commit ba34f253711a8427d2ef29475afe406b2d6e5118 Author: David Lin Date: Thu Nov 15 17:14:47 2018 +0800 ASoC: nau8822: convert to SPDX identifiers This patch updates license to SPDX-License-Identifier instead of verbose license text. Signed-off-by: David Lin Signed-off-by: Mark Brown commit ed22cee91a88c47e564478b012fdbcb079653499 Author: Lubomir Rintel Date: Thu Nov 15 11:12:15 2018 -0800 Input: olpc_apsp - enable the SP clock Without the clock, the keyboard controller won't operate. Tested on an OLPC XO 1.75. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit af518342effd3a89103a37943cdaecbac19d1ae6 Author: Lubomir Rintel Date: Thu Nov 15 11:10:58 2018 -0800 Input: olpc_apsp - check FIFO status on open(), not probe() Let's defer the FIFO status checking until open(). When we'll get a clk handle, this will allow us to defer clock enablement until the device is actually used. Signed-off-by: Lubomir Rintel Signed-off-by: Dmitry Torokhov commit 76d97b0f9c73e651f0691d63872dd7ad00d04256 Author: Lubomir Rintel Date: Thu Nov 15 11:09:26 2018 -0800 Input: olpc_apsp - drop CONFIG_OLPC dependency CONFIG_OLPC is specific to the x86 platform code, while the driver is for an ARM-based laptop. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Dmitry Torokhov commit fc27c2394d96fd19854b7e2d3f0e60df0d86fc90 Author: Lubomir Rintel Date: Thu Nov 15 10:10:24 2018 -0800 clk: mmp2: add SP clock The "security processor", sometimes referred to as "wireless trusted module" or "generic encrypt unit" is a low-power core present on MMP2, that has nothing to do with security, wireless, trust or encryption. On an OLPC machine it runs CForth and serves as a keyboard controller: http://dev.laptop.org/git/users/wmb/cforth/tree/src/app/arm-xo-1.75/ps2.fth The register address was obtained from the OLPC kernel, since the datasheet seems to be the Marvell's most important business secret. Signed-off-by: Lubomir Rintel Acked-by: Stephen Boyd Acked-by: Pavel Machek Signed-off-by: Dmitry Torokhov commit e8a2c779141415105825e65a4715f1130bba61b1 Author: Lubomir Rintel Date: Thu Nov 15 10:09:20 2018 -0800 dt-bindings: marvell,mmp2: Add clock id for the SP clock This is the clock for the "security processor" core. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Acked-by: Stephen Boyd Acked-by: Pavel Machek Signed-off-by: Dmitry Torokhov commit 6d46964230d182c4b6097379738849a809d791dc Author: Christoph Hellwig Date: Wed Nov 14 17:02:18 2018 +0100 block: remove the lock argument to blk_alloc_queue_node With the legacy request path gone there is no real need to override the queue_lock. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 310df020cdd7570e1a8ee43bd58999a743686eda Author: Christoph Hellwig Date: Wed Nov 14 17:02:17 2018 +0100 mmc: stop abusing the request queue_lock pointer mmc uses the block layer struct request pointer to indirect their own lock to the mmc_queue structure, given that the original lock isn't reachable outside of block.c. Add a lock pointer to struct mmc_queue instead and stop overriding the block layer lock which protects fields entirely separate from the mmc use. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b061b326287d45aeaf313f7dddd02e88e31db14b Author: Christoph Hellwig Date: Wed Nov 14 17:02:16 2018 +0100 mmc: simplify queue initialization Merge three functions initializing the queue into a single one, and drop an unused argument for it. Reviewed-by: Ulf Hansson Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 68fc68f2ff620852ee43ee7a2831bc5eeb9472d6 Author: Christoph Hellwig Date: Wed Nov 14 17:02:15 2018 +0100 umem: don't override the queue_lock The umem card->lock and the block layer queue_lock are used for entirely different resources. Stop using card->lock as the block layer queue_lock. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8295a69bdc3cb8707e645f9b2de6f3019a521882 Author: Christoph Hellwig Date: Wed Nov 14 17:02:14 2018 +0100 drbd: don't override the queue_lock The DRBD req_lock and block layer queue_lock are used for entirely different resources. Stop using the req_lock as the block layer queue_lock. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7fb1763de6f8b4d6e7a69a08a14ce5496500f2c5 Author: Christoph Hellwig Date: Wed Nov 14 17:02:13 2018 +0100 blk-cgroup: move locking into blkg_destroy_all Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 04be60b5e4e03fd3d58f7f25b782240a45272fb0 Author: Christoph Hellwig Date: Wed Nov 14 17:02:12 2018 +0100 blk-cgroup: consolidate error handling in blkcg_init_queue Use a goto label to merge two identical pieces of error handling code. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b6676f653f13f83582985bc713525a48d735b2a3 Author: Christoph Hellwig Date: Wed Nov 14 17:02:11 2018 +0100 block: remove a few unused exports Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9809b4eed2cf3718ea160f70693b1714768f9822 Author: Christoph Hellwig Date: Wed Nov 14 17:02:10 2018 +0100 block: update a few comments for the legacy request removal Only the mq locking is left in the flush state machine. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d53375608ebf13c37721cf30677eba4333d18020 Author: Christoph Hellwig Date: Wed Nov 14 17:02:09 2018 +0100 block: remove the unused lock argument to rq_qos_throttle Unused now that the legacy request path is gone. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 373e4af34ec13c17a6b80227c7d5d3719122eb77 Author: Christoph Hellwig Date: Wed Nov 14 17:02:08 2018 +0100 block: remove queue_lockdep_assert_held The only remaining user unconditionally drops and reacquires the lock, which means we really don't need any additional (conditional) annotation. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 57d74df90783f6a6b3e79dfdd2a567ce5db3b790 Author: Christoph Hellwig Date: Wed Nov 14 17:02:07 2018 +0100 block: use atomic bitops for ->queue_flags ->queue_flags is generally not set or cleared in the fast path, and also generally set or cleared one flag at a time. Make use of the normal atomic bitops for it so that we don't need to take the queue_lock, which is otherwise mostly unused in the core block layer now. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 39795d6534c6e698c4f9c065e0a5f4a2e5af7543 Author: Christoph Hellwig Date: Wed Nov 14 17:02:06 2018 +0100 block: don't hold the queue_lock over blk_abort_request There is nothing it could synchronize against, so don't go through the pains of acquiring the lock. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 079076b3416e78ba2bb3ce38e05e320c388c3120 Author: Christoph Hellwig Date: Wed Nov 14 17:02:05 2018 +0100 block: remove deadline __deadline manipulation helpers No users left since the removal of the legacy request interface, we can remove all the magic bit stealing now and make it a normal field. But use WRITE_ONCE/READ_ONCE on the new deadline field, given that we don't seem to have any mechanism to guarantee a new value actually gets seen by other threads. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8f4236d9008b0973a8281256ccfde6913cdec6cb Author: Christoph Hellwig Date: Wed Nov 14 17:02:04 2018 +0100 block: remove QUEUE_FLAG_BYPASS and ->bypass Unused since the removal of the legacy request code. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e4849aff1e169b86c561738daf8ff020e9de1011 Author: Maciej W. Rozycki Date: Tue Nov 13 22:42:44 2018 +0000 MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur The Broadcom SiByte BCM1250, BCM1125, and BCM1125H SOCs have an onchip DRAM controller that supports memory amounts of up to 16GiB, and due to how the address decoder has been wired in the SOC any memory beyond 1GiB is actually mapped starting from 4GiB physical up, that is beyond the 32-bit addressable limit[1]. Consequently if the maximum amount of memory has been installed, then it will span up to 19GiB. Many of the evaluation boards we support that are based on one of these SOCs have their memory soldered and the amount present fits in the 32-bit address range. The BCM91250A SWARM board however has actual DIMM slots and accepts, depending on the peripherals revision of the SOC, up to 4GiB or 8GiB of memory in commercially available JEDEC modules[2]. I believe this is also the case with the BCM91250C2 LittleSur board. This means that up to either 3GiB or 7GiB of memory requires 64-bit addressing to access. I believe the BCM91480B BigSur board, which has the BCM1480 SOC instead, accepts at least as much memory, although I have no documentation or actual hardware available to verify that. Both systems have PCI slots installed for use by any PCI option boards, including ones that only support 32-bit addressing (additionally the 32-bit PCI host bridge of the BCM1250, BCM1125, and BCM1125H SOCs limits addressing to 32-bits), and there is no IOMMU available. Therefore for PCI DMA to work in the presence of memory beyond enable swiotlb for the affected systems. All the other SOC onchip DMA devices use 40-bit addressing and therefore can address the whole memory, so only enable swiotlb if PCI support and support for DMA beyond 4GiB have been both enabled in the configuration of the kernel. This shows up as follows: Broadcom SiByte BCM1250 B2 @ 800 MHz (SB1 rev 2) Board type: SiByte BCM91250A (SWARM) Determined physical RAM map: memory: 000000000fe7fe00 @ 0000000000000000 (usable) memory: 000000001ffffe00 @ 0000000080000000 (usable) memory: 000000000ffffe00 @ 00000000c0000000 (usable) memory: 0000000087fffe00 @ 0000000100000000 (usable) software IO TLB: mapped [mem 0xcbffc000-0xcfffc000] (64MB) in the bootstrap log and removes failures like these: defxx 0000:02:00.0: dma_direct_map_page: overflow 0x0000000185bc6080+4608 of device mask ffffffff bus mask 0 fddi0: Receive buffer allocation failed fddi0: Adapter open failed! IP-Config: Failed to open fddi0 defxx 0000:09:08.0: dma_direct_map_page: overflow 0x0000000185bc6080+4608 of device mask ffffffff bus mask 0 fddi1: Receive buffer allocation failed fddi1: Adapter open failed! IP-Config: Failed to open fddi1 when memory beyond 4GiB is handed out to devices that can only do 32-bit addressing. This updates commit cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32."). References: [1] "BCM1250/BCM1125/BCM1125H User Manual", Revision 1250_1125-UM100-R, Broadcom Corporation, 21 Oct 2002, Section 3: "System Overview", "Memory Map", pp. 34-38 [2] "BCM91250A User Manual", Revision 91250A-UM100-R, Broadcom Corporation, 18 May 2004, Section 3: "Physical Description", "Supported DRAM", p. 23 Signed-off-by: Maciej W. Rozycki [paul.burton@mips.com: Remove GPL text from dma.c; SPDX tag covers it] Signed-off-by: Paul Burton Reviewed-by: Christoph Hellwig Patchwork: https://patchwork.linux-mips.org/patch/21108/ References: cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32.") Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 756d6d836dbfb04a5a486bc2ec89397aa4533737 Author: Maciej W. Rozycki Date: Tue Nov 13 22:42:37 2018 +0000 MIPS: SiByte: Enable ZONE_DMA32 for LittleSur The LittleSur board is marked for high memory support and therefore clearly must provide a way to have enough memory installed for some to be present outside the low 4GiB physical address range. With the memory map of the BCM1250 SOC it has been built around it means over 1GiB of actual DRAM, as only the first 1GiB is mapped in the low 4GiB physical address range[1]. Complement commit cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32.") then and also enable ZONE_DMA32 for LittleSur. References: [1] "BCM1250/BCM1125/BCM1125H User Manual", Revision 1250_1125-UM100-R, Broadcom Corporation, 21 Oct 2002, Section 3: "System Overview", "Memory Map", pp. 34-38 Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Reviewed-by: Christoph Hellwig Patchwork: https://patchwork.linux-mips.org/patch/21107/ Fixes: cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32.") Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 3747b9d6b0651c3d4b313778fd57a70396112cb8 Author: Maciej W. Rozycki Date: Tue Nov 13 22:42:30 2018 +0000 MIPS: SiByte: Set 32-bit bus mask for BCM1250 PCI The Broadcom SiByte BCM1250, BCM1125H and BCM1125 SOCs have an onchip 32-bit PCI host bridge, and the two former SOCs also have an onchip HT host bridge. The HT host bridge, where present, appears in the PCI configuration space as if it was a device on the 32-bit PCI bus behind the PCI host bridge, however at the hardware level its signals are routed separately, so these two devices are actually peer host bridges. As documented[1] and observed in reality the 32-bit PCI host bridge does not support 64-bit addressing as it does not support the Dual Address Cycle (DAC) PCI command, and naturally, being 32-bit only, it has no means to carry the high 32 address bits otherwise. However the DRAM controller also included in the SOC supports memory amounts of up to 16GiB, and due to how the address decoder has been wired in the SOC any memory beyond 1GiB is actually mapped starting from 4GiB physical up, that is beyond the 32-bit addressable limit. Consequently if the maximum amount of memory has been installed, then it will span up to 19GiB. Contrariwise, the HT host bridge does support full 40-bit addressing defined by the HyperTransport (formerly LDT) specification the bridge adheres to, depending on the peripherals revision of the SOC[2] either revision 0.17[3] or revision 1.03[4]. This allows addressing any and all memory installed, and well beyond. Set the bus mask then to limit DMA addressing to 32 bits for all the devices down the 32-bit PCI host bridge, excluding however any devices that are down the HT host bridge. References: [1] "BCM1250/BCM1125/BCM1125H User Manual", Revision 1250_1125-UM100-R, Broadcom Corporation, 21 Oct 2002, Section 8: "PCI Bus and HyperTransport Fabric", "Introduction", p. 190 [2] same, Table 140: "HyperTransport Configuration Header (Type 1)", p. 245 [3] "Lightning Data Transport IO Specification", Revision 0.17, Advanced Micro Devices, 21 Jan 2000, Section 3.2.1.2 "Command Packet", p. 8 [4] "HyperTransport I/O Link Specification", Revision 1.03, HyperTransport Technology Consortium, 10 Oct 2001, Section 3.2.1.2 "Request Packet", pp. 27-28 Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Reviewed-by: Christoph Hellwig Patchwork: https://patchwork.linux-mips.org/patch/21106/ Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 1be7aa9b6eb91975800b880481f077c01ae01a26 Author: Linus Walleij Date: Thu Nov 15 09:48:18 2018 -0800 Input: ad7879 - drop platform data support This driver supports configuration via platform data but absolutely nothing in the upstream kernel uses it. Since this configuration allows harmful practices such as encoding the GPIO base for the chip, delete platform data support so that no new platform using it gets introduced. Also: include the right driver header, not . Signed-off-by: Linus Walleij Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov commit bd5196b6863d20ca602a665abd39c4e3f1b1d121 Merge: ba2f55b06826f a6d53b97a2e7a Author: David S. Miller Date: Thu Nov 15 09:44:46 2018 -0800 Merge branch 'hns3-hwgro' Salil Mehta says: ==================== net: hns3: Add support of hardware GRO to HNS3 Driver This patch-set adds support of hardware assisted GRO feature to HNS3 driver on Rev B(=0x21) platform. Current hardware only supports TCP/IPv{4|6} flows. Change Log: V1->V2: 1. Remove redundant print reported by Leon Romanovsky. Link: https://lkml.org/lkml/2018/11/13/715 ==================== Signed-off-by: David S. Miller commit a6d53b97a2e7a70220658dcb3ca06206867a393e Author: Peng Li Date: Thu Nov 15 09:29:25 2018 +0000 net: hns3: Adds GRO params to SKB for the stack When HW GRO enable, protocol stack will not do GRO again, driver should add gro param to the skb for the protocol stack.. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 81ae0e0491f31775d086e24a7cd2a4a4ec29f346 Author: Peng Li Date: Thu Nov 15 09:29:24 2018 +0000 net: hns3: Add skb chain when num of RX buf exceeds MAX_SKB_FRAGS MAX_SKB_FRAGS in protocol stack is defined as: MAX_SKB_FRAGS is 17 when PAGE_SIZE is 4K. If HW enable GRO, it may merge small packets and the rx buffer may be more than MAX_SKB_FRAGS. So driver will add skb chain when RX buffer num. more than MAX_SKB_FRAGS. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit 5c9f6b3935f808afdabac560250bcf4333311efc Author: Peng Li Date: Thu Nov 15 09:29:23 2018 +0000 net: hns3: Add support for ethtool -K to enable/disable HW GRO This patch adds support of ethtool -K to enable/disable hardware GRO in HNS3 PF/VF driver. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit e5597095055622c248c2f5135a5328f86ac6bb14 Author: Peng Li Date: Thu Nov 15 09:29:22 2018 +0000 net: hns3: Add handling of GRO Pkts not fully RX'ed in NAPI poll The "FE bit" in the description means the last description for a packets. When HW GRO enable, HW write data to ring every packet/buffer, there is greater probability that driver handle with the describtion but HW still not set the "FE bit". When drier handle the packet and HW still not set "FE bit", driver stores skb and bd_num in rx ring, and continue to use the skb and bd_num in next napi. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit b26a6fea229885e98e9383c53b5c5dcfc45f76d8 Author: Peng Li Date: Thu Nov 15 09:29:21 2018 +0000 net: hns3: Enable HW GRO for Rev B(=0x21) HNS3 hardware HNS3 hardware Revision B(=0x21) supports Hardware GRO feature. This patch enables this feature in the HNS3 PF/VF driver. Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit ba2f55b06826fb51f15e3cb04b4457be5f66e0ef Author: Heiner Kallweit Date: Sun Nov 11 21:49:12 2018 +0100 net: phy: icplus: add config_intr callback Move IRQ configuration for IP101A/G from config_init to config_intr callback. Reasons: 1. This allows phylib to disable interrupts if needed. 2. Icplus was the only driver supporting interrupts w/o defining a config_intr callback. Now we can add a phylib plausibility check disabling interrupt mode if one of the two irq-related callbacks isn't defined. I don't own hardware with this PHY, and the change is based on the datasheet for IP101A LF (which is supposed to be register-compatible with IP101A/G). Change is compile-tested only. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8fc6ed9a3508a0435b9270c313600799d210d319 Author: David Teigland Date: Thu Nov 15 11:17:40 2018 -0600 dlm: fix missing idr_destroy for recover_idr Which would leak memory for the idr internals. Signed-off-by: David Teigland commit 39aa6928d462d0f4fd809ff8109f98f24843b28b Author: Florian Westphal Date: Thu Nov 15 02:51:57 2018 +0100 xfrm: policy: fix netlink/pf_key policy lookups Colin Ian King says: Static analysis with CoverityScan found a potential issue [..] It seems that pointer pol is set to NULL and then a check to see if it is non-null is used to set pol to tmp; howeverm this check is always going to be false because pol is always NULL. Fix this and update test script to catch this. Updated script only: ./xfrm_policy.sh ; echo $? RTNETLINK answers: No such file or directory FAIL: ip -net ns3 xfrm policy get src 10.0.1.0/24 dst 10.0.2.0/24 dir out RTNETLINK answers: No such file or directory [..] PASS: policy before exception matches PASS: ping to .254 bypassed ipsec tunnel PASS: direct policy matches PASS: policy matches 1 Fixes: 6be3b0db6db ("xfrm: policy: add inexact policy search tree infrastructure") Reported-by: Colin Ian King Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 7759d6a837edf3e2cc627d3bd7167c6fec637d64 Author: Colin Ian King Date: Tue Nov 13 14:28:42 2018 +0000 xfrm: policy: add missing indentation There is a missing indentation before the goto statement. Add it. Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert commit 4fc735d934ef8afb2f12d19293e3418d14ba6ba2 Author: Colin Ian King Date: Tue Nov 13 14:23:28 2018 +0000 af_key: fix indentation on declaration statement There is an indentation issue before the declaration of xfrm_ctx. Remove spaces and replace with a tab. Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert commit 21d808405fe49028036932dd969920f4fee4f481 Author: Fabrizio Castro Date: Tue Nov 6 11:52:36 2018 +0000 drm/bridge/sii902x: Fix EDID readback While adding SiI9022A support to the iwg23s board, it came up that when the HDMI transmitter is in pass through mode the device is not compliant with the I2C specification anymore, as it requires a far bigger tbuf, due to a delay the HDMI transmitter is adding when relaying the STOP condition on the monitor i2c side of things. When not providing an appropriate delay after the STOP condition the i2c bus would get stuck. Also, any other traffic on the bus while talking to the monitor may cause the transaction to fail or even cause issues with the i2c bus as well. I2c-gates seemed to reach consent as a possible way to address these issues, and as such this patch is implementing a solution based on that. Since others are clearly relying on the current implementation of the driver, this patch won't require any DT changes. Since we don't want any interference during the DDC Bus Request/Grant procedure and while talking to the monitor, we have to use the adapter locking primitives rather than the i2c-mux locking primitives. Signed-off-by: Fabrizio Castro Reviewed-by: Peter Rosin Acked-by: Linus Walleij Tested-by: Yannick Fertré Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/1541505156-8097-1-git-send-email-fabrizio.castro@bp.renesas.com commit d6f7aa9820f21a879af8ceda17b2ebd1cf4beb25 Author: Eric Biggers Date: Wed Nov 14 16:12:14 2018 -0800 fsnotify/fdinfo: include fdinfo.h for inotify_show_fdinfo() inotify_show_fdinfo() is defined in fs/notify/fdinfo.c and declared in fs/notify/fdinfo.h, but the declaration isn't included at the point of the definition. Include the header to enforce that the definition matches the declaration. This addresses a gcc warning when -Wmissing-prototypes is enabled. Signed-off-by: Eric Biggers Signed-off-by: Jan Kara commit 3e159b9553e4024cbdaa25bb8059f79f47c26925 Author: Chengguang Xu Date: Thu Nov 15 14:40:08 2018 +0800 ext2: change reusable parameter to true when calling mb_cache_entry_create() Reusable parameter of mb_cache_entry_create() is bool type, so it's better to set true instead of 1. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit d47b41aceeadc6b58abc9c7c6485bef7cfb75636 Author: Vasily Averin Date: Thu Nov 15 13:18:56 2018 +0300 dlm: memory leaks on error path in dlm_user_request() According to comment in dlm_user_request() ua should be freed in dlm_free_lkb() after successful attach to lkb. However ua is attached to lkb not in set_lock_args() but later, inside request_lock(). Fixes 597d0cae0f99 ("[DLM] dlm: user locks") Cc: stable@kernel.org # 2.6.19 Signed-off-by: Vasily Averin Signed-off-by: David Teigland commit c0174726c3976e67da8649ac62cae43220ae173a Author: Vasily Averin Date: Thu Nov 15 13:18:24 2018 +0300 dlm: lost put_lkb on error path in receive_convert() and receive_unlock() Fixes 6d40c4a708e0 ("dlm: improve error and debug messages") Cc: stable@kernel.org # 3.5 Signed-off-by: Vasily Averin Signed-off-by: David Teigland commit 23851e978f31eda8b2d01bd410d3026659ca06c7 Author: Vasily Averin Date: Thu Nov 15 13:18:18 2018 +0300 dlm: possible memory leak on error path in create_lkb() Fixes 3d6aa675fff9 ("dlm: keep lkbs in idr") Cc: stable@kernel.org # 3.1 Signed-off-by: Vasily Averin Signed-off-by: David Teigland commit b982896cdb6e6a6b89d86dfb39df489d9df51e14 Author: Vasily Averin Date: Thu Nov 15 13:15:05 2018 +0300 dlm: fixed memory leaks after failed ls_remove_names allocation If allocation fails on last elements of array need to free already allocated elements. v2: just move existing out_rsbtbl label to right place Fixes 789924ba635f ("dlm: fix race between remove and lookup") Cc: stable@kernel.org # 3.6 Signed-off-by: Vasily Averin Signed-off-by: David Teigland commit 7a30423a95a11ac474115f07cba7f6071f75ff81 Author: Joerg Roedel Date: Fri Nov 9 12:07:12 2018 +0100 vfio/type1: Remove map_try_harder() code path The AMD IOMMU driver can now map a huge-page where smaller mappings existed before, so this code-path is no longer triggered. Acked-by: Alex Williamson Signed-off-by: Joerg Roedel commit 6f820bb995b657ad69197679b4d626cf226bfd35 Author: Joerg Roedel Date: Fri Nov 9 12:07:11 2018 +0100 iommu/amd: Allow to upgrade page-size Before this patch the iommu_map_page() function failed when it tried to map a huge-page where smaller mappings existed before. With this change the page-table pages of the old mappings are teared down, so that the huge-page can be mapped. Signed-off-by: Joerg Roedel commit 9db034d57a8b3cd0aa135a725849cd55a3b2f991 Author: Joerg Roedel Date: Fri Nov 9 12:07:10 2018 +0100 iommu/amd: Restart loop if cmpxchg64 succeeded in alloc_pte() This makes sure that __pte always contains the correct value when the pointer to the next page-table level is derived. Signed-off-by: Joerg Roedel commit 6d568ef9a622eaaea549b305b7af9c4d91566c84 Author: Joerg Roedel Date: Fri Nov 9 12:07:09 2018 +0100 iommu/amd: Allow downgrading page-sizes in alloc_pte() Before this patch it was not possible the downgrade a mapping established with page-mode 7 to a mapping using smaller page-sizes, because the pte_level != level check prevented that. Treat page-mode 7 like a non-present mapping and allow to overwrite it in alloc_pte(). Signed-off-by: Joerg Roedel commit 69be88520f9dc56d3ec29d7b7d988f55fd248008 Author: Joerg Roedel Date: Fri Nov 9 12:07:08 2018 +0100 iommu/amd: Ignore page-mode 7 in free_sub_pt() The page-mode 7 is a special one as it marks a final PTE to a page with an intermediary size. Signed-off-by: Joerg Roedel commit 409afa44f9ba1443ef165a9e6d6a9cb5ad6ad176 Author: Joerg Roedel Date: Fri Nov 9 12:07:07 2018 +0100 iommu/amd: Introduce free_sub_pt() function The function is a more generic version of free_pagetable() and will be used to free only specific sub-trees of a page-table. Signed-off-by: Joerg Roedel commit ac3a7092ebcb011759cba39a259f7193e4f6ba62 Author: Joerg Roedel Date: Fri Nov 9 12:07:06 2018 +0100 iommu/amd: Collect page-table pages in freelist Collect all pages that belong to a page-table in a list and free them after the tree has been traversed. This allows to implement safer page-table updates in subsequent patches. Also move the functions for page-table freeing a bit upwards in the file so that they are usable from the iommu_map() path. Signed-off-by: Joerg Roedel commit 12d56175c89c8a8cc41e478775155709274ff733 Merge: bb38177cb6c6d 56b657f7f9c07 Author: Kalle Valo Date: Thu Nov 15 16:59:01 2018 +0200 Merge tag 'iwlwifi-next-for-kalle-2018-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First set of iwlwifi patches for 4.21 * PCI IDs for some new 9000-series cards; * Improve antenna usage on connection problems; * Some improvements in the debugging code; * Other clean-ups and small fixes; commit 03d9f8fa2bfdc791865624d3adc29070cf67814e Author: John Keeping Date: Tue Nov 13 15:24:13 2018 +0000 ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name There is no functional change from this, but it is confusing to find two copies of vcc_sys and no vcc_flash when looking in /sys/class/regulator/*/name. Signed-off-by: John Keeping Signed-off-by: Heiko Stuebner commit a9b722847872d43595d072d7fd550f08fe6764fd Author: Anders Roxell Date: Mon Nov 12 09:38:55 2018 +0100 scripts/kconfig/merge_config: don't redefine 'y' to 'm' In today's merge_config.sh the order of the config fragment files dictates the output of a config option. With this approach we will get different .config files depending on the order of the config fragment files. So doing something like: $ ./merge/kconfig/merge_config.sh selftest.config drm.config Where selftest.config defines DRM=y and drm.config defines DRM=m, the result will be "DRM=m". Rework to add a switch to get builtin '=y' precedence over modules '=m', this will result in "DRM=y". If we do something like this: $ ./merge/kconfig/merge_config.sh -y selftest.config drm.config Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell Signed-off-by: Masahiro Yamada commit fc381bb235a4ae1a2c7af1e55a90447553457a1a Author: Linus Walleij Date: Thu Nov 1 22:32:55 2018 +0100 drm/panel: Augment the TPO TPG110 bindings The TPO TPG110 bindings were using the DPI bindings (popular in the fbdev subsystem) but this misses the finer points learned in the DRM subsystem. We need to augment the bindings for proper DRM integration: the timings are expressed by the hardware, not put into the device tree. I.e. this hardware is self-describing and can report the resolutions and timings needed. It should not be described in the device tree. Further the device was incorrectly modeled with GPIO lines instead of an SPI child, even though the device was using SPI. No known deployments of the device using device tree exist, so it should be fine to augment the bindings. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181101213256.12097-1-linus.walleij@linaro.org commit 2250d856b279d992c392170860a78c2482b1859c Author: Gaku Inami Date: Thu Nov 8 16:24:55 2018 +0900 arm64: dts: renesas: Add CPU capacity-dmips-mhz Set the capacity-dmips-mhz for R-Car Gen3 SoCs, that is based on dhrystone. The average in 10 times of dhrystone result as follows: r8a7795 SoC (A57x4 + A53x4) CPU max-freq dhrystone --------------------------------- A57 1500 MHz 11470943 lps/s A53 1200 MHz 4798583 lps/s r8a7796 SoC (A57x2 + A53x4) CPU max-freq dhrystone --------------------------------- A57 1500 MHz 11463526 lps/s A53 1200 MHz 4793276 lps/s Based on above, capacity-dmips-mhz values are calculated as follows: r8a7795 SoC A57 : 1024 / (11470943 / 1500) * (11470943 / 1500) = 1024 A53 : 1024 / (11470943 / 1500) * ( 4798583 / 1200) = 535 r8a7796 SoC A57 : 1024 / (11463526 / 1500) * (11463526 / 1500) = 1024 A53 : 1024 / (11463526 / 1500) * ( 4793276 / 1200) = 535 However, since each CPUs have different max frequencies, the final CPU capacities of A53 are scaled by this difference, the values are as follows. [r8a7795 SoC] $ cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 <---- CPU capacity of A57 1024 1024 1024 428 <---- CPU capacity of A53 428 428 428 [r8a7796 SoC] $ cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 <---- CPU capacity of A57 1024 428 <---- CPU capacity of A53 428 428 428 Signed-off-by: Gaku Inami Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit b380ae0db6039131fd0ad985b760c5b3f5096dfc Author: Gaku Inami Date: Thu Nov 8 16:24:54 2018 +0900 arm64: dts: renesas: Add CPU topology on R-Car Gen3 SoCs This patch adds the "cpu-map" into r8a7795/r8a7796 composed of multi-cluster. This definition is used to parse the cpu topology. Signed-off-by: Gaku Inami Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0a8853811dd6c2ab7f65b3afad927ac7a9332e63 Author: Jani Nikula Date: Thu Nov 15 12:52:37 2018 +0200 drm/i915/bios: make the aux channel macros private to the vbt parser Hide the aux channel macros in intel_vbt_defs.h now that their use has been abstracted in intel_bios_port_aux_ch(). Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181115105237.1237-3-jani.nikula@intel.com commit 629ad5ee1fcc36feb6ef28a7afc0e84f3d48c60e Author: Jani Nikula Date: Thu Nov 15 12:52:36 2018 +0200 drm/i915: remove unused DDC PIN macros Their user has vanished in the course of history. Remove. Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181115105237.1237-2-jani.nikula@intel.com commit 3905308940b830f6a5ddf53300523251d15d6f3e Author: Jani Nikula Date: Thu Nov 15 12:52:35 2018 +0200 drm/i915/bios: rename intel_aux_ch() to intel_bios_port_aux_ch() Conform to function naming in intel_bios.c. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181115105237.1237-1-jani.nikula@intel.com commit 9374eee32b666c92cf821a98eb3aeaa0bf4d5dd5 Author: Takeshi Kihara Date: Thu Nov 15 10:46:49 2018 +0100 arm64: renesas: Enable GPIOLIB to allow GPIO driver selection The R-Car GPIO driver cannot be enabled when Renesas SoC's ARCH configs (ARCH_RENESAS, ARCH_R8A7795, ARCH_R8A7796 and ARCH_R8A77965) are enabled only. As GPIOs are a critical resource for proper operation on Renesas platforms, this patch selects GPIOLIB, just like is done for other SoC vendors, and on Renesas arm32 SoCs. Reported-by: Alexandru Gheorghe Signed-off-by: Takeshi Kihara [geert: Improve patch description] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 8989e9d2e6484fe2131dd16fa31698154affef40 Author: Mark Yao Date: Wed Nov 8 17:41:24 2017 +0800 clk: rockchip: make rk3188 hclk_vio_bus critical Vop register access request hclk_vio_bus. Signed-off-by: Mark Yao Signed-off-by: Heiko Stuebner commit fc3660533fefd9177430d4eb84a89b157267503a Author: Clint Taylor Date: Wed Oct 31 13:54:55 2018 -0700 drm/i915/hdmi: Reorder structure to match specification reorder structure of 297, 594 N values to group Audio Sample Frequencies together to make updating from HDMI specification easier. V2: Match patch 1/2 version V3: Arrange by sample freq, then pixel clock. Cc: Jani Nikula Signed-off-by: Clint Taylor Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1541019295-20016-1-git-send-email-clinton.a.taylor@intel.com commit 05e0b4bf4613dc4238bcdfd2b29521a9656cbb20 Author: Jani Nikula Date: Wed Nov 14 13:21:30 2018 +0200 drm/i915: remove excess line continuation backslashes While removing .palette_offsets, I removed the commas after .trans_offsets in the macros, but failed to remove the line continuation backslashes. While at it, also remove another extra comma to be in line with the other related macros. Fixes: 74c1e826427a ("drm/i915: remove palette_offsets from device info in favor of _PICK()") Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181114112130.22264-1-jani.nikula@intel.com commit ac8cb53829a6ba119082e067f5bc8fab3611ce6a Author: Heiko Stuebner Date: Thu Nov 15 12:17:30 2018 +0100 clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering Similar to commit a9f0c0e56371 ("clk: rockchip: fix rk3188 sclk_smc gate data") there is one other gate clock in the rk3188 clock driver with a similar wrong ordering, the sclk_mac_lbtest. So fix it as well. Signed-off-by: Heiko Stuebner commit 87b94026ff31b90a382d368123d31b2c4888069b Author: Maarten Lankhorst Date: Tue Nov 13 10:28:04 2018 +0100 drm/i915: Fix plane allocation/free functions Use intel_plane_destroy_state in intel_plane_free to free the state. Also fix intel_plane_alloc() to use __drm_atomic_helper_plane_reset(), to get sane defaults from the atomic core. This is needed to get the correct alpha value and blend mode from the core, and any new default values added from new properties. Signed-off-by: Maarten Lankhorst Reported-by: Ville Syrjälä Cc: Ville Syrjälä Fixes: b20815255693 ("drm/i915: Add plane alpha blending support, v2.") [mlankhorst: Update commit description to mention alpha blend support] Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181113092804.13304-1-maarten.lankhorst@linux.intel.com commit a9f0c0e563717b9f63b3bb1c4a7c2df436a206d9 Author: Finley Xiao Date: Wed Nov 14 15:45:49 2018 +0000 clk: rockchip: fix rk3188 sclk_smc gate data Fix sclk_smc gate data. Change variable order, flags come before the register address. Signed-off-by: Finley Xiao Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner commit 8b37eb74d0e30dfc87bf2025b7958a9730a7b5eb Author: Kuninori Morimoto Date: Thu Nov 8 06:35:16 2018 +0000 gpio: rcar: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Linus Walleij commit 67b249aaa650a461c86484e6c365f33887f0968a Author: Tomer Maimon Date: Wed Nov 7 15:44:34 2018 +0200 pinctrl: nuvoton: modify NPCM7xx pin configuration function Modify GPIO direction setting in pin configuration function by using generic GPIO functions to set the GPIO direction instead of direct access to the GPIO direction register. Signed-off-by: Tomer Maimon Tested-by: Kun Yi Signed-off-by: Linus Walleij commit f969b7aac980a26d3b5d126947989d4b072f27b4 Author: Manivannan Sadhasivam Date: Wed Nov 7 23:18:44 2018 +0530 pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC Add initial pinctrl driver for Mediatek MT6797 SoC supporting only GPIO and pinmux configurations. Tested-by: Matthias Brugger Acked-by: Sean Wang Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit 95d2f00657ad4c2c3eacd8a871a7aa022c3fe7d9 Author: Manivannan Sadhasivam Date: Wed Nov 7 23:18:41 2018 +0530 dt-bindings: pinctrl: Add devicetree bindings for MT6797 SoC Pinctrl Add devicetree bindings for Mediatek MT6797 SoC Pin Controller. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit 8817b44aa9c6cc7207eed260ddd84b9a5e121997 Author: Gabriel Krisman Bertazi Date: Thu Oct 18 15:31:36 2018 -0400 drm: panel-orientation-quirks: Do rotation quirk for new GPD Win2 FW I just got a new GDP Win2 device with an updated firmware, which still requires this quirk to get the rotation right, so add the new firmware date to the quirk matching table. This should go to drm-misc-next. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Hans de Goede Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181018193136.4910-1-krisman@collabora.co.uk commit d801064cb871806e6843738ecad38993646f53f7 Author: Neil Armstrong Date: Wed Nov 7 11:42:38 2018 +0100 pinctrl: meson-gxl: remove invalid GPIOX tsin_a pins The GPIOX tsin_a pins wrongly uses the SDCard pinctrl bits, this patch completely removes these pins entries until we find out what are the correct bits and registers to be used instead. Fixes: 5a6ae9b80139 ("pinctrl: meson-gxl: add tsin_a pins") Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij commit 7c68024a82a2f71e79ef29edccd6e8ce1d2f44f4 Author: Olof Johansson Date: Thu Nov 1 19:57:28 2018 -0700 pinctrl: mediatek: Fix dependencies for EINT_MTK Fixes the following config-time warning: WARNING: unmet direct dependencies detected for EINT_MTK Depends on [n]: PINCTRL [=y] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && (PINCTRL_MTK [=n] || PINCTRL_MTK_MOORE [=n] || COMPILE_TEST [=n]) Selected by [y]: - PINCTRL_MTK_PARIS [=y] && PINCTRL [=y] && OF [=y] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings") Signed-off-by: Olof Johansson Acked-by: Sean Wang Signed-off-by: Linus Walleij commit 0696d79456881e79c025cee35950e4a8334ce853 Author: Laurent Pinchart Date: Thu Nov 8 01:15:07 2018 +0200 gpio: drop devm_gpio_chip_match() Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the last user of drop devm_gpio_chip_match(), causing a defined but not used compilation warning. Fix it by removing the function. Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") Signed-off-by: Laurent Pinchart Acked-by: Uwe Kleine-König Acked-by: Olof Johansson Signed-off-by: Linus Walleij commit 3bfa011d3a47a776c7a9273782da41bf123d26ad Author: Icenowy Zheng Date: Thu Oct 4 20:28:51 2018 +0800 arm64: dts: allwinner: h6: enable USB2 on Pine H64 Pine H64 board has both the USB2 OTG pins and the USB2 host pins on H6 SoC wired out to USB Type-A ports. Enable them. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit 44eb589cf40aa80a345d5178907856e4b9308b01 Author: Icenowy Zheng Date: Thu Oct 4 20:28:50 2018 +0800 arm64: dts: allwinner: h6: add USB Vbus regulator for Pine H64 The 5V output of the USB ports on Pine H64 is controlled via a GPIO. Add the USB Vbus regulator device tree node. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit eabb3d424b6df102c6f6fd42323ef37f1f96f010 Author: Icenowy Zheng Date: Thu Oct 4 20:28:49 2018 +0800 arm64: dts: allwinner: h6: add USB2-related device nodes Allwinner H6 has two USB2 ports, one OTG and one host-only. Add device tree nodes related to them. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Chen-Yu Tsai commit e96c0d8336fdc5f1a6cae798bfa9c6e730001ad4 Author: Eric Biggers Date: Wed Nov 14 17:19:46 2018 -0800 block: make blk_try_req_merge() static blk_try_req_merge() is only used in block/blk-merge.c, so make it static. This addresses a gcc warning when -Wmissing-prototypes is enabled. Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe commit be215b92703bd730fe3968ae8ee1de2e22ba5b1d Author: Martin Blumenstingl Date: Sun Oct 28 13:35:14 2018 +0100 dt-bindings: timer: meson6_timer: document the clock inputs The Meson Timer IP has two clock inputs: - pclk which is used as "system clock" timebase of Timer E - xtal which is used for the 1us, 10us, 100us and 1ms timebases of Timer A, B, C, D and E The IP block has four internal dividers (XTAL is running at 24MHz): - "xtal div 24" for 1us resolution - "xtal div 240" for 10us resolution - "xtal div 2400" for 100us resolution - "xtal div 24000" for 1ms resolution Suggested-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit e55b892e1848e220f5248583b99bdcde63fe8f05 Author: Martin Blumenstingl Date: Sun Oct 28 13:35:13 2018 +0100 dt-bindings: timer: meson6_timer: document all interrupts The meson6_timer IP block supports four timers - each of them has it's own interrupt line. Update the documentation to reflect that all four interrupts should be passed. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit e1098e59158048ef0787578ea281060698a5f495 Author: Stefan Wahren Date: Sat Nov 10 16:12:35 2018 +0100 clk: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Simon Arlott Cc: Stephen Warren Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd commit 7ff4f8035695984c513598e2d49c8277d5d234ca Author: Jens Axboe Date: Wed Nov 14 15:22:49 2018 -0700 block: remove dead queue members No more users of ->in_flight[] or ->nr_sorted, get rid of them. Fixes: a1ce35fa4985 ("block: remove dead elevator code") Signed-off-by: Jens Axboe commit 98c98cb770da9469ee868f21299b2ba21fe438ac Author: Colin Ian King Date: Wed Nov 14 22:17:05 2018 +0000 block: clean up dead code that is now redundant The boolean next_sorted is set to false and is never changed, hence the code that checks if it is true is dead code and can now be removed. This dead code occurred from a previous commit that cleaned up the elevator and removed the setting of next_sorted to true. Detected by CoverityScan, CID#1475401 ("'Constant' variable guards dead code") Fixes: a1ce35fa4985 ("block: remove dead elevator code") Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 43fac3238c1d9363b2a93d8d56c2be0c29c64e6c Author: Tony Xie Date: Tue Oct 30 18:07:56 2018 +0800 regmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits) if there are lots of irqs for a device and the register addresses for these irqs is continuous, we can use this macro to initialize regmap_irq value. Signed-off-by: Tony Xie Signed-off-by: Mark Brown commit 22bf6cd2ca4df283812a521d3cb534993072cd44 Author: Stefan Wahren Date: Tue Oct 23 13:06:08 2018 +0200 spi: bcm2835: make license text and module license match The license text is specifying GPL v2 or later but the MODULE_LICENSE is set to GPL v2 which means GNU Public License v2 only. So choose the license text as the correct one. Signed-off-by: Stefan Wahren Acked-by: Florian Kauer Acked-by: Martin Sperl Signed-off-by: Mark Brown commit 757ec116c9bce4278fa4423039736c832cc63b6f Author: Colin Ian King Date: Wed Nov 14 21:42:46 2018 +0000 spi: npcm: fix u32 csgpio being checked for less than zero The u32 variable csgpio is being checked for an error return from the call to of_get_named_gpio, however, since this is unsigned this comparison will always be false. Fix this by making csgpio an int and fix up the %u format specifiers to %d accordingly. Detected by CoverityScan, CID#1475476 ("Unsigned compared against 0") Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 46dce4042659755a2b9753369d0c2d8ca33e35cf Author: Colin Ian King Date: Wed Nov 14 21:31:48 2018 +0000 ASoC: amd: fix memory leak of i2s_data on error return Currently when snd_pcm_hw_constraint_integer fails there is a memory leak of i2s_data on the error return path. Fix this by kfree'ing i2s_data before returning. Detected by CoverityScan, CID#1475479 ("Resource leak") Fixes: 0b87d6bcd648 ("ASoC: amd: add acp3x pcm driver dma ops") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit bb661b70883717154e194cad544e2b9c25895268 Author: Stefan Wahren Date: Mon Oct 22 22:35:02 2018 +0200 soc: bcm: Switch raspberrypi-power to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Alexander Aring Cc: Eric Anholt Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt commit 7b369a42e6d06c59fc56a1769fb4da797fac9bad Author: Stefan Wahren Date: Mon Oct 22 22:18:39 2018 +0200 ARM: mach-bcm: Switch bcm2835 and platsmp to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Cc: Simon Arlott Cc: Kapil Hali Cc: Stephen Warren Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Acked-by: Florian Fainelli commit 0829187b17d8019f9bb40c56d47f37b1991a2189 Author: Stefan Wahren Date: Sat Oct 6 13:31:56 2018 +0200 firmware: raspberrypi: Define timeout for transactions We should never assume to get a reply from the firmware otherwise the call could block forever and the user don't get informed. So define a timeout of 1 sec and print a stacktrace once in the unlikely case the timeout expired. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt commit d5585b7b6846a6d0f9517afe57be3843150719da Author: Alan Brady Date: Mon Oct 29 11:27:21 2018 -0700 i40e: prevent overlapping tx_timeout recover If a TX hang occurs, we attempt to recover by incrementally resetting. If we're starved for CPU time, it's possible the reset doesn't actually complete (or even fire) before another tx_timeout fires causing us to fly through the different resets without actually doing them. This adds a bit to set and check if a timeout recovery is already pending and, if so, bail out of tx_timeout. The bit will get cleared at the end of i40e_rebuild when reset is complete. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7cd8eb0861981ad212ce4242a1870c4b5831ceff Author: Mitch Williams Date: Fri Oct 26 14:33:33 2018 -0700 i40e: suppress bogus error message The i40e driver complains about unprivileged VFs trying to configure promiscuous mode each time a VF reset occurs. This isn't the fault of the poor VF driver - the PF driver itself is making the request. To fix this, skip the privilege check if the request is to disable all promiscuous activity. This gets rid of the bogus message, but doesn't affect privilege checks, since we really only care if the unprivileged VF is trying to enable promiscuous mode. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 211257a499c632052669526c7e643f6ac51e3fc8 Author: Richard Rodriguez Date: Fri Oct 26 14:33:32 2018 -0700 i40e: Use correct shift for VLAN priority When using port VLAN, for VFs, and setting priority bits, the device was sending out incorrect priority bits, and also setting the CFI bit incorrectly. To fix this, changed shift and mask bit definition for this function, to use the correct ones. Signed-off-by: Richard Rodriguez Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 843faff87af261bf55eda719a06087af0486a168 Author: Alice Michael Date: Fri Oct 26 14:33:31 2018 -0700 virtchnl: Fix off by one error When calculating the valid length for a VIRTCHNL_OP_ENABLE_CHANNELS message, we accidentally allowed messages with one extra virtchnl_channel_info structure on the end. This happened due to an off by one error, because we forgot that valid_len already accounted for one virtchnl_channel_info structure, so we need to subtract one from the num_tc value. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c9a983058ad6ffa59b950b87e4888a43c12ebb26 Author: Alice Michael Date: Fri Oct 26 14:33:30 2018 -0700 virtchnl: white space and reorder White space change. Move the check on the virtchnl_vsi_queue_config_info struct to be close to the struct like all the other similar checks. This keeps it clearer and easier to read. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 61bfb0600551808ff12a1e06795ef960f0544a36 Author: Jacob Keller Date: Fri Oct 26 14:33:29 2018 -0700 i40e: always set ks->base.speed in i40e_get_settings_link_up In i40e_get_settings_link_up, set ks->base.speed to SPEED_UNKNOWN in the case where we don't know the link speed. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7c3758f7839377ab67529cc50264a640636c47af Author: Mitch Williams Date: Fri Oct 26 14:33:28 2018 -0700 i40e: don't restart nway if autoneg not supported On link types that do not support autoneg, we cannot attempt to restart nway negotiation. This results in a dead link that requires a power cycle to remedy. Fix this by saving off the autoneg state and checking this value before we try to restart nway. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 5734fe87486e858124ec30d73be0a265e02c042c Author: Patryk Małek Date: Tue Oct 30 10:50:47 2018 -0700 i40e: Allow disabling FW LLDP on X722 devices This patch allows disabling FW LLDP agent on X722 devices. It also changes a source of information for this feature from pf->hw_features to pf->hw.flags which are set in i40e_init_adminq. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c95cb7b25f25b8145407cf89ae45dfac113760e4 Author: Alice Michael Date: Tue Oct 30 10:50:46 2018 -0700 i40e: update driver version The version numbers have not been kept up to date and this is an effort to ammend that. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f5a7b21b243952d4d26a2c91a041d122c0306504 Author: Jan Sokolowski Date: Tue Oct 30 10:50:45 2018 -0700 i40e: Protect access to VF control methods A scenario has been found in which simultaneous addition/removal and modification of VF's might cause unstable behaviour, up to and including kernel panics. Protect the methods that create/modify/destroy VF's by locking them behind an atomically set bit in PF status bitfield. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 4ff2d8540321324e04c1306f85d4fe68a0c2d0ae Author: Patryk Małek Date: Tue Oct 30 10:50:44 2018 -0700 i40e: Replace strncpy with strlcpy to ensure null termination Using strncpy allows destination buffer to be not null terminated after the copying takes place. strlcpy ensures that's not the case by explicitly setting last element in the buffer as '\0'. Signed-off-by: Patryk Małek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit de10933e37039e1b9d67a3d21d4e0a14c734eaac Author: Krzysztof Galazka Date: Tue Oct 30 10:50:43 2018 -0700 i40e: Add capability flag for stopping FW LLDP Add HW capability flag to indicate that firmware supports stopping LLDP agent. This feature has been added in FW API 1.7 for XL710 devices and 1.6 for X722. Also raise expected minor version number for X722 FW API to 6. Signed-off-by: Krzysztof Galazka Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8554768c2c3d8a8aa4eacaabb35140aa8fd03e35 Author: Jan Sokolowski Date: Tue Oct 30 10:50:42 2018 -0700 i40e: Use a local variable for readability Use a local variable to make the code a bit more readable. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6a9a5ec10e79425a4df26122705ecf24763b7f2d Author: Lance Roy Date: Tue Oct 2 22:38:50 2018 -0700 i40e: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a789fd0bab57d5883e441a09596e1a77f698e62c Author: Matthias Kaehlcke Date: Mon Nov 12 14:11:26 2018 -0800 arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC Add a channel node for the die temperature to the ADC. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit b59b94f76e7fa257e92d8e8b0c79755493356861 Author: Matthias Kaehlcke Date: Mon Nov 12 14:11:25 2018 -0800 dt-bindings: iio: vadc: Add unit address to ADC channel node in example The node has a reg property, therefore its name should include a unit address. Also change the name from 'usb_id_nopull' to 'adc-chan', which is the preferred name for ADC channel nodes. Include headers for constants used in the example. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit ed3cafa79ea756be653d22087c017af95ea78a49 Author: Stephen Boyd Date: Wed Sep 26 11:02:34 2018 -0700 soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data() Let's change the function signature to return the pointer to memory or an error pointer on failure, and take an argument that lets us return the size of the aux data read. This way we can remove the cmd_db_read_aux_data_len() API entirely and also get rid of the memcpy operation from cmd_db to the caller. Updating the only user of this code shows that making this change allows us to remove a function and put the lookup where the user is. Cc: Mahesh Sivasubramanian Cc: Lina Iyer Cc: Bjorn Andersson Cc: Evan Green Cc: Jordan Crouse Cc: Rob Clark Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross commit 84fa36eb30f2e02ebf07a22fea2550a7a3938bec Author: Stephen Boyd Date: Wed Sep 26 11:02:33 2018 -0700 soc: qcom: cmd-db: Remove memcpy()ing from cmd_db_get_header() The cmd_db_get_header() function is a static local function that doesn't need to copy anything from one place to another. Instead, it can just point into the region by returning pointers to what we're looking for. If we do that, we should mark what we're returning as const so that code can't modify cmd-db without an obvious cast. Cc: Mahesh Sivasubramanian Cc: Lina Iyer Cc: Bjorn Andersson Cc: Evan Green Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross commit 808e10330b0a0bebed8fa3c6bb4e8fe728ca2c2a Author: Niklas Cassel Date: Mon Oct 1 11:55:54 2018 +0200 soc: qcom: Drop help text for QCOM_QMI_HELPERS The help text is visible in menuconfig, however QCOM_QMI_HELPERS is a hidden kconfig, so it is not selectable in menuconfig. Remove the help text so that it is more clear that this is intentionally a hidden kconfig. Signed-off-by: Niklas Cassel Reviewed-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit c4fe17e0e3a346cc855b7b41c00ff7b04c56d32b Author: Arun Kumar Neelakantam Date: Wed Oct 3 11:10:02 2018 +0530 soc: qcom: qmi_interface: Limit txn ids to U16_MAX Txn IDs created up to INT_MAX cause overflow while storing the IDs in u16 type supported by QMI header. Limit the txn IDs max value to U16_MAX to avoid overflow. Signed-off-by: Arun Kumar Neelakantam Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross commit e0f2cfeb59c81cbcfc7fbcb7ec0636020499813b Author: Jordan Crouse Date: Fri Oct 5 18:38:29 2018 +0530 soc: qcom: llcc-slice: Add error checks for API functions llcc_slice_getd can return a ERR_PTR code on failure. Add a IS_ERR_OR_NULL check to subsequent API calls that use struct llcc_slice_desc to guard against faults and to let the leaf drivers get away with safely using a ERR_PTR() encoded "pointer" in the aftermath of a llcc_slice_getd error. Signed-off-by: Jordan Crouse Reviewed-by: Vivek Gautam Signed-off-by: Andy Gross commit 8c1919a2b48f172bfb4db5aa93d5809dd26738b3 Author: Arnd Bergmann Date: Fri Jul 6 14:57:19 2018 +0200 soc: qcom/llcc: add MODULE_LICENSE tag The lack of a MODULE_LICENSE tag prevents building the llcc driver as a loadable module: FATAL: modpost: GPL-incompatible module llcc-slice.ko uses GPL-only symbol 'ktime_get' This adds the appropriate license and description tags. Signed-off-by: Arnd Bergmann Signed-off-by: Andy Gross commit 279536a564f6479725ad23cb139783f16a974d4f Author: Alok Chauhan Date: Wed Oct 3 17:53:50 2018 +0530 soc: qcom: Add irq clear handling during SE init when the kernel inits a SE, its quite possible we have pending interrupts from bootloaders which did not handle/clear them. So do this in kernel at the SE init, to avoid some of it causing bad behavior, while at it also club all the register writes needed to clear the se irqs into a function to avoid repeating it over. Signed-off-by: Alok Chauhan Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross commit 4884788b7ba1a2136f8eff5396d33246af7e55f2 Author: Amit Kucheria Date: Tue Jun 12 15:26:54 2018 +0300 arm64: dts: sdm845: enable tsens thermal zones One thermal zone per cpu is defined Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Acked-by: Andy Gross Signed-off-by: Andy Gross commit 9ee80560a32932873548bb867a46970cdfd1ca40 Author: Amit Kucheria Date: Mon Aug 20 15:36:26 2018 +0530 arm64: dts: msm8916: Add camera thermal zone Initialise the camera thermal zone to export temperature to userspace. Signed-off-by: Amit Kucheria Acked-by: Andy Gross Signed-off-by: Andy Gross commit 154233c8988a1549d6f7fc41197c73d8bb4a4670 Author: Amit Kucheria Date: Mon Sep 10 12:39:53 2018 +0530 arm64: dts: msm8916: Add gpu thermal zone Initialise the gpu thermal zone to export temperature to userspace. Signed-off-by: Amit Kucheria Acked-by: Andy Gross Signed-off-by: Andy Gross commit 2b4e5fc0edfe071c7ac625038d38dd7682fe7c5f Author: Amit Kucheria Date: Thu Sep 6 15:44:34 2018 +0530 arm64: dts: msm8916: thermal: Add "qcom,sensors" property This new property allows the number of sensors to be configured from DT instead of being hardcoded in platform data. Use it. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Acked-by: Andy Gross Signed-off-by: Andy Gross commit 95b0ddfd21ed516b8af3375948e0c1e6f409894b Author: Amit Kucheria Date: Thu Sep 6 15:26:39 2018 +0530 arm64: dts: msm8916: thermal: split address space into two We've earlier added support to split the register address space into TM and SROT regions. Split up the regmap address space into two for msm8916 that has a similar register layout. Since tsens-common.c/init_common() currently only registers one address space, the order is important (TM before SROT). This is OK since the code doesn't really use the SROT functionality yet. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Acked-by: Andy Gross Signed-off-by: Andy Gross commit 73e43d5cdf3e49d26cbf5b817501f213ed6e56cf Merge: 651022382c7f8 9134586715e38 Author: Andy Gross Date: Wed Nov 14 09:31:54 2018 -0800 Merge tag 'qcom-fixes-for-4.20-rc1' into arm64-for-4.21 Qualcomm ARM64 DT Fixes for 4.20-rc1 * Fix reserved gpio ranges for SDM845 and MSM8998 commit e9d753b820e578745d2d0e558b3797fccef190e6 Author: Amit Kucheria Date: Fri Aug 10 10:38:09 2018 +0530 ARM: dts: msm8974: thermal: Add "qcom,sensors" property This new property allows the number of sensors to be configured from DT instead of being hardcoded in platform data. Use it. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Acked-by: Andy Gross Signed-off-by: Andy Gross commit 58443fd91057f073306cbbfc9db3b6a292fd51e5 Author: Amit Kucheria Date: Thu Sep 6 15:24:12 2018 +0530 ARM: dts: msm8974: thermal: split address space into two We've earlier added support to split the register address space into TM and SROT regions. Split up the regmap address space into two for msm8974 that has a similar register layout. Since tsens-common.c/init_common() currently only registers one address space, the order is important (TM before SROT). This is OK since the code doesn't really use the SROT functionality yet. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Acked-by: Andy Gross Signed-off-by: Andy Gross commit 3c84c05b8b909cae497360a79766877995d2ec68 Author: Amit Kucheria Date: Wed Aug 1 02:15:26 2018 +0530 MAINTAINERS: Add entry for Qualcomm TSENS thermal drivers Create an entry for the TSENS drivers and mark them as maintained Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Acked-by: Rajendra Nayak Acked-by: Bjorn Andersson Signed-off-by: Andy Gross commit 30e066286e232772cad72c87008a958e23e40a33 Author: Jens Axboe Date: Wed Nov 14 10:13:50 2018 -0700 nvme: fix boot hang with only being able to get one IRQ vector NVMe always asks for io_queues + 1 worth of IRQ vectors, which means that even when we scale all the way down, we still ask for 2 vectors and get -ENOSPC in return if the system can't support more than 1. Getting just 1 vector is fine, it just means that we'll have 1 IO queue and 1 admin queue, with a shared vector between them. Check for this case and don't add our + 1 if it happens. Fixes: 3b6592f70ad7 ("nvme: utilize two queue maps, one for reads and one for writes") Reported-by: Guenter Roeck Signed-off-by: Jens Axboe commit 6d5db6c37929cb0a84e64ba0590a74593e5ce3b8 Merge: 15cef30974c5f bd3b5d462add1 Author: David S. Miller Date: Wed Nov 14 08:51:28 2018 -0800 Merge branch 'nfp-abm-track-all-Qdiscs' Jakub Kicinski says: ==================== nfp: abm: track all Qdiscs Our Qdisc offload so far has been very simplistic. We held and array of marking thresholds and statistics sized to the number of PF queues. This was sufficient since the only configuration we supported was single layer of RED Qdiscs (on top of MQ or not, but MQ isn't really about queuing). As we move to add more Qdiscs it's time to actually try to track the full Qdisc hierarchy. This allows us to make sure our offloaded configuration reflects the SW path better. We add graft notifications to MQ and RED (PRIO already sends them) to allow drivers offloading those to learn how Qdiscs are linked. MQ graft gives us the obvious advantage of being able to track when Qdiscs are shared or moved. It seems unlikely HW would offload RED's child Qdiscs but since the behaviour would change based on linked child we should stop offloading REDs with modified child. RED will also handle the child differently during reconfig when limit parameter is set - so we have to inform the drivers about the limit, and have them reset the child state when appropriate. The NFP driver will now allocate a structure to track each Qdisc and link it to its children. We will also maintain a shadow copy of threshold settings - to save device writes and make it easier to apply defaults when config is re-evaluated. ==================== Signed-off-by: David S. Miller commit bd3b5d462add1c703dd02a7a6f498a0f1bea9f4a Author: Jakub Kicinski Date: Mon Nov 12 14:58:19 2018 -0800 nfp: abm: restructure Qdisc handling In preparation of handling more Qdisc types switch to a different offload strategy. We have now recreated the Qdisc hierarchy in the driver. Every time the hierarchy changes parse it, and update the configuration of the HW accordingly. While at it drop the support of pretending that we can instantiate a single queue on a multi-queue device in HW/FW. MQ is now required, and each queue will have its own instance of RED. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 52db4eaca59fd2af8f3579ae9361214def014dbe Author: Jakub Kicinski Date: Mon Nov 12 14:58:18 2018 -0800 nfp: abm: save RED's parameters Use the new driver Qdisc structure to keep track of parameters of RED Qdiscs. This way as the Qdisc moves around in the hierarchy we will be able to configure the HW appropriately. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 6c5dbda0d4df000cff88d8bbb382de3d2e034d8f Author: Jakub Kicinski Date: Mon Nov 12 14:58:17 2018 -0800 nfp: abm: reset RED's child based on limit RED qdisc will replace its child Qdisc with a new FIFO queue if it is reconfigured and the limit parameter is not 0. This means that when it's created with limit of 0 it will have no FIFO, and all packets will be dropped. If it's changed and limit is specified it will loose its existing child (implicit graft). Make sure we mark RED Qdisc child as NFP_QDISC_UNTRACKED if its not the expected FIFO. nfp_abm_qdisc_replace() will return 1 if Qdisc already existed. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit c0b7490b19f6ab43c3c4ef82c8d5ed3bf19a8913 Author: Jakub Kicinski Date: Mon Nov 12 14:58:16 2018 -0800 net: sched: red: notify drivers about RED's limit parameter RED qdisc's limit parameter changes the behaviour of the qdisc, for instance if it's set to 0 qdisc will drop all the packets. When replace operation happens and parameter is set to non-0 a new fifo qdisc will be instantiated and replace the old child qdisc which will be destroyed. Drivers need to know the parameter, even if they don't impose the actual limit to be able to reliably reconstruct the Qdisc hierarchy. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 6b8417b7e6f5e4da2bfb4dd087d5f7f082d077de Author: Jakub Kicinski Date: Mon Nov 12 14:58:15 2018 -0800 nfp: abm: build full Qdisc hierarchy based on graft notifications Using graft notifications recreate in the driver the full Qdisc hierarchy. Keep track of how many times each Qdisc is attached to the hierarchy to make sure we don't offload Qdiscs which are attached multiple times (device queues can't be shared). For graft events of Qdiscs we don't know exist make the child as invalid/untracked. Note that MQ Qdisc doesn't send destruction events reliably when device is dismantled, so we need to manually clean out the children otherwise we'd think Qdiscs which are still in use are getting freed. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit d577a3d279c3c60adabdcc4b7a414d37dea7b8b2 Author: Jakub Kicinski Date: Mon Nov 12 14:58:14 2018 -0800 net: sched: mq: offload a graft notification Drivers offloading Qdiscs should have reasonable certainty the offloaded behaviour matches the SW path. This is impossible if the driver does not know about all Qdiscs or when Qdiscs move and are reused. Send a graft notification from MQ. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit bf2a752bea027ec5a0bc5b4042d78b32715ad198 Author: Jakub Kicinski Date: Mon Nov 12 14:58:13 2018 -0800 net: sched: red: offload a graft notification Drivers offloading Qdiscs should have reasonable certainty the offloaded behaviour matches the SW path. This is impossible if the driver does not know about all Qdiscs or when Qdiscs move and are reused. Send a graft notification from RED. The drivers are expected to simply stop offloading the Qdisc, if a non-standard child is ever grafted onto it. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit aee7539c5876cc65f5ffa88615a88eb724358cc1 Author: Jakub Kicinski Date: Mon Nov 12 14:58:12 2018 -0800 nfp: abm: allocate Qdisc child table To keep track of Qdisc hierarchy allocate a table for children for each Qdisc. RED Qdisc can only have one child. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 1853125889a397725420e8ef003502141269d08f Author: Jakub Kicinski Date: Mon Nov 12 14:58:11 2018 -0800 nfp: abm: remember which Qdisc is root Keep track of which Qdisc is currently root. We need to implement TC_SETUP_ROOT_QDISC handling, and for completeness also clear the root Qdisc pointer when it's freed. TC_SETUP_ROOT_QDISC isn't always sent when device is dismantled. Remembering the root Qdisc will allow us to build the entire hierarchy in following patches. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 98b0e5f6842a9982a793f0837b1bd1495542a3d8 Author: Jakub Kicinski Date: Mon Nov 12 14:58:10 2018 -0800 net: sched: provide notification for graft on root Drivers are currently not notified when a Qdisc is grafted as root. This requires special casing Qdiscs added with parent = TC_H_ROOT in the driver. Also there is no notification sent to the driver when an existing Qdisc is grafted as root. Add this very simple notifications, drivers should now be able to track their Qdisc tree fully. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 4f5681d088ba01f12f63160fa843c915e1ce1358 Author: Jakub Kicinski Date: Mon Nov 12 14:58:09 2018 -0800 nfp: abm: track all offload-enabled qdiscs Allocate an object corresponding to any offloaded qdisc we are informed about by the kernel. Not only the qdiscs we have a chance of offloading. The count of created objects will be used to decide whether the ethtool TC offload can be disabled, since otherwise we may miss destroy commands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 6666f545e9e19bb6b4836b6c5215ceba47d58d3e Author: Jakub Kicinski Date: Mon Nov 12 14:58:08 2018 -0800 nfp: abm: keep track of all RED thresholds Instead of writing the threshold out when Qdisc is configured and not remembering it move to a scheme where we remember all thresholds. When configuration changes parse the offloaded Qdiscs and set thresholds appropriately. This will help future extensions. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 08990494e59d1ee43f02a687042b7b30ca260bad Author: Jakub Kicinski Date: Mon Nov 12 14:58:07 2018 -0800 nfp: abm: rename qdiscs -> red_qdiscs Rename qdiscs member to red_qdiscs. One of following patches will use the name qdiscs for tracking all qdisc types. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 15cef30974c5f8b256008beb62dcbf15792b77a9 Merge: 4fd3e2ac18fed 7975d2aff5afb Author: David S. Miller Date: Wed Nov 14 08:48:37 2018 -0800 Merge branch 'aquantia-add-rx-flow-filter-support' Igor Russkikh says: ==================== net: aquantia: add rx-flow filter support In this patchset the rx-flow filters functionality and vlan filter offloads are implemented. The rules in NIC hardware have fixed order and priorities. To support this, the locations of filters from ethtool perspective are also fixed: * Locations 0 - 15 for VLAN ID filters * Locations 16 - 31 for L2 EtherType and PCP filters * Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6) ==================== Signed-off-by: David S. Miller commit 7975d2aff5afb691fbd5db812a2e00bc2ad69f20 Author: Dmitry Bogdanov Date: Mon Nov 12 15:46:09 2018 +0000 net: aquantia: add support of rx-vlan-filter offload Since it uses the same NIC table as rx flow vlan filter therefore rx-flow vlan filter accepts only vlans that present on the interface in case of rx-vlan-filter is on. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9a8cac4b4dae9d5717d4e5f38e0a5ce41de501ee Author: Dmitry Bogdanov Date: Mon Nov 12 15:46:07 2018 +0000 net: aquantia: add ethertype and PCP to rx flow filters L2 EtherType filters allows to filter packet by EtherType field or both EtherType and User Priority (PCP) field of 802.1Q. UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That is to distinguish VLAN filter from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID are passed in the same 'vlan' parameter. Example: To add a filter that directs IP4 packess of priority 3 to queue 3: ethtool -N flow-type ether proto 0x800 vlan 0x600 m 0x1FFF \ action 3 loc 16 Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 54bcb3d162a884adb91a53cc58412093ad64dc11 Author: Dmitry Bogdanov Date: Mon Nov 12 15:46:05 2018 +0000 net: aquantia: add vlan id to rx flow filters The VLAN filter (VLAN id) is compared against 16 filters. VLAN id must be accompanied by mask 0xF000. That is to distinguish VLAN filter from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID are passed in the same 'vlan' parameter. Flow type may be any as it is not matched for VLAN filter. Due to fixed order of the rules in the NIC, the location 0-15 are reserved for vlan filters. Example: To add a rule that directs packets from VLAN 2001 to queue 5: ethtool -N flow-type ip4 vlan 2001 m 0xF000 action 5 loc 0 Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a6ed6f2269d64b0eb65e27eac16c9852ff05e50f Author: Dmitry Bogdanov Date: Mon Nov 12 15:46:02 2018 +0000 net: aquantia: add support of L3/L4 ntuple filters Add support of L3/L4 5-tuple {protocol, src-ip, dst-ip, src-port, dst-port} filters. Mask is not supported. Src-port and dst-port are only compared for TCP/UDP/SCTP packets. Both IPv4 and IPv6 are supported. The supported actions are the drop and the queue assignment. Due to fixed order of the rules in the NIC, the location 32-39 are reserved for L3/L4 5-tuple filters. The locations 32 and 36 are reserved for IPv6 filters. Examples: sudo ethtool -N eth0 flow-type ip6 src-ip 2001:db8:0:f101::2 \ dst-ip 2001:db8:0:f101::5 action -1 loc 36 sudo ethtool -N eth0 flow-type udp4 src-ip 10.0.0.4 \ dst-ip 10.0.0.7 src-port 2000 dst-port 2001 action 2 loc 32 Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 8d0bcb012f57729e44991a45f5ba3266a58de268 Author: Dmitry Bogdanov Date: Mon Nov 12 15:46:00 2018 +0000 net: aquantia: add infrastructure for ntuple rules Add infrastructure to support ntuple filter configuration. Add rule, remove rule, reapply on interface up. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 23e7a718a49bf94d8ffe802a4327d93f6be8335f Author: Dmitry Bogdanov Date: Mon Nov 12 15:45:58 2018 +0000 net: aquantia: add rx-flow filter definitions Add missing register definitions and the functions accessing them related to rx-flow filters. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 55a2a982d39c051c0479277fc3a7ac8205565ed8 Author: YueHaibing Date: Mon Nov 12 13:32:36 2018 +0000 drm/qxl: remove set but not used variables 'driver, qbo' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/qxl/qxl_release.c: In function 'qxl_release_fence_buffer_objects': drivers/gpu/drm/qxl/qxl_release.c:431:17: warning: variable 'qbo' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/qxl/qxl_release.c:430:24: warning: variable 'driver' set but not used [-Wunused-but-set-variable] 'qbo' not used since commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence") And 'driver' never used since introduction in 8002db6336dd ("qxl: convert qxl driver to proper use for reservations") Signed-off-by: YueHaibing Link: http://patchwork.freedesktop.org/patch/msgid/1542029556-88107-1-git-send-email-yuehaibing@huawei.com Signed-off-by: Gerd Hoffmann commit 45230903ecd4068b3f3fd4ea271c525048655ce8 Author: YueHaibing Date: Sat Nov 10 03:44:46 2018 +0000 drm/qxl: remove set but not used variable 'map' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/qxl/qxl_object.c: In function 'qxl_bo_kunmap_atomic_page': drivers/gpu/drm/qxl/qxl_object.c:189:21: warning: variable 'map' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Link: http://patchwork.freedesktop.org/patch/msgid/1541821486-40631-1-git-send-email-yuehaibing@huawei.com Signed-off-by: Gerd Hoffmann commit 040b595a91b21b61d6e0d388394b79c85f614e7c Author: Colin Ian King Date: Wed Nov 7 20:31:22 2018 +0000 drm/virtio: fix memory leak of vfpriv on error return path The allocation for vfpriv is being leaked on an error return path, fix this by kfree'ing it before returning. Detected by CoverityScan, CID#1475380 ("Resource Leak") Fixes: 6a37c49a94a9 ("drm/virtio: Handle context ID allocation errors") Signed-off-by: Colin Ian King Link: http://patchwork.freedesktop.org/patch/msgid/20181107203122.6861-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann commit 6862965261a09fc459815ba38efb758fc88006df Author: Gustavo Padovan Date: Mon Nov 12 17:51:57 2018 +0100 drm/virtio: bump driver version after explicit synchronization addition To reflect the (backward compatible) changes in the uabi we are bumping the driver's version. Signed-off-by: Gustavo Padovan Signed-off-by: Robert Foss Reviewed-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20181112165157.32765-5-robert.foss@collabora.com Signed-off-by: Gerd Hoffmann commit 2cd7b6f08bc4cf06d1f00f8b42720a8457861ca1 Author: Robert Foss Date: Mon Nov 12 17:51:56 2018 +0100 drm/virtio: add in/out fence support for explicit synchronization When the execbuf call receives an in-fence it will get the dma_fence related to that fence fd and wait on it before submitting the draw call. On the out-fence side we get fence returned by the submitted draw call and attach it to a sync_file and send the sync_file fd to userspace. On error -1 is returned to userspace. VIRTGPU_EXECBUF_FENCE_FD_IN & VIRTGPU_EXECBUF_FENCE_FD_OUT are supported at the simultaneously and can be flagged for simultaneously. Signed-off-by: Gustavo Padovan Signed-off-by: Robert Foss Reviewed-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20181112165157.32765-4-robert.foss@collabora.com Suggested-by: Rob Herring Reviewed-by: Emil Velikov Signed-off-by: Gerd Hoffmann commit a56f9c868ccf56f0ab6e3e64693e6a39323bf8d8 Author: Robert Foss Date: Mon Nov 12 17:51:55 2018 +0100 drm/virtio: add uapi for in and out explicit fences Add a new field called fence_fd that will be used by userspace to send in-fences to the kernel and receive out-fences created by the kernel. This uapi enables virtio to take advantage of explicit synchronization of dma-bufs. There are two new flags: * VIRTGPU_EXECBUF_FENCE_FD_IN to be used when passing an in-fence fd. * VIRTGPU_EXECBUF_FENCE_FD_OUT to be used when requesting an out-fence fd The execbuffer IOCTL is now read-write to allow the userspace to read the out-fence. On error -1 should be returned in the fence_fd field. Signed-off-by: Gustavo Padovan Signed-off-by: Robert Foss Reviewed-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20181112165157.32765-3-robert.foss@collabora.com Signed-off-by: Gerd Hoffmann commit 9fdd90c0f42440b7f1e4a3f7262d222eee4b4cdf Author: Robert Foss Date: Mon Nov 12 17:51:54 2018 +0100 drm/virtio: add virtio_gpu_alloc_fence() Refactor fence creation, add fences to relevant GPU operations and add cursor helper functions. This removes the potential for allocation failures from the cmd_submit and atomic_commit paths. Now a fence will be allocated first and only after that will we proceed with the rest of the execution. Signed-off-by: Gustavo Padovan Signed-off-by: Robert Foss Link: http://patchwork.freedesktop.org/patch/msgid/20181112165157.32765-2-robert.foss@collabora.com Suggested-by: Rob Herring Signed-off-by: Gerd Hoffmann commit 8e1599fcac2efda8b7d433ef69d2492f0b351e3f Author: Borislav Petkov Date: Mon Nov 12 13:20:36 2018 +0100 x86/traps: Complete prototype declarations ... with proper variable names. No functional changes. Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/20181110141647.GA20073@zn.tnic commit 68b5e4326e4b8ac9080835005d8254fed0fb3c56 Author: Borislav Petkov Date: Fri Nov 9 23:13:13 2018 +0100 x86/mce: Fix -Wmissing-prototypes warnings Add the proper includes and make smca_get_name() static. Fix an actual bug too which the warning triggered: arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \ types for ‘smp_thermal_interrupt’ asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r) ^~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29: ./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \ ‘smp_thermal_interrupt’ was here asmlinkage void smp_thermal_interrupt(void); Signed-off-by: Borislav Petkov Cc: Yi Wang Cc: Michael Matz Cc: x86@kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de commit 569ae9209425560e1a94114231d0782e1cc19df1 Author: Chengguang Xu Date: Wed Nov 14 07:23:53 2018 +0800 ext2: remove redundant condition check ext2_xattr_destroy_cache() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling ext2_xattr_destroy_cache(). Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 2ae7f165c0b022a8ed1732f8ab2c11b2c173146e Author: Matthew Wilcox Date: Tue Oct 30 09:53:52 2018 -0700 drm/virtio: Use IDAs more efficiently 0-based IDAs are more efficient than any other base. Convert the 1-based IDAs to be 0-based. Signed-off-by: Matthew Wilcox Link: http://patchwork.freedesktop.org/patch/msgid/20181030165352.13065-2-willy@infradead.org Signed-off-by: Gerd Hoffmann commit 556c62e85f9b97139c1b3f6f1585fcee0bc3eb6a Author: Matthew Wilcox Date: Tue Oct 30 09:53:51 2018 -0700 drm/virtio: Handle error from virtio_gpu_resource_id_get ida_alloc() can return -ENOMEM in the highly unlikely case we run out of memory. The current code creates an object with an invalid ID. Signed-off-by: Matthew Wilcox Link: http://patchwork.freedesktop.org/patch/msgid/20181030165352.13065-1-willy@infradead.org Signed-off-by: Gerd Hoffmann commit fa96ed1f564c6310ac51eef2a2c330986526d3c2 Author: Imre Deak Date: Fri Nov 9 16:58:22 2018 +0200 drm/i915: Remove special case for power well 1/MISC_IO state verification Even though PW#1 and the MISC_IO power wells are managed by the DMC firmware (toggled dynamically if conditions allow it) from the driver's POV they are always on if the display core is initialized (always restored by DMC to the enabled state after exiting from DC5/6 for instance b/c of MMIO access). Accordingly we can just mark them as always-on and remove the special casing for them during state verification (thus enabling verification for these power wells too). Cc: Ramalingam C Cc: Daniel Vetter Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181109145822.15446-3-imre.deak@intel.com commit 285cf66d52204ddb2bc9d049a37e5a3cd2a01733 Author: Imre Deak Date: Fri Nov 9 16:58:21 2018 +0200 drm/i915: Use proper bool bitfield initializer in power well descs We can just use a proper true/false initializer even for bitfields, which is more descriptive. Cc: Ramalingam C Cc: Daniel Vetter Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181109145822.15446-2-imre.deak@intel.com commit cb8ef723ab812bf61553d88542b3a37f2ca75b48 Author: Imre Deak Date: Fri Nov 9 16:58:20 2018 +0200 drm/i915/gen9_bc: Work around DMC bug zeroing power well requests A DMC bug on GEN9 big core machines fails to restore the driver's request bits for the PW1 and MISC_IO power wells after a DC5/6 entry->exit sequence. As a consequence the driver's subsequent check for the enabled status of these power wells will fail, as the check considers the power wells being enabled only if both the status and request bits are set. To work around this borrow the request bits from BIOS's own request register in which DMC forces on the request bits when exiting from DC5/6. This fixes a problem reported by Ramalingam, where HDCP init failed, since PW1 reported itself as being disabled, while in reality it was enabled. Reported-by: Ramalingam C Cc: Ramalingam C Cc: Daniel Vetter Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181109145822.15446-1-imre.deak@intel.com commit b28cc6cec3d814f5184cbebb2d1f987e769f534a Author: Christophe JAILLET Date: Wed Nov 14 00:36:45 2018 +0100 rtc: max77686: Fix the returned value in case of error in 'max77686_rtc_read_time()' In case of error, we return 0. This is spurious and not consistent with the other functions of the driver. Commit e115a2bf1426 has modified more than what is said in the commit message. Reverse part of it znd return an error when needed, as it was previously. Fixes: e115a2bf1426 ("rtc: max77686: stop validating rtc_time in .read_time") Signed-off-by: Christophe JAILLET Reviewed-by: Chanwoo Choi Signed-off-by: Alexandre Belloni commit 50c8aec4212a966817e868056efc9bfbb73337c0 Author: Marek Szyprowski Date: Tue Nov 13 12:32:50 2018 +0100 rtc: s3c-rtc: Avoid using broken ALMYEAR register (RTC,ALM)YEAR registers of Exynos built-in RTC device contains 3 BCD characters. s3c-rtc driver uses only 2 lower of them and supports years from 2000..2099 range. The third BCD value is typically set to 0, but it looks that handling of it is broken in the hardware. It sometimes defaults to a random (even non-BCD) value. This is not an issue for handling RTCYEAR register, because bcd2bin() properly handles only 8bit values (2 BCD characters, the third one is skipped). The problem is however with ALMYEAR register and proper RTC alarm operation. When YEAREN bit is set for the configured alarm, RTC hardware triggers alarm only when ALMYEAR and RTCYEAR matches. This usually doesn't happen because of the random noise on the third BCD character. Fix this by simply skipping setting ALMYEAR register in alarm configuration. This workaround fixes broken alarm operation on Exynos built-in rtc device. My tests revealed that the issue happens on the following Exynos series: 3250, 4210, 4412, 5250 and 5410. Signed-off-by: Marek Szyprowski Signed-off-by: Alexandre Belloni commit f1bd154d8838f9bddbe0f07292dd1c70a47c8b83 Author: Maciej W. Rozycki Date: Wed Nov 7 02:39:51 2018 +0000 rtc: m41t80: Complete error propagation from SMBus calls Complement commit 85d77047c4ea ("drivers/rtc/rtc-m41t80.c: propagate error value from smbus functions") and correct the remaining places that fail to propagate the error code from SMBus calls. Signed-off-by: Maciej W. Rozycki References: 85d77047c4ea ("drivers/rtc/rtc-m41t80.c: propagate error value from smbus functions") Signed-off-by: Alexandre Belloni commit 3cc9ffbb1f51eb4320575a48e4805a8f52e0e26b Author: Maciej W. Rozycki Date: Wed Nov 7 02:39:13 2018 +0000 rtc: m41t80: Correct alarm month range with RTC reads Add the missing adjustment of the month range on alarm reads from the RTC, correcting an issue coming from commit 9c6dfed92c3e ("rtc: m41t80: add alarm functionality"). The range is 1-12 for hardware and 0-11 for `struct rtc_time', and is already correctly handled on alarm writes to the RTC. It was correct up until commit 48e9766726eb ("drivers/rtc/rtc-m41t80.c: remove disabled alarm functionality") too, which removed the previous implementation of alarm support. Signed-off-by: Maciej W. Rozycki Fixes: 9c6dfed92c3e ("rtc: m41t80: add alarm functionality") References: 48e9766726eb ("drivers/rtc/rtc-m41t80.c: remove disabled alarm functionality") Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Alexandre Belloni commit 745aa6cdee6be0dfc8196f8b848325246981d881 Author: Mika Kuoppala Date: Fri Nov 9 16:53:33 2018 +0200 drm/i915: Fix icl workarounds whitespaces Align icl workarounds whitespace with the rest of the file Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181109145333.10570-2-mika.kuoppala@linux.intel.com commit 85f04aa569addbd66a8688dbce5e5f2a54bbb437 Author: Mika Kuoppala Date: Fri Nov 9 16:53:32 2018 +0200 drm/i915: Deduplicate register definition for GAMW_ECO_DEV_RW_IA This got duplicated on introducing icl workarounds. Fix by using the older definition and moving the wa bit definition there. No functional changes. v3: avoid fixes tag, whitespace (Chris) References: 908ae0517363 ("drm/i915/icl: WaDisCtxReload") Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181109145333.10570-1-mika.kuoppala@linux.intel.com commit 8577c319b6511fbc391f3775225fecd8b979bc26 Author: Mika Kuoppala Date: Fri Nov 9 16:09:23 2018 +0200 drm/i915/icl: Drop spurious register read from icl_dbuf_slices_update Register DBUF_CTL_S2 is read and it's value is not used. As there is no explanation why we should prime the hardware with read, remove it as spurious. Fixes: aa9664ffe863 ("drm/i915/icl: Enable 2nd DBuf slice only when needed") Cc: Mahesh Kumar Cc: Rodrigo Vivi Signed-off-by: Mika Kuoppala Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181109140924.2663-1-mika.kuoppala@linux.intel.com commit 6ad16b78a039b45294b1ad5d69c14ac57b2fe706 Author: Brian Norris Date: Wed Nov 7 18:49:39 2018 -0800 platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup EC_MKBP_EVENT_SENSOR_FIFO events can be triggered for a variety of reasons, and there are very few cases in which they should be treated as wakeup interrupts (particularly, when a certain MOTIONSENSE_MODULE_FLAG_* is set, but this is not even supported in the mainline cros_ec_sensor driver yet). Most of the time, they are benign sensor readings. In any case, the top-level cros_ec device doesn't know enough to determine that they should wake the system, and so it should not report the event. This would be the job of the cros_ec_sensors driver to parse. This patch adds checks to cros_ec_get_next_event() such that it doesn't signal 'wakeup' for events of type EC_MKBP_EVENT_SENSOR_FIFO. This patch is particularly relevant on devices like Scarlet (Rockchip RK3399 tablet, known as Acer Chromebook Tab 10), where the EC firmware reports sensor events much more frequently. This was causing /sys/power/wakeup_count to increase very frequently, often needlessly interrupting our ability to suspend the system. Signed-off-by: Brian Norris Signed-off-by: Benson Leung commit 475b08734edb3695b9396950c87e75d7c72278a8 Author: Brian Norris Date: Wed Nov 7 18:49:38 2018 -0800 platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes cros_ec_get_next_event() is documented to return 0 for success and negative for errors. It currently returns negative for some errors, and non-negative (number of bytes received) for success (including some "no data available" responses as zero). This mostly works out OK, because the callers were more or less ignoring the documentation, and only treating positive values as success (and indepdently checking the modification of 'wakeup'). Let's button this up by avoiding pretending to handle event/wakeup distinctions when no event info was retrieved (i.e., returned 0 bytes). And fix the documentation of cros_ec_get_host_event() and cros_ec_get_next_event() to accurately describe their behavior. Signed-off-by: Brian Norris Acked-by: Lee Jones Signed-off-by: Benson Leung commit bdccbb79e4f0732ef49d6f2e6fb13cea5879354b Author: Martin Kaiser Date: Thu Nov 1 18:32:47 2018 +0100 ARM: dts: i.MX25: add the clocks for the EPIT blocks The i.MX25 contains two EPIT (Enhanced Periodic Interrupt Timer) function blocks. Add their ipg and per clocks to the device tree. Signed-off-by: Martin Kaiser Acked-by: Clément Péron Signed-off-by: Shawn Guo commit c800cd7824bd8ceb1291f90e3f124c9172f59177 Author: A.s. Dong Date: Thu Nov 1 15:20:13 2018 +0000 firmware: imx: add SCU power domain driver Some i.MX SoCs contain a system controller that is responsible for controlling the state of the IPs that are present. Communication between the host processor running an OS and the system controller happens through a SCU protocol. This patch adds SCU protocol based power domains drivers. Cc: Ulf Hansson Cc: Rob Herring Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: linux-pm@vger.kernel.org Signed-off-by: Dong Aisheng Reviewed-by: Ulf Hansson Signed-off-by: Shawn Guo commit 0a914a4948d4604c08750ae67dc33f8b5702402f Author: A.s. Dong Date: Thu Nov 1 15:20:08 2018 +0000 firmware: imx: add pm svc headfile Add SCU PM SVC related protocol definitions which will be used by a number of PM functions like Power Domain, Clock, Reset and etc. The detailed implementation of each function will put in the individual function drivers. Cc: Shawn Guo Cc: Sascha Hauer Reviewed-by: Ulf Hansson Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit d357b3134c9a7b1b78f5bfb2cd92423b91407cda Author: A.s. Dong Date: Thu Nov 1 15:20:02 2018 +0000 dt-bindings: fsl: scu: update power domain binding Update the power domain binding with #power-domain-cells 1 format. The first cell can be a global SCU power domain and the 2nd cell the device ID. With this approach, we may remove all the sub power domain nodes from device tree which can relief the device tree a lot. Cc: Shawn Guo Cc: Sascha Hauer Reviewed-by: Rob Herring Reviewed-by: Ulf Hansson Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 3501ce96bf5d9dd8563dd94595436d3757ec817e Author: A.s. Dong Date: Thu Nov 1 15:19:58 2018 +0000 firmware: imx: remove resource id enums We already export resource id in dt-bindings headfile which can also be used by drivers. So no need keep the same definitions in regular headfile anymore. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Reviewed-by: Ulf Hansson Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit d4ea45e8a6031504b87cef76944c8730c67fec1f Author: A.s. Dong Date: Thu Nov 1 15:19:53 2018 +0000 dt-bindings: imx: add scu resource id headfile SCU firmware uses resource id to provide services. Every device on a SCU based system has a resource id. Exported it in device tree to allow service bindings to use it. e.g. power domain. Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Mark Rutland Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Ulf Hansson Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 9d4b17efa51f3bb0918021090c09b0013039df00 Author: Kirill Marinushkin Date: Mon Nov 12 08:08:33 2018 +0100 ASoC: pcm3060: Add DT property for single-ended output DAC output may be differential (default) or single-ended. Signed-off-by: Kirill Marinushkin Signed-off-by: Mark Brown commit 704e504bd6167084dd0841c02d1d2bb58889e967 Author: Paulo Zanoni Date: Mon Nov 12 15:23:13 2018 -0800 drm/i915: add ICP support to cnp_rawclk() and kill icp_rawclk() I think I'm probably the one who argued in favor of having separate implementations for both PCHs, but the calculations are actually the same, the clocks are the same and the only difference is that on ICP we write the numerator to the register. I have previously suggested to kill cnp_rawclk() and keep the icp_rawclk() style, but Ville gave some good arguments that what's in this patch may be the better choice. v2: Switch numerator to 1 from 1000 and adjust calculations accordingly (Ville). Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181112232313.26373-3-paulo.r.zanoni@intel.com commit 228a5cf381f761ca16ef6b31b24c4533594468bd Author: Paulo Zanoni Date: Mon Nov 12 15:23:12 2018 -0800 drm/i915: rename CNP_RAWCLK_FRAC to CNP_RAWCLK_DEN Although CNP names this field "Counter Fraction", what we write to the register is really the denominator for the fractional part of the divider, not the fractional part (and the field description even says that). The ICP spec renamed the field to "Counter Fraction Denominator", which makes a lot more sense. Use the more complete ICL naming because we will merge the CNP and ICP functions into a single one, which will introduce the concept of the numerator. That will make a lot more sense when you read the "num/frac = den" calculation. Reviewed-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181112232313.26373-2-paulo.r.zanoni@intel.com commit af4de6adb4999513fd41753ad6b35b67a90c3905 Author: Paulo Zanoni Date: Mon Nov 12 15:23:11 2018 -0800 drm/i915/cnp+: update to the new RAWCLK_FREQ recommendations BSpec was updated and now there's no more "subtract 1" to the Microsecond Counter Divider field. It seems this should help fixing some GMBUS issues. I'm not aware of any specific open bug that could be solved by this patch. Cc: Ville Syrjälä Cc: Rodrigo Vivi Reviewed-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181112232313.26373-1-paulo.r.zanoni@intel.com commit 4fd3e2ac18fedcaabd6212c7c99c6125fee102a2 Merge: 3e536cff34244 1ebb2446c3032 Author: David S. Miller Date: Tue Nov 13 16:30:00 2018 -0800 Merge branch 'cpsw-allow-vlan-h-w-timestamping' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: allow vlan h/w timestamping The patchset adds several improvements and allows vlan h/w ts. Based on net-next/master ==================== Signed-off-by: David S. Miller commit 1ebb2446c3032682ffce0c665265885f46286038 Author: Ivan Khoronzhuk Date: Mon Nov 12 16:00:23 2018 +0200 net: ethernet: ti: cpsw: allow vlan tagged packets to be timestamped Allow vlan tagged packets to be timestamped, as no any restrictions for this. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit a9423120343cb52efea6f471ff780eba7aab9b9f Author: Ivan Khoronzhuk Date: Mon Nov 12 16:00:22 2018 +0200 net: ethernet: ti: cpts: move enable/disable flags outside of cpts module Each slave has it's own receive timestamp filter. But cpts rx/tx timestamp enable flags are used to allow ts retrieve only for one user. This limitation causes data path redundancy and setting overlap if cpsw module is in dual-mac mode for instance. If rx ts is enabled only for one port - the second interface must expect every incoming packet to be PTP packet w/o absolutely any reason, and if it's PTP - do unneeded stuff, as rx filter for second port is not set and cpts fifo is not supposed to contain appropriate ts event. That's not correct. So, to fix control overlap and avoid redundant CPU cycles, the patch splits rx/tx ts enable flags between network devices. After the patch, PTP timestamping still should be used for only one port (or PTP id counter has to be different for both ports as cpts IP is common). Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit f19dcd5f118d1795307e28e6e99f482469303edc Author: Ivan Khoronzhuk Date: Mon Nov 12 16:00:21 2018 +0200 net: ethernet: ti: cpts: purge staled skbs from txq The overflow event is running with 1 jiffy in case if txq is not empty, but it can be emptied completely only if next tx event consumes skb or deletes staled skb from the txq. In case of staled skb, that can happen for some unpredictable reason (the ts event was lost or timed out), the overflow event can be generated quite long time consuming CPU w/o reason before next tx event happens. To avoid it, purge txq before increasing overflow event rate. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit d0e14c4d9bcef0d4aa1057d2959adaa6f18d4a17 Author: Ivan Khoronzhuk Date: Mon Nov 12 16:00:20 2018 +0200 net: ethernet: ti: cpts: correct debug for expired txq skb The msgtype and seqid that is smth that belongs to event for comparison but not for staled txq skb. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 496fa3ba0a66c0192be86a45f44f94827ab8bcb6 Author: Wei Yongjun Date: Sat Oct 27 02:19:59 2018 +0000 ASoC: stm32: sai: fix invalid use of sizeof in stm32_sai_add_mclk_provider() sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown commit e770b18bbbaecebfb37389b45bf82974a17488d7 Author: Matti Vaittinen Date: Wed Nov 7 15:41:26 2018 +0200 regulator: bd718x7: Change next state after poweroff to ready BD71837 and BD71847 have a HW functionality which leave power rails OFF after powerof state: - if they have been controlled by SW. - if state transition from poweroff is done to SNVS BD71837 can after reset transition from power-off to SNVS or READY state depending on reset reason. By default only wathcdog reset changes state from poweroff to ready. Change PMIC configuration to always transition to READY in order to avoid crucial power rails being OFF after reset. If SNVS is required the crucial power rails should not be controlled by SW - eg corresponding regulator control register should have SEL bit kept zero. Currently the driver assumes all regulators to be controlled by SW so it sets all SEL bits to 1. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit ef4de050b4c796ef13421032403ad986c00423d3 Author: Kuninori Morimoto Date: Thu Nov 8 06:45:01 2018 +0000 regulator: as3711: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 49f539518b333ee9da27cf2ddd5345484a13cc22 Author: Kuninori Morimoto Date: Thu Nov 8 06:44:19 2018 +0000 regulator: bd9571mwv: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit a2dc50914744eea9f83a70a5db0486be625e5dc0 Author: Marek Szyprowski Date: Tue Nov 13 16:38:47 2018 +0100 extcon: max8997: Fix lack of path setting in USB device mode MAX8997 driver disables automatic path selection from MicroUSB connector and manually sets path to either UART or USB lines. However the code for setting USB path worked only for USB host mode (when ID pin is set to ground). When standard USB cable (USB device mode) is connected, path registers are not touched. This means that once the non-USB accessory is connected to MAX8997-operated micro USB port, the path is no longer set to USB and USB device mode doesn't work. This patch fixes it by setting USB path both for USB and USB host modes. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit 813af51f5d30a2da6a2523c08465f9726e51772e Author: Joel Stanley Date: Mon Nov 12 14:51:16 2018 +1030 powerpc/boot: Set target when cross-compiling for clang Clang needs to be told which target it is building for when cross compiling. Link: https://github.com/ClangBuiltLinux/linux/issues/259 Signed-off-by: Joel Stanley Tested-by: Daniel Axtens # powerpc 64-bit BE Acked-by: Michael Ellerman Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 3bd9805090af843b25f97ffe5049f20ade1d86d6 Author: Joel Stanley Date: Mon Nov 12 14:51:15 2018 +1030 Makefile: Export clang toolchain variables The powerpc makefile will use these in it's boot wrapper. Signed-off-by: Joel Stanley Signed-off-by: Masahiro Yamada commit 238bcbc4e07fad2fff99c5b157d0c37ccd4d093c Author: Masahiro Yamada Date: Tue Nov 6 12:04:55 2018 +0900 kbuild: consolidate Clang compiler flags Collect basic Clang options such as --target, --prefix, --gcc-toolchain, -no-integrated-as into a single variable CLANG_FLAGS so that it can be easily reused in other parts of Makefile. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Acked-by: Greg Hackmann commit dbe27a002ef8573168cb64e181458ea23a74e2b6 Author: Masahiro Yamada Date: Tue Nov 6 12:04:54 2018 +0900 kbuild: add -no-integrated-as Clang option unconditionally We are still a way off the Clang's integrated assembler support for the kernel. Hence, -no-integrated-as is mandatory to build the kernel with Clang. If you had an ancient version of Clang that does not recognize this option, you would not be able to compile the kernel anyway. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers commit 861e6ed667c83d64a42b0db41a22d6b4de4e913f Author: Borislav Petkov Date: Tue Nov 6 12:35:21 2018 +0100 EDAC: Drop per-memory controller buses ... and use the single edac_subsys object returned from subsys_system_register(). The idea is to have a single bus and multiple devices on it. Signed-off-by: Borislav Petkov Acked-by: Mauro Carvalho Chehab CC: Aristeu Rozanski Filho CC: Greg KH CC: Justin Ernst CC: linux-edac CC: Mauro Carvalho Chehab CC: Russ Anderson Cc: Tony Luck Link: https://lkml.kernel.org/r/20180926152752.GG5584@zn.tnic commit c1bbd933e5fae83f96acd3f748bb01a0300b315d Author: Tejun Heo Date: Tue Nov 13 12:06:41 2018 -0800 cgroup: Add .__DEBUG__. prefix to debug file names Clearly mark the debug files and hide them by default by prefixing ".__DEBUG__.". Signed-off-by: Tejun Heo Cc: Peter Zijlstra (Intel) Cc: Waiman Long commit b1e3aeb11c5e86ee0988a038c4e7682d6beaa977 Author: Tejun Heo Date: Tue Nov 13 12:03:33 2018 -0800 cpuset: Minor cgroup2 interface updates * Rename the partition file from "cpuset.sched.partition" to "cpuset.cpus.partition". * When writing to the partition file, drop "0" and "1" and only accept "member" and "root". Signed-off-by: Tejun Heo Cc: Peter Zijlstra (Intel) Cc: Waiman Long commit 2a22f1b30cee8d1e104a6c5062a609bedbfd5c39 Author: Tomer Maimon Date: Mon Nov 12 18:42:32 2018 +0200 spi: npcm: add NPCM PSPI controller driver Add Nuvoton NPCM BMC Peripheral SPI controller driver. Signed-off-by: Tomer Maimon Signed-off-by: Mark Brown commit 4ad26864df53b265976c4a3ae61b1e6cad92fe40 Author: Tomer Maimon Date: Mon Nov 12 18:42:31 2018 +0200 dt-binding: spi: add NPCM PSPI controller documentation Added device tree binding documentation for Nuvoton BMC NPCM Peripheral SPI controller. Signed-off-by: Tomer Maimon Signed-off-by: Mark Brown commit 6135ee70cb1314681772645242beee46fcf5d185 Author: Anand Moon Date: Thu Sep 27 14:07:36 2018 +0000 ARM: dts: exynos: Add pin configuration for SD write protect on Odroid XU3/XU4/HC1 Add SD card write-protect pin configuration to be sure that it will be properly pulled down to indicate write access. Suggested-by: Krzysztof Kozlowski Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit 2e61286dc6ce10ebce17825cd61031c5fd0289db Author: Axel Lin Date: Sat Nov 10 11:50:03 2018 +0800 regulator: bd718x7: Use regulator_map_voltage_ascend for buck5 and buck7 The voltages in bd718xx_3rd_nodvs_buck_volts are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin Signed-off-by: Mark Brown commit 4289c86c4cd7a848590e1e2c3e0e3274136b6848 Author: Anand Moon Date: Thu Sep 27 14:07:37 2018 +0000 ARM: dts: exynos: Update maximum frequency for eMMC to 200MHz on Odroid XU3/XU4 Set the eMMC max-frequency to 200MHz for optimal performance on Odroid XU3/XU4 family of boards. Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit c60b3f77f497d2720f7b841e78acfcf24fee071a Author: Anand Moon Date: Thu Sep 27 14:07:35 2018 +0000 ARM: dts: exynos: Update maximum frequency for SD card to 200MHz on Odroid XU3/XU4/HC1 Set the SD max-frequency to 200MHz for optimal performance on Odroid XU3/XU4/HC1 family of boards. Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit 8fe325fa9d065aa54db4914fdaccab2169fd67a8 Author: Anand Moon Date: Thu Sep 27 14:07:34 2018 +0000 ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 From Odroid XU3/XU4/HC1 schematics the LDO13 regulator for SD2, can be set on 1.8V or 2.8V so the minimal value should be fixed to 1.8V. This is necessary to support UHS-I tuning (otherwise card won't be detected during boot). Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit 25e5566e2b6e3ea0768505f75db887d7176150ce Author: Anand Moon Date: Thu Sep 27 14:07:33 2018 +0000 ARM: dts: exynos: Add UHS-I bus speed support to Odroid XU3/XU4/HC1 Add support for UHS-I bus speed tuning for SDR50, DDR50 and SDR104 to Odroid XU3/XU4/HC1 family boards. Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit 818ba93b0e9ed4a08cba575dd49c1391ef4b7776 Author: Vijendar Mukunda Date: Mon Nov 12 11:05:02 2018 +0530 ASoC: amd: enable acp3x drivers build ACP3x drivers can be built by selecting necessary kernel config option. The patch enables build support of the same. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 8de1b5ed03370e46bf9f5b425e3f260dac3bc336 Author: Vijendar Mukunda Date: Mon Nov 12 11:05:01 2018 +0530 ASoC: amd: add acp3x system resume pm op When system wide suspend happens, ACP will be powered off. When system resumes, all the runtime configuration data for ACP needs to be programmed again. Added 'resume'pm call back to ACP pm ops. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 56e4dd8f68019f50a885be9122981f1899cd89ed Author: Vijendar Mukunda Date: Mon Nov 12 11:05:00 2018 +0530 ASoC: amd: add acp3x runtime pm ops Added runtime PM operations for ACP3x PCM platform device. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 67aa06aef5836d2ceb1b9280ca2cee9cc4b1e004 Author: Vijendar Mukunda Date: Mon Nov 12 11:04:59 2018 +0530 ASoC: amd: add acp3x tdm mode support ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support for TDM mode. Desired mode can be selected from ASoC machine driver. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 2b5f290e10266037338631c03ab6bea51f0a7ebf Author: Vijendar Mukunda Date: Mon Nov 12 11:04:58 2018 +0530 ASoC: amd: add acp3x i2s ops ACP3x has a i2s controller block for playback and capture. This patch adds ACP3x i2s DAI operations. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 0b87d6bcd6482b4502d8fd21561380981dad501f Author: Vijendar Mukunda Date: Mon Nov 12 11:04:57 2018 +0530 ASoC: amd: add acp3x pcm driver dma ops ACP3x has a DMA controller to access system memory. This controller transfers data from/to system memory to/from the ACP internal FIFO. The patch adds PCM driver DMA operations. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 32feac95f646aebaafdaf12a610898b6e5db54ae Author: Vijendar Mukunda Date: Mon Nov 12 11:04:56 2018 +0530 ASoC: amd: Interrupt handler changes for ACP3x DMA driver Whenever audio data equal to the I2S FIFO watermark level are produced/consumed, interrupt is generated. Acknowledge the interrupt. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit ac289c7ec0bc9cf426036a8adbe36f72be53d0ae Author: Vijendar Mukunda Date: Mon Nov 12 11:04:55 2018 +0530 ASoC: amd: add ACP3x PCM platform driver PCM platform driver binds to the platform device created by ACP3x PCI device. PCM driver registers ALSA DMA and CPU DAI components with ASoC framework. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 7894a7e7ea3de6c1fd5b2b43f3a73106c94ef584 Author: Vijendar Mukunda Date: Mon Nov 12 11:04:54 2018 +0530 ASoC: amd: create ACP3x PCM platform device ACP 3x IP has I2S controller device as one of IP blocks. Create a platform device for it, so that the PCM platform driver can be bound to this device. Pass PCI resources like MMIO, irq to the platform device. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit e30d9128def6ca0715a89b9a3133a94521dc0b51 Author: Maruthi Srinivas Bayyavarapu Date: Mon Nov 12 11:04:53 2018 +0530 ASoC: AMD: add ACP3.0 PCI driver ACP 3.0 is a PCI audio device. This patch adds PCI driver to bind to this device and get PCI resources. Signed-off-by: Maruthi Bayyavarapu Signed-off-by: Sanju R Mehta Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit b1299acd0d63de314f29f6d108e9c8fd086ed373 Author: Maruthi Srinivas Bayyavarapu Date: Mon Nov 12 11:04:52 2018 +0530 ASoC: AMD: add ACP 3.x IP register header ACP 3.x is a new audio block in raven. Added register header of the same. Signed-off-by: Maruthi Bayyavarapu Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown commit 88a10b15173d76338e0808e4915edbd1aae5f264 Author: Tony Luck Date: Mon Oct 1 15:43:13 2018 -0700 EDAC: Don't add devices under /sys/bus/edac Nobody(*) uses them. Dropping this will allow us to make the total number of memory controllers configurable (as we won't have to worry about duplicated device names under this directory). (*) https://lkml.kernel.org/r/20180927221054.580220e5@coco.lan Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Acked-by: Mauro Carvalho Chehab CC: Aristeu Rozanski Filho CC: Greg KH CC: Justin Ernst CC: Mauro Carvalho Chehab CC: Russ Anderson CC: linux-edac Link: http://lkml.kernel.org/r/20181001224313.GA9487@agluck-desk commit 1866d58be7ec02b656ef913a46eb1f0c5ff2b25f Author: Bo Yan Date: Tue Nov 13 09:51:05 2018 -0800 soc/tegra: fuse: Remove duplicated function declaration The function tegra_read_chipid() is declared twice in fuse.h. Remove the redundant declaration. Signed-off-by: Bo Yan Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit f68b18fd1c4b64859712dde3fa93a7716220201b Author: Marek Szyprowski Date: Tue Sep 18 10:16:53 2018 +0200 arm64: dts: exynos: Update DWC3 modules on Exynos5433 SoCs Update DWC3 hardware modules to Exynos5433 specific variant: change compatible name and add all required clocks (both to the glue node and DWC3 core node). Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit f1977a9be319f5d7d32fb84d1f545b8a02b2e88b Merge: ccda4af0f4b92 1a9e779679a0e Author: Olof Johansson Date: Tue Nov 13 11:21:06 2018 -0800 Merge branch 'next-for-4.21' of https://github.com/lyrazhang/linux into next/dt * 'next-for-4.21' of https://github.com/lyrazhang/linux: arm64: dts: sc9836/sc9860: Update coresight bindings for hardware ports Signed-off-by: Olof Johansson commit 019033c854a20e10f691f6cc0e897df8817d9521 Author: Bard liao Date: Sun Nov 11 05:18:46 2018 +0800 ASoC: Intel: hdac_hdmi: add Icelake support Add Icelake device id. Also, Icelake's pin2port mapping table is complicated. So we use a mapping table to do the pin2port mapping. Signed-off-by: Bard liao Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 703c605fac82d580822dc39f5eff9e2fe66ed63d Author: Stefan Wahren Date: Mon Oct 22 22:15:48 2018 +0200 ARM: dts: bcm2835-rpi-zero: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt commit dcad34f818f2a23b9a51c7c2a21e167fff441e52 Author: Richard Fitzgerald Date: Mon Nov 12 13:36:39 2018 +0000 ASoC: wm_adsp: Factor out common init code Factor out the duplicated initialization statements from wm_adsp1_init() and wm_adsp2_init() into new function wm_adsp_common_init(). The entire content of wm_adsp1_init() is the common code but it is convenient to retain this exported function to hide what we currently treat as common init (which might change in the future) and also make clear the difference between an ADSP1 entry point and common code. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown commit c0b07605f1a0285d50596c0243adfa00e3043293 Author: Fredrik Ternerot Date: Tue Nov 13 13:46:32 2018 +0100 spi: pl022: Handle cs_change for last transfer Do not deselect cs when cs_change is set for the last transfer in the message. In this case, cs_change indicates that cs should stay selected until the next transfer. Signed-off-by: Fredrik Ternerot Signed-off-by: Mark Brown commit 82391856191878bb0047259817ab32f88438aa33 Author: Lubomir Rintel Date: Tue Nov 13 11:22:28 2018 +0100 spi: pxa2xx: Deal with the leftover garbage in TXFIFO There doesn't seem to be a way to empty TXFIFO on MMP2. The datasheet is super-secret and the method described in Armada 16x manual won't work: "The TXFIFO and RXFIFO are cleared to 0b0 when the SSPx port is reset or disabled (by writing a 0b0 to the field in the SSP Control Register 0)." # devmem 0xd4037008 # read SSSR 0x0000F204 # devmem 0xd4037000 32 0x07 # SSE off in SSCR0 # devmem 0xd4037000 32 0x87 # SSE on # devmem 0xd4037008 0x0000F204 ^ TXFIFO level is still 2. Sigh. The OLPC 1.75 boot firmware leaves two bytes in the TXFIFO. Those are basically throwaway bytes used in response to the messages from the EC. The OLPC kernel copes with this by power-cycling the hardware. Perhaps the firmware should do this instead. Other than that, there's not much we can do other than complain loudly until the garbage gets drained and discard the actual data... For the OLPC EC this will work just fine and pushing more data to TXFIFO would break further transactions. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Mark Brown commit 77d33897c68d56797a3201e06bdf10e2094a96d6 Author: Lubomir Rintel Date: Tue Nov 13 11:22:27 2018 +0100 spi: pxa2xx: Add ready signal Strobe a GPIO line when the slave TX FIFO is filled. This is how the Embedded Controller on an OLPC XO-1.75 machine, that happens to be a SPI master, learns that it can initiate a transaction. Signed-off-by: Lubomir Rintel Tested-by: Pavel Machek Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 8ae13d0b0d4bb4af99bec8c50152f0c8f5cbcc06 Author: Lubomir Rintel Date: Tue Nov 13 11:22:26 2018 +0100 spi: pxa2xx: dt-bindings: Add ready GPIO signal This this is used to let the SPI master know that our FIFO is filled and we're ready to service a transfer. Only useful in slave mode. A signal like this is used by an embedded controller on a OLPC XO 1.75 machine, that happens to be a SPI master. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit ec93cb6f827b3e1a81b0721b8c893d2a5e37e7d6 Author: Lubomir Rintel Date: Tue Nov 13 11:22:25 2018 +0100 spi: pxa2xx: Add slave mode support Tested on an OLPC XO-1.75 machine, where the Embedded Controller happens to be a SPI master. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Mark Brown commit 810923f3bf06c11022b7bb370dd3130a956a222e Author: Lubomir Rintel Date: Tue Nov 13 11:22:24 2018 +0100 spi: Deal with slaves that return from transfer_one() unfinished Some drivers, such as spi-pxa2xx return from the transfer_one callback immediately, idicating that the transfer will be finished asynchronously. Normally, spi_transfer_one_message() synchronously waits for the transfer to finish with wait_for_completion_timeout(). For slaves, we don't want the transaction to time out as it can complete in a long time in future. Use wait_for_completion_interruptible() instead. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit aa66478aa538f839a96c836bba0bbc12ef2666f0 Author: Lubomir Rintel Date: Tue Nov 13 11:22:23 2018 +0100 spi: pxa2xx: dt-bindings: Add spi-slave property This is used to indicate that the chip attached to this controller is a SPI master. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Acked-by: Pavel Machek Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit f15c19af929d380d0acb2a8d8277d688351bd5de Author: Peter Ujfalusi Date: Thu Nov 8 09:30:00 2018 +0200 ASoC: omap-mcbsp: No need to initialize max_xx_thres when it is not used Initializing to -EINVAL is not correct as the variables are unsigned and if buffer_size is 0 then they are not used anyway. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit 465d85b3976a15c9e0e205ff50be64efa11b7af3 Author: Peter Ujfalusi Date: Thu Nov 8 09:29:59 2018 +0200 ASoC: omap-mcbsp: Remove redundant check for mcbsp->pdata The driver will not probe if the pdata is not provided or created. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit 9c34d023dc35a4b3d005d94db512742dfcdc8f82 Author: Peter Ujfalusi Date: Thu Nov 8 09:29:58 2018 +0200 ASoC: omap-mcbsp: Re-arrange files for core McBSP and Sidetone function split The mcbsp.c was copied a while back from arch/arm/plat-omap/mcbsp.c and it contained a mix of McBSP and McBSP sidetone functions. Create new file structure with the following split: omap-mcbsp.c - McBSP related functions omap-mcbsp-st.c - McBSP sidetone functionality omap-mcbsp-priv.h - Private header for internal use omap-mcbsp.h - Header for user drivers I have tried to do the code move with minimal code change, cleanup patches can be based on the new structure. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit be51c576e8495fd2cffbababad6de7e0a0a562ba Author: Peter Ujfalusi Date: Thu Nov 8 09:29:57 2018 +0200 ASoC: omap-mcbsp: Move out the FIFO check from set_threshold and get_delay Check if the McBSP have FIFO in the omap_mcbsp_set_threshold() and omap_mcbsp_dai_delay() delay function to skip calling the lower layer if it is not needed. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit 59d177f65f50df07f5f0b461c968d2fab7597af1 Author: Peter Ujfalusi Date: Thu Nov 8 09:29:56 2018 +0200 ASoC: omap-mcbsp: Simplify the mcbsp_start/_stop function parameters We either start/stop TX or RX, never both. Move the tx/rx direction selection within the functions. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit d63a7625a6dff8f75604b952de600d24b58b8b54 Author: Peter Ujfalusi Date: Thu Nov 8 09:29:55 2018 +0200 ASoC: omap-mcbsp: Clean up the interrupt handlers The parameter name of dev_id is leftover from the old times when we passed numeric ID as data for the interrupt handlers. The mcbsp_rx and mcbsp_tx is misleading as they are pointers to the mcbsp struct. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit c9ece9c29e263a4bda60b141b7b9dece4256b7dd Author: Peter Ujfalusi Date: Thu Nov 8 09:29:54 2018 +0200 ASoC: omap-mcbsp: Skip dma_data.maxburst initialization It is configured runtime so no need to initialize it. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit dd443a7c0b00edb9aa471a18e4238b0199b3a3ad Author: Peter Ujfalusi Date: Thu Nov 8 09:29:53 2018 +0200 ASoC: omap-mcbsp: Clean up dma_data addr initialization code Make the omap_mcbsp_dma_reg_params() a bit more intuitive to read for the first glance by using SNDRV_PCM_STREAM_PLAYBACK/CAPTURE and to group the outermost if case by stream direction. While there, fix the outdated comment for the function. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown commit 58a923adf4d9aca8bf7205985c9c8fc531c65d72 Author: Denis V. Lunev Date: Tue Nov 13 20:39:50 2018 +0300 dlm: fix possible call to kfree() for non-initialized pointer Technically dlm_config_nodes() could return error and keep nodes uninitialized. After that on the fail path of we'll call kfree() for that uninitialized value. The patch is simple - we should just initialize nodes with NULL. Signed-off-by: Denis V. Lunev Signed-off-by: David Teigland commit 66917a3130f218dcef9eeab4fd11a71cd00cd7c9 Author: Matthew Bobrowski Date: Thu Nov 8 14:12:44 2018 +1100 fanotify: introduce new event mask FAN_OPEN_EXEC_PERM A new event mask FAN_OPEN_EXEC_PERM has been defined. This allows users to receive events and grant access to files that are intending to be opened for execution. Events of FAN_OPEN_EXEC_PERM type will be generated when a file has been opened by using either execve(), execveat() or uselib() system calls. This acts in the same manner as previous permission event mask, meaning that an access response is required from the user application in order to permit any further operations on the file. Signed-off-by: Matthew Bobrowski Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit a704bba5e3ec3eedddad3c2baa9b7cfa0e2b3388 Author: Matthew Bobrowski Date: Thu Nov 8 14:10:03 2018 +1100 fsnotify: refactor fsnotify_parent()/fsnotify() paired calls when event is on path A wrapper function fsnotify_path() has been defined to simplify the paired calls to fsnotify_parent()/fsnotify(). All hooks that made use these paired calls and passed FSNOTIFY_EVENT_PATH have been updated accordingly. Signed-off-by: Matthew Bobrowski Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit 9b076f1c0f4869b838a1b7aa0edb5664d47ec8aa Author: Matthew Bobrowski Date: Thu Nov 8 14:07:14 2018 +1100 fanotify: introduce new event mask FAN_OPEN_EXEC A new event mask FAN_OPEN_EXEC has been defined so that users have the ability to receive events specifically when a file has been opened with the intent to be executed. Events of FAN_OPEN_EXEC type will be generated when a file has been opened using either execve(), execveat() or uselib() system calls. The feature is implemented within fsnotify_open() by generating the FAN_OPEN_EXEC event type if __FMODE_EXEC is set within file->f_flags. Signed-off-by: Matthew Bobrowski Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit 2d10b23082a7eb8be508b3789f2e7250a88a5ddb Author: Matthew Bobrowski Date: Thu Nov 8 14:05:49 2018 +1100 fanotify: return only user requested event types in event mask Modify fanotify_should_send_event() so that it now returns a mask for an event that contains ONLY flags for the event types that have been specifically requested by the user. Flags that may have been included within the event mask, but have not been explicitly requested by the user will not be present in the returned value. As an example, given the situation where a user requests events of type FAN_OPEN. Traditionally, the event mask returned within an event that occurred on a filesystem object that has been marked for monitoring and is opened, will only ever have the FAN_OPEN bit set. With the introduction of the new flags like FAN_OPEN_EXEC, and perhaps any other future event flags, there is a possibility of the returned event mask containing more than a single bit set, despite having only requested the single event type. Prior to these modifications performed to fanotify_should_send_event(), a user would have received a bundled event mask containing flags FAN_OPEN and FAN_OPEN_EXEC in the instance that a file was opened for execution via execve(), for example. This means that a user would receive event types in the returned event mask that have not been requested. This runs the possibility of breaking existing systems and causing other unforeseen issues. To mitigate this possibility, fanotify_should_send_event() has been modified to return the event mask containing ONLY event types explicitly requested by the user. This means that we will NOT report events that the user did no set a mask for, and we will NOT report events that the user has set an ignore mask for. The function name fanotify_should_send_event() has also been updated so that it's more relevant to what it has been designed to do. Signed-off-by: Matthew Bobrowski Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit f2b4076988a9c229dab373470b4b108ef0e106c8 Author: Andrei.Stefanescu@microchip.com Date: Tue Nov 13 14:47:37 2018 +0000 regulator: of: add support for parsing regulator-state-standby Set the according constraints for PM_SUSPEND_STANDBY case. Previously, only suspend to mem/disk were taken into consideration. Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit 5279e96ff8033500b6008be5925ae2d20f42c434 Author: Andrei.Stefanescu@microchip.com Date: Tue Nov 13 14:47:33 2018 +0000 regulator: dt-bindings: add regulator-state-standby bindings For state-mem and state-disk regulators can have various parameters applied such as enabled/disabled, current mode, voltage etc. This patch adds documentation on how to set these parameters in the device tree for the standby state. Signed-off-by: Andrei Stefanescu Signed-off-by: Mark Brown commit ef878d6086611eda90755e1f17426f0030000fb1 Author: Md Fahad Iqbal Polash Date: Fri Oct 26 11:44:37 2018 -0700 ice: Remove ICE_MAX_TXQ_PER_TXQG check when configuring Tx queue This patch removes the condition checking of VSI TX queue number to ICE_MAX_TXQ_PER_TXQG. This is an unnecessary check and causes a driver load error on hosts that have more than 128 cores. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 47e3e53ceadc568c038e457661d836f2259ed774 Author: Henry Tieman Date: Fri Oct 26 11:44:36 2018 -0700 ice: Destroy scheduler tree in reset path The scheduler tree is is always rebuilt during reset. The existing code adds new scheduler nodes for queues but may not clean up earlier nodes. This patch removed the old scheduler tree during reset before it is rebuilt. Signed-off-by: Henry Tieman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c5a2a4a38856faed6fa6654746c838231289e8d6 Author: Usha Ketineni Date: Fri Oct 26 11:44:35 2018 -0700 ice: Fix to make VLAN priority tagged traffic to appear on all TCs This patch includes below changes to resolve the issue of ETS bandwidth shaping to work. 1. Allocation of Tx queues is accounted for based on the enabled TC's in ice_vsi_setup_q_map() and enabled the Tx queues on those TC's via ice_vsi_cfg_txqs() 2. Get the mapped netdev TC # for the user priority and set the priority to TC mapping for the VSI. Signed-off-by: Usha Ketineni Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 99fc1057b4d4e2a95c24b3b1ea4d6140eb2712a2 Author: Brett Creeley Date: Fri Oct 26 11:44:34 2018 -0700 ice: Call pci_disable_sriov before stopping queues for VF Previous to this commit the driver was immediately stopping Tx/Rx queues when doing the following "echo 0 > sriov_numvfs" and then it was calling pci_disable_sriov if the VFs are not assigned. This was causing the VIRTCHNL_OP_DISABLE_QUEUES to fail because it was trying to stop the queues for a second time. Fix this by calling pci_disable_sriov before stopping the Tx/Rx queues. This allows the VIRTCHNL_OP_DISABLE_QUEUES to get processed before the driver tries to stop the Rx/Tx queues in ice_free_vfs. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7b8ff0f9cc531ce4367827e335c8bf0488d245f8 Author: Piotr Raczynski Date: Fri Oct 26 11:44:33 2018 -0700 ice: Increase Rx queue disable timeout With much traffic coming into the port, Rx queue disable procedure can take more time until all pending queue requests on PCIe finish. Reuse ICE_Q_WAIT_MAX_RETRY macro and increase the delay itself. Signed-off-by: Piotr Raczynski Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6263e811f4d4418660c20b36a08063c6d2c3fb9d Author: Lev Faerman Date: Fri Oct 26 10:41:05 2018 -0700 ice: Fix NVM mask defines Fixes bad masks that would break compilation when evaluated. Signed-off-by: Lev Faerman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d09e2693b689cc82cd9bae0c4f19f5122708f83e Author: Dave Ertman Date: Fri Oct 26 10:41:04 2018 -0700 ice: Avoid nested RTNL locking in ice_dis_vsi ice_dis_vsi() performs an rtnl_lock() if it detects a netdev that is running on the VSI. In cases where the RTNL lock has already been acquired, a deadlock results. Add a boolean to pass to ice_dis_vsi to tell it if the RTNL lock is already held. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 995c90f2de819b020bdb0758ea4d486b0851e11a Author: Anirudh Venkataramanan Date: Fri Oct 26 10:41:03 2018 -0700 ice: Calculate guaranteed VSIs per function and use it Currently we are setting the guar_num_vsi to equal to ICE_MAX_VSI which is the device limit of 768. This is incorrect and could have unintended consequences. To fix this use the valid_function's 8-bit bitmap returned from discovering device capabilities to determine the guar_num_vsi per function. guar_num_vsi value is then passed on to pf->num_alloc_vsi. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 10e03a22de45699b6208592b85437d87a4741b9b Author: Anirudh Venkataramanan Date: Fri Oct 26 10:41:02 2018 -0700 ice: Remove node before releasing VSI Before releasing the VSI, remove the VSI scheduler node. If not, the node is left in the scheduler tree and, on subsequent load, the scheduler tree contains the node so it does not set it in vsi_ctx. This, later, causes the node to not be found in ice_sched_get_free_qparent which leads to a "Failed to set LAN Tx queue context, error: -1". To remove the scheduler node, this patch introduces ice_rm_vsi_lan_cfg and related helpers. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b354e98f49ce84b969e2c0e2bb44d026ea3c4900 Author: Tony Nguyen Date: Fri Oct 26 10:41:01 2018 -0700 ice: Check for q_vector when stopping rings There is a gap in time between a VF reset, which sets the q_vector to NULL, and the VF requesting mapping of the q_vectors. If ice_vsi_stop_tx_rings() is called during this time, a NULL pointer dereference is encountered. Add a check in ice_vsi_stop_tx_rings() to ensure the q_vector is set to avoid this situation from occurring. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 807bc98d31097bfe22fbf8236413db5490932456 Author: Brett Creeley Date: Fri Oct 26 10:41:00 2018 -0700 ice: Fix debug print in ice_tx_timeout Currently the debug print in ice_tx_timeout is printing useless and duplicate values. First, head is being assigned to tx_ring->next_to_clean and we are printing both of those values, but naming them HWB and NTC respectively. Also, reading tail always returns 0 so remove that as well. Instead of assigning the SW head (NTC) read to head, use the actual head register and change the debug print to note that this is HW_HEAD. Also reduce the scope of a couple variables. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit c51836246f9772dfab8ca7bb945f4a566fe502d5 Author: Firoz Khan Date: Tue Nov 13 12:27:45 2018 +0530 ia64: generate uapi header and system call table files System call table generation script must be run to gener- ate unistd_64.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_64.h and syscall_table.h files by the syscall table generation script invoked by ia64/Makefile and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/entry.S file. Signed-off-by: Firoz Khan Signed-off-by: Tony Luck commit ffec9214544c136406dc3ad43101e34da3491cdd Author: Firoz Khan Date: Tue Nov 13 12:27:44 2018 +0530 ia64: add system call table generation support The system call tables are in different format in all architecture and it will be difficult to manually add, modify or delete the syscall table entries in the res- pective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify the implemen- tation across all architectures. The system call table generation script is added in kernel/syscalls directory which contain the scripts to generate both uapi header file and system call table files. The syscall.tbl will be input for the scripts. syscall.tbl contains the list of available system calls along with system call number and corresponding entry point. Add a new system call in this architecture will be possible by adding new entry in the syscall.tbl file. Adding a new table entry consisting of: - System call number. - ABI. - System call name. - Entry point name. syscallhdr.sh and syscalltbl.sh will generate uapi header unistd_64.h and syscall_table.h files respectively. Both .sh files will parse the content syscall.tbl to generate the header and table files. unistd_64.h will be included by uapi/asm/unistd.h and syscall_table.h is included by kernel/entry.S - the real system call table. ARM, s390 and x86 architecuture does have similar support. I leverage their implementation to come up with a generic solution. Signed-off-by: Firoz Khan Signed-off-by: Tony Luck commit bf03ebfe94eaa7d612e6b030306c5fef8ab20208 Author: Firoz Khan Date: Tue Nov 13 12:27:43 2018 +0530 ia64: add an offset for system call number The system call number in ia64 architecture starts with 1024. But most of the other architecute starts with 0. In order to come up with a common implementation to generate uapi header we need to add an offset - __NR_Linux with a value 1024. One of the patch in this patch series does have a script to generate uapi header which uses syscall.tbl file. In syscall- .tbl contain system call number. With the use of __NR_Linux, we can start the number from 0 instead of 1024. Signed-off-by: Firoz Khan Signed-off-by: Tony Luck commit d7c5e82c08a0fb8b8d5186cdcb6d2c54ada4076b Author: Firoz Khan Date: Tue Nov 13 12:27:42 2018 +0530 ia64: add __NR_syscalls along with NR_syscalls NR_syscalls macro holds the number of system call exist in ia64 architecture. We have to change the value of NR- _syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_sy- scalls value. 1. Update NR_syscalls in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_sys- calls until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_syscalls asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan Signed-off-by: Tony Luck commit d272a735ef54bf0fbf62673f160bd3d335d1a510 Author: Firoz Khan Date: Tue Nov 13 12:27:41 2018 +0530 ia64: add __NR_old_getpagesize in uapi header file sys_getpagesize entry is present in kernel/entry.S file to support for old user interface. So we need to add an uapi entry too. Add __NR_old_getpagesize in uapi/asm/unistd.h in order to not break old user space as it is reserved for backwards compatibility with old __NR_getpagesize. Signed-off-by: Firoz Khan Signed-off-by: Tony Luck commit c1cd5b24d6cebfbfe5aca7e989ed98d773a696ed Author: Ville Syrjälä Date: Mon Oct 22 17:20:15 2018 +0300 drm/i915: Determine DSI panel orientation from VBT VBT appears to have two (or possibly three) ways to indicate the panel rotation. The first is in the MIPI config block, but that apparenly usually (maybe always?) indicates 0 degrees despite the actual panel orientation. The second way to indicate this is in the general features block, which can just indicate whether 180 degress rotation is used. The third might be a separate rotation data block, but that is not at all documented so who knows what it may contain. Let's try the first two. We first try the DSI specicic VBT information, and it it doesn't look trustworthy (ie. indicates 0 degrees) we fall back to the 180 degree thing. Just to avoid too many changes in one go we shall also keep the hardware readout path for now. If this works for more than just my VLV FFRD the question becomes how many of the panel orientation quirks are now redundant? v2: Move the code into intel_dsi.c (Jani) Cc: Hans de Goede Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022142015.4026-1-ville.syrjala@linux.intel.com Tested-by: Hans de Goede commit 86ef615fa11b57ac44ee895136f05712ea905a39 Author: Ville Syrjälä Date: Mon Oct 22 17:19:53 2018 +0300 drm/i915: Fix the VLV/CHV DSI panel orientation hw readout Let's make sure the DSI port is actually on before we go poking at the plane register to determine which way it's rotated. Otherwise we could be looking at a plane that is feeding a HDMI port for instance. And in order to read the plane register we need the power well to be on. Make sure that is indeed the case. We'll also make sure the plane is actually enabled before we trust the rotation bit to tell us the truth. v2: s/intel_dsi/vlv_dsi/ Cc: Hans de Goede Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022141953.3889-1-ville.syrjala@linux.intel.com Tested-by: Hans de Goede Reviewed-by: Maarten Lankhorst #irc commit f255c624c11a5f58ff7c866f2bef6d850905dc20 Author: Ville Syrjälä Date: Thu Nov 8 17:10:13 2018 +0200 drm/i915: Move skip_intermediate_wm handling into ilk_compute_intermediate_wm() No point in cluttering the common codepaths with the skip_intermediate_wm handling. Just move it into ilk_compute_intermediate_wm() as those are the only platforms using this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108151013.24064-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst #irc commit e7a278a329dd8aa2c70c564849f164cb5673689c Author: Ville Syrjälä Date: Mon Oct 29 20:18:20 2018 +0200 drm/i915: Account for scale factor when calculating initial phase To get the initial phase correct we need to account for the scale factor as well. I forgot this initially and was mostly looking at heavily upscaled content where the minor difference between -0.5 and the proper initial phase was not readily apparent. And let's toss in a comment that tries to explain the formula a little bit. v2: The initial phase upper limit is 1.5, not 24.0! Cc: Maarten Lankhorst Fixes: 0a59952b24e2 ("drm/i915: Configure SKL+ scaler initial phase correctly") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181029181820.21956-1-ville.syrjala@linux.intel.com Tested-by: Juha-Pekka Heikkila Tested-by: Maarten Lankhorst #irc Reviewed-by: Maarten Lankhorst #irc commit ca0026790eface29d355c96964207fd393a2f33a Author: Ville Syrjälä Date: Thu Nov 8 17:09:55 2018 +0200 drm/i915: Always write both TILEOFF and LINOFF plane registers Reduce the clutter in the sprite update functions by writing both TILEOFF and LINOFF registers unconditionally. We already did this for primary planes so might as well do it for the sprites too. There is no harm in writing both registers. Which one gets used depends on the tilimg mode selected in the plane control registers. It might even make sense to clear the register that won't get used. That could make register dumps a little easier to parse. But I'm not sure it's worth the extra hassle. Cc: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108150955.23948-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst #irc commit 8ebb50389eed04b989a0d5532f9208c338bf66b8 Author: Fabrizio Castro Date: Wed Nov 7 15:24:27 2018 +0000 arm64: dts: renesas: r8a774a1: Replace clock magic numbers Now that include/dt-bindings/clock/r8a774a1-cpg-mssr.h is in Linus' master branch we can replace clock related magic numbers with the corresponding labels. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven [simon: corrected whitespace] Signed-off-by: Simon Horman commit aeee3d9cb776542f5700425f703fa78c70a1dcd0 Author: Fabrizio Castro Date: Wed Nov 7 15:24:26 2018 +0000 arm64: dts: renesas: r8a774a1: Replace power magic numbers Now that include/dt-bindings/power/r8a774a1-sysc.h is in Linus' master branch we can replace power related magic numbers with the corresponding labels. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 6bd36e0822ca841bbb21d050e80cd690209bd322 Author: Ville Syrjälä Date: Wed Nov 7 19:18:21 2018 +0200 drm/i915: Switch LSPCON to PCON mode if it's in LS mode We no longer change LSPCON into PCON mode if it boots up in LS mode. This was broken by some code shuffling in commit 96e35598cead ("drm/i915: Check LSPCON vendor OUI"). I actually can't see a reason why that code shuffling had to be done. The commit msg notes it but doesn't justify it in any way. But I guess we'll keep the code in its current place anyway and just make the "switch to PCON mode" part effective once again. Cc: Shashank Sharma Cc: Maarten Lankhorst Cc: Tvrtko Ursulin Tested-by: Tvrtko Ursulin Fixes: 96e35598cead ("drm/i915: Check LSPCON vendor OUI") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181107171821.27862-1-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma commit ee678706e46d0d185c27cc214ad97828e0643159 Author: Jagan Teki Date: Tue Nov 13 16:46:08 2018 +0530 clk: sunxi-ng: a64: Fix gate bit of DSI DPHY DSI DPHY gate bit on MIPI DSI clock register is bit 15 not bit 30. Signed-off-by: Jagan Teki Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard commit 7d3cf7d2eccab5d53aa4bb69ddd7c94b67d3d43f Author: Jagan Teki Date: Tue Nov 13 17:45:32 2018 +0530 clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit 4f49b7344201616e327a5f94db0f534025ab814b Author: Jagan Teki Date: Tue Nov 13 17:45:35 2018 +0530 arm64: defconfig: Enable PWM_SUN4I Allwinner PWM support need for ARM64 Allwinner SoC's which used pwms, builds it as module. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit c0b794b1ecbcaa7b57b2b38476ca4e0e3ed34949 Author: Jagan Teki Date: Tue Nov 13 17:45:34 2018 +0530 arm64: defconfig: Enable DRM_SUN8I_DW_HDMI Allwinner DesignWare HDMI is needed for HDMI support in ARM64 Allwinner SoC's, build it as module. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit 1f2ffb63636cea5b0b4f281ae486d77936bda2e8 Author: Jagan Teki Date: Tue Nov 13 17:45:33 2018 +0530 arm64: defconfig: Enable DRM_SUN8I_MIXER Allwinner Display Engine 2.0 Mixer is need for ARM64 Allwinner SoC's, build it as module. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit 0914ade209c452cff6a29b1c0ae6fff3167fa1d0 Author: Nayna Jain Date: Tue Oct 9 23:00:33 2018 +0530 x86/ima: define arch_ima_get_secureboot Distros are concerned about totally disabling the kexec_load syscall. As a compromise, the kexec_load syscall will only be disabled when CONFIG_KEXEC_VERIFY_SIG is configured and the system is booted with secureboot enabled. This patch defines the new arch specific function called arch_ima_get_secureboot() to retrieve the secureboot state of the system. Signed-off-by: Nayna Jain Suggested-by: Seth Forshee Cc: David Howells Cc: Eric Biederman Cc: Peter Jones Cc: Vivek Goyal Cc: Dave Young Signed-off-by: Mimi Zohar commit 59637d5e1693451b03d2979ffbe9d40423ef05d7 Author: Mimi Zohar Date: Fri Nov 9 00:53:40 2018 -0500 integrity: support new struct public_key_signature encoding field On systems with IMA-appraisal enabled with a policy requiring file signatures, the "good" signature values are stored on the filesystem as extended attributes (security.ima). Signature verification failure would normally be limited to just a particular file (eg. executable), but during boot signature verification failure could result in a system hang. Defining and requiring a new public_key_signature field requires all callers of asymmetric signature verification to be updated to reflect the change. This patch updates the integrity asymmetric_verify() caller. Fixes: 82f94f24475c ("KEYS: Provide software public key query function [ver #2]") Signed-off-by: Mimi Zohar Cc: David Howells Acked-by: Denis Kenzior commit 7db647aa8b134059c3b8f26b1dd2e1aa5b91e2ca Author: Neil Armstrong Date: Tue Nov 6 10:40:02 2018 +0100 drm/meson: Add primary plane scaling This patch adds support for the Primary Plane scaling. On the Amlogic GX SoCs, the primary plane is used as On-Screen-Display layer on top of video, and it's needed to keep the OSD layer to a lower size as the physical display size to : - lower the memory bandwidth - lower the OSD rendering - lower the memory usage This use-case is used when setting the display mode to 3840x2160 and the OSD layer is rendered using the GPU. In this case, the GXBB & GXL cannot work on more than 2000x2000 buffer, thus needing the OSD layer to be kept at 1920x1080 and upscaled to 3840x2160 in hardware. The primary plane atomic check still allow 1:1 scaling, allowing native 3840x2160 if needed by user-space applications. Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter [narmstrong: fixed apply from malformed patch] Link: https://patchwork.freedesktop.org/patch/msgid/1541497202-20570-4-git-send-email-narmstrong@baylibre.com commit 20d7fe034a2fda304dd9a8d2eb876f0fcaaef928 Author: Neil Armstrong Date: Tue Nov 6 10:40:01 2018 +0100 drm/meson: move OSD scaler management into plane atomic update In preparation to support the Primary Plane scaling, move the basic OSD Interlace-Only scaler setup code into the primary plane atomic update callback and handle the vsync scaler update like the overlay plane scaling registers update. Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1541497202-20570-3-git-send-email-narmstrong@baylibre.com commit f9a2348196d1ab92e155bdba705db95d8177e886 Author: Neil Armstrong Date: Tue Nov 6 10:40:00 2018 +0100 drm/meson: Support Overlay plane for video rendering The Amlogic Meson GX SoCs support an Overlay plane behind the primary plane for video rendering. This Overlay plane support various YUV layouts : - YUYV - NV12 / NV21 - YUV444 / 422 / 420 / 411 / 410 The scaler supports a wide range of scaling ratios, but for simplicity, plane atomic check limits the scaling from x5 to /5 in vertical and horizontal scaling. The z-order is fixed and always behind the primary plane and cannot be changed. The scaling parameter algorithm was taken from the Amlogic vendor kernel code and rewritten to match the atomic universal plane requirements. The video rendering using this overlay plane support has been tested using the new Kodi DRM-KMS Prime rendering path along the in-review V4L2 Mem2Mem Hardware Video Decoder up to 3840x2160 NV12 frames on various display modes. Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Tested-by: Maxime Jourdan Link: https://patchwork.freedesktop.org/patch/msgid/1541497202-20570-2-git-send-email-narmstrong@baylibre.com commit 09c573ab853ddf429cd165d1ff9852e535a8ce0d Author: Tomas Winkler Date: Fri Oct 26 21:40:43 2018 +0300 tpm: tpm_ibmvtpm: fix kdoc warnings Remove redundant lines in the kdoc: Fixes kdoc warnings: drivers/char/tpm/tpm_ibmvtpm.c:42: warning: Cannot understand * on line 42 - I thought it was a doc line drivers/char/tpm/tpm_ibmvtpm.c:57: warning: Cannot understand * on line 57 - I thought it was a doc line Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 5122b5f0a84659896f170fca6b55dc9b0c608615 Author: Tomas Winkler Date: Fri Oct 26 21:40:42 2018 +0300 tpm: fix kdoc for tpm2_flush_context_cmd() kdoc for tpm2_flush_context_cmd() was off. Fixes: 9aa36b399a50 ("tpm: export tpm2_flush_context_cmd")' Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 01f54664a4db0d612de0ece8e0022f21f9374e9b Author: Tomas Winkler Date: Tue Oct 16 16:37:16 2018 +0300 tpm: tpm_try_transmit() refactor error flow. First, rename out_no_locality to out_locality for bailing out on both tpm_cmd_ready() and tpm_request_locality() failure. Second, ignore the return value of go_to_idle() as it may override the return value of the actual tpm operation, the go_to_idle() error will be caught on any consequent command. Last, fix the wrong 'goto out', that jumped back instead of forward. Cc: stable@vger.kernel.org Fixes: 627448e85c76 ("tpm: separate cmd_ready/go_idle from runtime_pm") Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 95adc6b410b7aa895dcf5ed9cb7dc4a20a3d5c5a Author: Tomas Winkler Date: Fri Oct 19 21:23:07 2018 +0300 tpm: use u32 instead of int for PCR index The TPM specs defines PCR index as a positive number, and there is no reason to use a signed number. It is also a possible security issue as currently no functions check for a negative index, which may become a large number when converted to u32. Adjust the API to use u32 instead of int in all PCR related functions. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c82e59541a226504a3fe45eb4efca70836548da6 Author: Tomas Winkler Date: Fri Oct 19 21:23:06 2018 +0300 tpm1: reimplement tpm1_continue_selftest() using tpm_buf Reimplement tpm1_continue_selftest() using tpm_buf structure. This is the last command using the old tpm_cmd_t structure and now the structure can be removed. Cc: Nayna Jain Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9315e73ac87065acd898d3f15b9f524ca86736a7 Author: Tomas Winkler Date: Fri Oct 19 21:23:05 2018 +0300 tpm1: reimplement SAVESTATE using tpm_buf In tpm1_pm_suspend() function reimplement, TPM_ORD_SAVESTATE comamnd using tpm_buf. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit cfddcb05e13472eba0d7c869704f23a590ef34a8 Author: Tomas Winkler Date: Fri Oct 19 21:23:04 2018 +0300 tpm1: rename tpm1_pcr_read_dev to tpm1_pcr_read() Rename tpm1_pcr_read_dev to tpm1_pcr_read() to match the counterpart tpm2_pcr_read(). Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 5e335b5ecfa52e77c8e055f62155824e0e878587 Author: Tomas Winkler Date: Fri Oct 19 21:23:03 2018 +0300 tpm1: implement tpm1_pcr_read_dev() using tpm_buf structure Implement tpm1_pcr_read_dev() using tpm_buf and remove now unneeded structures from tpm.h Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 7aee9c52d7ac90e19705bf3b429caa51f105174a Author: Tomas Winkler Date: Fri Oct 19 21:23:02 2018 +0300 tpm: tpm1: rewrite tpm1_get_random() using tpm_buf structure 1. Use tpm_buf in tpm1_get_random() 2. Fix comment in tpm_get_random() so it is clear that the function is expected to return number of random bytes. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c22780ff0c764ca25488a41b1f8a629e6aa545da Author: Tomas Winkler Date: Fri Oct 19 21:23:01 2018 +0300 tpm: tpm-space.c remove unneeded semicolon Remove unneeded semicolon in tpm2_map_response_header() Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b6b6036a5d5591762ee1d9fd5ca9c89148d037f0 Author: Tomas Winkler Date: Fri Oct 19 21:23:00 2018 +0300 tpm: tpm-interface.c drop unused macros The commit: "tpm_tis: further simplify calculation of ordinal duration" left unused macros, we can drop them now. Fixes compilation warnings: tpm-interface.c:37:0: warning: macro "TPM_PROTECTED_COMMAND" is not used [-Wunused-macros] tpm-interface.c:36:0: warning: macro "TSC_MAX_ORDINAL" is not used [-Wunused-macros] tpm-interface.c:38:0: warning: macro "TPM_CONNECTION_COMMAND" is not used [-Wunused-macros] Fixes: f72864300139 ("tpm_tis: further simplify calculation of ordinal duration") Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b03c43702e7be68dab9d443afbdc934ee4096b03 Author: Tomas Winkler Date: Fri Oct 19 21:22:59 2018 +0300 tpm: add tpm_auto_startup() into tpm-interface.c Add wrapper tpm_auto_startup() to tpm-interface.c instead of open coded decision between TPM 1.x and TPM 2.x in tpm-chip.c Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9db7fe187c54f216fc58deb062fe8bd5dc0e27d8 Author: Tomas Winkler Date: Fri Oct 19 21:22:58 2018 +0300 tpm: factor out tpm_startup function TPM manual startup is used only from within TPM 1.x or TPM 2.x code, hence remove tpm_startup() function from tpm-interface.c and add two static functions implementations tpm1_startup() and tpm2_startup() into to tpm1-cmd.c and tpm2-cmd.c respectively. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c82a330ceceda28304e37bab35128fa0c9c7f172 Author: Tomas Winkler Date: Fri Oct 19 21:22:57 2018 +0300 tpm: factor out tpm 1.x pm suspend flow into tpm1-cmd.c Factor out TPM 1.x suspend flow from tpm-interface.c into a new function tpm1_pm_suspend() in tpm1-cmd.c Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d4a317563207163ddcf677e5965ffc56ef073514 Author: Tomas Winkler Date: Fri Oct 19 21:22:56 2018 +0300 tpm: move tpm 1.x selftest code from tpm-interface.c tpm1-cmd.c Move the tpm1 selftest code functions to tpm1-cmd.c and adjust callers to use the new function names. 1. tpm_pcr_read_dev() to tpm1_pcr_read_dev(). 2. tpm_continue_selftest() to tpm1_continue_selftest(). 3. tpm_do_selftest() to tpm1_do_selftest() Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 433d390f005d3a89dba5a03a87b5a6c242748de3 Author: Tomas Winkler Date: Fri Oct 19 21:22:55 2018 +0300 tpm: factor out tpm1_get_random into tpm1-cmd.c Factor out get random implementation from tpm-interface.c into tpm1_get_random function in tpm1-cmd.c. No functional changes. Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit f4d916b72feafd70967994f4f5a5d7f371a77ba0 Author: Tomas Winkler Date: Fri Oct 19 21:22:54 2018 +0300 tpm: move tpm_getcap to tpm1-cmd.c 1. Move tpm_getcap to tpm1-cmd. Rename the function to tpm1_getcap. 2. Remove unused tpm_getcap_header with unused constant as this functionality is already implemented using tpm_buf construct. Fixes warning: drivers/char/tpm/tpm-interface.c:452:38: warning: ‘tpm_getcap_header’ defined but not used [-Wunused-const-variable=] static const struct tpm_input_header tpm_getcap_header = { ^~~~~~~~~~~~~~~~~ 3. Drop unused TPM_DIGEST_SIZE. It's already defined in include/linux/tpm.h Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 1ad6640cd61422536968dfe7fe9a32b1840fc2d9 Author: Tomas Winkler Date: Fri Oct 19 21:22:53 2018 +0300 tpm: move tpm1_pcr_extend to tpm1-cmd.c Move tpm1_pcr_extend to tpm1-cmd.c and remove unused pcrextend_header structure and EXTEND_PCR_RESULT_SIZE and EXTEND_PCR_RESULT_BODY_SIZE defines. Fixes warning: drivers/char/tpm/tpm-interface.c:609:38: warning: ‘pcrextend_header’ defined but not used [-Wunused-const-variable=] static const struct tpm_input_header pcrextend_header = { ^~~~~~~~~~~~~~~~ Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Reviewed-by: Nayna Jain Tested-by: Nayna Jain Signed-off-by: Jarkko Sakkinen commit 70a3199a7101421b20ca68f865d771dda23a6883 Author: Tomas Winkler Date: Fri Oct 19 21:22:52 2018 +0300 tpm: factor out tpm_get_timeouts() Factor out tpm_get_timeouts() into tpm2_get_timeouts() and tpm1_get_timeouts() Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d856c00f7d1690b976b4c048012a5f2b5a22428d Author: Tomas Winkler Date: Fri Oct 19 21:22:51 2018 +0300 tpm: add tpm_calc_ordinal_duration() wrapper Add convenient wrapper for ordinal duration computation to remove boiler plate if else statement over TPM2. if (chip->flags & TPM_CHIP_FLAG_TPM2) tpm2_calc_ordinal_duration(chip, ordinal); else tpm1_calc_ordinal_duration(chip, ordinal); Signed-off-by: Tomas Winkler Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b2d6e6de005edf5f2f46b7abacb69a0a1ce75c23 Author: Tomas Winkler Date: Fri Oct 19 21:22:50 2018 +0300 tpm: factor out tpm 1.x duration calculation to tpm1-cmd.c Factor out TPM 1.x commands calculation into tpm1-cmd.c file. and change the prefix from tpm_ to tpm1_. No functional change is done here. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 100b16a6f2906624764b75684922bcdc67404847 Author: Tomas Winkler Date: Fri Oct 19 21:22:49 2018 +0300 tpm: sort objects in the Makefile Make the tpm Makefile a bit more in order by putting objects in one column. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 899102bc45189522e02362cc39b1129ef283f120 Author: Tomas Winkler Date: Fri Oct 19 21:22:48 2018 +0300 tpm2: add new tpm2 commands according to TCG 1.36 1. TPM2_CC_LAST has moved from 182 to 193 2. Convert tpm2_ordinal_duration from an array into a switch statement, as there are not so many commands that require special duration relative to a number of commands, the switch statement function is called tpm2_ordinal_duration_index(). 3. Fix kdoc comments for tpm2_calc_ordinal_duration(). Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 2ba5780ce30549cf57929b01d8cba6fe656e31c5 Author: Tomas Winkler Date: Fri Oct 19 21:22:47 2018 +0300 tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x tpm_i2c_nuvoton calculated commands duration using TPM 1.x values via tpm_calc_ordinal_duration() also for TPM 2.x chips. Call tpm2_calc_ordinal_duration() for retrieving ordinal duration for TPM 2.X chips. Cc: stable@vger.kernel.org Cc: Nayna Jain Signed-off-by: Tomas Winkler Reviewed-by: Nayna Jain Tested-by: Nayna Jain (For TPM 2.0) Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9ef60bd673d1cd5bab882e0997cadc223670a801 Author: YueHaibing Date: Sat Nov 10 02:57:40 2018 +0000 drm/sti: remove set but not used variable 'priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/sti/sti_crtc.c: In function 'sti_crtc_vblank_cb': drivers/gpu/drm/sti/sti_crtc.c:255:22: warning: variable 'priv' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 9e1f05b28009 ("drm/sti: rename files and functions") Signed-off-by: YueHaibing Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1541818660-37168-1-git-send-email-yuehaibing@huawei.com commit fba43f454cdf9caa3185219d116bd2a6e6354552 Author: Takashi Sakamoto Date: Tue Nov 13 12:01:30 2018 +0900 ALSA: oxfw: add support for APOGEE duet FireWire This commit adds support for APOGEE duet FireWire, launched 2007, already discontinued. This model uses Oxford Semiconductor FW971 as its communication engine. Below is information on Configuration ROM of this unit. The unit supports some AV/C commands defined by Audio subunit specification and vendor dependent commands. $ ./hinawa-config-rom-printer /dev/fw1 { 'bus-info': { 'adj': False, 'bmc': False, 'chip_ID': 42949742248, 'cmc': False, 'cyc_clk_acc': 255, 'generation': 0, 'imc': False, 'isc': True, 'link_spd': 3, 'max_ROM': 0, 'max_rec': 64, 'name': '1394', 'node_vendor_ID': 987, 'pmc': False}, 'root-directory': [ ['VENDOR', 987], ['DESCRIPTOR', 'Apogee Electronics'], ['MODEL', 122333], ['DESCRIPTOR', 'Duet'], [ 'NODE_CAPABILITIES', { 'addressing': {'64': True, 'fix': True, 'prv': False}, 'misc': {'int': False, 'ms': False, 'spt': True}, 'state': { 'atn': False, 'ded': False, 'drq': True, 'elo': False, 'init': False, 'lst': True, 'off': False}, 'testing': {'bas': False, 'ext': False}}], [ 'UNIT', [ ['SPECIFIER_ID', 41005], ['VERSION', 65537], ['MODEL', 122333], ['DESCRIPTOR', 'Duet']]]]} Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai commit 66cae477c380d1a652399908de94ec680225bbdb Author: Maxime Jourdan Date: Mon Nov 5 11:45:08 2018 +0100 drm/meson: Use optional canvas provider This is the first step into converting the meson/drm driver to use the canvas module. If a canvas provider node is detected in DT, use it. Otherwise, fall back to what is currently being done. Signed-off-by: Maxime Jourdan Reviewed-by: Neil Armstrong [narmstrong: added back priv in meson_drv_unbind()] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20181105104508.23090-3-mjourdan@baylibre.com commit 2b80b98b722bc8f174275e1bcad2122bd9dacee2 Author: Maxime Jourdan Date: Mon Nov 5 11:45:07 2018 +0100 dt-bindings: display: amlogic, meson-vpu: Add optional canvas provider node Allows using the new canvas provider module if present. Signed-off-by: Maxime Jourdan Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20181105104508.23090-2-mjourdan@baylibre.com commit 60b7e5d98cdcb44db55333c5a145005fbb812928 Author: Jacopo Mondi Date: Thu Nov 8 17:07:24 2018 +0100 pinctrl: sh-pfc: r8a77990: Add VIN[4|5] groups/functions Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car E3. Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 0ea0397a3a12f9720d6acb78a48da796a54e81aa Merge: 913240696ec64 651022382c7f8 Author: Maarten Lankhorst Date: Tue Nov 13 10:58:49 2018 +0100 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next drm-next is forwarded to v4.20-rc1, and we need this to make a patch series apply. Signed-off-by: Maarten Lankhorst commit 270b6eb715573c0d05b75351f804b7b445d88d4b Author: Jacopo Mondi Date: Thu Nov 8 17:07:23 2018 +0100 pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions The VIN4 and VIN5 interfaces support parallel video input. Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car M3-N. Signed-off-by: Jacopo Mondi Reviewed-by: Ulrich Hecht Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 10e78f03da181b24f33a8a77047fb6798126fb46 Author: Jacopo Mondi Date: Thu Nov 8 17:07:27 2018 +0100 pinctrl: sh-pfc: r8a7796: Fix VIN versioned groups Versioned VIN groups can appear on different sets of pins. Using the VIN_DATA_PIN_GROUP macro now supports proper naming of said groups through an optional 'version' argument. Use the 'version' argument for said macro to fix naming of versioned groups for the R-Car M3-W R8A7796 SoC. Fixes: a5c2949ff7bd ("pinctrl: sh-pfc: r8a7796: Deduplicate VIN4 pin definitions") Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 184844ccda4138402846bf4b42c28ac5f16a458a Author: Jacopo Mondi Date: Thu Nov 8 17:07:26 2018 +0100 pinctrl: sh-pfc: r8a7795: Fix VIN versioned groups Versioned VIN groups can appear on different sets of pins. Using the VIN_DATA_PIN_GROUP macro now supports proper naming of said groups through an optional 'version' argument. Use the 'version' argument for said macro to fix naming of versioned groups for the R-Car H3 R8A7795 SoC. Fixes: 9942a5b52990 ("pinctrl: sh-pfc: r8a7795: Deduplicate VIN4 pin definitions") Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 11c8f8df85e77329d5a3cacc08682722cb80b95b Author: Jacopo Mondi Date: Thu Nov 8 17:07:25 2018 +0100 pinctrl: sh-pfc: r8a7792: Fix VIN versioned groups Versioned VIN groups can appear on different sets of pins. Using the VIN_DATA_PIN_GROUP macro now supports proper naming of said groups through an optional 'version' argument. Use the 'version' argument for said macro to fix naming of versioned groups for the R-Car V2H R8A7792 SoC. Fixes: 7dd74bb1f058 ("pinctrl: sh-pfc: r8a7792: Add VIN pin groups") Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit e889b2981511b625d0dbe28add0546175046d107 Author: Jacopo Mondi Date: Thu Nov 8 17:07:22 2018 +0100 pinctrl: sh-pfc: Add optional arg to VIN_DATA_PIN_GROUP VIN data groups may appear on different sets of pins, usually named "vinX_data_[a|b]". The existing VIN_DATA_PIN_GROUP() does not support appending the '_a' or '_b' suffix, leading to the definition of group names not consistent with the ones defined using the SH_PFC_PIN_GROUP() macro. Fix this by making the VIN_DATA_PIN_GROUP macro a variadic one, which accepts an optional 'version' argument. Fixes: 423caa52534f ("pinctrl: sh-pfc: r8a779[01]: Move 'union vin_data' to shared header file") Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 3ad8fbd83fab8125004c6953563779c89331fa25 Author: Dmitry Shifrin Date: Tue Nov 6 21:52:55 2018 +0300 pinctrl: sh-pfc: r8a77970: Add QSPI pins, groups, and functions Add the QSPI{0|1} pins/groups/functions to the R8A77970 PFC driver. [Sergei: ported to the upstream driver, fixed up the swapped QSPI0 SPCLK/ SSL pins, fixed up the comments, moved the QSPI pins/groups/functions to be in the alphanumeric order, removed unneeded empty lines, renamed the patch.] Signed-off-by: Dmitry Shifrin Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 33847a71373cd6aeb185be4806ba8a760de0f4cc Author: Takeshi Kihara Date: Mon Nov 5 22:40:12 2018 +0100 pinctrl: sh-pfc: r8a77990: Add voltage switch operations for SDHI This patch supports the {get,set}_io_voltage operations of SDHI. This operates the IOCTRL30 register on the R8A77990 SoC and makes 1.8V/3.3V signal voltage switch possible. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Reviewed-by: Yoshihiro Shimoda Acked-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven commit 21ac0d58bb2de14f0898871399f88177be2c0438 Author: Takeshi Kihara Date: Mon Nov 5 22:40:11 2018 +0100 pinctrl: sh-pfc: r8a77990: Add SDHI pins, groups and functions This patch adds SDHI{0,1,3} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Reviewed-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven commit eb38c119dd91c61de26f67050671a84064554f7d Author: Chris Brandt Date: Wed Nov 7 12:35:56 2018 -0500 clk: renesas: r7s9210: Add USB clocks Add USB clocks for RZ/A2 Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven commit cfd74017191036871af68368559330507209777c Author: Kuninori Morimoto Date: Thu Nov 8 06:39:20 2018 +0000 mtd: rawnand: sh_flctl: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. As original license mentioned, it is GPL-2.0 in SPDX. Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL". See ${LINUX}/include/linux/module.h "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] Signed-off-by: Kuninori Morimoto Signed-off-by: Miquel Raynal commit 9e3e4d8a093b81a6e5bf453b073a0a531411ab6e Merge: 647ad49ca672b ccda4af0f4b92 Author: Miquel Raynal Date: Tue Nov 13 09:31:46 2018 +0100 Merge tag 'v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into nand/next Linux 4.20-rc2 commit ed60f43d0170e5f589e5285517db2c7b084f7d65 Author: Randy Dunlap Date: Mon Nov 12 09:06:32 2018 -0800 power/supply: fix sc27xx_fuel_gauge build errors Fix build errors when FUEL_GUAGE_SC27XX is enabled but IIO is either not enabled or IIO=m and FUEL_GUAGE_SC27XX=y. ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_get_temp': sc27xx_fuel_gauge.c:(.text+0x1d2): undefined reference to `iio_read_channel_processed' ld: drivers/power/supply/sc27xx_fuel_gauge.o: in function `sc27xx_fgu_probe': sc27xx_fuel_gauge.c:(.text+0x97f): undefined reference to `devm_iio_channel_get' Signed-off-by: Randy Dunlap Cc: linux-pm@vger.kernel.org Acked-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 3e536cff34244959c81575733c9ca60633f74e1b Author: Colin Ian King Date: Mon Nov 12 23:45:56 2018 +0000 net: phy: check if advertising is zero using linkmode_empty A recent change modified variable advertising from a u32 to a link mode array and left the u32 zero comparison, so essential we now have an array being compared to null which is not the intention. Fix this by using the call to linkmode_empty to check if advertising is all zero. Detected by CoverityScan, CID#1475424 ("Array compared against 0") Fixes: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d16a67667c611f00b5ec0017ad2b18f473af13d2 Author: Jens Axboe Date: Mon Nov 12 17:19:32 2018 -0700 ide: don't clear special on ide_queue_rq() entry We can't use RQF_DONTPREP to see if we should clear ->special, as someone could have set that while inserting the request. Make sure we clear it in our ->initialize_rq_fn() helper instead. Fixes: 22ce0a7ccf23 ("ide: don't use req->special") Signed-off-by: Jens Axboe commit e0f7d41e1715ca7479349d8cc2278b0f3b26beb6 Author: Ajay Singh Date: Mon Nov 12 05:45:35 2018 +0000 staging: wilc1000: rename tsf_hi element of network_info struct Rename 'tsf_hi' element in network_info struct as it's not used to store only the higher 32-bit value but the complete 64-bit tsf value. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 68b4f745cf19633568ea459f7a741aef370ea0da Author: Ajay Singh Date: Mon Nov 12 05:45:32 2018 +0000 staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro Make use of 'ENOBUFS' instead of WILC_TX_ERR_NO_BUF macro. The value of WILC_TX_ERR_NO_BUF is -2, which is confusing with ENOENT error code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit d0e41eff4c892092d7a4aba0d9a3771b5939d31f Author: Ajay Singh Date: Mon Nov 12 05:45:29 2018 +0000 staging: wilc1000: added 'WILC_' prefix for constants to have clear namespace For better namespace added 'WILC_' prefix for driver specific constants. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit d378599a6b6d1aeb6cad4d1d66a7ae2a567705ed Author: Ajay Singh Date: Mon Nov 12 05:45:26 2018 +0000 staging: wilc1000: rename firmware related constants to follow better namespace Rename the firmware related macro by prefix with 'WILC_FW_' prefix for a better namespace. Also, move them to wilc_wlan_if.h file along with other FW related macros. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit c140dd91cef098fe3dd45b6f17e3a5143798f57e Author: Ajay Singh Date: Mon Nov 12 05:45:23 2018 +0000 staging: wilc1000: move current_tx_rate enum to wilc_wlan_if.h file Move 'current_tx_rate' enum to wilc_wlan_if.h, to have it along with the other FW related to constants. Also added prefix to have a better namespace. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b997b84ffca6ab6b784a201a5171f6cfa70ac6f7 Author: Ajay Singh Date: Mon Nov 12 05:45:20 2018 +0000 staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h header Rename the macros defined in wilc_wlan_if.h header to have clear namespace. As convention used 'WILC_FW_' prefix for constants defined for firmware and 'WILC_' prefix for driver constants. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 00d54198a7160c1cbfb8a32c94222e605603e9f1 Author: Ajay Singh Date: Mon Nov 12 05:45:17 2018 +0000 staging: wilc1000: restructure macros used to handle security type Restructure the code to have a proper namespace for macro defined to handle the security types. Move them as part of wilc_wlan_if.h header as along with other macro defined for firmware. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 8c4574d6c84c81f3e1b0eef5fca543a56ce7598e Author: Ajay Singh Date: Mon Nov 12 05:45:14 2018 +0000 staging: wilc1000: use enum contants for mac status & added 'WILC_' prefix Clubbed mac status constants inside the enum constant and also added 'WILC_' prefix to have better namespace. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 065a69a922b204c74963588156f924dfbccf9383 Author: Ajay Singh Date: Mon Nov 12 05:45:11 2018 +0000 staging: wilc1000: move sdio_cmd52 & sdio_cmd53 struct to source file Moved sdio_cmd52 & sdio_cmd53 struct from wilc_wlan_if.h, as its used in wilc_sdio.cfile. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit b02aab8fb0615b4f1a1841d1e18314d3f7717ffb Author: Ajay Singh Date: Mon Nov 12 05:45:08 2018 +0000 staging: wilc1000: remove unused macros and struct members in host_interface.h Cleanup patch to remove the unused macros and struct members in host_interface.h header file. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 7e7e278fe39dfaf224430c9e1ca8799ece500f8a Author: Ajay Singh Date: Mon Nov 12 05:45:06 2018 +0000 staging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h header Make use of WLAN_PMKID_LEN macro provided by ieee80211.h header instead of PMKID_LEN. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 2bae293a4cbde9a03c92b606af46b28534bfd77d Author: Ajay Singh Date: Mon Nov 12 05:45:03 2018 +0000 staging: wilc1000: use macro from ieee80211.h in register frame api's Make use of ieee80211.h provided macros and removed the extra macro defined for the same purpose. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit dc19d43f5738c05103fea828e6c15516d1ae49b5 Author: Robert Deal Date: Sat Nov 10 00:04:34 2018 -0500 staging: gasket: formatting fixes Reformat arguments in a few functions in gasket_page_table.c to better follow linux kernel formatting standards. Signed-off-by: Robert Deal Signed-off-by: Greg Kroah-Hartman commit d0894409d1711271cf5060e8ffe9e56359544d19 Author: Paul Burton Date: Thu Nov 8 23:44:56 2018 +0000 lib/gcd: Remove use of CPU_NO_EFFICIENT_FFS macro The CPU_NO_EFFICIENT_FFS pre-processor macro is no longer used, with all architectures toggling the equivalent Kconfig symbol CONFIG_CPU_NO_EFFICIENT_FFS instead. Remove our check for the unused macro. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21046/ Cc: Andrew Morton Cc: Zhaoxiu Zeng Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 57eeacede4db235891ddc37544262413f909763e Author: Paul Burton Date: Thu Nov 8 23:44:55 2018 +0000 MIPS: Use Kconfig to select CPU_NO_EFFICIENT_FFS Select CONFIG_CPU_NO_EFFICIENT_FFS via Kconfig when the kernel is configured for a pre-MIPS32r1 CPU, rather than defining its equivalent in asm/cpu-features.h based upon overrides of cpu_has_mips* macros. The latter only works if a platform has an cpu-feature-overrides.h header which defines cpu_has_mips* macros, which are not generally needed. There are many cases where we know that the target ISA for a kernel build is MIPS32r1 or later & thus includes the CLZ instruction, without requiring any overrides from the platform. Using Kconfig allows us to take those into account, and more naturally make a decision about instruction support using information about the target ISA. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21045/ Cc: Andrew Morton Cc: Zhaoxiu Zeng Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 47bf2b031754ce6f02345a0353f21def75ccd5fc Author: Maksym Kokhan Date: Mon Nov 12 19:00:59 2018 +0200 mips: sort list of configs for Malta Sort configs in menu "Machine selection" under MIPS_MALTA. Signed-off-by: Maksym Kokhan Signed-off-by: Andrii Bordunov Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21099/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 271fee93a4149d00804d7ac45cea1124e07c7331 Author: Maksym Kokhan Date: Mon Nov 12 19:00:58 2018 +0200 mips: delete duplicated BUILTIN_DTB and LIBFDT configs CONFIG_BUILTIN_DTB and CONFIG_LIBFDT selection is duplicated in menu "Machine selection" under MIPS_MALTA. Signed-off-by: Maksym Kokhan Signed-off-by: Andrii Bordunov Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21100/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 03f39f47dc86fc4defbf9b97f8417f192d1ccba6 Author: Alexandre Belloni Date: Sat Nov 10 21:25:44 2018 +0100 rtc: class: remove devm_rtc_device_unregister devm_rtc_device_unregister is not used by any driver and should not be used by any new driver. Signed-off-by: Alexandre Belloni commit 4ff6f0249e213eab98828b2d19e896a143fc7e28 Author: Kuninori Morimoto Date: Thu Nov 8 06:43:22 2018 +0000 rtc: sh: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. As original license mentioned, it is GPL-2.0 in SPDX. Then, MODULE_LICENSE() should be "GPL v2" instead of "GPL". See ${LINUX}/include/linux/module.h "GPL" [GNU Public License v2 or later] "GPL v2" [GNU Public License v2] Signed-off-by: Kuninori Morimoto Signed-off-by: Alexandre Belloni commit 725412d9e07aad88767ad847dcc81d60b617af99 Author: Colin Ian King Date: Thu Nov 1 14:53:52 2018 +0000 rtc: clean up indentation issues, remove extraneous space, add missing tabs Trivial fix to clean up indentation issues, remove spaces, add missing tabs Signed-off-by: Colin Ian King Signed-off-by: Alexandre Belloni commit c50156526a2f7176b50134e3e5fb108ba09791b2 Author: Nathan Chancellor Date: Wed Oct 31 17:55:02 2018 -0700 rtc: omap: Use define directive for PIN_CONFIG_ACTIVE_HIGH Clang warns when one enumerated type is implicitly converted to another: drivers/rtc/rtc-omap.c:574:21: warning: implicit conversion from enumeration type 'enum rtc_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"ti,active-high", PIN_CONFIG_ACTIVE_HIGH, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~ drivers/rtc/rtc-omap.c:579:12: warning: implicit conversion from enumeration type 'enum rtc_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] PCONFDUMP(PIN_CONFIG_ACTIVE_HIGH, "input active high", NULL, false), ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from macro 'PCONFDUMP' .param = a, .display = b, .format = c, .has_arg = d \ ^ 2 warnings generated. It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/144 Signed-off-by: Nathan Chancellor Signed-off-by: Alexandre Belloni commit 36b486bc682114a2f1001cbf1a87f21ae381bfc1 Author: Shirish S Date: Mon Nov 12 12:13:24 2018 +0530 drm/amdgpu: log smu version This patch prints the version of SMU firmware. Signed-off-by: Shirish S Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 2bf011c861b75026d948b199659087ac9bdff026 Author: Daniel Kurtz Date: Mon Nov 12 14:48:12 2018 +0530 drm/amdgpu: refactor smu8_send_msg_to_smc and WARN_ON time out This patch refactors smu8_send_msg_to_smc_with_parameter() to include smu8_send_msg_to_smc_async() so that all the messages sent to SMU can be profiled and appropriately reported if they fail. Signed-off-by: Daniel Kurtz Signed-off-by: Shirish S Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher commit 99b90b5d02e16767c94c41452e480bd530fda111 Author: Florian Fainelli Date: Mon Nov 5 15:09:19 2018 -0800 ARM: BCM63XX: Enable reset controller support Allow BCM63xx to compile support for reset controllers since we will require a specific reset controller to release resets for on-chip peripherals. Signed-off-by: Florian Fainelli commit 7b981b18a48bdf346b5cdb286d45d1fb91da056f Author: Bartlomiej Zolnierkiewicz Date: Mon Oct 15 15:48:27 2018 +0200 ARM: exynos: Remove no longer needed s3c_pm_check_*() calls Since commit 6862fdf2201a ("ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms") s3c_pm_check_*() calls are redundant and can be removed. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski commit b02394aa75e3942bea8dac6efc7f1a179fbe011f Author: Moni Shoua Date: Thu Nov 8 21:10:17 2018 +0200 IB/mlx5: Improve ODP debugging messages Add and modify debug messages to ODP related error flows. In that context, return code EAGAIN is considered less severe and print level for it is set debug instead of warn. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit c353b80ee59574b228a6d3dcef5142c80c403c36 Author: Marek Szyprowski Date: Fri Nov 9 15:59:40 2018 +0100 ARM: dts: exynos: Add missing clocks to RTC node for Arndale board Add missing clocks to SoC build-in RTC device to make it fully operational on Exynos5250-based Arndale board. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 90290db7669ba680b37b7006cbf6e5cee6cba779 Author: Moni Shoua Date: Thu Nov 8 21:10:14 2018 +0200 net/mlx5: Use multi threaded workqueue for page fault handling Page fault events are processed in a workqueue context. Since each QP can have up to two concurrent unrelated page-faults, one for requester and one for responder, page-fault handling can be done in parallel. Achieve this by changing the workqueue to be multi-threaded. The number of threads is the same as the number of command interface channels to avoid command interface bottlenecks. In addition to multi-threads, change the workqueue flags to give it high priority. Stress benchmark shows that before this change 85% of page faults were waiting in queue 8 seconds or more while after the change 98% of page faults were waiting in queue 64 milliseconds or less. The number of threads was chosen as the number of channels to the command interface. Fixes: d9aaed838765 ("{net,IB}/mlx5: Refactor page fault handling") Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit ef90c5e9757d5abc80b947cbcaacc43d1e916488 Author: Moni Shoua Date: Thu Nov 8 21:10:13 2018 +0200 net/mlx5: Return success for PAGE_FAULT_RESUME in internal error state When the device is in internal error state, command interface isn't accessible and the driver decides which commands to fail and which to pass. Move the PAGE_FAULT_RESUME command to the pass list in order to avoid redundant failure messages. Fixes: 89d44f0a6c73 ("net/mlx5_core: Add pci error handlers to mlx5_core driver") Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 56403a43c1557d8d0e475d020e1a20b068bd2791 Author: Krzysztof Kozlowski Date: Wed Jul 25 17:55:17 2018 +0200 ARM: dts: exynos: Add compatible for s5m8767 clocks node on Itop Core The bindings for s2mps11/s5m8767 clocks driver require a compatible for clocks node. Parent MFD sec-core driver will also use it when instantiating children. The compatible is not needed for proper working because device will be anyway created by parent MFD device. Add it for correctness. Signed-off-by: Krzysztof Kozlowski commit 032080ab43ac02cf7446b3954ace7ccce1abcad6 Author: Moni Shoua Date: Thu Nov 8 21:10:12 2018 +0200 IB/mlx5: Lock QP during page fault handling When page fault event for a WQE arrives, the event data contains the resource (e.g. QP) number which will later be used by the page fault handler to retrieve the resource. Meanwhile, another context can destroy the resource and cause use-after-free. To avoid that, take a reference on the resource when handler starts and release it when it ends. Page fault events for RDMA operations don't need to be protected because the driver doesn't need to access the QP in the page fault handler. Fixes: d9aaed838765 ("{net,IB}/mlx5: Refactor page fault handling") Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 3f9d8677b73bbf62f7e53a165a88f953d1dca926 Author: Krzysztof Kozlowski Date: Wed Jul 25 17:55:16 2018 +0200 ARM: dts: exynos: Add compatible for s2mps11 clocks node on Exynos542x The bindings for s2mps11/s5m8767 clocks driver require a compatible for clocks node. Parent MFD sec-core driver will also use it when instantiating children. The compatible is not needed for proper working because device will be anyway created by parent MFD device. Add it for correctness. Signed-off-by: Krzysztof Kozlowski commit c99fefea2cc907c98e7f39b3571bb697c8d42106 Author: Moni Shoua Date: Thu Nov 8 21:10:11 2018 +0200 net/mlx5: Enumerate page fault types Give meaningful names to type of WQE page faults. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 27e95603f4dfec470c6d26bea5174aa71b30e971 Author: Moni Shoua Date: Thu Nov 8 21:10:10 2018 +0200 net/mlx5: Add interface to hold and release core resources Sometimes upper layers may want to prevent the destruction of a core resource for a period of time while work on that resource is in progress. Add API to support this. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 698114968a22f6c0c9f42e983ba033cc36bb7217 Author: Moni Shoua Date: Thu Nov 8 21:10:08 2018 +0200 net/mlx5: Release resource on error flow Fix reference counting leakage when the event handler aborts due to an unsupported event for the resource type. Fixes: a14c2d4beee5 ("net/mlx5_core: Warn on unsupported events of QP/RQ/SQ") Signed-off-by: Moni Shoua Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky commit 2c80920f66f2333dd140715450d220724af3a400 Author: Krzysztof Kozlowski Date: Mon Jul 23 19:53:01 2018 +0200 ARM: exynos: Remove legacy setting of external wakeup interrupts Since Exynos/S5Pv210 pin-controller driver is taking care about setting the external wakeup interrupts mask, the legacy code can be removed. Signed-off-by: Krzysztof Kozlowski Cc: Tomasz Figa Cc: Sylwester Nawrocki Acked-by: Tomasz Figa commit 383acb0dac033ba0fafd104a8094f0c46ff49258 Author: Krzysztof Kozlowski Date: Mon Jul 23 19:53:00 2018 +0200 ARM: s5pv210: Remove legacy setting of external wakeup interrupts Since Exynos/S5Pv210 pin-controller driver is taking care about setting the external wakeup interrupts mask, the legacy code can be removed. Signed-off-by: Krzysztof Kozlowski Cc: Tomasz Figa Cc: Sylwester Nawrocki Acked-by: Tomasz Figa commit d88bb418b7cc0525254cb1723a40b7b4133bad01 Author: Gerald Baeza Date: Thu Jul 27 16:50:20 2017 +0000 ARM: stm32: debug: add low-level debug support This adds low-level debug support on USART1 for STM32F4 and STM32F7. Compiled via 'CONFIG_DEBUG_LL' and 'CONFIG_EARLY_PRINTK'. Enabled via 'earlyprintk' in bootargs. Signed-off-by: Gerald Baeza Signed-off-by: Bich Hemon Acked-by: Alexandre TORGUE Signed-off-by: Olof Johansson commit 63ac3328f0d1d37f286e397b14d9596ed09d7ca5 Author: Lionel Landwerlin Date: Mon Nov 12 12:39:31 2018 +0000 drm/i915: fix broadwell EU computation subslice_mask is an array indexed by slice, not subslice. Signed-off-by: Lionel Landwerlin Fixes: 8cc7669355136f ("drm/i915: store all subslice masks") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108712 Reviewed-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181112123931.2815-1-lionel.g.landwerlin@intel.com commit 261501d94e803c2eee229717b048063724a7be17 Merge: 30beabb3c3212 6ba8457402679 Author: David S. Miller Date: Mon Nov 12 09:09:51 2018 -0800 Merge branch 'sctp-add-support-for-sk_reuseport' Xin Long says: ==================== sctp: add support for sk_reuseport sctp sk_reuseport allows multiple socks to listen on the same port and addresses, as long as these socks have the same uid. This works pretty much as TCP/UDP does, the only difference is that sctp is multi-homing and all the bind_addrs in these socks will have to completely matched, otherwise listen() will return err. The below is when 5 sockets are listening on 172.16.254.254:6400 on a server, 26 sockets on a client connect to 172.16.254.254:6400 and each may be processed by a different socket on the server which is selected by hash(lport, pport, paddr) in reuseport_select_sock(): # ss --sctp -nn State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 10 172.16.254.254:6400 *:* `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.2.1:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.2.4:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.3.3:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.3.4:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.5.2:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.5.3:1234 LISTEN 0 10 172.16.254.254:6400 *:* `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.1.3:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.1.4:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.3.2:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.4.1:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.4.2:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.4.3:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.4.4:1234 LISTEN 0 10 172.16.254.254:6400 *:* `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.1.2:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.3.5:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.4.5:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.253.253:1234 LISTEN 0 10 172.16.254.254:6400 *:* `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.2.2:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.2.3:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.5.4:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.5.5:1234 LISTEN 0 10 172.16.254.254:6400 *:* `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.1.1:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.1.5:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.2.5:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.3.1:1234 `- ESTAB 0 0 172.16.254.254%eth1:6400 172.16.5.1:1234 ==================== Signed-off-by: David S. Miller commit 6ba84574026792ce33a40c7da721dea36d0f3973 Author: Xin Long Date: Mon Nov 12 18:27:17 2018 +0800 sctp: process sk_reuseport in sctp_get_port_local When socks' sk_reuseport is set, the same port and address are allowed to be bound into these socks who have the same uid. Note that the difference from sk_reuse is that it allows multiple socks to listen on the same port and address. Acked-by: Neil Horman Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe Author: Xin Long Date: Mon Nov 12 18:27:16 2018 +0800 sctp: add sock_reuseport for the sock in __sctp_hash_endpoint This is a part of sk_reuseport support for sctp. It defines a helper sctp_bind_addrs_check() to check if the bind_addrs in two socks are matched. It will add sock_reuseport if they are completely matched, and return err if they are partly matched, and alloc sock_reuseport if all socks are not matched at all. It will work until sk_reuseport support is added in sctp_get_port_local() in the next patch. v1->v2: - use 'laddr->valid && laddr2->valid' check instead as Marcelo pointed in sctp_bind_addrs_check(). Acked-by: Neil Horman Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 532ae2f10e6eab2ec66ecad805d57d3d70cea020 Author: Xin Long Date: Mon Nov 12 18:27:15 2018 +0800 sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint This is a part of sk_reuseport support for sctp, and it selects a sock by the hashkey of lport, paddr and dport by default. It will work until sk_reuseport support is added in sctp_get_port_local() in the next patch. v1->v2: - define lport as __be16 instead of __be32 as Marcelo pointed in __sctp_rcv_lookup_endpoint(). Acked-by: Neil Horman Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 26b76320a8a550472bbb8f42257df83fcb8d8df6 Merge: f09c296ebf407 ccda4af0f4b92 Author: James Morris Date: Mon Nov 12 09:07:41 2018 -0800 Merge tag 'v4.20-rc2' into next-general Sync to Linux 4.20-rc2 for downstream developers. commit d4d592a6eeda1e381f38f398e7a0474a599c11ed Author: Lance Roy Date: Thu Oct 4 23:45:50 2018 -0700 KVM: arm/arm64: vgic: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Marc Zyngier Cc: Eric Auger Cc: linux-arm-kernel@lists.infradead.org Cc: Signed-off-by: Paul E. McKenney Acked-by: Christoffer Dall commit 35f3aa39f243e8c95e12a2b2d05b1d2e62ac58a4 Author: Lance Roy Date: Thu Oct 4 23:45:47 2018 -0700 mm: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Andrew Morton Cc: "Kirill A. Shutemov" Cc: Yang Shi Cc: Matthew Wilcox Cc: Mel Gorman Acked-by: Vlastimil Babka Cc: Jan Kara Cc: Shakeel Butt Cc: Signed-off-by: Paul E. McKenney commit 04547728b7b775333a4f6fbb3c55102a79dc4596 Author: Lance Roy Date: Thu Oct 4 23:45:46 2018 -0700 locking/mutex: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Signed-off-by: Paul E. McKenney commit 456a737896b25e4853bbf3d6ca5a1c8ee4df4ee9 Author: Lance Roy Date: Thu Oct 4 23:45:44 2018 -0700 userfaultfd: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Alexander Viro Cc: Signed-off-by: Paul E. McKenney commit 97eeebea894283c290ead6694b76f575e7654773 Author: Lance Roy Date: Thu Oct 4 23:45:42 2018 -0700 smsc: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Steve Glendinning Cc: "David S. Miller" Cc: Signed-off-by: Paul E. McKenney commit 013ff4a6e7bc5aa64b0b937daae0244e3c93e49c Author: Lance Roy Date: Thu Oct 4 23:45:41 2018 -0700 sfc: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Solarflare linux maintainers Cc: Bert Kenward Cc: "David S. Miller" Cc: Signed-off-by: Paul E. McKenney Acked-by: Edward Cree commit 3d709ab5a1767d422223e84cf5c20f0d33738274 Author: Paul E. McKenney Date: Sun Nov 11 10:49:10 2018 -0800 checkpatch.pl: Suggest lockdep instead of asserting !spin_is_locked() This commit points people who might otherwise code up something like WARN_ON(!spin_is_locked(&mylock)) to lockdep_assert_held(&mylock). Signed-off-by: Paul E. McKenney Cc: Andy Whitcroft Cc: Joe Perches commit 9189c7e706038a508567cb2e46ccdb68b08f4ac7 Author: Joe Perches Date: Fri Sep 7 15:26:18 2018 -0700 checkpatch: Create table of obsolete APIs and apply to RCU This patch creates a deprecated_apis map, which allows such APIs to be flagged with suggested replacements more compactly and straightforwardly. It also uses this map to flag the old flavorful RCU APIs as deprecated, suggesting their vanilla-RCU counterparts as replacements. Signed-off-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Paul E. McKenney [ paulmck: Merged with earlier less-deft approach. ] commit b430c588bed984e4ed524e519a8c78862e94f1b3 Author: Paul E. McKenney Date: Mon Nov 5 21:58:13 2018 -0800 MAINTAINERS: Add Joel Fernandes as RCU reviewer Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes commit 5f1a6ef3746f536157922197d98676fa21154549 Author: Paul E. McKenney Date: Mon Oct 29 07:36:50 2018 -0700 rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() Subtracting INT_MIN can be interpreted as unconditional signed integer overflow, which according to the C standard is undefined behavior. Therefore, kernel build arguments notwithstanding, it would be good to future-proof the code. This commit therefore substitutes INT_MAX for INT_MIN in order to avoid undefined behavior. While in the neighborhood, this commit also creates some meaningful names for INT_MAX and friends in order to improve readability, as suggested by Joel Fernandes. Reported-by: Ran Rozenstein Signed-off-by: Paul E. McKenney commit 117f683c6e0104e1d6dfe8f143ea9c24ab069044 Author: Paul E. McKenney Date: Mon Nov 5 14:20:57 2018 -0800 rcu: Replace this_cpu_ptr() with __this_cpu_read() Because __this_cpu_read() can be lighter weight than equivalent uses of this_cpu_ptr(), this commit replaces the latter with the former. Signed-off-by: Paul E. McKenney commit 05f415715ce45da07a0b1a5eac842765b733157f Author: Paul E. McKenney Date: Tue Oct 16 04:12:58 2018 -0700 rcu: Speed up expedited GPs when interrupting RCU reader In PREEMPT kernels, an expedited grace period might send an IPI to a CPU that is executing an RCU read-side critical section. In that case, it would be nice if the rcu_read_unlock() directly interacted with the RCU core code to immediately report the quiescent state. And this does happen in the case where the reader has been preempted. But it would also be a nice performance optimization if immediate reporting also happened in the preemption-free case. This commit therefore adds an ->exp_hint field to the task_struct structure's ->rcu_read_unlock_special field. The IPI handler sets this hint when it has interrupted an RCU read-side critical section, and this causes the outermost rcu_read_unlock() call to invoke rcu_read_unlock_special(), which, if preemption is enabled, reports the quiescent state immediately. If preemption is disabled, then the report is required to be deferred until preemption (or bottom halves or interrupts or whatever) is re-enabled. Because this is a hint, it does nothing for more complicated cases. For example, if the IPI interrupts an RCU reader, but interrupts are disabled across the rcu_read_unlock(), but another rcu_read_lock() is executed before interrupts are re-enabled, the hint will already have been cleared. If you do crazy things like this, reporting will be deferred until some later RCU_SOFTIRQ handler, context switch, cond_resched(), or similar. Reported-by: Joel Fernandes Signed-off-by: Paul E. McKenney Acked-by: Joel Fernandes (Google) commit 0a89e5a402e957a97129423599a6ef6342da2764 Author: Paul E. McKenney Date: Mon Oct 15 10:00:58 2018 -0700 rcu: Trace end of grace period before end of grace period Currently, rcu_gp_cleanup() traces the end of the old grace period after the old grace period has officially ended. This might make intuitive sense, but it also makes for confusing event-trace output because the "end" trace displays not the old but instead the new grace-period number. This commit therefore traces the end of an old grace period just before that grace period officially ends. Reported-by: Aravinda Prasad Signed-off-by: Paul E. McKenney commit 2320bda26df75c02f86c9fa42c3355ebcd16d8ed Author: Zhouyi Zhou Date: Mon Oct 8 06:50:41 2018 +0000 rcu: Adjust the comment of function rcu_is_watching Because RCU avoids interrupting idle CPUs, rcu_is_watching() is used to test whether or not it is currently legal to run RCU read-side critical sections on this CPU. However, the first sentence and last sentences of current comment for rcu_is_watching have opposite meaning of what is expected. This commit therefore fixes this header comment. Signed-off-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney commit c669c014d1dae9c7cdbfff049c798722f8650829 Author: Paul E. McKenney Date: Tue Oct 2 12:42:21 2018 -0700 rcu: Add jiffies-since-GP-activity to show_rcu_gp_kthreads() This commit adds a printout of the number of jiffies since the last time that the RCU grace-period kthread did any processing. This can be useful when tracking down forward-progress issues. Signed-off-by: Paul E. McKenney commit 691960197e8daa39bf89886ba2e39de1e33f1ce4 Author: Paul E. McKenney Date: Tue Oct 2 11:24:08 2018 -0700 rcu: Add state name to show_rcu_gp_kthreads() output This commit adds the name of the RCU grace-period state to the show_rcu_gp_kthreads() output in order to ease debugging. This commit also moves gp_state_getname() up in the code so that show_rcu_gp_kthreads() can use it. Signed-off-by: Paul E. McKenney commit 791416c47153b45f640d52baaf30995d9d396a08 Author: Paul E. McKenney Date: Mon Oct 1 15:42:44 2018 -0700 rcu: Parameterize rcu_check_gp_start_stall() In order to debug forward-progress stalls, it is necessary to check for excessively delayed grace-period starts. This is currently done for RCU CPU stall warnings by rcu_check_gp_start_stall(), which checks to see if the start of a requested grace period has been delayed by an RCU CPU stall warning period. Because rcutorture will need to check for the time consumed by an RCU forward-progress delay, this commit promotes gpssdelay from a local variable to a formal parameter. It is not necessary to export rcu_check_gp_start_stall() because rcutorture will access it via a wrapper function. Signed-off-by: Paul E. McKenney commit b3c1d9ec7c59feadd22693f43145d8285bd35b04 Author: Paul E. McKenney Date: Mon Oct 1 13:25:32 2018 -0700 rcu: Avoid double multiply by HZ The rcu_check_gp_start_stall() function multiplies the return value from rcu_jiffies_till_stall_check() by HZ, but the units are already in jiffies. This commit therefore avoids the need for introduction of a jiffies-squared unit by removing the extraneous multiplication. Signed-off-by: Paul E. McKenney commit 1dfddcdb95c426acbf9b54414fcc802e49a5aaca Author: Paul E. McKenney Date: Fri Sep 14 09:50:11 2018 -0700 MAINTAINERS: Update from @linux.vnet.ibm.com to @linux.ibm.com IBM's patch-friendly email infrastructure is changing domains from @linux.vnet.ibm.com to @linux.ibm.com, which if nothing else might save a bit of typing. This commit therefore updates us stragglers' email addresses in the MAINTAINERS file. The old addresses are expected to continue to work for a few more months. While in the neighborhood, remove some obsolete entries, which results in an orphaned subsystem: "JSM Neo PCI based serial card". Signed-off-by: Paul E. McKenney Cc: Douglas Miller Cc: Eddie James Cc: Frank Haverkamp Cc: Frederic Barrat Cc: John Allen Cc: Manoj N. Kumar Cc: Matthew R. Ochs Cc: Michael Cyr Cc: Naveen N. Rao Cc: Paulo Flabiano Smorigo Cc: Philip Kelleher Cc: Steven Royer Cc: Thomas Falcon Cc: Tyrel Datwyler Cc: Uma Krishnan Acked-by: James Bottomley Acked-by: Mimi Zohar commit 97b59370fa5959d5833a54f303f640d094af3d3c Author: Joel Fernandes (Google) Date: Sat Oct 27 21:30:46 2018 -0700 doc: Fix "struction" typo in RCU memory-ordering documentation This commit replaces "struction" with the correct "structure". Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a78ad16c7f0f948284d6927be95bc0e31a7b170b Author: Joel Fernandes (Google) Date: Mon Oct 29 22:15:59 2018 -0700 doc: Correct parameter in stallwarn The stallwarn document incorrectly mentions 'fps=' instead of 'fqs='. This commit orrects that. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 97562c018135a9d01c59bd3bf95a9458548b79e2 Author: Paul E. McKenney Date: Mon Oct 15 10:54:13 2018 -0700 doc: RCU scheduler spinlock rcu_read_unlock() restriction remains Given RCU flavor consolidation, when rcu_read_unlock() is invoked with interrupts disabled, the reporting of the corresponding quiescent state is deferred until interrupts are re-enabled. There was therefore some hope that this would allow dropping the restriction against holding scheduler spinlocks across an rcu_read_unlock() without disabling interrupts across the entire corresponding RCU read-side critical section. Unfortunately, the need to quickly provide a quiescent state to expedited grace periods sometimes requires a call to raise_softirq() during rcu_read_unlock() execution. Because raise_softirq() can sometimes acquire the scheduler spinlocks, the restriction must remain in effect. This commit therefore updates the RCU requirements documentation accordingly. Signed-off-by: Paul E. McKenney commit 97949f0176da396c32e7c881cbfbc61642fb1266 Author: Joel Fernandes (Google) Date: Sun Oct 14 19:29:42 2018 -0700 doc: Make listing in RCU perf/scale requirements use rcu_assign_pointer() The code listing under this section has a quick quiz that says line 19 uses rcu_access_pointer, but the code listing itself instead uses rcu_dereference(). This commit therefore makes the code listing match the quick quiz. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 8b9df28d7f2e50dc1be758e98dad61ec77d6f6b5 Author: Joel Fernandes (Google) Date: Sun Oct 14 14:29:55 2018 -0700 doc: Remove obsolete (non-)requirement about disabling preemption The Requirements.html document says "Disabling Preemption Does Not Block Grace Periods". However this is no longer true with the RCU consolidation. This commit therefore removes the obsolete (non-)requirement entirely. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 93eb14201fc690687c2d94865bc38c1aa23356b8 Author: Joel Fernandes (Google) Date: Mon Oct 8 18:33:41 2018 -0700 doc: Make reader aware of rcu_dereference_protected The whatisRCU.txt document says rcu_dereference() cannot be used outside of rcu_read_lock() protected sections. The commit adds a mention of rcu_dereference_protected(), so that the new reader knows that this API can be used to avoid update-side use of rcu_read_lock() and rcu_read_unlock(). Cc: tytso@mit.edu Suggested-by: tytso@mit.edu Signed-off-by: Joel Fernandes (Google) [ paulmck: Update wording, including further feedback from Joel. ] Signed-off-by: Paul E. McKenney commit 1c7d6d4411a1ce7530cbdc4605261c560e07d51a Author: Joel Fernandes (Google) Date: Fri Oct 5 16:18:14 2018 -0700 doc: rcu: Encourage use of rcu_barrier in checklist The checklist suggests rcu_barrier_bh() for RCU-bh and similarly for sched, however these APIs are now implemented as rcu_barrier() itself due to the RCU consolidation. This commit therefore corrects checklist.txt to encourage use of the underlying rcu_barrier() API. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit e060a03a1c9288f169297c7461ae1e4790b6c53a Author: Joel Fernandes (Google) Date: Fri Oct 5 16:18:13 2018 -0700 doc: rcu: Remove obsolete checklist item about synchronize_rcu usage Since the RCU mechanisms have been consolidated, the checklist item warning that synchronize_rcu() waits only for RCU readers is obsolete. This commit therefore removes this checklist item. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit bc2072c9adebd6ed1a192ed55ae195d8fb415c8d Author: Joel Fernandes (Google) Date: Fri Oct 5 16:18:12 2018 -0700 doc: rcu: Remove obsolete suggestion from checklist call_rcu_bh is now implemented in terms of call_rcu, so the suggestion to use a different API for speed benefits is not accurate anymore. This commit updates the document accordingly. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 090c1685fd628a8c191d77b5267a7dc226246a5b Author: Joel Fernandes (Google) Date: Fri Oct 5 16:18:11 2018 -0700 doc: rcu: Add more rationale for using rcu_read_lock_sched in checklist This commit explains why rcu_read_lock_sched is better than using preempt_disable. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 3398496483df3508764d24917deaa8ab5176969e Author: Joel Fernandes (Google) Date: Fri Oct 5 16:18:10 2018 -0700 doc: rcu: Update core and full API in whatisRCU RCU consolidation effort causes the update side of the RCU API to be consistent across all the 3 RCU flavors (normal, sched, bh). This commit therefore updates the full API in the whatisRCU document, thus encouraging people to use the consolidated RCU update API instead of the old RCU-bh and RCU-sched update APIs. Also rcu_dereference is documented to be the same for all 3 mechanisms (even before the consolidation), however its actually different - as using the right rcu_dereference primitive (such as rcu_dereference_bh for bh) is needed to make lock debugging work correctly. This update also corrects that. Also, add local_bh_disable() and local_bh_enable() as softirq protection primitives and correct a grammar error in a quiz answer. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit ed8f6fb247785d98ffe6babcf93b7bedd2c88fd8 Author: Paul E. McKenney Date: Mon Oct 1 08:38:54 2018 -0700 doc: Document rcutorture forward-progress test kernel parameters Signed-off-by: Paul E. McKenney commit 70f0508caba2ccb564337e7a2ac4816b094abc00 Author: Joel Fernandes (Google) Date: Tue Sep 25 11:26:01 2018 -0700 doc: rcu: Update description of gp_seq fields in rcu_data The rcu_state structure doesn't have a gp_seq_needed field. Update the description under rcu_data accordingly, to reflect this. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 82eccec851478e55bfd398d7e9d03300026fc4a9 Author: Joel Fernandes (Google) Date: Tue Sep 25 11:26:00 2018 -0700 doc: rcu: Better clarify the rcu_segcblist ->len field An important note under the rcu_segcblist description could use a more detailed description. Especially explanation of the scenario where the ->head field may be temporarily NULL making it not wise to rely on it to determine if callbacks are associated with the rcu_segcblist. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit b54d9db26031d6dc96222164092eacbaa0329255 Author: Joel Fernandes (Google) Date: Wed Oct 3 17:40:28 2018 -0700 doc: rcu: Update Data-Structures for RCU flavor consolidation This patch updates all Data-Structures document figures and text and removes some unwanted figures, to reflect the recent work Paul has been doing with consolidating all flavors of RCU. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit c9b6f899e120c83ef144b3d4a8365413ef49cce4 Author: Joel Fernandes (Google) Date: Wed Oct 3 17:37:25 2018 -0700 doc: Remove rcu_dynticks from Data-Structures rcu_dynticks was folded into rcu_data structure. Update the data structures RCU document accordingly. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 5cc379a42acd7104747077db7aaf4b01115ee484 Author: Joel Fernandes (Google) Date: Tue Sep 25 11:25:57 2018 -0700 doc: Update information about resched_cpu Since commit fced9c8cfe6b ("rcu: Avoid resched_cpu() when rescheduling the current CPU"), resched_cpu is not directly called from sync_sched_exp_handler. Update the documentation about the same. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit f0ad56e876cdd67730065274625edbcfe0cca278 Author: Paul E. McKenney Date: Mon Oct 22 08:33:06 2018 -0700 rcu: Eliminate BUG_ON() for kernel/rcu/update.c The update.c file has a number of calls to BUG_ON(), which panics the kernel, which is not a good strategy for devices (like embedded) that don't have a way to capture console output. This commit therefore converts these BUG_ON() calls to WARN_ON_ONCE() and WARN_ONCE(). Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney commit 9213784b48f8ba666b4695ca3f5d34f583daab83 Author: Paul E. McKenney Date: Mon Oct 22 08:26:00 2018 -0700 rcu: Eliminate BUG_ON() for kernel/rcu/tree_plugin.h The tree_plugin.h file has a number of calls to BUG_ON(), which panics the kernel, which is not a good strategy for devices (like embedded) that don't have a way to capture console output. This commit therefore converts these BUG_ON() calls to WARN_ON_ONCE() and WARN_ONCE(). Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney [ paulmck: Fix typo: s/rcuo/rcub/. ] commit 913240696ec64a2af2de250b1591cc45b5cea2f6 Author: Chris Wilson Date: Mon Nov 12 15:21:30 2018 +0000 drm/syncobj: Fix compilation following partial revert We need to include the revert of commit 783195ec1cad ("drm/syncobj: disable the timeline UAPI for now v2") along with undoing the change to drm/i915. Fixes: 131280a162e7 ("drm: Revert syncobj timeline changes.") Cc: Christian König Cc: Daniel Vetter Cc: Chunming Zhou Cc: Eric Anholt Cc: Joonas Lahtinen Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Reviewed-by: Christian König Signed-off-by: Chris Wilson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181112152130.12275-1-chris@chris-wilson.co.uk commit 628bd85947091830a8c4872adfd5ed1d515a9cf2 Author: Tetsuo Handa Date: Mon Nov 12 08:42:14 2018 -0700 loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl() Commit 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex") forgot to remove mutex_unlock(&loop_ctl_mutex) from loop_control_ioctl() when replacing loop_index_mutex with loop_ctl_mutex. Fixes: 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex") Reported-by: syzbot Reviewed-by: Ming Lei Reviewed-by: Jan Kara Signed-off-by: Tetsuo Handa Signed-off-by: Jens Axboe commit 8b19faf6fae2867e2c177212c541e8ae36aa4d32 Author: Johan Jonker Date: Sat Nov 3 23:54:13 2018 +0100 clk: rockchip: fix typo in rk3188 spdif_frac parent Fix typo in common_clk_branches. Make spdif_pre parent of spdif_frac. Fixes: 667464208989 ("clk: rockchip: include downstream muxes into fractional dividers") Cc: stable@vger.kernel.org Signed-off-by: Johan Jonker Acked-by: Elaine Zhang Signed-off-by: Heiko Stuebner commit b9660987692230b381b64c1f1e912febe142c390 Author: Taehee Yoo Date: Wed Nov 7 00:33:07 2018 +0900 netfilter: nf_flow_table: simplify nf_flow_offload_gc_step() nf_flow_offload_gc_step() and nf_flow_table_iterate() are very similar. so that many duplicate code can be removed. After this patch, nf_flow_offload_gc_step() is simple callback function of nf_flow_table_iterate() like nf_flow_table_do_cleanup(). Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit 49de9c090f3cc747cb7f2dc79c175d7bd1d3f1e7 Author: Taehee Yoo Date: Wed Nov 7 00:32:49 2018 +0900 netfilter: nf_flow_table: make nf_flow_table_iterate() static nf_flow_table_iterate() is local function, make it static. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso commit f905c2fc3980a41aeccb8673ab10ed5e616391fd Author: Jan Kara Date: Mon Nov 12 09:55:16 2018 -0500 audit: Use 'mark' name for fsnotify_mark variables Variables pointing to fsnotify_mark are sometimes called 'entry' and sometimes 'mark'. Use 'mark' in all places. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara [PM: minor merge fuzz due to updated patches previously in the series] Signed-off-by: Paul Moore commit 83d23bc8aedc51fc40078026e9fae6e349d83b2a Author: Jan Kara Date: Mon Nov 12 09:55:16 2018 -0500 audit: Replace chunk attached to mark instead of replacing mark Audit tree code currently associates new fsnotify mark with each new chunk. As chunk attached to an inode is replaced when new tag is added / removed, we also need to remove old fsnotify mark and add a new one on such occasion. This is cumbersome and makes locking rules somewhat difficult to follow. Fix these problems by allocating fsnotify mark independently of chunk and keeping it all the time while there is some chunk attached to an inode. Also add documentation about the locking rules so that things are easier to follow. Signed-off-by: Jan Kara Reviewed-by: Richard Guy Briggs [PM: minor merge fuzz due to updated patches previously in the series] Signed-off-by: Paul Moore commit 8432c70062978d9a57bde6715496d585ec520c3e Author: Jan Kara Date: Mon Nov 12 09:54:56 2018 -0500 audit: Simplify locking around untag_chunk() untag_chunk() has to be called with hash_lock, it drops it and reacquires it when returning. The unlocking of hash_lock is thus hidden from the callers of untag_chunk() with is rather error prone. Reorganize the code so that untag_chunk() is called without hash_lock, only with mark reference preventing the chunk from going away. Since this requires some more code in the caller of untag_chunk() to assure forward progress, factor out loop pruning tree from all chunks into a common helper function. Signed-off-by: Jan Kara Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit c22fcde775dcc9f46d73d694061441efdc7bdaad Author: Jan Kara Date: Mon Nov 12 09:54:49 2018 -0500 audit: Drop all unused chunk nodes during deletion When deleting chunk from a tree, drop all unused nodes in a chunk instead of just the one used by the tree. This gets rid of possibly lingering unused nodes (created due to fallback path in untag_chunk()) and also removes some special cases and will allow us to simplify locking in untag_chunk(). Signed-off-by: Jan Kara Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 49a4ee7d98dbe34cfed90b930664c8a9fa73b24c Author: Jan Kara Date: Mon Nov 12 09:54:49 2018 -0500 audit: Guarantee forward progress of chunk untagging When removing chunk from a tree, we do shrink the chunk. This can fail for various reasons (due to races, ENOMEM, etc.) and in some cases we just bail from untag_chunk() relying on someone else to cleanup. Although this currently works, later we will need to add new failure situation which would break. Also this simplifies the code and will allow us to make locking around untag_chunk() less awkward. Signed-off-by: Jan Kara Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 5f5161300d7bd530e062428ac694824832960cf5 Author: Jan Kara Date: Mon Nov 12 09:54:49 2018 -0500 audit: Allocate fsnotify mark independently of chunk Allocate fsnotify mark independently instead of embedding it inside chunk. This will allow us to just replace chunk attached to mark when growing / shrinking chunk instead of replacing mark attached to inode which is a more complex operation. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit a8375713fb1ff28ec718b601895958f1db775774 Author: Jan Kara Date: Mon Nov 12 09:54:49 2018 -0500 audit: Provide helper for dropping mark's chunk reference Provide a helper function audit_mark_put_chunk() for dropping mark's reference (which has to happen only after RCU grace period expires). Currently that happens only from a single place but in later patches we introduce more callers. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit 8cd0feb5234ccda3c15de35b40c8010a406dfc03 Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Remove pointless check in insert_hash() The audit_tree_group->mark_mutex is held all the time while we create the fsnotify mark, add it to the inode, and insert chunk into the hash. Hence mark cannot get detached during this time and so the check whether the mark is attached in insert_hash() is pointless. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit d31b326d3ce7b1ff2ec36470dfcccb14a6c3e04e Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Factor out chunk replacement code Chunk replacement code is very similar for the cases where we grow or shrink chunk. Factor the code out into a common helper function. Signed-off-by: Jan Kara Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 1635e5722350597b6a149bdb131358fcd7e34906 Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Make hash table insertion safe against concurrent lookups Currently, the audit tree code does not make sure that when a chunk is inserted into the hash table, it is fully initialized. So in theory a user of RCU lookup could see uninitialized structure in the hash table and crash. Add appropriate barriers between initialization of the structure and its insertion into hash table. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit 8d20d6e9301d7b3777d66d47dd5b89acd645cd39 Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Embed key into chunk Currently chunk hash key (which is in fact pointer to the inode) is derived as chunk->mark.conn->obj. It is tricky to make this dereference reliable for hash table lookups only under RCU as mark can get detached from the connector and connector gets freed independently of the running lookup. Thus there is a possible use after free / NULL ptr dereference issue: CPU1 CPU2 untag_chunk() ... audit_tree_lookup() list_for_each_entry_rcu(p, list, hash) { list_del_rcu(&chunk->hash); fsnotify_destroy_mark(entry); fsnotify_put_mark(entry) chunk_to_key(p) if (!chunk->mark.connector) ... hlist_del_init_rcu(&mark->obj_list); if (hlist_empty(&conn->list)) { inode = fsnotify_detach_connector_from_object(conn); mark->connector = NULL; ... frees connector from workqueue chunk->mark.connector->obj This race is probably impossible to hit in practice as the race window on CPU1 is very narrow and CPU2 has a lot of code to execute. Still it's better to have this fixed. Since the inode the chunk is attached to is constant during chunk's lifetime it is easy to cache the key in the chunk itself and thus avoid these issues. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit b1e4603b92d8aef8776e5673dc13fedb68d32ea4 Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Fix possible tagging failures Audit tree code is replacing marks attached to inodes in non-atomic way. Thus fsnotify_find_mark() in tag_chunk() may find a mark that belongs to a chunk that is no longer valid one and will soon be destroyed. Tags added to such chunk will be simply lost. Fix the problem by making sure old mark is marked as going away (through fsnotify_detach_mark()) before dropping mark_mutex and thus in an atomic way wrt tag_chunk(). Note that this does not fix the problem completely as if tag_chunk() finds a mark that is going away, it fails with -ENOENT. But at least the failure is not silent and currently there's no way to search for another fsnotify mark attached to the inode. We'll fix this problem in later patch. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit a5789b07b35aa56569dff762bfc063303a9ccb95 Author: Jan Kara Date: Mon Nov 12 09:54:48 2018 -0500 audit: Fix possible spurious -ENOSPC error When an inode is tagged with a tree, tag_chunk() checks whether there is audit_tree_group mark attached to the inode and adds one if not. However nothing protects another tag_chunk() to add the mark between we've checked and try to add the fsnotify mark thus resulting in an error from fsnotify_add_mark() and consequently an ENOSPC error from tag_chunk(). Fix the problem by holding mark_mutex over the whole check-insert code sequence. Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit 9f16d2e6241b2fc664523f17d74adda7489f496b Author: Jan Kara Date: Wed Oct 17 12:14:52 2018 +0200 audit_tree: Remove mark->lock locking Currently, audit_tree code uses mark->lock to protect against detaching of mark from an inode. In most places it however also uses mark->group->mark_mutex (as we need to atomically replace attached marks) and this provides protection against mark detaching as well. So just remove protection with mark->lock from audit tree code and replace it with mark->group->mark_mutex protection in all the places. It simplifies the code and gets rid of some ugly catches like calling fsnotify_add_mark_locked() with mark->lock held (which cannot sleep only because we hold a reference to another mark attached to the same inode). Reviewed-by: Richard Guy Briggs Signed-off-by: Jan Kara Signed-off-by: Paul Moore commit daedaa33d9c578220b311fbad3748d3ecd5a8f66 Author: Lu Baolu Date: Mon Nov 12 14:40:08 2018 +0800 iommu/vtd: Cleanup dma_remapping.h header Commit e61d98d8dad00 ("x64, x2apic/intr-remap: Intel vt-d, IOMMU code reorganization") moved dma_remapping.h from drivers/pci/ to current place. It is entirely VT-d specific, but uses a generic name. This merges dma_remapping.h with include/linux/intel-iommu.h and removes dma_remapping.h as the result. Cc: Ashok Raj Cc: Jacob Pan Cc: Sohil Mehta Suggested-by: Christoph Hellwig Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Liu, Yi L Signed-off-by: Joerg Roedel commit 131280a162e7fc2a539bb939efd28dd0b964c62c Author: Eric Anholt Date: Thu Nov 8 08:04:22 2018 -0800 drm: Revert syncobj timeline changes. Daniel suggested I submit this, since we're still seeing regressions from it. This is a revert to before 48197bc564c7 ("drm: add syncobj timeline support v9") and its followon fixes. Fixes this on first V3D testcase execution: [ 48.767088] ============================================ [ 48.772410] WARNING: possible recursive locking detected [ 48.777739] 4.19.0-rc6+ #489 Not tainted [ 48.781668] -------------------------------------------- [ 48.786993] shader_runner/3284 is trying to acquire lock: [ 48.792408] ce309d7f (&(&array->lock)->rlock){....}, at: dma_fence_add_callback+0x30/0x23c [ 48.800714] [ 48.800714] but task is already holding lock: [ 48.806559] c5952bd3 (&(&array->lock)->rlock){....}, at: dma_fence_add_callback+0x30/0x23c [ 48.814862] [ 48.814862] other info that might help us debug this: [ 48.821410] Possible unsafe locking scenario: [ 48.821410] [ 48.827338] CPU0 [ 48.829788] ---- [ 48.832239] lock(&(&array->lock)->rlock); [ 48.836434] lock(&(&array->lock)->rlock); [ 48.840640] [ 48.840640] *** DEADLOCK *** [ 48.840640] [ 48.846582] May be due to missing lock nesting notation [ 130.763560] 1 lock held by cts-runner/3270: [ 130.767745] #0: 7834b793 (&(&array->lock)->rlock){-...}, at: dma_fence_add_callback+0x30/0x23c [ 130.776461] stack backtrace: [ 130.780825] CPU: 1 PID: 3270 Comm: cts-runner Not tainted 4.19.0-rc6+ #486 [ 130.787706] Hardware name: Broadcom STB (Flattened Device Tree) [ 130.793645] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 130.801404] [] (show_stack) from [] (dump_stack+0xa8/0xd4) [ 130.808642] [] (dump_stack) from [] (__lock_acquire+0x848/0x1a68) [ 130.816483] [] (__lock_acquire) from [] (lock_acquire+0xd8/0x22c) [ 130.824326] [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x54/0x68) [ 130.832777] [] (_raw_spin_lock_irqsave) from [] (dma_fence_add_callback+0x30/0x23c) [ 130.842183] [] (dma_fence_add_callback) from [] (dma_fence_array_enable_signaling+0x58/0xec) [ 130.852371] [] (dma_fence_array_enable_signaling) from [] (dma_fence_add_callback+0xe8/0x23c) [ 130.862647] [] (dma_fence_add_callback) from [] (drm_syncobj_wait_ioctl+0x518/0x614) [ 130.872143] [] (drm_syncobj_wait_ioctl) from [] (drm_ioctl_kernel+0xb0/0xf0) [ 130.880940] [] (drm_ioctl_kernel) from [] (drm_ioctl+0x1d8/0x390) [ 130.888782] [] (drm_ioctl) from [] (do_vfs_ioctl+0xb0/0x8ac) [ 130.896187] [] (do_vfs_ioctl) from [] (ksys_ioctl+0x34/0x60) [ 130.903593] [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) Cc: Chunming Zhou Cc: Christian König Cc: Daniel Vetter Signed-off-by: Eric Anholt Acked-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/261044/ commit cc7ed49a7f39deafb33fc58d162a3365344c3458 Author: Jiri Kosina Date: Thu Nov 8 22:38:42 2018 +0100 HID: hidraw: enforce minors_lock locking via lockdep lockdep is much more powerful enforcing the locking rules than code comments, so let's switch to it. Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit bcce8d8633ff0167d5684f1076eea7ee6df63581 Author: Ville Syrjälä Date: Wed Nov 7 23:35:22 2018 +0200 drm/i915: Clean up the baseline bpp computation Pass on the errno all the way from connected_sink_max_bpp(), and make the base_bpp handling in intel_modeset_pipe_config() a bit less ugly. We'll also rename connected_sink_max_bpp() to not give the impression that it return the bpp value, and we'll pimp up the debug message within to include the connector name/id. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181107213522.17590-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit d26592c601ec242090dc3a879d57ad51ffe437db Author: Ville Syrjälä Date: Wed Nov 7 23:35:21 2018 +0200 drm/i915: Remove pointless goto fail We just 'return ret' immediately after jumping to the label. Let's return directly instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181107213522.17590-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 8e2b4dffeca0a4cb51258c057ab85593f32e502e Author: Ville Syrjälä Date: Wed Nov 7 23:35:20 2018 +0200 drm/i915: Handle -EDEADLK from ironlake_check_fdi_lanes() ironlake_check_fdi_lanes() may try to grab some extra crtc locks. If that fails we need to propagate the -EDEADLK all the way up, and we shouldn't dump out the crtc state or other debug messages either since it wasn't the crtc state that caused the failure. Just hit this on my IVB: [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 3 [drm:intel_atomic_check [i915]] only 2 lanes on pipe C: required 3 lanes [drm:intel_atomic_check [i915]] fdi link bw constraint, reducing pipe bpp to 18 [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 2 [drm:intel_atomic_check [i915]] CRTC bw constrained, retrying [drm:intel_dp_compute_config [i915]] DP link computation with max lane count 4 max rate 270000 max bpp 18 pixel clock 185580KHz [drm:intel_dp_compute_config [i915]] DP lane count 4 clock 162000 bpp 18 [drm:intel_dp_compute_config [i915]] DP link rate required 417555 available 648000 [drm:intel_atomic_check [i915]] checking fdi config on pipe C, lanes 2 WARNING: CPU: 4 PID: 25115 at ../drivers/gpu/drm/drm_modeset_lock.c:241 drm_modeset_lock+0xbc/0xd0 [drm] ... WARNING: CPU: 4 PID: 25115 at ../drivers/gpu/drm/drm_modeset_lock.c:223 drm_modeset_drop_locks+0x4a/0x50 [drm] The warnings are from 'WARN_ON(ctx->contended)'. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181107213522.17590-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 344eb5539abf3e0b6ce22568c03e86450073e097 Author: Vincent Whitchurch Date: Fri Nov 9 10:12:30 2018 +0100 ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+ getuser() and putuser() (and there underscored variants) use two strb[t]/ldrb[t] instructions when they are asked to get/put 16-bits. This means that the read/write is not atomic even when performed to a 16-bit-aligned address. This leads to problems with vhost: vhost uses __getuser() to read the vring's 16-bit avail.index field, and if it happens to observe a partial update of the index, wrong descriptors will be used which will lead to a breakdown of the virtio communication. A similar problem exists for __putuser() which is used to write to the vring's used.index field. The reason these functions use strb[t]/ldrb[t] is because strht/ldrht instructions did not exist until ARMv6T2/ARMv7. So we should be easily able to fix this on ARMv7. Also, since all ARMv6 processors also don't actually use the unprivileged instructions anymore for uaccess (since CONFIG_CPU_USE_DOMAINS is not used) we can easily fix them too. Signed-off-by: Vincent Whitchurch Signed-off-by: Russell King commit f441882a5229ffaef61a47bccd4518f7e2749cbc Author: Vincent Whitchurch Date: Fri Nov 9 10:09:48 2018 +0100 ARM: 8812/1: Optimise copy_{from/to}_user for !CPU_USE_DOMAINS ARMv6+ processors do not use CONFIG_CPU_USE_DOMAINS and use privileged ldr/str instructions in copy_{from/to}_user. They are currently unnecessarily using single ldr/str instructions and can use ldm/stm instructions instead like memcpy does (but with appropriate fixup tables). This speeds up a "dd if=foo of=bar bs=32k" on a tmpfs filesystem by about 4% on my Cortex-A9. before:134217728 bytes (128.0MB) copied, 0.543848 seconds, 235.4MB/s before:134217728 bytes (128.0MB) copied, 0.538610 seconds, 237.6MB/s before:134217728 bytes (128.0MB) copied, 0.544356 seconds, 235.1MB/s before:134217728 bytes (128.0MB) copied, 0.544364 seconds, 235.1MB/s before:134217728 bytes (128.0MB) copied, 0.537130 seconds, 238.3MB/s before:134217728 bytes (128.0MB) copied, 0.533443 seconds, 240.0MB/s before:134217728 bytes (128.0MB) copied, 0.545691 seconds, 234.6MB/s before:134217728 bytes (128.0MB) copied, 0.534695 seconds, 239.4MB/s before:134217728 bytes (128.0MB) copied, 0.540561 seconds, 236.8MB/s before:134217728 bytes (128.0MB) copied, 0.541025 seconds, 236.6MB/s after:134217728 bytes (128.0MB) copied, 0.520445 seconds, 245.9MB/s after:134217728 bytes (128.0MB) copied, 0.527846 seconds, 242.5MB/s after:134217728 bytes (128.0MB) copied, 0.519510 seconds, 246.4MB/s after:134217728 bytes (128.0MB) copied, 0.527231 seconds, 242.8MB/s after:134217728 bytes (128.0MB) copied, 0.525030 seconds, 243.8MB/s after:134217728 bytes (128.0MB) copied, 0.524236 seconds, 244.2MB/s after:134217728 bytes (128.0MB) copied, 0.523659 seconds, 244.4MB/s after:134217728 bytes (128.0MB) copied, 0.525018 seconds, 243.8MB/s after:134217728 bytes (128.0MB) copied, 0.519249 seconds, 246.5MB/s after:134217728 bytes (128.0MB) copied, 0.518527 seconds, 246.9MB/s Reviewed-by: Nicolas Pitre Signed-off-by: Vincent Whitchurch Signed-off-by: Russell King commit bc2eca9a682881f9da3cc7e2d75b752e549a134d Author: Nicolas Pitre Date: Fri Nov 9 04:26:39 2018 +0100 ARM: 8811/1: always list both ldrd/strd registers explicitly The ldrd and strd instructions work on a pair of consecutive registers. It is possible to specify either the first register in the pair, or both registers explicitly. Let's always do the later to make things clearer. Signed-off-by: Nicolas Pitre Suggested-by: Robin Murphy Signed-off-by: Russell King commit c0e118c8a1a32eda2a9c66174930afaf304753b4 Author: Linus Walleij Date: Sat Nov 10 22:14:13 2018 +0100 mtd: partitions: Add OF support to RedBoot partitions This adds device tree support for RedBoot partitioning. We read out the FIS directory block information from the device tree and then parse the partition table from there. Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon commit e0be6a68b5410f3b401eb9f191da6f83b06793f1 Author: Linus Walleij Date: Sat Nov 10 21:01:26 2018 +0100 mtd: partitions: Add RedBoot FIS DT bindings This adds device tree bindings for the RedBoot FIS partition format. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon commit 43f1fd01a635cb4815f83eccd33ebc620b627a95 Author: Linus Walleij Date: Sat Nov 10 21:01:25 2018 +0100 mtd: Move Redboot partition parser This moves the Redboot partition parser down to the parsers subdirectory. Signed-off-by: Linus Walleij Signed-off-by: Boris Brezillon commit 3e184501083c38fa091f640acb13af17a21fd228 Author: Viresh Kumar Date: Tue Nov 6 11:12:57 2018 +0530 sched/core: Clean up the #ifdef block in add_nr_running() There is no point in keeping the conditional statement of the #if block outside of the #ifdef block, while all of its body is contained within the #ifdef block. Move the conditional statement under the #ifdef block as well. Signed-off-by: Viresh Kumar Cc: Daniel Lezcano Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/78cbd78a615d6f9fdcd3327f1ead68470f92593e.1541482935.git.viresh.kumar@linaro.org Signed-off-by: Ingo Molnar commit 1d8ca3be86ebc6a38dad8236f45c7a9c61681e78 Author: Waiman Long Date: Tue Nov 6 15:12:29 2018 -0500 x86/mm/fault: Allow stack access below %rsp The current x86 page fault handler allows stack access below the stack pointer if it is no more than 64k+256 bytes. Any access beyond the 64k+ limit will cause a segmentation fault. The gcc -fstack-check option generates code to probe the stack for large stack allocation to see if the stack is accessible. The newer gcc does that while updating the %rsp simultaneously. Older gcc's like gcc4 doesn't do that. As a result, an application compiled with an old gcc and the -fstack-check option may fail to start at all: $ cat test.c int main() { char tmp[1024*128]; printf("### ok\n"); return 0; } $ gcc -fstack-check -g -o test test.c $ ./test Segmentation fault The old binary was working in older kernels where expand_stack() was somehow called before the check. But it is not working in newer kernels. Besides, the 64k+ limit check is kind of crude and will not catch a lot of mistakes that userspace applications may be misbehaving anyway. I think the kernel isn't the right place for this kind of tests. We should leave it to userspace instrumentation tools to perform them. The 64k+ limit check is now removed to just let expand_stack() decide if a segmentation fault should happen, when the RLIMIT_STACK limit is exceeded, for example. Signed-off-by: Waiman Long Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1541535149-31963-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar commit b1635596860dd3229645e41276f6c83ca788e4c1 Author: Julia Lawall Date: Sat Oct 27 15:34:42 2018 +0200 soundwire: intel: constify snd_soc_dai_ops structures The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Vinod Koul commit 016fd285682952b943641c074d1cc0d02b3e6889 Author: Linus Lüssing Date: Tue Nov 6 10:01:50 2018 +0100 batman-adv: enable MCAST by default at compile time Thanks to rigorous testing in wireless community mesh networks several issues with multicast entries in the translation table were found and fixed in the last 1.5 years. Now we see the first larger networks (a few hundred nodes) with a batman-adv version with multicast optimizations enabled arising, with no TT / multicast optimization related issues so far. Therefore it seems safe to enable multicast optimizations by default. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit fb939135a6cf77a26831d23e6d22e4b9602cfce7 Author: Sven Eckelmann Date: Sun Oct 14 17:16:14 2018 +0200 batman-adv: Move CRC16 dependency to BATMAN_ADV_BLA The commit ced72933a5e8 ("batman-adv: use CRC32C instead of CRC16 in TT code") switched the translation table code from crc16 to crc32c. The (optional) bridge loop avoidance code is the only user of this function. batman-adv should only select CRC16 when it is actually using it. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d2d489b7d851785dd4833880d31d80bd70ffa6c3 Author: Sven Eckelmann Date: Tue Oct 30 22:01:30 2018 +0100 batman-adv: Add inconsistent multicast netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. The already existing generation sequence counter from the hash helper can be used for this simple hash. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 6b7b40aad5cd2d7b59fbbd60537ce2eaea2f980d Author: Sven Eckelmann Date: Tue Oct 30 22:01:29 2018 +0100 batman-adv: Add inconsistent local TT netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. The already existing generation sequence counter from the hash helper can be used for this simple hash. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 6f81652a4713e49afa4e1f6923c61e2e165afa08 Author: Sven Eckelmann Date: Tue Oct 30 22:01:28 2018 +0100 batman-adv: Add inconsistent dat netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. The already existing generation sequence counter from the hash helper can be used for this simple hash. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 24d71b92321ab994585c816ede8c12857985d924 Author: Sven Eckelmann Date: Tue Oct 30 22:01:27 2018 +0100 batman-adv: Add inconsistent claim netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. The already existing generation sequence counter from the hash helper can be used for this simple hash. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit b00d0e6a2cb143ccc2b75a930f0d5a46033ea7aa Author: Sven Eckelmann Date: Tue Oct 30 22:01:26 2018 +0100 batman-adv: Add inconsistent backbone netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. The already existing generation sequence counter from the hash helper can be used for this simple hash. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 05abd7bcc9cdbedf9deff27fe0766c70c4f2ae0d Author: Sven Eckelmann Date: Tue Oct 30 22:01:25 2018 +0100 batman-adv: Store modification counter via hash helpers Multiple datastructures use the hash helper functions to add and remove entries from the simple hlist based hashes. These are often also dumped to userspace via netlink and thus should have a generation sequence counter. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit fb69be697916a2d0a9badcdef7f20fcfad1233bc Author: Sven Eckelmann Date: Tue Oct 30 22:01:24 2018 +0100 batman-adv: Add inconsistent hardif netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. And an external generation sequence counter is introduced which tracks all modifications of the list. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 9264c85c8b42d76862ae4ed307f4523e8bbab100 Author: Sven Eckelmann Date: Tue Oct 30 22:01:23 2018 +0100 batman-adv: Add inconsistent gateway netlink dump detection The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries. Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again. The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. And an external generation sequence counter is introduced which tracks all modifications of the list. Reported-by: Matthias Schiffer Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 694127c1dd494d3796e1627389a4cff7ee19e613 Author: Sven Eckelmann Date: Sun Oct 21 11:30:32 2018 +0200 batman-adv: Fix description for BATMAN_ADV_DEBUG The debug messages of batman-adv are not printed to the kernel log at all but can be stored (depending on the compile setting) in the tracing buffer or the batadv specific log buffer. There is also no debug module parameter but a batadv netdev specific log_level setting to enable/disable different classes of debug messages at runtime. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 0dacc7fab623be97bda7aefe0d1d8d68cebb4218 Author: Sven Eckelmann Date: Sun Oct 21 11:30:31 2018 +0200 batman-adv: Allow to use BATMAN_ADV_DEBUG without BATMAN_ADV_DEBUGFS The BATMAN_ADV_DEBUGFS portion of batman-adv is marked as deprecated. Thus all required functionality should be available without it. The debug log was already modified to also output via the kernel tracing function but still retained its BATMAN_ADV_DEBUGFS functionality. Separate the entry point for the debug log from the debugfs portions to make it possible to build with BATMAN_ADV_DEBUG and without BATMAN_ADV_DEBUGFS. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 95d8f85c911331fc4b4a6039295b3fe1673c73e7 Author: Sven Eckelmann Date: Sun Oct 21 11:30:30 2018 +0200 batman-adv: Improve includes for trace functionality The batadv_dbg trace event uses different functionality and datastructures which are not directly associated with the trace infrastructure. It should not be expected that the trace headers indirectly provide them and instead include the required headers directly. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit a5dac4da72f59f9565af747f0e4a2d943f902240 Author: Sven Eckelmann Date: Sun Oct 21 11:30:29 2018 +0200 batman-adv: Add includes for deprecation warning The commit 00caf6a2b318 ("batman-adv: Mark debugfs functionality as deprecated") introduced various messages to inform the user about the deprecation of the debugfs based functionality. The messages also include the context/task in which this problem was observed. The datastructures and functions to access this information require special headers. These should be included directly instead of depending on a more complex and fragile include chain. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 01468225f305f3607868171b1abc2929a4501fad Author: Sven Eckelmann Date: Sun Oct 21 11:30:28 2018 +0200 batman-adv: Drop unused lockdep include The commit dee222c7b20c ("batman-adv: Move OGM rebroadcast stats to orig_ifinfo") removed all used functionality of the include linux/lockdep.h from batadv_iv_ogm.c. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 3987b6a4ccf849c3e2b3d581a22ebf55eae995cb Author: Simon Wunderlich Date: Mon Nov 5 07:11:52 2018 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit 32d8a6fc5bd62769c7fa60818e0a32bd5126a565 Author: YueHaibing Date: Fri Oct 26 20:25:49 2018 +0800 USB: serial: mos7840: remove set but not used variables 'st, data1, iflag' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/serial/mos7840.c: In function 'mos7840_interrupt_callback': drivers/usb/serial/mos7840.c:604:14: warning: variable 'st' set but not used [-Wunused-but-set-variable] drivers/usb/serial/mos7840.c: In function 'mos7840_write': drivers/usb/serial/mos7840.c:1303:17: warning: variable 'data1' set but not used [-Wunused-but-set-variable] drivers/usb/serial/mos7840.c:1700:11: warning: variable 'iflag' set but not used [-Wunused-but-set-variable] They are never used since introduction in commit 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Signed-off-by: YueHaibing Signed-off-by: Johan Hovold commit 54820b4a6627e87afc0425c8b4ce338d3dbdbb80 Author: Boris Brezillon Date: Fri Jul 21 12:08:59 2017 +0200 dt-bindings: i3c: Document core bindings A new I3C subsystem has been added and a generic description has been created to represent the I3C bus and the devices connected on it. Document this generic representation. Cc: Rob Herring Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring Acked-by: Greg Kroah-Hartman commit a9f3edd0dd876bb9d39dec1dea90821460631ce4 Author: Boris Brezillon Date: Thu Dec 14 10:43:47 2017 +0100 i3c: Add sysfs ABI spec Document sysfs files/directories/symlinks exposed by the I3C subsystem. Signed-off-by: Boris Brezillon Reviewed-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman commit bd360e8175f4e07418a8427786dfaf9d42867e71 Author: Boris Brezillon Date: Tue Dec 12 11:00:07 2017 +0100 docs: driver-api: Add I3C documentation Add the I3C documentation describing the protocol, the master driver API and the device driver API. Signed-off-by: Boris Brezillon Reviewed-by: Randy Dunlap Reviewed-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 Author: Boris Brezillon Date: Wed Jul 19 11:52:29 2017 +0200 i3c: Add core I3C infrastructure Add core infrastructure to support I3C in Linux and document it. This infrastructure adds basic I3C support. Advanced features will be added afterwards. There are a few design choices that are worth mentioning because they impact the way I3C device drivers can interact with their devices: - all functions used to send I3C/I2C frames must be called in non-atomic context. Mainly done this way to ease implementation, but this is not set in stone, and if anyone needs async support, new functions can be added later on. - the bus element is a separate object, but it's tightly coupled with the master object. We thus have a 1:1 relationship between i3c_bus and i3c_master_controller objects, and if 2 master controllers are connected to the same bus and both exposed to the same Linux instance they will appear as two distinct busses, and devices on this bus will be exposed twice. - I2C backward compatibility has been designed to be transparent to I2C drivers and the I2C subsystem. The I3C master just registers an I2C adapter which creates a new I2C bus. I'd say that, from a representation PoV it's not ideal because what should appear as a single I3C bus exposing I3C and I2C devices here appears as 2 different buses connected to each other through the parenting (the I3C master is the parent of the I2C and I3C busses). On the other hand, I don't see a better solution if we want something that is not invasive. Missing features: - I3C HDR modes are not supported - no support for multi-master and the associated concepts (mastership handover, support for secondary masters, ...) - I2C devices can only be described using DT because this is the only use case I have. However, the framework can easily be extended with ACPI and board info support - I3C slave framework. This has been completely omitted, but shouldn't have a huge impact on the I3C framework because I3C slaves don't see the whole bus, it's only about handling master requests and generating IBIs. Some of the struct, constant and enum definitions could be shared, but most of the I3C slave framework logic will be different Signed-off-by: Boris Brezillon Reviewed-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman commit 58fc419be2313f8831ec75ad95263f050b69f476 Author: Andreas Jaggi Date: Thu Nov 1 06:50:33 2018 +0100 netfilter: ctnetlink: always honor CTA_MARK_MASK Useful to only set a particular range of the conntrack mark while leaving existing parts of the value alone, e.g. when updating conntrack marks via netlink from userspace. For NFQUEUE it was already implemented in commit 534473c6080e ("netfilter: ctnetlink: honor CTA_MARK_MASK when setting ctmark"). This now adds the same functionality also for the other netlink conntrack mark changes. Signed-off-by: Andreas Jaggi Signed-off-by: Pablo Neira Ayuso commit 1226cfe3798a62ba78ff8f4a4abf2cad9d2dc779 Merge: 30beabb3c3212 23c42a403a9cf Author: Pablo Neira Ayuso Date: Mon Nov 12 10:13:59 2018 +0100 Merge branch 'master' of git://blackhole.kfki.hu/nf-next Jozsef Kadlecsik says: ==================== - Introduction of new commands and thus protocol version 7. The new commands makes possible to eliminate the getsockopt interface of ipset and use solely netlink to communicate with the kernel. Due to the strict attribute checking both in user/kernel space, a new protocol number was introduced. Both the kernel/userspace is fully backward compatible. - Make invalid MAC address checks consisten, from Stefano Brivio. The patch depends on the next one. - Allow matching on destination MAC address for mac and ipmac sets, also from Stefano Brivio. ==================== Signed-off-by: Pablo Neira Ayuso commit 548f32f59456e71379c61d4e88727ee6c5f6ccd6 Author: YueHaibing Date: Thu Oct 11 07:44:33 2018 +0000 USB: serial: quatech2: remove set but not used variable 'port_priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb': drivers/usb/serial/quatech2.c:503:27: warning: variable 'port_priv' set but not used [-Wunused-but-set-variable] It not used any more after commit 2be818a116b2 ('Revert "USB: quatech2: only write to the tty if the port is open."') Signed-off-by: YueHaibing Signed-off-by: Johan Hovold commit 6da8f44624ad99fbd10f9e8e87a46aa3a61c1e9d Author: Takashi Iwai Date: Fri Nov 9 14:18:32 2018 +0100 ALSA: hda/ca0132 - Optimize for non-PCI configuration All the recent support of Creative boards and onboard audio depend on PCI, but they can't be trimmed easily even if you build without CONFIG_PCI, since the quirk is detected dynamically and the code has many branches with the flag check like spec->quirk type or spec->use_alt_functions. This patch makes these checks static for CONFIG_PCI=n case so that the compiler optimizes out. The access to flags are replaced with macros that are replaced with a static value for CONFIG_PCI=n. The macros look slightly ugly for avoiding compiler warnings wrt unused variables, and some additional default-case handlings for another compiler warnings, but the rest are very straightforward changes. Signed-off-by: Takashi Iwai commit ed8885a14433aec04067463493051eaaeef3255f Author: Muchun Song Date: Sat Nov 10 15:52:02 2018 +0800 sched/fair: Make some variables static The variables are local to the source and do not need to be in global scope, so make them static. Signed-off-by: Muchun Song Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181110075202.61172-1-smuchun@gmail.com Signed-off-by: Ingo Molnar commit 1da1843f9f0334e2428308945d396ffecc2acfe1 Author: Viresh Kumar Date: Mon Nov 5 16:51:55 2018 +0530 sched/core: Create task_has_idle_policy() helper We already have task_has_rt_policy() and task_has_dl_policy() helpers, create task_has_idle_policy() as well and update sched core to start using it. While at it, use task_has_dl_policy() at one more place. Signed-off-by: Viresh Kumar Signed-off-by: Peter Zijlstra (Intel) Acked-by: Daniel Lezcano Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/ce3915d5b490fc81af926a3b6bfb775e7188e005.1541416894.git.viresh.kumar@linaro.org Signed-off-by: Ingo Molnar commit b5c0ce7bd1848892e2930f481828b6d7750231ed Author: Patrick Bellasi Date: Mon Nov 5 14:54:00 2018 +0000 sched/fair: Add lsub_positive() and use it consistently The following pattern: var -= min_t(typeof(var), var, val); is used multiple times in fair.c. The existing sub_positive() already captures that pattern, but it also adds an explicit load-store to properly support lockless observations. In other cases the pattern above is used to update local, and/or not concurrently accessed, variables. Let's add a simpler version of sub_positive(), targeted at local variables updates, which gives the same readability benefits at calling sites, without enforcing {READ,WRITE}_ONCE() barriers. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Quentin Perret Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Link: https://lore.kernel.org/lkml/20181031184527.GA3178@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar commit 92a801e5d5b7a893881c1676b15dd246727ccd16 Author: Patrick Bellasi Date: Mon Nov 5 14:53:59 2018 +0000 sched/fair: Mask UTIL_AVG_UNCHANGED usages The _task_util_est() is mainly used to add/remove the task contribution to/from the rq's estimated utilization at task enqueue/dequeue time. In both cases we ensure the UTIL_AVG_UNCHANGED flag is set to keep consistency between enqueue and dequeue time while still being transparent to update_load_avg calls which will eventually reset the flag. Let's move the flag forcing within _task_util_est() itself so that we can simplify calling code by hiding that estimated utilization implementation detail into one of its internal functions. This will affect also the "public" API task_util_est() but we know that the flag will (eventually) impact just on the LSB of the estimated utilization, thus it's certainly acceptable. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Quentin Perret Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20181105145400.935-3-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar commit 59e1678c29756a12a64a187b55891530cf95ca1e Merge: ff1cdc94de4d3 c469933e77213 Author: Ingo Molnar Date: Mon Nov 12 05:15:33 2018 +0100 Merge branch 'sched/urgent' into sched/core, to pick up dependent fixes Signed-off-by: Ingo Molnar commit c17a1ca14cbba5585df67544711b6d04bcc8e240 Merge: 596f63da42b92 ccda4af0f4b92 Author: Greg Kroah-Hartman Date: Sun Nov 11 18:48:25 2018 -0800 Merge 4.20-rc2 into tty-next We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 30beabb3c32122d533ce0e2fc712f9d720a82f9f Author: YueHaibing Date: Mon Nov 12 01:47:30 2018 +0000 net: phy: marvell: remove set but not used variable 'pause' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/phy/marvell.c: In function 'm88e1510_config_init': drivers/net/phy/marvell.c:850:7: warning: variable 'pause' set but not used [-Wunused-but-set-variable] It not used any more after commit 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2b9b7502dfcb6169dbf3359702953bf756b4e273 Merge: 9206eb0bc5679 ccda4af0f4b92 Author: David S. Miller Date: Sun Nov 11 17:57:54 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 3e34c819896091d0f1bbf6ece8a620552f8dc04e Author: Marek Szyprowski Date: Thu Nov 8 14:45:48 2018 +0100 extcon: max8997: Avoid forcing UART path on drive probe Driver unconditionally forces UART path during probe, probably to ensure that one can get kernel serial log as soon as possible. This approach causes some issues, especially when board is booted with non-UART cable connected to micro-USB port. For example, when USB cable is connected, UART TX/RX lines are unconditionally short-circuited to USB D+/D- lines. This is in turn recognized by a series of serial BREAK signals and some random characters when USB host tries to perform enumeration procedure. To solve the above issue and keep UART console operational as early as possible, set UART path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit 5a196c29bb27d606c4bd82f6893462a39766ff7a Author: Marek Szyprowski Date: Thu Nov 8 14:45:47 2018 +0100 extcon: max14577: Avoid forcing UART path on drive probe Driver unconditionally forces UART path during probe, probably to ensure that one can get kernel serial log as soon as possible. This approach causes some issues, especially when board is booted with non-UART cable connected to micro-USB port. For example, when USB cable is connected, UART TX/RX lines are unconditionally short-circuited to USB D+/D- lines. This is in turn recognized by a series of serial BREAK signals and some random characters when USB host tries to perform enumeration procedure. To solve the above issue and keep UART console operational as early as possible, set UART path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit 6865f2ef9d6576508498fe6127d252b22a70ab39 Author: Marek Szyprowski Date: Thu Nov 8 14:45:46 2018 +0100 extcon: max77693: Avoid forcing UART path on drive probe Driver unconditionally forces UART path during probe, probably to ensure that one can get kernel serial log as soon as possible. This approach causes some issues, especially when board is booted with non-UART cable connected to micro-USB port. For example, when USB cable is connected, UART TX/RX lines are unconditionally short-circuited to USB D+/D- lines. This is in turn recognized by a series of serial BREAK signals and some random characters when USB host tries to perform enumeration procedure. To solve the above issue and keep UART console operational as early as possible, set UART path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit d9204acb37569579fc49af1689c0ae32bdd4710f Author: Marek Szyprowski Date: Thu Nov 8 14:45:45 2018 +0100 extcon: max77843: Avoid forcing UART path on drive probe Driver unconditionally forces UART path during probe, probably to ensure that one can get kernel serial log as soon as possible. This approach causes some issues, especially when board is booted with non-UART cable connected to micro-USB port. For example, when USB cable is connected, UART TX/RX lines are unconditionally short-circuited to USB D+/D- lines. This is in turn recognized by a series of serial BREAK signals and some random characters when USB host tries to perform enumeration procedure. To solve the above issue and keep UART console operational as early as possible, set UART path only when USB ID reports UART capable cable. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit 9206eb0bc5679d06d2f54b9db86fe2b9a55e07e4 Author: Heiner Kallweit Date: Sun Nov 11 20:31:21 2018 +0100 PCI: add USR vendor id and use it in r8169 and w6692 driver The PCI vendor id of U.S. Robotics isn't defined in pci_ids.h so far, only ISDN driver w6692 has a private definition. Move the definition to pci_ids.h and use it in the r8169 driver too. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 48872c11b77271ef9b070bdc50afe6655c4eb9aa Author: Eric Dumazet Date: Sun Nov 11 09:11:31 2018 -0800 net_sched: sch_fq: add dctcp-like marking Similar to 80ba92fa1a92 ("codel: add ce_threshold attribute") After EDT adoption, it became easier to implement DCTCP-like CE marking. In many cases, queues are not building in the network fabric but on the hosts themselves. If packets leaving fq missed their Earliest Departure Time by XXX usec, we mark them with ECN CE. This gives a feedback (after one RTT) to the sender to slow down and find better operating mode. Example : tc qd replace dev eth0 root fq ce_threshold 2.5ms Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit c73e5807e4f6fc6d373a5db55b45f639f8bb6328 Author: Eric Dumazet Date: Sun Nov 11 07:34:28 2018 -0800 tcp: tsq: no longer use limit_output_bytes for paced flows FQ pacing guarantees that paced packets queued by one flow do not add head-of-line blocking for other flows. After TCP GSO conversion, increasing limit_output_bytes to 1 MB is safe, since this maps to 16 skbs at most in qdisc or device queues. (or slightly more if some drivers lower {gso_max_segs|size}) We still can queue at most 1 ms worth of traffic (this can be scaled by wifi drivers if they need to) Tested: # ethtool -c eth0 | egrep "tx-usecs:|tx-frames:" # 40 Gbit mlx4 NIC tx-usecs: 16 tx-frames: 16 # tc qdisc replace dev eth0 root fq # for f in {1..10};do netperf -P0 -H lpaa24,6 -o THROUGHPUT;done Before patch: 27711 26118 27107 27377 27712 27388 27340 27117 27278 27509 After patch: 37434 36949 36658 36998 37711 37291 37605 36659 36544 37349 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 83afb36a7097bdf6776e261fa3a2bf2dc5a4a8c2 Merge: 5e13a0d3f5c11 a682850a114ae Author: David S. Miller Date: Sun Nov 11 13:54:54 2018 -0800 Merge branch 'tcp-tso-defer-improvements' Eric Dumazet says: ==================== tcp: tso defer improvements This series makes tcp_tso_should_defer() a bit smarter : 1) MSG_EOR gives a hint to TCP to not defer some skbs 2) Second patch takes into account that head tstamp can be in the future. 3) Third patch uses existing high resolution state variables to have a more precise heuristic. ==================== Signed-off-by: David S. Miller commit a682850a114aef947da5d603f7fd2cfe7eabbd72 Author: Eric Dumazet Date: Sun Nov 11 06:41:31 2018 -0800 tcp: get rid of tcp_tso_should_defer() dependency on HZ/jiffies tcp_tso_should_defer() first heuristic is to not defer if last send is "old enough". Its current implementation uses jiffies and its low granularity. TSO autodefer performance should not rely on kernel HZ :/ After EDT conversion, we have state variables in nanoseconds that can allow us to properly implement the heuristic. This patch increases TSO chunk sizes on medium rate flows, especially when receivers do not use GRO or similar aggregation. It also reduces bursts for HZ=100 or HZ=250 kernels, making TCP behavior more uniform. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit f1c6ea3827b5e5ec62e297bcf4ccfd065326e8f7 Author: Eric Dumazet Date: Sun Nov 11 06:41:30 2018 -0800 tcp: refine tcp_tso_should_defer() after EDT adoption tcp_tso_should_defer() last step tries to check if the probable next ACK packet is coming in less than half rtt. Problem is that the head->tstamp might be in the future, so we need to use signed arithmetics to avoid overflows. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 1c09f7d073b1d1ce85765c5552e4b40a6b6ba770 Author: Eric Dumazet Date: Sun Nov 11 06:41:29 2018 -0800 tcp: do not try to defer skbs with eor mark (MSG_EOR) Applications using MSG_EOR are giving a strong hint to TCP stack : Subsequent sendmsg() can not append more bytes to skbs having the EOR mark. Do not try to TSO defer suchs skbs, there is really no hope. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 24438e46268c721e14c5c888386af85c9e1c5db1 Author: Wolfram Sang Date: Sun Oct 21 22:01:02 2018 +0200 uio: uio_fsl_elbc_gpcm: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman commit bc702adeba07dba4be8a43e9e2e351df12fc1a6c Author: Colin Ian King Date: Wed Oct 31 19:13:00 2018 +0000 tlclk: clean an indentation issue, remove extraneous tabs Trivial fix to clean up an indentation issue, remove tabs Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit b8ae30a7020d61e0504529adf45abb08fa5c59f5 Author: Arnd Bergmann Date: Fri Nov 2 16:38:53 2018 +0100 vbox: fix link error with 'gcc -Og' With the new CONFIG_CC_OPTIMIZE_FOR_DEBUGGING option, we get a link error in the vboxguest driver, when that fails to optimize out the call to the compat handler: drivers/virt/vboxguest/vboxguest_core.o: In function `vbg_ioctl_hgcm_call': vboxguest_core.c:(.text+0x1f6e): undefined reference to `vbg_hgcm_call32' Another compile-time check documents better what we want and avoids the error. Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 9e9a615103e5aa209a2dfdf214ad34b187935a99 Author: Mike Looijmans Date: Wed Nov 7 11:51:48 2018 -0600 zynq-fpga: Only route PR via PCAP when required The Xilinx Zynq FPGA driver takes ownership of the PR interface, making it impossible to use the ICAP interface for partial reconfiguration. This patch changes the driver to only activate PR over PCAP while the device is actively being accessed by the driver for programming. This allows both PCAP and ICAP interfaces to be used for PR. Signed-off-by: Mike Looijmans Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 68f60538daa4bc3da5d0764d46f391916fba20fd Author: Andreas Puhm Date: Wed Nov 7 11:51:47 2018 -0600 fpga: altera-cvp: Fix registration for CvP incapable devices The probe function needs to verify the CvP enable bit in order to properly determine if FPGA Manager functionality can be safely enabled. Fixes: 34d1dc17ce97 ("fpga manager: Add Altera CvP driver") Signed-off-by: Andreas Puhm Signed-off-by: Anatolij Gustschin Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit ae668640e45268ee429bfebc3c03213a180c0229 Author: YueHaibing Date: Wed Nov 7 11:51:46 2018 -0600 fpga: dfl: fme: remove set but not used variable 'priv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/fpga/dfl-fme-pr.c: In function 'pr_mgmt_uinit': drivers/fpga/dfl-fme-pr.c:447:18: warning: variable 'priv' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Moritz Fischer Acked-by: Wu Hao Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 187fade88ca0ff2df9d360ca751d948d73db7095 Author: Anatolij Gustschin Date: Wed Nov 7 11:51:45 2018 -0600 fpga: altera-cvp: fix 'bad IO access' on x86_64 If mapping the CvP BAR fails, we still can configure the FPGA via PCI config space access. In this case the iomap pointer is NULL. On x86_64, passing NULL address to pci_iounmap() generates "Bad IO access at port 0x0" output with stack call trace. Fix it. Signed-off-by: Anatolij Gustschin Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman commit 1e5106031f298af4ad29c2eb866780d9a21e9ab4 Author: Andrey Smirnov Date: Wed Oct 17 11:27:18 2018 -0700 tools: Add 'firmware' category and add ihex2fw tool Commit 5620a0d1aacd ("firmware: delete in-kernel firmware") removed ihex2fw tool together with the rest of the contents of firmware/ folder. Since that tool is quite useful for doing .ihex -> .fw converstion, restore its original source code to tools/firmware Suggested-by: Greg Kroah-Hartman Cc: Kyle McMartin Cc: Andrew Morton Cc: Masahiro Yamada Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: linux-kernel Signed-off-by: Andrey Smirnov Signed-off-by: Greg Kroah-Hartman commit 4fcba7802c3e15a6e56e255871d6c72f829b9dd8 Author: Dexuan Cui Date: Thu Oct 18 05:09:32 2018 +0000 Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 The patch fixes: hv_kvp_daemon.c: In function 'kvp_set_ip_info': hv_kvp_daemon.c:1305:2: note: 'snprintf' output between 41 and 4136 bytes into a destination of size 4096 The "(unsigned int)str_len" is to avoid: hv_kvp_daemon.c:1309:30: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 16d1342bc41ad417812f8a800a1799b5d1c026dc Author: Dexuan Cui Date: Thu Oct 18 05:09:31 2018 +0000 Drivers: hv: kvp: Use %u to print U32 I didn't find a real issue. Let's just make it consistent with the next "case REG_U64:" where %llu is used. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 5c24ee897664822956b1830df6957bb7f8965bb3 Author: Haiyang Zhang Date: Thu Oct 18 05:09:29 2018 +0000 hv_utils: update name in struct hv_driver util_drv The correct module name is hv_utils. This patch corrects the name in struct hv_driver util_drv. Signed-off-by: Haiyang Zhang Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit a3cadf3850cd901a11b8ec610ac627ecbe3a87a5 Author: K. Y. Srinivasan Date: Thu Oct 18 05:09:28 2018 +0000 Drivers: hv: vmbus: Get rid of unnecessary state in hv_context Currently we are replicating state in struct hv_context that is unnecessary - this state can be retrieved from the hypervisor. Furthermore, this is a per-cpu state that is being maintained as a global state in struct hv_context. Get rid of this state in struct hv_context. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 46f9172ef8c8edb7671813416789cd17ffc5b67c Author: Adham Abozaeid Date: Fri Nov 9 18:20:17 2018 +0000 staging: wilc1000: Remove unused mutex cfg_values_lock After removing cfg_values member, cfg_values_lock that was used to protect it can also be removed. Signed-off-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman commit 2a200d6c38fe43133870dbfc56c45eca0b25d708 Author: Adham Abozaeid Date: Fri Nov 9 18:20:16 2018 +0000 staging: wilc1000: Don't keep a copy of wiphy parameters in the driver host_if_drv.cfg_values is a write only member, and can be removed Signed-off-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman commit 6eb7207384d1a58e38ca2a0a4b874a37cc294b71 Author: Adham Abozaeid Date: Fri Nov 9 18:20:15 2018 +0000 staging: wilc1000: validate cfg parameters before scheduling the work Validate cfg parameters after being called by cfg80211 in set_wiphy_params before scheduling the work executed in handle_cfg_param Signed-off-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman commit 056ef758609ffbf3f2aa5e7dd117663b32f3c91b Author: Michael Straube Date: Sat Nov 10 18:54:46 2018 +0100 staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c3da4dea605ec26de62e84b98189618a79e8c18f Author: Michael Straube Date: Sat Nov 10 18:54:45 2018 +0100 staging: rtl8188eu: add spaces around '*' in recv_linux.c Add spaces around '*' to conform with kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit c3c4b8e55f993dcf69305343522703187eda6dd0 Author: Michael Straube Date: Sat Nov 10 18:54:44 2018 +0100 staging: rtl8188eu: use __func__ in recv_linux.c Use __func__ instead of hardcoded function name. Reported by checkpatch. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 5451e22618b83aba0c62ed072ef08f75003efaff Author: Sergio Paracuellos Date: Fri Oct 26 18:48:06 2018 +0200 staging: mt7621-pci: dt-bindings: add dt bindings for mt7621 pcie controller This commit adds pci device tree bindings for the Mt7621 pci controller. This is a temporal file included in staging driver directory and will be moved to its correct location when this driver gets out of staging. Cc: Rob Herring Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 98afdd565f3cf0dfa2bd62e801bbfb7ee1698f6d Author: Sergio Paracuellos Date: Sun Nov 4 11:49:59 2018 +0100 staging: mt7621-pci: replace 'mdelay()' with 'msleep()' Function 'mt7621_pcie_init_ports' is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit b8d97d43bf7a4c1746ecdfa674c3e6ef5c73c11e Author: Sergio Paracuellos Date: Sun Nov 4 11:49:58 2018 +0100 staging: mt7621-pci: move some code into 'mt7621_pcie_init_ports' Some clocks bits related code is in driver probe function and can perfectly be moved into 'mt7621_pcie_init_ports' function which is a more accurate place for it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 802a2f7b2fe36b06681f80a54a3eba167a8e500e Author: Sergio Paracuellos Date: Sun Nov 4 11:49:57 2018 +0100 staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function Function 'mt7621_pcie_enable_ports' tries to enable all PCI ports. To make it more readable the single port initialization part has been factor out into a new 'mt7621_pcie_enable_port' function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 1e80699fd6a5e3f6940aa1209c30ca1b02f57819 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:56 2018 +0100 staging: mt7621-pci: enable interrupt when port is being enabled Interrupt is being enabled in port initialization when the port phy has not been initialized yet. Just enable the interrupt when the port is being enabled which is a more accurate place for this. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit bcb4530736a6f7215ab9306f669a8688adf7448c Author: Sergio Paracuellos Date: Sun Nov 4 11:49:55 2018 +0100 staging: mt7621-pci: use PCIE_PORT_LINKUP instead of hardcode value PCIE_PORT_LINKUP is defined and can be used to check if link is up for each controller. Use it instead of use a hardcode value. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit bd1a05bd87ad8b66c9bad4614514a1551015074e Author: Sergio Paracuellos Date: Sun Nov 4 11:49:54 2018 +0100 staging: mt7621-pci: use PERST_N instead of gpio control Driver is using gpio control instead of each port PERST_N bit. Use PERST_N bit of each port cleaning all the ugly gpio code in driver probe function. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit fb672b450ccced9032c58c111c6aaf6aa39ab544 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:53 2018 +0100 staging: mt7621-pci: add some definitions for enabling and disabling GEN and GEN1 clocks Instead of use hardcoded values when calling 'rt_sysc_m32' for enabling and disabling RALINK_PCIE_CLK_GEN and RALINK_PCIE_CLK_GEN1 create some preprocessor definitions. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 301c15be69afa98b188545d83422245c01f69743 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:52 2018 +0100 staging: mt7621-pci: rewrite hardcoded code for enabling ports There are some hardcoded values in the process for enabling and disabling some stuff inside 'mt7621_pcie_enable_ports' function. Create some preprocessor definitions to make code more readable. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit a4b2eb912bb13c3c55d2389ee7e954468d0df052 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:51 2018 +0100 staging: mt7621-pci: rewrite RC FTS configuration The RC FTS configuration is done using hardcoded registers and bitshift operations. Make it a bit clean defining some prepocessor definitions and simple macros. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit ce3368dc942bdd518d599f1a452e03f81d3e9b30 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:50 2018 +0100 staging: mt7621-pci: align function definition style along the code Make some function definition changes in order to get all the functions in the code with the same style. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit b842e0b972ab089518dc14f69f85c9a8575101c2 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:49 2018 +0100 staging: mt7621-pci: remove non sense comment There is a comment at the beggining which has no sense at all. Remove it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit a934d9017520cf418e9471a83cc53b55fc30b010 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:48 2018 +0100 staging: mt7621-pci: reorder preprocessor definitions Reorder a bit register definitions and some values into logical groups adding some comments for each group. Also unify all of register to use 16 bit in definitions instead of having some with 16 bits and some with 8 bits. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 58180d33ee08b3b25255fed48cfc961ef9638bbb Author: Sergio Paracuellos Date: Sun Nov 4 11:49:47 2018 +0100 staging: mt7621-pci: remove unused preprocessor definitions There are some preprocessor definition which are not being used at all. Remove them cleaning the code a bit. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit cd910f19ac021307948c1169dc577cbaf89db015 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:46 2018 +0100 staging: mt7621-pci: factor out 'mt7621_pcie_init_ports' function Instead of just inline this code in the probe driver function factor out a new 'mt7621_pcie_init_ports' function to achieve this. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit e2200279af2f0e4132feaf5d609e3a82cc484acc Author: Sergio Paracuellos Date: Sun Nov 4 11:49:45 2018 +0100 staging: mt7621-pci: avoid use of global variable 'pcie_link_status' 'pcie_link_status' is a global variable which is being used as a mask to know which virtual bridges are or not enabled. Instead of this extract a new 'mt7621_pcie_init_virtual_bridges' function where a similar local variable is used for the same task. This allow us to properly configure the virtual PCI-PCI bridges in configuration registers of the mt7621 pci controller. For a correct initiation of which is connected use 'enabled' field of 'mt7621_pcie_port' struct. With this change driver probe function gets a bit cleaner and readable. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit a41a1f86189b31feebcb676cff824b83921db81a Author: Sergio Paracuellos Date: Sun Nov 4 11:49:44 2018 +0100 staging: mt7621-pci: factor out 'mt7621_pcie_enable_ports' function Driver probe function check for a bit in 'pcie_link_status' for enabling the pcie port or not. Instead of this add 'enabled' field in 'mt7621_pcie_port' structure and check its value to achieve this inside a new 'mt7621_pcie_enable_ports' function. The offsets for the correct port are derived from the slot of the port. This field 'enabled' is properly initilized in 'mt7621_pcie_init_port'. Also depending of the number of ports enabled we have to properly init its registers taking into account that we will use virtual bridges from zero to num_slots_enabled as follows: - Only one enabled -> only enable virtual bridge 0. - Two enabled -> enable virtual bridges 0 and 1. - Three enabled -> enable virtual bridges 0, 1 and 2. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit d936550784a23b8dac077733cdf2f554a019286b Author: Sergio Paracuellos Date: Sun Nov 4 11:49:43 2018 +0100 staging: mt7621-pci: use dev_* functions instead of printk checkpatch script is complaining about the use of printk instead of use more proper dev_* kernel functions. Replace all of them removing warnings. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit d2bac2fd6daa917389e975f1a2f502b538b99271 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:42 2018 +0100 staging: mt7621-pci: use a trailing */ on a separate line Chackpatch script is compalining about one comment which is not following the kernel style. Fix it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 89e9f6e6adfcd0d92fb33f975897db1b0d154565 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:41 2018 +0100 staging: mt7621-pci: remap and use sysctl from device tree There are some pointer read and writes which can be replaced properly using sysctl registers readed from device tree. Remap sysctl registers and replace in proper places. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 624c5227ed0a72a72e3b60860dd7c8519bec1a5a Author: Sergio Paracuellos Date: Sun Nov 4 11:49:40 2018 +0100 staging: mt7621-dts: add sysctl registers base address to pcie Add missing system control registers address in pcie node of the device tree. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 4fdf3abcba03e57635cc05c8b3377151848438b7 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:39 2018 +0100 staging: mt7621-pci: rename 'mt7621_pcie_enable_port' into 'mt7621_pcie_init_port' Rename function 'mt7621_pcie_enable_port' with a name which is better for what the function is really doing calling it 'mt7621_pcie_init_port'. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit f443b5c22ebdbd4f3543d1f7ec44b0c455420665 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:38 2018 +0100 staging: mt7621-pci: debug port N_FTS inside 'mt7621_pcie_enable_port' Move debug for the port N_FTS from driver probe function to the more appropiate one 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 3beb6da5d52a1722b33a9355fc191995d0abb6de Author: Sergio Paracuellos Date: Sun Nov 4 11:49:37 2018 +0100 staging: mt7621-pci: factor out 'mt7621_enable_phy' function Factor out a new function 'mt7621_enable_phy' for enabling the pcie phy for each port and call it from 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 6b767904b90e323626f72a6c3365d63de81c4207 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:36 2018 +0100 staging: mt7621-pci: rewrite pcie phy related functions Function 'bypass_pipe_rst' and 'set_phy_for_ssc' can be written in a cleaner way. Instead of use comments to see which bits are the ones which are being enabled add new macros with that information using BIT and GENMASK kernel macros. Avoid the use of set_pcie_phy which is kind of dark and use new macros also resetting and adding bits using bitwise operators directly in the code. Now these function are offset-based on the port to use them cleaner in driver probe functio and improving readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 7bf10a7261c42aea8c6620038fc640683dab4603 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:35 2018 +0100 staging: mt7621-pci: reagroup reset related macros all together Reset bits related macros are in different parts. Reagroup all of them together to improve readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit d9ecdd396cd5037b38ebd791aae032faab89c5bc Author: Sergio Paracuellos Date: Sun Nov 4 11:49:34 2018 +0100 staging: mt7621-pci: remove reset related unused macros There are three macros which are not being used at all. Remove them. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit bd74b4a290f207bfc60592f6ff98a8b638a32601 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:33 2018 +0100 staging: mt7621-pci: remove two commented code lines This two lines whch are commented are not needed at all. Remove them. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 335bbd9ed7f967c54933005359304c1336b99d2e Author: Sergio Paracuellos Date: Sun Nov 4 11:49:32 2018 +0100 staging: mt7621-pci: remove GPL2+ text from license header This file has a valid SPDX license line added so reamining GPL2+ boilerplate text is not needed at all. Remove it. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit ed611974bd2200404947dba26a2069bca2c7166f Author: Sergio Paracuellos Date: Sun Nov 4 11:49:31 2018 +0100 staging: mt7621-pci: remove [ASSERT|DEASSERT]_SYSRST_PCIE macros Driver is using reset_control kernel API's to manage this so this two macros are not needed anymore. Remove them. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 745eeeac68d7834676f023e01b46e40d63f90fab Author: Sergio Paracuellos Date: Sun Nov 4 11:49:30 2018 +0100 staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function Driver probe function is a mess and shall be refactored a lot. At first make use of assert and deassert control factoring out a new function called 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit c8242bef7c02c5fe16cb2d2b7e16f998a64b1604 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:29 2018 +0100 staging: mt7621-pci: add two helpers for read and write pcie register ports mt7621-pcie_port data structure has filed 'base' as the base address for read and write related port registers. Create two inline functions 'pcie_port_read' and 'pcie_port_write' to make this task easier and code more readable. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit a80775d647d3f9b3e25081ca49cc2311a78b7419 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:28 2018 +0100 staging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call fails Driver probe function calls 'devm_pci_alloc_host_bridge'. If this call fails it is returning -ENODEV. Return -ENOMEM instead which is more accurate for this. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit ad9c87e129d139129958d5f97d108a21ec8628e9 Author: Sergio Paracuellos Date: Sun Nov 4 11:49:27 2018 +0100 staging: mt7621-pci: parse and init port data from device tree Add initialization of each PCIe port reading and initializing data using device tree. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman commit 01dfe40e598922e4844656d0e7f9bf3098a7bc71 Author: Ajay Singh Date: Wed Nov 7 05:05:01 2018 +0000 staging: wilc1000: update wilc1000 driver maintainer ids We would like to update the maintainer email id's for wilc1000 driver. Signed-off-by: Aditya Shankar Signed-off-by: Ganesh Krishna Signed-off-by: Adham Abozaeid Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 6be244dcd59b01245394b62a128901b1cfec468c Author: Bo YU Date: Tue Oct 30 08:01:15 2018 -0400 kobject: Fix warnings in lib/kobject_uevent.c Add a blank after declaration. Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman commit e0d70bcb38d7eae5eb4da2db130a29d7007eac74 Author: Bo YU Date: Tue Oct 30 08:01:14 2018 -0400 kobject: drop unnecessary cast "%llu" for u64 There is no searon for u64 var cast to unsigned long long type. Signed-off-by: Bo YU Signed-off-by: Greg Kroah-Hartman commit 9cac83a57e99e4692315b7a91a81bab787961d97 Author: Paul E. McKenney Date: Tue Sep 11 08:57:48 2018 -0700 rcu: Stop expedited grace periods from relying on stop-machine The CPU-selection code in sync_rcu_exp_select_cpus() disables preemption to prevent the cpu_online_mask from changing. However, this relies on the stop-machine mechanism in the CPU-hotplug offline code, which is not desirable (it would be good to someday remove the stop-machine mechanism). This commit therefore instead uses the relevant leaf rcu_node structure's ->ffmask, which has a bit set for all CPUs that are fully functional. A given CPU's bit is cleared very early during offline processing by rcutree_offline_cpu() and set very late during online processing by rcutree_online_cpu(). Therefore, if a CPU's bit is set in this mask, and preemption is disabled, we have to be before the synchronize_sched() in the CPU-hotplug offline code, which means that the CPU is guaranteed to be workqueue-ready throughout the duration of the enclosing preempt_disable() region of code. This also has the side-effect of using WORK_CPU_UNBOUND if all the CPUs for this leaf rcu_node structure are offline, which is an acceptable difference in behavior. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit 5e13a0d3f5c11df7eb297e6583cf874a79a00374 Author: Yafang Shao Date: Sun Nov 11 20:10:10 2018 +0800 tcp: minor optimization in tcp ack fast path processing Bitwise operation is a little faster. So I replace after() with using the flag FLAG_SND_UNA_ADVANCED as it is already set before. In addtion, there's another similar improvement in tcp_cwnd_reduction(). Cc: Joe Perches Suggested-by: Eric Dumazet Signed-off-by: Yafang Shao Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 0cf3a68a53829815db58461da1807728437c5de2 Merge: 8d2681f5cebbc 2defda1f4b91f Author: David S. Miller Date: Sun Nov 11 10:17:46 2018 -0800 Merge branch 'mv88e6xxx-Support-more-SERDES-interfacxes' Andrew Lunn says: ==================== net: dsa: mv88e6xxx: Support more SERDES interfacxes Currently the SERDES interfaces for ports 9 and 10 on the mv88e6390x are supported, allowing upto 10G. However, when unused, these SERDES interfaces can be used by some of the lower ports for 1000Base-X. The tricky bit here is ordering. The SERDES have to become free from ports 9 or 10 before they can be used with lower ports. Normally, this would happen only when these ports would be configured up, which is too late. So at probe time, defaulting ports 9 and 10 to 1000BaseX frees them for use with lower ports. If they are actually needed, they will be taken back when port 9 and 10 goes up. ==================== Signed-off-by: David S. Miller commit 2defda1f4b91f83a449de29cac7722afb0c57444 Author: Andrew Lunn Date: Sun Nov 11 00:32:17 2018 +0100 net: dsa: mv88e6xxx: Add support for SERDES on ports 2-8 for 6390X The 6390X family has 8 SERDES interfaces. When ports 9 and 10 are not using all their SERDES interfaces, the unused ones can be assigned to ports 2-8. Add support for interrupts from SERDES interfaces connected to these lower ports. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 787799a9d5557f9494bf79b7052d3b9ee68f3b80 Author: Andrew Lunn Date: Sun Nov 11 00:32:16 2018 +0100 net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX The 6390X family has 8 SERDES interfaces. This allows ports 9 and 10 to support up to 10Gbps using 4 SERDES interfaces. However, when lower speeds are used, which need fewer SERDES interfaces, the unused SERDES interfaces can be used by ports 2-8. The hardware defaults to ports 9 and 10 having all 4 SERDES interfaces assigned to them. This only gets changed when the interface is configured after what the SFP supports has been determined, or the 10G PHY completes auto-neg. For hardware designs which limit ports 9 and 10 to one or two SERDES interfaces, and place SFPs on the lower interfaces, this is too late. Those ports with SFP should not wait until ports 9/10 are up in order to get access to the SERDES interface. So change the default configuration when the driver is initialised. Configure ports 9 and 10 to 1000BaseX, so they use a single SERDES interface, freeing up the others. They can steal them back if they need them. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit fdc71eea8c0aefab80020044f8abf5c3c6814b44 Author: Andrew Lunn Date: Sun Nov 11 00:32:15 2018 +0100 net: dsa: mv88e6xxx: Differentiate between 6390 and 6390X cmodes The X family variants support additional ports modes, for 10G operation, which the non-X variants don't have. Add a port_set_cmode() for non-X variants to enforce this. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit b3dce4da5bb4c4c991b10c9899e6dd6ce29e8b3e Author: Andrew Lunn Date: Sun Nov 11 00:32:14 2018 +0100 net: dsa: mv88e6xxx: Group cmode ops together Move .port_set_cmode next to .port_get_cmode. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 8d2681f5cebbc082ca9e4867b333fcc886062b3b Merge: 899a3cbbf77a2 cb6402fe26358 Author: David S. Miller Date: Sun Nov 11 10:10:02 2018 -0800 Merge branch 'net-phy-convert-advertise-and-supported-to-linkmode' Andrew Lunn says: ==================== net: phy: convert advertise and supported to linkmode This is the last part in converting phylib to make use of a linux bitmap, not a u32, to represent links modes. This will allow support for PHYs > 1Gbps, which need to use link modes represented by a bit > 32. A number of MAC and PHY drivers need changes to support this. However the previous two patchesets reduced the number somewhat, the helpers which were introduced have been modified instead of the actual drivers. The follow on patches then make use of the extra bits, adding support for more link modes. Given how invasive this change is, i expect the build is broken for some architectures i did not test. I will fixup the breakage as fast as i can. ==================== Signed-off-by: David S. Miller commit cb6402fe26358a33e32fb71054b248c76dcfe491 Author: Andrew Lunn Date: Sat Nov 10 23:43:37 2018 +0100 net: phy: Add support for resolving 5G and 2.5G autoneg Now that 2.5G and 5G can be represented in phydev->advertising and phydev->lp_advertising, add these two links modes as possible resolutions to auto negotiation. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3c6b59d6f07c69dbe9d9e0191d158820bdda7f60 Author: Andrew Lunn Date: Sat Nov 10 23:43:36 2018 +0100 net: phy: Add more link modes to the settings table Now that PHYs and MAC can support more than 32 bit masks, add link modes which are > 31 to the PHY settings table. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit fe1919147c69c3b820f801eb99bcc50cec0fb5a5 Author: Andrew Lunn Date: Sat Nov 10 23:43:35 2018 +0100 net: phy: Fixup kerneldoc markup. Add missing markup for function parameters Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit c0ec3c2736774c69bf5c641aea7712132c0f0eba Author: Andrew Lunn Date: Sat Nov 10 23:43:34 2018 +0100 net: phy: Convert u32 phydev->lp_advertising to linkmode Convert phy drivers to report the link partner advertised modes using a linkmode bitmap. This allows them to report the higher speeds which don't fit in a u32. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3c1bcc8614db10803f1f57ef0295363917448cb2 Author: Andrew Lunn Date: Sat Nov 10 23:43:33 2018 +0100 net: ethernet: Convert phydev advertize and supported from u32 to link mode There are a few MAC/PHYs combinations which now support > 1Gbps. These may need to make use of link modes with bits > 31. Thus their supported PHY features or advertised features cannot be implemented using the current bitmap in a u32. Convert to using a linkmode bitmap, which can support all the currently devices link modes, and is future proof as more modes are added. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 899a3cbbf77a2a3d6d53d67ff6f10ad59eb03605 Author: Heiner Kallweit Date: Sat Nov 10 23:40:50 2018 +0100 net: phy: remove states PHY_STARTING and PHY_PENDING Both states aren't used. Most likely they result from an idea that never materialized. So remove them. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b08794a922c4202bbfee658dee2731f948a4975e Author: yupeng Date: Sat Nov 10 13:38:12 2018 -0800 documentation of some IP/ICMP snmp counters The snmp_counter.rst explains the meanings of snmp counters. It also provides a set of experiments (only 1 for this initial patch), combines the experiments' resutls and the snmp counters' meanings. This is an initial path, only explains a part of IP/ICMP counters and provide a simple ping test. Signed-off-by: yupeng Signed-off-by: David S. Miller commit 31c4f4cc32f7ba956dbeb0eb2208f1bda2468704 Author: LUU Duc Canh Date: Sat Nov 10 14:23:50 2018 -0500 tipc: improve broadcast retransmission algorithm Currently, the broadcast retransmission algorithm is using the 'prev_retr' field in struct tipc_link to time stamp the latest broadcast retransmission occasion. This helps to restrict retransmission of individual broadcast packets to max once per 10 milliseconds, even though all other criteria for retransmission are met. We now move this time stamp to the control block of each individual packet, and remove other limiting criteria. This simplifies the retransmission algorithm, and eliminates any risk of logical errors in selecting which packets can be retransmitted. Acked-by: Ying Xue Signed-off-by: LUU Duc Canh Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit bb5e6a82904551731c7d0f83f0c7cdbffebcd48b Merge: d1ce01144e75c d4b69bad61e0f Author: David S. Miller Date: Sun Nov 11 09:54:53 2018 -0800 Merge branch 'net-sched-indirect-tc-block-cb-registration' Jakub Kicinski says: ==================== net: sched: indirect tc block cb registration John says: This patchset introduces an alternative to egdev offload by allowing a driver to register for block updates when an external device (e.g. tunnel netdev) is bound to a TC block. Drivers can track new netdevs or register to existing ones to receive information on such events. Based on this, they may register for block offload rules using already existing functions. The patchset also implements this new indirect block registration in the NFP driver to allow the offloading of tunnel rules. The use of egdev offload (which is currently only used for tunnel offload) is subsequently removed. RFC v2 -> PATCH - removed embedded tracking function from indir block register (now up to driver to clean up after itself) - refactored NFP code due to recent submissions - removed priv list clean function in NFP (list should be cleared by indirect block unregisters) RFC v1->v2: - free allocated owner struct in block_owner_clean function - add geneve type helper function - move test stub in NFP (v1 patch 2) to full tunnel offload implementation via indirect blocks (v2 patches 3-8) ==================== Signed-off-by: David S. Miller commit d4b69bad61e0fc4055c108fa28846ae981948d54 Author: John Hurley Date: Fri Nov 9 21:21:31 2018 -0800 nfp: flower: remove unnecessary code in flow lookup Recent changes to NFP mean that stats updates from fw to driver no longer require a flow lookup and (because egdev offload has been removed) the ingress netdev for a lookup is now always known. Remove obsolete code in a flow lookup that matches on host context and that allows for a netdev to be NULL. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4f63fde3fc08045a232923cc83fb08defbd7ca4b Author: John Hurley Date: Fri Nov 9 21:21:30 2018 -0800 nfp: flower: remove TC egdev offloads Previously, only tunnel decap rules required egdev registration for offload in NFP. These are now supported via indirect TC block callbacks. Remove the egdev code from NFP. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3166dd07a9cba5447a9d7507a988e2eb37a04f95 Author: John Hurley Date: Fri Nov 9 21:21:29 2018 -0800 nfp: flower: offload tunnel decap rules via indirect TC blocks Previously, TC block tunnel decap rules were only offloaded when a callback was triggered through registration of the rules egress device. This meant that the driver had no access to the ingress netdev and so could not verify it was the same tunnel type that the rule implied. Register tunnel devices for indirect TC block offloads in NFP, giving access to new rules based on the ingress device rather than egress. Use this to verify the netdev type of VXLAN and Geneve based rules and offload the rules to HW if applicable. Tunnel registration is done via a netdev notifier. On notifier registration, this is triggered for already existing netdevs. This means that NFP can register for offloads from devices that exist before it is loaded (filter rules will be replayed from the TC core). Similarly, on notifier unregister, a call is triggered for each currently active netdev. This allows the driver to unregister any indirect block callbacks that may still be active. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 65b7970edf870c8b52fb2f3e847a9a4f0720a019 Author: John Hurley Date: Fri Nov 9 21:21:28 2018 -0800 nfp: flower: increase scope of netdev checking functions Both the actions and tunnel_conf files contain local functions that check the type of an input netdev. In preparation for re-use with tunnel offload via indirect blocks, move these to static inline functions in a header file. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7885b4fc8d8e3d0e489f08144f3d4eb2952cb852 Author: John Hurley Date: Fri Nov 9 21:21:27 2018 -0800 nfp: flower: allow non repr netdev offload Previously the offload functions in NFP assumed that the ingress (or egress) netdev passed to them was an nfp repr. Modify the driver to permit the passing of non repr netdevs as the ingress device for an offload rule candidate. This may include devices such as tunnels. The driver should then base its offload decision on a combination of ingress device and egress port for a rule. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7f76fa36754b08d9709ae50cd0a9477a6f998b21 Author: John Hurley Date: Fri Nov 9 21:21:26 2018 -0800 net: sched: register callbacks for indirect tc block binds Currently drivers can register to receive TC block bind/unbind callbacks by implementing the setup_tc ndo in any of their given netdevs. However, drivers may also be interested in binds to higher level devices (e.g. tunnel drivers) to potentially offload filters applied to them. Introduce indirect block devs which allows drivers to register callbacks for block binds on other devices. The callback is triggered when the device is bound to a block, allowing the driver to register for rules applied to that block using already available functions. Freeing an indirect block callback will trigger an unbind event (if necessary) to direct the driver to remove any offloaded rules and unreg any block rule callbacks. It is the responsibility of the implementing driver to clean any registered indirect block callbacks before exiting, if the block it still active at such a time. Allow registering an indirect block dev callback for a device that is already bound to a block. In this case (if it is an ingress block), register and also trigger the callback meaning that any already installed rules can be replayed to the calling driver. Signed-off-by: John Hurley Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit dbf03d6569d76e74bb7b3253396ddd192f1c7b51 Author: Randy Dunlap Date: Mon Nov 5 23:41:27 2018 -0800 driver core: fix comments for device_block_probing() Correct function name and spelling/typo for device_block_probing() in drivers/base/dd.c. Signed-off-by: Randy Dunlap Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit 63c980470526842f2e5219ffdfeca7c3051c110c Author: Muchun Song Date: Sun Oct 28 14:39:11 2018 +0800 driver core: Replace simple_strtol by kstrtoint The simple_strtol() function is deprecated, use kstrtoint() instead. Signed-off-by: Muchun Song Signed-off-by: Greg Kroah-Hartman commit d1ce01144e75c82bc3c036863f57ac3029354429 Merge: fa28a2b244a90 ca49493633fc3 Author: David S. Miller Date: Sun Nov 11 09:44:14 2018 -0800 Merge branch 'PHYID-matching-macros' Heiner Kallweit says: ==================== net: phy: add macros for PHYID matching in PHY driver config Add macros for PHYID matching to be used in PHY driver configs. By using these macros some boilerplate code can be avoided. Use them initially in the Realtek PHY drivers. ==================== Signed-off-by: David S. Miller commit ca49493633fc3f50836cc6ee690721f2c3527084 Author: Heiner Kallweit Date: Sat Nov 10 00:40:37 2018 +0100 net: phy: realtek: use new PHYID matching macros Use new macros for PHYID matching to avoid boilerplate code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit aa2af2eb447c9a21c8c9e8d2336672bb620cf900 Author: Heiner Kallweit Date: Sat Nov 10 00:39:14 2018 +0100 net: phy: add macros for PHYID matching Add macros for PHYID matching to be used in PHY driver configs. By using these macros some boilerplate code can be avoided. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fa28a2b244a90158319dcc3bc2e21970f32160e0 Merge: d79e26a7efc22 34d884e3dae6e Author: David S. Miller Date: Sun Nov 11 09:41:32 2018 -0800 Merge branch 'phylib-simplifications' Heiner Kallweit says: ==================== net: phy: further phylib simplifications after recent changes to the state machine After the recent changes to the state machine phylib can be further simplified (w/o having to make any assumptions). ==================== Signed-off-by: David S. Miller commit 34d884e3dae6ecf0f9e9cc9be7632703a23f9f96 Author: Heiner Kallweit Date: Fri Nov 9 18:58:01 2018 +0100 net: phy: improve and inline phy_change Now that phy_mac_interrupt() doesn't call phy_change() any longer it's called from phy_interrupt() only. Therefore phy_interrupt_is_valid() returns true always and the check can be removed. In case of PHY_HALTED phy_interrupt() bails out immediately, therefore the second check for PHY_HALTED including the call to phy_disable_interrupts() can be removed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit d73a2156bdad6bdf7e0c42051c5ebbea11f6271e Author: Heiner Kallweit Date: Fri Nov 9 18:56:52 2018 +0100 net: phy: simplify phy_mac_interrupt and related functions When using phy_mac_interrupt() the irq number is set to PHY_IGNORE_INTERRUPT, therefore phy_interrupt_is_valid() returns false. As a result phy_change() effectively just calls phy_trigger_machine() when called from phy_mac_interrupt() via phy_change_work(). So we can call phy_trigger_machine() from phy_mac_interrupt() directly and remove some now unneeded code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8deeb6309cc447b9b35939558f18e2164dd110df Author: Heiner Kallweit Date: Fri Nov 9 18:55:50 2018 +0100 net: phy: don't set state PHY_CHANGELINK in phy_change State PHY_CHANGELINK isn't needed here, we can call the state machine directly. We just have to remove the check for phy_polling_mode() to make this work also in interrupt mode. Removing this check doesn't cause any overhead because when not polling the state machine is called only if required by some event. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit d79e26a7efc22c4cc2cd66529cc3bd4e0ed5938a Merge: e15e067d06566 a4307c0ec6613 Author: David S. Miller Date: Sun Nov 11 09:37:04 2018 -0800 Merge branch 'remove-PHY_HAS_INTERRUPT' Heiner Kallweit says: ==================== net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt Flag PHY_HAS_INTERRUPT is used only here for this small check. I think using interrupts isn't possible if a driver defines neither config_intr nor ack_interrupts callback. So we can replace checking flag PHY_HAS_INTERRUPT with checking for these callbacks. This allows to remove this flag from all driver configs. v2: - add helper for check in patch 1 - remove PHY_HAS_INTERRUPT from all drivers, not only Realtek - remove flag PHY_HAS_INTERRUPT completely v3: - rebase patch 2 ==================== Signed-off-by: David S. Miller commit a4307c0ec66131e722a8fa0f1da09646c46ee924 Author: Heiner Kallweit Date: Fri Nov 9 18:17:22 2018 +0100 net: phy: remove flag PHY_HAS_INTERRUPT from driver configs Now that flag PHY_HAS_INTERRUPT has been replaced with a check for callbacks config_intr and ack_interrupt, we can remove setting this flag from all driver configs. Last but not least remove flag PHY_HAS_INTERRUPT completely. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0d2e778e38e0ddffab4bb2b0e9ed2ad5165c4bf7 Author: Heiner Kallweit Date: Fri Nov 9 18:16:28 2018 +0100 net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt Flag PHY_HAS_INTERRUPT is used only here for this small check. I think using interrupts isn't possible if a driver defines neither config_intr nor ack_interrupts callback. So we can replace checking flag PHY_HAS_INTERRUPT with checking for these callbacks. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 72e3a5248da9046d17aec9366976a3ec45ceeb3c Author: Nishad Kamdar Date: Fri Nov 9 13:07:18 2018 +0530 staging: iio: ad7816: Set RD/WR pin and CONVST pin as outputs. The RD/WR pin and CONVST pin are logical inputs to the AD78xx chip as per the datasheet. Hence convert them to outputs. Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit 06c77f564ddb6a3f4a2553c02c36d62cc1a596f7 Author: Nishad Kamdar Date: Fri Nov 9 13:06:24 2018 +0530 staging: iio: ad7816: Do not use busy_pin in case of AD7818 AD7818 does not support busy_pin functionality as per datasheet. Hence drop busy_pin when AD7818 is used. Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit 723a61e0a7d21adb5e483e1a2fe20ab9dccdc6ee Author: Martin Blumenstingl Date: Sun Nov 4 00:10:24 2018 +0100 iio: adc: meson-saradc: add support for the chip's temperature sensor Channel 6 of the SAR ADC can be switched between two inputs: SAR_ADC_CH6 input (an actual pad on the SoC) and the signal from the temperature sensor inside the SoC. To get usable results from the temperature sensor we need to read the corresponding calibration data from the eFuse and pass it to the SAR ADC registers. If the temperature sensor is not calibrated (the eFuse data contains a bit for this) then the driver will only register the iio_chan_spec's for voltage measurements. This only enables the temperature sensor for the Meson8 SoC. Meson8b and Meson8m2 SoCs can be supported in the future as well but we first need a way to pass the fifth TSC (temperature sensor coefficient) bit to the HHI register area (apart from that the infrastructure as already implemented for Meson8 can be used). On the 64-bit SoCs (GXBB, GXL and GXM) the temperature sensor inside SAR ADC is firmware-controlled (by BL30, we can simply use the SCPI hwmon driver to get the chip temperature). To keep the devicetree interface backwards compatible we simply skip the temperature sensor initialization if no eFuse nvmem cell is passed via devicetree. The public documentation for the SAR ADC IP block does not explain how to use the registers to read the temperature. The logic from this patch is based on reading and understanding Amlogic's GPL kernel sources. Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit 27be1f6408baa0ac629f3273433f61051357a60a Author: Martin Blumenstingl Date: Sun Nov 4 00:10:23 2018 +0100 dt-bindings: iio: adc: meson-saradc: add temperature sensor support The 32-bit Meson8 SoC can use the SAR ADC to read the chip temperature. This requires setting the correct TSC (temperature sensor coefficient), which is programmed into the eFuse during the manufacturing process. Meson8b and Meson8m2 are not supported yet because they have a 5-bit TSC and only the first four bits are stored inside the SAR ADC registers. Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit addacf3b49ffc0ad0e8ec96697394fd2c2d0fcdb Author: Matheus Tavares Date: Sat Nov 3 19:49:48 2018 -0300 staging:iio:ad2s90: Check channel type at read_raw This patch adds a channel type check at the beginning of the ad2s90_read_raw function. Since ad2s90 has only one channel, it just checks if the given channel is the expected one and if not, return -EINVAL. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit ccba40e9f76f65a755f8da00d4e00f49883c7d52 Author: Victor Colombo Date: Sat Nov 3 19:49:47 2018 -0300 staging:iio:ad2s90: Add IIO_CHAN_INFO_SCALE to channel spec and read_raw This patch adds the IIO_CHAN_INFO_SCALE mask to ad2s90_chan and implements the relative read behavior at ad2s90_read_raw. Signed-off-by: Victor Colombo Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit f14a283c2d58d9a86dab20ab2e0671f826042600 Author: Matheus Tavares Date: Sat Nov 3 19:49:46 2018 -0300 staging:iio:ad2s90: Move device registration to the end of probe Previously, devm_iio_device_register was being called before the spi_setup call and the spi_device's max_speed_hz and mode assignments. This could lead to a race condition since the driver was still being set up after it was already made ready to use. To fix it, this patch moves the device registration to the end of ad2s90_probe. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit addb2ebe4a346b36cd7f4b12eeda1a0e2e92550a Author: Matheus Tavares Date: Sat Nov 3 19:49:45 2018 -0300 staging:iio:ad2s90: Remove always overwritten assignment This patch removes an initial assignment to the variable ret at probe, that was always overwritten. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit b3a3eafeef769c6982e15f83631dcbf8d1794efb Author: Matheus Tavares Date: Sat Nov 3 19:49:44 2018 -0300 staging:iio:ad2s90: Make probe handle spi_setup failure Previously, ad2s90_probe ignored the return code from spi_setup, not handling its possible failure. This patch makes ad2s90_probe check if the code is an error code and, if so, do the following: - Call dev_err with an appropriate error message. - Return the spi_setup's error code. Note: The 'return ret' statement could be out of the 'if' block, but this whole block will be moved up in the function in the patch: 'staging:iio:ad2s90: Move device registration to the end of probe'. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit 070e8c7da116b81faf0026ecd281e92ad4917a81 Author: Matheus Tavares Date: Sat Nov 3 19:49:43 2018 -0300 staging:iio:ad2s90: Make read_raw return spi_read's error code Previously, when spi_read returned an error code inside ad2s90_read_raw, the code was ignored and IIO_VAL_INT was returned. This patch makes the function return the error code returned by spi_read when it fails. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit 5ccc612b835b5e1560f913ec96ed6fdc7835892e Author: Renato Lui Geh Date: Thu Nov 1 11:43:02 2018 -0300 staging: iio: ad7780: fix offset read value Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assigning the correct value instead. Signed-off-by: Renato Lui Geh Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 382c7fce7005b55f0583cf5905758d2b8def803a Author: Nishad Kamdar Date: Wed Oct 31 21:30:36 2018 +0530 staging: iio: ad2s1210: Add device tree table. Add device tree table for matching vendor ID. Note that as the driver is still heavily in flux and there are some non obvious aspects to a comprehensive binding, that binding will be submitted at a later date (before leaving staging!) Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit 66dd9e3d5e038f46f2cbecc76a1e970b614dc824 Author: Nishad Kamdar Date: Wed Oct 31 21:29:53 2018 +0530 staging: iio: ad2s1210: Drop the gpioin flag. Drop gpioin flag which decides how the GPIOs are controlled as the GPIOs must be outputs for the host as per the datasheet. Removes need for platform data so that is dropped as well. Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit f356dc6ec26b3990070ca16ec12a4239e9128bd8 Author: Nishad Kamdar Date: Wed Oct 31 21:28:52 2018 +0530 staging: iio: ad2s1210: Switch to the gpio descriptor interface Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron commit 74cf7b8614bc0ddad9ba00857b54cec1ef2ac635 Author: Matt Ranostay Date: Sun Oct 28 13:43:54 2018 -0700 iio: potentiometer: tpl0102: add IIO_AVAIL_RANGE support Report the step range of the respective potentiometers that are possible to userspace. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit fdbd710b35f2d58a51575c764d191101d46d271a Author: Charles-Antoine Couret Date: Sun Oct 28 17:24:02 2018 +0100 dt-bindings: iio: dac: Add ti,dac7311 device tree bindings in documentation Description how to invoke ti-dac7311 driver from device tree file. Signed-off-by: Charles-Antoine Couret Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 7a02ef7907d8a2b4b699d815b9221c6febee0fac Author: Charles-Antoine Couret Date: Sun Oct 28 17:24:01 2018 +0100 iio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311 It is a driver for Texas Instruments 8/10/12-bit 1-channel compatible with DAC6311 and DAC5311 chips. Datasheet of this chip: http://www.ti.com/lit/ds/symlink/dac7311.pdf Signed-off-by: Charles-Antoine Couret Signed-off-by: Jonathan Cameron commit 03bd40033d66820ea8777d094160becb8bb569c2 Author: Martin Kelly Date: Thu Oct 25 19:38:12 2018 -0700 dt-bindings: iio: magn: add LSM9DS1 bindings Add DT binding documentation for the LSM9DS1 magnetometer. Signed-off-by: Martin Kelly Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit fdee2ca14bcaecbd5738c679f91acbab74b349aa Author: Slawomir Stepien Date: Fri Oct 26 18:53:10 2018 +0200 staging: iio: adc: ad7280a: don't cast type inside switch expression The type promotion will kick in, so the comparison will work. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 2eb4c9f2a5d7893e3bed451216ec248a3ce44ed2 Author: Martin Kelly Date: Thu Oct 25 19:38:11 2018 -0700 iio:magnetometer: st_magn: add BDU settings LIS3MDL and LSM9DS1 are missing BDU settings in their register maps, so add them. I don't have a LIS3MDL sensor to test, but this works correctly on the LSM9DS1, which has the same register map. Signed-off-by: Martin Kelly Signed-off-by: Jonathan Cameron commit 0d92aa2c272faea47cd5e9acb482acdb9eed2c1d Author: Martin Kelly Date: Thu Oct 25 19:38:10 2018 -0700 iio:magnetometer: st_magn: add LSM9DS1 support Update the sensor settings to support the LSM9DS1 sensor. Although the LSM9DS1 accelerometer and gyroscope are coupled together to use the same FIFO, the magnetometer is separate and can be cleanly supported without refactoring the existing driver. Signed-off-by: Martin Kelly Signed-off-by: Jonathan Cameron commit 53759e259da43fae0e5322d227ffce60857f2828 Author: Martin Kelly Date: Thu Oct 25 19:38:09 2018 -0700 iio: magnetometer: add clarifying comment Add a comment clarifying better when to use vs -magn in compatibility strings. Signed-off-by: Martin Kelly Signed-off-by: Jonathan Cameron commit ee2303515e7555abb93297d8b8d8a55b0d156388 Author: Matt Ranostay Date: Wed Oct 24 11:38:57 2018 +0100 iio: potentiometer: tpl0102: switch to using pointer to chip config More concise to have a pointer to tpl0102_cfg struct in the iio_priv data than an integer to an index of an array. Signed-off-by: Matt Ranostay Reviewed-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 0e03aca2659ef7a85eaff1a1ca9b0b498002ede8 Author: Radhey Shyam Pandey Date: Sat Sep 29 11:18:00 2018 -0600 dmaengine: xilinx_dma: Fix 64-bit simple CDMA transfer In AXI CDMA simple mode also pass MSB bits of source and destination address to xilinx_write function. This fixes simple CDMA operation mode using 64-bit addressing. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Reviewed-by: Appana Durga Kedareswara Rao Signed-off-by: Vinod Koul commit 4e47d24a908c882b94c3f60cec56f02ac4e9bcea Author: Radhey Shyam Pandey Date: Sat Sep 29 11:17:59 2018 -0600 dmaengine: xilinx_dma: Introduce helper macro for preparing dma address This patch introduces the xilinx_prep_dma_addr_t macro which prepares dma_addr_t from hardware buffer descriptor LSB and MSB fields. It will be used in simple dma 64-bit programming sequence. Signed-off-by: Radhey Shyam Pandey Reviewed-by: Appana Durga Kedareswara Rao Signed-off-by: Vinod Koul commit 91b438286ef227b5a9148156896175c8e386c6b2 Author: Radhey Shyam Pandey Date: Sat Sep 29 11:17:57 2018 -0600 dmaengine: xilinx_dma: Refactor axidma channel allocation In axidma alloc_chan_resources merge BD and cyclic BD allocation. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Signed-off-by: Vinod Koul commit b1f01e48df5a3454b88c5ff1eb4501f685351c67 Author: Shun-Chih Yu Date: Thu Oct 18 15:49:11 2018 +0800 dmaengine: mediatek: Add MediaTek Command-Queue DMA controller for MT6765 SoC MediaTek Command-Queue DMA controller (CQDMA) on MT6765 SoC is dedicated to memory-to-memory transfer through queue based descriptor management. There are only 3 physical channels inside CQDMA, while the driver is extended to support 32 virtual channels for multiple dma users to issue dma requests onto the CQDMA simultaneously. Signed-off-by: Shun-Chih Yu Signed-off-by: Vinod Koul commit 6a1abe4cbca755253b52b7fa65e6a6f2b87561fb Author: Biju Das Date: Thu Oct 25 15:53:37 2018 +0100 dt-bindings: dmaengine: usb-dmac: Add binding for r8a77470 This patch adds usb high-speed dmac binding for r8a77470 (RZ/G1C) SoC. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Vinod Koul commit 9b68cc012a73b9333863436ac876561674035ee0 Author: Yangtao Li Date: Thu Nov 1 11:35:43 2018 -0400 dmaengine: ep93xx: fix some typo Signed-off-by: Yangtao Li Signed-off-by: Vinod Koul commit bc822e80170d672dd8ff0d07c521cf72f491cb6c Author: Russell King Date: Tue Nov 6 13:45:10 2018 +0000 dmaengine: sa11x0: unexport sa11x0_dma_filter_fn and clean up As we now have no users of sa11x0_dma_filter_fn() in the tree, we can unexport this function, and remove the now unused header file. Signed-off-by: Russell King Signed-off-by: Vinod Koul commit 9be92baa4772a315ff258f59d87a8427d5015a7c Author: Kuninori Morimoto Date: Thu Nov 8 06:32:44 2018 +0000 dmaengine: sh: convert to SPDX identifiers This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto Signed-off-by: Vinod Koul commit 80c4445e56f4f237d8c89ec4cee58d9218f55c18 Author: Stefan Wahren Date: Sat Nov 10 16:34:40 2018 +0100 dmaengine: bcm2835: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Vinod Koul commit ab39e1473acef33b4f0114088b51ac05e0b01ba3 Author: Stefan Wahren Date: Tue Oct 23 13:06:07 2018 +0200 dmaengine: bcm2835: make license text and module license match The license text is specifying GPL v2 or later but the MODULE_LICENSE is set to GPL v2 which means GNU Public License v2 only. So choose the license text as the correct one. Signed-off-by: Stefan Wahren Acked-by: Florian Kauer Acked-by: Martin Sperl Signed-off-by: Vinod Koul commit 56b657f7f9c07421a4f910b7e2b382184f1ddbc8 Author: Sara Sharon Date: Mon Jul 30 11:06:09 2018 +0300 iwlwifi: fw: use helper to determine whether to dump paging Logic is there twice, and we'll need a third place soon for ini dumping. In addition move the dumping to a function, also to enable reuse. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit f108703cb5f199d0fc98517ac29a997c4c646c94 Author: Ihab Zhaika Date: Tue Jul 31 09:53:09 2018 +0300 iwlwifi: add new cards for 9560, 9462, 9461 and killer series add few PCI ID'S for 9560, 9462, 9461 and killer series. Cc: stable@vger.kernel.org Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho commit 618e1701a2a41b2cf79d6e10d41dc23178f59597 Author: Emmanuel Grumbach Date: Mon Jul 30 15:57:08 2018 +0300 iwlwifi: mvm: remove unused conversion table chanwidths isn't used now in debugfs-vif.c. Remove it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho commit e488e593a79f4238156d2c0f5cbba2fd6457344f Author: Sara Sharon Date: Mon Jul 30 09:43:24 2018 +0300 iwlwifi: dbg: use helper to check if debug type is set This enables to incorporate more logic in one place. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit dc1aca22f8f38b7e2ad7b118db87404d11e68771 Author: Andrei Otcheretianski Date: Tue Jul 24 21:57:50 2018 +0300 iwlwifi: mvm: Send non offchannel traffic via AP sta TDLS discovery response frame is a unicast direct frame to the peer. Since we don't have a STA for this peer, this frame goes through iwl_tx_skb_non_sta(). As the result aux_sta and some completely arbitrary queue would be selected for this frame, resulting in a queue hang. Fix that by sending such frames through AP sta instead. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho commit 18ab513ebfd34d4422ad8923ff610ae35033acd6 Author: Naftali Goldstein Date: Wed Jul 25 15:52:20 2018 +0300 iwlwifi: mvm: add description to a few generic assert numbers FW asserts 0x70, 0x71, and 0x73 all just mean that the real error happened in another MAC, and to look there for the problem. Add their descriptions to the assert number lookup table so users get a nicer error message in the logs. Also, since the 4 most-significant bits of the assert number are dynamic, and depend on which MAC the assert occurred on, ignore those bits when looking up the assert name. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit 124e0eba908b061e5d7e0c60e87e6325e7555117 Author: Sara Sharon Date: Mon Jul 23 13:50:02 2018 +0300 iwlwifi: dbg: avoid passing trigger around The trigger structure is being passed around, when all we care about is whether to dump only monitor or not. Pass a bool instead. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit f09450e32adeb4f1a878b23275571a532ab9d99e Author: Sara Sharon Date: Thu Jul 19 09:15:11 2018 +0300 iwlwifi: pcie: don't reset TXQ write pointer Currently code sets the write pointer when getting the TX queue allocate response. This causes a redundant interrupt with any actual change in the pointer. Remove this write altogether. Fixes: 310181ec34e2 ("iwlwifi: move to TVQM mode") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho commit 0dde2440a77fe48495c8e99108003291db81e1a5 Author: Avraham Stern Date: Wed Jul 11 10:30:20 2018 +0300 iwlwifi: mvm: toggle tx antenna if tx fails during connection establishment If tx fails during connection establishment, try another antenna for the next tx. This will increase the chance to establish connection if one of the antennas is blocked. Note that the antenna is toggled even when failing to tx data frames since connection establishment may use EAPOLs for 802.1X authentication/ 4 way handshake. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit 5c2dbebb446539eb9640bf59a02756d6e7f1fc53 Author: Naftali Goldstein Date: Sun Jul 15 15:26:27 2018 +0300 iwlwifi: fw: do not set sgi bits for HE connection If the association supports HE, HT/VHT rates will never be used for Tx and therefore there's no need to set the sgi-per-channel-width-support bits, so don't set them in this case. Fixes: 110b32f065f3 ("iwlwifi: mvm: rs: add basic implementation of the new RS API handlers") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho commit 656fca00f317011dad2f089b3aa1fb0c22558e30 Author: Avraham Stern Date: Thu Jul 5 17:34:03 2018 +0300 iwlwifi: mvm: switch management tx antenna only on tx failure Switch the antenna used for management tx only if previous tx failed. If previous tx succeeded, there is no reason to switch antennas. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit 47242744109d50175b2fc6134de14e4195effe17 Author: Tova Mussai Date: Mon Jul 2 09:08:29 2018 +0300 iwlwifi: mvm: enable low latency for soft ap Enable low latency for softAP in all modes (standalone, SCM and DCM). This is in order to minimize the time the softAP leaves the channel for other operations Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit 8954e1eb2270fa2effffd031b4839253952c76f2 Author: Shahar S Matityahu Date: Wed Jul 4 15:31:36 2018 +0300 iwlwifi: trans: Clear persistence bit when starting the FW In D3 suspend flow in 9260 gen2 HW, the NIC receives two PERST signals. The first PERST is expected and indicates the device on coming resume flow. The second PERST causes FW restart FW restart. In order to avoid this issue, the FW set the persistence bit on. Once this bit is set, the FW ignores reset attempts. The problem is when the FW gets assert during D3 and then the persistence bit is set and causes the FW to ignore reset. To handle this issue, the FW opens the preg bit which allows access to the persistence bit, so that the driver clear the persistence bit and reset the NIC. The flow is as follows: the driver checks if the persistence bit is set. If the bit is set, the driver checks if he can clear the bit. If the driver can not clear the bit then there is no point to continue configuring the NIC since it will fail. The fix was added is in start HW flow instead of the resume flow since in general, if the persistence bit is set, the driver can not start the FW. So it is good to check it when we start configuring the NIC. The driver does not need to close the preg bit since the FW close it during the start flow. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho commit f3f240f973d103069d91e559561436e4148a7bac Author: Johannes Berg Date: Wed Jul 4 23:19:13 2018 +0200 iwlwifi: mvm: remove queue_info_lock All the queue management code runs under mvm->mutex, so there are only very few cases of accessing the data structures without it: * TX path, which doesn't take any locks anyway * iwl_mvm_wake_sw_queue() and iwl_mvm_stop_sw_queue() where we just (atomically) read a bitmap, so the lock isn't needed. Therefore, we can remove the spinlock. This enables some cleanup in the ugly locking in iwl_mvm_inactivity_check(). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 06bc6f6ed4ae0246a5e52094d1be90906a1361c7 Author: Johannes Berg Date: Wed Jul 4 23:12:33 2018 +0200 iwlwifi: mvm: synchronize TID queue removal When we mark a TID as no longer having a queue, there's no guarantee the TX path isn't using this txq_id right now, having accessed it just before we reset the value. To fix this, add synchronize_net() when we change the TIDs from having a queue to not having one, so that we can then be sure that the TX path is no longer accessing that queue. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 41c4588b06180aaa46dfc1a7d435befbbf269a93 Author: YueHaibing Date: Fri Oct 5 10:47:01 2018 +0000 iwlwifi: mvm: remove set but not used variable 'he_phy_data' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c: In function 'iwl_mvm_rx_mpdu_mq': drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1386:7: warning: variable 'he_phy_data' set but not used [-Wunused-but-set-variable] u64 he_phy_data; 'he_phy_data' never used since be introduce in commit 18ead597daa1 ("iwlwifi: support new rx_mpdu_desc api") Signed-off-by: YueHaibing Signed-off-by: Luca Coelho commit 407be8d03e20d70d15cd8c21591202a591e3c2b2 Merge: f2cbf95826fb9 e7605475f5f1a Author: Alexei Starovoitov Date: Sat Nov 10 22:29:59 2018 -0800 Merge branch 'narrow-loads' Andrey Ignatov says: ==================== This patch set adds support for narrow loads with offset > 0 to BPF verifier. Patch 1 provides more details and is the main patch in the set. Patches 2 and 3 add new test cases to test_verifier and test_sock_addr selftests. v1->v2: - fix -Wdeclaration-after-statement warning. ==================== Signed-off-by: Alexei Starovoitov commit e7605475f5f1af58668701b5ffe7763bdeb28527 Author: Andrey Ignatov Date: Sat Nov 10 22:15:15 2018 -0800 selftests/bpf: Test narrow loads with off > 0 for bpf_sock_addr Add more test cases for context bpf_sock_addr to test narrow loads with offset > 0 for ctx->user_ip4 field (__u32): * off=1, size=1; * off=2, size=1; * off=3, size=1; * off=2, size=2. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 6c2afb674dbda9b736b8f09c976516e1e788860a Author: Andrey Ignatov Date: Sat Nov 10 22:15:14 2018 -0800 selftests/bpf: Test narrow loads with off > 0 in test_verifier Test the following narrow loads in test_verifier for context __sk_buff: * off=1, size=1 - ok; * off=2, size=1 - ok; * off=3, size=1 - ok; * off=0, size=2 - ok; * off=1, size=2 - fail; * off=0, size=2 - ok; * off=3, size=2 - fail. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit 46f53a65d2de3e1591636c22b626b09d8684fd71 Author: Andrey Ignatov Date: Sat Nov 10 22:15:13 2018 -0800 bpf: Allow narrow loads with offset > 0 Currently BPF verifier allows narrow loads for a context field only with offset zero. E.g. if there is a __u32 field then only the following loads are permitted: * off=0, size=1 (narrow); * off=0, size=2 (narrow); * off=0, size=4 (full). On the other hand LLVM can generate a load with offset different than zero that make sense from program logic point of view, but verifier doesn't accept it. E.g. tools/testing/selftests/bpf/sendmsg4_prog.c has code: #define DST_IP4 0xC0A801FEU /* 192.168.1.254 */ ... if ((ctx->user_ip4 >> 24) == (bpf_htonl(DST_IP4) >> 24) && where ctx is struct bpf_sock_addr. Some versions of LLVM can produce the following byte code for it: 8: 71 12 07 00 00 00 00 00 r2 = *(u8 *)(r1 + 7) 9: 67 02 00 00 18 00 00 00 r2 <<= 24 10: 18 03 00 00 00 00 00 fe 00 00 00 00 00 00 00 00 r3 = 4261412864 ll 12: 5d 32 07 00 00 00 00 00 if r2 != r3 goto +7 where `*(u8 *)(r1 + 7)` means narrow load for ctx->user_ip4 with size=1 and offset=3 (7 - sizeof(ctx->user_family) = 3). This load is currently rejected by verifier. Verifier code that rejects such loads is in bpf_ctx_narrow_access_ok() what means any is_valid_access implementation, that uses the function, works this way, e.g. bpf_skb_is_valid_access() for __sk_buff or sock_addr_is_valid_access() for bpf_sock_addr. The patch makes such loads supported. Offset can be in [0; size_default) but has to be multiple of load size. E.g. for __u32 field the following loads are supported now: * off=0, size=1 (narrow); * off=1, size=1 (narrow); * off=2, size=1 (narrow); * off=3, size=1 (narrow); * off=0, size=2 (narrow); * off=2, size=2 (narrow); * off=0, size=4 (full). Reported-by: Yonghong Song Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov commit e15e067d0656625c77c52b4e5f0cfbf0c0c3583f Author: David S. Miller Date: Sat Nov 10 19:32:23 2018 -0800 sctp: Fix SKB list traversal in sctp_intl_store_ordered(). Same change as made to sctp_intl_store_reasm(). To be fully correct, an iterator has an undefined value when something like skb_queue_walk() naturally terminates. This will actually matter when SKB queues are converted over to list_head. Formalize what this code ends up doing with the current implementation. Signed-off-by: David S. Miller commit 348bbc25c40844c5efa083a3842c7f53d70a815e Author: David S. Miller Date: Sat Nov 10 19:28:27 2018 -0800 sctp: Fix SKB list traversal in sctp_intl_store_reasm(). To be fully correct, an iterator has an undefined value when something like skb_queue_walk() naturally terminates. This will actually matter when SKB queues are converted over to list_head. Formalize what this code ends up doing with the current implementation. Signed-off-by: David S. Miller commit 9e733177c71a81ae9be22dbacc79a0dd60a99f21 Author: David S. Miller Date: Wed Aug 22 17:01:51 2018 -0700 iucv: Remove SKB list assumptions. Eliminate the assumption that SKBs and SKB list heads can be cast to eachother in SKB list handling code. This change also appears to fix a bug since the list->next pointer is sampled outside of holding the SKB queue lock. Signed-off-by: David S. Miller commit 4a5a553ddef76cbeb346414ddfd91aef8de07532 Author: David S. Miller Date: Sat Aug 11 21:14:34 2018 -0700 brcmfmac: Use standard SKB list accessors in brcmf_sdiod_sglist_rw. Instead of direct SKB list pointer accesses. The loops in this function had to be rewritten to accommodate this more easily. The first loop iterates now over the target list in the outer loop, and triggers an mmc data operation when the per-operation limits are hit. Then after the loops, if we have any residue, we trigger the last and final operation. For the page aligned workaround, where we have to copy the read data back into the original list of SKBs, we use a two-tiered loop. The outer loop stays the same and iterates over pktlist, and then we have an inner loop which uses skb_peek_next(). The break logic has been simplified because we know that the aggregate length of the SKBs in the source and destination lists are the same. This change also ends up fixing a bug, having to do with the maintainance of the seg_sz variable and how it drove the outermost loop. It begins as: seg_sz = target_list->qlen; ie. the number of packets in the target_list queue. The loop structure was then: while (seq_sz) { ... while (not at end of target_list) { ... sg_cnt++ ... } ... seg_sz -= sg_cnt; The assumption built into that last statement is that sg_cnt counts how many packets from target_list have been fully processed by the inner loop. But this not true. If we hit one of the limits, such as the max segment size or the max request size, we will break and copy a partial packet then contine back up to the top of the outermost loop. With the new loops we don't have this problem as we don't guard the loop exit with a packet count, but instead use the progression of the pkt_next SKB through the list to the end. The general structure is: sg_cnt = 0; skb_queue_walk(target_list, pkt_next) { pkt_offset = 0; ... sg_cnt++; ... while (pkt_offset < pkt_next->len) { pkt_offset += sg_data_size; if (queued up max per request) mmc_submit_one(); } } if (sg_cnt) mmc_submit_one(); The variables that maintain where we are in the MMC command state such as req_sz, sg_cnt, and sgl are reset when we emit one of these full sized requests. Signed-off-by: David S. Miller commit f2cbf95826fb9c0ccdcb5dfec1a7de8203fd7269 Merge: 0157edc859afa 092f089273000 Author: Alexei Starovoitov Date: Sat Nov 10 15:56:11 2018 -0800 Merge branch 'bpftool-flow-dissector' Stanislav Fomichev says: ==================== v5 changes: * FILE -> PATH for load/loadall (can be either file or directory now) * simpler implementation for __bpf_program__pin_name * removed p_err for REQ_ARGS checks * parse_atach_detach_args -> parse_attach_detach_args * for -> while in bpf_object__pin_{programs,maps} recovery v4 changes: * addressed another round of comments/style issues from Jakub Kicinski & Quentin Monnet (thanks!) * implemented bpf_object__pin_maps and bpf_object__pin_programs helpers and used them in bpf_program__pin * added new pin_name to bpf_program so bpf_program__pin works with sections that contain '/' * moved *loadall* command implementation into a separate patch * added patch that implements *pinmaps* to pin maps when doing load/loadall v3 changes: * (maybe) better cleanup for partial failure in bpf_object__pin * added special case in bpf_program__pin for programs with single instances v2 changes: * addressed comments/style issues from Jakub Kicinski & Quentin Monnet * removed logic that populates jump table * added cleanup for partial failure in bpf_object__pin This patch series adds support for loading and attaching flow dissector programs from the bpftool: * first patch fixes flow dissector section name in the selftests (so libbpf auto-detection works) * second patch adds proper cleanup to bpf_object__pin, parts of which are now being used to attach all flow dissector progs/maps * third patch adds special case in bpf_program__pin for programs with single instances (we don't create /0 pin anymore, just ) * forth patch adds pin_name to the bpf_program struct which is now used as a pin name in bpf_program__pin et al * fifth patch adds *loadall* command that pins all programs, not just the first one * sixth patch adds *pinmaps* argument to load/loadall to let users pin all maps of the obj file * seventh patch adds actual flow_dissector support to the bpftool and an example ==================== Acked-by: Quentin Monnet Signed-off-by: Alexei Starovoitov commit 092f08927300086b6520dfa3aa4d9450266f27ae Author: Stanislav Fomichev Date: Fri Nov 9 08:21:46 2018 -0800 bpftool: support loading flow dissector This commit adds support for loading/attaching/detaching flow dissector program. When `bpftool loadall` is called with a flow_dissector prog (i.e. when the 'type flow_dissector' argument is passed), we load and pin all programs. User is responsible to construct the jump table for the tail calls. The last argument of `bpftool attach` is made optional for this use case. Example: bpftool prog load tools/testing/selftests/bpf/bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \ pinmaps /sys/fs/bpf/flow bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 0 0 0 0 \ value pinned /sys/fs/bpf/flow/IP bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 1 0 0 0 \ value pinned /sys/fs/bpf/flow/IPV6 bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 2 0 0 0 \ value pinned /sys/fs/bpf/flow/IPV6OP bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 3 0 0 0 \ value pinned /sys/fs/bpf/flow/IPV6FR bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 4 0 0 0 \ value pinned /sys/fs/bpf/flow/MPLS bpftool map update pinned /sys/fs/bpf/flow/jmp_table \ key 5 0 0 0 \ value pinned /sys/fs/bpf/flow/VLAN bpftool prog attach pinned /sys/fs/bpf/flow/flow_dissector flow_dissector Tested by using the above lines to load the prog in the test_flow_dissector.sh selftest. Signed-off-by: Stanislav Fomichev Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 3767a94b3253fc8c3df96913d7dec796619161c7 Author: Stanislav Fomichev Date: Fri Nov 9 08:21:45 2018 -0800 bpftool: add pinmaps argument to the load/loadall This new additional argument lets users pin all maps from the object at specified path. Signed-off-by: Stanislav Fomichev Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 77380998d91dee8aafdbe42634776ba1ef692f1e Author: Stanislav Fomichev Date: Fri Nov 9 08:21:44 2018 -0800 bpftool: add loadall command This patch adds new *loadall* command which slightly differs from the existing *load*. *load* command loads all programs from the obj file, but pins only the first programs. *loadall* pins all programs from the obj file under specified directory. The intended usecase is flow_dissector, where we want to load a bunch of progs, pin them all and after that construct a jump table. Signed-off-by: Stanislav Fomichev Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 33a2c75c55e24aa30ff9fed805ae8bea13c1e2a3 Author: Stanislav Fomichev Date: Fri Nov 9 08:21:43 2018 -0800 libbpf: add internal pin_name pin_name is the same as section_name where '/' is replaced by '_'. bpf_object__pin_programs is converted to use pin_name to avoid the situation where section_name would require creating another subdirectory for a pin (as, for example, when calling bpf_object__pin_programs for programs in sections like "cgroup/connect6"). Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit fd734c5cca62b7630703244d3613be135d646a0e Author: Stanislav Fomichev Date: Fri Nov 9 08:21:42 2018 -0800 libbpf: bpf_program__pin: add special case for instances.nr == 1 When bpf_program has only one instance, don't create a subdirectory with per-instance pin files (/0). Instead, just create a single pin file for that single instance. This simplifies object pinning by not creating unnecessary subdirectories. This can potentially break existing users that depend on the case where '/0' is always created. However, I couldn't find any serious usage of bpf_program__pin inside the kernel tree and I suppose there should be none outside. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit 0c19a9fbc9cdba29c7effb34fd5a97226bf934e6 Author: Stanislav Fomichev Date: Fri Nov 9 08:21:41 2018 -0800 libbpf: cleanup after partial failure in bpf_object__pin bpftool will use bpf_object__pin in the next commits to pin all programs and maps from the file; in case of a partial failure, we need to get back to the clean state (undo previous program/map pins). As part of a cleanup, I've added and exported separate routines to pin all maps (bpf_object__pin_maps) and progs (bpf_object__pin_programs) of an object. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit 108d50a976db70c59e6f2fc58d3252fd38ef3fc4 Author: Stanislav Fomichev Date: Fri Nov 9 08:21:40 2018 -0800 selftests/bpf: rename flow dissector section to flow_dissector Makes it compatible with the logic that derives program type from section name in libbpf_prog_type_by_name. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit 0157edc859afa96af5eefb306dde3b5fa6eddcf0 Merge: c8123ead13a5c 16a8cb5cffd0a Author: Alexei Starovoitov Date: Sat Nov 10 15:39:54 2018 -0800 Merge branch 'device-ops-as-cb' Quentin Monnet says: ==================== For passing device functions for offloaded eBPF programs, there used to be no place where to store the pointer without making the non-offloaded programs pay a memory price. As a consequence, three functions were called with ndo_bpf() through specific commands. Now that we have struct bpf_offload_dev, and since none of those operations rely on RTNL, we can turn these three commands into hooks inside the struct bpf_prog_offload_ops, and pass them as part of bpf_offload_dev_create(). This patch set changes the offload architecture to do so, and brings the relevant changes to the nfp and netdevsim drivers. ==================== Signed-off-by: Alexei Starovoitov commit 16a8cb5cffd0a2929ae97bc258d2d9c92a4e7f6d Author: Quentin Monnet Date: Fri Nov 9 13:03:32 2018 +0000 bpf: do not pass netdev to translate() and prepare() offload callbacks The kernel functions to prepare verifier and translate for offloaded program retrieve "offload" from "prog", and "netdev" from "offload". Then both "prog" and "netdev" are passed to the callbacks. Simplify this by letting the drivers retrieve the net device themselves from the offload object attached to prog - if they need it at all. There is currently no need to pass the netdev as an argument to those functions. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit a40a26322a83d4a26a99ad2616cbd77394c19587 Author: Quentin Monnet Date: Fri Nov 9 13:03:31 2018 +0000 bpf: pass prog instead of env to bpf_prog_offload_verifier_prep() Function bpf_prog_offload_verifier_prep(), called from the kernel BPF verifier to run a driver-specific callback for preparing for the verification step for offloaded programs, takes a pointer to a struct bpf_verifier_env object. However, no driver callback needs the whole structure at this time: the two drivers supporting this, nfp and netdevsim, only need a pointer to the struct bpf_prog instance held by env. Update the callback accordingly, on kernel side and in these two drivers. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit eb9119471efbf730c8f830f706026b486eb701dd Author: Quentin Monnet Date: Fri Nov 9 13:03:30 2018 +0000 bpf: pass destroy() as a callback and remove its ndo_bpf subcommand As part of the transition from ndo_bpf() to callbacks attached to struct bpf_offload_dev for some of the eBPF offload operations, move the functions related to program destruction to the struct and remove the subcommand that was used to call them through the NDO. Remove function __bpf_offload_ndo(), which is no longer used. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit b07ade27e93360197e453e5ca80eebdc9099dcb5 Author: Quentin Monnet Date: Fri Nov 9 13:03:29 2018 +0000 bpf: pass translate() as a callback and remove its ndo_bpf subcommand As part of the transition from ndo_bpf() to callbacks attached to struct bpf_offload_dev for some of the eBPF offload operations, move the functions related to code translation to the struct and remove the subcommand that was used to call them through the NDO. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 00db12c3d141356a4d1e6b6f688e0d5ed3b1f757 Author: Quentin Monnet Date: Fri Nov 9 13:03:28 2018 +0000 bpf: call verifier_prep from its callback in struct bpf_offload_dev In a way similar to the change previously brought to the verify_insn hook and to the finalize callback, switch to the newly added ops in struct bpf_prog_offload for calling the functions used to prepare driver verifiers. Since the dev_ops pointer in struct bpf_prog_offload is no longer used by any callback, we can now remove it from struct bpf_prog_offload. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 6dc18fa6f4cad69c892d6fb9499f7e41c6a88a8e Author: Quentin Monnet Date: Fri Nov 9 13:03:27 2018 +0000 bpf: call finalize() from its callback in struct bpf_offload_dev In a way similar to the change previously brought to the verify_insn hook, switch to the newly added ops in struct bpf_prog_offload for calling the functions used to perform final verification steps for offloaded programs. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 341b3e7b7b89315c43d262da3199098bcf9bbe57 Author: Quentin Monnet Date: Fri Nov 9 13:03:26 2018 +0000 bpf: call verify_insn from its callback in struct bpf_offload_dev We intend to remove the dev_ops in struct bpf_prog_offload, and to only keep the ops in struct bpf_offload_dev instead, which is accessible from more locations for passing function pointers. But dev_ops is used for calling the verify_insn hook. Switch to the newly added ops in struct bpf_prog_offload instead. To avoid table lookups for each eBPF instruction to verify, we remember the offdev attached to a netdev and modify bpf_offload_find_netdev() to avoid performing more than once a lookup for a given offload object. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 1385d755cfb42f596ef1cf9f5c761010ff3b34e7 Author: Quentin Monnet Date: Fri Nov 9 13:03:25 2018 +0000 bpf: pass a struct with offload callbacks to bpf_offload_dev_create() For passing device functions for offloaded eBPF programs, there used to be no place where to store the pointer without making the non-offloaded programs pay a memory price. As a consequence, three functions were called with ndo_bpf() through specific commands. Now that we have struct bpf_offload_dev, and since none of those operations rely on RTNL, we can turn these three commands into hooks inside the struct bpf_prog_offload_ops, and pass them as part of bpf_offload_dev_create(). This commit effectively passes a pointer to the struct to bpf_offload_dev_create(). We temporarily have two struct bpf_prog_offload_ops instances, one under offdev->ops and one under offload->dev_ops. The next patches will make the transition towards the former, so that offload->dev_ops can be removed, and callbacks relying on ndo_bpf() added to offdev->ops as well. While at it, rename "nfp_bpf_analyzer_ops" as "nfp_bpf_dev_ops" (and similarly for netdevsim). Suggested-by: Jakub Kicinski Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 1da6f5733853fb230265fe1a7d1b5373f13bf5ca Author: Quentin Monnet Date: Fri Nov 9 13:03:24 2018 +0000 nfp: bpf: move nfp_bpf_analyzer_ops from verifier.c to offload.c We are about to add several new callbacks to the struct, all of them defined in offload.c. Move the struct bpf_prog_offload_ops object in that file. As a consequence, nfp_verify_insn() and nfp_finalize() can no longer be static. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov commit 6083e28aa02d7c9e6b87f8b944e92793094ae047 Author: Michał Mirosław Date: Sat Nov 10 19:55:34 2018 +0100 OVS: remove VLAN_TAG_PRESENT - fixup It turns out I missed one VLAN_TAG_PRESENT in OVS code while rebasing. This fixes it. Fixes: 9df46aefafa6 ("OVS: remove use of VLAN_TAG_PRESENT") Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 8e18ebef4dd4c83cea65730821da423553ed6019 Author: Jens Axboe Date: Sat Nov 10 13:03:52 2018 -0700 null_blk: remove unused nullb device The compiler rightfully complains: drivers/block/null_blk_main.c: In function ‘null_complete_rq’: drivers/block/null_blk_main.c:647:16: warning: unused variable ‘nullb’ [-Wunused-variable] struct nullb *nullb = rq->q->queuedata; ^~~~~ Fixes: 49f6613632f9 ("nullb: remove leftover legacy request code") Signed-off-by: Jens Axboe commit 1722bc0e8c2f6f798948ade79c6678e15656a3e5 Author: Colin Ian King Date: Fri Nov 9 13:37:57 2018 +0000 EDAC: Fix indentation issues in several EDAC drivers Replace spaces with tabs and insert missing indentation. [ bp: Rewrite commit message. ] Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov CC: "Arvind R." CC: Mark Gross CC: Mauro Carvalho Chehab CC: Ranganathan Desikan CC: kernel-janitors@vger.kernel.org CC: linux-edac Link: http://lkml.kernel.org/r/20181109133757.21471-1-colin.king@canonical.com commit 22ce0a7ccf23d55d1fdaa2974002f8b5ae765665 Author: Christoph Hellwig Date: Sat Nov 10 09:30:49 2018 +0100 ide: don't use req->special Just replace it with a field of the same name in struct ide_req. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 289d088b66182076d33b5579417d429371cf9dfd Author: Christoph Hellwig Date: Sat Nov 10 09:30:48 2018 +0100 pd: replace ->special use with private data in the request Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 61e7712e25bbe964c9537bb1171bac4df7afa593 Author: Christoph Hellwig Date: Sat Nov 10 09:30:47 2018 +0100 aoe: replace ->special use with private data in the request Makes the code a whole lot easier to read. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1bee42438f32de405987b4a41b93624b184ae481 Author: Christoph Hellwig Date: Sat Nov 10 09:30:46 2018 +0100 skd_main: don't use req->special Add a retries field to the internal request structure instead, which gets set to zero on the first submission. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 49f6613632f9504ae59ccbbb92a5b07f474d75b2 Author: Christoph Hellwig Date: Sat Nov 10 09:30:45 2018 +0100 nullb: remove leftover legacy request code null_softirq_done_fn is only used for the blk-mq path, so remove the other branch. Also rename the function to better match the method name. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 511c49fe1804671800947b69281e07719fad25e2 Author: Christoph Hellwig Date: Sat Nov 10 09:30:44 2018 +0100 fnic: fix fnic_scsi_host_{start,end}_tag The way these functions abuse ->special to try to store the dummy request looks completely broken, given that it actually stores the original scsi command. Instead switch to ->host_scribble and store the actual dummy command. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8122e7cd806df4c696eed0c9a6ad1e69dfe783fc Author: Rajneesh Bhardwaj Date: Fri Nov 9 00:32:44 2018 +0530 platform/x86: intel_pmc_core: Decode Snoop / Non Snoop LTR The LTR values follow PCIE LTR encoding format and can be decoded as per https://pcisig.com/sites/default/files/specification_documents/ECN_LatencyTolnReporting_14Aug08.pdf This adds support to translate the raw LTR values as read from the PMC to meaningful values in nanosecond units of time. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit 2d649d972bae50199a498f46b945ef8fd78cad5a Author: Rajneesh Bhardwaj Date: Fri Nov 9 00:32:43 2018 +0530 platform/x86: intel_pmc_core: Fix LTR IGNORE Max offset Cannonlake PCH allows us to ignore LTR from more IPs than Sunrisepoint PCH so make the LTR ignore platform specific. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit 2eb150558bb79ee01c39b64c2868216c0be2904f Author: Rajneesh Bhardwaj Date: Fri Nov 9 00:32:42 2018 +0530 platform/x86: intel_pmc_core: Show Latency Tolerance info This adds support to show the Latency Tolerance Reporting for the IPs on the PCH as reported by the PMC. The format shown here is raw LTR data payload that can further be decoded as per the PCI specification. This also fixes some minor alignment issues in the header file by removing spaces and converting to tabs at some places. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko commit 12ceaf8864c269467846379ebea56a2b996f9e3b Author: David S. Miller Date: Fri Nov 9 21:18:48 2018 -0800 infiniband: nes: Fix more direct skb list accesses. The following: skb = skb->next; ... if (skb == (struct sk_buff *)queue) is transformed into: skb = skb_peek_next(skb, queue); ... if (!skb) Signed-off-by: David S. Miller commit 457937bd2e8e70d3a37eee3eaa45d86d169a6762 Author: Kyle Roeschley Date: Fri Nov 9 12:48:03 2018 -0600 net: phy: leds: Don't make our own link speed names The phy core provides a handy phy_speed_to_str() helper, so use that instead of doing our own formatting of the different known link speeds. To do this, increase PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE to 11 so we can fit 'Unsupported' if necessary. Signed-off-by: Kyle Roeschley Signed-off-by: David S. Miller commit 695bce8fd8e994999f40ee279e2fa9979cbae87a Author: Heiner Kallweit Date: Fri Nov 9 18:35:52 2018 +0100 net: phy: improve struct phy_device member interrupts handling As a heritage from the very early days of phylib member interrupts is defined as u32 even though it's just a flag whether interrupts are enabled. So we can change it to a bitfield member. In addition change the code dealing with this member in a way that it's clear we're dealing with a bool value. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a4bec00b2879e3f9ea99411e37632eabd31c5c65 Merge: 029a374348807 5500598abbfb5 Author: David S. Miller Date: Fri Nov 9 20:08:59 2018 -0800 Merge branch 'dpaa2-eth-defer-probe-on-object-allocate' Ioana Ciornei says: ==================== dpaa2-eth: defer probe on object allocate Allocatable objects on the fsl-mc bus may be probed by the fsl_mc_allocator after the first attempts of other drivers to use them. Defer the probe when this situation happens. Changes in v2: - proper handling of IS_ERR_OR_NULL ==================== Signed-off-by: David S. Miller commit 5500598abbfb5b46201b9768bd9ea873a5eeaece Author: Ioana Ciornei Date: Fri Nov 9 15:26:46 2018 +0000 dpaa2-ptp: defer probe when portal allocation failed The fsl_mc_portal_allocate can fail when the requested MC portals are not yet probed by the fsl_mc_allocator. In this situation, the driver should defer the probe. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit d7f5a9d89a55af68908a013811404971f88d661e Author: Ioana Ciornei Date: Fri Nov 9 15:26:45 2018 +0000 dpaa2-eth: defer probe on object allocate The fsl_mc_object_allocate function can fail because not all allocatable objects are probed by the fsl_mc_allocator at the call time. Defer the dpaa2-eth probe when this happens. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 029a374348807222a872ba4baaf6e3e96846aa16 Author: Paolo Abeni Date: Fri Nov 9 15:52:45 2018 +0100 udp6: cleanup stats accounting in recvmsg() In the udp6 code path, we needed multiple tests to select the correct mib to be updated. Since we touch at least a counter at each iteration, it's convenient to use the recently introduced __UDPX_MIB() helper once and remove some code duplication. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 560f1ba4d8e8cb70f59b704a6edfa094b9bc0266 Author: Jakub Kicinski Date: Fri Nov 9 18:50:00 2018 -0800 nfp: use the new __netdev_tx_sent_queue() BQL optimisation __netdev_tx_sent_queue() was added in commit e59020abf0f ("net: bql: add __netdev_tx_sent_queue()") and allows for better GSO performance. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3f2bba7d681b4bc38a7421940b8c2472f41711e4 Merge: 70e79832af9fb 6fe42e228dc2e Author: David S. Miller Date: Fri Nov 9 19:43:51 2018 -0800 Merge branch 'ptp-more-accurate-PHC-system-clock-synchronization' Miroslav Lichvar says: ==================== More accurate PHC<->system clock synchronization RFC->v1: - added new patches - separated PHC timestamp from ptp_system_timestamp - fixed memory leak in PTP_SYS_OFFSET_EXTENDED - changed PTP_SYS_OFFSET_EXTENDED to work with array of arrays - fixed PTP_SYS_OFFSET_EXTENDED to break correctly from loop - fixed timecounter updates in drivers - split gettimex in igb driver - fixed ptp_read_* functions to be available without CONFIG_PTP_1588_CLOCK This series enables a more accurate synchronization between PTP hardware clocks and the system clock. The first two patches are minor cleanup/bug fixes. The third patch adds an extended version of the PTP_SYS_OFFSET ioctl, which returns three timestamps for each measurement. The idea is to shorten the interval between the system timestamps to contain just the reading of the lowest register of the PHC in order to reduce the error in the measured offset and get a smaller upper bound on the maximum error. The fourth patch deprecates the original gettime function. The remaining patches update the gettime function in order to support the new ioctl in the e1000e, igb, ixgbe, and tg3 drivers. Tests with few different NICs in different machines show that: - with an I219 (e1000e) the measured delay was reduced from 2500 to 1300 ns and the error in the measured offset, when compared to the cross timestamping supported by the driver, was reduced by a factor of 5 - with an I210 (igb) the delay was reduced from 5100 to 1700 ns - with an I350 (igb) the delay was reduced from 2300 to 750 ns - with an X550 (ixgbe) the delay was reduced from 1950 to 650 ns - with a BCM5720 (tg3) the delay was reduced from 2400 to 1200 ns ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 6fe42e228dc2eb169afcde6f7b70c28175527753 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:49 2018 +0100 tg3: extend PTP gettime function to read system clock This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Michael Chan Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller commit 018ed23ddc7aa80834f3953364363ac47ec8d127 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:48 2018 +0100 ixgbe: extend PTP gettime function to read system clock This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Jacob Keller Cc: Jeff Kirsher Signed-off-by: Miroslav Lichvar Acked-by: Jeff Kirsher Signed-off-by: David S. Miller commit cff8ba28dbf96f16c9941369234db9d4ca9d7d58 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:47 2018 +0100 igb: extend PTP gettime function to read system clock This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Jacob Keller Cc: Jeff Kirsher Signed-off-by: Miroslav Lichvar Acked-by: Jeff Kirsher Signed-off-by: David S. Miller commit 98942d70538a16cdc06389456a4cd0ea62559432 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:46 2018 +0100 e1000e: extend PTP gettime function to read system clock This adds support for the PTP_SYS_OFFSET_EXTENDED ioctl. Cc: Richard Cochran Cc: Jacob Keller Cc: Jeff Kirsher Signed-off-by: Miroslav Lichvar Acked-by: Jeff Kirsher Signed-off-by: David S. Miller commit 916444df305ef5b8a7d824aac7dd2aeba3a4db3b Author: Miroslav Lichvar Date: Fri Nov 9 11:14:45 2018 +0100 ptp: deprecate gettime64() in favor of gettimex64() When a driver provides gettimex64(), use it in the PTP_SYS_OFFSET ioctl and POSIX clock's gettime() instead of gettime64(). Drivers should provide only one of the functions. Cc: Richard Cochran Cc: Jacob Keller Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller commit 361800876f80da3915c46e388fc682532228b2c3 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:44 2018 +0100 ptp: add PTP_SYS_OFFSET_EXTENDED ioctl The PTP_SYS_OFFSET ioctl, which can be used to measure the offset between a PHC and the system clock, includes the total time that the driver needs to read the PHC timestamp. This typically involves reading of multiple PCI registers (sometimes in multiple iterations) and the register that contains the lowest bits of the timestamp is not read in the middle between the two readings of the system clock. This asymmetry causes the measured offset to have a significant error. Introduce a new ioctl, driver function, and helper functions, which allow the reading of the lowest register to be isolated from the other readings in order to reduce the asymmetry. The ioctl returns three timestamps for each measurement: - system time right before reading the lowest bits of the PHC timestamp - PHC time - system time immediately after reading the lowest bits of the PHC timestamp Cc: Richard Cochran Cc: Jacob Keller Cc: Marcelo Tosatti Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller commit 83d0bdc7390b890905634186baaa294475cd6a06 Author: Miroslav Lichvar Date: Fri Nov 9 11:14:43 2018 +0100 ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl If a gettime64 call fails, return the error and avoid copying data back to user. Cc: Richard Cochran Cc: Jacob Keller Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller commit fbb960ac26172215b8dc6635eac13c3a0739d6ed Author: Miroslav Lichvar Date: Fri Nov 9 11:14:42 2018 +0100 ptp: reorder declarations in ptp_ioctl() Reorder declarations of variables as reversed Christmas tree. Cc: Richard Cochran Suggested-by: Richard Cochran Signed-off-by: Miroslav Lichvar Signed-off-by: David S. Miller commit e41128cfd9389b889e91097b8ca61574d1e71482 Author: YueHaibing Date: Sat Nov 10 02:41:14 2018 +0000 block: remove set but not used variable 'et' Fixes gcc '-Wunused-but-set-variable' warning: block/blk-ioc.c: In function 'put_io_context_active': block/blk-ioc.c:174:24: warning: variable 'et' set but not used [-Wunused-but-set-variable] It not used any more after commit a1ce35fa4985 ("block: remove dead elevator code") Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit 0e17e06cbf7ede285ab74bab44d888b40c21f828 Author: Christoph Hellwig Date: Fri Nov 9 14:42:41 2018 +0100 block: remove the BLKPREP_* values. Unused now. Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4c1cb67c03511a4a404aaaeb206222d5bebdc4ca Author: Christoph Hellwig Date: Fri Nov 9 14:42:40 2018 +0100 scsi: return blk_status_t from device handler ->prep_fn Remove the last use of the old BLKPREP_* values, which get converted to BLK_STS_* later anyway. Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 159b2cbf59f44f2a0c005c1f323f8f05fb0a19f8 Author: Christoph Hellwig Date: Fri Nov 9 14:42:39 2018 +0100 scsi: return blk_status_t from scsi_init_io and ->init_command Replace the old BLKPREP_* values with the BLK_STS_ ones that they are converted to later anyway. Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 14784565f740e862adae4b1d7c91f51b4038c4f5 Author: Christoph Hellwig Date: Fri Nov 9 14:42:38 2018 +0100 scsi: clean up error handling in scsi_init_io There is no need to call scsi_mq_free_sgtables until we have actually allocated sgtables. Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 785ba83b4f3e4fde236f03205dd1cd98fd6a5255 Author: Christoph Hellwig Date: Fri Nov 9 14:42:37 2018 +0100 scsi: push blk_status_t up into scsi_setup_{fs,scsi}_cmnd This just moves the prep_to_mq calls up in preparation of further removal of BLKPREP_* usage. Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c092d4ec53c9c7e690ad517b414078db4da6870b Author: Christoph Hellwig Date: Fri Nov 9 14:42:36 2018 +0100 scsi: simplify scsi_prep_state_check Return a blk_status_t directly, and make the code a little more compact by handling the fast path in the caller. Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 535ac5d3fe63b9ea1dda379f606f9d0d377d7184 Author: Christoph Hellwig Date: Fri Nov 9 14:42:35 2018 +0100 ide: cleanup ->prep_rq calling convention The return value is just used as a binary yes/no decision, so switch it to a bool instead of the old BLKPREP_* values returned as an int. Also clean up a few related comments. Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5ec17af7ead09701e23d2065e16db6ce4e137289 Author: Paul Burton Date: Sat Nov 10 00:12:06 2018 +0000 MIPS: Boston: Disable EG20T prefetch The Intel EG20T Platform Controller Hub used on the MIPS Boston development board supports prefetching memory to optimize DMA transfers. Unfortunately for unknown reasons this doesn't work well with some MIPS CPUs such as the P6600, particularly when using an I/O Coherence Unit (IOCU) to provide cache-coherent DMA. In these systems it is common for DMA data to be lost, resulting in broken access to EG20T devices such as the MMC or SATA controllers. Support for a DT property to configure the prefetching was added a while back by commit 549ce8f134bd ("misc: pch_phub: Read prefetch value from device tree if passed") but we never added the DT snippet to make use of it. Add that now in order to disable the prefetching & fix DMA on the affected systems. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21068/ Cc: linux-mips@linux-mips.org commit b6d18e77041edae105b32d667c28fe752534f691 Author: Paul Burton Date: Fri Nov 9 20:08:36 2018 +0000 MIPS: Don't dump Hi & Lo regs on >= MIPSr6 MIPSr6 removed the Hi & Lo registers, so displaying their values on MIPSr6 systems is pointless. Avoid doing so. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21067/ Cc: linux-mips@linux-mips.org commit c7adfaea4bf445b4715ffb031fcd9313b4cf63d5 Author: Paul Burton Date: Fri Nov 9 20:07:55 2018 +0000 MIPS: Fix do_ade() closing brace indentation A closing brace in do_ade() has misleading indentation; fix it. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21066/ Cc: linux-mips@linux-mips.org commit 70e79832af9fbe130c8a3d44ffb8957041d94711 Merge: 40c4b1e9b6ca3 6ff3cf0783e93 Author: David S. Miller Date: Fri Nov 9 16:47:35 2018 -0800 Merge branch 'hns3-add-code-optimization-for-VF-reset-and-some-new-reset-feature' Huazhong Tan says: ==================== hns3: add code optimization for VF reset and some new reset feature Currently hardware supports below reset: 1. VF reset: triggered by sending cmd to IMP(Integrated Management Processor). Only reset specific VF function and do not affect other PF or VF. 2. PF reset: triggered by sending cmd to IMP. Only reset specific PF and it's VF. 3. PF FLR: triggered by PCIe subsystem. Only reset specific PF and it's VF. 4. VF FLR: triggered by PCIe subsystem. Only reset specific VF function and do not affect other PF or VF. 5. Core reset: triggered by writing to register. Reset most hardware unit, such as SSU, which affects all the PF and VF. 6. Global reset: triggered by writing to register. Reset all hardware unit, which affects all the PF and VF. 7. IMP reset: triggered by IMU(Intelligent Management Unit) when IMP is not longer feeding IMU's watchdog. IMU will reload the IMP firmware and IMP will perform global reset after firmware reloading, which affects all the PF and VF. Current driver only support PF/VF reset, incomplete core and global reset(lacking the vf reset handling). So this patchset adds complete reset support in hns3 driver. Also, this patchset contains some optimization related to reset. ==================== Signed-off-by: David S. Miller commit 6ff3cf0783e9343297ef7af2d03c42cbb664ed9b Author: Huazhong Tan Date: Fri Nov 9 22:07:56 2018 +0800 net: hns3: add PCIe FLR support for VF This patch implements the .reset_prepare and .reset_done ops from pci framework to support the VF FLR. This patch uses hclgevf_set_def_reset_request() and hclgevf_reset_event() to handle FLR, so when hdev->default_reset_request is non zero, it means there is some reset requseted by hclgevf_set_def_reset_request() need to be processed. Also get the hdev from the ae_dev because hclgevf_reset_event is called with handle being NULL. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 862d969a3a4dcd80e92fdb09d6eab2c3149eb582 Author: Huazhong Tan Date: Fri Nov 9 22:07:55 2018 +0800 net: hns3: do VF's pci re-initialization while PF doing FLR While doing PF FLR, VF's PCIe configuration space will be cleared, so the pci and vector of VF should be re-initialized in the VF's reset process while PF doing FLR. Also, this patch fixes some memory not freed problem when pci re-initialization is done during reset process. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6b9a97ee43b211faec91c277fa73965dccce8f6a Author: Huazhong Tan Date: Fri Nov 9 22:07:54 2018 +0800 net: hns3: add PCIe FLR support for PF This patch implements the .reset_prepare and .reset_done ops from pci framework to support the PF FLR. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6dd22bbc77f76208294f573c2de41f1d2dde72b9 Author: Huazhong Tan Date: Fri Nov 9 22:07:53 2018 +0800 net: hns3: implement the IMP reset processing for PF The current code only print the prompt message after receiving the IMP reset interrupt and does not perform the corresponding driver reset operation. This patch implements the missing IMP reset handling in the driver. 1. The driver sets the HCLGE_STATE_CMD_DISABLE to stop sending command after receiving the IMP reset interrupt. 2. The driver needs to notify the hardware to reload the IMP firmware. 3. The IMP firmware reloading makes the reset time of hardware longer, so it is necessary to extend the driver's waiting time to wait for the hardware reset to complete. 4. In hclge_check_event_cause, IMP reset event should have higher priority than other events. Also, after clearing HCLGE_STATE_CMD_DISABLE in the hclge_cmd_init(), it needs to check whether there is a pending reset, if so, just set the HCLGE_STATE_CMD_DISABLE back and return. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ff0699e04b977b61c5505cdfa5a386b9bceb3e6d Author: Huazhong Tan Date: Fri Nov 9 22:07:52 2018 +0800 net: hns3: stop napi polling when HNS3_NIC_STATE_DOWN is set When calling napi_disable during reset down process, if NAPIF_STATE_MISSED is set, napi_complete will call __napi_schedule to do the polling again. So this patch uses HNS3_NIC_STATE_DOWN to ensure the polling is not scheduled again. Also, when napi_complete returns true, it means polling is scheduled again, it is not neccssary to enable the interrupt. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6a5f6fa382f3f4d5f519a9a52ed63afb4841fc0c Author: Huazhong Tan Date: Fri Nov 9 22:07:51 2018 +0800 net: hns3: add error handler for hclgevf_reset() Since hclgevf_reset() may fail for some reasons, so it needs an error handler to deal with it. When VF reset failed, VF can only be restored by a higher level reset asserted by PF. So, it needs to reinitialize its command queue, then it can respond to higher level reset. Also, this patch adds error logging in the hclgevf_notify_client(). Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ef5f8e507ec9c226ef961c21ede99bab9fd313d4 Author: Huazhong Tan Date: Fri Nov 9 22:07:50 2018 +0800 net: hns3: stop handling command queue while resetting VF According to hardware's description, after the reset occurs, the driver needs to re-initialize the command queue before sending and receiving any commands. Therefore, the VF's driver needs to identify the command queue needs to re-initialize with HCLGEVF_STATE_CMD_DISABLE, and does not allow sending or receiving commands before the re-initialization. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b90fcc5bd904fe1ec1b4b0a5ba8299cd2625a16c Author: Huazhong Tan Date: Fri Nov 9 22:07:49 2018 +0800 net: hns3: add reset handling for VF when doing Core/Global/IMP reset When a Core/Global/IMP reset occurs, the hardware sets the reset status register of all PF/VF and reports a reset interrupt to all PF/VF and firmware. When receiving the reset interrupt: 1. The firmware will wait for 100 ms before resetting the hardware and clear the reset status register of all PF when hardware reset is done. 2. The PF/VF driver needs to down the netdev within 100 ms and then wait for hardware reset to finish. 3. After firmware clearing the reset status register of all PF, the PF driver reinitializes the hardware and clear the reset status register of it's VF. 4. After PF driver clearing the reset status register of VF, the VF driver reinitializes the hardware. This patch mainly add handling for the step 4. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit aa5c4f175be66696f73eb9f4e18028c6aa2ce652 Author: Huazhong Tan Date: Fri Nov 9 22:07:48 2018 +0800 net: hns3: add reset handling for VF when doing PF reset When PF performs a function reset, the hardware will reset both PF and all the VF belong to this PF. Hence, both PF's driver and VF's driver need to perform corresponding reset operations. Before PF driver asserting function reset to hardware, it firstly set up VF's hardware reset status, and inform the VF driver with HNAE3_VF_PF_FUNC_RESET, then VF driver sets this reset type to reset_pending and shechule reset task to stop IO and waits for the hardware reset status to clear. When PF driver has reinitialized the hardware and is ready to process mailbox from VF, PF driver clears VF's hardware reset status for VF to continue its reset process. Also, this patch uses readl_poll_timeout to simplify the hardware reset status waitting. Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit dea846e85aaf77a681e6f0f90df7aaaa467e61a5 Author: Huazhong Tan Date: Fri Nov 9 22:07:47 2018 +0800 net: hns3: adjust VF's reset process Currently when VF need to reset itself, it will send a cmd to PF, after receiving the VF reset requset, PF sends a cmd to inform VF to enter the reset process and send a cmd to firmware to do the actual reset for the VF, it is possible that firmware has resetted the VF, but VF has not entered the reset process, which may cause IO not stopped problem when firmware is resetting VF. This patch fixes it by adjusting the VF reset process, when VF need to reset itself, it will enter the reset process first, and it will tell the PF to send cmd to firmware to reset itself. Add member reset_pending to struct hclgevf_dev, which indicates that there is reset event need to be processed by the VF's reset task, and the VF's reset task chooses the highest-level one and clears other low-level one when it processes reset_pending. hclge_inform_reset_assert_to_vf function is unused now, but it will be used to support the PF reset with VF working, so declare it in the header file. Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 9c6f70857785902a089e4aa06041c52eb67d2b29 Author: Huazhong Tan Date: Fri Nov 9 22:07:46 2018 +0800 net: hns3: add reset_hdev to reinit the hdev in VF's reset process When doing reset, the reset handling function only need to reinitialize hardware, it makes sense to add a function to do that job. Also the error handling of hclgevf_init_hdev is different when it is used in reset process. This patch adds reset_hdev to reinitialize hardware when resetting. Also, this patch removes the hclgevf_dev_ongoing_full_reset because it is unused now. Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 40c4b1e9b6ca39c9b0b40b69cf3fb71e01c5d490 Author: Arjun Vynipadath Date: Fri Nov 9 14:52:53 2018 +0530 cxgb4vf: free mac_hlist properly The locally maintained list for tracking hash mac table was not freed during driver remove. Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 24357e06ba511ad874d664d39475dbb01c1ca450 Author: Arjun Vynipadath Date: Fri Nov 9 14:52:01 2018 +0530 cxgb4vf: fix memleak in mac_hlist initialization mac_hlist was initialized during adapter_up, which will be called every time a vf device is first brought up, or every time when device is brought up again after bringing all devices down. This means our state of previous list is lost, causing a memleak if entries are present in the list. To fix that, move list init to the condition that performs initial one time adapter setup. Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 2a8d84bf513823ba398f4b2dec41b8decf4041af Author: Arjun Vynipadath Date: Fri Nov 9 14:50:25 2018 +0530 cxgb4: free mac_hlist properly The locally maintained list for tracking hash mac table was not freed during driver remove. Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit e6e8869aed897a021fafa6f412e9e4b7e2ea6cd3 Author: Li RongQing Date: Fri Nov 9 17:04:51 2018 +0800 net: tcp: remove BUG_ON from tcp_v4_err if skb is NULL pointer, and the following access of skb's skb_mstamp_ns will trigger panic, which is same as BUG_ON Signed-off-by: Li RongQing Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 307f39b021995db67b2f39da7af006e2376fb452 Author: Jacob Wen Date: Fri Nov 9 14:53:59 2018 +0800 xen/netfront: remove unnecessary wmb RING_PUSH_REQUESTS_AND_CHECK_NOTIFY is already able to make sure backend sees requests before req_prod is updated. Signed-off-by: Jacob Wen Reviewed-by: Juergen Gross Reviewed-by: Wei Liu Signed-off-by: David S. Miller commit 195ca1703784d1fbc34b38019aedcb74f08154f1 Author: Baolin Wang Date: Mon Nov 5 15:39:11 2018 +0800 power: supply: Add Spreadtrum SC27XX fuel gauge unit driver This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 0d5f2e6e9c792d557a2a17c484b1a191c7cd9d6e Author: Baolin Wang Date: Mon Nov 5 15:39:10 2018 +0800 dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 3afb50d7125bcdbf71df843134e96ceffc78c8b8 Author: Baolin Wang Date: Mon Nov 5 15:39:09 2018 +0800 power: supply: core: Add some helpers to use the battery OCV capacity table We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 428527b3e6e1531dcde5c47f0553a9833e1054c8 Author: Baolin Wang Date: Mon Nov 5 15:39:08 2018 +0800 dt-bindings: power: Introduce properties to present the battery OCV capacity table Some battery driver will use the open circuit voltage (OCV) value to look up the corresponding battery capacity percent in one certain degree Celsius. Thus this patch provides some battery properties to present the OCV table temperatures and OCV capacity table values. Suggested-by: Sebastian Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 86131d933f9a9502d877fb37b90a856e6a8a7ed8 Author: Baolin Wang Date: Mon Nov 5 15:39:07 2018 +0800 power: supply: core: Add one field to present the battery internal resistance Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 56a6cd3196c6617697b46c3861dfd06579ef43d2 Author: Baolin Wang Date: Mon Nov 5 15:39:06 2018 +0800 dt-bindings: power: Introduce one property to present the battery internal resistance The internal resistance of a battery is not a constant in its life cycle, this varies over the age of the battery or temperature and so on. But we just want use one constant battery internal resistance to estimate the battery capacity. Thus this patch introduces one property to present the battery factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit f8274f14a9b1261bd18096c693cdd6cf7d31a06d Merge: 1ae367a2451e0 eeb07c573ec30 Author: Rob Herring Date: Fri Nov 9 15:41:10 2018 -0600 Merge tag 'kfree_validate_v7-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/frowand/linux into dt/next Pull overlay validation checks from Frank Rowand: "Add checks to (1) overlay apply process and (2) memory freeing triggered by overlay release. The checks are intended to detect possible memory leaks and invalid overlays. The checks revealed bugs in existing code. Fixed the bugs. While fixing bugs, noted other issues, which are fixed in separate patches." Signed-off-by: Rob Herring commit 4c387984618fe65d87384ca2725661715607bec9 Author: Tony Lindgren Date: Fri Nov 9 13:41:13 2018 -0800 ARM: dts: omap5: Add l4 interconnect hierarchy and ti-sysc data Similar to commit 8f42cb7f64c7 ("ARM: dts: omap4: Add l4 interconnect hierarchy and ti-sysc data"), let's add proper interconnect hierarchy for l4 interconnect instances with the related ti-sysc interconnect module data as in Documentation/devicetree/bindings/bus/ti-sysc.txt. Using ti-sysc driver binding allows us to start dropping legacy platform data in arch/arm/mach-omap2/omap*hwmod*data.c files later on in favor of ti-sysc dts data. This data is generated based on platform data from a booted system and the interconnect acces protection registers for ranges. To avoid regressions, we initially validate the device tree provided data against the existing platform data on boot. Cc: devicetree@vger.kernel.org Signed-off-by: Tony Lindgren commit 1ae367a2451e0b249074461d2d8ac76d8e929a53 Author: Rob Herring Date: Tue Nov 6 18:07:37 2018 -0600 of/pdt: Remove unused of_pdt_build_more function ptr There are no users of of_pdt_build_more since 2012, so remove it. Cc: Frank Rowand Signed-off-by: Rob Herring commit 688be01a0ab7eeefb1cccf3ad1c59803276b5a12 Author: Alex Deucher Date: Thu Nov 8 16:34:48 2018 -0500 drm/amdgpu/gfx9: rework lbpw enable code To avoid changing the global lbpw module parameter directly. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c10caceddca2236ada8359603767ba629e6f19ba Author: YueHaibing Date: Thu Nov 8 02:15:00 2018 +0000 drm/ttm: remove set but not used variable 'driver' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/ttm/ttm_execbuf_util.c: In function 'ttm_eu_fence_buffer_objects': drivers/gpu/drm/ttm/ttm_execbuf_util.c:190:24: warning: variable 'driver' set but not used [-Wunused-but-set-variable] It not used any more after commit f2c24b83ae90 ("drm/ttm: flip the switch, and convert to dma_fence") Signed-off-by: YueHaibing Reviewed-by: Christian König Reviewed-by: Junwei Zhang Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 106c7d6148e5aadd394e6701f7e498df49b869d1 Author: Likun Gao Date: Thu Nov 8 20:19:54 2018 +0800 drm/amdgpu: abstract the function of enter/exit safe mode for RLC Abstract the function of amdgpu_gfx_rlc_enter/exit_safe_mode and some part of rlc_init to improve the reusability of RLC. Signed-off-by: Likun Gao Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 88dfc9a3dd47027c9ffc831635e5cf4e8ed3b781 Author: Likun Gao Date: Thu Nov 8 13:43:46 2018 +0800 drm/amdgpu: separate amdgpu_rlc into a single file Separate the function and struct of RLC from the file of GFX. Abstract the function of amdgpu_gfx_rlc_fini. Signed-off-by: Likun Gao Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fdb81fd788a732b5efda8638be3fe159550b032d Author: Likun Gao Date: Fri Sep 28 19:21:23 2018 +0800 drm/amdgpu: unify rlc function into structure Put function rlc_init,rlc_fini,rlc_resume,rlc_stop,rlc_start into structure amdgpu_rlc_funcs and change the method to call rlc function for each verssion of GFX. Signed-off-by: Likun Gao Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a82c15668cfc02d69e0265cda50fa932310ddd30 Author: shaoyunl Date: Mon Oct 15 14:40:06 2018 -0400 drm/amdgpu: Each PSP need to get latest topology info on XGMI configuration Driver need to call each psp instance to get topology info before set topology Signed-off-by: shaoyunl reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit eef4670eadcfcf4bc444be89d8a1fb1ad3c8dc4d Author: Daniele Ceraolo Spurio Date: Thu Nov 8 16:40:13 2018 -0800 drm/i915/query: fix subslice length We dump the info as an array of u8, so we want to know the length in number of bytes. Current code is still safe because the variable we use BITS_PER_TYPE on is a u8. Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20181109004013.34394-1-daniele.ceraolospurio@intel.com commit cf303a41d97e3fd5c70c5d8a61a11ce7db7e559f Author: Daniele Ceraolo Spurio Date: Tue Nov 6 10:29:18 2018 -0800 drm/i915: fix subslice mask array size We have a subslice mask per slice, not per subslice. MAX_SUBSLICES > MAX_SLICES, so the wrong size didn't cause any issue apart from using extra memory. Cc: Lionel Landwerlin Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20181106182918.5748-1-daniele.ceraolospurio@intel.com commit f7d6cf6d0c7e2d8035f849c9c4407c48924cbd0f Author: Gustavo A. R. Silva Date: Wed Aug 15 12:02:26 2018 -0500 mtd: cfi_cmdset_0020: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114857 ("Missing break in switch") Addresses-Coverity-ID: 114858 ("Missing break in switch") Addresses-Coverity-ID: 114859 ("Missing break in switch") Addresses-Coverity-ID: 114860 ("Missing break in switch") Addresses-Coverity-ID: 114861 ("Missing break in switch") Addresses-Coverity-ID: 114862 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Boris Brezillon commit 98473f5acc0070624746f30a8d6012dc70487740 Author: Gustavo A. R. Silva Date: Thu Aug 9 11:05:13 2018 -0500 mtd: block2mtd: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 402015 ("Missing break in switch") Addresses-Coverity-ID: 402016 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Boris Brezillon commit 4c96499c39e31b5a12f37c2396a5f81d1b6be1ab Author: Christoph Hellwig Date: Fri Nov 9 19:39:03 2018 +0100 USB: remove the unused struct hcd_timeout definition No users of this type anywhere in the tree. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman commit 2ee936e3a2f020b04d53c7ac5c3cd64933dfc975 Author: José Roberto de Souza Date: Tue Nov 6 11:08:43 2018 -0800 drm/i915/psr: Move intel_psr_disable_source() code to intel_psr_disable_locked() In the past we had hooks to configure HW for VLV/CHV too, in the drop of VLV/CHV support the intel_psr_disable_source() code was not moved to the caller, so doing it here. Suggested-by: Dhinakaran Pandiyan Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106190843.18009-4-jose.souza@intel.com commit 62819dfd859e9d9960bd2ac86e0a9e356b66d03e Author: José Roberto de Souza Date: Tue Nov 6 11:08:42 2018 -0800 drm/i915/icl: Reset PSR interruptions All other interruptions gen11 interruptions are reset in gen11_irq_reset() also it is done for other gens that supports PSR. Cc: Dhinakaran Pandiyan Cc: Paulo Zanoni Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106190843.18009-3-jose.souza@intel.com commit b2fc2252ce41d004a23be7dd90ab3b88394df4d6 Author: José Roberto de Souza Date: Tue Nov 6 11:08:41 2018 -0800 drm/i915/psr: Always wait for idle state when disabling PSR It should always wait for idle state when disabling PSR because PSR could be inactive due a call to intel_psr_exit() and while PSR is still being disabled asynchronously userspace could change the modeset causing a call to psr_disable() that will not wait for PSR idle and then PSR will be enabled again while PSR is still not idle. v2: rebased on top of the patch reusing psr_exit() Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106190843.18009-2-jose.souza@intel.com commit 26f9ec9a9a4a2d97a86f6bd0084dcda4d88b89ef Author: José Roberto de Souza Date: Tue Nov 6 11:08:40 2018 -0800 drm/i915/psr: Use intel_psr_exit() in intel_psr_disable_source() Both functions have the same code to disable PSR, so let's reuse that code instead of duplicate. Suggested-by: Dhinakaran Pandiyan Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106190843.18009-1-jose.souza@intel.com commit 9d037ad707ed6069fbea4e38e6ee37e027b13f1d Author: Christoph Hellwig Date: Fri Nov 9 19:37:44 2018 +0100 block: remove req->timeout_list Unused now that the legacy request path is gone. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 378ed6f0e3c525e3b12827e7b7fb0a078ee48a32 Author: Paul Burton Date: Thu Nov 8 20:14:38 2018 +0000 MIPS: Avoid using .set mips0 to restore ISA We currently have 2 commonly used methods for switching ISA within assembly code, then restoring the original ISA. 1) Using a pair of .set push & .set pop directives. For example: .set push .set mips32r2 .set pop 2) Using .set mips0 to restore the ISA originally specified on the command line. For example: .set mips32r2 .set mips0 Unfortunately method 2 does not work with nanoMIPS toolchains, where the assembler rejects the .set mips0 directive like so: Error: cannot change ISA from nanoMIPS to mips0 In preparation for supporting nanoMIPS builds, switch all instances of method 2 in generic non-platform-specific code to use push & pop as in method 1 instead. The .set push & .set pop is arguably cleaner anyway, and if nothing else it's good to consistently use one method. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21037/ Cc: linux-mips@linux-mips.org commit 183b40f992c8f98082c4d72043ecdeba0e6a4367 Author: Paul Burton Date: Wed Nov 7 23:14:11 2018 +0000 MIPS: Allow FP support to be disabled Allow the user to configure the kernel to omit support for floating point, by setting CONFIG_MIPS_FP_SUPPORT=n. In an attempt to avoid problems for users who don't understand the impact of this, only expose the option when CONFIG_EXPERT=y. When CONFIG_MIPS_FP_SUPPORT=n all support for FPU hardware, FPU emulation & FP context will be removed from the kernel. If a userland program attempts to execute a floating point instruction it will receive a SIGILL. Setting CONFIG_MIPS_FP_SUPPORT=n shaves around 112KB from a 64r6el_defconfig build using GCC 8.1.0. This also helps prepare us for supporting the nanoMIPS ISA, for which floating point support has not been finalized. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21014/ Cc: linux-mips@linux-mips.org commit 2725f3778fddb70526318824de63476aff816ab8 Author: Paul Burton Date: Wed Nov 7 23:14:10 2018 +0000 MIPS: Remove struct task_struct fpu state when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point & so don't need to preserve floating point context for tasks. Remove that context from struct task_struct. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21013/ Cc: linux-mips@linux-mips.org commit 42b10815d55958ec519ae7d97fdfcc6e38b4d46b Author: Paul Burton Date: Wed Nov 7 23:14:10 2018 +0000 MIPS: Don't compile math-emu when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so there's no point compiling in our FPU emulator. Avoid doing so, providing stub versions of dsemul cleanup functions that are called from signal & task handling code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21012/ Cc: linux-mips@linux-mips.org commit 36a498035bd2e5169bbceed1e3b0c8bb0ce5a7b4 Author: Paul Burton Date: Wed Nov 7 23:14:09 2018 +0000 MIPS: Avoid FCSR sanitization when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so we don't need to worry about floating point exceptions pending in the Floating point Control & Status Register (FCSR) during switch_to(). Stub out the __sanitize_fcr31() macro in this case. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21010/ Cc: linux-mips@linux-mips.org commit ea6a37373f9aca4ecb98ea3a298fda57177ee6a5 Author: Paul Burton Date: Wed Nov 7 23:14:09 2018 +0000 MIPS: Avoid FP ELF checks when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so we can avoid needless checks of ELF headers specifying the FP ABI or NaN encoding to use. Deselect CONFIG_ARCH_BINFMT_ELF_STATE in this case to avoid the need for our arch_elf_pt_proc() & arch_check_elf() functions, and stub out the mips_set_personality_nan() & mips_set_personality_fp() functions such that SET_PERSONALITY() doesn't need to worry about any of this. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21011/ Cc: linux-mips@linux-mips.org commit 4eec81d7d8b212766d04da8b30c07715a32b5dfb Author: Paul Burton Date: Wed Nov 7 23:14:08 2018 +0000 MIPS: signal: Remove FP context support when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so there's no need to save & restore floating point context around signals. This prepares us for the removal of FP context from struct task_struct later. Since MSA context is a superset of FP context support for it similarly needs to be removed when MSA/FP support is disabled. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21009/ Cc: linux-mips@linux-mips.org commit 6c79759eca6280809e992a930412cafc120c98aa Author: Paul Burton Date: Wed Nov 7 23:14:07 2018 +0000 MIPS: ptrace: Remove FP support when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so remove the related ptrace support. Besides removing code which should not be needed, this prepares us for the removal of FPU state in struct task_struct which this code requires. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21008/ Cc: linux-mips@linux-mips.org commit 85164fd8b053200cfc811d7a77afeb507968226c Author: Paul Burton Date: Wed Nov 7 23:14:07 2018 +0000 MIPS: unaligned: Remove FP & MSA code when unsupported When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so remove support for floating point instructions from emulate_load_store_insn() & emulate_load_store_microMIPS(). This code should not be needed & relies upon access to FPU state in struct task_struct which will later be removed. Similarly & for the same reasons, when CONFIG_CPU_HAS_MSA=n remove support for MSA instructions. Since MSA support depends upon FP support this is implied when CONFIG_MIPS_FP_SUPPORT=n. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21020/ Cc: linux-mips@linux-mips.org commit 6a1cc218b9ccf8892fc254a0c2756bfda8bb715f Author: Paul Burton Date: Wed Nov 7 23:14:06 2018 +0000 MIPS: branch: Remove FP branch handling when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so remove the floating point branch support from __compute_return_epc_for_insn() & __mm_isBranchInstr(). This code should never be needed & more importantly relies upon FPU state in struct task_struct which will later be removed. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21017/ Cc: linux-mips@linux-mips.org commit 5328f7422e4b195a36b0ed021ce8cc95bd8e0e59 Author: Paul Burton Date: Wed Nov 7 23:14:05 2018 +0000 MIPS: traps: Never enable FPU when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so we'll never need to enable the FPU. Avoid doing so on a Co-Processor Unusable exception (do_cpu), and remove the Floating Point Exception handler (do_fpe) which should never be executed when the FPU is disabled. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21007/ Cc: linux-mips@linux-mips.org commit b2e628a8f9993b240597432e39e6fa4950638211 Author: Paul Burton Date: Wed Nov 7 23:14:05 2018 +0000 MIPS: cpu-probe: Avoid probing FPU when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point so there's no point in attempting to detect an FPU. Avoid doing so. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21021/ Cc: linux-mips@linux-mips.org commit 9ec55930e023a18dfc7cca60afdd8c9f9da54f3e Author: Paul Burton Date: Wed Nov 7 23:14:04 2018 +0000 MIPS: Stub asm/fpu.h functions Provide stub versions of functions in asm/fpu.h when CONFIG_MIPS_FP_SUPPORT=n. Two approaches are taken to the functions provided: - Functions which can safely be called when FP is not enabled provide stubs which return an error where appropriate or are simple no-ops. - Functions which should only ever be called in cases where cpu_has_fpu is true or the FPU was successfully enabled are declared extern & annotated with __compiletime_error() to detect cases in which they are called incorrectly. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21006/ Cc: linux-mips@linux-mips.org commit b372e83b67eb296d85654e2dde8a0e6105083b16 Author: Paul Burton Date: Wed Nov 7 23:14:03 2018 +0000 MIPS: Hardcode cpu_has_fpu=0 when CONFIG_MIPS_FP_SUPPORT=n When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so there's no point in detecting presence of an FPU. Hardcode cpu_has_fpu=0 such that we optimize out code that makes use of the FPU. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21005/ Cc: linux-mips@linux-mips.org commit c92e47e585a92cdd42147bf1d0675a4ab1c928ce Author: Paul Burton Date: Wed Nov 7 23:14:02 2018 +0000 MIPS: Introduce CONFIG_MIPS_FP_SUPPORT Introduce a Kconfig variable that will indicate whether to include support for floating point in the kernel. For now this is always enabled, and will be made configurable in a later patch. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21016/ Cc: linux-mips@linux-mips.org commit 97f7dcbf279ada9a25f36666420a72ebbc0101df Author: Paul Burton Date: Wed Nov 7 23:14:02 2018 +0000 MIPS: Better abstract R2300 FPU usage in Kconfig Introduce a CONFIG_CPU_R2300_FPU Kconfig symbol mirroring the existing CONFIG_CPU_R4K_FPU, and use it to determine whether to build r4k_fpu.S. This removes the duplicate R3000 & TX39XX cases in arch/mips/kernel/Makefile and prepares us for the possibility of disabling FP support later. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21004/ Cc: linux-mips@linux-mips.org commit 7d3713a4aad2a00997f0df1bbafd5fdf926dc14d Author: Paul Burton Date: Wed Nov 7 23:14:00 2018 +0000 MIPS: Drop forward declarations of sigcontext in asm/fpu.h asm/fpu.h contains forward declarations of struct sigcontext & struct sigcontext32 which appear to have been unused since commit 137f6f3e284e ("MIPS: Cleanup signal code initialization"). Remove the dead code. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21015/ Cc: linux-mips@linux-mips.org commit 1975ed43ce67542befed188f6aed6a82cfaffd0b Author: Paul Burton Date: Wed Nov 7 23:14:00 2018 +0000 MIPS: Ensure emulated FP sets PF_USED_MATH Emulated floating point instructions don't ensure that the PF_USED_MATH flag is set for the task. This results in a couple of inconsistencies: - ptrace will return the default initial state of FP registers rather than the values actually stored in struct thread_struct, hiding state that has been updated by emulated floating point instructions. - If a task migrates to a CPU with an FPU after having emulated floating point instructions then its floating point register state will be reset to the default ~0 bit pattern, losing state from the emulated instructions. Fix this by calling init_fp_ctx() from fpu_emulator_cop1Handler() to consistently initialize FP state if it was previously uninitialized, setting the PF_USED_MATH flag in the process. All callers of fpu_emulator_cop1Handler() either call lose_fpu(1) before it in order to save any live FPU registers to struct thread_struct, or in the case of do_cpu() already know that the task does not own an FPU so lose_fpu(1) would be a no-op. Since we know that saving FP context will be unnecessary in the case where FP context was just initialized we move this call into fpu_emulator_cop1Handler() too, providing consistency & avoiding needless duplication. Calls to own_fpu(1) are common after return from fpu_emulator_cop1Handler() too, but this would not be a no-op in the do_cpu() case so these are left as-is. A potential future improvement could be to have fpu_emulator_cop1Handler() restore FPU state automatically only if it saved it, though this may not be optimal if some callers are better off without their current calls to own_fpu(1). One potential example of this could be mipsr2_decoder() which as-is could end up saving & restoring FP context repeatedly & unnecessarily if emulating multiple FP instructions. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21003/ Cc: linux-mips@linux-mips.org commit cc97ab235f3fe32401ca198cebe6f42642e95770 Author: Paul Burton Date: Wed Nov 7 23:13:59 2018 +0000 MIPS: Simplify FP context initialization MIPS has up until now had 3 different ways for a task's floating point context to be initialized: - If the task's first use of FP involves it gaining ownership of an FPU then _init_fpu() is used to initialize the FPU's registers such that they all contain ~0, and the FPU registers will be stored to struct thread_info later (eg. when context switching). - If the task first uses FP on a CPU without an associated FPU then fpu_emulator_init_fpu() initializes the task's floating point register state in struct thread_info such that all floating point register contain the bit pattern 0x7ff800007ff80000, different to the _init_fpu() behaviour. - If a task's floating point context is first accessed via ptrace then init_fp_ctx() initializes the floating point register state in struct thread_info to ~0, giving equivalent state to _init_fpu(). The _init_fpu() path has 2 separate implementations - one for r2k/r3k style systems & one for r4k style systems. The _init_fpu() path also requires that we be careful to clear & restore the value of the Config5.FRE bit on modern systems in order to avoid inadvertently triggering floating point exceptions. None of this code is in a performance critical hot path - it runs only the first time a task uses floating point. As such it doesn't seem to warrant the complications of maintaining the _init_fpu() path. Remove _init_fpu() & fpu_emulator_init_fpu(), instead using init_fp_ctx() consistently to initialize floating point register state in struct thread_info. Upon a task's first use of floating point this will typically mean that we initialize state in memory & then load it into FPU registers using _restore_fp() just as we would on a context switch. For other paths such as __compute_return_epc_for_insn() or mipsr2_decoder() this results in a significant simplification of the work to be done. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21002/ Cc: linux-mips@linux-mips.org commit e48adf19ea503a6f1b6d6a7c975221ab84ed79ab Author: Ioannis Valasakis Date: Fri Nov 9 13:55:09 2018 +0000 staging: greybus: remove unmatched right bracket Remove unmatched right bracket. Reported by uncrustify. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 2eece0a88d95cd5f6ad1886567ab20ac2abe60ce Author: Ioannis Valasakis Date: Fri Nov 9 13:54:57 2018 +0000 staging: greybus: remove comparison to BOOL Remove two instances of a comparison to BOOL. Reported by coccinelle. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 57d053682ff55aa16a390ddb054a26deb4dfbf9e Author: Ioannis Valasakis Date: Fri Nov 9 13:54:42 2018 +0000 staging: greybus: remove extra space before tab Remove extra spaces before the tab character inside a comment section. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit aec08dd489df5cd789ab23236fa317d6d6c6efe1 Author: Ioannis Valasakis Date: Fri Nov 9 13:54:36 2018 +0000 staging: greybus: add extra space around OR operator Add extra spaces around the OR operator. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit fcb733b546ea943dd2e312cc3b556159cb44345a Author: Ioannis Valasakis Date: Fri Nov 9 13:54:30 2018 +0000 staging: greybus: remove multiple blank lines Remove extra blank lines to conform with coding style. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 327f27696303127e207e1379330b65a1268e0063 Author: Ioannis Valasakis Date: Fri Nov 9 13:54:23 2018 +0000 staging: greybus: remove space before tab Remove extra space before a tab character. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit fea06c0ba4f0d9e4603cb9937060159682453497 Author: Ioannis Valasakis Date: Fri Nov 9 13:54:09 2018 +0000 staging: greybus: remove multiple blank lines Remove continuous multiple blank lines. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit f5e4e5e7ae9cab22d62bc870be78c9daf38ab645 Author: Ioannis Valasakis Date: Fri Nov 9 13:54:00 2018 +0000 staging: greybus: correct SPDX License Identifier Replace SPDX License Identifier comments with C comments. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 7a22b568db9ba347ac3a2d51234abc4ea9d31a65 Author: Ioannis Valasakis Date: Fri Nov 9 13:53:54 2018 +0000 staging: greybus: align arguments with parentheses Align arguments with the right side of the open left parentheses. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit ce8befe9ab7a9bb4750f8b8a523d2b9461651d14 Author: Ioannis Valasakis Date: Fri Nov 9 13:53:46 2018 +0000 staging: greybus: fix SPDX License Identifier Replace the SPDX identifier with standard C comment. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit f17f542965d7774f7ad1a3bb17bbcd61f0bb982a Author: Ioannis Valasakis Date: Fri Nov 9 13:53:31 2018 +0000 staging: greybus: align parameters to parentheses Align parameters to the right side of the left parentheses Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 9b76530d39d5741f806b13ee380908fdc0dd948f Author: Ioannis Valasakis Date: Fri Nov 9 13:53:24 2018 +0000 staging: greybus: shorten comparison to NULL Shorten pointer NULL check by simple truth test. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 53cc688036681cc17f6db43744db6bb7703246fe Author: Ville Syrjälä Date: Thu Nov 1 17:05:59 2018 +0200 drm/i915: Generalize skl_ddb_allocation_overlaps() Make skl_ddb_allocation_overlaps() useful for other callers besides skl_update_crtcs(). We'll need it to do plane updates as well. And while we're here we can reduce the stack utilization a bit by noting that each struct skl_ddb_entry is 4 bytes whereas a pointer to one is 8 bytes (on 64bit). So we'll switch to an array of structs from the array of pointers we used before. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101150605.18235-9-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 07464c7c0cf773b86372d128d17a892529c0775a Author: Ville Syrjälä Date: Thu Nov 1 17:05:56 2018 +0200 drm/i915: Clean up skl+ PLANE_POS vs. scaler handling On skl+ the scaler (when enabled) will take care of the plane output position. Make the code less ugly by just setting crtc_x/y to 0 when the scaler is enabled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101150605.18235-6-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 7b012bd62db951384a73943311822d1fb447e416 Author: Ville Syrjälä Date: Wed Nov 7 20:41:38 2018 +0200 drm/i915: Polish the skl+ plane keyval/msk/max register setup Due to the constant alpha we're going to have to program two of the the tree keying registers anyway, so might as well always program all three. And parametrize the plane constant alpha define while at it. v2: Rebase due to input CSC Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181107184138.31359-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 89d67d172dead981fa8888eb7c5f37ada21687c3 Author: Ville Syrjälä Date: Thu Nov 1 17:05:54 2018 +0200 drm/i915: Remove the PS_PWR_GATE write from skl_program_scaler() If we don't need the PS_PWR_GATE write when programming the pipe scaler I don't see why we'd need it for plane scalers either. Just remove it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101150605.18235-4-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 596f63da42b92863b40ea4eb29c5b40bfa3e0ef5 Author: Douglas Anderson Date: Tue Oct 30 15:11:07 2018 -0700 serial: 8250: Process sysrq at port unlock time Let's take advantage of the new ("serial: core: Allow processing sysrq at port unlock time") to handle sysrqs more cleanly. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 3e6f88068314ffdba61a19f48ab0118f50424348 Author: Douglas Anderson Date: Tue Oct 30 15:11:06 2018 -0700 serial: core: Include console.h from serial_core.h In the static inline function uart_handle_break() in serial_core.h we dereference port->cons. That gives an error unless console.h is also included. This error hasn't shown up till now because everyone who has defined SUPPORT_SYSRQ has also included console.h, but it's a bit ugly to make this requirement. Let's make the include explicit. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 336447b3298c5d5cda31270af716ad67ac4c7267 Author: Douglas Anderson Date: Tue Oct 30 15:11:05 2018 -0700 serial: qcom_geni_serial: Process sysrq at port unlock time Let's take advantage of the new ("serial: core: Allow processing sysrq at port unlock time") to handle sysrqs more cleanly. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit d6e1935819db0c91ce4a5af82466f3ab50d17346 Author: Douglas Anderson Date: Tue Oct 30 15:11:04 2018 -0700 serial: core: Allow processing sysrq at port unlock time Right now serial drivers process sysrq keys deep in their character receiving code. This means that they've already grabbed their port->lock spinlock. This can end up getting in the way if we've go to do serial stuff (especially kgdb) in response to the sysrq. Serial drivers have various hacks in them to handle this. Looking at '8250_port.c' you can see that the console_write() skips locking if we're in the sysrq handler. Looking at 'msm_serial.c' you can see that the port lock is dropped around uart_handle_sysrq_char(). It turns out that these hacks aren't exactly perfect. If you have lockdep turned on and use something like the 8250_port hack you'll get a splat that looks like: WARNING: possible circular locking dependency detected [...] is trying to acquire lock: ... (console_owner){-.-.}, at: console_unlock+0x2e0/0x5e4 but task is already holding lock: ... (&port_lock_key){-.-.}, at: serial8250_handle_irq+0x30/0xe4 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&port_lock_key){-.-.}: _raw_spin_lock_irqsave+0x58/0x70 serial8250_console_write+0xa8/0x250 univ8250_console_write+0x40/0x4c console_unlock+0x528/0x5e4 register_console+0x2c4/0x3b0 uart_add_one_port+0x350/0x478 serial8250_register_8250_port+0x350/0x3a8 dw8250_probe+0x67c/0x754 platform_drv_probe+0x58/0xa4 really_probe+0x150/0x294 driver_probe_device+0xac/0xe8 __driver_attach+0x98/0xd0 bus_for_each_dev+0x84/0xc8 driver_attach+0x2c/0x34 bus_add_driver+0xf0/0x1ec driver_register+0xb4/0x100 __platform_driver_register+0x60/0x6c dw8250_platform_driver_init+0x20/0x28 ... -> #0 (console_owner){-.-.}: lock_acquire+0x1e8/0x214 console_unlock+0x35c/0x5e4 vprintk_emit+0x230/0x274 vprintk_default+0x7c/0x84 vprintk_func+0x190/0x1bc printk+0x80/0xa0 __handle_sysrq+0x104/0x21c handle_sysrq+0x30/0x3c serial8250_read_char+0x15c/0x18c serial8250_rx_chars+0x34/0x74 serial8250_handle_irq+0x9c/0xe4 dw8250_handle_irq+0x98/0xcc serial8250_interrupt+0x50/0xe8 ... other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port_lock_key); lock(console_owner); lock(&port_lock_key); lock(console_owner); *** DEADLOCK *** The hack used in 'msm_serial.c' doesn't cause the above splats but it seems a bit ugly to unlock / lock our spinlock deep in our irq handler. It seems like we could defer processing the sysrq until the end of the interrupt handler right after we've unlocked the port. With this scheme if a whole batch of sysrq characters comes in one irq then we won't handle them all, but that seems like it should be a fine compromise. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit babeca85847754ff62af58740bad0db731c3075a Author: Douglas Anderson Date: Tue Oct 30 15:11:03 2018 -0700 serial: qcom_geni_serial: Finish supporting sysrq The geni serial driver already had some sysrq code in it, but since SUPPORT_SYSRQ wasn't defined the code didn't do anything useful. Let's make it useful by adding that define using the same formula found in other serial drivers. In order to prevent deadlock, we'll take a page from the 'msm_serial.c' where the spinlock is released around uart_handle_sysrq_char(). This seemed better than copying from '8250_port.c' where we skip locking in the console_write function since the '8250_port.c' method can cause lockdep warnings when dropping into kgdb. Signed-off-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 6d11023c345e369bcb9d5a68b271764e362c1f6e Author: Florian Fainelli Date: Thu Nov 1 11:26:06 2018 -0700 serial: 8250: Default SERIAL_OF_PLATFORM to SERIAL_8250 It is way too easy to miss enabling SERIAL_OF_PLATFORM which would result in the inability for the kernel to have a valid console device, which can be seen with: Warning: unable to open an initial console. and then: Run /init as init process Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 Since SERIAL_OF_PLATFORM already depends on SERIAL_8250 && OF there really is no drawback to defaulting this config to the value of SERIAL_8250. Signed-off-by: Florian Fainelli Signed-off-by: Greg Kroah-Hartman commit 347a28b586802d09604a149c1a1f6de5dccbe6fa Author: Anders Roxell Date: Tue Oct 30 12:35:45 2018 +0100 writeback: don't decrement wb->refcnt if !wb->bdi This happened while running in qemu-system-aarch64, the AMBA PL011 UART driver when enabling CONFIG_DEBUG_TEST_DRIVER_REMOVE. arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init), devtmpfs' handle_remove() crashes because the reference count is a NULL pointer only because wb->bdi hasn't been initialized yet. Rework so that wb_put have an extra check if wb->bdi before decrement wb->refcnt and also add a WARN_ON_ONCE to get a warning if it happens again in other drivers. Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks") Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell Signed-off-by: Greg Kroah-Hartman commit 646097940ad35aa2c1f2012af932d55976a9f255 Author: Anders Roxell Date: Tue Oct 30 12:35:44 2018 +0100 serial: set suppress_bind_attrs flag only if builtin When the test 'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled, arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init). devtmpfs gets killed because we try to remove a file and decrement the wb reference count before the noop_backing_device_info gets initialized. [ 0.332075] Serial: AMBA PL011 UART driver [ 0.485276] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1 [ 0.502382] console [ttyAMA0] enabled [ 0.515710] Unable to handle kernel paging request at virtual address 0000800074c12000 [ 0.516053] Mem abort info: [ 0.516222] ESR = 0x96000004 [ 0.516417] Exception class = DABT (current EL), IL = 32 bits [ 0.516641] SET = 0, FnV = 0 [ 0.516826] EA = 0, S1PTW = 0 [ 0.516984] Data abort info: [ 0.517149] ISV = 0, ISS = 0x00000004 [ 0.517339] CM = 0, WnR = 0 [ 0.517553] [0000800074c12000] user address but active_mm is swapper [ 0.517928] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 0.518305] Modules linked in: [ 0.518839] CPU: 0 PID: 13 Comm: kdevtmpfs Not tainted 4.19.0-rc5-next-20180928-00002-g2ba39ab0cd01-dirty #82 [ 0.519307] Hardware name: linux,dummy-virt (DT) [ 0.519681] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 0.519959] pc : __destroy_inode+0x94/0x2a8 [ 0.520212] lr : __destroy_inode+0x78/0x2a8 [ 0.520401] sp : ffff0000098c3b20 [ 0.520590] x29: ffff0000098c3b20 x28: 00000000087a3714 [ 0.520904] x27: 0000000000002000 x26: 0000000000002000 [ 0.521179] x25: ffff000009583000 x24: 0000000000000000 [ 0.521467] x23: ffff80007bb52000 x22: ffff80007bbaa7c0 [ 0.521737] x21: ffff0000093f9338 x20: 0000000000000000 [ 0.522033] x19: ffff80007bbb05d8 x18: 0000000000000400 [ 0.522376] x17: 0000000000000000 x16: 0000000000000000 [ 0.522727] x15: 0000000000000400 x14: 0000000000000400 [ 0.523068] x13: 0000000000000001 x12: 0000000000000001 [ 0.523421] x11: 0000000000000000 x10: 0000000000000970 [ 0.523749] x9 : ffff0000098c3a60 x8 : ffff80007bbab190 [ 0.524017] x7 : ffff80007bbaa880 x6 : 0000000000000c88 [ 0.524305] x5 : ffff0000093d96c8 x4 : 61c8864680b583eb [ 0.524567] x3 : ffff0000093d6180 x2 : ffffffffffffffff [ 0.524872] x1 : 0000800074c12000 x0 : 0000800074c12000 [ 0.525207] Process kdevtmpfs (pid: 13, stack limit = 0x(____ptrval____)) [ 0.525529] Call trace: [ 0.525806] __destroy_inode+0x94/0x2a8 [ 0.526108] destroy_inode+0x34/0x88 [ 0.526370] evict+0x144/0x1c8 [ 0.526636] iput+0x184/0x230 [ 0.526871] dentry_unlink_inode+0x118/0x130 [ 0.527152] d_delete+0xd8/0xe0 [ 0.527420] vfs_unlink+0x240/0x270 [ 0.527665] handle_remove+0x1d8/0x330 [ 0.527875] devtmpfsd+0x138/0x1c8 [ 0.528085] kthread+0x14c/0x158 [ 0.528291] ret_from_fork+0x10/0x18 [ 0.528720] Code: 92800002 aa1403e0 d538d081 8b010000 (c85f7c04) [ 0.529367] ---[ end trace 5a3dee47727f877c ]--- Rework to set suppress_bind_attrs flag to avoid removing the device when CONFIG_DEBUG_TEST_DRIVER_REMOVE=y. This applies for pic32_uart and xilinx_uartps as well. Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell Signed-off-by: Greg Kroah-Hartman commit 114c97cee6d37787135bd548bbd55c283463ac62 Author: zhong jiang Date: Tue Oct 23 21:21:34 2018 +0800 pch_uart: remove set but not used variable 'tx_empty' tx_empty is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang Reviewed-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 7034ef87fa880defb4cfc2ca552641d26f425f21 Author: Wolfram Sang Date: Sun Oct 21 22:00:59 2018 +0200 tty: serial: qcom_geni_serial: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman commit b1f84dd321667d07f08fab99d042f1e39e9ee5bb Author: Mukesh Kumar Savaliya Date: Tue Oct 16 19:41:00 2018 +0530 tty: serial: qcom_geni_serial: Rectify UART suspend mechanism UART driver checks for the PM state and denies suspend if state is ACTIVE. This makes UART to deny suspend when client keeps port open which is not correct. Instead follow framework and obey suspend-resume callbacks. Signed-off-by: Mukesh Kumar Savaliya Reviewed-by: Douglas Anderson Signed-off-by: Greg Kroah-Hartman commit 9f641df46b146f2ae8d013d57e2d94b8e2f4c76f Author: Douglas Anderson Date: Mon Oct 15 13:44:24 2018 -0700 tty: serial: qcom_geni_serial: Don't slow all ports just for kgdb If you turn on CONFIG_KGDB then you'll get CONFIG_CONSOLE_POLL selected. If you have CONFIG_CONSOLE_POLL selected then the GENI serial driver was setting RX_BYTES_PW to 1 for _all_ UART ports. This doesn't seem like such a good idea. Let's only set RX_BYTES_PW to 1 for the console port. Signed-off-by: Douglas Anderson Reviewed-by: Mukesh Kumar Savaliya Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman commit 3957386aeb582e7a45b0541af2681c201853ea06 Author: Marcel Ziswiler Date: Thu Nov 1 02:52:30 2018 +0100 serial: tegra: fix some spelling mistakes Fix a few spelling mistakes I stumbled upon while debugging a customers UART issues. Signed-off-by: Marcel Ziswiler Signed-off-by: Greg Kroah-Hartman commit acef6660d3aaf18813143c8c5f5d4640ca53ef72 Author: Peter Korsgaard Date: Tue Nov 6 23:11:37 2018 +0100 ttyprintk: make the printk log level configurable For some use cases it is handy to use a different printk log level than the default (info) for the messages written to ttyprintk, so add a Kconfig option similar to what we have for default console loglevel. Signed-off-by: Peter Korsgaard Signed-off-by: Greg Kroah-Hartman commit 397bd9211fe014b347ca8f95a8f4e1017bac1aeb Author: Andy Duan Date: Tue Oct 16 07:32:22 2018 +0000 serial: fsl_lpuart: clear parity enable bit when disable parity Current driver only enable parity enable bit and never clear it when user set the termios. The fix clear the parity enable bit when PARENB flag is not set in termios->c_cflag. Cc: Lukas Wunner Signed-off-by: Andy Duan Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit 61e169ee7683630ee0276dd5dcb5599976757770 Author: Andy Duan Date: Tue Oct 16 07:32:19 2018 +0000 serial: fsl_lpuart: fix the typo: UARTCR1_PE -> UARTCTRL_PE Fix the typo: UARTCR1_PE -> UARTCTRL_PE There have no function impacted since the macro define value is the same. Cc: Lukas Wunner Signed-off-by: Andy Duan Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman commit b312f6f4ac84bcd9587fd24316b5de7c3f319b88 Author: Shubhrajyoti Datta Date: Tue Oct 16 15:48:04 2018 +0530 serial-uartlite: Fix the unbind path Currently the clocks are not enabled at probe but when the port is used. Remove the unconditional disable at remove. Fixes the below [ 77.660196] ------------[ cut here ]------------ [ 77.664749] WARNING: CPU: 0 PID: 1992 at drivers/clk/clk.c:622 clk_core_disable+0x78/0x80 [ 77.672892] Modules linked in: [ 77.675930] CPU: 0 PID: 1992 Comm: sh Not tainted 4.14.0 #23 [ 77.681570] Hardware name: xlnx,zynqmp (DT) [ 77.685736] task: ffffffc879e2e580 task.stack: ffffff800be30000 [ 77.691641] PC is at clk_core_disable+0x78/0x80 Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 0379b1163e509cfc4c18643b27231c04c78981ab Author: Shubhrajyoti Datta Date: Tue Oct 16 15:48:03 2018 +0530 serial-uartlite: Add runtime support Add runtime support Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 3b209d253e7f8aa01fde0233d38a7239c8f7beb3 Author: Shubhrajyoti Datta Date: Tue Oct 16 15:48:02 2018 +0530 serial-uartlite: Do not use static struct uart_driver out of probe() ulite_uart_suspend()/resume() and remove() are using static reference to struct uart_driver. Assign this referece to private data structure as preparation step for dynamic struct uart_driver allocation. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit 62104b280a5a5d999c562d8e8f4c6c4eb97fb013 Author: Shubhrajyoti Datta Date: Tue Oct 16 15:48:01 2018 +0530 serial-uartlite: Add get serial id if not provided Add get serial id if not provided Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman commit f33cf776617ba3b0f738cd70c31e0f62ea777a8d Author: Shubhrajyoti Datta Date: Tue Oct 16 15:48:00 2018 +0530 serial-uartlite: Move the uart register Move the uart register. This fixes the error path where the clock disable is missed out. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman commit 275d924b4b0673dc26c68fed0c3f357a225c2799 Author: Songjun Wu Date: Tue Oct 16 17:19:15 2018 +0800 dt-bindings: serial: lantiq: Add optional properties for CCF Clocks and clock-names are updated in device tree binding. Reviewed-by: Rob Herring Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 40efa6c8f648c2cf28c0593164bd4993580bde87 Author: Songjun Wu Date: Tue Oct 16 17:19:14 2018 +0800 serial: lantiq: Change init_lqasc to static declaration init_lqasc() is only used internally, change to static declaration. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 3c8c2a9e29dca3ee40abf9a61672dfd9509e2ec4 Author: Songjun Wu Date: Tue Oct 16 17:19:13 2018 +0800 serial: lantiq: Replace lantiq_soc.h with lantiq.h In this existing lantiq serial driver, lantiq_soc.h is defined in the arch directory, ./arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h ./arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h This driver need to be extended to support more platform, lantiq.h is added in include/linux/ to make it globally available and provide some wrapper code. Use lantiq.h to make the driver can find the correct header file. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit a77bbe5e334fe7dc570c1f5fe62386cd3a60d6d6 Author: Songjun Wu Date: Tue Oct 16 17:19:11 2018 +0800 serial: lantiq: Reorder the head files Reorder the head files according to the coding style. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit dbbc26dbd01aea106bc29d8c2a618486e242b14b Author: Songjun Wu Date: Tue Oct 16 17:19:10 2018 +0800 serial: lantiq: Add CCF support Previous implementation uses platform-dependent API to get the clock. Those functions are not available for other SoC which uses the same IP. The CCF (Common Clock Framework) have an abstraction based APIs for clock. In future, the platform specific code will be removed when the legacy soc use CCF as well. Change to use CCF APIs to get clock and rate. So that different SoCs can use the same driver. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 5034ce0605f65576665932dd47c6db120fc97848 Author: Songjun Wu Date: Tue Oct 16 17:19:09 2018 +0800 serial: lantiq: Replace clk_enable/clk_disable with clk generic API The clk driver has introduced new clock APIs that replace the existing clk_enable and clk_disable. - clk_enable() APIs is replaced with clk_prepare_enable() - clk_disable() API is replaced with clk_disable_unprepare() Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 2e81c1f39620665ec2b0c59a30880ddebd4acb8e Author: Songjun Wu Date: Tue Oct 16 17:19:08 2018 +0800 serial: lantiq: Rename fpiclk to freqclk fpiclk is platform specific, freqclk is more generic. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 89b8bd2082bbbccbd95b849b34ff8b6ab3056bf7 Author: Songjun Wu Date: Tue Oct 16 17:19:07 2018 +0800 serial: lantiq: Use readl/writel instead of ltq_r32/ltq_w32 Previous implementation uses platform-dependent functions ltq_w32()/ltq_r32() to access registers. Those functions are not available for other SoC which uses the same IP. Change to OS provided readl()/writel() and readb()/writeb(), so that different SoCs can use the same driver. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit fccf231ae907dc9eb45eb8a9adb961195066b2c6 Author: Songjun Wu Date: Tue Oct 16 17:19:05 2018 +0800 serial: lantiq: Change ltq_w32_mask to asc_update_bits ltq prefix is platform specific function, asc prefix is more generic. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit b871424f57076b33e7342d654b93951c6e8d8f29 Author: Songjun Wu Date: Tue Oct 16 17:19:04 2018 +0800 serial: lantiq: Get serial id from dts Get serial id from dts, also keep backward compatible when dts is not updated. Signed-off-by: Songjun Wu Signed-off-by: Greg Kroah-Hartman commit 7962e63a2f4140631ad10d475d96193a3bc8ec2f Author: Gao Xiang Date: Sat Nov 10 00:07:50 2018 +0800 staging: erofs: fix undefined LZ4_decompress_safe_partial() It needs an explicit LZ4 library dependency if lz4 compression is enabled, found by kbuild randconfig. Reported-by: kbuild test robot Fixes: 05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()") Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit ca401e9674015645b7fba8a046bb6dbb1cedec27 Author: José Roberto de Souza Date: Wed Nov 7 15:54:49 2018 -0800 drm/i915/mst: Drop pre_pll_enable null check MST is only supported in DDI ports that have this hook, so the null check can be dropped. Suggested-by: Imre Deak Cc: Imre Deak Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181107235449.32264-3-jose.souza@intel.com commit bad46f2f33ebfcb494a399997da285d14def4759 Author: José Roberto de Souza Date: Wed Nov 7 15:54:48 2018 -0800 drm/i915: Release DDI power well references in MST ports MST ports did not had the post_pll_disable() hook causing the references get in pre_pll_enable() never being released causing DDI and AUX CH being enabled all the times. v2: renamed intel_mst_post_pll_disable_dp() parameters Reviewed-by: Ville Syrjälä Reviewed-by: Imre Deak Cc: Imre Deak Cc: Manasi Navare Signed-off-by: José Roberto de Souza Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181107235449.32264-2-jose.souza@intel.com commit 6423382247e06a149b4d9138f11265f5dc317b07 Author: José Roberto de Souza Date: Wed Nov 7 15:54:47 2018 -0800 drm/i915: Reuse the aux_domain cached intel_dp_detect() caches the aux_domain in the beginning of the function as it is used twice, so lets also use it as the aux_domain don't change in runtime. v3: returning intel_dp_retrain_link() error insted of connector_status_disconnected Cc: Imre Deak Reviewed-by: Imre Deak Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181107235449.32264-1-jose.souza@intel.com commit 0246c661b6f0051ef7bfbfff01d8ef7fd0359372 Author: Kuninori Morimoto Date: Fri Nov 9 04:15:46 2018 +0000 ASoC: rsnd: use ring buffer for rsnd_mod_name() commit c0ea089dbad4 ("ASoC: rsnd: rsnd_mod_name() handles both name and ID") merged "name" and "ID" on rsnd_mod_name() to handle sub-ID (= for CTU/BUSIF). Then, it decided to share static char to avoid pointless memory. But, it doesn't work correctry in below case, because last called name will be used. dev_xxx(dev, "%s is connected to %s\n", rsnd_mod_name(mod_a), /* ssiu[00] */ rsnd_mod_name(mod_b)); /* ssi[0] */ -> rcar_sound ec500000.sound: ssi[0] is connected to ssi[0] ~~~~~~ ~~~~~~ We still don't want to have pointless memory, so let's use ring buffer. 16byte x 5 is very enough for this purpose. dev_xxx(dev, "%s is connected to %s\n", rsnd_mod_name(mod_a), /* ssiu[00] */ rsnd_mod_name(mod_b)); /* ssi[0] */ -> rcar_sound ec500000.sound: ssiu[00] is connected to ssi[0] ~~~~~~~~ ~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 3aefb67f84960f7b387c7cc39f095a01cf8f6234 Author: Ville Syrjälä Date: Thu Nov 8 16:36:35 2018 +0200 drm/i915: Sanitize PCH port transcoder select on IBX IBX has a documented workaround which states that when we disable the port we must change its transcoder select to A, otherwise it will prevent the other port (DP vs. HDMI/SDVO) from using transcoder A. We implement the workaround during encoder disable, but looks like some BIOSen leave transcoder B selected even when the port wasn't actually enabled by the BIOS. That will trip up our asserts that attempt to make sure we never forget this w/a. Sanitize the transcoder select to A for all disabled PCH DP/HDMI/SDVO ports. We assume that the port was never enabled by the BIOS on transcoder B, because if it had we'd actually have to toggle the port on and back off to properly switch it back to transcoder A. That would cause some display flicker if transcoder A is already enabled on some other port, so it's better not to do it unless absolutely necessary. Since we have no indication that the transcoder select is misbehaving on the affected machines we can assume the port was never actually enabled by the BIOS. This cures warning like this during driver load: IBX PCH DP C still using transcoder B WARNING: CPU: 2 PID: 172 at drivers/gpu/drm/i915/intel_display.c:1279 assert_pch_dp_disabled+0x9e/0xb0 [i915] v2: Add comments to remind the reader that SDVOB==HDMIB (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108143635.9556-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 5a3aeca97af1b6b3498d59a7fd4e8bb95814c108 Author: Ville Syrjälä Date: Thu Nov 8 22:04:24 2018 +0200 drm/i915: Fix hpd handling for pins with two encoders In my haste to remove irq_port[] I accidentally changed the way we deal with hpd pins that are shared by multiple encoders (DP and HDMI for pre-DDI platforms). Previously we would only handle such pins via ->hpd_pulse(), but now we queue up the hotplug work for the HDMI encoder directly. Worse yet, we now count each hpd twice and this increment the hpd storm count twice as fast. This can lead to spurious storms being detected. Go back to the old way of doing things, ie. delegate to ->hpd_pulse() for any pin which has an encoder with that hook implemented. I don't really like the idea of adding irq_port[] back so let's loop through the encoders first to check if we have an encoder with ->hpd_pulse() for the pin, and then go through all the pins and decided on the correct course of action based on the earlier findings. I have occasionally toyed with the idea of unifying the pre-DDI HDMI and DP encoders into a single encoder as well. Besides the hotplug processing it would have the other benefit of preventing userspace from trying to enable both encoders at the same time. That is simply illegal as they share the same clock/data pins. We have some testcases that will attempt that and thus fail on many older machines. But for now let's stick to fixing just the hotplug code. Cc: stable@vger.kernel.org # 4.19+ Cc: Lyude Paul Cc: Rodrigo Vivi Fixes: b6ca3eee18ba ("drm/i915: Nuke dev_priv->irq_port[]") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108200424.28371-1-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul commit 27d420bc475e68c85d567d96caf215999d76fd16 Author: Christoph Hellwig Date: Fri Nov 9 14:49:02 2018 +0100 mtip32xxx: use for_each_sg Use the proper helper instead of manually iterating the scatterlist, which is broken in the presence of chained S/G lists. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d85cb20453bc98da47ab4393a1a05afcafb39a0f Author: Christoph Hellwig Date: Fri Nov 9 14:49:01 2018 +0100 mtip32xx: don't use req->special Instead create add to the icmd into struct mtip_cmd which can be unioned with the scatterlist used for the normal I/O path. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 55c7bc37e05b5f7593b76d1c74e254b996b73d1a Author: Christoph Hellwig Date: Fri Nov 9 14:49:00 2018 +0100 mtip32xx: remove mtip_get_int_command Merging this function into the only callers makes the code flow easier. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7bbf118f3b15682f79eee52c3eb96a13a71372c0 Author: Christoph Hellwig Date: Fri Nov 9 14:48:59 2018 +0100 mtip32xx: remove mtip_init_cmd_header There isn't much need for this helper - we can just calculate the offset for the command header once late in the submission path and fill out the ctba and ctbau fields there. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 643b5f68d0f9b5a269ebbcc9f0e6c658b41b864e Author: Christoph Hellwig Date: Fri Nov 9 14:48:58 2018 +0100 mtip32xx: add missing endianess annotations on struct smart_attr Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 449a15d9e49a566a38481e51a21360c7d91a9c77 Author: Christoph Hellwig Date: Fri Nov 9 14:48:57 2018 +0100 mtip32xx: remove __force_bit2int There is no good excuse not to use proper __le16/32 types. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 81e66174ab0aad0bfb3d69abb334b0402fb25df4 Author: Christoph Hellwig Date: Fri Nov 9 14:48:56 2018 +0100 mtip32xx: return a blk_status_t from mtip_send_trim This allows for better error propagation and simpler code. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 10966fa13855c5c64444bb01a97b86158e63267c Author: Christoph Hellwig Date: Fri Nov 9 14:48:55 2018 +0100 mtip32xx: merge mtip_submit_request into mtip_queue_rq Factor out a new is_stopped helper that matches the existing is_se_active helper, and merge the trivial amount of remaining code into the only caller. This also allows better error handling by returning a BLK_STS_* directly instead of explicitly calling blk_mq_end_request, and moving blk_mq_start_request closer to the actual issue to hardware. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b5fa0e9ec997031083a76972d2ee0e8db671420a Author: Christoph Hellwig Date: Fri Nov 9 14:48:54 2018 +0100 mtip32xx: move the blk_rq_map_sg call to mtip_hw_submit_io We have all arguments at hand in mtip_hw_submit_io, so keep the rq to sg mapping close to the dma_map_sg call. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c3bc3ff9e8019fba74ce62bfb501d710c2fca9d3 Author: Andy Shevchenko Date: Tue Nov 6 13:49:43 2018 +0200 MAINTAINERS: Do maintain Intel GPIO drivers via separate tree We would like to consolidate Intel pure GPIO drivers, including PMICs and some old x86 platforms, in one tree which is maintained by Intel. Signed-off-by: Andy Shevchenko commit bb38177cb6c6dc973ad8b88f219742b29f3002f1 Merge: 7d129adff3afb 55bb78d265c6b Author: Kalle Valo Date: Fri Nov 9 17:15:25 2018 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.21. Major changes: ath10k * add support for WCN3990 firmware crash recovery * add firmware memory dump support for QCA4019 wil6210 * add firmware error recovery while in AP mode ath9k * remove experimental notice from dynack feature commit 72d7ce8eb2bca8f77eebdd3271e59f6a5998dc4a Author: Christoph Hellwig Date: Fri Nov 9 14:51:10 2018 +0100 sx8: use a per-host tag_set The current sx8 code spends a lot of effort dealing with the fact that tags are per-host, but there might be multiple queues. Now that the driver has been converted to blk-mq it can take care of the blk-mq tag_set concept that has been designed just for that. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit cd94c9ed59bad76e68d1c8910fc564351ce2162c Author: Christoph Hellwig Date: Fri Nov 9 14:51:09 2018 +0100 sx8: cleanup queue and disk allocation / freeing Make the disk/queue alloc and free helpers per-port by moving the trivial loops into the callers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit eb8dd3abeb4dffab6c373e87d09fc3b5858ac158 Author: Boris Brezillon Date: Fri Nov 9 11:26:33 2018 +0100 drm/vc4: Prefer PPF over TPZ when dst >= 2/3 src The HVS spec recommends using PPF when the downscaling ratio is between 2/3 and 1. Let's modify vc4_get_scaling_mode() to follow this recommendation. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181109102633.32603-2-boris.brezillon@bootlin.com commit 0560054da5673b25d56bea6c57c8d069673af73b Author: Boris Brezillon Date: Fri Nov 9 11:26:32 2018 +0100 drm/vc4: ->x_scaling[1] should never be set to VC4_SCALING_NONE For the YUV conversion to work properly, ->x_scaling[1] should never be set to VC4_SCALING_NONE, but vc4_get_scaling_mode() might return VC4_SCALING_NONE if the horizontal scaling ratio exactly matches the horizontal subsampling factor. Add a test to turn VC4_SCALING_NONE into VC4_SCALING_PPF when that happens. The old ->x_scaling[0] adjustment is dropped as I couldn't find any mention to this constraint in the spec and it's proven to be unnecessary (I tested various multi-planar YUV formats with scaling disabled, and all of them worked fine without this adjustment). Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181109102633.32603-1-boris.brezillon@bootlin.com commit 30f5ccfa8c8a0fd9d4c52cbed8cdcba2e62845d1 Author: Imre Deak Date: Wed Nov 7 22:08:36 2018 +0200 drm/i915/icl: Fix PLL mapping sanitization for DP ports We shouldn't consider an encoder inactive if it doesn't have a CRTC linked, but has virtual MST encoders with a crtc linked. Fix this. Also we should not sanitize the mapping for MST encoders, as it's always their primary encoder (which could be even in SST mode) whose active state determines if we need the clock being enabled for the corresponding physical port. Fix this too. This fixes at least an existing breakage where we incorrectly disabled the clock for an active DP encoder when sanitizing its MST virtual encoders. Not sure if there are BIOSes that enable an output in MST mode, but our HW readout is mostly missing for it anyway, so just warn for that case. Fixes: 70332ac539c5 ("drm/i915/icl+: Sanitize port to PLL mapping") Cc: Antonio Argenziano Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Reported-by: Antonio Argenziano Signed-off-by: Imre Deak Tested-by: Clint Taylor Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20181107200836.10191-2-imre.deak@intel.com commit 9199c322ec83380bacffaadf30fc8ab2bc858039 Author: Imre Deak Date: Wed Nov 7 22:08:35 2018 +0200 drm/i915/ddi: Add more sanity check to the encoder HW readout Check for reserved register field values and conflicting transcoder->port mappings (both MST and non-MST mappings or multiple SST mappings). This is also needed for the next patch to determine if a port is in MST mode during sanitization after HW readout. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Cc: Antonio Argenziano Signed-off-by: Imre Deak Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20181107200836.10191-1-imre.deak@intel.com commit d90996dae8e48e042bd9fbfc11c73504a19a6e68 Author: Janek Kotas Date: Thu Sep 20 13:08:30 2018 +0000 scsi: ufs: Add UFS platform driver for Cadence UFS This patch adds a device tree platform driver for Cadence UFS Host Controller. It can be enabled with SCSI_UFS_CDNS_PLATFORM Kconfig option. Signed-off-by: Jan Kotas Signed-off-by: Martin K. Petersen commit 85408f830e704fdc2353dbf4454df01949f51257 Author: Janek Kotas Date: Thu Sep 20 13:08:22 2018 +0000 scsi: dt-bindings: ufs: Add bindings for Cadence UFS This patch adds a DT binding documentation for Cadence UFS Host Controller. Signed-off-by: Jan Kotas Reviewed-by: Rob Herring Signed-off-by: Martin K. Petersen commit 9e1e8a75708031937a0f92567c19760c92658410 Author: Subhash Jadavani Date: Tue Oct 16 14:29:41 2018 +0530 scsi: ufs: set the device reference clock setting UFS host supplies the reference clock to UFS device and UFS device specification allows host to provide one of the 4 frequencies (19.2 MHz, 26 MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the device reference clock frequency setting in the device based on what frequency it is supplying to UFS device. Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Signed-off-by: Sayali Lokhande Reviewed-by: Evan Green Acked-by: Rob Herring Signed-off-by: Martin K. Petersen commit ed8c8e1ecca08eb172463816ab290157b9d6ca0b Author: Geert Uytterhoeven Date: Wed Nov 7 14:37:31 2018 +0100 serial: sh-sci: Improve type-safety calling sci_receive_chars() While ptr and port both point to the uart_port structure, the former is the untyped pointer cookie passed to interrupt handlers. Use the correctly typed port variable instead, to improve type-safety. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman commit 4073536c927421a8908490cf22ce912cb97d7f53 Author: Alexey Skidanov Date: Tue Oct 9 22:08:37 2018 +0300 staging: android: ion: Add per-heap counters Heap statistics have been removed and currently even basics statistics are missing. This patch creates per heap debugfs directory /sys/kernel/debug/ and adds the following counters: - the number of allocated buffers; - the number of allocated bytes; - the number of allocated bytes watermark. Signed-off-by: Alexey Skidanov Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman commit 91e24a4c4b26f842558fd4f95dc26f8f518f9e2c Author: Irenge Jules Bashizi Date: Thu Nov 8 22:00:29 2018 +0000 staging: davinci_vpfe: Remove multiple blank space Remove multiple blank space complained by checkpatch Signed-off-by: Irenge Jules Bashizi Signed-off-by: Greg Kroah-Hartman commit 0ffcadecdb592ce9a18fc9a3167757a9c7ee6707 Author: Irenge Jules Bashizi Date: Thu Nov 8 21:12:05 2018 +0000 staging: davinci_vpfe: Change to !format Change from if(format==NULL) to if(!format) to remove checkpatch warning Signed-off-by: Irenge Jules Bashizi Signed-off-by: Greg Kroah-Hartman commit a1db9c54eb29afd9842a08b2cbc2bc07a8a602b9 Author: Chris Wilson Date: Thu Nov 8 09:21:01 2018 +0000 drm/i915: Track rcu_head for our idle worker While our little rcu worker might be able to be replaced now by the dedicated rcu_work, in the meantime we should mark up the rcu_head for correct debugobjects tracking. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181108092101.27598-2-chris@chris-wilson.co.uk commit 81d9e98fceb674078b5ea0add4df8fc40be558a2 Author: Colin Ian King Date: Tue Sep 11 13:42:34 2018 +0100 mtd: Kconfig: fix spelling mistake "partions" -> "partition" Trivial fix to spelling mistake in the Kconfig text Signed-off-by: Colin Ian King Signed-off-by: Boris Brezillon commit 6ac098b2a9d3088781f1c2b7138cf38e817a3da7 Author: Florian Westphal Date: Wed Nov 7 23:00:41 2018 +0100 xfrm: policy: add 2nd-level saddr trees for inexact policies This adds the fourth and final search class, containing policies where both saddr and daddr have prefix lengths (i.e., not wildcards). Inexact policies now end up in one of the following four search classes: 1. "Any:Any" list, containing policies where both saddr and daddr are wildcards or have very coarse prefixes, e.g. 10.0.0.0/8 and the like. 2. "saddr:any" list, containing policies with a fixed saddr/prefixlen, but without destination restrictions. These lists are stored in rbtree nodes; each node contains those policies matching saddr/prefixlen. 3. "Any:daddr" list. Similar to 2), except for policies where only the destinations are specified. 4. "saddr:daddr" lists, containing only those policies that match the given source/destination network. The root of the saddr/daddr nodes gets stored in the nodes of the 'daddr' tree. This diagram illustrates the list classes, and their placement in the lookup hierarchy: xfrm_pol_inexact_bin = hash(dir,type,family,if_id); | +---- root_d: sorted by daddr:prefix | | | xfrm_pol_inexact_node | | | +- root: sorted by saddr/prefix | | | | | xfrm_pol_inexact_node | | | | | + root: unused | | | | | + hhead: saddr:daddr policies | | | +- coarse policies and all any:daddr policies | +---- root_s: sorted by saddr:prefix | | | xfrm_pol_inexact_node | | | + root: unused | | | + hhead: saddr:any policies | +---- coarse policies and all any:any policies lookup for an inexact policy returns pointers to the four relevant list classes, after which each of the lists needs to be searched for the policy with the higher priority. This will only speed up lookups in case we have many policies and a sizeable portion of these have disjunct saddr/daddr addresses. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 64a09a7bfedee6ab97273d653dfac28e82635b61 Author: Florian Westphal Date: Wed Nov 7 23:00:40 2018 +0100 xfrm: policy: store inexact policies in a tree ordered by source address This adds the 'saddr:any' search class. It contains all policies that have a fixed saddr/prefixlen, but 'any' destination. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit e901cbc29316fb06423de5dfbc5afb78d4efda53 Author: Florian Westphal Date: Wed Nov 7 23:00:39 2018 +0100 xfrm: policy: check reinserted policies match their node validate the re-inserted policies match the lookup node. Policies that fail this test won't be returned in the candidate set. This is enabled by default for now, it should not cause noticeable reinsert slow down. Such reinserts are needed when we have to merge an existing node (e.g. for 10.0.0.0/28 because a overlapping subnet was added (e.g. 10.0.0.0/24), so whenever this happens existing policies have to be placed on the list of the new node. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 9cf545ebd591da673bb6b6c88150212ad83567a9 Author: Florian Westphal Date: Wed Nov 7 23:00:38 2018 +0100 xfrm: policy: store inexact policies in a tree ordered by destination address This adds inexact lists per destination network, stored in a search tree. Inexact lookups now return two 'candidate lists', the 'any' policies ('any' destionations), and a list of policies that share same daddr/prefix. Next patch will add a second search tree for 'saddr:any' policies so we can avoid placing those on the 'any:any' list too. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 6be3b0db6db82cf056a72cc18042048edd27f8ee Author: Florian Westphal Date: Wed Nov 7 23:00:37 2018 +0100 xfrm: policy: add inexact policy search tree infrastructure At this time inexact policies are all searched in-order until the first match is found. After removal of the flow cache, this resolution has to be performed for every packetm resulting in major slowdown when number of inexact policies is high. This adds infrastructure to later sort inexact policies into a tree. This only introduces a single class: any:any. Next patch will add a search tree to pre-sort policies that have a fixed daddr/prefixlen, so in this patch the any:any class will still be used for all policies. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit b5fe22e2337d47cd68bb7d8e4103a628808c4d5e Author: Florian Westphal Date: Wed Nov 7 23:00:36 2018 +0100 xfrm: policy: consider if_id when hashing inexact policy This avoids searches of polices that cannot match in the first place due to different interface id by placing them in different bins. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 24969facd704a5f0dd8e08da86bf32a9ce972bee Author: Florian Westphal Date: Wed Nov 7 23:00:35 2018 +0100 xfrm: policy: store inexact policies in an rhashtable Switch packet-path lookups for inexact policies to rhashtable. In this initial version, we now no longer need to search policies with non-matching address family and type. Next patch will add the if_id as well so lookups from the xfrm interface driver only need to search inexact policies for that device. Future patches will augment the hlist in each rhash bucket with a tree and pre-sort policies according to daddr/prefix. A single rhashtable is used. In order to avoid a full rhashtable walk on netns exit, the bins get placed on a pernet list, i.e. we add almost no cost for network namespaces that had no xfrm policies. The inexact lists are kept in place, and policies are added to both the per-rhash-inexact list and a pernet one. The latter is needed for the control plane to handle migrate -- these requests do not consider the if_id, so if we'd remove the inexact_list now we would have to search all hash buckets and then figure out which matching policy candidate is the most recent one -- this appears a bit harder than just keeping the 'old' inexact list for this purpose. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit cc1bb845adc9b3a005cbb67fd18c69af1c3aec94 Author: Florian Westphal Date: Wed Nov 7 23:00:34 2018 +0100 xfrm: policy: return NULL when inexact search needed currently policy_hash_bysel() returns the hash bucket list (for exact policies), or the inexact list (when policy uses a prefix). Searching this inexact list is slow, so it might be better to pre-sort inexact lists into a tree or another data structure for faster searching. However, due to 'any' policies, that need to be searched in any case, doing so will require that 'inexact' policies need to be handled specially to decide the best search strategy. So change hash_bysel() and return NULL if the policy can't be handled via the policy hash table. Right now, we simply use the inexact list when this happens, but future patch can then implement a different strategy. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit a927d6af53eec08661628e3992d74736e848a743 Author: Florian Westphal Date: Wed Nov 7 23:00:33 2018 +0100 xfrm: policy: split list insertion into a helper ... so we can reuse this later without code duplication when we add policy to a second inexact list. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit ceb159e30ad22efa0981d544e6166003515aa896 Author: Florian Westphal Date: Wed Nov 7 23:00:32 2018 +0100 xfrm: security: iterate all, not inexact lists currently all non-socket policies are either hashed in the dst table, or placed on the 'inexact list'. When flushing, we first walk the table, then the (per-direction) inexact lists. When we try and get rid of the inexact lists to having "n" inexact lists (e.g. per-af inexact lists, or sorted into a tree), this walk would become more complicated. Simplify this: walk the 'all' list and skip socket policies during traversal so we don't need to handle exact and inexact policies separately anymore. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit b69d540da7db84e836cea77fbd56a518aafa1f2f Author: Florian Westphal Date: Wed Nov 7 23:00:31 2018 +0100 selftests: add xfrm policy test script add a script that adds a ipsec tunnel between two network namespaces plus following policies: .0/24 -> ipsec tunnel .240/28 -> bypass .253/32 -> ipsec tunnel Then check that .254 bypasses tunnel (match /28 exception), and .2 (match /24) and .253 (match direct policy) pass through the tunnel. Abuses iptables to check if ping did resolve an ipsec policy or not. Also adds a bunch of 'block' rules that are not supposed to match. Signed-off-by: Florian Westphal Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit ecbc12ad6b682680ae26a429225d7c295f7f0e77 Author: Bob Copeland Date: Fri Oct 26 10:03:50 2018 -0400 {nl,mac}80211: add rssi to mesh candidates When peering is in userspace, some implementations may want to control which peers are accepted based on RSSI in addition to the information elements being sent today. Add signal level so that info is available to clients. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg commit 8811d616dfaa8c6e1905a20ce0543ec401275997 Author: Chris Wilson Date: Fri Nov 9 09:03:11 2018 +0000 drm/i915: Initialise the obj->rcu head Make the rcu_head known to the system, in particular for debugobjects. And having declared it for debugobjects, we need to tidy up afterwards. v2: mark the obj->rcu as being destroyed when we reuse its location for the freed list. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181109090311.15321-1-chris@chris-wilson.co.uk commit 01d66fbd5b18ac9f01a6a2ae1278189d19208ad5 Author: Bob Copeland Date: Thu Oct 25 17:36:34 2018 -0400 {nl,mac}80211: add dot11MeshConnectedToMeshGate to meshconf When userspace is controlling mesh routing, it may have better knowledge about whether a mesh STA is connected to a mesh gate than the kernel mpath table. Add dot11MeshConnectedToMeshGate to the mesh config so that such applications can explicitly signal that a mesh STA is connected to a gate, which will then be advertised in the beacon. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg commit dbdaee7aa6e61f56aac61b71a7807e76f92cc895 Author: Bob Copeland Date: Thu Oct 25 15:48:53 2018 -0400 {nl,mac}80211: report gate connectivity in station info Capture the current state of gate connectivity from the mesh formation field in mesh config whenever we receive a beacon, and report that via GET_STATION. This allows applications doing mesh peering in userspace to make peering decisions based on peers' current upstream connectivity. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg commit 4a6ecd35f95b0e29b3470ca16772a1cc89607c97 Author: Bob Copeland Date: Thu Oct 25 15:48:52 2018 -0400 mac80211: mesh: advertise gates in mesh formation The Connected to Mesh Gate subfield (802.11-2016 9.4.2.98.7) in the Mesh Formation Info field is currently unset. This field may be useful in determining which MBSSes to join or which mesh STAs to peer with. If this mesh STA is a gate, by having turned on mesh gate announcements, or if we have a path to one (e.g. by having received RANNs) then set this bit to 1. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg commit e9da68ddea6030b214dfe420564d48bb579f58fc Author: Johannes Berg Date: Thu Oct 18 10:35:47 2018 +0200 mac80211: allow hardware scan to fall back to software In some cases, like in the rsi driver hardware scan offload, there may be scenarios in which hardware scan might not be available or desirable. Allow drivers to cope with this by letting them fall back to software scan by returning the special value 1 from the hardware scan method. Requested-by: Sushant Kumar Mishra Requested-by: Siva Rebbagondla Signed-off-by: Johannes Berg commit c0a0189d827de189b15d07d0d9776b3965d59d8c Author: James Prestwood Date: Wed Oct 17 14:16:24 2018 -0700 mac80211_hwsim: allow configurable cipher types The mac80211_hwsim driver does not specify supported cipher types, which in turn enables all ciphers to be supported in software. (see net/mac80211/main.c:ieee80211_init_cipher_suites). Allowing ciphers to be configurable is valuable for simulating older drivers that may not support all ciphers. This patch adds a new attribute: - HWSIM_ATTR_CIPHER_SUPPORT A u32 array/list of supported cipher types This only allows enabling/disabling cipher types listed in the (new) "hwsim_ciphers" array in mac80211_hwsim.c. Any unknown cipher type will result in -EINVAL. Signed-off-by: James Prestwood [fix some indentation, change to hwsim_known_ciphers(), add error messages, validate length better] Signed-off-by: Johannes Berg commit 99e3a44bac37ff033af711ec2ee8e48b6fabcad3 Author: James Prestwood Date: Wed Oct 17 12:33:06 2018 -0700 mac80211_hwsim: allow setting iftype support The mac80211_hwsim driver hard codes its supported interface types. For testing purposes it would be valuable to allow changing these supported types in order to simulate actual drivers than support a limited set of iftypes. A new attribute was added to allow this: - HWSIM_ATTR_IFTYPE_SUPPORT A u32 bit field of supported NL80211_IFTYPE_* bits This will only enable/disable iftypes that mac80211_hwsim already supports. In order to accomplish this, the ieee80211_iface_limit structure needed to be built dynamically to only include limit rules for iftypes that the user requested to enable. Signed-off-by: James Prestwood [fix some indentation, add netlink error string] Signed-off-by: Johannes Berg commit 2f98abb17dd57b9c3ebdf6741ae2726ed360d902 Author: Johannes Berg Date: Fri Nov 9 11:32:39 2018 +0100 mac80211_hwsim: move HWSIM_ATTR_RADIO_NAME parsing last Avoid the need to kfree() the name in many places by moving the name parsing last. Signed-off-by: Johannes Berg commit 3d1a5bbfafbc655c05bfe87cfec2816f0a981565 Author: Andrew Zaborowski Date: Fri Oct 19 23:19:06 2018 +0200 nl80211: Emit a SET_INTERFACE on iftype change Let userspace learn about iftype changes by sending a notification when handling the NL80211_CMD_SET_INTERFACE command. There seems to be no other place where the iftype can change: nl80211_set_interface is the only caller of cfg80211_change_iface which is the only caller of ops->change_virtual_intf. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg commit c90b670b5c610266e255848f7fc774b57189a9a4 Author: Martin Willi Date: Sat Oct 27 09:31:24 2018 +0200 nl80211: announce radios/interfaces when switching namespaces When a wiphy changes its namespace, all interfaces are moved to the new namespace as well. The network interfaces are properly announced as leaving on the old and as appearing on the new namespace through RTM_NEWLINK/RTM_DELLINK. On nl80211, however, these events are missing for radios and their interfaces. Add netlink announcements through nl80211 when switching namespaces, so userspace can rely on these events to discover radios properly. Signed-off-by: Martin Willi Signed-off-by: Johannes Berg commit cee7013be9b71082c7ea63c46850157aaa1bf4b1 Author: Johannes Berg Date: Tue Oct 16 11:24:47 2018 +0200 mac80211: allow drivers to use peer measurement API There's nothing much for mac80211 to do, so only pass through the requests with minimal checks and tracing. The driver must call cfg80211's results APIs. Signed-off-by: Johannes Berg commit 9bb7e0f24e7e7d00daa1219b14539e2e602649b2 Author: Johannes Berg Date: Mon Sep 10 13:29:12 2018 +0200 cfg80211: add peer measurement with FTM initiator API Add a new "peer measurement" API, that can be used to measure certain things related to a peer. Right now, only implement FTM (flight time measurement) over it, but the idea is that it'll be extensible to also support measuring the necessary things to calculate e.g. angle-of-arrival for WiGig. The API is structured to have a generic list of peers and channels to measure with/on, and then for each of those a set of measurements (again, only FTM right now) to perform. Results are sent to the requesting socket, including a final complete message. Closing the controlling netlink socket will abort a running measurement. v3: - add a bit to report "final" for partial results - remove list keeping etc. and just unicast out the results to the requester (big code reduction ...) - also send complete message unicast, and as a result remove the multicast group - separate out struct cfg80211_pmsr_ftm_request_peer from struct cfg80211_pmsr_request_peer - document timeout == 0 if no timeout - disallow setting timeout nl80211 attribute to 0, must not include attribute for no timeout - make MAC address randomization optional - change num bursts exponent default to 0 (1 burst, rather rather than the old default of 15==don't care) v4: - clarify NL80211_ATTR_TIMEOUT documentation v5: - remove unnecessary nl80211 multicast/family changes - remove partial results bit/flag, final is sufficient - add max_bursts_exponent, max_ftms_per_burst to capability - rename "frames per burst" -> "FTMs per burst" v6: - rename cfg80211_pmsr_free_wdev() to cfg80211_pmsr_wdev_down() and call it in leave, so the device can't go down with any pending measurements v7: - wording fixes (Lior) - fix ftm.max_bursts_exponent to allow having the limit of 0 (Lior) v8: - copyright statements - minor coding style fixes - fix error path leak Signed-off-by: Johannes Berg commit 801f87469ee8d97af5997ef52188bb0e1908b110 Author: Johannes Berg Date: Thu Aug 23 10:48:13 2018 +0200 netlink: add nl_set_extack_cookie_u64() Add a helper function nl_set_extack_cookie_u64() to use a u64 as the netlink extended ACK cookie, to avoid having to open-code it in any users of the cookie. A u64 should be sufficient for most subsystems though we allow for up to 20 bytes right now. This also matches the cookies in nl80211 where I intend to use this. Signed-off-by: Johannes Berg Acked-by: David S. Miller Signed-off-by: Johannes Berg commit e0ba7095433a717a62d163dafe0fc2b0eba70d4b Author: Johannes Berg Date: Fri Nov 9 11:16:46 2018 +0100 mac80211: tx: avoid variable shadowing We have a bool and an __le16 called qos, rename the inner __le16 to 'qoshdr' to make it more obvious and to avoid sparse warnings. Signed-off-by: Johannes Berg commit 63c713e1e810a5470d96e2a74ab288d14e45aa14 Author: Johannes Berg Date: Fri Nov 9 11:14:51 2018 +0100 mac80211: debugfs: avoid variable shadowing We have a macro here that uses an inner variable 'i' that also exists in the outer scope - use '_i' in the macro. Signed-off-by: Johannes Berg commit 6af8354f1db95a01a1ca0638868367d7fa7b6324 Author: Johannes Berg Date: Fri Nov 9 11:13:15 2018 +0100 mac80211: sta_info: avoid tidstats variable shadowing We have a pointer called 'tidstats' that shadows a bool function argument with the same name, but we actually only use it once so just remove the pointer. Signed-off-by: Johannes Berg commit 140d905b256165ae22c12837c046665a8d0aa599 Author: Johannes Berg Date: Fri Nov 9 11:10:47 2018 +0100 mac80211: tracing: avoid 'idx' variable This variable shadows something that gets generated inside the tracing macros, which causes sparse to warn. Avoid it so sparse output is more readable, even if it doesn't seem to cause any trouble. Signed-off-by: Johannes Berg commit aaaa10e01d30e7d4cd3ddc0ff4cb82ed73632d9b Author: Johannes Berg Date: Fri Nov 9 11:10:47 2018 +0100 cfg80211: tracing: avoid 'idx' variable This variable shadows something that gets generated inside the tracing macros, which causes sparse to warn. Avoid it so sparse output is more readable, even if it doesn't seem to cause any trouble. Signed-off-by: Johannes Berg commit dbffda08f0e99ab508d8a9153293cbd80e658f53 Author: A.s. Dong Date: Fri Nov 2 09:13:03 2018 +0000 pinctrl: fsl: imx7ulp: change to use imx legacy binding We already had an earlier conclusion that all new i.MX Socs will keep using the legacy i.MX Pinctrl bindings instead of generic pin config. However, MX7ULP generic pin config binding support has already been in tree before that time. Per SoC maintainers' suggestions, in order to get a better consistency for all i.MX devices, we'd like to go back to imx legacy binding for MX7ULP as well. Cc: Linus Walleij Cc: Shawn Guo Cc: Stefan Agner Cc: Sascha Hauer Cc: Fabio Estevam Cc: linux-gpio@vger.kernel.org Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit 0934eec7bce20324136f013c049088ebf00c3d3f Author: A.s. Dong Date: Fri Nov 2 09:12:58 2018 +0000 dt-bindings: pinctrl: imx7ulp: back to imx legacy binding for consistency We already had an earlier conclusion that all new i.MX Socs will keep using the legacy i.MX Pinctrl bindings instead of generic pin config. However, MX7ULP generic pin config binding support has already been in tree before that time. Per SoC maintainers' suggestions, in order to get a better consistency for all i.MX devices, we'd like to go back to imx legacy binding for MX7ULP as well. Cc: Linus Walleij Cc: Shawn Guo Cc: Stefan Agner Cc: Sascha Hauer Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Acked-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 196ad6043e9fe93c4ae3dac02b5c8fd337f58c2d Author: Gilad Ben-Yossef Date: Sun Nov 4 10:05:24 2018 +0000 crypto: testmgr - mark cts(cbc(aes)) as FIPS allowed As per Sp800-38A addendum from Oct 2010[1], cts(cbc(aes)) is allowed as a FIPS mode algorithm. Mark it as such. [1] https://csrc.nist.gov/publications/detail/sp/800-38a/addendum/final Signed-off-by: Gilad Ben-Yossef Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit 37db69e0b4923bff331820ee6969681937d8b065 Author: Eric Biggers Date: Sat Nov 3 14:56:03 2018 -0700 crypto: user - clean up report structure copying There have been a pretty ridiculous number of issues with initializing the report structures that are copied to userspace by NETLINK_CRYPTO. Commit 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion") replaced some strncpy()s with strlcpy()s, thereby introducing information leaks. Later two other people tried to replace other strncpy()s with strlcpy() too, which would have introduced even more information leaks: - https://lore.kernel.org/patchwork/patch/954991/ - https://patchwork.kernel.org/patch/10434351/ Commit cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") also uses the buggy strlcpy() approach and therefore leaks uninitialized memory to userspace. A fix was proposed, but it was originally incomplete. Seeing as how apparently no one can get this right with the current approach, change all the reporting functions to: - Start by memsetting the report structure to 0. This guarantees it's always initialized, regardless of what happens later. - Initialize all strings using strscpy(). This is safe after the memset, ensures null termination of long strings, avoids unnecessary work, and avoids the -Wstringop-truncation warnings from gcc. - Use sizeof(var) instead of sizeof(type). This is more robust against copy+paste errors. For simplicity, also reuse the -EMSGSIZE return value from nla_put(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ed848b652cc6a7a3e7f5e539edc3c2009366093e Author: Eric Biggers Date: Sat Nov 3 14:56:02 2018 -0700 crypto: user - remove redundant reporting functions The acomp, akcipher, and kpp algorithm types already have .report methods defined, so there's no need to duplicate this functionality in crypto_user itself; the duplicate functions are actually never executed. Remove the unused code. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fc6176a240ae93850be445f355c1dba769fe8467 Author: Colin Ian King Date: Tue Oct 30 12:01:58 2018 +0000 crypto: chelsio - clean up various indentation issues Trivial fix to clean up varous indentation issue Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit b1e3874c75ab15288f573b3532e507c37e8e7656 Author: Colin Ian King Date: Sat Oct 27 15:49:26 2018 +0100 pcrypt: use format specifier in kobject_add Passing string 'name' as the format specifier is potentially hazardous because name could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" format string for the string 'name'. Cleans up clang warning: crypto/pcrypt.c:397:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security] Fixes: a3fb1e330dd2 ("pcrypt: Added sysfs interface to pcrypt") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 7da66670775d201f633577f5b15a4bbeebaaa2b0 Author: Dmitry Eremin-Solenikov Date: Sat Oct 20 02:01:53 2018 +0300 crypto: testmgr - add AES-CFB tests Add AES128/192/256-CFB testvectors from NIST SP800-38A. Signed-off-by: Dmitry Eremin-Solenikov Cc: stable@vger.kernel.org Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Herbert Xu commit fa4600734b74f74d9169c3015946d4722f8bcf79 Author: Dmitry Eremin-Solenikov Date: Sat Oct 20 02:01:52 2018 +0300 crypto: cfb - fix decryption crypto_cfb_decrypt_segment() incorrectly XOR'ed generated keystream with IV, rather than with data stream, resulting in incorrect decryption. Test vectors will be added in the next patch. Signed-off-by: Dmitry Eremin-Solenikov Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 7172122be6a4712d699da4d261f92aa5ab3a78b8 Author: Wenwen Wang Date: Thu Oct 18 19:50:43 2018 -0500 crypto: cavium/nitrox - fix a DMA pool free failure In crypto_alloc_context(), a DMA pool is allocated through dma_pool_alloc() to hold the crypto context. The meta data of the DMA pool, including the pool used for the allocation 'ndev->ctx_pool' and the base address of the DMA pool used by the device 'dma', are then stored to the beginning of the pool. These meta data are eventually used in crypto_free_context() to free the DMA pool through dma_pool_free(). However, given that the DMA pool can also be accessed by the device, a malicious device can modify these meta data, especially when the device is controlled to deploy an attack. This can cause an unexpected DMA pool free failure. To avoid the above issue, this patch introduces a new structure crypto_ctx_hdr and a new field chdr in the structure nitrox_crypto_ctx hold the meta data information of the DMA pool after the allocation. Note that the original structure ctx_hdr is not changed to ensure the compatibility. Cc: Signed-off-by: Wenwen Wang Signed-off-by: Herbert Xu commit 927574e0e85da61f84dcda15d5b6a2baa06cda46 Author: Yael Chemla Date: Thu Oct 18 13:59:59 2018 +0100 crypto: ccree - add SM3 support Add support for SM3 cipher in CryptoCell 713. Signed-off-by: Yael Chemla Signed-off-by: Herbert Xu commit 18a1dc1fd56b4a5b468ad5bf984a2b0ea5ee8c69 Author: Yael Chemla Date: Thu Oct 18 13:59:58 2018 +0100 crypto: ccree - modify set_cipher_mode usage from cc_hash encapsulate set_cipher_mode call with another api, preparation for specific hash behavior as needed in later patches when SM3 introduced. Signed-off-by: Yael Chemla Signed-off-by: Herbert Xu commit f1e52fd0fbd67fbf342932506cd7a6e27c090c5f Author: Yael Chemla Date: Thu Oct 18 13:59:57 2018 +0100 crypto: ccree - adjust hash length to suit certain context specifics Adjust hash length such that it will not be fixed and general for all algs. Instead make it suitable for certain context information. This is preparation for SM3 support. Signed-off-by: Yael Chemla Signed-off-by: Herbert Xu commit 9b8d51f812ce5c8bfffe440391fe85f6e5349f07 Author: Gilad Ben-Yossef Date: Mon Oct 29 09:50:14 2018 +0000 crypto: ccree - add SM4 support Add support for SM4 cipher in CryptoCell 713. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit d422912a8f0da30c4c6b2f482e5cfc0b85cd3119 Author: Gilad Ben-Yossef Date: Mon Oct 29 09:50:13 2018 +0000 dt-bindings: crypto: ccree: add ccree 713 Add device tree bindings associating Arm TrustZone CryptoCell 713 with the ccree driver. Signed-off-by: Gilad Ben-Yossef Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit e40fdb500b2bc92ae2e7e4ff29f6e9dedd854cc2 Author: Gilad Ben-Yossef Date: Mon Oct 29 09:50:12 2018 +0000 crypto: ccree - add support for CryptoCell 713 Add support for Arm TrustZone CryptoCell 713. Note that this patch just enables using a 713 in backwards compatible mode to 712. Newer 713 specific features will follow. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 913a3aa07d16e5b302f408d497a4b829910de247 Author: Eric Biggers Date: Wed Oct 17 21:37:59 2018 -0700 crypto: arm/aes - add some hardening against cache-timing attacks Make the ARM scalar AES implementation closer to constant-time by disabling interrupts and prefetching the tables into L1 cache. This is feasible because due to ARM's "free" rotations, the main tables are only 1024 bytes instead of the usual 4096 used by most AES implementations. On ARM Cortex-A7, the speed loss is only about 5%. The resulting code is still over twice as fast as aes_ti.c. Responsiveness is potentially a concern, but interrupts are only disabled for a single AES block. Note that even after these changes, the implementation still isn't necessarily guaranteed to be constant-time; see https://cr.yp.to/antiforgery/cachetiming-20050414.pdf for a discussion of the many difficulties involved in writing truly constant-time AES software. But it's valuable to make such attacks more difficult. Much of this patch is based on patches suggested by Ard Biesheuvel. Suggested-by: Ard Biesheuvel Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0a6a40c2a8c184a2fb467efacfb1cd338d719e0b Author: Eric Biggers Date: Wed Oct 17 21:37:58 2018 -0700 crypto: aes_ti - disable interrupts while accessing S-box In the "aes-fixed-time" AES implementation, disable interrupts while accessing the S-box, in order to make cache-timing attacks more difficult. Previously it was possible for the CPU to be interrupted while the S-box was loaded into L1 cache, potentially evicting the cachelines and causing later table lookups to be time-variant. In tests I did on x86 and ARM, this doesn't affect performance significantly. Responsiveness is potentially a concern, but interrupts are only disabled for a single AES block. Note that even after this change, the implementation still isn't necessarily guaranteed to be constant-time; see https://cr.yp.to/antiforgery/cachetiming-20050414.pdf for a discussion of the many difficulties involved in writing truly constant-time AES software. But it's valuable to make such attacks more difficult. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cd8a145a066a1a3beb0ae615c7cb2ee4217418d7 Author: Nathan Chancellor Date: Wed Nov 7 01:56:40 2018 -0700 pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/pinctrl-zynq.c:985:18: warning: implicit conversion from enumeration type 'enum zynq_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"io-standard", PIN_CONFIG_IOSTANDARD, zynq_iostd_lvcmos18}, ~ ^~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-zynq.c:990:16: warning: implicit conversion from enumeration type 'enum zynq_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] = { PCONFDUMP(PIN_CONFIG_IOSTANDARD, "IO-standard", NULL, true), ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from macro 'PCONFDUMP' .param = a, .display = b, .format = c, .has_arg = d \ ^ 2 warnings generated. It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Signed-off-by: Nathan Chancellor Acked-by: Michal Simek Signed-off-by: Linus Walleij commit f24bfb39975c241374cadebbd037c17960cf1412 Author: Nathan Chancellor Date: Thu Nov 1 08:00:08 2018 -0700 pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/pinctrl-lpc18xx.c:643:29: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-lpc18xx.c:648:12: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] PCONFDUMP(PIN_CONFIG_GPIO_PIN_INT, "gpio pin int", NULL, true), ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from macro 'PCONFDUMP' .param = a, .display = b, .format = c, .has_arg = d \ ^ 2 warnings generated. It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/140 Signed-off-by: Nathan Chancellor Signed-off-by: Linus Walleij commit b40ac08ff886302a6aa457fd72e94a969f50e245 Author: Nathan Chancellor Date: Wed Oct 31 17:46:54 2018 -0700 pinctrl: bcm2835: Use define directive for BCM2835_PINCONF_PARAM_PULL Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/bcm/pinctrl-bcm2835.c:707:40: warning: implicit conversion from enumeration type 'enum bcm2835_pinconf_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] configs[0] = pinconf_to_config_packed(BCM2835_PINCONF_PARAM_PULL, pull); ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Signed-off-by: Nathan Chancellor Acked-by: Stefan Wahren Signed-off-by: Linus Walleij commit 957063c924736d4341e5d588757b9f31e8f6fa24 Author: Nathan Chancellor Date: Wed Oct 31 17:44:10 2018 -0700 pinctrl: sprd: Use define directive for sprd_pinconf_params values Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/sprd/pinctrl-sprd.c:845:19: warning: implicit conversion from enumeration type 'enum sprd_pinconf_params' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"sprd,control", SPRD_PIN_CONFIG_CONTROL, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/sprd/pinctrl-sprd.c:846:22: warning: implicit conversion from enumeration type 'enum sprd_pinconf_params' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"sprd,sleep-mode", SPRD_PIN_CONFIG_SLEEP_MODE, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/138 Signed-off-by: Nathan Chancellor Reviewed-by: Baolin Wang Signed-off-by: Linus Walleij commit c8123ead13a5c92dc5fd15c0fdfe88eef41e6ac1 Author: Nitin Hande Date: Sun Oct 28 21:02:45 2018 -0700 bpf: Extend the sk_lookup() helper to XDP hookpoint. This patch proposes to extend the sk_lookup() BPF API to the XDP hookpoint. The sk_lookup() helper supports a lookup on incoming packet to find the corresponding socket that will receive this packet. Current support for this BPF API is at the tc hookpoint. This patch will extend this API at XDP hookpoint. A XDP program can map the incoming packet to the 5-tuple parameter and invoke the API to find the corresponding socket structure. Signed-off-by: Nitin Hande Signed-off-by: Daniel Borkmann commit bf598a8f0f771302d4ecb0ef0003c54732221597 Author: David Ahern Date: Thu Nov 8 13:00:07 2018 -0800 bpftool: Improve handling of ENOENT on map dumps bpftool output is not user friendly when dumping a map with only a few populated entries: $ bpftool map 1: devmap name tx_devmap flags 0x0 key 4B value 4B max_entries 64 memlock 4096B 2: array name tx_idxmap flags 0x0 key 4B value 4B max_entries 64 memlock 4096B $ bpftool map dump id 1 key: 00 00 00 00 value: No such file or directory key: 01 00 00 00 value: No such file or directory key: 02 00 00 00 value: No such file or directory key: 03 00 00 00 value: 03 00 00 00 Handle ENOENT by keeping the line format sane and dumping "" for the value $ bpftool map dump id 1 key: 00 00 00 00 value: key: 01 00 00 00 value: key: 02 00 00 00 value: key: 03 00 00 00 value: 03 00 00 00 ... Signed-off-by: David Ahern Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann commit 1f60652dd586d1b3eee7c4602892a97a62fa937a Author: Nathan Chancellor Date: Wed Oct 31 17:50:21 2018 -0700 pinctrl: max77620: Use define directive for max77620_pinconf_param values Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/pinctrl-max77620.c:56:12: warning: implicit conversion from enumeration type 'enum max77620_pinconf_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] .param = MAX77620_ACTIVE_FPS_SOURCE, ^~~~~~~~~~~~~~~~~~~~~~~~~~ It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/139 Signed-off-by: Nathan Chancellor Signed-off-by: Linus Walleij commit 149a96047237574b756d872007c006acd0cc6687 Author: Brian Masney Date: Wed Oct 31 20:11:47 2018 -0400 pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues When attempting to setup up a gpio hog, device probing would repeatedly fail with -EPROBE_DEFERED errors. It was caused by a circular dependency between the gpio and pinctrl frameworks. If the gpio-ranges property is present in device tree, then the gpio framework will handle the gpio pin registration and eliminate the circular dependency. See Christian Lamparter's commit a86caa9ba5d7 ("pinctrl: msm: fix gpio-hog related boot issues") for a detailed commit message that explains the issue in much more detail. The code comment in this commit came from Christian's commit. Signed-off-by: Brian Masney Signed-off-by: Linus Walleij commit 78bf386daf8a617bd79712aea2feda9baeccb64e Author: Colin Ian King Date: Wed Oct 31 18:42:41 2018 +0000 pinctrl: mediatek: clean up indentation issues, add missing tab Trivial fix to clean up indentation issues, add one level of indentation on two if statements. Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij commit 435f90a338ae42c0d7c0109a1742d1b16bc99bf6 Author: Sowmini Varadhan Date: Wed Nov 7 16:12:02 2018 -0800 selftests/bpf: add a test case for sock_ops perf-event notification This patch provides a tcp_bpf based eBPF sample. The test - ncat(1) as the TCP client program to connect() to a port with the intention of triggerring SYN retransmissions: we first install an iptables DROP rule to make sure ncat SYNs are resent (instead of aborting instantly after a TCP RST) - has a bpf kernel module that sends a perf-event notification for each TCP retransmit, and also tracks the number of such notifications sent in the global_map The test passes when the number of event notifications intercepted in user-space matches the value in the global_map. Signed-off-by: Sowmini Varadhan Signed-off-by: Daniel Borkmann commit a5a3a828cd00788a78da686c57c6d1f66191d8af Author: Sowmini Varadhan Date: Wed Nov 7 16:12:01 2018 -0800 bpf: add perf event notificaton support for sock_ops This patch allows eBPF programs that use sock_ops to send perf based event notifications using bpf_perf_event_output(). Our main use case for this is the following: We would like to monitor some subset of TCP sockets in user-space, (the monitoring application would define 4-tuples it wants to monitor) using TCP_INFO stats to analyze reported problems. The idea is to use those stats to see where the bottlenecks are likely to be ("is it application-limited?" or "is there evidence of BufferBloat in the path?" etc). Today we can do this by periodically polling for tcp_info, but this could be made more efficient if the kernel would asynchronously notify the application via tcp_info when some "interesting" thresholds (e.g., "RTT variance > X", or "total_retrans > Y" etc) are reached. And to make this effective, it is better if we could apply the threshold check *before* constructing the tcp_info netlink notification, so that we don't waste resources constructing notifications that will be discarded by the filter. This work solves the problem by adding perf event based notification support for sock_ops. The eBPF program can thus be designed to apply any desired filters to the bpf_sock_ops and trigger a perf event notification based on the evaluation from the filter. The user space component can use these perf event notifications to either read any state managed by the eBPF program, or issue a TCP_INFO netlink call if desired. Signed-off-by: Sowmini Varadhan Co-developed-by: Daniel Borkmann Signed-off-by: Daniel Borkmann commit 185067a86a789e490ab4e1bb97b97fb3e2c40066 Merge: bce6a14996f99 cf599f50311dd Author: Daniel Borkmann Date: Fri Nov 9 09:16:32 2018 +0100 Merge branch 'bpf-max-pkt-offset' Jiong Wang says: ==================== The maximum packet offset accessed by one BPF program is useful information. Because sometimes there could be packet split and it is possible for some reasons (for example performance) we want to reject the BPF program if the maximum packet size would trigger such split. Normally, MTU value is treated as the maximum packet size, but one BPF program does not always access the whole packet, it could only access the head portion of the data. We could let verifier calculate the maximum packet offset ever used and record it inside prog auxiliar information structure as a new field "max_pkt_offset". ==================== Signed-off-by: Daniel Borkmann commit cf599f50311dd4a5d3b5fc427beb9303dfa6be4b Author: Jiong Wang Date: Thu Nov 8 04:08:43 2018 -0500 nfp: bpf: relax prog rejection through max_pkt_offset NFP is refusing to offload programs whenever the MTU is set to a value larger than the max packet bytes that fits in NFP Cluster Target Memory (CTM). However, a eBPF program doesn't always need to access the whole packet data. Verifier has always calculated maximum direct packet access (DPA) offset, and kept it in max_pkt_offset inside prog auxiliar information. This patch relax prog rejection based on max_pkt_offset. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Daniel Borkmann commit e647815a4d3b3be9d85b5750ed0f2947fd78fac7 Author: Jiong Wang Date: Thu Nov 8 04:08:42 2018 -0500 bpf: let verifier to calculate and record max_pkt_offset In check_packet_access, update max_pkt_offset after the offset has passed __check_packet_access. It should be safe to use u32 for max_pkt_offset as explained in code comment. Also, when there is tail call, the max_pkt_offset of the called program is unknown, so conservatively set max_pkt_offset to MAX_PACKET_OFF for such case. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Daniel Borkmann commit 65bf2d54f062474d43834cebbf48ff03c4b00080 Author: Paul Kocialkowski Date: Wed Nov 7 19:18:38 2018 +0100 drm/sun4i: tcon: Support an active-low DE signal with RGB interface Some panels need an active-low data enable (DE) signal for the RGB interface. This requires flipping a bit in the TCON0 polarity register when setting up the mode for the RGB interface. Match the associated bus flag and use it to set the polarity inversion bit for the DE signal when required. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181107181843.27628-4-contact@paulk.fr commit 4843c9a208c05662811cbd0e3a0fd3e43a0ae965 Author: Paul Kocialkowski Date: Wed Nov 7 19:18:37 2018 +0100 drm/sun4i: tcon: Get the connector from the encoder in RGB setup Features such as dithering and pixel data edge configuration currently rely on the panel registered with the TCON driver. However, bridges are also supported in addition to panels for RGB setup. Instead of retrieving the connector from the panel, get it from the encoder with the dedicated helper. Even in the case of bridges, the connector is registered with the encoder from our driver and is accessible when iterating connectors. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181107181843.27628-3-contact@paulk.fr commit b842e2c9c0f2cb5f90f03d68963c0aae266c4c67 Author: Paul Kocialkowski Date: Wed Nov 7 19:18:36 2018 +0100 drm/sun4i: tcon: Pass encoder to RGB setup function Passing the encoder to the TCON RGB setup functions allows accessing the connector from the encoder directly instead of relying on the panel. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181107181843.27628-2-contact@paulk.fr commit eeb07c573ec307c53fe2f6ac6d8d11c261f64006 Author: Frank Rowand Date: Thu Oct 4 20:40:21 2018 -0700 of: unittest: initialize args before calling of_*parse_*() Callers of of_irq_parse_one() blindly use the pointer args.np without checking whether of_irq_parse_one() had an error and thus did not set the value of args.np. Initialize args to zero so that using the format "%pOF" to show the value of args.np will show "(null)" when of_irq_parse_one() has an error. This prevents the dereference of a random value. Make the same fix for callers of of_parse_phandle_with_args() and of_parse_phandle_with_args_map(). Reported-by: Guenter Roeck Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 160b1d4e4127f0ef5d9ac281b6fa6ef1fb78c45f Author: Frank Rowand Date: Thu Oct 4 20:41:03 2018 -0700 of: unittest: find overlays[] entry by name instead of index One accessor of overlays[] was using a hard coded index value to find the correct array entry instead of searching for the entry containing the correct name. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 5babefb7f7ab1f23861336d511cc666fa45ede82 Author: Frank Rowand Date: Fri Oct 12 19:38:26 2018 -0700 of: unittest: allow base devicetree to have symbol metadata The overlay metadata nodes in the FDT created from testcases.dts are not handled properly. The __fixups__ and __local_fixups__ node were added to the live devicetree, but should not be. Only the first property in the /__symbols__ node was added to the live devicetree if the live devicetree already contained a /__symbols node. All of the node's properties must be added. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit f96278810150fc39085d1872e5b39ea06366d03e Author: Frank Rowand Date: Fri Oct 12 19:21:16 2018 -0700 of: overlay: set node fields from properties when add new overlay node Overlay nodes added by add_changeset_node() do not have the node fields name, phandle, and type set. The node passed to __of_attach_node() when the add node changeset entry is processed does not contain any properties. The node's properties are located in add property changeset entries that will be processed after the add node changeset is applied. Set the node's fields in the node contained in the add node changeset entry and do not set them to incorrect values in add_changeset_node(). A visible symptom that is fixed by this patch is the names of nodes added by overlays that have an entry in /sys/bus/platform/drivers/*/ will contain the unit-address but the node-name will be , for example, "fc4ab000.". After applying the patch the name, in this example, for node restart@fc4ab000 is "fc4ab000.restart". Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 8c329655c14f9596bb0534492ea740994ded440c Author: Frank Rowand Date: Thu Oct 4 20:39:24 2018 -0700 of: unittest: remove unused of_unittest_apply_overlay() argument Argument unittest_nr is not used in of_unittest_apply_overlay(), remove it. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 2fe0e8769df9fed5098daea7db933bc414c329d7 Author: Frank Rowand Date: Thu Oct 4 20:36:18 2018 -0700 of: overlay: check prevents multiple fragments touching same property Add test case of two fragments updating the same property. After adding the test case, the system hangs at end of boot, after after slub stack dumps from kfree() in crypto modprobe code. Multiple overlay fragments adding, modifying, or deleting the same property is not supported. Add check to detect the attempt and fail the overlay apply. Before this patch, the first fragment error would terminate processing. Allow fragment checking to proceed and report all of the fragment errors before terminating the overlay apply. This is not a hot path, thus not a performance issue (the error is not transient and requires fixing the overlay before attempting to apply it again). After applying this patch, the devicetree unittest messages will include: OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/rpm_avail ... ### dt-test ### end of unittest - 212 passed, 0 failed The check to detect two fragments updating the same property is folded into the patch that created the test case to maintain bisectability. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit c168263b5a10d2434ad5051be8dda47baa34a98e Author: Frank Rowand Date: Thu Oct 4 20:35:14 2018 -0700 of: overlay: check prevents multiple fragments add or delete same node Multiple overlay fragments adding or deleting the same node is not supported. Replace code comment of such, with check to detect the attempt and fail the overlay apply. Devicetree unittest where multiple fragments added the same node was added in the previous patch in the series. After applying this patch the unittest messages will no longer include: Duplicate name in motor-1, renamed to "controller#1" OF: overlay: of_overlay_apply() err=0 ### dt-test ### of_overlay_fdt_apply() expected -22, ret=0, overlay_bad_add_dup_node ### dt-test ### FAIL of_unittest_overlay_high_level():2419 Adding overlay 'overlay_bad_add_dup_node' failed ... ### dt-test ### end of unittest - 210 passed, 1 failed but will instead include: OF: overlay: ERROR: multiple overlay fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller ... ### dt-test ### end of unittest - 211 passed, 0 failed Tested-by: Alan Tull Signed-off-by: Frank Rowand commit a68238a19c3b24e43fd2327d102bcea0ccceb7d0 Author: Frank Rowand Date: Thu Oct 4 20:34:33 2018 -0700 of: overlay: test case of two fragments adding same node Multiple overlay fragments adding or deleting the same node is not supported. An attempt to do so results in an incorrect devicetree. The node name will be munged for the second add. After adding this patch, the unittest messages will show: Duplicate name in motor-1, renamed to "controller#1" OF: overlay: of_overlay_apply() err=0 ### dt-test ### of_overlay_fdt_apply() expected -22, ret=0, overlay_bad_add_dup_node ### dt-test ### FAIL of_unittest_overlay_high_level():2419 Adding overlay 'overlay_bad_add_dup_node' failed ... ### dt-test ### end of unittest - 210 passed, 1 failed The incorrect (munged) node name "controller#1" can be seen in the /proc filesystem: $ pwd /proc/device-tree/testcase-data-2/substation@100/motor-1 $ ls compatible controller controller#1 name phandle spin $ ls controller power_bus $ ls controller#1 power_bus_emergency Tested-by: Alan Tull Signed-off-by: Frank Rowand commit a15e824ff2c18b2bb2464227009ae6aac4f07e10 Author: Frank Rowand Date: Thu Oct 4 20:33:35 2018 -0700 of: overlay: make all pr_debug() and pr_err() messages unique Make overlay.c debug and error messages unique so that they can be unambiguously found by grep. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 6f75118800acf77f8ad6afec61ca1b2349ade371 Author: Frank Rowand Date: Thu Oct 4 20:32:04 2018 -0700 of: overlay: validate overlay properties #address-cells and #size-cells If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry to add them since they must have the same value. This reduces the memory used by the changeset and eliminates a possible memory leak. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 81225ea682f45629a66309636482b7c9bc2dcec1 Author: Frank Rowand Date: Thu Oct 4 20:30:40 2018 -0700 of: overlay: reorder fields in struct fragment Order the fields of struct fragment in the same order as struct of_overlay_notify_data. The order in struct fragment is not significant. If both structs are ordered the same then when examining the data in a debugger or dump the human involved does not have to remember which context they are examining. Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 8814dc46bd9e347d4de55ec5bf8f16ea54470499 Author: Frank Rowand Date: Thu Oct 4 20:29:01 2018 -0700 of: overlay: do not duplicate properties from overlay for new nodes When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests to validate kfrees from overlay removal" will no longer occur. These error messages are of the form: "OF: ERROR: ..." and the unittest results will change from: ### dt-test ### end of unittest - 203 passed, 7 failed to ### dt-test ### end of unittest - 210 passed, 0 failed Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 6b4955ba7bc05e40c8c41071cc121bc26ca65277 Author: Frank Rowand Date: Thu Oct 4 20:28:08 2018 -0700 of: overlay: use prop add changeset entry for property in new nodes The changeset entry 'update property' was used for new properties in an overlay instead of 'add property'. The decision of whether to use 'update property' was based on whether the property already exists in the subtree where the node is being spliced into. At the top level of creating a changeset describing the overlay, the target node is in the live devicetree, so checking whether the property exists in the target node returns the correct result. As soon as the changeset creation algorithm recurses into a new node, the target is no longer in the live devicetree, but is instead in the detached overlay tree, thus all properties are incorrectly found to already exist in the target. This fix will expose another devicetree bug that will be fixed in the following patch in the series. When this patch is applied the errors reported by the devictree unittest will change, and the unittest results will change from: ### dt-test ### end of unittest - 210 passed, 0 failed to ### dt-test ### end of unittest - 203 passed, 7 failed Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 Author: Frank Rowand Date: Thu Oct 4 20:27:16 2018 -0700 powerpc/pseries: add of_node_put() in dlpar_detach_node() The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with dlpar_attach_node(). The calling sequence from dlpar_attach_node() to __of_attach_node_sysfs() is: dlpar_attach_node() of_attach_node() __of_attach_node_sysfs() For more detailed description of the node refcount, see commit 68baf692c435 ("powerpc/pseries: Fix of_node_put() underflow during DLPAR remove"). Tested-by: Alan Tull Acked-by: Michael Ellerman Signed-off-by: Frank Rowand commit 5b2c2f5a0ea3a43e0dee78059e34c7cb54136dcc Author: Frank Rowand Date: Thu Oct 4 20:26:05 2018 -0700 of: overlay: add missing of_node_get() in __of_attach_node_sysfs There is a matching of_node_put() in __of_detach_node_sysfs() Remove misleading comment from function header comment for of_detach_node(). This patch may result in memory leaks from code that directly calls the dynamic node add and delete functions directly instead of using changesets. This commit should result in powerpc systems that dynamically allocate a node, then later deallocate the node to have a memory leak when the node is deallocated. The next commit will fix the leak. Tested-by: Alan Tull Acked-by: Michael Ellerman (powerpc) Signed-off-by: Frank Rowand commit 7c528e457d53c75107d5aa56892316d265c778de Author: Frank Rowand Date: Thu Oct 4 20:25:13 2018 -0700 of: overlay: add missing of_node_put() after add new node to changeset The refcount of a newly added overlay node decrements to one (instead of zero) when the overlay changeset is destroyed. This change will cause the final decrement be to zero. After applying this patch, new validation warnings will be reported from the devicetree unittest during boot due to a pre-existing devicetree bug. The warnings will be similar to: OF: ERROR: memory leak before free overlay changeset, /testcase-data/overlay-node/test-bus/test-unittest4 This pre-existing devicetree bug will also trigger a WARN_ONCE() from refcount_sub_and_test_checked() when an overlay changeset is destroyed without having first been applied. This scenario occurs when an error in the overlay is detected during the overlay changeset creation: WARNING: CPU: 0 PID: 1 at lib/refcount.c:187 refcount_sub_and_test_checked+0xa8/0xbc refcount_t: underflow; use-after-free. (unwind_backtrace) from (show_stack+0x10/0x14) (show_stack) from (dump_stack+0x6c/0x8c) (dump_stack) from (__warn+0xdc/0x104) (__warn) from (warn_slowpath_fmt+0x44/0x6c) (warn_slowpath_fmt) from (refcount_sub_and_test_checked+0xa8/0xbc) (refcount_sub_and_test_checked) from (kobject_put+0x24/0x208) (kobject_put) from (of_changeset_destroy+0x2c/0xb4) (of_changeset_destroy) from (free_overlay_changeset+0x1c/0x9c) (free_overlay_changeset) from (of_overlay_remove+0x284/0x2cc) (of_overlay_remove) from (of_unittest_apply_revert_overlay_check.constprop.4+0xf8/0x1e8) (of_unittest_apply_revert_overlay_check.constprop.4) from (of_unittest_overlay+0x960/0xed8) (of_unittest_overlay) from (of_unittest+0x1cc4/0x2138) (of_unittest) from (do_one_initcall+0x4c/0x28c) (do_one_initcall) from (kernel_init_freeable+0x29c/0x378) (kernel_init_freeable) from (kernel_init+0x8/0x110) (kernel_init) from (ret_from_fork+0x14/0x2c) Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 144552c786925314c1e7cb8f91a71dae1aca8798 Author: Frank Rowand Date: Thu Oct 4 20:24:17 2018 -0700 of: overlay: add tests to validate kfrees from overlay removal Add checks: - attempted kfree due to refcount reaching zero before overlay is removed - properties linked to an overlay node when the node is removed - node refcount > one during node removal in a changeset destroy, if the node was created by the changeset After applying this patch, several validation warnings will be reported from the devicetree unittest during boot due to pre-existing devicetree bugs. The warnings will be similar to: OF: ERROR: of_node_release(), unexpected properties in /testcase-data/overlay-node/test-bus/test-unittest11 OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /testcase-data-2/substation@100/ hvac-medium-2 Tested-by: Alan Tull Signed-off-by: Frank Rowand commit 0607ba8403c4cdb253f8c5200ecf654dfb7790cc Author: Paul E. McKenney Date: Wed Apr 25 13:01:25 2018 -0700 srcu: Prevent __call_srcu() counter wrap with read-side critical section Ever since cdf7abc4610a ("srcu: Allow use of Tiny/Tree SRCU from both process and interrupt context"), it has been permissible to use SRCU read-side critical sections in interrupt context. This allows __call_srcu() to use SRCU read-side critical sections to prevent a new SRCU grace period from ending before the call to either srcu_funnel_gp_start() or srcu_funnel_exp_start completes, thus preventing SRCU grace-period counter overflow during that time. Note that this does not permit removal of the counter-wrap checks in srcu_gp_end(). These check are necessary to handle the case where a given CPU does not interact at all with SRCU for an extended time period. This commit therefore adds an SRCU read-side critical section to __call_srcu() in order to prevent grace period counter wrap during the funnel-locking process. Signed-off-by: Paul E. McKenney commit f3e763c3e544b73ae5c4a3842cedb9ff6ca37715 Author: Randy Dunlap Date: Mon Sep 3 12:45:45 2018 -0700 srcu: Fix kernel-doc missing notation Fix kernel-doc warnings for missing parameter descriptions: ../include/linux/srcu.h:175: warning: Function parameter or member 'p' not described in 'srcu_dereference_notrace' ../include/linux/srcu.h:175: warning: Function parameter or member 'sp' not described in 'srcu_dereference_notrace' Fixes: 0b764a6e4e19d ("srcu: Add notrace variant of srcu_dereference") Signed-off-by: Randy Dunlap Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 868f7a09a4f385e5167fc0ff9ec4c3f817897f3a Author: Lance Roy Date: Thu Oct 4 23:45:38 2018 -0700 x86/PCI: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Bjorn Helgaas Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Signed-off-by: Paul E. McKenney commit b94ec36896dafc0a12106b1536fe87f99e9a0c5d Author: Willy Tarreau Date: Sun Sep 9 13:33:02 2018 +0200 rcutorture: Make use of nolibc when available This reduces the size of the init executable from ~800 kB to ~800 bytes on x86_64. This is only implemented for x86_64, i386, arm and arm64. Others not tested. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 66b6f755ad45d354c5b74abd258f67aa8b40b3c7 Author: Willy Tarreau Date: Sun Sep 9 13:26:04 2018 +0200 rcutorture: Import a copy of nolibc This is a definition of the most common syscalls needed in minimalist init executables, allowing to statically build them with no external dependencies. It is sufficient in its current form to build rcutorture's init on x86_64, i386, arm, and arm64. Others have not been ported or tested. Updates may be found here : http://git.formilux.org/?p=people/willy/nolibc.git Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 825fa4cdfb10d8cbf784ebdadd6d5d93130a0cb5 Author: Willy Tarreau Date: Sun Sep 9 11:46:48 2018 +0200 rcutorture: Check initrd/init instead of initrd only If the build fails, we can end up with an empty initrd directory which prevents the build script from operating again. Better rely on the resulting init executable instead. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 18d7bf8ed3a1628ee653d3abde051703642ecd60 Author: Willy Tarreau Date: Sun Sep 9 11:41:10 2018 +0200 rcutorture: Always strip using the cross-compiler Strip using -s on the compiler command line instead of calling the "strip" utility as the latter isn't necessarily compatible with the target arch. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 70e9f504774b35aacd7b43d873b51ec5260e58ad Author: Paul E. McKenney Date: Thu Sep 6 10:26:07 2018 -0700 rcutorture: Add cross-compile capability to initrd.sh This adds the CROSS_COMPILE environment to the initrd.sh script's gcc command to enable cross compilation. Reported-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 229ab0cb5be3bfbac5947df7240f6905470ca413 Author: Paul E. McKenney Date: Thu Aug 23 15:23:23 2018 -0700 rcutorture: Make initrd/init execute in userspace Currently, the initrd/init script and executable remain blocked almost all the time. However, it is necessary to test nohz_full userspace execution, which both variants of initrd/init fail to do. This commit therefore causes initrd/init to spend about a millisecond per second executing in userspace. Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney commit 38e630424ba304dbe07ae52aa78d1ed6d38d9f75 Author: Paul E. McKenney Date: Thu Aug 23 10:48:18 2018 -0700 rcutorture: Add initrd support for systems lacking dracut The support for creating initrd directories using dracut is a great improvement over having to always hand-create them, it is a bit annoying to have to install some otherwise irrelevant package just to be able to run rcutorture. This commit therefore adds support for creating initrd directories on systems innocent of dracut. You do need gcc, but then again you need that to build the kernel (or to build llvm) in any case. The idea is to create an initrd directory containing nothing but a statically linked binary having a for-loop over a long-term sleep(). The result is a Linux kernel with almost no userspace: even the time-honored /dev, /lib, /tmp, and /usr directories are gone. In fact, the only directory present is "/", but only because I don't know how to get rid of it, at least short of not having an initrd in the first place. Although statically linked binaries are much maligned, and rightly so, their disadvantages seem to be irrelevant for this particular use case. From https://www.akkadia.org/drepper/no_static_linking.html: 1. Fixes are difficult to apply to hordes of widely scattered statically linked binaries. But in this case, there is only one binary, but there would otherwise be no fewer than four libraries. 2. Security measures like local address randomization cannot be used. Prudence prevents me from asserting that it is impossible to base a remote attack on a networking-free rcutorture instance. Nevertheless, bonus points to the first person who comes up with such an attack! 3. More efficient use of physical memory. Not in this case, given that libc is 1.8MB and the statically linked binary "only" 800K. 4. Features such as locales, name service switch (NSS), internationalized domain names (IDN) tool, and so on require dynamic linking. Bonus points to the first person coming up with a valid rcutorture use case requiring these features in its initrd. 5. Accidental violations of (L)GPL. Actually, this change actually helps -avoid- such violations by reducing the temptation to pass around tarballs of rcutorture-ready initrd directories. After all, the rcutorture scripts automatically create an initrd directory for you, so why bother with the tarballs? 6. Tools and hacks like ltrace, LD_PRELOAD, LD_PROFILE, and LD_AUDIT don't work. Again, bonus points to the first person coming up with a valid rcutorture use case requiring these features in its initrd. Nevertheless, the script will use dracut if available, and will create the statically linked binary only when dracut are missing. Those preferring the smaller initrd directory resulting from the statically linked binary (like me) are free to hand-edit mkinitrd.sh to remove the code using dracut. ;-) Signed-off-by: Paul E. McKenney commit 8f15c682ac5a778feb8e343f9057b89beb40d85b Author: Connor Shu Date: Wed Aug 22 14:16:46 2018 -0700 rcutorture: Automatically create initrd directory The rcutorture scripts currently expect the user to create the tools/testing/selftests/rcutorture/initrd directory. Should the user fail to do this, the kernel build will fail with obscure and confusing error messages. This commit therefore adds explicit checks for the tools/testing/selftests/rcutorture/initrd directory, and if not present, creates one on systems on which dracut is installed. If this directory could not be created, a less obscure error message is emitted and the test is aborted. Suggested-by: Thomas Gleixner Signed-off-by: Connor Shu [ paulmck: Adapt the script to fit into the rcutorture framework and severely abbreviate the initrd/init script. ] Signed-off-by: Paul E. McKenney commit dd944caa8173a19c702076471aae17a2d793ebeb Author: Joel Fernandes (Google) Date: Sat Sep 22 19:41:27 2018 -0400 doc: Remove rcu_preempt_state reference in stallwarn Consolidation of RCU-bh, RCU-preempt, and RCU-sched into one RCU flavor to rule them all resulted in the removal of rcu_preempt_state. However, stallwarn.txt still mentions rcu_preempt_state. This commit therefore Updates stallwarn documentation accordingly. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 2d0350a8f0e6eb5494141c61c5c749b5155df33d Author: Joel Fernandes (Google) Date: Fri Sep 21 18:31:53 2018 -0400 doc: Clarify RCU data-structure comment about rcu_tree fanout RCU Data-Structures document describes a trick to test RCU with small number of CPUs but with a taller tree. It wasn't immediately clear how the document arrived at 16 CPUs which also requires setting the FANOUT_LEAF to 2 instead of the default of 16. This commit therefore provides the needed clarification. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 832aa35a65bac800a1adbf2eab0b42427032cab8 Author: Paul E. McKenney Date: Wed Aug 29 13:37:47 2018 -0700 doc: Set down forward-progress requirements This commit adds a section to the requirements documentation setting down requirements for grace-period and callback-invocation forward progress. Signed-off-by: Paul E. McKenney commit 04229110adfba984950fc0209632640a76eb1de4 Author: Paul E. McKenney Date: Mon Nov 5 16:53:13 2018 -0800 powerpc: Convert hugepd_free() to use call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: commit 0d4e68e2f3979c67a3596c61c118e0c73a2bdfe0 Author: Paul E. McKenney Date: Tue Oct 30 16:30:07 2018 -0700 s390/mm: Convert tlb_table_flush() to use call_rcu() Now that call_rcu()'s callback is not invoked until after all preempt-disable regions of code have completed (in addition to explicitly marked RCU read-side critical sections), call_rcu() can be used in place of call_rcu_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: commit 8fa9eb388eb00f7a63caf0fd370f8c134015fc1f Author: Paul E. McKenney Date: Tue Oct 30 15:45:04 2018 -0700 sparc/oprofile: Convert timer_stop() to use synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code in addition to explicitly marked RCU read-side critical sections, synchronize_rcu() can be used in place of synchronize_sched(). This commit therefore makes that change. Signed-off-by: Paul E. McKenney Cc: Robert Richter Cc: "David S. Miller" Cc: Cc: commit 78d125d33858d00756baf0f40e75e77dcbfbea55 Author: Paul E. McKenney Date: Wed Jul 11 15:36:43 2018 -0700 sched/membarrier: Replace synchronize_sched() with synchronize_rcu() Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, the synchronize_sched() in sys_membarrier() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Mathieu Desnoyers commit d3ff3891b2edba63a7dee9023306bb66878fc3d8 Author: Paul E. McKenney Date: Wed Jul 11 14:42:53 2018 -0700 rcu: Consolidate the RCU update functions invoked by sync.c This commit retains all the various gp_ops[] entries, but makes their update functions all be synchronize_rcu(), call_rcu() and rcu_barrier(). The read-side checks remain consistent with the various RCU flavors, which still exist on the read side. Signed-off-by: Paul E. McKenney Cc: Oleg Nesterov Cc: Peter Zijlstra commit 309ba859b95085f61f4f2a154df6be9cb9713a12 Author: Paul E. McKenney Date: Wed Jul 11 14:36:49 2018 -0700 rcu: Eliminate synchronize_rcu_mult() Now that synchronize_rcu() waits for both RCU read-side critical sections and preempt-disabled regions of code, the sole caller of synchronize_rcu_mult() can be replaced by synchronize_rcu(). This patch makes this change and removes synchronize_rcu_mult(). Note that _wait_rcu_gp() still supports synchronize_rcu_mult(), and thus might be simplified in the future to take only take a single call_rcu() function rather than the current list of them. Signed-off-by: Paul E. McKenney commit adbccddb4a16b1dbf047d330ae1e78fd1ec80352 Author: Joel Fernandes (Google) Date: Sat Sep 22 19:41:26 2018 -0400 rcu: Fix rcu_{node,data} comments about gp_seq_needed Recent changes have removed the old ->gp_seq_needed field from the rcu_state structure, which in turn obsoleted a couple of comments in the rcu_node and rcu_data structures. This commit therefore updates these comments accordingly. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 75a8f72245223cce1571b0405b0881ca3c046df7 Author: Joel Fernandes (Google) Date: Sat Sep 22 19:41:25 2018 -0400 rcu: Remove unused rcu_state externs The rcu_bh_state and rcu_sched_state variables were removed during the RCU flavor consolidations, but external declarations remain in tree.h. This commit therefore removes these obsolete declarations. Signed-off-by: Joel Fernandes (Google) Cc: Signed-off-by: Paul E. McKenney commit 08543bda42ef06c5ee4cd74501c894aa7cc13ea8 Author: Paul E. McKenney Date: Mon Oct 22 08:04:03 2018 -0700 rcu: Eliminate BUG_ON() for kernel/rcu/tree.c The tree.c file has a number of calls to BUG_ON(), which panics the kernel, which is not a good strategy for devices (like embedded) that don't have a way to capture console output. This commit therefore converts these BUG_ON() calls to WARN_ON_ONCE() and WARN_ONCE(). Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney commit 042d4c70a203998697b34eaad1a99f6f09d09e4d Author: Paul E. McKenney Date: Mon Oct 22 07:43:22 2018 -0700 rcu: Eliminate BUG_ON() for sync.c The sync.c file has a number of calls to BUG_ON(), which panics the kernel, which is not a good strategy for devices (like embedded) that don't have a way to capture console output. This commit therefore changes these BUG_ON() calls to WARN_ON_ONCE(), but does so quite naively. Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Acked-by: Oleg Nesterov Cc: Peter Zijlstra commit db8ba1e8c39a0e4a012949b5b8ac68386bd39b28 Merge: 1106a5ade15fa 6e5a716f424b1 Author: David S. Miller Date: Thu Nov 8 20:48:01 2018 -0800 Merge branch 'nfp-abm-move-code-and-improve-parameter-validation' Jakub Kicinski says: ==================== nfp: abm: move code and improve parameter validation This set starts by separating Qdisc handling code into a new file. Next two patches allow early access to TLV-based capabilities during probe, previously the capabilities were parsed just before netdevs were registered, but its cleaner to do some basic validation earlier and avoid cleanup work. Next three patches improve RED's parameter validation. First we provide a more precise message about why offload failed (and move the parameter validation to a helper). Next we make sure we don't set the top bit in the 32 bit max RED threshold value. Because FW is treating the value as signed it reportedly causes slow downs (unnecessary queuing and marking) when top bit is set with recent firmwares. Last (and perhaps least importantly) we offload the harddrop parameter of the Qdisc. We don't plan to offload harddrop RED, but it seems prudent to make sure user didn't set that flag as device behaviour would have differed. ==================== Signed-off-by: David S. Miller commit 6e5a716f424b1020fc8cf52b0ab4a1551e952733 Author: Jakub Kicinski Date: Thu Nov 8 19:50:39 2018 -0800 nfp: abm: refuse RED offload with harddrop set RED Qdisc will now inform the drivers about the state of the harddrop flag. Refuse to offload in case harddrop is set. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 190852a55edbe138503259ea1bb40c08be221d75 Author: Jakub Kicinski Date: Thu Nov 8 19:50:38 2018 -0800 net: sched: red: inform offloads about harddrop setting To mirror software behaviour on offload more precisely inform the drivers about the state of the harddrop flag. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit cae5f48e3234dda5bab6f7f361b5eff6d4cc77b2 Author: Jakub Kicinski Date: Thu Nov 8 19:50:37 2018 -0800 nfp: abm: don't set negative threshold Turns out the threshold value is used in signed compares in the FW, so we should avoid setting the top bit. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 032748acf616c250aa195c92715ba89e136c61fe Author: Jakub Kicinski Date: Thu Nov 8 19:50:36 2018 -0800 nfp: abm: provide more precise info about offload parameter validation Improve log messages printed when RED can't be offloaded because of Qdisc parameters. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 83ec8857a00ff11cb3abc4d7c003de8ea103b715 Author: Jakub Kicinski Date: Thu Nov 8 19:50:35 2018 -0800 nfp: parse vNIC TLV capabilities at alloc time In certain cases initialization logic which follows allocation of the vNIC structure may want to validate the capabilities of that vNIC. This is easy before vNIC is initialized for normal capabilities which are at fixed offsets in control memory, easy to locate and read, but poses a challenge if the capabilities are in form of TLVs. Parse the TLVs early on so other code can just access parsed info, instead of having to do the parsing by itself. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit e38f5d11b98fa65a23301c28567bd786e4a97e75 Author: Jakub Kicinski Date: Thu Nov 8 19:50:34 2018 -0800 nfp: pass ctrl_bar pointer to nfp_net_alloc Move setting ctrl_bar pointer to the nfp_net_alloc function, to make sure we can parse capabilities early in the following patch. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 47330f9bdf240f5a582f756cf93354281b36453a Author: Jakub Kicinski Date: Thu Nov 8 19:50:33 2018 -0800 nfp: abm: split qdisc offload code into a separate file The Qdisc offload code is logically separate, and we will soon do significant surgery on it to support more Qdiscs, so move it to a separate file. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller commit 1106a5ade15fa2effdbfb3b3a1ba560a536dbcfe Author: Neal Cardwell Date: Thu Nov 8 21:54:00 2018 -0500 tcp_bbr: update comments to reflect pacing_margin_percent Recently, in commit ab408b6dc744 ("tcp: switch tcp and sch_fq to new earliest departure time model"), the TCP BBR code switched to a new approach of using an explicit bbr_pacing_margin_percent for shaving a pacing rate "haircut", rather than the previous implict approach. Update an old comment to reflect the new approach. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit dd00e06d3bc3aae033e3966a3f539f4e05a6380e Merge: 49f8e8329c3c0 3149a2711bac2 Author: David S. Miller Date: Thu Nov 8 20:45:05 2018 -0800 Merge branch 'net-Use-__vlan_hwaccel_-helpers' Michał Mirosław says: ==================== net: Use __vlan_hwaccel_*() helpers This series removes from networking core and driver code an assumption about how VLAN tag presence is stored in an skb. This will allow to free up overloading of VLAN.CFI bit to incidate tag's presence. ==================== Signed-off-by: David S. Miller commit 3149a2711bac22a673bc4b9e99d0ace2d23e11da Author: Michał Mirosław Date: Fri Nov 9 00:18:06 2018 +0100 sky2: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 4b17f9fe48c001d8fbcb7995df33a502dac25ae6 Author: Michał Mirosław Date: Fri Nov 9 00:18:05 2018 +0100 mlx4: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit c4062f89c5eb1af2b88ba6512a8452c630f7a6cc Author: Michał Mirosław Date: Fri Nov 9 00:18:04 2018 +0100 benet: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 3e2ed0c2575091254760f1dc9b0ddeb999aca716 Author: Michał Mirosław Date: Fri Nov 9 00:18:04 2018 +0100 ipv4/tunnel: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 5978f8a9fb492a74765822a545f16eb879fab937 Author: Michał Mirosław Date: Fri Nov 9 00:18:03 2018 +0100 bridge: use __vlan_hwaccel helpers This removes assumption than vlan_tci != 0 when tag is present. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 418a976d6c68d0835ffebf755cdbd53e9b9c6e7f Author: Michał Mirosław Date: Fri Nov 9 00:18:03 2018 +0100 8021q: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 82eea4cfe41dfc1f50a7e3af1ab3d76a89d193fc Author: Michał Mirosław Date: Fri Nov 9 00:18:02 2018 +0100 nfnetlink/queue: use __vlan_hwaccel helpers Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit b1817524c028a5a5284f21358185c74790001e0e Author: Michał Mirosław Date: Fri Nov 9 00:18:02 2018 +0100 net/core: use __vlan_hwaccel helpers This removes assumptions about VLAN_TAG_PRESENT bit. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 35c4a95d95287ffae90c111b861d755f1565dbc1 Author: Michał Mirosław Date: Fri Nov 9 00:18:01 2018 +0100 cxgb4: use __vlan_hwaccel helpers Use __vlan_hwaccel_put_tag() to set vlan tag and proto fields. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 49f8e8329c3c05e78a75112ce006c41d24eaad0d Author: Cong Wang Date: Thu Nov 8 14:05:42 2018 -0800 net: move __skb_checksum_complete*() to skbuff.c __skb_checksum_complete_head() and __skb_checksum_complete() are both declared in skbuff.h, they fit better in skbuff.c than datagram.c. Cc: Stefano Brivio Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit d1cb9273c60ba5e1a18fa1290defeabf5f009fd9 Merge: 29e12207174a5 00fe471205020 Author: David S. Miller Date: Thu Nov 8 20:30:58 2018 -0800 Merge branch 'net-ethernet-ti-cpsw-fix-vlan-mcast' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: fix vlan mcast The cpsw holds separate mcast entires for vlan entries. At this moment driver adds only not vlan mcast addresses, omitting vlan/mcast entries. As result mcast for vlans doesn't work. It can be fixed by adding same mcast entries for every created vlan, but this patchseries uses more sophisticated way and allows to create mcast entries only for vlans that really require it. Generic functions from this series can be reused for fixing vlan and macvlan unicast. Simple example of ALE table before and after this series, having same mcast entries as for vlan 100 as for real device (reserved vlan 2), and one mcast address only for vlan 100 - 01:1b:19:00:00:00. <---- Before this patchset ----> vlan , vid = 2, untag_force = 0x5, reg_mcast = 0x5, mem_list = 0x5 mcast, vid = 2, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 ucast, vid = 2, addr = 74:da:ea:47:7d:9d, persistant, port_num = 0x0 vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, mem_list = 0x7 mcast, vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x1 mcast, vid = 2, addr = 01:00:5e:00:00:01, port_mask = 0x1 vlan , vid = 1, untag_force = 0x3, reg_mcast = 0x3, mem_list = 0x3 mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 ucast, vid = 1, addr = 74:da:ea:47:7d:9c, persistant, port_num = 0x0 mcast, vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x1 mcast, vid = 1, addr = 01:00:5e:00:00:01, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:00, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:03, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:0e, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:00, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:03, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:0e, port_mask = 0x1 mcast, vid = 2, addr = 33:33:ff:47:7d:9d, port_mask = 0x1 mcast, vid = 2, addr = 33:33:00:00:00:fb, port_mask = 0x1 mcast, vid = 2, addr = 33:33:00:01:00:03, port_mask = 0x1 mcast, vid = 1, addr = 33:33:ff:47:7d:9c, port_mask = 0x1 mcast, vid = 1, addr = 33:33:00:00:00:fb, port_mask = 0x1 mcast, vid = 1, addr = 33:33:00:01:00:03, port_mask = 0x1 mcast, vid = 1, addr = 01:00:5e:00:00:fb, port_mask = 0x1 mcast, vid = 1, addr = 01:00:5e:00:00:fc, port_mask = 0x1 vlan , vid = 100, untag_force = 0x0, reg_mcast = 0x5, mem_list = 0x5 ucast, vid = 100, addr = 74:da:ea:47:7d:9d, persistant, port_num = 0x0 mcast, vid = 100, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 mcast, vid = 2, addr = 01:1b:19:00:00:00, port_mask = 0x1 ^^^ Here mcast entry (ptpl2), has to be added only for vlan 100 but added for reserved vlan 2...that's not enough. <---- After this patchset ----> vlan , vid = 2, untag_force = 0x5, reg_mcast = 0x5, mem_list = 0x5 mcast, vid = 2, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 ucast, vid = 2, addr = 74:da:ea:47:7d:9d, persistant, port_num = 0x0 vlan , vid = 0, untag_force = 0x7, reg_mcast = 0x0, mem_list = 0x7 mcast, vid = 2, addr = 33:33:00:00:00:01, port_mask = 0x1 mcast, vid = 2, addr = 01:00:5e:00:00:01, port_mask = 0x1 vlan , vid = 1, untag_force = 0x3, reg_mcast = 0x3, mem_list = 0x3 mcast, vid = 1, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 ucast, vid = 1, addr = 74:da:ea:47:7d:9c, persistant, port_num = 0x0 mcast, vid = 1, addr = 33:33:00:00:00:01, port_mask = 0x1 mcast, vid = 1, addr = 01:00:5e:00:00:01, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:00, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:03, port_mask = 0x1 mcast, vid = 2, addr = 01:80:c2:00:00:0e, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:00, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:03, port_mask = 0x1 mcast, vid = 1, addr = 01:80:c2:00:00:0e, port_mask = 0x1 mcast, vid = 2, addr = 33:33:ff:47:7d:9d, port_mask = 0x1 mcast, vid = 1, addr = 33:33:ff:47:7d:9c, port_mask = 0x1 mcast, vid = 2, addr = 33:33:00:00:00:fb, port_mask = 0x1 mcast, vid = 2, addr = 33:33:00:01:00:03, port_mask = 0x1 mcast, vid = 1, addr = 33:33:00:00:00:fb, port_mask = 0x1 mcast, vid = 1, addr = 33:33:00:01:00:03, port_mask = 0x1 vlan , vid = 100, untag_force = 0x0, reg_mcast = 0x5, mem_list = 0x5 ucast, vid = 100, addr = 74:da:ea:47:7d:9d, persistant, port_num = 0x0 mcast, vid = 100, addr = ff:ff:ff:ff:ff:ff, port_mask = 0x1 mcast, vid = 100, addr = 33:33:00:00:00:01, port_mask = 0x1 mcast, vid = 100, addr = 01:00:5e:00:00:01, port_mask = 0x1 mcast, vid = 100, addr = 33:33:ff:47:7d:9d, port_mask = 0x1 mcast, vid = 100, addr = 01:80:c2:00:00:00, port_mask = 0x1 mcast, vid = 100, addr = 01:80:c2:00:00:03, port_mask = 0x1 mcast, vid = 100, addr = 01:80:c2:00:00:0e, port_mask = 0x1 mcast, vid = 100, addr = 33:33:00:00:00:fb, port_mask = 0x1 mcast, vid = 100, addr = 33:33:00:01:00:03, port_mask = 0x1 mcast, vid = 100, addr = 01:1b:19:00:00:00, port_mask = 0x1 ^^^ Here mcast entry (ptpl2), is added only for vlan 100 as it should be. Based on net-next/master v2..v1: net: ethernet: ti: cpsw: fix vlan mcast - removed limit for legacy switch cpsw mode ==================== Signed-off-by: David S. Miller commit 00fe47120502076e8a377ba259c10a30ba21d777 Author: Ivan Khoronzhuk Date: Thu Nov 8 22:27:57 2018 +0200 net: ethernet: ti: cpsw: fix vlan configuration while down/up The vlan configuration is not restored after interface donw/up sequence (if dual-emac - both interfaces). Tested on am572x EVM. Steps to check: ~# ip link add link eth1 name eth1.100 type vlan id 100 ~# ifconfig eth0 down ~# ifconfig eth1 down Try to remove vid and observe warning: ~# ip link del eth1.100 [ 739.526757] net eth1: removing vlanid 100 from vlan filter [ 739.533322] failed to kill vid 0081/100 for device eth1 This patch fixes it, restoring only vlan ALE entries and all other unicast/multicast entries are restored by system calling rx_mode ndo. Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 15180eca569bfe1d4d3edbe02da76d5345e773b5 Author: Ivan Khoronzhuk Date: Thu Nov 8 22:27:56 2018 +0200 net: ethernet: ti: cpsw: fix vlan mcast At this moment, mcast addresses are added for real device only (reserved vlans for dual-emac mode), even if a mcast address was added for some vlan only, thus ALE doesn't have corresponding vlan mcast entries after vlan socket joined multicast group. So ALE drops vlan frames with mcast addresses intended for vlans and potentially can receive mcast frames for base ndev. That's not correct. So, fix it by creating only vlan/mcast entries as requested. Patch doesn't use any additional lists and is based on device mc address list and cpsw ALE table entries. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit 960abf68d2023f0d0b08c6f5d05971630496cfb0 Author: Ivan Khoronzhuk Date: Thu Nov 8 22:27:55 2018 +0200 net: 8021q: vlan_core: allow use list of vlans for real device It's redundancy for the drivers to hold the list of vlans when absolutely the same list exists in vlan core. In most cases it's needed only to traverse the vlan devices, their vids and sync some settings with h/w, so add API to simplify this. At least some of these drivers also can benefit: grep "for_each.*vid" -r drivers/net/ethernet/ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c: drivers/net/ethernet/qlogic/qlge/qlge_main.c: drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: drivers/net/ethernet/via/via-rhine.c: drivers/net/ethernet/via/via-velocity.c: drivers/net/ethernet/intel/igb/igb_main.c: drivers/net/ethernet/intel/ice/ice_main.c: drivers/net/ethernet/intel/e1000/e1000_main.c: drivers/net/ethernet/intel/i40e/i40e_main.c: drivers/net/ethernet/intel/e1000e/netdev.c: drivers/net/ethernet/intel/igbvf/netdev.c: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: drivers/net/ethernet/intel/ixgb/ixgb_main.c: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: drivers/net/ethernet/amd/xgbe/xgbe-dev.c: drivers/net/ethernet/emulex/benet/be_main.c: drivers/net/ethernet/neterion/vxge/vxge-main.c: drivers/net/ethernet/adaptec/starfire.c: drivers/net/ethernet/brocade/bna/bnad.c: Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit e7946760de5852f32c4e52ce47f37e85346981b9 Author: Ivan Khoronzhuk Date: Thu Nov 8 22:27:54 2018 +0200 net: core: dev_addr_lists: add auxiliary func to handle reference address updates In order to avoid all table update, and only remove or add new address, the auxiliary function exists, named __hw_addr_sync_dev(). It allows end driver do nothing when nothing changed and add/rm when concrete address is firstly added or lastly removed. But it doesn't include cases when an address of real device or vlan was reused by other vlans or vlan/macval devices. For handaling events when address was reused/unreused the patch adds new auxiliary routine - __hw_addr_ref_sync_dev(). It allows to do nothing when nothing was changed and do updates only for an address being added/reused/deleted/unreused. Thus, clone address changes for vlans can be mirrored in the table. The function is exclusive with __hw_addr_sync_dev(). It's responsibility of the end driver to identify address vlan device, if it needs so. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller commit c74d90c11c05bdfd78f8e29ee96b8a6f23daea99 Author: Gal Pressman Date: Wed Nov 7 20:31:37 2018 +0200 net/mlx5: Fix offsets of ifc reserved fields Fix wrong offsets of reserved fields in ifc file. Issues found using pahole. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 29e12207174a58ac8cab4914d0a7ce5e6c872646 Author: Edward Cree Date: Thu Nov 8 19:47:19 2018 +0000 sfc: use the new __netdev_tx_sent_queue BQL optimisation As added in 3e59020abf0f ("net: bql: add __netdev_tx_sent_queue()"), which see for performance rationale. Signed-off-by: Edward Cree Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit eb4149c9a5dfaa310d70326434c686af66e3d10f Merge: 0d404a61286f2 f4f9a5e6cc734 Author: David S. Miller Date: Thu Nov 8 19:49:32 2018 -0800 Merge branch 'net-Remove-VLAN_TAG_PRESENT-from-drivers' Michał Mirosław says: ==================== net: Remove VLAN_TAG_PRESENT from drivers This series removes VLAN_TAG_PRESENT use from network drivers in preparation to removing its special meaning. ==================== Signed-off-by: David S. Miller commit f4f9a5e6cc7341c6c74060ee5a594d395c364c6f Author: Michał Mirosław Date: Thu Nov 8 18:44:50 2018 +0100 gianfar: remove use of VLAN_TAG_PRESENT Reviewed-by: Claudiu Manoil Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 9df46aefafa6dee81a27c2a9d8ba360abd8c5fe3 Author: Michał Mirosław Date: Thu Nov 8 18:44:50 2018 +0100 OVS: remove use of VLAN_TAG_PRESENT This is a minimal change to allow removing of VLAN_TAG_PRESENT. It leaves OVS unable to use CFI bit, as fixing this would need a deeper surgery involving userspace interface. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit f723a1a293deefa7f25b3833266fa7eb18d877f7 Author: Michał Mirosław Date: Thu Nov 8 18:44:50 2018 +0100 cnic: remove use of VLAN_TAG_PRESENT This just removes VLAN_TAG_PRESENT use. VLAN TCI=0 special meaning is deeply embedded in the driver code and so is left as is. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 1ef212afa40ede497a141ee3a8bd050cacfd9e55 Author: Michał Mirosław Date: Thu Nov 8 18:44:49 2018 +0100 i40iw: remove use of VLAN_TAG_PRESENT Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 0d404a61286f2ffcde2157e8c5427f93f409d8ab Author: Ilias Apalodimas Date: Thu Nov 8 17:19:55 2018 +0200 net: socionext: refactor netsec_alloc_dring() return -ENOMEM directly instead of assigning it in a variable Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 4acb20b46214bc866945340b4d9e1de77700d6a3 Author: Ilias Apalodimas Date: Thu Nov 8 17:19:54 2018 +0200 net: socionext: different approach on DMA Current driver dynamically allocates an skb and maps it as DMA Rx buffer. In order to prepare for upcoming XDP changes, let's introduce a different allocation scheme. Buffers are allocated dynamically and mapped into hardware. During the Rx operation the driver uses build_skb() to produce the necessary buffers for the network stack. This change increases performance ~15% on 64b packets with smmu disabled and ~5% with smmu enabled Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 026b907d58c48b2ff2a4c04a67bb5f71ebda1f2d Author: Stefan Wahren Date: Thu Nov 8 14:38:21 2018 +0100 net: qca_spi: Add available buffer space verification Interferences on the SPI line could distort the response of available buffer space. So at least we should check that the response doesn't exceed the maximum available buffer space. In error case increase a new error counter and retry it later. This behavior avoids buffer errors in the QCA7000, which results in an unnecessary chip reset including packet loss. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 50254256f382c56bde87d970f3d0d02fdb76ec70 Author: David Barmann Date: Thu Nov 8 08:13:35 2018 -0600 sock: Reset dst when changing sk_mark via setsockopt When setting the SO_MARK socket option, if the mark changes, the dst needs to be reset so that a new route lookup is performed. This fixes the case where an application wants to change routing by setting a new sk_mark. If this is done after some packets have already been sent, the dst is cached and has no effect. Signed-off-by: David Barmann Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 52358cb5a310990ea5069f986bdab3620e01181f Merge: 04087d9a89bef ded9da1fc2d95 Author: David S. Miller Date: Thu Nov 8 17:22:24 2018 -0800 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2018-11-08 please apply the following qeth patches to net-next. The first patch allows one more device type to query the FW for a MAC address, the others are all basically just removal of duplicated or unused code. ==================== Signed-off-by: David S. Miller commit ded9da1fc2d9509c1fd18ecdaae5f6185fb81dbc Author: Julian Wiedmann Date: Thu Nov 8 15:06:22 2018 +0100 s390/qeth: don't process hsuid in qeth_l3_setup_netdev() qeth_l3_setup_netdev() checks if the hsuid attribute is set on the qeth device, and propagates it to the net_device. In the past this was needed to pick up any hsuid that was set before allocation of the net_device. With commit d3d1b205e89f ("s390/qeth: allocate netdevice early") this is no longer necessary, qeth_l3_dev_hsuid_store() always stores the hsuid straight into dev->perm_addr. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 9168f5ae3837dd98cb201d16f813c6f1d96670ca Author: Julian Wiedmann Date: Thu Nov 8 15:06:21 2018 +0100 s390/qeth: remove unused fallback in Layer3's MAC code If the CREATE ADDR sent by qeth_l3_iqd_read_initial_mac() fails, its callback sets a random MAC address on the net_device. The error then propagates back, and qeth_l3_setup_netdev() bails out without registering the net_device. Any subsequent call to qeth_l3_setup_netdev() will then attempt a fresh CREATE ADDR which either 1) also fails, or 2) sets a proper MAC address on the net_device. Consequently, the net_device will never be registered with a random MAC and we can drop the fallback code. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 4fa55fa94f55f5bc31472e8b96b9846bc191eaf8 Author: Julian Wiedmann Date: Thu Nov 8 15:06:20 2018 +0100 s390/qeth: remove two IPA command helpers qeth_l3_send_ipa_arp_cmd() is merely a wrapper around qeth_send_control_data() now. So push the length adjustment into QETH_SETASS_BASE_LEN, and remove the wrapper. While at it, also remove some redundant 0-initializations. qeth_send_setassparms() requires that callers prepare their command parameters, so that they can be copied into the parameter area in one go. Skip the indirection, and just let callers set up the command themselves. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 605c9d5f58cc8a58882cf39375c39fcab8066dd4 Author: Julian Wiedmann Date: Thu Nov 8 15:06:19 2018 +0100 s390/qeth: replace open-coded cmd setup Call qeth_prepare_ipa_cmd() during setup of a new IPA cmd buffer, so that it is used for all commands. Thus ARP and SNMP requests don't have to do their own initialization. This will now also set the proper MPC protocol version for SNMP requests on L2 devices. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d7d18da1f7033439f5359f4a95303a496cd16feb Author: Julian Wiedmann Date: Thu Nov 8 15:06:18 2018 +0100 s390/qeth: remove card list Re-implement the card-by-RDEV lookup by using device model concepts, and remove the now redundant list of all qeth card instances in the system. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 81ec54393944fc0303127e1357dbbd615a6abb63 Author: Julian Wiedmann Date: Thu Nov 8 15:06:17 2018 +0100 s390/qeth: unify transmit code Since commit 82bf5c0867f6 ("s390/qeth: add support for IPv6 TSO"), qeth_xmit() also knows how to build TSO packets and is practically identical to qeth_l3_xmit(). Convert qeth_l3_xmit() into a thin wrapper that merely strips the L2 header off a packet, and calls qeth_xmit() for the actual TX processing. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5a541f6d00c6d8aace789dfaa468443bd0edf564 Author: Julian Wiedmann Date: Thu Nov 8 15:06:16 2018 +0100 s390/qeth: handle af_iucv skbs in qeth_l3_fill_header() Filling the HW header from one single function will make it easier to rip out all the duplicated transmit code in qeth_l3_xmit(). On top, this saves one conditional branch in the TSO path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b144b99fff69a5bc0d34c8e168bedb88c68ca23d Author: Julian Wiedmann Date: Thu Nov 8 15:06:15 2018 +0100 s390/qeth: utilize virtual MAC for Layer2 OSD devices By default, READ MAC on a Layer2 OSD device returns the adapter's burnt-in MAC address. Given the default scenario of many virtual devices on the same adapter, qeth can't make any use of this address and therefore skips the READ MAC call for this device type. But in some configurations, the READ MAC command for a Layer2 OSD device actually returns a pre-provisioned, virtual MAC address. So enable the READ MAC code to detect this situation, and let the L2 subdriver call READ MAC for OSD devices. This also removes the QETH_LAYER2_MAC_READ flag, which protects L2 devices against calling READ MAC multiple times. Instead protect the whole call to qeth_l2_request_initial_mac(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 04087d9a89bef97998c71c21e3ecfca0cc7c52f3 Author: Li RongQing Date: Thu Nov 8 20:40:20 2018 +0800 openvswitch: remove BUG_ON from get_dpdev if local is NULL pointer, and the following access of local's dev will trigger panic, which is same as BUG_ON Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit 20da4ef91cb9335d7dcef6f1546dc31c455081f2 Merge: 141b95d5519ea 56fd865f46b89 Author: David S. Miller Date: Thu Nov 8 17:13:09 2018 -0800 Merge branch 'ICMP-error-handling-for-UDP-tunnels' Stefano Brivio says: ==================== ICMP error handling for UDP tunnels This series introduces ICMP error handling for UDP tunnels and encapsulations and related selftests. We need to handle ICMP errors to support PMTU discovery and route redirection -- this support is entirely missing right now: - patch 1/11 adds a socket lookup for UDP tunnels that use, by design, the same destination port on both endpoints -- i.e. VXLAN and GENEVE - patches 2/11 to 7/11 are specific to VxLAN and GENEVE - patches 8/11 and 9/11 add infrastructure for lookup of encapsulations where sent packets cannot be matched via receiving socket lookup, i.e. FoU and GUE - patches 10/11 and 11/11 are specific to FoU and GUE v2: changes are listed in the single patches ==================== Signed-off-by: David S. Miller commit 56fd865f46b894681dd7e7f83761243add7a71a3 Author: Stefano Brivio Date: Thu Nov 8 12:19:24 2018 +0100 selftests: pmtu: Introduce FoU and GUE PMTU exceptions tests Introduce eight tests, for FoU and GUE, with IPv4 and IPv6 payload, on IPv4 and IPv6 transport, that check that PMTU exceptions are created with the right value when exceeding the MTU on a link of the path. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit b8a51b38e4d4dec3e379d52c0fe1a66827f7cf1e Author: Stefano Brivio Date: Thu Nov 8 12:19:23 2018 +0100 fou, fou6: ICMP error handlers for FoU and GUE As the destination port in FoU and GUE receiving sockets doesn't necessarily match the remote destination port, we can't associate errors to the encapsulating tunnels with a socket lookup -- we need to blindly try them instead. This means we don't even know if we are handling errors for FoU or GUE without digging into the packets. Hence, implement a single handler for both, one for IPv4 and one for IPv6, that will check whether the packet that generated the ICMP error used a direct IP encapsulation or if it had a GUE header, and send the error to the matching protocol handler, if any. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit e7cc082455cb49ea937a3ec4ab3d001b0b5f137b Author: Stefano Brivio Date: Thu Nov 8 12:19:22 2018 +0100 udp: Support for error handlers of tunnels with arbitrary destination port ICMP error handling is currently not possible for UDP tunnels not employing a receiving socket with local destination port matching the remote one, because we have no way to look them up. Add an err_handler tunnel encapsulation operation that can be exported by tunnels in order to pass the error to the protocol implementing the encapsulation. We can't easily use a lookup function as we did for VXLAN and GENEVE, as protocol error handlers, which would be in turn called by implementations of this new operation, handle the errors themselves, together with the tunnel lookup. Without a socket, we can't be sure which encapsulation error handler is the appropriate one: encapsulation handlers (the ones for FoU and GUE introduced in the next patch, e.g.) will need to check the new error codes returned by protocol handlers to figure out if errors match the given encapsulation, and, in turn, report this error back, so that we can try all of them in __udp{4,6}_lib_err_encap_no_sk() until we have a match. v2: - Name all arguments in err_handler prototypes (David Miller) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 32bbd8793f24b0d5beb1cdb33c45c75ad1140e4b Author: Stefano Brivio Date: Thu Nov 8 12:19:21 2018 +0100 net: Convert protocol error handlers from void to int We'll need this to handle ICMP errors for tunnels without a sending socket (i.e. FoU and GUE). There, we might have to look up different types of IP tunnels, registered as network protocols, before we get a match, so we want this for the error handlers of IPPROTO_IPIP and IPPROTO_IPV6 in both inet_protos and inet6_protos. These error codes will be used in the next patch. For consistency, return sensible error codes in protocol error handlers whenever handlers can't handle errors because, even if valid, they don't match a protocol or any of its states. This has no effect on existing error handling paths. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit ce7336610ca950cda131293def57a0178d860121 Author: Stefano Brivio Date: Thu Nov 8 12:19:20 2018 +0100 selftests: pmtu: Introduce tests for IPv4/IPv6 over GENEVE over IPv4/IPv6 Use a router between endpoints, implemented via namespaces, set a low MTU between router and destination endpoint, exceed it and check PMTU value in route exceptions. v2: - Introduce IPv4 tests right away, if iproute2 doesn't support the 'df' link option they will be skipped (David Ahern) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit a025fb5f49ad38cf749753b16fcd031d0d678f2b Author: Stefano Brivio Date: Thu Nov 8 12:19:19 2018 +0100 geneve: Allow configuration of DF behaviour draft-ietf-nvo3-geneve-08 says: It is strongly RECOMMENDED that Path MTU Discovery ([RFC1191], [RFC1981]) be used by setting the DF bit in the IP header when Geneve packets are transmitted over IPv4 (this is the default with IPv6). Now that ICMP error handling is working for GENEVE, we can comply with this recommendation. Make this configurable, though, to avoid breaking existing setups. By default, DF won't be set. It can be set or inherited from inner IPv4 packets. If it's configured to be inherited and we are encapsulating IPv6, it will be set. This only applies to non-lwt tunnels: if an external control plane is used, tunnel key will still control the DF flag. v2: - DF behaviour configuration only applies for non-lwt tunnels, apply DF setting only if (!geneve->collect_md) in geneve_xmit_skb() (Stephen Hemminger) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit a07966447f39fe43e37d05c9bfc92b1493267a59 Author: Stefano Brivio Date: Thu Nov 8 12:19:18 2018 +0100 geneve: ICMP error lookup handler Export an encap_err_lookup() operation to match an ICMP error against a valid VNI. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 582888792f7bc2d543d85cb610160e2162d5f132 Author: Stefano Brivio Date: Thu Nov 8 12:19:17 2018 +0100 selftests: pmtu: Introduce tests for IPv4/IPv6 over VXLAN over IPv4/IPv6 Use a router between endpoints, implemented via namespaces, set a low MTU between router and destination endpoint, exceed it and check PMTU value in route exceptions. v2: - Change all occurrences of VxLAN to VXLAN (Jiri Benc) - Introduce IPv4 tests right away, if iproute2 doesn't support the 'df' link option they will be skipped (David Ahern) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit b4d3069783bccf0c965468da7db141d359d796fc Author: Stefano Brivio Date: Thu Nov 8 12:19:16 2018 +0100 vxlan: Allow configuration of DF behaviour Allow users to set the IPv4 DF bit in outgoing packets, or to inherit its value from the IPv4 inner header. If the encapsulated protocol is IPv6 and DF is configured to be inherited, always set it. For IPv4, inheriting DF from the inner header was probably intended from the very beginning judging by the comment to vxlan_xmit(), but it wasn't actually implemented -- also because it would have done more harm than good, without handling for ICMP Fragmentation Needed messages. According to RFC 7348, "Path MTU discovery MAY be used". An expired RFC draft, draft-saum-nvo3-pmtud-over-vxlan-05, whose purpose was to describe PMTUD implementation, says that "is a MUST that Vxlan gateways [...] SHOULD set the DF-bit [...]", whatever that means. Given this background, the only sane option is probably to let the user decide, and keep the current behaviour as default. This only applies to non-lwt tunnels: if an external control plane is used, tunnel key will still control the DF flag. v2: - DF behaviour configuration only applies for non-lwt tunnels, move DF setting to if (!info) block in vxlan_xmit_one() (Stephen Hemminger) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit c3a43b9fec8a1d0cd6c5b404d2c378ac873facad Author: Stefano Brivio Date: Thu Nov 8 12:19:15 2018 +0100 vxlan: ICMP error lookup handler Export an encap_err_lookup() operation to match an ICMP error against a valid VNI. Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit a36e185e8c85523413c1ae3e03a0bdde5501f403 Author: Stefano Brivio Date: Thu Nov 8 12:19:14 2018 +0100 udp: Handle ICMP errors for tunnels with same destination port on both endpoints For both IPv4 and IPv6, if we can't match errors to a socket, try tunnels before ignoring them. Look up a socket with the original source and destination ports as found in the UDP packet inside the ICMP payload, this will work for tunnels that force the same destination port for both endpoints, i.e. VXLAN and GENEVE. Actually, lwtunnels could break this assumption if they are configured by an external control plane to have different destination ports on the endpoints: in this case, we won't be able to trace ICMP messages back to them. For IPv6 redirect messages, call ip6_redirect() directly with the output interface argument set to the interface we received the packet from (as it's the very interface we should build the exception on), otherwise the new nexthop will be rejected. There's no such need for IPv4. Tunnels can now export an encap_err_lookup() operation that indicates a match. Pass the packet to the lookup function, and if the tunnel driver reports a matching association, continue with regular ICMP error handling. v2: - Added newline between network and transport header sets in __udp{4,6}_lib_err_encap() (David Miller) - Removed redundant skb_reset_network_header(skb); in __udp4_lib_err_encap() - Removed redundant reassignment of iph in __udp4_lib_err_encap() (Sabrina Dubroca) - Edited comment to __udp{4,6}_lib_err_encap() to reflect the fact this won't work with lwtunnels configured to use asymmetric ports. By the way, it's VXLAN, not VxLAN (Jiri Benc) Signed-off-by: Stefano Brivio Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 58db08a73b75bfe0f718107bb4f09c57cd725c48 Author: José Roberto de Souza Date: Wed Nov 7 16:16:47 2018 -0800 drm/i915: Keep overlay functions naming consistent All other overlay functions(almost all other functions in i915) follow intel_overlay_verb, so renaming overlay ones that do not match that. Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108001647.11276-4-jose.souza@intel.com commit a8147d0cd49f959faf2dd01b8cc52f93ef0e71ce Author: José Roberto de Souza Date: Wed Nov 7 16:16:46 2018 -0800 drm/i915: Move intel_init_ipc() call to i915_load_modeset_init() IPC is a display feature, so i915_load_modeset_init() is the right place to initialize it. Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108001647.11276-3-jose.souza@intel.com commit acde44b5008671b06a8a1c7c6443b9f54ef4be03 Author: José Roberto de Souza Date: Wed Nov 7 16:16:45 2018 -0800 drm/i915: Move FBC init and cleanup calls to modeset functions Although FBC helps save power it do not belongs to power management also the cleanup was placed in i915_driver_unload() also not a good place. intel_modeset_init()/intel_modeset_cleanup() are better places also this will help make easy disable features that depends in display being enabled in driver. Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108001647.11276-2-jose.souza@intel.com commit 8d3bf1a3959f456d12f9b78dd8a666afd1057b58 Author: José Roberto de Souza Date: Wed Nov 7 16:16:44 2018 -0800 drm/i915: Move drm_vblank_init() to i915_load_modeset_init() i915_load_modeset_init() is a more suitable place than i915_driver_load() as vblank is part of modeset. Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181108001647.11276-1-jose.souza@intel.com commit 141b95d5519eafebfa3d8d3130a4f1cbb1eef622 Author: Colin Ian King Date: Thu Nov 8 10:32:02 2018 +0000 net: hns3: fix spelling mistake, "assertting" -> "asserting" Trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 6d444c4efcdeca8b36f6059aa5a1a93f6ca3be6a Author: Ganesh Goudar Date: Thu Nov 8 14:21:07 2018 +0530 cxgb4: Add new T6 PCI device ids 0x608a Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller commit 1c51dc9ad68acf4d2cb89ba847fb48fd6e2de723 Author: Li RongQing Date: Thu Nov 8 14:58:07 2018 +0800 net/ipv6: compute anycast address hash only if dev is null avoid to compute the hash value if dev is not null, since hash value is not used Signed-off-by: Li RongQing Signed-off-by: David S. Miller commit eeba5b5cdeac8633cb322084df9b4c3d20960104 Author: Paulo Zanoni Date: Tue Oct 16 15:01:24 2018 -0700 drm/i915: remove padding from struct skl_wm_level This reduces the size of struct skl_wm_level from 6 to 4, which reduces the size of struct skl_plane_wm from 104 to 70, which reduces the size of struct skl_pipe_wm from 524 to 356. A reduction of 168 padding bytes per pipe. This will increase even more the next time we bump I915_MAX_PLANES. v2: Paste the pahole output provided by Lucas: $ pahole -s -C skl_wm_level drivers/gpu/drm/i915/i915.o struct skl_wm_level { bool plane_en; /* 0 1 */ /* XXX 1 byte hole, try to pack */ uint16_t plane_res_b; /* 2 2 */ uint8_t plane_res_l; /* 4 1 */ /* size: 6, cachelines: 1, members: 3 */ /* sum members: 4, holes: 1, sum holes: 1 */ /* padding: 1 */ /* last cacheline: 6 bytes */ }; Reviewed-by: Lucas De Marchi Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181016220133.26991-3-paulo.r.zanoni@intel.com commit 0db55093b56618088b9a1d445eb6e43b311bea33 Author: YueHaibing Date: Thu Nov 8 02:08:43 2018 +0000 net: bcmgenet: return correct value 'ret' from bcmgenet_power_down Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/genet/bcmgenet.c: In function 'bcmgenet_power_down': drivers/net/ethernet/broadcom/genet/bcmgenet.c:1136:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] bcmgenet_power_down should return 'ret' instead of 0. Fixes: ca8cf341903f ("net: bcmgenet: propagate errors from bcmgenet_power_down") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 3ed3857011cf249e9e1e36abc77afd2e97de5994 Merge: 80b6265c0f4c2 7b8e0b6e65998 Author: David S. Miller Date: Thu Nov 8 16:19:48 2018 -0800 Merge branch 'net-sched-prepare-for-more-Qdisc-offloads' Jakub Kicinski says: ==================== net: sched: prepare for more Qdisc offloads This series refactors the "switchdev" Qdisc offloads a little. We have a few Qdiscs which can be fully offloaded today to the forwarding plane of switching devices. First patch adds a helper for handing statistic dumps, the code seems to be copy pasted between PRIO and RED. Second patch removes unnecessary parameter from RED offload function. Third patch makes the MQ offload use the dump helper which helps it behave much like PRIO and RED when it comes to the TCQ_F_OFFLOADED flag. Patch 4 adds a graft helper, similar to the dump helper. Patch 5 is unrelated to offloads, qdisc_graft() code seemed ripe for a small refactor - no functional changes there. Last two patches move the qdisc_put() call outside of the sch_tree_lock section for RED and PRIO. The child Qdiscs will get removed from the hierarchy under the lock, but having the put (and potentially destroy) called outside of the lock helps offload which may choose to sleep, and it should generally lower the Qdisc change impact. ==================== Signed-off-by: David S. Miller commit 7b8e0b6e659983154c8d7e756cdb833d89a3d4d7 Author: Jakub Kicinski Date: Wed Nov 7 17:33:40 2018 -0800 net: sched: prio: delay destroying child qdiscs on change Move destroying of the old child qdiscs outside of the sch_tree_lock() section. This should improve the software qdisc replace but is even more important for offloads. Calling offloads under a spin lock is best avoided, and child's destroy would be called under sch_tree_lock(). Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 0c8d13ac96070000da33f394f45e9c19638483c5 Author: Jakub Kicinski Date: Wed Nov 7 17:33:39 2018 -0800 net: sched: red: delay destroying child qdisc on replace Move destroying of the old child qdisc outside of the sch_tree_lock() section. This should improve the software qdisc replace but is even more important for offloads. Firstly calling offloads under a spin lock is best avoided. Secondly the destroy event of existing child would have been sent to the offload device before the replace, causing confusion. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 9da93ece59f4a3e1544dfa2aa53e91f9e724abc6 Author: Jakub Kicinski Date: Wed Nov 7 17:33:38 2018 -0800 net: sched: refactor grafting Qdiscs with a parent The code for grafting Qdiscs when there is a parent has two needless indentation levels, and breaks the "keep the success path unindented" guideline. Refactor. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit bfaee9113f30abfa1f77ecb5e4a6f53a9d4c690c Author: Jakub Kicinski Date: Wed Nov 7 17:33:37 2018 -0800 net: sched: add an offload graft helper Qdisc graft operation of offload-capable qdiscs performs a few extra steps which are identical among all the qdiscs. Add a helper to share this code. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 58f8927399eac8f2ac3c7289a2856b8b5516ba30 Author: Jakub Kicinski Date: Wed Nov 7 17:33:36 2018 -0800 net: sched: set TCQ_F_OFFLOADED flag for MQ PRIO and RED mark the qdisc with TCQ_F_OFFLOADED upon successful offload, make MQ do the same. The consistency will help with consistent graft callback behaviour. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit dad54c0fab31c2ed813cb54bb024c65d6467d0b9 Author: Jakub Kicinski Date: Wed Nov 7 17:33:35 2018 -0800 net: sched: red: remove unnecessary red_dump_offload_stats parameter Offload dump helper does not use opt parameter, remove it. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit b592843c6723a850be70bf9618578082f3b73851 Author: Jakub Kicinski Date: Wed Nov 7 17:33:34 2018 -0800 net: sched: add an offload dump helper Qdisc dump operation of offload-capable qdiscs performs a few extra steps which are identical among all the qdiscs. Add a helper to share this code. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 53bb565fc5439f2c8c57a786feea5946804aa3e9 Author: Colin Ian King Date: Thu Oct 25 14:52:31 2018 +0100 x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux) In the expression "word1 << 16", word1 starts as u16, but is promoted to a signed int, then sign-extended to resource_size_t, which is probably not what was intended. Cast to resource_size_t to avoid the sign extension. This fixes an identical issue as fixed by commit 0b2d70764bb3 ("x86/PCI: Fix Broadcom CNB20LE unintended sign extension") back in 2014. Detected by CoverityScan, CID#138749, 138750 ("Unintended sign extension") Fixes: 3f6ea84a3035 ("PCI: read memory ranges out of Broadcom CNB20LE host bridge") Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas commit 80b6265c0f4c2bdafb73f09da9f278a8b3752928 Merge: 5867b33014051 c8e977bab3630 Author: David S. Miller Date: Thu Nov 8 15:02:06 2018 -0800 Merge branch 'net-phy-improve-and-simplify-phylib-state-machine' Heiner Kallweit says: ==================== net: phy: improve and simplify phylib state machine This patch series is based on two axioms: - During autoneg a PHY always reports the link being down - Info in clause 22/45 registers doesn't allow to differentiate between these two states: 1. Link is physically down 2. A link partner is connected and PHY is autonegotiating In both cases "link up" and "aneg finished" bits aren't set. One consequence is that having separate states PHY_NOLINK and PHY_AN isn't needed. By using these two axioms the state machine can be significantly simplified. ==================== Signed-off-by: David S. Miller commit c8e977bab363006e5f5291ebf34ee5293cfb8515 Author: Heiner Kallweit Date: Wed Nov 7 20:47:53 2018 +0100 net: phy: use phy_check_link_status in more places in the state machine Use phy_check_link_status in more places in the state machine. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 85a1f31d6392fb2c6726fcc4e072de008e3f0656 Author: Heiner Kallweit Date: Wed Nov 7 20:46:51 2018 +0100 net: phy: remove state PHY_AN After the recent changes in the state machine state PHY_AN isn't used any longer and can be removed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 74a992b3598ad22784ce238f59875b782e1ca537 Author: Heiner Kallweit Date: Wed Nov 7 20:45:58 2018 +0100 net: phy: add phy_check_link_status In few places in the state machine the state is set to PHY_RUNNING or PHY_NOLINK after doing a phy_read_status(). So factor this out to phy_check_link_status(). First use it in phy_start_aneg(): By setting the state to PHY_RUNNING or PHY_NOLINK directly we can remove the code to handle the case that we're using interrupts and aneg was finished already. Definition of phy_link_up and phy_link_down needs to be moved because they are called in the new function. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c96469f830568d8859cd65d723da3b79ec0219e0 Author: Heiner Kallweit Date: Wed Nov 7 20:44:56 2018 +0100 net: phy: remove useless check in state machine case PHY_RESUMING If aneg isn't finished yet then the PHY reports the link as down. There's no benefit in setting the state to PHY_AN because the next state machine run would set the status to PHY_NOLINK anyway (except in the meantime aneg has been finished and link is up). Therefore we can set the state to PHY_RUNNING or PHY_NOLINK directly. In addition change the do_carrier parameter in phy_link_down() to true. If carrier was marked as up before (what should never be the case because PHY was in state PHY_HALTED before) then we should mark it as down now. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3b01ea72f34cf8e18d16d993bb20f3cd241e4e52 Author: Heiner Kallweit Date: Wed Nov 7 20:43:20 2018 +0100 net: phy: remove useless check in state machine case PHY_NOLINK If aneg is enabled and the PHY reports the link as up then definitely aneg finished successfully. Therefore this check is useless and can be removed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 5fc2805b3e88302e9cc62f054a7aec8a0075197f Author: Chris Wilson Date: Thu Nov 8 14:00:39 2018 +0000 drm/i915: Set MI_INVALIDATE_BSD for all video-decode engines We have multiple instances of VCS but only remember to invalidate the BSD caches on the first, ignoring the stale caches of any other engine. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181108140039.12254-1-chris@chris-wilson.co.uk commit 8c9959689b203a388e9a78413a6e669049a87bd2 Author: Zhu Yanjun Date: Sat Nov 3 08:13:19 2018 -0400 IB/rxe: make rxe_unregister_device void Since the function rxe_unregister_device always returns 0, it is changed to void. Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe commit a854b1e89083781925fbad64e37bcb03c38082a7 Author: Zhu Yanjun Date: Sat Nov 3 08:13:18 2018 -0400 IB/rxe: move the variable into the function that uses it The variable rxe is only used in the function rxe_xmit_packet, and the caller functions do not use it. So move this variable into the function rxe_xmit_packet. Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe commit 6e5559b275e75a0039d2e11a68d65c2a86df3278 Author: Andrew Boyer Date: Thu Nov 1 09:18:46 2018 -0400 RDMA/rxe: Add link_down, rdma_sends, rdma_recvs stats counters link_down is self-explanatory. rdma_sends and rdma_recvs count the number of RDMA Send and RDMA Receive operations completed successfully. This is different from the existing sent_pkts and rcvd_pkts counters because the existing counters measure packets, not RDMA operations. ack_deffered is renamed to ack_deferred to fix the spelling. out_of_sequence is renamed to out_of_seq_request to make clear that it is counting only requests and not other packets which can be out of sequence. Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe commit 5736c7c499f142bceec06a2ab3113997d0175f80 Author: Andrew Boyer Date: Thu Nov 1 09:18:45 2018 -0400 RDMA/rxe: Distinguish between down links and disabled links In ib_query_port(), use the netdev's IFF_UP flag to determine phys_state (flag set = down = POLLING, flag clear = disabled = DISABLED). Callers can then use the phys_state field to distinguish between links which have a dead partner, cable missing, etc., from links which are turned off on the local node. This is useful for HA and supportability. Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford commit 759ace7832802eaefbca821b2b43a44ab896b449 Author: Sagi Grimberg Date: Thu Nov 1 13:08:07 2018 -0700 i40iw: remove support for ib_get_vector_affinity Devices that does not use managed affinity can not export a vector affinity as the consumer relies on having a static mapping it can map to upper layer affinity (e.g. sw queues). If the driver allows the user to set the device irq affinity, then the affinitization of a long term existing entites is not relevant. For example, nvme-rdma controllers queue-irq affinitization is determined at init time so if the irq affinity changes over time, we are no longer aligned. Signed-off-by: Sagi Grimberg Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe commit 9afc97c29b032af9a4112c2f4a02d5313b4dc71f Author: Sagi Grimberg Date: Thu Nov 1 09:13:12 2018 -0700 mlx5: remove support for ib_get_vector_affinity Devices that does not use managed affinity can not export a vector affinity as the consumer relies on having a static mapping it can map to upper layer affinity (e.g. sw queues). If the driver allows the user to set the device irq affinity, then the affinitization of a long term existing entites is not relevant. For example, nvme-rdma controllers queue-irq affinitization is determined at init time so if the irq affinity changes over time, we are no longer aligned. Signed-off-by: Sagi Grimberg Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe commit 584738b7e359e856199ef7093bc1b28dabada054 Author: Yue Haibing Date: Thu Nov 8 11:53:43 2018 +0000 drm/radeon: remove set but not used variable 'rdev' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/radeon/radeon_object.c: In function 'radeon_bo_unref': drivers/gpu/drm/radeon/radeon_object.c:317:24: warning: variable 'rdev' set but not used [-Wunused-but-set-variable] It not used any more after commit e7e31600d3e2 ("drm/radeon: remove taking mclk_lock from radeon_bo_unref") Signed-off-by: Yue Haibing Signed-off-by: Alex Deucher commit d2cfabbdafe09aa0b751302df9277663ff5a0270 Author: Alex Deucher Date: Wed Nov 7 12:25:30 2018 -0500 drm/amdgpu/sdma4: use paging queue for buffer funcs Use the paging queue for buffer functions to avoid contention with the other queues. Reviewed-by: Junwei Zhang Reviewed-by: Christian König Tested-by: Chen Gong Signed-off-by: Alex Deucher commit f0c9fabda1290432948e0b7f404512baed7d05d9 Author: Jim Qu Date: Wed Nov 7 18:38:59 2018 +0800 drm/amd/powerplay: correct code style Whitespace cleanup. Signed-off-by: Jim Qu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5cf8114d6e90b3822be5eb6a2faedf99d1c08f77 Author: Waiman Long Date: Thu Nov 8 10:08:46 2018 -0500 cpuset: Expose cpuset.cpus.subpartitions with cgroup_debug For debugging purpose, it will be useful to expose the content of the subparts_cpus as a read-only file to see if the code work correctly. However, subparts_cpus will not be used at all in most use cases. So adding a new cpuset file that clutters the cgroup directory may not be desirable. This is now being done by using the hidden "cgroup_debug" kernel command line option to expose a new "cpuset.cpus.subpartitions" file. That option was originally used by the debug controller to expose itself when configured into the kernel. This is now extended to set an internal flag used by cgroup_addrm_files(). A new CFTYPE_DEBUG flag can now be used to specify that a cgroup file should only be created when the "cgroup_debug" option is specified. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 90e92f2d557ee3b0883a3bee76150b9026dba192 Author: Waiman Long Date: Thu Nov 8 10:08:45 2018 -0500 cpuset: Add documentation about the new "cpuset.sched.partition" flag The cgroup-v2.rst file is updated to document the purpose of the new "cpuset.sched.partition" flag and how its usage. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit bb5b553c33cb3393f604483b103158bf7d01ca1c Author: Waiman Long Date: Thu Nov 8 10:08:44 2018 -0500 cpuset: Use descriptive text when reading/writing cpuset.sched.partition Currently, cpuset.sched.partition returns the values, 0, 1 or -1 on read. A person who is not familiar with the partition code may not understand what they mean. In order to make cpuset.sched.partition more user-friendly, it will now display the following descriptive text on read: "root" - A partition root (top cpuset of a partition) "member" - A non-root member of a partition "root invalid" - An invalid partition root Note that there is at least one partition in the whole cgroup hierarchy. The top cpuset is the root of that partition. The rests are either a root if it starts a new partition or a member of a partition. The cpuset.sched.partition file will now also accept "root" and "member" besides 1 and 0 as valid input values. The "root invalid" value is internal only and cannot be written to the file. Suggested-by: Tejun Heo Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 5776ceccd4de2a53dec740422a409e9e588c5a70 Author: Waiman Long Date: Thu Nov 8 10:08:43 2018 -0500 cpuset: Expose cpus.effective and mems.effective on cgroup v2 root Because of the fact that setting the "cpuset.sched.partition" in a direct child of root can remove CPUs from the root's effective CPU list, it makes sense to know what CPUs are left in the root cgroup for scheduling purpose. So the "cpuset.cpus.effective" control file is now exposed in the v2 cgroup root. For consistency, the "cpuset.mems.effective" control file is exposed as well. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 0ccea8feb9807ba87b0405a826f6830a386706f5 Author: Waiman Long Date: Thu Nov 8 10:08:42 2018 -0500 cpuset: Make generate_sched_domains() work with partition The generate_sched_domains() function is modified to make it work correctly with the newly introduced subparts_cpus mask for scheduling domains generation. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 4b842da276a8a1057aed7af6b2a5da471f840dd0 Author: Waiman Long Date: Thu Nov 8 10:08:41 2018 -0500 cpuset: Make CPU hotplug work with partition When there is a cpu hotplug event (CPU online or offline), the partitions may need to be reconfigured and regenerated. So code is added to the hotplug functions to make them work with new subparts_cpus mask to compute the right effective_cpus for each of the affected cpusets. It may also change the state of a partition root from real one to an erroneous one or vice versa. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 4716909cc5c566e946a3acc884bf5dc469812007 Author: Waiman Long Date: Thu Nov 8 10:08:40 2018 -0500 cpuset: Track cpusets that use parent's effective_cpus In the default hierarchy, a cpuset will use the parent's effective_cpus if none of the requested CPUs can be granted from the parent. That can be a problem if a parent is a partition root with children partition roots. Changes to a parent's effective_cpus list due to changes in a child partition root may not be properly reflected in a child cpuset that use parent's effective_cpus because the cpu_exclusive rule of a partition root will not guard against that. In order to avoid the mismatch, two new tracking variables are added to the cpuset structure to track if a cpuset uses parent's effective_cpus and the number of children cpusets that use its effective_cpus. So whenever cpumask changes are made to a parent, it will also check to see if it has other children cpusets that use its effective_cpus and call update_cpumasks_hier() if that is the case. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 3881b86128d0be22e8947ac1fca0429c74bf055e Author: Waiman Long Date: Thu Nov 8 10:08:39 2018 -0500 cpuset: Add an error state to cpuset.sched.partition When external events like CPU offlining or user events like changing the cpu list of an ancestor cpuset happen, update_cpumasks_hier() will be called to update the effective cpus of each of the affected cpusets. That will then call update_parent_subparts_cpumask() if partitions are impacted. Currently, these events may cause update_parent_subparts_cpumask() to return error if none of the requested cpus are available or it will consume all the cpus in the parent partition root. Handling these errors is problematic as the states may become inconsistent. Instead of letting update_parent_subparts_cpumask() return error, a new error state (-1) is added to the partition_root_state flag to designate the fact that the partition is no longer valid. IOW, it is no longer a real partition root, but the CS_CPU_EXCLUSIVE flag will still be set as it can be changed back to a real one if favorable change happens later on. This new error state is set internally and user cannot write this new value to "cpuset.sched.partition". Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit ee8dde0cd2ce78b62d16aec1c29960b64380e634 Author: Waiman Long Date: Thu Nov 8 10:08:38 2018 -0500 cpuset: Add new v2 cpuset.sched.partition flag A new cpuset.sched.partition boolean flag is added to cpuset v2. This new flag, if set, indicates that the cgroup is the root of a new scheduling domain or partition that includes itself and all its descendants except those that are scheduling domain roots themselves and their descendants. With this new flag, one can directly create as many partitions as necessary without ever using the v1 trick of turning off load balancing in specific cpusets to create partitions as a side effect. This new flag is owned by the parent and will cause the CPUs in the cpuset to be removed from the effective CPUs of its parent. This is implemented internally by adding a new subparts_cpus mask that holds the CPUs belonging to child partitions so that: subparts_cpus | effective_cpus = cpus_allowed subparts_cpus & effective_cpus = 0 This new flag can only be turned on in a cpuset if its parent is a partition root itself. The state of this flag cannot be changed if the cpuset has children. Once turned on, further changes to "cpuset.cpus" is allowed as long as there is at least one CPU left that can be granted from the parent and a child partition root cannot use up all the CPUs in the parent's effective_cpus. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit bf92370c035d5ed73a90927450c20a07adf08cfd Author: Waiman Long Date: Thu Nov 8 10:08:37 2018 -0500 cpuset: Simply allocation and freeing of cpumasks The previous commit introduces a new subparts_cpus mask into the cpuset data structure and a new tmpmasks structure. Managing the allocation and freeing of those cpumasks is becoming more complex. So a number of helper functions are added to simplify and streamline the management of those cpumasks. To make it simple, all the cpumasks are now pre-cleared on allocation. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 58b7484250db8da0d49bdd289c877ccd3319575c Author: Waiman Long Date: Thu Nov 8 10:08:36 2018 -0500 cpuset: Define data structures to support scheduling partition >From a cpuset point of view, a scheduling partition is a group of cpusets with their own set of exclusive CPUs that are not shared by other tasks outside the scheduling partition. In the legacy hierarchy, scheduling partitions are supported indirectly via the right use of the load balancing and the exclusive CPUs flag which is not intuitive and can be hard to use. To fully support the concept of scheduling partitions in the default hierarchy, we need to add some new field into the cpuset structure as well as a new tmpmasks structure that is used to pre-allocate cpumasks at the top level cpuset functions to avoid memory allocation in inner functions as memory allocation failure in those inner functions may cause a cpuset to have inconsistent states. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit 4ec22e9c5a90e3809dd52014d5d239af8831a520 Author: Waiman Long Date: Thu Nov 8 10:08:35 2018 -0500 cpuset: Enable cpuset controller in default hierarchy Given the fact that thread mode had been merged into 4.14, it is now time to enable cpuset to be used in the default hierarchy (cgroup v2) as it is clearly threaded. The cpuset controller had experienced feature creep since its introduction more than a decade ago. Besides the core cpus and mems control files to limit cpus and memory nodes, there are a bunch of additional features that can be controlled from the userspace. Some of the features are of doubtful usefulness and may not be actively used. This patch enables cpuset controller in the default hierarchy with a minimal set of features, namely just the cpus and mems and their effective_* counterparts. We can certainly add more features to the default hierarchy in the future if there is a real user need for them later on. Alternatively, with the unified hiearachy, it may make more sense to move some of those additional cpuset features, if desired, to memory controller or may be to the cpu controller instead of staying with cpuset. Signed-off-by: Waiman Long Acked-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo commit b1013f1e95d59c238423f4127ae0a85851a4bdd7 Author: Paul Burton Date: Wed Nov 7 23:13:58 2018 +0000 MIPS: BCM5xxx: Remove dead init_fpu code The BMIPS5xxx core_init function contains a call to an init_fpu function inside an #ifdef whose condition never evaluates true. Remove the dead code. FPU initialization happens later, primarily when a userland program attempts to use it. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21018/ Cc: linux-mips@linux-mips.org commit b7f1e273b7290b1d472c57bf419f4fa28d535a1f Author: Paul Burton Date: Wed Nov 7 23:13:58 2018 +0000 MIPS: Hide CONFIG_MIPS_O32_FP64_SUPPORT prompt for >= MIPSr6 From MIPSr6 onwards FP64 support is mandatory, and so CONFIG_MIPS_O32_FP64_SUPPORT is always selected for configurations which support O32 binaries. Hide the useless unchangeable prompt in these cases. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21019/ Cc: linux-mips@linux-mips.org commit 216f0efd19b9cc32207934fd1b87a45f2c4c593e Author: Bob Peterson Date: Thu Nov 8 14:04:50 2018 -0500 dlm: Don't swamp the CPU with callbacks queued during recovery Before this patch, recovery would cause all callbacks to be delayed, put on a queue, and afterward they were all queued to the callback work queue. This patch does the same thing, but occasionally takes a break after 25 of them so it won't swamp the CPU at the expense of other RT processes like corosync. Signed-off-by: Bob Peterson Signed-off-by: David Teigland commit 10aee7aeebe8107cd0cc6fefadc1df67ed670461 Author: Tony Lindgren Date: Wed Oct 31 09:02:18 2018 -0700 ARM: dts: Use dra7 mcasp compatible for mcasp instances Looks like dra7 needs optional clocks enabled for mcasp unlike am33xx and am437x do. Signed-off-by: Tony Lindgren commit b8b211ca763a631ba8b715232594ce19748edb18 Author: Yuantian Tang Date: Wed Oct 31 15:46:16 2018 +0800 clk: qoriq: add more chips support Add more chip-specific compatible strings to support more Socs. Signed-off-by: Yuantian Tang Signed-off-by: Stephen Boyd commit a013ba392843b2f65088f198a7125a78d48c6533 Author: Paul Burton Date: Wed Nov 7 23:19:41 2018 +0000 MIPS: Hardcode cpu_has_mmips=1 for microMIPS kernels If we built the kernel targeting the microMIPS ISA then the very fact that the kernel is running implies that the CPU supports microMIPS. Thus we can hardcode cpu_has_mmips to 1 allowing the compiler greater scope for optimisation due to the compile-time constant. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21022/ Cc: linux-mips@linux-mips.org commit 8b627f616ed63dcaf922369fc14a5daf8ad03038 Author: Yi Wang Date: Wed Oct 31 15:41:42 2018 +0800 clk: boston: unregister clks on failure in clk_boston_setup() The registered clks should unregister when something wrong happens before going out in function clk_boston_setup(). Signed-off-by: Yi Wang Signed-off-by: Stephen Boyd commit 46fda5b5067a391912cf73bf3d32c26b6a22ad09 Author: Yi Wang Date: Wed Oct 31 15:41:41 2018 +0800 clk: boston: fix possible memory leak in clk_boston_setup() Smatch report warnings: drivers/clk/imgtec/clk-boston.c:76 clk_boston_setup() warn: possible memory leak of 'onecell' drivers/clk/imgtec/clk-boston.c:83 clk_boston_setup() warn: possible memory leak of 'onecell' drivers/clk/imgtec/clk-boston.c:90 clk_boston_setup() warn: possible memory leak of 'onecell' 'onecell' is malloced in clk_boston_setup(), but not be freed before leaving from the error handling cases. Signed-off-by: Yi Wang Signed-off-by: Stephen Boyd commit ab11fe5af1049598d1ff73014f3ea65663246a6e Author: Jens Axboe Date: Thu Nov 8 11:09:50 2018 -0700 blk-mq-tag: document tag iteration helper return value Document the fact that the strategy function passed in can control whether to continue iterating or not. Suggested-by: Bart Van Assche Signed-off-by: Jens Axboe commit 07fa3fa2572f2dee85beb8137f90ccf33d7206af Merge: 4ed0dfe3cf39a 651022382c7f8 Author: Tony Lindgren Date: Thu Nov 8 09:57:42 2018 -0800 Merge tag 'v4.20-rc1' into omap-for-v4.21/dt-ti-sysc Linux 4.20-rc1 commit 087286585d8b6e63ffc1e56cbbbcda72ce254e22 Author: Bob Moore Date: Mon Nov 5 09:43:55 2018 -0800 ACPICA: Update version to 20181031 Version 20181031. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 927a6abf023b1a8c6940880802fc17026be6a351 Author: Bob Moore Date: Mon Nov 5 09:43:54 2018 -0800 ACPICA: iASL: Enhance error detection Enhance error detection by validating that all name_seg elements within a name_path actually exist. The previous behavior was spotty at best, and such errors could be improperly ignored at compile time (never at runtime, however). There are two new error messages. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit c159597ca9233b58be0327f3379eba598a6697ef Author: Erik Kaneda Date: Mon Nov 5 09:43:53 2018 -0800 ACPICA: iASL: adding definition and disassembly for TPM2 revision 3 Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit f8ddf49b420112e28bdd23d7ad52d7991a0ccbe3 Author: Colin Ian King Date: Mon Nov 5 09:43:52 2018 -0800 ACPICA: Use %d for signed int print formatting instead of %u Fix warnings found using static analysis with cppcheck, use %d printf format specifier for signed ints rather than %u Signed-off-by: Colin Ian King Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit c647eb98b0852367752ab22dbf97e9ff146f0c21 Author: Erik Kaneda Date: Mon Nov 5 09:43:51 2018 -0800 ACPICA: Debugger: refactor to fix unused variable warning When building ACPICA in the Linux kernel with Clang with ACPI_DISASSEMBLER not defined, we get a the following warning on variable display_op: warning: variable 'display_op' set but not used [-Wunused-but-set-variable] Fix this by refactoring display_op and parent_op code in a separate function. Suggested-by: Colin Ian King Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki commit 602438ead302aaa844899db5214b489d0d93fe18 Author: Imre Deak Date: Tue Nov 6 18:06:21 2018 +0200 drm/i915/icl: Fix port B combo PHY context loss after DC transitions On ICL DMC/PCODE retains the HW context only for port A across DC transitions, for the other port B combo PHY, it doesn't. So we need to do this manually after exiting from DC6. Do the reinit even after exiting from DC5, it won't hurt since we only reinit the PHY in case it's needed (in case it was disabled to begin with). As can be guessed from the bugzilla report leaving the PHY uninited will lead to a later timeout during the port B specific AUX and DDI_IO power well enabling. v2: - Apply the fix on all GEN>=11 platforms. (Rodrigo) Bspec: 21257 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108070 Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106160621.23057-6-imre.deak@intel.com commit bc458c1174e3124c10897fcc1b8b54fbc2db474e Author: Imre Deak Date: Tue Nov 6 18:06:20 2018 +0200 drm/i915/icl: Skip init for an already enabled combo PHY Bspec says we should skip the initialization of combo PHYs that are already initialized. We'll need to reinit the PHYs more frequently when exiting from DC6 (after the next patch), so let's make sure the uninit sequence complies with the spec. For safety skip the init only if all the PHY register fields have their expected values. v2: - Print 'Port X' as we do elsewhere instead of 'Port-X'. (Jose) Bspec: 21257 Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106160621.23057-5-imre.deak@intel.com commit eef519e2d07d9d7878299cd4c525ff6cf550f4df Author: Imre Deak Date: Tue Nov 6 18:06:19 2018 +0200 drm/i915/cnl+: Verify combo PHY HW state during PHY uninit Verify on CNL, ICL that the combo PHY HW state stayed intact after PHY initialization. v2: - Print 'Port X' as we do elsewhere instead of 'Port-X'. (Jose) Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106160621.23057-4-imre.deak@intel.com commit c45198b163fb5342290144b770a905f0d83821ad Author: Imre Deak Date: Tue Nov 6 18:06:18 2018 +0200 drm/i915/cnl+: Move the combo PHY init/uninit code to a new file Similarly to the GEN9_LP DPIO PHY code keep the CNL+ combo PHY code in a separate file. No functional change. v2: - Use SPDX license tag instead of boilerplate. (Rodrigo) v3: - Use MIT instead of GPL-2.0 license. (Ville) Suggested-by: Ville Syrjälä Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106160621.23057-3-imre.deak@intel.com commit ae8799125d565c798e49dcab4bf182dbfc483524 Author: Jens Axboe Date: Thu Nov 8 09:03:51 2018 -0700 blk-mq: provide a helper to check if a queue is busy Returns true if the queue currently has requests pending, false if not. DM can use this to replace the atomic_inc/dec they do per device to see if a device is busy. Reviewed-by: Mike Snitzer Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 7baa85727d0406ffd2b2303cd803a145aa35c505 Author: Jens Axboe Date: Thu Nov 8 10:24:07 2018 -0700 blk-mq-tag: change busy_iter_fn to return whether to continue or not We have this functionality in sbitmap, but we don't export it in blk-mq for users of the tags busy iteration. This can be useful for stopping the iteration, if the caller doesn't need to find more requests. Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe commit 1e0e9c8a85afcfb96650fe1236358bdf0722b242 Author: Imre Deak Date: Tue Nov 6 18:06:17 2018 +0200 drm/i915/icl: Fix combo PHY uninit BSpec says to clear the comp init HW flag too during combo PHY uninit, so do that. The lack of this could badly interact with the PHY reinit after a DC6/9 transition at least, where (after a follow-up patch fixing the init code) we'd skip the initialization incorrectly due to this flag being set. BSpec: 21257 Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181106160621.23057-2-imre.deak@intel.com commit f98d45145e6a48b91e0cae12fae7a5367486e91e Author: Tony Lindgren Date: Thu Nov 8 08:46:40 2018 -0800 ARM: multi_v7_defconfig: Enable 8250-omap serial driver and use it by default We've already moved omap2plus_defconfig over to use 8250-omap instead of omap-serial driver. Let's update multi_v7_defconfig too. By default we also enable SERIAL_8250_OMAP_TTYO_FIXUP that updates the kernel serial console to point to 8250 driver and warns about it during the boot. Users with ttyO[0123] in their /etc/inittab should update inittab to to use ttyS[0123] instead. Signed-off-by: Tony Lindgren commit 79351d5db8cc7a4cb0ac6e5b595f908bc318dc3c Merge: 651022382c7f8 e9f8707839eed Author: Tony Lindgren Date: Thu Nov 8 08:54:35 2018 -0800 Merge branch 'omap-for-v4.20/defconfig' into omap-for-v4.21/defconfig commit 6303f3e78b6fd3f84dbe7f2fa4f108d47061d1fb Author: Dmitry Osipenko Date: Fri Oct 5 18:36:36 2018 +0300 regulator: core: Decouple regulators on regulator_unregister() Regulators shall be uncoupled if one of the couples disappear. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 85254bcf394f93a8955814da1eef4d477b63eb84 Author: Dmitry Osipenko Date: Fri Oct 5 18:36:35 2018 +0300 regulator: core: Add new max_uV_step constraint On NVIDIA Tegra30 there is a requirement for regulator "A" to have voltage higher than voltage of regulator "B" by N microvolts, the N value changes depending on the voltage of regulator "B". This is similar to min-spread between voltages of regulators, the difference is that the spread value isn't fixed. This means that extra carefulness is required for regulator "A" to drop its voltage without violating the requirement, hence its voltage should be changed in steps so that its couple "B" could follow (there is also max-spread requirement). Add new "max_uV_step" constraint that breaks voltage change into several steps, each step is limited by the max_uV_step value. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit a2dfe7c7dfb65c814cfa2777b46e687db1820cc4 Author: Dmitry Osipenko Date: Fri Oct 5 18:36:34 2018 +0300 regulator: Document new regulator-max-step-microvolt property Certain hardware may require supply voltage to be changed in steps. Define new property that allow to describe such hardware. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 40c223efaa17e9bc3d964ee285967ebbe09c3e12 Author: Dmitry Osipenko Date: Fri Oct 5 18:36:33 2018 +0300 regulator: core: Limit regulators coupling to a single couple Device tree binding was changed in a way that now max-spread values must be defied per regulator pair. Limit number of pairs in order to adapt to the new binding without changing regulators code. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit d3b687c58ad9343532b4a20e541934eb1b557453 Author: Dmitry Osipenko Date: Fri Oct 5 18:36:32 2018 +0300 regulator: Change regulator-coupled-max-spread property Redefine binding for regulator-coupled-max-spread property in a way that max-spread values are defined per regulator couple instead of defining single max-spread for the whole group of coupled regulators. With that change the following regulators coupling configuration will be possible: regA: regulatorA { regulator-coupled-with = <®B ®C>; regulator-coupled-max-spread = <100000 300000>; }; regB: regulatorB { regulator-coupled-with = <®A ®C>; regulator-coupled-max-spread = <100000 200000>; }; regC: regulatorC { regulator-coupled-with = <®A ®B>; regulator-coupled-max-spread = <300000 200000>; }; Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 166d6e2adc55eb1f8efa4e1815170f35a250e57f Author: Andy Shevchenko Date: Wed Oct 17 19:16:31 2018 +0300 pinctrl: baytrail: Code formatting fixes Remove comma from terminator line to allow compiler fail in case an entry has been put in a wrong place by any weird reason. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 5c20a0227e8b22b7a81a1670fbf05b40424fb690 Author: Andy Shevchenko Date: Wed Oct 17 19:16:31 2018 +0300 pinctrl: icelake: Code formatting fixes Remove comma from terminator line to allow compiler fail in case an entry has been put in a wrong place by any weird reason. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3d5d096ec9c41e1d9f10702eb37a372afb3cbf6c Author: Andy Shevchenko Date: Wed Oct 17 19:16:31 2018 +0300 pinctrl: cannonlake: Code formatting fixes Remove comma from terminator line to allow compiler fail in case an entry has been put in a wrong place by any weird reason. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 64639558376d1d8fae0e0679a9a9d7c0bb2887d1 Author: Andy Shevchenko Date: Wed Oct 17 19:16:31 2018 +0300 pinctrl: geminilake: Code formatting fixes Remove comma from terminator line to allow compiler fail in case an entry has been put in a wrong place by any weird reason. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cd06a5e7f700a62240dc797ae72954ee4cd8b6b5 Author: Andy Shevchenko Date: Wed Oct 17 19:16:31 2018 +0300 pinctrl: broxton: Code formatting fixes Remove comma from terminator line to allow compiler fail in case an entry has been put in a wrong place by any weird reason. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1068934c8f4b9acd1a6337de3d0f7f523a243e4d Author: Andy Shevchenko Date: Thu Oct 4 19:00:15 2018 +0300 pinctrl: lewisburg: Replace acpi.h with mod_devicetable.h There is no need to include acpi.h since driver doesn't use anything from it except the propagation of mod_devicetable.h. Include latter directly instead. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c73e7ad6f6c3ab040da1bff65c1c03aeec2dcf11 Author: Andy Shevchenko Date: Thu Oct 4 19:00:15 2018 +0300 pinctrl: denverton: Replace acpi.h with mod_devicetable.h There is no need to include acpi.h since driver doesn't use anything from it except the propagation of mod_devicetable.h. Include latter directly instead. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 35bf500769afe9f2b44c79a7d19210cc852cb6c1 Author: Andy Shevchenko Date: Thu Oct 4 19:00:15 2018 +0300 pinctrl: cedarfork: Replace acpi.h with mod_devicetable.h There is no need to include acpi.h since driver doesn't use anything from it except the propagation of mod_devicetable.h. Include latter directly instead. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f27a0d9ad366d20d4aa606306f1967b75b648c36 Author: Andy Shevchenko Date: Wed Oct 17 18:49:04 2018 +0300 pinctrl: merrifield: include bits.h instead of bitops.h The reason of including here is just for BIT() and Co macros. Since commit 8bd9cb51daac8 ("... Move some macros from to a new file"), is enough for such compile-time macros. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 0dd519e3784b13befa1cdfeff847a0885b06650f Author: Andy Shevchenko Date: Wed Oct 17 19:10:27 2018 +0300 pinctrl: intel: Unexport intel_pinctrl_probe() Since there are no more users, unexport it and make static. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c34c17750860c58ca2c3c3c4790ef1566f0dbda7 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: sunrisepoint: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit ec7cf5c5c8ffd729b2c792d1d422bae5b3cbb094 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: icelake: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 9080e77bc3c98f5aac49b646537ca71976b83083 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: cannonlake: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit bdc2bc72b687a900309db18f39191f4ca7efd137 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: broxton: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 883a60dfdac7c4b3c435dd1d90b87a5512c8a352 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: lewisburg: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 185d33c2a23406516052b435f480e58c308991aa Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: denverton: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 6ad3d495760b767049f1dae6f814d3af6e270ee4 Author: Andy Shevchenko Date: Thu Oct 4 18:15:54 2018 +0300 pinctrl: cedarfork: Get rid of unneeded ->probe() stub The local ->probe() stub does nothing except calling a generic Intel pin control probe function. Thus, it's not needed and generic function may be called directly. Convert the driver accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cb035d7469cfe3b8c9cfbb3df1124133b7f5daac Author: Wolfram Sang Date: Sun Oct 21 22:00:29 2018 +0200 pinctrl: intel: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Mika Westerberg Acked-by: Linus Walleij Signed-off-by: Andy Shevchenko commit a4833c6059afb37763f9d502915e211b13e393e4 Author: Wolfram Sang Date: Sun Oct 21 22:00:28 2018 +0200 pinctrl: cherryview: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Mika Westerberg Acked-by: Linus Walleij Signed-off-by: Andy Shevchenko commit da90dd849dc22e920388d18a0f877366bd4d2b7f Author: Kuninori Morimoto Date: Thu Nov 8 02:13:36 2018 +0000 arm64: dts: renesas: r8a7795: add SSIU support for sound rsnd driver supports SSIU now, let's use it. Then, BUSIF DMA settings on rcar_sound,ssi (= rxu, txu) are no longer needed. To avoid git merge timing issue / git bisect issue, this patch doesn't remove it so far, but will be removed in the future. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman commit 5e53dbf4edb4d0d1cc97318139f2c20338f207c8 Author: Jacopo Mondi Date: Mon Nov 5 14:12:43 2018 +0100 arm64: dts: renesas: r8a77990: Fix VIN endpoint numbering The VIN driver bindings dictates fixed numbering for VIN endpoints connected to CSI-2 endpoints, even when a single endpoint exists. Without proper endpoint numbering the VIN driver fails to probe. Based on a patch in BSP from Koji Matsuoka Fixes: ec70407ae7d7 ("arm64: dts: renesas: r8a77990: Add VIN and CSI-2 device nodes") Signed-off-by: Koji Matsuoka Signed-off-by: Takeshi Kihara Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman commit 9aa3558a02f0bb074d02ef2956fee60a5ee57a47 Author: Takeshi Kihara Date: Tue Nov 6 21:46:47 2018 +0100 arm64: dts: renesas: ebisu: Add and enable SDHI device nodes This patch adds SDHI{0,1,3} device nodes for the r8a77990 SoC and enables SD card slot connected to SDHI0, micro SD card slot connected to SDHI1 and eMMC connected to SDHI3 on the Ebisu board using the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Wolfram Sang Signed-off-by: Simon Horman commit f3962b824af9fe9c372dcedde68bbbe86a361bc6 Author: Takeshi Kihara Date: Mon Nov 5 22:38:59 2018 +0100 arm64: dts: renesas: ebisu: Add serial console pins This patch adds pin control for SCIF2 on R8A77990 E3 Ebisu. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Reviewed-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit d481de4730c80796994ad83d15a0516bb5010f87 Author: Wolfram Sang Date: Sun Oct 21 22:00:27 2018 +0200 pinctrl: baytrail: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Mika Westerberg Acked-by: Linus Walleij Signed-off-by: Andy Shevchenko commit ad774315c3765ffb27abb6db987a2121d871a942 Author: Andy Shevchenko Date: Mon Nov 5 18:33:34 2018 +0200 MAINTAINERS: Add tree link for Intel pin control driver Intel pin control driver gets its own tree. Update MAINTAINERS accordingly. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c0ed7b51ca9983086e03668f0ca20dc67ac663f4 Author: Chengguang Xu Date: Wed Nov 7 21:47:04 2018 +0800 ext2: avoid unnecessary operation in ext2_error() If filesystem has already mounted as read-only, then we don't have to do it again. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 31fc9763f9d752b75711156ef6a066f6ea264be5 Author: Fabrizio Castro Date: Fri Aug 17 15:31:05 2018 +0100 dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit 60fb0083c9d43b6fc7b0e8a25905a2355907c686 Author: Fabrizio Castro Date: Thu Aug 23 16:33:04 2018 +0100 iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code Add support for RZ/G2M (R8A774A1) SoC IPMMUs. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Joerg Roedel commit b69f4abc125f6f4eada8423b5d8637c7550f90a0 Author: Julia Lawall Date: Sat Oct 27 20:31:19 2018 +0200 PCI: histb: Constify dw_pcie_host_ops structure The dw_pcie_host_ops structure is only stored in the ops field of a pcie_port structure, and this field is const, so make the dw_pcie_host_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Lorenzo Pieralisi Acked-by: Shawn Guo commit c28445fa06a3a54e06938559b9514c5a7f01c90f Author: Jan Kara Date: Thu Nov 8 14:01:16 2018 +0100 loop: Get rid of 'nested' acquisition of loop_ctl_mutex The nested acquisition of loop_ctl_mutex (->lo_ctl_mutex back then) has been introduced by commit f028f3b2f987e "loop: fix circular locking in loop_clr_fd()" to fix lockdep complains about bd_mutex being acquired after lo_ctl_mutex during partition rereading. Now that these are properly fixed, let's stop fooling lockdep. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 1dded9acf6dc9a34cd27fcf8815507e4e65b3c4f Author: Jan Kara Date: Thu Nov 8 14:01:15 2018 +0100 loop: Avoid circular locking dependency between loop_ctl_mutex and bd_mutex Code in loop_change_fd() drops reference to the old file (and also the new file in a failure case) under loop_ctl_mutex. Similarly to a situation in loop_set_fd() this can create a circular locking dependency if this was the last reference holding the file open. Delay dropping of the file reference until we have released loop_ctl_mutex. Reported-by: Tetsuo Handa Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 0da03cab87e6323ff2e05b14bc7d5c6fcc531efd Author: Jan Kara Date: Thu Nov 8 14:01:14 2018 +0100 loop: Fix deadlock when calling blkdev_reread_part() Calling blkdev_reread_part() under loop_ctl_mutex causes lockdep to complain about circular lock dependency between bdev->bd_mutex and lo->lo_ctl_mutex. The problem is that on loop device open or close lo_open() and lo_release() get called with bdev->bd_mutex held and they need to acquire loop_ctl_mutex. OTOH when loop_reread_partitions() is called with loop_ctl_mutex held, it will call blkdev_reread_part() which acquires bdev->bd_mutex. See syzbot report for details [1]. Move call to blkdev_reread_part() in __loop_clr_fd() from under loop_ctl_mutex to finish fixing of the lockdep warning and the possible deadlock. [1] https://syzkaller.appspot.com/bug?id=bf154052f0eea4bc7712499e4569505907d1588 Reported-by: syzbot Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 85b0a54a82e4fbceeb1aebb7cb6909edd1a24668 Author: Jan Kara Date: Thu Nov 8 14:01:13 2018 +0100 loop: Move loop_reread_partitions() out of loop_ctl_mutex Calling loop_reread_partitions() under loop_ctl_mutex causes lockdep to complain about circular lock dependency between bdev->bd_mutex and lo->lo_ctl_mutex. The problem is that on loop device open or close lo_open() and lo_release() get called with bdev->bd_mutex held and they need to acquire loop_ctl_mutex. OTOH when loop_reread_partitions() is called with loop_ctl_mutex held, it will call blkdev_reread_part() which acquires bdev->bd_mutex. See syzbot report for details [1]. Move all calls of loop_rescan_partitions() out of loop_ctl_mutex to avoid lockdep warning and fix deadlock possibility. [1] https://syzkaller.appspot.com/bug?id=bf154052f0eea4bc7712499e4569505907d1588 Reported-by: syzbot Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit d57f3374ba4817f7c8d26fae8a13d20ac8d31b92 Author: Jan Kara Date: Thu Nov 8 14:01:12 2018 +0100 loop: Move special partition reread handling in loop_clr_fd() The call of __blkdev_reread_part() from loop_reread_partition() happens only when we need to invalidate partitions from loop_release(). Thus move a detection for this into loop_clr_fd() and simplify loop_reread_partition(). This makes loop_reread_partition() safe to use without loop_ctl_mutex because we use only lo->lo_number and lo->lo_file_name in case of error for reporting purposes (thus possibly reporting outdate information is not a big deal) and we are safe from 'lo' going away under us by elevated lo->lo_refcnt. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit c371077000f4138ee3c15fbed50101ff24bdc91d Author: Jan Kara Date: Thu Nov 8 14:01:11 2018 +0100 loop: Push loop_ctl_mutex down to loop_change_fd() Push loop_ctl_mutex down to loop_change_fd(). We will need this to be able to call loop_reread_partitions() without loop_ctl_mutex. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 757ecf40b7e029529768eb5f9562d5eeb3002106 Author: Jan Kara Date: Thu Nov 8 14:01:10 2018 +0100 loop: Push loop_ctl_mutex down to loop_set_fd() Push lo_ctl_mutex down to loop_set_fd(). We will need this to be able to call loop_reread_partitions() without lo_ctl_mutex. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 550df5fdacff94229cde0ed9b8085155654c1696 Author: Jan Kara Date: Thu Nov 8 14:01:09 2018 +0100 loop: Push loop_ctl_mutex down to loop_set_status() Push loop_ctl_mutex down to loop_set_status(). We will need this to be able to call loop_reread_partitions() without loop_ctl_mutex. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 4a5ce9ba5877e4640200d84a735361306ad1a1b8 Author: Jan Kara Date: Thu Nov 8 14:01:08 2018 +0100 loop: Push loop_ctl_mutex down to loop_get_status() Push loop_ctl_mutex down to loop_get_status() to avoid the unusual convention that the function gets called with loop_ctl_mutex held and releases it. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 7ccd0791d98531df7cd59e92d55e4f063d48a070 Author: Jan Kara Date: Thu Nov 8 14:01:07 2018 +0100 loop: Push loop_ctl_mutex down into loop_clr_fd() loop_clr_fd() has a weird locking convention that is expects loop_ctl_mutex held, releases it on success and keeps it on failure. Untangle the mess by moving locking of loop_ctl_mutex into loop_clr_fd(). Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit a2505b799a496b7b84d9a4a14ec870ff9e42e11b Author: Jan Kara Date: Thu Nov 8 14:01:06 2018 +0100 loop: Split setting of lo_state from loop_clr_fd Move setting of lo_state to Lo_rundown out into the callers. That will allow us to unlock loop_ctl_mutex while the loop device is protected from other changes by its special state. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit a13165441d58b216adbd50252a9cc829d78a6bce Author: Jan Kara Date: Thu Nov 8 14:01:05 2018 +0100 loop: Push lo_ctl_mutex down into individual ioctls Push acquisition of lo_ctl_mutex down into individual ioctl handling branches. This is a preparatory step for pushing the lock down into individual ioctl handling functions so that they can release the lock as they need it. We also factor out some simple ioctl handlers that will not need any special handling to reduce unnecessary code duplication. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 0a42e99b58a208839626465af194cfe640ef9493 Author: Jan Kara Date: Thu Nov 8 14:01:04 2018 +0100 loop: Get rid of loop_index_mutex Now that loop_ctl_mutex is global, just get rid of loop_index_mutex as there is no good reason to keep these two separate and it just complicates the locking. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 967d1dc144b50ad005e5eecdfadfbcfb399ffff6 Author: Jan Kara Date: Thu Nov 8 14:01:03 2018 +0100 loop: Fold __loop_release into loop_release __loop_release() has a single call site. Fold it there. This is currently not a huge win but it will make following replacement of loop_index_mutex more obvious. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 310ca162d779efee8a2dc3731439680f3e9c1e86 Author: Tetsuo Handa Date: Thu Nov 8 14:01:02 2018 +0100 block/loop: Use global lock for ioctl() operation. syzbot is reporting NULL pointer dereference [1] which is caused by race condition between ioctl(loop_fd, LOOP_CLR_FD, 0) versus ioctl(other_loop_fd, LOOP_SET_FD, loop_fd) due to traversing other loop devices at loop_validate_file() without holding corresponding lo->lo_ctl_mutex locks. Since ioctl() request on loop devices is not frequent operation, we don't need fine grained locking. Let's use global lock in order to allow safe traversal at loop_validate_file(). Note that syzbot is also reporting circular locking dependency between bdev->bd_mutex and lo->lo_ctl_mutex [2] which is caused by calling blkdev_reread_part() with lock held. This patch does not address it. [1] https://syzkaller.appspot.com/bug?id=f3cfe26e785d85f9ee259f385515291d21bd80a3 [2] https://syzkaller.appspot.com/bug?id=bf154052f0eea4bc7712499e4569505907d15889 Signed-off-by: Tetsuo Handa Reported-by: syzbot Reviewed-by: Jan Kara Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit b1ab5fa309e6c49e4e06270ec67dd7b3e9971d04 Author: Tetsuo Handa Date: Thu Nov 8 14:01:01 2018 +0100 block/loop: Don't grab "struct file" for vfs_getattr() operation. vfs_getattr() needs "struct path" rather than "struct file". Let's use path_get()/path_put() rather than get_file()/fput(). Signed-off-by: Tetsuo Handa Reviewed-by: Jan Kara Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit e051bd0ddfdd6696197ad8c12d7485fc68c39f7b Author: Colin Ian King Date: Thu Nov 8 11:08:09 2018 +0000 ms_block: remove unused pointer 'set' Pointer 'set' is declared but not used, remove it. Cleans up warning: warning: unused variable ‘set’ [-Wunused-variable] Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 79d6f049f4f05f5cb6e1647a9a253dad14bfabbe Author: Dmitry Osipenko Date: Fri Oct 5 18:36:31 2018 +0300 regulator: core: Don't allow to get regulator until all couples resolved Don't allow to get regulator until all of its couples resolved because consumer will get EPERM and coupling shall be transparent for the drivers. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit f9503385b1877ac34514cd5ea7683eee61c4bec3 Author: Dmitry Osipenko Date: Fri Oct 5 18:36:30 2018 +0300 regulator: core: Mutually resolve regulators coupling If registered regulator found a couple, then the couple can find the registered regulator too and hence coupling can be mutually resolved at the registration time. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 9243a195be7af96a9b69990e9313c4ba1c5fbeca Author: Maciej Purski Date: Fri Oct 5 18:36:29 2018 +0300 regulator: core: Change voltage setting path On Odroid XU3/4 and other Exynos5422 based boards there is a case, that different devices on the board are supplied by different regulators with non-fixed voltages. If one of these devices temporarily requires higher voltage, there might occur a situation that the spread between two devices' voltages is so high, that there is a risk of changing 'high' and 'low' states on the interconnection between devices powered by those regulators. Uncoupled regulators should be a special case of coupled regulators, so they should share a common voltage setting path. When enabling, disabling or setting voltage of a coupled regulator, all coupled regulators should be locked. Regulator's supplies should be locked, when setting voltage of a single regulator. Enabling a coupled regulator or setting its voltage should not be possible if some of its coupled regulators, has not been registered. Add function for locking coupled regulators and supplies. Extract a new function regulator_set_voltage_rdev() from regulator_set_voltage_unlocked(), which is called when setting voltage of a single regulator. Signed-off-by: Maciej Purski Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit c054c6c792e165de2be51bc3feeaf3cebdedc8d6 Author: Maciej Purski Date: Fri Oct 5 18:36:28 2018 +0300 regulator: core: Add voltage balancing mechanism On Odroid XU3/4 and other Exynos5422 based boards there is a case, that different devices on the board are supplied by different regulators with non-fixed voltages. If one of these devices temporarily requires higher voltage, there might occur a situation that the spread between two devices' voltages is so high, that there is a risk of changing 'high' and 'low' states on the interconnection between devices powered by those regulators. Introduce new function regulator_balance_voltage(), which keeps max_spread constraint fulfilled between a group of coupled regulators. It should be called if a regulator changes its voltage or after disabling or enabling. Disabled regulators should follow changes of the enabled ones, but their consumers' demands shouldn't be taken into account while calculating voltage of other coupled regulators. Find voltages, which are closest to suiting all the consumers' demands, while fulfilling max_spread constraint, keeping the following rules: - if one regulator is about to rise its voltage, rise others voltages in order to keep the max_spread - if a regulator, which has caused rising other regulators, is lowered, lower other regulators if possible - if one regulator is about to lower its voltage, but it hasn't caused rising other regulators, change its voltage so that it doesn't break the max_spread Change regulators' voltages step by step, keeping max_spread constraint fulfilled all the time. Function regulator_get_optimal_voltage() should find the best possible change for the regulator, which doesn't break max_spread constraint. In function regulator_balance_voltage() optimize number of steps by finding highest voltage difference on each iteration. If a regulator, which is about to change its voltage, is not coupled, method regulator_get_optimal_voltage() should simply return the lowest voltage fulfilling consumers' demands. Coupling should be checked only if the system is in PM_SUSPEND_ON state. Signed-off-by: Maciej Purski Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown commit 9cce72448364675ed5d4c793cf546023c003fdd6 Author: Matti Vaittinen Date: Mon Oct 29 14:16:30 2018 +0200 regulator: bd718x7: add missing linux/of.h inclusion (deja-vu) 0-Day tests found compilation error on x86. Driver won't compile on x86_64 as "of_match_ptr" is not found. Add missing include At some point this fix was lost. So re-apply it. Signed-off-by: Matti Vaittinen Signed-off-by: Mark Brown commit 987abd5c62f92ee4970b45aa077f47949974e615 Author: Chris Wilson Date: Thu Nov 8 08:17:38 2018 +0000 drm/i915/execlists: Force write serialisation into context image vs execution Ensure that the writes into the context image are completed prior to the register mmio to trigger execution. Although previously we were assured by the SDM that all writes are flushed before an uncached memory transaction (our mmio write to submit the context to HW for execution), we have empirical evidence to believe that this is not actually the case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108656 References: https://bugs.freedesktop.org/show_bug.cgi?id=108315 References: https://bugs.freedesktop.org/show_bug.cgi?id=106887 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181108081740.25615-1-chris@chris-wilson.co.uk Cc: stable@vger.kernel.org commit fa2bb8b97d77b4b91658e448e7701d6a432e5b6f Author: Charles Keepax Date: Thu Nov 8 10:14:00 2018 +0000 regulator: lochnagar: Explicitly include register headers Review of the MFD component has stated we should not include the register headers through lochnagar.h and thus removed them from that header. Explicitly include them in the end drivers manually. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown commit c4da110919c9718e6c2d5915d97ddb800d8080a1 Author: Maya Nakamura Date: Wed Nov 7 23:23:50 2018 -0800 staging: rtlwifi: Add spaces for comments Add spaces before and after text in comments. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit b4a6993ec480d08280cf3e66d575383718e7758d Author: Maya Nakamura Date: Wed Nov 7 23:22:18 2018 -0800 staging: rtlwifi: Remove empty comment Remove a comment that does not contain any text. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 868b5d7d996747f3f96d7f26af0dd3b52e1a2054 Author: Maya Nakamura Date: Wed Nov 7 23:21:40 2018 -0800 staging: rtlwifi: Improve line endings Edit statements so that the line does not end with an assignment operator or a parenthesis. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 98b3b71afc601b7e76e02b4cd11f27faeb50ca4d Author: Tim Collier Date: Wed Nov 7 20:09:20 2018 +0000 staging: wlan-ng: reformatting in prism2mib.c to fit 80 character limit Reformat lines over 80 characters in prism2mib.c to resolve "line over 80 characters" warnings reported by checkpatch. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 285376ff48f81c2ef834b9e77b77fd50b7f4e129 Author: Tim Collier Date: Wed Nov 7 20:09:18 2018 +0000 staging: wlan-ng: formatting change in cfg80211.c Resolve "line over 80 characters" warning reported by checkpatch by splitting function header over 2 lines. Signed-off-by: Tim Collier Signed-off-by: Greg Kroah-Hartman commit 484a415951e601ea4a5b6a9479871b6d67a58fd8 Author: Carmeli Tamir Date: Wed Nov 7 15:44:24 2018 -0500 staging: emxx_udc: Added missing le16_to_cpu conversions Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir Signed-off-by: Greg Kroah-Hartman commit 64407f6e7d158ee4960aaf04768cdce722963696 Author: Carmeli Tamir Date: Wed Nov 7 15:44:23 2018 -0500 staging: emxx_udc: Added missing __iomem modifier to handle p_regs Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir Signed-off-by: Greg Kroah-Hartman commit 3f9da94dc8d79a63c7b5a0cea6a650ac8b98d880 Author: Carmeli Tamir Date: Wed Nov 7 15:44:22 2018 -0500 staging: emxx_udc: Added static modifier to udc_controller Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir Signed-off-by: Greg Kroah-Hartman commit 2159fb3729293c7919ed13ccad72c8072c2f39b5 Author: Nishad Kamdar Date: Wed Nov 7 18:18:54 2018 +0530 staging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interface Use the gpiod interface instead of the deprecated old non-descriptor interface in olpc_dcon_xo_1.c. Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman commit 01c5c5614a9e67eda3bbec74d4863bdc57b5c990 Author: Mike Brady Date: Mon Oct 22 20:17:08 2018 +0100 staging: bcm2835-audio: interpolate audio delay When the BCM2835 audio output is used, userspace sees a jitter up to 10ms in the audio position, aka "delay" -- the number of frames that must be output before a new frame would be played. Make this a bit nicer for userspace by interpolating the position using the CPU clock. The overhead is small -- an extra ktime_get() every time a GPU message is sent -- and another call and a few calculations whenever the delay is sought from userland. At 48,000 frames per second, i.e. approximately 20 microseconds per frame, it would take a clock inaccuracy of 20 microseconds in 10 milliseconds -- 2,000 parts per million -- to result in an inaccurate estimate, whereas crystal- or resonator-based clocks typically have an inaccuracy of 10s to 100s of parts per million. Signed-off-by: Mike Brady Signed-off-by: Greg Kroah-Hartman commit 92a4d9a8bcfed4e12f6e7fbcc558a45ecccc7f3c Author: Adham Abozaeid Date: Tue Nov 6 00:01:17 2018 +0000 staging: wilc1000: remove unused flags in handle_cfg_param() handle_cfg_param() receives a bit map that describes what to be changed. Some of these bits flags aren't referred to from elsewhere and can be removed. Signed-off-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman commit 05f9d4a0c8c439102fb30ff5da53748e807da585 Author: Gao Xiang Date: Thu Nov 8 12:00:36 2018 +0800 staging: erofs: use the new LZ4_decompress_safe_partial() LZ4_decompress_safe_partial() can now decode exactly the nb of bytes requested after the upstreamed commit 2209fda323e2 ("lib/lz4: update LZ4 decompressor module"), remove the erofs hacked lz4 decompression code. A more cleaned compressor wrapper will be introduced in the subsequent patches in order to prepare for supporting multiple compression algorithms. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman commit b6e1fd17a38bd1d97c11d69fd3207b3ef9bfa4b3 Author: Dmitry Osipenko Date: Sun Oct 21 21:36:14 2018 +0300 soc/tegra: pmc: Drop locking from tegra_powergate_is_powered() This fixes splats like the one below if CONFIG_DEBUG_ATOMIC_SLEEP=y and machine (Tegra30) booted with SMP=n or all secondary CPU's are put offline. Locking isn't needed because it protects atomic operation. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254 in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0 CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 4.18.0-next-20180821-00180-gc3ebb6544e44-dirty #823 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x94/0xa8) [] (dump_stack) from [] (___might_sleep+0x13c/0x174) [] (___might_sleep) from [] (__might_sleep+0x70/0xa8) [] (__might_sleep) from [] (mutex_lock+0x2c/0x70) [] (mutex_lock) from [] (tegra_powergate_is_powered+0x44/0xa8) [] (tegra_powergate_is_powered) from [] (tegra30_cpu_rail_off_ready+0x30/0x74) [] (tegra30_cpu_rail_off_ready) from [] (tegra30_idle_lp2+0xa0/0x108) [] (tegra30_idle_lp2) from [] (cpuidle_enter_state+0x140/0x540) [] (cpuidle_enter_state) from [] (cpuidle_enter+0x40/0x4c) [] (cpuidle_enter) from [] (call_cpuidle+0x30/0x48) [] (call_cpuidle) from [] (do_idle+0x238/0x28c) [] (do_idle) from [] (cpu_startup_entry+0x28/0x2c) [] (cpu_startup_entry) from [] (rest_init+0xd8/0xdc) [] (rest_init) from [] (start_kernel+0x41c/0x430) Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 5f84bb1a4099e26d04d7fe379aa1b825de39d757 Author: Sandipan Patra Date: Wed Oct 24 12:38:00 2018 +0530 soc/tegra: pmc: Add sysfs entries for reset info Implement read-only reset_reason and reset_level sysfs attributes that can be used to query the reset reason and level at runtime. Signed-off-by: Sandipan Patra Signed-off-by: Thierry Reding commit 3bb2f843c0e7f69385e65448fae38d78c208e699 Author: Jon Hunter Date: Fri Sep 28 15:11:49 2018 +0100 soc/tegra: pmc: Don't power-up XUSB power-domains Now that the Tegra xHCI driver manages the XUSB power-domains itself, remove the code to power-up the power-domains used by the xHCI device from the PMC driver on boot. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 96e5da7c842424bcf64afe1082b960b42b96190b Author: Dmitry Osipenko Date: Sun Oct 21 21:30:52 2018 +0300 memory: tegra: Introduce Tegra20 EMC driver Introduce driver for the External Memory Controller (EMC) found on Tegra20 chips, which controls the external DRAM on the board. The purpose of this driver is to program memory timing for external memory on the EMC clock rate change. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding commit af51c25fb59d4365c259ab93f388462e0998a2ed Author: Timo Alho Date: Mon Oct 22 16:19:40 2018 +0300 firmware: tegra: Use in-band messages for firmware version query Add support for a new MRQ, that uses in-band messaging instead of IOVA buffer, to retrieve the firmware version 'tag' during boot. If an older firmware is used, that does not support the new MRQ, fall back to the earlier implementation. Signed-off-by: Timo Alho Acked-by: Sivaram Nair Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 4bef358c9071748aa3e55f70f3ba5abc6363fcfe Author: Timo Alho Date: Mon Oct 22 16:19:39 2018 +0300 soc/tegra: bpmp: Update ABI header Update the firmware header file to a more recent version. The major changes in the new version are: * add a new MRQ for firmware version query ABI and deprecates the old * add ABI to query Tegra194 CPU frequency limits * add ABI to control subset of PCIE UPHY state The new header contains also some editorial changes to the documentation. Signed-off-by: Timo Alho Acked-by: Sivaram Nair Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 2b86c11b99d3fc4e82af65c5b00b4334a6dfe6c9 Author: Timo Alho Date: Mon Oct 22 16:19:38 2018 +0300 firmware: tegra: Print version tag at full Last two characters of the version tag that is 32 bytes long were stripped out. Signed-off-by: Timo Alho Acked-by: Sivaram Nair Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 43dc7485807a8ffde12e242e557a1992478de4de Author: Timo Alho Date: Mon Oct 22 16:19:37 2018 +0300 firmware: tegra: Switch to global mrq_is_supported() Patch "firmware: tegra: add helper to check for supported MRQs" added an API to check if MRQ is supported. Remove the implementation from bpmp debugfs code in favor of that. Signed-off-by: Timo Alho Acked-by: Sivaram Nair Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit d78b5bde0ffc33d20f014b3ad4d7aaac8b79d34e Author: Timo Alho Date: Mon Oct 22 16:19:36 2018 +0300 firmware: tegra: Add helper to check for supported MRQs Add a helper function to check that firmware is supporting a given MRQ command. Signed-off-by: Timo Alho Acked-by: Sivaram Nair Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 94ba4a5f16710eaa3a675761a7900bb9f79715db Author: Dmitry Osipenko Date: Sun Oct 21 21:30:47 2018 +0300 dt: bindings: Move tegra20-emc binding to memory-controllers directory Move tegra20-emc binding to the memory-controllers directory for consistency with the other Tegra memory bindings. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 28016aa1652e64e143b88baacbb13f121894f260 Author: Dmitry Osipenko Date: Sun Oct 21 21:30:46 2018 +0300 dt: bindings: tegra20-emc: Document clock property Embedded memory controller has a corresponding clock, document the clock property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Signed-off-by: Thierry Reding commit a6cb8ef03cb0f03e3567f91ab9aeb2f0f6337810 Author: Dmitry Osipenko Date: Sun Oct 21 21:30:45 2018 +0300 dt: bindings: tegra20-emc: Document interrupt property EMC has a dedicated interrupt that is used to notify about completion of HW operations. Document the interrupt property. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding commit ad348c3f55962c86adf9c8cb3712825fb7db5336 Author: Jon Hunter Date: Fri Sep 28 15:11:46 2018 +0100 dt-bindings: usb: xhci-tegra: Add power-domain details Add details for power-domains to the Tegra xHCI bindings so that generic power-domains can be used for inconjunction with the xHCI driver. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit d14ce174ca02ee2a9f390b9e279663b3a848a48b Author: Dmitry Osipenko Date: Sun Oct 21 21:30:51 2018 +0300 clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC Ensure that direct PLLM sourcing is turned off for EMC as we don't support that configuration in the clk driver. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 514fddba845ed3a1b17e01e99cb3a2a52256a88a Author: Dmitry Osipenko Date: Sun Oct 21 21:30:50 2018 +0300 clk: tegra20: Turn EMC clock gate into divider Kernel should never gate the EMC clock as it causes immediate lockup, so removing clk-gate functionality doesn't affect anything. Turning EMC clk gate into divider allows to implement glitch-less EMC scaling, avoiding reparenting to a backup clock. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit cd9f69800b2a7a47981c397e008f6040fadc4523 Author: Dmitry Osipenko Date: Sun Oct 21 21:30:49 2018 +0300 ARM: dts: tegra20: Add clock entry to External Memory Controller Add clock entry into the EMC DT node. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 279e57c39efe0c4308425ebb5f96a98e618777bb Author: Dmitry Osipenko Date: Sun Oct 21 21:30:48 2018 +0300 ARM: dts: tegra20: Add interrupt entry to External Memory Controller Add interrupt entry into the EMC DT node. Signed-off-by: Dmitry Osipenko Acked-by: Peter De Schrijver Signed-off-by: Thierry Reding commit 9483804a725a865abf877c1e0242120d9a21f7bb Author: Colin Ian King Date: Thu Nov 8 11:02:24 2018 +0000 media: staging: tegra-vde: print long unsigned using %lu format specifier The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because of the use of the BIT() macro when defining FLAG_B_FRAME and causing a build warning. Fix this by using the %lu format specifer. Cleans up warning: drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] Fixes: 42e764d05712 ("staging: tegravde: replace bit assignment with macro") Cc: Ioannis Valasakis Reported-by: Stephen Rothwell Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 82c08c3e7f171aa7f579b231d0abbc1d62e91974 Author: Yufen Wang Date: Fri Nov 2 11:51:31 2018 +0100 ARM: 8808/1: kexec:offline panic_smp_self_stop CPU In case panic() and panic() called at the same time on different CPUS. For example: CPU 0: panic() __crash_kexec machine_crash_shutdown crash_smp_send_stop machine_kexec BUG_ON(num_online_cpus() > 1); CPU 1: panic() local_irq_disable panic_smp_self_stop If CPU 1 calls panic_smp_self_stop() before crash_smp_send_stop(), kdump fails. CPU1 can't receive the ipi irq, CPU1 will be always online. To fix this problem, this patch split out the panic_smp_self_stop() and add set_cpu_online(smp_processor_id(), false). Signed-off-by: Yufen Wang Signed-off-by: Russell King commit e2b85f709a705808a71560de60732fd49e4516a5 Author: Florian Fainelli Date: Wed Oct 31 23:53:12 2018 +0100 ARM: 8807/1: mm: Facilitate debugging CONFIG_KUSER_HELPERS disabled Some software such as perf makes unconditional use of the special [vectors] page which is only provided when CONFIG_KUSER_HELPERS is enabled in the kernel. Facilitate the debugging of such situations by printing a debug message to the kernel log showing the task name and the faulting address. Reviewed-by: Andrew Lunn Suggested-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Russell King commit b99afae1390140f5b0039e6b37a7380de31ae874 Author: Nicolas Pitre Date: Wed Nov 7 17:49:00 2018 +0100 ARM: 8805/2: remove unneeded naked function usage The naked attribute is known to confuse some old gcc versions when function arguments aren't explicitly listed as inline assembly operands despite the gcc documentation. That resulted in commit 9a40ac86152c ("ARM: 6164/1: Add kto and kfrom to input operands list."). Yet that commit has problems of its own by having assembly operand constraints completely wrong. If the generated code has been OK since then, it is due to luck rather than correctness. So this patch also provides proper assembly operand constraints, and removes two instances of redundant register usages in the implementation while at it. Inspection of the generated code with this patch doesn't show any obvious quality degradation either, so not relying on __naked at all will make the code less fragile, and avoid some issues with clang. The only remaining __naked instances (excluding the kprobes test cases) are exynos_pm_power_up_setup(), tc2_pm_power_up_setup() and cci_enable_port_for_self(. But in the first two cases, only the function address is used by the compiler with no chance of inlining it by mistake, and the third case is called from assembly code only. And the fact that no stack is available when the corresponding code is executed does warrant the __naked usage in those cases. Signed-off-by: Nicolas Pitre Reviewed-by: Stefan Agner Tested-by: Stefan Agner Signed-off-by: Russell King commit 31d0b9f9982f8e3a489e83419461d35ab003160a Author: Ben Dooks Date: Fri Oct 12 09:12:01 2018 +0100 ARM: 8804/1: zImage: atags_to_fdt: add serial-number for ATAG_SERIAL If the system passes an ATAG_SERIAL, convert that into a /serial-number node so that the system serial number will be passed through the FDT and be present under the kernel. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 7f97686715a7a4413baabe47df28946e175f5a59 Author: Russell King Date: Wed Oct 31 09:56:24 2018 +0000 ARM: Kconfig: remove useless "default n" The default for Kconfig options is always n, so there's no need to explicitly state a "n" default. Acked-by: Tony Lindgren Acked-by: Robert Jarzmik Signed-off-by: Russell King commit f00790aaf2e240f57d19dab39e07f0ab87c6d95c Author: Russell King Date: Wed Oct 24 10:20:16 2018 +0100 ARM: Kconfig: remove useless parenthesis Remove useless parenthesis from the Kconfig - Kconfig is not C, and can cope without parenthesising e.g. single symbols to 'if'. Signed-off-by: Russell King commit 783195ec1cada862d54dee8f312a60bcbba5c0e4 Author: Christian König Date: Thu Nov 8 09:39:46 2018 +0100 drm/syncobj: disable the timeline UAPI for now v2 Until we have sorted out all problems. v2: return -EINVAL during create if flag is set. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/260937/ commit 5867b330140518ad73507f0be98d89636b91bf5f Merge: be08989c4d900 920664a8f7908 Author: David S. Miller Date: Wed Nov 7 23:07:04 2018 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-11-07 This series contains updates to almost all of the Intel wired LAN drivers. Lance Roy replaces a spin lock with lockdep_assert_held() for igbvf driver in move toward trying to remove spin_is_locked(). Colin Ian King fixes a potential null pointer dereference by adding a check in ixgbe. Also fixed the igc driver by properly assigning the return error code of a function call, so that we can properly check it. Shannon Nelson updates the ixgbe driver to not block IPsec offload when in VEPA mode, in VEB mode, IPsec offload is still blocked because the device drops packets into a black hole. Jake adds support for software timestamping for packets sent over ixgbevf. Also modifies i40e, iavf, igb, igc, and ixgbe to delay calling skb_tx_timestamp() to the latest point possible, which is just prior to notifying the hardware of the new Tx packet. Todd adds the new WoL filter flag so that we properly report that we do not support this new feature. YueHaibing from Huawei fixes the igc driver by cleaning up variables that are not "really" used. Dan Carpenter cleans up igc whitespace issues. Miroslav Lichvar fixes e1000e for potential underflow issue in the timecounter, so modify the driver to use timecounter_cyc2time() to allow non-monotonic SYSTIM readings. Sasha provides additional igc cleanups based on community feedback. ==================== Signed-off-by: David S. Miller commit be08989c4d900d5388be1a7d002cd7c2942d69cd Merge: cea0604d3f94e e963e1097ad3c Author: David S. Miller Date: Wed Nov 7 23:00:24 2018 -0800 Merge branch 'nfp-add-and-use-tunnel-netdev-helpers' John Hurley says: ==================== nfp: add and use tunnel netdev helpers A recent patch introduced the function netif_is_vxlan() to verify the tunnel type of a given netdev as vxlan. Add a similar function to detect geneve netdevs and make use of this function in the NFP driver. Also make use of the vxlan helper where applicable. ==================== Signed-off-by: David S. Miller commit e963e1097ad3c9f2062e10356af8c89de245c6b2 Author: John Hurley Date: Wed Nov 7 18:32:50 2018 +0000 nfp: flower: include geneve as supported offload tunnel type Offload of geneve decap rules is supported in NFP. Include geneve in the check for supported types. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 83f27d027da3a1d4fff95fd66df0c0100b66ae4c Author: John Hurley Date: Wed Nov 7 18:32:49 2018 +0000 nfp: flower: use geneve and vxlan helpers Make use of the recently added VXLAN and geneve helper functions to determine the type of the netdev from its rtnl_link_ops. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1d10bd167667655362a7e2b407a96aad5979bfca Author: John Hurley Date: Wed Nov 7 18:32:48 2018 +0000 net: add netif_is_geneve() Add a helper function to determine if the type of a netdev is geneve based on its rtnl_link_ops. This allows drivers that may wish to offload tunnels to check the underlying type of the device. A recent patch added a similar helper to vxlan.h Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit cea0604d3f94ef41878d6e484ffeb67a8129ab5a Author: Edward Cree Date: Wed Nov 7 18:12:42 2018 +0000 sfc: add missing NVRAM partition types for EF10 Expose the MUM/SUC Firmware, UEFI Expansion ROM and MC Status partitions of the NIC's NVRAM as MTDs if found on the NIC. The first two are needed in order to properly update them when performing firmware updates; the MC Status partition is used to determine whether a signed firmware image was accepted or rejected by a Secure NIC. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 7025abb2e447b4a24b6c1f06dfdd403bc9fb3c09 Merge: 1295e2cf3065a 295d072a42fe1 Author: David S. Miller Date: Wed Nov 7 22:41:20 2018 -0800 Merge branch 'vlan-prepare-for-removal-of-VLAN_TAG_PRESENT' Michał Mirosław says: ==================== net/vlan: prepare for removal of VLAN_TAG_PRESENT This is a preparatory patchset before removing the use of VLAN_TAG_PRESENT bit in skb->vlan_tci as indication of VLAN offload. This set includes only cleanups that allow abstracting of code testing VLAN tag presence in drivers and networking code. ==================== Signed-off-by: David S. Miller commit 295d072a42fe1a654e765fffcaadb2f08a692dd0 Author: Michał Mirosław Date: Wed Nov 7 18:07:03 2018 +0100 net/vlan: remove unused #define HAVE_VLAN_GET_TAG Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 9b319148cb34ecccacff09eca87765c87d5e19ff Author: Michał Mirosław Date: Wed Nov 7 18:07:03 2018 +0100 net/vlan: include the shift in skb_vlan_tag_get_prio() Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit e0a6b8097351255a2dbbb45274a8b9c52850cbb6 Author: Michał Mirosław Date: Wed Nov 7 18:07:02 2018 +0100 net/vlan: introduce __vlan_hwaccel_copy_tag() helper Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit c8accd5a0a6abfc0405a331afa5bfc06ee92623a Author: Michał Mirosław Date: Wed Nov 7 18:07:02 2018 +0100 net/vlan: introduce __vlan_hwaccel_clear_tag() helper Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller commit 1295e2cf3065a55f35d112e4dfeb2c7322823249 Author: Yafang Shao Date: Wed Nov 7 19:20:16 2018 +0800 inet: minor optimization for backlog setting in listen(2) Set the backlog earlier in inet_dccp_listen() and inet_listen(), then we can avoid the redundant setting. Signed-off-by: Yafang Shao Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 7dad9937e064a6411cc3427f3f5870fa72132ad8 Author: Davide Caratti Date: Wed Nov 7 11:28:18 2018 +0100 net: vlan: add support for tunnel offload GSO tunneled packets are always segmented in software before they are transmitted by a VLAN, even when the lower device can offload tunnel encapsulation and VLAN together (i.e., some bits in NETIF_F_GSO_ENCAP_ALL mask are set in the lower device 'vlan_features'). If we let VLANs have the same tunnel offload capabilities as their lower device, throughput can improve significantly when CPU is limited on the transmitter side. - set NETIF_F_GSO_ENCAP_ALL bits in the VLAN 'hw_features', to ensure that 'features' will have those bits zeroed only when the lower device has no hardware support for tunnel encapsulation. - for the same reason, copy GSO-related bits of 'hw_enc_features' from lower device to VLAN, and ensure to update that value when the lower device changes its features. - set NETIF_F_HW_CSUM bit in the VLAN 'hw_enc_features' if 'real_dev' is able to compute checksums at least for a kind of packets, like done with commit 8403debeead8 ("vlan: Keep NETIF_F_HW_CSUM similar to other software devices"). This avoids software segmentation due to mismatching checksum capabilities between VLAN's 'features' and 'hw_enc_features'. Reported-by: Flavio Leitner Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit f29eb2a96c56ebff6b4d9b530d5ccd61b9f538d7 Author: Paolo Abeni Date: Wed Nov 7 10:34:36 2018 +0100 tun: compute the RFS hash only if needed. The tun XDP sendmsg code path, unconditionally computes the symmetric hash of each packet for RFS's sake, even when we could skip it. e.g. when the device has a single queue. This change adds the check already in-place for the skb sendmsg path to avoid unneeded hashing. The above gives small, but measurable, performance gain for VM xmit path when zerocopy is not enabled. Signed-off-by: Paolo Abeni Acked-by: Jason Wang Signed-off-by: David S. Miller commit 2e7ad56aa54778de863998579fc6b5ff52838571 Author: Mathias Thore Date: Wed Nov 7 09:09:45 2018 +0100 net/wan/fsl_ucc_hdlc: add BQL support Add byte queue limits support in the fsl_ucc_hdlc driver. Signed-off-by: Mathias Thore Signed-off-by: David S. Miller commit 3b73e842c7265a645f373a2de956ad36292f819d Author: Heiner Kallweit Date: Wed Nov 7 08:52:46 2018 +0100 net: phy: realtek: load driver for all PHYs with a Realtek OUI Instead of listing every single PHYID, load the driver for every PHYID with a Realtek OUI, independent of model number and revision. This patch also improves two further aspects: - constify realtek_tbl[] - the mask should have been 0xffffffff instead of 0x001fffff so far, by masking out some bits a PHY from another vendor could have been matched Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a3320bcf28e07163354b0acfad874bf46209df63 Author: Heiner Kallweit Date: Wed Nov 7 08:15:58 2018 +0100 net: phy: make phy_trigger_machine static phy_trigger_machine() is used in phy.c only, so we can make it static. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit f908620019324872ce0776b37b27a31dfd8c05a0 Author: kbuild test robot Date: Wed Nov 7 08:50:34 2018 +0800 net: dsa: bcm_sf2: fix semicolon.cocci warnings drivers/net/dsa/bcm_sf2_cfp.c:1168:2-3: Unneeded semicolon drivers/net/dsa/bcm_sf2_cfp.c:532:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: ae7a5aff783c ("net: dsa: bcm_sf2: Keep copy of inserted rules") CC: Florian Fainelli Signed-off-by: kbuild test robot Signed-off-by: David S. Miller commit 8572a1b4dbc0e03d7082d8e8f7a282c0f55c3ca5 Author: Justin Chen Date: Tue Nov 6 16:37:44 2018 -0800 net: phy: bcm7xxx: Add entry for BCM7255 Add support for BCM7255 EPHY. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit dbef5257737b989d4785b62939f1e9cba3948689 Author: Jens Axboe Date: Wed Nov 7 21:17:57 2018 -0700 sunvdc: fix compiler warning Stephen reports: After merging the block tree, today's linux-next build (sparc64 defconfig) produced this warning: /home/sfr/next/next/drivers/block/sunvdc.c: In function 'init_queue': /home/sfr/next/next/drivers/block/sunvdc.c:788:6: warning: unused variable 'ret' [-Wunused-variable] int ret; ^~~ Kill the unused variable. Fixes: fa182a1fa97d ("sunvdc: convert to blk-mq") Reported-by: Stephen Rothwell Signed-off-by: Jens Axboe commit d08b8ccc476215ceee6e3370f0c1732d5f83f5ef Author: Paul Burton Date: Wed Nov 7 23:05:46 2018 +0000 MIPS: Simplify GCC_OFF_SMALL_ASM definition The GCC_OFF_SMALL_ASM macro defines the constraint to use for instructions needing "small offsets", typically the LL or SC instructions. Historically these had 16 bit offsets, but microMIPS & MIPS32/MIPS64r6 onwards reduced the width of the offset field. GCC 4.9 & higher supports a ZC constraint which matches the offset requirements of the LL & SC instructions. Where supported we can use the ZC constraint regardless of ISA, and it will handle the requirements of the ISA correctly. As such we require 3 cases: - GCC 4.9 & higher can use ZC. - GCC older than 4.9 must use the older R constraint, which does not take into account microMIPS or MIPSr6. - microMIPS builds therefore require GCC 4.9 or higher. MIPSr6 support was only introduced in newer compilers anyway so it can be ignored here. The current code complicates this a little by specifically having MIPSr6 bypass the GCC version check, and using the R constraint for pre-MIPSr6 builds even if the compiler supports ZC which would be equivalent. Simplify this such that the code straightforwardly implements the 3 cases outlined above. For non-GCC compilers we presume that ZC is safe to use. In practice the only non-GCC compiler of interest is clang and it has supported the ZC constraint since version 3.7.0. It seems safe enough to presume that nobody will expect to built a working kernel using a clang version older than that, and if they do then they'll have bigger problems. As such we don't check the clang version number & just presume ZC is usable when the compiler is not GCC. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20999/ Cc: linux-mips@linux-mips.org commit 57810ecb581aec8008ad579013c0755c7acaf490 Author: Paul Burton Date: Wed Nov 7 23:05:07 2018 +0000 MIPS: Remove GCC_IMM_ASM & GCC_REG_ACCUM macros asm/compiler.h defined GCC_IMM_ASM & GCC_REG_ACCUM macros, both of which are defined differently for GCC pre-3.4 or GCC 3.4 & higher. We only support building with GCC 4.6 & higher since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), which makes the pre-3.4 definition dead code. Rather than leave the macro definitions around, inline the GCC 3.4 & higher definitions into the single file that uses them & remove the macros entirely. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21000/ Cc: linux-mips@linux-mips.org commit cab6949bf70a68ee5aada5f1973c0bb906d354cf Merge: 7e225619e8afc 3327a9c46352f Author: David S. Miller Date: Wed Nov 7 16:23:05 2018 -0800 Merge branch 'udp-gro' Paolo Abeni says: ==================== udp: implement GRO support This series implements GRO support for UDP sockets, as the RX counterpart of commit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT"). The core functionality is implemented by the second patch, introducing a new sockopt to enable UDP_GRO, while patch 3 implements support for passing the segment size to the user space via a new cmsg. UDP GRO performs a socket lookup for each ingress packets and aggregate datagram directed to UDP GRO enabled sockets with constant l4 tuple. UDP GRO packets can land on non GRO-enabled sockets, e.g. due to iptables NAT rules, and that could potentially confuse existing applications. The solution adopted here is to de-segment the GRO packet before enqueuing as needed. Since we must cope with packet reinsertion after de-segmentation, the relevant code is factored-out in ipv4 and ipv6 specific helpers and exposed to UDP usage. While the current code can probably be improved, this safeguard ,implemented in the patches 4-7, allows future enachements to enable UDP GSO offload on more virtual devices eventually even on forwarded packets. The last 4 for patches implement some performance and functional self-tests, re-using the existing udpgso infrastructure. The problematic scenario described above is explicitly tested. This revision of the series try to address the feedback provided by Willem and Subash on previous iteration. ==================== Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3327a9c46352f111697d93d6134e7bf37c6bffca Author: Paolo Abeni Date: Wed Nov 7 12:38:37 2018 +0100 selftests: add functionals test for UDP GRO Extends the existing udp programs to allow checking for proper GRO aggregation/GSO size, and run the tests via a shell script, using a veth pair with XDP program attached to trigger the GRO code path. rfc v3 -> v1: - use ip route to attach the xdp helper to the veth rfc v2 -> rfc v3: - add missing test program options documentation - fix sporatic test failures (receiver faster than sender) Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit e87f53b4fab72f95952c17f672088e082e8e79ab Author: Paolo Abeni Date: Wed Nov 7 12:38:36 2018 +0100 selftests: add some benchmark for UDP GRO Run on top of veth pair, using a dummy XDP program to enable the GRO. rfc v3 -> v1: - use ip route to attach the xdp helper to the veth Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit bd8e1afe6436558de3a7b25eaef34b69d98e5719 Author: Paolo Abeni Date: Wed Nov 7 12:38:35 2018 +0100 selftests: add dummy xdp test helper This trivial XDP program does nothing, but will be used by the next patch to test the GRO path in a net namespace, leveraging the veth XDP implementation. It's added here, despite its 'net' usage, to avoid the duplication of the llc-related makefile boilerplate. rfc v3 -> v1: - move the helper implementation into the bpf directory, don't touch udpgso_bench_rx rfc v2 -> rfc v3: - move 'x' option handling here Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 0a9ac2e95409169ed42ea66dd4270bc16b868e21 Author: Paolo Abeni Date: Wed Nov 7 12:38:34 2018 +0100 selftests: add GRO support to udp bench rx program And fix a couple of buglets (port option processing, clean termination on SIGINT). This is preparatory work for GRO tests. rfc v2 -> rfc v3: - use ETH_MAX_MTU Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit cf329aa42b6659204fee865bbce0ea20462552eb Author: Paolo Abeni Date: Wed Nov 7 12:38:33 2018 +0100 udp: cope with UDP GRO packet misdirection In some scenarios, the GRO engine can assemble an UDP GRO packet that ultimately lands on a non GRO-enabled socket. This patch tries to address the issue explicitly checking for the UDP socket features before enqueuing the packet, and eventually segmenting the unexpected GRO packet, as needed. We must also cope with re-insertion requests: after segmentation the UDP code calls the helper introduced by the previous patches, as needed. Segmentation is performed by a common helper, which takes care of updating socket and protocol stats is case of failure. rfc v3 -> v1 - fix compile issues with rxrpc - when gso_segment returns NULL, treat is as an error - added 'ipv4' argument to udp_rcv_segment() rfc v2 -> rfc v3 - moved udp_rcv_segment() into net/udp.h, account errors to socket and ns, always return NULL or segs list Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 80bde363f9a43d942e404821b966e362131cd0ca Author: Paolo Abeni Date: Wed Nov 7 12:38:32 2018 +0100 ipv6: factor out protocol delivery helper So that we can re-use it at the UDP level in the next patch rfc v3 -> v1: - add the helper declaration into the ipv6 header Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 68cb7d531e6a87250a51b8a4ee1c79b3445aeff3 Author: Paolo Abeni Date: Wed Nov 7 12:38:31 2018 +0100 ip: factor out protocol delivery helper So that we can re-use it at the UDP level in a later patch rfc v3 -> v1 - add the helper declaration into the ip header Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit bcd1665e3569b0a6f569514f023a41fc7df0b4a3 Author: Paolo Abeni Date: Wed Nov 7 12:38:30 2018 +0100 udp: add support for UDP_GRO cmsg When UDP GRO is enabled, the UDP_GRO cmsg will carry the ingress datagram size. User-space can use such info to compute the original packets layout. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit e20cf8d3f1f763ad28a9cb3b41305b8a8a42653e Author: Paolo Abeni Date: Wed Nov 7 12:38:29 2018 +0100 udp: implement GRO for plain UDP sockets. This is the RX counterpart of commit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT"). When UDP_GRO is enabled, such socket is also eligible for GRO in the rx path: UDP segments directed to such socket are assembled into a larger GSO_UDP_L4 packet. The core UDP GRO support is enabled with setsockopt(UDP_GRO). Initial benchmark numbers: Before: udp rx: 1079 MB/s 769065 calls/s After: udp rx: 1466 MB/s 24877 calls/s This change introduces a side effect in respect to UDP tunnels: after a UDP tunnel creation, now the kernel performs a lookup per ingress UDP packet, while before such lookup happened only if the ingress packet carried a valid internal header csum. rfc v2 -> rfc v3: - fixed typos in macro name and comments - really enforce UDP_GRO_CNT_MAX, instead of UDP_GRO_CNT_MAX + 1 - acquire socket lock in UDP_GRO setsockopt rfc v1 -> rfc v2: - use a new option to enable UDP GRO - use static keys to protect the UDP GRO socket lookup Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 60fb9567bf30937e6bedfa939d7c8fd4ee6a1b1c Author: Paolo Abeni Date: Wed Nov 7 12:38:28 2018 +0100 udp: implement complete book-keeping for encap_needed The *encap_needed static keys are enabled by UDP tunnels and several UDP encapsulations type, but they are never turned off. This can cause unneeded overall performance degradation for systems where such features are used transiently. This patch introduces complete book-keeping for such keys, decreasing the usage at socket destruction time, if needed, and avoiding that the same socket could increase the key usage multiple times. rfc v3 -> v1: - add socket lock around udp_tunnel_encap_enable() rfc v2 -> rfc v3: - use udp_tunnel_encap_enable() in setsockopt() Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 7e225619e8afc432fb054ef135f10c11cf8cfc85 Merge: f601a85bd7883 7bd2db404efa3 Author: David S. Miller Date: Wed Nov 7 16:12:39 2018 -0800 Merge branch 'vrf-allow-simultaneous-service-instances-in-default-and-other-VRFs' Mike Manning says: ==================== vrf: allow simultaneous service instances in default and other VRFs Services currently have to be VRF-aware if they are using an unbound socket. One cannot have multiple service instances running in the default and other VRFs for services that are not VRF-aware and listen on an unbound socket. This is because there is no easy way of isolating packets received in the default VRF from those arriving in other VRFs. This series provides this isolation for stream sockets subject to the existing kernel parameter net.ipv4.tcp_l3mdev_accept not being set, given that this is documented as allowing a single service instance to work across all VRF domains. Similarly, net.ipv4.udp_l3mdev_accept is checked for datagram sockets, and net.ipv4.raw_l3mdev_accept is introduced for raw sockets. The functionality applies to UDP & TCP services as well as those using raw sockets, and is for IPv4 and IPv6. Example of running ssh instances in default and blue VRF: $ /usr/sbin/sshd -D $ ip vrf exec vrf-blue /usr/sbin/sshd $ ss -ta | egrep 'State|ssh' State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0%vrf-blue:ssh 0.0.0.0:* LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:* ESTAB 0 0 192.168.122.220:ssh 192.168.122.1:50282 LISTEN 0 128 [::]%vrf-blue:ssh [::]:* LISTEN 0 128 [::]:ssh [::]:* ESTAB 0 0 [3000::2]%vrf-blue:ssh [3000::9]:45896 ESTAB 0 0 [2000::2]:ssh [2000::9]:46398 v1: - Address Paolo Abeni's comments (patch 4/5) - Fix build when CONFIG_NET_L3_MASTER_DEV not defined (patch 1/5) v2: - Address David Aherns' comments (patches 4/5 and 5/5) - Remove patches 3/5 and 5/5 from series for individual submissions - Include a sysctl for raw sockets as recommended by David Ahern - Expand series into 10 patches and provide improved descriptions v3: - Update description for patch 1/10 and remove patch 6/10 v4: - Set default to enabled for raw socket sysctl as recommended by David Ahern v5: - Address review comments from David Ahern in patches 2-5 ==================== Signed-off-by: David S. Miller commit 7bd2db404efa3daff700e8c88561b435611d07a5 Author: Dewi Morgan Date: Wed Nov 7 15:36:10 2018 +0000 ipv6: do not drop vrf udp multicast packets For bound udp sockets in a vrf, also check the sdif to get the index for ingress devices enslaved to an l3mdev. Signed-off-by: Dewi Morgan Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 5226b6a920ba78d9fbcbb843388d2a844a1fa1c8 Author: Mike Manning Date: Wed Nov 7 15:36:09 2018 +0000 ipv6: handling of multicast packets received in VRF If the skb for multicast packets marked as enslaved to a VRF are received, then the secondary device index should be used to obtain the real device. And verify the multicast address against the enslaved rather than the l3mdev device. Signed-off-by: Dewi Morgan Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit d839a0ebeb4e81a4f2923f581c28b41e1238bdfe Author: Mike Manning Date: Wed Nov 7 15:36:08 2018 +0000 ipv6: allow ping to link-local address in VRF If link-local packets are marked as enslaved to a VRF, then to allow ping to the link-local from a vrf, the error handling for IPV6_PKTINFO needs to be relaxed to also allow the pkt ipi6_ifindex to be that of a slave device to the vrf. Note that the real device also needs to be retrieved in icmp6_iif() to set the ipv6 flow oif to this for icmp echo reply handling. The recent commit 24b711edfc34 ("net/ipv6: Fix linklocal to global address with VRF") takes care of this, so the sdif does not need checking here. This fix makes ping to link-local consistent with that to global addresses, in that this can now be done from within the same VRF that the address is in. Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 6f12fa775530195a501fb090d092c637f32d0cc5 Author: Mike Manning Date: Wed Nov 7 15:36:07 2018 +0000 vrf: mark skb for multicast or link-local as enslaved to VRF The skb for packets that are multicast or to a link-local address are not marked as being enslaved to a VRF, if they are received on a socket bound to the VRF. This is needed for ND and it is preferable for the kernel not to have to deal with the additional use-cases if ll or mcast packets are handled as enslaved. However, this does not allow service instances listening on unbound and bound to VRF sockets to distinguish the VRF used, if packets are sent as multicast or to a link-local address. The fix is for the VRF driver to also mark these skb as being enslaved to the VRF. Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 7055420fb6a1cb754a64be99ddcabd45bd902d99 Author: Duncan Eastoe Date: Wed Nov 7 15:36:06 2018 +0000 net: fix raw socket lookup device bind matching with VRFs When there exist a pair of raw sockets one unbound and one bound to a VRF but equal in all other respects, when a packet is received in the VRF context, __raw_v4_lookup() matches on both sockets. This results in the packet being delivered over both sockets, instead of only the raw socket bound to the VRF. The bound device checks in __raw_v4_lookup() are replaced with a call to raw_sk_bound_dev_eq() which correctly handles whether the packet should be delivered over the unbound socket in such cases. In __raw_v6_lookup() the match on the device binding of the socket is similarly updated to use raw_sk_bound_dev_eq() which matches the handling in __raw_v4_lookup(). Importantly raw_sk_bound_dev_eq() takes the raw_l3mdev_accept sysctl into account. Signed-off-by: Duncan Eastoe Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 6897445fb194c8ad046df4a13e1ee9f080a5a21e Author: Mike Manning Date: Wed Nov 7 15:36:05 2018 +0000 net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs Add a sysctl raw_l3mdev_accept to control raw socket lookup in a manner similar to use of tcp_l3mdev_accept for stream and of udp_l3mdev_accept for datagram sockets. Have this default to enabled for reasons of backwards compatibility. This is so as to specify the output device with cmsg and IP_PKTINFO, but using a socket not bound to the corresponding VRF. This allows e.g. older ping implementations to be run with specifying the device but without executing it in the VRF. If the option is disabled, packets received in a VRF context are only handled by a raw socket bound to the VRF, and correspondingly packets in the default VRF are only handled by a socket not bound to any VRF. Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 6da5b0f027a825df2aebc1927a27bda185dc03d4 Author: Mike Manning Date: Wed Nov 7 15:36:04 2018 +0000 net: ensure unbound datagram socket to be chosen when not in a VRF Ensure an unbound datagram skt is chosen when not in a VRF. The check for a device match in compute_score() for UDP must be performed when there is no device match. For this, a failure is returned when there is no device match. This ensures that bound sockets are never selected, even if there is no unbound socket. Allow IPv6 packets to be sent over a datagram skt bound to a VRF. These packets are currently blocked, as flowi6_oif was set to that of the master vrf device, and the ipi6_ifindex is that of the slave device. Allow these packets to be sent by checking the device with ipi6_ifindex has the same L3 scope as that of the bound device of the skt, which is the master vrf device. Note that this check always succeeds if the skt is unbound. Even though the right datagram skt is now selected by compute_score(), a different skt is being returned that is bound to the wrong vrf. The difference between these and stream sockets is the handling of the skt option for SO_REUSEPORT. While the handling when adding a skt for reuse correctly checks that the bound device of the skt is a match, the skts in the hashslot are already incorrect. So for the same hash, a skt for the wrong vrf may be selected for the required port. The root cause is that the skt is immediately placed into a slot when it is created, but when the skt is then bound using SO_BINDTODEVICE, it remains in the same slot. The solution is to move the skt to the correct slot by forcing a rehash. Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit e78190581aff7c96fbd6324aa633170934650b65 Author: Mike Manning Date: Wed Nov 7 15:36:03 2018 +0000 net: ensure unbound stream socket to be chosen when not in a VRF The commit a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev") only ensures that the correct socket is selected for packets in a VRF. However, there is no guarantee that the unbound socket will be selected for packets when not in a VRF. By checking for a device match in compute_score() also for the case when there is no bound device and attaching a score to this, the unbound socket is selected. And if a failure is returned when there is no device match, this ensures that bound sockets are never selected, even if there is no unbound socket. Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 3c82a21f4320c8d54cf6456b27c8d49e5ffb722e Author: Robert Shearman Date: Wed Nov 7 15:36:02 2018 +0000 net: allow binding socket in a VRF when there's an unbound socket Change the inet socket lookup to avoid packets arriving on a device enslaved to an l3mdev from matching unbound sockets by removing the wildcard for non sk_bound_dev_if and instead relying on check against the secondary device index, which will be 0 when the input device is not enslaved to an l3mdev and so match against an unbound socket and not match when the input device is enslaved. Change the socket binding to take the l3mdev into account to allow an unbound socket to not conflict sockets bound to an l3mdev given the datapath isolation now guaranteed. Signed-off-by: Robert Shearman Signed-off-by: Mike Manning Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller commit 2a1e03ca33be9cd3384fcd493435b08ff3bf4e73 Author: Amir Livneh Date: Thu Nov 1 09:57:17 2018 -0400 doc: tracing: Fix a number of typos Trivial fixes to spelling mistakes in ftrace.rst v2: tripple -> triple Signed-off-by: Amir Livneh Signed-off-by: Jonathan Corbet commit c284d42850fc947dc8e0d327149f65c590900364 Author: Randy Dunlap Date: Sun Nov 4 14:06:23 2018 -0800 Documentation/dev-tools: clean up kselftest.rst This is a small cleanup to kselftest.rst: - Fix some language typos in the usage instructions. - Change one non-ASCII space to an ASCII space. Signed-off-by: Randy Dunlap Acked-by: Shuah Khan Signed-off-by: Jonathan Corbet commit 9d436edee25481e80202242ddbb72c847da709a7 Author: Geert Uytterhoeven Date: Wed Nov 7 14:46:17 2018 +0100 Documentation/ras: Typo s/use use/use/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet commit bfd228c73090e594efce24fa0f299272bef53c6d Author: Mike Rapoport Date: Wed Nov 7 18:47:13 2018 +0200 kernel-doc: extend $type_param to match members referenced by pointer Currently, function parameter description can match '@type.member' expressions but fails to match '@type->member'. Extend the $type_param regex to allow matching both Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 76dd3e7b6650ba5aed96347e685657f80590a7b6 Author: Mike Rapoport Date: Wed Nov 7 18:47:12 2018 +0200 kernel-doc: kill trailing whitespace Signed-off-by: Mike Rapoport Signed-off-by: Jonathan Corbet commit 1bb37a35671cb3fea74c213220dbd3815344f673 Author: Joris Gutjahr Date: Sun Oct 28 20:28:28 2018 +0100 doc-guide:kernel-doc.rst: Reference to foobar In the Function documentation Section of kernel-doc.rst there is a function_name() function as an example for how to make a comment about a function. But at the end of that example there is a reference to foobar instead of function_name. I think that should rather be function_name, because that was the placeholder the whole example was using. Signed-off-by: Joris Gutjahr Signed-off-by: Jonathan Corbet commit cba8087d829ef76c474406a083a770255f027c6f Author: Colin Ian King Date: Fri Oct 26 18:25:49 2018 +0100 Documentation: fix spelling mistake, EACCESS -> EACCES Trivial fix to a spelling mistake of the error access name EACCESS, rename to EACCES Signed-off-by: Colin Ian King Signed-off-by: Jonathan Corbet commit f8d0dc21d409c0ecb921f4ae1ab3e0763a26c979 Author: Waiman Long Date: Tue Oct 23 17:25:51 2018 -0400 Documentation/proc.txt: Add 2 missing fields for /proc//status It was found that two of the fields in the /proc//status file were missing - CapAmb & Speculation_Store_Bypass. They are now added to the proc.txt documentation file. v2: Update the example as well. Signed-off-by: Waiman Long Signed-off-by: Jonathan Corbet commit 1afc5fb5f6b146084d569f0c216bf6f753af7705 Author: Randy Dunlap Date: Fri Oct 19 18:10:58 2018 -0700 Documentation: dynamic-debug: fix wildcard description Fix grammar about wildcards and insert a space between sentences. Signed-off-by: Randy Dunlap Cc: Jason Baron Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Will Korteland Signed-off-by: Jonathan Corbet commit 005ae6df28b8c850ea87a03d38e91c63b1c4198d Author: Randy Dunlap Date: Fri Oct 19 16:55:34 2018 -0700 Documentation: dynamic_debug: fix a couple of typos Fix a few "typos" in dynamic-debug-howto.rst. s/dyndbg_query/ddebug_query/ s/sysfs/debugfs/ Signed-off-by: Randy Dunlap Cc: Jason Baron Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Jonathan Corbet commit 9de30f3f7f4d31037cfbb7c787e1089c1944b3a7 Author: Tycho Andersen Date: Fri Nov 2 14:18:22 2018 -0600 dlm: don't leak kernel pointer to userspace In copy_result_to_user(), we first create a struct dlm_lock_result, which contains a struct dlm_lksb, the last member of which is a pointer to the lvb. Unfortunately, we copy the entire struct dlm_lksb to the result struct, which is then copied to userspace at the end of the function, leaking the contents of sb_lvbptr, which is a valid kernel pointer in some cases (indeed, later in the same function the data it points to is copied to userspace). It is an error to leak kernel pointers to userspace, as it undermines KASLR protections (see e.g. 65eea8edc31 ("floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl") for another example of this). Signed-off-by: Tycho Andersen Signed-off-by: David Teigland commit 3f0806d2596de0a9ec381f37f97f6f5dbf1c6366 Author: Tycho Andersen Date: Fri Nov 2 14:18:21 2018 -0600 dlm: don't allow zero length names kobject doesn't like zero length object names, so let's test for that. Signed-off-by: Tycho Andersen Signed-off-by: David Teigland commit 9e834d77692314dde984981040f04196ba52f9cc Author: Alex Deucher Date: Fri Nov 2 10:54:27 2018 -0500 drm/amdgpu/display/dce11: only enable FBC when selected Causes a black screen on a Stoney laptop. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108577 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 6ef0cbc3b77360795c7a16e9438e5984aabd24e0 Author: Alex Deucher Date: Tue Nov 6 15:19:49 2018 -0500 drm/amdgpu/display/dm: handle FBC dc feature parameter Set the dc_config properly when the option is enabled. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit f332822a881f69b0a2155cbf4366daa33d15439c Author: Alex Deucher Date: Tue Nov 6 15:10:37 2018 -0500 drm/amdgpu/display/dc: add FBC to dc_config Add FBC to the list of features that can be enabled from the DM. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 79d197f31b3008c782e2ce3da8d24b5d8de48c75 Author: Alex Deucher Date: Tue Nov 6 14:44:29 2018 -0500 drm/amdgpu: add DC feature mask module parameter Similar to ppfeaturemask. Allows you to selectively enable/disable DC features. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 593f79a236e11fbc570db509242c2b4ef0526c5d Author: Alex Deucher Date: Fri Nov 2 10:51:50 2018 -0500 drm/amdgpu/display: check if fbc is available in set_static_screen_control (v2) The value is dependent on whether fbc is available. v2: only check if num_pipes is valid Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 2cf6dd9cc5191ef9aec4f22cd64df8dc67e31c6d Author: Trigger Huang Date: Wed Nov 7 11:30:57 2018 +0800 drm/amdgpu: disable page queue on Vega10 SR-IOV VF Currently, SDMA page queue is not used under SR-IOV VF, and this queue will cause ring test failure in amdgpu module reload case. So just disable it. Signed-off-by: Trigger Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3482d2d9b0fb4340faa23a4967f69da047fa291c Author: Evan Quan Date: Fri Nov 2 17:21:17 2018 +0800 drm/amdgpu: set Vega20 LBPW as disabled at default For Vega20, LBPW feature is disabled at default. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 2d3030a00ef1dbdbf3df8893c225cb37d88a1ff2 Author: Evan Quan Date: Wed Nov 7 09:16:07 2018 +0800 drm/amd/powerplay: always use fast UCLK switching when UCLK DPM enabled With UCLK DPM enabled, slow switching is not supported any more. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 72deff05bd4662b9aca75812b44a9bea646da1b0 Author: Evan Quan Date: Wed Oct 24 12:11:35 2018 +0800 drm/amd/powerplay: set a default fclk/gfxclk ratio Otherwise big gap between these two clocks may causes some hangs. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 30f33126feca0fe16df9e9302ffc28a953e2eb37 Author: Trigger Huang Date: Tue Nov 6 19:37:58 2018 +0800 drm/ttm: Fix bo_global and mem_global kfree error ttm_bo_glob and ttm_mem_glob are defined as structure instance, while not allocated by kzalloc, so kfree should not be invoked to release them anymore. Otherwise, it will cause the following kernel BUG when unloading amdgpu module [ 48.419294] kernel BUG at /build/linux-5s7Xkn/linux-4.15.0/mm/slub.c:3894! [ 48.419352] invalid opcode: 0000 [#1] SMP PTI [ 48.419387] Modules linked in: amdgpu(OE-) amdchash(OE) amdttm(OE) amd_sched(OE) amdkcl(OE) amd_iommu_v2 drm_kms_helper drm i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi pcbc snd_seq snd_seq_device snd_timer aesni_intel snd soundcore joydev aes_x86_64 crypto_simd glue_helper cryptd input_leds mac_hid serio_raw binfmt_misc nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 8139too psmouse i2c_piix4 8139cp mii floppy pata_acpi [ 48.419782] CPU: 1 PID: 1281 Comm: modprobe Tainted: G OE 4.15.0-20-generic #21-Ubuntu [ 48.419838] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 48.419901] RIP: 0010:kfree+0x137/0x180 [ 48.419934] RSP: 0018:ffffb02101273bf8 EFLAGS: 00010246 [ 48.419974] RAX: ffffeee1418ad7e0 RBX: ffffffffc075f100 RCX: ffff8fed7fca7ed0 [ 48.420025] RDX: 0000000000000000 RSI: 000000000003440e RDI: 0000000022400000 [ 48.420073] RBP: ffffb02101273c10 R08: 0000000000000010 R09: ffff8fed7ffd3680 [ 48.420121] R10: ffffeee1418ad7c0 R11: ffff8fed7ffd3000 R12: ffffffffc075e2c0 [ 48.420169] R13: ffffffffc074ec10 R14: ffff8fed73063900 R15: ffff8fed737428e8 [ 48.420216] FS: 00007fdc912ec540(0000) GS:ffff8fed7fc80000(0000) knlGS:0000000000000000 [ 48.420267] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 48.420308] CR2: 000055fa40c30060 CR3: 000000023470a006 CR4: 00000000003606e0 [ 48.420358] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 48.420405] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 48.420452] Call Trace: [ 48.420485] ttm_bo_global_kobj_release+0x20/0x30 [amdttm] [ 48.420528] kobject_release+0x6a/0x180 [ 48.420562] kobject_put+0x28/0x50 [ 48.420595] ttm_bo_global_release+0x36/0x50 [amdttm] [ 48.420636] amdttm_bo_device_release+0x119/0x180 [amdttm] [ 48.420678] ? amdttm_bo_clean_mm+0xa6/0xf0 [amdttm] [ 48.420760] amdgpu_ttm_fini+0xc9/0x180 [amdgpu] [ 48.420821] amdgpu_bo_fini+0x12/0x40 [amdgpu] [ 48.420889] gmc_v9_0_sw_fini+0x40/0x50 [amdgpu] [ 48.420947] amdgpu_device_fini+0x36f/0x4c0 [amdgpu] [ 48.421007] amdgpu_driver_unload_kms+0xb4/0x150 [amdgpu] [ 48.421058] drm_dev_unregister+0x46/0xf0 [drm] [ 48.421102] drm_dev_unplug+0x12/0x70 [drm] Signed-off-by: Trigger Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0bf19b9fda263c92de83586b1abee6db4e59cd66 Author: Lyude Paul Date: Thu Nov 1 21:51:49 2018 -0400 drm/amd/amdgpu/dm: Fix dm_dp_create_fake_mst_encoder() [why] Removing connector reusage from DM to match the rest of the tree ended up revealing an issue that was surprisingly subtle. The original amdgpu code for DC that was submitted appears to have left a chunk in dm_dp_create_fake_mst_encoder() that tries to find a "master encoder", the likes of which isn't actually used or stored anywhere. It does so at the wrong time as well by trying to access parts of the drm_connector from the encoder init before it's actually been initialized. This results in a NULL pointer deref on MST hotplugs: [ 160.696613] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 160.697234] PGD 0 P4D 0 [ 160.697814] Oops: 0010 [#1] SMP PTI [ 160.698430] CPU: 2 PID: 64 Comm: kworker/2:1 Kdump: loaded Tainted: G O 4.19.0Lyude-Test+ #2 [ 160.699020] Hardware name: HP HP ZBook 15 G4/8275, BIOS P70 Ver. 01.22 05/17/2018 [ 160.699672] Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper] [ 160.700322] RIP: 0010: (null) [ 160.700920] Code: Bad RIP value. [ 160.701541] RSP: 0018:ffffc9000029fc78 EFLAGS: 00010206 [ 160.702183] RAX: 0000000000000000 RBX: ffff8804440ed468 RCX: ffff8804440e9158 [ 160.702778] RDX: 0000000000000000 RSI: ffff8804556c5700 RDI: ffff8804440ed000 [ 160.703408] RBP: ffff880458e21800 R08: 0000000000000002 R09: 000000005fca0a25 [ 160.704002] R10: ffff88045a077a3d R11: ffff88045a077a3c R12: ffff8804440ed000 [ 160.704614] R13: ffff880458e21800 R14: ffff8804440e9000 R15: ffff8804440e9000 [ 160.705260] FS: 0000000000000000(0000) GS:ffff88045f280000(0000) knlGS:0000000000000000 [ 160.705854] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 160.706478] CR2: ffffffffffffffd6 CR3: 000000000200a001 CR4: 00000000003606e0 [ 160.707124] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 160.707724] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 160.708372] Call Trace: [ 160.708998] ? dm_dp_add_mst_connector+0xed/0x1d0 [amdgpu] [ 160.709625] ? drm_dp_add_port+0x2fa/0x470 [drm_kms_helper] [ 160.710284] ? wake_up_q+0x54/0x70 [ 160.710877] ? __mutex_unlock_slowpath.isra.18+0xb3/0x110 [ 160.711512] ? drm_dp_dpcd_access+0xe7/0x110 [drm_kms_helper] [ 160.712161] ? drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper] [ 160.712762] ? drm_dp_check_and_send_link_address+0xa3/0xd0 [drm_kms_helper] [ 160.713408] ? drm_dp_mst_link_probe_work+0x4b/0x80 [drm_kms_helper] [ 160.714013] ? process_one_work+0x1a1/0x3a0 [ 160.714667] ? worker_thread+0x30/0x380 [ 160.715326] ? wq_update_unbound_numa+0x10/0x10 [ 160.715939] ? kthread+0x112/0x130 [ 160.716591] ? kthread_create_worker_on_cpu+0x70/0x70 [ 160.717262] ? ret_from_fork+0x35/0x40 [ 160.717886] Modules linked in: amdgpu(O) vfat fat snd_hda_codec_generic joydev i915 chash gpu_sched ttm i2c_algo_bit drm_kms_helper snd_hda_codec_hdmi hp_wmi syscopyarea iTCO_wdt sysfillrect sparse_keymap sysimgblt fb_sys_fops snd_hda_intel usbhid wmi_bmof drm snd_hda_codec btusb snd_hda_core intel_rapl btrtl x86_pkg_temp_thermal btbcm btintel coretemp snd_pcm crc32_pclmul bluetooth psmouse snd_timer snd pcspkr i2c_i801 mei_me i2c_core soundcore mei tpm_tis wmi tpm_tis_core hp_accel ecdh_generic lis3lv02d tpm video rfkill acpi_pad input_polldev hp_wireless pcc_cpufreq crc32c_intel serio_raw tg3 xhci_pci xhci_hcd [last unloaded: amdgpu] [ 160.720141] CR2: 0000000000000000 Somehow the connector reusage DM was using for MST connectors managed to paper over this issue entirely; hence why this was never caught until now. [how] Since this code isn't used anywhere and seems useless anyway, we can just drop it entirely. This appears to fix the issue on my HP ZBook with an AMD WX4150. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 5d8e06a3b7b2a1edecd47ddb3670c63fedf55c72 Author: Jerry (Fangzhi) Zuo Date: Tue Oct 30 14:37:16 2018 -0400 drm/amd/display: Drop reusing drm connector for MST [why] It is not safe to keep existing connector while entire topology has been removed. Could lead potential impact to uapi. Entirely unregister all the connectors on the topology, and use a new set of connectors when the topology is plugged back on. [How] Remove the drm connector entirely each time when the corresponding MST topology is gone. When hotunplug a connector (e.g., DP2) 1. Remove connector from userspace. 2. Drop it's reference. When hotplug back on: 1. Detect new topology, and create new connectors. 2. Notify userspace with sysfs hotplug event. 3. Reprobe new connectors, and reassign CRTC from old (e.g., DP2) to new (e.g., DP3) connector. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Harry Wentland Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher commit 1b32d6e040272e7a722910f6ba10cbc6099dd238 Author: Jerry (Fangzhi) Zuo Date: Tue Oct 30 14:28:49 2018 -0400 drm/amd/display: Cleanup MST non-atomic code workaround [why] It is not correct to touch aconnector within atomic_check. [How] It was added as workaround before, and no longer needed. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Harry Wentland Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher commit db0049129359eca348e5cc2782a90e78fda5bc85 Author: Hawking Zhang Date: Wed Nov 7 12:00:50 2018 +0800 drm/amdgpu: fix frame size of amdgpu_xgmi_add_devices excceed 1024 bytes Instead of stack-allocated psp_xgmi_topology_info in function amdgpu_xgmi_add_device, dynamically allocated this structure to avoid the frame size of this function excceed 1024 bytes Signed-off-by: Hawking Zhang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit 24c9d423e86b17b25b4b510e81f10aa232fdaa60 Author: Tony Luck Date: Tue Nov 6 10:39:15 2018 -0800 EDAC, skx: Fix randconfig builds in a better way It was previously noted that Kconfig complained about unmet dependencies when trying to configure skx_edac together with CONFIG_ACPI=n. First fix for this checked for ACPI when doing select ACPI_ADXL but this required stub functions for the case where ACPI wasn't selected. It also allowed building a driver that didn't actually work for a system that has non-volatile DIMMs. Arnd Bergmann pointed out that the right fix is to make EDAC_SKX "depend on ACPI". Fixes: a324e9396ca3 ("EDAC, skx: Fix randconfig builds") Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov CC: "Rafael J. Wysocki" CC: Arnd Bergmann CC: Mauro Carvalho Chehab CC: linux-edac CC: qiuxu.zhuo@intel.com Link: http://lkml.kernel.org/r/20181106183914.GA26731@agluck-desk commit d968b4e240cfe39d39d80483bac8bca8716fd93c Author: Tycho Andersen Date: Fri Nov 2 14:18:20 2018 -0600 dlm: fix invalid free dlm_config_nodes() does not allocate nodes on failure, so we should not free() nodes when it fails. Signed-off-by: Tycho Andersen Signed-off-by: David Teigland commit bce6a14996f991e570d973179b5ff57544efaa9a Author: Shannon Nelson Date: Mon Oct 29 14:14:41 2018 -0700 bpf_load: add map name to load_maps error message To help when debugging bpf/xdp load issues, have the load_map() error message include the number and name of the map that failed. Signed-off-by: Shannon Nelson Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Daniel Borkmann commit 8302b9bd31d29f29dd24dd6b1e1e5682c302c11c Author: Quentin Monnet Date: Wed Nov 7 12:29:30 2018 +0000 tools: bpftool: adjust rlimit RLIMIT_MEMLOCK when loading programs, maps The limit for memory locked in the kernel by a process is usually set to 64 kbytes by default. This can be an issue when creating large BPF maps and/or loading many programs. A workaround is to raise this limit for the current process before trying to create a new BPF map. Changing the hard limit requires the CAP_SYS_RESOURCE and can usually only be done by root user (for non-root users, a call to setrlimit fails (and sets errno) and the program simply goes on with its rlimit unchanged). There is no API to get the current amount of memory locked for a user, therefore we cannot raise the limit only when required. One solution, used by bcc, is to try to create the map, and on getting a EPERM error, raising the limit to infinity before giving another try. Another approach, used in iproute2, is to raise the limit in all cases, before trying to create the map. Here we do the same as in iproute2: the rlimit is raised to infinity before trying to load programs or to create maps with bpftool. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 08e823c2c5899ef2de3aa1727233f1f19e8c1cc1 Author: Janakarajan Natarajan Date: Wed Nov 7 20:59:07 2018 +0000 x86/cpufeatures: Add WBNOINVD feature definition Add a new cpufeature definition for the WBNOINVD instruction. The WBNOINVD instruction writes all modified cache lines in all levels of the cache associated with a processor to main memory while retaining the cached values. Both AMD and Intel support this instruction. Signed-off-by: Janakarajan Natarajan Signed-off-by: Borislav Petkov CC: David Woodhouse CC: Fenghua Yu CC: "H. Peter Anvin" CC: Ingo Molnar CC: Konrad Rzeszutek Wilk CC: Rudolf Marek CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/1541624211-32196-1-git-send-email-Janakarajan.Natarajan@amd.com commit f96afa767baffba7645f5e10998f5178948bb9aa Author: Quentin Monnet Date: Wed Nov 7 12:28:45 2018 +0000 selftests/bpf: enable (uncomment) all tests in test_libbpf.sh libbpf is now able to load successfully test_l4lb_noinline.o and samples/bpf/tracex3_kern.o. For the test_l4lb_noinline, uncomment related tests from test_libbpf.c and remove the associated "TODO". For tracex3_kern.o, instead of loading a program from samples/bpf/ that might not have been compiled at this stage, try loading a program from BPF selftests. Since this test case is about loading a program compiled without the "-target bpf" flag, change the Makefile to compile one program accordingly (instead of passing the flag for compiling all programs). Regarding test_xdp_noinline.o: in its current shape the program fails to load because it provides no version section, but the loader needs one. The test was added to make sure that libbpf could load XDP programs even if they do not provide a version number in a dedicated section. But libbpf is already capable of doing that: in our case loading fails because the loader does not know that this is an XDP program (it does not need to, since it does not attach the program). So trying to load test_xdp_noinline.o does not bring much here: just delete this subtest. For the record, the error message obtained with tracex3_kern.o was fixed by commit e3d91b0ca523 ("tools/libbpf: handle issues with bpf ELF objects containing .eh_frames") I have not been abled to reproduce the "libbpf: incorrect bpf_call opcode" error for test_l4lb_noinline.o, even with the version of libbpf present at the time when test_libbpf.sh and test_libbpf_open.c were created. RFC -> v1: - Compile test_xdp without the "-target bpf" flag, and try to load it instead of ../../samples/bpf/tracex3_kern.o. - Delete test_xdp_noinline.o subtest. Cc: Jesper Dangaard Brouer Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann commit 4b04cc6a8f86c4842314def22332de1f15de8523 Author: Jens Axboe Date: Mon Nov 5 12:44:33 2018 -0700 nvme: add separate poll queue map Adds support for defining a variable number of poll queues, currently configurable with the 'poll_queues' module parameter. Defaults to a single poll queue. And now we finally have poll support without triggering interrupts! Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit d1e36282b0bbd5de6a9c4d5275e94ef3b3438f48 Author: Jens Axboe Date: Wed Aug 29 10:36:56 2018 -0600 block: add REQ_HIPRI and inherit it from IOCB_HIPRI We use IOCB_HIPRI to poll for IO in the caller instead of scheduling. This information is not available for (or after) IO submission. The driver may make different queue choices based on the type of IO, so make the fact that we will poll for this IO known to the lower layers as well. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 3b6592f70ad7b4c24dd3eb2ac9bbe3353d02c992 Author: Jens Axboe Date: Wed Oct 31 08:36:31 2018 -0600 nvme: utilize two queue maps, one for reads and one for writes NVMe does round-robin between queues by default, which means that sharing a queue map for both reads and writes can be problematic in terms of read servicing. It's much easier to flood the queue with writes and reduce the read servicing. Implement two queue maps, one for reads and one for writes. The write queue count is configurable through the 'write_queues' parameter. By default, we retain the previous behavior of having a single queue set, shared between reads and writes. Setting 'write_queues' to a non-zero value will create two queue sets, one for reads and one for writes, the latter using the configurable number of queues (hardware queue counts permitting). Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit 843477d4cc5c4bb4e346c561ecd3b9d0bd67e8c8 Author: Jens Axboe Date: Wed Oct 24 13:16:11 2018 -0600 blk-mq: initial support for multiple queue maps Add a queue offset to the tag map. This enables users to map iteratively, for each queue map type they support. Bump maximum number of supported maps to 2, we're now fully able to support more than 1 map. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 3110fc79606fb6003949246c6fb325dd43445273 Author: Jens Axboe Date: Tue Oct 30 12:24:04 2018 -0600 blk-mq: improve plug list sorting Currently we only look at the software queue, but with support for multiple maps, we should also look at the hardware queue. This is important since we'll flush out the request list if either the software queue or hardware queue don't match. This sorts by software queue first, then hardware queue if that differs. Finally we sort by request location like before. This minimizes the flush points per plug list. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 67cae4c948a5311121905a2a8740c50daf7f6478 Author: Jens Axboe Date: Tue Oct 30 11:31:51 2018 -0600 blk-mq: cleanup and improve list insertion It's somewhat strange to have a list insertion function that relies on the fact that the caller has mapped things correctly. Pass in the hardware queue directly for insertion, which makes for a much cleaner interface and implementation. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit ea4f995ee8b8f0578b3319949f2edd5d812fdb0a Author: Jens Axboe Date: Mon Oct 29 15:06:13 2018 -0600 blk-mq: cache request hardware queue mapping We call blk_mq_map_queue() a lot, at least two times for each request per IO, sometimes more. Since we now have an indirect call as well in that function. cache the mapping so we don't have to re-call blk_mq_map_queue() for the same request multiple times. Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 392546aed22009060911f76b6ea24520e2f8b50f Author: Jens Axboe Date: Mon Oct 29 13:25:27 2018 -0600 blk-mq: separate number of hardware queues from nr_cpu_ids With multiple maps, nr_cpu_ids is no longer the maximum number of hardware queues we support on a given devices. The initializer of the tag_set can have set ->nr_hw_queues larger than the available number of CPUs, since we can exceed that with multiple queue maps. Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit b3c661b15d5ab11d982e58bee23e05c1780528a1 Author: Jens Axboe Date: Tue Oct 30 10:36:06 2018 -0600 blk-mq: support multiple hctx maps Add support for the tag set carrying multiple queue maps, and for the driver to inform blk-mq how many it wishes to support through setting set->nr_maps. This adds an mq_ops helper for drivers that support more than 1 map, mq_ops->rq_flags_to_type(). The function takes request/bio flags and CPU, and returns a queue map index for that. We then use the type information in blk_mq_map_queue() to index the map set. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit a783b81820fe3532809c98371ec904dfdb0ea9e5 Author: Jens Axboe Date: Thu Oct 25 08:58:14 2018 -0600 blk-mq: add 'type' attribute to the sysfs hctx directory It can be useful for a user to verify what type a given hardware queue is, expose this information in sysfs. Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit f31967f0e455d08d3ea1d2f849bf62dafc92dbf4 Author: Jens Axboe Date: Mon Oct 29 13:13:29 2018 -0600 blk-mq: allow software queue to map to multiple hardware queues The mapping used to be dependent on just the CPU location, but now it's a tuple of (type, cpu) instead. This is a prep patch for allowing a single software queue to map to multiple hardware queues. No functional changes in this patch. This changes the software queue count to an unsigned short to save a bit of space. We can still support 64K-1 CPUs, which should be enough. Add a check to catch a wrap. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit f9afca4d367b8c915f28d29fcaba7460640403ff Author: Jens Axboe Date: Mon Oct 29 13:11:38 2018 -0600 blk-mq: pass in request/bio flags to queue mapping Prep patch for being able to place request based not just on CPU location, but also on the type of request. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit ff2c56609d9b1f0739ae3a3bfdb78191d01e4192 Author: Jens Axboe Date: Mon Oct 29 13:07:33 2018 -0600 blk-mq: provide dummy blk_mq_map_queue_type() helper Doesn't do anything right now, but it's needed as a prep patch to get the interfaces right. While in there, correct the blk_mq_map_queue() CPU type to an unsigned int. Reviewed-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit ed76e329d74a4b15ac0f5fd3adbd52ec0178a134 Author: Jens Axboe Date: Mon Oct 29 13:06:14 2018 -0600 blk-mq: abstract out queue map This is in preparation for allowing multiple sets of maps per queue, if so desired. Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit a8908939af569ce2419f43fd56eeaf003bc3d85d Author: Jens Axboe Date: Tue Oct 16 14:23:06 2018 -0600 blk-mq: kill q->mq_map It's just a pointer to set->mq_map, use that instead. Move the assignment a bit earlier, so we always know it's valid. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit a0fedc857dff457e123aeaa2039d28ac90e543df Merge: 9cf2bab630765 6da4b3ab9a6e9 Author: Jens Axboe Date: Wed Nov 7 13:43:54 2018 -0700 Merge branch 'irq/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-4.21/block Pull in the irq affinity commits, that are staged through Thomas's tree. * 'irq/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/affinity: Add support for allocating interrupt sets genirq/affinity: Pass first vector to __irq_build_affinity_masks() genirq/affinity: Move two stage affinity spreading into a helper function genirq/affinity: Spread IRQs to all available NUMA nodes commit 9cf2bab6307659b940da65d16dcc8f82c69f3a97 Author: Jens Axboe Date: Wed Oct 31 17:01:22 2018 -0600 block: kill request ->cpu member This was used for completion placement for the legacy path, but for mq we have rq->mq_ctx->cpu for that. Add a helper to get the request CPU assignment, as the mq_ctx type is private to blk-mq. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit c7bb9ad1744ea14e61e5fff99ee5282709b0c9d9 Author: Jens Axboe Date: Wed Oct 31 09:43:30 2018 -0600 block: get rid of q->softirq_done_fn() With the legacy path gone, all we do is funnel it through the mq_ops->complete() operation. Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 7d692330e7cd581ccfee982334bf06b236cb999a Author: Jens Axboe Date: Wed Oct 24 10:48:12 2018 -0600 block: get rid of blk_queued_rq() No point in hiding what this does, just open code it in the one spot where we are still using it. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 8b98a97f80ed0345d254fb645e7c78c40ebed8a6 Author: Jens Axboe Date: Sat Oct 20 15:43:37 2018 -0600 blk-merge: kill dead queue lock held check This is dead code, any queue reaching this part has mq_ops attached. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 2081a56bfaadfbcec479d25c8f3120e2224a745d Author: Jens Axboe Date: Fri Oct 12 12:39:10 2018 -0600 block: remove req_no_special_merge() from merging code It'll always be false at this point, just remove it. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 820efc62fc6ccf07be40a1040d4b793286de8439 Author: Jens Axboe Date: Thu Oct 11 16:00:52 2018 -0600 block: kill request slab cache Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit db6d995235606191fa9db0c717e9d843200b71ea Author: Jens Axboe Date: Fri Nov 2 08:46:15 2018 -0600 block: remove request_list code It's now dead code, nobody uses it. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 1028e4b335665290dc563d5272f3c6b84e7fd66e Author: Jens Axboe Date: Mon Oct 29 09:47:17 2018 -0600 bsg: move bsg-lib parts outside of request queue Get rid of the special bsg job fn and timeout handler, move them into a private bsg_set instead. Mostly from Christoph, with fixes for error handling and cleanups. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 4316b79e4321d4140164e42f228778e5bc66c84f Author: Jens Axboe Date: Mon Oct 29 10:25:07 2018 -0600 block: kill legacy parts of timeout handling The only user of legacy timing now is BSG, which is invoked from the mq timeout handler. Kill the legacy code, and rename the q->rq_timed_out_fn to q->bsg_job_timeout_fn. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 92bc5a24844ada9b010f03c49a493e3edeadaa54 Author: Jens Axboe Date: Wed Oct 24 13:52:28 2018 -0600 block: remove __blk_put_request() Now there's no difference between blk_put_request() and __blk_put_request() anymore, get rid of the underscore version and convert the few callers. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit f9cd4bfe96955e7a1d3ec54b393dee87b815ba3b Author: Jens Axboe Date: Thu Nov 1 16:41:41 2018 -0600 block: get rid of MQ scheduler ops union This is a remnant of when we had ops for both SQ and MQ schedulers. Now it's just MQ, so get rid of the union. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit a1ce35fa49852db60fc6e268038530be533c5b15 Author: Jens Axboe Date: Mon Oct 29 10:23:51 2018 -0600 block: remove dead elevator code This removes a bunch of core and elevator related code. On the core front, we remove anything related to queue running, draining, initialization, plugging, and congestions. We also kill anything related to request allocation, merging, retrieval, and completion. Remove any checking for single queue IO schedulers, as they no longer exist. This means we can also delete a bunch of code related to request issue, adding, completion, etc - and all the SQ related ops and helpers. Also kill the load_default_modules(), as all that did was provide for a way to load the default single queue elevator. Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit f382fb0bcef4c37dc049e9f6963e3baf204d815c Author: Jens Axboe Date: Fri Oct 12 10:14:46 2018 -0600 block: remove legacy IO schedulers Retain the deadline documentation, as that carries over to mq-deadline as well. Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 404b8f5a03d840f74669fd55e26f8e3564cc2dd8 Author: Jens Axboe Date: Wed Oct 31 12:43:24 2018 -0600 block: cleanup kick/queued handling Now that blk_flush_queue_rq() always returns false, we can remove that return value. That bubbles through the stack, allowing us to remove a bunch of state tracking around it. Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 7e992f847a08ecda3f658ceebb39a4d8e739ba36 Author: Jens Axboe Date: Sat Oct 13 15:44:12 2018 -0600 block: remove non mq parts from the flush code Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 7ca01926463a15f5d2681458643b2453930b873a Author: Jens Axboe Date: Wed Oct 24 03:39:36 2018 -0600 block: remove legacy rq tagging It's now unused, kill it. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 2cdf2caecda6cb16c24c6bdd2484d4cec99cfbb3 Author: Jens Axboe Date: Thu Oct 11 17:46:00 2018 -0600 blk-cgroup: remove legacy queue bypassing We only support mq devices now. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 3c7741567b8188f55e3704e56bed96460bf8d396 Author: Jens Axboe Date: Fri Oct 12 10:04:48 2018 -0600 blk-wbt: kill check for legacy queue type Everything is blk-mq at this point, so it doesn't make any sense to have this option available as it does nothing. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 771a93c489bf486b957c7399f89ee06d43ba2d93 Author: Jens Axboe Date: Mon Oct 22 05:12:32 2018 -0600 block: remove blk_complete_request() It's now unused. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit cd2f076f1d7ac20a93029ab38646b303f1c1468e Author: Jens Axboe Date: Wed Oct 24 07:11:39 2018 -0600 bsg: convert to use blk-mq Requires a few changes to the FC transport class as well. Cc: linux-scsi@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Benjamin Block Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 5e28b8d8a1b03ce86f33d38a64a4983d2b5c7679 Author: Jens Axboe Date: Fri Oct 26 11:27:02 2018 -0600 bsg: provide bsg_remove_queue() helper All drivers do unregister + cleanup, provide a helper for that. Cc: linux-scsi@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Tested-by: Benjamin Block Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit aae3b069d5ce865ca5ef2902c2a22cef7ab4f3a2 Author: Jens Axboe Date: Fri Oct 26 11:26:25 2018 -0600 bsg: pass in desired timeout handler This will ease in the conversion to blk-mq, where we can't set a timeout handler after queue init. Cc: Johannes Thumshirn Cc: linux-scsi@vger.kernel.org Reviewed-by: Hannes Reinecke Tested-by: Benjamin Block Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 583d6535cb9dadfd2678acfad27231076eeccf8e Author: Jens Axboe Date: Thu Oct 25 11:07:57 2018 +0200 dasd: remove dead code Since e443343e509a we haven't had a request_fn attached to this driver, hence any code inside an if (q->request_fn) is unreachable. Fixes: e443343e509a ("s390/dasd: blk-mq conversion") [sth: Keep and fix the dasd_info->chanq_len counter.] Reviewed-by: Hannes Reinecke Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit c6f2882691e8fd128083abdcc3c5aa5b410c2367 Author: Jens Axboe Date: Mon Oct 29 10:22:19 2018 -0600 block: remove q->lld_busy_fn() Nobody is using the legacy path for blk_lld_busy() anymore, remove it. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 Author: Jens Axboe Date: Thu Nov 1 16:36:27 2018 -0600 scsi: kill off the legacy IO path This removes the legacy (non-mq) IO path for SCSI. Cc: linux-scsi@vger.kernel.org Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 3a7ea2c483a53fc89e336f69c6ee1d7defe00811 Author: Jens Axboe Date: Mon Oct 29 10:17:28 2018 -0600 scsi: provide mq_ops->busy() hook Only the SCSI legacy path provides a way to check if target is currently busy, provide the same for the MQ path. Cc: linux-scsi@vger.kernel.org Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 9ba20527f4d1430b5f3e5f566be5af3e156a3284 Author: Jens Axboe Date: Mon Oct 29 10:15:10 2018 -0600 blk-mq: provide mq_ops->busy() hook We'll hook into this from blk_lld_busy(), allowing blk-mq to also return whether or not a given queue currently has requests in progress. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit ba7b443422d66b765c1aafe67b050be7dad7c676 Author: Jens Axboe Date: Thu Oct 11 18:06:02 2018 -0600 blk-mq: remove legacy check in queue blk_freeze_queue() Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 7ac257b862f2cfba3a909d1051499d390cffad6c Author: Jens Axboe Date: Thu Oct 11 17:03:21 2018 -0600 blk-mq: remove the request_list usage We don't do anything with it, that's just the legacy path. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit 600335205b8d162891b5ef2e32343f5b8020efd8 Author: Jens Axboe Date: Fri Oct 26 09:53:52 2018 -0600 ide: convert to blk-mq ide-disk and ide-cd tested as working just fine, ide-tape and ide-floppy haven't. But the latter don't require changes, so they should work without issue. Add helper function to insert a request from a work queue, since we cannot invoke the blk-mq request insertion from IRQ context. Cc: David Miller Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit d0be12274dad242271fb2055275d10b67a0d7649 Author: Jens Axboe Date: Mon Oct 15 09:00:02 2018 -0600 mspro_block: convert to blk-mq Straight forward conversion, there's room for improvement. Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit db1142a83b4caf73b6510d0efd6ef3ab7a508105 Author: Jens Axboe Date: Mon Oct 15 08:58:05 2018 -0600 ms_block: convert to blk-mq Straight forward conversion, room for optimization in how everything is punted to a work queue. Also looks plenty racy all over the map, with the state changes. I fixed a bunch of them up while doing the conversion, but there are surely more. Cc: Maxim Levitsky Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit fa182a1fa97dff56cda742f22d17d666420cd27f Author: Jens Axboe Date: Mon Oct 15 08:54:23 2018 -0600 sunvdc: convert to blk-mq Convert from the old request_fn style driver to blk-mq. Cc: David Miller Reviewed-by: Hannes Reinecke Tested-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe commit ea2c18e1044e9ed8f780c965c50432060ab0e355 Author: Masato Suzuki Date: Tue Oct 30 16:14:05 2018 +0900 null_blk: Add conventional zone configuration for zoned support Allow the creation of conventional zones by adding the zone_nr_conv configuration attribute. This new attribute is used only for zoned devices and indicates the number of conventional zones to create. The default value is 0. Since host-managed zoned block devices must always have at least one sequential zone, if the value of zone_nr_conv is larger than or equal to the total number of zones of the device nr_zones, zone_nr_conv is automatically changed to nr_zones - 1. Reviewed-by: Matias Bjorling Reviewed-by: Damien Le Moal Signed-off-by: Masato Suzuki Signed-off-by: Jens Axboe commit 210ba1201ff950b3d05bfd8fa5d47540cea393c0 Author: Woods, Brian Date: Tue Nov 6 20:08:21 2018 +0000 hwmon/k10temp: Add support for AMD family 17h, model 30h CPUs Add support for AMD family 17h model 30h processors for k10temp. Model 30h is functionally the same as model 01h processors (as far as k10temp is concerned), just the PCI device IDs need to be updated. Signed-off-by: Brian Woods Signed-off-by: Borislav Petkov Acked-by: Guenter Roeck CC: Bjorn Helgaas CC: Clemens Ladisch CC: "H. Peter Anvin" CC: Ingo Molnar CC: Jean Delvare CC: Jia Zhang CC: CC: CC: Pu Wen CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/20181106200754.60722-5-brian.woods@amd.com commit be3518a16ef270e3b030a6ae96055f83f51bd3dd Author: Woods, Brian Date: Tue Nov 6 20:08:18 2018 +0000 x86/amd_nb: Add PCI device IDs for family 17h, model 30h Add the PCI device IDs for family 17h model 30h, since they are needed for accessing various registers via the data fabric/SMN interface. Signed-off-by: Brian Woods Signed-off-by: Borislav Petkov CC: Bjorn Helgaas CC: Clemens Ladisch CC: Guenter Roeck CC: "H. Peter Anvin" CC: Ingo Molnar CC: Jean Delvare CC: Jia Zhang CC: CC: CC: Pu Wen CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/20181106200754.60722-4-brian.woods@amd.com commit 556e4c62baffa71e2045a298379db7e57dd47f3d Author: Woods, Brian Date: Tue Nov 6 20:08:16 2018 +0000 x86/amd_nb: Add support for newer PCI topologies Add support for new processors which have multiple PCI root complexes per data fabric/system management network interface. If there are (N) multiple PCI roots per DF/SMN interface, then the PCI roots are redundant (as far as SMN/DF access goes). For each DF/SMN interface: map to the first available PCI root and skip the next N-1 PCI roots so the following DF/SMN interface get mapped to a correct PCI root. Ex: DF/SMN 0 -> 60 40 20 00 DF/SMN 1 -> e0 c0 a0 80 Signed-off-by: Brian Woods Signed-off-by: Borislav Petkov CC: Bjorn Helgaas CC: Clemens Ladisch CC: Guenter Roeck CC: "H. Peter Anvin" CC: Ingo Molnar CC: Jean Delvare CC: Jia Zhang CC: CC: CC: Pu Wen CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/20181106200754.60722-3-brian.woods@amd.com commit dedf7dce4cec5c0abe69f4fa6938d5100398220b Author: Woods, Brian Date: Tue Nov 6 20:08:14 2018 +0000 hwmon/k10temp, x86/amd_nb: Consolidate shared device IDs Consolidate shared PCI_DEVICE_IDs that were scattered through k10temp and amd_nb, and move them into pci_ids. Signed-off-by: Brian Woods Signed-off-by: Borislav Petkov Acked-by: Guenter Roeck CC: Bjorn Helgaas CC: Clemens Ladisch CC: "H. Peter Anvin" CC: Ingo Molnar CC: Jean Delvare CC: Jia Zhang CC: CC: CC: Pu Wen CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/20181106200754.60722-2-brian.woods@amd.com commit a33e1ece777996ddddb1f23a30f8c66422ed0b68 Author: Imre Deak Date: Fri Nov 2 20:22:00 2018 +0200 drm/i915/icl: Fix power well 2 wrt. DC-off toggling order To enable DC5/6 power well 2 has to be disabled as for previous platforms, so fix things up. Bspec: 4234 Fixes: 67ca07e7ac10 ("drm/i915/icl: Add power well support") Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181102182200.17219-1-imre.deak@intel.com commit 9a64c65083b910b3557b317dc56e1e93063ac350 Author: Lyude Paul Date: Tue Nov 6 16:30:16 2018 -0500 drm/i915: Add short HPD IRQ storm detection for non-MST systems Unfortunately, it seems that the HPD IRQ storm problem from the early days of Intel GPUs was never entirely solved, only mostly. Within the last couple of days, I got a bug report from one of our customers who had been having issues with their machine suddenly booting up very slowly after having updated. The amount of time it took to boot went from around 30 seconds, to over 6 minutes consistently. After some investigation, I discovered that i915 was reporting massive amounts of short HPD IRQ spam on this system from the DisplayPort port, despite there not being anything actually connected. The symptoms would start with one "long" HPD IRQ being detected at boot: [ 1.891398] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00440000, dig 0x00440000, pins 0x000000a0 [ 1.891436] [drm:intel_hpd_irq_handler [i915]] digital hpd port B - long [ 1.891472] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 5 - cnt: 0 [ 1.891508] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - long [ 1.891544] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 7 - cnt: 0 [ 1.891592] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port B - long [ 1.891628] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port D - long … followed by constant short IRQs afterwards: [ 1.895091] [drm:intel_encoder_hotplug [i915]] [CONNECTOR:66:DP-1] status updated from unknown to disconnected [ 1.895129] [drm:i915_hotplug_work_func [i915]] Connector DP-3 (pin 7) received hotplug event. [ 1.895165] [drm:intel_dp_detect [i915]] [CONNECTOR:72:DP-3] [ 1.895275] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080 [ 1.895312] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short [ 1.895762] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080 [ 1.895799] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short [ 1.896239] [drm:intel_dp_aux_xfer [i915]] dp_aux_ch timeout status 0x71450085 [ 1.896293] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080 [ 1.896330] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short [ 1.896781] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080 [ 1.896817] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short [ 1.897275] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080 The customer's system in question has a GM45 GPU, which is apparently well known for hotplugging storms. So, workaround this impressively broken hardware by changing the default HPD storm threshold from 5 to 50. Then, make long IRQs count for 10, and short IRQs count for 1. This makes it so that 5 long IRQs will trigger an HPD storm, and on systems with short HPD storm detection 50 short IRQs will trigger an HPD storm. 50 short IRQs amounts to 100ms of constant pulsing, which seems like a good middleground between being too sensitive and not being sensitive enough (which would cause visible stutters in userspace every time a storm occurs). And just to be extra safe: we don't enable this by default on systems with MST support. There's too high of a chance of MST support triggering storm detection, and systems that are new enough to support MST are a lot less likely to have issues with IRQ storms anyway. As a note: this patch was tested using a ThinkPad T450s and a Chamelium to simulate the short IRQ storms. Changes since v1: - Don't use two separate thresholds, just make long IRQs count for 10 each and short IRQs count for 1. This simplifies the code a bit - Ville Syrjälä Changes since v2: - Document @long_hpd in intel_hpd_irq_storm_detect, no functional changes Changes since v4: - Remove !! in long_hpd assignment - Ville Syrjälä - queue_hp = true - Ville Syrjälä Signed-off-by: Lyude Paul Cc: Ville Syrjälä Cc: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-6-lyude@redhat.com commit 0759af9e75ca154602e28ef135bf980d1f2f4f30 Author: Lyude Paul Date: Tue Nov 6 16:30:15 2018 -0500 drm/i915: Clarify flow for disabling IRQs on storms This is rather confusing to look at as-is: dev_priv->display.hpd_irq_setup(dev_priv); in intel_hpd_irq_handler() handles disabling the actual HPD IRQ, while intel_hpd_irq_storm_disable() handles moving the HPD pin state over from MARK_DISABLED to DISABLED along with enabling polling for it. Changes since v3: - Rename i915_hpd_irq_storm_disable() to i915_hpd_irq_storm_switch_to_polling() - Rodrigo Vivi Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-5-lyude@redhat.com commit a4af7889eb31f52f4fc4d8fae4e66eae04140125 Author: Lyude Paul Date: Tue Nov 6 16:30:14 2018 -0500 drm/i915: Fix threshold check in intel_hpd_irq_storm_detect() Currently in intel_hpd_irq_storm_detect() when we detect that the last recorded hotplug wasn't within the period defined by HPD_STORM_DETECT_DELAY, we make the mistake of resetting the HPD count to 0 without incrementing it. This results in us only enabling storm detection when we go +2 above the threshold, e.g. an HPD threshold of 5 would not trigger a storm until we reach a total of 7 hotplugs. So: rework the code a bit so we reset the HPD count when HPD_STORM_DETECT_DELAY has passed, then increment the count afterwards. Also, clean things up a bit to make it easier to undertand. Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-4-lyude@redhat.com commit fee61deecb1d850bf34f682a6a452e5ee51b7572 Author: Lyude Paul Date: Tue Nov 6 16:30:13 2018 -0500 drm/i915: Fix NULL deref when re-enabling HPD IRQs on systems with MST Turns out that if you trigger an HPD storm on a system that has an MST topology connected to it, you'll end up causing the kernel to eventually hit a NULL deref: [ 332.339041] BUG: unable to handle kernel NULL pointer dereference at 00000000000000ec [ 332.340906] PGD 0 P4D 0 [ 332.342750] Oops: 0000 [#1] SMP PTI [ 332.344579] CPU: 2 PID: 25 Comm: kworker/2:0 Kdump: loaded Tainted: G O 4.18.0-rc3short-hpd-storm+ #2 [ 332.346453] Hardware name: LENOVO 20BWS1KY00/20BWS1KY00, BIOS JBET71WW (1.35 ) 09/14/2018 [ 332.348361] Workqueue: events intel_hpd_irq_storm_reenable_work [i915] [ 332.350301] RIP: 0010:intel_hpd_irq_storm_reenable_work.cold.3+0x2f/0x86 [i915] [ 332.352213] Code: 00 00 ba e8 00 00 00 48 c7 c6 c0 aa 5f a0 48 c7 c7 d0 73 62 a0 4c 89 c1 4c 89 04 24 e8 7f f5 af e0 4c 8b 04 24 44 89 f8 29 e8 <41> 39 80 ec 00 00 00 0f 85 43 13 fc ff 41 0f b6 86 b8 04 00 00 41 [ 332.354286] RSP: 0018:ffffc90000147e48 EFLAGS: 00010006 [ 332.356344] RAX: 0000000000000005 RBX: ffff8802c226c9d4 RCX: 0000000000000006 [ 332.358404] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff88032dc95570 [ 332.360466] RBP: 0000000000000005 R08: 0000000000000000 R09: ffff88031b3dc840 [ 332.362528] R10: 0000000000000000 R11: 000000031a069602 R12: ffff8802c226ca20 [ 332.364575] R13: ffff8802c2268000 R14: ffff880310661000 R15: 000000000000000a [ 332.366615] FS: 0000000000000000(0000) GS:ffff88032dc80000(0000) knlGS:0000000000000000 [ 332.368658] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 332.370690] CR2: 00000000000000ec CR3: 000000000200a003 CR4: 00000000003606e0 [ 332.372724] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 332.374773] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 332.376798] Call Trace: [ 332.378809] process_one_work+0x1a1/0x350 [ 332.380806] worker_thread+0x30/0x380 [ 332.382777] ? wq_update_unbound_numa+0x10/0x10 [ 332.384772] kthread+0x112/0x130 [ 332.386740] ? kthread_create_worker_on_cpu+0x70/0x70 [ 332.388706] ret_from_fork+0x35/0x40 [ 332.390651] Modules linked in: i915(O) vfat fat joydev btusb btrtl btbcm btintel bluetooth ecdh_generic iTCO_wdt wmi_bmof i2c_algo_bit drm_kms_helper intel_rapl syscopyarea sysfillrect x86_pkg_temp_thermal sysimgblt coretemp fb_sys_fops crc32_pclmul drm psmouse pcspkr mei_me mei i2c_i801 lpc_ich mfd_core i2c_core tpm_tis tpm_tis_core thinkpad_acpi wmi tpm rfkill video crc32c_intel serio_raw ehci_pci xhci_pci ehci_hcd xhci_hcd [last unloaded: i915] [ 332.394963] CR2: 00000000000000ec This appears to be due to the fact that with an MST topology, not all intel_connector structs will have ->encoder set. So, fix this by skipping connectors without encoders in intel_hpd_irq_storm_reenable_work(). For those wondering, this bug was found on accident while simulating HPD storms using a Chamelium connected to a ThinkPad T450s (Broadwell). Changes since v1: - Check intel_connector->mst_port instead of intel_connector->encoder Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: stable@vger.kernel.org Cc: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-3-lyude@redhat.com commit 66a5ab1034be801630816d1fa6cfc30db1a2f0b0 Author: Lyude Paul Date: Tue Nov 6 16:30:12 2018 -0500 drm/i915: Fix possible race in intel_dp_add_mst_connector() This hasn't caused any issues yet that I'm aware of, but as Ville Syrjälä pointed out - we need to make sure that intel_connector->mst_port is set before initializing MST connectors, since in theory we could potentially check intel_connector->mst_port in i915_hpd_poll_init_work() after registering the connector but before having written it's value. Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Cc: Rodrigo Vivi Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-2-lyude@redhat.com commit f601a85bd7883708f48911d8c88e69fe5bde2b4d Author: YueHaibing Date: Wed Nov 7 02:33:53 2018 +0000 net: hns3: Remove set but not used variable 'reset_level' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c: In function 'hclge_log_and_clear_ppp_error': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c:821:24: warning: variable 'reset_level' set but not used [-Wunused-but-set-variable] enum hnae3_reset_type reset_level = HNAE3_NONE_RESET; It never used since introduction in commit 01865a50d78f ("net: hns3: Add enable and process hw errors of TM scheduler") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 75790a74257baa0d8bda8f8f4cfd7306af9a0305 Merge: 6a02d1fa0371b 0c665e2bf440a Author: David S. Miller Date: Wed Nov 7 11:45:22 2018 -0800 Merge branch 'nfp-more-set-actions-and-notifier-refactor' Jakub Kicinski says: ==================== nfp: more set actions and notifier refactor This series brings updates to flower offload code. First Pieter adds support for setting TTL, ToS, Flow Label and Hop Limit fields in IPv4 and IPv6 headers. Remaining 5 patches deal with factoring out netdev notifiers from flower code. We already have two instances, and more is coming, so it's time to move to one central notifier which then feeds individual feature handlers. I start that part by cleaning up the existing notifiers. Next a central notifier is added, and used by flower offloads. ==================== Signed-off-by: David S. Miller commit 0c665e2bf440a59a2f5c5fe7657f13aef3fe92f2 Author: Jakub Kicinski Date: Tue Nov 6 17:07:34 2018 -0800 nfp: flower: use the common netdev notifier Use driver's common notifier for LAG and tunnel configuration. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 3e333590400b7bc97449d3db4ac68cf88d9bdafc Author: Jakub Kicinski Date: Tue Nov 6 17:07:33 2018 -0800 nfp: register a notifier handler in a central location for the device Code interested in networking events registers its own notifier handlers. Create one device-wide notifier instance. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 659bb404eb00536cec57315b460c6296e8ebe6ab Author: Jakub Kicinski Date: Tue Nov 6 17:07:32 2018 -0800 nfp: flower: make nfp_fl_lag_changels_event() void nfp_fl_lag_changels_event() never fails, and therefore we would never return NOTIFY_BAD for NETDEV_CHANGELOWERSTATE. Make this clearer by changing nfp_fl_lag_changels_event()'s return type to void. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit a558c982a8ab43ec4262e7fd5e8d462e5fdabe45 Author: Jakub Kicinski Date: Tue Nov 6 17:07:31 2018 -0800 nfp: flower: don't try to nack device unregister events Returning an error from a notifier means we want to veto the change. We shouldn't veto NETDEV_UNREGISTER just because we couldn't find the tracking info for given master. I can't seem to find a way to trigger this unless we have some other bug, so it's probably not fix-worthy. While at it move the checking if the netdev really is of interest into the handling functions, like we do for other events. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit e50bfdf74d5f81c81f7a00498aa7fd1cba53b65b Author: Jakub Kicinski Date: Tue Nov 6 17:07:30 2018 -0800 nfp: flower: remove unnecessary iteration over devices For flower tunnel offloads FW has to be informed about MAC addresses of tunnel devices. We use a netdev notifier to keep track of these addresses. Remove unnecessary loop over netdevices after notifier is registered. The intention of the loop was to catch devices which already existed on the system before nfp driver got loaded, but netdev notifier will replay NETDEV_REGISTER events. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller commit 4234d62c27a633a089506f0b05040d7c6ff5fd6c Author: Pieter Jansen van Vuuren Date: Tue Nov 6 17:07:29 2018 -0800 nfp: flower: add ipv6 set flow label and hop limit offload Add ipv6 set flow label and hop limit action offload. Since pedit sets headers per 4 byte word, we need to ensure that setting either version, priority, payload_len or nexthdr does not get offloaded. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit a3c6b063fee70a7ceae385741210f39b1ec2ab94 Author: Pieter Jansen van Vuuren Date: Tue Nov 6 17:07:28 2018 -0800 nfp: flower: add ipv4 set ttl and tos offload Add ipv4 set ttl and tos action offload. Since pedit sets headers per 4 byte word, we need to ensure that setting either version, ihl, protocol, total length or checksum does not get offloaded. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6a02d1fa0371b566f8a7586a520ca5f34078270e Merge: 7c588c7468ea3 8b0195a30585f Author: David S. Miller Date: Wed Nov 7 11:42:18 2018 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== hns3: provide new interfaces & bugfixes & code optimization This patchset provides some reset interfaces for RAS & RoCE, also some bugfixes and optimization related to reset. ==================== Signed-off-by: David S. Miller commit 8b0195a30585fefd4c181881077b4181670ca85d Author: Huazhong Tan Date: Wed Nov 7 12:06:18 2018 +0800 net: hns3: fix for cmd queue memory not freed problem during reset It is not necessary to reallocate the descriptor and remap the descriptor memory in reset process, otherwise it may cause memory not freed problem. Also, this patch initializes the cmd queue's spinlocks in hclgevf_alloc_cmd_queue, and take the spinlocks when reinitializing cmd queue' registers. Fixes: fedd0c15d288 ("net: hns3: Add HNS3 VF IMP(Integrated Management Proc) cmd interface") Signed-off-by: Huazhong Tan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 65e41e7e683862136a817f29a1a457ecdf37ba8a Author: Huazhong Tan Date: Wed Nov 7 12:06:17 2018 +0800 net: hns3: add error handler for hclge_reset() When hclge_reset() is called, it may fail for several reasons. For example, an higher-level reset event occurs, memory allocation failure, hardware reset timeout, etc. Therefore, it is necessary to add corresponding error handling for these situations. 1. A high-level reset is required due to a high-level reset failure. 2. For memory allocation failure, a high-level reset is initiated by the timer to recover. The reason for using the timer is to prevent this new high-level reset to interrupt the reset process of other pf/vf; 3. For the case of hardware reset timeout, reschedule the reset task to wait for the hardware to complete the reset. For memory allocation failure and reset timeouts, in order to prevent an infinite number of scheduled reset tasks, the number of error recovery needs to be limited. This patch also add some reset related debug log printing. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f403a84fb25ea5a49cf9d6d27f522e8f752ef36f Author: Huazhong Tan Date: Wed Nov 7 12:06:16 2018 +0800 net: hns3: call roce's reset notify callback when resetting While doing resetting, roce should do its uninitailization part before nic's, and do its initialization part after nic's. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 35d93a30040c3884d8752c35a3fc1200d8f96b1b Author: Huazhong Tan Date: Wed Nov 7 12:06:15 2018 +0800 net: hns3: adjust the process of PF reset When doing PF reset, the driver needs to do some preparatory work before asserting PF reset. Since when hardware is resetting, it is necessary to stop tx/rx queue, clear hardware table, etc, otherwise hardware may run into unrecoverable state if there is still IO running when the hardware is resetting. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0742ed7c240ceadc4472ab5a80bcb2a5f05e7ff8 Author: Huazhong Tan Date: Wed Nov 7 12:06:14 2018 +0800 net: hns3: move some reset information from hnae3_handle into hclge_dev/hclgevf_dev Saving reset related information in the hclge_dev/hclgevf_dev structure is more suitable than the hnae3_handle, since hardware related information is kept in these two structure. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7cea834d942c2d47ebb81fba0e44d2ce6172c0ae Author: Huazhong Tan Date: Wed Nov 7 12:06:13 2018 +0800 net: hns3: ignore new coming low-level reset while doing high-level reset When processing a higher level reset, the pending lower level reset does not have to be processed anymore, because the higher level reset is the superset of the lower level reset. Therefore, when processing an higher level reset, the request of lower level reset needs to be cleared. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 257e4f29946ab8e257ee9bfbc35e680726298571 Author: Huazhong Tan Date: Wed Nov 7 12:06:12 2018 +0800 net: hns3: use HNS3_NIC_STATE_RESETTING to indicate resetting While hclge is going to reset, it will notify its client with HNAE3_DOWN_CLIENT, so this client should get into a resetting status from this moment, other operations from the stack need to be blocked as well. And when the reset is finished, the client will be notified with HNAE3_UP_CLIENT, so this is the end of the resetting status. This patch uses HNS3_NIC_STATE_RESETTING flag to implement that, and adds hns3_nic_resetting() to indicate which operation is not allowed. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8df0fa91682c86403173f0813a615efb46e8be42 Author: Huazhong Tan Date: Wed Nov 7 12:06:11 2018 +0800 net: hns3: enable/disable ring in the enet while doing UP/DOWN While hardware gets into reset status, the firmware will not respond to driver's command request, which may cause ring not disabled problem during reset process. So this patch uses register instead of command to enable/disable the ring in the enet while doing UP/DOWN operation. Also, HNS3_RING_RX_VM_REG is previously unused, so change it to the correct meaning, and add a wrapper function for readl(). Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7edff5339a4a7515b5c4b72338c679c5eb402923 Author: Huazhong Tan Date: Wed Nov 7 12:06:10 2018 +0800 net: hns3: adjust the location of clearing the table when doing reset When doing a function reset, the hardware table should be cleared before the hardware reset. In current code, this clearing is done in hns3_reset_notify_uninit_enet, but it is too late, because the hardware reset is already done, hns3_reset_notify_down_enet is more suitable to do that. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 4d60291b6b53afd246a57817fdae0c61a4655182 Author: Huazhong Tan Date: Wed Nov 7 12:06:09 2018 +0800 net: hns3: provide some interface & information for the client The client needs to know if the hardware is resetting when loading or unloading itself, because client may abort the loading process or wait for the reset process to finish when unloading if hardware is resetting. So this patch provides these interfaces to do it. 1. get_hw_reset_stat, the reset status of hardware. 2. ae_dev_resetting, whether reset task is scheduling. 3. ae_dev_reset_cnt, how many reset has been done. Also, the RoCE client needs some field in the hnae3_roce_private_info to save its state, and process_hw_error interface in the hnae3_client_ops to process hardware errors. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 720bd5837e3721f553a896a00da4a99ea12f0551 Author: Huazhong Tan Date: Wed Nov 7 12:06:08 2018 +0800 net: hns3: add set_default_reset_request in the hnae3_ae_ops Currently, when reset_event is called because of tx timeout, it will upgrade the reset level (For PF, HNAE3_FUNC_RESET -> HNAE3_CORE_RESET -> HNAE3_GLOBAL_RESET) if the time between the new reset and last reset is within 20 secs, or restore the reset level to HNAE3_FUNC_RESET if the time between the new reset and last reset is over 20 secs. There is requirement that the caller needs to decide the reset level when triggering a reset, for example, RAS recovery. So this patch adds the set_default_reset_request to meet this requirement. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 814da63c557726e60b06a206ec8c1123f176d392 Author: Huazhong Tan Date: Wed Nov 7 12:06:07 2018 +0800 net: hns3: use HNS3_NIC_STATE_INITED to indicate the initialization state of enet Besides of module_init and module_exit, the process of reset will also uninitialize and initialize the enet client. When reset process fails with enet client uninitialized, the module_exit does not need to uninitialize the enet client, otherwise it may cause double uninitialization problem. So we need the HNS3_NIC_STATE_INITED flag to indicate whether the enet client is initialized. Also HNS3_NIC_STATE_REINITING is previously unused, so change it to HNS3_NIC_STATE_INITED. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 96c1c58eb0d715d3f66f374bb07aa96cb7cdd1fa Author: YueHaibing Date: Wed Nov 7 10:22:37 2018 +0800 EDAC, i82975x: Remove set but not used variable dtype Fix this gcc -Wunused-but-set-variable warning: drivers/edac/i82975x_edac.c:378:16: warning: variable 'dtype' set but not used [-Wunused-but-set-variable] It was introduced in 084a4fccef39 ("edac: move dimm properties to struct dimm_info") but never used. Also, remove the function i82975x_dram_type() and move the comment and the assignment to the place where it is used. [ bp: massage commit message and shorten comment. ] Signed-off-by: YueHaibing Signed-off-by: Borislav Petkov CC: "Arvind R." CC: Mauro Carvalho Chehab CC: ravi@jetztechnologies.com CC: arvino55@gmail.com CC: linux-edac Link: http://lkml.kernel.org/r/20181107022237.14048-1-yuehaibing@huawei.com commit d0105af939769393d6447a04cee2d1ae12e3f09a Author: Ville Syrjälä Date: Thu Nov 1 17:17:36 2018 +0200 drm/i915: Clean up skl_program_scaler() Remove the "sizes are 0 based" stuff that is not even true for the scaler. v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101151736.20522-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit e69b348a7adb5cd68d2427d4f97af58199a55d4d Author: Ville Syrjälä Date: Thu Nov 1 17:05:52 2018 +0200 drm/i915: Nuke posting reads from plane update/disable funcs No need for the posting reads in the plane update/disable hooks. If we need a posting read for something then a single one at the very end would be sufficient. We have that anyway in the form of eg. scanline/frame counter reads. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101150605.18235-2-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 920664a8f79084df50033f0ff26238d7d32dcede Author: Sasha Neftin Date: Thu Oct 25 10:06:18 2018 +0300 igc: Clean up code Address few community comments. Remove unused code, will be added per demand. Remove blank lines and unneeded includes. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit e1f65b0d70e9e5c80e15105cd96fa00174d7c436 Author: Miroslav Lichvar Date: Tue Oct 23 14:37:39 2018 +0200 e1000e: allow non-monotonic SYSTIM readings It seems with some NICs supported by the e1000e driver a SYSTIM reading may occasionally be few microseconds before the previous reading and if enabled also pass e1000e_sanitize_systim() without reaching the maximum number of rereads, even if the function is modified to check three consecutive readings (i.e. it doesn't look like a double read error). This causes an underflow in the timecounter and the PHC time jumps hours ahead. This was observed on 82574, I217 and I219. The fastest way to reproduce it is to run a program that continuously calls the PTP_SYS_OFFSET ioctl on the PHC. Modify e1000e_phc_gettime() to use timecounter_cyc2time() instead of timecounter_read() in order to allow non-monotonic SYSTIM readings and prevent the PHC from jumping. Cc: Richard Cochran Signed-off-by: Miroslav Lichvar Acked-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit bb9089b668d65ac94f771e5ef6b2431c70697830 Author: Dan Carpenter Date: Fri Oct 19 22:57:47 2018 +0300 igc: Tidy up some white space I just cleaned up a couple small white space issues. Signed-off-by: Dan Carpenter Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 14b21cec85858001b2134c0ac251fb8673d7ad67 Author: Colin Ian King Date: Fri Oct 19 19:16:15 2018 +0100 igc: fix error return handling from call to netif_set_real_num_tx_queues The call to netif_set_real_num_tx_queues is not assigning the error return to variable err even though the next line checks err for an error. Fix this by adding the missing err assignment. Detected by CoverityScan, CID#1474551 ("Logically dead code") Fixes: 3df25e4c1e66 ("igc: Add interrupt support") Signed-off-by: Colin Ian King Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 84cfa53740e137a7ead9aab26e1ad0704fe21caa Author: YueHaibing Date: Fri Oct 19 12:48:11 2018 +0000 igc: Remove set but not used variable 'pci_using_dac' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/intel/igc/igc_main.c: In function 'igc_probe': drivers/net/ethernet/intel/igc/igc_main.c:3535:11: warning: variable 'pci_using_dac' set but not used [-Wunused-but-set-variable] It never used since introduction in commit d89f88419f99 ("igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support") Signed-off-by: YueHaibing Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit dda458d28567d0bb99ad67180a72aaff2e0adc3b Author: YueHaibing Date: Fri Oct 19 12:40:30 2018 +0000 igc: Remove set but not used variables 'ctrl_ext, link_mode' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/intel/igc/igc_base.c: In function 'igc_init_phy_params_base': drivers/net/ethernet/intel/igc/igc_base.c:240:6: warning: variable 'ctrl_ext' set but not used [-Wunused-but-set-variable] u32 ctrl_ext; drivers/net/ethernet/intel/igc/igc_base.c: In function 'igc_get_invariants_base': drivers/net/ethernet/intel/igc/igc_base.c:290:6: warning: variable 'link_mode' set but not used [-Wunused-but-set-variable] u32 link_mode = 0; It never used since introduction in commit c0071c7aa5fe ("igc: Add HW initialization code") Signed-off-by: YueHaibing Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 540a152da762a2360e0dac18e2eafff2775c4670 Author: Todd Fujinaka Date: Wed Oct 10 11:10:10 2018 -0700 i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE There's a new flag for setting WoL filters that is only enabled on one manufacturer's NICs, and it's not ours. Fail with EOPNOTSUPP. Signed-off-by: Todd Fujinaka Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a9e510589d7017ee4e82800d0a1d78a694772787 Author: Jacob Keller Date: Fri Oct 5 09:33:56 2018 -0700 intel-ethernet: software timestamp skbs as late as possible Many of the Intel Ethernet drivers call skb_tx_timestamp() earlier than necessary. Move the calls to this function to the latest point possible, just prior to notifying hardware of the new Tx packet when we bump the tail register. This affects i40e, iavf, igb, igc, and ixgbe. The e100, e1000, e1000e, fm10k, and ice drivers already call the skb_tx_timestamp() function just prior to indicating the Tx packet to hardware, so they do not need to be changed. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9fc145fcb5fbf2e10ad5e4b31a011b5cecb77b10 Author: Jacob Keller Date: Fri Oct 5 09:33:55 2018 -0700 ixgbevf: add support for software timestamps Add a call to skb_tx_timestamp in the ixgbevf_tx_map function. This enables software timestamping for packets sent over this device driver. The call is placed just prior to when we notify hardware of the new packet, in order to software timestamp as close as possible to when the hardware will transmit. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 7fa57ca443cffe81ce8416b57966bfb0370678a1 Author: Shannon Nelson Date: Thu Oct 4 16:28:52 2018 -0700 ixgbe: allow IPsec Tx offload in VEPA mode When it's possible that the PF might end up trying to send a packet to one of its own VFs, we have to forbid IPsec offload because the device drops the packets into a black hole. See commit 47b6f50077e6 ("ixgbe: disallow IPsec Tx offload when in SR-IOV mode") for more info. This really is only necessary when the device is in the default VEB mode. If instead the device is running in VEPA mode, the packets will go through the encryption engine and out the MAC/PHY as normal, and get "hairpinned" as needed by the switch. So let's not block IPsec offload when in VEPA mode. To get there with the ixgbe device, use the handy 'bridge' command: bridge link set dev eth1 hwmode vepa Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0db4a47c05e6b5f7dda2a5d8b213ade5373afa49 Author: Colin Ian King Date: Thu Oct 4 18:57:32 2018 +0100 ixgbe: don't clear_bit on xdp_ring->state if xdp_ring is null There is an earlier check to see if xdp_ring is null when configuring the tx ring, so assuming that it can still be null, the clearing of the xdp_ring->state currently could end up with a null pointer dereference. Fix this by only clearing the bit if xdp_ring is not null. Detected by CoverityScan, CID#1473795 ("Dereference after null check") Fixes: 024aa5800f32 ("ixgbe: added Rx/Tx ring disable/enable functions") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b86077207d0c08e181c7715bc75f50a3ad2fdf74 Author: Lance Roy Date: Tue Oct 2 22:38:51 2018 -0700 igbvf: Replace spin_is_locked() with lockdep lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit d9be05b784225e68cf0c9b95180d3081b4663745 Author: Ville Syrjälä Date: Tue Nov 6 21:16:24 2018 +0200 drm/atomic: Use explicit old/new state in drm_atomic_plane_check() Convert drm_atomic_plane_check() over to using explicit old vs. new plane states. Avoids the confusion of "what does plane->state mean again?". v2: Stick to the multi-stage logic in plane_switching_crtc() (Daniel) Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181106191624.2207-1-ville.syrjala@linux.intel.com commit b2432adf33e8c8eb81afaba3030f0ba0145ce7d4 Author: Ville Syrjälä Date: Thu Nov 1 20:46:45 2018 +0200 drm/atomic: Use explicit old/new state in drm_atomic_crtc_check() Convert drm_atomic_crtc_check() over to using explicit old vs. new crtc states. Avoids the confusion of "what does crtc->state mean again?". Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101184646.14753-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 534903d60376b4989b76ec445630aa10f2bc3043 Author: Ville Syrjälä Date: Thu Nov 1 20:46:44 2018 +0200 drm/atomic: Use explicit old crtc state in drm_atomic_add_affected_planes() Replace 'crtc->state' with the explicit old crtc state. Actually it shouldn't matter whether we use the old or the new crtc state here since any plane that has been removed from the crtc since the crtc state was duplicated will have been added to the atomic state already. That is, you can't call drm_atomic_set_crtc_for_plane() without having the new plane state already in hand. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181101184646.14753-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Harry Wentland commit 99e294492ef9eb7edaf92b1280377abd07f99c40 Author: Thomas Zimmermann Date: Wed Sep 26 13:41:39 2018 +0200 drm/etnaviv: Replace drm_dev_unref with drm_dev_put This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Signed-off-by: Lucas Stach commit 5132b3d283710d196cd8af99b5585507e8b30709 Author: Linus Walleij Date: Thu Nov 1 22:25:04 2018 +0100 spi: gpio: Support 3WIRE high-impedance turn-around Some devices such as the TPO TPG110 display panel require a "high-impedance turn-around", in effect a clock cycle after switching the line from output to input mode. Support this in the GPIO driver to begin with. Other driver may implement it if they can, it is unclear if this can be achieved with anything else than GPIO bit-banging. Cc: Andrzej Hajda Acked-by: Lorenzo Bianconi Signed-off-by: Linus Walleij Signed-off-by: Mark Brown commit df80e0478972260bf285c5ed33f99b2424fba2af Author: Fabrizio Castro Date: Thu Nov 1 12:35:02 2018 +0000 spi: rspi: Add r8a77470 to the compatible list Add r8a77470 to the list of examples with soctypes. No driver change is needed as "renesas,qspi" will activate the right code within the corresponding driver. Signed-off-by: Fabrizio Castro Signed-off-by: Mark Brown commit b598a88ebb97ce2d2d5520da555cc1f7d6beb796 Author: Colin Ian King Date: Wed Nov 7 10:22:11 2018 +0000 drm/i915/csr: fix spelling mistake "firmare" -> "firmware" Trivial fix to spelling mistake in DRM_INFO message Signed-off-by: Colin Ian King Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181107102211.19758-1-colin.king@canonical.com commit 55f99bf2a9c331838c981694bc872cd1ec4070b2 Author: Chris Wilson Date: Mon Nov 5 09:43:05 2018 +0000 drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5 Exercising the gpu reloc path strenuously revealed an issue where the updated relocations (from MI_STORE_DWORD_IMM) were not being observed upon execution. After some experiments with adding pipecontrols (a lot of pipecontrols (32) as gen4/5 do not have a bit to wait on earlier pipe controls or even the current on), it was discovered that we merely needed to delay the EMIT_INVALIDATE by several flushes. It is important to note that it is the EMIT_INVALIDATE as opposed to the EMIT_FLUSH that needs the delay as opposed to what one might first expect -- that the delay is required for the TLB invalidation to take effect (one presumes to purge any CS buffers) as opposed to a delay after flushing to ensure the writes have landed before triggering invalidation. Testcase: igt/gem_tiled_fence_blits Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181105094305.5767-1-chris@chris-wilson.co.uk commit 64e3d12f769d60eaee6d2e53a9b7f0b3814f32ed Author: Kuo-Hsin Yang Date: Tue Nov 6 13:23:24 2018 +0000 mm, drm/i915: mark pinned shmemfs pages as unevictable The i915 driver uses shmemfs to allocate backing storage for gem objects. These shmemfs pages can be pinned (increased ref count) by shmem_read_mapping_page_gfp(). When a lot of pages are pinned, vmscan wastes a lot of time scanning these pinned pages. In some extreme case, all pages in the inactive anon lru are pinned, and only the inactive anon lru is scanned due to inactive_ratio, the system cannot swap and invokes the oom-killer. Mark these pinned pages as unevictable to speed up vmscan. Export pagevec API check_move_unevictable_pages(). This patch was inspired by Chris Wilson's change [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Kuo-Hsin Yang Acked-by: Michal Hocko # mm part Reviewed-by: Chris Wilson Acked-by: Dave Hansen Acked-by: Andrew Morton Link: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson commit d3ff06b03c106171cdc7a718c4de724ce6ae346d Author: Yangtao Li Date: Mon Nov 5 09:37:30 2018 -0500 ASoC: fsl_ssi: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Mark Brown commit 81df42d10457d3aef5321e9772c8eef173adf7f7 Author: Vignesh R Date: Wed Nov 7 16:09:26 2018 +0530 spi: Kconfig: Enable McSPI driver for K3 platforms Enable McSPI driver to be built for K3 platforms, to support McSPI on AM654 SoC of K3 family. Signed-off-by: Vignesh R Signed-off-by: Mark Brown commit abc61f47a70f7c8331f00eff1ccb6557a9d4c224 Author: Vignesh R Date: Wed Nov 7 16:09:25 2018 +0530 spi: omap-spi: Add compatible for AM654 SoC AM654 SoC has same McSPI IP as OMAP2+ platforms. Add new compatible to support McSPI on AM654 SoC. Signed-off-by: Vignesh R Signed-off-by: Mark Brown commit c9094db02a06a947c52ffe5f376033444a0da8af Author: Bjorn Helgaas Date: Wed Nov 7 08:41:58 2018 -0600 MAINTAINERS: Add x86 early-quirks.c file pattern to PCI subsystem arch/x86/kernel/early-quirks.c contains special PCI quirks that need to run even before the usual DECLARE_PCI_FIXUP_EARLY() quirks. These have typically been merged by the x86 maintainers, which is fine, but PCI folks should at least see what's happening, so add a file pattern to the PCI subsystem entry. Signed-off-by: Bjorn Helgaas Acked-by: Ingo Molnar commit de226ebda96cafa981b9c0fef56888931668b671 Author: Geert Uytterhoeven Date: Sun Oct 28 17:09:22 2018 +0100 regulator: bd718x7: Remove double indirection for bd718xx_pmic_inits.rdatas With gcc 4.1: drivers/regulator/bd718x7-regulator.c: In function ‘bd718xx_probe’: drivers/regulator/bd718x7-regulator.c:1020: warning: initialization from incompatible pointer type drivers/regulator/bd718x7-regulator.c:1024: warning: initialization from incompatible pointer type Apparently this old compiler can't handle the obscure double indirection. However, there is no need for a double indirection. Just store a pointer to the array instead, like other drivers tend to do. Fixes: 494edd266b945f36 ("regulator/mfd: Support ROHM BD71847 power management IC") Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 68a385c6c75090798996db42d440db119056a10d Author: Geert Uytterhoeven Date: Wed Nov 7 14:47:53 2018 +0100 microblaze: Typo s/use use/use/ Trivial patch. Signed-off-by: Geert Uytterhoeven Signed-off-by: Michal Simek commit 71b12beaf12f21a53bfe100795d0797f1035b570 Author: João Paulo Rechi Vita Date: Wed Oct 31 17:21:28 2018 -0700 platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codes According to Asus firmware engineers, the meaning of these codes is only to notify the OS that the screen brightness has been turned on/off by the EC. This does not match the meaning of KEY_DISPLAYTOGGLE / KEY_DISPLAY_OFF, where userspace is expected to change the display brightness. Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko commit b3f2f3799a972d3863d0fdc2ab6287aef6ca631f Author: João Paulo Rechi Vita Date: Wed Oct 31 17:21:27 2018 -0700 platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK When the OS registers to handle events from the display off hotkey the EC will send a notification with 0x35 for every key press, independent of the backlight state. The behavior of this key on Windows, with the ATKACPI driver from Asus installed, is turning off the backlight of all connected displays with a fading effect, and any cursor input or key press turning the backlight back on. The key press or cursor input that wakes up the display is also passed through to the application under the cursor or under focus. The key that matches this behavior the closest is KEY_SCREENLOCK. Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko commit 78f3ac76d9e5219589718b9e4733bee21627b3f5 Author: João Paulo Rechi Vita Date: Wed Oct 31 17:21:26 2018 -0700 platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey In the past, Asus firmwares would change the panel backlight directly through the EC when the display off hotkey (Fn+F7) was pressed, and only notify the OS of such change, with 0x33 when the LCD was ON and 0x34 when the LCD was OFF. These are currently mapped to KEY_DISPLAYTOGGLE and KEY_DISPLAY_OFF, respectively. Most recently the EC on Asus most machines lost ability to toggle the LCD backlight directly, but unless the OS informs the firmware it is going to handle the display toggle hotkey events, the firmware still tries change the brightness through the EC, to no effect. The end result is a long list (at Endless we counted 11) of Asus laptop models where the display toggle hotkey does not perform any action. Our firmware engineers contacts at Asus were surprised that there were still machines out there with the old behavior. Calling WMNB(ASUS_WMI_DEVID_BACKLIGHT==0x00050011, 2) on the _WDG device tells the firmware that it should let the OS handle the display toggle event, in which case it will simply notify the OS of a key press with 0x35, as shown by the DSDT excerpts bellow. Scope (_SB) { (...) Device (ATKD) { (...) Name (_WDG, Buffer (0x28) { /* 0000 */ 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, /* 0008 */ 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, /* 0010 */ 0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B, /* 0018 */ 0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A, /* 0020 */ 0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08 }) Method (WMNB, 3, Serialized) { CreateDWordField (Arg2, Zero, IIA0) CreateDWordField (Arg2, 0x04, IIA1) Local0 = (Arg1 & 0xFFFFFFFF) (...) If ((Local0 == 0x53564544)) { (...) If ((IIA0 == 0x00050011)) { If ((IIA1 == 0x02)) { ^^PCI0.SBRG.EC0.SPIN (0x72, One) ^^PCI0.SBRG.EC0.BLCT = One } Return (One) } } (...) } (...) } (...) } (...) Scope (_SB.PCI0.SBRG.EC0) { (...) Name (BLCT, Zero) (...) Method (_Q10, 0, NotSerialized) // _Qxx: EC Query { If ((BLCT == Zero)) { Local0 = One Local0 = RPIN (0x72) Local0 ^= One SPIN (0x72, Local0) If (ATKP) { Local0 = (0x34 - Local0) ^^^^ATKD.IANE (Local0) } } ElseIf ((BLCT == One)) { If (ATKP) { ^^^^ATKD.IANE (0x35) } } } (...) } Signed-off-by: João Paulo Rechi Vita Signed-off-by: Andy Shevchenko commit 8055db3a5b7508872a2d0ab55ff8688ce0b1df63 Author: Zhang Xianwei Date: Thu Oct 11 13:59:31 2018 +0800 platform/x86: thinkpad_acpi: Change the keymap for Favorites hotkey The keycode KEY_FAVORITES(0x16c) used in thinkpad_acpi driver is too big (out of range > 255) for xorg to handle. xkeyboard-config has already mapped KEY_BOOKMARKS(156) to XF86Favorites: keycodes/evdev: = 164; // #define KEY_BOOKMARKS 156 symbols/inet: key { [ XF86Favorites ] }; So change the keymap to KEY_BOOKMARKS for Favorites hotkey. Signed-off-by: Zhang Xianwei Signed-off-by: Andy Shevchenko commit e84cd7ee630e44a2cc8ae49e85920a271b214cb3 Author: Ke Wu Date: Tue Nov 6 15:21:30 2018 -0800 modsign: use all trusted keys to verify module signature Make mod_verify_sig to use all trusted keys. This allows keys in secondary_trusted_keys to be used to verify PKCS#7 signature on a kernel module. Signed-off-by: Ke Wu Signed-off-by: Jessica Yu commit a24626d72915fef2b38bb8467b3714f17efae6c0 Author: Piotr Bugalski Date: Mon Nov 5 11:36:25 2018 +0100 dt-bindings: spi: QuadSPI driver for Atmel SAMA5D2 Atmel SAMA5D2 QuadSPI driver was moved from mtd to spi subsystem, this change is just moving DT-binding documentation. Suggested-by: Boris Brezillon Signed-off-by: Piotr Bugalski Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 0e6aae08e9ae7c2dc3c83bf6960d824feb14b706 Author: Piotr Bugalski Date: Mon Nov 5 11:36:24 2018 +0100 spi: Add QuadSPI driver for Atmel SAMA5D2 Kernel contains QSPI driver strongly tied to MTD and nor-flash memory. New spi-mem interface allows usage also other memory types, especially much larger NAND with SPI interface. This driver works as SPI controller and is not related to MTD, however can work with NAND-flash or other peripherals using spi-mem interface. Suggested-by: Boris Brezillon Signed-off-by: Piotr Bugalski Signed-off-by: Mark Brown commit 6ca622c87149a20a47abbb954f896f515e2292a7 Author: Piotr Bugalski Date: Mon Nov 5 11:36:23 2018 +0100 mtd: spi-nor: atmel-quadspi: Remove unused code from atmel-quadspi driver Code used for previous interface is no longer needed. This change just removes obsolete code. Suggested-by: Boris Brezillon Signed-off-by: Piotr Bugalski Signed-off-by: Mark Brown commit 2d30ac5ed633f5ad931d37fe46c748aa46f3cd8e Author: Piotr Bugalski Date: Mon Nov 5 11:36:22 2018 +0100 mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver Previously added spi-mem interface is now used instead of older approach. Suggested-by: Boris Brezillon Signed-off-by: Piotr Bugalski Signed-off-by: Mark Brown commit d5433def31531bd07984f167f6ab0afef70b6a3e Author: Piotr Bugalski Date: Mon Nov 5 11:36:21 2018 +0100 mtd: spi-nor: atmel-quadspi: Add spi-mem support to atmel-quadspi This patch adds new interface to existing driver. New code is not used yet, it will be enabled later. Changes are prepared in small steps to keep patches readable. Suggested-by: Boris Brezillon Signed-off-by: Piotr Bugalski Signed-off-by: Mark Brown commit b82ab1c26962a952755d9b9c1d083436d88281a7 Author: Piotr Bugalski Date: Mon Nov 5 11:36:20 2018 +0100 mtd: spi-nor: atmel-quaspi: Typo fix Just minor typo fix. Fixed in preparation of new driver. Signed-off: Piotr Bugalski Signed-off-by: Mark Brown commit 78ef4193bbb97d17853f64a7975aa971d625c478 Author: Peng Hao Date: Tue Nov 6 22:57:22 2018 +0800 misc/pvpanic: remove a redundant comma Remove a redundant comma in pvpanic_device_ids. Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit 7247932c7df2619d719175fc76327480c7259e80 Author: Peng Hao Date: Tue Nov 6 22:57:21 2018 +0800 misc/pvpanic: convert to SPDX license tags Updates license to use SPDX-License-Identifier instead of verbose license text. Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit 8eeffed038b92ff811364bf91acab4b2e6a47e7e Author: Peng Hao Date: Tue Nov 6 22:57:20 2018 +0800 misc/pvpanic: change header file sort style Make header files alphabetical order. Signed-off-by: Peng Hao Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit bfebd5c222ddfce70dde0c2e18f6859f33891db3 Author: Peng Hao Date: Tue Nov 6 22:57:19 2018 +0800 misc/pvpanic: remove unnecessary header file Remove unnecessary header file init.h. Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit 77703e0b0326a1fb06b5cb5b468a633472c5a8e9 Author: Peng Hao Date: Tue Nov 6 22:57:18 2018 +0800 misc/pvpanic : break dependency on ACPI The pvpanic driver is available for architectures that do not support ACPI.So break the dependency. Reviewed-by: Andy Shevchenko Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit a8b71d2735791f09788a13dda928f690a417c14a Author: Peng Hao Date: Tue Nov 6 22:57:17 2018 +0800 misc/pvpanic : grouping ACPI related stuff Grouping ACPI related stuff and make preparation to break the ACPI dependency w/o any functional change. Reviewed-by: Andy Shevchenko Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit 46f934c9a12fc565fe2ae82c709162fa002a2998 Author: Peng Hao Date: Tue Nov 6 22:57:16 2018 +0800 misc/pvpanic: add support to get pvpanic device info FDT By default, when ACPI tables and FDT coexist for ARM64, current kernel takes precedence over FDT to get device information. Virt machine in qemu provides both FDT and ACPI table. Increases the way to get information through FDT. Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit b1d9d6cb30fe6bd1b844ae98a372471f17c4fdc4 Author: Peng Hao Date: Tue Nov 6 22:57:15 2018 +0800 dt-bindings: misc/pvpanic: add document for pvpanic-mmio Add dt-bindings document for "qemu:pvpanic-mmio". Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit 725eba2928ada8d0fe6bafb984e37576851edc91 Author: Peng Hao Date: Tue Nov 6 22:57:14 2018 +0800 misc/pvpanic: add MMIO support On some architectures (e.g. arm64), it's preferable to use MMIO, since this can be used standalone. Add MMIO support to the pvpanic driver. Suggested-by: Andy Shevchenko [Use acpi_dev_resource_memory API. - Andy] Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit d2ae1717f3f6b1bd86cd05d0443169b645445d62 Author: Peng Hao Date: Tue Nov 6 22:57:13 2018 +0800 misc/pvpanic: simplify the code using acpi_dev_resource_io Use acpi_dev_resource_io API. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit fcb418cd567febb310749e37507679e4f2703e56 Author: Peng Hao Date: Tue Nov 6 22:57:12 2018 +0800 pvpanic: move pvpanic to misc as common driver Move pvpanic.c from drivers/platform/x86 to drivers/misc. Following patches will use pvpanic device in arm64. Reviewed-by: Andy Shevchenko Acked-by: Mark Rutland Signed-off-by: Peng Hao Signed-off-by: Greg Kroah-Hartman commit a19bf05359e6c5249766cbbf2937ef83fc9001f9 Author: Alexander Usyskin Date: Tue Nov 6 12:04:40 2018 +0200 mei: expedite ioctl return on the notify set operation error The notify set operation ioctl will wait till timeout is expired even in case when the FW returned an error. Check the status field of the client object in wait_event_timeout() to determine if the caller can return earlier. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit 87d63352b49e421bb272dbb553bcf7db316c168f Author: Alexander Usyskin Date: Tue Nov 6 12:04:39 2018 +0200 mei: flush queues by the host client only During queues flush, the me client in most cases is already unlinked hence the me client id is unavailable. The host client structure pointer is enough for identification. The function mei_cl_cmp_id() is dropped as it has no more usage. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit 40a669739ac76e9076331397ed23592a8d66fb28 Author: Tomas Winkler Date: Tue Nov 6 12:04:38 2018 +0200 mei: hbm: drop BUG() from the hbm handler Drop BUG() from the hbm handler in order not to crash the whole kernel on faulty firmware implementation. Instead of it, just return an error resulting into link reset. There is no any known issue of faulty firmware in this matter, the change is just to ease the development. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit 15f6f7f48db9b1f89175185c6dafc1eaa16f7a66 Author: Colin Ian King Date: Mon Oct 29 22:49:45 2018 +0000 USB: gadget: udc: fix spelling mistake "intrerrupt" -> "interrupt" Trivial fix to spelling mistake in comment Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 8ec23b90119a5a64dbb84baa3cc55e5d252b1f2f Author: Colin Ian King Date: Tue Oct 30 14:15:43 2018 +0000 uwb: clean an indentation issue, remove extraneous tab Trivial fix to clean up an indentation issue, remove tab Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 1d3e773ae0a65a1b6b5d2aa21250c96f3e975aba Author: Chengguang Xu Date: Fri Nov 2 22:14:27 2018 +0800 usb: host: remove unnecessary condition check dma_pool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling dma_pool_destroy(). Signed-off-by: Chengguang Xu Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 157c0f2f641a9938382b092c64548ebdabfe25e0 Author: Badhri Jagan Sridharan Date: Mon Oct 1 12:45:01 2018 -0700 usb: typec: tcpm: charge current handling for sink during hard reset During the initial connect to a non-pd port, sink would hard reset twice before deeming that the port partner is non-pd. TCPM sets the the charge path to false during the hard reset. This causes unnecessary connects/disconnects of charge path and makes port take longer to charge from the non-pd ports. Avoid this by not setting the charge path to false unless the partner has already identified to be pd capable. When partner is a pd port, set the charge path to false in SNK_HARD_RESET_SINK_OFF. Set the current limits to default value based of CC pull up and resume the charge path when port enters SNK_HARD_RESET_SINK_ON. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Rob Herring Reviewed-by: Heikki Krogerus -------- Changes in V3: Rebase on top of usb-next Changes in V2: Based on feedback of jackp@codeaurora.org - vsafe_5v_hard_reset flag from tcpc_config is removed - Patch only differentiates between pd port partner and non-pd port partner V1 version of the patch is here: https://lkml.org/lkml/2018/9/14/11 Signed-off-by: Greg Kroah-Hartman commit 23b5f73266e59a598c1e5dd435d87651b5a7626b Author: Badhri Jagan Sridharan Date: Mon Oct 1 12:45:00 2018 -0700 usb: typec: tcpm: Do not disconnect link for self powered devices During HARD_RESET the data link is disconnected. For self powered device, the spec is advising against doing that. >From USB_PD_R3_0 7.1.5 Response to Hard Resets Device operation during and after a Hard Reset is defined as follows: Self-powered devices Should Not disconnect from USB during a Hard Reset (see Section 9.1.2). Bus powered devices will disconnect from USB during a Hard Reset due to the loss of their power source. Tackle this by letting TCPM know whether the device is self or bus powered. This overcomes unnecessary port disconnections from hard reset. Also, speeds up the enumeration time when connected to Type-A ports. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus --------- Version history: V3: Rebase on top of usb-next V2: Based on feedback from heikki.krogerus@linux.intel.com - self_powered added to the struct tcpm_port which is populated from a. "connector" node of the device tree in tcpm_fw_get_caps() b. "self_powered" node of the tcpc_config in tcpm_copy_caps Based on feedbase from linux@roeck-us.net - Code was refactored - SRC_HARD_RESET_VBUS_OFF sets the link state to false based on self_powered flag V1 located here: https://lkml.org/lkml/2018/9/13/94 Signed-off-by: Greg Kroah-Hartman commit da0b7c7766ea96d057094ecd05bcc1b3fec7e538 Author: Badhri Jagan Sridharan Date: Mon Oct 1 12:44:59 2018 -0700 dt-bindings: connector: Add self-powered property >From USB_PD_R3_0 7.1.5 Response to Hard Resets Device operation during and after a Hard Reset is defined as follows: Self-powered devices Should Not disconnect from USB during a Hard Reset (see Section 9.1.2). Bus powered devices will disconnect from USB during a Hard Reset due to the loss of their power source. Therefore it is necessary to know whether the port belongs to a device which is self powered or bus powered. This change adds "self-powered" flag to the connector class which present indicates that the port belongs to a device that is self powered. Else it is bus powered usb device. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Rob Herring ------- Changes is v3: - Rebase on top of usb-next - no change w.r.t to this patch. Same as previous versions. No v2 version as the patch was introduced there. Signed-off-by: Greg Kroah-Hartman commit 64ce301c971bb323ab63f59014498d7e975586ee Author: Cristian Sicilia Date: Sun Nov 4 15:50:40 2018 +0100 staging: rtlwifi: SET_RATE_ID inline no arg reuse The macro SET_RATE_ID is a definition in function and undefined at end of function. Make it as inline avoid the arg reuse for macro, the name is changed in _rtl_rate_id, following the same function pattern in the file. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit 3ef1ba0693397a76aaabc2b1f4d5d4e4f43dc7b0 Author: Yangtao Li Date: Mon Nov 5 10:23:58 2018 -0500 staging: vt6655: fix small typo Correct spelling mistakes of "Calculate" Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 72b70a0386025ba94ad89d1d55821bcbe00e11d2 Author: Yangtao Li Date: Mon Nov 5 10:31:21 2018 -0500 Staging: rtl8712: fix small typo ture->true Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit f09378d3001ee8b16787997305da8ed750798ba4 Author: Yangtao Li Date: Mon Nov 5 10:34:33 2018 -0500 staging: rtl8723bs: fix small typo ture->true Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman commit 4a4c1b1d5a1d1f083ea9a9fe8b179bfa9e62e12a Author: Ian Abbott Date: Tue Oct 30 17:23:54 2018 +0000 staging: comedi: ni_labpc_common: Use insn->n in AO insn_write handler The `insn_write` handler for the AO subdevice (`labpc_ao_insn_write()`) currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `labpc_ao_insn_write()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 43818b03c518b7aed6bbe95ce2bcd4c5aaed2473 Author: Ian Abbott Date: Tue Oct 30 14:44:16 2018 +0000 staging: comedi: cb_pcidda: Use insn->n in AO insn_write handler The `insn_write` handler for the AO subdevice (`cb_pcidda_ao_insn_write()`) currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `cb_pcidda_ao_insn_write()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 48164754d7fe219911b7653449a4ce85d23c3556 Author: Ian Abbott Date: Wed Oct 31 12:29:56 2018 +0000 staging: comedi: addi_apci_3501: Use insn->n in EEPROM insn_read handler The `insn_read` handler for the EEPROM subdevice (`apci3501_eeprom_insn_read()`) currently ignores `insn->n` (the number of samples to be read) and assumes a single sample is to be read. But `insn->n` could be 0, meaning no samples should be read, in which case `data[0]` ought not to be written. (The comedi core at least ensures that `data[0]` exists, but we should not rely on that.) Following the usual Comedi guidelines and interpret `insn->n` as the number of samples to be read, but only read the EEPROM location once and make `insn->n` copies, as we don't expect the contents of the EEPROM location to change between readings. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit e3b9ea9aae7e1576516da2b125d7add20663f591 Author: Ian Abbott Date: Tue Oct 30 14:17:13 2018 +0000 staging: comedi: Check length of INSN_CONFIG_TIMER_1 instruction The contents of the Comedi configuration instruction `INSN_CONFIG_TIMER_1` instruction are not very well defined, but the one driver that uses it (the "cb_pcidas64" driver for the PCI-DAS4020/12 card) assumes its `insn->n` is 5. Add a check in `check_insn_config_length()` to verify that `insn->n` is correct for this configuration instruction. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit b33fc68c26a56d23b7221434dd367949420637bc Author: Ian Abbott Date: Tue Oct 30 14:17:12 2018 +0000 staging: comedi: cb_pcidas64: Use insn->n in EEPROM insn_read handler The `insn_read` handler for the EEPROM subdevice (`eeprom_insn_read()`) currently ignores `insn->n` (the number of samples to be read) and assumes a single sample is to be read. But `insn->n` could be 0, meaning no samples should be read, in which case `data[0]` ought not to be written. (The comedi core at least ensures that `data[0]` exists, but we should not rely on that.) Follow the usual Comedi guidelines and interpret `insn->n` as the number of samples to be read, but only read the EEPROM location once and make `insn->n` copies, as we don't expect the contents of the EEPROM location to change between readings. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 130151991dcb14e5c383c730b3ef37a6fdc32c95 Author: Ian Abbott Date: Tue Oct 30 14:17:11 2018 +0000 staging: comedi: cb_pcidas64: Use insn->n in AO insn_write handler The `insn_write` handler for the AO subdevice (`ao_winsn()` currently ignores `insn->n` (the number of samples to write) and assumes a single sample is to be written. But `insn->n` could be 0, meaning no samples should be written, in which case `data[0]` is invalid. Follow the usual Comedi guidelines and change `ao_winsn()` to write the specified number of samples. This fixes the assumption that `data[0]` is valid. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit fafb85b45f68e95e784d025696512ea062c00bd4 Author: Hans de Goede Date: Mon Oct 22 16:57:50 2018 +0200 staging: vboxvideo: Use DRM_FB_HELPER_DEFAULT_OPS Use DRM_FB_HELPER_DEFAULT_OPS rather then open-coding it. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 3a9b6ecadefcc807c0471897a1e0de0bde04c363 Author: Hans de Goede Date: Mon Oct 22 16:57:49 2018 +0200 staging: vboxvideo: Drop DRM_MODE_FB_CMD define This is a leftover from when the driver was out of tree and also build against older kernels. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit e46b06e1fee1e86b5732e48f4d3a40ddbba9e09d Author: Hans de Goede Date: Mon Oct 22 16:57:48 2018 +0200 staging: vboxvideo: Add myself as MODULE_AUTHOR Add myself as MODULE_AUTHOR. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 35a703dfdc67a0098dc743e8b0fb1753127677c6 Author: Hans de Goede Date: Mon Oct 22 16:57:47 2018 +0200 staging: vboxvideo: Fixup some #ifdef-s Add #ifdef CONFIG_PM_SLEEP around the suspend/hibernate functions. Remove unnecessary #ifdef CONFIG_COMPAT, the .compat_ioctl member is always available and if CONFIG_COMPAT is not set then drm_compat_ioctl is defined to NULL. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 650d4aad032a82f6382a3a1a0f31f0f473b31ab1 Author: Hans de Goede Date: Mon Oct 22 16:57:46 2018 +0200 staging: vboxvideo: Use PCI_DEVICE() for our pci_id table Use PCI_DEVICE() for our pci_id table and also simplify the terminating entry tio just "{ }". Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 0a2bca1409b7dbb53946187430c66e85729e07cc Author: Hans de Goede Date: Mon Oct 22 16:57:45 2018 +0200 staging: vboxvideo: Cleanup header use Stop adding -Iinclude/drm to the CFLAGS and stop using the obsolete "include-all" drm/drmP.h header. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit cb4e583db2a10d04f223205b9b7822877db2f861 Author: Michael Straube Date: Sat Oct 27 22:28:50 2018 +0200 staging: rtl8188eu: cleanup long line in rtw_hal_xmit() Cleanup a line over 80 characters in rtw_hal_xmit() by using if(x) instead of if(x == true). Also clears a missing spaces around '|' checkpatch issue. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 8a6b6868eb07d75063b1f5e0b32fbbe6691f9f4e Author: Michael Straube Date: Sat Oct 27 22:28:49 2018 +0200 staging: rtl8188eu: change return type of rtw_hal_xmit() The function rtw_hal_xmit() returns true or false. Change the return type from s32 to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit ddc95605ad4656e3217033eab4c07f743721fe18 Author: Michael Straube Date: Sat Oct 27 22:28:48 2018 +0200 staging: rtl8188eu: change return type of rtl8188eu_xmitframe_complete() The function rtl8188eu_xmitframe_complete() returns true or false. Change the return type from s32 to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit bf58500ff4210e8064398631329d38df40859073 Author: Michael Straube Date: Sat Oct 27 22:28:47 2018 +0200 staging: rtl8188eu: change type of a struct field The field enable of struct recv_reorder_ctrl is only used for boolean values, so change the type from u8 to bool. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit adc595cb5ace01104b0a6a27e0cf1eadbf7c825e Author: Michael Straube Date: Sat Oct 27 22:28:46 2018 +0200 staging: rtl8188eu: remove unnecessary ternary operator The field accept_addba_req of struct mlme_ext_info has type bool. Use the value of accept_addba_req directly instead of the ternary operator in an asignment. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 636e10b89f5d5479079f6b360c9160a0bc9a0dbd Author: Michael Straube Date: Sun Oct 21 21:45:28 2018 +0200 staging: rtl8188eu: change type of is_cck_rate - style The variable is_cck_rate is used for boolean values, so change the type from u8 to bool. The initializations to zero and use of ternary operator in the assignments are unnecessary, remove them as well. Suggested-by: Joe Perches Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 755842d8c7900be0b8bd87eaf23cc61bb53b47c7 Author: Michael Straube Date: Sun Oct 21 21:45:27 2018 +0200 staging: rtl8188eu: rename variable isCCKrate - style Rename the variable isCCKrate to avoid CamelCase. isCCKrate -> is_cck_rate Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit ded11a81a7d2d12ba11fc269698baca8b3dbdf2a Author: Michael Straube Date: Sun Oct 21 21:45:26 2018 +0200 staging: rtl8188eu: rename variable Max_spatial_stream - style Rename the variable Max_spatial_stream to avoid CamelCase. Max_spatial_stream -> max_spatial_stream Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 1a28bfdacd807751aefde9536dac9f389b2d76b9 Author: Michael Straube Date: Sun Oct 21 21:45:25 2018 +0200 staging: rtl8188eu: simplify odm_evm_db_to_percentage() Use clamp() to simplify code in odm_evm_db_to_percentage(). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman commit 66845e6fe3ab08bc47060564cad026d7082df1c8 Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:56 2018 +0200 staging: bcm2835-audio: update TODO The following tasks were completed or not the right solution: 1/2- Not the proper solution, we should register a platform device in vchiq the same way it's done with bcm2835-camera as commented here: https://lkml.org/lkml/2018/10/16/1131 2/3- Fixed by Takashi Iwai here: https://lkml.org/lkml/2018/9/4/587 Also, adds a new task as per mailing list conversation. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 666a6bd7b3a534ca7ba52f11b4b77a58d67565a8 Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:55 2018 +0200 staging: bcm2835-audio: rename platform_driver structure It was called bcm2835_alsa0_driver, that "0" didn't mean much. Suggested-by: Takashi Iwai Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 907bf3dbf5d7d64dc87b705cf115a26861ea65f5 Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:54 2018 +0200 staging: bcm2835-audio: more generic probe function name There will only be one probe function, there is no use for appendig "_dt" the end of the name. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 152419a688a3e9f1dd6a808120945a928cbfefad Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:53 2018 +0200 staging: bcm2835-audio: use anonymous union in struct vc_audio_msg In this case explicitly naming the union doesn't help overall code comprehension and clutters it. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 07c986b9bb6dacc430fd68ec064368fa5da0e4d5 Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:52 2018 +0200 staging: bcm2835-audio: reorder variable declarations & remove trivial comments When it comes to declaring variables it's preferred, when possible, to use an inverted tree organization scheme. Also, removes some comments that were useless. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit 588e7ac5b1cbcb4bda5d26c0757c0a52d5f43bfd Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:51 2018 +0200 staging: bcm2835-audio: don't initialize memory twice The memory is being allocated with devres_alloc(), wich ultimately uses __GFP_ZERO to call kmalloc. We don't need to zero the memory area again in bcm2835-audio. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit aa1b40c6eea8d58047d2d3f76e4ac27365df2f8d Author: Nicolas Saenz Julienne Date: Wed Oct 17 21:01:50 2018 +0200 staging: bcm2835-audio: unify FOURCC command definitions The device communicates with the audio core using FOURCC codes. The driver was generating them using different macros/expressions. We now use the same macro to create them and centralize all the definitions. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman commit b2a40053dc579e6d093a1356082de5ce0af44cfc Author: Cristian Sicilia Date: Fri Oct 19 20:29:33 2018 +0200 staging: rtlwifi: Modified the line ending with a parenthesis This patch fixes two line ending with parenthesis, which did not conform to the linux kernel coding style. Signed-off-by: Cristian Sicilia Signed-off-by: Greg Kroah-Hartman commit c677b19653b8787be9e331619842f2255dd7b3e8 Author: Rohit Sarkar Date: Tue Nov 6 23:53:00 2018 +0530 staging: wlan-ng: Fix a typo. "Exiting" instead of "Exitting" Signed-off-by: Rohit Sarkar Signed-off-by: Greg Kroah-Hartman commit 815510aaad0c39114af7781144b13a127df99b57 Author: Laís Pessine do Carmo Date: Tue Nov 6 22:28:04 2018 -0200 staging: sm750fb: Add spaces around '+' Add spaces around '+' to correct the following checkpath.pl warnings: WARNING: line over 80 characters + write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 4))); WARNING: line over 80 characters + memcpy(ajRemain, pSrcbuf+ul4BytesPerScan, ulBytesRemain); Signed-off-by: Laís Pessine do Carmo Signed-off-by: Greg Kroah-Hartman commit 37778531878570ebb465b3b14e055edaf6882f44 Author: Colin Ian King Date: Wed Nov 7 10:39:32 2018 +0000 staging: rtl8192u: rename struct name _rt_firmare_seg_container Rename struct _rt_firmare_seg_container to _fw_seg_container to match the typedef name of this structure. Also removes the spelling mistake of 'firmare'. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit d427e60ae7cab8ae6537ca45123f9b4c5b06c0d9 Author: Colin Ian King Date: Tue Oct 30 11:09:59 2018 +0000 staging: speakup: clean up few indentation issues Trivial fix to clean up indentation issues across the driver Signed-off-by: Colin Ian King Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman commit 40d68841df0e9867d7b8ccc5303da9e6300d89a4 Author: Colin Ian King Date: Tue Oct 30 11:17:20 2018 +0000 staging: xgifb: clean an indentation issue Trivial fix to clean up an indentation issue Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit 365b01638c712d5fed908d0b253f32307fdc0171 Author: Robert Eshleman Date: Sat Oct 27 20:47:00 2018 -0700 staging: rtl8712: fix CamelCase in fw_priv struct Rename fields in fw_priv struct from CamelCase to snake_case. Reported by checkpatch. Signed-off-by: Robert Eshleman Signed-off-by: Greg Kroah-Hartman commit c4aacbb9814d9b2ec5c3017e8bc7b7d71c0224c3 Author: Colin Ian King Date: Mon Oct 15 23:34:33 2018 +0100 drivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original" Trivial fix to common spelling mistakes in some rtl* drivers Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit dca6eaa8a23083f93a54e90ca7775d551ad06a11 Author: Jeeeun Evans Date: Thu Oct 18 12:41:01 2018 +0100 staging: ks7010: remove unnecessary blank line Cleanup extra line found by checkpatch.pl Signed-off-by: Jeeeun Evans Signed-off-by: Greg Kroah-Hartman commit 4e32a398817b2d60072dc7f3efe3d368c69b42ad Author: Nícolas F. R. A. Prado Date: Tue Nov 6 22:42:42 2018 -0200 staging: mt7621-mmc: Add blank line after declaration Correct the following warning from checkpatch.pl: WARNING: Missing a blank line after declarations + struct msdc_host *host = mmc_priv(mmc); + msdc_pm(state, (void *)host); Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Greg Kroah-Hartman commit 089257429d0de255ba4cd5d51f1a55fd14358cda Author: Rohit Sarkar Date: Wed Nov 7 15:13:14 2018 +0530 staging: goldfish: Add SPDX license identifier. Fix checkpatch warning by adding the SPDX license identifier. Signed-off-by: Rohit Sarkar Signed-off-by: Greg Kroah-Hartman commit 40497c52370bafca2a2fd9a84e6b34230dd86206 Author: Hans de Goede Date: Thu Oct 18 17:03:33 2018 +0200 staging: vboxvideo: Stop disabling/enabling accel support on master set / drop Userspace mode-setting (and thus also VESA) is not supported together with modesetting. KMS userspace apps not properly marking the framebuffer as dirty are also not supported. So stop trying to accommodate this and simply enable accel once at driver init. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit acc962c5140071f251c62f360cb6668c1962ff31 Author: Hans de Goede Date: Thu Oct 18 17:03:32 2018 +0200 staging: vboxvideo: Change licence headers over to SPDX All the files contain a MIT license header, replace this with: SPDX-License-Identifier: MIT Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit cd76c287a52fe925b8e52369e0002cad7c1d2c12 Author: Hans de Goede Date: Thu Oct 18 17:03:31 2018 +0200 staging: vboxvideo: Cleanup the comments Some comments where still using docbook style comments, move these either over to kerneldoc, or just make them regular comments. Also remove a bunch of obsolete comments. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 685bb884e0a42b917fecb25ca81a6407f391c8ec Author: Hans de Goede Date: Thu Oct 18 17:03:30 2018 +0200 staging: vboxvideo: Drop duplicate vbox_err.h file Switch to the more complete vbox_err.h file from include/linux which got added with the merging of the vboxguest driver. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit db3566cfbf99d965188361d172a215f979f41f15 Author: Hans de Goede Date: Thu Oct 18 17:03:29 2018 +0200 staging: vboxvideo: Keep old mode when disable crtc On DPMS off we get a call to vbx_crtc_atomic_disable, followed by a call to vbox_primary_atomic_update, at which point crtc_state->enable is 0 and crtc_state->mode has been zero-ed. On a 0 width/height vbox_do_modeset() falls back to 640x480, so this causes the guest Window (its "monitor") to resize to 640x480 (and become black). This commit makes us not look at crtc_state->mode when crtc_state->enable is not set, so that we keep the old mode and just make the window go black. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit ba2181d76ecc6598014d302c0575c3eac3c27012 Author: Hans de Goede Date: Thu Oct 18 17:03:28 2018 +0200 staging: vboxvideo: Stop accessing crtc_state->active Atomic modesetting drivers should never check crtc_state->active directly, instead check crtc_state->enable. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit d5c5dff7dc307dbcab1df7e479453f7f0b93aa24 Author: Ioannis Valasakis Date: Tue Nov 6 12:40:58 2018 +0000 staging: davinci: add SPDX License Identifier Add missing SPDX License Identifier to the source and header files. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit b6fef6fde7e9c7b2e04355497212a92d2f000f72 Author: Ioannis Valasakis Date: Tue Nov 6 12:40:49 2018 +0000 staging: davinci: remove FSF mail address from copyright Remove the mail address from the copyright notice as it may change in the future. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 42e764d05712c07e44318bc8f6b8665a9c216505 Author: Ioannis Valasakis Date: Tue Nov 6 12:45:42 2018 +0000 staging: tegravde: replace bit assignment with macro Replace the bit assignment with the preferred BIT macro. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 284371999b1b3bddbdbd07a2e4b9ef736acf4457 Author: Ioannis Valasakis Date: Tue Nov 6 02:29:10 2018 +0000 staging: speakup: move arguments to adhere to 80 chars Move the arguments of spk_serial_synth_immediate and the spk_ttyio_synth_immediate to adhere to 80 chars limit coding standards. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 8d0f5a65ff11701629449e39871c9494f6008e20 Author: Ioannis Valasakis Date: Tue Nov 6 02:20:56 2018 +0000 staging: speakup: move arguments to reduce 80 chars limit Move the arguments one line below to remove the warning of the 80 chars limit. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 53d77da6acb3f16b6fd796ff04badaf9103d5e6b Author: Ioannis Valasakis Date: Tue Nov 6 02:20:49 2018 +0000 staging: speakup: add spaces around minus Add spaces around minus operator. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 40e9e86f26ef8481e03694a96944563849360731 Author: Ioannis Valasakis Date: Tue Nov 6 01:25:18 2018 +0000 staging: bcm2048: add SPDX License Identifier Add missing SPDX License Identifier. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit d1ab82443bed2b2562e5331d6aa53e3b878b16d0 Author: Bhagyashri P. Dighole Date: Mon Nov 5 19:49:05 2018 +0000 staging: erofs: Modify conditional checks Fix coding style alignment issues detected by checkpatch.pl Use ! for NULL test rather than explicitly comparing to NULL. Signed-off-by: Bhagyashri P. Dighole Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit f0950b02a74cac1e16de178a8533765aef25fdc5 Author: Bhagyashri P. Dighole Date: Mon Nov 5 19:48:38 2018 +0000 staging: erofs: Modify coding style alignments Fix coding style alignment issues detected by checkpatch.pl Matched alignments with parenthesis. Signed-off-by: Bhagyashri P. Dighole Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 7d5bca1cca18e522ba214efead58a4400a7e53a9 Author: Jernej Skrabec Date: Sun Nov 4 19:27:05 2018 +0100 arm64: dts: allwinner: h6: Enable HDMI output on Pine H64 board Pine H64 board has HDMI type A connector. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 209065c5fd72300c09b400369956c7bb4476147a Author: Jernej Skrabec Date: Sun Nov 4 19:27:04 2018 +0100 arm64: dts: allwinner: h6: Add HDMI pipeline This commit adds all entries needed for HDMI to function properly. Signed-off-by: Jernej Skrabec [added DE3 bus] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit 371a6c328ad423c51ffcf68ec211d3eeb80f1874 Author: Christoph Hellwig Date: Thu Oct 18 15:05:37 2018 +0200 scsi: pmcraid: use generic DMA API Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit a9b9e3adc9a98ce59a8544d31da597807a473bd1 Author: Christoph Hellwig Date: Thu Oct 18 15:05:36 2018 +0200 scsi: pmcraid: don't allocate a dma coherent buffer for sense data We can just dma map the sense buffer passed with the scsi command, and that gets us out of the nasty business of doing dma coherent allocations from irq context. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 203654b42ff12782322558db5479057089248a28 Author: Christoph Hellwig Date: Thu Oct 18 15:05:35 2018 +0200 scsi: pmcraid: simplify pmcraid_cancel_all a bit No need for a local cmd_done variable, and pass boolean values as bool type instead of u32. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 3d5ca1e6fdfeb4bc9d0b2eb4e35717198af03d78 Author: Christoph Hellwig Date: Thu Oct 18 15:03:37 2018 +0200 scsi: qla2xxx: use lower_32_bits and upper_32_bits instead of reinventing them This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it based on incorrect assumptions. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit ac4b1657b75251f9c8731403e5b79fa812e0b05c Author: Christoph Hellwig Date: Thu Oct 18 15:03:36 2018 +0200 scsi: qla1280: properly handle 64-bit DMA CONFIG_HIGHMEM is not in fact an indicator for > 32-bit dma addressing Given that the driver is a bit weird and wants a compile time selection switch to checking CONFIG_ARCH_DMA_ADDR_T_64BIT instead. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit f20f43c35aa4ebce8fed57168cb358611259c634 Author: Christoph Hellwig Date: Thu Oct 18 15:03:35 2018 +0200 scsi: qla1280: use lower_32_bits and upper_32_bits instead of reinventing them This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 88693b3c9681a0c10b8fe73a0be9bfa0ea63de1f Author: Christoph Hellwig Date: Thu Oct 18 15:03:34 2018 +0200 scsi: ips: properly handle 64-bit DMA CONFIG_HIGHMEM64 is only one (and these days unusual) way to indicate that > 32-bit dma address are possible. Replace it with a check of the dma_addr_t size. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 6f6eb3ccc6ff46137b1d2951ef3a0a163a0aa601 Author: Christoph Hellwig Date: Thu Oct 18 15:03:33 2018 +0200 scsi: ips: use lower_32_bits and upper_32_bits instead of reinventing them Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b03f3c3e527a7da50f12ddb2021cb28ed99e46f7 Author: Chengguang Xu Date: Sun Nov 4 21:57:50 2018 +0800 scsi: qla4xxx: remvoe unnecessary condition check for mempool_destroy() mempool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling mempool_destroy(). Signed-off-by: Chengguang Xu Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 08cf8ab3c9e6f392f8d051fa0b574bc173d96a5d Author: Chengguang Xu Date: Sun Nov 4 21:57:49 2018 +0800 scsi: qla4xxx: remove unnecessary condition check for dma_pool_destroy() dma_pool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling dma_pool_destroy(). Signed-off-by: Chengguang Xu Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit ed5b3994c6356179a605fb3d9e3519c3683d57f1 Author: James Smart Date: Tue Oct 23 13:41:12 2018 -0700 scsi: lpfc: update driver version to 12.0.0.8 Update the driver version to 12.0.0.8 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 1dc5ec2452025cc36726cdf97d813b34301fbbba Author: James Smart Date: Tue Oct 23 13:41:11 2018 -0700 scsi: lpfc: add Trunking support Add trunking support to the driver. Trunking is found on more recent asics. In general, trunking appears as a single "port" to the driver and overall behavior doesn't differ. Link speed is reported as an aggregate value, while link speed control is done on a per-physical link basis with all links in the trunk symmetrical. Some commands returning port information are updated to additionally provide trunking information. And new ACQEs are generated to report physical link events relative to the trunk. This patch contains the following modifications: - Added link speed settings of 128GB and 256GB. - Added handling of trunk-related ACQEs, mainly logging and trapping of physical link statuses. - Added additional bsg interface to query trunk state by applications. - Augment link_state sysfs attribtute to display trunk link status Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7ea92eb4589dbf0cff7ee169e3c23eae00149762 Author: James Smart Date: Tue Oct 23 13:41:10 2018 -0700 scsi: lpfc: Implement GID_PT on Nameserver query to support faster failover The switches seem to respond faster to GID_PT vs GID_FT NameServer queries. Add support for GID_PT to be used over GID_FT to enable faster storage failover detection. Includes addition of new module parameter to select between GID_PT and GID_FT (GID_FT is default). Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit d83ca3ea833d7a66d49225e4191c4e37cab8f079 Author: James Smart Date: Tue Oct 23 13:41:09 2018 -0700 scsi: lpfc: Correct loss of fc4 type on remote port address change An address change for a remote port cause PRLI for the wrong protocol to be sent. The node copy done in the discovery code skipped copying the fc4 protocols supported as well. Fix the copy logic for the address change. Beefed up log messages in this area as well. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit d496b9a7246cb9813da1fe49e14edbbbf8e232d5 Author: James Smart Date: Tue Oct 23 13:41:08 2018 -0700 scsi: lpfc: Fix odd recovery in duplicate FLOGIs in point-to-point Testing a point-to-point topology and a case of re-FLOGI without intervening link bouncing, showed an odd interaction with firmware and a resulting scenario where the driver no longer probed after accepting the new FLOGI. Work around the firmware issue by issuing a link bounce if a FLOGI is received after the link is already up and FLOGI's accepted. While debugging the issue, realized that some debug traces should be clarified to help in the future. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit b114d9009d386276bfc3352289fc235781ae3353 Author: James Smart Date: Tue Oct 23 13:41:07 2018 -0700 scsi: lpfc: Correct LCB RJT handling When LCB's are rejected, if beaconing was already in progress, the Reason Code Explanation was not being set. Should have been set to command in progress. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 036cad1f1ac9ce03e2db94b8460f98eaf1e1ee4c Author: James Smart Date: Tue Oct 23 13:41:06 2018 -0700 scsi: lpfc: fcoe: Fix link down issue after 1000+ link bounces On FCoE adapters, when running link bounce test in a loop, initiator failed to login with switch switch and required driver reload to recover. Switch reached a point where all subsequent FLOGIs would be LS_RJT'd. Further testing showed the condition to be related to not performing FCF discovery between FLOGI's. Fix by monitoring FLOGI failures and once a repeated error is seen repeat FCF discovery. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 191e2f749370ea7f319c2b1d626e459f4ee37384 Author: James Smart Date: Tue Oct 23 13:41:05 2018 -0700 scsi: lpfc: Correct errors accessing fw log This patch corrects two issues: - An oops would occur if reading based on a non-zero offset. Offset calculation was incorrect. - Updates to ras config (logging level) were ignored if change was made while fw logging was enabled. Revise to dynamically update. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 5cca2ab1b3a8316f94a987a5b23f1ea149bd3ef8 Author: James Smart Date: Tue Oct 23 13:41:04 2018 -0700 scsi: lpfc: Reset link or adapter instead of doing infinite nameserver PLOGI retry Currently, PLOGI failures are infinitely delayed/retried. There have been some fabric situations where the PLOGI's were to the nameserver and it stopped responding. The retries would never clear up. A better resolution in this situation is to retry a couple of times, then drop the link and reinit. This brings back connectivity to the nameserver. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 30e196cacefdd9a38c857caed23cefc9621bc5c1 Author: James Smart Date: Tue Oct 23 13:41:03 2018 -0700 scsi: lpfc: Fix LOGO/PLOGI handling when triggerd by ABTS Timeout event After a LOGO in response to an ABTS timeout, a PLOGI wasn't issued to re-establish the login. An nlp_type check in the LOGO completion handler failed to restart discovery for NVME targets. Revised the nlp_type check for NVME as well as SCSI. While reviewing the LOGO handling a few other issues were seen and were addressed: - Better lock synchronization around ndlp data types - When the ABTS times out, unregister the RPI before sending the LOGO so that all local exchange contexts are cleared and nothing received while awaiting LOGO/PLOGI handling will be accepted. - LOGO handling optimized to: Wait only R_A_TOV for a response. It doesn't need to be retried on timeout. If there wasn't a response, a PLOGI will be sent, thus an implicit logout applies as well when the other port sees it. If there is a response, any kind of response is considered "good" and the XRI quarantined for a exchange qualifier window. - PLOGI is issued as soon a LOGO state is resolved. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 3952e91f110b1abd1f139a04896c3ba66171df84 Author: James Smart Date: Tue Oct 23 13:41:02 2018 -0700 scsi: lpfc: Fix lpfc_sli4_read_config return value check An error is an error - but not to the existing return value check. Revise check to handle any failure, not just EIO. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit cd71348ad75705aab857c098a74e99700e173b77 Author: James Smart Date: Tue Oct 23 13:41:01 2018 -0700 scsi: lpfc: Correct speeds on SFP swap Supported speeds is not updated when SFP is removed or replaced Supported speed is obtained from lmt field in READ_CONFIG mailbox response. Driver updates supported speeds only once from PCI probe path. After that it is never updated. So, supported speeds remains the same till reboot or driver reload. When SFP is removed or inserted, driver gets SLI-Port Event ACQE. If SFP is removed, lmt wil have value 0. If a different SFP is inserted, lmt will have value according to its supported speeds. So, afterr SLI-Port Event ACQE handling path, send READ_CONFIG mailbox and update supported speeds. If READ_CONFIG fails, set supported speeds to unknown and log. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit c47b6f2d54d40c053f6a15d52489eb9e1a319da2 Author: Shivasharan S Date: Tue Oct 16 23:37:57 2018 -0700 scsi: megaraid_sas: Update driver version Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit cba67d92b3825b3dfba9c9821aaa98006c620a0b Author: Shivasharan S Date: Tue Oct 16 23:37:56 2018 -0700 scsi: megaraid_sas: modify max supported lds related print The print related to number of VDs that a particular firmware supports is misleading in some cases. Even though supportMaxExtLDs is set, certain firmware profiles only supports upto 64VDs. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit a17b8ca3eb635d127f06f2fb03b1c499780be006 Author: Shivasharan S Date: Tue Oct 16 23:37:55 2018 -0700 scsi: megaraid_sas: remove unused macro Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 1b60d4e588574cdd47f02f9ea3f8711266cb79dd Author: Shivasharan S Date: Tue Oct 16 23:37:54 2018 -0700 scsi: megaraid_sas: increase timeout for IOC INIT to 180seconds IOC INIT frame needs to be fired with a timeout of 180 seconds. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit b52fd077bd769f279778e4b9045eae3077827a44 Author: Shivasharan S Date: Tue Oct 16 23:37:53 2018 -0700 scsi: megaraid_sas: Remove double endian conversion Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 9fb98561164a9a9ec4d906313dccf3807f6ad035 Author: Shivasharan S Date: Tue Oct 16 23:37:52 2018 -0700 scsi: megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes In megasas_init_adapter_fusion(), max_mfi_cmds is being calcuated as (MEGASAS_FUSION_INTERNAL_CMDS + MEGASAS_FUSION_IOCTL_CMDS). max_mfi_cmds can be used in megasas_configure_queue_sizes. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 81b7645223ea5935161c69fc022a75928a79ccd0 Author: Shivasharan S Date: Tue Oct 16 23:37:51 2018 -0700 scsi: megaraid_sas: Rename scratch_pad registers Rename the scratch pad registers to match firmware headers. No functional change. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 34bd9f27e39be6e4bfb69bc8e79a7f5c4aa1c8c4 Author: Shivasharan S Date: Tue Oct 16 23:37:50 2018 -0700 scsi: megaraid_sas: Remove spin lock for dpc operation Optimization: No need to hold hba_lock in dpc context for reading atomic variable. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 9e77018eefafbf2d480e5868de11a7e49c9b1858 Author: Shivasharan S Date: Tue Oct 16 23:37:49 2018 -0700 scsi: megaraid_sas: optimize raid context access in IO path No functional change. Use local variables when accessing raid context in IO path. Improves code readability. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 2e47e4e62e403340f5ea718ac2b0836ab9271134 Author: Shivasharan S Date: Tue Oct 16 23:37:48 2018 -0700 scsi: megaraid_sas: Fail init if heartbeat timer fails When driver fails to start the heartbeat timer, exit from FW init. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 5acad9b9d90e02d17fa141ee0aff3678232a2bb1 Author: Shivasharan S Date: Tue Oct 16 23:37:47 2018 -0700 scsi: megaraid_sas: For SRIOV, do not set STOP_ADP bit For SRIOV based adapters, driver should not set the STOP_ADP bit as part of kill adapter. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit e29c322133472628c6de85efb99ccd3b3df5571e Author: Shivasharan S Date: Tue Oct 16 23:37:46 2018 -0700 scsi: megaraid_sas: Fix combined reply queue mode detection For Invader series, if FW supports more than 8 MSI-x vectors, driver needs to enable combined reply queue mode. For Ventura series, driver enables combined reply queue mode in case of more than 16 MSI-x vectors. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 1401371d7f44d3ca420a3db98eb7191b3341074d Author: Shivasharan S Date: Tue Oct 16 23:37:45 2018 -0700 scsi: megaraid_sas: Fix module parameter description Module parameter description for rdpq_enable incorrectly lists the default as enabled. Also, provide range of valid values for resetwaittime in the description. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 8a25fa17b6ed6e6c8101e9c68a10ae68a9025f2c Author: Shivasharan S Date: Tue Oct 16 23:37:44 2018 -0700 scsi: megaraid_sas: Fix goto labels in error handling During init, if pci_alloc_irq_vectors() fails, the driver has not yet setup the IRQs. Fix the goto labels and error handling for this case. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 365597cff94a704c3e7a8031fde39341e7929bf3 Author: Shivasharan S Date: Tue Oct 16 23:37:43 2018 -0700 scsi: megaraid_sas: Update copyright information Change copyright to Broadcom Inc. Also update any references to Avago with Broadcom. Update copyright duration wherever required. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit de93b40d98ead27ee2f7f7df93fdd4914a6c8d8d Author: Shivasharan S Date: Tue Oct 16 23:37:42 2018 -0700 scsi: megaraid_sas: Add check for reset adapter bit For SAS3 and later controllers, FW sets the reset adapter bit indicating the driver to perform a controller reset. Driver needs to check if this bit is set before doing a reset. This reduces the driver probe failure time to 180seconds in case there is a faulty controller connected. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 9155cf30a3c4ef97e225d6daddf9bd4b173267e8 Author: Shivasharan S Date: Tue Oct 16 23:37:41 2018 -0700 scsi: megaraid_sas: Fix msleep granularity In megasas_transition_to_ready() driver waits 180seconds for controller to change FW state. Here we are calling msleep(1) in a loop for this. As explained in timers-howto.txt, msleep(1) will actually sleep longer than 1ms. If a faulty controller is connected, we will end up waiting for much more than 180 seconds causing unnecessary delays during load. Change the granularity of msleep() call from 1ms to 1000ms. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit f0c21df6528601f5f43b449d08faf1bed6858df6 Author: Shivasharan S Date: Tue Oct 16 23:37:40 2018 -0700 scsi: megaraid_sas: Add support for FW snap dump Latest firmware adds a mechanism to save firmware logs just before controller reset on pre-allocated internal controller DRAM. This feature is called snapdump which will help debugging firmware issues. This feature requires extra time and firmware reports these values through new driver interface. Before initiating an OCR, driver needs to inform FW to save a snapdump and then wait for a specified time for the snapdump to complete. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 3f6194af539464d83b29ed347aceddb336a3625c Author: Shivasharan S Date: Tue Oct 16 23:37:39 2018 -0700 scsi: megaraid_sas: Add watchdog thread to detect Firmware fault Currently driver checks for Firmware state change from ISR context, and only when there are interrupts tied with no I/O completions. We have seen multiple cases where doorbell interrupts sent by firmware to indicate FW state change are not processed by driver and it takes long time for driver to trigger OCR. And if there are no IOs running, since we only check the FW state as part of ISR code, fault goes undetected by driver and OCR will not be triggered. This patch introduces a separate workqueue that runs every one second to detect Firmware FAULT state and trigger reset immediately. As an additional gain, removing PCI reads from ISR to check FW state results in improved performance as well. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen commit 8dbb748d4d1b6731f12dbdb855ffe320cfe2cb2b Author: Suganath Prabu Date: Wed Oct 31 18:53:39 2018 +0530 scsi: mpt3sas: Bump driver version to 27.100.00.00 Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 97f35194093362a63b33caba2485521ddabe2c95 Author: Suganath Prabu Date: Wed Oct 31 18:53:38 2018 +0530 scsi: mpt3sas: Fix driver modifying persistent data in Manufacturing page11 Currently driver is modifying both current & NVRAM/persistent data in Manufacturing page11. Driver should change only current copy of Manufacturing page11. It should not modify the persistent data. So removed the section of code where driver is modifying the persistent data of Manufacturing page11. Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 6cd1bc7b9b5075d395ba0120923903873fc7ea0e Author: Suganath Prabu Date: Wed Oct 31 18:53:37 2018 +0530 scsi: mpt3sas: Don't modify EEDPTagMode field setting on SAS3.5 HBA devices If EEDPTagMode field in manufacturing page11 is set then unset it. This is needed to fix a hardware bug only in SAS3/SAS2 cards. So, skipping EEDPTagMode changes in Manufacturing page11 for SAS 3.5 controllers. Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 9029a72500b95578a35877a43473b82cb0386c53 Author: Suganath Prabu Date: Wed Oct 31 18:53:36 2018 +0530 scsi: mpt3sas: Fix Sync cache command failure during driver unload This is to fix SYNC CACHE and START STOP command failures with DID_NO_CONNECT during driver unload. In driver's IO submission patch (i.e. in driver's .queuecommand()) driver won't allow any SCSI commands to the IOC when ioc->remove_host flag is set and hence SYNC CACHE commands which are issued to the target drives (where write cache is enabled) during driver unload time is failed with DID_NO_CONNECT status. Now modified the driver to allow SYNC CACHE and START STOP commands to IOC, even when remove_host flag is set. Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit dc730212e8a378763cb182b889f90c8101331332 Author: Suganath Prabu Date: Wed Oct 31 18:53:35 2018 +0530 scsi: mpt3sas: Call sas_remove_host before removing the target devices Call sas_remove_host() before removing the target devices in the driver's .remove() callback function(i.e. during driver unload time). So that driver can provide a way to allow SYNC CACHE, START STOP unit commands etc. (which are issued from SML) to the target drives during driver unload time. Once sas_remove_host() is called before removing the target drives then driver can just clean up the resources allocated for target devices and no need to call sas_port_delete_phy(), sas_port_delete() API's as these API's internally called from sas_remove_host(). Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit a064a6470be32981470c05082d1119da320e1d7e Author: Suganath Prabu Date: Wed Oct 31 18:53:34 2018 +0530 scsi: mpt3sas: Refactor mpt3sas_wait_for_ioc function No functional change. Doing code refactor of function mpt3sas_wait_for_ioc() for better readability. Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit f4305749cafa93167f0f80d76c788dc75f65318b Author: Suganath Prabu Date: Wed Oct 31 18:53:33 2018 +0530 scsi: mpt3sas: Separate out mpt3sas_wait_for_ioc No functional changes. This section of code "wait for IOC to be operational" is used in many places across the driver. Factor this code out into a new mpt3sas_wait_for_ioc(). Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 02abcbc25a06cdbb93bd60ceeb062b8445dae0ff Author: Suganath Prabu Date: Wed Oct 31 18:53:32 2018 +0530 scsi: mpt3sas: Added new #define variable IOC_OPERATIONAL_WAIT_COUNT Added new #define variable IOC_OPERATIONAL_WAIT_COUNT and it replaces hard coded value '10' in all the places where driver is waiting for the IOC to become operational. Signed-off-by: Suganath Prabu Reviewed-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 6c2938f7bfd937280f71973600b1bed615d997b5 Author: Suganath Prabu Date: Thu Oct 25 19:33:41 2018 +0530 scsi: mpt3sas: Add support for Aero controllers Add support for Aero/Sea controllers and add warning for configurable secure type IOC. Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit ff92b9dd9268507e23fc10cc4341626cef50367c Author: Suganath Prabu Date: Thu Oct 25 19:33:40 2018 +0530 scsi: mpt3sas: Update MPI headers to support Aero controllers Updating MPI headers to the latest version 2.6.7 to add support to the driver to detect the new 3816 and 3916 chip based controllers. Separate out firmware image data from mpi2_ioc.h to new file mpi2_image.h Signed-off-by: Suganath Prabu Signed-off-by: Martin K. Petersen commit 8f34fe4a898c517ec29f9f36e414da35335bd7ca Author: Justin Chen Date: Fri Nov 10 11:54:22 2017 -0800 ARM: brcmstb: Add entry for 7255 Add in BCM7255 entry and reorder entries to keep ascending order. Also moved 7278 cause it was out of order. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli commit 7c588c7468ea3f9b2fc8fa6840bed6262b5d1b00 Merge: 5882d526d887e da106a140f9c6 Author: David S. Miller Date: Tue Nov 6 15:39:48 2018 -0800 Merge branch 'net-systemport-Unmap-queues-upon-DSA-unregister-event' Florian Fainelli says: ==================== net: systemport: Unmap queues upon DSA unregister event This patch series fixes the unbinding/binding of the bcm_sf2 switch driver along with bcmsysport which monitors the switch port queues. Because the driver was not processing the DSA_PORT_UNREGISTER event, we would not be unmapping switch port/queues, which could cause incorrect decisions to be made by the HW (e.g: queue always back-pressured). ==================== Signed-off-by: David S. Miller commit da106a140f9c6955bb98dfc5a08c0dac72656d5c Author: Florian Fainelli Date: Tue Nov 6 15:15:18 2018 -0800 net: systemport: Unmap queues upon DSA unregister event Binding and unbinding the switch driver which creates the DSA slave network devices for which we set-up inspection would lead to undesireable effects since we were not clearing the port/queue mapping to the SYSTEMPORT TX queue. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 25c440704661c1e842516f9364c9cb022a44c5b9 Author: Florian Fainelli Date: Tue Nov 6 15:15:17 2018 -0800 net: systemport: Simplify queue mapping logic The use of a bitmap speeds up the finding of the first available queue to which we could start establishing the mapping for, but we still have to loop over all slave network devices to set them up. Simplify the logic to have a single loop, and use the fact that a correctly configured ring has inspect set to true. This will make things simpler to unwind during device unregistration. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c04a17d2a9ccf1eaba1c5a56f83e997540a70556 Author: Florian Fainelli Date: Tue Nov 6 15:15:16 2018 -0800 net: dsa: bcm_sf2: Turn on PHY to allow successful registration We are binding to the PHY using the SF2 slave MDIO bus that we create, binding involves reading the PHY's MII_PHYSID1/2 which won't be possible if the PHY is turned off. Temporarily turn it on/off for the bus probing to succeeed. This fixes unbind/bind problems where the port connecting to that PHY would be in error since it could not connect to it. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 52d6d05575c3ad812ad92e558ef12b334de3cfaa Author: Maciej W. Rozycki Date: Mon Nov 5 03:19:00 2018 +0000 MIPS: DEC: Add 64-bit DECstation defconfig This supports computers based on the R4000SC processor: * DECstation 5000/150 and DECsystem 5000/150, * Personal DECstation 5000/50, Personal DECsystem 5000/50, and computers based on the R4400SC processor: * DECstation 5000/260 and DECsystem 5000/260, * DECsystem 5900/260, in the 64-bit mode. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20986/ Cc: Ralf Baechle commit 2340b564a7e449aadf707c7f581b6605a0884000 Author: Maciej W. Rozycki Date: Mon Nov 5 03:18:55 2018 +0000 MIPS: DEC: Add R4k DECstation defconfig This supports computers based on the R4000SC processor: * DECstation 5000/150 and DECsystem 5000/150, * Personal DECstation 5000/50, Personal DECsystem 5000/50, and computers based on the R4400SC processor: * DECstation 5000/260 and DECsystem 5000/260, * DECsystem 5900/260, in the 32-bit mode. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20985/ Cc: Ralf Baechle commit 7d52d6cca8b15047878bf1a07234d64a3e98b2da Author: Maciej W. Rozycki Date: Mon Nov 5 03:18:47 2018 +0000 MIPS: DEC: Update R3k DECstation defconfig for Y2018 Regenerate the R3k DECstation defconfig, in particular including more relevant drivers. Signed-off-by: Maciej W. Rozycki Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20984/ Cc: Ralf Baechle commit 43da4e3ee8c4ccdd16e305c9996435cdbb7f1254 Author: Yangtao Li Date: Tue Nov 6 09:36:36 2018 -0500 MIPS: r2-on-r6-emu: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20991/ Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit 5882d526d887e42ead4014d79620e5a8aa741151 Merge: 95772ec991f2d 80f8dea8767ef Author: David S. Miller Date: Tue Nov 6 15:05:23 2018 -0800 Merge branch 'net-dsa-bcm_sf2-Store-rules-in-lists' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Store rules in lists This patch series changes the bcm-sf2 driver to keep a copy of the inserted rules as opposed to using the HW as a storage area for a number of reasons: - this helps us with doing duplicate rule detection in a faster way, it would have required a full rule read before - this helps with Pablo's on-going work to convert ethtool_rx_flow_spec to a more generic flow rule structure by having fewer code paths to convert to the new structure/helpers - we need to cache copies to restore them during drive resumption, because depending on the low power mode the system has entered, the switch may have lost all of its context ==================== Signed-off-by: David S. Miller commit 80f8dea8767ef8fe357f1529fae0e6d8452b5fd2 Author: Florian Fainelli Date: Tue Nov 6 12:58:41 2018 -0800 net: systemport: Restore Broadcom tag match filters upon resume Some of the system suspend states that we support wipe out entirely the HW contents. If we had a Wake-on-LAN filter programmed prior to going into suspend, but we did not actually wake-up from Wake-on-LAN and instead used a deeper suspend state, make sure we restore the CID number that we need to match against. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 1c60c7f9001140e4a3bfae4b1cdcead6b075aecf Author: Florian Fainelli Date: Tue Nov 6 12:58:40 2018 -0800 net: dsa: bcm_sf2: Get rid of unmarshalling functions Now that we have migrated the CFP rule handling to a list with a software copy, the delete/get operation just returns what is on the list, no need to read from the hardware which is both slow and more error prone. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 1c0130f0b5756b38b636e3cb7b3abc2b48bb9edc Author: Florian Fainelli Date: Tue Nov 6 12:58:39 2018 -0800 net: dsa: bcm_sf2: Restore CFP rules during system resume The hardware can lose its context during system suspend, and depending on the switch generation (7445 vs. 7278), while the rules are still there, they will have their valid bit cleared (because that's the fastest way for the HW to reset things). Just make sure we re-apply them coming back from resume. The 7445 switch is an older version of the core that has some quirky RAM technology requiring a delete then re-inser to guarantee the RAM entries are properly latched. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit ce24b08a2e6f7c70dd7a13bd8c2082950f3dd9f3 Author: Florian Fainelli Date: Tue Nov 6 12:58:38 2018 -0800 net: dsa: bcm_sf2: Split rule handling from HW operation In preparation for restoring CFP rules during system wide system suspend/resume where the hardware loses its context, split the rule validation from its actual insertion as well as the rule removal from its actual hardware deletion operation. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit ae7a5aff783c79d5ca87867df84b08c43447159b Author: Florian Fainelli Date: Tue Nov 6 12:58:37 2018 -0800 net: dsa: bcm_sf2: Keep copy of inserted rules We tried hard to use the hardware as a storage area, which made things needlessly complex in that we had to both marshall and unmarshall the ethtool_rx_flow_spec into what the CFP hardware understands but it did not require any driver level allocations, so that was nice. Keep a copy of the ethtool_rx_flow_spec rule we want to insert, and also make sure we don't have a duplicate rule already. This greatly speeds up the deletion time since we only need to clear the slice's valid bit and not perform a full read. This is a preparatory step for being able to restore rules upon system resumption where the hardware loses its context partially or entirely. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 95772ec991f2df6ed20c070803dde5716d1a78fa Merge: 0b215b9798640 68d57f3b1d1a8 Author: David S. Miller Date: Tue Nov 6 15:00:45 2018 -0800 Merge branch 'net-More-extack-messages' David Ahern says: ==================== net: More extack messages Add more extack messages for several link create errors (e.g., invalid number of queues, unknown link kind) and invalid metrics argument. ==================== Signed-off-by: David S. Miller commit 68d57f3b1d1a87b4022a0a7463126d7ea172bda1 Author: David Ahern Date: Tue Nov 6 12:51:16 2018 -0800 rtnetlink: Add more extack messages to rtnl_newlink Add extack arg to the nla_parse_nested calls in rtnl_newlink, and add messages for unknown device type and link network namespace id. In particular, it improves the failure message when the wrong link type is used. From $ ip li add bond1 type bonding RTNETLINK answers: Operation not supported to $ ip li add bond1 type bonding Error: Unknown device type. (The module name is bonding but the link type is bond.) Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d7e774f356765d49b63490d611caa496713b7abb Author: David Ahern Date: Tue Nov 6 12:51:15 2018 -0800 net: Add extack argument to ip_fib_metrics_init Add extack argument to ip_fib_metrics_init and add messages for invalid metrics. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d0522f1cd25edb796548f91e04766fa3cbc3b6df Author: David Ahern Date: Tue Nov 6 12:51:14 2018 -0800 net: Add extack argument to rtnl_create_link Add extack arg to rtnl_create_link and add messages for invalid number of Tx or Rx queues. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 0b215b9798640a542c526e3ae69dee83861a4aee Author: Eric Dumazet Date: Tue Nov 6 14:25:52 2018 -0800 ipv6: gro: do not use slow memcmp() in ipv6_gro_receive() ipv6_gro_receive() compares 34 bytes using slow memcmp(), while handcoding with a couple of ipv6_addr_equal() is much faster. Before this patch, "perf top -e cycles:pp -C " would see memcmp() using ~10% of cpu cycles on a 40Gbit NIC receiving IPv6 TCP traffic. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d24dbd7541ff05617d4a14c579a09d33d66cf47f Author: Boris Brezillon Date: Fri Oct 5 00:41:42 2018 +0200 mtd: maps: Get rid of the latch-addr-flash driver Looks like this driver was initially added to support the NOR on the DA830-EVM (Davinci) board, but the board file update was never merged. Keeping unused drivers just adds to the maintenance burden, so let's remove it if nobody uses it. Cc: David Griego Cc: Aleksey Makarov Cc: Sergei Shtylyov Cc: Savinay Dharmappa Signed-off-by: Boris Brezillon Acked-by: Sekhar Nori commit 99f732b3a8656b148b3725192c8eac6982c6c80d Author: Ricardo Ribalda Date: Fri Oct 19 09:49:08 2018 +0200 mtd: maps: physmap: Invert logic on if/else branch It is preferred to have the positive statement on an if/else. While we are at it we replace the way we access rom_probe_types. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon Acked-by: Linus Walleij commit e8da8794a7fd9eef1ec9a07f0d4897c68581c72b Author: Long Li Date: Tue Nov 6 04:00:00 2018 +0000 genirq/matrix: Improve target CPU selection for managed interrupts. On large systems with multiple devices of the same class (e.g. NVMe disks, using managed interrupts), the kernel can affinitize these interrupts to a small subset of CPUs instead of spreading them out evenly. irq_matrix_alloc_managed() tries to select the CPU in the supplied cpumask of possible target CPUs which has the lowest number of interrupt vectors allocated. This is done by searching the CPU with the highest number of available vectors. While this is correct for non-managed CPUs it can select the wrong CPU for managed interrupts. Under certain constellations this results in affinitizing the managed interrupts of several devices to a single CPU in a set. The book keeping of available vectors works the following way: 1) Non-managed interrupts: available is decremented when the interrupt is actually requested by the device driver and a vector is assigned. It's incremented when the interrupt and the vector are freed. 2) Managed interrupts: Managed interrupts guarantee vector reservation when the MSI/MSI-X functionality of a device is enabled, which is achieved by reserving vectors in the bitmaps of the possible target CPUs. This reservation decrements the available count on each possible target CPU. When the interrupt is requested by the device driver then a vector is allocated from the reserved region. The operation is reversed when the interrupt is freed by the device driver. Neither of these operations affect the available count. The reservation persist up to the point where the MSI/MSI-X functionality is disabled and only this operation increments the available count again. For non-managed interrupts the available count is the correct selection criterion because the guaranteed reservations need to be taken into account. Using the allocated counter could lead to a failing allocation in the following situation (total vector space of 10 assumed): CPU0 CPU1 available: 2 0 allocated: 5 3 <--- CPU1 is selected, but available space = 0 managed reserved: 3 7 while available yields the correct result. For managed interrupts the available count is not the appropriate selection criterion because as explained above the available count is not affected by the actual vector allocation. The following example illustrates that. Total vector space of 10 assumed. The starting point is: CPU0 CPU1 available: 5 4 allocated: 2 3 managed reserved: 3 3 Allocating vectors for three non-managed interrupts will result in affinitizing the first two to CPU0 and the third one to CPU1 because the available count is adjusted with each allocation: CPU0 CPU1 available: 5 4 <- Select CPU0 for 1st allocation --> allocated: 3 3 available: 4 4 <- Select CPU0 for 2nd allocation --> allocated: 4 3 available: 3 4 <- Select CPU1 for 3rd allocation --> allocated: 4 4 But the allocation of three managed interrupts starting from the same point will affinitize all of them to CPU0 because the available count is not affected by the allocation (see above). So the end result is: CPU0 CPU1 available: 5 4 allocated: 5 3 Introduce a "managed_allocated" field in struct cpumap to track the vector allocation for managed interrupts separately. Use this information to select the target CPU when a vector is allocated for a managed interrupt, which results in more evenly distributed vector assignments. The above example results in the following allocations: CPU0 CPU1 managed_allocated: 0 0 <- Select CPU0 for 1st allocation --> allocated: 3 3 managed_allocated: 1 0 <- Select CPU1 for 2nd allocation --> allocated: 3 4 managed_allocated: 1 1 <- Select CPU0 for 3rd allocation --> allocated: 4 4 The allocation of non-managed interrupts is not affected by this change and is still evaluating the available count. The overall distribution of interrupt vectors for both types of interrupts might still not be perfectly even depending on the number of non-managed and managed interrupts in a system, but due to the reservation guarantee for managed interrupts this cannot be avoided. Expose the new field in debugfs as well. [ tglx: Clarified the background of the problem in the changelog and described it independent of NVME ] Signed-off-by: Long Li Signed-off-by: Thomas Gleixner Cc: Michael Kelley Link: https://lkml.kernel.org/r/20181106040000.27316-1-longli@linuxonhyperv.com commit ce1fd6bfb15da135158e93a0ee4c0540cd26b43c Author: Rami Rosen Date: Sun Oct 28 21:04:00 2018 +0200 IB/uverbs: fix a typo This patch fixes a typo in include/rdma/ib_verbs.h. See: https://www.merriam-webster.com/dictionary/lieu Signed-off-by: Rami Rosen Signed-off-by: Doug Ledford commit e48d8ed9c6193502d849b35767fd18e20bbd7ba2 Author: Sagi Grimberg Date: Thu Oct 25 12:40:57 2018 -0700 rxe: fix error completion wr_id and qp_num Error completions must still contain a valid wr_id and qp_num such that the consumer can rely on. Correctly fill these fields in receive error completions. Reported-by: Walker Benjamin Cc: stable@vger.kernel.org Signed-off-by: Sagi Grimberg Reviewed-by: Zhu Yanjun Tested-by: Zhu Yanjun Signed-off-by: Doug Ledford commit 4e588c8d034dacaefc247a1c7af50b345c60a3dd Author: Zhu Yanjun Date: Fri Oct 19 04:53:00 2018 -0400 IB/rxe: clean skb queue directly When resp is in error state, the queued SKBs will not be handled. The function get_req cleans up the skb queue directly. CC: Srinivas Eeda CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford commit 6d10550c84f51cb7c449c51d1a6fd31185a6ba6c Author: Allen Pais Date: Mon Oct 22 19:30:43 2018 +0530 RDMA/hns: prefer dma_zalloc_coherent to dma_alloc_coherent/memse This is a mechanical transformation, no change in logic. Signed-off-by: Allen Pais Signed-off-by: Doug Ledford commit e8eeb3c8aab044ee8faf5e0389db8518629a9324 Author: Jordan Borgner Date: Fri Nov 2 14:56:22 2018 +0000 x86/boot: Simplify the detect_memory*() control flow The return values of these functions are not used - so simplify the functions. No change in functionality. [ mingo: Simplified the changelog. ] Suggested: Ingo Molnar Signed-off-by: Jordan Borgner Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181102145622.zjx2t3mdu3rv6sgy@JordanDesktop Signed-off-by: Ingo Molnar commit e7afb623b4fb82089c9a50c733c740522b8220bc Author: Ville Syrjälä Date: Mon Oct 29 20:34:52 2018 +0200 drm: Add drm_any_plane_has_format() Add a function to check whether there is at least one plane that supports a specific format and modifier combination. Drivers can use this to reject unsupported formats/modifiers in .fb_create(). v2: Accept anyformat if the driver doesn't do planes (Eric) s/planes_have_format/any_plane_has_format/ (Eric) Check the modifier as well since we already have a function that does both v3: Don't do the check in the core since we may not know the modifier yet, instead export the function and let drivers call it themselves Cc: Eric Anholt Cc: Dhinakaran Pandiyan Signed-off-by: Ville Syrjälä Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181029183453.28541-1-ville.syrjala@linux.intel.com commit 5e1abdc3fe56939d9ac34209706b1a527b77b61b Author: Yangtao Li Date: Tue Nov 6 10:45:36 2018 -0500 net: skbuff.h: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: David S. Miller commit e28ae34e51bd2799aa4fdc80053db6cf1d165641 Merge: 326e5c8d4a875 a4d8f64f7267a Author: Mark Brown Date: Tue Nov 6 19:08:00 2018 +0000 Merge branch 'spi-4.20' into spi-4.21 for uniphier DT commit a8d6219536c16b6ab4d6e6f959032670c9368584 Author: Olof Johansson Date: Fri Nov 2 15:00:26 2018 -0700 ISDN: eicon: Remove driver I started looking at the history of this driver, and last time the maintainer was active on the mailing list was when discussing how to remove it. This was in 2012: https://lore.kernel.org/lkml/4F4DE175.30002@melware.de/ It looks to me like this has in practice been an orphan for quite a while. It's throwing warnings about stack size in a function that is in dire need of refactoring, and it's probably a case of "it's time to call it". Cc: Armin Schindler Cc: Karsten Keil Signed-off-by: Olof Johansson Signed-off-by: David S. Miller commit bb8310cc22d7acd34db72f890c267b513dbc24ff Author: Hawking Zhang Date: Sat Sep 29 22:32:42 2018 +0800 drm/amdgpu/psp: add set_topology_info function set_topology_info is used for driver to set current topology info to xgmi ta Signed-off-by: Hawking Zhang Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit ec1a975e0b186dadb56249b9d415bb93c7219da3 Author: Hawking Zhang Date: Sat Sep 29 22:30:44 2018 +0800 drm/amdgpu/psp: add get_topology_info function get_topology_info function is used for driver to query topology_info for current device from xgmi ta Signed-off-by: Hawking Zhang Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 593caa07ad6ad43bcd9edb36d828000053af7e2d Author: Hawking Zhang Date: Sat Sep 29 21:52:50 2018 +0800 drm/amdgpu/psp: update topology info structures topology info structure needs to match with the one defined in xgmi ta Signed-off-by: Hawking Zhang Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 4b93151f57d873b271bb25cf1fb8f230792ba75a Author: Hawking Zhang Date: Sat Sep 29 12:17:42 2018 +0800 drm/amdgpu/psp: add get_hive_id function get_hive_id is used for driver to query hive_id for current device from xgmi ta Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit dd3c45d306220b7f3e40fd1457eaf480ab7d1b26 Author: Hawking Zhang Date: Fri Sep 28 21:50:37 2018 +0800 drm/amdgpu/psp: add get_node_id function get_node_id function is used for driver to get node_id for current device from xgmi ta Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher commit 3e2e2ab55499f77cbd57ee91e250c085d252a979 Author: Hawking Zhang Date: Fri Sep 28 21:28:10 2018 +0800 drm/amdgpu/psp: initialize xgmi session (v2) Setup and tear down xgmi as part of psp. v2: - make psp_xgmi_terminate static - squash in: drm/amdgpu: only issue xgmi cmd when it is enabled drm/amdgpu/psp: terminate xgmi ta in suspend and hw_fini phase Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ca6e1e59a24bf4aed4d017163f8184eb4e384a9b Author: Hawking Zhang Date: Fri Sep 28 15:01:57 2018 +0800 drm/amdgpu/psp: add helper function to invoke xgmi ta per ta cmd_id psp_xgmi_invoke is the helper function to issue ta cmd to firmware Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 4de5f0055adf1ed45c81596afad1a41294af9e87 Author: Hawking Zhang Date: Sat Sep 29 14:18:22 2018 +0800 drm/amdgpu/psp: add xgmi ta header Add the psp xgmi driver interface. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 97c8d171105d51049ef00b1ef2ca1106bf2e8c6b Author: Hawking Zhang Date: Fri Oct 12 09:43:23 2018 +0800 drm/amdgpu/psp: add helper function to load/unload xgmi ta Add helper functions for the psp xgmi ta. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 51e7177f361ab804e788ae4924e1f5a73c76ef52 Author: Hawking Zhang Date: Thu Oct 11 21:48:00 2018 +0800 drm/amdgpu/psp: init/de-init xgmi ta microcode Add ucode handling for psp xgmi ta firmware. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f0cfa19579fae3bd06366ebccdba26020bb6214a Author: Hawking Zhang Date: Thu Oct 11 15:36:15 2018 +0800 drm/amdgpu/psp: add structure for xgmi ta and its shared buffer Add data structures for xgmi trusted application. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1cda5e2161b401b98e3dad561c7da0013b617f4b Author: Alex Deucher Date: Tue Nov 6 11:19:00 2018 -0500 drm/amdgpu/vega20: add CLK base offset In case we need to access CLK registers. Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit bab45e44b131e529be750a8048e4d74cbaec1aa2 Author: Harry Wentland Date: Sun Oct 7 10:01:23 2018 -0400 drm/amd/display: Stop leaking planes [Why] drm_plane_cleanup does not free the plane. [How] Call drm_primary_helper_destroy which will also free the plane. Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f180b4bccc89332cad420a192797bc5dfb1ab5ee Author: Harry Wentland Date: Fri Oct 5 11:58:34 2018 -0400 drm/amdgpu: Drop amdgpu_plane It's unnecessarily duplicating drm_plane_type. Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c2af2a4264f8b6151837dd58623a6cb786348e44 Author: Shaokun Zhang Date: Mon Nov 5 18:33:35 2018 +0800 drm/amd/display: Fix misleading buffer information RETIMER_REDRIVER_INFO shows the buffer as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print hexadecimal, as was intended. Fixes: 2f14bc89("drm/amd/display: add retimer log for HWQ tuning use.") Cc: Charlene Liu Cc: Dmytro Laktyushkin Signed-off-by: Shaokun Zhang Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 694d0775ca94beccfa8332d9284c1e8b6b19ad01 Author: David Francis Date: Tue Nov 6 11:06:04 2018 -0500 drm/amd: Don't fail on backlight = 0 Amgpu's backlight update status function was returning 1 (an error value) when the backlight property was 0. This breaks users that assume 0 is a valid backlight value (which is a correct assumption) If the user passes in a backlight value of 0, tell them everything is fine, then write a value of 1 to hardware. Signed-off-by: David Francis Bugzilla: https://bugs.freedesktop.org/108668 Fixes: 416615ea9578 ("drm/amd/display: set backlight level limit to 1") Cc: Suresh.Guttula@amd.com Cc: Harry.Wentland@amd.com Cc: Samantham@posteo.net Signed-off-by: Alex Deucher commit 45cf8c23f3564e3f39ae09b70b9dff24acae4a56 Author: Leo Li Date: Tue Oct 30 15:09:08 2018 -0400 drm/amd: Update atom_smu_info_v3_3 structure Mainly adding the WAFL spread spectrum info, for adjusting display clocks when XGMI is enabled. Signed-off-by: Leo Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 227fa865061470a568858baa404a508f6c030fe4 Author: Phil Elwell Date: Mon Sep 17 09:22:24 2018 +0100 ARM: dts: bcm283x: Correct mailbox register sizes The size field in a Device Tree "reg" property is encoded in bytes, not words. Fixes: 614fa22119d6 ("ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)") Signed-off-by: Phil Elwell Acked-by: Stefan Wahren Signed-off-by: Stefan Wahren commit 499770ede3f829e80539f46b59b5f460dc327aa6 Author: Phil Elwell Date: Mon Sep 17 09:22:23 2018 +0100 ARM: dts: bcm283x: Correct vchiq compatible string To allow VCHIQ to determine the correct cache line size, use the new "brcm,bcm2836-vchiq" compatible string on BCM2836 and BCM2837. Signed-off-by: Phil Elwell Acked-by: Stefan Wahren Signed-off-by: Stefan Wahren commit a2aabe5f3c57fabefe369b636db3df86874218be Author: Phil Elwell Date: Mon Sep 17 09:22:22 2018 +0100 dt-bindings: soc: Document "brcm,bcm2836-vchiq" "brcm,bcm2836-vchiq" should be used on BCM2836 and BCM2837 to ensure correct operation. Signed-off-by: Phil Elwell Acked-by: Stefan Wahren Signed-off-by: Stefan Wahren commit eaeee28db2893dc56a29751f19210dc8ce8247c3 Author: Taniya Das Date: Sat Nov 3 00:00:02 2018 -0700 clk: qcom: smd: Add support for QCS404 rpm clocks Add rpm smd clocks, PMIC and bus clocks which are required on QCS404 for clients to vote on. Signed-off-by: Taniya Das Signed-off-by: Anu Ramanathan [bjorn: Dropped cxo, voter clocks and static initialization] Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 56950ff82325b9712ad54874c81a22e4de38b0c7 Author: Julia Lawall Date: Sat Oct 27 07:47:40 2018 +0200 clk: s2mps11: constify clk_ops structure The clk_ops structure is only stored in the ops fields of clk_init_data structures. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Chanwoo Choi Signed-off-by: Stephen Boyd commit 5fc6eb7d74f46a96cacc5147f87afd88a01bb89b Author: Julia Lawall Date: Sat Oct 27 07:47:39 2018 +0200 clk: pxa: constify clk_ops structures These clk_ops structures are only passed to a call to clk_register_composite where the corresponding parameters are const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Stephen Boyd commit 16ace88405fba82b9c86aeac824d82072ff89c0f Author: Julia Lawall Date: Sat Oct 27 07:47:38 2018 +0200 clk: pistachio: constify clk_ops structures These clk_ops structures are only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structures can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Stephen Boyd commit 19aa8e32b9e699279b71b94ad4fe26b6b58a4fb9 Author: Julia Lawall Date: Sat Oct 27 07:47:37 2018 +0200 clk: palmas: constify clk_ops structure The clk_ops structure is only stored in the ops field of clk_init_data structures. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Stephen Boyd commit 25600dad4145184b866474a2c9e072e59d90550e Author: Julia Lawall Date: Sat Oct 27 07:47:35 2018 +0200 clk: max77686: constify clk_ops structure The clk_ops structure is only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit f69f452243e4e16d7a3d0a14e14126b10933d545 Author: Kuninori Morimoto Date: Tue Nov 6 05:21:46 2018 +0000 ASoC: rsnd: add TDM Split mode support This patch adds TDM Split mode support. rsnd driver is assuming audio-graph-scu-card is used for Sound Card. This is very simple sample DT settings to use it. sound_card: sound { compatible = "audio-graph-scu-card"; ... convert-channels = <8>; /* TDM Split */ dais = <&rsnd_port0 /* playback ch1/ch2 */ &rsnd_port1 /* playback ch3/ch4 */ &rsnd_port2 /* playback ch5/ch6 */ &rsnd_port3 /* playback ch7/ch8 */ >; }; audio-codec { ... port { codec_0: endpoint@1 { remote-endpoint = <&rsnd_ep0>; }; codec_1: endpoint@2 { remote-endpoint = <&rsnd_ep1>; }; codec_2: endpoint@3 { remote-endpoint = <&rsnd_ep2>; }; codec_3: endpoint@4 { remote-endpoint = <&rsnd_ep3>; }; }; }; &rcar_sound { ... ports { rsnd_port0: port@0 { rsnd_ep0: endpoint { remote-endpoint = <&codec_0>; ... playback = <&ssiu30 &ssi3>; }; }; rsnd_port1: port@1 { rsnd_ep1: endpoint { remote-endpoint = <&codec_1>; ... playback = <&ssiu31 &ssi3>; }; }; rsnd_port2: port@2 { rsnd_ep2: endpoint { remote-endpoint = <&codec_2>; ... playback = <&ssiu32 &ssi3>; }; }; rsnd_port3: port@3 { rsnd_ep3: endpoint { remote-endpoint = <&codec_3>; ... playback = <&ssiu33 &ssi3>; }; }; }; }; Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit cf704dc83fd6600758e98ac71769eaeb00dfc770 Author: Kuninori Morimoto Date: Tue Nov 6 05:21:22 2018 +0000 ASoC: rsnd: add TDM Split mode support for Document This patch adds TDM Split mode support. rsnd driver is assuming audio-graph-scu-card is used for Sound Card. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 4e7788fb8018afbb2e34e9d59b59baea30f5b045 Author: Kuninori Morimoto Date: Tue Nov 6 05:21:08 2018 +0000 ASoC: rsnd: add SSIU BUSIF support Gen2 has BUSIF0-3, Gen3 has BUSIF0-7 on some SSIU. Current driver is assuming it is using BUSIF0 as default. Thus, SSI is attaching SSIU (with BUSIF0) by using rsnd_ssiu_attach(). But, TDM split mode also needs other BUSIF to use it. This patch adds missing SSIU BUSIFx support. BUSIF is handled by SSIU instead of SSI anymore. Thus, its settings no longer needed on SSI node on DT. This patch removes its settings from Document, but driver is still keeping compatibility. Thus, old DT style is still working. But, to avoid confusing, it doesn't indicate old compatibility things on Document. New SoC should have SSIU on DT from this patch. 1) old style DT is still supported (= no rcar_sound,ssiu node on DT) 2) If ssiu is not indicated on playback/capture, BUSIF0 will be used as default playback = <&ssi3>; /* ssiu30 will be selected */ 3) you can select own ssiu playback = <&ssi32 &ssi3>; /* ssiu32 will be selected */ Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit da48a6eb82ea2eaa26464f863f0f39908727bfdb Author: Kuninori Morimoto Date: Tue Nov 6 05:20:56 2018 +0000 ASoC: rsnd: add SSIU BUSIF support for Document Gen2 has BUSIF0-3, Gen3 has BUSIF0-7 on some SSIU. Current driver is assuming it is using BUSIF0 as default. Thus, SSI is attaching SSIU (with BUSIF0) by using rsnd_ssiu_attach(). But, TDM split mode also needs other BUSIF to use it. This patch adds missing SSIU BUSIFx support. BUSIF is handled by SSIU instead of SSI anymore. Thus, its settings no longer needed on SSI node on DT. This patch removes its settings from Document, but driver is still keeping compatibility. Thus, old DT style is still working. But, to avoid confusing, it doesn't indicate old compatibility things on Document. New SoC should have SSIU on DT from this patch. 1) old style DT is still supported (= no rcar_sound,ssiu node on DT) 2) If ssiu is not indicated on playback/capture, BUSIF0 will be used as default playback = <&ssi3>; /* ssiu30 will be selected */ 3) you can select own ssiu playback = <&ssi32 &ssi3>; /* ssiu32 will be selected */ Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit bd7ff187fac33c2fd221aa4073215d38d9c6b6ed Author: Kuninori Morimoto Date: Tue Nov 6 05:20:25 2018 +0000 ASoC: rsnd: tidyup Document for DT binding It has duplicated DT example code on Document. This patch tidyup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c2aaaa57d44a195b71fe1e9ff0c6a80ac017495d Author: Kuninori Morimoto Date: Tue Nov 6 05:20:10 2018 +0000 ASoC: rsnd: handle DPCM converted rate/chan under core converted rate/chan are handled each rated module, but it will be used other module too. For examle, converted channel is currently used for CTU, but, it will be used for TDM Split mode, too. This patch move/merge SRC/CTU hw_param under core.c and handles converted rate/chan under rsnd_dai_stream. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit beed78aeeb10214798b1fd5f1dd05e0b7199d65f Author: Kuninori Morimoto Date: Tue Nov 6 05:19:48 2018 +0000 ASoC: rsnd: move HDMI information from ssi.c to core.c Current driver is supporting HDMI output, and its information are handled under ssi.c. But, it is stream information. Let's move it from ssi.c to core.c. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 9328882e9dc6b3ae6d11eaf6dbdeb45dfbb2d38f Author: Kuninori Morimoto Date: Tue Nov 6 05:19:33 2018 +0000 ASoC: rsnd: use defined io_playback/io_capture rdai->playback/rdai->capture are defined as io_playback/io_capture on __rsnd_dai_probe(). Let's use it instead of original one. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit a607280293b4b804fa080c75412b256ec37ce04c Author: Kuninori Morimoto Date: Tue Nov 6 05:19:19 2018 +0000 ASoC: rsnd: rename rsnd_runtime_is_ssi_xxx() Current rsnd driver has rsnd_runtime_is_ssi_xxx() functions, but it is not only related to SSI, thus, it is misunderstandable. This patch renames it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c8b222bf110ccb54d787f695fb3eb2fb6b723903 Author: Kuninori Morimoto Date: Tue Nov 6 05:18:58 2018 +0000 ASoC: rsnd: remove endpoint bidirectional check DTC commit df536831d02c ("checks: add graph binding checks") is checking endpoint bidirectional, and it is upstreamed to linux by commit 50aafd60898a ("scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc"). Let's remove own bidirectional check Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 5049a6e7316cdbf4370d5479e9628d8f5e906635 Author: Kuninori Morimoto Date: Tue Nov 6 04:36:55 2018 +0000 ASoC: audio-graph-scu-card: remove error check which never happen Current driver is checking situation that can not happen. This patch removes over-kill check Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 1a115f3a5418459aabc10628eb25dff1bae64bca Author: Kuninori Morimoto Date: Tue Nov 6 04:36:41 2018 +0000 ASoC: audio-graph-scu-card: remove endpoint bidirectional check DTC commit df536831d02c ("checks: add graph binding checks") is checking endpoint bidirectional, and it is upstreamed to linux by commit 50aafd60898a ("scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc"). Let's remove own bidirectional check Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit ea662d2f804ad13c3c92c75c7dc1abad30e31c31 Author: Anson Huang Date: Fri Oct 19 01:05:36 2018 +0000 clk: imx7d: remove UART1 clock setting There are clock assignments in all i.MX7D dtb files for UART1, below is the example in imx7d-sdb.dts, so setting UART1 clock in clock driver is NOT necessary, actually, module clocks setting should be done in module driver. &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>; assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; status = "okay"; }; Signed-off-by: Anson Huang Signed-off-by: Stephen Boyd commit 39ee0b3401feac5932dca6a98d538438aa5f6236 Author: Kuninori Morimoto Date: Tue Nov 6 04:36:27 2018 +0000 ASoC: audio-graph-card: remove endpoint bidirectional check DTC commit df536831d02c ("checks: add graph binding checks") is checking endpoint bidirectional, and it is upstreamed to linux by commit 50aafd60898a ("scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc"). Let's remove own bidirectional check Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 819ed0ad91cdd091e34293bc81944abb167f100c Author: Stefan Wahren Date: Tue Oct 23 13:06:06 2018 +0200 clk: bcm2835: make license text and module license match The license text is specifying GPL v2 or later but the MODULE_LICENSE is set to GPL v2 which means GNU Public License v2 only. So choose the license text as the correct one. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd commit 61d0de0543a6e982918c6054a6a12cfbdd73018a Author: Adam Ford Date: Tue Oct 30 09:55:07 2018 -0500 regulator: pfuze100-regulator: add coin support to PF0100 The driver currently supports coin cell / super cap charging, so this patch extends it to support PF0100. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown commit 935ff8007f5efd24e995d26ebf875ee2c787465e Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:54 2018 -0500 ASoC: Intel: common: add quirk for APL RVP boards For some reason the RVP/LeafHill SSDT exposes an INT34C3 ID which is used on other boards to point to the TDF8532 amplifier. Yay BIOS. Add a DMI-quirk to ignore this ID and check for other valid machine driver descriptors. Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 97bb91ae2f3325fd06ea2c28fb8b5b4e023b4b5d Author: Bard liao Date: Thu Nov 1 16:34:53 2018 -0500 ASoC: Intel: common: add SOF information for APL RVP Add firmware/topology information for APL RVP Reviewed-by: Andy Shevchenko Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 972b0d456e645ea8fd3fdc70f95f0e41c27c0870 Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:52 2018 -0500 ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL GFP_ATOMIC is not required on any Intel drivers, use GFP_KERNEL instead. A first cleanup was merged in April but missed a number occurrences and new ones were added by copy/paste inertia. While we are at it, make checkpatch happy with a sizeof(*msg) Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 48bf41a2be51ef3f67b60f85bf75cecfb57884ba Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:51 2018 -0500 ASoC: Intel: boards: fix Skylake typo s/skylaye/skylake Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 3ee1cd4f81e15f51638db80fb9f1371b3bdf05ba Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:50 2018 -0500 ASoC: Intel: use standard interface for Atom machine drivers Don't rely on internal Atom/SST-specific data structures, use generic interface to let other drivers use the same machine drivers as is, e.g. SOF to support BYT-CR devices Tested-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 842bb5135f1016151235413726e4956210a79664 Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:49 2018 -0500 ASoC: Intel: use standard interface for Hdaudio machine driver Don't rely on internal Skylake-specific data structures, use generic interface to let other drivers use the same machine driver as is, e.g. SOF to support HDaudio codecs and HDMI outputs. Tested on LeafHill CRB board, no regression seen with this change. Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8679284b37e9e2d529d60d1acc4133af4aa5dd34 Author: Pierre-Louis Bossart Date: Thu Nov 1 16:34:48 2018 -0500 ASoC: acpi: define common interface for machine driver configuration The machine drivers may need information provided by the platform driver. Currently the information is passed using pdata specific to each plaform driver. This prevents other drivers, such as SOF, from reusing machine drivers directly. Add a new structure which contains the required fields. This proposal requires a bit more work on the platform side but this generic interface helps reuse code directly. Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 968029057192e46dd78e807b81c2aba2d7648c38 Author: Daniel Vetter Date: Mon Nov 5 11:12:11 2018 +0100 drm/lease: look at ->universal_planes only once It's lockless, and userspace might chance it underneath us. That's not really a problem, all userspace gets is a slightly dysfunctional lease with the current code. But this might change, and gcc might decide to reload a few too many times, and then boom. So better safe than sorry. v2: Remove the now unused lessor_priv argument from validate_lease() (Keith). v3: Actually add everything ... silly me. Cc: Keith Packard Cc: Dave Airlie Acked-by: Keith Packard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181105101211.22737-1-daniel.vetter@ffwll.ch commit 078b7de41249b989a574339078696663e095cf37 Author: Daniel Vetter Date: Fri Nov 2 14:25:42 2018 +0100 drm/file: Uncompact the feature flags This essentially undoes commit 39868bd7668bd47308b1dfd97c212757caee764f Author: Chris Wilson Date: Tue Oct 29 08:55:58 2013 +0000 drm: Compact booleans within struct drm_file We do lockless access to these flags everywhere, and it's kinda not a great idea to mix lockless and bitfields. Aside from that gcc isn't generating great code for these. If this ever becomes an issue size-wise, I think we need atomic_t here and atomic bitflag ops. Cc: Chris Wilson Cc: David Herrmann Cc: Dave Airlie Acked-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181102132543.16486-2-daniel.vetter@ffwll.ch commit a0c1af46e9d71fdae7df904b91542ce2518382a1 Author: Daniel Vetter Date: Fri Nov 2 14:25:41 2018 +0100 drm/lease: debug output for lease creation I spent a bit of time scratching heads and figuring out why the igts don't work. Probably useful to keep this work. Cc: Keith Packard Cc: Dave Airlie Acked-by: Keith Packard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181102132543.16486-1-daniel.vetter@ffwll.ch commit 25540f68c871d0ed3771b552eb640a1130880ab6 Author: Arnd Bergmann Date: Fri Nov 2 12:20:39 2018 +0100 ASoC: pxa: change ac97 dependencies Enabling both the old AC97_BUS code and the new AC97_BUS_COMPAT causes problems because both modules provide an exported snd_ac97_reset() function. I had tried to fix the problem of having both coexist earlier, but my patch only prevented them from being built-in. This is because of a special Kconfig feature that lets a symbol have a dependency on another one being disabled, but still allow both to be loadable modules. Changing the dependency to =n avoids that problem, now we can only build the new driver if the old one is completely disabled. If we could figure out a way to let rename one of the reset functions and have each driver link to exactly the old or the compat code, that would also work, but I could not find if that's possible. Fixes: bec5ecdf41d4 ("ASoC: pxa: avoid AC97_BUS build warning") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown commit 2c2596f3ab25008adbc12059321cadbf5264e7bb Author: Peter Ujfalusi Date: Mon Nov 5 15:10:11 2018 +0200 ASoC: omap: Remove unused machine driver for AM3517-evm The audio support is done via simple-audio-card via DT, the custom driver is no longer needed. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown commit 223bc10b84970fd772c105b550beeef3ac3502be Author: Kuninori Morimoto Date: Tue Nov 6 04:33:02 2018 +0000 ASoC: pcm3168a: remove read-only status register from snd_kcontrol_new "DACn Zero Flag" and "ADCn Overflow Flag" are read-only status register. These information are needed for driver not for user. Let's remove these from snd_kcontrol_new. There is no detail explanation for these register on datasheet, but, judging from its behavior, it seems these register needs clock to read. Otherwise, I2C returns error. Therefor, amixer command will be failed under non working timing. Without this patch, user often fail amixer command. This patch is tested on R-Car H3 ulcb-kf board, SSI3/4 TDM sound. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 39dfdf00c7a56b2a8c01c596f6522f089428b1c7 Author: Axel Lin Date: Tue Nov 6 17:39:19 2018 +0800 ASoC: ak5558: Remove redundant snd_soc_component_read32 calls snd_soc_component_update_bits() will only update the mask bits, so remove the redundant snd_soc_component_read32(). Signed-off-by: Axel Lin Reviewed-by: Daniel Baluta Signed-off-by: Mark Brown commit 7d129adff3afbd3a449bc3593f2064ac546d58d3 Author: Shaokun Zhang Date: Mon Nov 5 19:25:30 2018 +0800 rtlwifi: rtl8192de: Fix misleading REG_MCUFWDL information RT_TRACE shows REG_MCUFWDL value as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print hexadecimal, as was intended. Cc: Ping-Ke Shih Cc: Kalle Valo Signed-off-by: Shaokun Zhang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit ac9ccb8b991cfca7f5847734089115f992bef7ff Author: Yangtao Li Date: Thu Nov 1 11:40:23 2018 -0400 iwlegacy: fix small typo Signed-off-by: Yangtao Li Signed-off-by: Kalle Valo commit f4bd758f3f20e3cbcc7bc66880118a2681981e7d Author: Yangtao Li Date: Thu Nov 1 11:33:19 2018 -0400 cw1200: fix small typo Signed-off-by: Yangtao Li Signed-off-by: Kalle Valo commit ae5848cb4511bbbfe0306fcdbe5d9a95cd9546a9 Author: Rafał Miłecki Date: Fri Oct 26 13:22:32 2018 +0200 brcmutil: print invalid chanspec when WARN-ing On one of my devices I got WARNINGs when brcmfmac tried to decode chanspec. I couldn't tell if it was some unsupported format or just a malformed value passed by a firmware. Print chanspec value so it's possible to debug a possible problem. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 3d39e1bb1c88f32820c5f9271f2c8c2fb9a52bac Author: Dan Carpenter Date: Wed Oct 24 11:33:34 2018 +0300 wireless: airo: potential buffer overflow in sprintf() It looks like we wanted to print a maximum of BSSList_rid.ssidLen bytes of the ssid, but we accidentally use "%*s" (width) instead of "%.*s" (precision) so if the ssid doesn't have a NUL terminator this could lead to an overflow. Static analysis. Not tested. Fixes: e174961ca1a0 ("net: convert print_mac to %pM") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 963b307361bd415b6979910b1ef0c39bfee7f70c Author: zhong jiang Date: Wed Oct 24 14:07:36 2018 +0800 rtlwifi: Remove same duplicated includes Just remove same duplicated includes. Signed-off-by: zhong jiang Signed-off-by: Kalle Valo commit 90e3243d16ad1ffef78c2dc56f376cb7f6ca76f8 Author: zhong jiang Date: Wed Oct 24 13:52:09 2018 +0800 rtlwifi: rtl8723ae: Remove set but not used variables and #defines radiob_array_table' and 'radiob_arraylen' are not used after setting its value. It is safe to remove the unused variable. Meanwhile, radio B array should be removed as well. because it will no longer be referenced. Signed-off-by: zhong jiang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit 96fca788e5788b7ea3b0050eb35a343637e0a465 Author: Ali MJ Al-Nasrawy Date: Tue Oct 23 19:12:35 2018 +0300 brcmsmac: never log "tid x is not agg'able" by default This message greatly spams the log under heavy Tx of frames with BK access class which is especially true when operating as AP. It is also not informative as the "agg'ablity" of TIDs are set once and never change. Fix this by logging only in debug mode. Signed-off-by: Ali MJ Al-Nasrawy Signed-off-by: Kalle Valo commit 7cbbe1597e4497d14b4d4b22d444a168caae1ce4 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:48:26 2018 +0200 zd1201: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 89e54fa4562e74f129a95855b0e81ef5863d618b Author: Gustavo A. R. Silva Date: Mon Oct 22 22:47:59 2018 +0200 rtlwifi: rtl8821ae: phy: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit d22d2492a35d507ec8edc0797418341bb716d8ff Author: Gustavo A. R. Silva Date: Mon Oct 22 22:47:20 2018 +0200 ray_cs: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114948 ("Missing break in switch") Addresses-Coverity-ID: 114949 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 641dd8068ecb078e7d12efe465df202bc16ca5eb Author: Gustavo A. R. Silva Date: Mon Oct 22 22:46:47 2018 +0200 rt2x00: rt61pci: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 916e6bbcfcff6cc5d7d33bba8557a30f3af50326 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:46:03 2018 +0200 rt2x00: rt2800lib: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 145198 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 10bb92217747c3384a01ebec005faa2f5e72bbd8 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:45:19 2018 +0200 rt2x00: rt2500pci: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 6eba8fd2235237784dfd01da55c3210d493aebdb Author: Gustavo A. R. Silva Date: Mon Oct 22 22:44:34 2018 +0200 rt2x00: rt2400pci: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 63fdc952df36b26279ad394a84e454cc74decb89 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:43:55 2018 +0200 mwifiex: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 38a0792d08e98a9aac5bcf638d8533d3fa5ff253 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:43:05 2018 +0200 prism54: islpci_dev: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114947 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 3d238b9d5048886ca6c4dbbd1381c2ae81759a14 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:42:47 2018 +0200 prism54: isl_ioctl: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit d22b8fadd08e95124e13860397d2071a6f6625bc Author: Gustavo A. R. Silva Date: Mon Oct 22 22:42:29 2018 +0200 prism54: isl_38xx: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114944 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit d56b26801e1d7663f4d138fa8893174d91205586 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:42:04 2018 +0200 orinoco_usb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit af71f8fef45ce7ebc2d4cab611942dbe439905f1 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:41:23 2018 +0200 iwlegacy: common: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 201384 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit e9904084dd1be8de5bc06eaca75276556ef53e79 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:40:53 2018 +0200 iwlegacy: 4965-mac: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 307b00c5e695857ca92fc6a4b8ab6c48f988a1b1 Author: Gustavo A. R. Silva Date: Mon Oct 22 13:51:03 2018 +0200 rtl8xxxu: Fix missing break in switch Add missing break statement in order to prevent the code from falling through to the default case. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit e20c50cdca19e1dfcba64b17e9ae8a0a7540c7a2 Author: Gustavo A. R. Silva Date: Mon Oct 22 13:50:08 2018 +0200 rtl8xxxu: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357355 ("Missing break in switch") Addresses-Coverity-ID: 1357378 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 9198f460ec9d0ba95b0e903537d4ef96d9e8d617 Author: YueHaibing Date: Mon Oct 22 07:51:15 2018 +0000 rtlwifi: btcoex: remove set but not used variable 'ppsc' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_leave_lps': drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:295:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_enter_lps': drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:318:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] It never used since introduction in commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver") Signed-off-by: YueHaibing Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit 1066bd193d681bda0fbacda9df351241a5ee04d9 Author: Sergey Matyukevich Date: Wed Oct 17 14:02:47 2018 +0000 qtnfmac: fix error handling in control path This patch fixes the following warnings: - smatch drivers/net/wireless/quantenna/qtnfmac/commands.c:132 qtnf_cmd_send_with_reply() warn: variable dereferenced before check 'resp' (see line 117) drivers/net/wireless/quantenna/qtnfmac/commands.c:716 qtnf_cmd_get_sta_info() error: uninitialized symbol 'var_resp_len'. drivers/net/wireless/quantenna/qtnfmac/commands.c:1668 qtnf_cmd_get_mac_info() error: uninitialized symbol 'var_data_len'. drivers/net/wireless/quantenna/qtnfmac/commands.c:1697 qtnf_cmd_get_hw_info() error: uninitialized symbol 'info_len'. drivers/net/wireless/quantenna/qtnfmac/commands.c:1753 qtnf_cmd_band_info_get() error: uninitialized symbol 'info_len'. drivers/net/wireless/quantenna/qtnfmac/commands.c:1782 qtnf_cmd_send_get_phy_params() error: uninitialized symbol 'response_size'. drivers/net/wireless/quantenna/qtnfmac/commands.c:2438 qtnf_cmd_get_chan_stats() error: uninitialized symbol 'var_data_len'. - gcc-8.2.1 drivers/net/wireless/quantenna/qtnfmac/commands.c: In function 'qtnf_cmd_send_with_reply': drivers/net/wireless/quantenna/qtnfmac/commands.c:133:54: error: 'resp' may be used uninitialized in this function [-Werror=maybe-uninitialized] Reported-by: Dan Carpenter Reported-by: Arnd Bergmann Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit e966a79c2f761a696dec9cfb0e2d4aa977bf78cb Author: Colin Ian King Date: Tue Oct 16 18:43:42 2018 +0100 brcmfmac: fix spelling mistake "Retreiving" -> "Retrieving" Trivial fix to spelling mistake in brcmf_err error message. Signed-off-by: Colin Ian King Acked-by: Arend van Spriel Signed-off-by: Kalle Valo commit 3283ee771c88bdf28d427b7ff0831a13213a812c Author: Lucas Stach Date: Mon Nov 5 18:12:39 2018 +0100 drm/etnaviv: consolidate hardware fence handling in etnaviv_gpu This is the only place in the driver that should have to deal with the raw hardware fences. To avoid any further confusion, consolidate the fence handling in this file and remove any traces of this from the header files. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit f4163814813fb3f3f6f2fd791429bd41135f1f79 Author: Lucas Stach Date: Mon Nov 5 18:12:38 2018 +0100 drm/etnaviv: kill active fence tracking There is no need to track the currently active fence. The GPU scheduler keeps track of all the in-flight jobs. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit e401fa25cfa23df8b17960a656ff11f49facae84 Author: Sergey Matyukevich Date: Tue Oct 16 10:23:58 2018 +0000 qtnfmac: add support for Topaz chipsets This patch adds support for QSR1000/QSR2000 family of chipsets to qtnfmac_pcie platform driver. QSR1000/QSR2000 (aka Topaz) is a family of 80MHz, 11ac Wave2, 4x4/2x4/2x2 chips, including single and dual band devices. Depending on specific chip model and firmware in use, either STA or both STA and AP modes are supported. Patch adds Topaz support to qtnfmac_pcie driver. Proper platform bus will be selected on probing based on chip ID. Signed-off-by: Igor Mitsyanko Signed-off-by: Sergey Matyukevich Signed-off-by: Andrey Shevchenko Signed-off-by: Kalle Valo commit b7da53cd6cd13a782bb08e59b4a3358ec800f724 Author: Igor Mitsyanko Date: Tue Oct 16 10:23:56 2018 +0000 qtnfmac_pcie: use single PCIe driver for all platforms Single PCIe driver can identify hardware type by reading CHIP ID at probe time and invoking a correct initialization sequence. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo commit 3419348a97bcc256238101129d69b600ceb5cc70 Author: Christophe JAILLET Date: Tue Oct 16 09:39:40 2018 +0200 wlcore: Fix the return value in case of error in 'wlcore_vendor_cmd_smart_config_start()' We return 0 unconditionally at the end of 'wlcore_vendor_cmd_smart_config_start()'. However, 'ret' is set to some error codes in several error handling paths and we already return some error codes at the beginning of the function. Return 'ret' instead to propagate the error code. Fixes: 80ff8063e87c ("wlcore: handle smart config vendor commands") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo commit 937a13091cbd36d2cf1c266522f962ef6fe84bb5 Author: YueHaibing Date: Mon Oct 15 02:16:35 2018 +0000 libertas: remove set but not used variable 'int_type' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/marvell/libertas/if_spi.c: In function 'if_spi_h2c': drivers/net/wireless/marvell/libertas/if_spi.c:799:6: warning: variable 'int_type' set but not used [-Wunused-but-set-variable] It never used since introduction in commit d2b21f191753 ("libertas: if_spi, driver for libertas GSPI devices") Signed-off-by: YueHaibing Tested-by: Lubomir Rintel Signed-off-by: Kalle Valo commit 55930d2bf79bfed9c7a435e7920123b16620ee27 Author: Colin Ian King Date: Sat Oct 13 16:37:30 2018 +0100 rsi: fix spelling mistake "Initialzing" -> "Initializing" Trivial fix to spelling mistake in rsi_dbg debug message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 29ec3394f0bd85c22674ab6693d92da5e2324610 Author: Hans de Goede Date: Thu Oct 11 11:51:07 2018 +0200 brcmfmac: Fix ccode from EFI nvram when necessary In some cases the EFI-var stored nvram contains "ccode=ALL" or "ccode=XV" to specify "worldwide" compatible settings, but these 2 ccode-s do not work properly. I've tested the different known "worldwide" ccode-s used in various nvram sources with the latest firmwares from linux-firmware for various brcmfmac models, here is a simplified (*) table with what each setting results in: ALL: 12-14 disab, U-NII-1, U-NII-2 no-IR/radar, U-NII-3 XV: 12-14 no-IR, disables all 5G channels XY: 12-13 enab, 14 disab, U-NII-1 enab, U-NII-2 no-IR/radar, U-NII-3 disab X2: 12-13 no-IR, 14 dis, U-NII-1 no-IR, U-NII-2 no-IR/radar, U-NII-3 no-IR Where 12,13,14 are 2.4G channels 12-14 and U-NII-1/2/3 are the 3 different 5G channel groups. no-IR is no-Initiate-Radiation, we will never send on these channels without first having received valid wifi traffic there. This immediately shows that both ALL and XV are not as worldwide as we want them to be. ALL causes channels 12 and 13 to not be available and XV causes all 5GHz channels to not be available. Also ALL unconditionally enables the U-NII-1 and U-NII-3 5G groups, while we really should be using no-IR for these. This commit replace XV and ALL with X2, which allows usage of chan 12-13 and 5G channels, but only after receiving valid wifi traffic there first. Note that this configure the firmware's channel limits, the kernels own regulatory restrictions based on e.g. regulatory info received from the access-point, will be applied on top of this. This fixes channels 12+13 not working on the Asus T200TA and the Lenovo Mixx 2 8 and 5G channels not working on the Asus T100HA. This has been tested on the following models: Acer Iconia Tab8 w1-810, Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a Lenovo Mixx 2 8. *) There are some exceptions to this table: 1) On really old firmware e.g. linux-firmware's 2011 brcmfmac4330-sdio.bin ALL really means all, unconditionally enabling everything 2) The exact meaning might be influenced by setting the regrev nvram var. Specifically using ccode=XV + regrev=1 on brcmfmac43241b4 leads to: 12-14 no-ir, U-NII-1 no-ir, U-NII-2 no-ir/radar, U-NII-3 no-ir But only on the brcmfmac43241b4 and not on e.g. the brcmfmac43340 Tested-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit ce2e6db554fad444fa0b3904fc3015336e0ef765 Author: Hans de Goede Date: Thu Oct 11 11:51:06 2018 +0200 brcmfmac: Add support for getting nvram contents from EFI variables Various X86 laptops with a SDIO attached brcmfmac wifi chip, store the nvram contents in a special EFI variable. This commit adds support for getting nvram directly from this EFI variable, without the user needing to manually copy it. This makes Wifi / Bluetooth work out of the box on these devices instead of requiring manual setup. This has been tested on the following models: Acer Iconia Tab8 w1-810, Acer One 10, Asus T100CHI, Asus T100HA, Asus T100TA, Asus T200TA and a Lenovo Mixx 2 8. Tested-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit 55e491edbf14b2da5419c2a319ea3b1d6368d9a2 Author: Hans de Goede Date: Wed Oct 10 13:01:03 2018 +0200 brcmfmac: Cleanup brcmf_fw_request_done() The "cur" variable is now only used for a debug print and we already print the same info from brcmf_fw_complete_request(), so the debug print does not provide any extra info and we can remove it. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit bd1e82bb420adf4ad7cd468d8a482cde622dd69d Author: Hans de Goede Date: Wed Oct 10 13:01:02 2018 +0200 brcmfmac: Set board_type from DMI on x86 based machines For x86 based machines, set the board_type used for nvram file selection based on the DMI sys-vendor and product-name strings. Since on some models these strings are too generic, this commit also adds a quirk table overriding the strings for models listed in that table. The board_type setting is used to load the board-specific nvram file with a board-specific name so that we can ship files for each supported board in linux-firmware. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit 0ad4b55b2f29784f93875e6231bf57cd233624a2 Author: Hans de Goede Date: Wed Oct 10 13:01:01 2018 +0200 brcmfmac: Set board_type used for nvram file selection to machine-compatible For of/devicetree using machines, set the board_type used for nvram file selection to the first string listed in the top-level's node compatible string, aka the machine-compatible as used by of_machine_is_compatible(). The board_type setting is used to load the board-specific nvram file with a board-specific name so that we can ship files for each supported board in linux-firmware. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit eae8e50669e15002b195177212a6e25afbe7cf4d Author: Hans de Goede Date: Wed Oct 10 13:01:00 2018 +0200 brcmfmac: Add support for first trying to get a board specific nvram file The nvram files which some brcmfmac chips need are board-specific. To be able to distribute these as part of linux-firmware, so that devices with such a wifi chip will work OOTB, multiple (one per board) versions must co-exist under /lib/firmware. This commit adds support for callers of the brcmfmac/firmware.c code to pass in a board_type parameter through the request structure. If that parameter is set then the code will first try to load chipmodel.board_type.txt before falling back to the old chipmodel.txt name. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit 5b587496dc63595b71265d986ce69728c2724370 Author: Hans de Goede Date: Wed Oct 10 13:00:59 2018 +0200 brcmfmac: Remove recursion from firmware load error handling Before this commit brcmf_fw_request_done would call brcmf_fw_request_next_item to load the next item, which on an error would call brcmf_fw_request_done, which if the error is recoverable (*) will then continue calling brcmf_fw_request_next_item for the next item again which on an error will call brcmf_fw_request_done again... This does not blow up because we only have a limited number of items so we never recurse too deep. But the recursion is still quite ugly and frankly is giving me a headache, so lets fix this. This commit fixes this by removing brcmf_fw_request_next_item and by making brcmf_fw_get_firmwares and brcmf_fw_request_done directly call firmware_request_nowait resp. firmware_request themselves. *) brcmf_fw_request_nvram_done fallback path succeeds or BRCMF_FW_REQF_OPTIONAL is set Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit a1a3b762163868ad07a4499a73df324f40d5ab0b Author: Hans de Goede Date: Wed Oct 10 13:00:58 2018 +0200 brcmfmac: Remove firmware-loading code duplication brcmf_fw_request_next_item and brcmf_fw_request_done both have identical code to complete the fw-request depending on the item-type. This commit adds a new brcmf_fw_complete_request helper removing this code duplication. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo commit e55c884ea5c66a29a713d41ed0819fee8038762b Author: Sean Young Date: Tue Oct 16 15:09:31 2018 +0100 media: rc: self test for IR encoders and decoders ir-loopback can transmit IR on one rc device and check the correct scancode and protocol is decoded on a different rc device. This can be used to check IR transmission between two rc devices. Using rc-loopback, we use it to check the IR encoders and decoders themselves. No hardware is required for this test. Signed-off-by: Sean Young Cc: Shuah Khan Signed-off-by: Shuah Khan commit 55bb78d265c6bdebbe2fbfe2c7a30539f3b3412c Author: Lorenzo Bianconi Date: Fri Nov 2 21:49:59 2018 +0100 ath9k: dynack: remove 'experimental' tag Remove experimental tag from dynack Kconfig entry since it has been tested on outdoor 25Km links Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 0c60c490830a1a756c80f8de8d33d9c6359d4a36 Author: Lorenzo Bianconi Date: Fri Nov 2 21:49:58 2018 +0100 ath9k: dynack: make ewma estimation faster In order to make propagation time estimation faster, use current sample as ewma output value during 'late ack' tracking Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 9d3d65a91f027b8a9af5e63752d9b78cb10eb92d Author: Lorenzo Bianconi Date: Fri Nov 2 21:49:57 2018 +0100 ath9k: dynack: check da->enabled first in sampling routines Check da->enabled flag first in ath_dynack_sample_tx_ts and ath_dynack_sample_ack_ts routines in order to avoid useless processing Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 5e3d4718b1574c8634b45965307dee20a6c921a1 Author: Lorenzo Bianconi Date: Fri Nov 2 21:49:56 2018 +0100 ath9k: dynack: move debug log after buffer increments Move debug log in ath_dynack_sample_tx_ts and ath_dynack_sample_ack_ts after timestamp buffer head/tail increments in order to make debugging more user friendly Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit 3831a2a0010c72e3956020cbf1057a1701a2e469 Author: Lorenzo Bianconi Date: Fri Nov 2 21:49:55 2018 +0100 ath9k: dynack: use authentication messages for 'late' ack In order to properly support dynack in ad-hoc mode running wpa_supplicant, take into account authentication frames for 'late ack' detection. This patch has been tested on devices mounted on offshore high-voltage stations connected through ~24Km link Reported-by: Koen Vandeputte Tested-by: Koen Vandeputte Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit cea04e3d8e3727185f9ebe736045655b30ff9079 Author: Brian Norris Date: Fri Nov 2 10:17:49 2018 -0700 ath10k: fix struct init whitespace in SNOC driver Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 79169f14865503fb3c1571ae3f9c456c3ca74865 Author: Brian Norris Date: Fri Nov 2 10:17:48 2018 -0700 ath10k: don't assume this is a PCI dev in generic code Not all devices using this driver are backed by a PCI device, so it's not fair to assume 'to_pci_dev()' is valid. Fortunately, we only were using this to convert straight back to a bare 'device', which means we were only doing no-op pointer arithmetic, and not actually accessing potentially out-of-bounds memory. But this is still bad practice. Just use 'ar->dev' directly, since that's really all we're looking for. Fixes: 209b2a68de76 ("ath10k: add platform regulatory domain support") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 2bd345cd2bfc0bd44528896313c0b45f087bdf67 Author: Brian Norris Date: Fri Nov 2 10:17:47 2018 -0700 ath10k: assign 'n_cipher_suites' for WCN3990 Commit 2ea9f12cefe4 ("ath10k: add new cipher suite support") added a new n_cipher_suites HW param with a fallback value and a warning log. Commit 03a72288c546 ("ath10k: wmi: add hw params entry for wcn3990") later added WCN3990 HW entries, but it missed the n_cipher_suites. Rather than seeing this warning every boot ath10k_snoc 18800000.wifi: invalid hw_params.n_cipher_suites 0 let's provide the appropriate value. Cc: Rakesh Pillai Cc: Govind Singh Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 97b9608be34f9fcad3d4aa79ea7b8720680b232d Author: Brian Norris Date: Fri Nov 2 11:10:00 2018 -0700 ath10k: ath10k_snoc_{read,write}32() should be static They're provided as callbacks in ath10k_hif_ops and should be accessed that way, if needed outside of snoc.c, and anyway, they're currently unused outside snoc.c. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 82e60d920e8ad70cd9a280ab156566755f1fe4aa Author: Brian Norris Date: Mon Nov 5 14:35:22 2018 +0200 ath10k: snoc: fix unbalanced clock error handling Similar to regulator error handling, we should only start tearing down the 'i - 1' clock when clock 'i' fails to enable. Otherwise, we might end up with an unbalanced clock, where we never successfully enabled the clock, but we try to disable it anyway. Fixes: a6a793f98786 ("ath10k: vote for hardware resources for WCN3990") Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo commit bfe57a6ac75aec73aec43ca24942d7704100fc2c Author: Brian Norris Date: Mon Nov 5 14:35:09 2018 +0200 ath10k: snoc: relax voltage requirements I rarely see drivers specify precise voltage requirements like this, but if we really have to...let's at least give a little wiggle room. Board designs (and accompanying device trees) may not provide exactly the voltage listed here, and we shouldn't fail to probe just because of this. Round these ranges down to the nearest volt, and provide a 0.05V margin. The regulator should provide its own supported ranges, which will helpfully intersect with these ranges. I would just as well remove these ranges entirely, but if I understand correctly, there's some reason that QCOM SoC's like to set zero / non-zero voltages. Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo commit 1a1a0d5ccefca6f3f7417b448793c753a610da0c Author: Brian Norris Date: Mon Nov 5 14:34:57 2018 +0200 ath10k: snoc: fix unabalanced regulator error handling If a regulator fails to set its voltage, we end up with an unbalanced call to regulator_disable(), because the error path starts with the current regulator (which was never enabled). Factor out the "on" function to perform (and unwind if failed) a single regulator at a time, and then main loop (ath10k_snoc_vreg_on()) can just worry about unwinding the regulators that were already enabled. It also helps to factor out the "off" function, to avoid repeating some code here. Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo commit 887a3dcf589389756bad51b34b69d4e9e9b2aa86 Author: Brian Norris Date: Mon Nov 5 14:34:46 2018 +0200 ath10k: snoc: remove 'wcn3990' from generic resource handling ath10k_wcn3990_clk_info and ath10k_wcn3990_vreg_info are not WCN3990-specific structures. They hold generic data. So don't name them with wcn3990 specifics. Signed-off-by: Brian Norris Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo commit dc57731dbd535880fe6ced31c229262c34df7d64 Author: Lior David Date: Wed Oct 31 10:52:24 2018 +0200 wil6210: fix locking in wmi_call Switch from spin_lock to spin_lock_irqsave, because wmi_ev_lock is used inside interrupt handler. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 6470f31927b46846d957628b719dcfda05446664 Author: Ahmad Masri Date: Wed Oct 31 10:52:23 2018 +0200 wil6210: fix freeing of rx buffers in EDMA mode After being associated with some EDMA rx traffic, upon "down" driver doesn't free all skbs in the rx ring. Modify wil_move_all_rx_buff_to_free_list to loop on active list of rx buffers, unmap the physical memory and free the skb. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit a834df7497b4e2bd609761b6e69fb9c8176ccf8e Author: Ahmad Masri Date: Wed Oct 31 10:52:22 2018 +0200 wil6210: remove unnecessary alignment code from rx flow Rx buffers in EDMA mode are initialized to 4 bytes aligned size. Remove the unnecessary alignment code applied on rx buffer size. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 7c69709f8ed27197b16aa1c3f9b0744402b2fa02 Author: Maya Erez Date: Wed Oct 31 10:52:20 2018 +0200 wil6210: fix RGF_CAF_ICR address for Talyn-MB RGF_CAF_ICR register location has changed in Talyn-MB. Add RGF_CAF_ICR_TALYN_MB to support the new address. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 04de15010aa42a92add66b159e3ae44b4287390f Author: Maya Erez Date: Wed Oct 31 10:52:19 2018 +0200 wil6210: fix L2 RX status handling L2 RX status errors should not be treated as a bitmap and the actual error values should be checked. Print L2 errors as wil_err_ratelimited for easier debugging when such errors occurs. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 84ec040d0fb25197584d28a0dedc355503cd19b9 Author: Ahmad Masri Date: Wed Oct 31 10:52:18 2018 +0200 wil6210: fix debugfs memory access alignment All wil6210 device memory access should be 4 bytes aligned. In io blob wil6210 did not force alignment for read function, this caused alignment fault on some platforms. Fixing that by accessing all 4 lower bytes and return to host the requested data. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit ac0e541ab2f2951845acee784ef487be40fb4c77 Author: Alexei Avshalom Lazar Date: Wed Oct 31 10:52:17 2018 +0200 wil6210: add general initialization/size checks Initialize unset variable, and verify that mid is valid. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit b571e71bcb98d6b629b486b9af027a73fc6da3c3 Author: Ahmad Masri Date: Wed Oct 31 10:52:16 2018 +0200 wil6210: notify cqm packet loss on disable_ap_sme wil6210 used to notify cfg80211_del_sta on every fw disconnect event. In disable_ap_sme mode the userspace manages the protocol SME and FW sends disconnect event only due to link loss. In disable_ap_sme mode, indicate CQM packet loss to let the host control the connection and disconnect the link if needed. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit e1b43407c034650c11bc597bef319f03b8262b6c Author: Ahmad Masri Date: Wed Oct 31 10:52:15 2018 +0200 wil6210: refactor disconnect flow Separate sending command to the fw from the event handling function to simplify the disconnect flow and track the from_event flag correctly. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 664497400c89a4d40aee51bcf48bbd2e4dc71104 Author: Lior David Date: Wed Oct 31 10:52:14 2018 +0200 wil6210: fix memory leak in wil_find_tx_bcast_2 A successful call to wil_tx_ring takes skb reference so it will only be freed in wil_tx_complete. Consume the skb in wil_find_tx_bcast_2 to prevent memory leak. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit e41ab937d47b3c1180057f72968bf62b487fc80f Author: Dedy Lansky Date: Wed Oct 31 10:52:13 2018 +0200 wil6210: add recovery for FW error while in AP mode AP configuration is stored by the driver. Upon FW error, disconnect notification is sent to user space for any associated stations. AP is then internally restarted with the stored configuration. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 61e5ec044748486f06dec760a19dce78247b3ad8 Author: Dedy Lansky Date: Wed Oct 31 10:52:12 2018 +0200 wil6210: make sure Rx ring sizes are correlated When enlarging rx_ring_order module param, wil6210 fails to load because there are not enough Rx buffers. Fix this by enlarging number of Rx buffers at startup, if needed based on rx_ring_order. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit cbebe277beb1169a157d5f486c87f5ceabf0bf82 Author: Maya Erez Date: Wed Oct 31 10:52:11 2018 +0200 wil6210: increase RX rings and RX buff array size In Talyn-MB, the 11ad throughput is higher and performance drops may occur in the current RX configuration due to unavailability of Rx buffers. Increase the RX descriptor ring, RX status ring and number of RX buffers to stabilize the performance in high throughput. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit d083b2e2b7db5cca1791643d036e6597af27f49b Author: Alexei Avshalom Lazar Date: Wed Oct 31 10:52:10 2018 +0200 wil6210: fix reset flow for Talyn-mb With current reset flow, Talyn sometimes get stuck causing PCIe enumeration to fail. Fix this by removing some reset flow operations that are not relevant for Talyn. Setting bit 15 in RGF_HP_CTRL is WBE specific and is not in use for all wil6210 devices. For Sparrow, BIT_HPAL_PERST_FROM_PAD and BIT_CAR_PERST_RST were set as a WA an HW issue. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit a078c4cf0197c71a829ea927d1287e6b26a52c92 Author: Hamad Kadmany Date: Wed Oct 31 10:52:09 2018 +0200 wil6210: remove fake support for RXHASH Setting the same fake hash to all skbs prevents distributing different flows to different CPU cores. Signed-off-by: Hamad Kadmany Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit c8cb09644c6cc78aaccfca54ad76462e44486cd0 Author: Yangtao Li Date: Thu Nov 1 11:29:32 2018 -0400 ath10k: fix some typo Signed-off-by: Yangtao Li Signed-off-by: Kalle Valo commit b65f501627fffc0464607244b05e7a2d3677d654 Author: Arvind Yadav Date: Thu Oct 18 19:13:38 2018 +0800 iommu/mediatek: Constify iommu_ops iommu_ops are not supposed to change at runtime. Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with const iommu_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Yong Wu (Change the title to iommu/mediatek: xx) Signed-off-by: Joerg Roedel commit b0c32912150565130c61104b7789ba4aa0e5f93d Author: Hai Nguyen Pham Date: Wed Oct 17 11:13:22 2018 +0200 iommu/ipmmu-vmsa: Hook up r8a77990 DT matching code Support the R-Car E3 (r8a77990) IPMMU. Signed-off-by: Hai Nguyen Pham Signed-off-by: Kazuya Mizuguchi [simon: rebased; dropped no longer required IOMMU_OF_DECLARE hunk] Signed-off-by: Simon Horman Signed-off-by: Joerg Roedel commit ad43d528a7ac5636cf113cb09644d3ec18129123 Author: Linus Walleij Date: Fri Nov 2 22:11:33 2018 +0100 ALSA: usb-audio: Define registers for CM6206 The register map for CM6206 is known and we can define what the values written to the different registers actually mean. I tested to print the hex values before/after this change, there is no functional change. Signed-off-by: Linus Walleij Signed-off-by: Takashi Iwai commit 5d95f40e62e4f2ed3053e9b178471669736cf636 Author: Robin Murphy Date: Thu Oct 11 16:56:42 2018 +0100 iommu: Do physical merging in iommu_map_sg() The original motivation for iommu_map_sg() was to give IOMMU drivers the chance to map an IOVA-contiguous scatterlist as efficiently as they could. It turns out that there isn't really much driver-specific business involved there, so now that the default implementation is mandatory let's just improve that - the main thing we're after is to use larger pages wherever possible, and as long as domain->pgsize_bitmap reflects reality, iommu_map() can already do that in a generic way. All we need to do is detect physically-contiguous segments and batch them into a single map operation, since whatever we do here is transparent to our caller and not bound by any segment-length restrictions on the list itself. Speaking of efficiency, there's really very little point in duplicating the checks that iommu_map() is going to do anyway, so those get cleared up in the process. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel commit 8bed5a5cfc3317217f4b4ddad8044cbdd13d5a20 Author: Christoph Niedermaier Date: Mon Nov 5 09:48:35 2018 +0100 Docs/EDID: Calculate CRC while building the code The previous version made it necessary to first generate an EDID data set without correct CRC and then to fix the CRC in a second step. This patch adds the CRC calculation to the makefile in such a way that a correct EDID data set is generated in a single build step. Successfully tested with all existing and a couple of new data sets. Signed-off-by: Christoph Niedermaier Reviewed-by: Carsten Emde Signed-off-by: Jonathan Corbet commit d2f112a5681078aa2150f218074f76617fea4d74 Author: Christoph Niedermaier Date: Mon Nov 5 09:48:34 2018 +0100 Docs/EDID: Fixed erroneous bits of XOFFSET, XPULSE, YOFFSET and YPULSE The problem was found when EDID data sets for displays other than the provided samples were generated. The patch has no effect on the provided samples that still match the data used in drivers/gpu/drm/drm_edid_load.c. The provided samples use small values for XOFFSET, XPULSE, YOFFSET and YPULSE, where the error doesn't occur. This fix corrects the use of that values in case of high values, because the most significant bits were treated incorrectly. So in edid.S msbs4 should use bit 8 and 9 of XOFFSET and XPULS. For YOFFSET and YPULSE msbs4 should use bit 4 and 5. lsbs2 was introduced for a better overview, without functional change. Removing also the useless value 63 of all files, because it is added in the *.S description files and then it is subtracted in edid.S. Signed-off-by: Christoph Niedermaier Reviewed-by: Carsten Emde Signed-off-by: Jonathan Corbet commit f45a7977d1140c11f334e01a9f77177ed68e3bfa Author: Ville Syrjälä Date: Mon Nov 5 21:46:04 2018 +0200 drm/i915: Don't oops during modeset shutdown after lpe audio deinit We deinit the lpe audio device before we call drm_atomic_helper_shutdown(), which means the platform device may already be gone when it comes time to shut down the crtc. As we don't know when the last reference to the platform device gets dropped by the audio driver we can't assume that the device and its data are still around when turning off the crtc. Mark the platform device as gone as soon as we do the audio deinit. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181105194604.6994-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit e6db7f4d7c5005258b862a5ed1732756fccb6bfa Author: Chris Wilson Date: Mon Nov 5 17:06:40 2018 +0000 drm/i915: Break long iterations for get/put shmemfs pages As we may have to iterate a few thousand elements to acquire and release the shmemfs backing storage for a GPU object, we need to break up the long loop with cond_resched() to retain a modicum of low latency for other processes. Testcase: igt/benchmarks/gem_syslatency Signed-off-by: Chris Wilson Cc: Kuo-Hsin Yang Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181105170640.26905-1-chris@chris-wilson.co.uk commit 24869610e867e9791f0fdab70ff60f246299b859 Author: Heiko Stuebner Date: Tue Oct 23 12:38:18 2018 +0200 soc: rockchip: power-domain: add rk3066 powerdomains Add power-domains found on rk3066 socs. Signed-off-by: Heiko Stuebner commit fbe57dde7126d1b2712ab5ea93fb9d15f89de708 Author: Julia Lawall Date: Sat Oct 27 08:49:04 2018 -0400 media: ov7740: constify structures stored in fields of v4l2_subdev_ops structure The fields of a v4l2_subdev_ops structure are all const, so the structures that are stored there and are not used elsewhere can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d148b85e8b0779b910f3120a1b72e3e105ad2c47 Author: Julia Lawall Date: Sat Oct 27 08:16:40 2018 -0400 media: ov5645: constify v4l2_ctrl_ops structure The v4l2_ctrl_ops structure is only passed as the second argument to functions such as v4l2_ctrl_new_std for which the corresponding parameter is const, so make the v4l2_ctrl_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 35629182eb8f931b0de6ed38c0efac58e922c801 Author: Chiranjeevi Rapolu Date: Fri Oct 26 11:34:30 2018 -0400 media: ov13858: Check for possible null pointer Check for possible null pointer to avoid crash. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4361905962417efa2117bbead10a38bfa3c56cc1 Author: Ricardo Ribalda Date: Fri Oct 5 18:58:31 2018 -0400 media: imx214: Add imx214 camera sensor driver Add a V4L2 sub-device driver for the Sony IMX214 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data. Tested on a DB820c alike board with Intrinsyc Open-Q 13MP camera. [Sakari Ailus: squash exposure time max limit patch] Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5f65328df3f5cd25af741638153929d3c7ad4d8a Author: Marek Vasut Date: Sun Nov 4 21:37:07 2018 +0100 arm64: dts: renesas: Switch eMMC bus to 1V8 on Salvator-X and ULCB The eMMC card has two supplies, VCC and VCCQ. The VCC supplies the NAND array and the VCCQ supplies the bus. On Salvator-X and ULCB, the VCC is connected to 3.3V rail, while the VCCQ is connected to 1.8V rail. Adjust the pinmux to match the bus, which is always operating in 1.8V mode. While at it, deduplicate the pinmux entries, which are now the same for both default and UHS modes. We still need the two pinctrl entries to match the bindings though. Signed-off-by: Marek Vasut Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Simon Horman commit 9dab12c7a66db483f980a5a9203e1754c8e0cb20 Author: Ricardo Ribalda Date: Fri Oct 5 18:50:11 2018 -0400 media: imx214: device tree binding Document bindings for imx214 camera sensor [Sakari Ailus: Move MAINTAINERS entry here, fix DT binding filename] Cc: devicetree@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4e5f42df5778c535f3e57f16eb5c8da0b2f6a134 Author: Rajmohan Mani Date: Tue Oct 9 19:42:45 2018 -0400 media: intel-ipu3: cio2: Remove redundant definitions Removed redundant CIO2_IMAGE_MAX_* definitions Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit aecbde630e95c02c24182f7acead53ca1c2a60a6 Author: Eric Anholt Date: Mon Nov 5 15:01:10 2018 -0800 drm/syncobj: Fix oops on drm_syncobj_find_fence(file_priv, 0, ...). This broke rendering on V3D, where we almost always have a 0 in-syncobj. Signed-off-by: Eric Anholt Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9") Cc: Chunming Zhou Cc: Christian König Reviewed-by: Chunming Zhou Acked-by: Christian König Link: https://patchwork.kernel.org/patch/10669317/ Signed-off-by: Christian König commit e7abd89466df421d22ebda095e00d36976dbdacb Author: Manish Narani Date: Thu Oct 25 11:37:00 2018 +0530 arm64: dts: zynqmp: Add DDRC node Add ddrc memory controller node in dts. The size mentioned in dts is 0x30000, because we need to access DDR_QOS INTR registers located at 0xFD090208 from this driver. Signed-off-by: Manish Narani Signed-off-by: Michal Simek commit 1696acf44e9f26454f15877bee3a9a39ec6e6ee5 Author: Sudeep Holla Date: Wed Oct 24 12:45:40 2018 +0100 arm64: dts: zynqmp: replace gpio-key,wakeup with wakeup-source property Most of the legacy "gpio-key,wakeup" boolean property is already replaced with "wakeup-source". However few occurrences of old property has popped up again, probably from the remnants in downstream trees. This patch replaces the legacy properties with the unified "wakeup-source" property introduced by: "Input: gpio_keys - switch to using generic device properties" (sha1: 700a38b27eefc582099fdf69effacfad0ad738a4) Cc: Michal Simek Signed-off-by: Sudeep Holla Signed-off-by: Michal Simek commit 9fd609ff6380a7a583fee162b2dcf9be1576847f Author: Michal Simek Date: Wed Sep 26 13:24:20 2018 +0200 arm64: dts: zynqmp: Use mmc@ instead sdhci@ mmc name is recommended based on devicetree specification. Signed-off-by: Michal Simek commit bfe60a0272ddadcdfddac77fcfa1860e97c6943d Author: Uma Shankar Date: Fri Nov 2 00:40:20 2018 +0530 drm/i915/icl: Enable Plane Input CSC for YUV to RGB Conversion Plane input CSC needs to be enabled to convert frambuffers from YUV to RGB. This is needed for bottom 3 planes on ICL, rest of the planes have hardcoded conversion and taken care by the legacy code. This patch defines the co-efficient values for YUV to RGB conversion in BT709 and BT601 formats. It programs the coefficients and enables the plane input csc unit in hardware. This has been verified and tested by Maarten and the change is working as expecpted. v2: Addressed Maarten's and Ville's review comments and added the coefficients in a 2D array instead of independent Macros. v3: Added individual coefficient matrix (9 values) instead of 6 register values as per Maarten's comment. Also addresed a shift issue with B channel coefficient. v4: Added support for Limited Range Color Handling v5: Fixed Matt and Maarten's review comments. v6: Added human readable matrix values for YUV to RGB Conversion along with just the bspec register values, as per Matt's suggestion. v7: Refactored the code, move csc coefficient programming function to intel_sprite.c and made it static as per Ville's review comment. v8: Addressed Ville's review comment. Called the coefficient programming from within the skl_program_plane and used I915_WRITE_FW instead of I915_WRITE. v9: Fixed Ville's review comments. Signed-off-by: Uma Shankar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1541099420-12419-3-git-send-email-uma.shankar@intel.com commit 6a255da783c64886ca5a8ecaeb751a736edcae9d Author: Uma Shankar Date: Fri Nov 2 00:40:19 2018 +0530 drm/i915/icl: Define Plane Input CSC Coefficient Registers Defined the plane input csc coefficient registers and macros. 6 registers are used to program a total of 9 coefficients, added macros to define each of them for all the planes supporting the feature on pipes. On ICL, bottom 3 planes have this capability. v2: Segregated the register macro definition as separate patch as per Maarten's suggestion. v3: Removed a redundant 3rd Pipe register definition and simplified the equally spaced register definition by adding an offset as per Matt's comment. v4: No Change v5: Renamed the register Macro as per Matt's suggestion. v6: No Change v7: No Change v8: No Change v9: No Change Signed-off-by: Uma Shankar Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1541099420-12419-2-git-send-email-uma.shankar@intel.com commit 8fd8cbfeada59d381c49ad700607376416e2fdd8 Author: Dan Carpenter Date: Thu Oct 18 17:15:22 2018 +0300 EDAC, qcom_edac: Remove irq_handled local variable irq_handled isn't initialized to false on function entry. However, it is not really needed and the IRQ handler return value can be set directly instead. [ bp: rewrite commit message. ] Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs") Signed-off-by: Dan Carpenter Signed-off-by: Borislav Petkov CC: Channagoud Kadabi CC: Mauro Carvalho Chehab CC: Venkata Narendra Kumar Gutta CC: kernel-janitors@vger.kernel.org CC: linux-arm-msm@vger.kernel.org CC: linux-edac Link: http://lkml.kernel.org/r/20181018141522.rywdvjmlpk4ticiw@kili.mountain commit 4f014a41b4efd72cbefb5525372dfcd65162eb4e Author: YueHaibing Date: Tue Oct 30 02:22:42 2018 +0000 nds32: Remove duplicated include from pm.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Pavel Machek Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 7938e6315c9af3d4a40185b537733bbce842305a Author: Nick Hu Date: Wed Oct 24 18:14:32 2018 +0800 nds32: Power management for nds32 There are three sleep states in nds32: suspend to idle, suspend to standby, suspend to ram In suspend to ram, we use the 'standby' instruction to emulate power management device to hang the system util wakeup source send wakeup events to break the loop. First, we push the general purpose registers and system registers to stack. Second, we translate stack pointer to physical address and store to memory to save the stack pointer. Third, after write back and invalid the cache we hang in 'standby' intruction. When wakeup source trigger wake up events, the loop will be break and resume the system. Signed-off-by: Nick Hu Acked-by: Pavel Machek Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit cf26edd840dc65b122a0f5e22d2d81ad05eccb2d Author: Nickhu Date: Thu Oct 25 10:24:17 2018 +0800 nds32: Add document for NDS32 PMU. The document for how to add NDS32 PMU in devicetree. Signed-off-by: Nickhu Reviewed-by: Rob Herring Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit c8b34461705e16b94d34c96c7784009b28b3da03 Author: Nickhu Date: Thu Oct 25 10:24:16 2018 +0800 nds32: Add perf call-graph support. The perf call-graph option can trace the callchain between functions. This commit add the perf callchain for nds32. There are kerenl callchain and user callchain. The kerenl callchain can trace the function in kernel space. There are two type for user callchain. One for the 'optimize for size' config is set, and another one for the config is not set. The difference between two types is that the index of frame-pointer in user stack is not the same. For example: With optimize for size: User Stack: --------- | lp | --------- | gp | --------- | fp | Without optimize for size: User Stack: 1. non-leaf function: --------- | lp | --------- | fp | 2. leaf function: --------- | fp | Signed-off-by: Nickhu Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit ebd09753b5707cc083c52e1d0ec7f45dccdb73bf Author: Nickhu Date: Thu Oct 25 10:24:15 2018 +0800 nds32: Perf porting This is the commit that porting the perf for nds32. 1.Raw event: The raw events start with 'r'. Usage: perf stat -e rXYZ ./app X: the index of performance counter. YZ: the index(convert to hexdecimal) of events Example: 'perf stat -e r101 ./app' means the counter 1 will count the instruction event. The index of counter and events can be found in "Andes System Privilege Architecture Version 3 Manual". Or you can perform the 'perf list' to find the symbolic name of raw events. 2.Perf mmap2: Fix unexpected perf mmap2() page fault When the mmap2() called by perf application, you will encounter such condition:"failed to write." With return value -EFAULT This is due to the page fault caused by "reading" buffer from the mapped legal address region to write to the descriptor. The page_fault handler will get a VM_FAULT_SIGBUS return value, which should not happens here.(Due to this is a read request.) You can refer to kernel/events/core.c:perf_mmap_fault(...) If "(vmf->pgoff && (vmf->flags & FAULT_FLAG_WRITE))" is evaluated as true, you will get VM_FAULT_SIGBUS as return value. However, this is not an write request. The flags which indicated why the page fault happens is wrong. Furthermore, NDS32 SPAv3 is not able to detect it is read or write. It only know either it is instruction fetch or data access. Therefore, by removing the wrong flag assignment(actually, the hardware is not able to show the reason), we can fix this bug. 3.Perf multiple events map to same counter. When there are multiple events map to the same counter, the counter counts inaccurately. This is because each counter only counts one event in the same time. So when there are multiple events map to same counter, they have to take turns in each context. There are two solution: 1. Print the error message when multiple events map to the same counter. But print the error message would let the program hang in loop. The ltp (linux test program) would be failed when the program hang in loop. 2. Don't print the error message, the ltp would pass. But the user need to have the knowledge that don't count the events which map to the same counter, or the user will get the inaccurate results. We choose method 2 for the solution Signed-off-by: Nickhu Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 9aaafac8cffa1c1edb66e19a63841b7c86be07ca Author: Nickhu Date: Thu Oct 25 10:24:14 2018 +0800 nds32: Fix bug in bitfield.h There two bitfield bug for perfomance counter in bitfield.h: PFM_CTL_offSEL1 21 --> 16 PFM_CTL_offSEL2 27 --> 22 This commit fix it. Signed-off-by: Nickhu Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 4c3d6174e0e17599549f636ec48ddf78627a17fe Author: Nickhu Date: Thu Oct 18 16:37:55 2018 +0800 nds32: Fix gcc 8.0 compiler option incompatible. When the kernel configs of ftrace and frame pointer options are choosed, the compiler option of kernel will incompatible. Error message: nds32le-linux-gcc: error: -pg and -fomit-frame-pointer are incompatible Signed-off-by: Nickhu Signed-off-by: Zong Li Acked-by: Greentime Hu Signed-off-by: Greentime Hu commit 8730c178b4208ec52f4c2b381d9a2b685a791b1c Author: Zong Li Date: Wed Oct 17 21:15:52 2018 +0800 nds32: Fill all TLB entries with kernel image mapping We use earlycon replace with early_printk and doesn't use early_io_map() to create UART mapping. It is not necessary to reserve the one way in TLB for now. It didn't make sense if use direct-mapped and reserve one way at the same time. It allow the direct-mapped now. Signed-off-by: Zong Li Signed-off-by: Greentime Hu commit 2e95c4d672ce6c931951c87b5dbfa4106fd3cae6 Author: Zong Li Date: Wed Oct 17 21:15:51 2018 +0800 nds32: Remove the redundant assignment For early version, the value of r2 register was used to display a character on UART when error occurred. Remove these r2 assignments because we no longer show the character. Signed-off-by: Zong Li Signed-off-by: Greentime Hu commit 1a81361f75d8a5cbe9d77c30fe0f42b7cda621c8 Author: Manish Narani Date: Thu Oct 25 11:37:01 2018 +0530 EDAC, synopsys: Add Error Injection support for ZynqMP DDR controller Add support for Error Injection for ZynqMP DDR controller IP. For injecting errors, the Row, Column, Bank, Bank Group and Rank bits positions are determined via Address Map registers of the Synopsys DDR controller. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1540447621-22870-7-git-send-email-manish.narani@xilinx.com commit b500b4a029d577c6b5f3d7480ef2635dd1f30a55 Author: Manish Narani Date: Thu Oct 25 11:36:59 2018 +0530 EDAC, synopsys: Add ECC support for ZynqMP DDR controller Add ECC support for ZynqMP DDR controller IP. The IP supports interrupts for corrected and uncorrected errors. Add interrupt handlers for the same. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1540447621-22870-5-git-send-email-manish.narani@xilinx.com commit 647ad49ca672b80a3fbf8396bd453ef68ba4916c Author: Boris Brezillon Date: Mon Oct 22 22:10:59 2018 +0200 staging: Remove the mt29f_spinand driver A new SPI NAND subsystem has been added in drivers/mtd/nand/spi/ and Micron's MT29F devices are now supported in drivers/mtd/nand/spi/micron.c. Remove the old driver. Signed-off-by: Boris Brezillon Acked-by: Greg Kroah-Hartman Signed-off-by: Miquel Raynal commit acc9d62b68728ada7356e348f3c68f20a5cbd2a1 Author: Mason Yang Date: Thu Oct 25 14:44:31 2018 +0800 mtd: rawnand: Flag 1.8V AC chips with a broken GET_FEATURES(TIMINGS) Make sure we flag all 1.8V broken chips as not supporting this feature. Signed-off-by: Mason Yang Signed-off-by: Miquel Raynal commit 505a2fd80b4dcd9e89bcf426ba4314ea339911e8 Author: Heiko Stuebner Date: Mon Jun 4 11:36:13 2018 +0200 arm64: dts: rockchip: add Gru Scarlet devicetrees Gru-Scarlet is a tablet device using ChomeOS, dual-dsi display and Wacom touchscreen with stylus. There exist two variants in the market using different displays that are differentiated via their sku-id. The bootloader on them also determines the correct devicetree to load via the sku-id. So add a common scarlet dtsi and two minimal board devicetrees for the two display variants. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring commit b06a8b438758423185375e6417588566c289554c Author: Fabrizio Castro Date: Tue Oct 16 11:33:43 2018 +0100 pinctrl: sh-pfc: r8a77470: Add SDHI support Add SH_PFC_PIN_CFG_IO_VOLTAGE definition for the SDHI pins capable of switching voltage, also add pin groups and functions for SDHI0 and SDHI1. Please note that with the RZ/G1C only 1 bit of the POC Control Register is used to control each interface. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 06bfbe089b4d99433c3d91c8bc36fdbbd89a15dc Author: Laurent Pinchart Date: Tue Oct 16 13:33:39 2018 +0300 MAINTAINERS: Remove Laurent Pinchart as Renesas pinctrl maintainer Geert Uytterhoeven has long taken over and I'm not involved anymore with the Renesas pinctrl driver. Remove myself from the maintainers list. Signed-off-by: Laurent Pinchart Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 50f3f2d73e3426ba5aac0fe62098870579a0b357 Author: Geert Uytterhoeven Date: Tue Oct 16 09:46:12 2018 +0200 pinctrl: sh-pfc: Reduce kernel size for narrow VIN channels Some VIN channels support less than 24 lanes. As union vin_data always consumes space for 24 lanes, this wastes memory. Hence introduce new smaller unions vin_data12 and vin_data16, to accommodate VIN channels with only 12 or 16 lanes. This reduces the static pin controller driver size by 320 bytes for R-Car V2H, and by 96 bytes for R-Car E2. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund commit 9f8dc8e2b16118ea125c0d89a602b6bc36f128e4 Author: Geert Uytterhoeven Date: Tue Oct 16 09:33:16 2018 +0200 MAINTAINERS: Add Renesas RZ/A and RZ/N files to Renesas pinctrl section Add paths for the Renesas RZ/A and RZ/N series pin controller drivers, as they are not under sh-pfc/, but still maintained with the other Renesas pin controller drivers. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Jacopo Mondi Acked-by: Linus Walleij commit ccb44a8a5bbaaed1368e426e738591d7c41997c2 Author: Takeshi Kihara Date: Mon Oct 15 11:58:27 2018 +0200 pinctrl: sh-pfc: r8a77990: Add Audio SSI pins, groups and functions This patch adds Audio SSI{0,1,2,3,4,5,6,7,8,9} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara [simon: rebase] Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 4c833b2fa5b6b121cc657e5f24b8c3585a8c37ea Author: Takeshi Kihara Date: Mon Oct 15 11:58:26 2018 +0200 pinctrl: sh-pfc: r8a77990: Add Audio clock pins, groups and functions This patch adds AUDIO_CLK{A,B,C}, AUDIO_CLKOUT, AUDIO_CLKOUT{1,2,3} pins, groups and functions to the R8A77990 SoC. Signed-off-by: Takeshi Kihara [simon: rebase] Signed-off-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit ea956d8be91edc702a98b7fe1f9463e7ca8c42ab Author: Richard Guy Briggs Date: Wed Oct 10 16:22:57 2018 -0400 audit: print empty EXECVE args Empty executable arguments were being skipped when printing out the list of arguments in an EXECVE record, making it appear they were somehow lost. Include empty arguments as an itemized empty string. Reproducer: autrace /bin/ls "" "/etc" ausearch --start recent -m execve -i | grep EXECVE type=EXECVE msg=audit(10/03/2018 13:04:03.208:1391) : argc=3 a0=/bin/ls a2=/etc With fix: type=EXECVE msg=audit(10/03/2018 21:51:38.290:194) : argc=3 a0=/bin/ls a1= a2=/etc type=EXECVE msg=audit(1538617898.290:194): argc=3 a0="/bin/ls" a1="" a2="/etc" Passes audit-testsuite. GH issue tracker at https://github.com/linux-audit/audit-kernel/issues/99 Signed-off-by: Richard Guy Briggs [PM: cleaned up the commit metadata] Signed-off-by: Paul Moore commit ba32ce95cbd9876eb7f5ec39af87829c8f13a337 Author: Boris Brezillon Date: Fri Oct 19 09:49:07 2018 +0200 mtd: maps: Merge gpio-addr-flash.c into physmap-core.c Controlling some MSB address lines using GPIOs is just a small deviation from the generic physmap logic, and merging those two drivers allows us to share most of the probe logic, which is a good thing. Also, the gpio-addr-flash driver is unused since the removal of the blackfin arch in v4.17, so we can safely remove the old driver without risking breaking existing boards. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Tested-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 3edf4b9f381efdb09299a5f928d4f35609d5f530 Author: Ricardo Ribalda Date: Fri Oct 19 09:49:06 2018 +0200 dt-binding: mtd: physmap: Document the addr-gpios property Add documentation for the addr-gpios. This extension to the physmap binding allow creating flash devices that are paged using GPIOs. Cc: devicetree@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Acked-by: Linus Walleij commit 6ca15cfa0788ebef365ce31d1e01ea30a389a895 Author: Boris Brezillon Date: Fri Oct 19 09:49:05 2018 +0200 mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} Now that the physmap_of driver is gone, the gemini and versative extensions are part of the physmap driver. Rename the source files and the config option to reflect this. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 642b1e8dbed7bbbf8c4deb3c9a0496f17278badc Author: Boris Brezillon Date: Fri Oct 19 09:49:04 2018 +0200 mtd: maps: Merge physmap_of.c into physmap-core.c There's no real reason to have two separate driver for the DT and pdata case. Just do what we do everywhere else and handle DT and pdata parsing in the same driver. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 0c3def9b58d85ea8a8a8773d1151d8d554842d0a Author: Boris Brezillon Date: Fri Oct 19 09:49:03 2018 +0200 mtd: maps: Prepare merging of physmap and physmap_of We want to merge the physmap and physmap_of driver, but before we can do that we must prepare things to create physmap.o out of several .c files. Rename physmap.c into physmap-core.c and add a new Makefile rule to create physmap.o (right now it only contains physmap-core.o). Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit cb946bf6aaeb7c8151b18924d81370ffe6b7441b Author: Boris Brezillon Date: Fri Oct 19 09:49:02 2018 +0200 mtd: maps: physmap: Fix coding style issues reported by checkpatch Fix the following coding style issues: - != NULL and == NULL test replaced by ! (or nothing) - split over 80 chars lines - add missing braces in multi-line if() {} else {} statements Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 7abe5309de76337920f103d9e34ebd42a479533b Author: Boris Brezillon Date: Fri Oct 19 09:49:01 2018 +0200 mtd: maps: physmap: Return -ENOMEM directly when info allocation fails There's no point going to the err_out path since no resources have been allocated yet, just return -ENOMEM directly. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 1e4f42084910067b2d37002afb6d1d1413552e1c Author: Boris Brezillon Date: Fri Oct 19 09:49:00 2018 +0200 mtd: maps: physmap: Check mtd_device_{parse_register, unregister}() ret code mtd_device_parse_register() and mtd_device_unregister() can fail, check their return code and propagate the error to the upper layer if needed. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 51b436a2420e32258f78f0d7a53c8ad1c8569d3b Author: Boris Brezillon Date: Fri Oct 19 09:48:59 2018 +0200 mtd: maps: physmap: Remove the MAX_RESOURCES limitation Remove the MAX_RESOURCES limitation by dynamically allocating the ->mtds[] and ->maps[] at probe time based on the number of iomem resources attached to the platform device. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit ea5bc54b12e822a2691c8b7348fae3badb6e376c Author: Boris Brezillon Date: Fri Oct 19 09:48:58 2018 +0200 mtd: maps: physmap: Use devm_ioremap_resource() Use devm_ioremap_resource() to replace the devm_request_mem_region() + devm_ioremap() combination. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 16f2101b4ddb34e4524623425a19cb7bbf7ced9c Author: Boris Brezillon Date: Fri Oct 19 09:48:57 2018 +0200 mtd: maps: physmap: Use dev_notice() and a %pR specifier Replace printk(KERN_NOTICE) by dev_notice() use the %pR specifier to print the iomem resource. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit c7f6dc60a319edac986486580b2fc31475ceba11 Author: Boris Brezillon Date: Fri Oct 19 09:48:56 2018 +0200 mtd: maps: physmap: Use platform_get_resource() to retrieve iomem resources Stop manipulating the dev->resource array directly and use the platform_get_resource() helper instead. While at it, fix the loop check so that we never overflow the info->maps and info->mtds array even if the number of resources attached to the platform dev is higher than MAX_RESOURCES. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 00142d6ffeb67b22e1f5259c9f3af540ed1d2b62 Author: Boris Brezillon Date: Fri Oct 19 09:48:55 2018 +0200 mtd: maps: physmap: Rename ->map and ->mtd into ->maps and ->mtds The ->map and ->mtd fields are actually arrays of map and mtd objects. Rename those fields into ->maps and ->mtds to make it obvious. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 18d54e557c55fbf29d1a25fe2e1c01b0970f36cb Author: Boris Brezillon Date: Fri Oct 19 09:48:54 2018 +0200 mtd: maps: physmap: Add SPDX header Add an SPDX header matching the MODULE_LICENSE("GPL") definition. Signed-off-by: Boris Brezillon Reviewed-by: Ricardo Ribalda Delgado Acked-by: Linus Walleij commit 4a57f58f6a23575aa4469d5e2ddfd7b17c46ae76 Author: Randy Dunlap Date: Mon Nov 5 14:53:21 2018 -0600 PCI: Expand the "PF" acronym in Kconfig help text Tell users what a PCI PF is in the PCI_PF_STUB config help text. Fixes: a8ccf8a66663 ("PCI/IOV: Add pci-pf-stub driver for PFs that only enable VFs") Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Acked-by: Alexander Duyck commit b83761bb0b09ec11c924afe9d88e458cb16a0372 Author: Christian König Date: Thu Oct 25 11:02:50 2018 +0200 drm/amdgpu: use GMC v9 KIQ workaround only for the GFXHUB The MMHUB is not affected by this. Signed-off-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 396557b03c9466f27b60052c6b364541f61092db Author: Christian König Date: Thu Oct 25 10:50:42 2018 +0200 drm/amdgpu: drop the busy wait for GMC v9 TLB invalidations This code is not performance critical. Signed-off-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit af5fe1e96aa156886f89282371fce1629fcc9f6a Author: Christian König Date: Thu Oct 25 10:49:07 2018 +0200 drm/amdgpu: cleanup GMC v9 TLB invalidation Move the kiq handling into amdgpu_virt.c and drop the fallback. Signed-off-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 5c76c6a8975e1d074dc5763d3f46c928bc7d6484 Author: Christian König Date: Thu Oct 25 10:37:02 2018 +0200 drm/amdgpu: remove nonsense in_interrupt() checks might_sleep() is supposed to raise if warning if called in interrupt or atomic context. Signed-off-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 788012e33cb4ba7eedae6b621f0fa27f9196f2d0 Author: Dmitry V. Levin Date: Thu Nov 1 14:03:28 2018 +0300 uapi: fix more linux/kfd_ioctl.h userspace compilation errors Consistently use types provided by via to fix struct kfd_ioctl_get_queue_wave_state_args userspace compilation errors. Fixes: 5df099e8bc83f ("drm/amdkfd: Add wavefront context save state retrieval ioctl") Signed-off-by: Dmitry V. Levin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9349e23907be1954ccdf6d771d640e2788da1643 Author: Dmitry V. Levin Date: Thu Nov 1 14:03:08 2018 +0300 uapi: fix linux/kfd_ioctl.h userspace compilation errors Consistently use types provided by via to fix the following linux/kfd_ioctl.h userspace compilation errors: /usr/include/linux/kfd_ioctl.h:250:2: error: unknown type name 'uint32_t' uint32_t reset_type; /usr/include/linux/kfd_ioctl.h:251:2: error: unknown type name 'uint32_t' uint32_t reset_cause; /usr/include/linux/kfd_ioctl.h:252:2: error: unknown type name 'uint32_t' uint32_t memory_lost; /usr/include/linux/kfd_ioctl.h:253:2: error: unknown type name 'uint32_t' uint32_t gpu_id; Fixes: 0c119abad7f0d ("drm/amd: Add kfd ioctl defines for hw_exception event") Cc: # v4.19 Signed-off-by: Dmitry V. Levin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2383a767c0ca06f96534456d8313909017c6c8d0 Author: Christian König Date: Fri Nov 2 14:46:24 2018 +0100 drm/amdkfd: fix interrupt spin lock Vega10 has multiple interrupt rings, so this can be called from multiple calles at the same time resulting in: [ 71.779334] ================================ [ 71.779406] WARNING: inconsistent lock state [ 71.779478] 4.19.0-rc1+ #44 Tainted: G W [ 71.779565] -------------------------------- [ 71.779637] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [ 71.779740] kworker/6:1/120 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 71.779832] 00000000ad761971 (&(&kfd->interrupt_lock)->rlock){?...}, at: kgd2kfd_interrupt+0x75/0x100 [amdgpu] [ 71.780058] {IN-HARDIRQ-W} state was registered at: [ 71.780115] _raw_spin_lock+0x2c/0x40 [ 71.780180] kgd2kfd_interrupt+0x75/0x100 [amdgpu] [ 71.780248] amdgpu_irq_callback+0x6c/0x150 [amdgpu] [ 71.780315] amdgpu_ih_process+0x88/0x100 [amdgpu] [ 71.780380] amdgpu_irq_handler+0x20/0x40 [amdgpu] [ 71.780409] __handle_irq_event_percpu+0x49/0x2a0 [ 71.780436] handle_irq_event_percpu+0x30/0x70 [ 71.780461] handle_irq_event+0x37/0x60 [ 71.780484] handle_edge_irq+0x83/0x1b0 [ 71.780506] handle_irq+0x1f/0x30 [ 71.780526] do_IRQ+0x53/0x110 [ 71.780544] ret_from_intr+0x0/0x22 [ 71.780566] cpuidle_enter_state+0xaa/0x330 [ 71.780591] do_idle+0x203/0x280 [ 71.780610] cpu_startup_entry+0x6f/0x80 [ 71.780634] start_secondary+0x1b0/0x200 [ 71.780657] secondary_startup_64+0xa4/0xb0 Fix this by always using irq save spin locks. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f6cffc0d4d3c20bd5c9b3c825448016d7388b43a Author: Rex Zhu Date: Wed Oct 31 19:49:27 2018 +0800 drm/amdgpu: Add helper function to get sdma index Get the sdma index from ring v2: refine function name Reviewed-by: Alex Deucher Reviewed-by: Flora Cui Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit ccf191f8aabf8cb7bb01e4efae7bdb73614c745b Author: Rex Zhu Date: Thu Nov 1 13:42:42 2018 +0800 drm/amdgpu: Refine function name there is no functional changes.just refine function name to keep consistence with other files. change amdgpu_get_sdma_instance to amdgpu_sdma_get_instance_from_ring. suggested by alex. Reviewed-by: Alex Deucher Reviewed-by: Flora Cui Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 3a10f6e8aa14f3f512e59da04397e002d2810111 Author: Evan Quan Date: Thu Nov 1 14:55:08 2018 +0800 drm/amd/powerplay: do the comparison in the right Khz granularity Convert the operands on the two sides into the same granularity. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f60d405a870f9c194a6e3001612d9e8556493440 Author: Florian Fainelli Date: Mon Oct 29 09:55:23 2018 -0700 ARM: dts: NSP: Move aliases to bcm-nsp.dtsi All boards replicate the aliases node, move the aliases node to bcm-nsp.dtsi and add all the serial and ethernet ports such that a boot program like u-boot can populate MAC addresses accordingly. Signed-off-by: Florian Fainelli commit 0810d5cc29a1e4bb9e738a478b746aebf8dc1931 Author: Wolfram Sang Date: Sun Oct 21 21:59:58 2018 +0200 bus: brcmstb_gisb: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Florian Fainelli commit 5df275cd4cf51c86d49009f1397132f284ba515e Author: Ondrej Mosnacek Date: Tue Oct 23 09:02:17 2018 +0200 selinux: policydb - fix byte order and alignment issues Do the LE conversions before doing the Infiniband-related range checks. The incorrect checks are otherwise causing a failure to load any policy with an ibendportcon rule on BE systems. This can be reproduced by running (on e.g. ppc64): cat >my_module.cil < Cc: Eli Cohen Cc: James Morris Cc: Doug Ledford Cc: # 4.13+ Fixes: a806f7a1616f ("selinux: Create policydb version for Infiniband support") Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 63ecd3b13d5cf07959a2315ec62a7c62e20df114 Author: Borislav Petkov Date: Thu Nov 1 16:24:43 2018 +0100 x86/gart: Rewrite early_gart_iommu_check() comment ... to actually explain what the function is trying to do. Reported-by: Mike Rapoport Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Link: http://lkml.kernel.org/r/20181101155314.30690-1-bp@alien8.de commit 43500e6f294d175602606c77bfb0d8cd4ea88b4f Author: Sean Christopherson Date: Mon Nov 5 10:57:25 2018 -0800 x86/cpufeatures: Remove get_scattered_cpuid_leaf() get_scattered_cpuid_leaf() was added[1] to help KVM rebuild hardware- defined leafs that are rearranged by Linux to avoid bloating the x86_capability array. Eventually, the last consumer of the function was removed[2], but the function itself was kept, perhaps even intentionally as a form of documentation. Remove get_scattered_cpuid_leaf() as it is currently not used by KVM. Furthermore, simply rebuilding the "real" leaf does not resolve all of KVM's woes when it comes to exposing a scattered CPUID feature, i.e. keeping the function as documentation may be counter-productive in some scenarios, e.g. when KVM needs to do more than simply expose the leaf. [1] 47bdf3378d62 ("x86/cpuid: Provide get_scattered_cpuid_leaf()") [2] b7b27aa011a1 ("KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX") Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov CC: "H. Peter Anvin" CC: Ingo Molnar Cc: Paolo Bonzini Cc: Radim Krčmář CC: Thomas Gleixner CC: x86-ml Link: http://lkml.kernel.org/r/20181105185725.18679-1-sean.j.christopherson@intel.com commit a748faea3bfd7fd1d1485bc1c426c7d460cc6503 Author: Ville Syrjälä Date: Thu Oct 25 16:05:36 2018 +0300 drm/i915: Fix ilk+ watermarks when disabling pipes We're no longer programming any watermarks when we're disabling a pipe. That means ilk_wm_merge() & co. will keep considering the any pipe that is getting disabled as still enabled. Thus we either get no LP1+ watermakrs (ilk-ivb), or we get suboptimal ones (hsw-bdw). This seems to have been broken by commit b6b178a77210 ("drm/i915: Calculate ironlake intermediate watermarks correctly, v2."). Before that we apparently had some difference between the intermediate and optimal watermarks and so we would program the optiomal ones. Now intermediate and optimal are identical for disabled pipes and so we don't program either. Fix this by programming the intermediate watermarks even for disabled pipes. We were already doing that for skl+. We'll leave out gmch platforms for now since those do the merging in a different manner and should work as is. We'll want to unify this eventually, but play it safe for now and just put in a FIXME. Cc: stable@vger.kernel.org Cc: Matt Roper Cc: Maarten Lankhorst Fixes: b6b178a77210 ("drm/i915: Calculate ironlake intermediate watermarks correctly, v2.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181025130536.29024-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst #irc commit 34955e038a1b313b0f19eeacfb0e22aa6877e11d Author: Rex Zhu Date: Wed Oct 24 13:37:37 2018 +0800 drm/amdgpu: Modify the argument of emit_ib interface use the point of struct amdgpu_job as the function argument instand of vmid, so the other members of struct amdgpu_job can be visit in emit_ib function. v2: add a wrapper for getting the VMID add the job before the ib on the parameter list. v3: refine the wrapper name Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 8469868df76fc417e0256f21af96809bad96ba66 Author: Rex Zhu Date: Wed Oct 24 20:06:37 2018 +0800 drm/amdgpu: Change AMDGPU_CSA_SIZE to 128K In order to support new asics and MCBP feature enablement on baremetal. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 7946340fa38965705f79273cef0cdc477239bf2d Author: Rex Zhu Date: Fri Oct 19 13:35:48 2018 +0800 drm/amdgpu: Move csa related code to separate file In baremetal, also need to reserve csa for preemption. so move the csa related code out of sriov. Reviewed-by: Monk Liu Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 1e256e2762211c02078c31f839a9b243f62efd5e Author: Rex Zhu Date: Mon Oct 15 17:08:38 2018 +0800 drm/amdgpu: Refine CSA related functions There is no functional changes, Use function arguments for SRIOV special variables which is hardcode in those functions. so we can share those functions in baremetal. Reviewed-by: Monk Liu Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 20bedfe0c13a2e221301e3c889b2a4c48374f78a Author: Rex Zhu Date: Tue Oct 16 16:27:53 2018 +0800 drm/amdgpu: Remove useless csa gpu address in vmid0 driver didn't use this address so far. Reviewed-by: Monk Liu Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 2a5ae84bf31e09526788def14e4b28c6d4d756f9 Author: Junwei Zhang Date: Wed Oct 31 10:36:34 2018 +0800 drm/amdgpu: fix gfx wptr for sdma v4 The wptr value will be shitfed when function returns. Remove the redundant shift and clean up. Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1cf03c54b3d89ccbaee45abbbf10c098f23801d5 Author: Junwei Zhang Date: Wed Oct 24 16:19:09 2018 +0800 drm/amdgpu: disable page queue on SDMA for Vega12 It blocks most of sanity tests, so disable it for now. Tested-by: Chen Gong Signed-off-by: Junwei Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 965632adc8a4205d26b3e91b18041aba2fc28229 Author: Alex Deucher Date: Wed Oct 17 11:24:26 2018 -0500 drm/amdgpu: update smu firmware images for VI variants (v2) Some new variants require updated firmware. V2: add MODULE_FIRMWARE for new firmwares Reviewed-by: Huang Rui (v1) Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d2b1d6bbc56afab8ebae9d52d7ca0ea3569bd600 Author: Lewis Huang Date: Thu Oct 18 17:52:19 2018 +0800 drm/amd/display: Add condition to sync eDP SW status and HW status [Why] Need to disable EDP backlight when enter S4 with EDP only and resume from S4 with secondary only. [How] Align the real hw and sw state via vBios scratch register in function enable_accelerated_mode when resume from S4. Signed-off-by: Lewis Huang Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit ff83a9a0d15d3be46b3288346a1180777f1a4e41 Author: Fatemeh Darbehani Date: Fri Oct 19 10:12:56 2018 -0400 drm/amd/display: Remove the check to see if pp_display_cfg is changed [Why] When going to full-screen mode commit_planes_for_stream tries to decrease dcf_deep_sleep value, but safe_to_lower is false, so we don't send the new value to SMU but dc context gets updated. Later when dc_post_update_surfaces_to_stream tries to lower dcf_ds when safe_to_lower is true, this check prevents the message from being sent. [How] Remove the check that compares new value with what is stored in dc_context. This check is not necessary as dcn1_update_clocks already checks if the value is different from the current dcf_dp value. Signed-off-by: Fatemeh Darbehani Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 5e2b2fbc4d99bee493f171ca73e80c6006b35f80 Author: Charlene Liu Date: Fri Oct 19 16:03:57 2018 -0400 drm/amd/display: remove CRTC_3D_STRUCTURE_V_UPDATE_MODE bit programming. [Description] This is based on HW programming guide update. Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit ba45df4cb7193570e9fa4979b198ec313899417c Author: Anthony Koo Date: Thu Oct 18 15:03:56 2018 -0400 drm/amd/display: Expose target backlight level [Why] DM may want to understand any backlight optimizations applied, so DM needs a way to query from the HW both the real current backlight, which may be value during transition. And also target backlight, which may be after some backlight optimizations applied. [How] Add interface to query current and target backlight levels Target level may indicate backlight level after backlight optimization and reductions are applied. Signed-off-by: Anthony Koo Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit f41a895026b8cb6f765190de7d2e7bc3ccbbd183 Author: Nicholas Kazlauskas Date: Thu Oct 18 15:49:41 2018 -0400 drm/amd/display: Guard against null stream_state in set_crc_source [Why] The igt@kms_plane@pixel-format-pipe tests can create a sequence where stream_state is NULL during amdgpu_dm_crtc_set_crc_source which results in a null pointer dereference. [How] Guard against stream_state being NULL before accessing its fields. This doesn't fix the root cause of the issue so a DRM_ERROR is generated to still fail the tests. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 83d4065991f044def34607b654096fd5712f059f Author: Dmytro Laktyushkin Date: Tue Oct 16 18:00:29 2018 -0400 drm/amd/display: fix mirror rotation scaling math Curretly dc will incorrectly calculate viewport when there is rotation or mirror being applied Signed-off-by: Dmytro Laktyushkin Reviewed-by: Su Chung Acked-by: Leo Li Signed-off-by: Alex Deucher commit ba7b267a458e133cbd791c818fb4cb41180242c6 Author: Fatemeh Darbehani Date: Fri Oct 5 17:22:32 2018 -0400 drm/amd/display: Retiring set_display_requirements in dm_pp_smu.h - part4 [Why] In DCN we want direct DC to SMU calls, with minimal interference from pplib. The reason for each pp_smu interface mapping to 1 SMU message is so we can have the sequencing of different SMU message in DC and shared across different OS's. This will also simplify debugging as DAL owns this interaction and there's no confusion about division of ownership. [How] Part 4: Change clock units so they match the values PPLib sends to SMU. Signed-off-by: Fatemeh Darbehani Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3917a470757cf55155663240481b1dda0206717b Author: Krunoslav Kovac Date: Fri Oct 12 17:31:58 2018 -0400 drm/amd/display: Remove program_csc_matrix [Why] On DCN1/DCE, There are two functions programming OCSC: program_csc_matrix and program_output_csc. They do the same thing. [How] Consolidate to use only program_output_csc. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 37c1346c2e36d187cd0f1d6b82292a946ba029e4 Author: Anthony Koo Date: Sat Oct 13 23:31:51 2018 -0400 drm/amd/display: Fix some backlight variable styling variableNamingsLikeSo aren't to convention. use_this_instead. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 262485a50fd4532a8d71165190adc7a0a19bcc9e Author: Anthony Koo Date: Fri Oct 12 21:34:32 2018 -0400 drm/amd/display: Expand dc to use 16.16 bit backlight [Why] We want to increase precision for backlight setting. But DC interface takes 8 bit backlight level value only. [How] DMCU already takes 16 bit backlight level. Expand the DC interface to take 16.16 bit value. Max 32 bit backlight value (0xFFFF) will represent max backlight (100%) Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit a7d8084b589714ea08bddd3720986b657840f46b Author: Eric Bernstein Date: Mon Oct 15 16:40:38 2018 -0400 drm/amd/display: Remove some old TODO's They are no longer relevant Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit b8592b48450b99d2b598bea6ae0ccac16ea429de Author: Leo Li Date: Fri Sep 14 11:20:08 2018 -0400 drm/amd/display: Initial documentation for AMDgpu DC [Why] Documentation is helpful for the community to understand our code. This change does some high-level documentation of some DM interfaces with DRM, and the amdgpu base driver. [How] An entry for AMDgpu DC has been added to Documentation/gpu/drivers.rst TOC. amdgpu-dc.rst is created to pull in inline doc-strings, which: - Provides an overview for "What is DM?" - Documents AMDgpu DM lifecyle - Documents IRQ management - Documents atomic_check and commit_tail interfaces Signed-off-by: Leo Li Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4f7129112c2a30331f3045a42026fad82e6cb72b Author: Bhawanpreet Lakha Date: Tue Oct 9 13:47:34 2018 -0400 drm/amd/display: Fix potential nullptr error [Why] Fix surface/plane potential nullptr [How] add null check Signed-off-by: Bhawanpreet Lakha Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3384521a79edcf6a25a2dfef079f4ec8053b7b33 Author: Steven Chiu Date: Mon Oct 15 14:06:03 2018 -0400 drm/amd/display: 3.2.04 Signed-off-by: Steven Chiu Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 69133b89359120e741dff3e09dcfdc08ff954445 Author: Aric Cyr Date: Wed Oct 10 19:02:48 2018 -0400 drm/amd/display: Fix up coverity issues [Why] Coverity found various high-impact issues that need resolving. [How] Fix some buffer overruns and uninitialized variables. Signed-off-by: Aric Cyr Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit ddc07a3803a71413f73d40f17cedf5ebd28ef3bc Author: Dmytro Laktyushkin Date: Fri Oct 12 09:40:06 2018 -0400 drm/amd/display: remove interlace scaling adjustment We do not need to adjust surface scaling when p2i is enabled and we do not support interlaced timing otherwise Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit c99155230b677236f79edc226fca80392cc84787 Author: Nevenko Stupar Date: Thu Oct 11 18:04:14 2018 -0400 drm/amd/display: Add missing pipes registers for VGA enable/disable Signed-off-by: Nevenko Stupar Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8d6da3bbfd959a92bc4a20d6b8ad596f2bee033e Author: Dmytro Laktyushkin Date: Wed Oct 10 12:55:24 2018 -0400 drm/amd/display: fix dml max voltage state Gabe's formula sometimes uses values from non-existent 'unsupported' state to do validation. This change adds this extra state so validation can work correctly. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit b76dfbef061acc29b74cc61e9fbbb60537edcc55 Author: SivapiriyanKumarasamy Date: Tue Oct 9 12:59:46 2018 -0400 drm/amd/display: Clip all remaining regamma points after first clipped point [Why] All values computed in the gamma curve after the first upperbound clipped point will need to be clipped anyways. We can avoid unnecessary computations and potential fixed point overflow by instead clipping these values to 1 automatically. [How] Track if upper-bound clipping has been done, and clip all values after this threshold is reached without computing the output gamma point. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1fd8375236fc1d125c8c8bfb6462b3cfb139b6fe Author: SivapiriyanKumarasamy Date: Fri Oct 5 10:25:06 2018 -0400 drm/amd/display: 3.2.03 Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Tony Cheng Reviewed-by: Steven Chiu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 097578091327ec9b9707d4efa934c55b4e761030 Author: Krunoslav Kovac Date: Mon Sep 24 16:30:20 2018 -0400 drm/amd/display: Set gamma not working on MPO planes [Why] Set gamma not working on certain planes in MPO configuration Root cause is that video format (YUV-420) isn't allowed for IGAM where gamma is applied. Fix is not easy though: 1. allowing will not work because IGAM is before ICSC so RGB gamma would be applied on YUV pixels. 2. Moving OS gamma to DGAM or RGAM resulted in weird artifacts. Ultimately the root cause for these artifacts was due to handling end points and the fact that YUV->RGB conversion will frequently "overshoot" FP 1.0 value. DCE has a single end point and slope, so we would take max. In nightlight mode, blue channel is reduced, sometimes to flat 0 line, but red is virtually unchanged. Any "overshot" in blue will be clipped to 1 (max R,G,B) instead of max blue value. [How] Fortunately, this can be fixed on DCN where we have end point and slope for all three color channels. We cannot fix this problem on DCE. Other things fixed: - switch (back) to using RGAM for OS gamma instead of IGAM - add coeffs for 709 YUV->RGB (we used RGB->YUV for both conversions) - switch color temperature method to scaled bradford - otherwise we would have clipping problems that caused us to switch to IGAM for OS gamma in the first place. - comments and some minor improvements - there are some more issues but they will be addressed in separate commits. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 6e82c6e0661befbe2f926863586597236ca617af Author: Christian König Date: Tue Oct 30 13:16:28 2018 +0100 drm/amdgpu: drop the remaining uses of ring idx in messages Consistently use the ring name instead. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b7ff853f15a278583414bbaeeb47b6084a32b0fb Author: Christian König Date: Tue Oct 30 13:07:26 2018 +0100 drm/amdgpu: cleanup si_dma_ring_test_ib Accidentially missed during the last cleanup. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 725b2611781a513eeeae260bfdff4026ee8e3601 Author: Christian König Date: Tue Oct 30 13:06:22 2018 +0100 drm/amdgpu: cleanup uvd_v6_0_ring_test_ring Accidentially missed during the last cleanup. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9340c36ca5f80e0a75856cf0aeeb9e25ce7f9574 Author: Christian König Date: Tue Oct 30 13:04:37 2018 +0100 drm/amdgpu: use ring name instead of idx in traces Further remove using the ring index in messages and traces. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e0519696cc31c111f11e7c67bd663dbb88d6673f Author: Samuel Pitoiset Date: Mon Oct 29 12:23:06 2018 +0100 drm/amdgpu: print an error when the parser can't be initialized Similar to other error messages, might help for tracking down issues. Signed-off-by: Samuel Pitoiset Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 26efecf9558895a89c2920d258601b4afba10fd0 Author: Sharat Masetty Date: Mon Oct 29 15:02:28 2018 +0530 drm/scheduler: Add drm_sched_job_cleanup This patch adds a new API to clean up the scheduler job resources. This is primarliy needed in cases the job was created but was not queued to the scheduler queue. Additionally with this change, the layer which creates the scheduler job also gets to free up the job's resources and this entails moving the dma_fence_put(finished_fence) to the drivers ops free handler routines. Signed-off-by: Sharat Masetty Reviewed-by: Christian König Acked-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 98079389a873f45ba75bbb20dcf14db0ec694a9a Author: Christian König Date: Mon Oct 29 16:12:42 2018 +0100 drm/amdgpu: remove messages from IB tests We already print an error message that an IB test failed in the common code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 315fed0367b4b4197cdc9585d09a1e659ae6c716 Author: Christian König Date: Mon Oct 29 14:56:34 2018 +0100 drm/amdgpu: cleanup skipping IB test on KIQ Instead of hard coding the ring type in the function just never provide a test_ib callback. Additional to that remove the emit_ib callback to make sure the nobody ever tries to execute an IB on the KIQ. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit af70a471bf067d4e808eff2b9c464e6055c98d49 Author: Christian König Date: Mon Oct 29 10:55:23 2018 +0100 drm/amdgpu: cleanup amdgpu_ib_ring_tests Test only initialized rings, use the ring name instead of the index in the error message and note on which device the error occured. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit dc9eeff84c77080f545575a30062af0ac65b1eb0 Author: Christian König Date: Mon Oct 29 10:48:31 2018 +0100 drm/amdgpu: further ring test cleanups Move all error messages from IP specific code into the common helper. This way we now uses the ring name in the messages instead of the index and note which device is affected as well. Also cleanup error handling in the IP specific code and consequently use ETIMEDOUT when the ring test timed out. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit e4312d459a2e572e093c758793bd5357d6bddfd1 Author: Alex Deucher Date: Mon Oct 22 17:23:09 2018 -0500 drm/amdgpu/amdkfd: clean up mmhub and gfxhub includes Use the appropriate mmhub and gfxhub headers rather than adding them to the gmc9 header. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3ba7b418f12b634b8920c979f5259013d40e38e2 Author: Andrey Grodzovsky Date: Mon Oct 22 17:12:39 2018 -0400 drm/amdgpu: Enable default GPU reset for dGPU on gfx8/9 v3 After testing looks like these subset of ASICs has GPU reset working for the most part. Enable reset due to job timeout. v2: Switch from GFX version to ASIC type. v3: Fix identation Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c66ed765a0a97b8900f37d4a71f1d75f52f56eeb Author: Andrey Grodzovsky Date: Fri Oct 19 16:22:48 2018 -0400 drm/amdgpu: Retire amdgpu_ring.ready flag v4 Start using drm_gpu_scheduler.ready isntead. v3: Add helper function to run ring test and set sched.ready flag status accordingly, clean explicit sched.ready sets from the IP specific files. v4: Add kerneldoc and rebase. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit faf6e1a87e07423a729e04fb2e8188742e89ea4c Author: Andrey Grodzovsky Date: Thu Oct 18 12:32:46 2018 -0400 drm/sched: Add boolean to mark if sched is ready to work v5 Problem: A particular scheduler may become unsuable (underlying HW) after some event (e.g. GPU reset). If it's later chosen by the get free sched. policy a command will fail to be submitted. Fix: Add a driver specific callback to report the sched status so rq with bad sched can be avoided in favor of working one or none in which case job init will fail. v2: Switch from driver callback to flag in scheduler. v3: rebase v4: Remove ready paramter from drm_sched_init, set uncoditionally to true once init done. v5: fix missed change in v3d in v4 (Alex) Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2bb42410b1bd324912389c6ac748df1c1befd69f Author: Thomas Zimmermann Date: Fri Oct 19 10:54:23 2018 +0200 drm: Remove drm_global.{c,h} v2 The content of drm_global.{c,h} is obsolete. v2: rebase on dropping TTM functionality Signed-off-by: Thomas Zimmermann Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit a64f784bb14a56bfdfad2dc397dd67e4564e3a29 Author: Christian König Date: Fri Oct 19 16:55:26 2018 +0200 drm/ttm: initialize globals during device init (v2) Make sure that the global BO state is always correctly initialized. This allows removing all the device code to initialize it. v2: fix up vbox (Alex) Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 62b53b37e4b1500d4eb4624a44ad861cf8d3cd18 Author: Christian König Date: Fri Oct 19 15:06:06 2018 +0200 drm/ttm: use a static ttm_bo_global instance As the name says we only need one global instance of ttm_bo_global. Just use a single exported instance which is save to initialize multiple times. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 56b3d20413587fab6a790cfc8bc075ca94bc8ed9 Author: Christian König Date: Fri Oct 19 14:09:24 2018 +0200 drm/ttm: make the device list mutex static This way it can protect the whole BO global state. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 27eb1fa9130a98edd2b321d4dbce5c8b244ee7af Author: Christian König Date: Fri Oct 19 13:49:05 2018 +0200 drm/ttm: use a static ttm_mem_global instance As the name says we only need one global instance of ttm_mem_global. Drop all the driver initialization and just use a single exported instance which is initialized during BO global initialization. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit 7e07834c12b96214e95a473f7b14fc03b20e2e7a Author: YueHaibing Date: Sun Oct 21 18:39:58 2018 +0800 drm/amd/powerplay: remove duplicated includes Remove some duplicated include. Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 50aa56370c9b7652d8e6c845df126211824dd30b Author: YueHaibing Date: Sun Oct 21 10:05:59 2018 +0000 drm/radeon/kms: remove set but not used variable 'pll' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/radeon/radeon_legacy_tv.c: In function 'radeon_legacy_tv_init_restarts': drivers/gpu/drm/radeon/radeon_legacy_tv.c:435:21: warning: variable 'pll' set but not used [-Wunused-but-set-variable] struct radeon_pll *pll; It never used since introduction in commit 4ce001abafaf ("drm/radeon/kms: add initial radeon tv-out support.") Also remove related variables 'dev, rdev, radeon_crtc' Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 5dcb668d9a078bf926ea629db41643dd95d2d31b Author: Oak Zeng Date: Tue Oct 23 22:58:04 2018 -0400 drm/amdgpu: Added a few comments for gart Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Signed-off-by: Alex Deucher commit afd545f673ad40bc0d3d6ecae686ca6fc44d1743 Author: Yong Zhao Date: Fri Oct 12 17:23:09 2018 -0400 drm/amdkfd: Use functions from amdgpu to invalidate vmid in kfd As part of the change, we stop taking the srbm lock, and start to use the same invalidation engine and software lock as amdgpu. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2a79d86897afd54778d44019dcc9327e0188e69f Author: Yong Zhao Date: Fri Oct 12 17:17:05 2018 -0400 drm/amdgpu: Reorganize amdgpu_gmc_flush_gpu_tlb() for kfd to use Add a flush_type parameter to that series of functions. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a614aae76057955c914de9bc3fc659c164cd5c2c Author: Yong Zhao Date: Fri Oct 12 16:48:04 2018 -0400 drm/amdkfd: Remove unnecessary register setting when invalidating tlb in kfd Those register settings have been done in gfxhub_v1_0_program_invalidation() and mmhub_v1_0_program_invalidation(). Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 435e2f970995f7bb3fa5b986071e8371bdc75619 Author: Yong Zhao Date: Tue Oct 16 13:12:53 2018 -0400 drm/amdkfd: page_table_base already have the flags needed The flags are added when calling amdgpu_gmc_pd_addr(). Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit deb99d7c4fb2797a50c548d13e17b90ef8b8ee86 Author: Yong Zhao Date: Sun Oct 14 16:25:07 2018 -0400 drm/amdkfd: Delete a duplicate statement in set_pasid_vmid_mapping() The same statement is later done in kgd_set_pasid_vmid_mapping(), so no need to do it in set_pasid_vmid_mapping(). Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ce331f8f7c04186b7b130550250d9c4e752b4f8f Author: Nicholas Kazlauskas Date: Tue Oct 23 10:04:54 2018 -0400 drm/amdgpu: Add DCC flags for GFX9 amdgpu_bo [Why] Hardware support for Delta Color Compression (DCC) decompression is available in DC for GFX9 but there's no way for userspace to enable the feature. Enabling the feature can provide improved GFX performance and power savings in many situations. [How] Extend the GFX9 tiling flags to include DCC parameters. These are logically grouped together with tiling flags even if they are technically distinct. This trivially maintains backwards compatibility with existing users of amdgpu_gem_metadata. No new IOCTls or data structures are needed to support DCC. This patch helps expose DCC attributes to both libdrm and amdgpu_dm. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher commit 950227959b0e4bce5d1c9b93be15f977b530a717 Author: Charlene Liu Date: Mon Oct 1 15:22:12 2018 -0400 drm/amd/display: Check if hubp function hooks exist before calling them Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6a85538aa0bf5e999148f41b9512cb479841b081 Author: Fatemeh Darbehani Date: Tue Oct 2 15:03:24 2018 -0400 drm/amd/display: Retiring set_display_requirements in dm_pp_smu.h - part3 [Why] In DCN we want direct DAL to SMU calls, with as little as possible interference by pplib. The reason for each pp_smu interface mapping to 1 SMU message is so we can have the sequencing of different SMU message in dal and shared across different OS. This will also simplify debugging as DAL owns this interaction and there's no confusion about division of ownership. [How] Separate the set_hard_min_fclk_by_freq message from the SMU messages that are sent as part of pp_rv_set_display_requirement. directly notify min dcfclk to smu part 2 Signed-off-by: Fatemeh Darbehani Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 06308d024ad56e36f86aeccb271c7591cc098f7f Author: SivapiriyanKumarasamy Date: Tue Oct 2 11:50:49 2018 -0400 drm/amd/display: Remove stream_res tg null check in commit planes [Why] TG in pipe_ctx stream resource is not null where used in commit_planes_do_stream_update since it is assigned the same time the stream is set in pipe_ctx - when the pipe is acquired. This null check produced a static code analysis warning and should be removed to avoid similar unnecessary checks in the future. [How] Remove the null check. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6ffb6b7f8ab7fea7f6007f68f3c31372410743c0 Author: Rex Zhu Date: Mon Oct 22 17:37:00 2018 +0800 drm/amdgpu: Reverse the sequence of ctx_mgr_fini and vm_fini in amdgpu_driver_postclose_kms csa buffer will be created per ctx, when ctx fini, the csa buffer and va will be released. so need to do ctx_mgr fin before vm fini. Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher commit 0b25cbf9c26c4edf2cb12b542faf94d77586c916 Author: Hawking Zhang Date: Fri Sep 28 14:23:11 2018 +0800 drm/amdgpu/psp: avoid hard-code fence value pre submission Hard-code submission fence is not a sustainable way as there is more and more run-time psp kernel mode submission from driver to fw Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7cd52c917a9c9a90f7d303079576971dc1a1c4fc Author: Amber Lin Date: Thu Oct 18 13:38:19 2018 -0400 drm/amdkfd: Add proper prefix to functions Add amdgpu_amdkfd_ prefix to amdgpu functions served for amdkfd usage. v2: fix indentation Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dfcbe6d5f4a340c51a4e13bc5181534bc4fd4697 Author: Amber Lin Date: Thu Oct 18 12:51:02 2018 -0400 drm/amdgpu: Remove unused function pointers Remove unused function pointers in kfd2kgd structure. Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5b87245faf575647210855d06d67b87d269d6cf1 Author: Amber Lin Date: Tue Oct 16 11:36:15 2018 -0400 drm/amdkfd: Simplify kfd2kgd interface After amdkfd module is merged into amdgpu, KFD can call amdgpu directly and no longer needs to use the function pointer. Replace those function pointers with functions if they are not ASIC dependent. Signed-off-by: Amber Lin Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1728801409e4bf11dea101408774bede2ffb720c Author: Yong Zhao Date: Fri Oct 12 15:27:39 2018 -0400 drm/amdkfd: Use functions from amdgpu for setting up page table base Use the functions from amdgpu to avoid directly programming registers in amdgpu_amdkfd_gfx_v9.c. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c7ff7be62bc25864dd4571763a8ba76d6270e6ce Author: Yong Zhao Date: Fri Oct 12 15:22:46 2018 -0400 drm/amdgpu: Expose *_setup_vm_pt_regs for kfd to use kfd has the same need to set the VM page table base register, so expose them for kfd to use for better maintainability. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f4f859408cad43c4b7c1ae91d87dbe33929bc8e2 Author: Yong Zhao Date: Fri Oct 12 15:12:20 2018 -0400 drm/amdkfd: Delete unnecessary register settings Those register settings have been performed in amdgpu initialization gfxhub_v1_0_setup_vmid_config() and mmhub_v1_0_setup_vmid_config(). So no need to do it again in kfd. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 17e4bd6cb888838fa8be6262ab47a201fcccbcd7 Author: Marek Olšák Date: Fri Oct 5 16:43:44 2018 -0400 drm/amdgpu: increase the size of HQD EOP buffers Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b44da694a74a07071f9c8b50b4fcdfd47b52ae86 Author: Marek Olšák Date: Fri Oct 5 16:52:39 2018 -0400 drm/amdgpu: put HQD EOP buffers into VRAM This increases performance of compute queues. EOP events (PKT3_RELEASE_MEM) are stored into these buffers. Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher commit 898c2cb5d94fc56d357f38ba7a05b1e0e23e44a3 Author: Christian König Date: Tue Oct 16 13:08:21 2018 +0200 drm/amdgpu: use scheduler fault instead of reset work Signal a fault to the scheduler on an illegal instruction or register access violation instead of kicking of the reset handler directly. Signed-off-by: Christian König Acked-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 2c498d1dbe2e26d62a5ace8fa7b92ac2d084a60c Author: Christian König Date: Fri Oct 12 16:53:51 2018 +0200 drm/amdgpu: remove illegal instruction stub from si_dma.c Was never used. Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 8fe159b0143d817222c8799181deb799472b9339 Author: Christian König Date: Fri Oct 12 16:47:13 2018 +0200 drm/sched: add drm_sched_fault Add a helper to immediately start timeout handling in case of a hardware fault. Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 19067e522d99fb869ba17420d6ef235182cb420e Author: Christian König Date: Fri Oct 12 16:32:40 2018 +0200 drm/sched: make sure timer is restarted Make sure we always restart the timer after a timeout and remove the device specific workarounds. Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 548f2ecc33b5a377d9d5ba9d69cc06722f7930e1 Author: John Clements Date: Tue Oct 16 18:47:54 2018 -0400 drm/amdgpu: Revised PSP comments Revised comments in PSP SOS/Sysdriver loading sequence Signed-off-by: John Clements Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit efcf063f8d85ffd7d9f9ae4a19d185f48e57a7f0 Author: Philip Yang Date: Fri Oct 19 14:58:28 2018 -0400 drm/amdgpu: fix sdma v4 ring is disabled accidently For sdma v4, there is bug caused by commit d4e869b6b5d6 ("drm/amdgpu: add ring test for page queue")' local variable ring is reused and changed, so amdgpu_ttm_set_buffer_funcs_status(adev, true) is skipped accidently. As a result, amdgpu_fill_buffer() will fail, kernel message: [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.260444] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.260627] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.290119] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.290370] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.319971] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ 25.320486] amdgpu 0000:19:00.0: [mmhub] VMC page fault (src_id:0 ring:154 vmid:8 pasid:32768, for process pid 0 thread pid 0) [ 25.320533] amdgpu 0000:19:00.0: in page starting at address 0x0000000000000000 from 18 [ 25.320563] amdgpu 0000:19:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00800134 Signed-off-by: Philip Yang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d7f625e91b326c39413fa68ec4b8b2f280fd87b3 Author: Huang Rui Date: Thu Oct 18 18:11:45 2018 +0800 drm/amdgpu: add ring test for page queue We add page queue for sdma to update page table. So here it also needs ring test to verify it workable during the initialization. Signed-off-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f783160c273485af492874b227f60e4e189106f7 Author: Evan Quan Date: Mon Oct 22 10:33:10 2018 +0800 drm/amdgpu: disable SDMA page queue on Vega20 Since we see driver loading failure on Vega20. Keep it disabled until it's ready. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2a85e816ccd7a8f696c70a109c98cc9a017d683f Author: Alex Deucher Date: Wed Oct 17 11:39:27 2018 -0500 drm/amdgpu/sdma4: APUs do not have a page queue Don't use the paging queue on APUs. Tested-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 161d0711b9e53afa6db7724f1f5a8e2dba34221e Author: Christian König Date: Mon Oct 8 15:31:18 2018 +0200 drm/amdgpu: use paging queue for VM page table updates Only for testing, not sure if we should keep it like this. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bb97ab42ac5db1ee685bd5e79fdad29e083bfd61 Author: Christian König Date: Mon Oct 8 14:38:22 2018 +0200 drm/amdgpu: activate paging queue on SDMA v4 Implement all the necessary stuff to get those extra rings working. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d425e7d8de539933521be5e15275825957732c27 Author: Christian König Date: Thu Oct 4 19:56:24 2018 +0200 drm/amdgpu: add some [WR]REG32_SDMA macros to sdma_v4_0.c Significantly shortens the code. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 998d3fd4f8ce5714449237c2f93652e95ad476f4 Author: Christian König Date: Thu Oct 4 19:31:27 2018 +0200 drm/amdgpu: remove SRIOV specific handling from sdma_v4_0_gfx_resume Just use the same code path for both SRIOV and bare metal. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 09f0b4ffd41e142f52f70640afd1b4b20288d627 Author: Christian König Date: Thu Oct 4 17:59:50 2018 +0200 drm/amdgpu: remove non gfx specific handling from sdma_v4_0_gfx_resume Needed to start using the paging queue. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9194a339034f1927b28fbc8a5cff50b117142945 Author: Christian König Date: Thu Oct 4 16:22:41 2018 +0200 drm/amdgpu: add basics for SDMA page queue support Just the common helper and a new ring in the SDMA instance. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 51235849d99556fe9929735625d134b3b6acbf4a Author: Christian König Date: Wed Sep 26 19:56:41 2018 +0200 drm/amdgpu: fix sdma v4 startup under SRIOV Under SRIOV we were enabling the ring buffer before it was initialized. Signed-off-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 105f20706fb5df8b763e3d9a9bfbfa73386391c3 Author: Thomas Zimmermann Date: Tue Oct 16 10:04:09 2018 +0200 drm/ttm: Provide ttm_bo_global_{init/release}() for struct ttm_bo_global So far, struct ttm_bo_global_ref was the only way of initializing a struct ttm_bo_global. Providing separate initializer and release functions for struct ttm_bo_global gives drivers the option of implementing their own init and release callbacks for drm_global_references of type DRM_GLOBAL_TTM_BO. The original functions for initializing and releasing via struct ttm_bo_global_ref are wrappers around the new interfaces. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e55a5c9b5f5b80275a38293ac0fd38336dd2efdf Author: Thomas Zimmermann Date: Tue Oct 16 10:04:08 2018 +0200 drm/ttm: Rename ttm_bo_global_{init,release}() to ttm_bo_global_ref_{,}() The functions ttm_bo_global_init() and ttm_bo_global_release() do not receive an argument of type struct ttm_bo_global. Both take a struct drm_global_reference that contains points to a struct ttm_bo_global_ref. Renaming them reflects this. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d76e393f4cef8151c0a2178b6abeacecb9da4875 Author: SivapiriyanKumarasamy Date: Tue Oct 2 08:44:04 2018 -0400 drm/amd/display: Fix incorrect end slope of EETF Force the E2 to dc_fixpt_one when E1 exceeds that value. This is the correct thing to do to avoid corruption. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit fa44604cca2a653ca66f344062db729c8167434b Author: Bhawanpreet Lakha Date: Thu Oct 4 12:13:53 2018 -0400 drm/amd/display: rename cstate_pstate_watermarks_st1 cstate_pstate_watermarks_st1 -> cstate_pstate_watermarks_st Signed-off-by: vikrant mhaske Signed-off-by: Bhawanpreet Lakha Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9f4f9fddc00c1aae7ec7abe0ddfddea78a9be7ce Author: Bhawanpreet Lakha Date: Thu Oct 4 12:11:28 2018 -0400 drm/amd/display: explicit uint64_t casting explicitly cast uint64_t in div64_u64_rem() Signed-off-by: vikrant mhaske Signed-off-by: Bhawanpreet Lakha Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 649e34acb4c902e074ec186c7d720810c5400bad Author: SivapiriyanKumarasamy Date: Mon Oct 1 14:45:05 2018 -0400 drm/amd/display: dc 3.2.02 Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ea2e8d923e2bcab51bbb3fcbdb96092d8d40270d Author: Dmytro Laktyushkin Date: Fri Sep 28 08:42:52 2018 -0400 drm/amd/display: add dccg block This adds the hw block as well as hooks up dppclk dto programming Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 84e7fc05a92700297f1de945251fa3b14349532c Author: Dmytro Laktyushkin Date: Fri Sep 28 07:46:42 2018 -0400 drm/amd/display: rename dccg to clk_mgr In preparation for adding the actual dccg block since the current implementation of dccg is mor eof a clock manager than a hw block Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 98e90a34ccdcc7550c9b9bdce2f342cd4df95f1f Author: Fatemeh Darbehani Date: Thu Sep 27 17:06:15 2018 -0400 drm/amd/display: Retiring set_display_requirements in dm_pp_smu.h - part2 [Why] In DCN we want direct DAL to SMU calls, with as little as possible interference by pplib. The reason for each pp_smu interface mapping to 1 SMU message is so we can have the sequencing of different SMU message in dal and shared across different OS. This will also simplify debugging as DAL owns this interaction and there's no confusion about division of ownership. [How] Part 2: Separate set_min_deep_sleep_dcfclk message from the SMU messages that are sent as part of dm_pp_apply_clock_for_voltage_request. Directly notify min dcfclk to smu Signed-off-by: Fatemeh Darbehani Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 247d167e578c3e02c7b3f8546f11443042f12f93 Author: Fatemeh Darbehani Date: Wed Sep 26 19:12:26 2018 -0400 drm/amd/display: Retiring set_display_requirements in dm_pp_smu.h - part1 [Why] In DCN we want direct DAL to SMU calls, with as little as possible interference by pplib. The reason for each pp_smu interface mapping to 1 SMU message is so we can have the sequencing of different SMU message in dal and shared across different OS. This will also simplify debugging as DAL owns this interaction and there's no confusion about division of ownership. [How] Part 1: Separate set_min_deep_Sleep_dcfclk message from the SMU messages that are sent as part of dcn10_pplib_apply_display_requirements. Notify deep sleep dcfclk to smu directly Signed-off-by: Fatemeh Darbehani Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9ea59d5ab7b09568743c53e5f7204c0ecd5749dc Author: Eric Bernstein Date: Tue Sep 25 15:56:41 2018 -0400 drm/amd/display: Add link encoder dp_ycbcr420_supported feature flag [Why] Need separate feature flag for DP 4:2:0 support, since existing flag is used for HDMI [How] Added dp_ycbcr420_supported to struct encoder_feature_support Signed-off-by: Eric Bernstein Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e2bf20073e4d32c78d4007b8aecb4a61b8418797 Author: Eric Yang Date: Wed Sep 26 15:52:19 2018 -0400 drm/amd/display: fix report display count logic [Why] Previous logic to update display count in commit_planes_do_stream_update doesn't cover all cases. [How] Update display count as part of clock updates. Count virtual stream as active to work around headless situation. Signed-off-by: Eric Yang Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 560a77f5f4019518ec14020f140e38141aeeb661 Author: Nevenko Stupar Date: Tue Sep 25 18:18:33 2018 -0400 drm/amd/display: expose hwseq functions and add registers Make these functions non static and define registers for future use is_lower_pipe_tree_visible(); is_upper_pipe_tree_visible(); is_pipe_tree_visible(); dcn10_program_pte_vm(); set_hdr_multiplier(); update_dchubp_dpp() find_top_pipe_for_stream() Signed-off-by: Nevenko Stupar Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ce8a805ae1768be16c62a541ce1b2d23e7b99124 Author: David Francis Date: Fri Sep 21 14:36:17 2018 -0400 drm/amd/display: initialize dc_transfer_func->ctx [Why] dc_transfer_func structs were being passed around with a null pointer, waiting for unsuspecting programmers to dereference it. [How] Initialize it Signed-off-by: David Francis Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e1e8a020c6b88931d541ccd44043285ab93324d3 Author: SivapiriyanKumarasamy Date: Tue Sep 11 17:48:07 2018 -0400 drm/amd/display: Add support for Freesync 2 HDR and Content to Display Mapping [Why] Freesync 2 HDR and support for HDR content outside the range of the HDR display require implementation on Dal 3 to better match Dal2. [How] Add support for Freesync HDR and mapping of source content to display ranges for better representation of HDR content. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4c5e8b54152795581a67bea94dcfe1393a955013 Author: Dmytro Laktyushkin Date: Mon Sep 24 15:28:00 2018 -0400 drm/amd/display: split dccg clock manager into asic folders Currently dccg contains code related to every dcn revision in a single file. This change splits out the dcn parts of code into correct folders Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4244381cd153ced27c724a893a1480ddb342280a Author: Dmytro Laktyushkin Date: Tue Sep 18 15:37:36 2018 -0400 drm/amd/display: clean up base dccg struct Move things not accessed outside dccg block into dce specific struct Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit de801062bf2c4216c1884d3707ff3f1f3533c4d9 Author: Harmanprit Tatla Date: Mon Sep 24 16:46:38 2018 -0400 drm/amd/display: Freesync does not engage on some displays [Why] Current render margin time is not sufficient to compute exit frame time for most monitors. [How] Declared render margin in FPS to compute a exit frame rate that is 4 FPS above the minimum FPS required to engage FreeSync. Also did code clean-up to remove redundancies. Signed-off-by: Harmanprit Tatla Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9566b67586fb1d96c36207fd975087d68296755c Author: Dmytro Laktyushkin Date: Tue Sep 18 15:00:49 2018 -0400 drm/amd/display: remove safe_to_lower flag from dc, use 2 functions instead This is done to keep things more readable, avoids a true/false flag in dc interface layer. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 24f7dd7ea98dc54fa45a0dd10c7a472e00ca01d4 Author: Dmytro Laktyushkin Date: Thu Sep 13 17:42:14 2018 -0400 drm/amd/display: move pplib/smu notification to dccg block This is done to clear up the clock programming sequence since the only time we need to notify pplib is after clock update. This also renames the clk block to dccg, at the moment this block contains both clock management and dccg functionality. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 72942b3de8dadf92095cd14ca1aeb92c54280799 Author: Dmytro Laktyushkin Date: Fri Sep 14 15:32:33 2018 -0400 drm/amd/display: handle max_vstartup larger than vblank_end When vstartup is larger than vblank end we need to set v_fp2 to allow for this early start Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 09dea6bfb1af22925cd7c79c040a53f7191b44c0 Author: Fatemeh Darbehani Date: Mon Sep 24 15:50:37 2018 -0400 drm/amd/display: dc 3.2.01 Signed-off-by: Fatemeh Darbehani Reviewed-by: Steven Chiu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c3bce35c662b8dfd91e52efaf463df41023b0852 Author: Frank.Min Date: Tue Oct 2 15:02:09 2018 +0800 drm/amdgpu: fix sdma doorbell comments typo Reviewed-by: Alex Deucher Signed-off-by: Frank.Min Signed-off-by: Alex Deucher commit 657f600397927c302e11c32fa2c162bbc7ef75ed Author: Gustavo A. R. Silva Date: Fri Oct 12 18:12:36 2018 +0200 drm/radeon/r300: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced "Pass through." with "Fall through.", which is what GCC is expecting to find. Addresses-Coverity-ID: 114734 ("Missing break in switch") Addresses-Coverity-ID: 114735 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit fa2549800c84aecb7a9559cdb3978865d1d50513 Author: Gustavo A. R. Silva Date: Fri Oct 12 18:06:55 2018 +0200 drm/radeon/r420: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357317 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 6dfeb11a4b48e4994ac9e22eef5720f17d1f3502 Author: zhong jiang Date: Tue Sep 18 23:35:32 2018 +0800 drm/amdkfd: Use kmemdup instead of duplicating its function kmemdup has implemented the function that kmalloc() + memcpy(). We prefer to kmemdup rather than code opened implementation. Signed-off-by: zhong jiang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4202dd2cb2d8443980ba70a455726ff7fc69bcd8 Author: Frank Rowand Date: Sun Oct 14 20:22:19 2018 -0700 of: Documentation: remove unmaintained todo file The todo.txt file was created by a previous maintainer and has never been updated by the current OPEN FIRMWARE AND FLATTENED DEVICE TREE maintainers. Remove the out of date file. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring commit fb14ada11d62fb849fc357a25ef8016ba438ba10 Author: Florian Fainelli Date: Thu Sep 27 12:27:11 2018 -0700 soc: bcm: brcmstb: Fix re-entry point with a THUMB2_KERNEL When the kernel is built with CONFIG_THUMB2_KERNEL we would set the kernel's resume entry point to be a function that is already built as Thumb-2 code while the boot agent doing the resume is in ARM mode, so this does not work. There is a header label defined: cpu_resume_arm which we can use to do the switching for us. Fixes: 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)") Signed-off-by: Florian Fainelli commit ca3a6e705cad10662827093d5426abe078861793 Author: Rafał Miłecki Date: Thu Sep 20 13:39:28 2018 +0200 ARM: dts: BCM53573: Relicense SoC file to the GPL 2.0+ / MIT This matches licensing used by most of BCM5301X files and is preferred as: 1) GPL 2.0+ makes it clearly compatible with Linux kernel 2) MIT is also permissive but preferred over ISC This file has been developed by me & once modified by Rob dropping a single leading zero in an UART address. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Signed-off-by: Florian Fainelli commit ae269963f99065ab136567f7f2f7c6db3ec01049 Author: Florian Fainelli Date: Thu Sep 20 11:51:27 2018 -0700 ARM: dts: BCM63xx: Enable SATA AHCI and PHY for BCM963138DVT The Broadcom BCM963138DVT board has an eSATA port which is fully functional, turn on the AHCI controller and the companion SATA PHY. Signed-off-by: Florian Fainelli commit 2af764dfb5eec71c4d3df81498c171cea917ffe4 Author: Florian Fainelli Date: Fri Mar 20 16:30:21 2015 -0700 ARM: dts: BCM63xx: enable SATA PHY and AHCI controller Add Device Tree entries for the Broadcom AHCI and SATA PHY controller found on BCM63138 SoCs Signed-off-by: Florian Fainelli commit 1c9001b4f69a37820862286b3bbcdde152a52dcf Author: Rafał Miłecki Date: Thu Sep 20 13:37:47 2018 +0200 ARM: dts: BCM53573: Relicense Tenda AC9 file to the GPL 2.0+ / MIT This matches licensing used by most of BCM5301X files and is preferred as: 1) GPL 2.0+ makes it clearly compatible with Linux kernel 2) MIT is also permissive but preferred over ISC This file was fully developed by me. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit d10967344375026ca8762b6080dec2585d895906 Author: Rafał Miłecki Date: Thu Sep 20 13:20:19 2018 +0200 ARM: dts: BCM5301X: Relicense BCM47094 file to the GPL 2.0+ / MIT This matches licensing used by other BCM5301X files and is preferred as: 1) GPL 2.0+ makes it clearly compatible with Linux kernel 2) MIT is also permissive but preferred over ISC This file has been developed by me & once modified by Vivek. Signed-off-by: Rafał Miłecki Acked-by: Vivek Unune Signed-off-by: Florian Fainelli commit 26ff86f7794b9466481ccf29ac79925d327f106d Author: Rafał Miłecki Date: Thu Sep 20 13:18:47 2018 +0200 ARM: dts: BCM5301X: Relicense BCM47081/BCM4709 files to the GPL 2.0+ / MIT This matches licensing used by other BCM5301X files and is preferred as: 1) GPL 2.0+ makes it clearly compatible with Linux kernel 2) MIT is also permissive but preferred over ISC Both files were fully developed by me. Commits touching them were signed by Florian and Hauke due to submitting process only. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit b3a428b4b18d495a06f39515568850f8db4c98ea Author: Hassan Naveed Date: Mon Oct 29 18:27:41 2018 -0700 MIPS: Enable IOREMAP_PROT config option for MIPS cpus Allows the users of ptrace to access memory mapped by the ptraced process using the same cache coherency attributes as the original process. For example while using gdb with ioremap_prot() incorporated, both gdb and the process being traced will have same cache coherency attributes. Signed-off-by: Hassan Naveed Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20955/ Cc: commit 67769857f05a3b6af79c990e53aa47f4c2b4a000 Author: Yangtao Li Date: Mon Nov 5 09:50:49 2018 -0500 MIPS: math-emu: Change to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20988/ Cc: ralf@linux-mips.org Cc: jhogan@kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org commit f09c296ebf407f98f4ca70892e612b54484bf663 Author: Yangtao Li Date: Thu Nov 1 11:55:08 2018 -0400 tomoyo: fix small typo Signed-off-by: Yangtao Li Acked-by: Tetsuo Handa Signed-off-by: James Morris commit 4d9ebbe2b061a9c25e12ba8539ba172533132eb6 Author: Yangtao Li Date: Sat Nov 3 22:27:41 2018 -0400 cgroup: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Tejun Heo commit b7a1da2193e635373a80238137720e86e8ff4119 Author: Takeshi Kihara Date: Sun Oct 21 06:30:27 2018 +0900 arm64: dts: renesas: r8a77990: Add all HSCIF nodes This patch adds the device nodes for all HSCIF serial ports to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman commit a7f7090f4433dd65a502bbcaf0ee0923071761eb Author: Imre Deak Date: Mon Nov 5 16:54:28 2018 +0200 drm/vgem: Fix typo in driver feature flags Fix typo in struct field initializer. Fixes: 3a6eb795641c ("drm/vgem: create a render node for vgem") Cc: Emil Velikov Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Imre Deak Reviewed-by: Emil Velikov Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20181105145428.5590-1-imre.deak@intel.com commit cee98cefbf6d1d651e6bc4fbff43e276f7fbde5f Author: Jagan Teki Date: Mon Nov 5 13:18:42 2018 +0530 arm64: allwinner: h6: Add OrangePi Lite2 initial support OrangePi Lite2 is Allwinner H6 based open-source SBC, which support: - Allwinner H6 Quad-core 64-bit ARM Cortex-A53 - GPU Mali-T720 - 1GB LPDDR3 RAM - AXP805 PMIC - AP6356S Wifi/BT - USB 2.0, USB 3.0 Host, OTG - HDMI port - 5V/2A DC power supply Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit f0c083b88aa74e273c1c708ccc2d7ff0820cc319 Author: Jagan Teki Date: Mon Nov 5 13:18:41 2018 +0530 arm64: allwinner: h6: Add common orangepi nodes into dtsi Based on the information from hardware schematics and orangepi vendor orangepi H6 boards, One Plus and Lite2 shares common nodes like axp805, uart, mmc0 etc. The common differences between them is - One Plus, has Ethernet - Lite2, has Wifi, USB3, CSI port. So, add common orangepi nodes into sun50i-h6-orangepi.dtsi so-that it case use on respective orangepi h6 board dts files. Cc: zhaoyifan Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit cb202e7c5895437fbabd0e575cf2530c65763dde Author: Sergei Shtylyov Date: Mon Sep 24 23:13:41 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: add TMU support Describe TMUs in the R8A779{7|8}0 device trees. Based on the original (and large) patches by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 56629fcba94c698d8c5be3413981506479566869 Author: Takeshi Kihara Date: Mon Oct 15 11:59:24 2018 +0200 arm64: dts: renesas: ebisu: Enable Audio This patch enables Audio for the Ebisu board on R8A77990 SoC. Signed-off-by: Takeshi Kihara [simon: rebased] Signed-off-by: Simon Horman commit 3b46fa57e350dc4fb72b8e02feb7fb218a3640d1 Author: Yoshihiro Kaneko Date: Mon Oct 15 11:59:23 2018 +0200 arm64: dts: renesas: r8a77990: Add Audio-DMAC and Sound device nodes This patch adds Audio-DMAC0 device node and Sound device node for the R8A77990 SoC. Based on work by Takeshi Kihara and Hai Nguyen Pham. Signed-off-by: Yoshihiro Kaneko [simon: dropped include update, which is already present] Signed-off-by: Simon Horman commit 5c6479d9b25b40001e814003f62a93485f9ff82f Author: Yoshihiro Shimoda Date: Wed Oct 24 17:32:33 2018 +0900 arm64: dts: renesas: r8a7799{0|5}: add/enable USB2.0 peripheral This patch adds/enables USB2.0 peripheral for R-Car [DE]3 boards. R-Car E3 Ebisu board connects the ID pin to the SoC, so this adds a group "usb0_id" into usb0_pins node. Also, to use SW15 pin 3 side, this patch adds vbus0_usb2 node on r8a77990-ebisu.dts. R-Car D3 Draak board doesn't connect the ID pin, so this adds "renesas,no-otg-pins" property into usb2_phy0 node. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit 396aadeb951dfb11c075ac6ed18178fa8513e746 Author: Yoshihiro Shimoda Date: Mon Oct 22 15:47:29 2018 +0900 arm64: dts: renesas: salvator-common: add companion property in usb3_peri0 This patch adds a property "companion" with xhci0 phandle to the usb3_peri0 node in salvator-common.dtsi. About the detail of this property for renesas_usb3 udc driver, please refer to the commit 39facfa01c9f ("usb: gadget: udc: renesas_usb3: Add register of usb role switch"). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit 430212752cd71fe8ed10a6c1cd9e6f8fe7fda222 Author: Magnus Damm Date: Mon Oct 22 02:15:03 2018 +0900 arm64: dts: renesas: r8a77990: Connect R-Car E3 AVB to IPMMU Hook up the R-Car E3 AVB device to IPMMU-DS0 16 as described in the data sheet. Signed-off-by: Magnus Damm Tested-by: Simon Horman Signed-off-by: Simon Horman commit 7ffbcb232c7b8f90dbb40338ce084b65c65fb9fc Author: Magnus Damm Date: Mon Oct 22 02:14:54 2018 +0900 arm64: dts: renesas: r8a77980: Connect R-Car V3H AVB to IPMMU Hook up the R-Car V3H AVB device to IPMMU-DS1 33 as described in the data sheet. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman commit ea57402f3671d877f12616581bca4c4923bbfd10 Author: Magnus Damm Date: Mon Oct 22 02:14:44 2018 +0900 arm64: dts: renesas: r8a77965: Connect R-Car M3-N AVB to IPMMU Hook up the R-Car M3-N AVB device to IPMMU-DS0 16 as described in the data sheet. Signed-off-by: Magnus Damm Tested-by: Simon Horman Signed-off-by: Simon Horman commit 8dae1d2bbc128201bde30eee41940fab4c4f18c0 Author: Yoshihiro Shimoda Date: Mon Oct 22 15:47:08 2018 +0900 arm64: dts: renesas: r8a77990: add/enable USB3.0 peripheral device node This patch adds/enables USB3.0 peripheral device node for r8a77990 ebisu board. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman commit 34b2f8da9d41b640a8331e4b8c3bcd9ba2c2b5e6 Author: Imre Deak Date: Wed Oct 31 22:02:20 2018 +0200 drm/i915/gen9_lp: Fix DMC DC counter debugfs output On GEN9 LP (BXT/GLK) DC6 is not supported, so don't print the counter on those platforms. So far we did this on GLK too. While at it warn if we forgot to adjust the printout properly for a new platform. (Rodrigo) Testcase: igt/pm_dc/dc6-dpms Cc: Jyoti Yadav Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181031200220.11608-1-imre.deak@intel.com commit c49d3f3fa686dd03112de4c97f652dc67e4da7af Author: Rasmus Villemoes Date: Wed Oct 24 11:48:20 2018 +0100 staging: greybus: loopback.c: remove unused lists gb_loopback_device::list_op_async is never used except for the LIST_INIT. The ::list field appears to have a few more uses, but on closer inspection the linked list of struct gb_loopbacks that it heads is never used for anything, so there's no reason to maintain it, much less to keep it sorted. Reviewed-by: Bryan O'Donoghue Signed-off-by: Rasmus Villemoes Signed-off-by: Greg Kroah-Hartman commit e9c892465583c8f42d61fafe30970d36580925df Author: Gao Xiang Date: Sat Nov 3 17:23:56 2018 +0800 staging: erofs: remove the redundant d_rehash() for the root dentry There is actually no need at all to d_rehash() for the root dentry as Al pointed out, fix it. Reported-by: Al Viro Cc: Al Viro Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman commit 3d49df58ab14e44bb622d467bc3ac02befe6aef4 Author: Colin Ian King Date: Sat Oct 27 15:27:19 2018 +0100 staging: rtl8723bs: fix typo in function name rtw_sctx_chk_waring_status Trivial fix to typo in function name, rename it to rtw_sctx_chk_warning_status. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit f549a60b8c5e1ef82fb67580ec8b7c317e36114f Author: Colin Ian King Date: Sat Oct 27 15:26:18 2018 +0100 staging: rtl8188eu: fix typo in function name rtw_sctx_chk_waring_status Trivial fix to typo in function name, rename it to rtw_sctx_chk_warning_status. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman commit f3145cb39231772e6a0c276c56f135d22ac7a549 Author: Marco Wang Date: Tue Oct 16 20:37:11 2018 +0800 Staging: comedi: dt9812: fixed a typo in comment. Fixed a typo in comment. Signed-off-by: Marco Wang Signed-off-by: Greg Kroah-Hartman commit 057b0a8100976d0327743d8877324933df1ad398 Author: Ajay Singh Date: Thu Nov 1 16:45:26 2018 +0000 staging: wilc1000: remove coreconfigurator.h file Remove the coreconfigurator header file, as its source file is deleted after code refactor. Moved the required structure and prototypes to hostinterface header. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 1116468bf515ad7a44a40371c5810e7fdff45714 Author: Ajay Singh Date: Thu Nov 1 16:45:23 2018 +0000 staging: wilc1000: remove coreconfigurator.c file After use of framework API's most of the redundant functions are removed in coreconfigurator.c file. Now moved left over function to host_interface file and deleted the coreconfigurator.c file. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit d6a75ad44f08820148cde04c370a77caa509ad69 Author: Ajay Singh Date: Thu Nov 1 16:45:20 2018 +0000 staging: wilc1000: remove unnecessary MAX_STRING_LEN macro Cleanup patch to remove the use of unnecessary 'MAX_STRING_LEN' macro. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit bfaf36a4082a89c53d7632af264656ba2fbb2be9 Author: Ajay Singh Date: Thu Nov 1 16:45:17 2018 +0000 staging: wilc1000: refactor wilc_parse_assoc_resp_info() Refactor wilc_parse_assoc_resp_info() function by removing the use of get_asoc_status() API. For parsing assoc response use the struct and avoided the use of offset macros to extract the ies information. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 64f656cbd026b362a728057a7ef6276b90d67eb4 Author: Ajay Singh Date: Thu Nov 1 16:45:14 2018 +0000 staging: wilc1000: avoid line over 80 chars in wilc_parse_network_info() Use shorter name for 'network_info' variable to avoid line over 80 chars issue. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit e23c009f728c338e946797d9ff59e61175e34203 Author: Ajay Singh Date: Thu Nov 1 16:45:11 2018 +0000 staging: wilc1000: refactor get_bssid() function Refactor get_bssid() by making use of 'ieee80211_mgmt' struct. Instead of passing the memory offset now using structure element to fetch the bssid information. Returning the pointer to bssid from get_bssid() instead of filing the input argument. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 846b146c5ebe1b0a2665f62cbe434d4637693c33 Author: Ajay Singh Date: Thu Nov 1 16:45:08 2018 +0000 staging: wilc1000: remove unused code in coreconfigurator After refactoring of wilc_parse_network_info(), some of the functions and macro are not required, so removed the unused code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 7a62f643c0e816fd444f0d951bb008c89bbc36cf Author: Ajay Singh Date: Thu Nov 1 16:45:05 2018 +0000 staging: wilc1000: refactor wilc_parse_network_info() using kernel framework api's Refactor wilc_parse_network_info() by making use of cfg80211.h provided API. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman commit 97c78f4d07e5033717c08b650462b3087ecfe8e8 Author: Philipp Zabel Date: Fri Feb 24 18:38:08 2017 +0100 drm/imx: ipuv3-plane: add IDMAC timeout warning ipu_plane_disable should never be called while the plane IDMAC channel is active. The busy wait is just a safety net that should never time out. Signed-off-by: Philipp Zabel commit 93b662d329d60ede951aa4cb49a3fc0a111b7223 Author: Imre Deak Date: Fri Nov 2 21:26:56 2018 +0200 drm/i915/icl: Configure MG DP mode for HDMI ports too The MG DP mode needs to be configured for Type C static/fixed/legacy HDMI ports too, the same way as it's configured for Type C static/fixed/legacy, fix this. Bspec: 4232, 21735 Cc: Vandita Kulkarni Cc: Paulo Zanoni Cc: Maarten Lankhorst Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Tested-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181102192656.4472-3-imre.deak@intel.com commit cb9ff519439bb79b4f917008f26e5000076d48a3 Author: Imre Deak Date: Fri Nov 2 21:26:55 2018 +0200 drm/i915/icl: Configure MG PHY gating for HDMI ports too The MG PHY clock gating needs to be configured for Type C static/fixed/legacy HDMI ports the same way it's configured for Type C static/fixed/legacy and aternate mode DP ports, fix this. Bspec: 4232, 21735 Cc: Vandita Kulkarni Cc: Paulo Zanoni Cc: Maarten Lankhorst Cc: Manasi Navare Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Tested-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181102192656.4472-2-imre.deak@intel.com commit 732e6fc7a41cf0bd0595eb73f28ba5af9fb4c28e Author: Ioannis Valasakis Date: Thu Nov 1 14:41:54 2018 +0000 staging: octeon: Fix style issues Fix mismatch parentheses and style issues. Reported by checkpatch. Signed-off-by: Ioannis Valasakis Signed-off-by: Greg Kroah-Hartman commit 74f93cf9a8112651c2924be757fb578693ba3105 Author: Michelle Darcy Date: Thu Nov 1 12:19:23 2018 -0700 staging: davinci_vpfe: Align brackets to open parentheses Fixes checkpatch.pl CHECK: Alignment should match open parenthesis Signed-off-by: Michelle Darcy Signed-off-by: Greg Kroah-Hartman commit dff94010b3ac20be7d74b2a965efeb5da1d2287c Author: Shayenne da Luz Moura Date: Wed Oct 31 12:03:26 2018 -0300 staging: vboxvideo: Remove unnecessary parentheses Remove unneeded parentheses around the arguments of ||. This reduces clutter and code behave in the same way. Change suggested by checkpatch.pl. vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < crtc->x' Signed-off-by: Shayenne da Luz Moura Acked-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit 459b678571e9e0259eb230e5f0b773fc78b974a6 Author: Maya Nakamura Date: Wed Oct 31 14:11:20 2018 -0700 staging: rtlwifi: Keep expressions on one line Edit two statements to keep expressions on one line--one from Julia's feedback. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit ec5043bf85ea58855352a4c0ce192287de6d8680 Author: Maya Nakamura Date: Wed Oct 31 14:09:15 2018 -0700 staging: rtlwifi: Remove unnecessary conditions Remove conditions with no effect. Issues found by Coccinelle's semantic patch results for cond_no_effect.cocci. Eliminate checkpatch result, a line should not end with a parenthesis. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 95a32556da1aba1eca175e3216868d871edb31da Author: Maya Nakamura Date: Wed Oct 31 21:04:48 2018 -0700 staging: rtlwifi: Replace 1 with true and remove comparison for bool Replace 1 with true for bool assignments and remove a comparison of a bool with 1. Issues found by Coccinelle's semantic patch results for boolinit.cocci. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 815b02e3c05dcfae759a96903025beb5dab85f97 Author: Philipp Zabel Date: Tue Sep 18 11:34:21 2018 +0200 gpu: ipu-v3: image-convert: allow three rows or columns If width or height are in the [2049, 3072] range, allow to use just three tiles in this dimension, instead of four. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit f1ef14f30f058f063dfdab32d1e4b9536294e0ed Author: Philipp Zabel Date: Tue Sep 18 11:34:20 2018 +0200 gpu: ipu-v3: image-convert: disable double buffering if necessary Double-buffering only works if tile sizes are the same and the resizing coefficient does not change between tiles, even for non-planar formats. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit e46279f097d44581d9474dd51963657b9d9feb6f Author: Philipp Zabel Date: Tue Sep 18 11:34:19 2018 +0200 gpu: ipu-v3: image-convert: add some ASCII art to the exposition Visualize the scaling and rotation pipeline with some ASCII art diagrams. Remove the FIXME comment about missing seam prevention. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam commit d966e23d61a2c3769ed0c0a3c6e20b300a313317 Author: Philipp Zabel Date: Tue Sep 18 11:34:18 2018 +0200 gpu: ipu-v3: image-convert: fix bytesperline adjustment For planar formats, bytesperline does not depend on BPP. It must always be larger than width and aligned to tile width alignment restrictions. The input bytesperline to ipu_image_convert_adjust() may be uninitialized, so don't rely on input bytesperline as the minimum value for clamp_align(). Use 2 << w_align as the minimum instead. Signed-off-by: Philipp Zabel [slongerbeam@gmail.com: clamp input bytesperline] Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel commit ff652fcf84f7a0977bbad4eab976f7813665fbc8 Author: Philipp Zabel Date: Tue Sep 18 11:34:17 2018 +0200 gpu: ipu-v3: image-convert: relax alignment restrictions For the planar but U/V-packed formats NV12 and NV16, 8 pixel width alignment is good enough to fulfill the 8 byte stride requirement. If we allow the input 8-pixel DMA bursts to overshoot the end of the line, the only input alignment restrictions are dictated by the pixel format and 8-byte aligned line start address. Since different tile sizes are allowed, the output tile with / height alignment doesn't need to be multiplied by number of columns / rows. Signed-off-by: Philipp Zabel [slongerbeam@gmail.com: Bring in the fixes to format width and height alignment restrictions from imx-media-mem2mem.c.] Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel commit a3f42419e2a72b174a7d993debea85df7a56bd4b Author: Philipp Zabel Date: Tue Sep 18 11:34:16 2018 +0200 gpu: ipu-v3: image-convert: fix debug output for varying tile sizes Since tile dimensions now vary between tiles, add debug output for each tile's position and dimensions. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 64fbae5e3e2e1b60ae420810216220f59fcde78d Author: Philipp Zabel Date: Tue Sep 18 11:34:15 2018 +0200 gpu: ipu-v3: image-convert: select optimal seam positions Select seam positions that minimize distortions during seam hiding while satifying input and output IDMAC, rotator, and image format constraints. This code looks for aligned output seam positions that minimize the difference between the fractional corresponding ideal input positions and the input positions rounded to alignment requirements. Since now tiles can be sized differently, alignment restrictions of the complete image can be relaxed in the next step. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 76e77bf543c57be14c3daac40f6fb7578ac90992 Author: Philipp Zabel Date: Tue Sep 18 11:34:14 2018 +0200 gpu: ipu-v3: image-convert: move tile alignment helpers Move tile_width_align and tile_height_align up so they can be used by the tile edge position calculation code. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 26ddd032a82bf66868271350f20453e865a90d5f Author: Philipp Zabel Date: Tue Sep 18 11:34:13 2018 +0200 gpu: ipu-v3: image-convert: calculate tile dimensions and offsets outside fill_image This will allow to calculate seam positions after initializing the ipu_image base structure but before calculating tile dimensions. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 571dd82c508da882a4988fe28908bce652525f72 Author: Philipp Zabel Date: Tue Sep 18 11:34:12 2018 +0200 gpu: ipu-v3: image-convert: store tile top/left position Store tile top/left position in pixels in the tile structure. This will allow overlapping tiles with different sizes later. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 0537db801bb01b3bf8281d254f740fd8856ad15c Author: Philipp Zabel Date: Tue Sep 18 11:34:11 2018 +0200 gpu: ipu-v3: image-convert: reconfigure IC per tile For differently sized tiles or if the resizing coefficients change, we have to stop, reconfigure, and restart the IC between tiles. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit 70b9b6b3bcb216926d8dcec27f1579abffd047c0 Author: Philipp Zabel Date: Tue Sep 18 11:34:10 2018 +0200 gpu: ipu-v3: image-convert: calculate per-tile resize coefficients Slightly modifying resize coefficients per-tile allows to completely hide the seams between tiles and to sample the correct input pixels at the bottom and right edges of the image. Tiling requires a bilinear interpolator reset at each tile start, which causes the image to be slightly shifted if the starting pixel should not have been sampled from an integer pixel position in the source image according to the full image resizing ratio. To work around this hardware limitation, calculate per-tile resizing coefficients that make sure that the correct input pixels are sampled at the tile end. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit dd65d2a93b0c215a8e6fa58102952dacc6ceac37 Author: Philipp Zabel Date: Tue Sep 18 11:34:09 2018 +0200 gpu: ipu-v3: image-convert: prepare for per-tile configuration Let convert_start start from a given tile index, allocate intermediate tile with maximum tile size. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit c4e456583a46182fc11492206aed8995af66163b Author: Steve Longerbeam Date: Fri Sep 21 11:46:39 2018 -0700 gpu: ipu-v3: image-convert: Catch unaligned tile offsets Catch calculated tile offsets that are not 8-byte aligned as required by the IDMAC engine and return error in calc_tile_offsets(). Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit b288adad61054f77b08e14ca2f833f1617119547 Author: Steve Longerbeam Date: Wed Sep 19 16:20:43 2018 -0700 gpu: ipu-v3: image-convert: Remove need_abort flag The need_abort flag is not really needed anymore in __ipu_image_convert_abort(), remove it. No functional changes. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit aa60b261c636220fc1dd6b2783c1e28aeab34364 Author: Steve Longerbeam Date: Wed Sep 19 16:17:15 2018 -0700 gpu: ipu-v3: image-convert: Allow reentrancy into abort Allow reentrancy into ipu_image_convert_abort(), by moving re-init of ctx->aborted completion under the spin lock, and only if there is an active run, and complete all waiters do_bh(). Note: ipu_image_convert_unprepare() is still _not_ reentrant, and can't be made reentrant. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 920340ae1f6949c3c75f96253bb249efa8b80167 Author: Steve Longerbeam Date: Wed Sep 19 16:13:03 2018 -0700 gpu: ipu-v3: image-convert: Only wait for abort completion if active run Only wait for the ctx->aborted completion if there is an active run in progress, otherwise the wait will just timeout after 10 seconds. If there is no active run in progress, the done queue just needs to be emptied. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 819bec35c8c9706185498c9222bd244e0781ad35 Author: Steve Longerbeam Date: Wed Sep 19 16:07:18 2018 -0700 gpu: ipu-v3: image-convert: Prevent race between run and unprepare Prevent possible race by parallel threads between ipu_image_convert_run() and ipu_image_convert_unprepare(). This involves setting ctx->aborting to true unconditionally so that no new job runs can be queued during unprepare, and holding the ctx->aborting flag until the context is freed. Note that the "normal" ipu_image_convert_abort() case (e.g. not during context unprepare) should clear the ctx->aborting flag after aborting any active run and clearing the context's pending queue. This is because it should be possible to continue to use the conversion context and queue more runs after an abort. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit d0cbc93a0110a82ff9e01d3c21d5a2e2027b706f Author: Philipp Zabel Date: Tue Sep 18 11:34:08 2018 +0200 gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients For tiled scaling, we want to compute the scaling coefficients externally in such a way that the interpolation overshoots tile boundaries and samples up to the first pixel of the next tile. Prepare to override the resizing coefficients from the image conversion code. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam commit dec408fd23ae81338a55556cd570dacd6bf41046 Author: Steve Longerbeam Date: Sat Oct 6 14:45:48 2018 -0700 gpu: ipu-v3: Add chroma plane offset overrides to ipu_cpmem_set_image() Allow the caller of ipu_cpmem_set_image() to override the latters calculation of the chroma plane offsets, by adding override U/V plane offsets to 'struct ipu_image'. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 22ec08081956084687e0824ffd0ff4d768584143 Author: Steve Longerbeam Date: Tue Sep 18 11:34:07 2018 +0200 gpu: ipu-cpmem: add WARN_ON_ONCE() for unaligned dma buffers Add a WARN_ON_ONCE() if either the Y/packed buffer, or the U/V offsets, are not aligned on 8-byte boundaries. This will catch alignment bugs in DRM, V4L2. Signed-off-by: Steve Longerbeam Tested-by: Philipp Zabel Signed-off-by: Philipp Zabel commit fac8033fe3abbfd9b4404bf803e00a370277470a Author: Julia Lawall Date: Sat Oct 27 07:47:41 2018 +0200 drm/imx: imx-tve: constify clk_ops structure The clk_ops structure is only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Philipp Zabel commit 946485d0ede5bb29d3aad55bf7afd35cee1ef529 Author: Fabio Estevam Date: Fri Sep 28 16:13:25 2018 -0300 drm/imx: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Philipp Zabel commit 7d9df98be66fec64349f9f1c9d3e896293fe7b45 Author: Yangtao Li Date: Sat Nov 3 22:31:04 2018 -0400 clockevents: Remove unnecessary unlikely() WARN_ON() and WARN_ON_ONCE() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20181104023104.2572-1-tiny.windzz@gmail.com commit 6f44610c30c5f10a8ea06bd714015cc4d2e534f5 Author: Sergei Shtylyov Date: Fri Nov 2 22:25:54 2018 +0300 clk: renesas: r8a77970: Add RPC clocks On R-Car V3M (R8A77970), the RPC/RPCD2 clocks are output by the common divider. Describe them, as well as the RPC-IF module clock. Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven commit bac7473685b00e03b21413f41c1ae102aa3dc876 Author: Kim Bradley Date: Mon Oct 29 10:38:25 2018 +0000 Staging: rts5208: Capitalise preprocessor variable names Capitalise header preprocesser variable names (and all occurences) to remove checkpatch camelcase warnings. Signed-off-by: Kim Bradley Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman commit 086a76b9c90c3349787f903b0609106f29243858 Author: Kimberly Brown Date: Tue Oct 23 12:59:14 2018 -0400 staging: rtl8192u: Fix misspellings in comments - Style Fix two spelling mistakes in comments. 'informations' should be 'information', and 'imblance' should be 'imbalance'. Issues found by checkpatch. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: Kimberly Brown Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman commit 37f868344a1dd39a9ec7e95719a6f102887478e0 Author: Kimberly Brown Date: Tue Oct 23 12:57:39 2018 -0400 staging: rtl8192u: Fix misspelling in variable name - Style Fix the spelling mistake in variable name 'txhipower_threshhold'. 'threshhold' should be 'threshold'. Issue found by checkpatch. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: Kimberly Brown Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman commit 60348815e1d139263b2101eb35e91bbce559ee7c Author: Kimberly Brown Date: Tue Oct 23 12:56:01 2018 -0400 staging: rtl8192u: Fix misspelling in struct member name - Style Fix the spelling mistake in the name of struct member 'cmdpacket_frag_thresold'. 'thresold' should be 'threshold'. Issue found by checkpatch. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: Kimberly Brown Reviewed-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman commit 81b8226c5473bbaa66adaa9b8c65dd0775aac73a Author: Kimberly Brown Date: Mon Oct 29 18:36:08 2018 -0400 staging: rtl8723bs: core: remove unnecessary blank lines Remove unnecessary blank lines, including multiple blank lines, blank lines after opening braces, and blank lines before closing braces, from file core/rtw_ap.c. Issues found by checkpatch. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman commit de770acb079a6bd68aaa975b678d40acc488c559 Author: Zach Turner Date: Tue Oct 23 13:36:09 2018 -0600 staging: rtl8192e: Add SPDX-License-Identifier - Style Add SPDX-Licens-Identifier tag to the start of the file. This is a coding style change which should not impact the runtime code execution. Signed-off-by: Zach Turner Signed-off-by: Greg Kroah-Hartman commit a55e7eecb59df5bc337d6a75cc1d9534fdbea881 Author: Zach Turner Date: Tue Oct 23 12:16:11 2018 -0600 staging: rtl8192e: add braces to if statement - style Add braces on all arms of an if-else statement. Check found by checkpatch. Signed-off-by: Zach Turner Signed-off-by: Greg Kroah-Hartman commit bb1e67793f3ee42449f60c2288096da01199443e Author: Kim Bradley Date: Mon Oct 22 21:10:26 2018 +0100 Staging: rts5208: Add SPDX license tags Add SPDX license tags to remove checkpatch SPDX warnings. Signed-off-by: Kim Bradley Signed-off-by: Greg Kroah-Hartman commit dda4eaa8b6c3007c69174f59292f1f91e62fa3e3 Author: Kimberly Brown Date: Sun Oct 28 14:12:44 2018 -0400 staging: xgifb: vb_setmode: adjust descendant indentation to right Adjust descendant indentation so that it is placed substantially to the right. This change improves code readability and complies with the Linux kernel coding style. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman commit e00c51d0c07f171580fa2fb3e75b0e31c2b74bc4 Author: Kimberly Brown Date: Sun Oct 28 14:11:52 2018 -0400 staging: xgifb: vb_setmode: fix multiple line dereference Fix multiple line dereference by adding a new line and adjusting indentations. This change improves code readability. Issue found by checkpatch. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman commit c471d7cca8b809e59fc6aa3d4253d84e63201899 Author: Kimberly Brown Date: Wed Oct 24 00:56:53 2018 -0400 staging: mt7621-dma: Add braces around else branches Add braces around else branches in conditional statements that include branches with multiple statements. This style complies with the Linux kernel coding style and improves consistency and readability. Issues found by checkpatch. Signed-off-by: Kimberly Brown Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman commit 33593a96305377aebb4f6407c2294e257bd67582 Author: Maya Nakamura Date: Sat Oct 27 03:17:43 2018 -0700 staging: rtlwifi: Remove unused functions Remove the five functions that are not used from the source and header files. Issue found by Coccinelle's semantic patch results for returnvar.cocci. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit f400dc6a66fb2dfc4f5a826c2b1980c9b503223a Author: Maya Nakamura Date: Sat Oct 27 03:16:39 2018 -0700 staging: rtlwifi: Remove function that only returns zero Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only called to return zero, remove the unnecessary function and change the section that calls it. Issues found by Coccinelle's semantic patch results for returnvar.cocci and checkpatch.pl. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 948569b72a5daf62559df764f37d5dc39dc76ef7 Author: Maya Nakamura Date: Sat Oct 27 03:15:03 2018 -0700 staging: rtlwifi: Remove function that only returns the second argument Because the odm_signal_scale_mapping function is only called to return the second argument, remove the unnecessary function and change the statements that call it, including removing unneeded braces and adding a blank line. Note that removing casts (u8 to s32 and back to u8) will not lose information because the value converted should be between 0 and 100. Signed-off-by: Maya Nakamura Signed-off-by: Greg Kroah-Hartman commit 2c66f2a9efd9cdba235e9d41de544e23ccdb8700 Author: Bhanusree Pola Date: Tue Oct 23 16:27:26 2018 +0530 Staging: rtlwifi: Remove Unneeded funition halbtc_get_wifi_rssi() In the function halbtc_get_wifi_rssi: 1.if and else are functionally identical as they assign same value to variable 'undec_sm_pwdb'. 2.Variable 'undec_sm_pwdb' not required to just return a single value. 3.Function not needed to just return a value and so removed the function and assigned value rtlpriv->dm.undec_sm_pwdb where the function halbtc_get_wifi_rssi() is called. Signed-off-by: Bhanusree Pola Signed-off-by: Greg Kroah-Hartman commit cd27f56fce4fedc975663ecebb8166444a80b75c Author: Kimberly Brown Date: Thu Oct 25 20:04:55 2018 -0400 staging: gasket: use sizeof(*p) for memory allocation Use sizeof(*p) instead of sizeof(struct P) for memory allocation. This change complies with the Linux kernel coding style. It improves readability and decreases the opportunity for bugs if the pointer variable type is changed. Issue found by checkpatch. Signed-off-by: Kimberly Brown Acked-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman commit 3a6eb795641c0e140424a3e4f301188eb2fd6d63 Author: Emil Velikov Date: Fri Oct 26 13:06:47 2018 +0100 drm/vgem: create a render node for vgem VGEM doesn't do anything modeset specific, so in a way exposing a primary node is 'wrong'. At the same time, we extensively use if for creating dumb buffers, fences, prime fd <> handle imports/exports. To the point that we explicitly annotate the vgem fence ioctls as DRM_RENDER_ALLOW and have an IGT test which opens the render node. close(drm_open_driver_render(DRIVER_VGEM)) Better late than never, let's flip the switch. Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181026120647.7528-1-emil.l.velikov@gmail.com commit 507c93a22c84209469fb03238ccdc5da3c6417fc Author: Chris Brandt Date: Mon Oct 8 11:23:47 2018 -0500 clk: renesas: r7s9210: Add SDHI clocks Add SDHI clocks for RZ/A2 Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven commit f743f017b739e27601fec7d3eab29840c5e95b37 Author: Fabrizio Castro Date: Mon Oct 8 10:30:19 2018 +0100 pinctrl: sh-pfc: r8a77470: Add QSPI1 pin groups Add QSPI1 pin groups and function to the RZ/G1C (a.k.a. R8A77470) pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 610d662ac3d38ef0acad2c1128e6a9a547fd8c0f Author: Fabrizio Castro Date: Mon Oct 8 10:30:18 2018 +0100 pinctrl: sh-pfc: r8a77470: Add VIN pin groups Add VIN[01] pin groups and functions to the RZ/G1C (a.k.a. R8A77470) pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 5c9258bca9ace0a25614b635fc1c2836ee4d8c96 Author: Fabrizio Castro Date: Mon Oct 8 10:30:17 2018 +0100 pinctrl: sh-pfc: r8a77470: Add DU1 pin groups Add DU1 pin groups and function to the RZ/G1C (a.k.a. R8A77470) pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit 80ef7d09104424120c5a9e531f6c41ecb14b023c Author: Fabrizio Castro Date: Mon Oct 8 10:30:16 2018 +0100 pinctrl: sh-pfc: r8a77470: Add remaining I2C pin groups This patch adds I2C[0123] groups and functions to the RZ/G1C (a.k.a. R8A77470) pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven commit e926ae573b0f550de2b23883a1571cfa7ad7dff0 Author: Manish Narani Date: Thu Oct 25 11:36:58 2018 +0530 EDAC, synopsys: Add macro defines for ZynqMP DDRC Add macro defines for ZynqMP DDR controller. These macros will be used for ZynqMP ECC operations. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1540447621-22870-4-git-send-email-manish.narani@xilinx.com commit fb6a691a23ca4bcf10bbda603e22021776d51d56 Author: Manish Narani Date: Thu Oct 25 11:36:57 2018 +0530 dt: bindings: Document ZynqMP DDRC in Synopsys documentation Add information for ZynqMP DDRC which reports the single bit errors that are corrected and the double bit errors that are detected. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov Reviewed-by: Rob Herring CC: Mark Rutland CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mchehab@kernel.org CC: michal.simek@xilinx.com CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1540447621-22870-3-git-send-email-manish.narani@xilinx.com commit 84de0b493ff62993c4047dd15318cc23f83923d3 Author: Manish Narani Date: Thu Oct 25 11:36:56 2018 +0530 EDAC, synopsys: Add error handling for the of_device_get_match_data() result The function of_device_get_match_data() can return NULL in case of error. Add error handling for the same in the mc_probe() function. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1540447621-22870-2-git-send-email-manish.narani@xilinx.com commit 3d02a8975e321ef6219ec911742d741d2d73c89c Author: Manish Narani Date: Thu Oct 4 21:05:23 2018 +0530 EDAC, synopsys: Add platform specific structures for the DDR Controller Add platform specific structures so that different IP support can be added later using quirks. [ bp: fix function names. ] Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1538667328-9465-6-git-send-email-manish.narani@xilinx.com commit fa9f6b9e1cf9620def93c985d424289eedf61b34 Author: Manish Narani Date: Thu Oct 4 21:05:22 2018 +0530 EDAC, synopsys: Return void for functions always returning 0 The current driver has functions which are always returning 0 - make them return void instead. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1538667328-9465-5-git-send-email-manish.narani@xilinx.com commit 225af74d6312b2ab195426dbbe3fd2b8f40786fd Author: Manish Narani Date: Thu Oct 4 21:05:21 2018 +0530 EDAC, synopsys: Correct comments Spellcheck and improve/correct comments. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: michal.simek@xilinx.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1538667328-9465-4-git-send-email-manish.narani@xilinx.com commit bb894bc46ed03baad5d53ea8e0b0eab4eba3002e Author: Manish Narani Date: Thu Oct 4 21:05:20 2018 +0530 EDAC, synopsys: Shorten static function names Shorten static function names, remove the unnecessary 'synps_' prefix in function names. [ bp: Drop the "edac_" prefix too as that prefix is reserved for EDAC core functions. ] Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: mark.rutland@arm.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1538667328-9465-3-git-send-email-manish.narani@xilinx.com commit 1b51adc6b7ac31fa446ef066107827fffd5dd1f2 Author: Manish Narani Date: Thu Oct 4 21:05:19 2018 +0530 EDAC, synopsys: Improve code readability Clean up the driver code. Update the debug messages for EDAC errors reported. Increase the indentation of the macros for better readability. Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov CC: Mauro Carvalho Chehab CC: Michal Simek CC: amit.kucheria@linaro.org CC: devicetree@vger.kernel.org CC: leoyang.li@nxp.com CC: linux-arm-kernel@lists.infradead.org CC: linux-edac CC: manish.narani@xilinx.com CC: mark.rutland@arm.com CC: mchehab@kernel.org CC: michal.simek@xilinx.com CC: robh+dt@kernel.org CC: sudeep.holla@arm.com Link: http://lkml.kernel.org/r/1538667328-9465-2-git-send-email-manish.narani@xilinx.com commit 326e5c8d4a87512ee329efc1b45029767ec710bb Author: Mason Yang Date: Wed Oct 17 10:08:12 2018 +0800 dt-binding: spi: Document Macronix controller bindings Document the bindings used by the Macronix controller. Signed-off-by: Mason Yang Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit b942d80b0a394e8ea18fce3b032b4700439e8ca3 Author: Mason Yang Date: Wed Oct 17 10:08:11 2018 +0800 spi: Add MXIC controller driver Add a driver for Macronix SPI controller IP. Signed-off-by: Mason Yang Reviewed-by: Boris Brezillon Signed-off-by: Mark Brown commit be0bf62e3df9afcb3f7a72de347770568dd60af6 Author: Wolfram Sang Date: Sun Oct 21 22:00:45 2018 +0200 spi: spi-rspi: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown commit 6eee6d317aa2511ea86c4f8f28d79bfd3d621826 Author: Wolfram Sang Date: Sun Oct 21 22:00:47 2018 +0200 spi: spi-zynqmp-gqspi: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown commit 07c7df3ecdba3d8b9a4145edd9cac47b27dd7f67 Author: Wolfram Sang Date: Sun Oct 21 22:00:46 2018 +0200 spi: spi-sh-msiof: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown commit 2a35a643f138a97e3bfee0c599c72e5ca80ebe7c Author: Keiji Hayashibara Date: Fri Oct 26 14:58:45 2018 +0900 spi: uniphier: re-add addressing properties In commit 7662d1dc17d4 ("spi: uniphier: fix incorrect property items") addressing properties of #address-cells and #size-cells were removed. Since it is not necessary to remove them, they are back again. Signed-off-by: Keiji Hayashibara Reviewed-by: Rob Herring Signed-off-by: Mark Brown commit 4642f0bede4f3e0e460ae0e52286df606832b291 Author: Keiji Hayashibara Date: Fri Oct 26 14:58:44 2018 +0900 spi: uniphier: fix incorrect property items This commit fixes incorrect property because it was different from the actual. The parameters of '#address-cells' and '#size-cells' were removed, and 'interrupts', 'pinctrl-names' and 'pinctrl-0' were added. Fixes: 4dcd5c2781f3 ("spi: add DT bindings for UniPhier SPI controller") Signed-off-by: Keiji Hayashibara Signed-off-by: Mark Brown commit 6a34e285de9afc4441ee81ce76865acd30ed9263 Author: Alok Chauhan Date: Thu Oct 25 22:10:29 2018 +0530 spi: spi-geni-qcom: Simplify probe function Re-arrange existing APIs in probe function to avoid using goto and remove redundant variables. Signed-off-by: Alok Chauhan Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Mark Brown commit 0dccff3ce73aa6e9b1b4b0ddb3831c1d7fde9507 Author: Alok Chauhan Date: Thu Oct 25 22:10:28 2018 +0530 spi: spi-geni-qcom: fix nitpicks fixed the nitpicks. Signed-off-by: Alok Chauhan Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Mark Brown commit 13aed23927414137a017ac2f7d567001f714293f Author: Chuanhua Han Date: Mon Oct 29 11:11:16 2018 +0800 spi: spi-fsl-dspi: use IRQF_SHARED mode to request IRQ Some SoC share one irq number between DSPI controllers. For example, on the LX2160 board, DSPI0 and DSPI1 share one irq number. In this case, only one DSPI controller can register successfully, and others will fail. Signed-off-by: Chuanhua Han Signed-off-by: Mark Brown commit b654aa6f2bbb00508ea0abc1cdc98ba8baa13682 Author: Leilk Liu Date: Thu Nov 1 14:02:19 2018 +0800 spi: mediatek: add spi support for mt8183 IC this patch add support for mt8183 IC. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit f611dfdb8544b5ac4228f4e3cb3b06ce15b9c74b Author: Leilk Liu Date: Thu Nov 1 14:02:18 2018 +0800 spi: mediatek: Add bindings for mediatek MT8183 soc platform This patch adds a DT binding documentation for the MT8183 soc. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown commit b53548f9d9e4ca9203095afe2fadc97c982d50ee Author: Jarkko Nikula Date: Thu Nov 1 16:36:36 2018 +0200 spi: pxa2xx: Remove LPSS private register restoring during resume Intel LPSS private register restoring in spi-pxa2xx.c: pxa2xx_spi_resume() was added before there was no any other code restoring them. This was changed after following commits for previous and current LPSS platforms: c78b0830667a ("ACPI / LPSS: custom power domain for LPSS") 41a3da2b8e16 ("mfd: intel-lpss: Save register context on suspend") However there is one caveat: There is no LPSS private register context save/restore for the Intel Lynxpoint in the Linux kernel code. I did some debugging on one Lynxpoint based device I have and on it the LPSS register context is not lost over suspend/resume cycle (s2idle). Which happens for instance on Intel Braswell. I'm speculating but I guess either firmware does it or the LPSS is kept always on Lynxpoint. Given that we haven't needed to implement Lynxpoint LPSS I2C or UART private register context save/restore over four years time I think we are safe to remove this LPSS private register restoring during resume here. Signed-off-by: Jarkko Nikula Acked-by: Andy Shevchenko Signed-off-by: Mark Brown commit a5ebe5e49a862e21c620656d2dc244a0d92833d9 Author: Takeshi Kihara Date: Sun Oct 21 06:30:00 2018 +0900 arm64: dts: renesas: r8a77990: Add SCIF-{0,1,3,4,5} device nodes This patch adds the device nodes for SCIF-{0,1,3,4,5} serial ports to the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman commit 122ddb7104f7c305ed83d49b2e2b65df497519e0 Author: Sergei Shtylyov Date: Fri Oct 19 22:10:44 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: add MSIOF support Describe MSIOF in the R8A779{7|8}0 device trees. The DMA props are omitted for R8A77980 as the RT-DMAC isn't supported (yet?)... Based on the original (and large) patches by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman commit 0c85e78fb1d3742c36ff085999624cc912128776 Author: Biju Das Date: Mon Sep 10 15:31:18 2018 +0100 arm64: dts: renesas: r8a774a1: Add VIN and CSI-2 nodes Add VIN and CSI-2 nodes to RZ/G2M SoC dtsi. Signed-off-by: Biju Das Reviewed-by: Fabrizio Castro Signed-off-by: Simon Horman commit e67898dc2d2b4bf484dd8807d62c88480f6290fb Author: Yoshihiro Shimoda Date: Tue Oct 16 15:04:50 2018 +0900 arm64: dts: renesas: revise hsusb's reg size This patch revises the reg size of each hsusb device node for r8a7795, r8a7796 and r8a77965. Reported-by: Biju Das Fixes: d2422e108812 ("arm64: dts: r8a7795: Add HSUSB device node") Fixes: 4725f2b88057 ("arm64: dts: renesas: r8a7795: add hsusb ch3 device node") Fixes: b9535853777f ("arm64: dts: r8a7796: Add HSUSB device node") Fixes: 9e1b00a2ef43 ("arm64: dts: renesas: r8a77965: Add "reg" properties") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Biju Das Signed-off-by: Simon Horman commit bae66bbcf2011f4048d2a99fd02d3a6608327c60 Author: Laurent Pinchart Date: Thu Oct 18 03:41:49 2018 +0300 arm64: dts: renesas: r8a77965: Add LVDS support The M3-N (r8a77965) platform has one LVDS encoder connected to the DU. Add the corresponding DT node and wire it up. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Simon Horman commit 69c5e602d0bd717da04c18c08017d195ec10da8d Author: Sergei Shtylyov Date: Wed Oct 10 22:18:11 2018 +0300 arm64: dts: renesas: r8a77980: add thermal support Describe THS/CIVM in the R8A77980 device trees. Signed-off-by: Sergei Shtylyov Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman commit f1487c19781a07144d8be88cca3c1c85a62f00da Author: Sergei Shtylyov Date: Tue Oct 9 22:47:47 2018 +0300 arm64: dts: renesas: r8a77970: add thermal support Describe THS/CIVM in the R8A77970 device tree. Based on the original (and large) patches by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 8517042060b55a37c1b7d3cbb04e131bfe61c13a Author: Yoshihiro Kaneko Date: Tue Oct 9 16:38:50 2018 +0900 arm64: dts: renesas: r8a77990: Add DMA properties to MSIOF nodes This patch adds DMA properties to the MSIOF device nodes of R8A77990 SoC. Signed-off-by: Yoshihiro Kaneko Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit de625477c632abecf23feba94ff4c5904764f57d Author: Sergei Shtylyov Date: Mon Oct 1 23:25:43 2018 +0300 arm64: dts: renesas: r8a779{7|8}0: add PWM support Describe PWMs in the R8A779{7|8}0 device trees. Based on the original (and large) patches by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit 0c793a02cc7cc8ba66855a08d3015b8385885b1e Author: Takeshi Kihara Date: Fri Sep 28 13:37:56 2018 +0200 arm64: dts: renesas: r8a77990: Add INTC-EX device node This patch adds a device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car E3, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman commit e20a1b9e10e3d01155bfd3faa2a49174ee16df08 Author: Kuninori Morimoto Date: Fri Sep 28 02:39:47 2018 +0000 arm64: dts: renesas: r8a7795: remove unneeded sound #address/size-cells commit 2d87dc0e5be2 ("arm64: dts: renesas: r8a7795: Add address properties to rcar_sound port nodes") added missing #address-cells and #size-cells for sound ports. But, these are based on platform, not on SoC. This patch cleanups it. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman commit b823d65f3380e9d7dd19c8e015dd7f22a0a09957 Author: Chris Paterson Date: Mon Sep 10 11:43:15 2018 +0100 arm64: dts: renesas: r8a774a1: Add CAN nodes Add the device nodes for both RZ/G2M CAN channels. Signed-off-by: Chris Paterson Reviewed-by: Biju Das Signed-off-by: Simon Horman commit 04290192f7ebe892828f69ac57c4684e25da378d Author: Emil Renner Berthing Date: Wed Oct 31 11:57:11 2018 +0100 spi: rockchip: support lsb-first mode Add missing support for lsb-first mode. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 65498c6ae2414a1425aa6c4231e79e2998afec05 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:10 2018 +0100 spi: rockchip: support 4bit words The hardware supports 4, 8 and 16bit spi words, so add the missing support for 4bit words. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 01b59ce5dac856323a0c13c1d51d99a819f32efe Author: Emil Renner Berthing Date: Wed Oct 31 11:57:09 2018 +0100 spi: rockchip: use irq rather than polling Register an interrupt handler to fill/empty the tx and rx fifos rather than busy-looping. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 74b7efa82b11914c21e30d987ed61d3daa57ff21 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:08 2018 +0100 spi: rockchip: precompute rx sample delay Now that we no longer potentially change spi clock at runtime we can precompute the rx sample delay at probe time rather than for each transfer. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 420b82f842941a32adf309ca1b193adfc77616b0 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:07 2018 +0100 spi: rockchip: set min/max speed The driver previously checked each transfer if the requested speed was higher than possible with the current spi clock rate and raised the clock rate accordingly. However, there is no check to see if the spi clock was actually set that high and no way to dynamically lower the spi clock rate again. So it seems any potiential users of this functionality are better off just setting the spi clock rate at init using the assigned-clock-rates devicetree property. Removing this dynamic spi clock rate raising allows us let the spi framework handle min/max speeds for us. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit eff0275e5253604429aedc42b008c5fcaa6cc597 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:06 2018 +0100 spi: rockchip: simplify use_dma logic We only need to know if we're using dma when setting up the transfer, so just use a local variable for that. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit d790c342e689ea77a5cf72d5b993299911ee5276 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:05 2018 +0100 spi: rockchip: remove master pointer from dev data In almost all cases we already have a pointer to the spi master structure where we have the driver data. The only exceptions are the dma callbacks which are easily fixed by passing them the master and using spi_master_get_devdata to retrieve the driver data. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit eee06a9ee2cd5deaddc5f77ce8f6118c8b82b2a0 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:04 2018 +0100 spi: rockchip: don't store dma channels twice The spi master (aka spi controller) structure already has two fields for storing the rx and tx dma channels. Just use them rather than duplicating them in driver data. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit fc1ad8ee33480bdf0493b54907b74538bf9b75b8 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:03 2018 +0100 spi: rockchip: read transfer info directly Just read transfer info directly from the spi device and transfer structures rather than storing it in driver data first. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit ce386100d99976442093ff57b5b24a9562c6cc27 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:02 2018 +0100 spi: rockchip: disable spi on error Successful transfers leave the spi disabled, so if we just make sure to disable the spi on error there should be no need to disable the spi from master->unprepare_message. This also flushes the tx and rx fifos, so no need to do that manually. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit fab3e4871f623c8f86e8a0e00749f1480ffa08db Author: Emil Renner Berthing Date: Wed Oct 31 11:57:01 2018 +0100 spi: rockchip: use atomic_t state The state field is currently only used to make sure only the last of the tx and rx dma callbacks issue an spi_finalize_current_transfer. Rather than using a spinlock we can get away with just turning the state field into an atomic_t. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 2410d6a3c3070e205169a1a741aa78898e30a642 Author: Emil Renner Berthing Date: Wed Oct 31 11:57:00 2018 +0100 spi: rockchip: always use SPI mode The hardware supports 3 different variants of SPI and there were some code around it, but nothing to actually set it to anything but "Motorola SPI". Just drop that code and always use that mode. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 31bcb57be12fd815a9051f07d64334809b8cb472 Author: Emil Renner Berthing Date: Wed Oct 31 11:56:59 2018 +0100 spi: rockchip: use designated init for dma config Use C99 designated initializers for dma slave config structures. This also makes sure uninitialized fields are zeroed so we don't need an explicit memset. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 30688e4e670d21126aa596df4523940e2f8d24de Author: Emil Renner Berthing Date: Wed Oct 31 11:56:58 2018 +0100 spi: rockchip: make spi_enable_chip take bool The spi_enable_chip function takes a boolean argument. Change the type to reflect that. Signed-off-by: Emil Renner Berthing Tested-by: Heiko Stuebner Signed-off-by: Mark Brown commit 65a8c17a39f62fd646950fa43efcced0d6fe029c Author: Fabrizio Castro Date: Fri Sep 21 19:08:31 2018 +0100 ARM: shmobile: defconfig: Enable SII902X The iwg23s board comes with the SiI9022ACNU HDMI transmitter, this patch makes sure the corresponding driver gets built. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Simon Horman commit c0ea089dbad47a41ae30ad290766d7a6571c9802 Author: Kuninori Morimoto Date: Tue Oct 30 07:47:50 2018 +0000 ASoC: rsnd: rsnd_mod_name() handles both name and ID Current rsnd driver is using "%s[%d]" for mod name and ID, but, this ID portion might confusable. For example currently, CTU ID is 0 to 7, but using 00 to 13 (= 00, 01, 02, 03, 10, 11, 12, 13) is very best matching to datasheet. In the future, we will support BUSIFn, but it will be more complicated numbering. To avoid future confusable code, this patch modify rsnd_mod_name() to return understandable name. To avoid using pointless memory, it uses static char and snprintf, thus, rsnd_mod_name() user should use it immediately, and shouldn't keep its pointer. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit c16015f36cc128244c910152663de45c3b99f551 Author: Kuninori Morimoto Date: Tue Oct 30 07:47:18 2018 +0000 ASoC: rsnd: add .get_id/.get_id_sub ID for CTU and SSIU are confusable. 1 CTU has 4 sub nodes. This means, CTU0 has CTU01 - CTU03, CTU1 has CTU10 - CTU13. SSIU is more confusable. Gen2 SSIU has BUSIF0-3, Gen3 SSIU has BUSIF0-7, but not for all SSIU. In rsnd driver, each mod drivers are assuming rsnd_mod_id() returns main device ID (In CTU case CTU0-1, SSIU case SSIU0-9), not serial number. This patch adds new .id/.id_sub to handling more detail ID. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 7e7fe06de376e9874f4399dac81d65ea9b0a9507 Author: Kuninori Morimoto Date: Tue Oct 30 07:46:05 2018 +0000 ASoC: rsnd: move .get_status under rsnd_mod_ops Each mod needs to have .get_status, but current driver is handling it under rsnd_mod, instead of rsnd_mod_ops. It is not any make sence. This patch moves it to rsnd_mod_ops, and tidyup its parameter order to align to other callback functions. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 0900d1e64815b3b8d4d04197aa135e77317176e1 Author: Kuninori Morimoto Date: Tue Oct 30 07:31:40 2018 +0000 ASoC: pcm3168a: cleanup hw_constraint for LEFT_J/I2S hw constraint for LEFT_J/I2S are same, but had duplicated code. This code cleanup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown commit 61f18dc78a6b70c409134d0f4d873e9253565e05 Author: Peter Ujfalusi Date: Thu Oct 25 16:48:24 2018 +0300 ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported For samples sizes of 20/24/32 bit the DRR2/DXR2 registers must be used to receive or transmit the most significant part of the 32bit sample. We can not trick the system by using the DRR2/DXR2 register offset and use 32bit element size since these (and other McBSP) registers are 16bit ones. We would need support for port_window in cyclic mode from the sDMA driver, but it is not straight forward as we would need to have the sDMA frame to cover the 32bit (DRR2+DRR1/DXR2+DXR1), but the frames must cover the ALSA period to be able to receive periodic interrupts. Since the 32bit samples are not working (DMA timeout), just remove it in case we have McBSP with reg_size of 2. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown commit de3636488cff3678bafaf2d024e64c003ed2beae Author: Julia Lawall Date: Sun Oct 28 06:56:08 2018 +0100 ASoC: AMD: constify regulator_desc structure The regulator_desc structure can be const as it is only passed as the second argument of devm_regulator_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mark Brown commit 704a9fc20b87f2929732cab0a1a04f28d4093085 Author: Julia Lawall Date: Sat Oct 27 15:34:44 2018 +0200 ASoC: codecs: constify snd_soc_dai_ops structures The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mark Brown commit 7dfcd9d727c3e69ecb51c0bb4d54b3d46de98e87 Author: Julia Lawall Date: Sat Oct 27 15:34:43 2018 +0200 ASoC: qdsp6: q6afe-dai: constify snd_soc_dai_ops structures The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mark Brown commit f458f9f4369086e86f0cdedf9aae86a525da0736 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:40:24 2018 +0200 carl9170: tx: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 003161445bc8ec38882e571916b0c2c495277297 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:39:59 2018 +0200 carl9170: rx: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056534 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 6d9e1ecd15373c4fff03e2066581e2374c0e1e61 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:37:31 2018 +0200 ath6kl: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 201383 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Acked-by: Steve deRosier Signed-off-by: Kalle Valo commit 53d76f1687ba7e4e4e1daa097d90ce6bf2f540d4 Author: zhong jiang Date: Tue Oct 23 11:27:14 2018 +0800 ath9k: remove set but not used variable 'new_flags' new_flags is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang Signed-off-by: Kalle Valo commit 6da4b3ab9a6e9b1b5f90322ab3fa3a7dd18edb19 Author: Jens Axboe Date: Fri Nov 2 22:59:51 2018 +0800 genirq/affinity: Add support for allocating interrupt sets A driver may have a need to allocate multiple sets of MSI/MSI-X interrupts, and have them appropriately affinitized. Add support for defining a number of sets in the irq_affinity structure, of varying sizes, and get each set affinitized correctly across the machine. [ tglx: Minor changelog tweaks ] Signed-off-by: Jens Axboe Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Cc: linux-block@vger.kernel.org Link: https://lkml.kernel.org/r/20181102145951.31979-5-ming.lei@redhat.com commit 060746d9e394084b7401e7532f2de528ecbfb521 Author: Ming Lei Date: Fri Nov 2 22:59:50 2018 +0800 genirq/affinity: Pass first vector to __irq_build_affinity_masks() No functional change. Prepares for support of allocating and affinitizing sets of interrupts, in which each set of interrupts needs a full two stage spreading. The first vector argument is necessary for this so the affinitizing starts from the first vector of each set. [ tglx: Minor changelog tweaks ] Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Hannes Reinecke Cc: Keith Busch Cc: Sagi Grimberg Link: https://lkml.kernel.org/r/20181102145951.31979-4-ming.lei@redhat.com commit 5c903e108d0b005cf59904ca3520934fca4b9439 Author: Ming Lei Date: Fri Nov 2 22:59:49 2018 +0800 genirq/affinity: Move two stage affinity spreading into a helper function No functional change. Prepares for supporting allocating and affinitizing interrupt sets. [ tglx: Minor changelog tweaks ] Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Hannes Reinecke Cc: Keith Busch Cc: Sagi Grimberg Link: https://lkml.kernel.org/r/20181102145951.31979-3-ming.lei@redhat.com commit b82592199032bf7c778f861b936287e37ebc9f62 Author: Long Li Date: Fri Nov 2 18:02:48 2018 +0000 genirq/affinity: Spread IRQs to all available NUMA nodes If the number of NUMA nodes exceeds the number of MSI/MSI-X interrupts which are allocated for a device, the interrupt affinity spreading code fails to spread them across all nodes. The reason is, that the spreading code starts from node 0 and continues up to the number of interrupts requested for allocation. This leaves the nodes past the last interrupt unused. This results in interrupt concentration on the first nodes which violates the assumption of the block layer that all nodes are covered evenly. As a consequence the NUMA nodes above the number of interrupts are all assigned to hardware queue 0 and therefore NUMA node 0, which results in bad performance and has CPU hotplug implications, because queue 0 gets shut down when the last CPU of node 0 is offlined. Go over all NUMA nodes and assign them round-robin to all requested interrupts to solve this. [ tglx: Massaged changelog ] Signed-off-by: Long Li Signed-off-by: Thomas Gleixner Reviewed-by: Ming Lei Cc: Michael Kelley Link: https://lkml.kernel.org/r/20181102180248.13583-1-longli@linuxonhyperv.com commit bf74fd75137dd1fa9b95b82c49866e6608fb4990 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:39:15 2018 +0200 ath9k: hw: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056532 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit f2a881055094444da9f7c5a9609b261bba8634a9 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:38:11 2018 +0200 ath9k: ar9002_phy: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056532 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 604e986700721a4371546d0a356e00bc5ba46806 Author: Gustavo A. R. Silva Date: Mon Oct 22 22:37:38 2018 +0200 ath9k: ar5008_phy: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056532 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo commit 3468404f78e16208ca534cca9bb8e80425eb70ce Author: YueHaibing Date: Fri Oct 19 12:20:26 2018 +0000 ath10k: remove set but not used variable 'tlv_len' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function 'ath10k_wmi_tlv_op_gen_config_pno_start': drivers/net/wireless/ath/ath10k/wmi-tlv.c:3455:6: warning: variable 'tlv_len' set but not used [-Wunused-but-set-variable] It never used since inroduction in commit ce834e280f2f ("ath10k: support NET_DETECT WoWLAN feature") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit eb9bd8b963d61125b0e336f1f6c9487051a812c3 Author: Colin Ian King Date: Thu Oct 18 22:51:04 2018 +0100 ath10k: fix some spelling mistakes Trivial fix to some spelling mistakes in ath10k_err and ath10k_dbg messages: "capablity" -> "capability" "registed" -> "registered" Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 539b44e70c5b4ad82d2c0c97a4dfb37523d891f6 Author: Dan Carpenter Date: Thu Oct 18 10:36:19 2018 +0300 ath10k: fixup extended per sta tx statistics I had a couple concerns with this code. First, we definitely need to set the error code if the kzalloc() fails. Secondly, I was worried that if we didn't set "arsta->tx_stats" to NULL after freeing it, then it looks to me like it might lead to a use after free. I can't test that, but it's harmless to set it to NULL so I did. Fixes: a904417fc876 ("ath10k: add extended per sta tx statistics support") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 13104929d2ec32aec0552007d55b9e15bc07176b Author: Rakesh Pillai Date: Wed Oct 17 16:50:03 2018 +0530 ath10k: fill the channel survey results for WCN3990 correctly The host driver currently expects the channel info event to be received in pairs for all the channels, i.e. the first chan_info event for a particular channel will not have the COMPLETE flag set and the second chan_info event for the same channel will have the COMPLETE flag set. The HL2.0 firmware sends only one channel info event per channel which is scanned without the COMPLETE flag set. After sending the chan_info_event for all the channels, the HL2.0 firmware sends a chan_info_event with COMPLETE flag set to indicate the completion of the channel info event. The firmware does not indicate this behavior with any service bitmap and hence a new firmware feature flag is used to handle the modified parsing of the channel info events, in the host driver, for the firmware which sends single channel info event per scanned channel. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Co-developed-by: Surabhi Vishnoi Signed-off-by: Surabhi Vishnoi Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 0b6277e6343e192aaa7d452ab933281eb0d420dc Author: Yangtao Li Date: Sun Nov 4 07:55:29 2018 -0500 ASoC: nau8825: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Mark Brown commit 9b4dcc9cbbfb40fde3417827d6b41e2a5642ce3d Author: Icenowy Zheng Date: Sun Nov 4 19:27:03 2018 +0100 drm: sun4i: add support for H6 TCON TOP The TCON TOP on Allwinner H6 SoC is a cut down version of the R40 TCON TOP, which dropped TCON_TV1 and DSI (which do not exist on H6). Add support for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-27-jernej.skrabec@siol.net commit bbf81a9c7188531b0c391e916b5931e404e5be54 Author: Icenowy Zheng Date: Sun Nov 4 19:27:02 2018 +0100 dt-bindings: display: sun4i-drm: document H6 TCON TOP Allwinner H6 SoC has a cut down version of TCON TOP. Add binding documentation for it. Reviewed-by: Rob Herring Signed-off-by: Icenowy Zheng [expanded description] Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-26-jernej.skrabec@siol.net commit 10ead694f05c238878eda089f54aa3fad801bc72 Author: Icenowy Zheng Date: Sun Nov 4 19:27:01 2018 +0100 drm: sun4i: add quirks for TCON TOP Some SoCs, such as H6, doesn't have a full-featured TCON TOP. Add quirks support for TCON TOP. Currently the presence of TCON_TV1 and DSI is controlled via the quirks structure. Acked-by: Maxime Ripard Signed-off-by: Icenowy Zheng [Fixed code style and removed unnecessary initialization] Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-25-jernej.skrabec@siol.net commit c96d62215fb540e2ae61de44cb7caf4db50958e3 Author: Jernej Skrabec Date: Sun Nov 4 19:27:00 2018 +0100 drm/sun4i: Initialize registers in tcon-top driver It turns out that TCON TOP registers in H6 SoC have non-zero reset value. This may cause issues if bits are not changed during configuration. To prevent that, initialize registers to 0. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-24-jernej.skrabec@siol.net commit 0fb4b858b1024a62788bef3bcaaa77d7b2359044 Author: Jernej Skrabec Date: Sun Nov 4 19:26:59 2018 +0100 drm/sun4i: Add support for H6 HDMI PHY H6 has Synopsys DWC HDMI 2.0 TX PHY. There is no freely available documentation for it, only code found in BSP kernel. However, judging by the code, PHY is very similar to older Synopsys HDMI PHY described in i.MX6 documentation. Most registers seem to be the same. According to i.MX6 documentation, mpll settings are based on pixel clock and are not specific to each SoC. Because of that, mpll table in this commit is based on that documentation and not on BSP code. Other PHY settings were derived from BSP PHY driver code. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-23-jernej.skrabec@siol.net commit c71c9b2fee17996dc004c37772a5c38883543229 Author: Jernej Skrabec Date: Sun Nov 4 19:26:58 2018 +0100 drm/sun4i: Add support for Synopsys HDMI PHY Currently sun8i-hdmi-phy driver supports only custom PHYs connected to DW HDMI controller. Since newest Allwinner SoCs have unmodified Synopsys PHY, driver has to be reorganized to support them. Variant structure is expanded to allow differentiation between custom and Sysnopsys PHYs and to hold Synopsys PHY settings. Since DW HDMI bridge platform data has different fields for custom and Sysnopsys PHY, function sun8i_hdmi_phy_get_ops() is replaced with sun8i_hdmi_phy_set_ops(). Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-22-jernej.skrabec@siol.net commit 058262b1e5395b8430b1bcd1fde9d7e2e9e42085 Author: Jernej Skrabec Date: Sun Nov 4 19:26:57 2018 +0100 drm/sun4i: dw-hdmi-phy: Reorder quirks by family Currently, quirks and compatibles are sorted alphabetically. However, they should be sorted by family release date and then alphabetically. Fix that by moving A64 quirks and compatible to bottom. No functional change is made. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-21-jernej.skrabec@siol.net commit 40bb9d3147b2de4c6380f25e6a75e54013beeef4 Author: Jernej Skrabec Date: Sun Nov 4 19:26:56 2018 +0100 drm/sun4i: Add support for H6 DW HDMI controller H6 has DW HDMI 2.0b controller v2.12a. It supports 4K at 60 Hz and HDCP 2.2. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-20-jernej.skrabec@siol.net commit 9d0fdd4843329ceee9a4fe0852becf7260c98095 Author: Icenowy Zheng Date: Sun Nov 4 19:26:55 2018 +0100 dt-bindings: display: sunxi: add DT binding for Allwinner H6 DW HDMI The Allwinner H6 SoC uses a v2.12a DesignWare HDMI controller, with dedicated CEC and HDCP clocks added; the PHY connected is a standard DesignWare HDMI PHY. Add binding for it. Reviewed-by: Rob Herring Signed-off-by: Icenowy Zheng [added HDCP clock and reset] Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-19-jernej.skrabec@siol.net commit 76ce87ca5063ae7b0bee00ce328cab362519d318 Author: Jernej Skrabec Date: Sun Nov 4 19:26:54 2018 +0100 drm/sun4i: dw-hdmi: Add quirk for setting TMDS clock It turns out that H6 HDMI BSP kernel driver doesn't change TMDS rate at all. At this point it is not clear whether it is just not necessary or it would cause some kind of issues. Add a quirk for it. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-18-jernej.skrabec@siol.net commit 799715212b677a0dc4177f327ec4ad8ec32e42c1 Author: Jernej Skrabec Date: Sun Nov 4 19:26:53 2018 +0100 drm/sun4i: dw-hdmi: Make mode_valid function configurable Since it is not possible to access sun8i-dw-hdmi driver private data inside mode_valid function, make it configurable. That way different versions of HDMI controllers can set different function, depending on it's limitations. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-17-jernej.skrabec@siol.net commit cd54074e82e08054eb9905a8d11ee9b0a281076c Author: Jernej Skrabec Date: Sun Nov 4 19:26:52 2018 +0100 drm/sun4i: Not all DW HDMI controllers has scrambled addresses Currently supported Allwinner SoCs with DW HDMI controller have scrambled addresses and read lock. However, that is not true in general. For example, A80 and H6 have normal addresses and normal read access. Move code for unscrambling addresses and unlocking read access to it's own function and call it from init function. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-16-jernej.skrabec@siol.net commit c8c78ac261e76713fa94de4cb249ebb34eaf84c3 Author: Jernej Skrabec Date: Sun Nov 4 19:26:51 2018 +0100 drm/bridge/synopsys: dw-hdmi: Enable workaround for v2.12a It turns out that even new DW HDMI controllers exhibits same magenta line issues as older versions. Enable workaround for v2.12a. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-15-jernej.skrabec@siol.net commit 0a14b641624b2b16756a99e3c6eee8cce0770bba Author: Jernej Skrabec Date: Sun Nov 4 19:26:50 2018 +0100 drm/sun4i: Add support for H6 DE3 mixer 0 Mixer 0 has 1 VI and 3 UI planes, scaler on all planes and can output 4K image @60Hz. It also support 10 bit colors, which are not yet implemented. Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-14-jernej.skrabec@siol.net commit c50519e6db4d6425538cdc1a6df5f3cec35997fd Author: Jernej Skrabec Date: Sun Nov 4 19:26:49 2018 +0100 drm/sun4i: Add basic support for DE3 Display Engine 3 is an upgrade of DE2 with new features like support for 10 bit color formats and support for AFBC. Most of DE2 code works with DE3, except some small details. Implement basic support for DE3. Support for 10 bit colort formats and AFBC, among others missing features, will be added later. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/260238/ commit 1539c7f23f256120f89f8b9ec53160790bce9ed2 Author: Arnd Bergmann Date: Sat Nov 3 22:21:22 2018 +0100 ASoC: Intel: mrfld: fix uninitialized variable access Randconfig testing revealed a very old bug, with gcc-8: sound/soc/intel/atom/sst/sst_loader.c: In function 'sst_load_fw': sound/soc/intel/atom/sst/sst_loader.c:357:5: error: 'fw' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (fw == NULL) { ^ sound/soc/intel/atom/sst/sst_loader.c:354:25: note: 'fw' was declared here const struct firmware *fw; We must check the return code of request_firmware() before we look at the pointer result that may be uninitialized when the function fails. Fixes: 9012c9544eea ("ASoC: Intel: mrfld - Add DSP load and management") Signed-off-by: Arnd Bergmann Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 576ce4075bfa0f03e0e91a89eecc539b3b828b08 Author: Arnd Bergmann Date: Fri Nov 2 16:18:21 2018 +0100 ASoC: wm97xx: fix uninitialized regmap pointer problem gcc notices that without either the ac97 bus or the pdata, we never initialize the regmap pointer, which leads to an uninitialized variable access: sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe': sound/soc/codecs/wm9712.c:666:2: error: 'regmap' may be used uninitialized in this function [-Werror=maybe-uninitialized] Since that configuration is invalid, it's better to return an error here. I tried to avoid adding complexity to the conditions, and turned the #ifdef into a regular if(IS_ENABLED()) check for readability. This in turn requires moving some header file declarations out of an #ifdef. The same code is used in three drivers, all of which I'm changing the same way. Fixes: 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown commit ff60005e4598ca9a79fa6d8378dd35a668ae4de7 Author: Julia Lawall Date: Fri Nov 2 16:00:18 2018 +0100 ASoC: smd845: constify snd_soc_ops structure The snd_soc_ops structure can be const as it is only stored in the ops field of a snd_soc_dai_link structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mark Brown commit 6b27e27729270a2478fdebea2db9c4f57bb4e8e6 Author: Colin Ian King Date: Wed Oct 31 19:31:43 2018 +0000 ASoC: stm32: sai: fix less than zero comparison on unsigned int Currently, the comparison of div < 0 is always false because div is an unsigned int. Fix this by making div an int. Detected by CoverityScan, CID#1475309 ("Unsigned compared against 0") Fixes: 8307b2afd386 "(ASoC: stm32: sai: set sai as mclk clock provider") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown commit 4ab7fd955e471a71908d4970017c52b3ef6e47a2 Author: Wei Yongjun Date: Tue Oct 16 02:35:16 2018 +0000 ath10k: fix copy-paste error in ath10k_qmi_setup_msa_resources() The return value from devm_memremap() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo commit 5f09037a0cc2b70d2afdb216d236b52e2bee0a2b Author: Anilkumar Kolli Date: Fri Oct 12 11:36:37 2018 +0530 ath10k: assign proper firmware crash dump structure ar->target_version is same for QCA99x0, QCA4019, QCA9888 and QCA9984, this ended up in assigning the wrong hw_mem_layouts. This patch adds additional hw_rev check to assign correct hw_mem_layouts. Tested on: QCA4019 firmware 10.4-3.2.1.1-00017 QCA9984 firmware 10.4-3.5.3-00057 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit bbcfb343fa7f40a42d11bdac753dd62fdbf0840b Author: Anilkumar Kolli Date: Fri Oct 12 11:36:36 2018 +0530 ath10k: add memory dump support for QCA4019 This patch adds firmware crash memory dump support for QCA4019. Tested on: QCA4019 firmware 10.4-3.2.1.1-00017 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit e88975ca37d10a486cf3a3c7199a669eb393c123 Author: Anilkumar Kolli Date: Fri Oct 12 11:33:28 2018 +0530 ath10k: dump tx stats in rate table format This patch adds the tx statistics pkts/bytes dump in rate table format. Dump format table is similar to http://mcsindex.com/ Tested on QCA9984/QCA4019/QCA988x Firmware: 10.4-3.5.3-00057 10.2.4-1.0-00037 command: cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/ stations//tx_stats Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 0e622f67e0413ad12c2481d47353031ddb185620 Author: Surabhi Vishnoi Date: Fri Oct 12 11:23:39 2018 +0530 ath10k: add support for WCN3990 firmware crash recovery Whenever the WCN3990 firmware becomes unavailable, the host driver receives a FW down indication, post which all the direct hardware register access should be avoided, in order to prevent improper behavior in the host driver. Set the crash_flush flag when the host driver receives a FW_DOWN_IND via qmi, in order to stop the untimely hardware register access. Also handle the case, where we need to do core register only for the first FW_READY indication, which is when we initialize the host driver. All the subsequent FW_READY indication will be received in subsystem recovery case and we only need to do the restart work. The state of driver is maintained using flags to distinguish between first and subsequent FW_READY indication received. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Surabhi Vishnoi Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 0282fefb1a29d60d6c51ff62bda5ccdc7ab48993 Author: Christoph Hellwig Date: Thu Oct 18 14:59:35 2018 +0200 mtd: rawnand: r852: use generic DMA API Use the generic DMA API instead of the legacy PCI DMA API. Signed-off-by: Christoph Hellwig Signed-off-by: Miquel Raynal commit 321e54047b611a07e4d4478f28f636fd4dd6e744 Author: Masahiro Yamada Date: Tue Oct 16 13:33:21 2018 +0900 mtd: rawnand: denali: include instead of The reason of including here is just for BIT() and GENMASK macros. Since commit 8bd9cb51daac8 ("locking/atomics, asm-generic: Move some macros from to a new file"), is enough for such compile-time macros. Signed-off-by: Masahiro Yamada Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 861fbd6e808eb2a0b0d99f7a6467a7dc4ae9fb19 Author: Janusz Krzysztofik Date: Mon Oct 15 21:41:30 2018 +0200 mtd: rawnand: ams-delta: Convert the driver to ->exec_op() Replace legacy callbacks with ->select_chip() and ->exec_op(). Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 3bd647ee7abcffd98a7d8446b96c8da72591b454 Author: Janusz Krzysztofik Date: Mon Oct 15 21:41:29 2018 +0200 mtd: rawnand: ams-delta: Stop using legacy .IOADDR_R/W Replace use of legacy .IOADDR_R/W with runtime calculations based on priv->io_base. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit b0e137ad24b6cc36a4ab09558a401e124163eefb Author: Janusz Krzysztofik Date: Mon Oct 15 21:41:28 2018 +0200 mtd: rawnand: Provide helper for polling GPIO R/B pin Each controller driver having access to NAND R/B pin over GPIO would have to reimplement the polling loop otherwise. Suggested-by: Boris Brezillon Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 41d6f0d07d76257cf2d39071a439c7dd1da7271e Author: Gustavo A. R. Silva Date: Wed Oct 10 17:58:58 2018 +0200 mtd: rawnand: fsmc: Fix unchecked return value in fsmc_read_page_hwecc Check return value of nand_read_data_op. Notice that, currently, all instances of nand_read_data_op() are being checked, with the exception of two of them in marvell_nand driver, in which the caller function explicitly returns 0 every time. Also, notice that I moved the declaration of *ret* to the top of fsmc_read_page_hwecc(). Addresses-Coverity-ID: 1471968 ("Unchecked return value") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miquel Raynal commit 9a4d83074769d6ecf1f5c3fef0f183b09abf3726 Author: Robert Marko Date: Sat Oct 6 17:36:42 2018 +0200 mtd: spinand: winbond: Add support for W25N01GV W25N01GV is a single die version of the already supported W25M02GV with half the capacity. Everything else is the same so introduce support for W25N01GV. Datasheet:http://www.winbond.com/resource-files/w25n01gv%20revl%20050918%20unsecured.pdf Tested on 8devices Jalapeno dev board under OpenWrt running 4.19-rc5. Signed-off-by: Robert Marko Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal commit 566b62a3676caed1f8c626e26066ff3ae3a38918 Author: Uros Bizjak Date: Sun Oct 14 22:23:54 2018 +0200 x86: Use POPCNT mnemonics in arch_hweight.h Recently, the minimum required version of binutils was changed to 2.20, which supports POPCNT instruction mnemonics. Replace the byte-wise specification of POPCNT with those proper mnemonics. [ bp: massage commit message and remove line breaks. ] Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov CC: "H. Peter Anvin" CC: Ingo Molnar CC: Thomas Gleixner Link: http://lkml.kernel.org/r/20181014202354.21281-1-ubizjak@gmail.com commit 97eb57feda80b7bf63ae9f74683b38ea21166eb9 Author: Jernej Skrabec Date: Sun Nov 4 19:26:48 2018 +0100 drm/sun4i: Disable unused DE2 sub-engines Some sub-engines are unused. Disable them explicitly. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-12-jernej.skrabec@siol.net commit ac1e507fe61db9aacb3d6f2c57f095c1cb3cbacb Author: Michal Simek Date: Wed Sep 26 13:36:16 2018 +0200 ARM: dts: Use mmc@ instead sdhci@ mmc name is recommended based on devicetree specification. Signed-off-by: Michal Simek commit 218d6a3cfc960b066a321ae55de79e6b8e98263f Author: Jernej Skrabec Date: Sun Nov 4 19:26:47 2018 +0100 drm/sun4i: Fix DE2 mixer size DE2 mixer is always 0x6000 bytes in size on all known SoCs. While at it, introduce a macro for that. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-11-jernej.skrabec@siol.net commit 4b09c07383132d67e4e297d4eb35dbae596ea74e Author: Jernej Skrabec Date: Sun Nov 4 19:26:46 2018 +0100 drm/sun4i: Rework DE2 register defines Most, if not all, registers found in DE2 still exists in DE3. However, units are on different base addresses. To prepare for addition of DE3 support, registers macros are reworked so they take base address as parameter. Signed-off-by: Jernej Skrabec [rebased] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-10-jernej.skrabec@siol.net commit fb3ef54246220ddd0ae3fc26e4c4c44a0001fbd3 Author: Jernej Skrabec Date: Sun Nov 4 19:26:44 2018 +0100 dt-bindings: display: sun4i-drm: Add H6 display engine compatibles This commit adds compatibles used in H6 display pipeline, namely for display engine, mixer and TV TCON. H6 display engine is somewhat similar to R40, just less TCONs and mixer support more features. Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-8-jernej.skrabec@siol.net commit 56808da9f97f260e6df9fb8dbec99a13616bcab1 Author: Jernej Skrabec Date: Sun Nov 4 19:26:43 2018 +0100 clk: sunxi-ng: Add support for H6 DE3 clocks Support for mixer0, mixer1, writeback and rotation units is added. Signed-off-by: Jernej Skrabec Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit b9f9e9b8e42cae6de92617a6c45740e4e6eb6f7f Author: Jernej Skrabec Date: Sun Nov 4 19:26:42 2018 +0100 dt-bindings: clock: sun8i-de2: Add H6 DE3 clock description This commit adds necessary description and dt includes for H6 DE3 clock. It is very similar to others, but memory region has some additional registers not found in DE2. Reviewed-by: Rob Herring Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit ed4433419d45bf8b58aef34c4450a27e1c8699e8 Author: Jernej Skrabec Date: Sun Nov 4 19:26:41 2018 +0100 clk: sunxi-ng: h6: Set video PLLs limits Video PLL factors can be set in a way that final PLL rate is outside stable range. H6 user manual specifically says that N factor should not be below 12. While it doesn't says anything about maximum stable rate, it is clear that PLL doesn't work at 6.096 GHz (254 * 24 MHz). Set minimum allowed PLL video rate to 288 MHz (12 * 24 MHz) and maximum to 2.4 GHz, which is maximum in BSP driver. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 65b6657672388b72822e0367f06d41c1e3ffb5bb Author: Jernej Skrabec Date: Sun Nov 4 19:26:40 2018 +0100 clk: sunxi-ng: Use u64 for calculation of NM rate Allwinner H6 SoC has multiplier N range between 1 and 254. Since parent rate is 24MHz, intermediate result when calculating final rate easily overflows 32 bit variable. Because of that, introduce function for calculating clock rate which uses 64 bit variable for intermediate result. Fixes: 6174a1e24b0d ("clk: sunxi-ng: Add N-M-factor clock support") Fixes: ee28648cb2b4 ("clk: sunxi-ng: Remove the use of rational computations") CC: Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 3f790433c3cb27ecaf2ca0e07ac25964e4fd9f15 Author: Jernej Skrabec Date: Sun Nov 4 19:26:39 2018 +0100 clk: sunxi-ng: Adjust MP clock parent rate when allowed Currently MP clocks don't consider adjusting parent rate even if they are allowed to do so. Such behaviour considerably lowers amount of possible rates, which is very inconvenient when such clock is used for pixel clock, for example. In order to improve the situation, adjusting parent rate is considered when allowed. This code is inspired by clk_divider_bestdiv() function, which does basically the same thing for different clock type. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit c445335a7696594378422df53792856f1d551246 Author: Icenowy Zheng Date: Sun Nov 4 19:26:38 2018 +0100 dt-bindings: bus: add H6 DE3 bus binding The Allwinner H6 DE3 bus is similar to the A64 DE2 one. Add its compatible string with the A64 string as fallback to the binding. Some description of the binding is modified to make it more generic. Reviewed-by: Rob Herring Signed-off-by: Icenowy Zheng [Fixed compatible name] Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-2-jernej.skrabec@siol.net commit 4f16ca40de15cd1073d5e9540d8e810deeab7d87 Author: Jonathan McDowell Date: Tue Oct 30 22:14:30 2018 +0000 ARM: dts: sun8i-h3: Add dts for the Mapleboard MP130 The Mapleboard MP130 is a single board computer based on the Allwinner H3 SoC, with all schematics freely available. The Lite version includes 1GB main memory and 8GB eMMC. https://www.mapleboard.org/en (still mostly in Chinese even when English is selected) This DTS is based upon the DTS shipped with the board which uses mapleboard,mp130- prefixes instead of the allwinner,sun8i variants. v2: Fold in review comments from Maxime Ripard Signed-off-by: Jonathan McDowell Signed-off-by: Maxime Ripard commit 729e1ffcf47e5e035a9a504e81e8d25403919993 Author: Icenowy Zheng Date: Sat Nov 3 20:32:38 2018 +0800 arm64: allwinner: h6: add support for the Ethernet on Pine H64 The Pine H64 board has an Ethernet port, which is connected to a RTL8211E PHY, then the PHY is connected to the MAC on H6 SoC. Add support for the Ethernet port. The PHY needs some time to start up, and the time is modelled as enable ramp delay of the regulator. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit c8ced5516d2340641a676d6f139577d45bcb4e56 Author: Icenowy Zheng Date: Sat Nov 3 20:32:37 2018 +0800 arm64: allwinner: h6: add EMAC device nodes Allwinner H6 SoC has an EMAC like the one in A64. Add device tree nodes for the H6 DTSI file. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit 186172f465c29ee6b617af961723a3ce5029a9c8 Author: Icenowy Zheng Date: Sat Nov 3 20:32:36 2018 +0800 dt-binding: dwmac-sun8i: add H6 compatible string (w/ A64 fallback) The Allwinner H6 SoC features a Ethernet MAC that is similar to the one in A64. Add a compatible string for it with A64 fallback compatible string, in this case the A64 driver can be used. The "internal" PHY is not internal from the perspective of the H6 main die, instead it's on the co-packaged AC200 chip, and connected to the main die with RMII at the in-package Port A PIO bank. So from the SoC driver side it needs no special treatment. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit e6e1869f0b71638e5317c3942463bfbb198b244d Author: Heiko Stuebner Date: Fri Sep 15 09:54:28 2017 +0200 ARM: dts: rockchip: add rk3066/rk3188 power-domains Add the power-domain nodes to both rk3066 and rk3188 including their clocks and qos connections. Signed-off-by: Heiko Stuebner commit 3e712a03d0481f7b0c24d961a43e385dcfa78c74 Author: Heiko Stuebner Date: Mon Aug 28 00:38:36 2017 +0200 ARM: dts: rockchip: add qos nodes found on rk3066 and rk3188 QoS nodes keep information about priorites etc on the interconnect and loose state when the power-domain gets disabled. Therefore the power-domain driver stores the settings of available qos nodes and restores them when the power-domain gets enabled again. So add the qos nodes found on the Cortex-A9 socs from Rockchip, so that they can then be connected to the power-domains. Signed-off-by: Heiko Stuebner commit d0177f12f9127956846b3ca2e12db4f338b2ae63 Merge: 651022382c7f8 2e99be2874484 Author: Heiko Stuebner Date: Mon Nov 5 09:42:24 2018 +0100 Merge branch 'v4.21-shared/pdids' into v4.21-armsoc/dts32 commit db7548934603d9eda12649dff97ea5c29884405d Author: Jagan Teki Date: Thu Nov 1 00:06:28 2018 +0530 clk: sunxi-ng: sun50i: h6: Fix MMC clock mux width MUX bits for MMC clock register range are 25:24 where 24 is shift and 2 is width So fix the width number from 3 to 2. Fixes: 524353ea480b ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit a0d5e7d4995f132d002ec4bf202555c109a0cd9a Author: Heiko Stuebner Date: Mon Aug 28 00:34:30 2017 +0200 soc: rockchip: power-domain: add rk3188 powerdomains Add power-domains found on rk3188 socs. Signed-off-by: Heiko Stuebner commit a58b7d26439357c5df5d00b9b102b712b0ae59b2 Merge: a53e71cedf184 2e99be2874484 Author: Heiko Stuebner Date: Mon Nov 5 09:39:59 2018 +0100 Merge branch 'v4.21-shared/pdids' into v4.21-armsoc/drivers commit a53e71cedf184054cec1097665faf0e9f8e5b090 Author: Heiko Stuebner Date: Fri Sep 15 09:34:23 2017 +0200 dt-bindings: add compatibles for rk3066/rk3188 power controllers Add the compatible values for the power-domain controllers found on rk3066 and rk3188. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring commit 2e99be2874484609ade7d80f688fa8c6dc42759b Author: Heiko Stuebner Date: Mon Aug 28 00:36:25 2017 +0200 dt-bindings: add power-domain header for RK3066 SoCs Add rk3066 power-domains as described by the TRM. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring commit a9beb0a21c8b740ab611c4385e2c59f5911a4da6 Author: Heiko Stuebner Date: Mon Aug 28 00:33:23 2017 +0200 dt-bindings: add power-domain header for RK3188 SoCs Add rk3188 power-domains as described by the TRM. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring commit 3c7b30f704b6f5e53eed6bf89cf2c8d1b38b02c0 Author: Lukas Wunner Date: Sat Oct 27 10:15:33 2018 +0200 pinctrl: bcm2835: Use raw spinlock for RT compatibility The BCM2835 pinctrl driver acquires a spinlock in its ->irq_enable, ->irq_disable and ->irq_set_type callbacks. Spinlocks become sleeping locks with CONFIG_PREEMPT_RT_FULL=y, therefore invocation of one of the callbacks in atomic context may cause a hard lockup if at least two GPIO pins in the same bank are used as interrupts. The issue doesn't occur with just a single interrupt pin per bank because the lock is never contended. I'm experiencing such lockups with GPIO 8 and 28 used as level-triggered interrupts, i.e. with ->irq_disable being invoked on reception of every IRQ. The critical section protected by the spinlock is very small (one bitop and one RMW of an MMIO register), hence converting to a raw spinlock seems a better trade-off than converting the driver to threaded IRQ handling (which would increase latency to handle an interrupt). Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Acked-by: Julia Cartwright Signed-off-by: Linus Walleij commit 623f788d0e7c6ef68d1f42595345bc6c78167702 Author: A.s. Dong Date: Tue Oct 30 14:10:56 2018 +0000 pinctrl: imx: add imx8qxp driver MX8QXP contains a system controller that is responsible for controlling the pad setting of the IPs that are present. Communication between the host processor running an OS and the system controller happens through a SCU protocol. This patch adds the SCU based MX8QXP pinctrl driver. Cc: Linus Walleij Cc: Shawn Guo Cc: Fabio Estevam Cc: Stefan Agner Cc: Pengutronix Kernel Team Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit b96eea718bf697e4a490c2fabfb89995b9193c21 Author: A.s. Dong Date: Tue Oct 30 14:10:51 2018 +0000 pinctrl: fsl: add scu based pinctrl support Some i.MX SoCs (e.g. MX8QXP and MX8QM) contain a system controller that is responsible for controlling the pad setting of the IPs that are present. Communication between the host processor running an OS and the system controller happens through a SCU protocol. This patch classifies the pad settings into two categories: MMIO and SCU. For the original MMIO method, no functional changes except organize them into a few imx_*_mmio() functions. Besides that, we add the SCU based Pad Mux and Pinconf setting support which are implemented in pinctrl-scu.c. Cc: Linus Walleij Cc: Shawn Guo Cc: Fabio Estevam Cc: Stefan Agner Cc: Pengutronix Kernel Team Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit 1ccb0426d7b6a94434a7b4f8d2d7f57de3c1b653 Author: Wolfram Sang Date: Sun Oct 21 22:00:31 2018 +0200 pinctrl: pinctrl-at91-pio4: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Reviewed-by: Alexandre Belloni Acked-by: Ludovic Desroches Signed-off-by: Linus Walleij commit 9f540c3e1d6668d9507f18107dc63113b9a675be Author: Wolfram Sang Date: Sun Oct 21 22:00:30 2018 +0200 pinctrl: pinctrl-amd: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij commit 8fb3d7deaeaf316c784b1f08f16d8050e8ced024 Author: Aleksandr Aleksandrov Date: Mon Oct 15 14:49:50 2018 +0300 arm64: dts: allwinner: new board - Emlid Neutis N5 Emlid Neutis N5 is a SoM based on Allwinner H5, has a WiFi & BT module, DDR3 RAM and eMMC. - add neutis n5 dtsi file for SoM needs - add neutis devboard dts file - add neutis devboard target to dtb makefile Signed-off-by: Aleksandr Aleksandrov Signed-off-by: Maxime Ripard commit f517232c5a95408e43b40aa9337e6b742beaa9da Author: Aleksandr Aleksandrov Date: Mon Oct 15 14:49:49 2018 +0300 dt-bindings: vendor-prefix: new vendor - Emlid Add vendor Emlid Ltd to vendor-prefixes.txt Acked-by: Rob Herring Signed-off-by: Aleksandr Aleksandrov Signed-off-by: Maxime Ripard commit e98d72d98a25890308941080d3a17b4c77e3f460 Author: Jorik Jonker Date: Sat Sep 29 15:18:30 2018 +0200 ARM: dts: sun8i-h3: add sy8106a to orange pi plus The Orange Pi Plus board lacks voltage scaling capabilities in its current form. This results in random freezes during boot when cpufreq is enabled, probably due to wrong voltages. This patch (more or less copy/paste from 06139c) does the following things on this board: - enable r_i2c - add sy8106a to the r_i2c bus - have the sy8106a regulate VDD of cpu Since the Orange Pi Plus has the same PMU setup as the Orange Pi PC, I simply took min/max/fixed/ramp from the latter DTS. In that file the origin of the values are described by the following comment: "The datasheet uses 1.1V as the minimum value of VDD-CPUX, however both the Armbian DVFS table and the official one have operating points with voltage under 1.1V, and both DVFS table are known to work properly at the lowest operating point. Use 1.0V as the minimum voltage instead." I have tested this on patch two Orange Pi Plus boards, by running a kernel with this patch and do intermettent runs of cpuburn while monitoring voltage, frequency and temperature. The board runs stable across its operatiing points while showing a reasonable (< 40C) temperature. My Orange Pi PC, when put to the same test, yields similar stable results. Signed-off-by: Jorik Jonker Signed-off-by: Maxime Ripard commit 2dae149d9219edaa97f87a0282a5695639c27435 Author: Vasily Khoruzhick Date: Mon Oct 8 20:46:09 2018 -0700 arm64: dts: allwinner: add backlight regulator for Pinebook Backlight power is controlled by PH6 GPIO, so add corresponding regulator-fixed node for it. Otherwise backlight won't light up if bootloader doesn't enable it. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit a63ea49a653c5164312aeebf43c50bce5f57ca5a Author: Ondrej Jirman Date: Mon Oct 22 18:43:51 2018 +0200 ARM: dts: sun8i-a83t-tbs-a711: Change MMC0 bus-width to 4 The actual hardware has 4 data lines. Use them. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit 1d02c03b6557b6c0de89eed6cf789c1f30393c6e Author: Jagan Teki Date: Thu Oct 25 20:36:59 2018 +0530 arm64: defconfig: Enable MFD_AXP20X_I2C The Allwinner H6 SoC is paired with the X-Powers AXP805 PMIC connected via I2C. Enable the driver for this PMIC. Signed-off-by: Jagan Teki Acked-by: Maxime Ripard Tested-by: Jagan Teki # OPI-1+ Signed-off-by: Maxime Ripard commit 859783d1390035e29ba850963bded2b4ffdf43b5 Author: Icenowy Zheng Date: Thu Oct 18 15:07:29 2018 +0800 clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock In the user manual of A64 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 , 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. Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard commit b45f2869a7aa067e5499ffe0ac1e32496e559638 Author: A.s. Dong Date: Wed Oct 31 14:43:04 2018 +0000 dt-bindings: gpio: vf610: add optional clocks property On some SoCs(e.g. MX7ULP), GPIO clock is gatable and maybe disabled by default. Users have to make sure it's enabled before being able to access controller registers, otherwise an external abort error may occur. Let's add the optional clocks property to handle this case. For ULP GPIO clock, it includes two separate clocks: one is for GPIO controller Input/Output function clock while another is GPIO port control clock for interrupt function. Cc: Linus Walleij Cc: Mark Rutland Cc: Stefan Agner Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Linus Walleij commit 18534df419041e6c1f4b41af56ee7d41f757815c Author: Muchun Song Date: Thu Nov 1 21:12:50 2018 +0800 gpiolib: Fix possible use after free on label gpiod_request_commit() copies the pointer to the label passed as an argument only to be used later. But there's a chance the caller could immediately free the passed string(e.g., local variable). This could trigger a use after free when we use gpio label(e.g., gpiochip_unlock_as_irq(), gpiochip_is_requested()). To be on the safe side: duplicate the string with kstrdup_const() so that if an unaware user passes an address to a stack-allocated buffer, we won't get the arbitrary label. Also fix gpiod_set_consumer_name(). Signed-off-by: Muchun Song Signed-off-by: Linus Walleij commit 02cb87f79b6dfd17bb16b71ec30652e76c6d8cf2 Author: Colin Ian King Date: Tue Oct 30 14:07:22 2018 +0000 gpio: sch311x: clean an indentation issue, remove extraneous space Trivial fix to clean up an indentation issue, remove space Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij commit ed8dce4c6f726b7f3c6bf40859b92a9e32f189c1 Author: Manivannan Sadhasivam Date: Wed Oct 24 22:59:15 2018 +0530 gpio: pl061: Move irq_chip definition inside struct pl061 Keeping the irq_chip definition static will make it shared with multiple giochips in the system. This practice is considered to be bad and now we will get the below warning from gpiolib core: "detected irqchip that is shared with multiple gpiochips: please fix the driver." Hence, move the irq_chip definition from static to `struct pl061` for using a unique irq_chip for each gpiochip. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij commit 48207d7595d2be604e21228e5a93aaff17e4b808 Author: Uwe Kleine-König Date: Fri Oct 5 21:42:06 2018 +0200 gpio: drop devm_gpiochip_remove() There is hardly any reason to call devm_gpiochip_remove() because the driver core handles calling gpiochip_remove() automatically. To make it harder to introduce new (and probably unneeded) callers, drop the function. Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij commit 25451945648af488077ed61afc59a79710422f31 Author: William Breathitt Gray Date: Mon Oct 22 21:10:20 2018 +0900 gpio: pcie-idio-24: Mask read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit f837bf6acaf54aa8b3a09378f5c8ec1ca2cd3338 Author: William Breathitt Gray Date: Mon Oct 22 21:10:06 2018 +0900 gpio: pci-idio-16: Mask read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit 7a702691d0ceb1a3a2199a1c7a15ddb5fbb50b7d Author: William Breathitt Gray Date: Mon Oct 22 21:09:49 2018 +0900 gpio: ws16c48: Mask read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit 3bfbc44029926e1bc4b89d16f562a364b2c9379e Author: William Breathitt Gray Date: Mon Oct 22 21:09:31 2018 +0900 gpio: gpio-mm: Mask read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit b7f53f67980e72da3317fffc160c746c02c23fb5 Author: William Breathitt Gray Date: Mon Oct 22 21:09:16 2018 +0900 gpio: 104-idi-48e: Mask the read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit f90deea4a6615b7397c559565a4a4eb3ed98dd90 Author: William Breathitt Gray Date: Mon Oct 22 21:08:59 2018 +0900 gpio: 104-dio-48e: Mask read inputs for get_multiple This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij commit 7ddb7dce0ab69aef140a0fb3034a07d356ad9252 Author: Wolfram Sang Date: Sun Oct 21 22:00:00 2018 +0200 gpio: gpio-tegra: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Thierry Reding Signed-off-by: Linus Walleij commit 38ccad0243f9e2f6ab9a852b31b8181b29479b59 Author: Wolfram Sang Date: Sun Oct 21 22:00:01 2018 +0200 gpio: gpio-zynq: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij commit a3f4f728d3bbfe4fc2a8e0d8e5d04b3812e44de0 Author: Wolfram Sang Date: Sun Oct 21 21:59:59 2018 +0200 gpio: gpio-omap: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij commit 11868645c5b534467d6f079a6367ad8fe75c15e8 Author: Wolfram Sang Date: Sun Oct 21 21:59:58 2018 +0200 gpio: gpio-mxc: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij commit ea5ec5e3aeaba45083eeec3de1708afdbeb2abfb Author: Wolfram Sang Date: Sun Oct 21 21:59:57 2018 +0200 gpio: gpio-lynxpoint: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij commit deb19ac533ac2febe52d4058b0ce42109a2571a6 Author: Wolfram Sang Date: Sun Oct 21 21:59:56 2018 +0200 gpio: gpio-dwapb: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Linus Walleij commit 2646b90de5c3492db2ead71337fd4c7d7f549ebe Author: Linus Walleij Date: Fri Oct 26 10:41:22 2018 +0200 gpio: Add global TODO file for GPIO With a new subsystem co-maintainer on board it is good to draw up the ongoing changes and future plans for the subsystem, i.e. what is in my head and being worked on long term. What better way is there than simply adding a TODO right in the code and send it out to the mailing list. Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij commit 5a2a93f1ee186ee7fe61bb09fc3680985b44ba3f Author: Vicente Bergas Date: Tue Oct 30 16:00:49 2018 +0100 arm64: dts: rockchip: move backlight from rk3399 sapphire to excavator The backlight is for the eDP panel and it has the connector on the excavator baseboard. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit 365af3f160f61b7afaa15d5ff6717e7d15ceedee Author: Enric Balletbo i Serra Date: Tue Oct 16 16:13:04 2018 +0200 arm64: dts: rockchip: Use default brightness table for rk3399-gru After commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") the pwm_bl driver is able to calculate a default brightness table. The calculated table for this PWM will have more granularity and will be adjusted to change the brightness linearly to the human eye. Use that table instead of have a DT-defined table with less granularity. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner commit d840db386a57d60da8c2b41b393cd97f47a575e2 Author: Vicente Bergas Date: Tue Oct 30 15:59:41 2018 +0100 arm64: dts: rockchip: add chosen node on rk3399-sapphire In order to use earlycon, the stdout-path property needs to be set in the chosen node. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit cff6d1d6f88bc8763f40f87869e8361fb0dbeb80 Author: Vasily Khoruzhick Date: Sat Oct 20 10:57:56 2018 -0700 arm64: dts: rockchip: enable HS200 for eMMC on rock64 eMMC that's sold by Pine64 can do HS200, rk3328 can do it as well, so update DTS to enable it. Signed-off-by: Vasily Khoruzhick Signed-off-by: Heiko Stuebner commit 6d2520783035c6ec16c8580f319276e2bb427bee Author: Vicente Bergas Date: Sun Sep 30 17:50:33 2018 +0200 arm64: dts: rockchip: add fan on rk3399-sapphire board The Sapphire board has a 12V fan. So, adding it to the DTS. There is no power supply directly connected, it needs the baseboard to work. If the board is used standalone then a hardware modification is needed. On the Sapphire board there is an unpopulated resistor to connect it to VBUS_TYPEC, which is usually 5V (too low) and can range up to 20V (too high). I tested it for a week connected to VCC_SYS which is 8.4V and proved to be more than enough for the required cooling needs. This is the connection described in the comment. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner commit b0fe0f47be46096cb0edf38d015c6b0a4472c7ae Author: Emil Renner Berthing Date: Wed Oct 10 11:00:34 2018 +0200 arm64: dts: rockchip: add rk3399 SPI DMAs Add spi dma channels as specified by the rk3399 TRM. Signed-off-by: Emil Renner Berthing Tested-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner commit 1a9e779679a0e175462d8c3ce4aeea8da120af5b Author: Suzuki K Poulose Date: Wed Sep 12 14:53:45 2018 +0100 arm64: dts: sc9836/sc9860: Update coresight bindings for hardware ports Switch to the new coresight bindings for hw ports Cc: orsonzhai@gmail.com Cc: zhang.lyra@gmail.com Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Chunyan Zhang commit 56b94b02cb079a049d8fe68ce4171f57bfb109b9 Author: Vinod Koul Date: Thu Oct 25 15:06:06 2018 +0100 dmaengine: mmp_pdma: remove dma_slave_config direction usage dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul commit 39db0e136b23b3c2318714013e97f6093e38229d Author: Anson Huang Date: Fri Aug 31 15:53:18 2018 +0800 ARM: dts: imx6: add mmdc ipg clock i.MX6 SoCs has MMDC clock gates in CCM CCGR, add clock property for MMDC driver's clock operation. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit fa86cfe89748abb8558d24c2d16203d1cb02a5a1 Author: Pankaj Bansal Date: Wed Oct 17 10:32:45 2018 +0000 arm64: dts: add LX2160AQDS board support The LX2160A QorIQ Development System (QDS) is a test, evaluation, and development platform, supporting QorIQ LX2160A processor. Signed-off-by: Sriram Dash Signed-off-by: Pankaj Bansal Acked-by: Li Yang Signed-off-by: Shawn Guo commit b068890c34dda4c2a7dd87fa0d291020da0e67f3 Author: Vabhav Sharma Date: Mon Oct 29 08:58:01 2018 +0000 arm64: dts: add LX2160ARDB board support LX2160A reference design board (RDB) is a high-performance computing, evaluation, and development platform with LX2160A SoC. Signed-off-by: Priyanka Jain Signed-off-by: Sriram Dash Signed-off-by: Vabhav Sharma Signed-off-by: Horia Geanta Signed-off-by: Ran Wang Signed-off-by: Zhang Ying-22455 Signed-off-by: Yinbo Zhu Acked-by: Li Yang Signed-off-by: Shawn Guo commit d548c217c6a3cdc6aeb6c8e3457cca2aad5e5738 Author: Vabhav Sharma Date: Mon Oct 29 08:57:54 2018 +0000 arm64: dts: add QorIQ LX2160A SoC support LX2160A SoC is based on Layerscape Chassis Generation 3.2 Architecture. LX2160A features an advanced 16 64-bit ARM v8 CortexA72 processor cores in 8 cluster, CCN508, GICv3,two 64-bit DDR4 memory controller, 8 I2C controllers, 3 dspi, 2 esdhc,2 USB 3.0, mmu 500, 3 SATA, 4 PL011 SBSA UARTs etc. Signed-off-by: Ramneek Mehresh Signed-off-by: Zhang Ying-22455 Signed-off-by: Nipun Gupta Signed-off-by: Priyanka Jain Signed-off-by: Yogesh Gaur Signed-off-by: Sriram Dash Signed-off-by: Vabhav Sharma Signed-off-by: Horia Geanta Signed-off-by: Ran Wang Signed-off-by: Yinbo Zhu Acked-by: Li Yang Signed-off-by: Shawn Guo commit 46f3b54de80958f0246ffcb37a19fd3bf6c8cd04 Author: Joakim Zhang Date: Wed Oct 24 10:25:12 2018 +0000 ARM: dts: imx6qdl-sabreauto: Remove reg property from fixed regulator Drop reg property from fixed regulator and remove the unncessary bus node. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 3aca6e4e6e512b4d7c0fddd1b99955f9aa55c89a Author: Shyam Saini Date: Thu Oct 18 20:33:05 2018 +0530 ARM: dts: imx6qdl-icore: Add missing stdout-path property This would help us to get early boot logs by passing "earlycon" to kernel bootargs. Further, by adding this we don't have to depend on complex earlyprintk configs for early boot logs. Reviewed-by: Fabio Estevam Signed-off-by: Shyam Saini Signed-off-by: Shawn Guo commit c8c23423cc98f56519d7aa6c063603a646850c5c Author: Leonard Crestez Date: Wed Oct 17 12:37:54 2018 +0000 ARM: dts: imx6ull: Add dcp node The DCP block on 6ull has no major differences other than requiring explicit clock enabling. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit a67d2c52a82ff9d6037bf4e6cc5d42e2ccd4cf1d Author: Lukasz Majewski Date: Tue Oct 9 12:50:28 2018 +0200 ARM: dts: Add support for Liebherr's BK4 device (vf610 based) This commit adds DTS support for BK4 device from Liebherr. It uses vf610 SoC from NXP. Signed-off-by: Lukasz Majewski Reviewed-by: Stefan Agner Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 918c9752fb274fde21445de48c22df7515941f7a Author: Markus Kueffner Date: Wed Oct 10 08:32:09 2018 +0200 ARM: dts: imx6qdl-udoo: Add Pincfgs for UART4 Add Pincfgs for UART4 to enable Communication with the onboard SAM3X Signed-off-by: Markus Kueffner Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit ca4b4d373fcc9dc617bb68f4a4f40e1a70ab08a5 Author: Fabio Estevam Date: Thu Sep 27 12:47:46 2018 -0300 ARM: dts: vf610: Add ZII SCU4 AIB board Add support for the ZII SCU 4 board, which has lots of switches and SFF ports. Based on the work from Andrew Lunn. Signed-off-by: Fabio Estevam Reviewed-by: Chris Healy Signed-off-by: Shawn Guo commit df41c2891c088e60f40c768a88f82bf499e7278a Author: Leonard Crestez Date: Wed Oct 17 12:37:55 2018 +0000 ARM: imx_v6_v7_defconfig: Enable CRYPTO_DEV_MXS_DCP This block is present in 6sl, 6sll and 6ull so it should be enabled in the default imx kernel config. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 534245cc69c2a3597d8ed0e7782ae3f563e92c68 Author: Viresh Kumar Date: Wed Jun 27 16:33:25 2018 +0530 OPP: Remove of_dev_pm_opp_find_required_opp() This isn't used anymore, remove it. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 4c6a343e57fe241fa30ab31ac4969561272cc6b2 Author: Viresh Kumar Date: Wed Jun 27 16:29:50 2018 +0530 OPP: Rename and relocate of_genpd_opp_to_performance_state() The OPP core already has the performance state values for each of the genpd's OPPs and there is no need to call the genpd callback again to get the performance state for the case where the end device doesn't have an OPP table and has the "required-opps" property directly in its node. This commit renames of_genpd_opp_to_performance_state() as of_get_required_opp_performance_state() and moves it to the OPP core, as it is all about OPP stuff now. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit ca1b5d77b1c69df7d7b92860c61daa82c8bfde34 Author: Viresh Kumar Date: Thu Jun 14 10:03:26 2018 +0530 OPP: Configure all required OPPs Now that all the infrastructure is in place to support multiple required OPPs, lets switch over to using it. A new internal routine _set_required_opps() takes care of updating performance state for all the required OPPs. With this the performance state updates are supported even when the end device needs to configure regulators as well, that wasn't the case earlier. The pstates were earlier stored in the end device's OPP structures, that also changes now as those values are stored in the genpd's OPP structures. And so we switch over to using pm_genpd_opp_to_performance_state() instead of of_genpd_opp_to_performance_state() to get performance state for the genpd OPPs. The routine _generic_set_opp_domain() is not required anymore and is removed. On errors we don't try to recover by reverting to old settings as things are really complex now and the calls here should never really fail unless there is a bug. There is no point increasing the complexity, for code which will never be executed. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 4f018bc0e1cfdec2e25072db9fecc1f363ba79ea Author: Viresh Kumar Date: Tue Jun 26 16:29:34 2018 +0530 OPP: Add dev_pm_opp_{set|put}_genpd_virt_dev() helper Multiple generic power domains for a consumer device are supported with the help of virtual devices, which are created for each consumer device - genpd pair. These are the device structures which are attached to the power domain and are required by the OPP core to set the performance state of the genpd. The helpers added by this commit are required to be called once for each of these virtual devices. These are required only if multiple domains are available for a device, otherwise the actual device structure will be used instead by the OPP core. The new helpers also support the complex cases where the consumer device wouldn't always require all the domains. For example, a camera may require only one power domain during normal operations but two during high resolution operations. The consumer driver can call dev_pm_opp_put_genpd_virt_dev(high_resolution_genpd_virt_dev) if it is currently operating in the normal mode and doesn't have any performance requirements from the genpd which manages high resolution power requirements. The consumer driver can later call dev_pm_opp_set_genpd_virt_dev(high_resolution_genpd_virt_dev) once it switches back to the high resolution mode. The new helpers differ from other OPP set/put helpers as the new ones can be called with OPPs initialized for the table as we may need to call them on the fly because of the complex case explained above. For this reason it is possible that the genpd virt_dev structure may be used in parallel while the new helpers are running and a new mutex is added to protect against that. We didn't use the existing opp_table->lock mutex as that is widely used in the OPP core and we will need this lock in the dev_pm_opp_set_rate() helper while changing OPP and we need to make sure there is not much contention while doing that as that's the hotpath. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit e38f89d310fcc543b0b94594a92db1d6cfbd9376 Author: Viresh Kumar Date: Wed Jun 13 20:22:04 2018 +0530 PM / Domains: Add genpd_opp_to_performance_state() The OPP core currently stores the performance state in the consumer device's OPP table, but that is going to change going forward and performance state will rather be set directly in the genpd's OPP table. For that we need to get the performance state for genpd's device structure (genpd->dev) instead of the consumer device's structure. Add a new helper to do that. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit da544b61eb5541db8827af0beab618daead88a34 Author: Viresh Kumar Date: Thu Jun 7 14:50:43 2018 +0530 OPP: Populate OPPs from "required-opps" property An earlier commit populated the OPP tables from the "required-opps" property, this commit populates the individual OPPs. This is repeated for each OPP in the OPP table and these populated OPPs will be used by later commits. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 5d6d106fa45501ea6494a8653adbf2bee4a6f803 Author: Viresh Kumar Date: Thu Jun 7 14:50:43 2018 +0530 OPP: Populate required opp tables from "required-opps" property The current implementation works only for the case where a single phandle is present in the "required-opps" property, while DT allows multiple phandles to be present there. This patch adds new infrastructure to parse all the phandles present in "required-opps" property and save pointers of the required OPP's OPP tables. These will be used by later commits. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 7e535993fa4f671dbbd7fd95c93ce90181ddd9e1 Author: Viresh Kumar Date: Tue Jun 12 14:47:03 2018 +0530 OPP: Separate out custom OPP handler specific code Create a separate routine to take care of custom set_opp() handler specific stuff. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 61d8e7c73b0b55a529fe7e9cb0cccccf50ee967a Author: Viresh Kumar Date: Wed Jun 13 16:00:11 2018 +0530 OPP: Identify and mark genpd OPP tables We need to handle genpd OPP tables differently, this is already the case at one location and will be extended going forward. Add another field to the OPP table to check if the table belongs to a genpd or not. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 560928b27b38840a1dd8d6bdb7629b7ffcf6a8d8 Author: Viresh Kumar Date: Thu Oct 25 09:07:38 2018 +0530 PM / Domains: Rename genpd virtual devices as virt_dev There are several struct device instances that genpd core handles. The most common one is the consumer device structure, which is named (correctly) as "dev" within genpd core. The second one is the genpd's device structure, referenced as genpd->dev. The third one is the virtual device structures created by the genpd core to represent the consumer device for multiple power domain case, currently named as genpd_dev. The naming of these virtual devices isn't very clear or readable and it looks more like the genpd->dev. Rename the virtual device instances within the genpd core as "virt_dev". Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar commit ff1cdc94de4d336be45336d70709dfcf3d682514 Author: Muchun Song Date: Fri Oct 26 21:17:43 2018 +0800 sched/core: Introduce set_next_task() helper for better code readability When we pick the next task, we will do the following for the task: 1) p->se.exec_start = rq_clock_task(rq); 2) dequeue_pushable(_dl)_task(rq, p); When we call set_curr_task(), we also need to do the same thing above. In rt.c, the code at 1) is in the _pick_next_task_rt() and the code at 2) is in the pick_next_task_rt(). If we put two operations in one function, maybe better. So, we introduce a new function set_next_task(), which is responsible for doing the above. By introducing the function we can get rid of calling the dequeue_pushable(_dl)_task() directly(We can call set_next_task()) in pick_next_task() and have better code readability and reuse. In set_curr_task_rt(), we also can call set_next_task(). Do this things such that we end up with: static struct task_struct *pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) { /* do something else ... */ put_prev_task(rq, prev); /* pick next task p */ set_next_task(rq, p); /* do something else ... */ } put_prev_task() can match set_next_task(), which can make the code more readable. Signed-off-by: Muchun Song Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20181026131743.21786-1-smuchun@gmail.com Signed-off-by: Ingo Molnar commit 3f130a37c442d5c4d66531b240ebe9abfef426b5 Author: Valentin Schneider Date: Wed Sep 26 16:12:07 2018 +0100 sched/fair: Don't increase sd->balance_interval on newidle balance When load_balance() fails to move some load because of task affinity, we end up increasing sd->balance_interval to delay the next periodic balance in the hopes that next time we look, that annoying pinned task(s) will be gone. However, idle_balance() pays no attention to sd->balance_interval, yet it will still lead to an increase in balance_interval in case of pinned tasks. If we're going through several newidle balances (e.g. we have a periodic task), this can lead to a huge increase of the balance_interval in a very small amount of time. To prevent that, don't increase the balance interval when going through a newidle balance. This is a similar approach to what is done in commit 58b26c4c0257 ("sched: Increment cache_nice_tries only on periodic lb"), where we disregard newidle balance and rely on periodic balance for more stable results. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar.Eggemann@arm.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: patrick.bellasi@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1537974727-30788-2-git-send-email-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit 47b7aee14fd7e453370a5d15dfb11c958ca360f2 Author: Valentin Schneider Date: Wed Sep 26 16:12:06 2018 +0100 sched/fair: Clean up load_balance() condition The alignment of the condition is off, clean that up. Also, logical operators have lower precedence than bitwise/relational operators, so remove one layer of parentheses to make the condition a bit simpler to follow. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar.Eggemann@arm.com Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: patrick.bellasi@arm.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1537974727-30788-1-git-send-email-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit 80fc9c457e99a6f568a56743dcd8ad8851723f5f Author: Charles-Antoine Couret Date: Mon Oct 22 23:02:43 2018 +0200 dt-bindings: iio: adc: Add AD7949 device tree bindings in documentation Description how to invoke ad7949 driver from device tree file. Signed-off-by: Charles-Antoine Couret Signed-off-by: Jonathan Cameron commit 7f40e0614317f20ac07b5aa5cec2eb43737e28d6 Author: Charles-Antoine Couret Date: Mon Oct 22 23:02:42 2018 +0200 iio:adc:ad7949: Add AD7949 ADC driver family Compatible with AD7682 and AD7689 chips. It is a Analog Devices ADC driver 14/16 bits 4/8 channels with SPI protocol Datasheet of the device: http://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf Signed-off-by: Charles-Antoine Couret Signed-off-by: Jonathan Cameron commit 3138bbc12915d3b894b70e8f9dc44de2948c1c25 Author: Victor Colombo Date: Mon Oct 22 17:41:27 2018 -0300 staging: iio: ad5933: Remove unnecessary blank line This patch fixes the checkpatch.pl warning: WARNING: Blank lines aren't necessary before a close brace '}' Signed-off-by: Victor Colombo Signed-off-by: Jonathan Cameron commit e147791fa13dea35b62ac80f885dbb9378bc0976 Author: Victor Colombo Date: Mon Oct 22 17:40:25 2018 -0300 staging: iio: ad5933: Remove unnecessary space on casting This patch fixes the checkpatch.pl warning: WARNING: No space is necessary after a cast Signed-off-by: Victor Colombo Signed-off-by: Jonathan Cameron commit 7d1d308a47b7db8b546d07d1be1a851612107b05 Author: Dan O'Donovan Date: Thu Oct 25 16:35:42 2018 +0100 iio: adc128s052: use SPDX-License-Identifier This updates the ti-adc128s052.c file to use SPDX-License-Identifier instead of more verbose license text. Signed-off-by: Dan O'Donovan Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit bd5d54e4d49d4cd46a938e59fc4ef21d05811d1c Author: Nicola Lunghi Date: Thu Oct 25 16:35:41 2018 +0100 iio: adc128s052: add ACPI _HID AANT1280 ACPI _HID AANT1280 matches an ADC124S101 present on E3940 SKUs of the UP Squared board. Add it to the driver. Signed-off-by: Nicola Lunghi [javier@emutex.com: fix up commit message and one checkpatch warning] Signed-off-by: Javier Arteaga Signed-off-by: Dan O'Donovan Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 37cd3c8768edc753d4323c338205ebf430fa43fb Author: Javier Arteaga Date: Thu Oct 25 16:35:40 2018 +0100 iio: adc128s052: Add pin-compatible IDs The datasheets for ADC122S021 and ADC124S021 list two more pin-compatible alternatives for each device. Add their IDs as compatible strings. Suggested-by: Jonathan Cameron Signed-off-by: Javier Arteaga Signed-off-by: Dan O'Donovan Reviewed-by: Andy Shevchenko Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 857d828374cc84d07c7b94db2cf535aa517444dd Author: Anusha Srivatsa Date: Thu Nov 1 21:14:55 2018 -0700 drm/dp/fec: DRM helper for Forward Error Correction DP 1.4 has Forward Error Correction Support(FEC). Add helper function to check if the sink device supports FEC. v2: Separate the helper and the code that uses the helper into two separate patches. (Manasi) v3: - Move the code to drm_dp_helper.c (Manasi) - change the return type, code style changes (Gaurav) - Use drm_dp_dpcd_readb instead of drm_dp_dpcd_read. (Jani) v4: - Avoid aux reads everytime, instead read cached values of dpcd register (jani) - Move helper to drm_dp_helper.h like other dsc helpers.(Anusha) v5: rebased. Change the helper parameter suitably. Cc: Ville Syrjala Cc: Jani Nikula Cc: Manasi Navare Acked-by: Sean Paul (For merging through drm-intel) Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181102041455.15818-2-anusha.srivatsa@intel.com commit 08cadae8e1570c069f639a86fe4370485094552c Author: Anusha Srivatsa Date: Thu Nov 1 21:14:54 2018 -0700 i915/dp/fec: Cache the FEC_CAPABLE DPCD register Similar to DSC DPCD registers, let us cache FEC_CAPABLE register to avoid using stale values. With this we can avoid aux reads everytime and instead read the cached values. v2: Avoid using memset and array for a single field. (Manasi,Jani) v3: Print FEC CAPABILITY value. (Manasi) Suggested-by: Jani Nikula Cc: Jani Nikula Cc: Ville Syrjala Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181102041455.15818-1-anusha.srivatsa@intel.com commit 6caec6a04717c01cb31d018ff60d5a3c32eb32b9 Author: Daniel Vetter Date: Fri Nov 2 15:31:07 2018 +0100 drm/lease: drop EXPORT_SYMBOL Leases are entirely implemented within drm.ko, no need to even tempt drivers into doing nasty things. And if there's really a need, we can always re-export these again. Cc: Keith Packard Cc: Dave Airlie Acked-by: Keith Packard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181102143107.25722-1-daniel.vetter@ffwll.ch commit 83b466b1dc5f0b4d33f0a901e8b00197a8f3582d Author: Chris Wilson Date: Fri Nov 2 16:12:09 2018 +0000 drm/i915: Mark pin flags as u64 Since the flags are being used to operate on a u64 variable, they too need to be marked as such so that the inverses are full width (and not zero extended on 32b kernels and bdw+). Reported-by: Sergii Romantsov Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Lionel Landwerlin Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20181102161232.17742-2-chris@chris-wilson.co.uk commit 0ec712e36c1d5bafe6e65e53a19f136b778866cd Author: Len Brown Date: Fri Sep 21 22:26:57 2018 -0400 tools/power turbostat: reduce debug output A recent turbostat release increased topo.max_cpu_num to make it convenient to handle sysfs bitmaps of 32-cpus. But users, who regularly make use of "--debug", then saw a bunch of output for cpus that were not present. Remove that extra output by checking a cpu is online before dumping its info. Signed-off-by: Len Brown Cc: Prarit Bhargava commit 3404155190ce09a1e5d8407e968fc19aac4493e3 Author: Len Brown Date: Tue Aug 7 20:22:28 2018 -0400 tools/power turbosat: fix AMD APIC-id output turbostat recently gained a feature adding APIC and X2APIC columns. While they are disabled by-default, they are enabled with --debug or when explicitly requested, eg. $ sudo turbostat --quiet --show Package,Node,Core,CPU,APIC,X2APIC date But these columns erroneously showed zeros on AMD hardware. This patch corrects the APIC and X2APIC [sic] columns on AMD. Signed-off-by: Len Brown commit a6576a8d715ae73a7e07bae4cde2c55a066501e6 Author: Anusha Srivatsa Date: Thu Nov 1 11:55:57 2018 -0700 drm/i915/fia: FIA registers offset implementation. The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers. v2: - Follow spec for numbering - s/0/1(Lucas) - s/FIA_1/FIA1_BASE (Anusha) v3: - Remove register offset defines. (Jani) - Update comment. (Anusha) v4: rebase. Remove comment.(Lucas) Cc: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101185557.29585-1-anusha.srivatsa@intel.com commit 0019457e31b2ebf3fab38c20c8097e658daea9b8 Author: Ville Syrjälä Date: Wed Oct 24 18:48:25 2018 +0300 ALSA: x86: Rip out the lpe audio runtime suspend/resume hooks Ever since commit 46e831abe864 ("drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"") the runtime suspend/resume hooks are no longer used. Inline them into the system suspend hooks. Cc: Chris Wilson Cc: Takashi Iwai Cc: Pierre-Louis Bossart Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181024154825.18185-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Acked-by: Takashi Iwai commit 8dfb839cfe737a17def8e5f88ee13c295230364a Author: Ville Syrjälä Date: Wed Oct 24 18:48:24 2018 +0300 ALSA: x86: Fix runtime PM for hdmi-lpe-audio Commit 46e831abe864 ("drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"") broke runtime PM with lpe audio. We can no longer runtime suspend the GPU since the sysfs power/control for the lpe-audio device no longer exists and the device is considered always active. We can fix this by not marking the device as active. Cc: Chris Wilson Cc: Takashi Iwai Cc: Pierre-Louis Bossart Fixes: 46e831abe864 ("drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181024154825.18185-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Acked-by: Takashi Iwai commit f1a1217222a24775eaaafbcbd386101dc44f8a81 Author: Radhakrishna Sripada Date: Mon Oct 22 18:44:00 2018 -0700 drm/i915: Allow "max bpc" property to limit pipe_bpp Use the newly added "max bpc" connector property to limit pipe bpp. V3: Use drm_connector_state to access the "max bpc" property V4: Initialize the drm property, add suuport to DP(Ville) V5: Use the property in the connector and fix CI failure(Ville) V6: Use the core function to attach max_bpc property, remove the redundant clamping of pipe bpp based on connector info V7: Fix Checkpatch warnings V9: Cleanup connected_sink_max_bpp and fix initial value in DP(Ville) V12: Fix debug message(Ville) V13: Remove the redundant check and simplify the check logic(Stan) V14: Fix the check in connected_sink_max_bpp(Stan) v15 (From Manasi): Add missing break (Stan) Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Rodrigo Vivi Cc: Kishore Kadiyala Cc: Manasi Navare Cc: Stanislav Lisovskiy Signed-off-by: Radhakrishna Sripada Reviewed-by: Stanislav Lisovskiy Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181023014400.16055-1-manasi.d.navare@intel.com commit 47e22ff1a9e0c144611bd063b3e6135f9a269503 Author: Radhakrishna Sripada Date: Fri Oct 12 11:42:32 2018 -0700 drm: Add connector property to limit max bpc At times 12bpc HDMI cannot be driven due to faulty cables, dongles level shifters etc. To workaround them we may need to drive the output at a lower bpc. Currently the user space does not have a way to limit the bpc. The default bpc to be programmed is decided by the driver and is run against connector limitations. Creating a new connector property "max bpc" in order to limit the bpc. xrandr can make use of this connector property to make sure that bpc does not exceed the configured value. This property can be used by userspace to set the bpc. V2: Initialize max_bpc to satisfy kms_properties V3: Move the property to drm_connector V4: Split drm and i915 components(Ville) V5: Make the property per connector(Ville) V6: Compare the requested bpc to connector bpc(Daniel) Move the attach_property function to core(Ville) V7: Fix checkpatch warnings V8: Simplify the connector check code(Ville) V9: Const display_info(Ville) V10,V11: Fix CI issues. V12: Add the Kernel documentation(Daniel) V14: Crossreference the function name in the doc(Daniel) Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Kishore Kadiyala Cc: Rodrigo Vivi Cc: Manasi Navare Cc: Stanislav Lisovskiy Cc: Sunpeng Li Acked-by: Daniel Vetter Signed-off-by: Radhakrishna Sripada Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181012184233.29250-1-radhakrishna.sripada@intel.com commit 9341c668c8c0993452559f278345b2a490ba3ee9 Author: Alexandru-Cosmin Gheorghe Date: Fri Nov 2 13:01:25 2018 +0000 drm/selftests: Fix build warning -Wframe-larger-than It seems for some random configuration drm_device is bigger than 2048 bytes. The fix is to make the mock objects static variables. Bug reported by 0-DAY Kernel test infrastructure here: https://lists.01.org/pipermail/kbuild-all/2018-November/054431.html Fixes: 6ff3d9ffdcbb ("drm/selftests: Add tests for drm_internal_framebuffer_create") Signed-off-by: Alexandru-Cosmin Gheorghe Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181102130103.7753-1-alexandru-cosmin.gheorghe@arm.com commit 5468a543409653a94344671371ff784703fdcb26 Author: Jani Nikula Date: Fri Nov 2 12:04:11 2018 +0200 drm/i915: Update DRIVER_DATE to 20181102 Signed-off-by: Jani Nikula commit 6ff3d9ffdcbbe24e8185b254d92d6db44ad55506 Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:33 2018 +0000 drm/selftests: Add tests for drm_internal_framebuffer_create Add tests that verify that drm_internal_framebuffer_create creates buffers correctly by creating a dummy drm_device with a mock function for the fb_create callback. To decide if a buffer has been created or not it just checks if fb_create callback has been called for the particular drm_mode_fb_cmd2 that's being tested. Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-8-alexandru-cosmin.gheorghe@arm.com commit 9aefed1f74989eebb430fd0b0bbc3f87da33d0ec Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:32 2018 +0000 drm: Add macro to export functions only when CONFIG_DRM_DEBUG_SELFTEST is enabled If we want to be able to write drmselftests for non-static core functions that are not intended to be used by drivers we need this functions to be exported. This adds a macro that is tied of CONFIG_DRM_DEBUG_SELFTEST, and uses that to export drm_internal_framebuffer_create, in order for subsequent patches to be able to test it. Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-7-alexandru-cosmin.gheorghe@arm.com commit 0d1c7d0fa9d77462c384dbf8e7fdd2c12f50e651 Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:32 2018 +0000 drm/selftests: Add tests for drm_format_info* helpers Add selftests for the following newly added functions: - drm_format_info_block_width - drm_format_info_block_height - drm_format_info_min_pitch Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-6-alexandru-cosmin.gheorghe@arm.com commit 8db2dc852941cf1bc9ea22b4ba5c14b8c9ab7194 Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:31 2018 +0000 drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0 For formats that are supported only with non-linear modifiers it doesn't make to much sense to define cpp or char_per_block, so that will be set to 0. This patch adds a restriction to force having a modifier attached when cpp/char_per_block is 0, and to bypass checking the pitch restriction. This had been discussed here. [1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2018-09-13&show_html=true Reviewed-by: Brian Starkey Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-5-alexandru-cosmin.gheorghe@arm.com commit 55bc277d122402f3ee9f16cb037ec9a9ccd601e9 Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:31 2018 +0000 drm: mali-dp: Enable Mali-DP tiled buffer formats Enable the following formats - DRM_FORMAT_X0L0: DP650 - DRM_FORMAT_X0L2: DP550, DP650 Reviewed-by: Brian Starkey Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-4-alexandru-cosmin.gheorghe@arm.com commit 697b6b85042ef0fb9838e3100700eed727c211e9 Author: Alexandru Gheorghe Date: Thu Nov 1 15:11:30 2018 +0000 drm/fourcc: Add fourcc for Mali linear tiled formats Mali-DP implements a number of tiled yuv formats which are not currently described in drm_fourcc.h. This adds those definitions and describes their memory layout by using the newly added char_per_block, block_w, block_h. Reviewed-by: Brian Starkey Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-3-alexandru-cosmin.gheorghe@arm.com commit 042bf753842ddbddcf3d4c29f21a8905d6a33e79 Author: Alexandru Gheorghe Date: Thu Nov 1 17:02:05 2018 +0000 drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info For some pixel formats .cpp structure in drm_format info it's not enough to describe the peculiarities of the pixel layout, for example tiled formats or packed formats at bit level. What's implemented here is to add three new members to drm_format_info that could describe such formats: - char_per_block[3] - block_w[3] - block_h[3] char_per_block will be put in a union alongside cpp, for transparent compatibility with the existing format descriptions. Regarding, block_w and block_h they are intended to be used through their equivalent getters drm_format_info_block_width / drm_format_info_block_height, the reason of the getters is to abstract the fact that for normal formats block_w and block_h will be unset/0, but the methods will be returning 1. Additionally, convenience function drm_format_info_min_pitch had been added that computes the minimum required pitch for a given pixel format and buffer width. Using that the following drm core functions had been updated to generically handle both block and non-block formats: - drm_fb_cma_get_gem_addr: for block formats it will just return the beginning of the block. - framebuffer_check: Use the newly added drm_format_info_min_pitch. - drm_gem_fb_create_with_funcs: Use the newly added drm_format_info_min_pitch. - In places where is not expecting to handle block formats, like fbdev helpers I just added some warnings in case the block width/height are greater than 1. Changes since v3: - Add helper function for computing the minimum required pitch. - Improve/cleanup documentation Changes since v8: - Fixed build on 32bits arm architectures, with: - return DIV_ROUND_UP((u64)buffer_width * info->char_per_block[plane], + return DIV_ROUND_UP_ULL((u64)buffer_width * info->char_per_block[plane], Reviewed-by: Brian Starkey Reviewed-by: Daniel Vetter Signed-off-by: Alexandru Gheorghe Link: https://patchwork.freedesktop.org/patch/msgid/20181101170055.5433-1-alexandru-cosmin.gheorghe@arm.com commit fcec4163afa5f32a4aa31245a699c743fa33e2e7 Author: Linus Walleij Date: Fri Oct 26 13:13:34 2018 +0200 drm/panel: Add simple panel mode for the ARM RTSM Having failed any attempts at a more generic solution, I fall back to the very specific solution: define a simple panel for the ARM RTSM emulated platforms. I am doing this so we can convert all old users from the previous fbdev driver to the PL111 DRM driver. This works fine as far as I can test, provided the device tree for RTSM AEMv8 is augmented accordingly. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Mali DP Maintainers Cc: Robin Murphy Reviewed-by: Liviu Dudau Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181026111334.3365-1-linus.walleij@linaro.org commit a7c0149f1678d1dcb15e10789975095ac5708ce9 Author: Jani Nikula Date: Wed Oct 31 13:04:53 2018 +0200 drm/i915: also group device info array helper macros with others Keep the register choosing macros together. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181031110453.12722-4-jani.nikula@intel.com commit 8d97b4a9364634368da4afb8fc38c17f2e79b886 Author: Jani Nikula Date: Wed Oct 31 13:04:52 2018 +0200 drm/i915: reorder and reindent the register choosing helper wrappers Try to make it slightly less of an eye sore. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181031110453.12722-3-jani.nikula@intel.com commit 2fcc2fd0d60a4d88aa16bc50b8f8b4b8b0330588 Author: Jani Nikula Date: Wed Oct 31 13:04:51 2018 +0200 drm/i915: define _MMIO_PLANE() in terms of _PLANE() not _MMIO_PIPE() Minor semantic nit, no functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181031110453.12722-2-jani.nikula@intel.com commit 74c1e826427ae594a094142cd54e1b8c4c0d6106 Author: Jani Nikula Date: Wed Oct 31 13:04:50 2018 +0200 drm/i915: remove palette_offsets from device info in favor of _PICK() The device info offset arrays for unevenly spaced register offsets is great for widely used registers. However, the palette registers are only used in one function, i9xx_load_luts_internal(), and only for GMCH platforms, wasting device info. Replace palette_offsets with _PICK() in palette register definition. While the use of _PICK() does not check for pipe C existence, neither does the current offset array usage, and leads to bogus address when pipe C is passed to PALETTE() on non-CHV. Using _PICK() at least leads to a sensible register offset, just non-existing on non-CHV. Either way, this shouldn't happen anyway. Remove unused old palette macros while at it. Bloat-o-meter results below for completeness. add/remove: 0/0 grow/shrink: 3/6 up/down: 94/-278 (-184) Function old new delta i9xx_load_luts_internal 394 483 +89 i915_driver_load 5103 5107 +4 g4x_pre_enable_dp 378 379 +1 intel_engines_init_mmio 1117 1116 -1 intel_engine_lookup_user 47 46 -1 hdmi_port_clock_valid 310 309 -1 gen11_irq_handler 707 706 -1 intel_device_info_dump_runtime 329 311 -18 intel_device_info_runtime_init 5166 4910 -256 Total: Before=918650, After=918466, chg -0.02% add/remove: 0/0 grow/shrink: 0/48 up/down: 0/-576 (-576) Data old new delta intel_valleyview_info 200 188 -12 intel_skylake_gt4_info 200 188 -12 intel_skylake_gt3_info 200 188 -12 intel_skylake_gt2_info 200 188 -12 intel_skylake_gt1_info 200 188 -12 intel_sandybridge_m_gt2_info 200 188 -12 intel_sandybridge_m_gt1_info 200 188 -12 intel_sandybridge_d_gt2_info 200 188 -12 intel_sandybridge_d_gt1_info 200 188 -12 intel_pineview_info 200 188 -12 intel_kabylake_gt3_info 200 188 -12 intel_kabylake_gt2_info 200 188 -12 intel_kabylake_gt1_info 200 188 -12 intel_ivybridge_q_info 200 188 -12 intel_ivybridge_m_gt2_info 200 188 -12 intel_ivybridge_m_gt1_info 200 188 -12 intel_ivybridge_d_gt2_info 200 188 -12 intel_ivybridge_d_gt1_info 200 188 -12 intel_ironlake_m_info 200 188 -12 intel_ironlake_d_info 200 188 -12 intel_icelake_11_info 200 188 -12 intel_i965gm_info 200 188 -12 intel_i965g_info 200 188 -12 intel_i945gm_info 200 188 -12 intel_i945g_info 200 188 -12 intel_i915gm_info 200 188 -12 intel_i915g_info 200 188 -12 intel_i865g_info 200 188 -12 intel_i85x_info 200 188 -12 intel_i845g_info 200 188 -12 intel_i830_info 200 188 -12 intel_haswell_gt3_info 200 188 -12 intel_haswell_gt2_info 200 188 -12 intel_haswell_gt1_info 200 188 -12 intel_gm45_info 200 188 -12 intel_geminilake_info 200 188 -12 intel_g45_info 200 188 -12 intel_g33_info 200 188 -12 intel_coffeelake_gt3_info 200 188 -12 intel_coffeelake_gt2_info 200 188 -12 intel_coffeelake_gt1_info 200 188 -12 intel_cherryview_info 200 188 -12 intel_cannonlake_info 200 188 -12 intel_broxton_info 200 188 -12 intel_broadwell_rsvd_info 200 188 -12 intel_broadwell_gt3_info 200 188 -12 intel_broadwell_gt2_info 200 188 -12 intel_broadwell_gt1_info 200 188 -12 Total: Before=195529, After=194953, chg -0.29% Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181031110453.12722-1-jani.nikula@intel.com commit 7a085c3aad94cce7e11031c6800e41668418ae4c Merge: 18cde299df33f f9885ef875e91 Author: Jani Nikula Date: Fri Nov 2 09:00:55 2018 +0200 Merge drm/drm-next into drm-intel-next-queued Although there's nothing crucial missing, it's been a long time since the last backmerge. Catch up with drm-next. Signed-off-by: Jani Nikula commit 18cde299df33ff73908f7e5dcebf321fb79ed36c Author: Anusha Srivatsa Date: Thu Nov 1 14:42:16 2018 -0700 drm/i915/icl: Fix DSS_CTL register names This patch fixes the naming of the registers: s/PIPE_DSS_CTL/ICL_PIPE_DSS_CTL And also fix the hex values to lower case, to match rest of the definitions. Manasi noticed this with the patch that was merged. v2: fix "Fixes" tag. Fixes: 8b1b558d690a ("drm/i915/icl: Add DSS_CTL Registers") Suggested-by: Manasi Navare Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181101214216.8958-1-anusha.srivatsa@intel.com commit 70332ac539c5c5dffede580fe8986dcfc0751d55 Author: Imre Deak Date: Thu Nov 1 16:04:27 2018 +0200 drm/i915/icl+: Sanitize port to PLL mapping BIOS can leave the PLL to port mapping enabled, even if the corresponding encoder is disabled. Disable the port mapping in this case. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-9-imre.deak@intel.com commit c7375d9542f121049ff90562c5828e5843747c9a Author: Imre Deak Date: Thu Nov 1 16:04:26 2018 +0200 drm/i915: Configure AUX_CH_CTL when enabling the AUX power domain Most of the AUX_CH_CTL flags are concerned with DP AUX transfer parameters. As opposed to this the flag specifying the thunderbolt vs. non-thunderbolt mode of the port is not related to AUX transfers at all (rather it's repurposed to enable either TBT or non-TBT PHY HW blocks). The programming has to be done before enabling the corresponding AUX power well, so make it part of the power well code. v3: - Use existing enable/disable helpers instead of opencoding. (Jose) - Fix type of is_tc_tbt to remain a bitfield. (Lucas) - Add comment describing the is_tc_tbt power well flag. (Lucas) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108548 Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-8-imre.deak@intel.com commit 8e4a3ad9b81b7b595676c5fa88cd44a1b788be2e Author: Imre Deak Date: Thu Nov 1 16:04:25 2018 +0200 drm/i915: Enable AUX power for HDMI DDI/TypeC main link too DDI/TypeC ports need the AUX power domain for main link functionality even when they operate in HDMI static mode, so enable the power domain for these ports too. v4: - Rebase on the upstream ICL pre_pll_enable change. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Cc: Manasi Navare Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-7-imre.deak@intel.com commit bdaa29b6bea7cd89dd866be2038fa66e2a3ab40d Author: Imre Deak Date: Thu Nov 1 16:04:24 2018 +0200 drm/i915: Enable AUX power earlier For DDI/TypeC ports the AUX power domain needs to be enabled before the port's PLL is enabled, so move the enabling earlier accordingly. v2: - Preserve the pre_pll hook for GEN9_LP. (Ville) v3: - Add related BSpec entries to commit log. (Jose) v4: - Rebase on the upstream ICL pre_pll_enable change. BSpec: 21750, 22243 Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Manasi Navare Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-6-imre.deak@intel.com commit 337837ac3a75f126b53a522bebf2d8b3e82b105b Author: Imre Deak Date: Thu Nov 1 16:04:23 2018 +0200 drm/i915: Use a helper to get the aux power domain From ICL onwards the AUX power domain may change dynamically based on whether a DDI/TypeC port is in thunderbolt or non-thunderbolt mode, so use a helper function instead of a static field to get the current domain. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-5-imre.deak@intel.com commit ac897d6bd7035390d621c283769b19a488ee15bc Author: Imre Deak Date: Thu Nov 1 16:04:22 2018 +0200 drm/i915: Init aux_ch for HDMI ports too From ICL onwards DDI/TypeC ports - even in HDMI static mode - need to know which AUX CH belongs to them, so initialize aux_ch for those ports too. For consistency do this for all HDMI ports, not only for DDI/TypeC ones. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-4-imre.deak@intel.com commit 563d22a0394856a5d984c48b94312ef614fce841 Author: Imre Deak Date: Thu Nov 1 16:04:21 2018 +0200 drm/i915: Move aux_ch to intel_digital_port From ICL onwards all DDI/TypeC ports - even working in HDMI mode - need to know their corresponding AUX CH, so move the field to a common struct. No functional change. v3: - Add code comment about which ports aux_ch is used for. (Jose) Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-3-imre.deak@intel.com commit 15d248ae374a0e1672b79ddaa2596e6166641b7c Author: Imre Deak Date: Thu Nov 1 16:04:20 2018 +0200 drm/i915: Move intel_aux_ch() to intel_bios.c From ICL onwards all the DDI/TypeC ports - even working in HDMI mode - need to know their corresponding AUX channel, so move the corresponding helper to a common place. No functional change. v4: - Fix 'no space is necessary after a cast' checkpatch warn. Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181101140427.31026-2-imre.deak@intel.com commit f57f9371e285ce551960ce78852db44fa3c83df9 Author: Oscar Mateo Date: Tue Oct 30 01:45:04 2018 -0700 drm/i915/icl: WaAllowUMDToModifySamplerMode Required for Bindless samplers. Userspace consumer: mesa V2: Rebase V3: Update commit message Cc: Anusha Srivatsa Cc: Mika Kuoppala Signed-off-by: Oscar Mateo Signed-off-by: Radhakrishna Sripada Reviewed-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030084504.21537-4-radhakrishna.sripada@intel.com commit 6a00b8feb86dbf7afa55d378946195e6a3b56b6e Author: Oscar Mateo Date: Tue Oct 30 01:45:03 2018 -0700 drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken7 Required to dinamically set 'Trilinear Filter Quality Mode' Userpsace consumer is mesa. V2: Rebase V3: Update commit message Cc: Mika Kuoppala Cc: Anusha Srivatsa Signed-off-by: Oscar Mateo Signed-off-by: Radhakrishna Sripada Reviewed-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030084504.21537-3-radhakrishna.sripada@intel.com commit 22dae8a0cc531e75a969b2ab983774c95f6a448e Author: Radhakrishna Sripada Date: Tue Oct 30 01:45:02 2018 -0700 drm/i915/icl: Implement Display WA_1405510057 Display WA_1405510057 asks to not enable YUV 420 HDMI 10bpc when horizontal blank size mod 8 reminder is 2. V2: Rebase(r-b: Anusha) V3: crtc_state->s/ycbcr420/output_format/ Cc: Anusha Srivatsa Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: Radhakrishna Sripada Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030084504.21537-2-radhakrishna.sripada@intel.com commit 622b3f68139e93266447ddb584ad7e057c85627e Author: Radhakrishna Sripada Date: Tue Oct 30 01:45:01 2018 -0700 drm/i915/icl: Add WaEnable32PlaneMode Gen11 Display suports 32 planes in total. Enable the new format in context status to be used and expanded to 32 planes. V2: Move the WA to display WA's(Chris) Cc: Chris Wilson Cc: Michel Thierry Cc: James Ausmus Reviewed-by: Anusha Srivatsa Signed-off-by: Radhakrishna Sripada Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030084504.21537-1-radhakrishna.sripada@intel.com commit 1347d3ce5bbb6c0c6a266a0add190725a94f9efb Author: Rodrigo Vivi Date: Wed Oct 31 09:28:45 2018 -0700 drm/i915: Remove CNL from WA 827 CNL A stepping was the only affected there. But also it is time to clean old pre-production CNL Workarounds, so let's just remove and clean this W/A. Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20181031162845.12419-4-rodrigo.vivi@intel.com commit d521361755c241a2cfd15e6ce6ef7117e3858f4a Author: Rodrigo Vivi Date: Wed Oct 31 09:28:44 2018 -0700 drm/i915: Define WA 0870 and kill dead code. Let's introduce the WA number that is the cause of having NV12 disabled on both SLK and BXT. According to Spec: WA 0870: "Display flickers with NV12 video playback in Y tiling mode. WA: Use YUV422 surface format instead of NV12." v2: remove the useless dead code and consequently avoiding device info flag. (Ville) Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181031162845.12419-3-rodrigo.vivi@intel.com commit 28b2f4e19600c62021e73f9093174ed9989a73c5 Author: Rodrigo Vivi Date: Wed Oct 31 09:28:43 2018 -0700 drm/i915: Kill WA 0826 According to BSpec this is not needed anymore: "This workaround is no longer needed since NV12 support is dropped for the affected projects. " Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181031162845.12419-2-rodrigo.vivi@intel.com commit efb818f1053928913196fd36106352a4ab328458 Author: Rodrigo Vivi Date: Wed Oct 31 09:28:42 2018 -0700 drm/i915: Kill WA 0528 First of all I believe this WA as written here was wrong. Because it is listed on BSpec only for SKL and BXT, exactly the only 2 platforms skipped here. But also it is written there that we don't need this WA anymore: "This workaround is no longer needed since NV12 support is dropped for the affected projects in #0870." SO, let's kill it. Cc: Maarten Lankhorst Cc: Vidya Srinivas Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181031162845.12419-1-rodrigo.vivi@intel.com commit 3b6ac43b48576d7b38539c31b4e370b2e942c3aa Author: Anusha Srivatsa Date: Wed Oct 31 13:27:26 2018 -0700 drm/i915/icl: Fix DC9 Suspend for ICL. Add missing block that takes care of inline intel_suspend_complete for DC9 on ICL. Daniele noticed this was part of original patch but missed on on merged commit ("drm/i915/icl: Enable DC9 as lowest possible state during screen-off"). Fixes: 3e68928b7d4c ("drm/i915/icl: Enable DC9 as lowest possible state during screen-off") Cc: Imre Deak Cc: Rodrigo Vivi Cc: Animesh Manna Cc: James Ausmus Cc: Daniele Ceraolo Spurio Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi [Rodrigo added a commit message while merging] Link: https://patchwork.freedesktop.org/patch/msgid/20181031202726.4021-1-anusha.srivatsa@intel.com commit bbc97f9501d1a397401172c5f3802709dc0f8fd6 Author: Shayenne da Luz Moura Date: Wed Oct 31 14:44:24 2018 -0300 drm: Remove 80-column line in drm_mode_object.c Break line after NULL to decrease the line size. Signed-off-by: Shayenne da Luz Moura Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181031174424.odljb6obj25wm47d@smtp.gmail.com commit 8b1b558d690aa37e4dd36420d01d1cbd20f11eaa Author: Anusha Srivatsa Date: Tue Oct 30 13:56:35 2018 +0200 drm/i915/icl: Add DSS_CTL Registers Add defines for DSS_CTL registers. These registers specify the big joiner, splitter, overlap pixels and info regarding compression enabled on left or right branch. v2: - rebase. Remove overlapping defines(James Ausmus) - Rename the register to ICL_DSS_CTL1/2_PIPE_ (manasi) - take pixels as an argument for overlap.(Manasi) v3: - rebase. merge DSS_CTL1/2 introduced in Madhav's patch to avoid confusion (madhav chauhan) - Rename registers in accordance to BSpec (Madhav, Rodrigo) - Add define to conditionally check the buffer target depth (James Ausmus) v4: - remove redundant definitions.(madhav) v5: - Add mask for overlap pixels. - Code Style changes.(Madhav) v6: - Code style changes. (Madhav) Suggested-by: Madhav Chauhan Cc: Madhav Chauhan cc: Rodrigo Vivi Cc: James Ausmus Cc: Gaurav Singh Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/07021336cb87d09e8f97fbff709c4e686d7de536.1540900289.git.jani.nikula@intel.com commit 45cf87566e5686c919247610200af7b365e86a1f Author: Noralf Trønnes Date: Thu Oct 25 22:13:39 2018 +0200 drm/tilcdc: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Jyri Sarha Cc: Tomi Valkeinen Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20181025201340.34227-9-noralf@tronnes.org commit 94ebfc07829187bc7ec8fc3f1133a202aecec283 Author: Noralf Trønnes Date: Thu Oct 25 22:13:38 2018 +0200 drm/sun4i: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Maxime Ripard Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181025201340.34227-8-noralf@tronnes.org commit da6a512f14ef9b87bf93e663c99d7c400fe34cbf Author: Noralf Trønnes Date: Thu Oct 25 22:13:37 2018 +0200 drm/atmel-hlcdc: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Boris Brezillon Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20181025201340.34227-7-noralf@tronnes.org commit f4d26fa9136427d3cb2959cee13e0900b8004850 Author: Noralf Trønnes Date: Thu Oct 25 22:13:33 2018 +0200 drm/fsl-dcu: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Stefan Agner Cc: Alison Wang Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20181025201340.34227-3-noralf@tronnes.org commit c638f341c8bda95725ee39ae5c24ad07043fc58e Author: Noralf Trønnes Date: Thu Oct 25 22:13:32 2018 +0200 drm/arc: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Alexey Brodkin Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20181025201340.34227-2-noralf@tronnes.org commit 9cbe67c5bc444ec925e8353a5f871d9e31cdddd8 Author: Chris Wilson Date: Wed Oct 31 12:07:10 2018 +0000 drm/syncobj: Mark local add/remove callback functions as static drivers/gpu/drm/drm_syncobj.c:181:6: warning: no previous prototype for ‘drm_syncobj_add_callback’ [-Wmissing-prototypes] drivers/gpu/drm/drm_syncobj.c:190:6: warning: no previous prototype for ‘drm_syncobj_remove_callback’ [-Wmissing-prototypes] Fixing that leads to drivers/gpu/drm/drm_syncobj.c:181:13: warning: ‘drm_syncobj_add_callback’ defined but not used [-Wunused-function] so remove the unused drm_syncobj_add_callback() entirely. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181031120710.21582-1-chris@chris-wilson.co.uk Reviewed-by: Chunming Zhou commit f968c85bcef17bc0101fae7307b54b6a7025a197 Author: Madhav Chauhan Date: Tue Oct 30 13:56:42 2018 +0200 drm/i915/icl: Don't wait for empty FIFO For Gen11 DSI, we don't need to wait for getting DSI FIFO empty after sending DCS commands. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5e078a0274c1fba2521cb14d7d02fd1038ec1b0e.1540900289.git.jani.nikula@intel.com commit bf4d57ff411017468977203a009ce719aa83a93d Author: Madhav Chauhan Date: Tue Oct 30 13:56:23 2018 +0200 drm/i915/icl: Find DSI presence for ICL This patch detects DSI presence for ICL platform by reading VBT. DSI detection is done while initializing DSI using newly added function intel_gen11_dsi_init. v2 by Jani: - Preserve old behavour of intel_bios_is_dsi_present() - s/intel_gen11_dsi_init/icl_dsi_init/g Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2324cdfc8918bda3165354e5e0d15053b1074f14.1540900289.git.jani.nikula@intel.com commit 808517e2c3786508150ffe965a9e219e5915204f Author: Madhav Chauhan Date: Tue Oct 30 13:56:26 2018 +0200 drm/i915/icl: Add DSI packet payload/header registers This patch defines payload/header registers for each DSI transcoder used for transmitting DSI packets. v2 by Jani: - Drop full register mask and shift for payload - Use lower case for hex 0x Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/18275c49215e512347a14bc38715314c2d6f95a4.1540900289.git.jani.nikula@intel.com commit 03ad7d8821ec44513d514a5e6b17b60e732e1182 Author: Manasi Navare Date: Tue Oct 23 12:12:48 2018 -0700 drm/i915/ICL: Add pre_pll_enable hook for ICL and set DFLEXDPMLE in this hook In case of Legacy DP connector on TypeC port, the flex IO DPMLE register is set to number of lanes configured by the display driver which will be programmed into DDI_BUF_CTL PORT_WIDTH_SELECTION. This needs to be programmed before enabling the shared PLLs hence add a pre_pll_enable hook for ICL and add this programming in that hook. v2: * Remove the check for combophy port (Jose) * Simplify the port reversal check logic (Jose) Cc: Lucas De Marchi Cc: Jose Roberto de Souza Cc: Animesh Manna Cc: Paulo Zanoni Signed-off-by: Manasi Navare Reviewed-by: José Roberto de Souza Acked-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181023191248.26418-2-manasi.d.navare@intel.com commit b4335ec0a3ee6229a570755f8fb95dc8a7c694f2 Author: Manasi Navare Date: Tue Oct 23 12:12:47 2018 -0700 drm/i915/icl: Fix the macros for DFLEXDPMLE register bits This patch fixes the macros used for defining the DFLEXDPMLE register bit fields. This accounts for changes in the spec. Fixes: a2bc69a1a9d6 ("drm/i915/icl: Add register definition for DFLEXDPMLE") Cc: Animesh Manna Cc: Paulo Zanoni Cc: Jose Roberto de Souza Cc: # v4.19+ Signed-off-by: Manasi Navare Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20181023191248.26418-1-manasi.d.navare@intel.com commit 17a3b15ac6afc7ef968e1e5a2ff26736abd01bb0 Author: José Roberto de Souza Date: Tue Oct 30 14:57:50 2018 -0700 drm/i915/icl: Fix crash when getting DPLL of a MST encoder in TC ports enc_to_dig_port() returns NULL for encoders of type INTEL_OUTPUT_DP_MST causing the crash bellow: [ 2832.836101] BUG: unable to handle kernel paging request at 00000000000012b8 [ 2832.843062] PGD 0 P4D 0 [ 2832.845610] Oops: 0000 [#1] SMP [ 2832.848764] CPU: 2 PID: 3577 Comm: kworker/2:0 Tainted: G W 4.19.0-rc7+ #491 [ 2832.857106] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.2352.A01.1808281852 08/28/2018 [ 2832.870734] Workqueue: events output_poll_execute [ 2832.875480] RIP: 0010:icl_get_dpll+0xa4/0x5d0 [i915] [ 2832.880449] Code: e9 03 f3 48 ab 8b 6e 74 41 8b 8c 24 5c 03 00 00 85 ed 0f 88 3f 02 00 00 83 fd 01 0f 8e ad 01 00 00 83 fd 05 0f 8f 2d 02 00 00 <83> ba b8 12 00 00 02 48 8b 36 0f 84 39 02 00 00 44 8b be ec 89 00 [ 2832.899176] RSP: 0018:ffffc90001b57a78 EFLAGS: 00010293 [ 2832.904404] RAX: 0000000000000000 RBX: ffffc90001b57a94 RCX: 0000000000083d60 [ 2832.911536] RDX: 0000000000000000 RSI: ffff8804a8c0dc00 RDI: ffffc90001b57b18 [ 2832.918668] RBP: 0000000000000003 R08: ffff8804a8c1f990 R09: ffff8804a8c1f990 [ 2832.925797] R10: 0000000000000000 R11: ffff8804a8e99600 R12: ffff8804a7760000 [ 2832.932930] R13: ffff88049e94d000 R14: ffff88049e94d000 R15: 000000000000000e [ 2832.940063] FS: 0000000000000000(0000) GS:ffff8804b0300000(0000) knlGS:0000000000000000 [ 2832.948147] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2832.953893] CR2: 00000000000012b8 CR3: 0000000004a1d004 CR4: 0000000000760ee0 [ 2832.961027] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2832.968155] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2832.975286] PKRU: 55555554 [ 2832.978003] Call Trace: [ 2832.980496] haswell_crtc_compute_clock+0x3d/0x68 [i915] [ 2832.985841] intel_crtc_atomic_check+0x61/0x340 [i915] [ 2832.990987] drm_atomic_helper_check_planes+0x130/0x1c0 [ 2832.996245] intel_atomic_check+0x4d5/0x10f0 [i915] [ 2833.001147] drm_atomic_check_only+0x484/0x690 [ 2833.005629] drm_atomic_commit+0x13/0x50 [ 2833.009564] restore_fbdev_mode_atomic+0x1c9/0x1e0 [ 2833.014363] drm_fb_helper_restore_fbdev_mode_unlocked+0x47/0x90 [ 2833.020368] drm_fb_helper_set_par+0x29/0x50 [ 2833.024641] drm_fb_helper_hotplug_event.part.33+0x92/0xb0 [ 2833.030130] drm_kms_helper_hotplug_event+0x26/0x30 [ 2833.035013] output_poll_execute+0x192/0x1b0 [ 2833.039293] process_one_work+0x2a5/0x5f0 [ 2833.043315] worker_thread+0x2d/0x3d0 [ 2833.046988] ? rescuer_thread+0x340/0x340 [ 2833.051009] kthread+0x112/0x130 [ 2833.054247] ? kthread_create_worker_on_cpu+0x70/0x70 [ 2833.059307] ret_from_fork+0x3a/0x50 [ 2833.062893] Modules linked in: i915 prime_numbers snd_hda_codec_realtek snd_hda_codec_generic asix snd_usb_audio snd_usbmidi_lib snd_seq_midi snd_seq_midi_event snd_rawmidi cdc_ether usbnet x86_pkg_temp_thermal xhci_pci xhci_hcd ucsi_acpi typec_ucsi typec efivarfs [last unloaded: prime_numbers] [ 2833.088917] CR2: 00000000000012b8 [ 2833.092241] ---[ end trace 25f9fe3d47af2e75 ]--- [ 2833.096895] RIP: 0010:icl_get_dpll+0xa4/0x5d0 [i915] [ 2833.101866] Code: e9 03 f3 48 ab 8b 6e 74 41 8b 8c 24 5c 03 00 00 85 ed 0f 88 3f 02 00 00 83 fd 01 0f 8e ad 01 00 00 83 fd 05 0f 8f 2d 02 00 00 <83> ba b8 12 00 00 02 48 8b 36 0f 84 39 02 00 00 44 8b be ec 89 00 [ 2833.120589] RSP: 0018:ffffc90001b57a78 EFLAGS: 00010293 [ 2833.125815] RAX: 0000000000000000 RBX: ffffc90001b57a94 RCX: 0000000000083d60 [ 2833.132946] RDX: 0000000000000000 RSI: ffff8804a8c0dc00 RDI: ffffc90001b57b18 [ 2833.140080] RBP: 0000000000000003 R08: ffff8804a8c1f990 R09: ffff8804a8c1f990 [ 2833.147213] R10: 0000000000000000 R11: ffff8804a8e99600 R12: ffff8804a7760000 [ 2833.154350] R13: ffff88049e94d000 R14: ffff88049e94d000 R15: 000000000000000e [ 2833.161483] FS: 0000000000000000(0000) GS:ffff8804b0300000(0000) knlGS:0000000000000000 [ 2833.169565] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2833.175313] CR2: 00000000000012b8 CR3: 0000000004a1d004 CR4: 0000000000760ee0 [ 2833.182449] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2833.189578] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2833.196712] PKRU: 55555554 MST ports are allocated from struct intel_dp_mst_encoder not from struct intel_digital_port as regular ports, so to get the TC type it is necessary check the primary digital port of the mst encoder. Cc: Paulo Zanoni Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-5-jose.souza@intel.com commit 36b80aa36b63117f99626e60ee50435e5b02a77b Author: José Roberto de Souza Date: Tue Oct 30 14:57:49 2018 -0700 drm/i915: Initialize panel_vdd_work only for eDP ports It is only used by eDP ports so no need to initialize it for each DP port. Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-4-jose.souza@intel.com commit d1b5973c877856d24e4453a498145e5f5eb1d9ad Author: José Roberto de Souza Date: Tue Oct 30 14:57:48 2018 -0700 drm/i915/icl: Set TC type to unknown when a sudden disconnection happen Otherwise it would be in a inconsistent state as port is disconnected but with a valid tc type. Cc: Paulo Zanoni Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-3-jose.souza@intel.com commit b298ba5f51fca1c8204ec7448eb767fafb899ce6 Author: José Roberto de Souza Date: Tue Oct 30 14:57:47 2018 -0700 drm/i915/icl: Set TC type to unknown in the disconnection flow Otherwise it would be in a inconsistent state as port is disconnected but with a valid tc type. Also setting it to unknown will earlier return icl_tc_phy_disconnect() for any future calls to intel_digital_port_connected(), this way we don't need to check if port is marked as safe everytime. Cc: Paulo Zanoni Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-2-jose.souza@intel.com commit 3e037f9b0ab7b6ae40bf6ab14a5aead51b011717 Author: José Roberto de Souza Date: Tue Oct 30 14:57:46 2018 -0700 drm/i915/debugfs: Do not print cached information of a disconnected sink Besides of give the expected output of i915_display_info it will also avoid some aux ch transactions that would timeout by obvious reasons. Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-1-jose.souza@intel.com commit 3b90946fcb6f13b65888c380461793a9dea9d1f4 Author: Ville Syrjälä Date: Mon Oct 29 16:00:31 2018 +0200 drm/i915: Fix error handling for the NV12 fb dimensions check Let's not leak obj->framebuffer_references when we decide that the framebuffer domensions are not suitable for NV12. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Vidya Srinivas Fixes: e44134f2673c ("drm/i915: Add NV12 support to intel_framebuffer_init") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181029140031.11765-1-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper commit 328f75bb0db718d21124d8804cf6bd353aa7b80d Author: Ville Syrjälä Date: Wed Oct 24 18:52:08 2018 +0300 drm/i915: Use intel_panel_actually_set_backlight() to disable PWM backlight Use intel_panel_actually_set_backlight() instead of a direct call to pwm_config() in pwm_disable_backlight(). The main benefit is consistent debug logging when we turn off the backlight. Currently we see nothing in dmesg which made me wonder whether the backlight was even getting turned off properly. The second benefit is consistency; This is what we do for all the other backlight implementations. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181024155208.18987-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Acked-by: Jani Nikula commit 6e97272a9aaa5d4ec639c19d7f63a5d9b317dffb Author: Manasi Navare Date: Tue Oct 30 17:19:23 2018 -0700 drm/dp: Define payload size for DP SDP PPS packet DP 1.4 spec defines DP secondary data packet for DSC picture parameter set. This patch defines its payload size according to the DP 1.4 specification. Signed-off-by: Manasi Navare Cc: dri-devel@lists.freedesktop.org Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-7-manasi.d.navare@intel.com commit 6cfd04b018f0a37e6d499ffd8382ff93c3f80798 Author: Manasi Navare Date: Tue Oct 30 17:19:22 2018 -0700 drm/i915/dp: Validate modes using max Output BPP and slice count when DSC supported When DSC is supported we need to validate the modes based on the maximum supported compressed BPP and maximum supported slice count. This allows us to allow the modes with pixel clock greater than the available link BW as long as it meets the compressed BPP and slice count requirements. v3: * Use the macro for dsc sink support (Jani N) v2: * Properly comment why we are right shifting the bpp value (Anusha) Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Reviewed-by: Gaurav K Singh Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-6-manasi.d.navare@intel.com commit d9218c8f6cf43bc0db5422e6b05b9e487c400a23 Author: Manasi Navare Date: Tue Oct 30 17:19:21 2018 -0700 drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC This patch adds helpers for calculating the maximum compressed BPP supported with small joiner. This also adds a helper for calculating the slice count in case of small joiner. These are inside intel_dp since they take into account hardware limitations. v6: * Take mode_clock and mode_hdisplay as input arguments so that this can be called in intel_dp_mode_valid (Manasi) v5: * Get the max slice width from DPCD * Check against Min_Slice_width of 2560 (Anusha) v4: * #defines for PPR in slice count helper (Gaurav) v3: * Simply logic for bpp (DK) * Limit the valid slice count by max supported by Sink (Manasi) v2: * Change the small joiner RAM buffer constant as bspec changed (Manasi) * rename it as SMALL_JOINER since we are not enabling big joiner yet (Anusha) Cc: Gaurav K Singh Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Dhinakaran Pandiyan Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Reviewed-by: Gaurav K Singh Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-5-manasi.d.navare@intel.com commit 0575650077eae2a431f33532de4e15405cc9f653 Author: Manasi Navare Date: Tue Oct 30 17:19:20 2018 -0700 drm/dp: DRM DP helper/macros to get DP sink DSC parameters This patch adds inline functions and helpers for obtaining DP sink's supported DSC parameters like DSC sink support, eDP compressed BPP supported, maximum slice count supported by the sink devices, DSC line buffer bit depth supported on DP sink, DSC sink maximum color depth by parsing corresponding DPCD registers. v4: * Add helper to give line buf bit depth (Manasi) * Correct the bit masking in color depth helper (manasi) v3: * Use SLICE_CAP_2 for DP (Anusha) v2: * Add DSC sink support macro (Jani N) Cc: Gaurav K Singh Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Reviewed-by: Gaurav K Singh Acked-by: Sean Paul (For merging through drm-intel) Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-4-manasi.d.navare@intel.com commit 93ac092f054b25e41341b008fdb1ac69c9a8334c Author: Manasi Navare Date: Tue Oct 30 17:19:19 2018 -0700 drm/i915/dp: Cache the DP/eDP DSC DPCD register set on Hotplug/eDP Init DSC is supported on eDP starting GEN 10 display (on GLK) and on DP starting GEN 11. This patch implements the discovery phase of DSC. On hotplug, source reads the DSC DPCD register set (0x00060 - 0x0006F) to read the decompression capabilities of the sink device. This entire block of registers is cached in intel_dp so that capability information can be used during DSC configuration phase during compute_config phase of the modeset. For eDP, this caching happens during the eDP initialization. This caching is done only for eDP and DP rev >= 1.4 v5: * Fix the block comment (Gaurav) * Fix the commit message DSC DPCD addresses (Gaurav) * Use DRM_ERROR for dpcd_read fail (Gaurav,Anusha) v4: * Cache these only for Gen >= 11 v3: * Remove the dsc_sink_support field in intel_dp (Jani N) v2: * Clear the cached registers on hotplug always (Jani N) * Combine the eDP and DP caching in same function (Jani N) Cc: Jani Nikula Cc: Ville Syrjala Cc: Daniel Vetter Cc: Anusha Srivatsa Cc: Gaurav K Singh Signed-off-by: Manasi Navare Reviewed-by: Anusha Srivatsa Reviewed-by: Gaurav K Singh Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-3-manasi.d.navare@intel.com commit ffddc4363c280d56655b5929661def3686a2a6aa Author: Manasi Navare Date: Tue Oct 30 17:19:18 2018 -0700 drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT This patch defines the DP DSC receiver capability size that gives total number of DP DSC DPCD registers. This also adds a missing #defines for DP DSC support missed in the commit id (ab6a46ea6842ce "Add DPCD definitions for DP 1.4 DSC feature") v3: * MIN_SLICE_WIDTH = 2560 (Anusha) * Define DP_DSC_SLICE_WIDTH_MULTIPLIER = 320 v2: * Add SHIFT define and DECOMPRESSION_EN define missed in prev patch Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Ville Syrjala Cc: Anusha Srivatsa Cc: Gaurav K Singh Signed-off-by: Manasi Navare Acked-by: Sean Paul (For merging through drm-intel) Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-2-manasi.d.navare@intel.com commit 35b876db4a425e58d7fe63eb363bbfa50b8e4e74 Author: Anusha Srivatsa Date: Tue Oct 30 17:19:17 2018 -0700 drm/i915/dsc: Add slice_row_per_frame in DSC PPS programming Add the newly added slice_row_per_frame parameter in the Picture Parameter Set registers. This defines the number of vertically stacked slices in a frame. Credits to Manasi for noticing bSpec change. Suggested-by: Manasi Navare Cc: Manasi Navare Signed-off-by: Anusha Srivatsa Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-1-manasi.d.navare@intel.com commit 5a4712f472bf67dc81b4d7cc571edca11cf52c87 Author: Madhav Chauhan Date: Tue Oct 30 13:56:22 2018 +0200 drm/i915/icl: Program HS_TX_TIMEOUT/LP_RX_TIMEOUT/TA_TIMEOUT registers Program the timeout values (in escape clock) for HS TX, LP RX and TA timeout. HX TX: Ensure that host does not continuously transmit in the HS state. If this timer expires, then host will gracefully end its HS transmission and allow the link to enter into LP state. LP RX: Monitor the length of LP receptions from Peripheral. If timeout happens then host will drive the stop state onto all data lanes (only Data Lane 0 should be receiving anything from the Peripheral). This effectively takes back ownership of the bus transmit in the HS state. TA timeout: Timeout valuefor monitoring Bus Turn-Around (BTA) sequence. BTA sequence should complete within a bounded amount of time, with peripheral acknowledging BTA by driving the stop state. v2 by Jani: - Rebase - Use intel_dsi_bitrate() and intel_dsi_tlpx_ns(intel_dsi) - Squash HX TX, LP RX and TA timeout into one patch - Fix bspec mode set sequence reference - Add FIXME about two timeouts Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/60e610ccffe5f8c09dee1c65828f28f25227efce.1540900289.git.jani.nikula@intel.com commit 8bffd204ded8dd52091afe6455104166c0edfed7 Author: Madhav Chauhan Date: Tue Oct 30 13:56:21 2018 +0200 drm/i915/icl: Define DSI timeout registers This patch defines DSI_HTX_TO, DSI_LRX_H_TO, DSI_PWAIT_TO and DSI_TA_TO registers for DSI transcoders '0' and '1'. They are used for contention recovery on DPHY. v2: Define SHIFT for bitfields. v3 by Jani: - Fix timeout bit definitions Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0b943c028a05edfd61c511d712c65c7e8bf70211.1540900289.git.jani.nikula@intel.com commit 0f0fe8497d968fef969c16f5dcff7062e85fb409 Author: Madhav Chauhan Date: Tue Oct 30 13:56:20 2018 +0200 drm/i915/icl: Disable DSI IO power This patch configures mode of combo phy as DDI and disable IO power for DDI ports used by DSI. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b68d767717a3b86c26042d0b16abb3943756fcc4.1540900289.git.jani.nikula@intel.com commit 019cec36f3727daa811513221fa3b67bc4acec75 Author: Madhav Chauhan Date: Tue Oct 30 13:56:19 2018 +0200 drm/i915/icl: Disable DSI ports This patch disables both DSI ports by writing to DDI_BUF_CTL registers as part of DSI encoder disable sequence. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/be9a7dc1ed89ad38679c67ff1c1552f0b4604494.1540900289.git.jani.nikula@intel.com commit 9c83ab1bb384ebf72260b995c4c416bd86fd0e26 Author: Madhav Chauhan Date: Tue Oct 30 13:56:18 2018 +0200 drm/i915/icl: Disable portsync mode This patch disables portsync mode if DSI link is operating in dual link mode by writing to TRANS_DDI_FUNC_CTL2 registers. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3e608420b58930b6da478801bff018c6e964eb94.1540900289.git.jani.nikula@intel.com commit 7aa32f7c47c9c90eb0ad36a4ccc79418e48335b1 Author: Madhav Chauhan Date: Tue Oct 30 13:56:17 2018 +0200 drm/i915/icl: Disable DDI function This patch disables DDI function by writing to TRANS_DDI_FUNC_CTL registers of DSI ports as part of DSI disable sequence. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b0088d643247135ba96943fa14625f5a43f43633.1540900289.git.jani.nikula@intel.com commit 4769b598b94383bacd211caa2285e264c5e50498 Author: Madhav Chauhan Date: Tue Oct 30 13:56:16 2018 +0200 drm/i915/icl: Put DSI link in ULPS As part of DSI disabling sequence, DSI link need to enter in ULPS by writing into DSI_LP_MSG register. This patch does the same using a wrapper function. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/50812f4bd37f95c053bef7eef4a95e5da029546f.1540900289.git.jani.nikula@intel.com commit 522cc3f717ac19a68847aee9831cb1e39f51f8dd Author: Madhav Chauhan Date: Tue Oct 30 13:56:15 2018 +0200 drm/i915/icl: Power down DSI panel This patch sends command and executes display off, assert reset, power off VBT seqeuences to power down DSI panel. Patch also adds high level function to wrap all the panel sepcific programming during DSI disabling. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/efdafbf6b4d31123738b87b2d8264a9b5553eb32.1540900289.git.jani.nikula@intel.com commit 4e123bd3039d585deb989a84dec04f9e0acda9d3 Author: Madhav Chauhan Date: Tue Oct 30 13:56:14 2018 +0200 drm/i915/icl: Disable DSI transcoders This patch disables transcoders by writing to TRANS_CONF registers for each DSI ports. v2 by Jani: - Wait for pipeconf active to go low Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c76035309fa721322cf9c1ca7fc42b822937c2f3.1540900289.git.jani.nikula@intel.com commit d9d996b6ca4393165e2ca5630fbdf3f7a2482028 Author: Madhav Chauhan Date: Tue Oct 30 13:56:13 2018 +0200 drm/i915/icl: Turn OFF panel backlight This patch disbles backlight of DSI panel by using VBT BACKLIGHT_OFF sequence and panel specific disable functions. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/93cfbb198104deef4a281bbdef721385e4b6d954.1540900289.git.jani.nikula@intel.com commit 208013157a68e57fceffe463461c3d1eb83ea60a Author: Madhav Chauhan Date: Tue Oct 30 13:56:12 2018 +0200 drm/i915/icl: Turn ON panel backlight This patch enables backlight of DSI panel by using VBT BACKLIGHT_ON sequence and panel specific functions. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/05987eea297689af0b9defcf745a921f76f9011d.1540900289.git.jani.nikula@intel.com commit 32bbc3d450dcb7f45b343ee568892d746fe6dc1f Author: Madhav Chauhan Date: Tue Oct 30 13:56:11 2018 +0200 drm/i915/icl: Wait for header/payload credits release Driver needs payload/header credits for sending any command and data over DSI link. These credits are released once command or data sent to link. This patch adds functions to wait for releasing of payload and header credits. As per BSPEC, driver needs to ensure that all of commands/data has been dispatched to panel before the transcoder is enabled. This patch implement those steps i.e. sending NOP DCS command, wait for header/payload credit to be released etc. v2 by Jani: - squash the credit wait helpers patch with the first user - pass dev_priv to the credit wait helpers - bikeshed credit helper names - wait for *at least* the current maximum number of credits - indentation fix - add helpers for credits available Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/84bc509beabf2a2d1324a9f2a67ab4ebe05b10a6.1540900289.git.jani.nikula@intel.com commit 77c8fdae25631d34164911a9e527cb0049528cf4 Author: Jonathan Gray Date: Wed Oct 31 11:53:31 2018 +1100 drm/i915/ringbuffer: change header SPDX identifier to MIT Commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") added "SPDX-License-Identifier: GPL-2.0" to files which previously had no license, change this to MIT for intel_ringbuffer.h matching the license text of intel_ringbuffer.c. Signed-off-by: Jonathan Gray Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181031005331.20775-1-jsg@jsg.id.au commit c2661638e88655fef38bc3cc580e80457461f0a2 Author: Madhav Chauhan Date: Tue Oct 30 13:56:10 2018 +0200 drm/i915/icl: Power on DSI panel This patch execute poweron, deassert reset, display on VBT sequences and send TURN_ON DSI command to panel for powering it up. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8acb06fa634fe9637fdc09a3f5d2588b9138224f.1540900289.git.jani.nikula@intel.com commit bfee32bfca82b69030b23177ebabfc2ade2f54fc Author: Madhav Chauhan Date: Tue Oct 30 13:56:09 2018 +0200 drm/i915/icl: Set max return packet size for DSI panel This patch programs maximum size of the payload transmitted from peripheral back to the host processor using short packet as a part of panel programming. v2: Rebase v3 by Jani: - Add FIXME note. Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ed9df910326adf32eb2bc1cd1a5097d0dda94da8.1540900289.git.jani.nikula@intel.com commit 0d90c61ab9b043f49dcb544e170ab4411b6b3408 Author: Madhav Chauhan Date: Tue Oct 30 13:56:08 2018 +0200 drm/i915/dsi: move connector mode functions to common file Move DSI connector functions to intel_dsi.c and make them available to both legacy and ICL DSI. v2 by Jani: - Move the functions to intel_dsi.c - Don't reuse intel_dsi_connector_destroy() Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/99244c6edf4a26ef2e279c7160d22dbbb5cd95f2.1540900289.git.jani.nikula@intel.com commit 8e54d4fe79f0dbdf280bb5d5bbab669c592f9cc7 Author: Madhav Chauhan Date: Tue Oct 30 13:56:07 2018 +0200 drm/i915/icl: Move dsi host init code to common file This patch moves intl_dsi_host_init() code to intel_dsi.c so that legacy and gen11 DSI code can share this code. v2 by Jani: - Move the shared stuff to intel_dsi.c Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1ee42b2d3c639e3f3c14a2c1595b8778901574d4.1540900289.git.jani.nikula@intel.com commit 79c03caac2ff362304935aafc1be0111d36d1ce5 Author: Matthew Auld Date: Mon Oct 29 20:37:34 2018 +0000 drm/i915/selftest: test aligned offsets for 64K When using softpin it's not enough to just pad the vma size, we also need to ensure the vma offset is at the start of the pt boundary, if we plan to utilize 64K pages. Therefore to improve test coverage we should use both aligned and unaligned gtt offsets in igt_write_huge. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181029203734.21936-1-matthew.auld@intel.com commit e5ee4956f2fdda8ac2d3eab309df389d43b80fc0 Author: Hang Yuan Date: Tue Oct 30 15:08:01 2018 +0800 drm/i915/gtt: Revert "Disable read-only support under GVT" This reverts commit c9e666880de5a1fed04dc412b046916d542b72dd. Checked GVT codes that guest PPGTT PTE flag bits are propagated to shadow PTE. Read/write bit is not changed. Further tested by i915 self-test case "igt_ctx_readonly". No error or GPU hang was detected. So enable read-only support under GVT. Signed-off-by: Hang Yuan Acked-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/1540883281-11359-1-git-send-email-hang.yuan@linux.intel.com Acked-by: Chris Wilson Signed-off-by: Chris Wilson commit 03ceb1c8dfd1e293f40696bfe4e61c78820a0867 Author: Eric Anholt Date: Wed Oct 24 11:43:13 2018 -0700 drm/tinydrm: Fix setting of the column/page end addresses. If the clipped dirty region's x/y happened to align to 256, we would have set the top 8 bits wrong. Noticed by inspection, not by reproducing a bug. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181024184313.2967-4-eric@anholt.net Reviewed-by: Noralf Trønnes commit f300c86e33a686c7abcf0c37deee04ef666ed78b Author: Eric Anholt Date: Wed Oct 24 11:43:12 2018 -0700 drm: Add an hx8367d tinydrm driver. I want to sort out support for tinydrm in vc4, so I needed to get a tinydrm-appropriate panel working and this is what I had on hand. This is derived from a combination of ili9341.c from tinydrm and fb_hx8357d.c from staging's fbtft. v2: Write my own register defs from the spec to not need the header from fbtft. Fix spi device string to enable module autoloading. (Suggestions by Noralf) Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181024184313.2967-3-eric@anholt.net Reviewed-by: Noralf Trønnes (v1) commit 86619c3859c0ff066e519257442b37f90b1212af Author: Eric Anholt Date: Wed Oct 24 11:43:11 2018 -0700 dt-bindings: new binding for Himax HX8357D display panels This adds a new binding for Himax HX8357D display panels. It includes a compatible string for one display (more can be added in the future). The YX350HV15 panel[1] is found in the Adafruit PiTFT 3.5" Touch Screen for Raspberry Pi. [1] https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/downloads This binding is closely modeled after the ili9341 binding, for a similar product from adafruit. The primary difference is that the hx8357d doesn't have a reset line that I can find in the schematics. v2: Document the "reg" property (requested by Rob), fix commit message typo (Noralf) Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181024184313.2967-2-eric@anholt.net Reviewed-by: Rob Herring Acked-by: Noralf Trønnes commit dff906c3f91c642ef04731e63c3b5f0e520f7778 Author: Eric Anholt Date: Thu Oct 25 09:26:35 2018 -0700 drm/tinydrm: Advertise that we can do only DRM_FORMAT_MOD_LINEAR. Without this, the xserver relies on what the 3D driver exposes and assumes that the display can handle it, and then the DRM driver happily tries to scan out a tiled format. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181025162635.6689-1-eric@anholt.net Acked-by: Noralf Trønnes commit 3e68928b7d4c833726717ced2261f77479d98a47 Author: Animesh Manna Date: Mon Oct 29 15:14:10 2018 -0700 drm/i915/icl: Enable DC9 as lowest possible state during screen-off ICL supports DC5, DC6, and DC9. Enable DC9 during screen-off, and enable DC5/6 when appropriate. v2: (James Ausmus) - Also handle ICL as GEN9_LP in i915_drm_suspend_late and i915_drm_suspend_early - Add DC9 to gen9_dc_mask for ICL - Re-order GEN checks for newest platform first - Use INTEL_GEN instead of INTEL_INFO->gen - Use INTEL_GEN >= 11 instead of IS_ICELAKE - Consolidate GEN checks v3: (James Ausmus) - Also allow DC6 for ICL (Imre, Art) - Simplify !(GEN >= 11) to GEN < 11 (Imre) v4: (James Ausmus) - Don't call intel_power_sequencer_reset after DC9 for Gen11+, as the PPS regs are Always On - Rebase against upstream changes v5: (Anusha Srivatsa) - rebased against the latest upstream changes. v6: (Anusha Srivatsa) - rebased.Use INTEL_GEN consistently. - Simplify the code (Rodrigo) v7: rebased. Change order according to platforms(Jyoti) v8: rebased. Change the check from platform specific to HAS_PCH_SPLIT(). Add comment in code to be more clear.(Rodrigo) Cc: Imre Deak Cc: Rodrigo Vivi Signed-off-by: Animesh Manna Signed-off-by: James Ausmus Signed-off-by: Anusha Srivatsa Tested-by: Jyoti Yadav Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181029221410.4423-1-anusha.srivatsa@intel.com commit 01f23459cf93a57d11bd93e660460f135b237af5 Author: Gerd Hoffmann Date: Mon Oct 29 21:50:48 2018 +0100 drm/bochs: add edid support. Recent qemu (latest master branch, upcoming 3.1 release) got support for EDID data. This patch adds guest driver support. EDID support in qemu is not (yet) enabled by default, so please use 'qemu -device VGA,edid=on' for testing. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20181029205048.13200-1-kraxel@redhat.com commit cf6d100dd238d4be92f38fbba246a2d85427b9a0 Author: Heiko Stuebner Date: Mon Oct 1 14:38:45 2018 +0200 drm/rockchip: dsi: add dual mipi support Add the Rockchip-sepcific dual-dsi setup and hook it into the VOP as well. As described in the general dual-dsi devicetree binding, the panel should define two input ports and point each of them to one of the used dsi- controllers, as well as declare one of them as clock-master. This is used to determine the dual-dsi state and get access to both controller instances. v6: handle master+slave component in dsi-attach v5: use driver-internal mechanism to find dual dsi slave v4: add component directly in probe when adding empty dsi slave controller Signed-off-by: Heiko Stuebner Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-8-heiko@sntech.de commit 739838b5f88642dbef7f91dec4fcf8b7f9d0bc46 Author: Nickey Yang Date: Mon Oct 1 14:38:44 2018 +0200 drm/bridge/synopsys: dsi: add dual-dsi support Allow to also drive a slave dw-mipi-dsi controller in a dual-dsi setup. This will require additional implementation-specific code to look up the slave instance and do specific setup. Also will probably need code in the specific crtcs as dual-dsi does not equal two separate dsi outputs. To activate, the implementation-specific code should set the slave using dw_mipi_dsi_set_slave() before calling __dw_mipi_dsi_bind(). v2: - expect real interface number of lanes - keep links to both master and slave v3: - remove unneeded separate variables - remove unneeded second slave settings - disable slave before master - lane-sum calculation comments Signed-off-by: Nickey Yang Signed-off-by: Heiko Stuebner Tested-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-7-heiko@sntech.de commit 2d4f7bdafd709a5cf38f42358bd4c31c621a3e1b Author: Nickey Yang Date: Mon Oct 1 14:38:43 2018 +0200 drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver Add the ROCKCHIP DSI controller driver that uses the Synopsys DesignWare MIPI DSI host controller bridge and remove the old separate one. changes: v2: add err_pllref, remove unnecessary encoder.enable & disable correct spelling mistakes v3: call dw_mipi_dsi_unbind() in dw_mipi_dsi_rockchip_unbind() fix typo, use of_device_get_match_data(), change some bind() logic into probe() add 'dev_set_drvdata()' v4: return -EINVAL when can not get best_freq add a clarifying comment when get vco add review tag v5: keep our power domain enabled while touching GRF v6: change func name dw_mipi_encoder_disable to dw_mipi_dsi_encoder_disable v7: none v8: Heiko add Archit's Review tag adapt to recent changes in the original rockchip-dsi driver beautify grf-handling split hw-setup (resources, dsi-host) from bind into probe v2-new: Heiko add SPDX header instead of license blurb drop old versioning to not confuse people v3-new: Heiko include ordering moved hwaccess from mode_set to enable callback move pllref_clk enablement to bind (needed by bridge mode_set->lane_mbps) v4-new: Heiko rebase against recent rockchip-dsi changes move to call component_add in the new glue host-attach Signed-off-by: Nickey Yang Signed-off-by: Brian Norris Reviewed-by: Brian Norris Reviewed-by: Sean Paul Reviewed-by: Archit Taneja Reviewed-by: Andrzej Hajda Signed-off-by: Heiko Stuebner Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-6-heiko@sntech.de commit 90910a6511238dd8d25ac007d97a2c0ddfa24e51 Author: Heiko Stuebner Date: Mon Oct 1 14:38:41 2018 +0200 drm/bridge/synopsys: dsi: add ability to have glue-specific attach and detach With the regular means of adding the dsi-component in probe it creates a race condition with the panel probing, as the panel device only gets created after the dsi-bus got created. When the panel-driver is build as a module it currently fails hard as the panel cannot be probed directly: dw_mipi_dsi_bind() __dw_mipi_dsi_probe() creates dsi bus creates panel device triggers panel module load panel not probed (module not loaded or panel probe slow) drm_bridge_attach fails with -EINVAL due to empty panel_bridge Additionally the panel probing can run concurrently with dsi bringup making it possible that the panel can already be found but dsi-attach hasn't finished running. To solve that cleanly we may want to only create the component after the panel has finished probing, by calling component_add from the host-attach dsi callback. As that is specific to glue drivers, add a new struct for host_ops so that glue drivers can tell the bridge to call specific functions after the common host-attach and before the common host-detach run. Suggested-by: Andrzej Hajda Reviewed-by: Andrzej Hajda Signed-off-by: Heiko Stuebner Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-4-heiko@sntech.de commit f2b0e264657061667be7df1575b82777cf622b73 Author: Heiko Stuebner Date: Mon Oct 1 14:38:40 2018 +0200 drm/bridge/synopsys: dsi: don't call __dw_mipi_dsi_probe from dw_mipi_dsi_bind __dw_mipi_dsi_probe() does all the grabbing of resources and does it using devm-helpers. So this is happening on each try of master bringup possibly slowing down things a lot. Drivers using the component framework may instead want to call dw_mipi_dsi_probe separately in their probe function to setup resources early. That way the dsi bus also gets created earlier and also not recreated on each bind-try, so that attached panels can load their modules and be probed way before the bridge-attach in the bind call. So drop the call to __dw_mipi_dsi_probe and modify the function to take a struct dw_mipi_dsi instead of the platform-device. Signed-off-by: Heiko Stuebner Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-3-heiko@sntech.de commit 4b6e21c3b5645b8808c2d8f023c93dd3ecf66321 Author: Heiko Stuebner Date: Mon Oct 1 14:38:39 2018 +0200 drm/bridge/synopsys: dsi: move mipi_dsi_host_unregister to __dw_mipi_dsi_remove Right now the host is only unregistered when the driver is used via the bridge api and not via the component api, leading to the host staying registered in cases like probe deferral. So move the host unregister to the general remove function, so that it gets cleaned up in all cases. Signed-off-by: Heiko Stuebner Reviewed-by: Andrzej Hajda Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-2-heiko@sntech.de commit a950adc6c343c918e4728648f7a59ba42d79c1ce Author: Chris Wilson Date: Tue Oct 30 11:05:54 2018 +0000 drm/i915: Stop calling intel_opregion unregister/register in suspend/resume If we reduce the suspend function for intel_opregion to do the minimum required, the resume function can also do the simple task of notifier the ACPI bios that we are back. This avoid some nasty restrictions on the likes of register_acpi_notifier() that are not allowed during the early phase of resume. v2: Keep the order of acpi notify vs turning off ardy/drdy the same. Signed-off-by: Chris Wilson Cc: Imre Deak Cc: Jani Nikula Reviewed-by: Jani Nikula Acked-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20181030110554.4111-1-chris@chris-wilson.co.uk commit b379e30629c0ce912f032809a31c11e6fbddda63 Author: Chris Wilson Date: Mon Oct 29 18:27:21 2018 +0000 drm/i915/gtt: Reuse the read-only 64KiB scratch page and directories If we can prevent stray writes from landing in the scratch page, we can reuse the same page and same scratch PT for all contexts without fear of information leaks and side-channels. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181029182721.29568-2-chris@chris-wilson.co.uk commit daf3dc0f9b0044e25ac96d1b9c65dca4df1aa99f Author: Chris Wilson Date: Mon Oct 29 18:27:20 2018 +0000 drm/i915/gtt: Record the scratch pte Record the scratch PTE encoding upon creation rather than recomputing the bits everytime. This is important for the next patch where we forgo having a valid scratch page with which we may compute the bits and so require keeping the PTE value instead. v2: Fix up scrub_64K to use scratch_pte as well. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181029182721.29568-1-chris@chris-wilson.co.uk commit 94feeaafbefd01b1be00ef8aa33e2a6224500f06 Author: Shayenne da Luz Moura Date: Fri Oct 26 16:24:58 2018 -0300 drm/qxl: Use 'unsigned int' instead of 'bool' Use 'unsigned int' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check: CHECK: Avoid using bool structure members because of possible alignment issues Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/fcd9d7ea7eec1ac6a3ad9ad16e0fc9ef13c089fd.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit 26f53c4f6da89147069681e4ab540e746a1f8779 Author: Shayenne da Luz Moura Date: Fri Oct 26 16:24:18 2018 -0300 drm/qxl: Add space before open parentheses Add space to remove checkpath.pl error: ERROR: space required before the open parenthesis '(' Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/1ab3ba05c140aae01bde66f73ff1f3b78bf7dfb3.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit 1b000494978d2f3603e9eed4ba90c222587122ad Author: Shayenne da Luz Moura Date: Fri Oct 26 16:23:49 2018 -0300 drm/qxl: Use 'unsigned int' instead of 'usigned' Use 'usigned int' instead of 'usigned' to remove the checkpath.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/52604806eb18bc25e7e429f5b229fe8c1d271b5c.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit d964985c0d5de15ce78bb614c2b2ba61becb56b9 Author: Shayenne da Luz Moura Date: Fri Oct 26 16:23:16 2018 -0300 drm/qxl: Remove exceding whiteline Remove extra whiteline to clean the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/5b95e1d4d515d02d01b829ddc5b3ca80af29e2e2.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit 408799eb4ad46b8ae26da41be10e8678b3a40ec6 Author: Shayenne da Luz Moura Date: Fri Oct 26 16:22:55 2018 -0300 drm/qxl: Add line after variable declarations Add whiteline after variable declarations to remove the checkpath.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/a1d44c4a30f9b52d0aa7113e4e5093e843f9913b.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit 6ed00154cb4d5d8c159c806615b08c6072a48337 Author: Shayenne da Luz Moura Date: Fri Oct 26 16:21:50 2018 -0300 drm/qxl: Remove trailing whitespace Remove extra tab and space to clean the checkpath.pl error. ERROR: trailing whitespace Signed-off-by: Shayenne da Luz Moura Link: http://patchwork.freedesktop.org/patch/msgid/fb0e2237bc505c855a0a842c081a39d524c571dc.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann commit 7fea1e0f38a86d2b79ac0a7f31843b4eb55ccb60 Author: Sabyasachi Gupta Date: Fri Oct 19 21:29:54 2018 +0530 gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc Replaced kmem_cache_alloc + memset with kmem_cache_zalloc Signed-off-by: Sabyasachi Gupta Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com Signed-off-by: Gerd Hoffmann commit 6a37c49a94a95d4cd8ce4e7466f3bbb17e80ca64 Author: Matthew Wilcox Date: Wed Sep 26 09:00:29 2018 -0700 drm/virtio: Handle context ID allocation errors It is possible to run out of memory while allocating IDs. The current code would create a context with an invalid ID; change it to return -ENOMEM to userspace. Signed-off-by: Matthew Wilcox Link: http://patchwork.freedesktop.org/patch/msgid/20180926160031.15721-3-willy@infradead.org Signed-off-by: Gerd Hoffmann commit 1938d1ae32fefa172288e3a9245ae126640c5c10 Author: Matthew Wilcox Date: Wed Sep 26 09:00:28 2018 -0700 drm/virtio: Replace IDRs with IDAs These IDRs were only being used to allocate unique numbers, not to look up pointers, so they can use the more space-efficient IDA instead. Signed-off-by: Matthew Wilcox Link: http://patchwork.freedesktop.org/patch/msgid/20180926160031.15721-2-willy@infradead.org [ kraxel: resolve conflict ] Signed-off-by: Gerd Hoffmann commit 6c1cd97bdaffa2ae1dbdc8a0857931308ac647cd Author: Gerd Hoffmann Date: Fri Oct 19 08:18:47 2018 +0200 drm/virtio: fix resource id handling Move virtio_gpu_resource_id_{get,put} to virtgpu_object.c and make them static. Allocate and free the id on creation and destroy, drop all other calls. That way objects have a valid handle for the whole lifetime of the object. Also fixes ids leaking. Worst offender are dumb buffers, and I think some error paths too. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-7-kraxel@redhat.com commit 724cfdfd667a28dbfb5365b76df4ccf39cf9a09a Author: Gerd Hoffmann Date: Fri Oct 19 08:18:46 2018 +0200 drm/virtio: drop resource_id argument. We pass the obj anyway, so obj->hw_res_handle can be used instead in virtio_gpu_object_attach() and virtio_gpu_cmd_create_resource(). Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-6-kraxel@redhat.com commit 70a0d6a37726a1a3d13a8b358fb362ea692778e1 Author: Gerd Hoffmann Date: Fri Oct 19 08:18:45 2018 +0200 drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_resource_create_ioctl() Drop pointless res_id variable in virtio_gpu_resource_create_ioctl(), just use the hw_res_handle field in virtio_gpu_object directly. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-5-kraxel@redhat.com commit c40336ba5ed6c67e131cbf82a4fa37faf3bf0ed3 Author: Gerd Hoffmann Date: Fri Oct 19 08:18:44 2018 +0200 drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_mode_dumb_create() Drop pointless resid variable in virtio_gpu_mode_dumb_create(), just use the hw_res_handle field in virtio_gpu_object directly. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-4-kraxel@redhat.com commit ae0dc3cc38b1afdb481e460cd0dd58e200df5426 Author: Gerd Hoffmann Date: Fri Oct 19 08:18:43 2018 +0200 drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpufb_create() Drop pointless resid variable in virtio_gpufb_create(), just use the hw_res_handle field in virtio_gpu_object directly. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-3-kraxel@redhat.com commit 23c897d72ca8064c626be0ef73fe671488d584bb Author: Gerd Hoffmann Date: Fri Oct 19 08:18:42 2018 +0200 drm/virtio: track created object state Track whenever the virtio_gpu_object is already created (i.e. host knows about it) in a new variable. Add checks to virtio_gpu_object_attach() to do nothing on objects not created yet. Make virtio_gpu_ttm_bo_destroy() use the new variable too, instead of expecting hw_res_handle indicating the object state. Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-2-kraxel@redhat.com commit 4c8d351d0b4936ae93ed0febb7bf0ee3044e49ba Author: Dhinakaran Pandiyan Date: Fri Oct 26 12:53:42 2018 -0700 drm/i915: Switch the order of function parameters intel_fb_pitch_limit() has the parameters pixel_format and fb_modifier switched in their positions. The parameters are however used correctly, but change the order for consistency. Also use kernel data types for both parameters. Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181026195342.16828-1-dhinakaran.pandiyan@intel.com commit 77cac774b2fa33dff662d29f05c8e2835b815f67 Author: Dhinakaran Pandiyan Date: Fri Oct 26 12:38:05 2018 -0700 drm/i915: Do not program aux plane offsets on gen11+ The PLANE_AUX_OFFSET mmio does not exist on ICL, do not program it. We'll still calculate the aux offset as it is required for adjusing x-y offsets. Cc: Ville Syrjälä Cc: Maarten Lankhorst Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181026193805.11077-2-dhinakaran.pandiyan@intel.com commit 2a11b1b4b689b92d8f0d9d5bd7791c5e96c03d56 Author: Dhinakaran Pandiyan Date: Fri Oct 26 12:38:04 2018 -0700 drm/i915: Add function to check for linear surfaces A framebuffer can comprise surfaces with distinct tiling formats, making checks against modifier alone insufficient. Make use of a function to identify a linear surface based on both modifier and color plane. v2: Typo fix v3: remove 'inline' from function definition (Ville) Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181026193805.11077-1-dhinakaran.pandiyan@intel.com commit a670be330501243a56c2b4767822874927e7807b Author: Dhinakaran Pandiyan Date: Fri Oct 5 11:56:43 2018 -0700 drm/i915: Move VIDEO_DIP_CTL definitions to their right place. The bits weren't defined in descending order. v2: Move definitions in a separate patch (Manasi) Cc: Manasi Navare Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181005185643.31660-2-dhinakaran.pandiyan@intel.com commit 09209662618f9fdc38b8d4da39040c8829fd2d57 Author: Dhinakaran Pandiyan Date: Fri Oct 5 11:56:42 2018 -0700 drm/i915: Fix VIDEO_DIP_CTL bit shifts The shifts for VSC_SELECT bits are wrong, fix it. Good thing is the definitions are unused. v2: Moves definitions in another patch (Manasi) Cc: Manasi Navare Cc: Anusha Srivatsa Cc: Rodrigo Vivi Fixes: 7af2be6d54d4 ("drm/i915/icl: Add VIDEO_DIP registers") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181005185643.31660-1-dhinakaran.pandiyan@intel.com commit 1ca2b067d07b491bd82bbaf235841b2a9b3d0c09 Author: Rodrigo Vivi Date: Fri Oct 26 13:03:17 2018 -0700 drm/i915: Simplify has_sagv function The specially case for SKL for not controlled sagv is already taken care inside intel_enable_sagv, so there's no need to duplicate the check here. v2: Go one step further and remove skl special case. (Jani) v3: Separate runtime status handle from has_sagv flag. v4: Go back and accept simple Jani proposed solution. Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181026200317.21726-1-rodrigo.vivi@intel.com commit c5def85c0847189b547f378d400a3a45a2a1101e Author: Chris Wilson Date: Mon Oct 29 17:29:25 2018 +0000 drm/i915/selftests: Test vm isolation The vm of two contexts are supposed to be independent, such that a stray write by one cannot be detected by another. Normally the GTT is filled explicitly by userspace, but the space in between objects is filled with a scratch page -- and that scratch page should not be able to form an inter-context backchannel. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181029172925.10159-1-chris@chris-wilson.co.uk commit 42882336e62aab00278114392a16374f272a0c99 Author: Rodrigo Vivi Date: Thu Oct 25 17:56:36 2018 -0700 drm/i915/glk: Remove 99% limitation. While checking the opportunity to add a display_gen check to allow glk and cnl to be on same bucket I noticed these FIXME cases here. So I got the confirmation from HW architect that we actually never needed this workaround. "GLK supports 2 pixel per clock, so pixel clock can be up to 2 * cdclk." So, this reverts commit 97f55ca5b662 ("drm/i915/glk: limit pixel clock to 99% of cdclk workaround") Fixes: 97f55ca5b662 ("drm/i915/glk: limit pixel clock to 99% of cdclk workaround") Cc: Ville Syrjälä Cc: Madhav Chauhan Cc: Jani Nikula Cc: Clinton Taylor Cc: Arthur J Runyan Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181026005636.22274-1-rodrigo.vivi@intel.com commit 5bc0e89ff1bee1566bd2fbd1142dce001c068aeb Author: Rodrigo Vivi Date: Fri Oct 26 12:51:43 2018 -0700 drm/i915: Kill GEN_FOREVER commit ac657f6461e5 ("drm/i915: Introduce IS_GEN macro") introduced GEN_FOREVER that was never used. My first attempt was to rename it to FOREVER since GEN is already part of the macro. Then I used coccinelle to change all -INTEL_GEN(e1) >= e2 +INTEL_GEN_RANGE(e1, e2, FOREVER) -INTEL_GEN(e1) <= e2 +INTEL_GEN_RANGE(e1, 0, e2) and I liked it. However I didn't like very much the remaining INTEL_GEN(dev_priv) < n and: INTEL_GEN(e1) < n INTEL_GEN_RANGE(e1, 0, n - 1) didn't make much sense either. So INTEL_GEN use for > or < seems a better unified way for unlimited bounds. So, no reason to keep GEN_FOREVER here. Let's kill before someone start using it. v2: Remove remaining GEN_FOREVER forgotten in a comment. (Daniel) Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181026195143.20353-2-rodrigo.vivi@intel.com commit 9e7833758b9feebc37b9988d13b017534c90a4a2 Author: Rodrigo Vivi Date: Fri Oct 26 12:51:42 2018 -0700 drm/i915: Prefer IS_GEN check with bitmask. Whenever possible we should stick with IS_GEN checks. Bitmaks has been introduced on commit ae7617f0ef18 ("drm/i915: Allow optimized platform checks") for efficiency. Let's stick with it whenever possible. This patch was generated with coccinelle: spatch -sp_file is_gen.cocci *{c,h} --in-place is_gen.cocci: @gen2@ expression e; @@ -INTEL_GEN(e) == 2 +IS_GEN2(e) @gen3@ expression e; @@ -INTEL_GEN(e) == 3 +IS_GEN3(e) @gen4@ expression e; @@ -INTEL_GEN(e) == 4 +IS_GEN4(e) @gen5@ expression e; @@ -INTEL_GEN(e) == 5 +IS_GEN5(e) @gen6@ expression e; @@ -INTEL_GEN(e) == 6 +IS_GEN6(e) @gen7@ expression e; @@ -INTEL_GEN(e) == 7 +IS_GEN7(e) @gen8@ expression e; @@ -INTEL_GEN(e) == 8 +IS_GEN8(e) @gen9@ expression e; @@ -INTEL_GEN(e) == 9 +IS_GEN9(e) @gen10@ expression e; @@ -INTEL_GEN(e) == 10 +IS_GEN10(e) @gen11@ expression e; @@ -INTEL_GEN(e) == 11 +IS_GEN11(e) Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181026195143.20353-1-rodrigo.vivi@intel.com commit 3ab0a6ed4ce5b6017da7a46e48efccf6e8d9538b Author: Ramalingam C Date: Mon Oct 29 15:15:51 2018 +0530 drm/i915: Define Intel HDCP2.2 registers Intel HDCP2.2 registers are defined with addr offsets and bit details. v2: Replaced the arith calc with _PICK [Sean Paul] v3: No changes. v4: %s/HDCP2_CTR_DDI/HDCP2_CTL_DDI [Uma] v5: Added parentheses for the parameters of macro. v6: No changes v7: No changes Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Reviewed-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540806351-7137-7-git-send-email-ramalingam.c@intel.com commit 8b44fefee694ef6095683d91d6f06d23f02a6212 Author: Ramalingam C Date: Mon Oct 29 15:15:50 2018 +0530 drm: HDMI and DP specific HDCP2.2 defines This patch adds HDCP register definitions for HDMI and DP HDCP adaptations. HDMI specific HDCP2.2 register definitions are added into drm_hdcp.h, where as HDCP2.2 register offsets in DPCD offsets are defined at drm_dp_helper.h. v2: bit_field definitions are replaced by macros. [Tomas and Jani] v3: No Changes. v4: Comments style and typos are fixed [Uma] v5: Fix for macros. v6: Adds _MS to the timeouts to represent units [Sean Paul] v7: Macro DP_HDCP_2_2_REG_EKH_KM_OFFSET renamed [Uma] Redundant macro is removed [Uma] Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Acked-by: Sean Paul (for merging through drm-intel) Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540806351-7137-6-git-send-email-ramalingam.c@intel.com commit af5aad059885b0bec3a23b9ea61c822357b6dd73 Author: Ramalingam C Date: Mon Oct 29 15:15:49 2018 +0530 drm: hdcp2.2 authentication msg definitions This patch defines the hdcp2.2 protocol messages for authentication. v2: bit_fields are removed. Instead bitmasking used. [Tomas and Jani] prefix HDCP_2_2_ is added to the macros. [Tomas] v3: No Changes. v4: Style and spellings are fixed [Uma] v5: Fix for macros. v6: comment for Type is improved [Sean Paul] v7: %s/HDCP_2_2_LPRIME_HALF_LEN/HDCP_2_2_V_PRIME_HALF_LEN [Uma] %s/uintxx_t/uxx v8: %s/eceiver_id/receiver_id Signed-off-by: Ramalingam C Reviewed-by: Uma Shankar Acked-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540806351-7137-5-git-send-email-ramalingam.c@intel.com commit 918d89bb1a639adf28a61d0a35c24a2b256ca635 Author: Colin Ian King Date: Fri Oct 26 19:05:12 2018 +0100 gpu: drm/lease: fix spelling mistake, EACCESS -> EACCES Trivial fix to a spelling mistake of the error access name EACCESS, rename to EACCES Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181026180512.4908-1-colin.king@canonical.com commit 10ff7b11cf02b8404ad789f01d7ffa61175aceab Author: Ramalingam C Date: Mon Oct 29 15:15:47 2018 +0530 drm/i915: Reassigning log level for HDCP failures As a policy, this change considers all I915 programming failures and HW failures as ERRORS. Where as all HDCP failures due to the sink is considered as DEBUG logs. Signed-off-by: Ramalingam C Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540806351-7137-3-git-send-email-ramalingam.c@intel.com commit d3dacc70797b8493a542c58eca8db1d411ba94a9 Author: Ramalingam C Date: Mon Oct 29 15:15:46 2018 +0530 drm/i915: wrapping all hdcp var into intel_hdcp Considering significant number of HDCP specific variables, it will be clean to have separate struct for HDCP. New structure called intel_hdcp is added within intel_connector. v2: struct hdcp statically allocated. [Sean Paul] enable and disable function parameters are retained.[Sean Paul] v3: No Changes. v4: Commit msg is rephrased [Uma] v5: Comment for mutex definition. v6: hdcp_ prefix from all intel_hdcp members are removed [Sean Paul] inline function intel_hdcp_to_connector is defined [Sean Paul] v7: %s/uint64_t/u64 v8: Rebased Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Reviewed-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540806351-7137-2-git-send-email-ramalingam.c@intel.com commit 29305d7e8f89a16043a0aff89ce19b6c733ac465 Author: Enric Balletbo i Serra Date: Tue Oct 16 11:53:36 2018 +0200 drm/bridge: analogix_dp: Fix misleading indentation reported by smatch This patch avoids that building the bridge/analogix source code with smatch triggers complaints about inconsistent indenting. It also fixes a typo in DRM_ERROR message, attch is replaced for attach. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20181016095336.15656-1-enric.balletbo@collabora.com commit 1e0ff648940e603cab6c52cf3723017d30d78f30 Author: Maxime Ripard Date: Sun Oct 21 18:34:46 2018 +0200 drm/sun4i: hdmi: Fix double flag assignation The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it set to true when d is 2. Fix this. Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Reported-by: Dan Carpenter Signed-off-by: Maxime Ripard Reviewed-by: Giulio Benetti Link: https://patchwork.freedesktop.org/patch/msgid/20181021163446.29135-2-maxime.ripard@bootlin.com commit a25b77a1d79774981d9e8eefbb7d15c05cbd301c Author: Maxime Ripard Date: Sun Oct 21 18:34:45 2018 +0200 drm/sun4i: hdmi: Fix unitialized variable The is_double variable is used to store, and possibly returning to the calling function, whether it needs to double the rate of the parent clock or not. In the case where it does, the variable is affected, but in the case where it doesn't we return some uninitialized value. Fix this. Reported-by: Dan Carpenter Signed-off-by: Maxime Ripard Reviewed-by: Giulio Benetti Link: https://patchwork.freedesktop.org/patch/msgid/20181021163446.29135-1-maxime.ripard@bootlin.com commit 633873e6cb884f903468f81f2e8df8975877fadd Author: Emil Velikov Date: Fri Oct 26 11:05:50 2018 +0100 drm/vkms: provide a parent device to drm_dev_init() Earlier commit updated the vgem driver to improve the topology, by passing a platform device as parent to drm_dev_init(). Shortly afterwords we updated the core function to BUG() in order to catch any buggy drivers passing NULL as parent. While I missed the vkms driver (as the patch predates vkms by a few months), the BUG caught the issue within couple of hours. Swap the drm_dev_init <> platform_device_register_simple order, to the driver back to life. Fixes: f08877e79485 ("drm: BUG_ON if passing NULL parent to drm_dev_init") Cc: Daniel Vetter Cc: Deepak Sharma Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Haneen Mohammed Cc: Rodrigo Siqueira Reported-by: Daniel Vetter Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181026100550.625-1-emil.l.velikov@gmail.com commit 23c42a403a9cfdbad6004a556c927be7dd61a8ee Author: Jozsef Kadlecsik Date: Sat Oct 27 15:07:40 2018 +0200 netfilter: ipset: Introduction of new commands and protocol version 7 Two new commands (IPSET_CMD_GET_BYNAME, IPSET_CMD_GET_BYINDEX) are introduced. The new commands makes possible to eliminate the getsockopt operation (in iptables set/SET match/target) and thus use only netlink communication between userspace and kernel for ipset. With the new protocol version, userspace can exactly know which functionality is supported by the running kernel. Both the kernel and userspace is fully backward compatible. Signed-off-by: Jozsef Kadlecsik commit 47164e0b0df88494235e6416a68ffcb993503b8d Author: Clint Taylor Date: Wed Oct 24 14:04:33 2018 -0700 drm/i915/hdmi: Detect HDMI 2.0 monitors using multiple EDID capabilities HDMI 2.0 monitors may not support SCDC and still be able to accept VICs above 63. Use multiple EDID capbilities to determine if the SINK is actually an HDMI 2.0 device. The QD980B HDMI 2.0 Analyzer generates unique EDIDs during CTS tests that don't contain a HDMI Forum VSDB if the block is not used during the test. The current HDMI AVI infoframe code only uses the SCDC supported information in the HDMI Forum VSDB to determine if the sink is HDMI 2.0. This patch adds a check for YCbCr420 present in the EDID supported formats as well as the existing SCDC supported check. HDMI 2.0 CTS HF1-51 test fails on the QD980B. V2: Make check for display_info->color formats == YCbCR420 and SCDC Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107894 Cc: Ville Syrjälä Cc: Shashank Sharma Signed-off-by: Clint Taylor Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1540415073-5102-1-git-send-email-clinton.a.taylor@intel.com commit a590d0fdbaa56f482ff515e1040b6d9b1b200d63 Author: Chris Wilson Date: Fri Oct 26 09:03:02 2018 +0100 dma-buf: Update reservation shared_count after adding the new fence We need to serialise the addition of a new fence into the shared list such that the fence is visible before we claim it is there. Otherwise a concurrent reader of the shared fence list will see an uninitialised fence slot before it is set. <4> [109.613162] general protection fault: 0000 [#1] PREEMPT SMP PTI <4> [109.613177] CPU: 1 PID: 1357 Comm: gem_busy Tainted: G U 4.19.0-rc8-CI-CI_DRM_5035+ #1 <4> [109.613189] Hardware name: Dell Inc. XPS 8300 /0Y2MRG, BIOS A06 10/17/2011 <4> [109.613252] RIP: 0010:i915_gem_busy_ioctl+0x146/0x380 [i915] <4> [109.613261] Code: 0b 43 04 49 83 c6 08 4d 39 e6 89 43 04 74 6d 4d 8b 3e e8 5d 54 f4 e0 85 c0 74 0d 80 3d 08 71 1d 00 00 0f 84 bb 00 00 00 31 c0 <49> 81 7f 08 20 3a 2c a0 75 cc 41 8b 97 50 02 00 00 49 8b 8f a8 00 <4> [109.613283] RSP: 0018:ffffc9000044bcf8 EFLAGS: 00010246 <4> [109.613292] RAX: 0000000000000000 RBX: ffffc9000044bdc0 RCX: 0000000000000001 <4> [109.613302] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff822474a0 <4> [109.613311] RBP: ffffc9000044bd28 R08: ffff88021e158680 R09: 0000000000000001 <4> [109.613321] R10: 0000000000000040 R11: 0000000000000000 R12: ffff88021e1641b8 <4> [109.613331] R13: 0000000000000003 R14: ffff88021e1641b0 R15: 6b6b6b6b6b6b6b6b <4> [109.613341] FS: 00007f9c9fc84980(0000) GS:ffff880227a40000(0000) knlGS:0000000000000000 <4> [109.613352] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [109.613360] CR2: 00007f9c9fcb8000 CR3: 00000002247d4005 CR4: 00000000000606e0 Fixes: 27836b641c1b ("dma-buf: remove shared fence staging in reservation object") Testcase: igt/gem_busy/close-race Signed-off-by: Chris Wilson Cc: Christian König Cc: Junwei Zhang Cc: Huang Rui Cc: Sumit Semwal Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20181026080302.11507-1-chris@chris-wilson.co.uk commit 4fb2c933c9656435e8300fd6011daa3d4b0128fd Author: Chunming Zhou Date: Fri Oct 26 14:20:27 2018 +0800 drm/syncobj: Avoid kmalloc(GFP_KERNEL) under spinlock drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Generated by: scripts/coccinelle/locks/call_kern.cocci v2: syncobj->timeline still needs protect. v3: use a global signaled fence instead of re-allocation. v4: Don't need moving lock. Don't expose func. v5: rename func and directly return. Tested by: syncobj_wait and ./deqp-vk -n dEQP-VK.*semaphore* with lock debug kernel options enabled. Signed-off-by: Chunming Zhou Cc: Maarten Lankhorst Cc: intel-gfx@lists.freedesktop.org Cc: Christian König Cc: Chris Wilson CC: Julia Lawall Reviewed-by: Chris Wilson Reviewed-by: Christian König Reviewed-by: Maarten Lankhorst Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/258623/ commit 1e016a8693368c163b18104a28c4edc71858f2d2 Author: Chris Wilson Date: Wed Oct 24 11:49:39 2018 +0100 drm/i915: Park signaling thread while wrapping the seqno A danger encountered when resetting the seqno (using debugfs/i915_next_seqno) is that as we change the breadcrumb stored in the HWSP, it may be inspected by the signaler thread leading to confusion in our sanity checks. <0> [136.331342] i915/sig-347 3..s1 136336154us : execlists_submission_tasklet: rcs0 awake?=1, active=5 <0> [136.331373] i915/sig-347 3d.s2 136336155us : process_csb: rcs0 cs-irq head=5, tail=0 <0> [136.331402] i915/sig-347 3d.s2 136336155us : process_csb: rcs0 csb[0]: status=0x00000018:0x00000002, active=0x5 <0> [136.331434] i915/sig-347 3d.s2 136336156us : process_csb: rcs0 out[0]: ctx=2.1, global=219 (fence 46:8455) (current 219), prio=0 <0> [136.331466] i915/sig-347 3d.s2 136336156us : process_csb: rcs0 completed ctx=2 <0> [136.332027] gem_exec-1049 0.... 136336246us : reset_all_global_seqno.part.5: rcs0 seqno 219 (current 219) -> -43 <0> [136.332056] gem_exec-1049 0.... 136336251us : reset_all_global_seqno.part.5: bcs0 seqno 183 (current 183) -> -43 <0> [136.332085] gem_exec-1049 0.... 136336255us : reset_all_global_seqno.part.5: vcs0 seqno 191 (current 191) -> -43 <0> [136.332114] gem_exec-1049 0.... 136336259us : reset_all_global_seqno.part.5: vcs1 seqno 180 (current 180) -> -43 <0> [136.332143] gem_exec-1049 0.... 136336262us : reset_all_global_seqno.part.5: vecs0 seqno 212 (current 212) -> -43 <0> [136.332174] i915/sig-347 3.... 136336280us : intel_breadcrumbs_signaler: intel_breadcrumbs_signaler:673 GEM_BUG_ON(!i915_request_completed(rq)) Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181024104939.2861-1-chris@chris-wilson.co.uk commit 8dd0f8d37eaec2bcb4c73b840f0390fee88583ac Author: Chris Wilson Date: Fri Oct 12 13:24:04 2018 +0100 drm/i915/selftests: Check for hangs mid context execution tests Use the live_test struct to record the reset count before and compare it at the end of the test to assert that no mystery hang occurred during the test. v2: Check per-engine resets as well Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181012122404.10874-1-chris@chris-wilson.co.uk commit 9213e4f5444469d76fad1430e4b7af582e7877da Author: Tvrtko Ursulin Date: Thu Oct 18 11:41:06 2018 +0100 drm/i915/icl: Store available engine masks in INTEL_INFO Upcoming GuC code will need to read the fused off engine masks as well, and will also want to have them as enabled instead of disabled masks. To consolidate the read-out place we can store them in this fashion inside INTEL_INFO so they can be easily referenced in the future. Signed-off-by: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20181018104106.30147-1-tvrtko.ursulin@linux.intel.com commit 6fc4e48f9ed46e9adff236a0c350074aafa3b7fa Author: Chris Wilson Date: Thu Oct 25 10:18:23 2018 +0100 drm/i915: Compare user's 64b GTT offset even on 32b Beware mixing unsigned long constants and 64b values, as on 32b the constant will be zero extended and discard the high 32b when used as a mask! Reported-by: Sergii Romantsov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108282 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181025091823.20571-2-chris@chris-wilson.co.uk commit 9125963a9494253fa5a29cc1b4169885d2be7042 Author: Chris Wilson Date: Thu Oct 25 10:18:22 2018 +0100 drm/i915: Mark up GTT sizes as u64 Since we use a 64b virtual GTT irrespective of the system, we want to ensure that the GTT computations remains 64b even on 32b systems, including treatment of huge virtual pages. No code generation changes on 64b: Reported-by: Sergii Romantsov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108282 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181025091823.20571-1-chris@chris-wilson.co.uk commit 5a400aa3c562c4a726b4da286e63c96db905ade1 Author: Clint Taylor Date: Thu Oct 25 11:52:00 2018 -0700 drm/i915/hdmi: Add HDMI 2.0 audio clock recovery N values HDMI 2.0 594Mhz modes were incorrectly selecting 25.200Mhz Automatic N value mode instead of HDMI specification values. V2: Fix 88.2 Hz N value Cc: Jani Nikula Cc: stable@vger.kernel.org Signed-off-by: Clint Taylor Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1540493521-1746-2-git-send-email-clinton.a.taylor@intel.com commit b1ab1f32015d7ad2a6f94d11400381d82802ab38 Author: Abhinav Kumar Date: Fri Oct 5 17:52:19 2018 -0700 dt-bindings: Add Truly NT35597 panel driver bindings Add the device tree bindings for Truly NT35597 panel driver. This panel driver supports both single DSI and dual DSI. However, this patch series supports only dual DSI. Changes in v10: - Remove active high in the documentation for mode gpio - Fix commmit text detail about the board and also fix a typo Reviewed-by: Linus Walleij Reviewed-by: Sean Paul Reviewed-by: Rob Herring Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1538787139-28122-2-git-send-email-abhinavk@codeaurora.org commit 1dd0b147c1ffa7932ef0bd1471873b528100d9a3 Author: Abhinav Kumar Date: Fri Oct 5 17:52:18 2018 -0700 drm/panel: Add support for Truly NT35597 panel driver Add support for Truly NT35597 panel driver used in MSM reference platforms. This panel driver supports both single DSI and dual DSI modes. However, this patch series adds support only for dual DSI mode. Changes in v10: - None Reviewed-by: Sean Paul Signed-off-by: Archit Taneja Signed-off-by: Abhinav Kumar Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1538787139-28122-1-git-send-email-abhinavk@codeaurora.org commit e0ce0e2a5df39065d2b8abefe7e2317e5996397d Author: Noralf Trønnes Date: Sat Sep 8 15:46:42 2018 +0200 drm/stm: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. drm_fbdev_generic_setup() handles mode_config.num_connector being zero. In that case it retries fbdev setup on the next .output_poll_changed. Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Noralf Trønnes Acked-by: Yannick Fertré Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-15-noralf@tronnes.org commit efbb9df91e03b31b00b0bce4147c135c15077a84 Author: Noralf Trønnes Date: Sat Sep 8 15:46:33 2018 +0200 drm/meson: Use drm_fbdev_generic_setup() The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Neil Armstrong Signed-off-by: Noralf Trønnes Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20180908134648.2582-6-noralf@tronnes.org commit aef9f33b7658a7489f71df5d6e6ecb47f2521e8a Author: Imre Deak Date: Tue Oct 23 17:43:10 2018 +0300 drm/i915: Ensure proper HDA suspend/resume ordering with a device link In order to ensure that our system suspend and resume callbacks are called in the correct order wrt. those of the HDA driver add a device link to the HDA driver during audio component binding time. With i915 as the supplier and HDA as the consumer the PM framework will guarantee the HDA->i915 suspend (and shutdown) and i915->HDA resume order. Atm, the lack of this ordering is not a problem, since all the i915 suspend/resume steps that need to be ordered wrt. the HDA driver's suspend/resume steps are separated out to the i915 suspend_late/resume_early hooks. That will change in a follow-up patchset where we'll need this ordering guarantee for steps that are in the i915 suspend/resume hooks (and which can't be moved to suspend_late/resume_early for other reasons). So this patch is a preparation for that follow-up patchset. The change also allows us to move towards removing the i915 suspend_late/resume_early hooks alltogether. Since we only need to ensure the ordering during suspend/resume and not during driver probing create the link with DL_FLAG_STATELESS. Since the probe time ordering has to be optional we use the component framework for that. Similarly for runtime PM we depend on the audio driver getting/putting an i915 runtime PM reference whenever it needs it (along with the proper i915 display power domain) via the audio component ops get_power / put_power hooks. So we create the device link without DL_FLAG_PM_RUNTIME. v2: (Ville) - Add a note to the commit message about not using the device link runtime PM ordering. - Handle the error return from device_link_add(). Cc: Ville Syrjälä Cc: Takashi Iwai Cc: Lukas Wunner Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181023144310.8272-1-imre.deak@intel.com commit 4bdbd5f0eeeebaeefb2b664c233adc846c8dc413 Author: Emil Velikov Date: Wed Oct 24 15:42:52 2018 +0100 drm/virtio: document drm_dev_set_unique workaround A while back we removed it, yet that lead to regressions. At some later point, I've attempted to remove it again without fully grasping the unique (pun intended) situation that virtio is in. Add a bulky comment to document why the call should stay as-is, for the next person who's around. As a Tl;Dr: virtio sits on top of struct virtio_device, which confuses dev_is_pci(), wrong info gets sent to userspace and X doesn't start. Driver needs to explicitly call drm_dev_set_unique() to keep it working. v2: Fix handful of typos (Laszlo) Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Hans de Goede Cc: Laszlo Ersek Signed-off-by: Emil Velikov Reviewed-by: Laszlo Ersek Link: https://patchwork.freedesktop.org/patch/msgid/20181024144252.16518-1-emil.l.velikov@gmail.com commit f08877e79485897aa1093514daa668cc5b728418 Author: Emil Velikov Date: Tue Oct 23 17:35:49 2018 +0100 drm: BUG_ON if passing NULL parent to drm_dev_init Previous commit removed the only reason why we were allowing NULL as a parent device. With that resolved, we can enforce nobody else does that mistake. With that we can drop the ugly drm_dev_set_unique workaround. v2: rebase, silence checkpatch "== NULL" warning Cc: Daniel Vetter Cc: Deepak Sharma Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181023163550.15211-2-emil.l.velikov@gmail.com commit d5c04dff24870ef07ce6453a3f4e1ffd9cf88d27 Author: Deepak Sharma Date: Tue Oct 23 17:35:48 2018 +0100 drm/vgem: Fix vgem_init to get drm device available. Modify vgem_init to take platform dev as parent in drm_dev_init. This will make drm device available at "/sys/devices/platform/vgem" in x86 chromebook. v2: rebase, address checkpatch typo and line over 80 characters Cc: Daniel Vetter Signed-off-by: Deepak Sharma Reviewed-by: Sean Paul Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181023163550.15211-1-emil.l.velikov@gmail.com commit 99fe21a76f0f2d36e5f9afc95ce6ed5cc354ebad Author: Christian König Date: Thu Oct 4 14:45:17 2018 +0200 dma-buf: test shared slot allocation when mutex debugging is active Set shared_max to the number of shared fences right before we release the lock. This way every attempt to add a shared fence without previously reserving a slot will cause an error. Signed-off-by: Christian König Reviewed-by: Huang Rui Acked-by: Junwei Zhang Link: https://patchwork.kernel.org/patch/10626147/ commit ca05359f1e64cf8303ee532e50efe4ab7563d4a9 Author: Christian König Date: Wed Sep 19 16:12:25 2018 +0200 dma-buf: allow reserving more than one shared fence slot Let's support simultaneous submissions to multiple engines. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Link: https://patchwork.kernel.org/patch/10626149/ commit 27836b641c1bf693c96c627388497b4e0f57441b Author: Christian König Date: Wed Aug 8 16:01:22 2018 +0200 dma-buf: remove shared fence staging in reservation object No need for that any more. Just replace the list when there isn't enough room any more for the additional fence. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Huang Rui Link: https://patchwork.kernel.org/patch/10626143/ commit 9d32bdbb5b5f8bcd5de241ec73208542b872136e Author: Sean Paul Date: Wed Oct 24 14:24:30 2018 -0400 drm: Fix doc warning in drm_connector_attach_edid_property() Fixes the following warnings: ../drivers/gpu/drm/drm_connector.c:305: warning: Excess function parameter 'dev' description in 'drm_connector_attach_edid_property' ../drivers/gpu/drm/drm_connector.c:306: warning: Excess function parameter 'dev' description in 'drm_connector_attach_edid_property' ../drivers/gpu/drm/drm_connector.c:305: warning: Excess function parameter 'dev' description in 'drm_connector_attach_edid_property' ../drivers/gpu/drm/drm_connector.c:305: warning: Excess function parameter 'dev' description in 'drm_connector_attach_edid_property' ../drivers/gpu/drm/drm_connector.c:305: warning: Excess function parameter 'dev' description in 'drm_connector_attach_edid_property' Fixes: 6b7e2d5c3032 ("drm: add drm_connector_attach_edid_property()") Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Alex Deucher Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20181024182442.206411-1-sean@poorly.run commit f6764815358b57c520ea137599e8297479bded4c Author: Lyude Paul Date: Tue Oct 23 19:12:47 2018 -0400 drm/dp_mst: Remove all evil duplicate state pointers There's no reason to track the atomic state three times. Unfortunately, this is currently what we're doing, and even worse is that there is only one actually correct state pointer: the one in mst_state->base.state. mgr->state never seems to be used, along with the one in mst_state->state. This confused me for over 4 hours until I realized there was no magic behind these pointers. So, let's save everyone else from the trouble. Signed-off-by: Lyude Paul . Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181023231251.16883-3-lyude@redhat.com commit e4b0c868106d7ef6a4a456a693e25e3b94942e54 Author: Lyude Paul Date: Tue Oct 23 19:12:46 2018 -0400 drm/dp_mst: Deprecate drm_dp_find_vcpi_slots() Because we have drm_dp_atomic_find_vcpi_slots(), which actually takes care to update the atomic state of the MST topology, prints valuable debugging output, and actually takes references to the ports it's checking! This explains some incorrect usage I've been seeing across the tree... Signed-off-by: Lyude Paul Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181023231251.16883-2-lyude@redhat.com commit 6542e9adc0da1e23d81ff9314265a029b961906d Merge: 2b02a05bdc3a6 f2bfc71aee75f Author: Sean Paul Date: Wed Oct 24 14:26:04 2018 -0400 Merge drm/drm-next into drm-misc-next 4.19 is out, Lyude asked for a backmerge, and it's been a while. All very good reasons on their own :-) Signed-off-by: Sean Paul commit 2b02a05bdc3a62d36e0d0b015351897109e25991 Author: Boris Brezillon Date: Tue Oct 9 15:24:46 2018 +0200 drm/vc4: Set ->is_yuv to false when num_planes == 1 When vc4_plane_state is duplicated ->is_yuv is left assigned to its previous value, and we never set it back to false when switching to a non-YUV format. Fix that by setting ->is_yuv to false in the 'num_planes == 1' branch of the vc4_plane_setup_clipping_and_scaling() function. Fixes: fc04023fafecf ("drm/vc4: Add support for YUV planes.") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181009132446.21960-1-boris.brezillon@bootlin.com commit 3e407417b1928e020e234e5410137860181d0abe Author: Boris Brezillon Date: Fri Aug 3 11:22:31 2018 +0200 drm/vc4: Fix X/Y positioning of planes using T_TILES modifier X/Y positioning of T-format buffers is quite tricky and the current implementation was failing to position a plane using this format correctly when the CRTC X, Y or both X and Y offsets were negative. It was also failing when the SRC X/Y offsets were != 0. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-5-boris.brezillon@bootlin.com commit a65511b1cd78e0a37b35af5737dd35cf0a5ae927 Author: Boris Brezillon Date: Fri Aug 3 11:22:30 2018 +0200 drm/vc4: Move ->offsets[] adjustment out of setup_clipping_and_scaling() The offset adjustment depends on the framebuffer modified, so let's just move this operation in the DRM_FORMAT_MOD_LINEAR case inside vc4_plane_mode_set(). This we'll be able to fix offset calculation for DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED and DRM_FORMAT_MOD_BROADCOM_SANDXXX. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-4-boris.brezillon@bootlin.com commit 58a6a36fe8e06199ff344fb95814af1d7ed71b35 Author: Boris Brezillon Date: Fri Aug 3 11:22:29 2018 +0200 drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic drm_atomic_helper_check_plane_state() takes care of checking the scaling capabilities and calculating the clipped X/Y offsets for us. Rely on this function instead of open-coding the logic. Incidentally, it seems to fix a problem we had with negative X/Y positioning of YUV planes. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-3-boris.brezillon@bootlin.com commit 91b6da23cc78c84f22a620f34a01532fd7fbd7c8 Author: Eric Anholt Date: Fri Aug 3 11:22:28 2018 +0200 drm/vc4: Define missing PITCH0_SINK_PIX field This is needed to support X/Y negative placement of planes using T-format buffers. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-2-boris.brezillon@bootlin.com commit 641019dcd19447d988a7257e626b86d057407484 Author: Eric Anholt Date: Fri Aug 3 11:22:27 2018 +0200 drm/vc4: Fix TILE_Y_OFFSET definitions Y_OFFSET field starts at bit 8 not 7. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180803092231.26446-1-boris.brezillon@bootlin.com commit ac1d6d74884ecad4c2bd5ff7e341e1a9baf295a8 Author: Linus Walleij Date: Tue Oct 23 09:46:30 2018 +0200 drm/panel: Add driver for Samsung S6D16D0 panel The Samsung S6D16D0 is a simple comman mode only DSI display that is used on the ST-Ericsson Ux500 reference design TVK1281618 user interface board (UIB). Cc: Andrzej Hajda Reviewed-by: Sam Ravnborg Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181023074630.29186-2-linus.walleij@linaro.org commit 674c9e198c57930d6616007ba853f22df6657f72 Author: Linus Walleij Date: Tue Oct 23 09:46:29 2018 +0200 drm/panel: Add DT bindings for Samsung S6D16D0 This adds the device tree bindings for the Samsung S6D16D0 panel. This is a command mode only panel using DSI. Cc: devicetree@vger.kernel.org Cc: Andrzej Hajda Acked-by: Sam Ravnborg Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181023074630.29186-1-linus.walleij@linaro.org commit e982e3f02071473cd1211e26cbe74a56b5be0aa0 Author: Linus Walleij Date: Tue Oct 23 09:24:22 2018 +0200 drm: dsi: Add lane clock rate fields to DSI device The DSI devices have a maximum operating frequency specified in their data sheet per the MIPI specification, and DSI hosts that can scale their frequency need this information to set their clock dividers right. As current panel drivers often lack this information, specify that setting it to zero will make the DSI host use some reasonable default. Reviewed-by: Andrzej Hajda Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20181023072422.25754-1-linus.walleij@linaro.org commit b5a209ca183fb9e1ddece50f7883db38c36fb9fa Author: Chris Wilson Date: Wed Oct 24 11:54:02 2018 +0100 drm/i915: Mark skl_update_plane and skl_disable_plane as static make W=1 caught the implicit prototypes (as would sparse): drivers/gpu/drm/i915/intel_sprite.c:462:1: error: no previous prototype for ‘skl_update_plane’ [-Werror=missing-prototypes] skl_update_plane(struct intel_plane *plane, ^~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/intel_sprite.c:487:1: error: no previous prototype for ‘skl_disable_plane’ [-Werror=missing-prototypes] skl_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc) ^~~~~~~~~~~~~~~~~ Fixes: 1e364f9008a7 ("drm/i915/gen11: Program the Y and UV plane for planar mode correctly, v3.") Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181024105402.18915-1-chris@chris-wilson.co.uk commit 9fa6e2f7609fdbb7d6f86be86371a5719bec0376 Author: Lionel Landwerlin Date: Wed Oct 24 11:51:58 2018 +0100 drm/i915/perf: Fix warning in documentation Forgot to add the description of this option in a previous commit. Signed-off-by: Lionel Landwerlin Fixes: cd956bfcd0f58d ("drm/i915/perf: add a parameter to control the size of OA buffer") Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181024105158.4732-1-lionel.g.landwerlin@intel.com commit 9edb6a0b206cb46782f9e74be035894bff9e0064 Author: Daniel Vetter Date: Fri Oct 19 10:43:11 2018 +0200 drm/doc: Update errno handbook We recently bikeshedded this to a different flavour, but forgot to update the recommendations. Cc: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181019084311.23836-1-daniel.vetter@ffwll.ch commit 6217f0ec7f111733f31b6ed158df2bf5a4ed28c4 Author: Daniel Vetter Date: Thu Oct 4 22:24:46 2018 +0200 drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp Shuts up warning noise. Reviewed-by: Alexandru Gheorghe Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-22-daniel.vetter@ffwll.ch commit 5d6f36b27d2764f3dc940606ee6b7ec5c669af3e Author: Ville Syrjälä Date: Tue Oct 23 21:21:02 2018 +0300 drm/i915: Don't apply the 16Gb DIMM wm latency w/a to BXT/GLK The 16Gb DIMM w/a is not applicable to BXT or GLK. Limit it to the appropriate platforms. This was especially harsh on GLK since we don't even try to read the DIMM information on that platforms, hence valid_dimm was always false and thus we always tried to apply the w/a. Furthermore the w/a pushed the level 0 latency above the level 1 latency, which doesn't really make sense. v2: Do the check when populating is_16gb_dimm (Mahesh) Cc: Mahesh Kumar Cc: Maarten Lankhorst Fixes: 86b592876cb6 ("drm/i915: Implement 16GB dimm wa for latency level-0") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181023182102.31549-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi Reviewed-by: Mahesh Kumar commit 26ee5bc390115ceaf82315fc88d0d6793c094361 Author: Maarten Lankhorst Date: Mon Oct 22 15:45:14 2018 +0200 drm/i915/gen11: Expose planar format support on gen11, v2. Now that we implemented support for planar formats on gen11, we can finally advertise it. Changes since v1: - Re-add change to skl_plane_has_planar(), was lost in rebase noise. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022134514.14756-1-maarten.lankhorst@linux.intel.com commit 1e364f9008a7cdf603ac394948ba7152b2842849 Author: Maarten Lankhorst Date: Thu Oct 18 13:51:33 2018 +0200 drm/i915/gen11: Program the Y and UV plane for planar mode correctly, v3. The UV plane is the master plane that does all color correction etc. It needs to be programmed with the dimensions for color plane 1 (UV). The Y plane just feeds the Y pixels to it. Program the scaler from the master only, and set PLANE_CTL_YUV420_Y_PLANE on the slave plane. Changes since v1: - Make a common skl_program_plane, and use it for both plane updates. Changes since v2: - Make color_plane explicit, to clarify skl_update_plane(). (Ville) Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-8-maarten.lankhorst@linux.intel.com commit cb2458baf8b55c3bf8afb22360dd2166d4637b9b Author: Maarten Lankhorst Date: Thu Oct 18 13:51:32 2018 +0200 drm/i915/gen11: Program the chroma upsampler for HDR planes. We configure the chroma upsampler with the same chroma siting as used by the scaler for consistency, the chroma upsampler is used instead of the scaler for YUV 4:2:0 on ICL's HDR planes. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-7-maarten.lankhorst@linux.intel.com commit b1554e23ccb6d8e611c5d54ca94bb2dfc54cae72 Author: Maarten Lankhorst Date: Thu Oct 18 13:51:31 2018 +0200 drm/i915/gen11: Program the scalers correctly for planar formats, v3. The first 3 planes (primary, sprite 0 and 1) have a dedicated chroma upsampler to upscale YUV420 to YUV444 and the scaler should only be used for upscaling. Because of this we shouldn't program the scalers in planar mode if NV12 and the chroma upsampler are used. Instead program the scalers like on normal planes. Sprite 2 and 3 have no dedicated scaler, and need to program the selected Y plane in the scaler mode. Changes since v1: - Make the comment less confusing. Changes since v2: - Fix checkpatch warning (Matt) - gen10- -> Pre-gen11 (Ville) - PS_SCALER_MODE_PACKED -> PS_SCALER_MODE_NORMAL. (Matt) - Add comment about scaler mode in intel_atomic_setup_scaler(). (Matt) - Rename need_scaling to need_scaler. (Matt) - Move the crtc need_scaling check to skl_update_scaler_crtc(). Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-6-maarten.lankhorst@linux.intel.com commit b048a00b3d9635141c7b1d4eabf6cff869a92238 Author: Maarten Lankhorst Date: Thu Oct 18 13:51:30 2018 +0200 drm/i915/gen11: Handle watermarks correctly for separate Y/UV planes, v2. Skylake style watermarks program the UV parameters into wm->uv_wm, and have a separate DDB allocation for UV blocks into the same plane. Gen11 watermarks have a separate plane for Y and UV, with separate mechanisms. The simplest way to make it work is to keep the current way of programming watermarks and calculate the Y and UV plane watermarks from the master plane. Changes since v1: - Constify crtc_state where possible. - Make separate paths for planar formats in skl_build_pipe_wm() (Matt) - Make separate paths for calculating total data rate. (Matt) - Make sure UV watermarks are unused on gen11+ by adding a WARN. (Matt) Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-5-maarten.lankhorst@linux.intel.com commit 1ab554b0099b655141c47ec5cd05d126eaed4868 Author: Maarten Lankhorst Date: Mon Oct 22 15:51:52 2018 +0200 drm/i915/gen11: Link nv12 Y and UV planes in the atomic state, v5. To make NV12 working on icl, we need to update 2 planes simultaneously. I've chosen to do this in the CRTC step after plane validation is done, so we know what planes are (in)visible. The linked Y plane will get updated in intel_plane_update_planes_on_crtc(), by the call to update_slave, which gets the master's plane_state as argument. The link requires both planes for atomic_update to work, so make sure skl_ddb_add_affected_planes() adds both states. Changes since v1: - Introduce icl_is_nv12_y_plane(), instead of hardcoding sprite numbers. - Put all the state updating login in intel_plane_atomic_check_with_state(). - Clean up changes in intel_plane_atomic_check(). Changes since v2: - Fix intel_atomic_get_old_plane_state() to actually return old state. - Move visibility changes to preparation patch. - Only try to find a Y plane on gen11, earlier platforms only require a single plane. Changes since v3: - Fix checkpatch warning about to_intel_crtc() usage. - Add affected planes from icl_add_linked_planes() before check_planes(), it's a cleaner way to do this. (Ville) Changes since v4: - Clear plane links in icl_check_nv12_planes() for clarity. - Only pass crtc_state to icl_check_nv12_planes(). - Use for_each_new_intel_plane_in_state() in icl_check_nv12_planes. - Rename aux to linked. (Ville) Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022135152.15324-1-maarten.lankhorst@linux.intel.com [mlankhorst: Change bool slave to u32, to satisfy checkpatch] [mlankhorst: Add WARN_ON's based on Ville's suggestion] commit 6711bd730b38cf19cd8e4156a761f4d9d57d8c43 Author: Maarten Lankhorst Date: Thu Oct 18 13:51:28 2018 +0200 drm/i915/gen11: Enable 6 sprites on gen11 Gen11 supports 7 planes + 1 cursor on each pipe. Bump I915_MAX_PLANES to 8, and set num_sprites correctly. Signed-off-by: Maarten Lankhorst [mlankhorst: Move the skl/bxt comment to the BXT branch. (Matt)] Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-3-maarten.lankhorst@linux.intel.com commit 24719e94ca2a9397f1385da4bce6a7adea1868a7 Author: Maarten Lankhorst Date: Mon Oct 22 12:20:00 2018 +0200 drm/i915: Fix unsigned overflow when calculating total data rate, v2. On gen11, we can definitely smash the 32-bits barrier with just a when we enable all planes in the next patch. Changes since v1: - Use div64_u64 (ickle). Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022102000.30255-1-maarten.lankhorst@linux.intel.com commit 3aae21fc2ed4e2b6b417e81a0d39bfa590e8510d Author: Ramalingam C Date: Tue Oct 23 16:11:28 2018 +0530 drm/i915: Move the DDC/AUX failure msgs to debug log When a HDCP authentication is in progress, if the display sink is hot unplugged, all DDC/AUX transaction related to the HDCP authentication will fail. This patch moves those kind of HDCP DDC/AUX failures into the debug logs instead of errors. v2: Bksv invalid state is provided as debug msg Signed-off-by: Ramalingam C Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540291288-22185-1-git-send-email-ramalingam.c@intel.com commit bdc93fe0eb82f3646dbe34f6cea0cfcf5a1516ff Author: Ramalingam C Date: Tue Oct 23 14:52:29 2018 +0530 drm/i915/debugfs: hdcp capability of a sink Add a debugfs entry for providing the hdcp capabilities of the sink connected to the HDCP capable connectors. v2: Squashed the sink's hdcp capability into this patch. [Daniel] Signed-off-by: Ramalingam C Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540286550-20399-4-git-send-email-ramalingam.c@intel.com commit 342ac601df6420070221b977cf0d38f91cdc1e8a Author: Ramalingam C Date: Tue Oct 23 14:52:28 2018 +0530 drm/i915: hdcp_check_link only on CP_IRQ HDCP check link is invoked only on CP_IRQ detection, instead of all short pulses. v3: No Changes. v4: Added sean in cc and collected the reviewed-by received. v5: No Change. v6: No Change. v7: No Change. v8: Rebased. Signed-off-by: Ramalingam C cc: Sean Paul Reviewed-by: Uma Shankar Reviewed-by: Sean Paul Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540286550-20399-3-git-send-email-ramalingam.c@intel.com commit f106d1005ac723813969102b5885b17b6fe1d9ff Author: Ramalingam C Date: Tue Oct 23 14:52:27 2018 +0530 drm/i915: Pullout the bksv read and validation For reusability purpose, this patch implements the hdcp1.4 bksv's read and validation as a functions. For detecting the HDMI panel's HDCP capability this fucntions will be used. v2: Rebased. v3: No Changes. v4: inline tag is removed with modified error msg. v5: No Changes. v6: No Changes. v7: Realigned the code. Signed-off-by: Ramalingam C Reviewed-by: Sean Paul Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1540286550-20399-2-git-send-email-ramalingam.c@intel.com commit fbffc5a3b877adc0c5334f3f6ff628ffb7e70d5e Author: Chris Wilson Date: Thu Oct 18 20:55:36 2018 +0100 drm/i915/guc: Propagate the fw xfer timeout Propagate the timeout on transferring the fw back to the caller where it may act upon it, usually by restarting the xfer before failing. v2: Simplify the wait to only wait upon the guc signaling completion, with an assertion that the fw xfer must have completed for it to be ready! Testcase: igt/drv_selftest/live_hangcheck Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20181018195536.11522-1-chris@chris-wilson.co.uk commit 7b5543015bbd31104be63dd9cf5cb6ad8e61fe17 Author: Ville Syrjälä Date: Mon Sep 17 18:15:04 2018 +0300 drm/i915/sdvo: Utilize intel_panel for fixed_mode Remove the local lvds fixed mode pointer from the sdvo encoder structure and instead utilize intel_panel like everyone else. v2: intel_sdvo_destroy() is gone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180917151504.8754-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 52fb7d295cfe4addb87f1cbead9be3c3e2d189c5 Author: Ville Syrjälä Date: Thu Oct 18 22:59:21 2018 +0300 drm/i915: Move the SKL+ zero constant alpha handling Let's run through the entire plane check even when the plane is invisible due to zero constant alpha. This makes for more consistent behaviour since we check the src/dst coordinates, stride etc. against the hardware limits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018195921.9898-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 1f6f92a3d50faeeaefb4bacc25fad2bc75db7db9 Author: Ville Syrjälä Date: Thu Oct 18 22:59:20 2018 +0300 drm/i915: Relocate SKL+ NV12 src width w/a The SKL+ NV12 src width alignment w/a is still living in an odd place. Everything else was already relocated closer to the main plane check function. Move this workaround as well. As a bonus we avoid the funky rotated vs. not mess with the src coordinates as this now gets checked before we rotate the coordinates. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181018195921.9898-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit cd956bfcd0f58d20485ac0a785415f7d9327a95f Author: Lionel Landwerlin Date: Tue Oct 23 11:07:07 2018 +0100 drm/i915/perf: add a parameter to control the size of OA buffer The way our hardware is designed doesn't seem to let us use the MI_RECORD_PERF_COUNT command without setting up a circular buffer. In the case where the user didn't request OA reports to be available through the i915 perf stream, we can set the OA buffer to the minimum size to avoid consuming memory which won't be used by the driver. v2: Simplify oa buffer size exponent selection (Chris) Reuse vma size field (Lionel) v3: Restrict size opening parameter to values supported by HW (Chris) v4: Drop out of date comment (Matt) Add debug message when buffer size is rejected (Matt) Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181023100707.31738-5-lionel.g.landwerlin@intel.com commit 5728de2f4f6abc37a2067f2a7edc41c8678574d8 Author: Lionel Landwerlin Date: Tue Oct 23 11:07:06 2018 +0100 drm/i915/perf: pass stream to vfuncs when possible We want to use some of the properties of the perf stream to program the hardware in a later commit. v2: Pass only perf stream as argument (Matthew) Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181023100707.31738-4-lionel.g.landwerlin@intel.com commit 784b1a8435da458f10f3837477ae0a18b579d278 Author: Lionel Landwerlin Date: Tue Oct 23 11:07:05 2018 +0100 drm/i915/perf: remove redundant oa buffer initialization We initialize the OA buffer everytime we enable the OA unit (first call in gen[78]_oa_enable), so we don't need to initialize when preparing the metric set. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20181023100707.31738-3-lionel.g.landwerlin@intel.com commit 816c37159ca2af48352f0cbc90009694bcfcd55b Author: Lionel Landwerlin Date: Tue Oct 23 11:07:04 2018 +0100 drm/i915/perf: update generated files headers Lucas submitted a patch to generator script, so just reflecting the change here. Signed-off-by: Lionel Landwerlin Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20181023100707.31738-2-lionel.g.landwerlin@intel.com commit c97ea6a61b5eb1200f4d5ccbf6601bb9f5bc7d3f Author: Mamta Shukla Date: Fri Oct 19 02:18:15 2018 +0530 drm: msm: adreno: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) +PTR_ERR Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR because its better to have inlined function rather than code-opened implementation. Signed-off-by: Mamta Shukla Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181018204815.GA23390@armorer commit 068f304781804e208f901d8f6083189e0e28c420 Author: Souptick Joarder Date: Tue Oct 23 09:32:22 2018 +0530 drm/drm_pci.c: Use dma_zalloc_coherent Replace dma_alloc_coherent + memset with dma_zalloc_coherent. Signed-off-by: Souptick Joarder Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181023040222.GA1540@jordon-HP-15-Notebook-PC commit 32e932e37e6b6e13b66add307192c7ddd40a781d Author: Eugeniy Paltsev Date: Fri Sep 28 17:41:26 2018 +0300 DRM: UDL: get rid of useless vblank initialization UDL doesn't support vblank functionality so we don't need to initialize vblank here (we are able to send page flip completion events even without vblank initialization) Moreover current drm_vblank_init call with num_crtcs > 0 causes sending DRM_EVENT_FLIP_COMPLETE event with zero timestamp every time. This breaks userspace apps (for example weston) which relies on timestamp value. Cc: stable@vger.kernel.org Signed-off-by: Eugeniy Paltsev Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180928144126.21598-1-Eugeniy.Paltsev@synopsys.com commit 8dc830e4cf6eb529e66168c2604e00311e713d77 Author: Souptick Joarder Date: Tue Sep 18 22:09:03 2018 +0530 drm/rcar-du: Convert drm_atomic_helper_suspend/resume() convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). remove suspend_state field from the rcar_du_device structure as it is no more required. With this conversion, also drm_fbdev_cma_set_suspend_unlocked() will left with no consumer. So this function can be removed. Signed-off-by: Souptick Joarder Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180918163903.GA11172@jordon-HP-15-Notebook-PC commit 43cf1fc0e27e2f7eeb5d6c15fd023813a5b49987 Author: Chunming Zhou Date: Tue Oct 23 17:37:45 2018 +0800 drm: fix deadlock of syncobj v6 v2: add a mutex between sync_cb execution and free. v3: clearly separating the roles for pt_lock and cb_mutex (Chris) v4: the cb_mutex should be taken outside of the pt_lock around this if() block. (Chris) v5: fix a corner case v6: tidy drm_syncobj_fence_get_or_add_callback up. (Chris) Tested by syncobj_basic and syncobj_wait of igt. Signed-off-by: Chunming Zhou Cc: Daniel Vetter Cc: Chris Wilson Cc: Christian König Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson Signed-off-by: Christian König Link: https://patchwork.kernel.org/patch/10652893/ commit 42e90a687e76e8e0613a6e6e552d9ab239ee9b3f Author: Daniele Ceraolo Spurio Date: Mon Oct 22 16:04:26 2018 -0700 drm/i915/guc: remove unneeded goto from selftest commit e346a991f42c ("drm/i915/guc: drop negative doorbell alloc selftest") removed the negative case from the selftest and left no code between the goto from the positive case of the test and the label itself, so we can get rid of it. Reported-by: Lucas De Marchi Cc: Lucas De Marchi Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Lucas De Marchi Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-5-daniele.ceraolospurio@intel.com commit caef29cd072de3d33dc91258879201e9579d3c79 Author: Daniele Ceraolo Spurio Date: Mon Oct 22 16:04:25 2018 -0700 drm/i915/guc: fix comment about fallback to execlists We stopped supporting fallback to execlists in commit 121981fafe69 (drm/i915/guc: Combine enable_guc_loading|submission modparams). We do instead reset and retry in some cases, depending on the workarounds required by the platform. Cc: Michal Wajdeczko Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-4-daniele.ceraolospurio@intel.com commit fb0c37f67010cbafd284b2db351a332d9084c86c Author: Daniele Ceraolo Spurio Date: Mon Oct 22 16:04:24 2018 -0700 drm/i915/guc: doorbell checking cleanup A collection of very small cleanups/improvements around doorbell checking that do not deserve their own patch: - Move doorbell-related HW defs to intel_guc_reg.h - use GUC_NUM_DOORBELLS instead of GUC_DOORBELL_INVALID where appropriate - do not stop on error in guc_verify_doorbells - do not print drbreg on error: the only content of the register apart from the valid bit is the lower part of the physical memory address, which we can't use even if valid because we don't know which descriptor it came from (since the doorbell is in an unexpected state) - Move the checking of doorbell valid bit to a common helper. v2: add more cleanups (move defs, use GUC_NUM_DOORBELLS, don't stop in guc_verify_doorbells) (Michal) v3: move more things to intel_guc_reg, redefine GUC_DOORBELL_INVALID (Michal), drop guc_doorbell_qw since it just duplicates guc_doorbell_info Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-3-daniele.ceraolospurio@intel.com commit bfeabcc87ae0f2dd75bc64f3fedbb6b762b4e5c6 Author: Daniele Ceraolo Spurio Date: Mon Oct 22 16:04:23 2018 -0700 drm/i915/guc: reserve the doorbell before selecting the cacheline Cacheline selection is only needed if we actually manage to reserve a doorbell. Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-2-daniele.ceraolospurio@intel.com commit 6f1312e6e046de8a77aa5e657e269f1968eca00c Author: Daniele Ceraolo Spurio Date: Mon Oct 22 16:04:22 2018 -0700 drm/i915/guc: rename __create/destroy_doorbell The 2 functions don't create or destroy anything, they just update the doorbell state in memory. Use init and fini instead for clarity. Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-1-daniele.ceraolospurio@intel.com commit 3d42f1ddc47a69c0ce155f9f30d764c4d689a5fa Author: Aaron Ma Date: Sat Sep 1 02:20:00 2018 +0800 vgaarb: Keep adding VGA device in queue If failed to find the deivice owning the boot framebuffer, try to use the first VGA device instead of the last one. Usually the 1st device is integrated GPU who owns the boot framebuffer. Signed-off-by: Aaron Ma Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1535739600-8842-2-git-send-email-aaron.ma@canonical.com commit a81c9ab678802075b7942c41cf640d9d9866d2db Author: Aaron Ma Date: Sat Sep 1 02:19:59 2018 +0800 vgaarb: Add support for 64-bit frame buffer address EFI GOP uses 64-bit frame buffer address when some BIOS disabled CSM support. vgaarb only stores lfb_base, this will lead boot framebuffer to wrong device. Add ext_lfb_base support to use 64-bit fb address. Signed-off-by: Aaron Ma Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1535739600-8842-1-git-send-email-aaron.ma@canonical.com commit ac128918482d2c21c806ff01dc0a029919f8fb0d Author: Rodrigo Vivi Date: Mon Oct 22 10:15:26 2018 -0700 drm/i915: uncore_fw_domains_init sort platforms newer-to-older No functional change. Just sorting this "if" statement from newer to older platform. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-5-rodrigo.vivi@intel.com commit fb72deaefe5982f983907a01b8090a37dd1e06d5 Author: Rodrigo Vivi Date: Mon Oct 22 10:15:25 2018 -0700 drm/i915: power_domains_init sort platforms newer-to-older No functional change. Just sorting this "if" block from newer to older platform. v2: Fix few positions (Ville) Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-4-rodrigo.vivi@intel.com commit 210126bd807d39a9ccb65872b1c5112a18b23777 Author: Rodrigo Vivi Date: Mon Oct 22 10:15:24 2018 -0700 drm/i915: digital_port_connected sort platforms newer-to-older Just sorting this "if" block from newer to older platform. The main difference here is the addition of a missing case with return false that should never occur. And if it occurs it is better than to raise a warn than use the icl one. The gen >= 11 was already present in the previous logic, although hidden. So, in summary no real functional change. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-3-rodrigo.vivi@intel.com commit 36c1f02875c1b7fec4d5984f3d825005cfadaa41 Author: Rodrigo Vivi Date: Mon Oct 22 10:15:23 2018 -0700 drm/i915: compute_min_voltage_level sort platforms newer-to-older No functional change. Just sorting this "if" block from newer to older platform. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-2-rodrigo.vivi@intel.com commit fdec4df43ca5171a05e7cfec7e89efb295ff87e5 Author: Rodrigo Vivi Date: Mon Oct 22 10:15:22 2018 -0700 drm/i915: ddi_clock_get sort platforms newer-to-older. No functional change. Just sorting this "if" block from newer to older platform. v2: Invert gen9_bc and gen9_lp (Ville) Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-1-rodrigo.vivi@intel.com commit 29edbc3ebdb0faa934114f14bf12fc0b784d4f1b Author: Stefano Brivio Date: Fri Aug 17 21:09:48 2018 +0200 netfilter: ipset: Make invalid MAC address checks consistent Set types bitmap:ipmac and hash:ipmac check that MAC addresses are not all zeroes. Introduce one missing check, and make the remaining ones consistent, using is_zero_ether_addr() instead of comparing against an array containing zeroes. This was already done for hash:mac sets in commit 26c97c5d8dac ("netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp"). Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik commit 8cc4ccf58379935f3ad456cc34e61c4e4c921d0e Author: Stefano Brivio Date: Fri Aug 17 21:09:47 2018 +0200 netfilter: ipset: Allow matching on destination MAC address for mac and ipmac sets There doesn't seem to be any reason to restrict MAC address matching to source MAC addresses in set types bitmap:ipmac, hash:ipmac and hash:mac. With this patch, and this setup: ip netns add A ip link add veth1 type veth peer name veth2 netns A ip addr add 192.0.2.1/24 dev veth1 ip -net A addr add 192.0.2.2/24 dev veth2 ip link set veth1 up ip -net A link set veth2 up ip netns exec A ipset create test hash:mac dst=$(ip netns exec A cat /sys/class/net/veth2/address) ip netns exec A ipset add test ${dst} ip netns exec A iptables -P INPUT DROP ip netns exec A iptables -I INPUT -m set --match-set test dst -j ACCEPT ipset will match packets based on destination MAC address: # ping -c1 192.0.2.2 >/dev/null # echo $? 0 Reported-by: Yi Chen Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik commit 60230aacd528ac3235f6349582270662c1e725a7 Author: Madhav Chauhan Date: Mon Oct 15 17:28:06 2018 +0300 drm/i915/icl: Define DSI panel programming registers This patch defines DSI_CMD_RXCTL, DSI_CMD_TXCTL registers, bitfields, masks and macros used for configuring DSI panel. v2: Define remaining bitfields v3 by Jani: - Alignment fix Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/37b41fe08ce50c3d9ef7d55c03d12a8a10a252d6.1539613303.git.jani.nikula@intel.com commit 303e347cebc3cd98326cd4fa66f4fd8219b9f603 Author: Madhav Chauhan Date: Mon Oct 15 17:28:05 2018 +0300 drm/i915/icl: Enable DSI transcoders This patch enables DSI transcoders by writing to TRANS_CONF registers and wait for its state to be enabled. v2 by Jani: - Rebase Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4b8ea0298ef9d6832a2dd69c923832d0b7b58184.1539613303.git.jani.nikula@intel.com commit 372610f3c81491da038cf40315c3116f237365a4 Author: Madhav Chauhan Date: Mon Oct 15 17:28:04 2018 +0300 drm/i915/icl: Define TRANS_CONF register for DSI This patch defines TRANS_CONF registers for DSI ports 0 and 1. Bitfields of these registers used for enabling and reading the current state of transcoder. v2: Add blank line before comment v3 by Jani: - Move DSI specific .pipe_offsets to GEN11_FEATURES - Macro placement and comment juggling Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3aa11e41ea0d4eb434423cc5ddf0a63b19d54deb.1539613303.git.jani.nikula@intel.com commit d1aeb5f399d98443fd1f4b26480519379cb9cec8 Author: Madhav Chauhan Date: Mon Oct 15 17:28:03 2018 +0300 drm/i915/icl: Configure DSI transcoder timings As part of DSI enable sequence, transcoder timings (horizontal & vertical) need to be set so that transcoder will generate the stream output as per those timings. This patch set required transcoder timings as per BSPEC. v2: Remove TRANS_TIMING_SHIFT usage v3 by Jani: - Rebase - Reduce temp variable use - Checkpatch fix Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/525949ae4e919a4f2b807d606234322534656048.1539613303.git.jani.nikula@intel.com commit 7b56caf36376f6d714a56ae42865da0a5ef7b2fc Author: Madhav Chauhan Date: Mon Oct 15 17:28:02 2018 +0300 drm/i915/icl: Define DSI transcoder timing registers This patch defines registers and bitfields used for programming DSI transcoder's horizontal and vertical timings. v2: Remove TRANS_TIMING_SHIFT definition v3 by Jani: - Group macros by transcoder Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/dcc329280e3aca5b4fc3482c5bcaa0cac043c5d8.1539613303.git.jani.nikula@intel.com commit 70f4f502c47e9c541b0ae329440a7fe809cc5211 Author: Madhav Chauhan Date: Mon Oct 15 17:28:01 2018 +0300 drm/i915/icl: Program TRANS_DDI_FUNC_CTL registers This patch select input PIPE for DSI, data lanes width, enable port sync mode and wait for DSI link to become ready. v2 by Jani: - Use MISSING_CASE with fallthrough instead of DRM_ERROR - minor stylistic changes Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/080320dc9a9e321dbe73567c6a7aa1dcff0f21c2.1539613303.git.jani.nikula@intel.com commit 49edbd49786ee32b24f43efd383c9e97528cc4aa Author: Madhav Chauhan Date: Mon Oct 15 17:28:00 2018 +0300 drm/i915/icl: Define TRANS_DDI_FUNC_CTL DSI registers This patch defines TRANS_DDI_FUNC_CTL and TRANS_DDI_FUNC_CTL2 registers and their bitfields for DSI. These registers are used for enabling port sync mode, input pipe select, data lane width configuration etc. v2: Changes: - Remove redundant extra line - Correct some of bitfield definition v3 by Jani: - Move DSI transcoder offsets to GEN11_FEATURES Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6b2d87db82660320be10e423742cbf5a31e18037.1539613303.git.jani.nikula@intel.com commit 9128b10249543200fbd26758beab2e7dd93addfc Author: Michal Wajdeczko Date: Fri Oct 19 10:17:24 2018 +0000 drm/i915/guc: Limit number of scratch registers used for H2G We wrongly assumed that GuC is only using last scratch register for G2H messages, but in fact it is also using register [14] to report sleep state status. Remove that register from our H2G send registers pool. v2: No message from host to GuC uses more than 8 registers and the GuC FW itself uses an 8-element array to store the H2G message, so we may reduce our send array to just 8 registers (Daniele) v3: use explicit define (Daniele) v4: and explicit comment (Daniele) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181019101725.14024-1-michal.wajdeczko@intel.com commit e51767279f11571b112dbeaef2628968c62f90a6 Author: Alexandru Gheorghe Date: Fri Oct 19 11:57:51 2018 +0100 drm/selftest: Refactor test-drm_plane_helper The idea is to split test implementations in different compilation units, but have one single place where we define the list of tests, in this case(drm_modeset_selftests.h). Signed-off-by: Alexandru Gheorghe Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181019105752.17741-9-alexandru-cosmin.gheorghe@arm.com commit 9c71a6686bfa4bd8404d1bfa8f210b9901991fa9 Author: Alexandru Gheorghe Date: Fri Oct 19 11:57:44 2018 +0100 drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation In-line member documentation seems to be desired way of documenting structure members. This change had been suggested by Daniel Vetter here: https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html Signed-off-by: Alexandru Gheorghe Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181019105752.17741-2-alexandru-cosmin.gheorghe@arm.com commit d364dc66e2d5afdd825f79b70d8d81d287b2524a Author: Madhav Chauhan Date: Mon Oct 15 17:27:59 2018 +0300 drm/i915/icl: Configure DSI transcoders This patch programs DSI operation mode, pixel format, BGR info, link calibration etc for the DSI transcoder. This patch also extract BGR info of the DSI panel from VBT and save it inside struct intel_dsi which used for configuring DSI transcoder. v2: Rebase v3: Use newly defined bitfields. v4 by Jani: - Use intel_dsi_bitrate() - Make bgr_enabled bool - Use 0 instead of 0x0 - Replace DRM_ERROR() with MISSING_CASE() on pixel format and video mode - Use is_vid_mode() Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7de4e39a4b2a18e53a2b9d9cea5b5b4c9d6eeb34.1539613303.git.jani.nikula@intel.com commit 5ffce2546233e0adeb48c752e4e828acd0a4a4a0 Author: Madhav Chauhan Date: Mon Oct 15 17:27:58 2018 +0300 drm/i915/icl: Define TRANS_DSI_FUNC_CONF register This patch defines transcoder function configuration registers and its bitfields for both DSI ports. Used while programming/enabling DSI transcoder. v2: Changes (Jani N) - Define _SHIFT and _MASK for bitfields - Define values for fields already shifted in place v3 by Jani: - Fix _SHIFT fields copy-pasted from _MASK - Indentation fixes - Reduce S3D orientation to single macro - Wrap a macro parameter in parens Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f188d3e59f27cbcac87d331af3d0222249db7fe4.1539613303.git.jani.nikula@intel.com commit 292272ee7e9e41ec2e1734810ab16cee43731874 Author: Madhav Chauhan Date: Mon Oct 15 17:27:57 2018 +0300 drm/i915/icl: Add macros for MMIO of DSI transcoder registers This patch adds _MMIO_DSI macros for accessing DSI transcoder registers. v2: Use _MMIO_TRANS() (Ville) Credits-to: Jani N Cc: Jani Nikula Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3ab94184357d63f2f87b90ef6f5029fb19bef73a.1539613303.git.jani.nikula@intel.com commit ca8fc99f2ac1b6c38e875cb23fd2ffc591240b19 Author: Madhav Chauhan Date: Mon Oct 15 17:27:56 2018 +0300 drm/i915/icl: Get DSI transcoder for a given port This patch adds a helper function to retrieve DSI transcoder for a given DSI port using newly defined enum names for DSI transcoders. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f88ff26fa10c68e37b7838bb7c8573c881474e73.1539613303.git.jani.nikula@intel.com commit 5fea8645585ff183e1421b8d1b46bc3bf99b0a87 Author: Madhav Chauhan Date: Mon Oct 15 17:27:55 2018 +0300 drm/i915/icl: Program TA_TIMING_PARAM registers This patch programs D-PHY timing parameters for the bus turn around flow(in escape clocks) only if dsi link frequency <=800 MHz using DPHY_TA_TIMING_PARAM and its identical register DSI_TA_TIMING_PARAM (inside DSI Controller within the Display Core). v2: Changes - Don't use KHz() macro (Ville/Jani N) - Use newly defined bitfields v3 by Jani: - Use intel_dsi_bitrate() in favor of a new field - Remove redundant parens Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2c777092a748dfc973714399d8c19ed7a8c31a10.1539613303.git.jani.nikula@intel.com commit e72cce53101767230b7800c5b6e6341aaa451632 Author: Madhav Chauhan Date: Mon Oct 15 17:27:54 2018 +0300 drm/i915/icl: Program DSI clock and data lane timing params This patch programs D-PHY timing parameters for the clock and data lane (in escape clocks) of DSI controller (DSI port 0 and 1). These programmed timings would be used by DSI Controller to calculate link transition latencies of the data and clock lanes. v2: Use newly defined bitfields for data and clock lane v3 by Jani: - Rebase on dphy abstraction - Reduce local variables - Remove unrelated comment changes (Ville) - Use the same style for range checks as VLV (Ville) - Assign, don't OR dphy_reg contents Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/70d491e2357f328a63b67ea3c43cb57a1d469c15.1539613303.git.jani.nikula@intel.com commit b687c1984c4fbb40ba9058c5db9a604ffc466f5e Author: Madhav Chauhan Date: Mon Oct 15 17:27:53 2018 +0300 drm/i915/icl: Make common DSI functions available This patch moves couple of legacy DSI functions to header and common DSI files so that they can be re-used by Gen11 DSI. No functional change. v2 by Jani: - Move intel_dsi_msleep() to intel_dsi_vbt.c Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bd1f5f3e96d3e1de4d359f4fd1b750ac7e3c87d4.1539613303.git.jani.nikula@intel.com commit 9ec9a87b1ee8ed96428a8ad284d25cdea5cf0706 Author: Jani Nikula Date: Mon Oct 15 17:27:52 2018 +0300 drm/i915/dsi: abstract intel_dsi_tlpx_ns() Will be needed in the future. No functional changes. Cc: Madhav Chauhan Cc: Ville Syrjala Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2cb427e5bc2ea88e4226bfcf162b3a6f307e32e1.1539613303.git.jani.nikula@intel.com commit 073a391ca0352d4c66b6ffc4ff5db18a457f5519 Author: Nishad Kamdar Date: Wed Oct 17 20:17:20 2018 +0530 staging: iio: ad7816: Switch to the gpio descriptor interface Use the gpiod interface for rdwr_pin, convert_pin and busy_pin instead of the deprecated old non-descriptor interface. Note that Phil Reid identified that some of this code would never have worked. A follow up patch can fix that as this is just a direct change of interface. Signed-off-by: Nishad Kamdar Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron commit d42282db6c41cd1896090c3bc95fc9cfd7268189 Author: Colin Ian King Date: Tue Oct 16 17:14:18 2018 +0100 iio: adc: ina2xx: add in early -EINVAL returns in case statements Static analysis with CoverityScan is throwing warnings that specific case statements are missing breaks. Rather than adding breaks, add return -EINVAL to the specific case statements to clarify the error return paths. Fix also saves 50 bytes. Before: text data bss dec hex filename 21418 4936 128 26482 6772 drivers/iio/adc/ina2xx-adc.o After: dec hex filename 21370 4936 128 26434 6742 drivers/iio/adc/ina2xx-adc.o (gcc 8.2, x86-64) Detected by CoverityScan, CID#1462408 ("Missing break in switch") Signed-off-by: Colin Ian King Reviewed-by: Stefan Brüns Signed-off-by: Jonathan Cameron commit e480490c90956f8e46ba666b49bc56000083bbfe Author: Marcelo Schmitt Date: Wed Oct 17 22:31:47 2018 -0300 Staging:iio:adc:ad7606: Match parenthesis alignment Change close parenthesis alignment to match respective open parenthesis at iio/drivers/staging/iio/adc/ad7606.c line 379. This makes the file more compliant with the preferred coding style for the linux kernel. Signed-of-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron commit 2019738cc8e3d552e8ec426b42b2e1f53782f459 Author: Martin Kelly Date: Mon Oct 15 20:27:09 2018 -0700 iio: st_sensors: miscellaneous cleanup Miscellaneous cleanup to fix minor consistency, grammar, and spelling issues. Signed-off-by: Martin Kelly Signed-off-by: Jonathan Cameron commit 4cd62a5425115ad14b54f2c7dece597c0c57d701 Author: Slawomir Stepien Date: Thu Oct 18 20:59:33 2018 +0200 staging: iio: adc: ad7280a: use crc8.h API to build crc table The custom build function ad7280_crc8_build_table is not needed. The crc8_populate_msb function from linux/crc8.h will build the same crc table. Signed-off-by: Slawomir Stepien Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron commit 0559ef7fde67bc6c83c6eb6329dbd6649528263e Author: Slawomir Stepien Date: Sat Oct 20 23:04:11 2018 +0200 staging: iio: adc: ad7280a: handle error from __ad7280_read32() Inside __ad7280_read32(), the spi_sync_transfer() can fail with negative error code. This change will ensure that this error is being passed up in the call stack, so it can be handled. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 572974610273d58b35d6632eb3a07b6f048c5b89 Author: Jiri Olsa Date: Tue Oct 16 17:06:14 2018 +0200 tools iio: Override CFLAGS assignments So user could specify outside CFLAGS values. Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Signed-off-by: Jiri Olsa Signed-off-by: Jonathan Cameron commit 4c953d03970a39d034ee2c860bbd65f5970aa2ce Author: Manasi Navare Date: Mon Oct 8 17:23:51 2018 -0700 drm/dp: Add definitions for eDP Rev 1.4a and 1.4b VESA eDP 1.4 specification has separate fields defined in EDP_DPCD_REV for eDP 1.4a and 1.4b eDP revisions. This patch defines those. Found this when one of my eDP panels advertises eDP 1.4a (04h) in the EDP_DPCD_REV DPCD field. Cc: Jani Nikula Cc: Ville Syrjala Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181009002351.23085-1-manasi.d.navare@intel.com commit 4f15665ccbba434b2c81a3ba833941de6afea95e Author: Xiong Zhang Date: Thu Oct 18 13:40:31 2018 +0800 drm/i915: Add ppgtt to GVT GEM context Currently the guest couldn't boot up under GVT-g environment as the following call trace exists: [ 272.504762] BUG: unable to handle kernel NULL pointer dereference at 0000000000000100 [ 272.504834] Call Trace: [ 272.504852] execlists_context_pin+0x2b2/0x520 [i915] [ 272.504869] intel_gvt_scan_and_shadow_workload+0x50/0x4d0 [i915] [ 272.504887] intel_vgpu_create_workload+0x3e2/0x570 [i915] [ 272.504901] intel_vgpu_submit_execlist+0xc0/0x2a0 [i915] [ 272.504916] elsp_mmio_write+0xc7/0x130 [i915] [ 272.504930] intel_vgpu_mmio_reg_rw+0x24a/0x4c0 [i915] [ 272.504944] intel_vgpu_emulate_mmio_write+0xac/0x240 [i915] [ 272.504947] intel_vgpu_rw+0x22d/0x270 [kvmgt] [ 272.504949] intel_vgpu_write+0x164/0x1f0 [kvmgt] GVT GEM context is created by i915_gem_context_create_gvt() which doesn't allocate ppgtt. So GVT GEM context structure doesn't have a valid i915_hw_ppgtt. This patch create ppgtt table at GVT GEM context creation, then assign shadow ppgtt's root table address to this ppgtt when shadow ppgtt will be used on GPU. So GVT GEM context has valid ppgtt address. But note that this ppgtt only contain valid ppgtt root table address, the table entry in this ppgtt structure are invalid. Fixes:4a3d3f6785be("drm/i915: Match code to comment and enforce ppgtt for execlists") Signed-off-by: Xiong Zhang Reviewed-by: Zhenyu Wang Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1539841231-3157-1-git-send-email-xiong.y.zhang@intel.com commit 4ed0dfe3cf39a97cd0ed532212b5e55e9752fe3f Author: Tony Lindgren Date: Thu Sep 27 13:39:07 2018 -0700 ARM: dts: dra7: Move l4 child devices to probe them with ti-sysc With l4 interconnect hierarchy and ti-sysc interconnect target module data in place, we can simply move all the related child devices to their proper location and enable probing using ti-sysc. In general the first child device address range starts at range 0 from the ti-sysc interconnect target so the move involves adjusting the child device reg properties for that. In case of any regressions, problem devices can be reverted to probe with legacy platform data as needed by moving them back and removing the related interconnect target module node. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 549fce068a3112815e57ba65a067f6b9c3b7ec10 Author: Tony Lindgren Date: Thu Sep 27 13:36:28 2018 -0700 ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data Similar to commit 8f42cb7f64c7 ("ARM: dts: omap4: Add l4 interconnect hierarchy and ti-sysc data"), let's add proper interconnect hierarchy for l4 interconnect instances with the related ti-sysc interconnect module data as in Documentation/devicetree/bindings/bus/ti-sysc.txt. Using ti-sysc driver binding allows us to start dropping legacy platform data in arch/arm/mach-omap2/omap*hwmod*data.c files later on in favor of ti-sysc dts data. This data is generated based on platform data from a booted system and the interconnect acces protection registers for ranges. To avoid regressions, we initially validate the device tree provided data against the existing platform data on boot. Note that we cannot yet include this file from the SoC dtsi file until the child devices are moved to their proper locations in the interconnect hierarchy in the following patch. Otherwise we would have the each module probed twice. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 87fc89ced3a78f7f0845afab1934d509ef4ad0f2 Author: Tony Lindgren Date: Mon Sep 24 16:20:54 2018 -0700 ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc With l4 interconnect hierarchy and ti-sysc interconnect target module data in place, we can simply move all the related child devices to their proper location and enable probing using ti-sysc. In general the first child device address range starts at range 0 from the ti-sysc interconnect target so the move involves adjusting the child device reg properties for that. In case of any regressions, problem devices can be reverted to probe with legacy platform data as needed by moving them back and removing the related interconnect target module node. Note that we are not yet moving dss or wkup_m3, those will be moved later after some related driver changes. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit f711c575cfeca820b97bbec8d05c958e82f5fec4 Author: Tony Lindgren Date: Mon Sep 24 16:20:37 2018 -0700 ARM: dts: am335x: Add l4 interconnect hierarchy and ti-sysc data Similar to commit 8f42cb7f64c7 ("ARM: dts: omap4: Add l4 interconnect hierarchy and ti-sysc data"), let's add proper interconnect hierarchy for l4 interconnect instances with the related ti-sysc interconnect module data as in Documentation/devicetree/bindings/bus/ti-sysc.txt. Using ti-sysc driver binding allows us to start dropping legacy platform data in arch/arm/mach-omap2/omap*hwmod*data.c files later on in favor of ti-sysc dts data. This data is generated based on platform data from a booted system and the interconnect acces protection registers for ranges. To avoid regressions, we initially validate the device tree provided data against the existing platform data on boot. Note that we cannot yet include this file from the SoC dtsi file until the child devices are moved to their proper locations in the interconnect hierarchy in the following patch. Otherwise we would have the each module probed twice. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit d95adfd4585305ba52f56b8351cdd21842f9354a Author: Tony Lindgren Date: Mon Sep 24 16:22:37 2018 -0700 ARM: dts: am437x: Move l4 child devices to probe them with ti-sysc With l4 interconnect hierarchy and ti-sysc interconnect target module data in place, we can simply move all the related child devices to their proper location and enable probing using ti-sysc. In general the first child device address range starts at range 0 from the ti-sysc interconnect target so the move involves adjusting the child device reg properties for that. In case of any regressions, problem devices can be reverted to probe with legacy platform data as needed by moving them back and removing the related interconnect target module node. Note that we are not yet moving dss or wkup_m3, those will be moved later after some related driver changes. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 21c0607cc40d2ae169e2d3ddd10ed0e43206032f Author: Tony Lindgren Date: Thu Oct 18 09:32:02 2018 -0700 ARM: dts: am437x: Add l4 interconnect hierarchy and ti-sysc data Similar to commit 8f42cb7f64c7 ("ARM: dts: omap4: Add l4 interconnect hierarchy and ti-sysc data"), let's add proper interconnect hierarchy for l4 interconnect instances with the related ti-sysc interconnect module data as in Documentation/devicetree/bindings/bus/ti-sysc.txt. Using ti-sysc driver binding allows us to start dropping legacy platform data in arch/arm/mach-omap2/omap*hwmod*data.c files later on in favor of ti-sysc dts data. This data is generated based on platform data from a booted system and the interconnect acces protection registers for ranges. To avoid regressions, we initially validate the device tree provided data against the existing platform data on boot. Note that we cannot yet include this file from the SoC dtsi file until the child devices are moved to their proper locations in the interconnect hierarchy in the following patch. Otherwise we would have the each module probed twice. Cc: Dave Gerlach Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren commit b5f8ffbb6fad9151634805c2001af4afbb884eca Author: Tero Kristo Date: Fri Aug 31 18:14:51 2018 +0300 ARM: dts: dra7: convert to use new clkctrl layout Convert DRA7xx to use the new clockdomain based layout. Previously the clkctrl split was based on CM isntance boundaries. The new layout helps with introducing the interconnect driver instances. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 23298c33f9b3c6a8d7b6bed303b7ee4d87a42b94 Author: Tero Kristo Date: Fri Aug 31 18:14:50 2018 +0300 ARM: dts: am43xx: convert to use new clkctrl layout Convert AM43xx to use the new clockdomain based layout. Previously the clkctrl split was based on CM isntance boundaries. The new layout helps with introducing the interconnect driver instances. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 69fd70c7ff31d3f00833c472c3994a02bb0ab287 Author: Tero Kristo Date: Fri Aug 31 18:14:49 2018 +0300 ARM: dts: am33xx: convert to use new clkctrl layout Convert AM33xx to use the new clockdomain based layout. Previously the clkctrl split was based on CM instance boundaries. The new layout helps with introducing the interconnect driver instances. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit cdb07cce5f54784c46aa2eb2260e4233ce9b66b5 Merge: b3378de026698 f5e80203dadc2 Author: Tony Lindgren Date: Thu Oct 18 10:03:40 2018 -0700 Merge tag 'omap-for-v4.20/ti-sysc-take2-signed' into omap-for-v4.21/dt-ti-sysc TI sysc driver changes for v4.20 merge window This series gets rid of the SYSC_QUIRK_RESOURCE_PROVIDER to make device detection happen mostly only if #define DEBUG is set. Few core devices still need to be detected to set legacy quirks. We also add support for booting am335x, am437x and dra7 SoCs with L4 devices defined in device tree instead of legacy platform data. And finally we simplify suspend with just SET_NOIRQ_SYSTEM_SLEEP_PM_OPS and dropping the custom functions that were attempting to work around issues that really turned out to be child device driver related issues. Apologies for a late pull request, debugging the suspend issues took a while and I did not want to send these changes until that got sorted out. commit b3378de0266989bc3215c8c714c8231d5ab27a9f Merge: a35f408eba76b 5284521a290ef Author: Tony Lindgren Date: Thu Oct 18 10:02:45 2018 -0700 Merge remote-tracking branch 'gpio/ib-omap' into omap-for-v4.21/dt-ti-sysc commit a35f408eba76ba82139254e0a2df46291e68885a Merge: 4f1985af21c70 ce32d59ee2cd0 Author: Tony Lindgren Date: Thu Oct 18 09:55:46 2018 -0700 Merge commit 'ce32d59ee2cd036f6e8a6ed17a06a0b0bec5c67c' into omap-for-v4.21/dt-ti-sysc commit 4f1985af21c709eaa6e08580b759f8a4ecb0f5df Merge: 5f681f41fe171 d6e7bbc148f9f Author: Tony Lindgren Date: Thu Oct 18 09:47:50 2018 -0700 Merge commit 'd6e7bbc148f9fbec8a0117b0d0f420c9710e6d81' into omap-for-v4.21/dt-ti-sysc commit 73f522bad1794f7144caff1f46f1ffb31966a386 Author: Ville Syrjälä Date: Tue Oct 16 18:04:13 2018 +0300 drm/i915: Use i915_gem_object_get_dma_address() to populate rotated vmas Replace the kvmalloc_array() with i915_gem_object_get_dma_address() when populating rotated vmas. One random access mechanism ought to be enough for everyone? To calculate the size of the radix tree I think we can do something like this (assuming 64bit pointers): num_pages = obj_size / 4096 tree_height = ceil(log64(num_pages)) num_nodes = sum(64^n, n, 0, tree_height-1) tree_size = num_nodes * 576 If we compare that with the object size we should get a relative overhead of around .2% to 1% for reasonable sized objects, which framebuffers tend to be. Cc: Chris Wilson Cc: Tvrtko Ursulin Suggested-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181016150413.11577-1-ville.syrjala@linux.intel.com Reviewed-by: Tvrtko Ursulin commit 198a2a2f1aea3eb6ea033cfec26da9a637405289 Author: Joonas Lahtinen Date: Thu Oct 18 12:20:25 2018 +0300 drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set Use single exit point to drop rpm wakeref in case of an error. Fixes: 9d3eb2c33f03 ("drm/i915: Hold rpm wakeref for debugfs/i915_drop_caches_set") Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181018092025.24076-1-joonas.lahtinen@linux.intel.com commit e346a991f42ca2a397166ac73445832966aa8968 Author: Daniele Ceraolo Spurio Date: Wed Oct 17 17:46:05 2018 -0700 drm/i915/guc: drop negative doorbell alloc selftest The test requires driver tweaks to avoid causing error messages on intentionally-triggered errors and to stop accessing non existing register. However, this is a pure GuC FW interface test and should be covered by FW validation, so it isn't really worth tweaking the driver for it and we're better off dropping it instead. Testing the driver running out of doorbells is already covered by igt_guc_doorbells Suggested-by: Michal Wajdeczko Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181018004610.22895-1-daniele.ceraolospurio@intel.com commit 67551a70354402e02ee140879fa85c739b4aa198 Author: Jani Nikula Date: Mon Oct 15 17:27:51 2018 +0300 drm/i915/dsi: abstract dphy parameter init intel_dsi_vbt_init() has grown too unwieldy, and it's about to be modified due to ICL DSI. Abstract out the VLV specific dphy param init. No functional changes. Intentionally no stylistic changes during code movement. Cc: Madhav Chauhan Cc: Ville Syrjala Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/96d15760db027a137f298ec330520ef8ec6474b0.1539613303.git.jani.nikula@intel.com commit 2bf3f59daeee6cfed79bd0d292aa9b4eded37c42 Author: Jani Nikula Date: Mon Oct 15 17:27:50 2018 +0300 drm/i915/dsi: refactor bitrate calculations in intel_dsi_vbt_init() Abstract bitrate calculation to a newly resurrected intel_dsi.c file that will contain common code for VLV and ICL DSI. No functional changes. Cc: Madhav Chauhan Cc: Ville Syrjala Reviewed-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/100e9721dfdec4f3987549ef24291bafc9cb0517.1539613303.git.jani.nikula@intel.com commit c84c6fe30302721486dd703727a30c8eafee9a1e Author: Jani Nikula Date: Tue Oct 16 15:41:34 2018 +0300 drm/i915: make encoder enable and disable hooks optional Encoders are not alike, make enable and disable hooks optional like other hooks. Utilize this in DSI code, and remove the silly nop hook. v2: Add the check also to intel_sanitize_encoder() (Madhav) Reviewed-by: Madhav Chauhan Acked-by: Ville Syrjala Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181016124134.10257-1-jani.nikula@intel.com commit 4035cc5738d95911e6382f4cd716d3f02d51d343 Author: Christoph Hellwig Date: Sat Oct 13 17:17:05 2018 +0200 drm: sti: don't pass GFP_DMA32 to dma_alloc_wc The DMA API does its own zone decisions based on the coherent_dma_mask. Signed-off-by: Christoph Hellwig Reviewed-by: Benjamin Gaignard Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20181013151707.32210-7-hch@lst.de commit 885054f9917ef459c885926e2c130e80d5326faa Author: Benjamin Gaignard Date: Fri Oct 12 11:46:38 2018 +0200 drm/sti: make crct disable atomic Wait until the next vblank to be sure that crtc has been disabled. Signed-off-by: Benjamin Gaignard Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181012094639.1585-1-benjamin.gaignard@linaro.org commit 48197bc564c7a1888c86024a1ba4f956e0ec2300 Author: Chunming Zhou Date: Thu Oct 18 14:18:36 2018 +0800 drm: add syncobj timeline support v9 This patch is for VK_KHR_timeline_semaphore extension, semaphore is called syncobj in kernel side: This extension introduces a new type of syncobj that has an integer payload identifying a point in a timeline. Such timeline syncobjs support the following operations: * CPU query - A host operation that allows querying the payload of the timeline syncobj. * CPU wait - A host operation that allows a blocking wait for a timeline syncobj to reach a specified value. * Device wait - A device operation that allows waiting for a timeline syncobj to reach a specified value. * Device signal - A device operation that allows advancing the timeline syncobj to a specified value. v1: Since it's a timeline, that means the front time point(PT) always is signaled before the late PT. a. signal PT design: Signal PT fence N depends on PT[N-1] fence and signal opertion fence, when PT[N] fence is signaled, the timeline will increase to value of PT[N]. b. wait PT design: Wait PT fence is signaled by reaching timeline point value, when timeline is increasing, will compare wait PTs value with new timeline value, if PT value is lower than timeline value, then wait PT will be signaled, otherwise keep in list. syncobj wait operation can wait on any point of timeline, so need a RB tree to order them. And wait PT could ahead of signal PT, we need a sumission fence to perform that. v2: 1. remove unused DRM_SYNCOBJ_CREATE_TYPE_NORMAL. (Christian) 2. move unexposed denitions to .c file. (Daniel Vetter) 3. split up the change to drm_syncobj_find_fence() in a separate patch. (Christian) 4. split up the change to drm_syncobj_replace_fence() in a separate patch. 5. drop the submission_fence implementation and instead use wait_event() for that. (Christian) 6. WARN_ON(point != 0) for NORMAL type syncobj case. (Daniel Vetter) v3: 1. replace normal syncobj with timeline implemenation. (Vetter and Christian) a. normal syncobj signal op will create a signal PT to tail of signal pt list. b. normal syncobj wait op will create a wait pt with last signal point, and this wait PT is only signaled by related signal point PT. 2. many bug fix and clean up 3. stub fence moving is moved to other patch. v4: 1. fix RB tree loop with while(node=rb_first(...)). (Christian) 2. fix syncobj lifecycle. (Christian) 3. only enable_signaling when there is wait_pt. (Christian) 4. fix timeline path issues. 5. write a timeline test in libdrm v5: (Christian) 1. semaphore is called syncobj in kernel side. 2. don't need 'timeline' characters in some function name. 3. keep syncobj cb. v6: (Christian) 1. merge syncobj_timeline to syncobj structure. 2. simplify some check sentences. 3. some misc change. 4. fix CTS failed issue. v7: (Christian) 1. error handling when creating signal pt. 2. remove timeline naming in func. 3. export flags in find_fence. 4. allow reset timeline. v8: 1. use wait_event_interruptible without timeout 2. rename _TYPE_INDIVIDUAL to _TYPE_BINARY v9: 1. rename signal_pt->base to signal_pt->fence_array to avoid misleading 2. improve kerneldoc individual syncobj is tested by ./deqp-vk -n dEQP-VK*semaphore* timeline syncobj is tested by ./amdgpu_test -s 9 Signed-off-by: Chunming Zhou Signed-off-by: Christian König Cc: Christian Konig Cc: Dave Airlie Cc: Daniel Rakos Cc: Daniel Vetter Cc: Bas Nieuwenhuizen Cc: Jason Ekstrand Reviewed-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/257258/ commit 27a981b614d5fe5ec89657467b575c2a957ecd99 Author: Jani Nikula Date: Wed Oct 17 12:35:39 2018 +0300 drm/i915/quirks: pass dev_priv instead of drm dev to quirk code Pass the type we want to simplify. No functional changes. v2: s/dev_priv/i915/g (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181017093539.5468-1-jani.nikula@intel.com commit 1a49f537c5046fb15f3f72f89c51180646dd7ae8 Author: Michal Wajdeczko Date: Wed Oct 17 19:52:45 2018 +0000 drm/i915/huc: Normalize HuC status returned by I915_PARAM_HAS_HUC In response for I915_PARAM_HAS_HUC we are returning value that indicates if HuC firmware was loaded and verified. However, our previously used positive value was based on specific register bit which is about to change on future platform. Let's normalize our return values to 0 and 1 before clients will start to use Gen9 value. v2: use bool for implicit conversion (Chris) Signed-off-by: Michal Wajdeczko Cc: Michal Winiarski Cc: Joonas Lahtinen Cc: Haihao Xiang Reviewed-by: Michał Winiarski #1 Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181017195245.39644-1-michal.wajdeczko@intel.com commit bbb8a9d7e000c906f490780fab1c64faa1d08604 Author: Tvrtko Ursulin Date: Fri Oct 12 07:31:42 2018 +0100 drm/i915: GEM_WARN_ON considered harmful GEM_WARN_ON currently has dangerous semantics where it is completely compiled out on !GEM_DEBUG builds. This can leave users who expect it to be more like a WARN_ON, just without a warning in non-debug builds, in complete ignorance. Another gotcha with it is that it cannot be used as a statement. Which is again different from a standard kernel WARN_ON. This patch fixes both problems by making it behave as one would expect. It can now be used both as an expression and as statement, and also the condition evaluates properly in all builds - code under the conditional will therefore not unexpectedly disappear. To satisfy call sites which really want the code under the conditional to completely disappear, we add GEM_DEBUG_WARN_ON and convert some of the callers to it. This one can also be used as both expression and statement. >From the above it follows GEM_DEBUG_WARN_ON should be used in situations where we are certain the condition will be hit during development, but at a place in code where error can be handled to the benefit of not crashing the machine. GEM_WARN_ON on the other hand should be used where condition may happen in production and we just want to distinguish the level of debugging output emitted between the production and debug build. v2: * Dropped BUG_ON hunk. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Mika Kuoppala Cc: Tomasz Lis Reviewed-by: Tomasz Lis Link: https://patchwork.freedesktop.org/patch/msgid/20181012063142.16080-1-tvrtko.ursulin@linux.intel.com commit 61cdfb9e194d2a327eef301e8fc80b63e3e1dc7a Author: Rodrigo Vivi Date: Wed Oct 17 14:56:52 2018 -0700 drm/i915/icl: Fix signal_levels Since when it was introduced we forgot to add this case so ICL was using a wrong signal_levels as reference. Fixes: fb5c8e9d4350 ("drm/i915/icl: Implement voltage swing programming sequence for Combo PHY DDI") Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Rodrigo Vivi Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20181017215652.26841-1-rodrigo.vivi@intel.com commit 39b50c603878f4f8ae541ac4088a805d588abc79 Author: Lyude Paul Date: Tue Oct 16 16:39:46 2018 -0400 drm/atomic_helper: Stop modesets on unregistered connectors harder Unfortunately, it appears our fix in: commit b5d29843d8ef ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors") Which attempted to work around the problems introduced by: commit 4d80273976bf ("drm/atomic_helper: Disallow new modesets on unregistered connectors") Is still not the right solution, as modesets can still be triggered outside of drm_atomic_set_crtc_for_connector(). So in order to fix this, while still being careful that we don't break modesets that a driver may perform before being registered with userspace, we replace connector->registered with a tristate member, connector->registration_state. This allows us to keep track of whether or not a connector is still initializing and hasn't been exposed to userspace, is currently registered and exposed to userspace, or has been legitimately removed from the system after having once been present. Using this info, we can prevent userspace from performing new modesets on unregistered connectors while still allowing the driver to perform modesets on unregistered connectors before the driver has finished being registered. Changes since v1: - Fix WARN_ON() in drm_connector_cleanup() that CI caught with this patchset in igt@drv_module_reload@basic-reload-inject and igt@drv_module_reload@basic-reload by checking if the connector is registered instead of unregistered, as calling drm_connector_cleanup() on a connector that hasn't been registered with userspace yet should stay valid. - Remove unregistered_connector_check(), and just go back to what we were doing before in commit 4d80273976bf ("drm/atomic_helper: Disallow new modesets on unregistered connectors") except replacing READ_ONCE(connector->registered) with drm_connector_is_unregistered(). This gets rid of the behavior of allowing DPMS On<->Off, but that should be fine as it's more consistent with the UAPI we had before - danvet - s/drm_connector_unregistered/drm_connector_is_unregistered/ - danvet - Update documentation, fix some typos. Fixes: b5d29843d8ef ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors") Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Rodrigo Vivi Cc: stable@vger.kernel.org Cc: David Airlie Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181016203946.9601-1-lyude@redhat.com commit 20fd600099754bb1d29405247c6c2b74ebc3b9f2 Author: Daniele Ceraolo Spurio Date: Tue Oct 16 15:46:47 2018 -0700 drm/i915/guc: fix GuC suspend/resume The ENTER/EXIT_S_STATE actions queue the save/restore operation in GuC FW and then return, so waiting on the H2G is not enough to guarantee GuC is done. When all the processing is done, GuC writes 0 to scratch register 14, so we can poll on that. Note that GuC does not ensure that the value in the register is different from 0 while the action is in progress so we need to take care of that ourselves as well. v2: improve comment, return early on GuC error and improve error message (Michal) Cc: Chris Wilson Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Acked-by: Chris Wilson Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181016224648.2326-1-daniele.ceraolospurio@intel.com commit 138bdac891831d3e86ee75a5217c9b0f001ab12b Author: Maarten Lankhorst Date: Thu Oct 11 12:04:48 2018 +0200 drm/i915: Remove crtc->config dereference from drrs_ctl Wait for idle, and iterate over connectors instead of encoders. With this information we know crtc->state is the actual state, and we can enable/disable drrs safely. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-2-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä commit 914a4fd8cd28016038ce749a818a836124a8d270 Author: Imre Deak Date: Tue Oct 16 19:00:11 2018 +0300 drm/i915/gen9+: Fix initial readout for Y tiled framebuffers If BIOS configured a Y tiled FB we failed to set up the backing object tiling accordingly, leading to a lack of GT fence installed and a garbled console. The problem was bisected to commit 011f22eb545a ("drm/i915: Do NOT skip the first 4k of stolen memory for pre-allocated buffers v2") but it just revealed a pre-existing issue. Kudos to Ville who suspected a missing fence looking at the corruption on the screen. Cc: Ville Syrjälä Cc: Mika Westerberg Cc: Hans de Goede Cc: Cc: Reported-by: Mika Westerberg Reported-by: Tested-by: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108264 Fixes: bc8d7dffacb1 ("drm/i915/skl: Provide a Skylake version of get_plane_config()") Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181016160011.28347-1-imre.deak@intel.com commit ad52fcc97c2a71362028ee1637e4743da9d3ca2e Author: Michal Wajdeczko Date: Tue Oct 16 08:59:30 2018 +0000 drm/i915/guc: Fix Gen9 GuC loading workarounds In commit 4502e9ec820d ("drm/i915/uc: Unify firmware loading") we stopped converting errors detected during firmware transfer into -EAGAIN and this indirectly killed our workarounds for Gen9 GuC. Reactivate those workarounds by looking for actual -ETIMEDOUT error. Testcase: igt@drv_selftest@live_hangcheck Reported-by: Daniele Ceraolo Spurio References: commit 4502e9ec820d ("drm/i915/uc: Unify firmware loading") Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181016085931.23532-1-michal.wajdeczko@intel.com commit 920532991aca4314cfd494301d9a5b9c8b26c374 Author: Deepak Rawat Date: Tue Oct 16 13:46:08 2018 -0700 drm/selftest: Refactor drm mode setting selftests With this patch split the kernel module specific code from actual selftest code. This is done to allow adding more selftests as separate file. Also added kernel module exit stub with this patch. Cc: Daniel Vetter Cc: alexandru-cosmin.gheorghe@arm.com Signed-off-by: Deepak Rawat Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181016204609.1555-1-drawat@vmware.com commit 593a21a04f99fd4f5454fca5f1b92a5950c35f80 Author: Jani Nikula Date: Tue Oct 16 17:42:27 2018 +0300 drm/i915: split out display quirks to a new file Reduce intel_display.c by splitting out intel_quirks.c. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181016144228.18267-1-jani.nikula@intel.com commit a37805098900a6e73a55b3a43b7d3bcd987bb3f4 Author: Gustavo A. R. Silva Date: Tue Oct 16 11:55:49 2018 +0200 drm/bufs: Fix Spectre v1 vulnerability idx can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/gpu/drm/drm_bufs.c:1420 drm_legacy_freebufs() warn: potential spectre issue 'dma->buflist' [r] (local cap) Fix this by sanitizing idx before using it to index dma->buflist Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181016095549.GA23586@embeddedor.com commit 871edc96bdab5fd84134320456670e7bfd5ec31a Author: Chunming Zhou Date: Wed Oct 17 15:03:18 2018 +0800 drm: fix missing doc v2 flags is new param for drm_syncob_find_fence, so need update doc, reproduce: make htmldocs reported: htmldocs: drivers/gpu/drm/drm_syncobj.c:230: warning: Function parameter or member 'flags' not described in 'drm_syncobj_find_fence' v2: rebased Signed-off-by: Chunming Zhou Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181017070318.15483-1-david1.zhou@amd.com commit 410ed5731a6566498a3aa904420aa2e49ba0ba90 Author: Jani Nikula Date: Tue Oct 16 15:29:38 2018 +0300 drm/i915: Ensure intel_engine_init_execlist() builds with Clang Clang build with UBSAN enabled leads to the following build error: drivers/gpu/drm/i915/intel_engine_cs.o: In function `intel_engine_init_execlist': drivers/gpu/drm/i915/intel_engine_cs.c:411: undefined reference to `__compiletime_assert_411' Again, for this to work the code would first need to be inlined and then constant folded, which doesn't work for Clang because semantic analysis happens before optimization/inlining. Use GEM_BUG_ON() instead of BUILD_BUG_ON(). v2: Use is_power_of_2() from log2.h (Chris) References: http://mid.mail-archive.com/20181015203410.155997-1-swboyd@chromium.org Reported-by: Stephen Boyd Cc: Stephen Boyd Cc: Chris Wilson Tested-by: Nathan Chancellor Tested-by: Stephen Boyd Reviewed-by: Chris Wilson Reviewed-by: Nick Desaulniers Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181016122938.18757-2-jani.nikula@intel.com commit 7b3e51dd439bead71d9e4504d89a32a8496ac0aa Author: Jani Nikula Date: Tue Oct 16 15:29:37 2018 +0300 drm/i915: Ensure _print_param() builds with Clang When building the kernel with Clang with defconfig and CONFIG_64BIT disabled, vmlinux fails to link because of the BUILD_BUG in _print_param. ld: drivers/gpu/drm/i915/i915_params.o: in function `i915_params_dump': i915_params.c:(.text+0x56): undefined reference to `__compiletime_assert_191' This function is semantically invalid unless the code is first inlined then constant folded, which doesn't work for Clang because semantic analysis happens before optimization/inlining. [The above written by Nathan Chancellor ] Use WARN_ONCE() instead of BUILD_BUG() to avoid the problem. The WARN_ONCE() should get optimized away unless there's a type that's not handled by _print_param(). References: https://github.com/ClangBuiltLinux/linux/issues/191 References: http://mid.mail-archive.com/20181009171401.14980-1-natechancellor@gmail.com Cc: Nick Desaulniers Cc: Nathan Chancellor Cc: Chris Wilson Reported-by: Nick Desaulniers Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Chris Wilson Reviewed-by: Nick Desaulniers Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181016122938.18757-1-jani.nikula@intel.com commit 046c9bca3d829d1f67e4667ffeac099564a683a4 Author: Jani Nikula Date: Tue Oct 16 17:50:44 2018 +0300 drm/i915: rename and move intel_get_pipe_from_connector() Rename intel_get_pipe_from_connector() to intel_connector_get_pipe() and move it near its connector function friends in intel_connector.c. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181016145044.3924-1-jani.nikula@intel.com commit bb1c7edc6d4d5cc6917814d858d47b22d2e93cde Author: Mahesh Kumar Date: Mon Oct 15 19:37:52 2018 -0700 drm/i915/icl: Fix DDI/TC port clk_off bits DDI/TC clock-off bits are not equally distanced. TC1-3 bits are from offset 12 & TC4 is at offset 21. Create a function to choose correct clk-off bit. v2: Add fixes tag (Lucas) Fixes: c27e917e2bda ("drm/i915/icl: add basic support for the ICL clocks") Signed-off-by: Mahesh Kumar Signed-off-by: Vandita Kulkarni Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181016023752.9285-1-lucas.demarchi@intel.com commit 4e53840fdfdd054f645a03fa27f79296fa0d5d15 Author: Lucas De Marchi Date: Mon Oct 15 19:35:17 2018 -0700 drm/i915/icl: Introduce new macros to get combophy registers combo-phy register instances are at same offset from base for each combo-phy port, i.e. Port A base offset: 0x16200 Port B base offset: 0x6C000 All the other addresses for both ports can be derived by calculating offset to these base addresses. PORT_CL_DW_OFFSET 0x0 PORT_CL_DW 0 + x * 4 PORT_COMP_OFFSET 0x100 PORT_COMP_DW 0x100 + x * 4 PORT_PCS_AUX_OFFSET 0x300 PORT_PCS_GRP_OFFSET 0x600 PORT_PCS_LN_OFFSET 0x800 + y * 0x100 PORT_TX_AUX_OFFSET 0x380 PORT_TX_GRP_OFFSET 0x680 PORT_TX_LN_OFFSET 0x880 + y * 0x100 And inside each PORT_TX_[AUX|GRP|LN] we add `dw * 4`. Based on original patch by Mahesh Kumar . v2: make port, dw and ln arguments follow the order in register's name Signed-off-by: Lucas De Marchi Signed-off-by: Mahesh Kumar Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181016023517.8576-1-lucas.demarchi@intel.com commit d72e84ccba2068608a7fde587ed887ece46aa55b Author: Mahesh Kumar Date: Fri Oct 12 16:47:17 2018 -0700 drm/i915/icl: Combine all port/combophy macros at one place This patch combines CNL/ICL specific port/combophy macros together at one location. This is prework for patches later in series where new macros to find port/combophy register will be introduced. v2: remove wrong empty line Signed-off-by: Mahesh Kumar Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181012234717.8284-1-lucas.demarchi@intel.com commit a54270d3a917a455967fae5347c0abf3ebf86801 Author: Vandita Kulkarni Date: Wed Oct 3 12:52:00 2018 +0530 drm/i915/icl: Refactor icl pll functions This patch adds helper function for identifying whether the given PLL is combo PHY PLL or not. This helper function is used inside various ICL functions to make them scalable. Signed-off-by: Vandita Kulkarni Signed-off-by: Mahesh Kumar Cc: Madhav Chauhan Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181003072203.12848-6-mahesh1.kumar@intel.com commit 8ea59e67399035e1e8f9f250ec12dfe0a94e6ce9 Author: Vandita Kulkarni Date: Wed Oct 3 12:51:59 2018 +0530 drm/i915/icl: Use helper functions to classify the ports Use intel_port_is_tc and intel_port_is_combophy functions to replace the individual port checks from port C to F and port A to B respectively. Signed-off-by: Vandita Kulkarni Signed-off-by: Mahesh Kumar Cc: Lucas De Marchi Cc: Madhav Chauhan Reviewed-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181003072203.12848-5-mahesh1.kumar@intel.com commit cb6caf7e39938294632cd4996baf3b10d3038dcc Author: Vandita Kulkarni Date: Wed Oct 3 12:51:58 2018 +0530 drm/i915/icl: Refactor get_ddi_pll using helper func Use the existing port-to-id helper function, to refactor hence making it scalable. Signed-off-by: Vandita Kulkarni Signed-off-by: Mahesh Kumar Cc: Lucas De Marchi Cc: Madhav Chauhan Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181003072203.12848-4-mahesh1.kumar@intel.com commit c0aa834404b33804b3af0822ebcd9881fa8cb214 Author: Mahesh Kumar Date: Wed Oct 3 12:51:57 2018 +0530 drm/i915/icl: use combophy/TC helper functions during display detection Instead of directly comparing HPD pins use intel_port_is_combophy/tc helper functions to distinguish between combophy/TC ports. Signed-off-by: Mahesh Kumar Cc: Manasi Navare Reviewed-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181003072203.12848-3-mahesh1.kumar@intel.com commit 176597a12d61709727d1639836e5d68a6e7c437b Author: Mahesh Kumar Date: Thu Oct 4 14:20:43 2018 +0530 drm/i915/icl: create function to identify combophy port This patch creates a function/wrapper to check if port is combophy port instead of explicitly comparing ports. Changes since V1: - keep all intel_port_is_* helper together (Lucas) Signed-off-by: Mahesh Kumar Cc: Madhav Chauhan Cc: Manasi Navare Reviewed-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181004085043.10154-1-mahesh1.kumar@intel.com commit ffd7e32d95db99f1b4546661dc1864b4555c307c Author: Lucas De Marchi Date: Fri Oct 12 14:57:58 2018 -0700 drm/i915/icl: apply Display WA #1178 to fix type C dongles Display WA #1178 is meant to fix Aux channel voltage swing too low with some type C dongles. It applies to external ports on combo phy. On Icelake this is port A and B when those are not eDP. v2: follow the spec to the letter: include Aux A and just check if it's not eDP instead of checking only for Aux B. Cc: Rodrigo Vivi Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Reviewed-by: Imre Deak Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20181012215758.25342-1-lucas.demarchi@intel.com commit b0b62d845e44e5432505ba0f74da41efc1b122d3 Author: Maarten Lankhorst Date: Thu Oct 11 12:04:56 2018 +0200 drm/i915: Pass crtc_state to ivybridge_update_fdi_bc_bifurcation We have to look at crtc_state, so pass that instead. Also cleanup the use of dev vs dev_priv, we really want to pass along dev_priv. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-10-maarten.lankhorst@linux.intel.com commit c5b36facfad802d11e66c3fe5bd2ea6d70c33dfd Author: Maarten Lankhorst Date: Thu Oct 11 12:04:55 2018 +0200 drm/i915: Pass crtc_state to lpt_program_iclkip Instead of derferencing crtc->config, look at crtc_state. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-9-maarten.lankhorst@linux.intel.com commit 91d78197629622edd888a10650a8252351ad0b8f Author: Maarten Lankhorst Date: Thu Oct 11 12:04:54 2018 +0200 drm/i915: Remove crtc->config dereferences in intel_modeset_setup_hw_state The CRTC is idle at this point, so we can dereference crtc->state safely. Signed-off-by: Maarten Lankhorst [mlankhorst: Keep dev_priv->drm in for_each_intel_crtc (Ville)] Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-8-maarten.lankhorst@linux.intel.com commit 1b52ad46162dd675089495303a3875f6f2c42d52 Author: Maarten Lankhorst Date: Thu Oct 11 12:04:53 2018 +0200 drm/i915: Remove crtc->config dereferences in intel_sanitize_crtc We know the crtc is idle because we're at the beginning of sanitization, so just dereference crtc->state instead. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-7-maarten.lankhorst@linux.intel.com commit f2bdd112685c5ba6e3673524e6af7cd2fe2758af Author: Maarten Lankhorst Date: Thu Oct 11 12:04:52 2018 +0200 drm/i915: Pass crtc_state to update_scanline_offset No need to look at crtc->config when we have crtc_state in the caller. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-6-maarten.lankhorst@linux.intel.com commit 4207c8b9914f0a20df514afdcf20bf0e25fd2969 Author: Maarten Lankhorst Date: Mon Oct 15 11:40:23 2018 +0200 drm/i915: Always read out M2_N2 in intel_cpu_transcoder_get_m_n, v2. has_drrs is a flag we can't read out. We set it when seamless DRRS is enabled in pipe_config, so intel_dump_pipe_config() and intel_pipe_config_compare() will continue to do the right thing when has_drrs is set on the real state. This removes one more dereference of crtc->config. While at it, fixup the comment and also read out M2_N2 for CHV, since we program it in the set_m_n function. Changes since v1: - Only read out M2/N2 on platforms that support DRRS. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181015094023.6211-1-maarten.lankhorst@linux.intel.com commit 92d54b078fe20a742b0b3cb889263e7c5884cf2e Author: Maarten Lankhorst Date: Thu Oct 11 12:04:50 2018 +0200 drm/i915: Remove crtc->config references in vlv_prepare_pll We already have a perfectly nice pipe_config, use that instead. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-4-maarten.lankhorst@linux.intel.com commit 4c35475485c1297393a35b161057b57753449a15 Author: Maarten Lankhorst Date: Thu Oct 11 12:04:49 2018 +0200 drm/i915: Make intel_dp_set_m_n take crtc_state Another user of crtc->config gone. The functions it calls also needed crtc->config, so convert those as well. Signed-off-by: Maarten Lankhorst [mlankhorst: Still pass m_n struct to intel_pch_transcoder_set_m_n (Ville)] Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181011100457.8776-3-maarten.lankhorst@linux.intel.com commit 4eda776c3cefcb1f01b2d85bd8753f67606282b5 Author: Enric Balletbo i Serra Date: Sat Oct 13 12:56:54 2018 +0200 drm/rockchip: psr: do not dereference encoder before it is null checked. 'encoder' is dereferenced before it is null sanity checked, hence we potentially have a null pointer dereference bug. Instead, initialise drm_drv from encoder->dev->dev_private after we are sure 'encoder' is not null. Fixes: 5182c1a556d7f ("drm/rockchip: add an common abstracted PSR driver") Cc: stable@vger.kernel.org Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20181013105654.11827-1-enric.balletbo@collabora.com commit 649fdce23cdf516e69aa8c18f4b44c62127f0e83 Author: Chunming Zhou Date: Mon Oct 15 16:55:47 2018 +0800 drm: add flags to drm_syncobj_find_fence flags can be used by driver to decide whether need to block wait submission. Signed-off-by: Chunming Zhou SIgned-off-by: Christian König Reviewed-by: Christian König Link: https://patchwork.kernel.org/patch/10641339/ commit 7bd01a085582b9251fac26b93cfa490ce54ece63 Author: Mamta Shukla Date: Tue Oct 16 02:56:44 2018 +0530 drm: Shift * to be adjacent to pointer name Shift * to be adjacent to pointer name to follow Linux coding style. Issue found with checkpatch.pl ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Mamta Shukla Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181015212644.GA28579@armorer commit 81067b71c1d944ea1f93ee67ef0be16d8b4957b4 Author: Mika Kuoppala Date: Mon Oct 15 17:14:40 2018 +0300 drm/i915/icl: Disable master intr before reading Disable master interrupt before reading level indications. This will close a race where we get a level indication between reading and disabling, generating an extra interrupt where we could have avoided one. Further, as the reading acts also as a post, replace the write/post on the irq reset with the helper. On enabling side, posting doesn't serve any purpose so it can also be replaced with helper. Cc: Chris Wilson Cc: Ville Syrjälä Cc: Daniele Ceraolo Spurio Signed-off-by: Mika Kuoppala Acked-by: Chris Wilson Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20181015141440.21845-3-mika.kuoppala@linux.intel.com commit 95b0e7c14c500ac7522924a54e6beddf69d383ec Author: Mika Kuoppala Date: Mon Oct 15 17:14:39 2018 +0300 drm/i915/icl: No need to ack intr through master control All other master control register bits, except the enable, are read only and they are level indications of the second level interrupt status. Only touch enable bit and rectify the comment. Cc: Chris Wilson Cc: Dhinakaran Pandiyan Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20181015141440.21845-2-mika.kuoppala@linux.intel.com commit 4376b9c965c0563b1f95e8b7fae560e8e4890c00 Author: Mika Kuoppala Date: Mon Oct 15 17:14:38 2018 +0300 drm/i915/gen8: Disable master intr before reading Disable master interrupt before reading level indications. This will close a race where we get a level indication between reading and disabling, generating an extra interrupt where we could have avoided one. Further, as the reading acts also as a post, replace the write/post on the irq reset with the helper. On enabling side, posting doesn't serve any purpose so it can also be replaced with helper. Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181015141440.21845-1-mika.kuoppala@linux.intel.com commit 2f20fa8d12e859a03f68bdd81d75830141bc9ac9 Author: Eric Anholt Date: Fri Sep 28 16:21:26 2018 -0700 drm/v3d: Skip debugfs dumping GCA on platforms without GCA. Fixes an oops reading this debugfs entry on BCM7278. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-4-eric@anholt.net Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Cc: Reviewed-by: Boris Brezillon commit 4fa825bf405082a342b3a8717337ba58c7260c3f Author: Eric Anholt Date: Fri Sep 28 16:21:25 2018 -0700 drm/v3d: Add some better documentation of the in_sync arguments. Since this is UAPI, it's good to document what exactly the guarantees we're providing are. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-3-eric@anholt.net Reviewed-by: Boris Brezillon commit 6915c9a525e575732429c22b28eb11871a29374b Author: Eric Anholt Date: Fri Sep 28 16:21:24 2018 -0700 drm/v3d: Add a little debugfs entry for measuring the core clock. This adds just enough performance counter support to measure the clock. We don't have linux kernel drivers for the clock driving the HW, and this was useful for determining that the V3D HW is running on a slow clock, not that the driver was slow. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-2-eric@anholt.net Reviewed-by: Boris Brezillon commit 34c2c4f632f232ed2fdb66d4e42cc72d322273fe Author: Eric Anholt Date: Fri Sep 28 16:21:23 2018 -0700 drm/v3d: Fix a use-after-free race accessing the scheduler's fences. Once we push the job, the scheduler could run it and free it. So, if we want to reference their fences, we need to grab them before then. I haven't seen this happen in many days of conformance test runtime, but let's still close the race. Signed-off-by: Eric Anholt Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Link: https://patchwork.freedesktop.org/patch/254119/ Reviewed-by: Boris Brezillon commit 04c388d429568f03e2719bfb56ebfdb115896bd0 Author: Mahesh Kumar Date: Thu Oct 11 15:57:25 2018 -0700 drm/i915/icl: enable SAGV for ICL platform Enable SAGV for ICL platform. Cc: Gwan-gyeong Mun Tested-by: Gwan-gyeong Mun Reviewed-by: James Ausmus Reviewed-by: Paulo Zanoni Signed-off-by: Mahesh Kumar Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181011225725.21208-1-paulo.r.zanoni@intel.com commit 9d3eb2c33f03432a25a6a3ab3177f839f25cbaf5 Author: Chris Wilson Date: Mon Oct 15 12:58:56 2018 +0100 drm/i915: Hold rpm wakeref for debugfs/i915_drop_caches_set Since we peek into HW state and poke around, it behoves us to acquire a runtime pm wakeref beforehand. References: https://bugs.freedesktop.org/show_bug.cgi?id=108343 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108364 Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181015115856.18590-1-chris@chris-wilson.co.uk commit 668b6c176c33f443a50afd981cc9c0939e411b3b Author: Shashank Sharma Date: Fri Oct 12 11:53:14 2018 +0530 drm/i915: Add YCBCR 4:2:0/4:4:4 support for LSPCON LSPCON chips can generate YCBCR outputs, if asked nicely :). In order to generate YCBCR 4:2:0 outputs, a source must: - send YCBCR 4:4:4 signals to LSPCON - program color space as 4:2:0 in AVI infoframes Whereas for YCBCR 4:4:4 outputs, the source must: - send YCBCR 4:4:4 signals to LSPCON - program color space as 4:4:4 in AVI infoframes So for both 4:2:0 as well as 4:4:4 outputs, we are driving the pipe for YCBCR 4:4:4 output, but AVI infoframe's color space information indicates LSPCON FW to start scaling down from YCBCR 4:4:4 and generate YCBCR 4:2:0 output. As the scaling is done by LSPCON device, we need not to reserve a scaler for 4:2:0 outputs. V2: rebase V3: Addressed review comments from Ville - add enum crtc_output_format instead of bool ycbcr420 - use crtc_output_format=4:4:4 for modeset of LSPCON 4:2:0 output cases in this way we will have YCBCR 4:4:4 framework ready (except the ABI part) V4: Added r-b from Maarten (for v3) Addressed review comments from Ville: - Do not add a non-atomic state variable to determine lspcon output. Instead add bool in CRTC state to indicate lspcon based scaling. V5: Addressed review comments from Ville: - Change the state bool name from external scaling to something more relavent. - Keep the info and adjusted_mode structures const. - use crtc_state instead of pipe_config. - Push all the config change into lspcon_ycbcr420_config function. V6: Rebase, small changes to accommodate changes in patch 2. V7: Fixed checkpatch warnings for alignment V8: Rebase PS: Ignored following warnings to match the current formatting: drm/i915: Add YCBCR 4:2:0/4:4:4 support for LSPCON -:53: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #53: FILE: drivers/gpu/drm/i915/i915_reg.h:8721: +#define TRANS_MSA_SAMPLING_444 (2<<1) ^ -:54: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #54: FILE: drivers/gpu/drm/i915/i915_reg.h:8722: +#define TRANS_MSA_CLRSP_YCBCR (2<<3) V9: Rebase V10: Rebase V11: Rebase Cc: Ville Syrjala Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-8-git-send-email-shashank.sharma@intel.com commit 799a964ffe0b536e4c9f36991a6002c05c3140ae Author: Shashank Sharma Date: Fri Oct 12 11:53:13 2018 +0530 drm/i915: Write AVI infoframes for Parade LSPCON Different LSPCON vendors specify their custom methods to pass AVI infoframes to the LSPCON chip, so does Parade tech. This patch adds functions to arrange and write AVI infoframes into Parade LSPCON chips. V2: rebase V3: Added r-b from Maarten V4: rebase V5: rebase V6: rebase V7: Fixed checkpatch warnings for alignment V8: Rebase V9: Rebase V10: Rebase Cc: Imre Deak Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-7-git-send-email-shashank.sharma@intel.com commit 7cbf19fd54ffef01a8a7af554b8447bef7c17ce7 Author: Shashank Sharma Date: Fri Oct 12 11:53:12 2018 +0530 drm/i915: Write AVI infoframes for MCA LSPCON LSPCON is a DP branch device, so LSPCON vendors define specific methods to pass AVI infoframes to the the chip. This patch adds: - a generic wrapper function for writing AVI infoframes for all LSPCON devices. - a vendor specific function to wrire AVI infoframes into MCA LSPCON devices. V2: Rebase V3: Added r-b from Maarten V4: Rebase V5: Rebase V6: Rebase V7: Fixed checkpatch warnings for alignment V8: Rebase V9: Added the retry logic, with 50ms incremental delays while writing AVI IF V10: Changed the return value check V11: Fixed checkpatch warning V12: Rebase Cc: Imre Deak Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-6-git-send-email-shashank.sharma@intel.com commit 06c812d7c591906e5f159cecfc8e561a2f59d848 Author: Shashank Sharma Date: Fri Oct 12 11:53:11 2018 +0530 drm/i915: Add AVI infoframe support for LSPCON In order to pass AVI infoframes to LSPCON devices, a source has to write them in a vendor recommended method and location. This patch series: - adds generic LSPCON infoframe setup functions. - registers these functions into existing AVI infoframe framework. - triggers these functions from modeset sequence. Next patches in the series will add vendor specific code. V2: Added new parameter to align with new definition of drm_hdmi_avi_infoframe_quant_range V3: Added r-b from Maarten (for V2) Added new parameter output_format in struct lspcon to accommodate Ville's review comments on last patch of the series V4: Addressed Ville's review comment - Do not add output_format in LSPCON state, as its non-atomic. Add this into CRTC state (added in a later patch). V5: Rebase V6: Rebase V7: Rebase V8: Rebase V9: Rebase V10: Rebase V11: Accommodated rebasing changes in intel_git_port fptrs (set_infoframes and infoframe_enabled) Cc: Ville Syrjala Cc: Imre Deak Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-5-git-send-email-shashank.sharma@intel.com commit 96e35598cead98de897038c0b4813396e694cb72 Author: Shashank Sharma Date: Fri Oct 12 11:53:10 2018 +0530 drm/i915: Check LSPCON vendor OUI Intel LSPCON chip is provided by 2 vendors: - Megachips America (MCA) - Parade technologies (Parade tech) Its important to know the vendor of this chip, as the address to write AVI infoframes is different for those two. This patch reads the vendor OUI signature, and marks into LSPCON encoder structure for future usages. This patch also does a small re-arrangement of the code, by moving lspcon mode change into probe function. V2: Use dp->desc for OUI detection, dont add a helper for this (Ville) V3: Rebase, Added r-b from Maarten V4: Rebase V5: Rebase V6: Rebase V7: Rebase V8: Rebase V9: Rebase V10: Rebase Cc: Imre Deak Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Lankhorst Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-4-git-send-email-shashank.sharma@intel.com commit 8c79f844c6d21dd52295d5e1f68129cbd10676fd Author: Shashank Sharma Date: Fri Oct 12 11:53:09 2018 +0530 drm/i915: Add CRTC output format YCBCR 4:4:4 This patch adds support for YCBCR 4:4:4 CRTC output format. To do this, this patch extends the existing YCBCR 4:2:0 framework by: - Adding new parameter in for YCBCR 4:4:4 enum crtc_iutput_format. - Adding case for YCBCR 4:4:4 in while setting AVI infoframes. - Adding necessary checks in modeset sequence. V3: Added this patch in the series V4: Added r-b from Maarten (for v3) Addressed review comment from Ville: Do not use (config->output_format > CRTC_OUTPUT_RGB) V5: Rebase V6: Rebase and small change, to accommodate changes in patch 2 V7: Fixed checkpatch alignment warnings V8: Rebase V9: Rebase V10: Rebase V11: Addressed review comment from Ville Missing output_format_str[INTEL_OUTPUT_FORMAT_YCBCR444] Added Ville's R-B. Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-3-git-send-email-shashank.sharma@intel.com commit 33b7f3ee6e008311876cef3f3629c3affa9ed66c Author: Shashank Sharma Date: Fri Oct 12 11:53:08 2018 +0530 drm/i915: Add CRTC output format YCBCR 4:2:0 Currently, we are using a bool in CRTC state (state->ycbcr420), to indicate modeset, that the output format is YCBCR 4:2:0. Now in order to support other YCBCR formats, we will need more such flags. This patch adds a new enum parameter for YCBCR 4:2:0 outputs, in the CRTC output formats and then plugs it during the modeset. V3: Added this patch in the series, to address review comments from second patchset. V4: Added r-b from Maarten (on v3) Addressed review comments from Ville: - Change the enum name to intel_output_format. - Start the enum value (INVALID) from 0 instaed of 1. - Set the crtc's output_format to RGB in encoder's compute_config. V5: Broke previous patch 1 into two parts, - first patch to add CRTC output format in general - second patch (this one) to add YCBCR 4:2:0 output format specifically. - Use ARRAY_SIZE(format_str) for output format validity check (Ville) V6: Added a separate function to calculate crtc_state->output_format, and calling it from various get_config function (Fix CI build warning) V7: Fixed checkpatch warnings for alignment V8: Rebase V9: Rebase V10: Rebase V11: Addressed review comments from Ville: - Change check for CRTC output format from > ARRAY_SIZE to >= ARRAY_SIZE. - Check for values < INTEL_OUTPUT_FORMAT_RGB is unnecessary. - No need to get CRTC YCBCR config, for pre-BDW functions. Added Ville's r-b. Cc: Ville Syrjala Cc: Maarten Lankhorst Signed-off-by: Shashank Sharma Reviewed-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-2-git-send-email-shashank.sharma@intel.com commit d9facae6afe14f461f0667227c1c377cb84ad7fa Author: Shashank Sharma Date: Fri Oct 12 11:53:07 2018 +0530 drm/i915: Introduce CRTC output format This patch adds an enum "intel_output_format" to represent the output format of a particular CRTC. This enum will be used to produce a RGB/YCBCR4:4:4/YCBCR4:2:0 output format during the atomic modeset calculations. V5: - Created this separate patch to introduce and init output_format. - Initialize parameters of output_format_str respectively (Jani N). - Call it intel_output_format than crtc_output_format(Ville). - Set output format in pipe_config for every encoder (Ville). - Get rid of extra DRM_DEBUG_KMS during get_pipe_config (Ville) V6: Rebase V7: Fixed alignment warnings (checkpatch) V8: Another check[atch warning for alignment V9: Rebase V10: Rebase on top of DSI restructure V11: Addressed review comment from Ville - Set CRTC format for pre-HSW get_pipe_config() function too. Added Ville's R-B Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1539325394-20788-1-git-send-email-shashank.sharma@intel.com commit a5e856a5348f6cd50889d125c40bbeec7328e466 Author: Chris Wilson Date: Fri Oct 12 15:02:28 2018 +0100 drm/i915: Large page offsets for pread/pwrite Handle integer overflow when computing the sub-page length for shmem backed pread/pwrite. Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181012140228.29783-1-chris@chris-wilson.co.uk commit 047a6f7db27a96c79d3a97c2e1301d30bd23be3d Author: Hans de Goede Date: Fri Oct 12 12:17:50 2018 +0200 iio: accel: kxcjk1013: Add KIOX0009 ACPI Hardware-ID Add KIOX0009 ACPI HID, this is used e.g. on the Acer One 10. Signed-off-by: Hans de Goede Signed-off-by: Jonathan Cameron commit a476e20c30e8e1922c9573fe6862c5551e910ee1 Author: Renato Lui Geh Date: Mon Oct 8 19:12:05 2018 -0300 staging: iio: adt7316: fix parenthesis alignment This patch fixes most "Alignment should match open parenthesis" check warnings found by checkpatch.pl in the addac/adt7316 driver. Signed-off-by: Renato Lui Geh Signed-off-by: Jonathan Cameron commit c65a0d84ee9cae48ce4b40346e238415e47904fa Author: Gustavo A. R. Silva Date: Mon Oct 8 19:35:28 2018 +0200 iio: dpot-dac: mark expected switch fall-through with text GCC expects. In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced "...and fall through." with the specific string "fall through", which is what GCC is expecting to find thus supressing this false positive. As Peter has observed this breaks the nice English flow, which is less than ideal, but short of teaching GCC to read English, there isn't a lot that we can do about it. Addresses-Coverity-ID: 1462408 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jonathan Cameron commit 27d7aaae0fd7d7feb232f267c85370da04b593a4 Author: Jyoti Yadav Date: Fri Oct 5 14:08:46 2018 -0400 drm/i915/csr Added DC5 and DC6 counter register for ICL in debugfs entry. DC5 and DC6 counter register tells about residency of DC5 and DC6. Added the same in debugfs file. v2 : Remove csr_version check. Added generic check regarding DC counters for Gen9 onwards. (Rodrigo) v3 : Simplified gen checks. (Chris) v4 : Simplified "if" ladder for multiple gens. v5 : Removed unnecessary comment. Signed-off-by: Jyoti Yadav Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1538762926-4880-1-git-send-email-jyoti.r.yadav@intel.com commit b9117149fefdcdc6fcd12a14a26d71979582c057 Author: Paulo Zanoni Date: Thu Oct 4 16:16:00 2018 -0700 drm/i915: promote ddb update message to DRM_DEBUG_KMS This message is currently marked as DRM_DEBUG_ATOMIC. I would like it to be DRM_DEBUG_KMS since it is more KMS than atomic, and this will also make the message appear in the CI logs, which may or may not help us with some FIFO underrun bugs. Reviewed-by: Matt Roper Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-7-paulo.r.zanoni@intel.com commit 9e44b180f81bbc69d15807e113675d19bf538c77 Author: Paulo Zanoni Date: Thu Oct 4 16:15:59 2018 -0700 drm/i915: don't write PLANE_BUF_CFG twice every time We were writing to PLANE_BUF_CFG(pipe, plane_id) twice for every platform, and we were even using different values on the gen10- planar case. The first write is useless since it just gets replaced with the next one, so kill it. There's a lot to improve in the DDB code, but let's start by avoiding the double write. Reviewed-by: Matt Roper Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-6-paulo.r.zanoni@intel.com commit cbacc79db6ac932f7ac86ff01086302bfb79e5d0 Author: Paulo Zanoni Date: Thu Oct 4 16:15:58 2018 -0700 drm/i915: transition WMs ask for Selected Result Blocks The transition watermarks ask for Selected Result Blocks (the real value), not Result Blocks (the integer value). Given how ceilings are applied in both the non-transition and the transition watermarks calculations, we can get away with assuming that Selected Result Blocks is actually Result Blocks minus 1 without any rounding errors. Reviewed-by: Matt Roper Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-5-paulo.r.zanoni@intel.com commit 077b5820af74507a1d748f215d6e0753616dfb3d Author: Paulo Zanoni Date: Thu Oct 4 16:15:57 2018 -0700 drm/i915: fix the watermark result selection on glk/gen10+ On these platforms we're supposed to unconditonally pick the method 2 result instead of the minimum. Reviewed-by: Matt Roper Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-4-paulo.r.zanoni@intel.com commit 91961a850d31a05067fe53a7fe16d255a1c8a159 Author: Paulo Zanoni Date: Thu Oct 4 16:15:56 2018 -0700 drm/i915: fix the transition minimums for gen9+ watermarks The transition minimum is 14 blocks for gens 9 and 10, and 4 blocks for gen 11. This minimum value is supposed to be added to the configurable trans_amount. This matches both BSpec and additional information provided by our HW engineers. Reviewed-by: Matt Roper Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-3-paulo.r.zanoni@intel.com commit ef51e0a3eb9e2477b4e7c4ece9a2e3ec26e3d2d7 Author: Paulo Zanoni Date: Mon Sep 24 17:19:11 2018 -0700 drm/i915: DRM_FORMAT_C8 is not possible with Yf tiling Function intel_framebuffer_init() checks for the possibilities during framebuffer creation (addfb ioctl time). It is missing the fact that the indexed format is not supported with Yf tiling. It is worth noticing that skl_plane_format_mod_supported() correctly handles for the C8/Yf combination, but this function runs during modeset time, so we only reject the combination later. Ville recently proposed a new IGT test that only uses addfb to assert supported formats, so that IGT was failing. Add the check so we get green squares right from the start after Ville merges his test. Also drive-by fix the missing /* fall through */ in the chunk we modified by just turning it into a "break;" since IMHO breaks are easier to read than fall-throughs. BSpec: 18565 Testcase: igt/kms_addfb_basic/expected-formats (not merged yet) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20180925001913.29460-1-paulo.r.zanoni@intel.com commit 645ff9e371718476c77bfcd315f26d46ef587808 Author: Michal Wajdeczko Date: Thu Oct 11 13:00:08 2018 +0000 drm/i915: Inject load failure inside intel_engines_init_mmio We need extra load failure point to better test error path in i915_driver_init_mmio. Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181011130008.24640-2-michal.wajdeczko@intel.com commit c5b083a1a174823e6c1fea727ef729415e03b34d Author: Michal Wajdeczko Date: Thu Oct 11 13:00:07 2018 +0000 drm/i915: Fix i915_driver_init_mmio error path In case of the error we missed to call i915_mmio_cleanup that matches earlier call to i915_mmio_setup. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181011130008.24640-1-michal.wajdeczko@intel.com commit c0c46ca461f136a0ae1ed69da6c874e850aeeb53 Author: José Roberto de Souza Date: Wed Sep 26 18:06:50 2018 -0700 drm/i915/aml: Add new Amber Lake PCI ID This new AML PCI ID uses the same gen graphics as Coffe Lake not a Kaby Lake one like the other AMLs. So to make it more explicit renaming INTEL_AML_GT2_IDS to INTEL_AML_KBL_GT2_IDS and naming this id as INTEL_AML_CFL_GT2_IDS. v2: - missed add new AML macro to INTEL_CFL_IDS() - added derivated platform initials to AML macros Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180927010650.22731-1-jose.souza@intel.com commit 0b4bf7ca9be824dde6ff63dd2ceba2d1367f8a58 Author: Chris Wilson Date: Thu Oct 11 11:37:48 2018 +0100 drm/i915/selftests: Disable shrinker across mmap-exhaustion For mmap-exhaustion, we deliberately put the system under a large amount of pressure to ensure that we are able to reap mmap-offsets from dead objects. If background activity does that reaping for us, that defeats the purpose of the test and in some cases will fail our sanity checks (because of the fake activity we use to prevent the idle worker). Fixes: 932cac10c8fb ("drm/i915/selftests: Prevent background reaping of acti ve objects") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181011103748.18387-1-chris@chris-wilson.co.uk commit 7323001549804be70b179a8b636f78e758aeb28d Author: José Roberto de Souza Date: Wed Oct 10 17:44:39 2018 -0700 drm: Do not call drm_dp_cec_set_edid() while registering DP connectors drm_dp_cec_register_connector() is called when registering each DP connector in DRM, while sounds a good idea register CEC adapters as earlier as possible, it causes some driver initialization delay trying to do DPCD transactions in disconnected connectors. This change will cause no regressions as drm_dp_cec_set_edid() will still be called in further detection of connected connectors with a valid edid parameter. This change reduced the module load of i915 by average 0.5sec in a machine with just one DP port disconnected while reducing more than 3sec in a machine with 4 DP ports disconnected. Cc: Hans Verkuil Signed-off-by: José Roberto de Souza Acked-by: Hans Verkuil Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181011004439.4482-1-jose.souza@intel.com commit 2a7be4b4a9a57c3f3adeafd1fc9e453448dc8275 Author: YueHaibing Date: Wed Oct 10 13:02:43 2018 +0000 drm: Use PTR_ERR_OR_ZERO in drm_fb_cma_fbdev_init() Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1539176563-144779-1-git-send-email-yuehaibing@huawei.com commit e87b0bbc9f0380d403f8f2f6abba0d51c74d944f Author: Lyude Paul Date: Mon Oct 8 19:24:31 2018 -0400 drm/nouveau: Fix nv50_mstc->best_encoder() As mentioned in the previous commit, we currently prevent new modesets on recently-removed MST connectors by returning no encoder from our ->best_encoder() callback once the MST port has disappeared. This is wrong however, because it prevents legacy modesetting users from being able to disable CRTCs on MST connectors after the connector's respective topology has disappeared. So, fix this by instead by just always returning a valid encoder. Changes since v2: - Remove usage of atomic MST helper for now, since that got replaced with a much simpler solution Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by: Ben Skeggs Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-3-lyude@redhat.com commit b5d29843d8ef86d4cde4742e095b81b7fd41e688 Author: Lyude Paul Date: Tue Oct 9 16:44:24 2018 -0400 drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors It appears when testing my previous fix for some of the legacy modesetting issues with MST, I misattributed some kernel splats that started appearing on my machine after a rebase as being from upstream. But it appears they actually came from my patch series: [ 2.980512] [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] Updating routing for [CONNECTOR:65:eDP-1] [ 2.980516] [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] [CONNECTOR:65:eDP-1] is not registered [ 2.980516] ------------[ cut here ]------------ [ 2.980519] Could not determine valid watermarks for inherited state [ 2.980553] WARNING: CPU: 3 PID: 551 at drivers/gpu/drm/i915/intel_display.c:14983 intel_modeset_init+0x14d7/0x19f0 [i915] [ 2.980556] Modules linked in: i915(O+) i2c_algo_bit drm_kms_helper(O) syscopyarea sysfillrect sysimgblt fb_sys_fops drm(O) intel_rapl x86_pkg_temp_thermal iTCO_wdt wmi_bmof coretemp crc32_pclmul psmouse i2c_i801 mei_me mei i2c_core lpc_ich mfd_core tpm_tis tpm_tis_core wmi tpm thinkpad_acpi pcc_cpufreq video ehci_pci crc32c_intel serio_raw ehci_hcd xhci_pci xhci_hcd [ 2.980577] CPU: 3 PID: 551 Comm: systemd-udevd Tainted: G O 4.19.0-rc7Lyude-Test+ #1 [ 2.980579] Hardware name: LENOVO 20BWS1KY00/20BWS1KY00, BIOS JBET63WW (1.27 ) 11/10/2016 [ 2.980605] RIP: 0010:intel_modeset_init+0x14d7/0x19f0 [i915] [ 2.980607] Code: 89 df e8 ec 27 02 00 e9 24 f2 ff ff be 03 00 00 00 48 89 df e8 da 27 02 00 e9 26 f2 ff ff 48 c7 c7 c8 d1 34 a0 e8 23 cf dc e0 <0f> 0b e9 7c fd ff ff f6 c4 04 0f 85 37 f7 ff ff 48 8b 83 60 08 00 [ 2.980611] RSP: 0018:ffffc90000287988 EFLAGS: 00010282 [ 2.980614] RAX: 0000000000000000 RBX: ffff88031b488000 RCX: 0000000000000006 [ 2.980617] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff880321ad54d0 [ 2.980620] RBP: ffffc90000287a10 R08: 000000000000040a R09: 0000000000000065 [ 2.980623] R10: ffff88030ebb8f00 R11: ffffffff81416590 R12: ffff88031b488000 [ 2.980626] R13: ffff88031b4883a0 R14: ffffc900002879a8 R15: ffff880319099800 [ 2.980630] FS: 00007f475620d180(0000) GS:ffff880321ac0000(0000) knlGS:0000000000000000 [ 2.980633] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.980636] CR2: 00007f9ef28018a0 CR3: 000000031b72c001 CR4: 00000000003606e0 [ 2.980639] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.980642] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.980645] Call Trace: [ 2.980675] i915_driver_load+0xb0e/0xdc0 [i915] [ 2.980681] ? kernfs_add_one+0xe7/0x130 [ 2.980709] i915_pci_probe+0x46/0x60 [i915] [ 2.980715] pci_device_probe+0xd4/0x150 [ 2.980719] really_probe+0x243/0x3b0 [ 2.980722] driver_probe_device+0xba/0x100 [ 2.980726] __driver_attach+0xe4/0x110 [ 2.980729] ? driver_probe_device+0x100/0x100 [ 2.980733] bus_for_each_dev+0x74/0xb0 [ 2.980736] driver_attach+0x1e/0x20 [ 2.980739] bus_add_driver+0x159/0x230 [ 2.980743] ? 0xffffffffa0393000 [ 2.980746] driver_register+0x70/0xc0 [ 2.980749] ? 0xffffffffa0393000 [ 2.980753] __pci_register_driver+0x57/0x60 [ 2.980780] i915_init+0x55/0x58 [i915] [ 2.980785] do_one_initcall+0x4a/0x1c4 [ 2.980789] ? do_init_module+0x27/0x210 [ 2.980793] ? kmem_cache_alloc_trace+0x131/0x190 [ 2.980797] do_init_module+0x60/0x210 [ 2.980800] load_module+0x2063/0x22e0 [ 2.980804] ? vfs_read+0x116/0x140 [ 2.980807] ? vfs_read+0x116/0x140 [ 2.980811] __do_sys_finit_module+0xbd/0x120 [ 2.980814] ? __do_sys_finit_module+0xbd/0x120 [ 2.980818] __x64_sys_finit_module+0x1a/0x20 [ 2.980821] do_syscall_64+0x5a/0x110 [ 2.980824] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 2.980826] RIP: 0033:0x7f4754e32879 [ 2.980828] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d f7 45 2c 00 f7 d8 64 89 01 48 [ 2.980831] RSP: 002b:00007fff43fd97d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 2.980834] RAX: ffffffffffffffda RBX: 0000559a44ca64f0 RCX: 00007f4754e32879 [ 2.980836] RDX: 0000000000000000 RSI: 00007f475599f4cd RDI: 0000000000000018 [ 2.980838] RBP: 00007f475599f4cd R08: 0000000000000000 R09: 0000000000000000 [ 2.980839] R10: 0000000000000018 R11: 0000000000000246 R12: 0000000000000000 [ 2.980841] R13: 0000559a44c92fd0 R14: 0000000000020000 R15: 0000000000000000 [ 2.980881] WARNING: CPU: 3 PID: 551 at drivers/gpu/drm/i915/intel_display.c:14983 intel_modeset_init+0x14d7/0x19f0 [i915] [ 2.980884] ---[ end trace 5eb47a76277d4731 ]--- The cause of this appears to be due to the fact that if there's pre-existing display state that was set by the BIOS when i915 loads, it will attempt to perform a modeset before the driver is registered with userspace. Since this happens before the driver's registered with userspace, it's connectors are also unregistered and thus-states which would turn on DPMS on a connector end up getting rejected since the connector isn't registered. These bugs managed to get past Intel's CI partially due to the fact it never ran a full test on my patches for some reason, but also because all of the tests unload the GPU once before running. Since this bug is only really triggered when the drivers tries to perform a modeset before it's been fully registered with userspace when coming from whatever display configuration the firmware left us with, it likely would never have been picked up by CI in the first place. After some discussion with vsyrjala, we decided the best course of action would be to just move the unregistered connector checks out of update_connector_routing() and into drm_atomic_set_crtc_for_connector(). The reason for this being that legacy modesetting isn't going to be expecting failures anywhere (at least this is the case with X), so ideally we want to ensure that any DPMS changes will still work even on unregistered connectors. Instead, we now only reject new modesets which would change the current CRTC assigned to an unregistered connector unless no new CRTC is being assigned to replace the connector's previous one. Signed-off-by: Lyude Paul Reported-by: Ville Syrjälä Fixes: 4d80273976bf ("drm/atomic_helper: Disallow new modesets on unregistered connectors") Cc: Daniel Vetter Cc: Ville Syrjälä Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181009204424.21462-1-lyude@redhat.com commit 41c43f9e02765b5dd8646bef803eb57c95e56551 Author: Chris Wilson Date: Wed Oct 10 13:38:33 2018 +0100 drm/i915: Inject a failure point when registering a connector Check we can handle a late display load failure where the final act of registering the connector fails. Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Ville Syrjala Cc: Daniel Vetter Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181010123833.16797-1-chris@chris-wilson.co.uk commit 1c21348d1f3c5babd4f5727038b8c5bd38253f3b Author: Jani Nikula Date: Wed Oct 10 10:52:05 2018 +0300 drm/i915: move intel connector specific functions to intel_connector.c Now that we have intel_connector.c, move the connector specific functions from intel_display.c there. Fix a few checkpatch complaints while at it. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181010075205.7713-2-jani.nikula@intel.com commit 360fa66ae857e8e5ff97a2e0519b2d87baccebfd Author: Jani Nikula Date: Wed Oct 10 10:52:04 2018 +0300 drm/i915: rename intel_modes.c to intel_connector.c The common denominator here seems to be connector more than modes. Prepare for moving more connector functions to the same place. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181010075205.7713-1-jani.nikula@intel.com commit aee7d9bee2db899772c78e8fe591f08ef2a2ba11 Author: Jani Nikula Date: Wed Oct 10 00:09:16 2018 +0300 drm/i915: nuke the intel_lvds_connector For a while we carried lvds connector specific data in the lvds connector, but since commit 05c72e77ccda ("drm/i915: Nuke the LVDS lid notifier") we haven't needed it. Revert back to plain intel_connector. Cc: Ville Syrjälä Reviewed-by: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181009210916.19578-1-jani.nikula@intel.com commit 65404c89e9539e7e569be8c790dd9e4b131149f4 Author: Chris Wilson Date: Wed Oct 10 09:17:06 2018 +0100 drm/i915: Show the DPCD read error inline When reporting the DPCD dump through debugfs, show the errors inline where appropriate. If a read at one particular offset fails, report it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106371 Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181010081706.29931-1-chris@chris-wilson.co.uk commit 1e712535c51ab025ebc776d4405683d81521996d Author: Manasi Navare Date: Tue Oct 9 14:28:04 2018 -0700 drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode This patch fixes the original commit c0cfb10d9e1de49 ("drm/i915/edp: Do not do link training fallback or prune modes on EDP") that causes a blank screen in case of certain eDP panels (Eg: seen on Dell XPS13 9350) where first link training fails and a retraining is required by falling back to lower link rate/lane count. In case of some panels they advertise higher link rate/lane count than whats required for supporting the panel's native mode. But we always link train at highest link rate/lane count for eDP and if that fails we can still fallback to lower link rate/lane count as long as the fallback link BW still fits the native mode to avoid pruning the panel's native mode yet retraining at fallback values to recover from a blank screen. v3: * Add const for fixed_mode (Ville) v2: * Send uevent if link failure on eDP unconditionally Fixes: c0cfb10d9e1d ("drm/i915/edp: Do not do link training fallback or prune modes on EDP") Cc: Clinton Taylor Cc: Jani Nikula Cc: Ville Syrjala Cc: Daniel Vetter Cc: Lucas De Marchi Cc: # v4.17+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107489 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105338 Signed-off-by: Manasi Navare Tested-by: Alexander Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181009212804.702-1-manasi.d.navare@intel.com commit d4b26e4f438f0b070fbcd1e765fb53db9ac59112 Author: Jani Nikula Date: Tue Oct 9 17:11:03 2018 +0300 drm/i915: add a common connector type independent destroy hook Almost all of the connector destroy functions do the same thing. The differences are in the edid, detect_edid and panel cleanups, but those are safely NULL when not initialized. Roll out a common connector destroy hook. Inspired by commit bc3213c44415 ("drm/i915: Drop the eDP check from intel_dp_connector_destroy()"). Cc: Ville Syrjala Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20181009141103.20387-1-jani.nikula@intel.com commit a9f9ca33d1fe9325f414914be526c0fc4ba5281c Author: Lyude Paul Date: Mon Oct 8 19:24:34 2018 -0400 drm/i915: Fix intel_dp_mst_best_encoder() Currently, i915 appears to rely on blocking modesets on no-longer-present MSTB ports by simply returning NULL for ->best_encoder(), which in turn causes any new atomic commits that don't disable the CRTC to fail. This is wrong however, since we still want to allow userspace to disable CRTCs on no-longer-present MSTB ports by changing the DPMS state to off and this still requires that we retrieve an encoder. So, fix this by always returning a valid encoder regardless of the state of the MST port. Changes since v1: - Remove mst atomic helper, since this got replaced with a much simpler solution Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-6-lyude@redhat.com commit f67207d78ceaf98b7531bc22df6f21328559c8d4 Author: Lyude Paul Date: Mon Oct 8 19:24:33 2018 -0400 drm/i915: Skip vcpi allocation for MSTB ports that are gone Since we need to be able to allow DPMS on->off prop changes after an MST port has disappeared from the system, we need to be able to make sure we can compute a config for the resulting atomic commit. Currently this is impossible when the port has disappeared, since the VCPI slot searching we try to do in intel_dp_mst_compute_config() will fail with -EINVAL. Since the only commits we want to allow on no-longer-present MST ports are ones that shut off display hardware, we already know that no VCPI allocations are needed. So, hardcode the VCPI slot count to 0 when intel_dp_mst_compute_config() is called on an MST port that's gone. Changes since V4: - Don't use mst_port_gone at all, just check whether or not the drm connector is registered - Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-5-lyude@redhat.com commit 6ed5bb1fbad34382c8cfe9a9bf737e9a43053df5 Author: Lyude Paul Date: Mon Oct 8 19:24:32 2018 -0400 drm/i915: Don't unset intel_connector->mst_port Currently we set intel_connector->mst_port to NULL to signify that the MST port has been removed from the system so that we can prevent further action on the port such as connector probes, mode probing, etc. However, we're going to need access to intel_connector->mst_port in order to fixup ->best_encoder() so that it can always return the correct encoder for an MST port to prevent legacy DPMS prop changes from failing. This should be safe, so instead keep intel_connector->mst_port always set and instead just check the status of drm_connector->regustered to signify whether or not the connector has disappeared from the system. Changes since v2: - Add a comment to mst_port_gone (Jani Nikula) - Change mst_port_gone to a u8 instead of a bool, per the kernel bot. Apparently bool is discouraged in structs these days Changes since v4: - Don't use mst_port_gone at all! Just check if the connector is registered or not - Daniel Vetter Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-4-lyude@redhat.com commit 4d80273976bf880c4bed9359b8f2d45663140c86 Author: Lyude Paul Date: Mon Oct 8 19:24:30 2018 -0400 drm/atomic_helper: Disallow new modesets on unregistered connectors With the exception of modesets which would switch the DPMS state of a connector from on to off, we want to make sure that we disallow all modesets which would result in enabling a new monitor or a new mode configuration on a monitor if the connector for the display in question is no longer registered. This allows us to stop userspace from trying to enable new displays on connectors for an MST topology that were just removed from the system, without preventing userspace from disabling DPMS on those connectors. Changes since v5: - Fix typo in comment, nothing else Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-2-lyude@redhat.com commit bc3213c444153848b3a1fcaccbcf2c2123ce3de7 Author: Ville Syrjälä Date: Mon Oct 8 16:46:41 2018 +0300 drm/i915: Drop the eDP check from intel_dp_connector_destroy() As long as the connector was zeroed during allocation calling intel_panel_fini() is safe even if we haven't initialized the panel struct explicitly. So let's drop the useless eDP check from dp connector destruction. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181008134641.24868-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 19dfe5726bab6d2ef337b3051d5a96868a875ac4 Author: Ville Syrjälä Date: Mon Oct 8 16:46:40 2018 +0300 drm/i915: Do intel_panel_destroy_backlight() later Currently we destroy the backlight during connector unregistration. That means the final modeset performed by drm_atomic_helper_shutdown() will leave the backlight on. We don't want that so let's just move intel_panel_destroy_backlight() into intel_panel_fini() which gets called during connector destuction. We still unregister the user visible backlight device during connector unregistration. Cc: Jani Nikula Cc: Chris Wilson Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181008134641.24868-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106386 commit 2d12df47eafe74bf2e22cbbebc0265db7cd47082 Author: Uwe Kleine-König Date: Sat Oct 6 18:40:59 2018 +0200 PM / AVS: SmartReflex: remove unused function omap_sr_register_pmic() was introduced in 2010 in commit 984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.") . There was never any caller of this function in mainline resulting in a warning sr_init: No PMIC hook to init smartreflex for each machine where this driver is enabled. So remove the unused function and the pr_warn. Signed-off-by: Uwe Kleine-König Signed-off-by: Rafael J. Wysocki commit 71ffd49cc9b9da5d9e97b5153ee1fe33dfd61a43 Author: Anuj Phogat Date: Thu Oct 4 11:29:39 2018 -0700 drm/i915/icl:Add Wa_1606682166 Incorrect TDL's SSP address shift in SARB for 16:6 & 18:8 modes. Disable the Sampler state prefetch functionality in the SARB by programming 0xB000[30] to '1'. This is to be done at boot time and the feature must remain disabled permanently. Fixes flaky tex-mip-level-selection* piglit tests with Mesa i965 driver. Cc: Radhakrishna Sripada Signed-off-by: Anuj Phogat Reviewed-by: Mika Kuoppala Signed-off-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181004182939.7668-6-radhakrishna.sripada@intel.com commit 0c7d2aedf51b0a9f728ec6e921eaa8f82a47db91 Author: Radhakrishna Sripada Date: Thu Oct 4 11:29:38 2018 -0700 drm/i915/icl: Add Wa_1406609255 Shader feature to prefetch binding tables does not support 16:6 18:8 BTP formats. Enabling fault handling could result in hangs with faults. Disabling demand prefetch would disable binding table prefetch. V2: Fix the stepping rivision to B0(Mika) References: HSDES#1406609255, HSDES#1406573985 Cc: Mika Kuoppala Signed-off-by: Radhakrishna Sripada Reviewed-by: Mika Kuoppala Signed-off-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20181004182939.7668-5-radhakrishna.sripada@intel.com commit 5c93f3ce98b6e5ceda6b2e9c80b071e556fac6f4 Author: Matheus Tavares Date: Mon Oct 8 00:29:38 2018 -0300 staging: iio: ad2s1210: fix 'assignment operator' style checks This patch fixes all "Assignment operator '=' should be on the previous line" checks found in ad2s1210.c with checkpatch.pl. Signed-off-by: Matheus Tavares Signed-off-by: Jonathan Cameron commit f53a70bd93f6058d178421d82ebd3c549159f12f Author: Chris Wilson Date: Mon Oct 8 11:48:08 2018 +0100 drm/i915: Fixup kernel doc for param name changes s/crtc/crtc_state/ for the kernel doc as well as the params. Fixes: 65c307fd08dd ("drm/i915: Make shared dpll functions take crtc_state, v3.") Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Acked-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181008104808.17457-1-chris@chris-wilson.co.uk commit 881440a89ae115a76de9cee355a4a73edb0909da Author: Ville Syrjälä Date: Fri Oct 5 15:58:17 2018 +0300 drm/i915: Rename variables in intel_primary_plane_create() Let's try to stick a common naming pattern in all the plane init funcs. v2: Rebase due to color_encoding/range props Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-12-ville.syrjala@linux.intel.com commit a86d2590bafb74705dff7159dea84a24c6a5afcb Author: Ville Syrjälä Date: Fri Oct 5 15:58:16 2018 +0300 drm/i915: s/intel_plane/plane/ in sprite init Use a more familiar naming pattern for our variables in the sprite plane init function. v2: Drop the redundant 'plane' from plane_formats and num_planes_formats too v3: Rebase due to ->max_stride() and ->check_plane() changes Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-11-ville.syrjala@linux.intel.com commit b7c806007559fd834f22cf2a6a28e1a49e8e90f2 Author: Ville Syrjälä Date: Fri Oct 5 15:58:15 2018 +0300 drm/i915: Extract skl_universal_plane_init() There's not much point in following the primary vs. sprite split for the SKL+ universal plane init code. The only difference is of our own doing in the form of the .check_plane(). Let's make a small exception for that little detail and otherwise share the same code to initialize all the universal planes. Eventually we should eliminate the mess around .check_plane() as well, but for now let's be happy with some code reduction. v2: Remember to set up plane->has_fbc Make skl_plane_has_ccs() static v3: Rebase due to NV12, rename some variables v4: Don't leave the color_encoding/range props behind v5: Rebase dur to blend properties, skl_plane_max_stride() and skl_plane_check() v6: Make skl_update_plane() static Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-10-ville.syrjala@linux.intel.com commit c539b579b6c72719a8e14b1823ccf1e9fb3380d2 Author: Ville Syrjälä Date: Fri Oct 5 15:58:14 2018 +0300 drm/i915: Introduce intel_plane_alloc() Pull the common plane+plane_state allocation into a small helper. Reduces the amount of boilerplate in the plane initialization functions. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-9-ville.syrjala@linux.intel.com commit 2d72dc8b7c15e4a83b4f7c6976feaf96e7e3e63e Author: Ville Syrjälä Date: Fri Oct 5 15:58:13 2018 +0300 drm/i915: Move plane_state->scaler_id initialization into intel_create_plane_state() No point in having each caller of intel_create_plane_state() initialize the scaler_id to -1. Instead just do it in intel_create_plane_state(). Previously we left scaler_id at 0 for pre-SKL platforms, but I can't see how initializing it to -1 always would cause any harm. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-8-ville.syrjala@linux.intel.com commit 97ee97b9782e9bc521aa5372e625cfd4153da222 Author: Ville Syrjälä Date: Fri Oct 5 15:58:12 2018 +0300 drm/i915: Add missing pixel formats for skl+ "sprites" All SKL+ universal planes support the same set of formats (with the exception of NV12 which we don't expose yet). Make the format lists for primary and sprites the same. And make the format list const while at it. v2: Deal with the "planar" format list as well Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-7-ville.syrjala@linux.intel.com commit 37a411e2118b186a12be530532da7b7f2bfbdc38 Author: Ville Syrjälä Date: Fri Oct 5 15:58:11 2018 +0300 drm/i915: Disallow plane scaling with specific pixel formats Plane scaling is not supported with specific pixel formats. Disallow plane scaling when such a format is used. Currently the only such pixel format we expose is C8, but in case we add more in the future let's make it easy to deal with them. v2: Redo due to plane_check() refactoring Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-6-ville.syrjala@linux.intel.com commit 934882db2961d4e96f55e48cbbd8699cc237b6f0 Author: Ville Syrjälä Date: Fri Oct 5 15:58:10 2018 +0300 drm/i915: Allow horizontal mirroring for cnl+ "sprite" planes All CNL universal planes support horizontal mirroring. Currently we expose the capability only for the primary plane. Expose it for the overlay planes as well. Cc: Joonas Lahtinen Signed-off-by: Ville Syrjälä Reviewed-by: Joonas Lahtinen Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-5-ville.syrjala@linux.intel.com commit ee6e0496de1f99108fc192e72159fdf8cfdefed6 Author: Ville Syrjälä Date: Fri Oct 5 15:58:09 2018 +0300 drm/i915: Don't populate plane->i9xx_plane for sprites enum i9xx_plane_id namespace is not valid for any sprite plane, so let's not even populate plane->i9xx_plane. Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-4-ville.syrjala@linux.intel.com commit deb196895f8422f7d78e93c6d0e32da1e79b8955 Author: Ville Syrjälä Date: Fri Oct 5 15:58:08 2018 +0300 drm/i915: Populate possible_crtcs for primary/cursor planes We're currently not providing the possible_crtcs mask to drm_universal_plane_init() for primary/cursor planes. While that does work on account of drm_crtc_init_with_planes() filling those up for us, it's inconsisten with what we're doing for sprite planes. Let's just always pass the possible_crtcs bitmask to drm_universal_plane_init(). This does assume that crtc->index == pipe. But we're already making that assumption elsewhere so it doesn't seem like a very big sin here. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-3-ville.syrjala@linux.intel.com commit 679bfe847b623529c34f195eb446218510c36ace Author: Ville Syrjälä Date: Fri Oct 5 15:58:07 2018 +0300 drm/i915: Constify all plane_funcs structs plane_funcs can be cosnt. Make them so. v2: Rebase due to per-platforms plane_funcs Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20181005125817.22576-2-ville.syrjala@linux.intel.com commit 49c5c0769a919549d814de52f7aceaa1c86a3fc7 Author: Giulio Benetti Date: Fri Oct 5 23:59:51 2018 +0200 drm/sun4i: tcon: prevent tcon->panel dereference if NULL If tcon->panel pointer is NULL, trying to dereference from it (i.e. tcon->panel->connector) will cause a null pointer dereference. Add tcon->panel null pointer check before calling sun4i_tcon0_mode_set_dithering(). Signed-off-by: Giulio Benetti Fixes: f11adcecbd5f ("drm/sun4i: tcon: Add dithering support for RGB565/RGB666 LCD panels") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181005215951.99003-2-giulio.benetti@micronovasrl.com commit 548ae867efb1741fa55cedb5e73d7d0e75acd1f2 Author: Giulio Benetti Date: Fri Oct 5 23:59:50 2018 +0200 drm/sun4i: tcon: fix check of tcon->panel null pointer Since tcon->panel is a pointer returned by of_drm_find_panel() need to check if it is not NULL, hence a valid pointer. IS_ERR() instead checks return error values, not NULL pointers. Substitute "if (!IS_ERR(tcon->panel))" with "if (tcon->panel)". Signed-off-by: Giulio Benetti Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181005215951.99003-1-giulio.benetti@micronovasrl.com commit 2e00b533527cf4f53a8909b950d2a583c967cd65 Author: Slawomir Stepien Date: Fri Oct 5 10:05:15 2018 +0200 staging: iio: cdc: ad7150: fix misaligned lines These lines were misaligned, but the checkpatch.pl didn't indicate them as such. Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 4bb199e51ddc45eeb823e2c7ae670de06912fa9c Author: Slawomir Stepien Date: Fri Oct 5 10:04:44 2018 +0200 staging: iio: cdc: ad7150: use value copy to shorten the line length By using the copy of channel attribute, we can now make the lines short enough to eliminate the checkpatch.pl problem: CHECK: Alignment should match open parenthesis Signed-off-by: Slawomir Stepien Signed-off-by: Jonathan Cameron commit 388008bbd60ccf2787ebe053dd91ee92f275630f Author: Uwe Kleine-König Date: Fri Oct 5 21:48:30 2018 +0200 iio: ssp_sensors: don't manually free devm managed resources The charme of devm_* functions is that you don't need to care about them in the error path. In this case it is valid to just return NULL which makes the device fail to probe and then the two gpios and the allocated memory are freed automatically by the driver core. Signed-off-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron commit 1afacfb0dfe9af88d8e831cfcfb8bda663cfc9b5 Author: Alexandru Ardelean Date: Tue Oct 2 14:57:57 2018 +0300 staging: iio: ad5933: rename ext_clk_Hz -> ext_clk_hz The checkpatch script doesn't like camel-case names. Renamed the variable. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit a7ae845cdcad7ec960ff400685887ef98e431f4e Author: Marek Vasut Date: Tue Oct 2 03:00:13 2018 +0200 iio: adc: Fix Renesas GyroADC MAINTAINERS entry Fix the F: entry in MAINTAINERS file, point it to the correct file. While at it, add DT binding doc F: entry too. Signed-off-by: Marek Vasut Cc: Joe Perches Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron commit 3a465b84ea383a09f102f8c08f1349c96bdb77ef Author: José Roberto de Souza Date: Wed Oct 3 13:50:31 2018 -0700 drm/i915/psr: Remove alpm from i915_psr ALPM is a requirement and we don't need to keep it's cached, what were done in commit 97c9de66ca80 ("drm/i915/psr: Fix ALPM cap check for PSR2") but the alpm was not removed from i915_psr. Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181003205031.32474-7-jose.souza@intel.com commit 66231d14e74a1107dd069293f792eb04538f5651 Author: José Roberto de Souza Date: Wed Oct 3 13:50:28 2018 -0700 drm/i915/psr: Use WA to force HW tracking to exit PSR2 This WA also works fine for PSR2, triggering a selective update when possible. Acked-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181003205031.32474-4-jose.souza@intel.com commit 4755717b0ca82df343c4b9283997a2361041f1c7 Author: José Roberto de Souza Date: Wed Oct 3 13:50:27 2018 -0700 drm/i915/psr: Remove PSR2 TODO error handling We are already handling all PSR2 errors, so we can drop this TODO. Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181003205031.32474-3-jose.souza@intel.com commit fc6ff9dc9ecf7e10597a85c4b83c304fb7c7083e Author: José Roberto de Souza Date: Wed Oct 3 13:50:26 2018 -0700 drm/i915/psr: Make MASK_DISP_REG_WRITE reserved in PSR_MASK for ICL ICL spec states that this bit is now reserved. Bspec: 7722 v2(Dhinakaran and Jani): - instead of remove bit in gen11 now only setting if if gen < 11 - changed commit title Cc: Jani Nikula Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181003205031.32474-2-jose.souza@intel.com commit bf80928fbf066826251a9f3f7543ada52cc69c92 Author: José Roberto de Souza Date: Wed Oct 3 13:50:25 2018 -0700 drm/i915/psr: Share PSR and PSR2 exit mask Now both PSR and PSR2 have the same exit mask, so let's share then instead of have the same code 2 times. Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20181003205031.32474-1-jose.souza@intel.com commit 00e5d8b1eb47378924f3de3435450650f426b02a Author: Anusha Srivatsa Date: Thu Oct 4 15:36:13 2018 -0700 firmware/dmc/icl: Add missing MODULE_FIRMWARE() for Icelake. Add missing MODULE_FIRMWARE while loading DMC ICL. v2: Add Fixes tag. (Rodrigo) v3: Rebase by Rodrigo after commit 7fe78985cd08 ("drm/i915/csr: restructure CSR firmware definition macros") v4: Rodrigo fixing his own mess on commit mentioning on v3 comment above. Fixes: 4445930f1c4a ("firmware/dmc/icl: load v1.07 on icelake.") Cc: Rodrigo Vivi Cc: Paulo Zanoni Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Rodrigo Vivi (v2) Signed-off-by: Rodrigo Vivi Tested-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20181004223613.19938-1-rodrigo.vivi@intel.com commit 443d5e3973e8e774addd830bc1091498b49b4bf2 Author: Rodrigo Vivi Date: Thu Oct 4 08:18:14 2018 -0700 drm/i915/icl: MBUS B credit change No functional change. But just a minor change to keep up with Spec, since it has changed since commit c3cc39c539d4 ("drm/i915/icl: program mbus during pipe enable") The instructions previously said to program pipe's B credit = 24 / number of pipes, which is 8 for ICL. Now the spec gives us direct values independent of number of pipes. Let's keep in sync. Also just a reorder on fields to make easier to compare against spec's sequence: A -> BW -> B. Cc: Lucas De Marchi Cc: Paulo Zanoni Cc: Mahesh Kumar Cc: Arthur J Runyan Signed-off-by: Rodrigo Vivi Reviewed-by: Mahesh Kumar Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20181004151814.6054-1-rodrigo.vivi@intel.com commit dfdaa566b7d4ecbfcabbb624bc45c5221f142039 Author: Lee, Shawn C Date: Thu Sep 27 00:48:19 2018 -0700 drm/i915: Apply correct ddi translation table for AML device Amber Lake used the same gen graphics as Kaby Lake. Kernel driver should configure KBL's DDI buffer setting for AML ULX as well. So far, driver would load DDI translation table that used for KBL H/S platform and apply it on AML devices. But AML is belong to ULX series. This change will lead driver to apply KBL-Y's DDI table for AML devices to avoid unexpected eDP/DP signal quality issue. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Jose Roberto de Souza Signed-off-by: Lee, Shawn C Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1538034499-31256-2-git-send-email-shawn.c.lee@intel.com commit ab2da3f8cd972d4813c7044bcb84a3271031e19a Author: Lee, Shawn C Date: Thu Sep 27 00:48:18 2018 -0700 drm/i915: Add new AML_ULX support list According to patch "drm/i915/aml: Introducing Amber Lake platform" (e364672477a1). Add a new marco for AML ULX GT2 devices. Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Jose Roberto de Souza Signed-off-by: Lee, Shawn C Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1538034499-31256-1-git-send-email-shawn.c.lee@intel.com commit c1c8f6fa731bc850d571d9c32016c3bf9ed1332e Author: Rodrigo Vivi Date: Mon Sep 24 16:43:12 2018 -0700 drm/i915: Redefine some Whiskey Lake SKUs commit 'b9be78531d27 ("drm/i915/whl: Introducing Whiskey Lake platform")' introduced WHL by moving some of CFL IDs here and using the Spec information of "U43" for most of IDs what appeared to be GT3. However when propagating the change to Mesa, Lionel noticed that based on number of execution unities the classification here seems at least strange. So, let's move for now with the information we trust more: the number of EUs. So we are able to propagate this change across the stack without getting stuck forever. Reference: https://patchwork.freedesktop.org/patch/246695/ Fixes: b9be78531d27 ("drm/i915/whl: Introducing Whiskey Lake platform") Cc: Lionel Landwerlin Cc: José Roberto de Souza Cc: David Airlie Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180924234312.15017-1-rodrigo.vivi@intel.com commit 84c0851794d40b1f438343b371bb0eaa8d36a4a3 Author: Daniel Vetter Date: Thu Oct 4 22:24:42 2018 +0200 drm: Unexport drm_plane_helper_check_update It's for legacy drivers only (atomic ones should use drm_atomic_helper_check_plane_state() instead), and there's no users left except the one in the primary plane helpers. Signed-off-by: Daniel Vetter Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-18-daniel.vetter@ffwll.ch commit 40e3defd19cecb308c6e6441853766401864a75b Author: Thomas Hellstrom Date: Thu Oct 4 22:24:41 2018 +0200 drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check Use the correct helper and also return early on helper success rather than on helper failure. Also explicitly return 0 in the case of no fb. v2: Check for !fb after updating state->visible (Ville). Reviewed-by: Ville Syrjälä Signed-off-by: Thomas Hellstrom (v1) Reported-by: Dan Carpenter Reported-by: Daniel Vetter Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: VMware Graphics Cc: Sinclair Yeh Cc: Thomas Hellstrom Acked-by: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-17-daniel.vetter@ffwll.ch commit 8e7a4424b996ab780b4cb4a4564f31e079e55711 Author: Ville Syrjälä Date: Thu Oct 4 15:15:27 2018 +0300 drm/i915: Fix ILK-IVB sprite enable delays Sprite enable on ILK-IVB may take two frames to complete when the hardware is in big FIFO mode (LP1+). That is not entirely great as it means the sprite enable may actually happen one frame after we've already signalled flip completion. At the very least crc checks may fail due to the sprite not yet being visible when we expect it. We already have code to deal with big FIFO mode when it comes to the sprite scaling on IVB (WaCxSRDisabledForSpriteScaling:ivb). Let's extend that workaround to kick in whenever the sprite is in the process of being enabled. Also ILK/SNB bspec has some notes to indicate that we should most likely also do the sprite scaling w/a on all three platforms, so let's do that as well. Pretty easy to reproduce on SNB/IVB. ILK has proved more elusive, but let's trust the spec and include it as well. v2: Make sure the pipe is active before the vblank wait Cc: Juha-Pekka Heikkila Testcase: igt/kms_plane/pixel-format-pipe-*-planes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107749 Signed-off-by: Ville Syrjälä Reviewed-by: Juha-Pekka Heikkila #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20181004121527.30249-1-ville.syrjala@linux.intel.com commit 6b6fce62f65c19590bee8102f7946a26eaf0b054 Author: Daniel Vetter Date: Fri Oct 5 11:47:32 2018 +0200 drm: Unexport primary plane helpers Well except the destroy helper, which isn't really a primary helper but generally useful, if mislabelled. v2: Keep some of the nice comments about the limitations of the primarmy plane helpers, and put them into the kerneldoc for drm_crtc_init() (Sam). Reviewed-by: Ville Syrjälä Cc: Sam Ravnborg Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181005094732.31353-1-daniel.vetter@ffwll.ch commit e6a3e405b54804efbf50e97c8c4460099be03e1f Author: Daniel Vetter Date: Thu Oct 4 22:24:45 2018 +0200 drm/todo: Add some cleanup tasks Motivated by review comments from Ville&Sean. Cc: Ville Syrjälä Cc: Sean Paul Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-21-daniel.vetter@ffwll.ch commit 4af67def3b0830361cc4404f65e32efa0da9c9d7 Author: Daniel Vetter Date: Thu Oct 4 22:24:44 2018 +0200 drm/doc: fix drm_driver_legacy_fb_format Didn't get updated in a rework of the original patch. Fixes: 059b5eb5d955 ("drm: move native byte order quirk to new drm_driver_legacy_fb_format function") Cc: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-20-daniel.vetter@ffwll.ch commit 21ebe615c16994f340fe2b6735aad31fd1d0014c Author: Daniel Vetter Date: Thu Oct 4 22:24:40 2018 +0200 drm: Remove transitional helpers With armada the last bigger driver that realistically needed these to convert from legacy kms to atomic is converted. These helpers have been broken more often than not the past 2 years, and as this little patch series shows, tricked a bunch of people into using the wrong helpers for their functions. Aside: I think a lot more drivers should be using the device-level drm_atomic_helper_shutdown/suspend/resume helpers and related functions. In almost all the cases they get things exactly right. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-16-daniel.vetter@ffwll.ch commit b1a122c51f5710176a66201d24efbb379e314c15 Author: Daniel Vetter Date: Thu Oct 4 22:24:39 2018 +0200 drm/zte: Use drm_atomic_helper_shutdown drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Shawn Guo Acked-by: Shawn Guo Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-15-daniel.vetter@ffwll.ch commit 9bac4a01bc88487e51eb7220df60959625a9e7bf Author: Daniel Vetter Date: Thu Oct 4 22:24:38 2018 +0200 drm/vc4: Use drm_atomic_helper_shutdown drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. v2: Rebase. Reviewed-by: Ville Syrjälä Acked-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-14-daniel.vetter@ffwll.ch commit a2b50babc74394c99638a37a3d48adeb03ddc248 Author: Daniel Vetter Date: Thu Oct 4 22:24:37 2018 +0200 drm/sti: Use drm_atomic_helper_shutdown drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. The sti cleanup code seems supremely confused: - In the load error path it calls drm_mode_config_cleanup before it stops various kms services like poll worker or fbdev emulation. That's going to oops. - The actual unload code doesn't even bother with the cleanup and just leaks. Try to fix this while at it. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Benjamin Gaignard Cc: Vincent Abriou Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-13-daniel.vetter@ffwll.ch commit 3ea4b1e1b814384a59f2adf0e24fb108084ddab6 Author: Daniel Vetter Date: Thu Oct 4 22:24:36 2018 +0200 drm/msm: Use drm_atomic_helper_shutdown drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Rajesh Yadav Cc: Chandan Uddaraju Cc: Archit Taneja Cc: Jeykumar Sankaran Cc: Sean Paul Cc: Maarten Lankhorst Cc: Sinclair Yeh Cc: "Ville Syrjälä" Cc: Russell King Cc: Gustavo Padovan Cc: Arnd Bergmann Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-12-daniel.vetter@ffwll.ch commit b3e90917e4d1412d67302f4c95e9e3105de845b0 Author: Daniel Vetter Date: Thu Oct 4 22:24:35 2018 +0200 drm/arcpgu: Use drm_atomic_helper_shutdown drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-11-daniel.vetter@ffwll.ch commit d680781d21a5e9d5a48e9afc67c5fc101bf3ec74 Author: Daniel Vetter Date: Thu Oct 4 22:24:34 2018 +0200 drm/atmel: Drop transitional hooks These do absolutely nothing for atomic drivers. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Boris Brezillon Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-10-daniel.vetter@ffwll.ch commit d1b42edea8eee67dc41e0db9b83ec13f6f969d38 Author: Daniel Vetter Date: Thu Oct 4 22:24:33 2018 +0200 drm/arcpgu: Drop transitional hooks These do absolutely nothing for atomic drivers. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-9-daniel.vetter@ffwll.ch commit ec9b0a9e2c9e2543aa391c6006fde3f9b6e54576 Author: Daniel Vetter Date: Thu Oct 4 22:24:31 2018 +0200 drm/atomic: Improve docs for drm_atomic_state->allow_modeset Motivated by vmwgfx digging around in core uapi bits it shouldn't dig around in. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-7-daniel.vetter@ffwll.ch commit 9ef8a9dc4b21821d6c397186462fb5e571786b0a Author: Daniel Vetter Date: Thu Oct 4 22:24:28 2018 +0200 drm: Extract drm_atomic_state_helper.[hc] We already have a separate overview doc for this, makes sense to untangle it from the overall atomic helpers. v2: Rebase v3: Rebase more. Acked-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-4-daniel.vetter@ffwll.ch commit 297e30b5d9b6ddaa53da3026b4a762aa22e10fb0 Author: Daniel Vetter Date: Thu Oct 4 22:24:27 2018 +0200 drm/atomic-helper: Unexport drm_atomic_helper_best_encoder It's the default. The exported version was kinda a transition state, before we made this the default. To stop new atomic drivers from using it (instead of just relying on the default) let's unexport it. v2: rename the default implementation to a more fitting name and add a comment (Laurent) Signed-off-by: Daniel Vetter Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Cc: VMware Graphics Cc: Sinclair Yeh Cc: Thomas Hellstrom Cc: Archit Taneja Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Daniel Vetter Cc: Russell King Cc: Jernej Skrabec Cc: Jani Nikula Cc: Pierre-Hugues Husson Cc: Fabio Estevam Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-3-daniel.vetter@ffwll.ch commit 2b4c1c0512e9ad6935e9de5e3248e904948b7c4b Author: Daniel Vetter Date: Thu Oct 4 22:24:26 2018 +0200 drm/amdgpu: Remove default best_encoder hook from DC For atomic driver this is the default, no need to reimplement it. We still need to keep the copypasta for not-atomic drivers though, since no one polished the legacy crtc helpers as much as the atomic ones. v2: amdgpu uses ->best_encoder internally, give it a local copy. It might be a good idea to merge the connector and encoder into one amdgpu_dm_sink structure, that might match DC internals better. At least for non-DPMST outputs. Kudos to Ville for spotting this. v3: Rebase onto a487411a6481 ("drm/amd/display: Use DRM helper for best_encoder"). Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: Harry Wentland Cc: Andrey Grodzovsky Cc: Tony Cheng Cc: "Leo (Sunpeng) Li" Cc: Shirish S Acked-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-2-daniel.vetter@ffwll.ch commit 03189d5bf7781086b2df97cdcf53324832840471 Author: Chris Wilson Date: Tue Aug 7 18:47:48 2018 +0100 drm: Remove defunct dma_buf_kmap stubs Since commit 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional"), we no longer need to provide stub no-op functions as the core now provides them directly. References: 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Alex Deucher Cc: "Christian König" Reviewed-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180807174748.4503-1-chris@chris-wilson.co.uk commit 9e37ee7913b44b1fbaea327111ad991c7315d245 Author: Daniel Vetter Date: Fri Oct 5 09:36:36 2018 +0200 drm/vblank: Remove old-style comments Somehow I forgot a few when typing all the shiny new kerneldoc. Drop them. Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181005073636.27291-1-daniel.vetter@ffwll.ch commit 6f405638c2ab111df8bbff0ec57c2785870edb37 Author: Maarten Lankhorst Date: Thu Oct 4 11:46:04 2018 +0200 drm/i915: Get rid of intel_crtc->config in crtc_enable/disable functions, v2. These functions already have a pointer to the correct state, so use it instead of crtc->config. Changes since v1: - Move pll changes to the pll patch. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-14-maarten.lankhorst@linux.intel.com commit 958bb4528d16d0f6cdab7a34a9bd141b42768ca2 Author: Maarten Lankhorst Date: Thu Oct 4 11:46:03 2018 +0200 drm/i915: Get rid of crtc->config in chv_data_lane_soft_reset Fixing chv_set_phy_signal_level() still requires too many levels of indirection to pass crtc_state along, but chv_data_lane_soft_reset() already has a crtc_state we can use. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-13-maarten.lankhorst@linux.intel.com commit f56f6648404b411b377a3082bc9459fed66a968f Author: Maarten Lankhorst Date: Thu Oct 4 11:46:02 2018 +0200 drm/i915: Get rid of crtc->config dereference in intel_dp_retrain_link We're already using crtc_state here and made sure no modeset is occurring by looking at conn_state->commit->hw_done, so there's no need to dereference crtc->config. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-12-maarten.lankhorst@linux.intel.com commit 6e3d9dd0ae0aa4f0b6ccb273aa88c2e19e901cce Author: Maarten Lankhorst Date: Thu Oct 4 11:46:01 2018 +0200 drm/i915: Use crtc->state in intel_fbdev_init_bios fbdev init shouldn't race with userspace since it's called from intel_modeset_init, so it's safe to dereference crtc->state and assume nothing changed yet. At least not more harmful than crtc->config. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-11-maarten.lankhorst@linux.intel.com commit 0e5fa64610f6f7fe40f46c6ac7981a1d22e957df Author: Maarten Lankhorst Date: Thu Oct 4 11:46:00 2018 +0200 drm/i915: Get rid of crtc->config from icl_pll_to_ddi_pll_sel Pass the full state to intel_ddi_clk_select, so we can pass it to icl_pll_to_ddi_pll_sel instead of passign the crtc and having to dereference crtc->config Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-10-maarten.lankhorst@linux.intel.com commit 5e1cdf541b24b8189835baa038c05725815d8378 Author: Maarten Lankhorst Date: Thu Oct 4 11:45:58 2018 +0200 drm/i915: Make ironlake_pch_transcoder_set_timings take crtc_state Instead of passing crtc and dereferencing crtc->config, pass the correct crtc_state and obtain the crtc pointer from there. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-8-maarten.lankhorst@linux.intel.com commit 65c307fd08dd6cc7771220ee0238a152db552d97 Author: Maarten Lankhorst Date: Fri Oct 5 11:52:44 2018 +0200 drm/i915: Make shared dpll functions take crtc_state, v3. Do not rely on crtc->config any more. Remove the assertion from ibx_pch_dpll_disable, because we the dpll state tracking should already handle this case correctly. Changes since v1: - Fixup accidental early return in intel_prepare_shared_dpll, oops! Changes since v2: - Don't use the freed crtc_state in intel_crtc_disable_noatomic() Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181005095244.1324-1-maarten.lankhorst@linux.intel.com commit b2354c78b1251719f38775b27837fc39e25e3d35 Author: Maarten Lankhorst Date: Thu Oct 4 11:45:57 2018 +0200 drm/i915: Make pll functions take crtc_state, v2. Instead of passing crtc and dereferencing crtc->config, passs the correct crtc_state and obtain the crtc pointer from there. Changes since v1: - Move vlv/chv changes and i9xx_set_pll_dividers changes from crtc_enable/disable patches to here. - Add commit message. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-7-maarten.lankhorst@linux.intel.com commit 15cbe5d0926f5d4700c1a0e27e02cb83c1ec392c Author: Maarten Lankhorst Date: Thu Oct 4 11:45:56 2018 +0200 drm/i915: Make skl_detach_scalers take crtc_state Rename intel_crtc to crtc, and pass crtc_state instead of looking at crtc->config. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-6-maarten.lankhorst@linux.intel.com commit 7efd90fb4886fc6c9d71ac11155c7b7e6c036508 Author: Maarten Lankhorst Date: Thu Oct 4 11:45:55 2018 +0200 drm/i915: Use crtc_state in ironlake_enable_pch_transcoder Rename intel_crtc to crtc, and pass crtc_state so we don't have to dereference crtc->config. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-5-maarten.lankhorst@linux.intel.com commit 44fe7f35528c671ed704c4c3984f89522d94c65d Author: Maarten Lankhorst Date: Thu Oct 4 11:45:54 2018 +0200 drm/i915: Make intel_set_pipe_timings/src_size take a pointer to crtc_state Pass the state instead of looking at crtc->config and rename intel_crtc to crtc. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-4-maarten.lankhorst@linux.intel.com commit b2562712d7de6dabe8b45d9ce454b1d430486875 Author: Maarten Lankhorst Date: Thu Oct 4 11:45:53 2018 +0200 drm/i915: Make panel fitter functions take state If we look at the correct state instead of crtc->config, we can nuke the force parameter, and we cleanup a few more users of crtc->config at the same time. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-3-maarten.lankhorst@linux.intel.com commit fdf73510ca81e3dd82db697327cb2c81624475ce Author: Maarten Lankhorst Date: Thu Oct 4 11:45:52 2018 +0200 drm/i915: Remove dereferences of crtc->config in set_pipeconf/misc functions, v2. One more user of crtc->config down. :) Changes since v1: - Constify crtc_state - int pipe -> enum pipe pipe - Move i9xx_set_pipeconf declaration to the other pipeconf declarations. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-2-maarten.lankhorst@linux.intel.com commit 6b7e2d5c30322e6f30fcffb592615906ce9d3c6a Author: Gerd Hoffmann Date: Tue Oct 2 13:10:40 2018 +0200 drm: add drm_connector_attach_edid_property() drm_connector_init doesn't attach the edid property for some connector types, drm_connector_attach_edid_property() can be used to enable the edid property in these cases. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20181002111041.17053-2-kraxel@redhat.com commit 33373258cf021869380140078bb3f9732b7d852d Author: Chris Wilson Date: Fri Oct 5 09:03:00 2018 +0100 drm/i915: Remove the global cache shrink & rcu barrier on allocation failure Earlier, we reasoned that having idled the gpu under mempressure, that would be a good time to trim our request slabs in order to perform the next request allocation. We have stopped performing the global operation on the device (no idling) and wish to make the allocation failure handling more local, so out with the global barrier that may take a long time. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181005080300.9908-2-chris@chris-wilson.co.uk commit 88a83f3c2d7a87ce7c9c4171dec8e2fb48070288 Author: Chris Wilson Date: Thu Oct 4 09:21:19 2018 +0100 drm/i915: Only reset seqno if actually idle Before we can reset the seqno, we have to be sure the engines are idle. In debugfs/i915_drop_caches_set, we do wait_for_idle but allow ourselves to be interrupted. We should only proceed to reset the seqno then if we were not interrupted, and so also avoid overwriting the error status. References: https://bugs.freedesktop.org/show_bug.cgi?id=108133 Fixes: 6b048706f407 ("drm/i915: Forcibly flush unwanted requests in drop-caches") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20181004082119.24970-1-chris@chris-wilson.co.uk commit 7a4a2a460458b48c282c017fc83f58b83fad1522 Author: Ville Syrjälä Date: Wed Oct 3 17:50:52 2018 +0300 drm/i915: Clean up early plane debugs Print the plane hw state readout results in the common format we already use for pipes and encoders. Also print some clearer debug messages when we disable planes during the early phases of state readout/sanitization. v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181003145052.4633-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 62358aa4ee86481ce044bef04859820e1bc7c1d9 Author: Ville Syrjälä Date: Wed Oct 3 17:50:17 2018 +0300 drm/i915: Use the correct crtc when sanitizing plane mapping When we decide that a plane is attached to the wrong pipe we try to turn off said plane. However we are passing around the crtc we think that the plane is supposed to be using rather than the crtc it is currently using. That doesn't work all that well because we may have to do vblank waits etc. and the other pipe might not even be enabled here. So let's pass the plane's current crtc to intel_plane_disable_noatomic() so that it can its job correctly. To do that semi-cleanly we also have to change the plane readout to record the plane's visibility into the bitmasks of the crtc where the plane is currently enabled rather than to the crtc we want to use for the plane. One caveat here is that our active_planes bitmask will get confused if both planes are enabled on the same pipe. Fortunately we can use plane_mask to reconstruct active_planes sufficiently since plane_mask still has the same meaning (is the plane visible?) during readout. We also have to do the same during the initial plane readout as the second plane could clear the active_planes bit the first plane had already set. v2: Rely on fixup_active_planes() to populate active_planes fully (Daniel) Add Daniel's proposed comment to better document why we do this Drop the redundant intel_set_plane_visible() call Cc: stable@vger.kernel.org # fcba862e8428 drm/i915: Have plane->get_hw_state() return the current pipe Cc: stable@vger.kernel.org Cc: Dennis Cc: Daniel Vetter Tested-by: Dennis Tested-by: Peter Nowee Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637 Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181003145017.4527-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 68bc30deac625b8be8d3950b30dc93d09a3645f5 Author: Ville Syrjälä Date: Wed Oct 3 17:49:51 2018 +0300 drm/i915: Restore vblank interrupts earlier Plane sanitation needs vblank interrupts (on account of CxSR disable). So let's restore vblank interrupts earlier. v2: Make it actually build v3: Add comment to explain why we need this (Daniel) Cc: stable@vger.kernel.org Cc: Dennis Tested-by: Dennis Tested-by: Peter Nowee Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105637 Fixes: b1e01595a66d ("drm/i915: Redo plane sanitation during readout") Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181003144951.4397-1-ville.syrjala@linux.intel.com commit 9dbf5a4efd8afa2b831b0f76b4f9cab9480af817 Author: Ville Syrjälä Date: Wed Oct 3 21:42:10 2018 +0300 drm/i915: Provide more clues as to why MST is/is not used Always print out the information whether the port and sink can each do MST. And let's include the modparam in the debug output as well. Makes life a little less confusing when you don't have to wonder why MST isn't kicking in. This does cause a slight change in our behaviour towards the sink. Previously we only read the MSTM_CAP register after passing all the other checks. Now we will read that register regardless. Hopefully some crazy sink doesn't get confused by a simple register read. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181003184210.1306-1-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan commit 0fc645f338e3e1a4ee05e5529d86ac596c5921b6 Author: Daniele Ceraolo Spurio Date: Tue Oct 2 14:54:29 2018 -0700 drm/i915/guc: Don't clear the cookie on doorbell destroy If the HW has not processed the db invalidation request yet, clearing the cookie can generate a db ring. We clear the cookie when we (re-)allocate the doorbell so no need to do it on destroy as well as no one is going to look at it while the doorbell is inactive v2: fix typo in patch title (Michal) Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181002215430.15049-2-daniele.ceraolospurio@intel.com commit 48b426a9b9ab93481a2c5b913c2c6add5fb1001a Author: Daniele Ceraolo Spurio Date: Tue Oct 2 14:54:28 2018 -0700 drm/i915/guc: init GuC descriptors after GuC load GuC stores some data in there, which might be stale after a reset. We already reset the WQ head and tail, but more things are being moved to the descriptor with the interface updates. Instead of trying to track them one by one, always memset and init the descriptors from scratch after GuC is loaded. The code is also reorganized so that the above operations and the doorbell creation are grouped as "client enabling" v2: add proc_desc_fini for symmetry (Daniele), remove unneeded var init, add guc_is_alive() (Michal) Cc: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181002215430.15049-1-daniele.ceraolospurio@intel.com commit 4db4b85014df7fa3c91a2e9330ca446ac9b3b882 Author: Manasi Navare Date: Tue Oct 2 14:50:55 2018 -0700 drm: Fix kernel doc for DRM_MODE_PROP_IMMUTABLE This patch explains the DRM_MODE_PROP_IMMUTABLE flag a bit better by telling which function to call if kernel wants to update drm object's immutable properties. Suggested-by: Daniel Vetter Cc: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181002215055.8652-1-manasi.d.navare@intel.com commit d717c6df3040abe6456b790e6901e1b98f83c201 Author: Daniel Vetter Date: Wed Oct 3 15:21:03 2018 +0200 drm/vkms: Extend todo Typed up all the items Rodrigo capture at the vkms workshop at xdc2018: https://etherpad.net/p/vkms_todo v2: Review from Rodrigo. - Add eBPF for atomic check, I forgot it. - Improve spelling. Signed-off-by: Daniel Vetter Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: Haneen Mohammed Cc: Rodrigo Siqueira Reviewed-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20181003132103.29309-1-daniel.vetter@ffwll.ch commit c5e69ab35c0d7069ad860c5cb44a5986e2322160 Author: Ville Syrjälä Date: Fri Sep 21 17:33:32 2018 +0300 video/hdmi: Constify infoframe passed to the pack functions Let's make the infoframe pack functions usable with a const infoframe structure. This allows us to precompute the infoframe earlier, and still pack it later when we're no longer allowed to modify the structure. So now we end up with a _check()+_pack_only() or _pack() functions depending on whether you want to precompute the infoframes or not. The names aren't great but I was lazy and didn't want to change all the drivers. v2: Deal with exynos churn Actually export the new funcs v3: Fix various documentation fails (Hans) Cc: Thierry Reding Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180921143332.28970-1-ville.syrjala@linux.intel.com Acked-by: Hans Verkuil commit bc2477f7d3f3083d344b327e358e43093054023c Author: Chris Wilson Date: Wed Oct 3 12:09:41 2018 +0100 drm/i915/execlists: Flush the CS events before unpinning Inside the execlists submission tasklet, we often make the mistake of assuming that everything beneath the request is available for use. However, the submission and the request live on two separate timelines, and the request contents may be freed from an early retirement before we have had a chance to run the submission tasklet (think ksoftirqd). To safeguard ourselves against any mistakes, flush the tasklet before we unpin the context if execlists still has a reference to this context. v2: Pull hw_context->active tracking into schedule_in and schedule_out. References: 60367132a214 ("drm/i915: Avoid use-after-free of ctx in request tracepoints") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181003110941.27886-1-chris@chris-wilson.co.uk commit 8f5c6fe46d6c1a49d01fc675170283599284b98f Author: Chris Wilson Date: Mon Oct 1 20:44:46 2018 +0100 drm/i915: Clear the error PTE just once on finish We do not need to continually clear our dedicated PTE for error capture as it will be updated and invalidated to the next object. Only at the end do we wish to be sure that the PTE doesn't point back to any buffer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001194447.29910-3-chris@chris-wilson.co.uk commit 83bc0f5b432f60394466deef16fc753e27371d0b Author: Chris Wilson Date: Wed Oct 3 09:24:22 2018 +0100 drm/i915: Handle incomplete Z_FINISH for compressed error states The final call to zlib_deflate(Z_FINISH) may require more output space to be allocated and so needs to re-invoked. Failure to do so in the current code leads to incomplete zlib streams (albeit intact due to the use of Z_SYNC_FLUSH) resulting in the occasional short object capture. v2: Check against overrunning our pre-allocated page array v3: Drop Z_SYNC_FLUSH entirely Testcase: igt/i915-error-capture.js Fixes: 0a97015d45ee ("drm/i915: Compress GPU objects in error state") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v4.10+ Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181003082422.23214-1-chris@chris-wilson.co.uk commit 5ec244f4afd0a08c0e814381df3b17b463e8d634 Author: Chris Wilson Date: Tue Oct 2 14:29:27 2018 +0100 drm/i915/selftests: Hold task_struct ref for smoking kthread As the kthread may terminate itself, the parent must hold a task_struct reference for it to call kthread_stop(). <4> [498.827675] stack segment: 0000 [#1] PREEMPT SMP PTI <4> [498.827683] CPU: 0 PID: 3872 Comm: drv_selftest Tainted: G U 4.19.0-rc6-CI-CI_DRM_4915+ #1 <4> [498.827686] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018 <4> [498.827695] RIP: 0010:kthread_stop+0x36/0x210 <4> [498.827698] Code: 05 df 3d f6 7e 89 c0 48 0f a3 05 95 f8 29 01 0f 82 56 01 00 00 f0 ff 43 20 f6 43 26 20 0f 84 7f 01 00 00 48 8b ab b0 05 00 00 80 4d 00 02 48 89 df e8 5d ff ff ff 48 89 df e8 15 c7 00 00 48 <4> [498.827701] RSP: 0018:ffffc900003937d0 EFLAGS: 00010202 <4> [498.827704] RAX: 0000000000000001 RBX: ffff8802165ece40 RCX: 0000000000000001 <4> [498.827707] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff82247460 <4> [498.827709] RBP: 6b6b6b6b6b6b6b6b R08: 00000000581395cb R09: 0000000000000001 <4> [498.827711] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90000393868 <4> [498.827713] R13: ffffc900003937f0 R14: ffff88026c068040 R15: 0000000000001057 <4> [498.827716] FS: 00007fc0c464b980(0000) GS:ffff880277e00000(0000) knlGS:0000000000000000 <4> [498.827718] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [498.827720] CR2: 000056178c2feca0 CR3: 000000026983c000 CR4: 0000000000340ef0 <4> [498.827723] Call Trace: <4> [498.827824] smoke_crescendo+0x14c/0x1d0 [i915] <4> [498.827837] ? _raw_spin_unlock_irqrestore+0x4c/0x60 <4> [498.827898] ? __i915_gem_context_pin_hw_id+0x69/0x5f0 [i915] <4> [498.827902] ? ida_alloc_range+0x1f2/0x3d0 <4> [498.827907] ? __mutex_unlock_slowpath+0x46/0x2b0 <4> [498.827914] ? rcu_lockdep_current_cpu_online+0x8f/0xd0 <4> [498.827979] live_preempt_smoke+0x2c2/0x470 [i915] <4> [498.828047] __i915_subtests+0x5e/0xf0 [i915] <4> [498.828113] __run_selftests+0x10b/0x190 [i915] <4> [498.828175] i915_live_selftests+0x2c/0x60 [i915] <4> [498.828232] i915_pci_probe+0x50/0xa0 [i915] <4> [498.828238] pci_device_probe+0xa1/0x130 <4> [498.828244] really_probe+0x25d/0x3c0 <4> [498.828249] driver_probe_device+0x10a/0x120 <4> [498.828253] __driver_attach+0xdb/0x100 <4> [498.828256] ? driver_probe_device+0x120/0x120 <4> [498.828259] bus_for_each_dev+0x74/0xc0 <4> [498.828264] bus_add_driver+0x15f/0x250 <4> [498.828268] ? 0xffffffffa00c3000 <4> [498.828271] driver_register+0x56/0xe0 <4> [498.828274] ? 0xffffffffa00c3000 <4> [498.828278] do_one_initcall+0x58/0x2e0 <4> [498.828281] ? rcu_lockdep_current_cpu_online+0x8f/0xd0 <4> [498.828285] ? do_init_module+0x1d/0x1ea <4> [498.828289] ? rcu_read_lock_sched_held+0x6f/0x80 <4> [498.828293] ? kmem_cache_alloc_trace+0x264/0x290 <4> [498.828297] do_init_module+0x56/0x1ea <4> [498.828302] load_module+0x26f5/0x29d0 <4> [498.828309] ? vfs_read+0x122/0x140 <4> [498.828318] ? __se_sys_finit_module+0xd3/0xf0 <4> [498.828321] __se_sys_finit_module+0xd3/0xf0 <4> [498.828329] do_syscall_64+0x55/0x190 <4> [498.828332] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [498.828335] RIP: 0033:0x7fc0c3f16839 Fixes: 992d2098ef0b ("drm/i915/selftests: Split preemption smoke test into threads") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181002132927.7669-1-chris@chris-wilson.co.uk commit 598c6cfe06900505ae16a355599e9f08432f4d7a Author: Dhinakaran Pandiyan Date: Thu Sep 27 23:11:17 2018 -0700 drm/i915/psr: Enable PSR1 on gen-9+ HW We have new tests and fixes in place since the feature was last disabled. Try again for gen-9+ hardware and enable only PSR1 by default as a first step. v2: Remove typo fix and comment improvements (Rodrigo) Cc: Jani Nikula Cc: Jose Roberto de Souza Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Ville Syrjälä References: commit 2ee7dc497e34 ("drm/i915: disable PSR by default on HSW/BDW") References: commit dcb2e993f3c0 ("Revert "drm/i915: Enable PSR by default on Valleyview and Cherryview."") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Tested-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180928061117.12394-1-dhinakaran.pandiyan@intel.com commit 2ddcc982bdc51ad31bf5aa86ea02b3166cadd32e Author: Andi Shyti Date: Tue Oct 2 12:20:47 2018 +0300 drm/i915: fix wrong error number report During driver load it's considered that the i915_driver_create() function fails only in case of insufficient memory. Indeed, in case of failure of i915_driver_create(), the load function returns indiscriminately -ENOMEM ignoring the real cause of failure. In i915_driver_create() get the consistent error value from drm_dev_init() and embed it in the pointer return value. Signed-off-by: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20181002092047.14705-1-andi.shyti@intel.com commit c0a6aa7ec2c365a44ec8eb6e9b23f1f51ad386ed Author: Chris Wilson Date: Tue Oct 2 12:32:21 2018 +0100 drm/i915: Show actual alongside requested frequency in debugfs/i915_rps_boost_info Previously we hesitated in adding the hw probe for the actual GPU frequency for rps_boost as it is quite cumbersome, but given some surprising HW behaviour it would be useful to know both the RPS boost state and the actual HW state in one location. v2: vlv/chv needs more tlc Reported-by: Tomi Sarvela Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181002113221.29208-1-chris@chris-wilson.co.uk commit 89d5efcc311cca135de623e9e4a81267e7a9eaa8 Author: Chris Wilson Date: Mon Oct 1 20:44:44 2018 +0100 drm/i915: Replace some open-coded i915_coherent_map_type() A few callsites were deciding on using WC or WB maps based on HAS_LLC(), so replace them with the equivalent helper function i915_coherent_map_type(). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001194447.29910-1-chris@chris-wilson.co.uk commit b20815255693733d06af788ea0b9dcd6271c3841 Author: Maarten Lankhorst Date: Wed Aug 15 12:34:05 2018 +0200 drm/i915: Add plane alpha blending support, v2. Add plane alpha blending support with the different blend modes. This has been tested on a icl to show the correct results, on earlier platforms small rounding errors cause issues. But this already happens case with fully transparant or fully opaque RGB8888 fb's. The recommended HW workaround is to disable alpha blending when the plane alpha is 0 (transparant, hide plane) or 0xff (opaque, disable blending). This is easy to implement on any platform, so just do that. The tests for userspace are also available, and pass on gen11. Changes since v1: - Change mistaken < 0xff0 to 0xff00. - Only set PLANE_KEYMSK_ALPHA_ENABLE when plane alpha < 0xff00, ignore blend mode. - Rework disabling FBC when per pixel alpha is used. Signed-off-by: Maarten Lankhorst [mlankhorst: Change MISSING_CASE default to explicit alpha disable (mattrope)] Link: https://patchwork.freedesktop.org/patch/msgid/20180815103405.22679-1-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper commit 7569bf95310e8835adf85661f2f94fecb3653b35 Author: Jyoti Yadav Date: Wed Sep 5 13:42:27 2018 -0400 drm/i915/csr: Added ICL Stepping info As DMC Package contain DMC FW for multiple steppings including default stepping. This patch will help to load FW for that particular stepping, if FW for that stepping is available, instead of loading default FW. v2 : Fix formatting issue. Signed-off-by: Jyoti Yadav Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/1536169347-31326-1-git-send-email-jyoti.r.yadav@intel.com commit 469a9308adfcfaa85c85f02fec9fdecd9e38fe07 Author: Satendra Singh Thakur Date: Wed Sep 26 22:41:50 2018 +0200 drm/fsl-dcu: use drm_display_mode_to_videomode to calculate timing parameters Use the drm_display_mode_to_videomode function to calculate front/ back porches and sync length. Cc: Madhur Verma Cc: Hemanshu Srivastava Signed-off-by: Satendra Singh Thakur Signed-off-by: Stefan Agner Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180926204150.29829-2-stefan@agner.ch commit 53b9974b4b334185ab1030b7ef406d668e6e71ac Author: Stefan Agner Date: Wed Sep 26 22:41:49 2018 +0200 drm/fsl-dcu: drop unused drm_crtc_index() The result of drm_crtc_index() is unused. Remove the call and the unused variable. Signed-off-by: Stefan Agner Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180926204150.29829-1-stefan@agner.ch commit e9eaf82d97a2b05460ff5ef6a3e07446f7d049fe Author: Chris Wilson Date: Mon Oct 1 15:47:55 2018 +0100 drm/i915: Priority boost for waiting clients Latency is in the eye of the beholder. In the case where a client stops and waits for the gpu, give that request chain a small priority boost (not so that it overtakes higher priority clients, to preserve the external ordering) so that ideally the wait completes earlier. v2: Tvrtko recommends to keep the boost-from-user-stall as small as possible and to allow new client flows to be preferred for interactivity over stalls. Testcase: igt/gem_sync/switch-default Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Dmitry Rogozhkin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001144755.7978-3-chris@chris-wilson.co.uk commit e2f3496e93be3238de2e2e6bfc83b3a83c084ce5 Author: Chris Wilson Date: Mon Oct 1 15:47:54 2018 +0100 drm/i915: Pull scheduling under standalone lock Currently, the backend scheduling code abuses struct_mutex into order to have a global lock to manipulate a temporary list (without widespread allocation) and to protect against list modifications. This is an extraneous coupling to struct_mutex and further can not extend beyond the local device. Pull all the code that needs to be under the one true lock into i915_scheduler.c, and make it so. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001144755.7978-2-chris@chris-wilson.co.uk commit b16c765122f987056e1dc9ef6c214571bb5bd694 Author: Chris Wilson Date: Mon Oct 1 15:47:53 2018 +0100 drm/i915: Priority boost for new clients Taken from an idea used for FQ_CODEL, we give the first request of a new request flows a small priority boost. These flows are likely to correspond with short, interactive tasks and so be more latency sensitive than the longer free running queues. As soon as the client has more than one request in the queue, further requests are not boosted and it settles down into ordinary steady state behaviour. Such small kicks dramatically help combat the starvation issue, by allowing each client the opportunity to run even when the system is under heavy throughput load (within the constraints of the user selected priority). v2: Mark the preempted request as the start of a new flow, to prevent a single client being continually gazumped by its peers. Testcase: igt/benchmarks/rrul Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001144755.7978-1-chris@chris-wilson.co.uk commit 790ea70c5eb5e0893da0224cd093718b133f4461 Author: Ville Syrjälä Date: Thu Sep 20 21:51:36 2018 +0300 drm/i915: Pass intel_encoder to infoframe functions Make life simpler by passing around intel_encoder instead of drm_encoder. @r1@ identifier F =~ "infoframe"; identifier I, M; @@ F( - struct drm_encoder *I + struct intel_encoder *I , ...) { <... ( - I->M + I->base.M | - I + &I->base ) ...> } @r2@ identifier F =~ "infoframe"; identifier I; type T, ST; @@ ST { ... T (*F)( - struct drm_encoder *I + struct intel_encoder *encoder , ...); ... }; @@ identifier r1.F; expression E; @@ F( - E + to_intel_encoder(E) ,...) @@ identifier r2.F; expression E, X; @@ ( X.F( - E + to_intel_encoder(E) ,...) | X->F( - E + to_intel_encoder(E) ,...) ) @@ expression E; @@ ( - to_intel_encoder(&E->base) + E | - to_intel_encoder(&E->base.base) + &E->base ) @@ identifier D, M; expression E; @@ D = enc_to_dig_port(&E->base) <... ( - D->base.M + E->M | - &D->base + E ) ...> @@ identifier D; expression E; type T; @@ - T D = enc_to_dig_port(E); ... when != D Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-10-ville.syrjala@linux.intel.com Acked-by: Daniel Vetter commit 121f0ff52f77341863d1ec1841771e503fa7f09c Author: Ville Syrjälä Date: Thu Sep 20 21:51:35 2018 +0300 drm/i915: Use memmove() for punching the hole into infoframes Replace the hand rolled memmove() with the real thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-9-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 468d6a4996fb67228e94c9ffd90a715e754a8283 Author: Ville Syrjälä Date: Thu Sep 20 21:51:30 2018 +0300 video/hdmi: Constify infoframe passed to the log functions The log functions don't modify the passed in infoframe so make it const. Cc: Thierry Reding Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-4-ville.syrjala@linux.intel.com Acked-by: Hans Verkuil commit 480b8b3e42c3d959f8b6346c24c088eb70ef9fc2 Author: Ville Syrjälä Date: Thu Sep 20 21:51:29 2018 +0300 video/hdmi: Pass buffer size to infoframe unpack functions To make sure the infoframe unpack functions don't end up examining stack garbage or oopsing, let's pass in the size of the buffer. v2: Convert tda1997x.c as well (kbuild test robot) Cc: Thierry Reding Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-3-ville.syrjala@linux.intel.com Acked-by: Hans Verkuil commit f26e1de5ec487c040efa845f280d110c29baea32 Author: Ville Syrjälä Date: Thu Sep 20 21:51:28 2018 +0300 video/hdmi: Constify 'buffer' to the unpack functions The unpack functions just read from the passed in buffer, so make it const. Cc: Thierry Reding Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920185145.1912-2-ville.syrjala@linux.intel.com Acked-by: Hans Verkuil commit 85f5e1f385b7643ee31e0530a1daa2438ac27aaf Author: Chris Wilson Date: Mon Oct 1 13:32:04 2018 +0100 drm/i915: Combine multiple internal plists into the same i915_priolist bucket As we are about to allow ourselves to slightly bump the user priority into a few different sublevels, packthose internal priority lists into the same i915_priolist to keep the rbtree compact and avoid having to allocate the default user priority even after the internal bumping. The downside to having an requests[] rather than a node per active list, is that we then have to walk over the empty higher priority lists. To compensate, we track the active buckets and use a small bitmap to skip over any inactive ones. v2: Use MASK of internal levels to simplify our usage. v3: Prevent overflow when SHIFT is zero. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001123204.23982-4-chris@chris-wilson.co.uk commit 7651a4452ddf8ace48defd473ead6effe35059c7 Author: Chris Wilson Date: Mon Oct 1 13:32:03 2018 +0100 drm/i915: Reserve some priority bits for internal use In the next few patches, we will want to give a small priority boost to some requests/queues but not so much that we perturb the user controlled order. As such we will shift the user priority bits higher leaving ourselves a few low priority bits for our internal bumping. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001123204.23982-3-chris@chris-wilson.co.uk commit 567a605705893afdffcedd35a0ba766f52604d94 Author: Chris Wilson Date: Mon Oct 1 13:32:02 2018 +0100 drm/i915/selftests: Include arbitration points in preemption smoketest Include a batch full of a page of arbitration points in order to provide a window for inject_preempt_context() in the preemption smoketests. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001123204.23982-2-chris@chris-wilson.co.uk commit 992d2098ef0bc1256016fec86e4082524e2f52cc Author: Chris Wilson Date: Mon Oct 1 13:32:01 2018 +0100 drm/i915/selftests: Split preemption smoke test into threads When submitting chains to each engine, we can do so (mostly) in parallel, so delegate submission to threads on a per-engine basis. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20181001123204.23982-1-chris@chris-wilson.co.uk commit f384d7d514d1f6d5d0a485e718fdbf37bf438a35 Author: Rob Herring Date: Fri Sep 28 17:50:44 2018 -0500 drm: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. For drm_modes.c, the full node path is already printed out, so printing just the node name a 2nd time is redundant and can be removed. Cc: Gustavo Padovan Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Acked-by: Rob Clark Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Rob Herring Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20180928225044.20132-1-robh@kernel.org commit a0d4d42cb5854400baa47bf63d9aae65fa9f484e Author: Thomas Zimmermann Date: Wed Sep 26 13:36:23 2018 +0200 drm/bochs: Replace drm_gem_object_unreference_unlocked with put function This patch unifies the naming of DRM functions for reference counting of struct drm_gem_object. The resulting code is more aligned with the rest of the Linux kernel interfaces. v2: * rebase onto fbdev rework Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20180926113623.22679-1-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann commit b256013e720788ecacae2a6f7e7dcbba315adf05 Author: Thomas Zimmermann Date: Wed Sep 26 14:06:50 2018 +0200 drm/zte: Replace drm_dev_unref with drm_dev_put This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Acked-by: Shawn Guo Signed-off-by: Shawn Guo Link: https://patchwork.freedesktop.org/patch/msgid/20180926120650.25614-1-tzimmermann@suse.de commit 1c53ba8f22a125b770691030b279300ea982d3b1 Author: Heiko Stuebner Date: Wed Sep 12 14:47:40 2018 +0200 drm/rockchip: dw_hdmi: add dw-hdmi support for the rk3328 The rk3328 uses a dw-hdmi controller with an external hdmi phy from Innosilicon which uses the generic phy framework for access. Add the necessary data and the compatible for the rk3328 to the rockchip dw-hdmi driver. changes in v5: - disable CEC_5V option to make CEC actually work (Jonas) changes in v3: - reword as suggested by Rob to show that it's a dw-hdmi + Inno phy Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Acked-by: Rob Herring Reviewed-by: Zheng Yang Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-7-heiko@sntech.de commit 5c3f3d22393c56f3d233587c599e66a74f031639 Author: Heiko Stuebner Date: Wed Sep 12 14:47:39 2018 +0200 drm/rockchip: dw_hdmi: store rockchip_hdmi reference in phy_data object When using special phy handling operations we'll often need access to the rockchip_hdmi struct. As the chip-data that occupies the phy_data pointer initially gets assigned to the rockchip_hdmi struct, we can now re-use this phy_data pointer to hold the reference to the rockchip_hdmi struct and use this reference later on. Inspiration for this comes from meson and sunxi dw-hdmi, which are using the same method. changes in v3: - reword commit message Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Reviewed-by: Zheng Yang Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-6-heiko@sntech.de commit bd1302305ae654318b674eb6fd66346ee043ed72 Author: Heiko Stuebner Date: Wed Sep 12 14:47:38 2018 +0200 drm/rockchip: dw_hdmi: allow including external phys Some variants of the dw-hdmi on Rockchip socs use a separate phy block accessed via the generic phy framework, so allow them to be included if such a phy reference is found. Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Reviewed-by: Zheng Yang Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-5-heiko@sntech.de commit 9f891dbe391054ec3fe0e5d14f995addd80f7900 Author: Heiko Stuebner Date: Wed Sep 12 14:47:37 2018 +0200 dt-bindings: allow optional phys in Rockchip dw_hdmi binding Some newer Rockchip SoCs use an Innosilicon hdmiphy accessed via general mmio, so allow these to be referenced via the regular phy interfaces and therefore add optional phy-related properties to the binding. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-4-heiko@sntech.de commit 96c4704fec95db487432a72cbe244c1db2e090bc Author: Heiko Stuebner Date: Wed Sep 12 14:47:36 2018 +0200 drm/rockchip: dw_hdmi: Allow outputs that don't need output switching So far we always encountered socs with 2 output crtcs needing the driver to tell the hdmi block which output to connect to. But there also exist socs with only one crtc like the rk3228, rk3328 and rk3368. So adapt the register field to simply carry a negative value to signal that no output-switching is necessary. changes in v3: - fixed wording issue found by Robin Murphy Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Reviewed-by: Zheng Yang Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-3-heiko@sntech.de commit 8faff37409fb47d86c839bb2da9f2cff371a3ef1 Author: Heiko Stuebner Date: Wed Sep 12 14:47:35 2018 +0200 drm/bridge: dw-hdmi: allow forcing vendor phy-type In some IP implementations the reading of the phy-type may be broken. One example are the Rockchip rk3228 and rk3328 socs that use a separate vendor-type phy from Innosilicon but still report the HDMI20_TX type. So allow the glue driver to force the vendor-phy for these cases. In the future it may be necessary to allow forcing other types, but for now we'll keep it simply to the case actually seen in the wild. changes in v3: - only allow forcing vendor type, as suggested by Laurent Signed-off-by: Heiko Stuebner Tested-by: Robin Murphy Reviewed-by: Andrzej Hajda Reviewed-by: Zheng Yang Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-2-heiko@sntech.de Link: https://patchwork.freedesktop.org/patch/msgid/20180912124740.20343-3-heiko@sntech.de commit 7769db5883841b03de544a35a71ff528d4131c17 Author: Jani Nikula Date: Wed Sep 5 12:53:21 2018 +0300 drm/i915/dp: optimize eDP 1.4+ link config fast and narrow We've opted to use the maximum link rate and lane count for eDP panels, because typically the maximum supported configuration reported by the panel has matched the native resolution requirements of the panel, and optimizing the link has lead to problems. With eDP 1.4 rate select method and DSC features, this is decreasingly the case. There's a need to optimize the link parameters. Moreover, already eDP 1.3 states fast link with fewer lanes is preferred over the wide and slow. (Wide and slow should still be more reliable for longer cable lengths.) Additionally, there have been reports of panels failing on arbitrary link configurations, although arguably all configurations they claim to support should work. Optimize eDP 1.4+ link config fast and narrow. Side note: The implementation has a near duplicate of the link config function, with just the two inner for loops turned inside out. Perhaps there'd be a way to make this, say, more table driven to reduce the duplication, but seems like that would lead to duplication in the table generation. We'll also have to see how the link config optimization for DSC turns out. Cc: Ville Syrjälä Cc: Manasi Navare Cc: Rodrigo Vivi Cc: Matt Atwood Cc: "Lee, Shawn C" Acked-by: Rodrigo Vivi Reviewed-by: Manasi Navare Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105267 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180905095321.13843-1-jani.nikula@intel.com commit 9844bc87cb7a5985bab1f1c26e6c4e534105725b Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:35 2018 -0700 drm/i915/dp: Fix duplication of DEVICE_SERVICE_IRQ handling There are two copies of the same code called from long and short pulse handlers. v2: Rebase due to s/int status/enum drm_connector_status in intel_dp_detect() Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-6-dhinakaran.pandiyan@intel.com commit cbfa8ac835cb46ce7535ff11afe33f2bffc08ff7 Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:34 2018 -0700 drm/i915/dp: Kill intel_dp->detect_done flag The intel_dp->detect_done flag is no more useful. Pull intel_dp_long_pulse() into the lone caller, Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-5-dhinakaran.pandiyan@intel.com commit 47658556da857c66c5865f192408639f524cca40 Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:33 2018 -0700 drm/i915/dp: Do not grab crtc modeset lock in intel_dp_detect() A crtc modeset lock was added for link retraining but intel_dp_retrain_link() knows to take the necessary locks since commit c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") v2: Drop AUX power domain reference in the early return path Fixes: c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") Cc: Ville Syrjälä Cc: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-4-dhinakaran.pandiyan@intel.com commit d5acd97f5571189616685a4498b7d50687048979 Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:32 2018 -0700 drm/i915/dp: Use a local variable for intel_encoder * We have two cases of intel_dp to intel_encoder conversions, use a local variable to store the conversion. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-3-dhinakaran.pandiyan@intel.com commit f24f6eb95807bca0dbd8dc5b2f3a4099000f4472 Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:31 2018 -0700 drm/i915/dp: Restrict link retrain workaround to external monitors Commit '3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")' applies a work around for sinks that don't signal link loss. The work around does not need to have to be that broad as the issue was seen with only one particular monitor; limit this only for external displays as eDP features like PSR turn off the link and the driver ends up retraining the link seeeing that link is not synchronized. Cc: Lyude Paul Cc: Jan-Marek Glogowski Cc: Ville Syrjälä Cc: Rodrigo Vivi References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-2-dhinakaran.pandiyan@intel.com commit 9ebd8202393dde9d3678c9ec162c1aa63ba17eac Author: Dhinakaran Pandiyan Date: Thu Sep 27 13:57:30 2018 -0700 drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse() Comment claims link needs to be retrained because the connected sink raised a long pulse to indicate link loss. If the sink did so, intel_dp_hotplug() would have handled link retraining. Looking at the logs in Bugzilla referenced in commit '3cf71bc9904d ("drm/i915: Re-apply Perform link quality check, unconditionally during long pulse"")', the issue is that the sink does not trigger an interrupt. What we want is ->detect() from user space to check link status and retrain. Ville's review for the original patch also indicates the same root cause. So, rewrite the comment. v2: Patch split and rewrote comment. Cc: Lyude Paul Cc: Ville Syrjälä Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Jan-Marek Glogowski References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180927205735.16651-1-dhinakaran.pandiyan@intel.com commit 53273b5222082c021ac8889387ffe4cc89206f14 Author: Benjamin Gaignard Date: Fri Jun 29 15:01:40 2018 +0200 drm: stm: implement get_scanout_position function Hardware allow to read the position in scanout buffer so we can use this information to make wait of vblank more accurate. Active area bounds (start, end, total height) have already been computed and written in ltdc registers, read them and get the current line position to compute vpos value. Signed-off-by: Benjamin Gaignard Reviewed-by: Yannick Fertré Tested-by: Yannick Fertré Link: https://patchwork.freedesktop.org/patch/msgid/20180629130140.16004-1-benjamin.gaignard@linaro.org commit a2bf92e8cc16f6bf33bc8053c776630c79ad0325 Author: Chris Wilson Date: Tue Sep 25 09:31:59 2018 +0100 drm/i915/execlists: Avoid kicking priority on the current context If the request is currently on the HW (in port 0), then we do not need to kick the submission tasklet to evaluate whether we should be preempting itself in order to execute it again. In the case that was annoying me: execlists_schedule: rq(18:211173).prio=0 -> 2 need_preempt: last(18:211174).prio=0, queue.prio=2 We are bumping the priority of the first of a pair of requests running in the current context. Then when evaluating preempt, we would see that that our priority request is higher than the last executing request in ELSP0 and so trigger preemption, not realising that our intended request was already executing. v2: As we assume state of the execlists->port[] that is only valid while we hold the timeline lock we have to repeat some earlier tests that on the validity of the node. v3: Wrap guc submission under the timeline.lock as is now the way of all things. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180925083205.2229-2-chris@chris-wilson.co.uk commit 17fd7a9d324fd3af613ddd76f0439481acaad23d Author: Stefan Mavrodiev Date: Thu Jul 12 11:21:53 2018 +0300 drm/panel: Add support for Olimex LCD-OLinuXino panel This patch adds Olimex Ltd. LCD-OLinuXino bridge panel driver. The panel is used with different LCDs (currently from 480x272 to 1280x800). A small EEPROM chip is used for identification, which holds some factory data and timing requirements. Signed-off-by: Stefan Mavrodiev Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1531383729-13932-1-git-send-email-stefan@olimex.com commit 6cbe7cd15f953a8bb49cab9b85077e1ee4e0e999 Author: Marco Felsch Date: Mon Sep 24 17:26:10 2018 +0200 drm/panel: simple: Add DLC1010GIG panel Add support for the DLC DLC1010GIG 1280x800 10.1" LVDS panel to the simple-panel driver. Signed-off-by: Marco Felsch Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180924152610.25939-1-m.felsch@pengutronix.de commit 7ad8b41cd8f5c2842646d01cdd576663caee04a7 Author: Chen-Yu Tsai Date: Fri Sep 7 12:19:46 2018 +0800 drm/panel: simple: Add support for Banana Pi 7" S070WV20-CT16 panel This panel is marketed as Banana Pi 7" LCD display. On the back is a sticker denoting the model name S070WV20-CT16. This is a 7" 800x480 panel connected through a 24-bit RGB interface. However the panel only does 262k colors. Depending on the variant, the PCB attached to the panel module either supports DSI, or DSI + 24-bit RGB. DSI is converted to 24-bit RGB via an onboard ICN6211 MIPI DSI - RGB bridge chip, then fed to the panel itself. Signed-off-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180907041948.19913-5-wens@csie.org commit 882c35af565a352d3183bd4cb2f9e59414521f87 Author: Heiko Stuebner Date: Thu Aug 16 16:09:20 2018 +0200 drm/panel: p079zca: unconditionally remove the panel on removal There is no need to check innolux->base.dev when trying to remove the panel, as that variable is always set directly before the panel gets added and will still be available on panel_remove. Signed-off-by: Heiko Stuebner Reviewed-by: Philipp Zabel Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180816140920.5009-1-heiko@sntech.de commit 94889b487bb9c2560226fc7dac08d28561e340b4 Author: Giulio Benetti Date: Tue Jul 31 01:11:17 2018 +0200 dt-bindings: Add CDTech S043WQ26H-CT7 panel bindings Add documentation for S043WQ26H-CT7 panel Signed-off-by: Giulio Benetti Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180730231117.5631-6-giulio.benetti@micronovasrl.com commit e58edce616ac0845fb3e6e368b2e9c08f3b04006 Author: Giulio Benetti Date: Tue Jul 31 01:11:16 2018 +0200 drm/panel: add panel CDTech S043WQ26H-CT7 to panel-simple This patch adds support for CDTech S043WQ26H-CT7 480x272 4.3" panel to DRM simple panel driver. Signed-off-by: Giulio Benetti Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180730231117.5631-5-giulio.benetti@micronovasrl.com commit 1a4d3f24efcb2a733cab7a872bb0a0634cfdec5a Author: Giulio Benetti Date: Tue Jul 31 01:11:15 2018 +0200 dt-bindings: Add CDTech S070WV95-CT16 panel bindings Add documentation for S070WV95-CT16 panel Signed-off-by: Giulio Benetti Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180730231117.5631-4-giulio.benetti@micronovasrl.com commit 982f944ed7cff2d656dce1a9679de45d052b7a07 Author: Giulio Benetti Date: Tue Jul 31 01:11:14 2018 +0200 drm/panel: add panel CDTech S070WV95-CT16 to panel-simple This patch adds support for CDTech S070WV95-CT16 800x480 7" panel to DRM simple panel driver. Signed-off-by: Giulio Benetti Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180730231117.5631-3-giulio.benetti@micronovasrl.com commit 21295ceacff7db926544067c2835d87b52eeefdb Author: Giulio Benetti Date: Tue Jul 31 01:11:13 2018 +0200 dt-bindings: Add vendor prefix for CDTech(H.K.) Electronics Limited This adds a vendor prefix "cdtech" for CDTech(H.K.) Electronics Limited Website: www.cdtech-lcd.com Signed-off-by: Giulio Benetti Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180730231117.5631-2-giulio.benetti@micronovasrl.com commit 7fe78985cd0881ab60b13320f74df0ed6655f2fe Author: Jani Nikula Date: Thu Sep 27 10:53:11 2018 +0300 drm/i915/csr: restructure CSR firmware definition macros Use uniform prefixes for firmware path, version and size. Unify alignments. Order macro groups as in the if ladder using them. Add platform specific max firmware size macros for all platforms for clarity in the if ladder. Place the max firmware size macros in the platform specific macro groups. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180927075311.5076-1-jani.nikula@intel.com commit db2b0e5ffc707c709496d55c5bad30e9f36bc238 Author: Fabio Estevam Date: Thu Jul 26 00:19:27 2018 -0300 drm/panel: seiko-43wvf1g: Add missing ">" character in author's email There is a missing ">" character in Marco's email. Fix it. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1532575167-14754-2-git-send-email-festevam@gmail.com commit 6bf18d84f768a02618f5518ebc88adb4e71ae2b4 Author: Fabio Estevam Date: Thu Jul 26 00:19:26 2018 -0300 drm/panel: seiko-43wvf1g: Switch to SPDX identifier Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1532575167-14754-1-git-send-email-festevam@gmail.com commit e077e2f5f8106ed22c245b538f1fba412f864e94 Author: Andrzej Hajda Date: Wed Jul 25 17:46:43 2018 +0200 drm/panel: simple: fix BOE/HV070WSA-100 timings Panel timings were taken from vendor code and are not fully correct - refresh rate is about 50Hz instead of 60Hz. The patch fixes it. Signed-off-by: Andrzej Hajda Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180725154644.25412-9-a.hajda@samsung.com commit 1f0eb8b81089d2bb428521f46bbb78e8073cf5d5 Author: Hans de Goede Date: Sun Sep 9 15:34:57 2018 +0200 drm: panel-orientation-quirks: Add quirk for GPD win2 GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_win2 data struct may very well need to be updated with some extra bios-dates in the future. Reported-and-tested-by: russianneuromancer@ya.ru Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20180909133457.10636-3-hdegoede@redhat.com commit 9531221df8f0cadcf4c03151e2a0204787a77b74 Author: Hans de Goede Date: Sun Sep 9 15:34:56 2018 +0200 drm/i915: Check for panel orientation quirks on eDP panels So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right. The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up. This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added. Reported-and-tested-by: russianneuromancer@ya.ru Reviewed-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20180909133457.10636-2-hdegoede@redhat.com commit 064b06bbf117f8b5e64a5143e970d5a1cf602fd6 Author: Arnd Bergmann Date: Wed Sep 26 21:38:36 2018 +0200 drm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION The variable is declared in an #ifdef section, but the user is now unconditional, which leads to a build failure: drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind': drivers/gpu/drm/imx/imx-drm-core.c:264:6: error: 'legacyfb_depth' undeclared (first use in this function); did you mean 'lockdep_depth'? Remove the remaining #ifdef as well. Fixes: f53705fd9803 ("drm/imx: Use drm_fbdev_generic_setup()") Signed-off-by: Arnd Bergmann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20180926193846.2490574-1-arnd@arndb.de commit 4bdafb9ddfa4b3d970e2194d00e1c6d5002f513f Author: Chris Wilson Date: Wed Sep 26 21:12:22 2018 +0100 drm/i915: Remove i915.enable_ppgtt override Now that we are confident in providing full-ppgtt where supported, remove the ability to override the context isolation. v2: Remove faked aliasing-ppgtt for testing as it no longer is accepted. v3: s/USES/HAS/ to match usage and reject attempts to load the module on old GVT-g setups that do not provide support for full-ppgtt. v4: Insulate ABI ppGTT values from our internal enum (later plans involve moving ppGTT depth out of the enum, thus potentially breaking ABI unless we document the current values). Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Acked-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/msgid/20180926201222.5643-1-chris@chris-wilson.co.uk commit c5f6d578956a4304b6bb5393423768fecafff385 Author: Tvrtko Ursulin Date: Wed Sep 26 15:50:33 2018 +0100 drm/i915: Log HWS seqno consistently We mix hexa- and decimal which is confusing when reading the logs. So make the single odd one out instance decimal for consistency. v2: * Do the intel_ringbuffer.c as well. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180926145033.16318-1-tvrtko.ursulin@linux.intel.com commit f8e57863f81f962a1837d6a17825752de5bc23f7 Author: Tvrtko Ursulin Date: Wed Sep 26 09:03:53 2018 +0100 drm/i915: Trim partial view sg lists Partial views are small but there can be many of them, and since the sg list space for them is allocated pessimistically, we can save some slab by trimming the unused tail entries. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180926080353.20867-1-tvrtko.ursulin@linux.intel.com commit 4f297df89d29b531fa834ff4958456ecd82ee753 Author: Heiko Stuebner Date: Sun Sep 23 14:37:30 2018 +0200 drm/rockchip: vop: add rk3188 hs_start interrupt as dsp_hold equivalent The hs_start interrupt on rk3188 fires at the start of a new frame, so serves essentially the same purpose as the dsp_hold_valid irq in checking when the last frame got delivered when going to standby. So define it to fix a hang on atomic_disable of the vop because the completion never really completed before. Fixes: 428e15cc41e3 ("drm/rockchip: vop: add rk3188 vop definitions") Signed-off-by: Heiko Stuebner Reviewed-by: Sandy Huang Link: https://patchwork.freedesktop.org/patch/msgid/20180923123730.14706-1-heiko@sntech.de commit 9cb5f4873b993497d462b9406f9a1d8a148e461b Author: Thomas Zimmermann Date: Sun Jul 1 15:24:15 2018 +0200 drm/atmel-hlcdc: Replace drm_dev_unref with drm_dev_put This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20180701132415.10161-1-contact@tzimmermann.org commit dee4a0f8e70db36105e43dba5652737df5812190 Author: Chris Wilson Date: Tue Sep 25 09:31:58 2018 +0100 drm/i915/selftests: Smoketest preemption Very light stress test to bombard the submission backends with a large stream with requests of randomly assigned priorities. Preemption will be occasionally requested, but unlikely to ever succeed! (Although we may build a long queue of requests and so may trigger an attempt to inject a preempt context, as we emit no batch, the arbitration window is limited to between requests inside the ringbuffer. The likelihood of actually causing a preemption event is therefore very small. A later variant should try to improve the likelihood of preemption events!) v2: Include a second pattern with more frequent preemption Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180925083205.2229-1-chris@chris-wilson.co.uk commit e7351a8474d2df929751ef1397ac7f9c6d3c4e22 Author: Jani Nikula Date: Wed Sep 26 16:34:14 2018 +0300 drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" With i915.dmc_firmware_path="" it's obvious the intention is to disable CSR firmware loading. Bypass the firmware request altogether in this case, with more obvious debug logging. v2: Use DRM_INFO for logging (Chris) Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180926133414.22073-3-jani.nikula@intel.com commit d8a5b7d79fb7de60d9f0b9c56ebd8ef9f507d362 Author: Jani Nikula Date: Wed Sep 26 16:34:13 2018 +0300 drm/i915/csr: keep max firmware size together with firmare name and version Move max firmware size to the same if ladder with firmware name and required version. This allows us to detect the missing max size for a platform without actually loading the firmware, and makes the whole thing easier to maintain. We need to move the power get earlier to allow for early return in the missing platform case. While at it, extend the comment on why we return with the reference held on errors. We also need to move the module parameter override later to reuse the max firmware size, which is independent of the override. v2: Add comment on why we leak the wakeref on errors (Chris) v3: Rebase Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180926133414.22073-2-jani.nikula@intel.com commit 180e9d230efe7acad72a6a6ba47de82bcbc13fc4 Author: Jani Nikula Date: Wed Sep 26 16:34:12 2018 +0300 drm/i915/csr: keep firmware name and required version together Having two separate if ladders gets increasingly hard to maintain. Put them together. v2: Rebase Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180926133414.22073-1-jani.nikula@intel.com commit 029c33add915d5c688364ef189304f986baba45e Author: José Roberto de Souza Date: Tue Sep 18 13:47:14 2018 -0700 drm/i915: Remove duplicated definition of intel_update_rawclk A few line above we have another definition of intel_update_rawclk() keeping that one as the function is implemented in intel_cdclk.c. Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-6-jose.souza@intel.com commit c9b818d3f9f4eca54a2ad3083b4584f453b20bed Author: José Roberto de Souza Date: Tue Sep 18 13:47:13 2018 -0700 drm/i915: Move IPC WA #1141 to init_ipc() symmetric_memory do not change after initialization so lets just set ipc_enabled once for this WA. Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-5-jose.souza@intel.com commit 6323113b7af6ef2f095f159752b06e83a64d8b9a Author: José Roberto de Souza Date: Tue Sep 18 13:47:12 2018 -0700 drm/i915: Move SKL IPC WA to HAS_IPC() SKL has IPC but it should not be set according to the WA, so lets just mark as it don't have it to simply the code and avoid unnecessary MMIO writes at every call to intel_enable_ipc(). Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-4-jose.souza@intel.com commit fd847b8e60e0db72fd7d8922da0d1b07c1454efa Author: José Roberto de Souza Date: Tue Sep 18 13:47:11 2018 -0700 drm/i915: Do not modifiy reserved bit in gens that do not have IPC IPC was only added in SKL+(actually we don't even enable for SKL due WA) so without this change, driver was writing to a reserved bit. Also removing the uncessary dev_priv->ipc_enabled = false; as now gens without IPC will not have IPC enabled. v2(Rodrigo): - moved the new handling of WA #0477 to the next patch Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-3-jose.souza@intel.com commit 6edafc4eb3e4ae26b1b5dbc0cabfc82d96d6b9bb Author: José Roberto de Souza Date: Tue Sep 18 13:47:10 2018 -0700 drm/i915: Unset reset pch handshake when PCH is not present in one place Right now RESET_PCH_HANDSHAKE_ENABLE is enabled all the times inside of intel_power_domains_init_hw() and if PCH is NOP it is unsed in i915_gem_init_hw(). So making skl_pch_reset_handshake() handle both cases and calling it for the missing gens in intel_power_domains_init_hw(). Ivybridge have a different register and bits but with the same objective so moving it too. v2(Rodrigo): - handling IVYBRIDGE case inside intel_pch_reset_handshake() v4(Rodrigo and Ville): - moving the enable/disable decision to callers Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-2-jose.souza@intel.com commit 7c86828d564574759c20793ced59df2a60950c1d Author: José Roberto de Souza Date: Tue Sep 18 13:47:09 2018 -0700 drm/i915/runtime_pm: Share code to enable/disable PCH reset handshake Instead of have the same code spread into 4 platforms lets share it. BXT do not have a PCH so here also handling this case by unseting RESET_PCH_HANDSHAKE_ENABLE. v2(Rodrigo): - renamed to intel_pch_reset_handshake() - added comment about why BXT need the bit to be unset v3(Rodrigo and Ville): - added bool have_pch to intel_pch_reset_handshake() - added back BXT comment Cc: Ville Syrjälä Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180918204714.27306-1-jose.souza@intel.com commit 35c37ade79cdfe731ca1cae50c6628fef98a69a5 Author: Madhav Chauhan Date: Sun Sep 16 16:23:30 2018 +0530 drm/i915/icl: Define TA_TIMING_PARAM registers This patch defines DSI_TA_TIMING_PARAM and DPHY_TA_TIMING_PARAM registers used in dphy programming. v2: Changes (Jani N) - Define mask/shift for bitfields - Use bitfields name as per BSPEC - Define remaining bitfields Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-8-git-send-email-madhav.chauhan@intel.com commit 33868a91c1d9627b5003b8e299c46c6cfee4ff18 Author: Madhav Chauhan Date: Sun Sep 16 16:23:28 2018 +0530 drm/i915/icl: Define data/clock lanes dphy timing registers This patch defines DSI_CLK_TIMING_PARAM, DPHY_CLK_TIMING_PARAM, DSI_DATA_TIMING_PARAM, DPHY_DATA_TIMING_PARAM register used in dphy programming. v2: Define mask/shift for bitfields and keep names as per BSPEC (Jani N) Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-6-git-send-email-madhav.chauhan@intel.com commit 7a90938332d80faf973fbcffdf6e674e7b8f0914 Author: Chris Wilson Date: Wed Sep 26 11:47:18 2018 +0100 drm/i915: Avoid compiler warning for maybe unused gu_misc_iir /kisskb/src/drivers/gpu/drm/i915/i915_irq.c: warning: 'gu_misc_iir' may be used uninitialized in this function [-Wuninitialized]: => 3120:10 Silence the compiler warning by ensuring that the local variable is initialised and removing the guard that is confusing the older gcc. Reported-by: Geert Uytterhoeven Fixes: df0d28c185ad ("drm/i915/icl: GSE interrupt moves from DE_MISC to GU_MISC") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Paulo Zanoni Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20180926104718.17462-1-chris@chris-wilson.co.uk commit 74f6e183913b5dc90a004cafa84159ddb61cd0f0 Author: Chris Wilson Date: Wed Sep 26 11:47:07 2018 +0100 drm/i915: Convert to BITS_PER_TYPE In commit 9144d75e22ca ("include/linux/bitops.h: introduce BITS_PER_TYPE"), we made BITS_PER_TYPE available to all and now we can use the macro to replace some open-coded computation of sizeof(T) * BITS_PER_BYTE. Suggested-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180926104707.17410-1-chris@chris-wilson.co.uk commit 2863b00941bc3062ea3299ed4057acfd9e52c335 Merge: fc3fed5d297b5 36c9c3c91128e Author: Jani Nikula Date: Wed Sep 26 11:24:04 2018 +0300 Merge drm/drm-next into drm-intel-next-queued Catch up in general, and get DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT specifically. Signed-off-by: Jani Nikula commit fc3fed5d297b51f9e2c7d4f969c95c0d6e50ca57 Author: Ville Syrjälä Date: Tue Sep 18 17:02:43 2018 +0300 drm/i915: Check fb stride against plane max stride commit 4e0b83a567e2 ("drm/i915: Extract per-platform plane->check() functions") removed the plane max stride check for sprite planes. I was going to add it back when introducing GTT remapping for the display, but after further thought it seems better to re-introduce it separately. So let's add the max stride check back. And let's do it in a nicer form than what we had before and do it for all plane types (easy now that we have the ->max_stride() plane vfunc). Only sprite planes really need this for now since primary planes are capable of scanning out the current max fb size we allow, and cursors have more stringent stride checks elsewhere. Cc: José Roberto de Souza Fixes: 4e0b83a567e2 ("drm/i915: Extract per-platform plane->check() functions") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180918140243.12207-1-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan commit 0a3c561da12b9ac64c5b77dde3f9db0be515c167 Author: Juha-Pekka Heikkila Date: Mon Aug 27 15:37:53 2018 +0300 drm/i915: Enable RGB565 90/270 plane rotation for gen11 onwards. From gen11 onwards RGB565 90/270 plane rotation is supported on hardware. IGT: https://patchwork.freedesktop.org/series/48756/ Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Ville Syrjälä [mlankhorst: Rebase on top of current dinq (self), fix grammar (Ville).] Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1535373473-3594-3-git-send-email-juhapekka.heikkila@gmail.com commit 4a3d3f6785bed372daaa4c57d9d90cad01da9d8e Author: Chris Wilson Date: Sat Sep 22 15:18:03 2018 +0100 drm/i915: Match code to comment and enforce ppgtt for execlists Our execlist dispatch code requires a ppGTT so make sure we enforce that option in intel_sanitize_enable_ppgtt(). The comment already tries to explain that execlists requires ppgtt, but was written when gen8 may have also taken the legacy path; so rewrite the code to match the comment by using HAS_EXECLISTS() feature instead of the gen. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180922141804.21183-1-chris@chris-wilson.co.uk commit 570b16b559beca0f6a01dfb8944d5abadc1cfb31 Author: Mahesh Kumar Date: Wed Sep 19 14:01:26 2018 +0530 drm/i915: use for_each_pipe loop to assign crtc_mask This cleanup patch makes changes to use for_each_pipe loop during bit-mask assignment of allowed crtc with encoder. changes: - use BIT(i) macro instead of (1 << i) (Chris) changes from V2: - use int for consistency (Jani) changes from V3: - instead use enum pipe (Ville) changes from V4: - drop DP/HDMI changes, as already part of patch from ville Cc: Jani Nikula Cc: Rodrigo Vivi Signed-off-by: Mahesh Kumar Reviewed-by: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180919083126.31805-1-mahesh1.kumar@intel.com commit 8db05f5947132bc69c8ad3fe65753400888aa483 Author: Chris Wilson Date: Wed Sep 19 20:55:16 2018 +0100 drm/i915/execlists: Assert the queue is non-empty on unsubmitting In the sequence <0>[ 531.960431] drv_self-4806 7.... 527402570us : intel_gpu_reset: engine_mask=1, ret=0, retry=0 <0>[ 531.960431] drv_self-4806 7.... 527402571us : execlists_reset: rcs0 request global=115de, current=71133 <0>[ 531.960431] drv_self-4806 7d..1 527402571us : execlists_cancel_port_requests: rcs0:port0 global=71134 (fence 826b:198), (current 71133) <0>[ 531.960431] drv_self-4806 7d..1 527402572us : execlists_cancel_port_requests: rcs0:port1 global=71135 (fence 826c:53), (current 71133) <0>[ 531.960431] drv_self-4806 7d..1 527402572us : __i915_request_unsubmit: rcs0 fence 826c:53 <- global=71135, current 71133 <0>[ 531.960431] drv_self-4806 7d..1 527402579us : __i915_request_unsubmit: rcs0 fence 826b:198 <- global=71134, current 71133 <0>[ 531.960431] drv_self-4806 7.... 527402613us : intel_engine_cancel_stop_cs: rcs0 <0>[ 531.960431] drv_self-4806 7.... 527402624us : execlists_reset_finish: rcs0 we are missing the execlists_submission_tasklet() invocation before the execlists_reset_fini() implying that either the queue is empty, or we failed to schedule and run the tasklet on finish. Add an assert so we are sure that on unsubmitting the incomplete request after reset, the queue is indeed populated. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180919195544.1511-12-chris@chris-wilson.co.uk commit e9f8707839eed9bad3e99f71be6e73c780d2ff47 Author: Adam Ford Date: Sun Sep 23 10:37:16 2018 -0500 ARM: omap2plus_defconfig: Add tlv320aic23 as module The AM3517 EVM has an expander board which has two tlv320aic23 codecs. This enables the driver for these codecs as a module. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 70a7b83628fa3f6599bd1a7c500f6a8fcdb81ab0 Author: Madhav Chauhan Date: Sun Sep 16 16:23:27 2018 +0530 drm/i915/icl: Program T_INIT_MASTER registers This patch programs the time (in escape clocks) to drive the link in the initialization (i.e. LP-11) state. v2: Rebase v3: Remove step hard coding comments (Jani N) Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-5-git-send-email-madhav.chauhan@intel.com commit ba3df888be909a8850e695a3d9631cfb49afede2 Author: Madhav Chauhan Date: Sun Sep 16 16:23:26 2018 +0530 drm/i915/icl: Enable DDI Buffer This patch enables DDI buffer by writing to DDI_BUF_CTL register and wait for DDI status to be *not idle* for a port. v2: Rebase v3: Remove step hard coding comments (Jani N) Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-4-git-send-email-madhav.chauhan@intel.com commit 3f4b9d9d02c6239f5d0eae6f59af5252ef8beefd Author: Madhav Chauhan Date: Sun Sep 16 16:23:25 2018 +0530 drm/i915/icl: DSI vswing programming sequence This patch setup voltage swing before enabling combo PHY DDI (shared with DSI). Note that DSI voltage swing programming is for high speed data buffers. HW automatically handles the voltage swing for the low power data buffers. v2: Rebase v3: Address various review comments related to VSWING programming (Jani N) Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-3-git-send-email-madhav.chauhan@intel.com commit fc41001d97083fba638b9bbbf84c72db735c1680 Author: Madhav Chauhan Date: Sun Sep 16 16:23:24 2018 +0530 drm/i915/icl: Configure lane sequencing of combo phy transmitter This patch set the loadgen select and latency optimization for aux and transmit lanes of combo phy transmitters. It will be used for MIPI DSI HS operations. v2: Rebase v3: Add empty line to make code more legible (Ville). Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1537095223-5184-2-git-send-email-madhav.chauhan@intel.com commit 945ac78928faab3de7919f0f3135240db5c514c7 Author: Maarten Lankhorst Date: Thu Sep 20 12:27:11 2018 +0200 drm/i915: Force planar YUV coordinates to be a multiple of 2, v2. We can't make NV12 work any other way. The scaler doesn't handle odd coordinates well, and we will get visual corruption on the screen. Changes since v1: - Put the check in intel_plane_check_src_coordinates. (Ville) Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-9-maarten.lankhorst@linux.intel.com commit ab5c60bf76755d24ae8de5c1c6ac594934656ace Author: Maarten Lankhorst Date: Thu Sep 20 12:27:10 2018 +0200 drm/i915: Move programming plane scaler to its own function. This cleans the code up slightly, and will make other changes easier. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-8-maarten.lankhorst@linux.intel.com commit 0aaf29b35f93f68128f92ea826ebfee8df9ab1ef Author: Maarten Lankhorst Date: Fri Sep 21 16:44:37 2018 +0200 drm/i915: Clean up scaler setup, v2. On skylake we can switch to a high quality scaler mode when only 1 out of 2 scalers are used, but on GLK and later bit 28 has a different meaning. Don't set it, and make clear the distinction between SKL and later PS values. Changes since v1: - Add missing break statement. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper [mlankhorst: Remove extra newline] Link: https://patchwork.freedesktop.org/patch/msgid/20180921144437.20037-1-maarten.lankhorst@linux.intel.com commit 6c246b81f9380855b13433d1d8fbd67ff7f67583 Author: Maarten Lankhorst Date: Thu Sep 20 12:27:08 2018 +0200 drm/i915: Replace call to commit_planes_on_crtc with internal update, v2. drm_atomic_helper_commit_planes_on_crtc calls begin_commit, then plane_update hooks, then flush_commit. Because we keep our own visibility tracking through plane_state->visible there's no need to rely on the atomic hooks for this. By explicitly writing our own helper, we can update visible planes as needed, which is useful to make NV12 support work as intended. Changes since v1: - Reword commit message. (Matt Roper) - Rename to intel_update_planes_on_crtc(). (Matt) Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-6-maarten.lankhorst@linux.intel.com commit f59e9701dbdc275a3042e1357574e0e1779b3082 Author: Maarten Lankhorst Date: Thu Sep 20 12:27:07 2018 +0200 drm/i915: Make intel_crtc_disable_planes() use active planes mask. This will only disable planes we actually had marked as visible in crtc_state->visible_planes and cleans up intel_crtc_disable_plane() slightly. This is also useful for when we start enabling NV12 support for gen11, in which we will make the separate Y plane visible, but ignore the Y plane's state. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-5-maarten.lankhorst@linux.intel.com commit 62ef0dd3cc0c217c3d58a1e92577c66c08598f7b Author: Maarten Lankhorst Date: Thu Sep 20 12:27:06 2018 +0200 drm/i915: Unconditionally clear plane visibility, v2. We need to assume the plane has been visible before, even if no CRTC is assigned to the plane. This is because when enabling a nv12 plane on gen11, we will have to enable an extra plane and make it visible by marking it in crtc_state->active_planes for intel_update_planes_on_crtc(). Additionally, clear visible flag in intel_plane_atomic_check, in case we ever hit a bug with visibility. Our code implicitly assumes that plane_state->visible is only true when crtc and fb are set, so we will either null deref in intel_fbc_choose_crtc() or do something bad during the actual commit which cares even more. Changes since v1: - Unconditionally clear crtc_state->active_planes as well. - Reword commit message, since this is now a preparation patch for NV12 Y / UV plane linking. Signed-off-by: Maarten Lankhorst [mlankhorst: Clear nv12_planes in the beginning as well, clarify commit message] Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-4-maarten.lankhorst@linux.intel.com commit c249c5f64336ca7f8b314c16dbf440b091514f50 Author: Maarten Lankhorst Date: Thu Sep 20 12:27:05 2018 +0200 drm/i915: Handle cursor updating active_planes correctly, v2. While we may not update new_crtc_state, we may clear active_planes if the new cursor update state will disable the cursor, but we fail after. If this is immediately followed by a modeset disable, we may soon not disable the planes correctly when we start depending on active_planes. Changes since v1: - Clarify why we cannot swap crtc_state. (Matt) Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-3-maarten.lankhorst@linux.intel.com commit a1cccdcf330e2a59b72b1588a7ef87cbaaa8a4e9 Author: Maarten Lankhorst Date: Thu Sep 20 12:27:04 2018 +0200 drm/i915: Clean up casts to crtc_state in intel_atomic_commit_tail() Use old/new_intel_crtc_state, and get rid of all the conversion casts where they don't add anything. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20180920102711.4184-2-maarten.lankhorst@linux.intel.com commit 1435696556e46a7dc22a4b2fb1a9a68ae75591c2 Author: Suzuki K Poulose Date: Tue Sep 11 11:17:12 2018 +0100 ARM: dts: vexpress/TC2: Update entries to match latest coresight bindings Switch to the new coresight bindings Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose [sudeep.holla: updated title and fixed couple of remaining dtc warnings] Signed-off-by: Sudeep Holla